mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-07 16:08:54 -05:00
707 lines
1.1 MiB
707 lines
1.1 MiB
(function(){"use strict";var Of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function C_(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var i=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var o=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(i,r,o.get?o:{enumerable:!0,get:function(){return s[r]}})}),i}var A_={exports:{}},Yc={},w_={exports:{}},Wc={exports:{}};/**
|
||
* @license React
|
||
* react.development.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.
|
||
*/Wc.exports;var D_;function wD(){return D_||(D_=1,function(s,e){(function(){function i(D,G){Object.defineProperty(u.prototype,D,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",G[0],G[1])}})}function r(D){return D===null||typeof D!="object"?null:(D=Ir&&D[Ir]||D["@@iterator"],typeof D=="function"?D:null)}function o(D,G){D=(D=D.constructor)&&(D.displayName||D.name)||"ReactClass";var ye=D+"."+G;Ra[ye]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",G,D),Ra[ye]=!0)}function u(D,G,ye){this.props=D,this.context=G,this.refs=Uo,this.updater=ye||Vs}function c(){}function p(D,G,ye){this.props=D,this.context=G,this.refs=Uo,this.updater=ye||Vs}function g(D){return""+D}function b(D){try{g(D);var G=!1}catch{G=!0}if(G){G=console;var ye=G.error,Te=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ye.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Te),g(D)}}function S(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===Bo?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case oe:return"Fragment";case Ae:return"Profiler";case Le:return"StrictMode";case st:return"Suspense";case Lr:return"SuspenseList";case cn:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case Ye:return"Portal";case xt:return(D.displayName||"Context")+".Provider";case at:return(D._context.displayName||"Context")+".Consumer";case Ut:var G=D.render;return D=D.displayName,D||(D=G.displayName||G.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case Rt:return G=D.displayName||null,G!==null?G:S(D.type)||"Memo";case si:G=D._payload,D=D._init;try{return S(D(G))}catch{}}return null}function E(D){if(D===oe)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===si)return"<...>";try{var G=S(D);return G?"<"+G+">":"<...>"}catch{return"<...>"}}function A(){var D=Ce.A;return D===null?null:D.getOwner()}function R(){return Error("react-stack-top-frame")}function P(D){if(Nr.call(D,"key")){var G=Object.getOwnPropertyDescriptor(D,"key").get;if(G&&G.isReactWarning)return!1}return D.key!==void 0}function w(D,G){function ye(){$s||($s=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}ye.isReactWarning=!0,Object.defineProperty(D,"key",{get:ye,configurable:!0})}function z(){var D=S(this.type);return Pr[D]||(Pr[D]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),D=this.props.ref,D!==void 0?D:null}function H(D,G,ye,Te,Re,Ge,He,it){return ye=Ge.ref,D={$$typeof:Me,type:D,key:G,props:Ge,_owner:Re},(ye!==void 0?ye:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:z}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:He}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:it}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function X(D,G){return G=H(D.type,G,void 0,void 0,D._owner,D.props,D._debugStack,D._debugTask),D._store&&(G._store.validated=D._store.validated),G}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===Me}function W(D){var G={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ye){return G[ye]})}function Z(D,G){return typeof D=="object"&&D!==null&&D.key!=null?(b(D.key),W(""+D.key)):G.toString(36)}function le(){}function J(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(le,le):(D.status="pending",D.then(function(G){D.status==="pending"&&(D.status="fulfilled",D.value=G)},function(G){D.status==="pending"&&(D.status="rejected",D.reason=G)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function Y(D,G,ye,Te,Re){var Ge=typeof D;(Ge==="undefined"||Ge==="boolean")&&(D=null);var He=!1;if(D===null)He=!0;else switch(Ge){case"bigint":case"string":case"number":He=!0;break;case"object":switch(D.$$typeof){case Me:case Ye:He=!0;break;case si:return He=D._init,Y(He(D._payload),G,ye,Te,Re)}}if(He){He=D,Re=Re(He);var it=Te===""?"."+Z(He,0):Te;return _i(Re)?(ye="",it!=null&&(ye=it.replace(Ia,"$&/")+"/"),Y(Re,G,ye,"",function(Yt){return Yt})):Re!=null&&($(Re)&&(Re.key!=null&&(He&&He.key===Re.key||b(Re.key)),ye=X(Re,ye+(Re.key==null||He&&He.key===Re.key?"":(""+Re.key).replace(Ia,"$&/")+"/")+it),Te!==""&&He!=null&&$(He)&&He.key==null&&He._store&&!He._store.validated&&(ye._store.validated=2),Re=ye),G.push(Re)),1}if(He=0,it=Te===""?".":Te+":",_i(D))for(var ze=0;ze<D.length;ze++)Te=D[ze],Ge=it+Z(Te,ze),He+=Y(Te,G,ye,Ge,Re);else if(ze=r(D),typeof ze=="function")for(ze===D.entries&&(Ur||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ur=!0),D=ze.call(D),ze=0;!(Te=D.next()).done;)Te=Te.value,Ge=it+Z(Te,ze++),He+=Y(Te,G,ye,Ge,Re);else if(Ge==="object"){if(typeof D.then=="function")return Y(J(D),G,ye,Te,Re);throw G=String(D),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return He}function ee(D,G,ye){if(D==null)return D;var Te=[],Re=0;return Y(D,Te,"","",function(Ge){return G.call(ye,Ge,Re++)}),Te}function ve(D){if(D._status===-1){var G=D._result;G=G(),G.then(function(ye){(D._status===0||D._status===-1)&&(D._status=1,D._result=ye)},function(ye){(D._status===0||D._status===-1)&&(D._status=2,D._result=ye)}),D._status===-1&&(D._status=0,D._result=G)}if(D._status===1)return G=D._result,G===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
||
|
||
Your code should look like:
|
||
const MyComponent = lazy(() => import('./MyComponent'))
|
||
|
||
Did you accidentally put curly braces around the import?`,G),"default"in G||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
||
|
||
Your code should look like:
|
||
const MyComponent = lazy(() => import('./MyComponent'))`,G),G.default;throw D._result}function de(){var D=Ce.H;return D===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
||
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
||
2. You might be breaking the Rules of Hooks
|
||
3. You might have more than one copy of React in the same app
|
||
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),D}function ge(){}function pe(D){if(ot===null)try{var G=("require"+Math.random()).slice(0,7);ot=(s&&s[G]).call(s,"timers").setImmediate}catch{ot=function(Te){Na===!1&&(Na=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Re=new MessageChannel;Re.port1.onmessage=Te,Re.port2.postMessage(void 0)}}return ot(D)}function Oe(D){return 1<D.length&&typeof AggregateError=="function"?new AggregateError(D):D[0]}function nt(D,G){G!==Xs-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Xs=G}function he(D,G,ye){var Te=Ce.actQueue;if(Te!==null)if(Te.length!==0)try{Ee(Te),pe(function(){return he(D,G,ye)});return}catch(Re){Ce.thrownErrors.push(Re)}else Ce.actQueue=null;0<Ce.thrownErrors.length?(Te=Oe(Ce.thrownErrors),Ce.thrownErrors.length=0,ye(Te)):G(D)}function Ee(D){if(!wn){wn=!0;var G=0;try{for(;G<D.length;G++){var ye=D[G];do{Ce.didUsePromise=!1;var Te=ye(!1);if(Te!==null){if(Ce.didUsePromise){D[G]=ye,D.splice(0,G);return}ye=Te}else break}while(1)}D.length=0}catch(Re){D.splice(0,G+1),Ce.thrownErrors.push(Re)}finally{wn=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Me=Symbol.for("react.transitional.element"),Ye=Symbol.for("react.portal"),oe=Symbol.for("react.fragment"),Le=Symbol.for("react.strict_mode"),Ae=Symbol.for("react.profiler"),at=Symbol.for("react.consumer"),xt=Symbol.for("react.context"),Ut=Symbol.for("react.forward_ref"),st=Symbol.for("react.suspense"),Lr=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),si=Symbol.for("react.lazy"),cn=Symbol.for("react.activity"),Ir=Symbol.iterator,Ra={},Vs={isMounted:function(){return!1},enqueueForceUpdate:function(D){o(D,"forceUpdate")},enqueueReplaceState:function(D){o(D,"replaceState")},enqueueSetState:function(D){o(D,"setState")}},Cu=Object.assign,Uo={};Object.freeze(Uo),u.prototype.isReactComponent={},u.prototype.setState=function(D,G){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,G,"setState")},u.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};var zt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ps;for(ps in zt)zt.hasOwnProperty(ps)&&i(ps,zt[ps]);c.prototype=u.prototype,zt=p.prototype=new c,zt.constructor=p,Cu(zt,u.prototype),zt.isPureReactComponent=!0;var _i=Array.isArray,Bo=Symbol.for("react.client.reference"),Ce={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Nr=Object.prototype.hasOwnProperty,qs=console.createTask?console.createTask:function(){return null};zt={"react-stack-bottom-frame":function(D){return D()}};var $s,Ma,Pr={},La=zt["react-stack-bottom-frame"].bind(zt,R)(),Gs=qs(E(R)),Ur=!1,Ia=/\/+/g,Br=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},Na=!1,ot=null,Xs=0,Ui=!1,wn=!1,Ys=typeof queueMicrotask=="function"?function(D){queueMicrotask(function(){return queueMicrotask(D)})}:pe;zt=Object.freeze({__proto__:null,c:function(D){return de().useMemoCache(D)}}),e.Children={map:ee,forEach:function(D,G,ye){ee(D,function(){G.apply(this,arguments)},ye)},count:function(D){var G=0;return ee(D,function(){G++}),G},toArray:function(D){return ee(D,function(G){return G})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},e.Component=u,e.Fragment=oe,e.Profiler=Ae,e.PureComponent=p,e.StrictMode=Le,e.Suspense=st,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ce,e.__COMPILER_RUNTIME=zt,e.act=function(D){var G=Ce.actQueue,ye=Xs;Xs++;var Te=Ce.actQueue=G!==null?G:[],Re=!1;try{var Ge=D()}catch(ze){Ce.thrownErrors.push(ze)}if(0<Ce.thrownErrors.length)throw nt(G,ye),D=Oe(Ce.thrownErrors),Ce.thrownErrors.length=0,D;if(Ge!==null&&typeof Ge=="object"&&typeof Ge.then=="function"){var He=Ge;return Ys(function(){Re||Ui||(Ui=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(ze,Yt){Re=!0,He.then(function(ms){if(nt(G,ye),ye===0){try{Ee(Te),pe(function(){return he(ms,ze,Yt)})}catch(Pd){Ce.thrownErrors.push(Pd)}if(0<Ce.thrownErrors.length){var Nd=Oe(Ce.thrownErrors);Ce.thrownErrors.length=0,Yt(Nd)}}else ze(ms)},function(ms){nt(G,ye),0<Ce.thrownErrors.length&&(ms=Oe(Ce.thrownErrors),Ce.thrownErrors.length=0),Yt(ms)})}}}var it=Ge;if(nt(G,ye),ye===0&&(Ee(Te),Te.length!==0&&Ys(function(){Re||Ui||(Ui=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Ce.actQueue=null),0<Ce.thrownErrors.length)throw D=Oe(Ce.thrownErrors),Ce.thrownErrors.length=0,D;return{then:function(ze,Yt){Re=!0,ye===0?(Ce.actQueue=Te,pe(function(){return he(it,ze,Yt)})):ze(it)}}},e.cache=function(D){return function(){return D.apply(null,arguments)}},e.captureOwnerStack=function(){var D=Ce.getCurrentStack;return D===null?null:D()},e.cloneElement=function(D,G,ye){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var Te=Cu({},D.props),Re=D.key,Ge=D._owner;if(G!=null){var He;e:{if(Nr.call(G,"ref")&&(He=Object.getOwnPropertyDescriptor(G,"ref").get)&&He.isReactWarning){He=!1;break e}He=G.ref!==void 0}He&&(Ge=A()),P(G)&&(b(G.key),Re=""+G.key);for(it in G)!Nr.call(G,it)||it==="key"||it==="__self"||it==="__source"||it==="ref"&&G.ref===void 0||(Te[it]=G[it])}var it=arguments.length-2;if(it===1)Te.children=ye;else if(1<it){He=Array(it);for(var ze=0;ze<it;ze++)He[ze]=arguments[ze+2];Te.children=He}for(Te=H(D.type,Re,void 0,void 0,Ge,Te,D._debugStack,D._debugTask),Re=2;Re<arguments.length;Re++)Ge=arguments[Re],$(Ge)&&Ge._store&&(Ge._store.validated=1);return Te},e.createContext=function(D){return D={$$typeof:xt,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:at,_context:D},D._currentRenderer=null,D._currentRenderer2=null,D},e.createElement=function(D,G,ye){for(var Te=2;Te<arguments.length;Te++){var Re=arguments[Te];$(Re)&&Re._store&&(Re._store.validated=1)}if(Te={},Re=null,G!=null)for(ze in Ma||!("__self"in G)||"key"in G||(Ma=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),P(G)&&(b(G.key),Re=""+G.key),G)Nr.call(G,ze)&&ze!=="key"&&ze!=="__self"&&ze!=="__source"&&(Te[ze]=G[ze]);var Ge=arguments.length-2;if(Ge===1)Te.children=ye;else if(1<Ge){for(var He=Array(Ge),it=0;it<Ge;it++)He[it]=arguments[it+2];Object.freeze&&Object.freeze(He),Te.children=He}if(D&&D.defaultProps)for(ze in Ge=D.defaultProps,Ge)Te[ze]===void 0&&(Te[ze]=Ge[ze]);Re&&w(Te,typeof D=="function"?D.displayName||D.name||"Unknown":D);var ze=1e4>Ce.recentlyCreatedOwnerStacks++;return H(D,Re,void 0,void 0,A(),Te,ze?Error("react-stack-top-frame"):La,ze?qs(E(D)):Gs)},e.createRef=function(){var D={current:null};return Object.seal(D),D},e.forwardRef=function(D){D!=null&&D.$$typeof===Rt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof D!="function"?console.error("forwardRef requires a render function but was given %s.",D===null?"null":typeof D):D.length!==0&&D.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",D.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),D!=null&&D.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var G={$$typeof:Ut,render:D},ye;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return ye},set:function(Te){ye=Te,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Te}),D.displayName=Te)}}),G},e.isValidElement=$,e.lazy=function(D){return{$$typeof:si,_payload:{_status:-1,_result:D},_init:ve}},e.memo=function(D,G){D==null&&console.error("memo: The first argument must be a component. Instead received: %s",D===null?"null":typeof D),G={$$typeof:Rt,type:D,compare:G===void 0?null:G};var ye;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return ye},set:function(Te){ye=Te,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Te}),D.displayName=Te)}}),G},e.startTransition=function(D){var G=Ce.T,ye={};Ce.T=ye,ye._updatedFibers=new Set;try{var Te=D(),Re=Ce.S;Re!==null&&Re(ye,Te),typeof Te=="object"&&Te!==null&&typeof Te.then=="function"&&Te.then(ge,Br)}catch(Ge){Br(Ge)}finally{G===null&&ye._updatedFibers&&(D=ye._updatedFibers.size,ye._updatedFibers.clear(),10<D&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Ce.T=G}},e.unstable_useCacheRefresh=function(){return de().useCacheRefresh()},e.use=function(D){return de().use(D)},e.useActionState=function(D,G,ye){return de().useActionState(D,G,ye)},e.useCallback=function(D,G){return de().useCallback(D,G)},e.useContext=function(D){var G=de();return D.$$typeof===at&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),G.useContext(D)},e.useDebugValue=function(D,G){return de().useDebugValue(D,G)},e.useDeferredValue=function(D,G){return de().useDeferredValue(D,G)},e.useEffect=function(D,G,ye){D==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Te=de();if(typeof ye=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Te.useEffect(D,G)},e.useId=function(){return de().useId()},e.useImperativeHandle=function(D,G,ye){return de().useImperativeHandle(D,G,ye)},e.useInsertionEffect=function(D,G){return D==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),de().useInsertionEffect(D,G)},e.useLayoutEffect=function(D,G){return D==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),de().useLayoutEffect(D,G)},e.useMemo=function(D,G){return de().useMemo(D,G)},e.useOptimistic=function(D,G){return de().useOptimistic(D,G)},e.useReducer=function(D,G,ye){return de().useReducer(D,G,ye)},e.useRef=function(D){return de().useRef(D)},e.useState=function(D){return de().useState(D)},e.useSyncExternalStore=function(D,G,ye){return de().useSyncExternalStore(D,G,ye)},e.useTransition=function(){return de().useTransition()},e.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Wc,Wc.exports)),Wc.exports}w_.exports=wD();var Tn=w_.exports;/**
|
||
* @license React
|
||
* react-jsx-runtime.development.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 k_;function DD(){return k_||(k_=1,function(){function s(oe){if(oe==null)return null;if(typeof oe=="function")return oe.$$typeof===ve?null:oe.displayName||oe.name||null;if(typeof oe=="string")return oe;switch(oe){case w:return"Fragment";case H:return"Profiler";case z:return"StrictMode";case Z:return"Suspense";case le:return"SuspenseList";case ee:return"Activity"}if(typeof oe=="object")switch(typeof oe.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),oe.$$typeof){case P:return"Portal";case $:return(oe.displayName||"Context")+".Provider";case X:return(oe._context.displayName||"Context")+".Consumer";case W:var Le=oe.render;return oe=oe.displayName,oe||(oe=Le.displayName||Le.name||"",oe=oe!==""?"ForwardRef("+oe+")":"ForwardRef"),oe;case J:return Le=oe.displayName||null,Le!==null?Le:s(oe.type)||"Memo";case Y:Le=oe._payload,oe=oe._init;try{return s(oe(Le))}catch{}}return null}function e(oe){return""+oe}function i(oe){try{e(oe);var Le=!1}catch{Le=!0}if(Le){Le=console;var Ae=Le.error,at=typeof Symbol=="function"&&Symbol.toStringTag&&oe[Symbol.toStringTag]||oe.constructor.name||"Object";return Ae.call(Le,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",at),e(oe)}}function r(oe){if(oe===w)return"<>";if(typeof oe=="object"&&oe!==null&&oe.$$typeof===Y)return"<...>";try{var Le=s(oe);return Le?"<"+Le+">":"<...>"}catch{return"<...>"}}function o(){var oe=de.A;return oe===null?null:oe.getOwner()}function u(){return Error("react-stack-top-frame")}function c(oe){if(ge.call(oe,"key")){var Le=Object.getOwnPropertyDescriptor(oe,"key").get;if(Le&&Le.isReactWarning)return!1}return oe.key!==void 0}function p(oe,Le){function Ae(){nt||(nt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Le))}Ae.isReactWarning=!0,Object.defineProperty(oe,"key",{get:Ae,configurable:!0})}function g(){var oe=s(this.type);return he[oe]||(he[oe]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),oe=this.props.ref,oe!==void 0?oe:null}function b(oe,Le,Ae,at,xt,Ut,st,Lr){return Ae=Ut.ref,oe={$$typeof:R,type:oe,key:Le,props:Ut,_owner:xt},(Ae!==void 0?Ae:null)!==null?Object.defineProperty(oe,"ref",{enumerable:!1,get:g}):Object.defineProperty(oe,"ref",{enumerable:!1,value:null}),oe._store={},Object.defineProperty(oe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(oe,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(oe,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:st}),Object.defineProperty(oe,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Lr}),Object.freeze&&(Object.freeze(oe.props),Object.freeze(oe)),oe}function S(oe,Le,Ae,at,xt,Ut,st,Lr){var Rt=Le.children;if(Rt!==void 0)if(at)if(pe(Rt)){for(at=0;at<Rt.length;at++)E(Rt[at]);Object.freeze&&Object.freeze(Rt)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(Rt);if(ge.call(Le,"key")){Rt=s(oe);var si=Object.keys(Le).filter(function(Ir){return Ir!=="key"});at=0<si.length?"{key: someKey, "+si.join(": ..., ")+": ...}":"{key: someKey}",Ye[Rt+at]||(si=0<si.length?"{"+si.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
||
let props = %s;
|
||
<%s {...props} />
|
||
React keys must be passed directly to JSX without using spread:
|
||
let props = %s;
|
||
<%s key={someKey} {...props} />`,at,Rt,si,Rt),Ye[Rt+at]=!0)}if(Rt=null,Ae!==void 0&&(i(Ae),Rt=""+Ae),c(Le)&&(i(Le.key),Rt=""+Le.key),"key"in Le){Ae={};for(var cn in Le)cn!=="key"&&(Ae[cn]=Le[cn])}else Ae=Le;return Rt&&p(Ae,typeof oe=="function"?oe.displayName||oe.name||"Unknown":oe),b(oe,Rt,Ut,xt,o(),Ae,st,Lr)}function E(oe){typeof oe=="object"&&oe!==null&&oe.$$typeof===R&&oe._store&&(oe._store.validated=1)}var A=Tn,R=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),$=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ve=Symbol.for("react.client.reference"),de=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=Object.prototype.hasOwnProperty,pe=Array.isArray,Oe=console.createTask?console.createTask:function(){return null};A={"react-stack-bottom-frame":function(oe){return oe()}};var nt,he={},Ee=A["react-stack-bottom-frame"].bind(A,u)(),Me=Oe(r(u)),Ye={};Yc.Fragment=w,Yc.jsx=function(oe,Le,Ae,at,xt){var Ut=1e4>de.recentlyCreatedOwnerStacks++;return S(oe,Le,Ae,!1,at,xt,Ut?Error("react-stack-top-frame"):Ee,Ut?Oe(r(oe)):Me)},Yc.jsxs=function(oe,Le,Ae,at,xt){var Ut=1e4>de.recentlyCreatedOwnerStacks++;return S(oe,Le,Ae,!0,at,xt,Ut?Error("react-stack-top-frame"):Ee,Ut?Oe(r(oe)):Me)}}()),Yc}A_.exports=DD();var Rf=A_.exports,O_={exports:{}},Ig={exports:{}},Ng={};/**
|
||
* @license React
|
||
* scheduler.development.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 R_;function kD(){return R_||(R_=1,function(s){(function(){function e(){if(Z=!1,ee){var he=s.unstable_now();ge=he;var Ee=!0;try{e:{$=!1,W&&(W=!1,J(ve),ve=-1),X=!0;var Me=H;try{t:{for(c(he),z=r(R);z!==null&&!(z.expirationTime>he&&g());){var Ye=z.callback;if(typeof Ye=="function"){z.callback=null,H=z.priorityLevel;var oe=Ye(z.expirationTime<=he);if(he=s.unstable_now(),typeof oe=="function"){z.callback=oe,c(he),Ee=!0;break t}z===r(R)&&o(R),c(he)}else o(R);z=r(R)}if(z!==null)Ee=!0;else{var Le=r(P);Le!==null&&b(p,Le.startTime-he),Ee=!1}}break e}finally{z=null,H=Me,X=!1}Ee=void 0}}finally{Ee?pe():ee=!1}}}function i(he,Ee){var Me=he.length;he.push(Ee);e:for(;0<Me;){var Ye=Me-1>>>1,oe=he[Ye];if(0<u(oe,Ee))he[Ye]=Ee,he[Me]=oe,Me=Ye;else break e}}function r(he){return he.length===0?null:he[0]}function o(he){if(he.length===0)return null;var Ee=he[0],Me=he.pop();if(Me!==Ee){he[0]=Me;e:for(var Ye=0,oe=he.length,Le=oe>>>1;Ye<Le;){var Ae=2*(Ye+1)-1,at=he[Ae],xt=Ae+1,Ut=he[xt];if(0>u(at,Me))xt<oe&&0>u(Ut,at)?(he[Ye]=Ut,he[xt]=Me,Ye=xt):(he[Ye]=at,he[Ae]=Me,Ye=Ae);else if(xt<oe&&0>u(Ut,Me))he[Ye]=Ut,he[xt]=Me,Ye=xt;else break e}}return Ee}function u(he,Ee){var Me=he.sortIndex-Ee.sortIndex;return Me!==0?Me:he.id-Ee.id}function c(he){for(var Ee=r(P);Ee!==null;){if(Ee.callback===null)o(P);else if(Ee.startTime<=he)o(P),Ee.sortIndex=Ee.expirationTime,i(R,Ee);else break;Ee=r(P)}}function p(he){if(W=!1,c(he),!$)if(r(R)!==null)$=!0,ee||(ee=!0,pe());else{var Ee=r(P);Ee!==null&&b(p,Ee.startTime-he)}}function g(){return Z?!0:!(s.unstable_now()-ge<de)}function b(he,Ee){ve=le(function(){he(s.unstable_now())},Ee)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var S=performance;s.unstable_now=function(){return S.now()}}else{var E=Date,A=E.now();s.unstable_now=function(){return E.now()-A}}var R=[],P=[],w=1,z=null,H=3,X=!1,$=!1,W=!1,Z=!1,le=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null,ee=!1,ve=-1,de=5,ge=-1;if(typeof Y=="function")var pe=function(){Y(e)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,nt=Oe.port2;Oe.port1.onmessage=e,pe=function(){nt.postMessage(null)}}else pe=function(){le(e,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(he){he.callback=null},s.unstable_forceFrameRate=function(he){0>he||125<he?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<he?Math.floor(1e3/he):5},s.unstable_getCurrentPriorityLevel=function(){return H},s.unstable_next=function(he){switch(H){case 1:case 2:case 3:var Ee=3;break;default:Ee=H}var Me=H;H=Ee;try{return he()}finally{H=Me}},s.unstable_requestPaint=function(){Z=!0},s.unstable_runWithPriority=function(he,Ee){switch(he){case 1:case 2:case 3:case 4:case 5:break;default:he=3}var Me=H;H=he;try{return Ee()}finally{H=Me}},s.unstable_scheduleCallback=function(he,Ee,Me){var Ye=s.unstable_now();switch(typeof Me=="object"&&Me!==null?(Me=Me.delay,Me=typeof Me=="number"&&0<Me?Ye+Me:Ye):Me=Ye,he){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=Me+oe,he={id:w++,callback:Ee,priorityLevel:he,startTime:Me,expirationTime:oe,sortIndex:-1},Me>Ye?(he.sortIndex=Me,i(P,he),r(R)===null&&he===r(P)&&(W?(J(ve),ve=-1):W=!0,b(p,Me-Ye))):(he.sortIndex=oe,i(R,he),$||X||($=!0,ee||(ee=!0,pe()))),he},s.unstable_shouldYield=g,s.unstable_wrapCallback=function(he){var Ee=H;return function(){var Me=H;H=Ee;try{return he.apply(this,arguments)}finally{H=Me}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Ng)),Ng}var M_;function OD(){return M_||(M_=1,Ig.exports=kD()),Ig.exports}var Pg={exports:{}},Mi={};/**
|
||
* @license React
|
||
* react-dom.development.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 L_;function RD(){return L_||(L_=1,function(){function s(){}function e(E){return""+E}function i(E,A,R){var P=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{e(P);var w=!1}catch{w=!0}return w&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object"),e(P)),{$$typeof:b,key:P==null?null:""+P,children:E,containerInfo:A,implementation:R}}function r(E,A){if(E==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}function o(E){return E===null?"`null`":E===void 0?"`undefined`":E===""?"an empty string":'something with type "'+typeof E+'"'}function u(E){return E===null?"`null`":E===void 0?"`undefined`":E===""?"an empty string":typeof E=="string"?JSON.stringify(E):typeof E=="number"?"`"+E+"`":'something with type "'+typeof E+'"'}function c(){var E=S.H;return E===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
||
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
||
2. You might be breaking the Rules of Hooks
|
||
3. You might have more than one copy of React in the same app
|
||
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),E}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var p=Tn,g={d:{f:s,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},b=Symbol.for("react.portal"),S=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Mi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g,Mi.createPortal=function(E,A){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error("Target container is not a DOM element.");return i(E,A,null,R)},Mi.flushSync=function(E){var A=S.T,R=g.p;try{if(S.T=null,g.p=2,E)return E()}finally{S.T=A,g.p=R,g.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},Mi.preconnect=function(E,A){typeof E=="string"&&E?A!=null&&typeof A!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",u(A)):A!=null&&typeof A.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",o(A.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E)),typeof E=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,g.d.C(E,A))},Mi.prefetchDNS=function(E){if(typeof E!="string"||!E)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E));else if(1<arguments.length){var A=arguments[1];typeof A=="object"&&A.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(A)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(A))}typeof E=="string"&&g.d.D(E)},Mi.preinit=function(E,A){if(typeof E=="string"&&E?A==null||typeof A!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",u(A)):A.as!=="style"&&A.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',u(A.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E)),typeof E=="string"&&A&&typeof A.as=="string"){var R=A.as,P=r(R,A.crossOrigin),w=typeof A.integrity=="string"?A.integrity:void 0,z=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;R==="style"?g.d.S(E,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:P,integrity:w,fetchPriority:z}):R==="script"&&g.d.X(E,{crossOrigin:P,integrity:w,fetchPriority:z,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},Mi.preinitModule=function(E,A){var R="";if(typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A!==void 0&&typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":A&&"as"in A&&A.as!=="script"&&(R+=" The `as` option encountered was "+u(A.as)+"."),R)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",R);else switch(R=A&&typeof A.as=="string"?A.as:"script",R){case"script":break;default:R=u(R),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',R,E)}typeof E=="string"&&(typeof A=="object"&&A!==null?(A.as==null||A.as==="script")&&(R=r(A.as,A.crossOrigin),g.d.M(E,{crossOrigin:R,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})):A==null&&g.d.M(E))},Mi.preload=function(E,A){var R="";if(typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A==null||typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":typeof A.as=="string"&&A.as||(R+=" The `as` option encountered was "+o(A.as)+"."),R&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',R),typeof E=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){R=A.as;var P=r(R,A.crossOrigin);g.d.L(E,R,{crossOrigin:P,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})}},Mi.preloadModule=function(E,A){var R="";typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A!==void 0&&typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":A&&"as"in A&&typeof A.as!="string"&&(R+=" The `as` option encountered was "+o(A.as)+"."),R&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',R),typeof E=="string"&&(A?(R=r(A.as,A.crossOrigin),g.d.m(E,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:R,integrity:typeof A.integrity=="string"?A.integrity:void 0})):g.d.m(E))},Mi.requestFormReset=function(E){g.d.r(E)},Mi.unstable_batchedUpdates=function(E,A){return E(A)},Mi.useFormState=function(E,A,R){return c().useFormState(E,A,R)},Mi.useFormStatus=function(){return c().useHostTransitionStatus()},Mi.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Mi}var I_;function MD(){return I_||(I_=1,Pg.exports=RD()),Pg.exports}var Qc={};/**
|
||
* @license React
|
||
* react-dom-client.development.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 N_;function LD(){return N_||(N_=1,function(){function s(t,n){for(t=t.memoizedState;t!==null&&0<n;)t=t.next,n--;return t}function e(t,n,a,l){if(a>=n.length)return l;var d=n[a],f=Di(t)?t.slice():Qe({},t);return f[d]=e(t[d],n,a+1,l),f}function i(t,n,a){if(n.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var l=0;l<a.length-1;l++)if(n[l]!==a[l]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return r(t,n,a,0)}}function r(t,n,a,l){var d=n[l],f=Di(t)?t.slice():Qe({},t);return l+1===n.length?(f[a[l]]=f[d],Di(f)?f.splice(d,1):delete f[d]):f[d]=r(t[d],n,a,l+1),f}function o(t,n,a){var l=n[a],d=Di(t)?t.slice():Qe({},t);return a+1===n.length?(Di(d)?d.splice(l,1):delete d[l],d):(d[l]=o(t[l],n,a+1),d)}function u(){return!1}function c(){return null}function p(){}function g(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function b(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function S(){}function E(t){var n=[];return t.forEach(function(a){n.push(a)}),n.sort().join(", ")}function A(t,n,a,l){return new Zy(t,n,a,l)}function R(t,n){t.context===lo&&(Kv(t.current,2,n,t,null,null),nc())}function P(t,n){if(es!==null){var a=n.staleFamilies;n=n.updatedFamilies,Mh(),Gd(t.current,n,a),nc()}}function w(t){es=t}function z(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function H(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,n.flags&4098&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function X(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function $(t){if(H(t)!==t)throw Error("Unable to find node on an unmounted component.")}function W(t){var n=t.alternate;if(!n){if(n=H(t),n===null)throw Error("Unable to find node on an unmounted component.");return n!==t?null:t}for(var a=t,l=n;;){var d=a.return;if(d===null)break;var f=d.alternate;if(f===null){if(l=d.return,l!==null){a=l;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===a)return $(d),t;if(f===l)return $(d),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==l.return)a=d,l=f;else{for(var T=!1,C=d.child;C;){if(C===a){T=!0,a=d,l=f;break}if(C===l){T=!0,l=d,a=f;break}C=C.sibling}if(!T){for(C=f.child;C;){if(C===a){T=!0,a=f,l=d;break}if(C===l){T=!0,l=f,a=d;break}C=C.sibling}if(!T)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(a.alternate!==l)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(a.tag!==3)throw Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?t:n}function Z(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=Z(t),n!==null)return n;t=t.sibling}return null}function le(t){return t===null||typeof t!="object"?null:(t=WC&&t[WC]||t["@@iterator"],typeof t=="function"?t:null)}function J(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===iL?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case cc:return"Fragment";case sb:return"Profiler";case Hm:return"StrictMode";case ab:return"Suspense";case ob:return"SuspenseList";case lb:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case uc:return"Portal";case pr:return(t.displayName||"Context")+".Provider";case rb:return(t._context.displayName||"Context")+".Consumer";case zh:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case zm:return n=t.displayName||null,n!==null?n:J(t.type)||"Memo";case Pn:n=t._payload,t=t._init;try{return J(t(n))}catch{}}return null}function Y(t){return typeof t.tag=="number"?ee(t):typeof t.name=="string"?t.name:null}function ee(t){var n=t.type;switch(t.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return(n.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(n);case 8:return n===Hm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break;case 29:if(n=t._debugInfo,n!=null){for(var a=n.length-1;0<=a;a--)if(typeof n[a].name=="string")return n[a].name}if(t.return!==null)return ee(t.return)}return null}function ve(t){return{current:t}}function de(t,n){0>ra?console.error("Unexpected pop."):(n!==cb[ra]&&console.error("Unexpected Fiber popped."),t.current=ub[ra],ub[ra]=null,cb[ra]=null,ra--)}function ge(t,n,a){ra++,ub[ra]=t.current,cb[ra]=a,t.current=n}function pe(t){return t===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),t}function Oe(t,n){ge(so,n,t),ge(jh,t,t),ge(no,null,t);var a=n.nodeType;switch(a){case 9:case 11:a=a===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?xC(n):ya;break;default:if(a=n.tagName,n=n.namespaceURI)n=xC(n),n=EC(n,a);else switch(a){case"svg":n=$c;break;case"math":n=wg;break;default:n=ya}}a=a.toLowerCase(),a=hn(null,a),a={context:n,ancestorInfo:a},de(no,t),ge(no,a,t)}function nt(t){de(no,t),de(jh,t),de(so,t)}function he(){return pe(no.current)}function Ee(t){t.memoizedState!==null&&ge(jm,t,t);var n=pe(no.current),a=t.type,l=EC(n.context,a);a=hn(n.ancestorInfo,a),l={context:l,ancestorInfo:a},n!==l&&(ge(jh,t,t),ge(no,l,t))}function Me(t){jh.current===t&&(de(no,t),de(jh,t)),jm.current===t&&(de(jm,t),wf._currentValue=Bl)}function Ye(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}function oe(t){try{return Le(t),!1}catch{return!0}}function Le(t){return""+t}function Ae(t,n){if(oe(t))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ye(t)),Le(t)}function at(t,n){if(oe(t))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ye(t)),Le(t)}function xt(t){if(oe(t))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Ye(t)),Le(t)}function Ut(t){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{hc=n.inject(t),Fi=n}catch(a){console.error("React instrumentation encountered an error: %s.",a)}return!!n.checkDCE}function st(t){if(typeof uL=="function"&&cL(t),Fi&&typeof Fi.setStrictMode=="function")try{Fi.setStrictMode(hc,t)}catch(n){gr||(gr=!0,console.error("React instrumentation encountered an error: %s",n))}}function Lr(t){Se=t}function Rt(){Se!==null&&typeof Se.markCommitStopped=="function"&&Se.markCommitStopped()}function si(t){Se!==null&&typeof Se.markComponentRenderStarted=="function"&&Se.markComponentRenderStarted(t)}function cn(){Se!==null&&typeof Se.markComponentRenderStopped=="function"&&Se.markComponentRenderStopped()}function Ir(t){Se!==null&&typeof Se.markRenderStarted=="function"&&Se.markRenderStarted(t)}function Ra(){Se!==null&&typeof Se.markRenderStopped=="function"&&Se.markRenderStopped()}function Vs(t,n){Se!==null&&typeof Se.markStateUpdateScheduled=="function"&&Se.markStateUpdateScheduled(t,n)}function Cu(t){return t>>>=0,t===0?32:31-(dL(t)/hL|0)|0}function Uo(t){if(t&1)return"SyncHydrationLane";if(t&2)return"Sync";if(t&4)return"InputContinuousHydration";if(t&8)return"InputContinuous";if(t&16)return"DefaultHydration";if(t&32)return"Default";if(t&128)return"TransitionHydration";if(t&4194048)return"Transition";if(t&62914560)return"Retry";if(t&67108864)return"SelectiveHydration";if(t&134217728)return"IdleHydration";if(t&268435456)return"Idle";if(t&536870912)return"Offscreen";if(t&1073741824)return"Deferred"}function zt(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),t}}function ps(t,n,a){var l=t.pendingLanes;if(l===0)return 0;var d=0,f=t.suspendedLanes,T=t.pingedLanes;t=t.warmLanes;var C=l&134217727;return C!==0?(l=C&~f,l!==0?d=zt(l):(T&=C,T!==0?d=zt(T):a||(a=C&~t,a!==0&&(d=zt(a))))):(C=l&~f,C!==0?d=zt(C):T!==0?d=zt(T):a||(a=l&~t,a!==0&&(d=zt(a)))),d===0?0:n!==0&&n!==d&&!(n&f)&&(f=d&-d,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:d}function _i(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Bo(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 console.error("Should have found matching lanes. This is a bug in React."),-1}}function Ce(){var t=Vm;return Vm<<=1,!(Vm&4194048)&&(Vm=256),t}function Nr(){var t=qm;return qm<<=1,!(qm&62914560)&&(qm=4194304),t}function qs(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function $s(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ma(t,n,a,l,d,f){var T=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var C=t.entanglements,O=t.expirationTimes,L=t.hiddenUpdates;for(a=T&~a;0<a;){var K=31-Wi(a),se=1<<K;C[K]=0,O[K]=-1;var Q=L[K];if(Q!==null)for(L[K]=null,K=0;K<Q.length;K++){var re=Q[K];re!==null&&(re.lane&=-536870913)}a&=~se}l!==0&&Pr(t,l,0),f!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=f&~(T&~n))}function Pr(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-Wi(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|a&4194090}function La(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var l=31-Wi(a),d=1<<l;d&n|t[l]&n&&(t[l]|=n),a&=~d}}function Gs(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ur(t,n,a){if(Cs)for(t=t.pendingUpdatersLaneMap;0<a;){var l=31-Wi(a),d=1<<l;t[l].add(n),a&=~d}}function Ia(t,n){if(Cs)for(var a=t.pendingUpdatersLaneMap,l=t.memoizedUpdaters;0<n;){var d=31-Wi(n);t=1<<d,d=a[d],0<d.size&&(d.forEach(function(f){var T=f.alternate;T!==null&&l.has(T)||l.add(f)}),d.clear()),n&=~t}}function Br(t){return t&=-t,Zn<t?yr<t?t&134217727?oa:$m:yr:Zn}function Na(){var t=dt.p;return t!==0?t:(t=window.event,t===void 0?oa:VC(t.type))}function ot(t,n){var a=dt.p;try{return dt.p=t,n()}finally{dt.p=a}}function Xs(t){delete t[Hi],delete t[gn],delete t[mb],delete t[fL],delete t[pL]}function Ui(t){var n=t[Hi];if(n)return n;for(var a=t.parentNode;a;){if(n=a[ao]||a[Hi]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=OC(t);t!==null;){if(a=t[Hi])return a;t=OC(t)}return n}t=a,a=t.parentNode}return null}function wn(t){if(t=t[Hi]||t[ao]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function Ys(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function D(t){var n=t[QC];return n||(n=t[QC]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function G(t){t[Vh]=!0}function ye(t,n){Te(t,n),Te(t+"Capture",n)}function Te(t,n){bl[t]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",t),bl[t]=n;var a=t.toLowerCase();for(gb[a]=t,t==="onDoubleClick"&&(gb.ondblclick=t),t=0;t<n.length;t++)KC.add(n[t])}function Re(t,n){mL[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||console.error(t==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||n.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Ge(t){return aa.call(JC,t)?!0:aa.call(ZC,t)?!1:gL.test(t)?JC[t]=!0:(ZC[t]=!0,console.error("Invalid attribute name: `%s`",t),!1)}function He(t,n,a){if(Ge(n)){if(!t.hasAttribute(n)){switch(typeof a){case"symbol":case"object":return a;case"function":return a;case"boolean":if(a===!1)return a}return a===void 0?void 0:null}return t=t.getAttribute(n),t===""&&a===!0?!0:(Ae(a,n),t===""+a?a:t)}}function it(t,n,a){if(Ge(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}Ae(a,n),t.setAttribute(n,""+a)}}function ze(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}Ae(a,n),t.setAttribute(n,""+a)}}function Yt(t,n,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}Ae(l,a),t.setAttributeNS(n,a,""+l)}}function ms(){}function Nd(){if(qh===0){eA=console.log,tA=console.info,iA=console.warn,nA=console.error,sA=console.group,rA=console.groupCollapsed,aA=console.groupEnd;var t={configurable:!0,enumerable:!0,value:ms,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}qh++}function Pd(){if(qh--,qh===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Qe({},t,{value:eA}),info:Qe({},t,{value:tA}),warn:Qe({},t,{value:iA}),error:Qe({},t,{value:nA}),group:Qe({},t,{value:sA}),groupCollapsed:Qe({},t,{value:rA}),groupEnd:Qe({},t,{value:aA})})}0>qh&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function dn(t){if(yb===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);yb=n&&n[1]||"",oA=-1<a.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+yb+t+oA}function Ud(t,n){if(!t||vb)return"";var a=bb.get(t);if(a!==void 0)return a;vb=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var l=null;l=ne.H,ne.H=null,Nd();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(we){var re=we}Reflect.construct(t,[],Q)}else{try{Q.call()}catch(we){re=we}t.call(Q.prototype)}}else{try{throw Error()}catch(we){re=we}(Q=t())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(we){if(we&&re&&typeof we.stack=="string")return[we.stack,re.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=d.DetermineComponentFrameRoot(),C=T[0],O=T[1];if(C&&O){var L=C.split(`
|
||
`),K=O.split(`
|
||
`);for(T=f=0;f<L.length&&!L[f].includes("DetermineComponentFrameRoot");)f++;for(;T<K.length&&!K[T].includes("DetermineComponentFrameRoot");)T++;if(f===L.length||T===K.length)for(f=L.length-1,T=K.length-1;1<=f&&0<=T&&L[f]!==K[T];)T--;for(;1<=f&&0<=T;f--,T--)if(L[f]!==K[T]){if(f!==1||T!==1)do if(f--,T--,0>T||L[f]!==K[T]){var se=`
|
||
`+L[f].replace(" at new "," at ");return t.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",t.displayName)),typeof t=="function"&&bb.set(t,se),se}while(1<=f&&0<=T);break}}}finally{vb=!1,ne.H=l,Pd(),Error.prepareStackTrace=a}return L=(L=t?t.displayName||t.name:"")?dn(L):"",typeof t=="function"&&bb.set(t,L),L}function Bd(t){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,t=t.stack,Error.prepareStackTrace=n,t.startsWith(`Error: react-stack-top-frame
|
||
`)&&(t=t.slice(29)),n=t.indexOf(`
|
||
`),n!==-1&&(t=t.slice(n+1)),n=t.indexOf("react-stack-bottom-frame"),n!==-1&&(n=t.lastIndexOf(`
|
||
`,n)),n!==-1)t=t.slice(0,n);else return"";return t}function Fd(t){switch(t.tag){case 26:case 27:case 5:return dn(t.type);case 16:return dn("Lazy");case 13:return dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return Ud(t.type,!1);case 11:return Ud(t.type.render,!1);case 1:return Ud(t.type,!0);case 31:return dn("Activity");default:return""}}function Fo(t){try{var n="";do{n+=Fd(t);var a=t._debugInfo;if(a)for(var l=a.length-1;0<=l;l--){var d=a[l];if(typeof d.name=="string"){var f=n,T=d.env,C=dn(d.name+(T?" ["+T+"]":""));n=f+C}}t=t.return}while(t);return n}catch(O){return`
|
||
Error generating stack: `+O.message+`
|
||
`+O.stack}}function Ti(t){return(t=t?t.displayName||t.name:"")?dn(t):""}function Au(){if(Un===null)return null;var t=Un._debugOwner;return t!=null?Y(t):null}function Hy(){if(Un===null)return"";var t=Un;try{var n="";switch(t.tag===6&&(t=t.return),t.tag){case 26:case 27:case 5:n+=dn(t.type);break;case 13:n+=dn("Suspense");break;case 19:n+=dn("SuspenseList");break;case 31:n+=dn("Activity");break;case 30:case 0:case 15:case 1:t._debugOwner||n!==""||(n+=Ti(t.type));break;case 11:t._debugOwner||n!==""||(n+=Ti(t.type.render))}for(;t;)if(typeof t.tag=="number"){var a=t;t=a._debugOwner;var l=a._debugStack;t&&l&&(typeof l!="string"&&(a._debugStack=l=Bd(l)),l!==""&&(n+=`
|
||
`+l))}else if(t.debugStack!=null){var d=t.debugStack;(t=t.owner)&&d&&(n+=`
|
||
`+Bd(d))}else break;var f=n}catch(T){f=`
|
||
Error generating stack: `+T.message+`
|
||
`+T.stack}return f}function ke(t,n,a,l,d,f,T){var C=Un;Dn(t);try{return t!==null&&t._debugTask?t._debugTask.run(n.bind(null,a,l,d,f,T)):n(a,l,d,f,T)}finally{Dn(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Dn(t){ne.getCurrentStack=t===null?null:Hy,vr=!1,Un=t}function Si(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return xt(t),t;default:return""}}function mt(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function zy(t){var n=mt(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);xt(t[n]);var l=""+t[n];if(!t.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,f=a.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(T){xt(T),l=""+T,f.call(this,T)}}),Object.defineProperty(t,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(T){xt(T),l=""+T},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Fr(t){t._valueTracker||(t._valueTracker=zy(t))}function Ho(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return t&&(l=mt(t)?t.checked?"true":"false":t.value),t=l,t!==a?(n.setValue(t),!0):!1}function wu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ei(t){return t.replace(yL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Et(t,n){n.checked===void 0||n.defaultChecked===void 0||uA||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Au()||"A component",n.type),uA=!0),n.value===void 0||n.defaultValue===void 0||lA||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Au()||"A component",n.type),lA=!0)}function Du(t,n,a,l,d,f,T,C){t.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?(Ae(T,"type"),t.type=T):t.removeAttribute("type"),n!=null?T==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Si(n)):t.value!==""+Si(n)&&(t.value=""+Si(n)):T!=="submit"&&T!=="reset"||t.removeAttribute("value"),n!=null?Hd(t,T,Si(n)):a!=null?Hd(t,T,Si(a)):l!=null&&t.removeAttribute("value"),d==null&&f!=null&&(t.defaultChecked=!!f),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?(Ae(C,"name"),t.name=""+Si(C)):t.removeAttribute("name")}function zo(t,n,a,l,d,f,T,C){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(Ae(f,"type"),t.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null))return;a=a!=null?""+Si(a):"",n=n!=null?""+Si(n):a,C||n===t.value||(t.value=n),t.defaultValue=n}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=C?t.checked:!!l,t.defaultChecked=!!l,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(Ae(T,"name"),t.name=T)}function Hd(t,n,a){n==="number"&&wu(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Fp(t,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?nb.Children.forEach(n.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||dA||(dA=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||hA||(hA=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||cA||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),cA=!0)}function Hp(){var t=Au();return t?`
|
||
|
||
Check the render method of \``+t+"`.":""}function Hr(t,n,a,l){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&l&&(t[a].defaultSelected=!0)}else{for(a=""+Si(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function ku(t,n){for(t=0;t<pA.length;t++){var a=pA[t];if(n[a]!=null){var l=Di(n[a]);n.multiple&&!l?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,Hp()):!n.multiple&&l&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,Hp())}}n.value===void 0||n.defaultValue===void 0||fA||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),fA=!0)}function Ou(t,n){n.value===void 0||n.defaultValue===void 0||mA||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Au()||"A component"),mA=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function zd(t,n,a){if(n!=null&&(n=""+Si(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Si(a):""}function zp(t,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Di(l)){if(1<l.length)throw Error("<textarea> can only have at most one child.");l=l[0]}a=l}a==null&&(a=""),n=a}a=Si(n),t.defaultValue=a,l=t.textContent,l===a&&l!==""&&l!==null&&(t.value=l)}function jp(t,n){return t.serverProps===void 0&&t.serverTail.length===0&&t.children.length===1&&3<t.distanceFromLeaf&&t.distanceFromLeaf>15-n?jp(t.children[0],n):t}function pi(t){return" "+" ".repeat(t)}function gs(t){return"+ "+" ".repeat(t)}function Ws(t){return"- "+" ".repeat(t)}function Pa(t){switch(t.tag){case 26:case 27:case 5:return t.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return t=t.type,t.displayName||t.name||null;case 11:return t=t.type.render,t.displayName||t.name||null;case 1:return t=t.type,t.displayName||t.name||null;default:return null}}function ys(t,n){return gA.test(t)?(t=JSON.stringify(t),t.length>n-2?8>n?'{"..."}':"{"+t.slice(0,n-7)+'..."}':"{"+t+"}"):t.length>n?5>n?'{"..."}':t.slice(0,n-3)+"...":t}function Qs(t,n,a){var l=120-2*a;if(n===null)return gs(a)+ys(t,l)+`
|
||
`;if(typeof n=="string"){for(var d=0;d<n.length&&d<t.length&&n.charCodeAt(d)===t.charCodeAt(d);d++);return d>l-8&&10<d&&(t="..."+t.slice(d-8),n="..."+n.slice(d-8)),gs(a)+ys(t,l)+`
|
||
`+Ws(a)+ys(n,l)+`
|
||
`}return pi(a)+ys(t,l)+`
|
||
`}function zr(t){return Object.prototype.toString.call(t).replace(/^\[object (.*)\]$/,function(n,a){return a})}function jo(t,n){switch(typeof t){case"string":return t=JSON.stringify(t),t.length>n?5>n?'"..."':t.slice(0,n-4)+'..."':t;case"object":if(t===null)return"null";if(Di(t))return"[...]";if(t.$$typeof===io)return(n=J(t.type))?"<"+n+">":"<...>";var a=zr(t);if(a==="Object"){a="",n-=2;for(var l in t)if(t.hasOwnProperty(l)){var d=JSON.stringify(l);if(d!=='"'+l+'"'&&(l=d),n-=l.length-2,d=jo(t[l],15>n?n:15),n-=d.length,0>n){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+l+":"+d}return"{"+a+"}"}return a;case"function":return(n=t.displayName||t.name)?"function "+n:"function";default:return String(t)}}function jr(t,n){return typeof t!="string"||gA.test(t)?"{"+jo(t,n-2)+"}":t.length>n-2?5>n?'"..."':'"'+t.slice(0,n-5)+'..."':'"'+t+'"'}function jd(t,n,a){var l=120-a.length-t.length,d=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var T=jr(n[f],120-a.length-f.length-1);l-=f.length+T.length+2,d.push(f+"="+T)}return d.length===0?a+"<"+t+`>
|
||
`:0<l?a+"<"+t+" "+d.join(" ")+`>
|
||
`:a+"<"+t+`
|
||
`+a+" "+d.join(`
|
||
`+a+" ")+`
|
||
`+a+`>
|
||
`}function jy(t,n,a){var l="",d=Qe({},n),f;for(f in t)if(t.hasOwnProperty(f)){delete d[f];var T=120-2*a-f.length-2,C=jo(t[f],T);n.hasOwnProperty(f)?(T=jo(n[f],T),l+=gs(a)+f+": "+C+`
|
||
`,l+=Ws(a)+f+": "+T+`
|
||
`):l+=gs(a)+f+": "+C+`
|
||
`}for(var O in d)d.hasOwnProperty(O)&&(t=jo(d[O],120-2*a-O.length-2),l+=Ws(a)+O+": "+t+`
|
||
`);return l}function Ks(t,n,a,l){var d="",f=new Map;for(L in a)a.hasOwnProperty(L)&&f.set(L.toLowerCase(),L);if(f.size===1&&f.has("children"))d+=jd(t,n,pi(l));else{for(var T in n)if(n.hasOwnProperty(T)&&T!=="children"){var C=120-2*(l+1)-T.length-1,O=f.get(T.toLowerCase());if(O!==void 0){f.delete(T.toLowerCase());var L=n[T];O=a[O];var K=jr(L,C);C=jr(O,C),typeof L=="object"&&L!==null&&typeof O=="object"&&O!==null&&zr(L)==="Object"&&zr(O)==="Object"&&(2<Object.keys(L).length||2<Object.keys(O).length||-1<K.indexOf("...")||-1<C.indexOf("..."))?d+=pi(l+1)+T+`={{
|
||
`+jy(L,O,l+2)+pi(l+1)+`}}
|
||
`:(d+=gs(l+1)+T+"="+K+`
|
||
`,d+=Ws(l+1)+T+"="+C+`
|
||
`)}else d+=pi(l+1)+T+"="+jr(n[T],C)+`
|
||
`}f.forEach(function(se){if(se!=="children"){var Q=120-2*(l+1)-se.length-1;d+=Ws(l+1)+se+"="+jr(a[se],Q)+`
|
||
`}}),d=d===""?pi(l)+"<"+t+`>
|
||
`:pi(l)+"<"+t+`
|
||
`+d+pi(l)+`>
|
||
`}return t=a.children,n=n.children,typeof t=="string"||typeof t=="number"||typeof t=="bigint"?(f="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(f=""+n),d+=Qs(f,""+t,l+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=t==null?d+Qs(""+n,null,l+1):d+Qs(""+n,void 0,l+1)),d}function Vo(t,n){var a=Pa(t);if(a===null){for(a="",t=t.child;t;)a+=Vo(t,n),t=t.sibling;return a}return pi(n)+"<"+a+`>
|
||
`}function Vd(t,n){var a=jp(t,n);if(a!==t&&(t.children.length!==1||t.children[0]!==a))return pi(n)+`...
|
||
`+Vd(a,n+1);a="";var l=t.fiber._debugInfo;if(l)for(var d=0;d<l.length;d++){var f=l[d].name;typeof f=="string"&&(a+=pi(n)+"<"+f+`>
|
||
`,n++)}if(l="",d=t.fiber.pendingProps,t.fiber.tag===6)l=Qs(d,t.serverProps,n),n++;else if(f=Pa(t.fiber),f!==null)if(t.serverProps===void 0){l=n;var T=120-2*l-f.length-2,C="";for(L in d)if(d.hasOwnProperty(L)&&L!=="children"){var O=jr(d[L],15);if(T-=L.length+O.length+2,0>T){C+=" ...";break}C+=" "+L+"="+O}l=pi(l)+"<"+f+C+`>
|
||
`,n++}else t.serverProps===null?(l=jd(f,d,gs(n)),n++):typeof t.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(l=Ks(f,d,t.serverProps,n),n++);var L="";for(d=t.fiber.child,f=0;d&&f<t.children.length;)T=t.children[f],T.fiber===d?(L+=Vd(T,n),f++):L+=Vo(d,n),d=d.sibling;for(d&&0<t.children.length&&(L+=pi(n)+`...
|
||
`),d=t.serverTail,t.serverProps===null&&n--,t=0;t<d.length;t++)f=d[t],L=typeof f=="string"?L+(Ws(n)+ys(f,120-2*n)+`
|
||
`):L+jd(f.type,f.props,Ws(n));return a+l+L}function qo(t){try{return`
|
||
|
||
`+Vd(t,0)}catch{return""}}function Ru(t,n,a){for(var l=n,d=null,f=0;l;)l===t&&(f=0),d={fiber:l,children:d!==null?[d]:[],serverProps:l===n?a:l===t?null:void 0,serverTail:[],distanceFromLeaf:f},f++,l=l.return;return d!==null?qo(d).replaceAll(/^[+-]/gm,">"):""}function hn(t,n){var a=Qe({},t||vA),l={tag:n};return yA.indexOf(n)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),bL.indexOf(n)!==-1&&(a.pTagInButtonScope=null),vL.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=l,n==="form"&&(a.formTag=l),n==="a"&&(a.aTagInScope=l),n==="button"&&(a.buttonTagInScope=l),n==="nobr"&&(a.nobrTagInScope=l),n==="p"&&(a.pTagInButtonScope=l),n==="li"&&(a.listItemTagAutoclosing=l),(n==="dd"||n==="dt")&&(a.dlItemTagAutoclosing=l),n==="#document"||n==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=l),t!==null||n!=="#document"&&n!=="html"&&n!=="body"?a.implicitRootScope===!0&&(a.implicitRootScope=!1):a.implicitRootScope=!0,a}function Vp(t,n,a){switch(n){case"select":return t==="hr"||t==="option"||t==="optgroup"||t==="script"||t==="template"||t==="#text";case"optgroup":return t==="option"||t==="#text";case"option":return t==="#text";case"tr":return t==="th"||t==="td"||t==="style"||t==="script"||t==="template";case"tbody":case"thead":case"tfoot":return t==="tr"||t==="style"||t==="script"||t==="template";case"colgroup":return t==="col"||t==="template";case"table":return t==="caption"||t==="colgroup"||t==="tbody"||t==="tfoot"||t==="thead"||t==="style"||t==="script"||t==="template";case"head":return t==="base"||t==="basefont"||t==="bgsound"||t==="link"||t==="meta"||t==="title"||t==="noscript"||t==="noframes"||t==="style"||t==="script"||t==="template";case"html":if(a)break;return t==="head"||t==="body"||t==="frameset";case"frameset":return t==="frame";case"#document":if(!a)return t==="html"}switch(t){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return _L.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return a||n===null;case"html":return a&&n==="#document"||n===null;case"body":return a&&(n==="#document"||n==="html")||n===null}return!0}function Mu(t,n){switch(t){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function Ua(t,n){for(;t;){switch(t.tag){case 5:case 26:case 27:if(t.type===n)return t}t=t.return}return null}function Ba(t,n){n=n||vA;var a=n.current;if(n=(a=Vp(t,a&&a.tag,n.implicitRootScope)?null:a)?null:Mu(t,n),n=a||n,!n)return!0;var l=n.tag;if(n=String(!!a)+"|"+t+"|"+l,Gm[n])return!1;Gm[n]=!0;var d=(n=Un)?Ua(n.return,l):null,f=n!==null&&d!==null?Ru(d,n,null):"",T="<"+t+">";return a?(a="",l==="table"&&t==="tr"&&(a+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
||
This will cause a hydration error.%s`,T,l,a,f)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
||
This will cause a hydration error.%s`,T,l,f),n&&(t=n.return,d===null||t===null||d===t&&t._debugOwner===n._debugOwner||ke(d,function(){console.error(`<%s> cannot contain a nested %s.
|
||
See this log for the ancestor stack trace.`,l,T)})),!1}function vs(t,n,a){if(a||Vp("#text",n,!1))return!0;if(a="#text|"+n,Gm[a])return!1;Gm[a]=!0;var l=(a=Un)?Ua(a,n):null;return a=a!==null&&l!==null?Ru(l,a,a.tag!==6?{children:null}:null):"",/\S/.test(t)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
||
This will cause a hydration error.%s`,n,a):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
||
This will cause a hydration error.%s`,n,a),!1}function Vr(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}function qp(t){return t.replace(xL,function(n,a){return a.toUpperCase()})}function Lu(t,n,a){var l=n.indexOf("--")===0;l||(-1<n.indexOf("-")?fc.hasOwnProperty(n)&&fc[n]||(fc[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,qp(n.replace(SL,"ms-")))):TL.test(n)?fc.hasOwnProperty(n)&&fc[n]||(fc[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!TA.test(a)||Tb.hasOwnProperty(a)&&Tb[a]||(Tb[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,a.replace(TA,""))),typeof a=="number"&&(isNaN(a)?SA||(SA=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(a)||xA||(xA=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),a==null||typeof a=="boolean"||a===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,a):typeof a!="number"||a===0||EA.has(n)?n==="float"?t.cssFloat=a:(at(a,n),t[n]=(""+a).trim()):t[n]=a+"px"}function $p(t,n,a){if(n!=null&&typeof n!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(n&&Object.freeze(n),t=t.style,a!=null){if(n){var l={};if(a){for(var d in a)if(a.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var f=_b[d]||[d],T=0;T<f.length;T++)l[f[T]]=d}for(var C in n)if(n.hasOwnProperty(C)&&(!a||a[C]!==n[C]))for(d=_b[C]||[C],f=0;f<d.length;f++)l[d[f]]=C;C={};for(var O in n)for(d=_b[O]||[O],f=0;f<d.length;f++)C[d[f]]=O;O={};for(var L in l)if(d=l[L],(f=C[L])&&d!==f&&(T=d+","+f,!O[T])){O[T]=!0,T=console;var K=n[d];T.error.call(T,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",K==null||typeof K=="boolean"||K===""?"Removing":"Updating",d,f)}}for(var se in a)!a.hasOwnProperty(se)||n!=null&&n.hasOwnProperty(se)||(se.indexOf("--")===0?t.setProperty(se,""):se==="float"?t.cssFloat="":t[se]="");for(var Q in n)L=n[Q],n.hasOwnProperty(Q)&&a[Q]!==L&&Lu(t,Q,L)}else for(l in n)n.hasOwnProperty(l)&&Lu(t,l,n[l])}function $o(t){if(t.indexOf("-")===-1)return!1;switch(t){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}}function Gp(t){return EL.get(t)||t}function Iu(t,n){if(aa.call(mc,n)&&mc[n])return!0;if(AL.test(n)){if(t="aria-"+n.slice(4).toLowerCase(),t=CA.hasOwnProperty(t)?t:null,t==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),mc[n]=!0;if(n!==t)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,t),mc[n]=!0}if(CL.test(n)){if(t=n.toLowerCase(),t=CA.hasOwnProperty(t)?t:null,t==null)return mc[n]=!0,!1;n!==t&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,t),mc[n]=!0)}return!0}function Xp(t,n){var a=[],l;for(l in n)Iu(t,l)||a.push(l);n=a.map(function(d){return"`"+d+"`"}).join(", "),a.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t):1<a.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t)}function Vy(t,n,a,l){if(aa.call(Qi,n)&&Qi[n])return!0;var d=n.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Qi[n]=!0;if(typeof a=="function"&&(t==="form"&&n==="action"||t==="input"&&n==="formAction"||t==="button"&&n==="formAction"))return!0;if(l!=null){if(t=l.possibleRegistrationNames,l.registrationNameDependencies.hasOwnProperty(n))return!0;if(l=t.hasOwnProperty(d)?t[d]:null,l!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,l),Qi[n]=!0;if(wA.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),Qi[n]=!0}else if(wA.test(n))return wL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),Qi[n]=!0;if(DL.test(n)||kL.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Qi[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Qi[n]=!0;if(d==="is"&&a!==null&&a!==void 0&&typeof a!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof a),Qi[n]=!0;if(typeof a=="number"&&isNaN(a))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),Qi[n]=!0;if(Ym.hasOwnProperty(d)){if(d=Ym[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),Qi[n]=!0}else if(n!==d)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,d),Qi[n]=!0;switch(n){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof a){case"boolean":switch(n){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":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":case"capture":case"download":case"inert":return!0;default:return d=n.toLowerCase().slice(0,5),d==="data-"||d==="aria-"?!0:(a?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',a,n,n,a,n):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',a,n,n,a,n,n,n),Qi[n]=!0)}case"function":case"symbol":return Qi[n]=!0,!1;case"string":if(a==="false"||a==="true"){switch(n){case"checked":case"selected":case"multiple":case"muted":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":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",a,n,a==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',n,a),Qi[n]=!0}}return!0}function Yp(t,n,a){var l=[],d;for(d in n)Vy(t,d,n[d],a)||l.push(d);n=l.map(function(f){return"`"+f+"`"}).join(", "),l.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t):1<l.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t)}function Go(t){return OL.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Nu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function Wp(t){var n=wn(t);if(n&&(t=n.stateNode)){var a=t[gn]||null;e:switch(t=n.stateNode,n.type){case"input":if(Du(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(Ae(n,"name"),a=a.querySelectorAll('input[name="'+ei(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==t&&l.form===t.form){var d=l[gn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Du(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===t.form&&Ho(l)}break e;case"textarea":zd(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Hr(t,!!a.multiple,n,!1)}}}function Xo(t,n,a){if(Sb)return t(n,a);Sb=!0;try{var l=t(n);return l}finally{if(Sb=!1,(gc!==null||yc!==null)&&(nc(),gc&&(n=gc,t=yc,yc=gc=null,Wp(n),t)))for(n=0;n<t.length;n++)Wp(t[n])}}function bs(t,n){var a=t.stateNode;if(a===null)return null;var l=a[gn]||null;if(l===null)return null;a=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}function qd(){if(Wm)return Wm;var t,n=Eb,a=n.length,l,d="value"in oo?oo.value:oo.textContent,f=d.length;for(t=0;t<a&&n[t]===d[t];t++);var T=a-t;for(l=1;l<=T&&n[a-l]===d[f-l];l++);return Wm=d.slice(t,1<l?1-l:void 0)}function Pu(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Uu(){return!0}function $d(){return!1}function xi(t){function n(a,l,d,f,T){this._reactName=a,this._targetInst=d,this.type=l,this.nativeEvent=f,this.target=T,this.currentTarget=null;for(var C in t)t.hasOwnProperty(C)&&(a=t[C],this[C]=a?a(f):f[C]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Uu:$d,this.isPropagationStopped=$d,this}return Qe(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Uu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),n}function qy(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=VL[t])?!!n[t]:!1}function Bu(){return qy}function Qp(t,n){switch(t){case"keyup":return tI.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==RA;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}function $y(t,n){switch(t){case"compositionend":return Kp(n);case"keypress":return n.which!==LA?null:(NA=!0,IA);case"textInput":return t=n.data,t===IA&&NA?null:t;default:return null}}function Gy(t,n){if(vc)return t==="compositionend"||!Db&&Qp(t,n)?(t=qd(),Wm=Eb=oo=null,vc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return MA&&n.locale!=="ko"?null:n.data;default:return null}}function Zp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!nI[t.type]:n==="textarea"}function Xy(t){if(!br)return!1;t="on"+t;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n=typeof n[t]=="function"),n}function Fu(t,n,a,l){gc?yc?yc.push(l):yc=[l]:gc=l,n=Om(n,"onChange"),0<n.length&&(a=new Qm("onChange","change",null,a,l),t.push({event:a,listeners:n}))}function Yy(t){fC(t,0)}function Yo(t){var n=Ys(t);if(Ho(n))return t}function Wo(t,n){if(t==="change")return n}function Jp(){Qh&&(Qh.detachEvent("onpropertychange",em),Kh=Qh=null)}function em(t){if(t.propertyName==="value"&&Yo(Kh)){var n=[];Fu(n,Kh,t,Nu(t)),Xo(Yy,n)}}function Wy(t,n,a){t==="focusin"?(Jp(),Qh=n,Kh=a,Qh.attachEvent("onpropertychange",em)):t==="focusout"&&Jp()}function Qy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Yo(Kh)}function Ky(t,n){if(t==="click")return Yo(n)}function Hu(t,n){if(t==="input"||t==="change")return Yo(n)}function Qo(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}function _s(t,n){if(Ki(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var d=a[l];if(!aa.call(n,d)||!Ki(t[d],n[d]))return!1}return!0}function Ko(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fn(t,n){var a=Ko(t);t=0;for(var l;a;){if(a.nodeType===3){if(l=t+a.textContent.length,t<=n&&l>=n)return{node:a,offset:n-t};t=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ko(a)}}function Gn(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Gn(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Zo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=wu(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=wu(t.document)}return n}function zu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function tm(t,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ob||bc==null||bc!==wu(l)||(l=bc,"selectionStart"in l&&zu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zh&&_s(Zh,l)||(Zh=l,l=Om(kb,"onSelect"),0<l.length&&(n=new Qm("onSelect","select",null,n,a),t.push({event:n,listeners:l}),n.target=bc)))}function qr(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}function $r(t){if(Rb[t])return Rb[t];if(!_c[t])return t;var n=_c[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in UA)return Rb[t]=n[a];return t}function kn(t,n){jA.set(t,n),ye(n,[t])}function Ei(t,n){if(typeof t=="object"&&t!==null){var a=Lb.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Fo(n)},Lb.set(t,n),n)}return{value:t,source:n,stack:Fo(n)}}function Fa(){for(var t=Tc,n=Ib=Tc=0;n<t;){var a=Jn[n];Jn[n++]=null;var l=Jn[n];Jn[n++]=null;var d=Jn[n];Jn[n++]=null;var f=Jn[n];if(Jn[n++]=null,l!==null&&d!==null){var T=l.pending;T===null?d.next=d:(d.next=T.next,T.next=d),l.pending=d}f!==0&&er(a,d,f)}}function Zs(t,n,a,l){Jn[Tc++]=t,Jn[Tc++]=n,Jn[Tc++]=a,Jn[Tc++]=l,Ib|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Js(t,n,a,l){return Zs(t,n,a,l),ju(t)}function ri(t,n){return Zs(t,null,null,n),ju(t)}function er(t,n,a){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a);for(var d=!1,f=t.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(t=f.stateNode,t===null||t._visibility&Zm||(d=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,d&&n!==null&&(d=31-Wi(a),t=f.hiddenUpdates,l=t[d],l===null?t[d]=[n]:l.push(n),n.lane=a|536870912),f):null}function ju(t){if(Tf>AI)throw Ll=Tf=0,Sf=c_=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ll>wI&&(Ll=0,Sf=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),t.alternate===null&&t.flags&4098&&aC(t);for(var n=t,a=n.return;a!==null;)n.alternate===null&&n.flags&4098&&aC(t),n=a,a=n.return;return n.tag===3?n.stateNode:null}function tr(t){if(es===null)return t;var n=es(t);return n===void 0?t:n.current}function Vu(t){if(es===null)return t;var n=es(t);return n===void 0?t!=null&&typeof t.render=="function"&&(n=tr(t.render),t.render!==n)?(n={$$typeof:zh,render:n},t.displayName!==void 0&&(n.displayName=t.displayName),n):t:n.current}function qu(t,n){if(es===null)return!1;var a=t.elementType;n=n.type;var l=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(t.tag){case 1:typeof n=="function"&&(l=!0);break;case 0:(typeof n=="function"||d===Pn)&&(l=!0);break;case 11:(d===zh||d===Pn)&&(l=!0);break;case 14:case 15:(d===zm||d===Pn)&&(l=!0);break;default:return!1}return!!(l&&(t=es(a),t!==void 0&&t===es(n)))}function im(t){es!==null&&typeof WeakSet=="function"&&(Sc===null&&(Sc=new WeakSet),Sc.add(t))}function Gd(t,n,a){var l=t.alternate,d=t.child,f=t.sibling,T=t.tag,C=t.type,O=null;switch(T){case 0:case 15:case 1:O=C;break;case 11:O=C.render}if(es===null)throw Error("Expected resolveFamily to be set during hot reload.");var L=!1;C=!1,O!==null&&(O=es(O),O!==void 0&&(a.has(O)?C=!0:n.has(O)&&(T===1?C=!0:L=!0))),Sc!==null&&(Sc.has(t)||l!==null&&Sc.has(l))&&(C=!0),C&&(t._debugNeedsRemount=!0),(C||L)&&(l=ri(t,2),l!==null&&Qt(l,t,2)),d===null||C||Gd(d,n,a),f!==null&&Gd(f,n,a)}function Zy(t,n,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,qA||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Ha(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ts(t,n){var a=t.alternate;switch(a===null?(a=A(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a._debugOwner=t._debugOwner,a._debugStack=t._debugStack,a._debugTask=t._debugTask,a._debugHookTypes=t._debugHookTypes,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null,a.actualDuration=-0,a.actualStartTime=-1.1),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a.selfBaseDuration=t.selfBaseDuration,a.treeBaseDuration=t.treeBaseDuration,a._debugInfo=t._debugInfo,a._debugNeedsRemount=t._debugNeedsRemount,a.tag){case 0:case 15:a.type=tr(t.type);break;case 1:a.type=tr(t.type);break;case 11:a.type=Vu(t.type)}return a}function $u(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null,t.selfBaseDuration=0,t.treeBaseDuration=0):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},t.selfBaseDuration=a.selfBaseDuration,t.treeBaseDuration=a.treeBaseDuration),t}function Xd(t,n,a,l,d,f){var T=0,C=t;if(typeof t=="function")Ha(t)&&(T=1),C=tr(C);else if(typeof t=="string")T=he(),T=H5(t,a,T)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case lb:return n=A(31,a,n,d),n.elementType=lb,n.lanes=f,n;case cc:return ir(a.children,d,f,n);case Hm:T=8,d|=zi,d|=As;break;case sb:return t=a,l=d,typeof t.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof t.id),n=A(12,t,n,l|ki),n.elementType=sb,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case ab:return n=A(13,a,n,d),n.elementType=ab,n.lanes=f,n;case ob:return n=A(19,a,n,d),n.elementType=ob,n.lanes=f,n;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case eL:case pr:T=10;break e;case rb:T=9;break e;case zh:T=11,C=Vu(C);break e;case zm:T=14;break e;case Pn:T=16,C=null;break e}C="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),t===null?a="null":Di(t)?a="array":t!==void 0&&t.$$typeof===io?(a="<"+(J(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,(T=l?Y(l):null)&&(C+=`
|
||
|
||
Check the render method of \``+T+"`."),T=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+C)),C=null}return n=A(T,a,n,d),n.elementType=t,n.type=C,n.lanes=f,n._debugOwner=l,n}function Gu(t,n,a){return n=Xd(t.type,t.key,t.props,t._owner,n,a),n._debugOwner=t._owner,n._debugStack=t._debugStack,n._debugTask=t._debugTask,n}function ir(t,n,a,l){return t=A(7,t,l,n),t.lanes=a,t}function za(t,n,a){return t=A(6,t,null,n),t.lanes=a,t}function Yd(t,n,a){return n=A(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function Gr(t,n){Ss(),xc[Ec++]=eg,xc[Ec++]=Jm,Jm=t,eg=n}function nm(t,n,a){Ss(),ts[is++]=ua,ts[is++]=ca,ts[is++]=Tl,Tl=t;var l=ua;t=ca;var d=32-Wi(l)-1;l&=~(1<<d),a+=1;var f=32-Wi(n)+d;if(30<f){var T=d-d%5;f=(l&(1<<T)-1).toString(32),l>>=T,d-=T,ua=1<<32-Wi(n)+d|a<<d|l,ca=f+t}else ua=1<<f|a<<d|l,ca=t}function Jo(t){Ss(),t.return!==null&&(Gr(t,1),nm(t,1,0))}function Wd(t){for(;t===Jm;)Jm=xc[--Ec],xc[Ec]=null,eg=xc[--Ec],xc[Ec]=null;for(;t===Tl;)Tl=ts[--is],ts[is]=null,ca=ts[--is],ts[is]=null,ua=ts[--is],ts[is]=null}function Ss(){rt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function nr(t,n){if(t.return===null){if(ns===null)ns={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(ns.fiber!==t)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ns.distanceFromLeaf>n&&(ns.distanceFromLeaf=n)}return ns}var a=nr(t.return,n+1).children;return 0<a.length&&a[a.length-1].fiber===t?(a=a[a.length-1],a.distanceFromLeaf>n&&(a.distanceFromLeaf=n),a):(n={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},a.push(n),n)}function Qd(t,n){da||(t=nr(t,0),t.serverProps=null,n!==null&&(n=wC(n),t.serverTail.push(n)))}function Xr(t){var n="",a=ns;throw a!==null&&(ns=null,n=qo(a)),tl(Ei(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
||
|
||
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
||
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
||
- Date formatting in a user's locale which doesn't match the server.
|
||
- External changing data without sending a snapshot of it along with the HTML.
|
||
- Invalid HTML tag nesting.
|
||
|
||
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
||
|
||
https://react.dev/link/hydration-mismatch`+n),t)),Nb}function sm(t){var n=t.stateNode,a=t.type,l=t.memoizedProps;switch(n[Hi]=t,n[gn]=l,Hv(a,l),a){case"dialog":et("cancel",n),et("close",n);break;case"iframe":case"object":case"embed":et("load",n);break;case"video":case"audio":for(a=0;a<xf.length;a++)et(xf[a],n);break;case"source":et("error",n);break;case"img":case"image":case"link":et("error",n),et("load",n);break;case"details":et("toggle",n);break;case"input":Re("input",l),et("invalid",n),Et(n,l),zo(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Fr(n);break;case"option":Fp(n,l);break;case"select":Re("select",l),et("invalid",n),ku(n,l);break;case"textarea":Re("textarea",l),et("invalid",n),Ou(n,l),zp(n,l.value,l.defaultValue,l.children),Fr(n)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||yC(n.textContent,a)?(l.popover!=null&&(et("beforetoggle",n),et("toggle",n)),l.onScroll!=null&&et("scroll",n),l.onScrollEnd!=null&&et("scrollend",n),l.onClick!=null&&(n.onclick=Rm),n=!0):n=!1,n||Xr(t)}function rm(t){for(Zi=t.return;Zi;)switch(Zi.tag){case 5:case 13:_r=!1;return;case 27:case 3:_r=!0;return;default:Zi=Zi.return}}function ja(t){if(t!==Zi)return!1;if(!rt)return rm(t),rt=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||$v(t.type,t.memoizedProps)),a=!a),a&&qt){for(a=qt;a;){var l=nr(t,0),d=wC(a);l.serverTail.push(d),a=d.type==="Suspense"?kC(a):Kn(a.nextSibling)}Xr(t)}if(rm(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");qt=kC(t)}else n===27?(n=qt,to(t.type)?(t=S_,S_=null,qt=t):qt=n):qt=Zi?Kn(t.stateNode.nextSibling):null;return!0}function el(){qt=Zi=null,da=rt=!1}function Kd(){var t=Sl;return t!==null&&(tn===null?tn=t:tn.push.apply(tn,t),Sl=null),t}function tl(t){Sl===null?Sl=[t]:Sl.push(t)}function Zd(){var t=ns;if(t!==null){ns=null;for(var n=qo(t);0<t.children.length;)t=t.children[0];ke(t.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
||
|
||
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
||
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
||
- Date formatting in a user's locale which doesn't match the server.
|
||
- External changing data without sending a snapshot of it along with the HTML.
|
||
- Invalid HTML tag nesting.
|
||
|
||
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
||
|
||
%s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function Wt(){Cc=tg=null,Ac=!1}function Xn(t,n,a){ge(Pb,n._currentValue,t),n._currentValue=a,ge(Ub,n._currentRenderer,t),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==YA&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=YA}function jt(t,n){t._currentValue=Pb.current;var a=Ub.current;de(Ub,n),t._currentRenderer=a,de(Pb,n)}function Yr(t,n,a){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),t===a)break;t=t.return}t!==a&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Jd(t,n,a,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var f=d.dependencies;if(f!==null){var T=d.child;f=f.firstContext;e:for(;f!==null;){var C=f;f=d;for(var O=0;O<n.length;O++)if(C.context===n[O]){f.lanes|=a,C=f.alternate,C!==null&&(C.lanes|=a),Yr(f.return,a,t),l||(T=null);break e}f=C.next}}else if(d.tag===18){if(T=d.return,T===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");T.lanes|=a,f=T.alternate,f!==null&&(f.lanes|=a),Yr(T,a,t),T=null}else T=d.child;if(T!==null)T.return=d;else for(T=d;T!==null;){if(T===t){T=null;break}if(d=T.sibling,d!==null){d.return=T.return,T=d;break}T=T.return}d=T}}function il(t,n,a,l){t=null;for(var d=n,f=!1;d!==null;){if(!f){if(d.flags&524288)f=!0;else if(d.flags&262144)break}if(d.tag===10){var T=d.alternate;if(T===null)throw Error("Should have a current fiber. This is a bug in React.");if(T=T.memoizedProps,T!==null){var C=d.type;Ki(d.pendingProps.value,T.value)||(t!==null?t.push(C):t=[C])}}else if(d===jm.current){if(T=d.alternate,T===null)throw Error("Should have a current fiber. This is a bug in React.");T.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(wf):t=[wf])}d=d.return}t!==null&&Jd(n,t,a,l),n.flags|=262144}function On(t){for(t=t.firstContext;t!==null;){if(!Ki(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function sr(t){tg=t,Cc=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Dt(t){return Ac&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),nl(tg,t)}function Xu(t,n){return tg===null&&sr(t),nl(t,n)}function nl(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Cc===null){if(t===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Cc=n,t.dependencies={lanes:0,firstContext:n,_debugThenableState:null},t.flags|=524288}else Cc=Cc.next=n;return a}function eh(){return{controller:new dI,data:new Map,refCount:0}}function Wr(t){t.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),t.refCount++}function sl(t){t.refCount--,0>t.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),t.refCount===0&&hI(fI,function(){t.controller.abort()})}function xs(){var t=xl;return xl=0,t}function rl(t){var n=xl;return xl=t,n}function al(t){var n=xl;return xl+=t,n}function Qr(t){yn=wc(),0>t.actualStartTime&&(t.actualStartTime=yn)}function Yu(t){if(0<=yn){var n=wc()-yn;t.actualDuration+=n,t.selfBaseDuration=n,yn=-1}}function ol(t){if(0<=yn){var n=wc()-yn;t.actualDuration+=n,yn=-1}}function Bi(){if(0<=yn){var t=wc()-yn;yn=-1,xl+=t}}function lt(){yn=wc()}function Es(t){for(var n=t.child;n;)t.actualDuration+=n.actualDuration,n=n.sibling}function th(t,n){if(Jh===null){var a=Jh=[];Bb=0,El=Pv(),Dc={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Bb++,n.then(am,am),n}function am(){if(--Bb===0&&Jh!==null){Dc!==null&&(Dc.status="fulfilled");var t=Jh;Jh=null,El=0,Dc=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Jy(t,n){var a=[],l={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(l.status="rejected",l.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),l}function ih(){var t=Cl.current;return t!==null?t:Ct.pooledCache}function Wu(t,n){n===null?ge(Cl,Cl.current,t):ge(Cl,n.pool,t)}function nh(){var t=ih();return t===null?null:{parent:oi._currentValue,pool:t}}function sh(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function rh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ll(){}function ah(t,n,a){ne.actQueue!==null&&(ne.didUsePromise=!0);var l=t.thenables;switch(a=l[a],a===void 0?l.push(n):a!==n&&(t.didWarnAboutUncachedPromise||(t.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),n.then(ll,ll),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,oh(t),t;default:if(typeof n.status=="string")n.then(ll,ll);else{if(t=Ct,t!==null&&100<t.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");t=n,t.status="pending",t.then(function(d){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=d}},function(d){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,oh(t),t}throw lf=n,og=!0,of}}function Qu(){if(lf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var t=lf;return lf=null,og=!1,t}function oh(t){if(t===of||t===ag)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ul(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lh(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function pn(t){return{lane:t,tag:JA,payload:null,callback:null,next:null}}function rr(t,n,a){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,zb===l&&!iw){var d=ee(t);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
||
|
||
Please update the following component: %s`,d),iw=!0}return(ht&en)!==Bn?(d=l.pending,d===null?n.next=n:(n.next=d.next,d.next=n),l.pending=n,n=ju(t),er(t,null,a),n):(Zs(t,l,n,a),ju(t))}function Va(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,La(t,a)}}function cl(t,n){var a=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var d=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var T={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?d=f=T:f=f.next=T,a=a.next}while(a!==null);f===null?d=f=n:f=f.next=n}else d=f=n;a={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}function dl(){if(jb){var t=Dc;if(t!==null)throw t}}function hl(t,n,a,l){jb=!1;var d=t.updateQueue;uo=!1,zb=d.shared;var f=d.firstBaseUpdate,T=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var O=C,L=O.next;O.next=null,T===null?f=L:T.next=L,T=O;var K=t.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==T&&(C===null?K.firstBaseUpdate=L:C.next=L,K.lastBaseUpdate=O))}if(f!==null){var se=d.baseState;T=0,K=L=O=null,C=f;do{var Q=C.lane&-536870913,re=Q!==C.lane;if(re?(Je&Q)===Q:(l&Q)===Q){Q!==0&&Q===El&&(jb=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{Q=t;var we=C,Be=n,At=a;switch(we.tag){case ew:if(we=we.payload,typeof we=="function"){Ac=!0;var tt=we.call(At,se,Be);if(Q.mode&zi){st(!0);try{we.call(At,se,Be)}finally{st(!1)}}Ac=!1,se=tt;break e}se=we;break e;case Hb:Q.flags=Q.flags&-65537|128;case JA:if(tt=we.payload,typeof tt=="function"){if(Ac=!0,we=tt.call(At,se,Be),Q.mode&zi){st(!0);try{tt.call(At,se,Be)}finally{st(!1)}}Ac=!1}else we=tt;if(we==null)break e;se=Qe({},se,we);break e;case tw:uo=!0}}Q=C.callback,Q!==null&&(t.flags|=64,re&&(t.flags|=8192),re=d.callbacks,re===null?d.callbacks=[Q]:re.push(Q))}else re={lane:Q,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(L=K=re,O=se):K=K.next=re,T|=Q;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;re=C,C=re.next,re.next=null,d.lastBaseUpdate=re,d.shared.pending=null}}while(1);K===null&&(O=se),d.baseState=O,d.firstBaseUpdate=L,d.lastBaseUpdate=K,f===null&&(d.shared.lanes=0),po|=T,t.lanes=T,t.memoizedState=se}zb=null}function uh(t,n){if(typeof t!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+t);t.call(n)}function ev(t,n){var a=t.shared.hiddenCallbacks;if(a!==null)for(t.shared.hiddenCallbacks=null,t=0;t<a.length;t++)uh(a[t],n)}function om(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)uh(a[t],n)}function Ku(t,n){var a=xr;ge(lg,a,t),ge(kc,n,t),xr=a|n.baseLanes}function ch(t){ge(lg,xr,t),ge(kc,kc.current,t)}function dh(t){xr=lg.current,de(kc,t),de(lg,t)}function We(){var t=ie;as===null?as=[t]:as.push(t)}function fe(){var t=ie;if(as!==null&&(fa++,as[fa]!==t)){var n=ee(Fe);if(!nw.has(n)&&(nw.add(n),as!==null)){for(var a="",l=0;l<=fa;l++){var d=as[l],f=l===fa?t:d;for(d=l+1+". "+d;30>d.length;)d+=" ";d+=f+`
|
||
`,a+=d}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
||
|
||
Previous render Next render
|
||
------------------------------------------------------
|
||
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
`,n,a)}}}function qa(t){t==null||Di(t)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ie,typeof t)}function Zu(){var t=ee(Fe);rw.has(t)||(rw.add(t),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",t))}function Bt(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
||
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
||
2. You might be breaking the Rules of Hooks
|
||
3. You might have more than one copy of React in the same app
|
||
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function hh(t,n){if(cf)return!1;if(n===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ie),!1;t.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
||
|
||
Previous: %s
|
||
Incoming: %s`,ie,"["+n.join(", ")+"]","["+t.join(", ")+"]");for(var a=0;a<n.length&&a<t.length;a++)if(!Ki(t[a],n[a]))return!1;return!0}function fh(t,n,a,l,d,f){co=f,Fe=n,as=t!==null?t._debugHookTypes:null,fa=-1,cf=t!==null&&t.type!==n.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(f=ee(Fe),Vb.has(f)||(Vb.add(f),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",f===null?"An unknown Component":"<"+f+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,ne.H=t!==null&&t.memoizedState!==null?$b:as!==null?aw:qb,wl=f=(n.mode&zi)!==kt;var T=Gb(a,l,d);if(wl=!1,Rc&&(T=ph(n,a,l,d)),f){st(!0);try{T=ph(n,a,l,d)}finally{st(!1)}}return lm(t,n),T}function lm(t,n){n._debugHookTypes=as,n.dependencies===null?ha!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:ha}):n.dependencies._debugThenableState=ha,ne.H=dg;var a=St!==null&&St.next!==null;if(co=0,as=ie=ii=St=Fe=null,fa=-1,t!==null&&(t.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ug=!1,uf=0,ha=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");t===null||yi||(t=t.dependencies,t!==null&&On(t)&&(yi=!0)),og?(og=!1,t=!0):t=!1,t&&(n=ee(n)||"Unknown",sw.has(n)||Vb.has(n)||(sw.add(n),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function ph(t,n,a,l){Fe=t;var d=0;do{if(Rc&&(ha=null),uf=0,Rc=!1,d>=mI)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,cf=!1,ii=St=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}fa=-1,ne.H=ow,f=Gb(n,a,l)}while(Rc);return f}function ar(){var t=ne.H,n=t.useState()[0];return n=typeof n.then=="function"?$a(n):n,t=t.useState()[0],(St!==null?St.memoizedState:null)!==t&&(Fe.flags|=1024),n}function mh(){var t=cg!==0;return cg=0,t}function gh(t,n,a){n.updateQueue=t.updateQueue,n.flags=(n.mode&As)!==kt?n.flags&-402655237:n.flags&-2053,t.lanes&=~a}function yh(t){if(ug){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}ug=!1}co=0,as=ii=St=Fe=null,fa=-1,ie=null,Rc=!1,uf=cg=0,ha=null}function Xi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ii===null?Fe.memoizedState=ii=t:ii=ii.next=t,ii}function ut(){if(St===null){var t=Fe.alternate;t=t!==null?t.memoizedState:null}else t=St.next;var n=ii===null?Fe.memoizedState:ii.next;if(n!==null)ii=n,St=t;else{if(t===null)throw Fe.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");St=t,t={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},ii===null?Fe.memoizedState=ii=t:ii=ii.next=t}return ii}function fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $a(t){var n=uf;return uf+=1,ha===null&&(ha=sh()),t=ah(ha,t,n),n=Fe,(ii===null?n.memoizedState:ii.next)===null&&(n=n.alternate,ne.H=n!==null&&n.memoizedState!==null?$b:qb),t}function Rn(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return $a(t);if(t.$$typeof===pr)return Dt(t)}throw Error("An unsupported type was passed to use(): "+String(t))}function Yn(t){var n=null,a=Fe.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=Fe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=fl(),Fe.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0||cf)for(a=n.data[n.index]=Array(t),l=0;l<t;l++)a[l]=tL;else a.length!==t&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",a.length,t);return n.index++,a}function Mn(t,n){return typeof n=="function"?n(t):n}function vh(t,n,a){var l=Xi();if(a!==void 0){var d=a(n);if(wl){st(!0);try{a(n)}finally{st(!1)}}}else d=n;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=YM.bind(null,Fe,t),[l.memoizedState,t]}function Ga(t){var n=ut();return bh(n,St,t)}function bh(t,n,a){var l=t.queue;if(l===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");l.lastRenderedReducer=a;var d=t.baseQueue,f=l.pending;if(f!==null){if(d!==null){var T=d.next;d.next=f.next,f.next=T}n.baseQueue!==d&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=d=f,l.pending=null}if(f=t.baseState,d===null)t.memoizedState=f;else{n=d.next;var C=T=null,O=null,L=n,K=!1;do{var se=L.lane&-536870913;if(se!==L.lane?(Je&se)===se:(co&se)===se){var Q=L.revertLane;if(Q===0)O!==null&&(O=O.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),se===El&&(K=!0);else if((co&Q)===Q){L=L.next,Q===El&&(K=!0);continue}else se={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},O===null?(C=O=se,T=f):O=O.next=se,Fe.lanes|=Q,po|=Q;se=L.action,wl&&a(f,se),f=L.hasEagerState?L.eagerState:a(f,se)}else Q={lane:se,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},O===null?(C=O=Q,T=f):O=O.next=Q,Fe.lanes|=se,po|=se;L=L.next}while(L!==null&&L!==n);if(O===null?T=f:O.next=C,!Ki(f,t.memoizedState)&&(yi=!0,K&&(a=Dc,a!==null)))throw a;t.memoizedState=f,t.baseState=T,t.baseQueue=O,l.lastRenderedState=f}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function pl(t){var n=ut(),a=n.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=t;var l=a.dispatch,d=a.pending,f=n.memoizedState;if(d!==null){a.pending=null;var T=d=d.next;do f=t(f,T.action),T=T.next;while(T!==d);Ki(f,n.memoizedState)||(yi=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function ml(t,n,a){var l=Fe,d=Xi();if(rt){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=a();Oc||f===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Oc=!0)}else{if(f=n(),Oc||(a=n(),Ki(f,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Oc=!0)),Ct===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Je&124||um(l,n,f)}return d.memoizedState=f,a={value:f,getSnapshot:n},d.queue=a,te(Kr.bind(null,l,a,t),[t]),l.flags|=2048,k(rs|li,M(),_h.bind(null,l,a,f,n),null),f}function Ju(t,n,a){var l=Fe,d=ut(),f=rt;if(f){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");a=a()}else if(a=n(),!Oc){var T=n();Ki(a,T)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Oc=!0)}(T=!Ki((St||d).memoizedState,a))&&(d.memoizedState=a,yi=!0),d=d.queue;var C=Kr.bind(null,l,d,t);if(j(2048,li,C,[t]),d.getSnapshot!==n||T||ii!==null&&ii.memoizedState.tag&rs){if(l.flags|=2048,k(rs|li,M(),_h.bind(null,l,d,a,n),null),Ct===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||co&124||um(l,n,a)}return a}function um(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Fe.updateQueue,n===null?(n=fl(),Fe.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function _h(t,n,a,l){n.value=a,n.getSnapshot=l,ct(n)&&or(t)}function Kr(t,n,a){return a(function(){ct(n)&&or(t)})}function ct(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!Ki(t,a)}catch{return!0}}function or(t){var n=ri(t,2);n!==null&&Qt(n,t,2)}function ai(t){var n=Xi();if(typeof t=="function"){var a=t;if(t=a(),wl){st(!0);try{a()}finally{st(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:t},n}function mn(t){t=ai(t);var n=t.queue,a=Gx.bind(null,Fe,n);return n.dispatch=a,[t.memoizedState,a]}function Th(t){var n=Xi();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=rv.bind(null,Fe,!0,a),a.dispatch=n,[t,n]}function Sh(t,n){var a=ut();return cm(a,St,t,n)}function cm(t,n,a,l){return t.baseState=a,bh(t,St,typeof l=="function"?l:Mn)}function dm(t,n){var a=ut();return St!==null?cm(a,St,t,n):(a.baseState=t,[t,a.queue.dispatch])}function tv(t,n,a,l,d){if(mm(t))throw Error("Cannot update form state while rendering.");if(t=n.action,t!==null){var f={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){f.listeners.push(T)}};ne.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,hm(n,f)):(f.next=a.next,n.pending=a.next=f)}}function hm(t,n){var a=n.action,l=n.payload,d=t.state;if(n.isTransition){var f=ne.T,T={};ne.T=T,ne.T._updatedFibers=new Set;try{var C=a(d,l),O=ne.S;O!==null&&O(T,C),fm(t,n,C)}catch(L){xh(t,n,L)}finally{ne.T=f,f===null&&T._updatedFibers&&(t=T._updatedFibers.size,T._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{T=a(d,l),fm(t,n,T)}catch(L){xh(t,n,L)}}function fm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(a.then(function(l){pm(t,n,l)},function(l){return xh(t,n,l)}),n.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):pm(t,n,a)}function pm(t,n,a){n.status="fulfilled",n.value=a,Eh(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,hm(t,a)))}function xh(t,n,a){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,Eh(n),n=n.next;while(n!==l)}t.action=null}function Eh(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function h(t,n){return n}function m(t,n){if(rt){var a=Ct.formState;if(a!==null){e:{var l=Fe;if(rt){if(qt){t:{for(var d=qt,f=_r;d.nodeType!==8;){if(!f){d=null;break t}if(d=Kn(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f===v_||f===rD?d:null}if(d){qt=Kn(d.nextSibling),l=d.data===v_;break e}}Xr(l)}l=!1}l&&(n=a[0])}}return a=Xi(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:n},a.queue=l,a=Gx.bind(null,Fe,l),l.dispatch=a,l=ai(!1),f=rv.bind(null,Fe,!1,l.queue),l=Xi(),d={state:n,dispatch:null,action:t,pending:null},l.queue=d,a=tv.bind(null,Fe,d,f,a),d.dispatch=a,l.memoizedState=t,[n,a,!1]}function y(t){var n=ut();return v(n,St,t)}function v(t,n,a){if(n=bh(t,n,h)[0],t=Ga(Mn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=$a(n)}catch(T){throw T===of?ag:T}else l=n;n=ut();var d=n.queue,f=d.dispatch;return a!==n.memoizedState&&(Fe.flags|=2048,k(rs|li,M(),_.bind(null,d,a),null)),[l,f,t]}function _(t,n){t.action=n}function x(t){var n=ut(),a=St;if(a!==null)return v(n,a,t);ut(),n=n.memoizedState,a=ut();var l=a.queue.dispatch;return a.memoizedState=t,[n,l,!1]}function k(t,n,a,l){return t={tag:t,create:a,deps:l,inst:n,next:null},n=Fe.updateQueue,n===null&&(n=fl(),Fe.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(l=a.next,a.next=t,t.next=l,n.lastEffect=t),t}function M(){return{destroy:void 0,resource:void 0}}function I(t){var n=Xi();return t={current:t},n.memoizedState=t}function N(t,n,a,l){var d=Xi();l=l===void 0?null:l,Fe.flags|=t,d.memoizedState=k(rs|n,M(),a,l)}function j(t,n,a,l){var d=ut();l=l===void 0?null:l;var f=d.memoizedState.inst;St!==null&&l!==null&&hh(l,St.memoizedState.deps)?d.memoizedState=k(n,f,a,l):(Fe.flags|=t,d.memoizedState=k(rs|n,f,a,l))}function te(t,n){(Fe.mode&As)!==kt&&(Fe.mode&VA)===kt?N(276826112,li,t,n):N(8390656,li,t,n)}function be(t,n){var a=4194308;return(Fe.mode&As)!==kt&&(a|=134217728),N(a,Oi,t,n)}function ue(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return n.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}"),t=t(),n.current=t,function(){n.current=null}}function Ie(t,n,a){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),a=a!=null?a.concat([t]):null;var l=4194308;(Fe.mode&As)!==kt&&(l|=134217728),N(l,Oi,ue.bind(null,n,t),a)}function Pe(t,n,a){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),a=a!=null?a.concat([t]):null,j(4,Oi,ue.bind(null,n,t),a)}function Vt(t,n){return Xi().memoizedState=[t,n===void 0?null:n],t}function mi(t,n){var a=ut();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&hh(n,l[1])?l[0]:(a.memoizedState=[t,n],t)}function Wn(t,n){var a=Xi();n=n===void 0?null:n;var l=t();if(wl){st(!0);try{t()}finally{st(!1)}}return a.memoizedState=[l,n],l}function lr(t,n){var a=ut();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&hh(n,l[1]))return l[0];if(l=t(),wl){st(!0);try{t()}finally{st(!1)}}return a.memoizedState=[l,n],l}function Zr(t,n){var a=Xi();return Wa(a,t,n)}function Xa(t,n){var a=ut();return bt(a,St.memoizedState,t,n)}function Ya(t,n){var a=ut();return St===null?Wa(a,t,n):bt(a,St.memoizedState,t,n)}function Wa(t,n,a){return a===void 0||co&1073741824?t.memoizedState=n:(t.memoizedState=a,t=zE(),Fe.lanes|=t,po|=t,a)}function bt(t,n,a,l){return Ki(a,n)?a:kc.current!==null?(t=Wa(t,a,l),Ki(t,n)||(yi=!0),t):co&42?(t=zE(),Fe.lanes|=t,po|=t,n):(yi=!0,t.memoizedState=a)}function Qa(t,n,a,l,d){var f=dt.p;dt.p=f!==0&&f<yr?f:yr;var T=ne.T,C={};ne.T=C,rv(t,!1,n,a),C._updatedFibers=new Set;try{var O=d(),L=ne.S;if(L!==null&&L(C,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var K=Jy(O,l);Ch(t,n,K,Nn(t))}else Ch(t,n,l,Nn(t))}catch(se){Ch(t,n,{then:function(){},status:"rejected",reason:se},Nn(t))}finally{dt.p=f,ne.T=T,T===null&&C._updatedFibers&&(t=C._updatedFibers.size,C._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function Yi(t,n,a,l){if(t.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=jx(t).queue;Qa(t,d,n,Bl,a===null?S:function(){return Vx(t),a(l)})}function jx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Bl,baseState:Bl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:Bl},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Vx(t){ne.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=jx(t).next.queue;Ch(t,n,{},Nn(t))}function iv(){var t=ai(!1);return t=Qa.bind(null,Fe,t.queue,!0,!1),Xi().memoizedState=t,[!1,t]}function qx(){var t=Ga(Mn)[0],n=ut().memoizedState;return[typeof t=="boolean"?t:$a(t),n]}function $x(){var t=pl(Mn)[0],n=ut().memoizedState;return[typeof t=="boolean"?t:$a(t),n]}function gl(){return Dt(wf)}function nv(){var t=Xi(),n=Ct.identifierPrefix;if(rt){var a=ca,l=ua;a=(l&~(1<<32-Wi(l)-1)).toString(32)+a,n="«"+n+"R"+a,a=cg++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=pI++,n="«"+n+"r"+a.toString(32)+"»";return t.memoizedState=n}function sv(){return Xi().memoizedState=XM.bind(null,Fe)}function XM(t,n){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var l=Nn(a);t=pn(l);var d=rr(a,t,l);d!==null&&(Qt(d,a,l),Va(d,a,l)),a=eh(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),t.payload={cache:a};return}a=a.return}}function YM(t,n,a){var l=arguments;typeof l[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),l=Nn(t);var d={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};mm(t)?Xx(n,d):(d=Js(t,n,d,l),d!==null&&(Qt(d,t,l),Yx(d,n,l))),Vs(t,l)}function Gx(t,n,a){var l=arguments;typeof l[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),l=Nn(t),Ch(t,n,a,l),Vs(t,l)}function Ch(t,n,a,l){var d={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(mm(t))Xx(n,d);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null)){var T=ne.H;ne.H=Ds;try{var C=n.lastRenderedState,O=f(C,a);if(d.hasEagerState=!0,d.eagerState=O,Ki(O,C))return Zs(t,n,d,0),Ct===null&&Fa(),!1}catch{}finally{ne.H=T}}if(a=Js(t,n,d,l),a!==null)return Qt(a,t,l),Yx(a,n,l),!0}return!1}function rv(t,n,a,l){if(ne.T===null&&El===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),l={lane:2,revertLane:Pv(),action:l,hasEagerState:!1,eagerState:null,next:null},mm(t)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Js(t,a,l,2),n!==null&&Qt(n,t,2);Vs(t,2)}function mm(t){var n=t.alternate;return t===Fe||n!==null&&n===Fe}function Xx(t,n){Rc=ug=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Yx(t,n,a){if(a&4194048){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,La(t,a)}}function Ci(t){var n=Xe;return t!=null&&(Xe=n===null?t:n.concat(t)),n}function gm(t,n,a){for(var l=Object.keys(t.props),d=0;d<l.length;d++){var f=l[d];if(f!=="children"&&f!=="key"){n===null&&(n=Gu(t,a.mode,0),n._debugInfo=Xe,n.return=a),ke(n,function(T){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T)},f);break}}}function ym(t){var n=df;return df+=1,Mc===null&&(Mc=sh()),ah(Mc,t,n)}function Ah(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function vm(t,n){throw n.$$typeof===J5?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
||
- Multiple copies of the "react" package is used.
|
||
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
||
- A compiler tries to "inline" JSX instead of using the runtime.`):(t=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead."))}function bm(t,n){var a=ee(t)||"Component";Sw[a]||(Sw[a]=!0,n=n.displayName||n.name||"Component",t.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
||
root.render(%s)`,n,n,n):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
||
<%s>{%s}</%s>`,n,n,a,n,a))}function _m(t,n){var a=ee(t)||"Component";xw[a]||(xw[a]=!0,n=String(n),t.tag===3?console.error(`Symbols are not valid as a React child.
|
||
root.render(%s)`,n):console.error(`Symbols are not valid as a React child.
|
||
<%s>%s</%s>`,a,n,a))}function Wx(t){function n(B,F){if(t){var V=B.deletions;V===null?(B.deletions=[F],B.flags|=16):V.push(F)}}function a(B,F){if(!t)return null;for(;F!==null;)n(B,F),F=F.sibling;return null}function l(B){for(var F=new Map;B!==null;)B.key!==null?F.set(B.key,B):F.set(B.index,B),B=B.sibling;return F}function d(B,F){return B=Ts(B,F),B.index=0,B.sibling=null,B}function f(B,F,V){return B.index=V,t?(V=B.alternate,V!==null?(V=V.index,V<F?(B.flags|=67108866,F):V):(B.flags|=67108866,F)):(B.flags|=1048576,F)}function T(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function C(B,F,V,ae){return F===null||F.tag!==6?(F=za(V,B.mode,ae),F.return=B,F._debugOwner=B,F._debugTask=B._debugTask,F._debugInfo=Xe,F):(F=d(F,V),F.return=B,F._debugInfo=Xe,F)}function O(B,F,V,ae){var _e=V.type;return _e===cc?(F=K(B,F,V.props.children,ae,V.key),gm(V,F,B),F):F!==null&&(F.elementType===_e||qu(F,V)||typeof _e=="object"&&_e!==null&&_e.$$typeof===Pn&&ho(_e)===F.type)?(F=d(F,V.props),Ah(F,V),F.return=B,F._debugOwner=V._owner,F._debugInfo=Xe,F):(F=Gu(V,B.mode,ae),Ah(F,V),F.return=B,F._debugInfo=Xe,F)}function L(B,F,V,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==V.containerInfo||F.stateNode.implementation!==V.implementation?(F=Yd(V,B.mode,ae),F.return=B,F._debugInfo=Xe,F):(F=d(F,V.children||[]),F.return=B,F._debugInfo=Xe,F)}function K(B,F,V,ae,_e){return F===null||F.tag!==7?(F=ir(V,B.mode,ae,_e),F.return=B,F._debugOwner=B,F._debugTask=B._debugTask,F._debugInfo=Xe,F):(F=d(F,V),F.return=B,F._debugInfo=Xe,F)}function se(B,F,V){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=za(""+F,B.mode,V),F.return=B,F._debugOwner=B,F._debugTask=B._debugTask,F._debugInfo=Xe,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case io:return V=Gu(F,B.mode,V),Ah(V,F),V.return=B,B=Ci(F._debugInfo),V._debugInfo=Xe,Xe=B,V;case uc:return F=Yd(F,B.mode,V),F.return=B,F._debugInfo=Xe,F;case Pn:var ae=Ci(F._debugInfo);return F=ho(F),B=se(B,F,V),Xe=ae,B}if(Di(F)||le(F))return V=ir(F,B.mode,V,null),V.return=B,V._debugOwner=B,V._debugTask=B._debugTask,B=Ci(F._debugInfo),V._debugInfo=Xe,Xe=B,V;if(typeof F.then=="function")return ae=Ci(F._debugInfo),B=se(B,ym(F),V),Xe=ae,B;if(F.$$typeof===pr)return se(B,Xu(B,F),V);vm(B,F)}return typeof F=="function"&&bm(B,F),typeof F=="symbol"&&_m(B,F),null}function Q(B,F,V,ae){var _e=F!==null?F.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return _e!==null?null:C(B,F,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case io:return V.key===_e?(_e=Ci(V._debugInfo),B=O(B,F,V,ae),Xe=_e,B):null;case uc:return V.key===_e?L(B,F,V,ae):null;case Pn:return _e=Ci(V._debugInfo),V=ho(V),B=Q(B,F,V,ae),Xe=_e,B}if(Di(V)||le(V))return _e!==null?null:(_e=Ci(V._debugInfo),B=K(B,F,V,ae,null),Xe=_e,B);if(typeof V.then=="function")return _e=Ci(V._debugInfo),B=Q(B,F,ym(V),ae),Xe=_e,B;if(V.$$typeof===pr)return Q(B,F,Xu(B,V),ae);vm(B,V)}return typeof V=="function"&&bm(B,V),typeof V=="symbol"&&_m(B,V),null}function re(B,F,V,ae,_e){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return B=B.get(V)||null,C(F,B,""+ae,_e);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case io:return V=B.get(ae.key===null?V:ae.key)||null,B=Ci(ae._debugInfo),F=O(F,V,ae,_e),Xe=B,F;case uc:return B=B.get(ae.key===null?V:ae.key)||null,L(F,B,ae,_e);case Pn:var je=Ci(ae._debugInfo);return ae=ho(ae),F=re(B,F,V,ae,_e),Xe=je,F}if(Di(ae)||le(ae))return V=B.get(V)||null,B=Ci(ae._debugInfo),F=K(F,V,ae,_e,null),Xe=B,F;if(typeof ae.then=="function")return je=Ci(ae._debugInfo),F=re(B,F,V,ym(ae),_e),Xe=je,F;if(ae.$$typeof===pr)return re(B,F,V,Xu(F,ae),_e);vm(F,ae)}return typeof ae=="function"&&bm(F,ae),typeof ae=="symbol"&&_m(F,ae),null}function we(B,F,V,ae){if(typeof V!="object"||V===null)return ae;switch(V.$$typeof){case io:case uc:p(B,F,V);var _e=V.key;if(typeof _e!="string")break;if(ae===null){ae=new Set,ae.add(_e);break}if(!ae.has(_e)){ae.add(_e);break}ke(F,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",_e)});break;case Pn:V=ho(V),we(B,F,V,ae)}return ae}function Be(B,F,V,ae){for(var _e=null,je=null,De=null,Ve=F,$e=F=0,Ot=null;Ve!==null&&$e<V.length;$e++){Ve.index>$e?(Ot=Ve,Ve=null):Ot=Ve.sibling;var Zt=Q(B,Ve,V[$e],ae);if(Zt===null){Ve===null&&(Ve=Ot);break}_e=we(B,Zt,V[$e],_e),t&&Ve&&Zt.alternate===null&&n(B,Ve),F=f(Zt,F,$e),De===null?je=Zt:De.sibling=Zt,De=Zt,Ve=Ot}if($e===V.length)return a(B,Ve),rt&&Gr(B,$e),je;if(Ve===null){for(;$e<V.length;$e++)Ve=se(B,V[$e],ae),Ve!==null&&(_e=we(B,Ve,V[$e],_e),F=f(Ve,F,$e),De===null?je=Ve:De.sibling=Ve,De=Ve);return rt&&Gr(B,$e),je}for(Ve=l(Ve);$e<V.length;$e++)Ot=re(Ve,B,$e,V[$e],ae),Ot!==null&&(_e=we(B,Ot,V[$e],_e),t&&Ot.alternate!==null&&Ve.delete(Ot.key===null?$e:Ot.key),F=f(Ot,F,$e),De===null?je=Ot:De.sibling=Ot,De=Ot);return t&&Ve.forEach(function(ba){return n(B,ba)}),rt&&Gr(B,$e),je}function At(B,F,V,ae){if(V==null)throw Error("An iterable object provided no iterator.");for(var _e=null,je=null,De=F,Ve=F=0,$e=null,Ot=null,Zt=V.next();De!==null&&!Zt.done;Ve++,Zt=V.next()){De.index>Ve?($e=De,De=null):$e=De.sibling;var ba=Q(B,De,Zt.value,ae);if(ba===null){De===null&&(De=$e);break}Ot=we(B,ba,Zt.value,Ot),t&&De&&ba.alternate===null&&n(B,De),F=f(ba,F,Ve),je===null?_e=ba:je.sibling=ba,je=ba,De=$e}if(Zt.done)return a(B,De),rt&&Gr(B,Ve),_e;if(De===null){for(;!Zt.done;Ve++,Zt=V.next())De=se(B,Zt.value,ae),De!==null&&(Ot=we(B,De,Zt.value,Ot),F=f(De,F,Ve),je===null?_e=De:je.sibling=De,je=De);return rt&&Gr(B,Ve),_e}for(De=l(De);!Zt.done;Ve++,Zt=V.next())$e=re(De,B,Ve,Zt.value,ae),$e!==null&&(Ot=we(B,$e,Zt.value,Ot),t&&$e.alternate!==null&&De.delete($e.key===null?Ve:$e.key),F=f($e,F,Ve),je===null?_e=$e:je.sibling=$e,je=$e);return t&&De.forEach(function(zI){return n(B,zI)}),rt&&Gr(B,Ve),_e}function tt(B,F,V,ae){if(typeof V=="object"&&V!==null&&V.type===cc&&V.key===null&&(gm(V,null,B),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case io:var _e=Ci(V._debugInfo);e:{for(var je=V.key;F!==null;){if(F.key===je){if(je=V.type,je===cc){if(F.tag===7){a(B,F.sibling),ae=d(F,V.props.children),ae.return=B,ae._debugOwner=V._owner,ae._debugInfo=Xe,gm(V,ae,B),B=ae;break e}}else if(F.elementType===je||qu(F,V)||typeof je=="object"&&je!==null&&je.$$typeof===Pn&&ho(je)===F.type){a(B,F.sibling),ae=d(F,V.props),Ah(ae,V),ae.return=B,ae._debugOwner=V._owner,ae._debugInfo=Xe,B=ae;break e}a(B,F);break}else n(B,F);F=F.sibling}V.type===cc?(ae=ir(V.props.children,B.mode,ae,V.key),ae.return=B,ae._debugOwner=B,ae._debugTask=B._debugTask,ae._debugInfo=Xe,gm(V,ae,B),B=ae):(ae=Gu(V,B.mode,ae),Ah(ae,V),ae.return=B,ae._debugInfo=Xe,B=ae)}return B=T(B),Xe=_e,B;case uc:e:{for(_e=V,V=_e.key;F!==null;){if(F.key===V)if(F.tag===4&&F.stateNode.containerInfo===_e.containerInfo&&F.stateNode.implementation===_e.implementation){a(B,F.sibling),ae=d(F,_e.children||[]),ae.return=B,B=ae;break e}else{a(B,F);break}else n(B,F);F=F.sibling}ae=Yd(_e,B.mode,ae),ae.return=B,B=ae}return T(B);case Pn:return _e=Ci(V._debugInfo),V=ho(V),B=tt(B,F,V,ae),Xe=_e,B}if(Di(V))return _e=Ci(V._debugInfo),B=Be(B,F,V,ae),Xe=_e,B;if(le(V)){if(_e=Ci(V._debugInfo),je=le(V),typeof je!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var De=je.call(V);return De===V?(B.tag!==0||Object.prototype.toString.call(B.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(De)!=="[object Generator]")&&(_w||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),_w=!0):V.entries!==je||Yb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Yb=!0),B=At(B,F,De,ae),Xe=_e,B}if(typeof V.then=="function")return _e=Ci(V._debugInfo),B=tt(B,F,ym(V),ae),Xe=_e,B;if(V.$$typeof===pr)return tt(B,F,Xu(B,V),ae);vm(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(_e=""+V,F!==null&&F.tag===6?(a(B,F.sibling),ae=d(F,_e),ae.return=B,B=ae):(a(B,F),ae=za(_e,B.mode,ae),ae.return=B,ae._debugOwner=B,ae._debugTask=B._debugTask,ae._debugInfo=Xe,B=ae),T(B)):(typeof V=="function"&&bm(B,V),typeof V=="symbol"&&_m(B,V),a(B,F))}return function(B,F,V,ae){var _e=Xe;Xe=null;try{df=0;var je=tt(B,F,V,ae);return Mc=null,je}catch(Ot){if(Ot===of||Ot===ag)throw Ot;var De=A(29,Ot,null,B.mode);De.lanes=ae,De.return=B;var Ve=De._debugInfo=Xe;if(De._debugOwner=B._debugOwner,De._debugTask=B._debugTask,Ve!=null){for(var $e=Ve.length-1;0<=$e;$e--)if(typeof Ve[$e].stack=="string"){De._debugOwner=Ve[$e],De._debugTask=Ve[$e].debugTask;break}}return De}finally{Xe=_e}}}function Ka(t){var n=t.alternate;ge(ui,ui.current&Ic,t),ge(os,t,t),Sr===null&&(n===null||kc.current!==null||n.memoizedState!==null)&&(Sr=t)}function Qx(t){if(t.tag===22){if(ge(ui,ui.current,t),ge(os,t,t),Sr===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Sr=t)}}else Za(t)}function Za(t){ge(ui,ui.current,t),ge(os,os.current,t)}function Jr(t){de(os,t),Sr===t&&(Sr=null),de(ui,t)}function Tm(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data===ga||Xv(a)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function av(t){if(t!==null&&typeof t!="function"){var n=String(t);Nw.has(n)||(Nw.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",t))}}function ov(t,n,a,l){var d=t.memoizedState,f=a(l,d);if(t.mode&zi){st(!0);try{f=a(l,d)}finally{st(!1)}}f===void 0&&(n=J(n)||"Component",Rw.has(n)||(Rw.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=f==null?d:Qe({},d,f),t.memoizedState=d,t.lanes===0&&(t.updateQueue.baseState=d)}function Kx(t,n,a,l,d,f,T){var C=t.stateNode;if(typeof C.shouldComponentUpdate=="function"){if(a=C.shouldComponentUpdate(l,f,T),t.mode&zi){st(!0);try{a=C.shouldComponentUpdate(l,f,T)}finally{st(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",J(n)||"Component"),a}return n.prototype&&n.prototype.isPureReactComponent?!_s(a,l)||!_s(d,f):!0}function Zx(t,n,a,l){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==d&&(t=ee(t)||"Component",Aw.has(t)||(Aw.add(t),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",t)),Wb.enqueueReplaceState(n,n.state,null))}function yl(t,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(t=t.defaultProps){a===n&&(a=Qe({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Jx(t){Qb(t),console.warn(`%s
|
||
|
||
%s
|
||
`,Nc?"An error occurred in the <"+Nc+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
||
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function eE(t){var n=Nc?"The above error occurred in the <"+Nc+"> component.":"The above error occurred in one of your React components.",a="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Kb||"Anonymous")+".");if(typeof t=="object"&&t!==null&&typeof t.environmentName=="string"){var l=t.environmentName;t=[`%o
|
||
|
||
%s
|
||
|
||
%s
|
||
`,t,n,a].slice(0),typeof t[0]=="string"?t.splice(0,1,fD+t[0],pD,Og+l+Og,mD):t.splice(0,0,fD,pD,Og+l+Og,mD),t.unshift(console),l=FI.apply(console.error,t),l()}else console.error(`%o
|
||
|
||
%s
|
||
|
||
%s
|
||
`,t,n,a)}function tE(t){Qb(t)}function Sm(t,n){try{Nc=n.source?ee(n.source):null,Kb=null;var a=n.value;if(ne.actQueue!==null)ne.thrownErrors.push(a);else{var l=t.onUncaughtError;l(a,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function iE(t,n,a){try{Nc=a.source?ee(a.source):null,Kb=ee(n);var l=t.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function lv(t,n,a){return a=pn(a),a.tag=Hb,a.payload={element:null},a.callback=function(){ke(n.source,Sm,t,n)},a}function uv(t){return t=pn(t),t.tag=Hb,t}function cv(t,n,a,l){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var f=l.value;t.payload=function(){return d(f)},t.callback=function(){im(a),ke(l.source,iE,n,a,l)}}var T=a.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(t.callback=function(){im(a),ke(l.source,iE,n,a,l),typeof d!="function"&&(go===null?go=new Set([this]):go.add(this)),gI(this,l),typeof d=="function"||!(a.lanes&2)&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ee(a)||"Unknown")})}function WM(t,n,a,l,d){if(a.flags|=32768,Cs&&Lh(t,d),l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&il(n,a,d,!0),rt&&(da=!0),a=os.current,a!==null){switch(a.tag){case 13:return Sr===null?kv():a.alternate===null&&$t===ma&&($t=t_),a.flags&=-257,a.flags|=65536,a.lanes=d,l===Fb?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Mv(t,l,d)),!1;case 22:return a.flags|=65536,l===Fb?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),Mv(t,l,d)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return Mv(t,l,d),kv(),!1}if(rt)return da=!0,n=os.current,n!==null?(!(n.flags&65536)&&(n.flags|=256),n.flags|=65536,n.lanes=d,l!==Nb&&tl(Ei(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:l}),a))):(l!==Nb&&tl(Ei(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:l}),a)),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=Ei(l,a),d=lv(t.stateNode,l,d),cl(t,d),$t!==Dl&&($t=Fc)),!1;var f=Ei(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:l}),a);if(bf===null?bf=[f]:bf.push(f),$t!==Dl&&($t=Fc),n===null)return!0;l=Ei(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=lv(a.stateNode,l,t),cl(a,t),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(go===null||!go.has(f))))return a.flags|=65536,d&=-d,a.lanes|=d,d=uv(d),cv(d,t,a,l),cl(a,d),!1}a=a.return}while(a!==null);return!1}function Ai(t,n,a,l){n.child=t===null?Ew(n,null,a,l):Lc(n,t.child,a,l)}function nE(t,n,a,l,d){a=a.render;var f=n.ref;if("ref"in l){var T={};for(var C in l)C!=="ref"&&(T[C]=l[C])}else T=l;return sr(n),si(n),l=fh(t,n,a,T,f,d),C=mh(),cn(),t!==null&&!yi?(gh(t,n,d),ea(t,n,d)):(rt&&C&&Jo(n),n.flags|=1,Ai(t,n,l,d),n.child)}function sE(t,n,a,l,d){if(t===null){var f=a.type;return typeof f=="function"&&!Ha(f)&&f.defaultProps===void 0&&a.compare===null?(a=tr(f),n.tag=15,n.type=a,hv(n,f),rE(t,n,a,l,d)):(t=Xd(a.type,null,l,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(f=t.child,!vv(t,d)){var T=f.memoizedProps;if(a=a.compare,a=a!==null?a:_s,a(T,l)&&t.ref===n.ref)return ea(t,n,d)}return n.flags|=1,t=Ts(f,l),t.ref=n.ref,t.return=n,n.child=t}function rE(t,n,a,l,d){if(t!==null){var f=t.memoizedProps;if(_s(f,l)&&t.ref===n.ref&&n.type===t.type)if(yi=!1,n.pendingProps=l=f,vv(t,d))t.flags&131072&&(yi=!0);else return n.lanes=t.lanes,ea(t,n,d)}return dv(t,n,a,l,d)}function aE(t,n,a){var l=n.pendingProps,d=l.children,f=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if(n.flags&128){if(l=f!==null?f.baseLanes|a:a,t!==null){for(d=n.child=t.child,f=0;d!==null;)f=f|d.lanes|d.childLanes,d=d.sibling;n.childLanes=f&~l}else n.childLanes=0,n.child=null;return oE(t,n,l,a)}if(a&536870912)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Wu(n,f!==null?f.cachePool:null),f!==null?Ku(n,f):ch(n),Qx(n);else return n.lanes=n.childLanes=536870912,oE(t,n,f!==null?f.baseLanes|a:a,a)}else f!==null?(Wu(n,f.cachePool),Ku(n,f),Za(n),n.memoizedState=null):(t!==null&&Wu(n,null),ch(n),Za(n));return Ai(t,n,d,a),n.child}function oE(t,n,a,l){var d=ih();return d=d===null?null:{parent:oi._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},t!==null&&Wu(n,null),ch(n),Qx(n),t!==null&&il(t,n,l,!0),null}function xm(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(t===null||t.ref!==a)&&(n.flags|=4194816)}}function dv(t,n,a,l,d){if(a.prototype&&typeof a.prototype.render=="function"){var f=J(a)||"Unknown";Uw[f]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",f,f),Uw[f]=!0)}return n.mode&zi&&ws.recordLegacyContextWarning(n,null),t===null&&(hv(n,n.type),a.contextTypes&&(f=J(a)||"Unknown",Fw[f]||(Fw[f]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",f)))),sr(n),si(n),a=fh(t,n,a,l,void 0,d),l=mh(),cn(),t!==null&&!yi?(gh(t,n,d),ea(t,n,d)):(rt&&l&&Jo(n),n.flags|=1,Ai(t,n,a,d),n.child)}function lE(t,n,a,l,d,f){return sr(n),si(n),fa=-1,cf=t!==null&&t.type!==n.type,n.updateQueue=null,a=ph(n,l,a,d),lm(t,n),l=mh(),cn(),t!==null&&!yi?(gh(t,n,f),ea(t,n,f)):(rt&&l&&Jo(n),n.flags|=1,Ai(t,n,a,f),n.child)}function uE(t,n,a,l,d){switch(c(n)){case!1:var f=n.stateNode,T=new n.type(n.memoizedProps,f.context).state;f.updater.enqueueSetState(f,T,null);break;case!0:n.flags|=128,n.flags|=65536,f=Error("Simulated error coming from DevTools");var C=d&-d;if(n.lanes|=C,T=Ct,T===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=uv(C),cv(C,T,n,Ei(f,n)),cl(n,C)}if(sr(n),n.stateNode===null){if(T=lo,f=a.contextType,"contextType"in a&&f!==null&&(f===void 0||f.$$typeof!==pr)&&!Iw.has(a)&&(Iw.add(a),C=f===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof f!="object"?" However, it is set to a "+typeof f+".":f.$$typeof===rb?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(f).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",J(a)||"Component",C)),typeof f=="object"&&f!==null&&(T=Dt(f)),f=new a(l,T),n.mode&zi){st(!0);try{f=new a(l,T)}finally{st(!1)}}if(T=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Wb,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=Cw,typeof a.getDerivedStateFromProps=="function"&&T===null&&(T=J(a)||"Component",ww.has(T)||(ww.add(T),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",T,f.state===null?"null":"undefined",T))),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"){var O=C=T=null;if(typeof f.componentWillMount=="function"&&f.componentWillMount.__suppressDeprecationWarning!==!0?T="componentWillMount":typeof f.UNSAFE_componentWillMount=="function"&&(T="UNSAFE_componentWillMount"),typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof f.UNSAFE_componentWillReceiveProps=="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof f.componentWillUpdate=="function"&&f.componentWillUpdate.__suppressDeprecationWarning!==!0?O="componentWillUpdate":typeof f.UNSAFE_componentWillUpdate=="function"&&(O="UNSAFE_componentWillUpdate"),T!==null||C!==null||O!==null){f=J(a)||"Component";var L=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";kw.has(f)||(kw.add(f),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
||
|
||
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
||
|
||
The above lifecycles should be removed. Learn more about this warning here:
|
||
https://react.dev/link/unsafe-component-lifecycles`,f,L,T!==null?`
|
||
`+T:"",C!==null?`
|
||
`+C:"",O!==null?`
|
||
`+O:""))}}f=n.stateNode,T=J(a)||"Component",f.render||(a.prototype&&typeof a.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",T):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",T)),!f.getInitialState||f.getInitialState.isReactClassApproved||f.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",T),f.getDefaultProps&&!f.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",T),f.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",T),a.childContextTypes&&!Lw.has(a)&&(Lw.add(a),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",T)),a.contextTypes&&!Mw.has(a)&&(Mw.add(a),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",T)),typeof f.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",T),a.prototype&&a.prototype.isPureReactComponent&&typeof f.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",J(a)||"A pure component"),typeof f.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",T),typeof f.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",T),typeof f.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",T),typeof f.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",T),C=f.props!==l,f.props!==void 0&&C&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",T),f.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",T,T),typeof f.getSnapshotBeforeUpdate!="function"||typeof f.componentDidUpdate=="function"||Dw.has(a)||(Dw.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",J(a))),typeof f.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),typeof f.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),typeof a.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",T),(C=f.state)&&(typeof C!="object"||Di(C))&&console.error("%s.state: must be set to an object or null",T),typeof f.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",T),f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},ul(n),T=a.contextType,f.context=typeof T=="object"&&T!==null?Dt(T):lo,f.state===l&&(T=J(a)||"Component",Ow.has(T)||(Ow.add(T),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",T))),n.mode&zi&&ws.recordLegacyContextWarning(n,f),ws.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,T=a.getDerivedStateFromProps,typeof T=="function"&&(ov(n,a,T,l),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(T=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),T!==f.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ee(n)||"Component"),Wb.enqueueReplaceState(f,f.state,null)),hl(n,l,f,d),dl(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&As)!==kt&&(n.flags|=134217728),f=!0}else if(t===null){f=n.stateNode;var K=n.memoizedProps;C=yl(a,K),f.props=C;var se=f.context;O=a.contextType,T=lo,typeof O=="object"&&O!==null&&(T=Dt(O)),L=a.getDerivedStateFromProps,O=typeof L=="function"||typeof f.getSnapshotBeforeUpdate=="function",K=n.pendingProps!==K,O||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(K||se!==T)&&Zx(n,f,l,T),uo=!1;var Q=n.memoizedState;f.state=Q,hl(n,l,f,d),dl(),se=n.memoizedState,K||Q!==se||uo?(typeof L=="function"&&(ov(n,a,L,l),se=n.memoizedState),(C=uo||Kx(n,a,C,l,Q,se,T))?(O||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&As)!==kt&&(n.flags|=134217728)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&As)!==kt&&(n.flags|=134217728),n.memoizedProps=l,n.memoizedState=se),f.props=l,f.state=se,f.context=T,f=C):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&As)!==kt&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,lh(t,n),T=n.memoizedProps,O=yl(a,T),f.props=O,L=n.pendingProps,Q=f.context,se=a.contextType,C=lo,typeof se=="object"&&se!==null&&(C=Dt(se)),K=a.getDerivedStateFromProps,(se=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(T!==L||Q!==C)&&Zx(n,f,l,C),uo=!1,Q=n.memoizedState,f.state=Q,hl(n,l,f,d),dl();var re=n.memoizedState;T!==L||Q!==re||uo||t!==null&&t.dependencies!==null&&On(t.dependencies)?(typeof K=="function"&&(ov(n,a,K,l),re=n.memoizedState),(O=uo||Kx(n,a,O,l,Q,re,C)||t!==null&&t.dependencies!==null&&On(t.dependencies))?(se||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,re,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,re,C)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=re),f.props=l,f.state=re,f.context=C,f=O):(typeof f.componentDidUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),f=!1)}if(C=f,xm(t,n),T=(n.flags&128)!==0,C||T){if(C=n.stateNode,Dn(n),T&&typeof a.getDerivedStateFromError!="function")a=null,yn=-1;else{if(si(n),a=cw(C),n.mode&zi){st(!0);try{cw(C)}finally{st(!1)}}cn()}n.flags|=1,t!==null&&T?(n.child=Lc(n,t.child,null,d),n.child=Lc(n,null,a,d)):Ai(t,n,a,d),n.memoizedState=C.state,t=n.child}else t=ea(t,n,d);return d=n.stateNode,f&&d.props!==l&&(Pc||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ee(n)||"a component"),Pc=!0),t}function cE(t,n,a,l){return el(),n.flags|=256,Ai(t,n,a,l),n.child}function hv(t,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
||
%s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps=="function"&&(t=J(n)||"Unknown",Hw[t]||(console.error("%s: Function components do not support getDerivedStateFromProps.",t),Hw[t]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=J(n)||"Unknown",Bw[n]||(console.error("%s: Function components do not support contextType.",n),Bw[n]=!0))}function fv(t){return{baseLanes:t,cachePool:nh()}}function pv(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=Hn),t}function dE(t,n,a){var l,d=n.pendingProps;u(n)&&(n.flags|=128);var f=!1,T=(n.flags&128)!==0;if((l=T)||(l=t!==null&&t.memoizedState===null?!1:(ui.current&hf)!==0),l&&(f=!0,n.flags&=-129),l=(n.flags&32)!==0,n.flags&=-33,t===null){if(rt){if(f?Ka(n):Za(n),rt){var C=qt,O;if(!(O=!C)){e:{var L=C;for(O=_r;L.nodeType!==8;){if(!O){O=null;break e}if(L=Kn(L.nextSibling),L===null){O=null;break e}}O=L}O!==null?(Ss(),n.memoizedState={dehydrated:O,treeContext:Tl!==null?{id:ua,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},L=A(18,null,null,kt),L.stateNode=O,L.return=n,n.child=L,Zi=n,qt=null,O=!0):O=!1,O=!O}O&&(Qd(n,C),Xr(n))}if(C=n.memoizedState,C!==null&&(C=C.dehydrated,C!==null))return Xv(C)?n.lanes=32:n.lanes=536870912,null;Jr(n)}return C=d.children,d=d.fallback,f?(Za(n),f=n.mode,C=Em({mode:"hidden",children:C},f),d=ir(d,f,a,null),C.return=n,d.return=n,C.sibling=d,n.child=C,f=n.child,f.memoizedState=fv(a),f.childLanes=pv(t,l,a),n.memoizedState=Jb,d):(Ka(n),mv(n,C))}var K=t.memoizedState;if(K!==null&&(C=K.dehydrated,C!==null)){if(T)n.flags&256?(Ka(n),n.flags&=-257,n=gv(t,n,a)):n.memoizedState!==null?(Za(n),n.child=t.child,n.flags|=128,n=null):(Za(n),f=d.fallback,C=n.mode,d=Em({mode:"visible",children:d.children},C),f=ir(f,C,a,null),f.flags|=2,d.return=n,f.return=n,d.sibling=f,n.child=d,Lc(n,t.child,null,a),d=n.child,d.memoizedState=fv(a),d.childLanes=pv(t,l,a),n.memoizedState=Jb,n=f);else if(Ka(n),rt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),Xv(C)){if(l=C.nextSibling&&C.nextSibling.dataset,l){O=l.dgst;var se=l.msg;L=l.stck;var Q=l.cstck}C=se,l=O,d=L,O=f=Q,f=Error(C||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),f.stack=d||"",f.digest=l,l=O===void 0?null:O,d={value:f,source:null,stack:l},typeof l=="string"&&Lb.set(f,d),tl(d),n=gv(t,n,a)}else if(yi||il(t,n,a,!1),l=(a&t.childLanes)!==0,yi||l){if(l=Ct,l!==null&&(d=a&-a,d=d&42?1:Gs(d),d=d&(l.suspendedLanes|a)?0:d,d!==0&&d!==K.retryLane))throw K.retryLane=d,ri(t,d),Qt(l,t,d),Pw;C.data===ga||kv(),n=gv(t,n,a)}else C.data===ga?(n.flags|=192,n.child=t.child,n=null):(t=K.treeContext,qt=Kn(C.nextSibling),Zi=n,rt=!0,Sl=null,da=!1,ns=null,_r=!1,t!==null&&(Ss(),ts[is++]=ua,ts[is++]=ca,ts[is++]=Tl,ua=t.id,ca=t.overflow,Tl=n),n=mv(n,d.children),n.flags|=4096);return n}return f?(Za(n),f=d.fallback,C=n.mode,O=t.child,L=O.sibling,d=Ts(O,{mode:"hidden",children:d.children}),d.subtreeFlags=O.subtreeFlags&65011712,L!==null?f=Ts(L,f):(f=ir(f,C,a,null),f.flags|=2),f.return=n,d.return=n,d.sibling=f,n.child=d,d=f,f=n.child,C=t.child.memoizedState,C===null?C=fv(a):(O=C.cachePool,O!==null?(L=oi._currentValue,O=O.parent!==L?{parent:L,pool:L}:O):O=nh(),C={baseLanes:C.baseLanes|a,cachePool:O}),f.memoizedState=C,f.childLanes=pv(t,l,a),n.memoizedState=Jb,d):(Ka(n),a=t.child,t=a.sibling,a=Ts(a,{mode:"visible",children:d.children}),a.return=n,a.sibling=null,t!==null&&(l=n.deletions,l===null?(n.deletions=[t],n.flags|=16):l.push(t)),n.child=a,n.memoizedState=null,a)}function mv(t,n){return n=Em({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Em(t,n){return t=A(22,t,null,n),t.lanes=0,t.stateNode={_visibility:Zm,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function gv(t,n,a){return Lc(n,t.child,null,a),t=mv(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function hE(t,n,a){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),Yr(t.return,n,a)}function fE(t,n){var a=Di(t);return t=!a&&typeof le(t)=="function",a||t?(a=a?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",a,n,a),!1):!0}function yv(t,n,a,l,d){var f=t.memoizedState;f===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:d}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=d)}function pE(t,n,a){var l=n.pendingProps,d=l.revealOrder,f=l.tail;if(l=l.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!zw[d])if(zw[d]=!0,typeof d=="string")switch(d.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',d,d.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',d,d.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d);f===void 0||Zb[f]||(f!=="collapsed"&&f!=="hidden"?(Zb[f]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',f)):d!=="forwards"&&d!=="backwards"&&(Zb[f]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)));e:if((d==="forwards"||d==="backwards")&&l!==void 0&&l!==null&&l!==!1)if(Di(l)){for(var T=0;T<l.length;T++)if(!fE(l[T],T))break e}else if(T=le(l),typeof T=="function"){if(T=T.call(l))for(var C=T.next(),O=0;!C.done;C=T.next()){if(!fE(C.value,O))break e;O++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d);if(Ai(t,n,l,a),l=ui.current,l&hf)l=l&Ic|hf,n.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hE(t,a,n);else if(t.tag===19)hE(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=Ic}switch(ge(ui,l,n),d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Tm(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),yv(n,!1,d,a,f);break;case"backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Tm(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}yv(n,!0,a,null,f);break;case"together":yv(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ea(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),yn=-1,po|=n.lanes,!(a&n.childLanes))if(t!==null){if(il(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){for(t=n.child,a=Ts(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Ts(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function vv(t,n){return t.lanes&n?!0:(t=t.dependencies,!!(t!==null&&On(t)))}function QM(t,n,a){switch(n.tag){case 3:Oe(n,n.stateNode.containerInfo),Xn(n,oi,t.memoizedState.cache),el();break;case 27:case 5:Ee(n);break;case 4:Oe(n,n.stateNode.containerInfo);break;case 10:Xn(n,n.type,n.memoizedProps.value);break;case 12:a&n.childLanes&&(n.flags|=4),n.flags|=2048;var l=n.stateNode;l.effectDuration=-0,l.passiveEffectDuration=-0;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(Ka(n),n.flags|=128,null):a&n.child.childLanes?dE(t,n,a):(Ka(n),t=ea(t,n,a),t!==null?t.sibling:null);Ka(n);break;case 19:var d=(t.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(il(t,n,a,!1),l=(a&n.childLanes)!==0),d){if(l)return pE(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ge(ui,ui.current,n),l)break;return null;case 22:case 23:return n.lanes=0,aE(t,n,a);case 24:Xn(n,oi,t.memoizedState.cache)}return ea(t,n,a)}function bv(t,n,a){if(n._debugNeedsRemount&&t!==null){a=Xd(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),a._debugStack=n._debugStack,a._debugTask=n._debugTask;var l=n.return;if(l===null)throw Error("Cannot swap the root fiber.");if(t.alternate=null,n.alternate=null,a.index=n.index,a.sibling=n.sibling,a.return=n.return,a.ref=n.ref,a._debugInfo=n._debugInfo,n===l.child)l.child=a;else{var d=l.child;if(d===null)throw Error("Expected parent to have a child.");for(;d.sibling!==n;)if(d=d.sibling,d===null)throw Error("Expected to find the previous sibling.");d.sibling=a}return n=l.deletions,n===null?(l.deletions=[t],l.flags|=16):n.push(t),a.flags|=2,a}if(t!==null)if(t.memoizedProps!==n.pendingProps||n.type!==t.type)yi=!0;else{if(!vv(t,a)&&!(n.flags&128))return yi=!1,QM(t,n,a);yi=!!(t.flags&131072)}else yi=!1,(l=rt)&&(Ss(),l=(n.flags&1048576)!==0),l&&(l=n.index,Ss(),nm(n,eg,l));switch(n.lanes=0,n.tag){case 16:e:if(l=n.pendingProps,t=ho(n.elementType),n.type=t,typeof t=="function")Ha(t)?(l=yl(t,l),n.tag=1,n.type=t=tr(t),n=uE(null,n,t,l,a)):(n.tag=0,hv(n,t),n.type=t=tr(t),n=dv(null,n,t,l,a));else{if(t!=null){if(d=t.$$typeof,d===zh){n.tag=11,n.type=t=Vu(t),n=nE(null,n,t,l,a);break e}else if(d===zm){n.tag=14,n=sE(null,n,t,l,a);break e}}throw n="",t!==null&&typeof t=="object"&&t.$$typeof===Pn&&(n=" Did you wrap a component in React.lazy() more than once?"),t=J(t)||t,Error("Element type is invalid. Received a promise that resolves to: "+t+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return dv(t,n,n.type,n.pendingProps,a);case 1:return l=n.type,d=yl(l,n.pendingProps),uE(t,n,l,d,a);case 3:e:{if(Oe(n,n.stateNode.containerInfo),t===null)throw Error("Should have a current fiber. This is a bug in React.");l=n.pendingProps;var f=n.memoizedState;d=f.element,lh(t,n),hl(n,l,null,a);var T=n.memoizedState;if(l=T.cache,Xn(n,oi,l),l!==f.cache&&Jd(n,[oi],a,!0),dl(),l=T.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:T.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=cE(t,n,l,a);break e}else if(l!==d){d=Ei(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),tl(d),n=cE(t,n,l,a);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(qt=Kn(t.firstChild),Zi=n,rt=!0,Sl=null,da=!1,ns=null,_r=!0,t=Ew(n,null,l,a),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(el(),l===d){n=ea(t,n,a);break e}Ai(t,n,l,a)}n=n.child}return n;case 26:return xm(t,n),t===null?(t=LC(n.type,null,n.pendingProps,null))?n.memoizedState=t:rt||(t=n.type,a=n.pendingProps,l=pe(so.current),l=Mm(l).createElement(t),l[Hi]=n,l[gn]=a,wi(l,t,a),G(l),n.stateNode=l):n.memoizedState=LC(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ee(n),t===null&&rt&&(l=pe(so.current),d=he(),l=n.stateNode=RC(n.type,n.pendingProps,l,d,!1),da||(d=SC(l,n.type,n.pendingProps,d),d!==null&&(nr(n,0).serverProps=d)),Zi=n,_r=!0,d=qt,to(n.type)?(S_=d,qt=Kn(l.firstChild)):qt=d),Ai(t,n,n.pendingProps.children,a),xm(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&rt&&(f=he(),l=Ba(n.type,f.ancestorInfo),d=qt,(T=!d)||(T=L5(d,n.type,n.pendingProps,_r),T!==null?(n.stateNode=T,da||(f=SC(T,n.type,n.pendingProps,f),f!==null&&(nr(n,0).serverProps=f)),Zi=n,qt=Kn(T.firstChild),_r=!1,f=!0):f=!1,T=!f),T&&(l&&Qd(n,d),Xr(n))),Ee(n),d=n.type,f=n.pendingProps,T=t!==null?t.memoizedProps:null,l=f.children,$v(d,f)?l=null:T!==null&&$v(d,T)&&(n.flags|=32),n.memoizedState!==null&&(d=fh(t,n,ar,null,null,a),wf._currentValue=d),xm(t,n),Ai(t,n,l,a),n.child;case 6:return t===null&&rt&&(t=n.pendingProps,a=he(),l=a.ancestorInfo.current,t=l!=null?vs(t,l.tag,a.ancestorInfo.implicitRootScope):!0,a=qt,(l=!a)||(l=I5(a,n.pendingProps,_r),l!==null?(n.stateNode=l,Zi=n,qt=null,l=!0):l=!1,l=!l),l&&(t&&Qd(n,a),Xr(n))),null;case 13:return dE(t,n,a);case 4:return Oe(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=Lc(n,null,l,a):Ai(t,n,l,a),n.child;case 11:return nE(t,n,n.type,n.pendingProps,a);case 7:return Ai(t,n,n.pendingProps,a),n.child;case 8:return Ai(t,n,n.pendingProps.children,a),n.child;case 12:return n.flags|=4,n.flags|=2048,l=n.stateNode,l.effectDuration=-0,l.passiveEffectDuration=-0,Ai(t,n,n.pendingProps.children,a),n.child;case 10:return l=n.type,d=n.pendingProps,f=d.value,"value"in d||jw||(jw=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Xn(n,l,f),Ai(t,n,d.children,a),n.child;case 9:return d=n.type._context,l=n.pendingProps.children,typeof l!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),sr(n),d=Dt(d),si(n),l=Gb(l,d,void 0),cn(),n.flags|=1,Ai(t,n,l,a),n.child;case 14:return sE(t,n,n.type,n.pendingProps,a);case 15:return rE(t,n,n.type,n.pendingProps,a);case 19:return pE(t,n,a);case 31:return l=n.pendingProps,a=n.mode,l={mode:l.mode,children:l.children},t===null?(t=Em(l,a),t.ref=n.ref,n.child=t,t.return=n,n=t):(t=Ts(t.child,l),t.ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return aE(t,n,a);case 24:return sr(n),l=Dt(oi),t===null?(d=ih(),d===null&&(d=Ct,f=eh(),d.pooledCache=f,Wr(f),f!==null&&(d.pooledCacheLanes|=a),d=f),n.memoizedState={parent:l,cache:d},ul(n),Xn(n,oi,d)):(t.lanes&a&&(lh(t,n),hl(n,null,null,a),dl()),d=t.memoizedState,f=n.memoizedState,d.parent!==l?(d={parent:l,cache:l},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Xn(n,oi,l)):(l=f.cache,Xn(n,oi,l),l!==d.cache&&Jd(n,[oi],a,!0))),Ai(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ta(t){t.flags|=4}function mE(t,n){if(n.type!=="stylesheet"||(n.state.loading&ls)!==Ul)t.flags&=-16777217;else if(t.flags|=16777216,!BC(n)){if(n=os.current,n!==null&&((Je&4194048)===Je?Sr!==null:(Je&62914560)!==Je&&!(Je&536870912)||n!==Sr))throw lf=Fb,ZA;t.flags|=8192}}function Cm(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Nr():536870912,t.lanes|=n,Rl|=n)}function wh(t,n){if(!rt)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function It(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(n)if((t.mode&ki)!==kt){for(var d=t.selfBaseDuration,f=t.child;f!==null;)a|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,d+=f.treeBaseDuration,f=f.sibling;t.treeBaseDuration=d}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else if((t.mode&ki)!==kt){d=t.actualDuration,f=t.selfBaseDuration;for(var T=t.child;T!==null;)a|=T.lanes|T.childLanes,l|=T.subtreeFlags,l|=T.flags,d+=T.actualDuration,f+=T.treeBaseDuration,T=T.sibling;t.actualDuration=d,t.treeBaseDuration=f}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=a,n}function KM(t,n,a){var l=n.pendingProps;switch(Wd(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(n),null;case 1:return It(n),null;case 3:return a=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),jt(oi,n),nt(n),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(ja(n)?(Zd(),ta(n)):t===null||t.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Kd())),It(n),null;case 26:return a=n.memoizedState,t===null?(ta(n),a!==null?(It(n),mE(n,a)):(It(n),n.flags&=-16777217)):a?a!==t.memoizedState?(ta(n),It(n),mE(n,a)):(It(n),n.flags&=-16777217):(t.memoizedProps!==l&&ta(n),It(n),n.flags&=-16777217),null;case 27:Me(n),a=pe(so.current);var d=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==l&&ta(n);else{if(!l){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return It(n),null}t=he(),ja(n)?sm(n):(t=RC(d,l,a,t,!0),n.stateNode=t,ta(n))}return It(n),null;case 5:if(Me(n),a=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&ta(n);else{if(!l){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return It(n),null}if(d=he(),ja(n))sm(n);else{switch(t=pe(so.current),Ba(a,d.ancestorInfo),d=d.context,t=Mm(t),d){case $c:t=t.createElementNS(pc,a);break;case wg:t=t.createElementNS(Xm,a);break;default:switch(a){case"svg":t=t.createElementNS(pc,a);break;case"math":t=t.createElementNS(Xm,a);break;case"script":t=t.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?t.createElement("select",{is:l.is}):t.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?t.createElement(a,{is:l.is}):t.createElement(a),a.indexOf("-")===-1&&(a!==a.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",a),Object.prototype.toString.call(t)!=="[object HTMLUnknownElement]"||aa.call(oD,a)||(oD[a]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",a)))}}t[Hi]=n,t[gn]=l;e:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=t;e:switch(wi(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&ta(n)}}return It(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&ta(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(t=pe(so.current),a=he(),ja(n)){t=n.stateNode,a=n.memoizedProps,d=!da,l=null;var f=Zi;if(f!==null)switch(f.tag){case 3:d&&(d=DC(t,a,l),d!==null&&(nr(n,0).serverProps=d));break;case 27:case 5:l=f.memoizedProps,d&&(d=DC(t,a,l),d!==null&&(nr(n,0).serverProps=d))}t[Hi]=n,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||yC(t.nodeValue,a)),t||Xr(n)}else d=a.ancestorInfo.current,d!=null&&vs(l,d.tag,a.ancestorInfo.implicitRootScope),t=Mm(t).createTextNode(l),t[Hi]=n,n.stateNode=t}return It(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=ja(n),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");d[Hi]=n,It(n),(n.mode&ki)!==kt&&l!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else Zd(),el(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4,It(n),(n.mode&ki)!==kt&&l!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=Kd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(Jr(n),n):(Jr(n),null)}return Jr(n),n.flags&128?(n.lanes=a,(n.mode&ki)!==kt&&Es(n),n):(a=l!==null,t=t!==null&&t.memoizedState!==null,a&&(l=n.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Cm(n,n.updateQueue),It(n),(n.mode&ki)!==kt&&a&&(t=n.child,t!==null&&(n.treeBaseDuration-=t.treeBaseDuration)),null);case 4:return nt(n),t===null&&Bv(n.stateNode.containerInfo),It(n),null;case 10:return jt(n.type,n),It(n),null;case 19:if(de(ui,n),d=n.memoizedState,d===null)return It(n),null;if(l=(n.flags&128)!==0,f=d.rendering,f===null)if(l)wh(d,!1);else{if($t!==ma||t!==null&&t.flags&128)for(t=n.child;t!==null;){if(f=Tm(t),f!==null){for(n.flags|=128,wh(d,!1),t=f.updateQueue,n.updateQueue=t,Cm(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)$u(a,t),a=a.sibling;return ge(ui,ui.current&Ic|hf,n),n.child}t=t.sibling}d.tail!==null&&mr()>mg&&(n.flags|=128,l=!0,wh(d,!1),n.lanes=4194304)}else{if(!l)if(t=Tm(f),t!==null){if(n.flags|=128,l=!0,t=t.updateQueue,n.updateQueue=t,Cm(n,t),wh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!f.alternate&&!rt)return It(n),null}else 2*mr()-d.renderingStartTime>mg&&a!==536870912&&(n.flags|=128,l=!0,wh(d,!1),n.lanes=4194304);d.isBackwards?(f.sibling=n.child,n.child=f):(t=d.last,t!==null?t.sibling=f:n.child=f,d.last=f)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=mr(),t.sibling=null,a=ui.current,a=l?a&Ic|hf:a&Ic,ge(ui,a,n),t):(It(n),null);case 22:case 23:return Jr(n),dh(n),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?a&536870912&&!(n.flags&128)&&(It(n),n.subtreeFlags&6&&(n.flags|=8192)):It(n),a=n.updateQueue,a!==null&&Cm(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),t!==null&&de(Cl,n),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),jt(oi,n),It(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ZM(t,n){switch(Wd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&ki)!==kt&&Es(n),n):null;case 3:return jt(oi,n),nt(n),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Me(n),null;case 13:if(Jr(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");el()}return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&ki)!==kt&&Es(n),n):null;case 19:return de(ui,n),null;case 4:return nt(n),null;case 10:return jt(n.type,n),null;case 22:case 23:return Jr(n),dh(n),t!==null&&de(Cl,n),t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&ki)!==kt&&Es(n),n):null;case 24:return jt(oi,n),null;case 25:return null;default:return null}}function gE(t,n){switch(Wd(n),n.tag){case 3:jt(oi,n),nt(n);break;case 26:case 27:case 5:Me(n);break;case 4:nt(n);break;case 13:Jr(n);break;case 19:de(ui,n);break;case 10:jt(n.type,n);break;case 22:case 23:Jr(n),dh(n),t!==null&&de(Cl,n);break;case 24:jt(oi,n)}}function ur(t){return(t.mode&ki)!==kt}function yE(t,n){ur(t)?(lt(),Dh(n,t),Bi()):Dh(n,t)}function _v(t,n,a){ur(t)?(lt(),ec(a,t,n),Bi()):ec(a,t,n)}function Dh(t,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var d=l.next;a=d;do{if((a.tag&t)===t&&((t&li)!==ss?Se!==null&&typeof Se.markComponentPassiveEffectMountStarted=="function"&&Se.markComponentPassiveEffectMountStarted(n):(t&Oi)!==ss&&Se!==null&&typeof Se.markComponentLayoutEffectMountStarted=="function"&&Se.markComponentLayoutEffectMountStarted(n),l=void 0,(t&Ji)!==ss&&(Vc=!0),l=ke(n,yI,a),(t&Ji)!==ss&&(Vc=!1),(t&li)!==ss?Se!==null&&typeof Se.markComponentPassiveEffectMountStopped=="function"&&Se.markComponentPassiveEffectMountStopped():(t&Oi)!==ss&&Se!==null&&typeof Se.markComponentLayoutEffectMountStopped=="function"&&Se.markComponentLayoutEffectMountStopped(),l!==void 0&&typeof l!="function")){var f=void 0;f=a.tag&Oi?"useLayoutEffect":a.tag&Ji?"useInsertionEffect":"useEffect";var T=void 0;T=l===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof l.then=="function"?`
|
||
|
||
It looks like you wrote `+f+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
||
|
||
`+f+`(() => {
|
||
async function fetchData() {
|
||
// You can await here
|
||
const response = await MyAPI.getData(someId);
|
||
// ...
|
||
}
|
||
fetchData();
|
||
}, [someId]); // Or [] if effect doesn't need props or state
|
||
|
||
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+l,ke(n,function(C,O){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,O)},f,T)}a=a.next}while(a!==d)}}catch(C){_t(n,n.return,C)}}function ec(t,n,a){try{var l=n.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var f=d.next;l=f;do{if((l.tag&t)===t){var T=l.inst,C=T.destroy;C!==void 0&&(T.destroy=void 0,(t&li)!==ss?Se!==null&&typeof Se.markComponentPassiveEffectUnmountStarted=="function"&&Se.markComponentPassiveEffectUnmountStarted(n):(t&Oi)!==ss&&Se!==null&&typeof Se.markComponentLayoutEffectUnmountStarted=="function"&&Se.markComponentLayoutEffectUnmountStarted(n),(t&Ji)!==ss&&(Vc=!0),d=n,ke(d,vI,d,a,C),(t&Ji)!==ss&&(Vc=!1),(t&li)!==ss?Se!==null&&typeof Se.markComponentPassiveEffectUnmountStopped=="function"&&Se.markComponentPassiveEffectUnmountStopped():(t&Oi)!==ss&&Se!==null&&typeof Se.markComponentLayoutEffectUnmountStopped=="function"&&Se.markComponentLayoutEffectUnmountStopped())}l=l.next}while(l!==f)}}catch(O){_t(n,n.return,O)}}function vE(t,n){ur(t)?(lt(),Dh(n,t),Bi()):Dh(n,t)}function Tv(t,n,a){ur(t)?(lt(),ec(a,t,n),Bi()):ec(a,t,n)}function bE(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;t.type.defaultProps||"ref"in t.memoizedProps||Pc||(a.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ee(t)||"instance"),a.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ee(t)||"instance"));try{ke(t,om,n,a)}catch(l){_t(t,t.return,l)}}}function JM(t,n,a){return t.getSnapshotBeforeUpdate(n,a)}function e5(t,n){var a=n.memoizedProps,l=n.memoizedState;n=t.stateNode,t.type.defaultProps||"ref"in t.memoizedProps||Pc||(n.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ee(t)||"instance"),n.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ee(t)||"instance"));try{var d=yl(t.type,a,t.elementType===t.type),f=ke(t,JM,n,d,l);a=Vw,f!==void 0||a.has(t.type)||(a.add(t.type),ke(t,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ee(t))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(T){_t(t,t.return,T)}}function _E(t,n,a){a.props=yl(t.type,t.memoizedProps),a.state=t.memoizedState,ur(t)?(lt(),ke(t,gw,t,n,a),Bi()):ke(t,gw,t,n,a)}function t5(t){var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}if(typeof n=="function")if(ur(t))try{lt(),t.refCleanup=n(a)}finally{Bi()}else t.refCleanup=n(a);else typeof n=="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ee(t)),n.current=a}}function kh(t,n){try{ke(t,t5,t)}catch(a){_t(t,n,a)}}function cr(t,n){var a=t.ref,l=t.refCleanup;if(a!==null)if(typeof l=="function")try{if(ur(t))try{lt(),ke(t,l)}finally{Bi(t)}else ke(t,l)}catch(d){_t(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{if(ur(t))try{lt(),ke(t,a,null)}finally{Bi(t)}else ke(t,a,null)}catch(d){_t(t,n,d)}else a.current=null}function TE(t,n,a,l){var d=t.memoizedProps,f=d.id,T=d.onCommit;d=d.onRender,n=n===null?"mount":"update",ng&&(n="nested-update"),typeof d=="function"&&d(f,n,t.actualDuration,t.treeBaseDuration,t.actualStartTime,a),typeof T=="function"&&T(t.memoizedProps.id,n,l,a)}function i5(t,n,a,l){var d=t.memoizedProps;t=d.id,d=d.onPostCommit,n=n===null?"mount":"update",ng&&(n="nested-update"),typeof d=="function"&&d(t,n,l,a)}function SE(t){var n=t.type,a=t.memoizedProps,l=t.stateNode;try{ke(t,E5,l,n,a,t)}catch(d){_t(t,t.return,d)}}function Sv(t,n,a){try{ke(t,C5,t.stateNode,t.type,a,n,t)}catch(l){_t(t,t.return,l)}}function xE(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&to(t.type)||t.tag===4}function xv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&to(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ev(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Rm));else if(l!==4&&(l===27&&to(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(Ev(t,n,a),t=t.sibling;t!==null;)Ev(t,n,a),t=t.sibling}function Am(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(l!==4&&(l===27&&to(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Am(t,n,a),t=t.sibling;t!==null;)Am(t,n,a),t=t.sibling}function n5(t){for(var n,a=t.return;a!==null;){if(xE(a)){n=a;break}a=a.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,a=xv(t),Am(t,a,n);break;case 5:a=n.stateNode,n.flags&32&&(CC(a),n.flags&=-33),n=xv(t),Am(t,n,a);break;case 3:case 4:n=n.stateNode.containerInfo,a=xv(t),Ev(t,a,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function EE(t){var n=t.stateNode,a=t.memoizedProps;try{ke(t,B5,t.type,a,n,t)}catch(l){_t(t,t.return,l)}}function s5(t,n){if(t=t.containerInfo,b_=Rg,t=Zo(t),zu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var d=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var T=0,C=-1,O=-1,L=0,K=0,se=t,Q=null;t:for(;;){for(var re;se!==a||d!==0&&se.nodeType!==3||(C=T+d),se!==f||l!==0&&se.nodeType!==3||(O=T+l),se.nodeType===3&&(T+=se.nodeValue.length),(re=se.firstChild)!==null;)Q=se,se=re;for(;;){if(se===t)break t;if(Q===a&&++L===d&&(C=T),Q===f&&++K===l&&(O=T),(re=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=re}a=C===-1||O===-1?null:{start:C,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(__={focusedElem:t,selectionRange:a},Rg=!1,vi=n;vi!==null;)if(n=vi,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,vi=t;else for(;vi!==null;){switch(t=n=vi,a=t.alternate,d=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:d&1024&&a!==null&&e5(t,a);break;case 3:if(d&1024){if(t=t.stateNode.containerInfo,a=t.nodeType,a===9)Gv(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Gv(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(d&1024)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(t=n.sibling,t!==null){t.return=n.return,vi=t;break}vi=n.return}}function CE(t,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:na(t,a),l&4&&yE(a,Oi|rs);break;case 1:if(na(t,a),l&4)if(t=a.stateNode,n===null)a.type.defaultProps||"ref"in a.memoizedProps||Pc||(t.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ee(a)||"instance"),t.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ee(a)||"instance")),ur(a)?(lt(),ke(a,Xb,a,t),Bi()):ke(a,Xb,a,t);else{var d=yl(a.type,n.memoizedProps);n=n.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||Pc||(t.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ee(a)||"instance"),t.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ee(a)||"instance")),ur(a)?(lt(),ke(a,fw,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate),Bi()):ke(a,fw,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate)}l&64&&bE(a),l&512&&kh(a,a.return);break;case 3:if(n=xs(),na(t,a),l&64&&(l=a.updateQueue,l!==null)){if(d=null,a.child!==null)switch(a.child.tag){case 27:case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}try{ke(a,om,l,d)}catch(T){_t(a,a.return,T)}}t.effectDuration+=rl(n);break;case 27:n===null&&l&4&&EE(a);case 26:case 5:na(t,a),n===null&&l&4&&SE(a),l&512&&kh(a,a.return);break;case 12:if(l&4){l=xs(),na(t,a),t=a.stateNode,t.effectDuration+=al(l);try{ke(a,TE,a,n,ig,t.effectDuration)}catch(T){_t(a,a.return,T)}}else na(t,a);break;case 13:na(t,a),l&4&&DE(t,a),l&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=f5.bind(null,a),N5(t,a))));break;case 22:if(l=a.memoizedState!==null||pa,!l){n=n!==null&&n.memoizedState!==null||Kt,d=pa;var f=Kt;pa=l,(Kt=n)&&!f?sa(t,a,(a.subtreeFlags&8772)!==0):na(t,a),pa=d,Kt=f}break;case 30:break;default:na(t,a)}}function AE(t){var n=t.alternate;n!==null&&(t.alternate=null,AE(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Xs(n)),t.stateNode=null,t._debugOwner=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ia(t,n,a){for(a=a.child;a!==null;)wE(t,n,a),a=a.sibling}function wE(t,n,a){if(Fi&&typeof Fi.onCommitFiberUnmount=="function")try{Fi.onCommitFiberUnmount(hc,a)}catch(f){gr||(gr=!0,console.error("React instrumentation encountered an error: %s",f))}switch(a.tag){case 26:Kt||cr(a,n),ia(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Kt||cr(a,n);var l=ni,d=vn;to(a.type)&&(ni=a.stateNode,vn=!1),ia(t,n,a),ke(a,Ph,a.stateNode),ni=l,vn=d;break;case 5:Kt||cr(a,n);case 6:if(l=ni,d=vn,ni=null,ia(t,n,a),ni=l,vn=d,ni!==null)if(vn)try{ke(a,D5,ni,a.stateNode)}catch(f){_t(a,n,f)}else try{ke(a,w5,ni,a.stateNode)}catch(f){_t(a,n,f)}break;case 18:ni!==null&&(vn?(t=ni,AC(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Hh(t)):AC(ni,a.stateNode));break;case 4:l=ni,d=vn,ni=a.stateNode.containerInfo,vn=!0,ia(t,n,a),ni=l,vn=d;break;case 0:case 11:case 14:case 15:Kt||ec(Ji,a,n),Kt||_v(a,n,Oi),ia(t,n,a);break;case 1:Kt||(cr(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&_E(a,n,l)),ia(t,n,a);break;case 21:ia(t,n,a);break;case 22:Kt=(l=Kt)||a.memoizedState!==null,ia(t,n,a),Kt=l;break;default:ia(t,n,a)}}function DE(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ke(n,U5,t)}catch(a){_t(n,n.return,a)}}function r5(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new qw),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new qw),n;default:throw Error("Unexpected Suspense handler tag ("+t.tag+"). This is a bug in React.")}}function Cv(t,n){var a=r5(t);n.forEach(function(l){var d=p5.bind(null,t,l);if(!a.has(l)){if(a.add(l),Cs)if(Uc!==null&&Bc!==null)Lh(Bc,Uc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");l.then(d,d)}})}function Ln(t,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var d=t,f=n,T=a[l],C=f;e:for(;C!==null;){switch(C.tag){case 27:if(to(C.type)){ni=C.stateNode,vn=!1;break e}break;case 5:ni=C.stateNode,vn=!1;break e;case 3:case 4:ni=C.stateNode.containerInfo,vn=!0;break e}C=C.return}if(ni===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");wE(d,f,T),ni=null,vn=!1,d=T,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)kE(n,t),n=n.sibling}function kE(t,n){var a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ln(n,t),In(t),l&4&&(ec(Ji|rs,t,t.return),Dh(Ji|rs,t),_v(t,t.return,Oi|rs));break;case 1:Ln(n,t),In(t),l&512&&(Kt||a===null||cr(a,a.return)),l&64&&pa&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var d=ks;if(Ln(n,t),In(t),l&512&&(Kt||a===null||cr(a,a.return)),l&4)if(n=a!==null?a.memoizedState:null,l=t.memoizedState,a===null)if(l===null)if(t.stateNode===null){e:{l=t.type,a=t.memoizedProps,n=d.ownerDocument||d;t:switch(l){case"title":d=n.getElementsByTagName("title")[0],(!d||d[Vh]||d[Hi]||d.namespaceURI===pc||d.hasAttribute("itemprop"))&&(d=n.createElement(l),n.head.insertBefore(d,n.querySelector("head > title"))),wi(d,l,a),d[Hi]=t,G(d),l=d;break e;case"link":var f=PC("link","href",n).get(l+(a.href||""));if(f){for(var T=0;T<f.length;T++)if(d=f[T],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(T,1);break t}}d=n.createElement(l),wi(d,l,a),n.head.appendChild(d);break;case"meta":if(f=PC("meta","content",n).get(l+(a.content||""))){for(T=0;T<f.length;T++)if(d=f[T],Ae(a.content,"content"),d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(T,1);break t}}d=n.createElement(l),wi(d,l,a),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+l+'". This is a bug in React.')}d[Hi]=t,G(d),l=d}t.stateNode=l}else UC(d,t.type,t.stateNode);else t.stateNode=NC(d,l,t.memoizedProps);else n!==l?(n===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):n.count--,l===null?UC(d,t.type,t.stateNode):NC(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Sv(t,t.memoizedProps,a.memoizedProps);break;case 27:Ln(n,t),In(t),l&512&&(Kt||a===null||cr(a,a.return)),a!==null&&l&4&&Sv(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Ln(n,t),In(t),l&512&&(Kt||a===null||cr(a,a.return)),t.flags&32){n=t.stateNode;try{ke(t,CC,n)}catch(K){_t(t,t.return,K)}}l&4&&t.stateNode!=null&&(n=t.memoizedProps,Sv(t,n,a!==null?a.memoizedProps:n)),l&1024&&(e_=!0,t.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Ln(n,t),In(t),l&4){if(t.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");l=t.memoizedProps,a=a!==null?a.memoizedProps:l,n=t.stateNode;try{ke(t,A5,n,a,l)}catch(K){_t(t,t.return,K)}}break;case 3:if(d=xs(),Dg=null,f=ks,ks=Lm(n.containerInfo),Ln(n,t),ks=f,In(t),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ke(t,P5,n.containerInfo)}catch(K){_t(t,t.return,K)}e_&&(e_=!1,OE(t)),n.effectDuration+=rl(d);break;case 4:l=ks,ks=Lm(t.stateNode.containerInfo),Ln(n,t),In(t),ks=l;break;case 12:l=xs(),Ln(n,t),In(t),t.stateNode.effectDuration+=al(l);break;case 13:Ln(n,t),In(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(a_=mr()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Cv(t,l)));break;case 22:d=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,O=pa,L=Kt;if(pa=O||d,Kt=L||C,Ln(n,t),Kt=L,pa=O,In(t),l&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&~Zm:n._visibility|Zm,d&&(a===null||C||pa||Kt||vl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{f=C.stateNode,d?ke(C,k5,f):ke(C,R5,C.stateNode,C.memoizedProps)}catch(K){_t(C,C.return,K)}}}else if(n.tag===6){if(a===null){C=n;try{T=C.stateNode,d?ke(C,O5,T):ke(C,M5,T,C.memoizedProps)}catch(K){_t(C,C.return,K)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=t.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Cv(t,a))));break;case 19:Ln(n,t),In(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Cv(t,l)));break;case 30:break;case 21:break;default:Ln(n,t),In(t)}}function In(t){var n=t.flags;if(n&2){try{ke(t,n5,t)}catch(a){_t(t,t.return,a)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function OE(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;OE(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function na(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)CE(t,n.alternate,n),n=n.sibling}function RE(t){switch(t.tag){case 0:case 11:case 14:case 15:_v(t,t.return,Oi),vl(t);break;case 1:cr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&_E(t,t.return,n),vl(t);break;case 27:ke(t,Ph,t.stateNode);case 26:case 5:cr(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}}function vl(t){for(t=t.child;t!==null;)RE(t),t=t.sibling}function ME(t,n,a,l){var d=a.flags;switch(a.tag){case 0:case 11:case 15:sa(t,a,l),yE(a,Oi);break;case 1:if(sa(t,a,l),n=a.stateNode,typeof n.componentDidMount=="function"&&ke(a,Xb,a,n),n=a.updateQueue,n!==null){t=a.stateNode;try{ke(a,ev,n,t)}catch(f){_t(a,a.return,f)}}l&&d&64&&bE(a),kh(a,a.return);break;case 27:EE(a);case 26:case 5:sa(t,a,l),l&&n===null&&d&4&&SE(a),kh(a,a.return);break;case 12:if(l&&d&4){d=xs(),sa(t,a,l),l=a.stateNode,l.effectDuration+=al(d);try{ke(a,TE,a,n,ig,l.effectDuration)}catch(f){_t(a,a.return,f)}}else sa(t,a,l);break;case 13:sa(t,a,l),l&&d&4&&DE(t,a);break;case 22:a.memoizedState===null&&sa(t,a,l),kh(a,a.return);break;case 30:break;default:sa(t,a,l)}}function sa(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)ME(t,n.alternate,n,a),n=n.sibling}function Av(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&Wr(t),a!=null&&sl(a))}function wv(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(Wr(n),t!=null&&sl(t))}function dr(t,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)LE(t,n,a,l),n=n.sibling}function LE(t,n,a,l){var d=n.flags;switch(n.tag){case 0:case 11:case 15:dr(t,n,a,l),d&2048&&vE(n,li|rs);break;case 1:dr(t,n,a,l);break;case 3:var f=xs();dr(t,n,a,l),d&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(Wr(n),a!=null&&sl(a))),t.passiveEffectDuration+=rl(f);break;case 12:if(d&2048){d=xs(),dr(t,n,a,l),t=n.stateNode,t.passiveEffectDuration+=al(d);try{ke(n,i5,n,n.alternate,ig,t.passiveEffectDuration)}catch(C){_t(n,n.return,C)}}else dr(t,n,a,l);break;case 13:dr(t,n,a,l);break;case 23:break;case 22:f=n.stateNode;var T=n.alternate;n.memoizedState!==null?f._visibility&la?dr(t,n,a,l):Oh(t,n):f._visibility&la?dr(t,n,a,l):(f._visibility|=la,tc(t,n,a,l,(n.subtreeFlags&10256)!==0)),d&2048&&Av(T,n);break;case 24:dr(t,n,a,l),d&2048&&wv(n.alternate,n);break;default:dr(t,n,a,l)}}function tc(t,n,a,l,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)IE(t,n,a,l,d),n=n.sibling}function IE(t,n,a,l,d){var f=n.flags;switch(n.tag){case 0:case 11:case 15:tc(t,n,a,l,d),vE(n,li);break;case 23:break;case 22:var T=n.stateNode;n.memoizedState!==null?T._visibility&la?tc(t,n,a,l,d):Oh(t,n):(T._visibility|=la,tc(t,n,a,l,d)),d&&f&2048&&Av(n.alternate,n);break;case 24:tc(t,n,a,l,d),d&&f&2048&&wv(n.alternate,n);break;default:tc(t,n,a,l,d)}}function Oh(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,l=n,d=l.flags;switch(l.tag){case 22:Oh(a,l),d&2048&&Av(l.alternate,l);break;case 24:Oh(a,l),d&2048&&wv(l.alternate,l);break;default:Oh(a,l)}n=n.sibling}}function ic(t){if(t.subtreeFlags&ff)for(t=t.child;t!==null;)NE(t),t=t.sibling}function NE(t){switch(t.tag){case 26:ic(t),t.flags&ff&&t.memoizedState!==null&&j5(ks,t.memoizedState,t.memoizedProps);break;case 5:ic(t);break;case 3:case 4:var n=ks;ks=Lm(t.stateNode.containerInfo),ic(t),ks=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=ff,ff=16777216,ic(t),ff=n):ic(t));break;default:ic(t)}}function PE(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Rh(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];vi=l,FE(l,t)}PE(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)UE(t),t=t.sibling}function UE(t){switch(t.tag){case 0:case 11:case 15:Rh(t),t.flags&2048&&Tv(t,t.return,li|rs);break;case 3:var n=xs();Rh(t),t.stateNode.passiveEffectDuration+=rl(n);break;case 12:n=xs(),Rh(t),t.stateNode.passiveEffectDuration+=al(n);break;case 22:n=t.stateNode,t.memoizedState!==null&&n._visibility&la&&(t.return===null||t.return.tag!==13)?(n._visibility&=~la,wm(t)):Rh(t);break;default:Rh(t)}}function wm(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];vi=l,FE(l,t)}PE(t)}for(t=t.child;t!==null;)BE(t),t=t.sibling}function BE(t){switch(t.tag){case 0:case 11:case 15:Tv(t,t.return,li),wm(t);break;case 22:var n=t.stateNode;n._visibility&la&&(n._visibility&=~la,wm(t));break;default:wm(t)}}function FE(t,n){for(;vi!==null;){var a=vi,l=a;switch(l.tag){case 0:case 11:case 15:Tv(l,n,li);break;case 23:case 22:l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(l=l.memoizedState.cachePool.pool,l!=null&&Wr(l));break;case 24:sl(l.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,vi=l;else e:for(a=t;vi!==null;){l=vi;var d=l.sibling,f=l.return;if(AE(l),l===a){vi=null;break e}if(d!==null){d.return=f,vi=d;break e}vi=f}}}function a5(){_I.forEach(function(t){return t()})}function HE(){var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return t||ne.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),t}function Nn(t){if((ht&en)!==Bn&&Je!==0)return Je&-Je;var n=ne.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(t),t=El,t!==0?t:Pv()):Na()}function zE(){Hn===0&&(Hn=!(Je&536870912)||rt?Ce():536870912);var t=os.current;return t!==null&&(t.flags|=32),Hn}function Qt(t,n,a){if(Vc&&console.error("useInsertionEffect must not schedule updates."),d_&&(gg=!0),(t===Ct&&(gt===kl||gt===Ol)||t.cancelPendingCommit!==null)&&(sc(t,0),Ja(t,Je,Hn,!1)),$s(t,a),ht&en&&t===Ct){if(vr)switch(n.tag){case 0:case 11:case 15:t=Ze&&ee(Ze)||"Unknown",eD.has(t)||(eD.add(t),n=ee(n)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",n,t,t));break;case 1:Jw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Jw=!0)}}else Cs&&Ur(t,n,a),g5(n),t===Ct&&((ht&en)===Bn&&(mo|=a),$t===Dl&&Ja(t,Je,Hn,!1)),hr(t)}function jE(t,n,a){if((ht&(en|Os))!==Bn)throw Error("Should not already be working.");var l=!a&&(n&124)===0&&(n&t.expiredLanes)===0||_i(t,n),d=l?l5(t,n):Ov(t,n,!0),f=l;do{if(d===ma){zc&&!l&&Ja(t,n,0,!1);break}else{if(a=t.current.alternate,f&&!o5(a)){d=Ov(t,n,!1),f=!1;continue}if(d===Fc){if(f=n,t.errorRecoveryDisabledLanes&f)var T=0;else T=t.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){n=T;e:{d=t;var C=T;T=bf;var O=d.current.memoizedState.isDehydrated;if(O&&(sc(d,C).flags|=256),C=Ov(d,C,!1),C!==Fc){if(s_&&!O){d.errorRecoveryDisabledLanes|=f,mo|=f,d=Dl;break e}d=tn,tn=T,d!==null&&(tn===null?tn=d:tn.push.apply(tn,d))}d=C}if(f=!1,d!==Fc)continue}}if(d===mf){sc(t,0),Ja(t,n,0,!0);break}e:{switch(l=t,d){case ma:case mf:throw Error("Root did not complete. This is a bug in React.");case Dl:if((n&4194048)!==n)break;case fg:Ja(l,n,Hn,!fo);break e;case Fc:tn=null;break;case t_:case $w:break;default:throw Error("Unknown root exit status.")}if(ne.actQueue!==null)Rv(l,a,n,tn,_f,pg,Hn,mo,Rl);else{if((n&62914560)===n&&(f=a_+Xw-mr(),10<f)){if(Ja(l,n,Hn,!fo),ps(l,0,!0)!==0)break e;l.timeoutHandle=lD(VE.bind(null,l,a,tn,_f,pg,n,Hn,mo,Rl,fo,d,EI,WA,0),f);break e}VE(l,a,tn,_f,pg,n,Hn,mo,Rl,fo,d,SI,WA,0)}}}break}while(1);hr(t)}function VE(t,n,a,l,d,f,T,C,O,L,K,se,Q,re){if(t.timeoutHandle=Pl,se=n.subtreeFlags,(se&8192||(se&16785408)===16785408)&&(Af={stylesheets:null,count:0,unsuspend:z5},NE(n),se=V5(),se!==null)){t.cancelPendingCommit=se(Rv.bind(null,t,n,f,a,l,d,T,C,O,K,xI,Q,re)),Ja(t,f,T,!L);return}Rv(t,n,f,a,l,d,T,C,O)}function o5(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var d=a[l],f=d.getSnapshot;d=d.value;try{if(!Ki(f(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ja(t,n,a,l){n&=~r_,n&=~mo,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var d=n;0<d;){var f=31-Wi(d),T=1<<f;l[f]=-1,d&=~T}a!==0&&Pr(t,a,n)}function nc(){return(ht&(en|Os))===Bn?(Ih(0,!1),!1):!0}function Dv(){if(Ze!==null){if(gt===bn)var t=Ze.return;else t=Ze,Wt(),yh(t),Mc=null,df=0,t=Ze;for(;t!==null;)gE(t.alternate,t),t=t.return;Ze=null}}function sc(t,n){var a=t.timeoutHandle;a!==Pl&&(t.timeoutHandle=Pl,UI(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Dv(),Ct=t,Ze=a=Ts(t.current,null),Je=n,gt=bn,Fn=null,fo=!1,zc=_i(t,n),s_=!1,$t=ma,Rl=Hn=r_=mo=po=0,tn=bf=null,pg=!1,n&8&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var d=31-Wi(l),f=1<<d;n|=t[d],l&=~f}return xr=n,Fa(),n=XA(),1e3<n-GA&&(ne.recentlyCreatedOwnerStacks=0,GA=n),ws.discardPendingWarnings(),a}function qE(t,n){Fe=null,ne.H=dg,ne.getCurrentStack=null,vr=!1,Un=null,n===of||n===ag?(n=Qu(),gt=yf):n===ZA?(n=Qu(),gt=Gw):gt=n===Pw?n_:n!==null&&typeof n=="object"&&typeof n.then=="function"?Hc:gf,Fn=n;var a=Ze;if(a===null)$t=mf,Sm(t,Ei(n,t.current));else switch(a.mode&ki&&Yu(a),cn(),gt){case gf:Se!==null&&typeof Se.markComponentErrored=="function"&&Se.markComponentErrored(a,n,Je);break;case kl:case Ol:case yf:case Hc:case vf:Se!==null&&typeof Se.markComponentSuspended=="function"&&Se.markComponentSuspended(a,n,Je)}}function $E(){var t=ne.H;return ne.H=dg,t===null?dg:t}function GE(){var t=ne.A;return ne.A=bI,t}function kv(){$t=Dl,fo||(Je&4194048)!==Je&&os.current!==null||(zc=!0),!(po&134217727)&&!(mo&134217727)||Ct===null||Ja(Ct,Je,Hn,!1)}function Ov(t,n,a){var l=ht;ht|=en;var d=$E(),f=GE();if(Ct!==t||Je!==n){if(Cs){var T=t.memoizedUpdaters;0<T.size&&(Lh(t,Je),T.clear()),Ia(t,n)}_f=null,sc(t,n)}Ir(n),n=!1,T=$t;e:do try{if(gt!==bn&&Ze!==null){var C=Ze,O=Fn;switch(gt){case n_:Dv(),T=fg;break e;case yf:case kl:case Ol:case Hc:os.current===null&&(n=!0);var L=gt;if(gt=bn,Fn=null,rc(t,C,O,L),a&&zc){T=ma;break e}break;default:L=gt,gt=bn,Fn=null,rc(t,C,O,L)}}XE(),T=$t;break}catch(K){qE(t,K)}while(1);return n&&t.shellSuspendCounter++,Wt(),ht=l,ne.H=d,ne.A=f,Ra(),Ze===null&&(Ct=null,Je=0,Fa()),T}function XE(){for(;Ze!==null;)YE(Ze)}function l5(t,n){var a=ht;ht|=en;var l=$E(),d=GE();if(Ct!==t||Je!==n){if(Cs){var f=t.memoizedUpdaters;0<f.size&&(Lh(t,Je),f.clear()),Ia(t,n)}_f=null,mg=mr()+Yw,sc(t,n)}else zc=_i(t,n);Ir(n);e:do try{if(gt!==bn&&Ze!==null)t:switch(n=Ze,f=Fn,gt){case gf:gt=bn,Fn=null,rc(t,n,f,gf);break;case kl:case Ol:if(rh(f)){gt=bn,Fn=null,WE(n);break}n=function(){gt!==kl&>!==Ol||Ct!==t||(gt=vf),hr(t)},f.then(n,n);break e;case yf:gt=vf;break e;case Gw:gt=i_;break e;case vf:rh(f)?(gt=bn,Fn=null,WE(n)):(gt=bn,Fn=null,rc(t,n,f,vf));break;case i_:var T=null;switch(Ze.tag){case 26:T=Ze.memoizedState;case 5:case 27:var C=Ze;if(!T||BC(T)){gt=bn,Fn=null;var O=C.sibling;if(O!==null)Ze=O;else{var L=C.return;L!==null?(Ze=L,Dm(L)):Ze=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}gt=bn,Fn=null,rc(t,n,f,i_);break;case Hc:gt=bn,Fn=null,rc(t,n,f,Hc);break;case n_:Dv(),$t=fg;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}ne.actQueue!==null?XE():u5();break}catch(K){qE(t,K)}while(1);return Wt(),ne.H=l,ne.A=d,ht=a,Ze!==null?(Se!==null&&typeof Se.markRenderYielded=="function"&&Se.markRenderYielded(),ma):(Ra(),Ct=null,Je=0,Fa(),$t)}function u5(){for(;Ze!==null&&!rL();)YE(Ze)}function YE(t){var n=t.alternate;(t.mode&ki)!==kt?(Qr(t),n=ke(t,bv,n,t,xr),Yu(t)):n=ke(t,bv,n,t,xr),t.memoizedProps=t.pendingProps,n===null?Dm(t):Ze=n}function WE(t){var n=ke(t,c5,t);t.memoizedProps=t.pendingProps,n===null?Dm(t):Ze=n}function c5(t){var n=t.alternate,a=(t.mode&ki)!==kt;switch(a&&Qr(t),t.tag){case 15:case 0:n=lE(n,t,t.pendingProps,t.type,void 0,Je);break;case 11:n=lE(n,t,t.pendingProps,t.type.render,t.ref,Je);break;case 5:yh(t);default:gE(n,t),t=Ze=$u(t,xr),n=bv(n,t,xr)}return a&&Yu(t),n}function rc(t,n,a,l){Wt(),yh(n),Mc=null,df=0;var d=n.return;try{if(WM(t,d,n,a,Je)){$t=mf,Sm(t,Ei(a,t.current)),Ze=null;return}}catch(f){if(d!==null)throw Ze=d,f;$t=mf,Sm(t,Ei(a,t.current)),Ze=null;return}n.flags&32768?(rt||l===gf?t=!0:zc||Je&536870912?t=!1:(fo=t=!0,(l===kl||l===Ol||l===yf||l===Hc)&&(l=os.current,l!==null&&l.tag===13&&(l.flags|=16384))),QE(n,t)):Dm(n)}function Dm(t){var n=t;do{if(n.flags&32768){QE(n,fo);return}var a=n.alternate;if(t=n.return,Qr(n),a=ke(n,KM,a,n,xr),(n.mode&ki)!==kt&&ol(n),a!==null){Ze=a;return}if(n=n.sibling,n!==null){Ze=n;return}Ze=n=t}while(n!==null);$t===ma&&($t=$w)}function QE(t,n){do{var a=ZM(t.alternate,t);if(a!==null){a.flags&=32767,Ze=a;return}if((t.mode&ki)!==kt){ol(t),a=t.actualDuration;for(var l=t.child;l!==null;)a+=l.actualDuration,l=l.sibling;t.actualDuration=a}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){Ze=t;return}Ze=t=a}while(t!==null);$t=fg,Ze=null}function Rv(t,n,a,l,d,f,T,C,O){t.cancelPendingCommit=null;do Mh();while(Ri!==Ml);if(ws.flushLegacyContextWarning(),ws.flushPendingUnsafeLifecycleWarnings(),(ht&(en|Os))!==Bn)throw Error("Should not already be working.");if(Se!==null&&typeof Se.markCommitStarted=="function"&&Se.markCommitStarted(a),n===null)Rt();else{if(a===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===t.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(f=n.lanes|n.childLanes,f|=Ib,Ma(t,a,f,T,C,O),t===Ct&&(Ze=Ct=null,Je=0),jc=n,yo=t,vo=a,l_=f,u_=d,Zw=l,n.subtreeFlags&10256||n.flags&10256?(t.callbackNode=null,t.callbackPriority=0,m5(dc,function(){return tC(),null})):(t.callbackNode=null,t.callbackPriority=0),ig=wc(),l=(n.flags&13878)!==0,n.subtreeFlags&13878||l){l=ne.T,ne.T=null,d=dt.p,dt.p=Zn,T=ht,ht|=Os;try{s5(t,n,a)}finally{ht=T,dt.p=d,ne.T=l}}Ri=Ww,KE(),ZE(),JE()}}function KE(){if(Ri===Ww){Ri=Ml;var t=yo,n=jc,a=vo,l=(n.flags&13878)!==0;if(n.subtreeFlags&13878||l){l=ne.T,ne.T=null;var d=dt.p;dt.p=Zn;var f=ht;ht|=Os;try{Uc=a,Bc=t,kE(n,t),Bc=Uc=null,a=__;var T=Zo(t.containerInfo),C=a.focusedElem,O=a.selectionRange;if(T!==C&&C&&C.ownerDocument&&Gn(C.ownerDocument.documentElement,C)){if(O!==null&&zu(C)){var L=O.start,K=O.end;if(K===void 0&&(K=L),"selectionStart"in C)C.selectionStart=L,C.selectionEnd=Math.min(K,C.value.length);else{var se=C.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var re=Q.getSelection(),we=C.textContent.length,Be=Math.min(O.start,we),At=O.end===void 0?Be:Math.min(O.end,we);!re.extend&&Be>At&&(T=At,At=Be,Be=T);var tt=fn(C,Be),B=fn(C,At);if(tt&&B&&(re.rangeCount!==1||re.anchorNode!==tt.node||re.anchorOffset!==tt.offset||re.focusNode!==B.node||re.focusOffset!==B.offset)){var F=se.createRange();F.setStart(tt.node,tt.offset),re.removeAllRanges(),Be>At?(re.addRange(F),re.extend(B.node,B.offset)):(F.setEnd(B.node,B.offset),re.addRange(F))}}}}for(se=[],re=C;re=re.parentNode;)re.nodeType===1&&se.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<se.length;C++){var V=se[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Rg=!!b_,__=b_=null}finally{ht=f,dt.p=d,ne.T=l}}t.current=n,Ri=Qw}}function ZE(){if(Ri===Qw){Ri=Ml;var t=yo,n=jc,a=vo,l=(n.flags&8772)!==0;if(n.subtreeFlags&8772||l){l=ne.T,ne.T=null;var d=dt.p;dt.p=Zn;var f=ht;ht|=Os;try{Se!==null&&typeof Se.markLayoutEffectsStarted=="function"&&Se.markLayoutEffectsStarted(a),Uc=a,Bc=t,CE(t,n.alternate,n),Bc=Uc=null,Se!==null&&typeof Se.markLayoutEffectsStopped=="function"&&Se.markLayoutEffectsStopped()}finally{ht=f,dt.p=d,ne.T=l}}Ri=Kw}}function JE(){if(Ri===CI||Ri===Kw){Ri=Ml,aL();var t=yo,n=jc,a=vo,l=Zw,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?Ri=o_:(Ri=Ml,jc=yo=null,eC(t,t.pendingLanes),Ll=0,Sf=null);var f=t.pendingLanes;if(f===0&&(go=null),d||rC(t),d=Br(a),n=n.stateNode,Fi&&typeof Fi.onCommitFiberRoot=="function")try{var T=(n.current.flags&128)===128;switch(d){case Zn:var C=hb;break;case yr:C=fb;break;case oa:C=dc;break;case $m:C=pb;break;default:C=dc}Fi.onCommitFiberRoot(hc,n,C,T)}catch(se){gr||(gr=!0,console.error("React instrumentation encountered an error: %s",se))}if(Cs&&t.memoizedUpdaters.clear(),a5(),l!==null){T=ne.T,C=dt.p,dt.p=Zn,ne.T=null;try{var O=t.onRecoverableError;for(n=0;n<l.length;n++){var L=l[n],K=d5(L.stack);ke(L.source,O,L.value,K)}}finally{ne.T=T,dt.p=C}}vo&3&&Mh(),hr(t),f=t.pendingLanes,a&4194090&&f&42?(sg=!0,t===c_?Tf++:(Tf=0,c_=t)):Tf=0,Ih(0,!1),Rt()}}function d5(t){return t={componentStack:t},Object.defineProperty(t,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),t}function eC(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,sl(n)))}function Mh(t){return KE(),ZE(),JE(),tC()}function tC(){if(Ri!==o_)return!1;var t=yo,n=l_;l_=0;var a=Br(vo),l=oa>a?oa:a;a=ne.T;var d=dt.p;try{dt.p=l,ne.T=null,l=u_,u_=null;var f=yo,T=vo;if(Ri=Ml,jc=yo=null,vo=0,(ht&(en|Os))!==Bn)throw Error("Cannot flush passive effects while already rendering.");d_=!0,gg=!1,Se!==null&&typeof Se.markPassiveEffectsStarted=="function"&&Se.markPassiveEffectsStarted(T);var C=ht;if(ht|=Os,UE(f.current),LE(f,f.current,T,l),Se!==null&&typeof Se.markPassiveEffectsStopped=="function"&&Se.markPassiveEffectsStopped(),rC(f),ht=C,Ih(0,!1),gg?f===Sf?Ll++:(Ll=0,Sf=f):Ll=0,gg=d_=!1,Fi&&typeof Fi.onPostCommitFiberRoot=="function")try{Fi.onPostCommitFiberRoot(hc,f)}catch(L){gr||(gr=!0,console.error("React instrumentation encountered an error: %s",L))}var O=f.current.stateNode;return O.effectDuration=0,O.passiveEffectDuration=0,!0}finally{dt.p=d,ne.T=a,eC(t,n)}}function iC(t,n,a){n=Ei(a,n),n=lv(t.stateNode,n,2),t=rr(t,n,2),t!==null&&($s(t,2),hr(t))}function _t(t,n,a){if(Vc=!1,t.tag===3)iC(t,t,a);else{for(;n!==null;){if(n.tag===3){iC(n,t,a);return}if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(go===null||!go.has(l))){t=Ei(a,t),a=uv(2),l=rr(n,a,2),l!==null&&(cv(a,l,n,t),$s(l,2),hr(l));return}}n=n.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
||
|
||
Error message:
|
||
|
||
%s`,a)}}function Mv(t,n,a){var l=t.pingCache;if(l===null){l=t.pingCache=new TI;var d=new Set;l.set(n,d)}else d=l.get(n),d===void 0&&(d=new Set,l.set(n,d));d.has(a)||(s_=!0,d.add(a),l=h5.bind(null,t,n,a),Cs&&Lh(t,a),n.then(l,l))}function h5(t,n,a){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,HE()&&ne.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
||
|
||
When testing, code that resolves suspended data should be wrapped into act(...):
|
||
|
||
act(() => {
|
||
/* finish loading suspended data */
|
||
});
|
||
/* assert on the output */
|
||
|
||
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Ct===t&&(Je&a)===a&&($t===Dl||$t===t_&&(Je&62914560)===Je&&mr()-a_<Xw?(ht&en)===Bn&&sc(t,0):r_|=a,Rl===Je&&(Rl=0)),hr(t)}function nC(t,n){n===0&&(n=Nr()),t=ri(t,n),t!==null&&($s(t,n),hr(t))}function f5(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),nC(t,a)}function p5(t,n){var a=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}l!==null&&l.delete(n),nC(t,a)}function Lv(t,n,a){if(n.subtreeFlags&67117056)for(n=n.child;n!==null;){var l=t,d=n,f=d.type===Hm;f=a||f,d.tag!==22?d.flags&67108864?f&&ke(d,sC,l,d,(d.mode&VA)===kt):Lv(l,d,f):d.memoizedState===null&&(f&&d.flags&8192?ke(d,sC,l,d):d.subtreeFlags&67108864&&ke(d,Lv,l,d,f)),n=n.sibling}}function sC(t,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;st(!0);try{RE(n),a&&BE(n),ME(t,n.alternate,n,!1),a&&IE(t,n,0,null,!1,0)}finally{st(!1)}}function rC(t){var n=!0;t.current.mode&(zi|As)||(n=!1),Lv(t,t.current,n)}function aC(t){if((ht&en)===Bn){var n=t.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=ee(t)||"ReactComponent",yg!==null){if(yg.has(n))return;yg.add(n)}else yg=new Set([n]);ke(t,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Lh(t,n){Cs&&t.memoizedUpdaters.forEach(function(a){Ur(t,a,n)})}function m5(t,n){var a=ne.actQueue;return a!==null?(a.push(n),DI):db(t,n)}function g5(t){HE()&&ne.actQueue===null&&ke(t,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
||
|
||
When testing, code that causes React state updates should be wrapped into act(...):
|
||
|
||
act(() => {
|
||
/* fire events that update state */
|
||
});
|
||
/* assert on the output */
|
||
|
||
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,ee(t))})}function hr(t){t!==qc&&t.next===null&&(qc===null?vg=qc=t:qc=qc.next=t),bg=!0,ne.actQueue!==null?f_||(f_=!0,cC()):h_||(h_=!0,cC())}function Ih(t,n){if(!p_&&bg){p_=!0;do for(var a=!1,l=vg;l!==null;){if(!n)if(t!==0){var d=l.pendingLanes;if(d===0)var f=0;else{var T=l.suspendedLanes,C=l.pingedLanes;f=(1<<31-Wi(42|t)+1)-1,f&=d&~(T&~C),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,uC(l,f))}else f=Je,f=ps(l,l===Ct?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Pl),!(f&3)||_i(l,f)||(a=!0,uC(l,f));l=l.next}while(a);p_=!1}}function y5(){Iv()}function Iv(){bg=f_=h_=!1;var t=0;Il!==0&&(S5()&&(t=Il),Il=0);for(var n=mr(),a=null,l=vg;l!==null;){var d=l.next,f=oC(l,n);f===0?(l.next=null,a===null?vg=d:a.next=d,d===null&&(qc=a)):(a=l,(t!==0||f&3)&&(bg=!0)),l=d}Ih(t,!1)}function oC(t,n){for(var a=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var T=31-Wi(f),C=1<<T,O=d[T];O===-1?(!(C&a)||C&l)&&(d[T]=Bo(C,n)):O<=n&&(t.expiredLanes|=C),f&=~C}if(n=Ct,a=Je,a=ps(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Pl),l=t.callbackNode,a===0||t===n&&(gt===kl||gt===Ol)||t.cancelPendingCommit!==null)return l!==null&&Nv(l),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||_i(t,a)){if(n=a&-a,n!==t.callbackPriority||ne.actQueue!==null&&l!==m_)Nv(l);else return n;switch(Br(a)){case Zn:case yr:a=fb;break;case oa:a=dc;break;case $m:a=pb;break;default:a=dc}return l=lC.bind(null,t),ne.actQueue!==null?(ne.actQueue.push(l),a=m_):a=db(a,l),t.callbackPriority=n,t.callbackNode=a,n}return l!==null&&Nv(l),t.callbackPriority=2,t.callbackNode=null,2}function lC(t,n){if(sg=ng=!1,Ri!==Ml&&Ri!==o_)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Mh()&&t.callbackNode!==a)return null;var l=Je;return l=ps(t,t===Ct?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Pl),l===0?null:(jE(t,l,n),oC(t,mr()),t.callbackNode!=null&&t.callbackNode===a?lC.bind(null,t):null)}function uC(t,n){if(Mh())return null;ng=sg,sg=!1,jE(t,n,!0)}function Nv(t){t!==m_&&t!==null&&sL(t)}function cC(){ne.actQueue!==null&&ne.actQueue.push(function(){return Iv(),null}),BI(function(){(ht&(en|Os))!==Bn?db(hb,y5):Iv()})}function Pv(){return Il===0&&(Il=Ce()),Il}function dC(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:(Ae(t,"action"),Go(""+t))}function hC(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function v5(t,n,a,l,d){if(n==="submit"&&a&&a.stateNode===d){var f=dC((d[gn]||null).action),T=l.submitter;T&&(n=(n=T[gn]||null)?dC(n.formAction):T.getAttribute("formAction"),n!==null&&(f=n,T=null));var C=new Qm("action","action",null,l,d);t.push({event:C,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Il!==0){var O=T?hC(d,T):new FormData(d),L={pending:!0,data:O,method:d.method,action:f};Object.freeze(L),Yi(a,L,null,O)}}else typeof f=="function"&&(C.preventDefault(),O=T?hC(d,T):new FormData(d),L={pending:!0,data:O,method:d.method,action:f},Object.freeze(L),Yi(a,L,f,O))},currentTarget:d}]})}}function km(t,n,a){t.currentTarget=a;try{n(t)}catch(l){Qb(l)}t.currentTarget=null}function fC(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var l=t[a];e:{var d=void 0,f=l.event;if(l=l.listeners,n)for(var T=l.length-1;0<=T;T--){var C=l[T],O=C.instance,L=C.currentTarget;if(C=C.listener,O!==d&&f.isPropagationStopped())break e;O!==null?ke(O,km,f,C,L):km(f,C,L),d=O}else for(T=0;T<l.length;T++){if(C=l[T],O=C.instance,L=C.currentTarget,C=C.listener,O!==d&&f.isPropagationStopped())break e;O!==null?ke(O,km,f,C,L):km(f,C,L),d=O}}}}function et(t,n){g_.has(t)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',t);var a=n[mb];a===void 0&&(a=n[mb]=new Set);var l=t+"__bubble";a.has(l)||(pC(n,t,2,!1),a.add(l))}function Uv(t,n,a){g_.has(t)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',t);var l=0;n&&(l|=4),pC(a,t,l,n)}function Bv(t){if(!t[_g]){t[_g]=!0,KC.forEach(function(a){a!=="selectionchange"&&(g_.has(a)||Uv(a,!1,t),Uv(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[_g]||(n[_g]=!0,Uv("selectionchange",!1,n))}}function pC(t,n,a,l){switch(VC(n)){case Zn:var d=Y5;break;case yr:d=W5;break;default:d=Jv}a=d.bind(null,n,a,t),d=void 0,!xb||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function Fv(t,n,a,l,d){var f=l;if(!(n&1)&&!(n&2)&&l!==null)e:for(;;){if(l===null)return;var T=l.tag;if(T===3||T===4){var C=l.stateNode.containerInfo;if(C===d)break;if(T===4)for(T=l.return;T!==null;){var O=T.tag;if((O===3||O===4)&&T.stateNode.containerInfo===d)return;T=T.return}for(;C!==null;){if(T=Ui(C),T===null)return;if(O=T.tag,O===5||O===6||O===26||O===27){l=f=T;continue e}C=C.parentNode}}l=l.return}Xo(function(){var L=f,K=Nu(a),se=[];e:{var Q=jA.get(t);if(Q!==void 0){var re=Qm,we=t;switch(t){case"keypress":if(Pu(a)===0)break e;case"keydown":case"keyup":re=$L;break;case"focusin":we="focus",re=wb;break;case"focusout":we="blur",re=wb;break;case"beforeblur":case"afterblur":re=wb;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=DA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=LL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=YL;break;case BA:case FA:case HA:re=PL;break;case zA:re=QL;break;case"scroll":case"scrollend":re=RL;break;case"wheel":re=ZL;break;case"copy":case"cut":case"paste":re=BL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=OA;break;case"toggle":case"beforetoggle":re=eI}var Be=(n&4)!==0,At=!Be&&(t==="scroll"||t==="scrollend"),tt=Be?Q!==null?Q+"Capture":null:Q;Be=[];for(var B=L,F;B!==null;){var V=B;if(F=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||F===null||tt===null||(V=bs(B,tt),V!=null&&Be.push(Nh(B,V,F))),At)break;B=B.return}0<Be.length&&(Q=new re(Q,we,null,a,K),se.push({event:Q,listeners:Be}))}}if(!(n&7)){e:{if(Q=t==="mouseover"||t==="pointerover",re=t==="mouseout"||t==="pointerout",Q&&a!==$h&&(we=a.relatedTarget||a.fromElement)&&(Ui(we)||we[ao]))break e;if((re||Q)&&(Q=K.window===K?K:(Q=K.ownerDocument)?Q.defaultView||Q.parentWindow:window,re?(we=a.relatedTarget||a.toElement,re=L,we=we?Ui(we):null,we!==null&&(At=H(we),Be=we.tag,we!==At||Be!==5&&Be!==27&&Be!==6)&&(we=null)):(re=null,we=L),re!==we)){if(Be=DA,V="onMouseLeave",tt="onMouseEnter",B="mouse",(t==="pointerout"||t==="pointerover")&&(Be=OA,V="onPointerLeave",tt="onPointerEnter",B="pointer"),At=re==null?Q:Ys(re),F=we==null?Q:Ys(we),Q=new Be(V,B+"leave",re,a,K),Q.target=At,Q.relatedTarget=F,V=null,Ui(K)===L&&(Be=new Be(tt,B+"enter",we,a,K),Be.target=F,Be.relatedTarget=At,V=Be),At=V,re&&we)t:{for(Be=re,tt=we,B=0,F=Be;F;F=ac(F))B++;for(F=0,V=tt;V;V=ac(V))F++;for(;0<B-F;)Be=ac(Be),B--;for(;0<F-B;)tt=ac(tt),F--;for(;B--;){if(Be===tt||tt!==null&&Be===tt.alternate)break t;Be=ac(Be),tt=ac(tt)}Be=null}else Be=null;re!==null&&mC(se,Q,re,Be,!1),we!==null&&At!==null&&mC(se,At,we,Be,!0)}}e:{if(Q=L?Ys(L):window,re=Q.nodeName&&Q.nodeName.toLowerCase(),re==="select"||re==="input"&&Q.type==="file")var ae=Wo;else if(Zp(Q))if(PA)ae=Hu;else{ae=Qy;var _e=Wy}else re=Q.nodeName,!re||re.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?L&&$o(L.elementType)&&(ae=Wo):ae=Ky;if(ae&&(ae=ae(t,L))){Fu(se,ae,a,K);break e}_e&&_e(t,Q,L),t==="focusout"&&L&&Q.type==="number"&&L.memoizedProps.value!=null&&Hd(Q,"number",Q.value)}switch(_e=L?Ys(L):window,t){case"focusin":(Zp(_e)||_e.contentEditable==="true")&&(bc=_e,kb=L,Zh=null);break;case"focusout":Zh=kb=bc=null;break;case"mousedown":Ob=!0;break;case"contextmenu":case"mouseup":case"dragend":Ob=!1,tm(se,a,K);break;case"selectionchange":if(sI)break;case"keydown":case"keyup":tm(se,a,K)}var je;if(Db)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else vc?Qp(t,a)&&(De="onCompositionEnd"):t==="keydown"&&a.keyCode===RA&&(De="onCompositionStart");De&&(MA&&a.locale!=="ko"&&(vc||De!=="onCompositionStart"?De==="onCompositionEnd"&&vc&&(je=qd()):(oo=K,Eb="value"in oo?oo.value:oo.textContent,vc=!0)),_e=Om(L,De),0<_e.length&&(De=new kA(De,t,null,a,K),se.push({event:De,listeners:_e}),je?De.data=je:(je=Kp(a),je!==null&&(De.data=je)))),(je=iI?$y(t,a):Gy(t,a))&&(De=Om(L,"onBeforeInput"),0<De.length&&(_e=new HL("onBeforeInput","beforeinput",null,a,K),se.push({event:_e,listeners:De}),_e.data=je)),v5(se,t,L,a,K)}fC(se,n)})}function Nh(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Om(t,n){for(var a=n+"Capture",l=[];t!==null;){var d=t,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=bs(t,a),d!=null&&l.unshift(Nh(t,d,f)),d=bs(t,n),d!=null&&l.push(Nh(t,d,f))),t.tag===3)return l;t=t.return}return[]}function ac(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function mC(t,n,a,l,d){for(var f=n._reactName,T=[];a!==null&&a!==l;){var C=a,O=C.alternate,L=C.stateNode;if(C=C.tag,O!==null&&O===l)break;C!==5&&C!==26&&C!==27||L===null||(O=L,d?(L=bs(a,f),L!=null&&T.unshift(Nh(a,L,O))):d||(L=bs(a,f),L!=null&&T.push(Nh(a,L,O)))),a=a.return}T.length!==0&&t.push({event:n,listeners:T})}function Hv(t,n){Xp(t,n),t!=="input"&&t!=="textarea"&&t!=="select"||n==null||n.value!==null||AA||(AA=!0,t==="select"&&n.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",t):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",t));var a={registrationNameDependencies:bl,possibleRegistrationNames:gb};$o(t)||typeof n.is=="string"||Yp(t,n,a),n.contentEditable&&!n.suppressContentEditableWarning&&n.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function gi(t,n,a,l){n!==a&&(a=eo(a),eo(n)!==a&&(l[t]=n))}function b5(t,n,a){n.forEach(function(l){a[vC(l)]=l==="style"?jv(t):t.getAttribute(l)})}function fr(t,n){n===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",t,t,t):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof n)}function gC(t,n){return t=t.namespaceURI===Xm||t.namespaceURI===pc?t.ownerDocument.createElementNS(t.namespaceURI,t.tagName):t.ownerDocument.createElement(t.tagName),t.innerHTML=n,t.innerHTML}function eo(t){return oe(t)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Ye(t)),Le(t)),(typeof t=="string"?t:""+t).replace(kI,`
|
||
`).replace(OI,"")}function yC(t,n){return n=eo(n),eo(t)===n}function Rm(){}function Tt(t,n,a,l,d,f){switch(a){case"children":typeof l=="string"?(vs(l,n,!1),n==="body"||n==="textarea"&&l===""||Vr(t,l)):(typeof l=="number"||typeof l=="bigint")&&(vs(""+l,n,!1),n!=="body"&&Vr(t,""+l));break;case"className":ze(t,"class",l);break;case"tabIndex":ze(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ze(t,a,l);break;case"style":$p(t,l,f);break;case"data":if(n!=="object"){ze(t,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){console.error(a==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',a,a),t.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}Ae(l,a),l=Go(""+l),t.setAttribute(a,l);break;case"action":case"formAction":if(l!=null&&(n==="form"?a==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof l=="function"&&(d.encType==null&&d.method==null||xg||(xg=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),d.target==null||Sg||(Sg=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):n==="input"||n==="button"?a==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||d.type==="submit"||d.type==="image"||Tg?n!=="button"||d.type==null||d.type==="submit"||Tg?typeof l=="function"&&(d.name==null||nD||(nD=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),d.formEncType==null&&d.formMethod==null||xg||(xg=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),d.formTarget==null||Sg||(Sg=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Tg=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Tg=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(a==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof l=="function"){t.setAttribute(a,"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 f=="function"&&(a==="formAction"?(n!=="input"&&Tt(t,n,"name",d.name,d,null),Tt(t,n,"formEncType",d.formEncType,d,null),Tt(t,n,"formMethod",d.formMethod,d,null),Tt(t,n,"formTarget",d.formTarget,d,null)):(Tt(t,n,"encType",d.encType,d,null),Tt(t,n,"method",d.method,d,null),Tt(t,n,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}Ae(l,a),l=Go(""+l),t.setAttribute(a,l);break;case"onClick":l!=null&&(typeof l!="function"&&fr(a,l),t.onclick=Rm);break;case"onScroll":l!=null&&(typeof l!="function"&&fr(a,l),et("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&fr(a,l),et("scrollend",t));break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=l.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}Ae(l,a),a=Go(""+l),t.setAttributeNS(Nl,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?(Ae(l,a),t.setAttribute(a,""+l)):t.removeAttribute(a);break;case"inert":l!==""||Eg[a]||(Eg[a]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",a));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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":l===!0?t.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?(Ae(l,a),t.setAttribute(a,l)):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?(Ae(l,a),t.setAttribute(a,l)):t.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(a):(Ae(l,a),t.setAttribute(a,l));break;case"popover":et("beforetoggle",t),et("toggle",t),it(t,"popover",l);break;case"xlinkActuate":Yt(t,Nl,"xlink:actuate",l);break;case"xlinkArcrole":Yt(t,Nl,"xlink:arcrole",l);break;case"xlinkRole":Yt(t,Nl,"xlink:role",l);break;case"xlinkShow":Yt(t,Nl,"xlink:show",l);break;case"xlinkTitle":Yt(t,Nl,"xlink:title",l);break;case"xlinkType":Yt(t,Nl,"xlink:type",l);break;case"xmlBase":Yt(t,y_,"xml:base",l);break;case"xmlLang":Yt(t,y_,"xml:lang",l);break;case"xmlSpace":Yt(t,y_,"xml:space",l);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),it(t,"is",l);break;case"innerText":case"textContent":break;case"popoverTarget":sD||l==null||typeof l!="object"||(sD=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",l));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Gp(a),it(t,a,l)):bl.hasOwnProperty(a)&&l!=null&&typeof l!="function"&&fr(a,l)}}function zv(t,n,a,l,d,f){switch(a){case"style":$p(t,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=l.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"children":typeof l=="string"?Vr(t,l):(typeof l=="number"||typeof l=="bigint")&&Vr(t,""+l);break;case"onScroll":l!=null&&(typeof l!="function"&&fr(a,l),et("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&fr(a,l),et("scrollend",t));break;case"onClick":l!=null&&(typeof l!="function"&&fr(a,l),t.onclick=Rm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(bl.hasOwnProperty(a))l!=null&&typeof l!="function"&&fr(a,l);else e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),f=t[gn]||null,f=f!=null?f[a]:null,typeof f=="function"&&t.removeEventListener(n,f,d),typeof l=="function")){typeof f!="function"&&f!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,l,d);break e}a in t?t[a]=l:l===!0?t.setAttribute(a,""):it(t,a,l)}}}function wi(t,n,a){switch(Hv(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",t),et("load",t);var l=!1,d=!1,f;for(f in a)if(a.hasOwnProperty(f)){var T=a[f];if(T!=null)switch(f){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Tt(t,n,f,T,a,null)}}d&&Tt(t,n,"srcSet",a.srcSet,a,null),l&&Tt(t,n,"src",a.src,a,null);return;case"input":Re("input",a),et("invalid",t);var C=f=T=d=null,O=null,L=null;for(l in a)if(a.hasOwnProperty(l)){var K=a[l];if(K!=null)switch(l){case"name":d=K;break;case"type":T=K;break;case"checked":O=K;break;case"defaultChecked":L=K;break;case"value":f=K;break;case"defaultValue":C=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Tt(t,n,l,K,a,null)}}Et(t,a),zo(t,f,C,O,L,T,d,!1),Fr(t);return;case"select":Re("select",a),et("invalid",t),l=T=f=null;for(d in a)if(a.hasOwnProperty(d)&&(C=a[d],C!=null))switch(d){case"value":f=C;break;case"defaultValue":T=C;break;case"multiple":l=C;default:Tt(t,n,d,C,a,null)}ku(t,a),n=f,a=T,t.multiple=!!l,n!=null?Hr(t,!!l,n,!1):a!=null&&Hr(t,!!l,a,!0);return;case"textarea":Re("textarea",a),et("invalid",t),f=d=l=null;for(T in a)if(a.hasOwnProperty(T)&&(C=a[T],C!=null))switch(T){case"value":l=C;break;case"defaultValue":d=C;break;case"children":f=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Tt(t,n,T,C,a,null)}Ou(t,a),zp(t,l,d,f),Fr(t);return;case"option":Fp(t,a);for(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Tt(t,n,O,l,a,null)}return;case"dialog":et("beforetoggle",t),et("toggle",t),et("cancel",t),et("close",t);break;case"iframe":case"object":et("load",t);break;case"video":case"audio":for(l=0;l<xf.length;l++)et(xf[l],t);break;case"image":et("error",t),et("load",t);break;case"details":et("toggle",t);break;case"embed":case"source":case"link":et("error",t),et("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Tt(t,n,L,l,a,null)}return;default:if($o(n)){for(K in a)a.hasOwnProperty(K)&&(l=a[K],l!==void 0&&zv(t,n,K,l,a,void 0));return}}for(C in a)a.hasOwnProperty(C)&&(l=a[C],l!=null&&Tt(t,n,C,l,a,null))}function _5(t,n,a,l){switch(Hv(n,l),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,T=null,C=null,O=null,L=null,K=null;for(re in a){var se=a[re];if(a.hasOwnProperty(re)&&se!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":O=se;default:l.hasOwnProperty(re)||Tt(t,n,re,null,l,se)}}for(var Q in l){var re=l[Q];if(se=a[Q],l.hasOwnProperty(Q)&&(re!=null||se!=null))switch(Q){case"type":f=re;break;case"name":d=re;break;case"checked":L=re;break;case"defaultChecked":K=re;break;case"value":T=re;break;case"defaultValue":C=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:re!==se&&Tt(t,n,Q,re,l,se)}}n=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,l=l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null,n||!l||iD||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),iD=!0),!n||l||tD||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),tD=!0),Du(t,T,C,O,L,K,f,d);return;case"select":re=T=C=Q=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":re=O;default:l.hasOwnProperty(f)||Tt(t,n,f,null,l,O)}for(d in l)if(f=l[d],O=a[d],l.hasOwnProperty(d)&&(f!=null||O!=null))switch(d){case"value":Q=f;break;case"defaultValue":C=f;break;case"multiple":T=f;default:f!==O&&Tt(t,n,d,f,l,O)}l=C,n=T,a=re,Q!=null?Hr(t,!!n,Q,!1):!!a!=!!n&&(l!=null?Hr(t,!!n,l,!0):Hr(t,!!n,n?[]:"",!1));return;case"textarea":re=Q=null;for(C in a)if(d=a[C],a.hasOwnProperty(C)&&d!=null&&!l.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Tt(t,n,C,null,l,d)}for(T in l)if(d=l[T],f=a[T],l.hasOwnProperty(T)&&(d!=null||f!=null))switch(T){case"value":Q=d;break;case"defaultValue":re=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==f&&Tt(t,n,T,d,l,f)}zd(t,Q,re);return;case"option":for(var we in a)if(Q=a[we],a.hasOwnProperty(we)&&Q!=null&&!l.hasOwnProperty(we))switch(we){case"selected":t.selected=!1;break;default:Tt(t,n,we,null,l,Q)}for(O in l)if(Q=l[O],re=a[O],l.hasOwnProperty(O)&&Q!==re&&(Q!=null||re!=null))switch(O){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Tt(t,n,O,Q,l,re)}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 Be in a)Q=a[Be],a.hasOwnProperty(Be)&&Q!=null&&!l.hasOwnProperty(Be)&&Tt(t,n,Be,null,l,Q);for(L in l)if(Q=l[L],re=a[L],l.hasOwnProperty(L)&&Q!==re&&(Q!=null||re!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Tt(t,n,L,Q,l,re)}return;default:if($o(n)){for(var At in a)Q=a[At],a.hasOwnProperty(At)&&Q!==void 0&&!l.hasOwnProperty(At)&&zv(t,n,At,void 0,l,Q);for(K in l)Q=l[K],re=a[K],!l.hasOwnProperty(K)||Q===re||Q===void 0&&re===void 0||zv(t,n,K,Q,l,re);return}}for(var tt in a)Q=a[tt],a.hasOwnProperty(tt)&&Q!=null&&!l.hasOwnProperty(tt)&&Tt(t,n,tt,null,l,Q);for(se in l)Q=l[se],re=a[se],!l.hasOwnProperty(se)||Q===re||Q==null&&re==null||Tt(t,n,se,Q,l,re)}function vC(t){switch(t){case"class":return"className";case"for":return"htmlFor";default:return t}}function jv(t){var n={};t=t.style;for(var a=0;a<t.length;a++){var l=t[a];n[l]=t.getPropertyValue(l)}return n}function bC(t,n,a){if(n!=null&&typeof n!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var l,d=l="",f;for(f in n)if(n.hasOwnProperty(f)){var T=n[f];T!=null&&typeof T!="boolean"&&T!==""&&(f.indexOf("--")===0?(at(T,f),l+=d+f+":"+(""+T).trim()):typeof T!="number"||T===0||EA.has(f)?(at(T,f),l+=d+f.replace(bA,"-$1").toLowerCase().replace(_A,"-ms-")+":"+(""+T).trim()):l+=d+f.replace(bA,"-$1").toLowerCase().replace(_A,"-ms-")+":"+T+"px",d=";")}l=l||null,n=t.getAttribute("style"),n!==l&&(l=eo(l),eo(n)!==l&&(a.style=jv(t)))}}function Qn(t,n,a,l,d,f){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(Ae(l,n),t===""+l)return}gi(n,t,l,f)}function _C(t,n,a,l,d,f){if(d.delete(a),t=t.getAttribute(a),t===null){switch(typeof l){case"function":case"symbol":return}if(!l)return}else switch(typeof l){case"function":case"symbol":break;default:if(l)return}gi(n,t,l,f)}function Vv(t,n,a,l,d,f){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":return}else if(l!=null)switch(typeof l){case"function":case"symbol":break;default:if(Ae(l,a),t===""+l)return}gi(n,t,l,f)}function TC(t,n,a,l,d,f){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(l))return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(!isNaN(l)&&(Ae(l,n),t===""+l))return}gi(n,t,l,f)}function qv(t,n,a,l,d,f){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(Ae(l,n),a=Go(""+l),t===a)return}gi(n,t,l,f)}function SC(t,n,a,l){for(var d={},f=new Set,T=t.attributes,C=0;C<T.length;C++)switch(T[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:f.add(T[C].name)}if($o(n)){for(var O in a)if(a.hasOwnProperty(O)){var L=a[O];if(L!=null){if(bl.hasOwnProperty(O))typeof L!="function"&&fr(O,L);else if(a.suppressHydrationWarning!==!0)switch(O){case"children":typeof L!="string"&&typeof L!="number"||gi("children",t.textContent,L,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,L=L?L.__html:void 0,L!=null&&(L=gC(t,L),gi(O,T,L,d));continue;case"style":f.delete(O),bC(t,L,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":f.delete(O.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",O);continue;case"className":f.delete("class"),T=He(t,"class",L),gi("className",T,L,d);continue;default:l.context===ya&&n!=="svg"&&n!=="math"?f.delete(O.toLowerCase()):f.delete(O),T=He(t,O,L),gi(O,T,L,d)}}}}else for(L in a)if(a.hasOwnProperty(L)&&(O=a[L],O!=null)){if(bl.hasOwnProperty(L))typeof O!="function"&&fr(L,O);else if(a.suppressHydrationWarning!==!0)switch(L){case"children":typeof O!="string"&&typeof O!="number"||gi("children",t.textContent,O,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,O=O?O.__html:void 0,O!=null&&(O=gC(t,O),T!==O&&(d[L]={__html:T}));continue;case"className":Qn(t,L,"class",O,f,d);continue;case"tabIndex":Qn(t,L,"tabindex",O,f,d);continue;case"style":f.delete(L),bC(t,O,d);continue;case"multiple":f.delete(L),gi(L,t.multiple,O,d);continue;case"muted":f.delete(L),gi(L,t.muted,O,d);continue;case"autoFocus":f.delete("autofocus"),gi(L,t.autofocus,O,d);continue;case"data":if(n!=="object"){f.delete(L),T=t.getAttribute("data"),gi(L,T,O,d);continue}case"src":case"href":if(!(O!==""||n==="a"&&L==="href"||n==="object"&&L==="data")){console.error(L==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',L,L);continue}qv(t,L,L,O,f,d);continue;case"action":case"formAction":if(T=t.getAttribute(L),typeof O=="function"){f.delete(L.toLowerCase()),L==="formAction"?(f.delete("name"),f.delete("formenctype"),f.delete("formmethod"),f.delete("formtarget")):(f.delete("enctype"),f.delete("method"),f.delete("target"));continue}else if(T===RI){f.delete(L.toLowerCase()),gi(L,"function",O,d);continue}qv(t,L,L.toLowerCase(),O,f,d);continue;case"xlinkHref":qv(t,L,"xlink:href",O,f,d);continue;case"contentEditable":Vv(t,L,"contenteditable",O,f,d);continue;case"spellCheck":Vv(t,L,"spellcheck",O,f,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Vv(t,L,L,O,f,d);continue;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":_C(t,L,L.toLowerCase(),O,f,d);continue;case"capture":case"download":e:{C=t;var K=T=L,se=d;if(f.delete(K),C=C.getAttribute(K),C===null)switch(typeof O){case"undefined":case"function":case"symbol":break e;default:if(O===!1)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":break;case"boolean":if(O===!0&&C==="")break e;break;default:if(Ae(O,T),C===""+O)break e}gi(T,C,O,se)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=t,K=T=L,se=d,f.delete(K),C=C.getAttribute(K),C===null)switch(typeof O){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(O)||1>O)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(O)||1>O)&&(Ae(O,T),C===""+O))break e}gi(T,C,O,se)}continue;case"rowSpan":TC(t,L,"rowspan",O,f,d);continue;case"start":TC(t,L,L,O,f,d);continue;case"xHeight":Qn(t,L,"x-height",O,f,d);continue;case"xlinkActuate":Qn(t,L,"xlink:actuate",O,f,d);continue;case"xlinkArcrole":Qn(t,L,"xlink:arcrole",O,f,d);continue;case"xlinkRole":Qn(t,L,"xlink:role",O,f,d);continue;case"xlinkShow":Qn(t,L,"xlink:show",O,f,d);continue;case"xlinkTitle":Qn(t,L,"xlink:title",O,f,d);continue;case"xlinkType":Qn(t,L,"xlink:type",O,f,d);continue;case"xmlBase":Qn(t,L,"xml:base",O,f,d);continue;case"xmlLang":Qn(t,L,"xml:lang",O,f,d);continue;case"xmlSpace":Qn(t,L,"xml:space",O,f,d);continue;case"inert":O!==""||Eg[L]||(Eg[L]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",L)),_C(t,L,L,O,f,d);continue;default:if(!(2<L.length)||L[0]!=="o"&&L[0]!=="O"||L[1]!=="n"&&L[1]!=="N"){C=Gp(L),T=!1,l.context===ya&&n!=="svg"&&n!=="math"?f.delete(C.toLowerCase()):(K=L.toLowerCase(),K=Ym.hasOwnProperty(K)&&Ym[K]||null,K!==null&&K!==L&&(T=!0,f.delete(K)),f.delete(C));e:if(K=t,se=C,C=O,Ge(se))if(K.hasAttribute(se))K=K.getAttribute(se),Ae(C,se),C=K===""+C?C:K;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(K=se.toLowerCase().slice(0,5),K!=="data-"&&K!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;T||gi(L,C,O,d)}}}return 0<f.size&&a.suppressHydrationWarning!==!0&&b5(t,f,d),Object.keys(d).length===0?null:d}function T5(t,n){switch(t.length){case 0:return"";case 1:return t[0];case 2:return t[0]+" "+n+" "+t[1];default:return t.slice(0,-1).join(", ")+", "+n+" "+t[t.length-1]}}function Mm(t){return t.nodeType===9?t:t.ownerDocument}function xC(t){switch(t){case pc:return $c;case Xm:return wg;default:return ya}}function EC(t,n){if(t===ya)switch(n){case"svg":return $c;case"math":return wg;default:return ya}return t===$c&&n==="foreignObject"?ya:t}function $v(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function S5(){var t=window.event;return t&&t.type==="popstate"?t===T_?!1:(T_=t,!0):(T_=null,!1)}function x5(t){setTimeout(function(){throw t})}function E5(t,n,a){switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&t.focus();break;case"img":a.src?t.src=a.src:a.srcSet&&(t.srcset=a.srcSet)}}function C5(t,n,a,l){_5(t,n,a,l),t[gn]=l}function CC(t){Vr(t,"")}function A5(t,n,a){t.nodeValue=a}function to(t){return t==="head"}function w5(t,n){t.removeChild(n)}function D5(t,n){(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).removeChild(n)}function AC(t,n){var a=n,l=0,d=0;do{var f=a.nextSibling;if(t.removeChild(a),f&&f.nodeType===8)if(a=f.data,a===Ag){if(0<l&&8>l){a=l;var T=t.ownerDocument;if(a&LI&&Ph(T.documentElement),a&II&&Ph(T.body),a&NI)for(a=T.head,Ph(a),T=a.firstChild;T;){var C=T.nextSibling,O=T.nodeName;T[Vh]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&T.rel.toLowerCase()==="stylesheet"||a.removeChild(T),T=C}}if(d===0){t.removeChild(f),Hh(n);return}d--}else a===Cg||a===ga||a===Ef?d++:l=a.charCodeAt(0)-48;else l=0;a=f}while(a);Hh(n)}function k5(t){t=t.style,typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function O5(t){t.nodeValue=""}function R5(t,n){n=n[PI],n=n!=null&&n.hasOwnProperty("display")?n.display:null,t.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function M5(t,n){t.nodeValue=n}function Gv(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Gv(a),Xs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function L5(t,n,a,l){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Vh])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){Ae(d.name,"name");var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Kn(t.nextSibling),t===null)break}return null}function I5(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Kn(t.nextSibling),t===null))return null;return t}function Xv(t){return t.data===Ef||t.data===ga&&t.ownerDocument.readyState===aD}function N5(t,n){var a=t.ownerDocument;if(t.data!==ga||a.readyState===aD)n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Kn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n===Cg||n===Ef||n===ga||n===v_||n===rD)break;if(n===Ag)return null}}return t}function wC(t){if(t.nodeType===1){for(var n=t.nodeName.toLowerCase(),a={},l=t.attributes,d=0;d<l.length;d++){var f=l[d];a[vC(f.name)]=f.name.toLowerCase()==="style"?jv(t):f.value}return{type:n,props:a}}return t.nodeType===8?{type:"Suspense",props:{}}:t.nodeValue}function DC(t,n,a){return a===null||a[MI]!==!0?(t.nodeValue===n?t=null:(n=eo(n),t=eo(t.nodeValue)===n?null:t.nodeValue),t):null}function kC(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Ag){if(n===0)return Kn(t.nextSibling);n--}else a!==Cg&&a!==Ef&&a!==ga||n++}t=t.nextSibling}return null}function OC(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Cg||a===Ef||a===ga){if(n===0)return t;n--}else a===Ag&&n++}t=t.previousSibling}return null}function P5(t){Hh(t)}function U5(t){Hh(t)}function RC(t,n,a,l,d){switch(d&&Ba(t,l.ancestorInfo),n=Mm(a),t){case"html":if(t=n.documentElement,!t)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"head":if(t=n.head,!t)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"body":if(t=n.body,!t)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return t;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function B5(t,n,a,l){if(!a[ao]&&wn(a)){var d=a.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",d,d,d)}switch(t){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(d=a.attributes;d.length;)a.removeAttributeNode(d[0]);wi(a,t,n),a[Hi]=l,a[gn]=n}function Ph(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Xs(t)}function Lm(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function MC(t,n,a){var l=Gc;if(l&&typeof n=="string"&&n){var d=ei(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),hD.has(d)||(hD.add(d),t={rel:t,crossOrigin:a,href:n},l.querySelector(d)===null&&(n=l.createElement("link"),wi(n,"link",t),G(n),l.head.appendChild(n)))}}function LC(t,n,a,l){var d=(d=so.current)?Lm(d):null;if(!d)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=oc(a.href),n=D(d).hoistableStyles,l=n.get(a),l||(l={type:"style",instance:null,count:0,state:null},n.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=oc(a.href);var f=D(d).hoistableStyles,T=f.get(t);if(!T&&(d=d.ownerDocument||d,T={type:"stylesheet",instance:null,count:0,state:{loading:Ul,preload:null}},f.set(t,T),(f=d.querySelector(Uh(t)))&&!f._p&&(T.instance=f,T.state.loading=Cf|ls),!us.has(t))){var C={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};us.set(t,C),f||F5(d,t,C,T.state)}if(n&&l===null)throw a=`
|
||
|
||
- `+Im(n)+`
|
||
+ `+Im(a),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return T}if(n&&l!==null)throw a=`
|
||
|
||
- `+Im(n)+`
|
||
+ `+Im(a),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=lc(a),n=D(d).hoistableScripts,l=n.get(a),l||(l={type:"script",instance:null,count:0,state:null},n.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+t+'". this is a bug in React.')}}function Im(t){var n=0,a="<link";return typeof t.rel=="string"?(n++,a+=' rel="'+t.rel+'"'):aa.call(t,"rel")&&(n++,a+=' rel="'+(t.rel===null?"null":"invalid type "+typeof t.rel)+'"'),typeof t.href=="string"?(n++,a+=' href="'+t.href+'"'):aa.call(t,"href")&&(n++,a+=' href="'+(t.href===null?"null":"invalid type "+typeof t.href)+'"'),typeof t.precedence=="string"?(n++,a+=' precedence="'+t.precedence+'"'):aa.call(t,"precedence")&&(n++,a+=" precedence={"+(t.precedence===null?"null":"invalid type "+typeof t.precedence)+"}"),Object.getOwnPropertyNames(t).length>n&&(a+=" ..."),a+" />"}function oc(t){return'href="'+ei(t)+'"'}function Uh(t){return'link[rel="stylesheet"]['+t+"]"}function IC(t){return Qe({},t,{"data-precedence":t.precedence,precedence:null})}function F5(t,n,a,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=Cf:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=Cf}),n.addEventListener("error",function(){return l.loading|=cD}),wi(n,"link",a),G(n),t.head.appendChild(n))}function lc(t){return'[src="'+ei(t)+'"]'}function Bh(t){return"script[async]"+t}function NC(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+ei(a.href)+'"]');if(l)return n.instance=l,G(l),l;var d=Qe({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),G(l),wi(l,"style",d),Nm(l,a.precedence,t),n.instance=l;case"stylesheet":d=oc(a.href);var f=t.querySelector(Uh(d));if(f)return n.state.loading|=ls,n.instance=f,G(f),f;l=IC(a),(d=us.get(d))&&Yv(l,d),f=(t.ownerDocument||t).createElement("link"),G(f);var T=f;return T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),wi(f,"link",l),n.state.loading|=ls,Nm(f,a.precedence,t),n.instance=f;case"script":return f=lc(a.src),(d=t.querySelector(Bh(f)))?(n.instance=d,G(d),d):(l=a,(d=us.get(f))&&(l=Qe({},a),Wv(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),G(d),wi(d,"link",l),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&ls)===Ul&&(l=n.instance,n.state.loading|=ls,Nm(l,a.precedence,t));return n.instance}function Nm(t,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,f=d,T=0;T<l.length;T++){var C=l[T];if(C.dataset.precedence===n)f=C;else if(f!==d)break}f?f.parentNode.insertBefore(t,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Yv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Wv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}function PC(t,n,a){if(Dg===null){var l=new Map,d=Dg=new Map;d.set(a,l)}else d=Dg,l=d.get(a),l||(l=new Map,d.set(a,l));if(l.has(t))return l;for(l.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var f=a[d];if(!(f[Vh]||f[Hi]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==pc){var T=f.getAttribute(n)||"";T=t+T;var C=l.get(T);C?C.push(f):l.set(T,[f])}}return l}function UC(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function H5(t,n,a){var l=!a.ancestorInfo.containerTagInScope;if(a.context===$c||n.itemProp!=null)return!l||n.itemProp==null||t!=="meta"&&t!=="title"&&t!=="style"&&t!=="link"&&t!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",t,t),!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href===""){l&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence=="string"){t=n.href;var d=n.onError,f=n.disabled;a=[],n.onLoad&&a.push("`onLoad`"),d&&a.push("`onError`"),f!=null&&a.push("`disabled`"),d=T5(a,"and"),d+=a.length===1?" prop":" props",f=a.length===1?"an "+d:"the "+d,a.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',t,f,d)}l&&(typeof n.rel!="string"||typeof n.href!="string"||n.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(n.onError||n.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(n.rel){case"stylesheet":return t=n.precedence,n=n.disabled,typeof t!="string"&&l&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof t=="string"&&n==null;default:return!0}case"script":if(t=n.async&&typeof n.async!="function"&&typeof n.async!="symbol",!t||n.onLoad||n.onError||!n.src||typeof n.src!="string"){l&&(t?n.onLoad||n.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":l&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",t)}return!1}function BC(t){return!(t.type==="stylesheet"&&(t.state.loading&dD)===Ul)}function z5(){}function j5(t,n,a){if(Af===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var l=Af;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&ls)===Ul){if(n.instance===null){var d=oc(a.href),f=t.querySelector(Uh(d));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Pm.bind(l),t.then(l,l)),n.state.loading|=ls,n.instance=f,G(f);return}f=t.ownerDocument||t,a=IC(a),(d=us.get(d))&&Yv(a,d),f=f.createElement("link"),G(f);var T=f;T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),wi(f,"link",a),n.instance=f}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&dD)===Ul&&(l.count++,n=Pm.bind(l),t.addEventListener("load",n),t.addEventListener("error",n))}}function V5(){if(Af===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var t=Af;return t.stylesheets&&t.count===0&&Qv(t,t.stylesheets),0<t.count?function(n){var a=setTimeout(function(){if(t.stylesheets&&Qv(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a)}}:null}function Pm(){if(this.count--,this.count===0){if(this.stylesheets)Qv(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function Qv(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,kg=new Map,n.forEach(q5,t),kg=null,Pm.call(t))}function q5(t,n){if(!(n.state.loading&ls)){var a=kg.get(t);if(a)var l=a.get(x_);else{a=new Map,kg.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var T=d[f];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(a.set(T.dataset.precedence,T),l=T)}l&&a.set(x_,l)}d=n.instance,T=d.getAttribute("data-precedence"),f=a.get(T)||l,f===l&&a.set(x_,d),a.set(T,d),this.count++,l=Pm.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),f?f.parentNode.insertBefore(d,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=ls}}function $5(t,n,a,l,d,f,T,C){for(this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Pl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qs(0),this.hiddenUpdates=qs(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,t=this.pendingUpdatersLaneMap=[],n=0;31>n;n++)t.push(new Set);this._debugRootType=a?"hydrateRoot()":"createRoot()"}function FC(t,n,a,l,d,f,T,C,O,L,K,se){return t=new $5(t,n,a,T,C,O,L,se),n=lI,f===!0&&(n|=zi|As),Cs&&(n|=ki),f=A(3,null,null,n),t.current=f,f.stateNode=t,n=eh(),Wr(n),t.pooledCache=n,Wr(n),f.memoizedState={element:l,isDehydrated:a,cache:n},ul(f),t}function HC(t){return t?(t=lo,t):lo}function Kv(t,n,a,l,d,f){if(Fi&&typeof Fi.onScheduleFiberRoot=="function")try{Fi.onScheduleFiberRoot(hc,l,a)}catch(T){gr||(gr=!0,console.error("React instrumentation encountered an error: %s",T))}Se!==null&&typeof Se.markRenderScheduled=="function"&&Se.markRenderScheduled(n),d=HC(d),l.context===null?l.context=d:l.pendingContext=d,vr&&Un!==null&&!gD&&(gD=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
||
|
||
Check the render method of %s.`,ee(Un)||"Unknown")),l=pn(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(typeof f!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",f),l.callback=f),a=rr(t,l,n),a!==null&&(Qt(a,t,n),Va(a,t,n))}function zC(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function Zv(t,n){zC(t,n),(t=t.alternate)&&zC(t,n)}function jC(t){if(t.tag===13){var n=ri(t,67108864);n!==null&&Qt(n,t,67108864),Zv(t,67108864)}}function G5(){return Un}function X5(){for(var t=new Map,n=1,a=0;31>a;a++){var l=Uo(n);t.set(n,l),n*=2}return t}function Y5(t,n,a,l){var d=ne.T;ne.T=null;var f=dt.p;try{dt.p=Zn,Jv(t,n,a,l)}finally{dt.p=f,ne.T=d}}function W5(t,n,a,l){var d=ne.T;ne.T=null;var f=dt.p;try{dt.p=yr,Jv(t,n,a,l)}finally{dt.p=f,ne.T=d}}function Jv(t,n,a,l){if(Rg){var d=eb(l);if(d===null)Fv(t,n,l,Mg,a),qC(t,l);else if(Q5(d,t,n,a,l))l.stopPropagation();else if(qC(t,l),n&4&&-1<HI.indexOf(t)){for(;d!==null;){var f=wn(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var T=zt(f.pendingLanes);if(T!==0){var C=f;for(C.pendingLanes|=2,C.entangledLanes|=2;T;){var O=1<<31-Wi(T);C.entanglements[1]|=O,T&=~O}hr(f),(ht&(en|Os))===Bn&&(mg=mr()+Yw,Ih(0,!1))}}break;case 13:C=ri(f,2),C!==null&&Qt(C,f,2),nc(),Zv(f,2)}if(f=eb(l),f===null&&Fv(t,n,l,Mg,a),f===d)break;d=f}d!==null&&l.stopPropagation()}else Fv(t,n,l,null,a)}}function eb(t){return t=Nu(t),tb(t)}function tb(t){if(Mg=null,t=Ui(t),t!==null){var n=H(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=X(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Mg=t,null}function VC(t){switch(t){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 Zn;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 yr;case"message":switch(oL()){case hb:return Zn;case fb:return yr;case dc:case lL:return oa;case pb:return $m;default:return oa}default:return oa}}function qC(t,n){switch(t){case"focusin":case"focusout":bo=null;break;case"dragenter":case"dragleave":_o=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":Df.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kf.delete(n.pointerId)}}function Fh(t,n,a,l,d,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[d]},n!==null&&(n=wn(n),n!==null&&jC(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function Q5(t,n,a,l,d){switch(n){case"focusin":return bo=Fh(bo,t,n,a,l,d),!0;case"dragenter":return _o=Fh(_o,t,n,a,l,d),!0;case"mouseover":return To=Fh(To,t,n,a,l,d),!0;case"pointerover":var f=d.pointerId;return Df.set(f,Fh(Df.get(f)||null,t,n,a,l,d)),!0;case"gotpointercapture":return f=d.pointerId,kf.set(f,Fh(kf.get(f)||null,t,n,a,l,d)),!0}return!1}function $C(t){var n=Ui(t.target);if(n!==null){var a=H(n);if(a!==null){if(n=a.tag,n===13){if(n=X(a),n!==null){t.blockedOn=n,ot(t.priority,function(){if(a.tag===13){var l=Nn(a);l=Gs(l);var d=ri(a,l);d!==null&&Qt(d,a,l),Zv(a,l)}});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Um(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=eb(t.nativeEvent);if(a===null){a=t.nativeEvent;var l=new a.constructor(a.type,a),d=l;$h!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),$h=d,a.target.dispatchEvent(l),$h===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),$h=null}else return n=wn(a),n!==null&&jC(n),t.blockedOn=a,!1;n.shift()}return!0}function GC(t,n,a){Um(t)&&a.delete(n)}function K5(){E_=!1,bo!==null&&Um(bo)&&(bo=null),_o!==null&&Um(_o)&&(_o=null),To!==null&&Um(To)&&(To=null),Df.forEach(GC),kf.forEach(GC)}function Bm(t,n){t.blockedOn===n&&(t.blockedOn=null,E_||(E_=!0,ti.unstable_scheduleCallback(ti.unstable_NormalPriority,K5)))}function XC(t){Lg!==t&&(Lg=t,ti.unstable_scheduleCallback(ti.unstable_NormalPriority,function(){Lg===t&&(Lg=null);for(var n=0;n<t.length;n+=3){var a=t[n],l=t[n+1],d=t[n+2];if(typeof l!="function"){if(tb(l||a)===null)continue;break}var f=wn(a);f!==null&&(t.splice(n,3),n-=3,a={pending:!0,data:d,method:a.method,action:l},Object.freeze(a),Yi(f,a,l,d))}}))}function Hh(t){function n(O){return Bm(O,t)}bo!==null&&Bm(bo,t),_o!==null&&Bm(_o,t),To!==null&&Bm(To,t),Df.forEach(n),kf.forEach(n);for(var a=0;a<So.length;a++){var l=So[a];l.blockedOn===t&&(l.blockedOn=null)}for(;0<So.length&&(a=So[0],a.blockedOn===null);)$C(a),a.blockedOn===null&&So.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var d=a[l],f=a[l+1],T=d[gn]||null;if(typeof f=="function")T||XC(a);else if(T){var C=null;if(f&&f.hasAttribute("formAction")){if(d=f,T=f[gn]||null)C=T.formAction;else if(tb(d)!==null)continue}else C=T.action;typeof C=="function"?a[l+1]=C:(a.splice(l,3),l-=3),XC(a)}}}function ib(t){this._internalRoot=t}function Fm(t){this._internalRoot=t}function YC(t){t[ao]&&(t._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ti=OD(),nb=Tn,Z5=MD(),Qe=Object.assign,J5=Symbol.for("react.element"),io=Symbol.for("react.transitional.element"),uc=Symbol.for("react.portal"),cc=Symbol.for("react.fragment"),Hm=Symbol.for("react.strict_mode"),sb=Symbol.for("react.profiler"),eL=Symbol.for("react.provider"),rb=Symbol.for("react.consumer"),pr=Symbol.for("react.context"),zh=Symbol.for("react.forward_ref"),ab=Symbol.for("react.suspense"),ob=Symbol.for("react.suspense_list"),zm=Symbol.for("react.memo"),Pn=Symbol.for("react.lazy"),lb=Symbol.for("react.activity"),tL=Symbol.for("react.memo_cache_sentinel"),WC=Symbol.iterator,iL=Symbol.for("react.client.reference"),Di=Array.isArray,ne=nb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dt=Z5.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,nL=Object.freeze({pending:!1,data:null,method:null,action:null}),ub=[],cb=[],ra=-1,no=ve(null),jh=ve(null),so=ve(null),jm=ve(null),aa=Object.prototype.hasOwnProperty,db=ti.unstable_scheduleCallback,sL=ti.unstable_cancelCallback,rL=ti.unstable_shouldYield,aL=ti.unstable_requestPaint,mr=ti.unstable_now,oL=ti.unstable_getCurrentPriorityLevel,hb=ti.unstable_ImmediatePriority,fb=ti.unstable_UserBlockingPriority,dc=ti.unstable_NormalPriority,lL=ti.unstable_LowPriority,pb=ti.unstable_IdlePriority,uL=ti.log,cL=ti.unstable_setDisableYieldValue,hc=null,Fi=null,Se=null,gr=!1,Cs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Wi=Math.clz32?Math.clz32:Cu,dL=Math.log,hL=Math.LN2,Vm=256,qm=4194304,Zn=2,yr=8,oa=32,$m=268435456,ro=Math.random().toString(36).slice(2),Hi="__reactFiber$"+ro,gn="__reactProps$"+ro,ao="__reactContainer$"+ro,mb="__reactEvents$"+ro,fL="__reactListeners$"+ro,pL="__reactHandles$"+ro,QC="__reactResources$"+ro,Vh="__reactMarker$"+ro,KC=new Set,bl={},gb={},mL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},gL=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]*$"),ZC={},JC={},qh=0,eA,tA,iA,nA,sA,rA,aA;ms.__reactDisabledLog=!0;var yb,oA,vb=!1,bb=new(typeof WeakMap=="function"?WeakMap:Map),Un=null,vr=!1,yL=/[\n"\\]/g,lA=!1,uA=!1,cA=!1,dA=!1,hA=!1,fA=!1,pA=["value","defaultValue"],mA=!1,gA=/["'&<>\n\t]|^\s|\s$/,vL="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),yA="applet caption html table td th marquee object template foreignObject desc title".split(" "),bL=yA.concat(["button"]),_L="dd dt li option optgroup p rp rt".split(" "),vA={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Gm={},_b={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},bA=/([A-Z])/g,_A=/^ms-/,TL=/^(?:webkit|moz|o)[A-Z]/,SL=/^-ms-/,xL=/-(.)/g,TA=/;\s*$/,fc={},Tb={},SA=!1,xA=!1,EA=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(" ")),Xm="http://www.w3.org/1998/Math/MathML",pc="http://www.w3.org/2000/svg",EL=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"]]),Ym={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},CA={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},mc={},CL=RegExp("^(aria)-[: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]*$"),AL=RegExp("^(aria)[A-Z][: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]*$"),AA=!1,Qi={},wA=/^on./,wL=/^on[^A-Z]/,DL=RegExp("^(aria)-[: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]*$"),kL=RegExp("^(aria)[A-Z][: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]*$"),OL=/^[\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,$h=null,gc=null,yc=null,Sb=!1,br=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xb=!1;if(br)try{var Gh={};Object.defineProperty(Gh,"passive",{get:function(){xb=!0}}),window.addEventListener("test",Gh,Gh),window.removeEventListener("test",Gh,Gh)}catch{xb=!1}var oo=null,Eb=null,Wm=null,_l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qm=xi(_l),Xh=Qe({},_l,{view:0,detail:0}),RL=xi(Xh),Cb,Ab,Yh,Km=Qe({},Xh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Yh&&(Yh&&t.type==="mousemove"?(Cb=t.screenX-Yh.screenX,Ab=t.screenY-Yh.screenY):Ab=Cb=0,Yh=t),Cb)},movementY:function(t){return"movementY"in t?t.movementY:Ab}}),DA=xi(Km),ML=Qe({},Km,{dataTransfer:0}),LL=xi(ML),IL=Qe({},Xh,{relatedTarget:0}),wb=xi(IL),NL=Qe({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),PL=xi(NL),UL=Qe({},_l,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),BL=xi(UL),FL=Qe({},_l,{data:0}),kA=xi(FL),HL=kA,zL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jL={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"},VL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},qL=Qe({},Xh,{key:function(t){if(t.key){var n=zL[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Pu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?jL[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(t){return t.type==="keypress"?Pu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Pu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),$L=xi(qL),GL=Qe({},Km,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OA=xi(GL),XL=Qe({},Xh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),YL=xi(XL),WL=Qe({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),QL=xi(WL),KL=Qe({},Km,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),ZL=xi(KL),JL=Qe({},_l,{newState:0,oldState:0}),eI=xi(JL),tI=[9,13,27,32],RA=229,Db=br&&"CompositionEvent"in window,Wh=null;br&&"documentMode"in document&&(Wh=document.documentMode);var iI=br&&"TextEvent"in window&&!Wh,MA=br&&(!Db||Wh&&8<Wh&&11>=Wh),LA=32,IA=String.fromCharCode(LA),NA=!1,vc=!1,nI={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},Qh=null,Kh=null,PA=!1;br&&(PA=Xy("input")&&(!document.documentMode||9<document.documentMode));var Ki=typeof Object.is=="function"?Object.is:Qo,sI=br&&"documentMode"in document&&11>=document.documentMode,bc=null,kb=null,Zh=null,Ob=!1,_c={animationend:qr("Animation","AnimationEnd"),animationiteration:qr("Animation","AnimationIteration"),animationstart:qr("Animation","AnimationStart"),transitionrun:qr("Transition","TransitionRun"),transitionstart:qr("Transition","TransitionStart"),transitioncancel:qr("Transition","TransitionCancel"),transitionend:qr("Transition","TransitionEnd")},Rb={},UA={};br&&(UA=document.createElement("div").style,"AnimationEvent"in window||(delete _c.animationend.animation,delete _c.animationiteration.animation,delete _c.animationstart.animation),"TransitionEvent"in window||delete _c.transitionend.transition);var BA=$r("animationend"),FA=$r("animationiteration"),HA=$r("animationstart"),rI=$r("transitionrun"),aI=$r("transitionstart"),oI=$r("transitioncancel"),zA=$r("transitionend"),jA=new Map,Mb="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(" ");Mb.push("scrollEnd");var Lb=new WeakMap,Zm=1,la=2,Jn=[],Tc=0,Ib=0,lo={};Object.freeze(lo);var es=null,Sc=null,kt=0,lI=1,ki=2,zi=8,As=16,VA=64,qA=!1;try{var $A=Object.preventExtensions({})}catch{qA=!0}var xc=[],Ec=0,Jm=null,eg=0,ts=[],is=0,Tl=null,ua=1,ca="",Zi=null,qt=null,rt=!1,da=!1,ns=null,Sl=null,_r=!1,Nb=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),GA=0;if(typeof performance=="object"&&typeof performance.now=="function")var uI=performance,XA=function(){return uI.now()};else{var cI=Date;XA=function(){return cI.now()}}var Pb=ve(null),Ub=ve(null),YA={},tg=null,Cc=null,Ac=!1,dI=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},hI=ti.unstable_scheduleCallback,fI=ti.unstable_NormalPriority,oi={$$typeof:pr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},wc=ti.unstable_now,WA=-0,ig=-0,yn=-1.1,xl=-0,ng=!1,sg=!1,Jh=null,Bb=0,El=0,Dc=null,QA=ne.S;ne.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&th(t,n),QA!==null&&QA(t,n)};var Cl=ve(null),ws={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},ef=[],tf=[],nf=[],sf=[],rf=[],af=[],Al=new Set;ws.recordUnsafeLifecycleWarnings=function(t,n){Al.has(t.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&ef.push(t),t.mode&zi&&typeof n.UNSAFE_componentWillMount=="function"&&tf.push(t),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&nf.push(t),t.mode&zi&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&sf.push(t),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&rf.push(t),t.mode&zi&&typeof n.UNSAFE_componentWillUpdate=="function"&&af.push(t))},ws.flushPendingUnsafeLifecycleWarnings=function(){var t=new Set;0<ef.length&&(ef.forEach(function(C){t.add(ee(C)||"Component"),Al.add(C.type)}),ef=[]);var n=new Set;0<tf.length&&(tf.forEach(function(C){n.add(ee(C)||"Component"),Al.add(C.type)}),tf=[]);var a=new Set;0<nf.length&&(nf.forEach(function(C){a.add(ee(C)||"Component"),Al.add(C.type)}),nf=[]);var l=new Set;0<sf.length&&(sf.forEach(function(C){l.add(ee(C)||"Component"),Al.add(C.type)}),sf=[]);var d=new Set;0<rf.length&&(rf.forEach(function(C){d.add(ee(C)||"Component"),Al.add(C.type)}),rf=[]);var f=new Set;if(0<af.length&&(af.forEach(function(C){f.add(ee(C)||"Component"),Al.add(C.type)}),af=[]),0<n.size){var T=E(n);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
|
||
Please update the following components: %s`,T)}0<l.size&&(T=E(l),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
||
|
||
Please update the following components: %s`,T)),0<f.size&&(T=E(f),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
||
Please update the following components: %s`,T)),0<t.size&&(T=E(t),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`,T)),0<a.size&&(T=E(a),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
||
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`,T)),0<d.size&&(T=E(d),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`,T))};var rg=new Map,KA=new Set;ws.recordLegacyContextWarning=function(t,n){for(var a=null,l=t;l!==null;)l.mode&zi&&(a=l),l=l.return;a===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!KA.has(t.type)&&(l=rg.get(a),t.type.contextTypes!=null||t.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(l===void 0&&(l=[],rg.set(a,l)),l.push(t))},ws.flushLegacyContextWarning=function(){rg.forEach(function(t){if(t.length!==0){var n=t[0],a=new Set;t.forEach(function(d){a.add(ee(d)||"Component"),KA.add(d.type)});var l=E(a);ke(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
||
|
||
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
||
|
||
Please update the following components: %s
|
||
|
||
Learn more about this warning here: https://react.dev/link/legacy-context`,l)})}})},ws.discardPendingWarnings=function(){ef=[],tf=[],nf=[],sf=[],rf=[],af=[],rg=new Map};var of=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),ZA=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ag=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Fb={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},lf=null,og=!1,ss=0,rs=1,Ji=2,Oi=4,li=8,JA=0,ew=1,tw=2,Hb=3,uo=!1,iw=!1,zb=null,jb=!1,kc=ve(null),lg=ve(0),Oc,nw=new Set,sw=new Set,Vb=new Set,rw=new Set,co=0,Fe=null,St=null,ii=null,ug=!1,Rc=!1,wl=!1,cg=0,uf=0,ha=null,pI=0,mI=25,ie=null,as=null,fa=-1,cf=!1,dg={readContext:Dt,use:Rn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt},qb=null,aw=null,$b=null,ow=null,Tr=null,Ds=null,hg=null;qb={readContext:function(t){return Dt(t)},use:Rn,useCallback:function(t,n){return ie="useCallback",We(),qa(n),Vt(t,n)},useContext:function(t){return ie="useContext",We(),Dt(t)},useEffect:function(t,n){return ie="useEffect",We(),qa(n),te(t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",We(),qa(a),Ie(t,n,a)},useInsertionEffect:function(t,n){ie="useInsertionEffect",We(),qa(n),N(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",We(),qa(n),be(t,n)},useMemo:function(t,n){ie="useMemo",We(),qa(n);var a=ne.H;ne.H=Tr;try{return Wn(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",We();var l=ne.H;ne.H=Tr;try{return vh(t,n,a)}finally{ne.H=l}},useRef:function(t){return ie="useRef",We(),I(t)},useState:function(t){ie="useState",We();var n=ne.H;ne.H=Tr;try{return mn(t)}finally{ne.H=n}},useDebugValue:function(){ie="useDebugValue",We()},useDeferredValue:function(t,n){return ie="useDeferredValue",We(),Zr(t,n)},useTransition:function(){return ie="useTransition",We(),iv()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",We(),ml(t,n,a)},useId:function(){return ie="useId",We(),nv()},useFormState:function(t,n){return ie="useFormState",We(),Zu(),m(t,n)},useActionState:function(t,n){return ie="useActionState",We(),m(t,n)},useOptimistic:function(t){return ie="useOptimistic",We(),Th(t)},useHostTransitionStatus:gl,useMemoCache:Yn,useCacheRefresh:function(){return ie="useCacheRefresh",We(),sv()}},aw={readContext:function(t){return Dt(t)},use:Rn,useCallback:function(t,n){return ie="useCallback",fe(),Vt(t,n)},useContext:function(t){return ie="useContext",fe(),Dt(t)},useEffect:function(t,n){return ie="useEffect",fe(),te(t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",fe(),Ie(t,n,a)},useInsertionEffect:function(t,n){ie="useInsertionEffect",fe(),N(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",fe(),be(t,n)},useMemo:function(t,n){ie="useMemo",fe();var a=ne.H;ne.H=Tr;try{return Wn(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",fe();var l=ne.H;ne.H=Tr;try{return vh(t,n,a)}finally{ne.H=l}},useRef:function(t){return ie="useRef",fe(),I(t)},useState:function(t){ie="useState",fe();var n=ne.H;ne.H=Tr;try{return mn(t)}finally{ne.H=n}},useDebugValue:function(){ie="useDebugValue",fe()},useDeferredValue:function(t,n){return ie="useDeferredValue",fe(),Zr(t,n)},useTransition:function(){return ie="useTransition",fe(),iv()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",fe(),ml(t,n,a)},useId:function(){return ie="useId",fe(),nv()},useActionState:function(t,n){return ie="useActionState",fe(),m(t,n)},useFormState:function(t,n){return ie="useFormState",fe(),Zu(),m(t,n)},useOptimistic:function(t){return ie="useOptimistic",fe(),Th(t)},useHostTransitionStatus:gl,useMemoCache:Yn,useCacheRefresh:function(){return ie="useCacheRefresh",fe(),sv()}},$b={readContext:function(t){return Dt(t)},use:Rn,useCallback:function(t,n){return ie="useCallback",fe(),mi(t,n)},useContext:function(t){return ie="useContext",fe(),Dt(t)},useEffect:function(t,n){ie="useEffect",fe(),j(2048,li,t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",fe(),Pe(t,n,a)},useInsertionEffect:function(t,n){return ie="useInsertionEffect",fe(),j(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",fe(),j(4,Oi,t,n)},useMemo:function(t,n){ie="useMemo",fe();var a=ne.H;ne.H=Ds;try{return lr(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",fe();var l=ne.H;ne.H=Ds;try{return Ga(t,n,a)}finally{ne.H=l}},useRef:function(){return ie="useRef",fe(),ut().memoizedState},useState:function(){ie="useState",fe();var t=ne.H;ne.H=Ds;try{return Ga(Mn)}finally{ne.H=t}},useDebugValue:function(){ie="useDebugValue",fe()},useDeferredValue:function(t,n){return ie="useDeferredValue",fe(),Xa(t,n)},useTransition:function(){return ie="useTransition",fe(),qx()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",fe(),Ju(t,n,a)},useId:function(){return ie="useId",fe(),ut().memoizedState},useFormState:function(t){return ie="useFormState",fe(),Zu(),y(t)},useActionState:function(t){return ie="useActionState",fe(),y(t)},useOptimistic:function(t,n){return ie="useOptimistic",fe(),Sh(t,n)},useHostTransitionStatus:gl,useMemoCache:Yn,useCacheRefresh:function(){return ie="useCacheRefresh",fe(),ut().memoizedState}},ow={readContext:function(t){return Dt(t)},use:Rn,useCallback:function(t,n){return ie="useCallback",fe(),mi(t,n)},useContext:function(t){return ie="useContext",fe(),Dt(t)},useEffect:function(t,n){ie="useEffect",fe(),j(2048,li,t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",fe(),Pe(t,n,a)},useInsertionEffect:function(t,n){return ie="useInsertionEffect",fe(),j(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",fe(),j(4,Oi,t,n)},useMemo:function(t,n){ie="useMemo",fe();var a=ne.H;ne.H=hg;try{return lr(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",fe();var l=ne.H;ne.H=hg;try{return pl(t,n,a)}finally{ne.H=l}},useRef:function(){return ie="useRef",fe(),ut().memoizedState},useState:function(){ie="useState",fe();var t=ne.H;ne.H=hg;try{return pl(Mn)}finally{ne.H=t}},useDebugValue:function(){ie="useDebugValue",fe()},useDeferredValue:function(t,n){return ie="useDeferredValue",fe(),Ya(t,n)},useTransition:function(){return ie="useTransition",fe(),$x()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",fe(),Ju(t,n,a)},useId:function(){return ie="useId",fe(),ut().memoizedState},useFormState:function(t){return ie="useFormState",fe(),Zu(),x(t)},useActionState:function(t){return ie="useActionState",fe(),x(t)},useOptimistic:function(t,n){return ie="useOptimistic",fe(),dm(t,n)},useHostTransitionStatus:gl,useMemoCache:Yn,useCacheRefresh:function(){return ie="useCacheRefresh",fe(),ut().memoizedState}},Tr={readContext:function(t){return b(),Dt(t)},use:function(t){return g(),Rn(t)},useCallback:function(t,n){return ie="useCallback",g(),We(),Vt(t,n)},useContext:function(t){return ie="useContext",g(),We(),Dt(t)},useEffect:function(t,n){return ie="useEffect",g(),We(),te(t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",g(),We(),Ie(t,n,a)},useInsertionEffect:function(t,n){ie="useInsertionEffect",g(),We(),N(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",g(),We(),be(t,n)},useMemo:function(t,n){ie="useMemo",g(),We();var a=ne.H;ne.H=Tr;try{return Wn(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",g(),We();var l=ne.H;ne.H=Tr;try{return vh(t,n,a)}finally{ne.H=l}},useRef:function(t){return ie="useRef",g(),We(),I(t)},useState:function(t){ie="useState",g(),We();var n=ne.H;ne.H=Tr;try{return mn(t)}finally{ne.H=n}},useDebugValue:function(){ie="useDebugValue",g(),We()},useDeferredValue:function(t,n){return ie="useDeferredValue",g(),We(),Zr(t,n)},useTransition:function(){return ie="useTransition",g(),We(),iv()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",g(),We(),ml(t,n,a)},useId:function(){return ie="useId",g(),We(),nv()},useFormState:function(t,n){return ie="useFormState",g(),We(),m(t,n)},useActionState:function(t,n){return ie="useActionState",g(),We(),m(t,n)},useOptimistic:function(t){return ie="useOptimistic",g(),We(),Th(t)},useMemoCache:function(t){return g(),Yn(t)},useHostTransitionStatus:gl,useCacheRefresh:function(){return ie="useCacheRefresh",We(),sv()}},Ds={readContext:function(t){return b(),Dt(t)},use:function(t){return g(),Rn(t)},useCallback:function(t,n){return ie="useCallback",g(),fe(),mi(t,n)},useContext:function(t){return ie="useContext",g(),fe(),Dt(t)},useEffect:function(t,n){ie="useEffect",g(),fe(),j(2048,li,t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",g(),fe(),Pe(t,n,a)},useInsertionEffect:function(t,n){return ie="useInsertionEffect",g(),fe(),j(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",g(),fe(),j(4,Oi,t,n)},useMemo:function(t,n){ie="useMemo",g(),fe();var a=ne.H;ne.H=Ds;try{return lr(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",g(),fe();var l=ne.H;ne.H=Ds;try{return Ga(t,n,a)}finally{ne.H=l}},useRef:function(){return ie="useRef",g(),fe(),ut().memoizedState},useState:function(){ie="useState",g(),fe();var t=ne.H;ne.H=Ds;try{return Ga(Mn)}finally{ne.H=t}},useDebugValue:function(){ie="useDebugValue",g(),fe()},useDeferredValue:function(t,n){return ie="useDeferredValue",g(),fe(),Xa(t,n)},useTransition:function(){return ie="useTransition",g(),fe(),qx()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",g(),fe(),Ju(t,n,a)},useId:function(){return ie="useId",g(),fe(),ut().memoizedState},useFormState:function(t){return ie="useFormState",g(),fe(),y(t)},useActionState:function(t){return ie="useActionState",g(),fe(),y(t)},useOptimistic:function(t,n){return ie="useOptimistic",g(),fe(),Sh(t,n)},useMemoCache:function(t){return g(),Yn(t)},useHostTransitionStatus:gl,useCacheRefresh:function(){return ie="useCacheRefresh",fe(),ut().memoizedState}},hg={readContext:function(t){return b(),Dt(t)},use:function(t){return g(),Rn(t)},useCallback:function(t,n){return ie="useCallback",g(),fe(),mi(t,n)},useContext:function(t){return ie="useContext",g(),fe(),Dt(t)},useEffect:function(t,n){ie="useEffect",g(),fe(),j(2048,li,t,n)},useImperativeHandle:function(t,n,a){return ie="useImperativeHandle",g(),fe(),Pe(t,n,a)},useInsertionEffect:function(t,n){return ie="useInsertionEffect",g(),fe(),j(4,Ji,t,n)},useLayoutEffect:function(t,n){return ie="useLayoutEffect",g(),fe(),j(4,Oi,t,n)},useMemo:function(t,n){ie="useMemo",g(),fe();var a=ne.H;ne.H=Ds;try{return lr(t,n)}finally{ne.H=a}},useReducer:function(t,n,a){ie="useReducer",g(),fe();var l=ne.H;ne.H=Ds;try{return pl(t,n,a)}finally{ne.H=l}},useRef:function(){return ie="useRef",g(),fe(),ut().memoizedState},useState:function(){ie="useState",g(),fe();var t=ne.H;ne.H=Ds;try{return pl(Mn)}finally{ne.H=t}},useDebugValue:function(){ie="useDebugValue",g(),fe()},useDeferredValue:function(t,n){return ie="useDeferredValue",g(),fe(),Ya(t,n)},useTransition:function(){return ie="useTransition",g(),fe(),$x()},useSyncExternalStore:function(t,n,a){return ie="useSyncExternalStore",g(),fe(),Ju(t,n,a)},useId:function(){return ie="useId",g(),fe(),ut().memoizedState},useFormState:function(t){return ie="useFormState",g(),fe(),x(t)},useActionState:function(t){return ie="useActionState",g(),fe(),x(t)},useOptimistic:function(t,n){return ie="useOptimistic",g(),fe(),dm(t,n)},useMemoCache:function(t){return g(),Yn(t)},useHostTransitionStatus:gl,useCacheRefresh:function(){return ie="useCacheRefresh",fe(),ut().memoizedState}};var lw={"react-stack-bottom-frame":function(t,n,a){var l=vr;vr=!0;try{return t(n,a)}finally{vr=l}}},Gb=lw["react-stack-bottom-frame"].bind(lw),uw={"react-stack-bottom-frame":function(t){var n=vr;vr=!0;try{return t.render()}finally{vr=n}}},cw=uw["react-stack-bottom-frame"].bind(uw),dw={"react-stack-bottom-frame":function(t,n){try{n.componentDidMount()}catch(a){_t(t,t.return,a)}}},Xb=dw["react-stack-bottom-frame"].bind(dw),hw={"react-stack-bottom-frame":function(t,n,a,l,d){try{n.componentDidUpdate(a,l,d)}catch(f){_t(t,t.return,f)}}},fw=hw["react-stack-bottom-frame"].bind(hw),pw={"react-stack-bottom-frame":function(t,n){var a=n.stack;t.componentDidCatch(n.value,{componentStack:a!==null?a:""})}},gI=pw["react-stack-bottom-frame"].bind(pw),mw={"react-stack-bottom-frame":function(t,n,a){try{a.componentWillUnmount()}catch(l){_t(t,n,l)}}},gw=mw["react-stack-bottom-frame"].bind(mw),yw={"react-stack-bottom-frame":function(t){t.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",t.resourceKind);var n=t.create;return t=t.inst,n=n(),t.destroy=n}},yI=yw["react-stack-bottom-frame"].bind(yw),vw={"react-stack-bottom-frame":function(t,n,a){try{a()}catch(l){_t(t,n,l)}}},vI=vw["react-stack-bottom-frame"].bind(vw),bw={"react-stack-bottom-frame":function(t){var n=t._init;return n(t._payload)}},ho=bw["react-stack-bottom-frame"].bind(bw),Mc=null,df=0,Xe=null,Yb,_w=Yb=!1,Tw={},Sw={},xw={};p=function(t,n,a){if(a!==null&&typeof a=="object"&&a._store&&(!a._store.validated&&a.key==null||a._store.validated===2)){if(typeof a._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");a._store.validated=1;var l=ee(t),d=l||"null";if(!Tw[d]){Tw[d]=!0,a=a._owner,t=t._debugOwner;var f="";t&&typeof t.tag=="number"&&(d=ee(t))&&(f=`
|
||
|
||
Check the render method of \``+d+"`."),f||l&&(f=`
|
||
|
||
Check the top-level render call using <`+l+">.");var T="";a!=null&&t!==a&&(l=null,typeof a.tag=="number"?l=ee(a):typeof a.name=="string"&&(l=a.name),l&&(T=" It was passed a child from "+l+".")),ke(n,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',f,T)})}}};var Lc=Wx(!0),Ew=Wx(!1),os=ve(null),Sr=null,Ic=1,hf=2,ui=ve(0),Cw={},Aw=new Set,ww=new Set,Dw=new Set,kw=new Set,Ow=new Set,Rw=new Set,Mw=new Set,Lw=new Set,Iw=new Set,Nw=new Set;Object.freeze(Cw);var Wb={enqueueSetState:function(t,n,a){t=t._reactInternals;var l=Nn(t),d=pn(l);d.payload=n,a!=null&&(av(a),d.callback=a),n=rr(t,d,l),n!==null&&(Qt(n,t,l),Va(n,t,l)),Vs(t,l)},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var l=Nn(t),d=pn(l);d.tag=ew,d.payload=n,a!=null&&(av(a),d.callback=a),n=rr(t,d,l),n!==null&&(Qt(n,t,l),Va(n,t,l)),Vs(t,l)},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=Nn(t),l=pn(a);l.tag=tw,n!=null&&(av(n),l.callback=n),n=rr(t,l,a),n!==null&&(Qt(n,t,a),Va(n,t,a)),Se!==null&&typeof Se.markForceUpdateScheduled=="function"&&Se.markForceUpdateScheduled(t,a)}},Qb=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Nc=null,Kb=null,Pw=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),yi=!1,Uw={},Bw={},Fw={},Hw={},Pc=!1,zw={},Zb={},Jb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jw=!1,Vw=null;Vw=new Set;var pa=!1,Kt=!1,e_=!1,qw=typeof WeakSet=="function"?WeakSet:Set,vi=null,Uc=null,Bc=null,ni=null,vn=!1,ks=null,ff=8192,bI={getCacheForType:function(t){var n=Dt(oi),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},getOwner:function(){return Un}};if(typeof Symbol=="function"&&Symbol.for){var pf=Symbol.for;pf("selector.component"),pf("selector.has_pseudo_class"),pf("selector.role"),pf("selector.test_id"),pf("selector.text")}var _I=[],TI=typeof WeakMap=="function"?WeakMap:Map,Bn=0,en=2,Os=4,ma=0,mf=1,Fc=2,t_=3,Dl=4,fg=6,$w=5,ht=Bn,Ct=null,Ze=null,Je=0,bn=0,gf=1,kl=2,yf=3,Gw=4,i_=5,Hc=6,vf=7,n_=8,Ol=9,gt=bn,Fn=null,fo=!1,zc=!1,s_=!1,xr=0,$t=ma,po=0,mo=0,r_=0,Hn=0,Rl=0,bf=null,tn=null,pg=!1,a_=0,Xw=300,mg=1/0,Yw=500,_f=null,go=null,SI=0,xI=1,EI=2,Ml=0,Ww=1,Qw=2,Kw=3,CI=4,o_=5,Ri=0,yo=null,jc=null,vo=0,l_=0,u_=null,Zw=null,AI=50,Tf=0,c_=null,d_=!1,gg=!1,wI=50,Ll=0,Sf=null,Vc=!1,yg=null,Jw=!1,eD=new Set,DI={},vg=null,qc=null,h_=!1,f_=!1,bg=!1,p_=!1,Il=0,m_={};(function(){for(var t=0;t<Mb.length;t++){var n=Mb[t],a=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),kn(a,"on"+n)}kn(BA,"onAnimationEnd"),kn(FA,"onAnimationIteration"),kn(HA,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(rI,"onTransitionRun"),kn(aI,"onTransitionStart"),kn(oI,"onTransitionCancel"),kn(zA,"onTransitionEnd")})(),Te("onMouseEnter",["mouseout","mouseover"]),Te("onMouseLeave",["mouseout","mouseover"]),Te("onPointerEnter",["pointerout","pointerover"]),Te("onPointerLeave",["pointerout","pointerover"]),ye("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ye("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ye("onBeforeInput",["compositionend","keypress","textInput","paste"]),ye("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ye("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ye("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xf="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(" "),g_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xf)),_g="_reactListening"+Math.random().toString(36).slice(2),tD=!1,iD=!1,Tg=!1,nD=!1,Sg=!1,xg=!1,sD=!1,Eg={},kI=/\r\n?/g,OI=/\u0000|\uFFFD/g,Nl="http://www.w3.org/1999/xlink",y_="http://www.w3.org/XML/1998/namespace",RI="javascript:throw new Error('React form unexpectedly submitted.')",MI="suppressHydrationWarning",Cg="$",Ag="/$",ga="$?",Ef="$!",LI=1,II=2,NI=4,v_="F!",rD="F",aD="complete",PI="style",ya=0,$c=1,wg=2,b_=null,__=null,oD={dialog:!0,webview:!0},T_=null,lD=typeof setTimeout=="function"?setTimeout:void 0,UI=typeof clearTimeout=="function"?clearTimeout:void 0,Pl=-1,uD=typeof Promise=="function"?Promise:void 0,BI=typeof queueMicrotask=="function"?queueMicrotask:typeof uD<"u"?function(t){return uD.resolve(null).then(t).catch(x5)}:lD,S_=null,Ul=0,Cf=1,cD=2,dD=3,ls=4,us=new Map,hD=new Set,va=dt.d;dt.d={f:function(){var t=va.f(),n=nc();return t||n},r:function(t){var n=wn(t);n!==null&&n.tag===5&&n.type==="form"?Vx(n):va.r(t)},D:function(t){va.D(t),MC("dns-prefetch",t,null)},C:function(t,n){va.C(t,n),MC("preconnect",t,n)},L:function(t,n,a){va.L(t,n,a);var l=Gc;if(l&&t&&n){var d='link[rel="preload"][as="'+ei(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+ei(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+ei(a.imageSizes)+'"]')):d+='[href="'+ei(t)+'"]';var f=d;switch(n){case"style":f=oc(t);break;case"script":f=lc(t)}us.has(f)||(t=Qe({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),us.set(f,t),l.querySelector(d)!==null||n==="style"&&l.querySelector(Uh(f))||n==="script"&&l.querySelector(Bh(f))||(n=l.createElement("link"),wi(n,"link",t),G(n),l.head.appendChild(n)))}},m:function(t,n){va.m(t,n);var a=Gc;if(a&&t){var l=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+ei(l)+'"][href="'+ei(t)+'"]',f=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=lc(t)}if(!us.has(f)&&(t=Qe({rel:"modulepreload",href:t},n),us.set(f,t),a.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bh(f)))return}l=a.createElement("link"),wi(l,"link",t),G(l),a.head.appendChild(l)}}},X:function(t,n){va.X(t,n);var a=Gc;if(a&&t){var l=D(a).hoistableScripts,d=lc(t),f=l.get(d);f||(f=a.querySelector(Bh(d)),f||(t=Qe({src:t,async:!0},n),(n=us.get(d))&&Wv(t,n),f=a.createElement("script"),G(f),wi(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}},S:function(t,n,a){va.S(t,n,a);var l=Gc;if(l&&t){var d=D(l).hoistableStyles,f=oc(t);n=n||"default";var T=d.get(f);if(!T){var C={loading:Ul,preload:null};if(T=l.querySelector(Uh(f)))C.loading=Cf|ls;else{t=Qe({rel:"stylesheet",href:t,"data-precedence":n},a),(a=us.get(f))&&Yv(t,a);var O=T=l.createElement("link");G(O),wi(O,"link",t),O._p=new Promise(function(L,K){O.onload=L,O.onerror=K}),O.addEventListener("load",function(){C.loading|=Cf}),O.addEventListener("error",function(){C.loading|=cD}),C.loading|=ls,Nm(T,n,l)}T={type:"stylesheet",instance:T,count:1,state:C},d.set(f,T)}}},M:function(t,n){va.M(t,n);var a=Gc;if(a&&t){var l=D(a).hoistableScripts,d=lc(t),f=l.get(d);f||(f=a.querySelector(Bh(d)),f||(t=Qe({src:t,async:!0,type:"module"},n),(n=us.get(d))&&Wv(t,n),f=a.createElement("script"),G(f),wi(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}};var Gc=typeof document>"u"?null:document,Dg=null,Af=null,x_=null,kg=null,Bl=nL,wf={$$typeof:pr,Provider:null,Consumer:null,_currentValue:Bl,_currentValue2:Bl,_threadCount:0},fD="%c%s%c ",pD="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",mD="",Og=" ",FI=Function.prototype.bind,gD=!1,yD=null,vD=null,bD=null,_D=null,TD=null,SD=null,xD=null,ED=null,CD=null;yD=function(t,n,a,l){n=s(t,n),n!==null&&(a=e(n.memoizedState,a,0,l),n.memoizedState=a,n.baseState=a,t.memoizedProps=Qe({},t.memoizedProps),a=ri(t,2),a!==null&&Qt(a,t,2))},vD=function(t,n,a){n=s(t,n),n!==null&&(a=o(n.memoizedState,a,0),n.memoizedState=a,n.baseState=a,t.memoizedProps=Qe({},t.memoizedProps),a=ri(t,2),a!==null&&Qt(a,t,2))},bD=function(t,n,a,l){n=s(t,n),n!==null&&(a=i(n.memoizedState,a,l),n.memoizedState=a,n.baseState=a,t.memoizedProps=Qe({},t.memoizedProps),a=ri(t,2),a!==null&&Qt(a,t,2))},_D=function(t,n,a){t.pendingProps=e(t.memoizedProps,n,0,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ri(t,2),n!==null&&Qt(n,t,2)},TD=function(t,n){t.pendingProps=o(t.memoizedProps,n,0),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ri(t,2),n!==null&&Qt(n,t,2)},SD=function(t,n,a){t.pendingProps=i(t.memoizedProps,n,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ri(t,2),n!==null&&Qt(n,t,2)},xD=function(t){var n=ri(t,2);n!==null&&Qt(n,t,2)},ED=function(t){c=t},CD=function(t){u=t};var Rg=!0,Mg=null,E_=!1,bo=null,_o=null,To=null,Df=new Map,kf=new Map,So=[],HI="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(" "),Lg=null;if(Fm.prototype.render=ib.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var a=arguments;typeof a[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):z(a[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof a[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),a=t;var l=n.current,d=Nn(l);Kv(l,d,a,n,null,null)},Fm.prototype.unmount=ib.prototype.unmount=function(){var t=arguments;if(typeof t[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),t=this._internalRoot,t!==null){this._internalRoot=null;var n=t.containerInfo;(ht&(en|Os))!==Bn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Kv(t.current,2,null,t,null,null),nc(),n[ao]=null}},Fm.prototype.unstable_scheduleHydration=function(t){if(t){var n=Na();t={blockedOn:null,target:t,priority:n};for(var a=0;a<So.length&&n!==0&&n<So[a].priority;a++);So.splice(a,0,t),a===0&&$C(t)}},function(){var t=nb.version;if(t!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
||
- react: `+(t+`
|
||
- react-dom: 19.1.0
|
||
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),dt.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error("Unable to find node on an unmounted component."):(t=Object.keys(t).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+t));return t=W(n),t=t!==null?Z(t):null,t=t===null?null:t.stateNode,t},!function(){var t={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:ne,reconcilerVersion:"19.1.0"};return t.overrideHookState=yD,t.overrideHookStateDeletePath=vD,t.overrideHookStateRenamePath=bD,t.overrideProps=_D,t.overridePropsDeletePath=TD,t.overridePropsRenamePath=SD,t.scheduleUpdate=xD,t.setErrorHandler=ED,t.setSuspenseHandler=CD,t.scheduleRefresh=P,t.scheduleRoot=R,t.setRefreshHandler=w,t.getCurrentFiber=G5,t.getLaneLabelMap=X5,t.injectProfilingHooks=Lr,Ut(t)}()&&br&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var AD=window.location.protocol;/^(https?|file):$/.test(AD)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(AD==="file:"?`
|
||
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Qc.createRoot=function(t,n){if(!z(t))throw Error("Target container is not a DOM element.");YC(t);var a=!1,l="",d=Jx,f=eE,T=tE,C=null;return n!=null&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n=="object"&&n!==null&&n.$$typeof===io&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
||
|
||
let root = createRoot(domContainer);
|
||
root.render(<App />);`),n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(T=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(C=n.unstable_transitionCallbacks)),n=FC(t,1,!1,null,null,a,l,d,f,T,C,null),t[ao]=n.current,Bv(t),new ib(n)},Qc.hydrateRoot=function(t,n,a){if(!z(t))throw Error("Target container is not a DOM element.");YC(t),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var l=!1,d="",f=Jx,T=eE,C=tE,O=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(O=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),n=FC(t,1,!0,n,a??null,l,d,f,T,C,O,L),n.context=HC(null),a=n.current,l=Nn(a),l=Gs(l),d=pn(l),d.callback=null,rr(a,d,l),a=l,n.current.lanes=a,$s(n,a),hr(n),t[ao]=n.current,Bv(t),new Fm(n)},Qc.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qc}O_.exports=LD();var ID=O_.exports;const jI="";var Kc;typeof window<"u"?Kc=window:typeof Of<"u"?Kc=Of:typeof self<"u"?Kc=self:Kc={};var Mf=Kc;const U=Xc(Mf),ND=C_(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var P_=typeof Of<"u"?Of:typeof window<"u"?window:{},PD=ND,Zc;typeof document<"u"?Zc=document:(Zc=P_["__GLOBAL_DOCUMENT_CACHE@4"],Zc||(Zc=P_["__GLOBAL_DOCUMENT_CACHE@4"]=PD));var U_=Zc;const me=Xc(U_);var Ug={exports:{}};function Ft(){return Ft=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(s[r]=i[r])}return s},Ft.apply(null,arguments)}const UD=C_(Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ft}},Symbol.toStringTag,{value:"Module"})));var BD=HD,FD=Object.prototype.toString;function HD(s){if(!s)return!1;var e=FD.call(s);return e==="[object Function]"||typeof s=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(s===window.setTimeout||s===window.alert||s===window.confirm||s===window.prompt)}function zD(s,e){var i=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i)return(i=i.call(s)).next.bind(i);if(Array.isArray(s)||(i=jD(s))||e&&s&&typeof s.length=="number"){i&&(s=i);var r=0;return function(){return r>=s.length?{done:!0}:{done:!1,value:s[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jD(s,e){if(s){if(typeof s=="string")return B_(s,e);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return B_(s,e)}}function B_(s,e){(e==null||e>s.length)&&(e=s.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=s[i];return r}var VD=function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(r,o){this.typeToInterceptorsMap_.has(r)||this.typeToInterceptorsMap_.set(r,new Set);var u=this.typeToInterceptorsMap_.get(r);return u.has(o)?!1:(u.add(o),!0)},e.removeInterceptor=function(r,o){var u=this.typeToInterceptorsMap_.get(r);return u&&u.has(o)?(u.delete(o),!0):!1},e.clearInterceptorsByType=function(r){var o=this.typeToInterceptorsMap_.get(r);return o?(this.typeToInterceptorsMap_.delete(r),this.typeToInterceptorsMap_.set(r,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(r){return this.typeToInterceptorsMap_.get(r)||new Set},e.execute=function(r,o){for(var u=this.getForType(r),c=zD(u),p;!(p=c()).done;){var g=p.value;try{o=g(o)}catch{}}return o},s}(),qD=VD,$D=function(){function s(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(r){this.maxAttempts_=r},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(r){this.delayFactor_=r},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(r){this.fuzzFactor_=r},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(r){this.initialDelay_=r},e.createRetry=function(r){var o=r===void 0?{}:r,u=o.maxAttempts,c=o.delayFactor,p=o.fuzzFactor,g=o.initialDelay;return new GD({maxAttempts:u||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:p||this.fuzzFactor_,initialDelay:g||this.initialDelay_})},s}(),GD=function(){function s(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1}var e=s.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var r=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+r},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var r=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return r+Math.random()*(o-r)},s}(),XD=$D,YD=Mf,WD=function(e,i){return i===void 0&&(i=!1),function(r,o,u){if(r){e(r);return}if(o.statusCode>=400&&o.statusCode<=599){var c=u;if(i)if(YD.TextDecoder){var p=QD(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(p).decode(u)}catch{}}else c=String.fromCharCode.apply(null,new Uint8Array(u));e({cause:c});return}e(null,u)}};function QD(s){return s===void 0&&(s=""),s.toLowerCase().split(";").reduce(function(e,i){var r=i.split("="),o=r[0],u=r[1];return o.trim()==="charset"?u.trim():e},"utf-8")}var KD=WD,F_=Mf,ZD=UD,JD=BD,H_=qD,ek=XD;Gt.httpHandler=KD,Gt.requestInterceptorsStorage=new H_,Gt.responseInterceptorsStorage=new H_,Gt.retryManager=new ek;/**
|
||
* @license
|
||
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
|
||
* Copyright (c) 2014 David Björklund
|
||
* Available under the MIT license
|
||
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
|
||
*/var tk=function(e){var i={};return e&&e.trim().split(`
|
||
`).forEach(function(r){var o=r.indexOf(":"),u=r.slice(0,o).trim().toLowerCase(),c=r.slice(o+1).trim();typeof i[u]>"u"?i[u]=c:Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]}),i};Ug.exports=Gt,Ug.exports.default=Gt,Gt.XMLHttpRequest=F_.XMLHttpRequest||rk,Gt.XDomainRequest="withCredentials"in new Gt.XMLHttpRequest?Gt.XMLHttpRequest:F_.XDomainRequest,ik(["get","put","post","patch","head","delete"],function(s){Gt[s==="delete"?"del":s]=function(e,i,r){return i=z_(e,i,r),i.method=s.toUpperCase(),Bg(i)}});function ik(s,e){for(var i=0;i<s.length;i++)e(s[i])}function nk(s){for(var e in s)if(s.hasOwnProperty(e))return!1;return!0}function z_(s,e,i){var r=s;return JD(e)?(i=e,typeof s=="string"&&(r={uri:s})):r=ZD({},e,{uri:s}),r.callback=i,r}function Gt(s,e,i){return e=z_(s,e,i),Bg(e)}function Bg(s){if(typeof s.callback>"u")throw new Error("callback argument missing");if(s.requestType&&Gt.requestInterceptorsStorage.getIsEnabled()){var e={uri:s.uri||s.url,headers:s.headers||{},body:s.body,metadata:s.metadata||{},retry:s.retry,timeout:s.timeout},i=Gt.requestInterceptorsStorage.execute(s.requestType,e);s.uri=i.uri,s.headers=i.headers,s.body=i.body,s.metadata=i.metadata,s.retry=i.retry,s.timeout=i.timeout}var r=!1,o=function(Z,le,J){r||(r=!0,s.callback(Z,le,J))};function u(){b.readyState===4&&!Gt.responseInterceptorsStorage.getIsEnabled()&&setTimeout(g,0)}function c(){var W=void 0;if(b.response?W=b.response:W=b.responseText||sk(b),H)try{W=JSON.parse(W)}catch{}return W}function p(W){if(clearTimeout(X),clearTimeout(s.retryTimeout),W instanceof Error||(W=new Error(""+(W||"Unknown XMLHttpRequest Error"))),W.statusCode=0,!E&&Gt.retryManager.getIsEnabled()&&s.retry&&s.retry.shouldRetry()){s.retryTimeout=setTimeout(function(){s.retry.moveToNextAttempt(),s.xhr=b,Bg(s)},s.retry.getCurrentFuzzedDelay());return}if(s.requestType&&Gt.responseInterceptorsStorage.getIsEnabled()){var Z={headers:$.headers||{},body:$.body,responseUrl:b.responseURL,responseType:b.responseType},le=Gt.responseInterceptorsStorage.execute(s.requestType,Z);$.body=le.body,$.headers=le.headers}return o(W,$)}function g(){if(!E){var W;clearTimeout(X),clearTimeout(s.retryTimeout),s.useXDR&&b.status===void 0?W=200:W=b.status===1223?204:b.status;var Z=$,le=null;if(W!==0?(Z={body:c(),statusCode:W,method:R,headers:{},url:A,rawRequest:b},b.getAllResponseHeaders&&(Z.headers=tk(b.getAllResponseHeaders()))):le=new Error("Internal XMLHttpRequest Error"),s.requestType&&Gt.responseInterceptorsStorage.getIsEnabled()){var J={headers:Z.headers||{},body:Z.body,responseUrl:b.responseURL,responseType:b.responseType},Y=Gt.responseInterceptorsStorage.execute(s.requestType,J);Z.body=Y.body,Z.headers=Y.headers}return o(le,Z,Z.body)}}var b=s.xhr||null;b||(s.cors||s.useXDR?b=new Gt.XDomainRequest:b=new Gt.XMLHttpRequest);var S,E,A=b.url=s.uri||s.url,R=b.method=s.method||"GET",P=s.body||s.data,w=b.headers=s.headers||{},z=!!s.sync,H=!1,X,$={body:void 0,headers:{},statusCode:0,method:R,url:A,rawRequest:b};if("json"in s&&s.json!==!1&&(H=!0,w.accept||w.Accept||(w.Accept="application/json"),R!=="GET"&&R!=="HEAD"&&(w["content-type"]||w["Content-Type"]||(w["Content-Type"]="application/json"),P=JSON.stringify(s.json===!0?P:s.json))),b.onreadystatechange=u,b.onload=g,b.onerror=p,b.onprogress=function(){},b.onabort=function(){E=!0,clearTimeout(s.retryTimeout)},b.ontimeout=p,b.open(R,A,!z,s.username,s.password),z||(b.withCredentials=!!s.withCredentials),!z&&s.timeout>0&&(X=setTimeout(function(){if(!E){E=!0,b.abort("timeout");var W=new Error("XMLHttpRequest timeout");W.code="ETIMEDOUT",p(W)}},s.timeout)),b.setRequestHeader)for(S in w)w.hasOwnProperty(S)&&b.setRequestHeader(S,w[S]);else if(s.headers&&!nk(s.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in s&&(b.responseType=s.responseType),"beforeSend"in s&&typeof s.beforeSend=="function"&&s.beforeSend(b),b.send(P||null),b}function sk(s){try{if(s.responseType==="document")return s.responseXML;var e=s.responseXML&&s.responseXML.documentElement.nodeName==="parsererror";if(s.responseType===""&&!e)return s.responseXML}catch{}return null}function rk(){}var ak=Ug.exports;const j_=Xc(ak);var V_={exports:{}},q_=U_,Fg=Object.create||function(){function s(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return s.prototype=e,new s}}();function Sn(s,e){this.name="ParsingError",this.code=s.code,this.message=e||s.message}Sn.prototype=Fg(Error.prototype),Sn.prototype.constructor=Sn,Sn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Hg(s){function e(r,o,u,c){return(r|0)*3600+(o|0)*60+(u|0)+(c|0)/1e3}var i=s.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function Jc(){this.values=Fg(null)}Jc.prototype={set:function(s,e){!this.get(s)&&e!==""&&(this.values[s]=e)},get:function(s,e,i){return i?this.has(s)?this.values[s]:e[i]:this.has(s)?this.values[s]:e},has:function(s){return s in this.values},alt:function(s,e,i){for(var r=0;r<i.length;++r)if(e===i[r]){this.set(s,e);break}},integer:function(s,e){/^-?\d+$/.test(e)&&this.set(s,parseInt(e,10))},percent:function(s,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(s,e),!0):!1}};function ed(s,e,i,r){var o=r?s.split(r):[s];for(var u in o)if(typeof o[u]=="string"){var c=o[u].split(i);if(c.length===2){var p=c[0].trim(),g=c[1].trim();e(p,g)}}}function ok(s,e,i){var r=s;function o(){var p=Hg(s);if(p===null)throw new Sn(Sn.Errors.BadTimeStamp,"Malformed timestamp: "+r);return s=s.replace(/^[^\sa-zA-Z-]+/,""),p}function u(p,g){var b=new Jc;ed(p,function(S,E){switch(S){case"region":for(var A=i.length-1;A>=0;A--)if(i[A].id===E){b.set(S,i[A].region);break}break;case"vertical":b.alt(S,E,["rl","lr"]);break;case"line":var R=E.split(","),P=R[0];b.integer(S,P),b.percent(S,P)&&b.set("snapToLines",!1),b.alt(S,P,["auto"]),R.length===2&&b.alt("lineAlign",R[1],["start","center","end"]);break;case"position":R=E.split(","),b.percent(S,R[0]),R.length===2&&b.alt("positionAlign",R[1],["start","center","end"]);break;case"size":b.percent(S,E);break;case"align":b.alt(S,E,["start","center","end","left","right"]);break}},/:/,/\s/),g.region=b.get("region",null),g.vertical=b.get("vertical","");try{g.line=b.get("line","auto")}catch{}g.lineAlign=b.get("lineAlign","start"),g.snapToLines=b.get("snapToLines",!0),g.size=b.get("size",100);try{g.align=b.get("align","center")}catch{g.align=b.get("align","middle")}try{g.position=b.get("position","auto")}catch{g.position=b.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},g.align)}g.positionAlign=b.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},g.align)}function c(){s=s.replace(/^\s+/,"")}if(c(),e.startTime=o(),c(),s.substr(0,3)!=="-->")throw new Sn(Sn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+r);s=s.substr(3),c(),e.endTime=o(),c(),u(s,e)}var zg=q_.createElement&&q_.createElement("textarea"),lk={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},$_={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},uk={v:"title",lang:"lang"},G_={rt:"ruby"};function X_(s,e){function i(){if(!e)return null;function P(z){return e=e.substr(z.length),z}var w=e.match(/^([^<]*)(<[^>]*>?)?/);return P(w[1]?w[1]:w[2])}function r(P){return zg.innerHTML=P,P=zg.textContent,zg.textContent="",P}function o(P,w){return!G_[w.localName]||G_[w.localName]===P.localName}function u(P,w){var z=lk[P];if(!z)return null;var H=s.document.createElement(z),X=uk[P];return X&&w&&(H[X]=w.trim()),H}for(var c=s.document.createElement("div"),p=c,g,b=[];(g=i())!==null;){if(g[0]==="<"){if(g[1]==="/"){b.length&&b[b.length-1]===g.substr(2).replace(">","")&&(b.pop(),p=p.parentNode);continue}var S=Hg(g.substr(1,g.length-2)),E;if(S){E=s.document.createProcessingInstruction("timestamp",S),p.appendChild(E);continue}var A=g.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!A||(E=u(A[1],A[3]),!E)||!o(p,E))continue;if(A[2]){var R=A[2].split(".");R.forEach(function(P){var w=/^bg_/.test(P),z=w?P.slice(3):P;if($_.hasOwnProperty(z)){var H=w?"background-color":"color",X=$_[z];E.style[H]=X}}),E.className=R.join(" ")}b.push(A[1]),p.appendChild(E),p=E;continue}p.appendChild(s.document.createTextNode(r(g)))}return c}var Y_=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function ck(s){for(var e=0;e<Y_.length;e++){var i=Y_[e];if(s>=i[0]&&s<=i[1])return!0}return!1}function dk(s){var e=[],i="",r;if(!s||!s.childNodes)return"ltr";function o(p,g){for(var b=g.childNodes.length-1;b>=0;b--)p.push(g.childNodes[b])}function u(p){if(!p||!p.length)return null;var g=p.pop(),b=g.textContent||g.innerText;if(b){var S=b.match(/^.*(\n|\r)/);return S?(p.length=0,S[0]):b}if(g.tagName==="ruby")return u(p);if(g.childNodes)return o(p,g),u(p)}for(o(e,s);i=u(e);)for(var c=0;c<i.length;c++)if(r=i.charCodeAt(c),ck(r))return"rtl";return"ltr"}function hk(s){if(typeof s.line=="number"&&(s.snapToLines||s.line>=0&&s.line<=100))return s.line;if(!s.track||!s.track.textTrackList||!s.track.textTrackList.mediaElement)return-1;for(var e=s.track,i=e.textTrackList,r=0,o=0;o<i.length&&i[o]!==e;o++)i[o].mode==="showing"&&r++;return++r*-1}function Lf(){}Lf.prototype.applyStyles=function(s,e){e=e||this.div;for(var i in s)s.hasOwnProperty(i)&&(e.style[i]=s[i])},Lf.prototype.formatStyle=function(s,e){return s===0?0:s+e};function If(s,e,i){Lf.call(this),this.cue=e,this.cueDiv=X_(s,e.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=s.document.createElement("div"),r={direction:dk(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var o=0;switch(e.positionAlign){case"start":case"line-left":o=e.position;break;case"center":o=e.position-e.size/2;break;case"end":case"line-right":o=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(u){this.applyStyles({top:this.formatStyle(u.top,"px"),bottom:this.formatStyle(u.bottom,"px"),left:this.formatStyle(u.left,"px"),right:this.formatStyle(u.right,"px"),height:this.formatStyle(u.height,"px"),width:this.formatStyle(u.width,"px")})}}If.prototype=Fg(Lf.prototype),If.prototype.constructor=If;function ji(s){var e,i,r,o;if(s.div){i=s.div.offsetHeight,r=s.div.offsetWidth,o=s.div.offsetTop;var u=(u=s.div.childNodes)&&(u=u[0])&&u.getClientRects&&u.getClientRects();s=s.div.getBoundingClientRect(),e=u?Math.max(u[0]&&u[0].height||0,s.height/u.length):0}this.left=s.left,this.right=s.right,this.top=s.top||o,this.height=s.height||i,this.bottom=s.bottom||o+(s.height||i),this.width=s.width||r,this.lineHeight=e!==void 0?e:s.lineHeight}ji.prototype.move=function(s,e){switch(e=e!==void 0?e:this.lineHeight,s){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}},ji.prototype.overlaps=function(s){return this.left<s.right&&this.right>s.left&&this.top<s.bottom&&this.bottom>s.top},ji.prototype.overlapsAny=function(s){for(var e=0;e<s.length;e++)if(this.overlaps(s[e]))return!0;return!1},ji.prototype.within=function(s){return this.top>=s.top&&this.bottom<=s.bottom&&this.left>=s.left&&this.right<=s.right},ji.prototype.overlapsOppositeAxis=function(s,e){switch(e){case"+x":return this.left<s.left;case"-x":return this.right>s.right;case"+y":return this.top<s.top;case"-y":return this.bottom>s.bottom}},ji.prototype.intersectPercentage=function(s){var e=Math.max(0,Math.min(this.right,s.right)-Math.max(this.left,s.left)),i=Math.max(0,Math.min(this.bottom,s.bottom)-Math.max(this.top,s.top)),r=e*i;return r/(this.height*this.width)},ji.prototype.toCSSCompatValues=function(s){return{top:this.top-s.top,bottom:s.bottom-this.bottom,left:this.left-s.left,right:s.right-this.right,height:this.height,width:this.width}},ji.getSimpleBoxPosition=function(s){var e=s.div?s.div.offsetHeight:s.tagName?s.offsetHeight:0,i=s.div?s.div.offsetWidth:s.tagName?s.offsetWidth:0,r=s.div?s.div.offsetTop:s.tagName?s.offsetTop:0;s=s.div?s.div.getBoundingClientRect():s.tagName?s.getBoundingClientRect():s;var o={left:s.left,right:s.right,top:s.top||r,height:s.height||e,bottom:s.bottom||r+(s.height||e),width:s.width||i};return o};function fk(s,e,i,r){function o(z,H){for(var X,$=new ji(z),W=1,Z=0;Z<H.length;Z++){for(;z.overlapsOppositeAxis(i,H[Z])||z.within(i)&&z.overlapsAny(r);)z.move(H[Z]);if(z.within(i))return z;var le=z.intersectPercentage(i);W>le&&(X=new ji(z),W=le),z=new ji($)}return X||$}var u=new ji(e),c=e.cue,p=hk(c),g=[];if(c.snapToLines){var b;switch(c.vertical){case"":g=["+y","-y"],b="height";break;case"rl":g=["+x","-x"],b="width";break;case"lr":g=["-x","+x"],b="width";break}var S=u.lineHeight,E=S*Math.round(p),A=i[b]+S,R=g[0];Math.abs(E)>A&&(E=E<0?-1:1,E*=Math.ceil(A/S)*S),p<0&&(E+=c.vertical===""?i.height:i.width,g=g.reverse()),u.move(R,E)}else{var P=u.lineHeight/i.height*100;switch(c.lineAlign){case"center":p-=P/2;break;case"end":p-=P;break}switch(c.vertical){case"":e.applyStyles({top:e.formatStyle(p,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(p,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(p,"%")});break}g=["+y","-x","+x","-y"],u=new ji(e)}var w=o(u,g);e.move(w.toCSSCompatValues(i))}function Fl(){}Fl.StringDecoder=function(){return{decode:function(s){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))}}},Fl.convertCueToDOMTree=function(s,e){return!s||!e?null:X_(s,e)};var pk=.05,mk="sans-serif",gk="1.5%";Fl.processCues=function(s,e,i){if(!s||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var r=s.document.createElement("div");r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin=gk,i.appendChild(r);function o(S){for(var E=0;E<S.length;E++)if(S[E].hasBeenReset||!S[E].displayState)return!0;return!1}if(!o(e)){for(var u=0;u<e.length;u++)r.appendChild(e[u].displayState);return}var c=[],p=ji.getSimpleBoxPosition(r),g=Math.round(p.height*pk*100)/100,b={font:g+"px "+mk};(function(){for(var S,E,A=0;A<e.length;A++)E=e[A],S=new If(s,E,b),r.appendChild(S.div),fk(s,S,p,c),E.displayState=S.div,c.push(ji.getSimpleBoxPosition(S))})()},Fl.Parser=function(s,e,i){i||(i=e,e={}),e||(e={}),this.window=s,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},Fl.Parser.prototype={reportOrThrowError:function(s){if(s instanceof Sn)this.onparsingerror&&this.onparsingerror(s);else throw s},parse:function(s){var e=this;s&&(e.buffer+=e.decoder.decode(s,{stream:!0}));function i(){for(var S=e.buffer,E=0;E<S.length&&S[E]!=="\r"&&S[E]!==`
|
||
`;)++E;var A=S.substr(0,E);return S[E]==="\r"&&++E,S[E]===`
|
||
`&&++E,e.buffer=S.substr(E),A}function r(S){var E=new Jc;if(ed(S,function(R,P){switch(R){case"id":E.set(R,P);break;case"width":E.percent(R,P);break;case"lines":E.integer(R,P);break;case"regionanchor":case"viewportanchor":var w=P.split(",");if(w.length!==2)break;var z=new Jc;if(z.percent("x",w[0]),z.percent("y",w[1]),!z.has("x")||!z.has("y"))break;E.set(R+"X",z.get("x")),E.set(R+"Y",z.get("y"));break;case"scroll":E.alt(R,P,["up"]);break}},/=/,/\s/),E.has("id")){var A=new(e.vttjs.VTTRegion||e.window.VTTRegion);A.width=E.get("width",100),A.lines=E.get("lines",3),A.regionAnchorX=E.get("regionanchorX",0),A.regionAnchorY=E.get("regionanchorY",100),A.viewportAnchorX=E.get("viewportanchorX",0),A.viewportAnchorY=E.get("viewportanchorY",100),A.scroll=E.get("scroll",""),e.onregion&&e.onregion(A),e.regionList.push({id:E.get("id"),region:A})}}function o(S){var E=new Jc;ed(S,function(A,R){switch(A){case"MPEGT":E.integer(A+"S",R);break;case"LOCA":E.set(A+"L",Hg(R));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:E.get("MPEGTS"),LOCAL:E.get("LOCAL")})}function u(S){S.match(/X-TIMESTAMP-MAP/)?ed(S,function(E,A){switch(E){case"X-TIMESTAMP-MAP":o(A);break}},/=/):ed(S,function(E,A){switch(E){case"Region":r(A);break}},/:/)}try{var c;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;c=i();var p=c.match(/^WEBVTT([ \t].*)?$/);if(!p||!p[0])throw new Sn(Sn.Errors.BadSignature);e.state="HEADER"}for(var g=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(g?g=!1:c=i(),e.state){case"HEADER":/:/.test(c)?u(c):c||(e.state="ID");continue;case"NOTE":c||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){e.state="NOTE";break}if(!c)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",c.indexOf("-->")===-1){e.cue.id=c;continue}case"CUE":try{ok(c,e.cue,e.regionList)}catch(S){e.reportOrThrowError(S),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var b=c.indexOf("-->")!==-1;if(!c||b&&(g=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
|
||
`),e.cue.text+=c.replace(/\u2028/g,`
|
||
`).replace(/u2029/g,`
|
||
`);continue;case"BADCUE":c||(e.state="ID");continue}}}catch(S){e.reportOrThrowError(S),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var s=this;try{if(s.buffer+=s.decoder.decode(),(s.cue||s.state==="HEADER")&&(s.buffer+=`
|
||
|
||
`,s.parse()),s.state==="INITIAL")throw new Sn(Sn.Errors.BadSignature)}catch(e){s.reportOrThrowError(e)}return s.onflush&&s.onflush(),this}};var yk=Fl,vk="auto",bk={"":1,lr:1,rl:1},_k={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Tk(s){if(typeof s!="string")return!1;var e=bk[s.toLowerCase()];return e?s.toLowerCase():!1}function jg(s){if(typeof s!="string")return!1;var e=_k[s.toLowerCase()];return e?s.toLowerCase():!1}function W_(s,e,i){this.hasBeenReset=!1;var r="",o=!1,u=s,c=e,p=i,g=null,b="",S=!0,E="auto",A="start",R="auto",P="auto",w=100,z="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(H){r=""+H}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(H){o=!!H}},startTime:{enumerable:!0,get:function(){return u},set:function(H){if(typeof H!="number")throw new TypeError("Start time must be set to a number.");u=H,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(H){if(typeof H!="number")throw new TypeError("End time must be set to a number.");c=H,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return p},set:function(H){p=""+H,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return g},set:function(H){g=H,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return b},set:function(H){var X=Tk(H);if(X===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");b=X,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return S},set:function(H){S=!!H,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return E},set:function(H){if(typeof H!="number"&&H!==vk)throw new SyntaxError("Line: an invalid number or illegal string was specified.");E=H,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return A},set:function(H){var X=jg(H);X?(A=X,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return R},set:function(H){if(H<0||H>100)throw new Error("Position must be between 0 and 100.");R=H,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return P},set:function(H){var X=jg(H);X?(P=X,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return w},set:function(H){if(H<0||H>100)throw new Error("Size must be between 0 and 100.");w=H,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return z},set:function(H){var X=jg(H);if(!X)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");z=X,this.hasBeenReset=!0}}}),this.displayState=void 0}W_.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Sk=W_,xk={"":!0,up:!0};function Ek(s){if(typeof s!="string")return!1;var e=xk[s.toLowerCase()];return e?s.toLowerCase():!1}function td(s){return typeof s=="number"&&s>=0&&s<=100}function Ck(){var s=100,e=3,i=0,r=100,o=0,u=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(p){if(!td(p))throw new Error("Width must be between 0 and 100.");s=p}},lines:{enumerable:!0,get:function(){return e},set:function(p){if(typeof p!="number")throw new TypeError("Lines must be set to a number.");e=p}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(p){if(!td(p))throw new Error("RegionAnchorX must be between 0 and 100.");r=p}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(p){if(!td(p))throw new Error("RegionAnchorY must be between 0 and 100.");i=p}},viewportAnchorY:{enumerable:!0,get:function(){return u},set:function(p){if(!td(p))throw new Error("ViewportAnchorY must be between 0 and 100.");u=p}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(p){if(!td(p))throw new Error("ViewportAnchorX must be between 0 and 100.");o=p}},scroll:{enumerable:!0,get:function(){return c},set:function(p){var g=Ek(p);g===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=g}}})}var Ak=Ck,Er=Mf,xo=V_.exports={WebVTT:yk,VTTCue:Sk,VTTRegion:Ak};Er.vttjs=xo,Er.WebVTT=xo.WebVTT;var wk=xo.VTTCue,Dk=xo.VTTRegion,kk=Er.VTTCue,Ok=Er.VTTRegion;xo.shim=function(){Er.VTTCue=wk,Er.VTTRegion=Dk},xo.restore=function(){Er.VTTCue=kk,Er.VTTRegion=Ok},Er.VTTCue||xo.shim();var Rk=V_.exports;const Q_=Xc(Rk);var K_="https://example.com",Nf=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=U.location&&U.location.href||"");var r=/^\/\//.test(e),o=!U.location&&!/\/\//i.test(e);e=new U.URL(e,U.location||K_);var u=new URL(i,e);return o?u.href.slice(K_.length):r?u.href.slice(u.protocol.length):u.href},Vg=function(){function s(){this.listeners={}}var e=s.prototype;return e.on=function(r,o){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(o)},e.off=function(r,o){if(!this.listeners[r])return!1;var u=this.listeners[r].indexOf(o);return this.listeners[r]=this.listeners[r].slice(0),this.listeners[r].splice(u,1),u>-1},e.trigger=function(r){var o=this.listeners[r];if(o)if(arguments.length===2)for(var u=o.length,c=0;c<u;++c)o[c].call(this,arguments[1]);else for(var p=Array.prototype.slice.call(arguments,1),g=o.length,b=0;b<g;++b)o[b].apply(this,p)},e.dispose=function(){this.listeners={}},e.pipe=function(r){this.on("data",function(o){r.push(o)})},s}(),Mk=function(e){return U.atob?U.atob(e):Buffer.from(e,"base64").toString("binary")};function Z_(s){for(var e=Mk(s),i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Lk extends Vg{constructor(){super(),this.buffer=""}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
|
||
`);i>-1;i=this.buffer.indexOf(`
|
||
`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}}const Ik=String.fromCharCode(9),qg=function(s){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(s||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},Nk=function(){const s="[^=]*",e='"[^"]*"|[^,]*',i="(?:"+s+")=(?:"+e+")";return new RegExp("(?:^|,)("+i+")")},Vi=function(s){const e={};if(!s)return e;const i=s.split(Nk());let r=i.length,o;for(;r--;)i[r]!==""&&(o=/([^=]*)=(.*)/.exec(i[r]).slice(1),o[0]=o[0].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^['"](.*)['"]$/g,"$1"),e[o[0]]=o[1]);return e},J_=s=>{const e=s.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class Pk extends Vg{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,r;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((u,c)=>{const p=c(e);return p===e?u:u.concat([p])},[e]).forEach(u=>{for(let c=0;c<this.customParsers.length;c++)if(this.customParsers[c].call(this,u))return;if(u.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:u.slice(1)});return}if(u=u.replace("\r",""),i=/^#EXTM3U/.exec(u),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(u),i){r={type:"tag",tagType:"inf"},i[1]&&(r.duration=parseFloat(i[1])),i[2]&&(r.title=i[2]),this.trigger("data",r);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(u),i){r={type:"tag",tagType:"targetduration"},i[1]&&(r.duration=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(u),i){r={type:"tag",tagType:"version"},i[1]&&(r.version=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(u),i){r={type:"tag",tagType:"media-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(u),i){r={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(u),i){r={type:"tag",tagType:"playlist-type"},i[1]&&(r.playlistType=i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(u),i){r=Ft(qg(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(u),i){r={type:"tag",tagType:"allow-cache"},i[1]&&(r.allowed=!/NO/.test(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(u),i){if(r={type:"tag",tagType:"map"},i[1]){const c=Vi(i[1]);c.URI&&(r.uri=c.URI),c.BYTERANGE&&(r.byterange=qg(c.BYTERANGE))}this.trigger("data",r);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(u),i){r={type:"tag",tagType:"stream-inf"},i[1]&&(r.attributes=Vi(i[1]),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=J_(r.attributes.RESOLUTION)),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),r.attributes["PROGRAM-ID"]&&(r.attributes["PROGRAM-ID"]=parseInt(r.attributes["PROGRAM-ID"],10))),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(u),i){r={type:"tag",tagType:"media"},i[1]&&(r.attributes=Vi(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-ENDLIST/.exec(u),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(u),i){r={type:"tag",tagType:"program-date-time"},i[1]&&(r.dateTimeString=i[1],r.dateTimeObject=new Date(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(u),i){r={type:"tag",tagType:"key"},i[1]&&(r.attributes=Vi(i[1]),r.attributes.IV&&(r.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(r.attributes.IV=r.attributes.IV.substring(2)),r.attributes.IV=r.attributes.IV.match(/.{8}/g),r.attributes.IV[0]=parseInt(r.attributes.IV[0],16),r.attributes.IV[1]=parseInt(r.attributes.IV[1],16),r.attributes.IV[2]=parseInt(r.attributes.IV[2],16),r.attributes.IV[3]=parseInt(r.attributes.IV[3],16),r.attributes.IV=new Uint32Array(r.attributes.IV))),this.trigger("data",r);return}if(i=/^#EXT-X-START:(.*)$/.exec(u),i){r={type:"tag",tagType:"start"},i[1]&&(r.attributes=Vi(i[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(u),i){r={type:"tag",tagType:"cue-out-cont"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(u),i){r={type:"tag",tagType:"cue-out"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(u),i){r={type:"tag",tagType:"cue-in"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"skip"},r.attributes=Vi(i[1]),r.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(r.attributes["SKIPPED-SEGMENTS"]=parseInt(r.attributes["SKIPPED-SEGMENTS"],10)),r.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(r.attributes["RECENTLY-REMOVED-DATERANGES"]=r.attributes["RECENTLY-REMOVED-DATERANGES"].split(Ik)),this.trigger("data",r);return}if(i=/^#EXT-X-PART:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"part"},r.attributes=Vi(i[1]),["DURATION"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),["INDEPENDENT","GAP"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=/YES/.test(r.attributes[c]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=qg(r.attributes.BYTERANGE)),this.trigger("data",r);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"server-control"},r.attributes=Vi(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=/YES/.test(r.attributes[c]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"part-inf"},r.attributes=Vi(i[1]),["PART-TARGET"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"preload-hint"},r.attributes=Vi(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(c){if(r.attributes.hasOwnProperty(c)){r.attributes[c]=parseInt(r.attributes[c],10);const p=c==="BYTERANGE-LENGTH"?"length":"offset";r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange[p]=r.attributes[c],delete r.attributes[c]}}),this.trigger("data",r);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"rendition-report"},r.attributes=Vi(i[1]),["LAST-MSN","LAST-PART"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseInt(r.attributes[c],10))}),this.trigger("data",r);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"daterange"},r.attributes=Vi(i[1]),["ID","CLASS"].forEach(function(p){r.attributes.hasOwnProperty(p)&&(r.attributes[p]=String(r.attributes[p]))}),["START-DATE","END-DATE"].forEach(function(p){r.attributes.hasOwnProperty(p)&&(r.attributes[p]=new Date(r.attributes[p]))}),["DURATION","PLANNED-DURATION"].forEach(function(p){r.attributes.hasOwnProperty(p)&&(r.attributes[p]=parseFloat(r.attributes[p]))}),["END-ON-NEXT"].forEach(function(p){r.attributes.hasOwnProperty(p)&&(r.attributes[p]=/YES/i.test(r.attributes[p]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(p){r.attributes.hasOwnProperty(p)&&(r.attributes[p]=r.attributes[p].toString(16))});const c=/^X-([A-Z]+-)+[A-Z]+$/;for(const p in r.attributes){if(!c.test(p))continue;const g=/[0-9A-Fa-f]{6}/g.test(r.attributes[p]),b=/^\d+(\.\d+)?$/.test(r.attributes[p]);r.attributes[p]=g?r.attributes[p].toString(16):b?parseFloat(r.attributes[p]):String(r.attributes[p])}this.trigger("data",r);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(u),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(u),i){r={type:"tag",tagType:"content-steering"},r.attributes=Vi(i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(u),i){r={type:"tag",tagType:"i-frame-playlist"},r.attributes=Vi(i[1]),r.attributes.URI&&(r.uri=r.attributes.URI),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=J_(r.attributes.RESOLUTION)),r.attributes["AVERAGE-BANDWIDTH"]&&(r.attributes["AVERAGE-BANDWIDTH"]=parseInt(r.attributes["AVERAGE-BANDWIDTH"],10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),this.trigger("data",r);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(u),i){r={type:"tag",tagType:"define"},r.attributes=Vi(i[1]),this.trigger("data",r);return}this.trigger("data",{type:"tag",data:u.slice(4)})})}addParser({expression:e,customType:i,dataParser:r,segment:o}){typeof r!="function"&&(r=u=>u),this.customParsers.push(u=>{if(e.exec(u))return this.trigger("data",{type:"custom",data:r(u),customType:i,segment:o}),!0})}addTagMapper({expression:e,map:i}){const r=o=>e.test(o)?i(o):o;this.tagMappers.push(r)}}const Uk=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),_a=function(s){const e={};return Object.keys(s).forEach(function(i){e[Uk(i)]=s[i]}),e},$g=function(s){const{serverControl:e,targetDuration:i,partTargetDuration:r}=s;if(!e)return;const o="#EXT-X-SERVER-CONTROL",u="holdBack",c="partHoldBack",p=i&&i*3,g=r&&r*2;i&&!e.hasOwnProperty(u)&&(e[u]=p,this.trigger("info",{message:`${o} defaulting HOLD-BACK to targetDuration * 3 (${p}).`})),p&&e[u]<p&&(this.trigger("warn",{message:`${o} clamping HOLD-BACK (${e[u]}) to targetDuration * 3 (${p})`}),e[u]=p),r&&!e.hasOwnProperty(c)&&(e[c]=r*3,this.trigger("info",{message:`${o} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[c]}).`})),r&&e[c]<g&&(this.trigger("warn",{message:`${o} clamping PART-HOLD-BACK (${e[c]}) to partTargetDuration * 2 (${g}).`}),e[c]=g)};class Bk extends Vg{constructor(e={}){super(),this.lineStream=new Lk,this.parseStream=new Pk,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const i=this,r=[];let o={},u,c,p=!1;const g=function(){},b={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},S="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let E=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let A=0,R=0;const P={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&u&&(o.map=u),!o.key&&c&&(o.key=c),!o.timeline&&typeof E=="number"&&(o.timeline=E),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(w){let z,H;if(i.manifest.definitions){for(const X in i.manifest.definitions)if(w.uri&&(w.uri=w.uri.replace(`{$${X}}`,i.manifest.definitions[X])),w.attributes)for(const $ in w.attributes)typeof w.attributes[$]=="string"&&(w.attributes[$]=w.attributes[$].replace(`{$${X}}`,i.manifest.definitions[X]))}({tag(){({version(){w.version&&(this.manifest.version=w.version)},"allow-cache"(){this.manifest.allowCache=w.allowed,"allowed"in w||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const X={};"length"in w&&(o.byterange=X,X.length=w.length,"offset"in w||(w.offset=A)),"offset"in w&&(o.byterange=X,X.offset=w.offset),A=X.offset+X.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),w.title&&(o.title=w.title),w.duration>0&&(o.duration=w.duration),w.duration===0&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(!w.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(w.attributes.METHOD==="NONE"){c=null;return}if(!w.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(w.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:w.attributes};return}if(w.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:w.attributes.URI};return}if(w.attributes.KEYFORMAT===S){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(w.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(w.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),w.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(w.attributes.KEYID&&w.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:w.attributes.KEYFORMAT,keyId:w.attributes.KEYID.substring(2)},pssh:Z_(w.attributes.URI.split(",")[1])};return}w.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:w.attributes.METHOD||"AES-128",uri:w.attributes.URI},typeof w.attributes.IV<"u"&&(c.iv=w.attributes.IV)},"media-sequence"(){if(!isFinite(w.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+w.number});return}this.manifest.mediaSequence=w.number},"discontinuity-sequence"(){if(!isFinite(w.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+w.number});return}this.manifest.discontinuitySequence=w.number,E=w.number},"playlist-type"(){if(!/VOD|EVENT/.test(w.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+w.playlist});return}this.manifest.playlistType=w.playlistType},map(){u={},w.uri&&(u.uri=w.uri),w.byterange&&(u.byterange=w.byterange),c&&(u.key=c)},"stream-inf"(){if(this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||b,!w.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}o.attributes||(o.attributes={}),Ft(o.attributes,w.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||b,!(w.attributes&&w.attributes.TYPE&&w.attributes["GROUP-ID"]&&w.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const X=this.manifest.mediaGroups[w.attributes.TYPE];X[w.attributes["GROUP-ID"]]=X[w.attributes["GROUP-ID"]]||{},z=X[w.attributes["GROUP-ID"]],H={default:/yes/i.test(w.attributes.DEFAULT)},H.default?H.autoselect=!0:H.autoselect=/yes/i.test(w.attributes.AUTOSELECT),w.attributes.LANGUAGE&&(H.language=w.attributes.LANGUAGE),w.attributes.URI&&(H.uri=w.attributes.URI),w.attributes["INSTREAM-ID"]&&(H.instreamId=w.attributes["INSTREAM-ID"]),w.attributes.CHARACTERISTICS&&(H.characteristics=w.attributes.CHARACTERISTICS),w.attributes.FORCED&&(H.forced=/yes/i.test(w.attributes.FORCED)),z[w.attributes.NAME]=H},discontinuity(){E+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=w.dateTimeString,this.manifest.dateTimeObject=w.dateTimeObject),o.dateTimeString=w.dateTimeString,o.dateTimeObject=w.dateTimeObject;const{lastProgramDateTime:X}=this;this.lastProgramDateTime=new Date(w.dateTimeString).getTime(),X===null&&this.manifest.segments.reduceRight(($,W)=>(W.programDateTime=$-W.duration*1e3,W.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(w.duration)||w.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+w.duration});return}this.manifest.targetDuration=w.duration,$g.call(this,this.manifest)},start(){if(!w.attributes||isNaN(w.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:w.attributes["TIME-OFFSET"],precise:w.attributes.PRECISE}},"cue-out"(){o.cueOut=w.data},"cue-out-cont"(){o.cueOutCont=w.data},"cue-in"(){o.cueIn=w.data},skip(){this.manifest.skip=_a(w.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",w.attributes,["SKIPPED-SEGMENTS"])},part(){p=!0;const X=this.manifest.segments.length,$=_a(w.attributes);o.parts=o.parts||[],o.parts.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=R),R=$.byterange.offset+$.byterange.length);const W=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${W} for segment #${X}`,w.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((Z,le)=>{Z.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${le} lacks required attribute(s): LAST-PART`})})},"server-control"(){const X=this.manifest.serverControl=_a(w.attributes);X.hasOwnProperty("canBlockReload")||(X.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),$g.call(this,this.manifest),X.canSkipDateranges&&!X.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const X=this.manifest.segments.length,$=_a(w.attributes),W=$.type&&$.type==="PART";o.preloadHints=o.preloadHints||[],o.preloadHints.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=W?R:0,W&&(R=$.byterange.offset+$.byterange.length)));const Z=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${Z} for segment #${X}`,w.attributes,["TYPE","URI"]),!!$.type)for(let le=0;le<o.preloadHints.length-1;le++){const J=o.preloadHints[le];J.type&&J.type===$.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${Z} for segment #${X} has the same TYPE ${$.type} as preload hint #${le}`})}},"rendition-report"(){const X=_a(w.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(X);const $=this.manifest.renditionReports.length-1,W=["LAST-MSN","URI"];p&&W.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${$}`,w.attributes,W)},"part-inf"(){this.manifest.partInf=_a(w.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",w.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),$g.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(_a(w.attributes));const X=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${X}`,w.attributes,["ID","START-DATE"]);const $=this.manifest.dateRanges[X];$.endDate&&$.startDate&&new Date($.endDate)<new Date($.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),$.duration&&$.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),$.plannedDuration&&$.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const W=!!$.endOnNext;if(W&&!$.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),W&&($.duration||$.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),$.duration&&$.endDate){const le=$.startDate.getTime()+$.duration*1e3;this.manifest.dateRanges[X].endDate=new Date(le)}if(!P[$.id])P[$.id]=$;else{for(const le in P[$.id])if($[le]&&JSON.stringify(P[$.id][le])!==JSON.stringify($[le])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const Z=this.manifest.dateRanges.findIndex(le=>le.id===$.id);this.manifest.dateRanges[Z]=Ft(this.manifest.dateRanges[Z],$),P[$.id]=Ft(P[$.id],$),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=_a(w.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",w.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const X=($,W)=>{if($ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${$}`});return}this.manifest.definitions[$]=W};if("QUERYPARAM"in w.attributes){if("NAME"in w.attributes||"IMPORT"in w.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const $=this.params.get(w.attributes.QUERYPARAM);if(!$){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${w.attributes.QUERYPARAM}`});return}X(w.attributes.QUERYPARAM,decodeURIComponent($));return}if("NAME"in w.attributes){if("IMPORT"in w.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in w.attributes)||typeof w.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${w.attributes.NAME}`});return}X(w.attributes.NAME,w.attributes.VALUE);return}if("IMPORT"in w.attributes){if(!this.mainDefinitions[w.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${w.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}X(w.attributes.IMPORT,this.mainDefinitions[w.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:w.attributes,uri:w.uri,timeline:E}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",w.attributes,["BANDWIDTH","URI"])}}[w.tagType]||g).call(i)},uri(){o.uri=w.uri,r.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),c&&(o.key=c),o.timeline=E,u&&(o.map=u),R=0,this.lastProgramDateTime!==null&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=o.duration*1e3),o={}},comment(){},custom(){w.segment?(o.custom=o.custom||{},o.custom[w.customType]=w.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[w.customType]=w.data)}})[w.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,r){const o=[];r.forEach(function(u){i.hasOwnProperty(u)||o.push(u)}),o.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${o.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
|
||
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Eo={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},Fk=["video","audio","text"],eT=["Video","Audio","Text"],tT=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,r,o){var u=("00"+Number(r).toString(16)).slice(-2),c=("00"+Number(o).toString(16)).slice(-2);return"avc1."+u+"00"+c})},Rs=function(e){e===void 0&&(e="");var i=e.split(","),r=[];return i.forEach(function(o){o=o.trim();var u;Fk.forEach(function(c){var p=Eo[c].exec(o.toLowerCase());if(!(!p||p.length<=1)){u=c;var g=o.substring(0,p[1].length),b=o.replace(g,"");r.push({type:g,details:b,mediaType:c})}}),u||r.push({type:o,details:"",mediaType:"unknown"})}),r},Hk=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var r=e.mediaGroups.AUDIO[i];if(!r)return null;for(var o in r){var u=r[o];if(u.default&&u.playlists)return Rs(u.playlists[0].attributes.CODECS)}return null},iT=function(e){return e===void 0&&(e=""),Eo.audio.test(e.trim().toLowerCase())},zk=function(e){return e===void 0&&(e=""),Eo.text.test(e.trim().toLowerCase())},Hl=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(u){return tT(u.trim())}),r="video";i.length===1&&iT(i[0])?r="audio":i.length===1&&zk(i[0])&&(r="application");var o="mp4";return i.every(function(u){return Eo.mp4.test(u)})?o="mp4":i.every(function(u){return Eo.webm.test(u)})?o="webm":i.every(function(u){return Eo.ogg.test(u)})&&(o="ogg"),r+"/"+o+';codecs="'+e+'"'}},id=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),U.MediaSource&&U.MediaSource.isTypeSupported&&U.MediaSource.isTypeSupported(Hl(e))||i&&U.ManagedMediaSource&&U.ManagedMediaSource.isTypeSupported&&U.ManagedMediaSource.isTypeSupported(Hl(e))||!1},Gg=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var r=0;r<eT.length;r++){var o=eT[r];if(Eo["muxer"+o].test(i))return!0}return!1})},nT="mp4a.40.2",jk="avc1.4d400d",Vk=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,qk=/^application\/dash\+xml/i,sT=function(e){return Vk.test(e)?"hls":qk.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},$k=function(e){return e.toString(2).length},Gk=function(e){return Math.ceil($k(e)/8)},rT=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Xk=function(e){return rT(e)},Ne=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!Xk(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},bi=U.BigInt||Number,Xg=[bi("0x1"),bi("0x100"),bi("0x10000"),bi("0x1000000"),bi("0x100000000"),bi("0x10000000000"),bi("0x1000000000000"),bi("0x100000000000000"),bi("0x10000000000000000")];(function(){var s=new Uint16Array([65484]),e=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var Yk=function(e,i){var r=i===void 0?{}:i,o=r.signed,u=o===void 0?!1:o,c=r.le,p=c===void 0?!1:c;e=Ne(e);var g=p?"reduce":"reduceRight",b=e[g]?e[g]:Array.prototype[g],S=b.call(e,function(A,R,P){var w=p?P:Math.abs(P+1-e.length);return A+bi(R)*Xg[w]},bi(0));if(u){var E=Xg[e.length]/bi(2)-bi(1);S=bi(S),S>E&&(S-=E,S-=E,S-=bi(2))}return Number(S)},Wk=function(e,i){var r=i===void 0?{}:i,o=r.le,u=o===void 0?!1:o;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=bi(e);for(var c=Gk(e),p=new Uint8Array(new ArrayBuffer(c)),g=0;g<c;g++){var b=u?g:Math.abs(g+1-p.length);p[b]=Number(e/Xg[g]&bi(255)),e<0&&(p[b]=Math.abs(~p[b]),p[b]-=g===0?1:2)}return p},aT=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);return r},Qk=function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];if(i=i.filter(function(p){return p&&(p.byteLength||p.length)&&typeof p!="string"}),i.length<=1)return Ne(i[0]);var o=i.reduce(function(p,g,b){return p+(g.byteLength||g.length)},0),u=new Uint8Array(o),c=0;return i.forEach(function(p){p=Ne(p),u.set(p,c),c+=p.byteLength}),u},Mt=function(e,i,r){var o=r===void 0?{}:r,u=o.offset,c=u===void 0?0:u,p=o.mask,g=p===void 0?[]:p;e=Ne(e),i=Ne(i);var b=i.every?i.every:Array.prototype.every;return i.length&&e.length-c>=i.length&&b.call(i,function(S,E){var A=g[E]?g[E]&e[c+E]:e[c+E];return S===A})},Kk=function(e,i,r){i.forEach(function(o){for(var u in e.mediaGroups[o])for(var c in e.mediaGroups[o][u]){var p=e.mediaGroups[o][u][c];r(p,o,u,c)}})},Ta={},Cr={};function Zk(s,e,i){if(i===void 0&&(i=Array.prototype),s&&typeof i.find=="function")return i.find.call(s,e);for(var r=0;r<s.length;r++)if(Object.prototype.hasOwnProperty.call(s,r)){var o=s[r];if(e.call(void 0,o,r,s))return o}}function Yg(s,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(s):s}function Jk(s,e){if(s===null||typeof s!="object")throw new TypeError("target is not an object");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=e[i]);return s}var oT=Yg({HTML:"text/html",isHTML:function(s){return s===oT.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),lT=Yg({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(s){return s===lT.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Cr.assign=Jk,Cr.find=Zk,Cr.freeze=Yg,Cr.MIME_TYPE=oT,Cr.NAMESPACE=lT;var uT=Cr,Ms=uT.find,nd=uT.NAMESPACE;function e4(s){return s!==""}function t4(s){return s?s.split(/[\t\n\f\r ]+/).filter(e4):[]}function i4(s,e){return s.hasOwnProperty(e)||(s[e]=!0),s}function cT(s){if(!s)return[];var e=t4(s);return Object.keys(e.reduce(i4,{}))}function n4(s){return function(e){return s&&s.indexOf(e)!==-1}}function sd(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function nn(s,e){var i=s.prototype;if(!(i instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,sd(i,r),s.prototype=i=r}i.constructor!=s&&(typeof s!="function"&&console.error("unknown Class:"+s),i.constructor=s)}var sn={},cs=sn.ELEMENT_NODE=1,zl=sn.ATTRIBUTE_NODE=2,Pf=sn.TEXT_NODE=3,dT=sn.CDATA_SECTION_NODE=4,hT=sn.ENTITY_REFERENCE_NODE=5,s4=sn.ENTITY_NODE=6,fT=sn.PROCESSING_INSTRUCTION_NODE=7,pT=sn.COMMENT_NODE=8,mT=sn.DOCUMENT_NODE=9,gT=sn.DOCUMENT_TYPE_NODE=10,Ar=sn.DOCUMENT_FRAGMENT_NODE=11,r4=sn.NOTATION_NODE=12,Li={},ci={};Li.INDEX_SIZE_ERR=(ci[1]="Index size error",1),Li.DOMSTRING_SIZE_ERR=(ci[2]="DOMString size error",2);var rn=Li.HIERARCHY_REQUEST_ERR=(ci[3]="Hierarchy request error",3);Li.WRONG_DOCUMENT_ERR=(ci[4]="Wrong document",4),Li.INVALID_CHARACTER_ERR=(ci[5]="Invalid character",5),Li.NO_DATA_ALLOWED_ERR=(ci[6]="No data allowed",6),Li.NO_MODIFICATION_ALLOWED_ERR=(ci[7]="No modification allowed",7);var yT=Li.NOT_FOUND_ERR=(ci[8]="Not found",8);Li.NOT_SUPPORTED_ERR=(ci[9]="Not supported",9);var vT=Li.INUSE_ATTRIBUTE_ERR=(ci[10]="Attribute in use",10);Li.INVALID_STATE_ERR=(ci[11]="Invalid state",11),Li.SYNTAX_ERR=(ci[12]="Syntax error",12),Li.INVALID_MODIFICATION_ERR=(ci[13]="Invalid modification",13),Li.NAMESPACE_ERR=(ci[14]="Invalid namespace",14),Li.INVALID_ACCESS_ERR=(ci[15]="Invalid access",15);function Xt(s,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,ci[s]),this.message=ci[s],Error.captureStackTrace&&Error.captureStackTrace(this,Xt);return i.code=s,e&&(this.message=this.message+": "+e),i}Xt.prototype=Error.prototype,sd(Li,Xt);function wr(){}wr.prototype={length:0,item:function(s){return s>=0&&s<this.length?this[s]:null},toString:function(s,e){for(var i=[],r=0;r<this.length;r++)Vl(this[r],i,s,e);return i.join("")},filter:function(s){return Array.prototype.filter.call(this,s)},indexOf:function(s){return Array.prototype.indexOf.call(this,s)}};function jl(s,e){this._node=s,this._refresh=e,Wg(this)}function Wg(s){var e=s._node._inc||s._node.ownerDocument._inc;if(s._inc!==e){var i=s._refresh(s._node);if(NT(s,"length",i.length),!s.$$length||i.length<s.$$length)for(var r=i.length;r in s;r++)Object.prototype.hasOwnProperty.call(s,r)&&delete s[r];sd(i,s),s._inc=e}}jl.prototype.item=function(s){return Wg(this),this[s]||null},nn(jl,wr);function Uf(){}function bT(s,e){for(var i=s.length;i--;)if(s[i]===e)return i}function _T(s,e,i,r){if(r?e[bT(e,r)]=i:e[e.length++]=i,s){i.ownerElement=s;var o=s.ownerDocument;o&&(r&&ET(o,s,r),a4(o,s,i))}}function TT(s,e,i){var r=bT(e,i);if(r>=0){for(var o=e.length-1;r<o;)e[r]=e[++r];if(e.length=o,s){var u=s.ownerDocument;u&&(ET(u,s,i),i.ownerElement=null)}}else throw new Xt(yT,new Error(s.tagName+"@"+i))}Uf.prototype={length:0,item:wr.prototype.item,getNamedItem:function(s){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==s)return i}},setNamedItem:function(s){var e=s.ownerElement;if(e&&e!=this._ownerElement)throw new Xt(vT);var i=this.getNamedItem(s.nodeName);return _T(this._ownerElement,this,s,i),i},setNamedItemNS:function(s){var e=s.ownerElement,i;if(e&&e!=this._ownerElement)throw new Xt(vT);return i=this.getNamedItemNS(s.namespaceURI,s.localName),_T(this._ownerElement,this,s,i),i},removeNamedItem:function(s){var e=this.getNamedItem(s);return TT(this._ownerElement,this,e),e},removeNamedItemNS:function(s,e){var i=this.getNamedItemNS(s,e);return TT(this._ownerElement,this,i),i},getNamedItemNS:function(s,e){for(var i=this.length;i--;){var r=this[i];if(r.localName==e&&r.namespaceURI==s)return r}return null}};function ST(){}ST.prototype={hasFeature:function(s,e){return!0},createDocument:function(s,e,i){var r=new ad;if(r.implementation=this,r.childNodes=new wr,r.doctype=i||null,i&&r.appendChild(i),e){var o=r.createElementNS(s,e);r.appendChild(o)}return r},createDocumentType:function(s,e,i){var r=new Hf;return r.name=s,r.nodeName=s,r.publicId=e||"",r.systemId=i||"",r}};function yt(){}yt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(s,e){return Bf(this,s,e)},replaceChild:function(s,e){Bf(this,s,e,DT),e&&this.removeChild(e)},removeChild:function(s){return CT(this,s)},appendChild:function(s){return this.insertBefore(s,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(s){return s0(this.ownerDocument||this,this,s)},normalize:function(){for(var s=this.firstChild;s;){var e=s.nextSibling;e&&e.nodeType==Pf&&s.nodeType==Pf?(this.removeChild(e),s.appendData(e.data)):(s.normalize(),s=e)}},isSupported:function(s,e){return this.ownerDocument.implementation.hasFeature(s,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(s){for(var e=this;e;){var i=e._nsMap;if(i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===s)return r}e=e.nodeType==zl?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(s){for(var e=this;e;){var i=e._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s];e=e.nodeType==zl?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(s){var e=this.lookupPrefix(s);return e==null}};function xT(s){return s=="<"&&"<"||s==">"&&">"||s=="&"&&"&"||s=='"'&&"""||"&#"+s.charCodeAt()+";"}sd(sn,yt),sd(sn,yt.prototype);function rd(s,e){if(e(s))return!0;if(s=s.firstChild)do if(rd(s,e))return!0;while(s=s.nextSibling)}function ad(){this.ownerDocument=this}function a4(s,e,i){s&&s._inc++;var r=i.namespaceURI;r===nd.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function ET(s,e,i,r){s&&s._inc++;var o=i.namespaceURI;o===nd.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function Qg(s,e,i){if(s&&s._inc){s._inc++;var r=e.childNodes;if(i)r[r.length++]=i;else{for(var o=e.firstChild,u=0;o;)r[u++]=o,o=o.nextSibling;r.length=u,delete r[r.length]}}}function CT(s,e){var i=e.previousSibling,r=e.nextSibling;return i?i.nextSibling=r:s.firstChild=r,r?r.previousSibling=i:s.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Qg(s.ownerDocument,s),e}function o4(s){return s&&(s.nodeType===yt.DOCUMENT_NODE||s.nodeType===yt.DOCUMENT_FRAGMENT_NODE||s.nodeType===yt.ELEMENT_NODE)}function l4(s){return s&&(Ls(s)||Kg(s)||Dr(s)||s.nodeType===yt.DOCUMENT_FRAGMENT_NODE||s.nodeType===yt.COMMENT_NODE||s.nodeType===yt.PROCESSING_INSTRUCTION_NODE)}function Dr(s){return s&&s.nodeType===yt.DOCUMENT_TYPE_NODE}function Ls(s){return s&&s.nodeType===yt.ELEMENT_NODE}function Kg(s){return s&&s.nodeType===yt.TEXT_NODE}function AT(s,e){var i=s.childNodes||[];if(Ms(i,Ls)||Dr(e))return!1;var r=Ms(i,Dr);return!(e&&r&&i.indexOf(r)>i.indexOf(e))}function wT(s,e){var i=s.childNodes||[];function r(u){return Ls(u)&&u!==e}if(Ms(i,r))return!1;var o=Ms(i,Dr);return!(e&&o&&i.indexOf(o)>i.indexOf(e))}function u4(s,e,i){if(!o4(s))throw new Xt(rn,"Unexpected parent node type "+s.nodeType);if(i&&i.parentNode!==s)throw new Xt(yT,"child not in parent");if(!l4(e)||Dr(e)&&s.nodeType!==yt.DOCUMENT_NODE)throw new Xt(rn,"Unexpected node type "+e.nodeType+" for parent node type "+s.nodeType)}function c4(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===yt.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Ls);if(u.length>1||Ms(o,Kg))throw new Xt(rn,"More than one element or text in fragment");if(u.length===1&&!AT(s,i))throw new Xt(rn,"Element in fragment can not be inserted before doctype")}if(Ls(e)&&!AT(s,i))throw new Xt(rn,"Only one element can be added and only after doctype");if(Dr(e)){if(Ms(r,Dr))throw new Xt(rn,"Only one doctype is allowed");var c=Ms(r,Ls);if(i&&r.indexOf(c)<r.indexOf(i))throw new Xt(rn,"Doctype can only be inserted before an element");if(!i&&c)throw new Xt(rn,"Doctype can not be appended since element is present")}}function DT(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===yt.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Ls);if(u.length>1||Ms(o,Kg))throw new Xt(rn,"More than one element or text in fragment");if(u.length===1&&!wT(s,i))throw new Xt(rn,"Element in fragment can not be inserted before doctype")}if(Ls(e)&&!wT(s,i))throw new Xt(rn,"Only one element can be added and only after doctype");if(Dr(e)){if(Ms(r,function(g){return Dr(g)&&g!==i}))throw new Xt(rn,"Only one doctype is allowed");var c=Ms(r,Ls);if(i&&r.indexOf(c)<r.indexOf(i))throw new Xt(rn,"Doctype can only be inserted before an element")}}function Bf(s,e,i,r){u4(s,e,i),s.nodeType===yt.DOCUMENT_NODE&&(r||c4)(s,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===Ar){var u=e.firstChild;if(u==null)return e;var c=e.lastChild}else u=c=e;var p=i?i.previousSibling:s.lastChild;u.previousSibling=p,c.nextSibling=i,p?p.nextSibling=u:s.firstChild=u,i==null?s.lastChild=c:i.previousSibling=c;do u.parentNode=s;while(u!==c&&(u=u.nextSibling));return Qg(s.ownerDocument||s,s),e.nodeType==Ar&&(e.firstChild=e.lastChild=null),e}function d4(s,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=s,e.previousSibling=s.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,s.lastChild=e,Qg(s.ownerDocument,s,e),e}ad.prototype={nodeName:"#document",nodeType:mT,doctype:null,documentElement:null,_inc:1,insertBefore:function(s,e){if(s.nodeType==Ar){for(var i=s.firstChild;i;){var r=i.nextSibling;this.insertBefore(i,e),i=r}return s}return Bf(this,s,e),s.ownerDocument=this,this.documentElement===null&&s.nodeType===cs&&(this.documentElement=s),s},removeChild:function(s){return this.documentElement==s&&(this.documentElement=null),CT(this,s)},replaceChild:function(s,e){Bf(this,s,e,DT),s.ownerDocument=this,e&&this.removeChild(e),Ls(s)&&(this.documentElement=s)},importNode:function(s,e){return IT(this,s,e)},getElementById:function(s){var e=null;return rd(this.documentElement,function(i){if(i.nodeType==cs&&i.getAttribute("id")==s)return e=i,!0}),e},getElementsByClassName:function(s){var e=cT(s);return new jl(this,function(i){var r=[];return e.length>0&&rd(i.documentElement,function(o){if(o!==i&&o.nodeType===cs){var u=o.getAttribute("class");if(u){var c=s===u;if(!c){var p=cT(u);c=e.every(n4(p))}c&&r.push(o)}}}),r})},createElement:function(s){var e=new Co;e.ownerDocument=this,e.nodeName=s,e.tagName=s,e.localName=s,e.childNodes=new wr;var i=e.attributes=new Uf;return i._ownerElement=e,e},createDocumentFragment:function(){var s=new zf;return s.ownerDocument=this,s.childNodes=new wr,s},createTextNode:function(s){var e=new Zg;return e.ownerDocument=this,e.appendData(s),e},createComment:function(s){var e=new Jg;return e.ownerDocument=this,e.appendData(s),e},createCDATASection:function(s){var e=new e0;return e.ownerDocument=this,e.appendData(s),e},createProcessingInstruction:function(s,e){var i=new i0;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=s,i.nodeValue=i.data=e,i},createAttribute:function(s){var e=new Ff;return e.ownerDocument=this,e.name=s,e.nodeName=s,e.localName=s,e.specified=!0,e},createEntityReference:function(s){var e=new t0;return e.ownerDocument=this,e.nodeName=s,e},createElementNS:function(s,e){var i=new Co,r=e.split(":"),o=i.attributes=new Uf;return i.childNodes=new wr,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=s,r.length==2?(i.prefix=r[0],i.localName=r[1]):i.localName=e,o._ownerElement=i,i},createAttributeNS:function(s,e){var i=new Ff,r=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=s,i.specified=!0,r.length==2?(i.prefix=r[0],i.localName=r[1]):i.localName=e,i}},nn(ad,yt);function Co(){this._nsMap={}}Co.prototype={nodeType:cs,hasAttribute:function(s){return this.getAttributeNode(s)!=null},getAttribute:function(s){var e=this.getAttributeNode(s);return e&&e.value||""},getAttributeNode:function(s){return this.attributes.getNamedItem(s)},setAttribute:function(s,e){var i=this.ownerDocument.createAttribute(s);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(s){var e=this.getAttributeNode(s);e&&this.removeAttributeNode(e)},appendChild:function(s){return s.nodeType===Ar?this.insertBefore(s,null):d4(this,s)},setAttributeNode:function(s){return this.attributes.setNamedItem(s)},setAttributeNodeNS:function(s){return this.attributes.setNamedItemNS(s)},removeAttributeNode:function(s){return this.attributes.removeNamedItem(s.nodeName)},removeAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(s,e){return this.getAttributeNodeNS(s,e)!=null},getAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);return i&&i.value||""},setAttributeNS:function(s,e,i){var r=this.ownerDocument.createAttributeNS(s,e);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(s,e){return this.attributes.getNamedItemNS(s,e)},getElementsByTagName:function(s){return new jl(this,function(e){var i=[];return rd(e,function(r){r!==e&&r.nodeType==cs&&(s==="*"||r.tagName==s)&&i.push(r)}),i})},getElementsByTagNameNS:function(s,e){return new jl(this,function(i){var r=[];return rd(i,function(o){o!==i&&o.nodeType===cs&&(s==="*"||o.namespaceURI===s)&&(e==="*"||o.localName==e)&&r.push(o)}),r})}},ad.prototype.getElementsByTagName=Co.prototype.getElementsByTagName,ad.prototype.getElementsByTagNameNS=Co.prototype.getElementsByTagNameNS,nn(Co,yt);function Ff(){}Ff.prototype.nodeType=zl,nn(Ff,yt);function od(){}od.prototype={data:"",substringData:function(s,e){return this.data.substring(s,s+e)},appendData:function(s){s=this.data+s,this.nodeValue=this.data=s,this.length=s.length},insertData:function(s,e){this.replaceData(s,0,e)},appendChild:function(s){throw new Error(ci[rn])},deleteData:function(s,e){this.replaceData(s,e,"")},replaceData:function(s,e,i){var r=this.data.substring(0,s),o=this.data.substring(s+e);i=r+i+o,this.nodeValue=this.data=i,this.length=i.length}},nn(od,yt);function Zg(){}Zg.prototype={nodeName:"#text",nodeType:Pf,splitText:function(s){var e=this.data,i=e.substring(s);e=e.substring(0,s),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},nn(Zg,od);function Jg(){}Jg.prototype={nodeName:"#comment",nodeType:pT},nn(Jg,od);function e0(){}e0.prototype={nodeName:"#cdata-section",nodeType:dT},nn(e0,od);function Hf(){}Hf.prototype.nodeType=gT,nn(Hf,yt);function kT(){}kT.prototype.nodeType=r4,nn(kT,yt);function OT(){}OT.prototype.nodeType=s4,nn(OT,yt);function t0(){}t0.prototype.nodeType=hT,nn(t0,yt);function zf(){}zf.prototype.nodeName="#document-fragment",zf.prototype.nodeType=Ar,nn(zf,yt);function i0(){}i0.prototype.nodeType=fT,nn(i0,yt);function RT(){}RT.prototype.serializeToString=function(s,e,i){return MT.call(s,e,i)},yt.prototype.toString=MT;function MT(s,e){var i=[],r=this.nodeType==9&&this.documentElement||this,o=r.prefix,u=r.namespaceURI;if(u&&o==null){var o=r.lookupPrefix(u);if(o==null)var c=[{namespace:u,prefix:null}]}return Vl(this,i,s,e,c),i.join("")}function LT(s,e,i){var r=s.prefix||"",o=s.namespaceURI;if(!o||r==="xml"&&o===nd.XML||o===nd.XMLNS)return!1;for(var u=i.length;u--;){var c=i[u];if(c.prefix===r)return c.namespace!==o}return!0}function n0(s,e,i){s.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,xT),'"')}function Vl(s,e,i,r,o){if(o||(o=[]),r)if(s=r(s),s){if(typeof s=="string"){e.push(s);return}}else return;switch(s.nodeType){case cs:var u=s.attributes,c=u.length,H=s.firstChild,p=s.tagName;i=nd.isHTML(s.namespaceURI)||i;var g=p;if(!i&&!s.prefix&&s.namespaceURI){for(var b,S=0;S<u.length;S++)if(u.item(S).name==="xmlns"){b=u.item(S).value;break}if(!b)for(var E=o.length-1;E>=0;E--){var A=o[E];if(A.prefix===""&&A.namespace===s.namespaceURI){b=A.namespace;break}}if(b!==s.namespaceURI)for(var E=o.length-1;E>=0;E--){var A=o[E];if(A.namespace===s.namespaceURI){A.prefix&&(g=A.prefix+":"+p);break}}}e.push("<",g);for(var R=0;R<c;R++){var P=u.item(R);P.prefix=="xmlns"?o.push({prefix:P.localName,namespace:P.value}):P.nodeName=="xmlns"&&o.push({prefix:"",namespace:P.value})}for(var R=0;R<c;R++){var P=u.item(R);if(LT(P,i,o)){var w=P.prefix||"",z=P.namespaceURI;n0(e,w?"xmlns:"+w:"xmlns",z),o.push({prefix:w,namespace:z})}Vl(P,e,i,r,o)}if(p===g&<(s,i,o)){var w=s.prefix||"",z=s.namespaceURI;n0(e,w?"xmlns:"+w:"xmlns",z),o.push({prefix:w,namespace:z})}if(H||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(p)){if(e.push(">"),i&&/^script$/i.test(p))for(;H;)H.data?e.push(H.data):Vl(H,e,i,r,o.slice()),H=H.nextSibling;else for(;H;)Vl(H,e,i,r,o.slice()),H=H.nextSibling;e.push("</",g,">")}else e.push("/>");return;case mT:case Ar:for(var H=s.firstChild;H;)Vl(H,e,i,r,o.slice()),H=H.nextSibling;return;case zl:return n0(e,s.name,s.value);case Pf:return e.push(s.data.replace(/[<&>]/g,xT));case dT:return e.push("<![CDATA[",s.data,"]]>");case pT:return e.push("<!--",s.data,"-->");case gT:var X=s.publicId,$=s.systemId;if(e.push("<!DOCTYPE ",s.name),X)e.push(" PUBLIC ",X),$&&$!="."&&e.push(" ",$),e.push(">");else if($&&$!=".")e.push(" SYSTEM ",$,">");else{var W=s.internalSubset;W&&e.push(" [",W,"]"),e.push(">")}return;case fT:return e.push("<?",s.target," ",s.data,"?>");case hT:return e.push("&",s.nodeName,";");default:e.push("??",s.nodeName)}}function IT(s,e,i){var r;switch(e.nodeType){case cs:r=e.cloneNode(!1),r.ownerDocument=s;case Ar:break;case zl:i=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=s,r.parentNode=null,i)for(var o=e.firstChild;o;)r.appendChild(IT(s,o,i)),o=o.nextSibling;return r}function s0(s,e,i){var r=new e.constructor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=e[o];typeof u!="object"&&u!=r[o]&&(r[o]=u)}switch(e.childNodes&&(r.childNodes=new wr),r.ownerDocument=s,r.nodeType){case cs:var c=e.attributes,p=r.attributes=new Uf,g=c.length;p._ownerElement=r;for(var b=0;b<g;b++)r.setAttributeNode(s0(s,c.item(b),!0));break;case zl:i=!0}if(i)for(var S=e.firstChild;S;)r.appendChild(s0(s,S,i)),S=S.nextSibling;return r}function NT(s,e,i){s[e]=i}try{if(Object.defineProperty){let s=function(e){switch(e.nodeType){case cs:case Ar:var i=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&i.push(s(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}};Object.defineProperty(jl.prototype,"length",{get:function(){return Wg(this),this.$$length}}),Object.defineProperty(yt.prototype,"textContent",{get:function(){return s(this)},set:function(e){switch(this.nodeType){case cs:case Ar:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),NT=function(e,i,r){e["$$"+i]=r}}}catch{}Ta.DocumentType=Hf,Ta.DOMException=Xt,Ta.DOMImplementation=ST,Ta.Element=Co,Ta.Node=yt,Ta.NodeList=wr,Ta.XMLSerializer=RT;var jf={},PT={};(function(s){var e=Cr.freeze;s.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),s.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
||
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),s.entityMap=s.HTML_ENTITIES})(PT);var r0={},ld=Cr.NAMESPACE,a0=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,UT=new RegExp("[\\-\\.0-9"+a0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),BT=new RegExp("^"+a0.source+UT.source+"*(?::"+a0.source+UT.source+"*)?$"),ud=0,Sa=1,ql=2,cd=3,$l=4,Gl=5,dd=6,Vf=7;function Xl(s,e){this.message=s,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Xl)}Xl.prototype=new Error,Xl.prototype.name=Xl.name;function FT(){}FT.prototype={parse:function(s,e,i){var r=this.domBuilder;r.startDocument(),jT(e,e={}),h4(s,e,i,r,this.errorHandler),r.endDocument()}};function h4(s,e,i,r,o){function u(he){if(he>65535){he-=65536;var Ee=55296+(he>>10),Me=56320+(he&1023);return String.fromCharCode(Ee,Me)}else return String.fromCharCode(he)}function c(he){var Ee=he.slice(1,-1);return Object.hasOwnProperty.call(i,Ee)?i[Ee]:Ee.charAt(0)==="#"?u(parseInt(Ee.substr(1).replace("x","0x"))):(o.error("entity not found:"+he),he)}function p(he){if(he>w){var Ee=s.substring(w,he).replace(/&#?\w+;/g,c);A&&g(w),r.characters(Ee,0,he-w),w=he}}function g(he,Ee){for(;he>=S&&(Ee=E.exec(s));)b=Ee.index,S=b+Ee[0].length,A.lineNumber++;A.columnNumber=he-b+1}for(var b=0,S=0,E=/.*(?:\r\n?|\n)|.*$/g,A=r.locator,R=[{currentNSMap:e}],P={},w=0;;){try{var z=s.indexOf("<",w);if(z<0){if(!s.substr(w).match(/^\s*$/)){var H=r.doc,X=H.createTextNode(s.substr(w));H.appendChild(X),r.currentElement=X}return}switch(z>w&&p(z),s.charAt(z+1)){case"/":var de=s.indexOf(">",z+3),$=s.substring(z+2,de).replace(/[ \t\n\r]+$/g,""),W=R.pop();de<0?($=s.substring(z+2).replace(/[\s<].*/,""),o.error("end tag name: "+$+" is not complete:"+W.tagName),de=z+1+$.length):$.match(/\s</)&&($=$.replace(/[\s<].*/,""),o.error("end tag name: "+$+" maybe not complete"),de=z+1+$.length);var Z=W.localNSMap,le=W.tagName==$,J=le||W.tagName&&W.tagName.toLowerCase()==$.toLowerCase();if(J){if(r.endElement(W.uri,W.localName,$),Z)for(var Y in Z)Object.prototype.hasOwnProperty.call(Z,Y)&&r.endPrefixMapping(Y);le||o.fatalError("end tag name: "+$+" is not match the current start tagName:"+W.tagName)}else R.push(W);de++;break;case"?":A&&g(z),de=y4(s,z,r);break;case"!":A&&g(z),de=g4(s,z,r,o);break;default:A&&g(z);var ee=new VT,ve=R[R.length-1].currentNSMap,de=f4(s,z,ee,ve,c,o),ge=ee.length;if(!ee.closed&&m4(s,de,ee.tagName,P)&&(ee.closed=!0,i.nbsp||o.warning("unclosed xml attribute")),A&&ge){for(var pe=HT(A,{}),Oe=0;Oe<ge;Oe++){var nt=ee[Oe];g(nt.offset),nt.locator=HT(A,{})}r.locator=pe,zT(ee,r,ve)&&R.push(ee),r.locator=A}else zT(ee,r,ve)&&R.push(ee);ld.isHTML(ee.uri)&&!ee.closed?de=p4(s,de,ee.tagName,c,r):de++}}catch(he){if(he instanceof Xl)throw he;o.error("element parse error: "+he),de=-1}de>w?w=de:p(Math.max(z,w)+1)}}function HT(s,e){return e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber,e}function f4(s,e,i,r,o,u){function c(A,R,P){i.attributeNames.hasOwnProperty(A)&&u.fatalError("Attribute "+A+" redefined"),i.addValue(A,R.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),P)}for(var p,g,b=++e,S=ud;;){var E=s.charAt(b);switch(E){case"=":if(S===Sa)p=s.slice(e,b),S=cd;else if(S===ql)S=cd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(S===cd||S===Sa)if(S===Sa&&(u.warning('attribute value must after "="'),p=s.slice(e,b)),e=b+1,b=s.indexOf(E,e),b>0)g=s.slice(e,b),c(p,g,e-1),S=Gl;else throw new Error("attribute value no end '"+E+"' match");else if(S==$l)g=s.slice(e,b),c(p,g,e),u.warning('attribute "'+p+'" missed start quot('+E+")!!"),e=b+1,S=Gl;else throw new Error('attribute value must after "="');break;case"/":switch(S){case ud:i.setTagName(s.slice(e,b));case Gl:case dd:case Vf:S=Vf,i.closed=!0;case $l:case Sa:break;case ql:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),S==ud&&i.setTagName(s.slice(e,b)),b;case">":switch(S){case ud:i.setTagName(s.slice(e,b));case Gl:case dd:case Vf:break;case $l:case Sa:g=s.slice(e,b),g.slice(-1)==="/"&&(i.closed=!0,g=g.slice(0,-1));case ql:S===ql&&(g=p),S==$l?(u.warning('attribute "'+g+'" missed quot(")!'),c(p,g,e)):((!ld.isHTML(r[""])||!g.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+g+'" missed value!! "'+g+'" instead!!'),c(g,g,e));break;case cd:throw new Error("attribute value missed!!")}return b;case"":E=" ";default:if(E<=" ")switch(S){case ud:i.setTagName(s.slice(e,b)),S=dd;break;case Sa:p=s.slice(e,b),S=ql;break;case $l:var g=s.slice(e,b);u.warning('attribute "'+g+'" missed quot(")!!'),c(p,g,e);case Gl:S=dd;break}else switch(S){case ql:i.tagName,(!ld.isHTML(r[""])||!p.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+p+'" missed value!! "'+p+'" instead2!!'),c(p,p,e),e=b,S=Sa;break;case Gl:u.warning('attribute space is required"'+p+'"!!');case dd:S=Sa,e=b;break;case cd:S=$l,e=b;break;case Vf:throw new Error("elements closed character '/' and '>' must be connected to")}}b++}}function zT(s,e,i){for(var r=s.tagName,o=null,E=s.length;E--;){var u=s[E],c=u.qName,p=u.value,A=c.indexOf(":");if(A>0)var g=u.prefix=c.slice(0,A),b=c.slice(A+1),S=g==="xmlns"&&b;else b=c,g=null,S=c==="xmlns"&&"";u.localName=b,S!==!1&&(o==null&&(o={},jT(i,i={})),i[S]=o[S]=p,u.uri=ld.XMLNS,e.startPrefixMapping(S,p))}for(var E=s.length;E--;){u=s[E];var g=u.prefix;g&&(g==="xml"&&(u.uri=ld.XML),g!=="xmlns"&&(u.uri=i[g||""]))}var A=r.indexOf(":");A>0?(g=s.prefix=r.slice(0,A),b=s.localName=r.slice(A+1)):(g=null,b=s.localName=r);var R=s.uri=i[g||""];if(e.startElement(R,b,r,s),s.closed){if(e.endElement(R,b,r),o)for(g in o)Object.prototype.hasOwnProperty.call(o,g)&&e.endPrefixMapping(g)}else return s.currentNSMap=i,s.localNSMap=o,!0}function p4(s,e,i,r,o){if(/^(?:script|textarea)$/i.test(i)){var u=s.indexOf("</"+i+">",e),c=s.substring(e+1,u);if(/[&<]/.test(c))return/^script$/i.test(i)?(o.characters(c,0,c.length),u):(c=c.replace(/&#?\w+;/g,r),o.characters(c,0,c.length),u)}return e+1}function m4(s,e,i,r){var o=r[i];return o==null&&(o=s.lastIndexOf("</"+i+">"),o<e&&(o=s.lastIndexOf("</"+i)),r[i]=o),o<e}function jT(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function g4(s,e,i,r){var o=s.charAt(e+2);switch(o){case"-":if(s.charAt(e+3)==="-"){var u=s.indexOf("-->",e+4);return u>e?(i.comment(s,e+4,u-e-4),u+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(s.substr(e+3,6)=="CDATA["){var u=s.indexOf("]]>",e+9);return i.startCDATA(),i.characters(s,e+9,u-e-9),i.endCDATA(),u+3}var c=v4(s,e),p=c.length;if(p>1&&/!doctype/i.test(c[0][0])){var g=c[1][0],b=!1,S=!1;p>3&&(/^public$/i.test(c[2][0])?(b=c[3][0],S=p>4&&c[4][0]):/^system$/i.test(c[2][0])&&(S=c[3][0]));var E=c[p-1];return i.startDTD(g,b,S),i.endDTD(),E.index+E[0].length}}return-1}function y4(s,e,i){var r=s.indexOf("?>",e);if(r){var o=s.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,i.processingInstruction(o[1],o[2]),r+2):-1}return-1}function VT(){this.attributeNames={}}VT.prototype={setTagName:function(s){if(!BT.test(s))throw new Error("invalid tagName:"+s);this.tagName=s},addValue:function(s,e,i){if(!BT.test(s))throw new Error("invalid attribute:"+s);this.attributeNames[s]=this.length,this[this.length++]={qName:s,value:e,offset:i}},length:0,getLocalName:function(s){return this[s].localName},getLocator:function(s){return this[s].locator},getQName:function(s){return this[s].qName},getURI:function(s){return this[s].uri},getValue:function(s){return this[s].value}};function v4(s,e){var i,r=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=e,o.exec(s);i=o.exec(s);)if(r.push(i),i[1])return r}r0.XMLReader=FT,r0.ParseError=Xl;var b4=Cr,_4=Ta,qT=PT,$T=r0,T4=_4.DOMImplementation,GT=b4.NAMESPACE,S4=$T.ParseError,x4=$T.XMLReader;function XT(s){return s.replace(/\r[\n\u0085]/g,`
|
||
`).replace(/[\r\u0085\u2028]/g,`
|
||
`)}function YT(s){this.options=s||{locator:{}}}YT.prototype.parseFromString=function(s,e){var i=this.options,r=new x4,o=i.domBuilder||new hd,u=i.errorHandler,c=i.locator,p=i.xmlns||{},g=/\/x?html?$/.test(e),b=g?qT.HTML_ENTITIES:qT.XML_ENTITIES;c&&o.setDocumentLocator(c),r.errorHandler=E4(u,o,c),r.domBuilder=i.domBuilder||o,g&&(p[""]=GT.HTML),p.xml=p.xml||GT.XML;var S=i.normalizeLineEndings||XT;return s&&typeof s=="string"?r.parse(S(s),p,b):r.errorHandler.error("invalid doc source"),o.doc};function E4(s,e,i){if(!s){if(e instanceof hd)return e;s=e}var r={},o=s instanceof Function;i=i||{};function u(c){var p=s[c];!p&&o&&(p=s.length==2?function(g){s(c,g)}:s),r[c]=p&&function(g){p("[xmldom "+c+"] "+g+o0(i))}||function(){}}return u("warning"),u("error"),u("fatalError"),r}function hd(){this.cdata=!1}function Yl(s,e){e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber}hd.prototype={startDocument:function(){this.doc=new T4().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(s,e,i,r){var o=this.doc,u=o.createElementNS(s,i||e),c=r.length;qf(this,u),this.currentElement=u,this.locator&&Yl(this.locator,u);for(var p=0;p<c;p++){var s=r.getURI(p),g=r.getValue(p),i=r.getQName(p),b=o.createAttributeNS(s,i);this.locator&&Yl(r.getLocator(p),b),b.value=b.nodeValue=g,u.setAttributeNode(b)}},endElement:function(s,e,i){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(s,e){},endPrefixMapping:function(s){},processingInstruction:function(s,e){var i=this.doc.createProcessingInstruction(s,e);this.locator&&Yl(this.locator,i),qf(this,i)},ignorableWhitespace:function(s,e,i){},characters:function(s,e,i){if(s=WT.apply(this,arguments),s){if(this.cdata)var r=this.doc.createCDATASection(s);else var r=this.doc.createTextNode(s);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(s)&&this.doc.appendChild(r),this.locator&&Yl(this.locator,r)}},skippedEntity:function(s){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(s){(this.locator=s)&&(s.lineNumber=0)},comment:function(s,e,i){s=WT.apply(this,arguments);var r=this.doc.createComment(s);this.locator&&Yl(this.locator,r),qf(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(s,e,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var o=r.createDocumentType(s,e,i);this.locator&&Yl(this.locator,o),qf(this,o),this.doc.doctype=o}},warning:function(s){console.warn("[xmldom warning] "+s,o0(this.locator))},error:function(s){console.error("[xmldom error] "+s,o0(this.locator))},fatalError:function(s){throw new S4(s,this.locator)}};function o0(s){if(s)return`
|
||
@`+(s.systemId||"")+"#[line:"+s.lineNumber+",col:"+s.columnNumber+"]"}function WT(s,e,i){return typeof s=="string"?s.substr(e,i):s.length>=e+i||e?new java.lang.String(s,e,i)+"":s}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(s){hd.prototype[s]=function(){return null}});function qf(s,e){s.currentElement?s.currentElement.appendChild(e):s.doc.appendChild(e)}jf.__DOMHandler=hd,jf.normalizeLineEndings=XT,jf.DOMParser=YT;var C4=jf.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const QT=s=>!!s&&typeof s=="object",di=(...s)=>s.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(r=>{Array.isArray(e[r])&&Array.isArray(i[r])?e[r]=e[r].concat(i[r]):QT(e[r])&&QT(i[r])?e[r]=di(e[r],i[r]):e[r]=i[r]}),e),{}),KT=s=>Object.keys(s).map(e=>s[e]),A4=(s,e)=>{const i=[];for(let r=s;r<e;r++)i.push(r);return i},Wl=s=>s.reduce((e,i)=>e.concat(i),[]),ZT=s=>{if(!s.length)return[];const e=[];for(let i=0;i<s.length;i++)e.push(s[i]);return e},w4=(s,e)=>s.reduce((i,r,o)=>(r[e]&&i.push(o),i),[]),D4=(s,e)=>KT(s.reduce((i,r)=>(r.forEach(o=>{i[e(o)]=o}),i),{}));var Ql={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const fd=({baseUrl:s="",source:e="",range:i="",indexRange:r=""})=>{const o={uri:e,resolvedUri:Nf(s||"",e)};if(i||r){const c=(i||r).split("-");let p=U.BigInt?U.BigInt(c[0]):parseInt(c[0],10),g=U.BigInt?U.BigInt(c[1]):parseInt(c[1],10);p<Number.MAX_SAFE_INTEGER&&typeof p=="bigint"&&(p=Number(p)),g<Number.MAX_SAFE_INTEGER&&typeof g=="bigint"&&(g=Number(g));let b;typeof g=="bigint"||typeof p=="bigint"?b=U.BigInt(g)-U.BigInt(p)+U.BigInt(1):b=g-p+1,typeof b=="bigint"&&b<Number.MAX_SAFE_INTEGER&&(b=Number(b)),o.byterange={length:b,offset:p}}return o},k4=s=>{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=U.BigInt(s.offset)+U.BigInt(s.length)-U.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},JT=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),O4={static(s){const{duration:e,timescale:i=1,sourceDuration:r,periodDuration:o}=s,u=JT(s.endNumber),c=e/i;return typeof u=="number"?{start:0,end:u}:typeof o=="number"?{start:0,end:o/c}:{start:0,end:r/c}},dynamic(s){const{NOW:e,clientOffset:i,availabilityStartTime:r,timescale:o=1,duration:u,periodStart:c=0,minimumUpdatePeriod:p=0,timeShiftBufferDepth:g=1/0}=s,b=JT(s.endNumber),S=(e+i)/1e3,E=r+c,R=S+p-E,P=Math.ceil(R*o/u),w=Math.floor((S-E-g)*o/u),z=Math.floor((S-E)*o/u);return{start:Math.max(0,w),end:typeof b=="number"?b:Math.min(P,z)}}},R4=s=>e=>{const{duration:i,timescale:r=1,periodStart:o,startNumber:u=1}=s;return{number:u+e,duration:i/r,timeline:o,time:e*i}},l0=s=>{const{type:e,duration:i,timescale:r=1,periodDuration:o,sourceDuration:u}=s,{start:c,end:p}=O4[e](s),g=A4(c,p).map(R4(s));if(e==="static"){const b=g.length-1,S=typeof o=="number"?o:u;g[b].duration=S-i/r*b}return g},e1=s=>{const{baseUrl:e,initialization:i={},sourceDuration:r,indexRange:o="",periodStart:u,presentationTime:c,number:p=0,duration:g}=s;if(!e)throw new Error(Ql.NO_BASE_URL);const b=fd({baseUrl:e,source:i.sourceURL,range:i.range}),S=fd({baseUrl:e,source:e,indexRange:o});if(S.map=b,g){const E=l0(s);E.length&&(S.duration=E[0].duration,S.timeline=E[0].timeline)}else r&&(S.duration=r,S.timeline=u);return S.presentationTime=c||u,S.number=p,[S]},u0=(s,e,i)=>{const r=s.sidx.map?s.sidx.map:null,o=s.sidx.duration,u=s.timeline||0,c=s.sidx.byterange,p=c.offset+c.length,g=e.timescale,b=e.references.filter(z=>z.referenceType!==1),S=[],E=s.endList?"static":"dynamic",A=s.sidx.timeline;let R=A,P=s.mediaSequence||0,w;typeof e.firstOffset=="bigint"?w=U.BigInt(p)+e.firstOffset:w=p+e.firstOffset;for(let z=0;z<b.length;z++){const H=e.references[z],X=H.referencedSize,$=H.subsegmentDuration;let W;typeof w=="bigint"?W=w+U.BigInt(X)-U.BigInt(1):W=w+X-1;const Z=`${w}-${W}`,J=e1({baseUrl:i,timescale:g,timeline:u,periodStart:A,presentationTime:R,number:P,duration:$,sourceDuration:o,indexRange:Z,type:E})[0];r&&(J.map=r),S.push(J),typeof w=="bigint"?w+=U.BigInt(X):w+=X,R+=$/g,P++}return s.segments=S,s},M4=["AUDIO","SUBTITLES"],L4=1/60,t1=s=>D4(s,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),I4=(s,e)=>{for(let i=0;i<s.length;i++)if(s[i].attributes.NAME===e)return s[i];return null},i1=s=>{let e=[];return Kk(s,M4,(i,r,o,u)=>{e=e.concat(i.playlists||[])}),e},n1=({playlist:s,mediaSequence:e})=>{s.mediaSequence=e,s.segments.forEach((i,r)=>{i.number=s.mediaSequence+r})},N4=({oldPlaylists:s,newPlaylists:e,timelineStarts:i})=>{e.forEach(r=>{r.discontinuitySequence=i.findIndex(function({timeline:g}){return g===r.timeline});const o=I4(s,r.attributes.NAME);if(!o||r.sidx)return;const u=r.segments[0],c=o.segments.findIndex(function(g){return Math.abs(g.presentationTime-u.presentationTime)<L4});if(c===-1){n1({playlist:r,mediaSequence:o.mediaSequence+o.segments.length}),r.segments[0].discontinuity=!0,r.discontinuityStarts.unshift(0),(!o.segments.length&&r.timeline>o.timeline||o.segments.length&&r.timeline>o.segments[o.segments.length-1].timeline)&&r.discontinuitySequence--;return}o.segments[c].discontinuity&&!u.discontinuity&&(u.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),n1({playlist:r,mediaSequence:o.segments[c].number})})},P4=({oldManifest:s,newManifest:e})=>{const i=s.playlists.concat(i1(s)),r=e.playlists.concat(i1(e));return e.timelineStarts=t1([s.timelineStarts,e.timelineStarts]),N4({oldPlaylists:i,newPlaylists:r,timelineStarts:e.timelineStarts}),e},$f=s=>s&&s.uri+"-"+k4(s.byterange),c0=s=>{const e=s.reduce(function(r,o){return r[o.attributes.baseUrl]||(r[o.attributes.baseUrl]=[]),r[o.attributes.baseUrl].push(o),r},{});let i=[];return Object.values(e).forEach(r=>{const o=KT(r.reduce((u,c)=>{const p=c.attributes.id+(c.attributes.lang||"");return u[p]?(c.segments&&(c.segments[0]&&(c.segments[0].discontinuity=!0),u[p].segments.push(...c.segments)),c.attributes.contentProtection&&(u[p].attributes.contentProtection=c.attributes.contentProtection)):(u[p]=c,u[p].attributes.timelineStarts=[]),u[p].attributes.timelineStarts.push({start:c.attributes.periodStart,timeline:c.attributes.periodStart}),u},{}));i=i.concat(o)}),i.map(r=>(r.discontinuityStarts=w4(r.segments||[],"discontinuity"),r))},d0=(s,e)=>{const i=$f(s.sidx),r=i&&e[i]&&e[i].sidx;return r&&u0(s,r,s.sidx.resolvedUri),s},U4=(s,e={})=>{if(!Object.keys(e).length)return s;for(const i in s)s[i]=d0(s[i],e);return s},B4=({attributes:s,segments:e,sidx:i,mediaSequence:r,discontinuitySequence:o,discontinuityStarts:u},c)=>{const p={attributes:{NAME:s.id,BANDWIDTH:s.bandwidth,CODECS:s.codecs,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:s.timelineStarts,mediaSequence:r,segments:e};return s.contentProtection&&(p.contentProtection=s.contentProtection),s.serviceLocation&&(p.attributes.serviceLocation=s.serviceLocation),i&&(p.sidx=i),c&&(p.attributes.AUDIO="audio",p.attributes.SUBTITLES="subs"),p},F4=({attributes:s,segments:e,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:o})=>{typeof e>"u"&&(e=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);const u={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(u.CODECS=s.codecs);const c={attributes:u,uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:r,discontinuitySequence:o,mediaSequence:i,segments:e};return s.serviceLocation&&(c.attributes.serviceLocation=s.serviceLocation),c},H4=(s,e={},i=!1)=>{let r;const o=s.reduce((u,c)=>{const p=c.attributes.role&&c.attributes.role.value||"",g=c.attributes.lang||"";let b=c.attributes.label||"main";if(g&&!c.attributes.label){const E=p?` (${p})`:"";b=`${c.attributes.lang}${E}`}u[b]||(u[b]={language:g,autoselect:!0,default:p==="main",playlists:[],uri:""});const S=d0(B4(c,i),e);return u[b].playlists.push(S),typeof r>"u"&&p==="main"&&(r=c,r.default=!0),u},{});if(!r){const u=Object.keys(o)[0];o[u].default=!0}return o},z4=(s,e={})=>s.reduce((i,r)=>{const o=r.attributes.label||r.attributes.lang||"text",u=r.attributes.lang||"und";return i[o]||(i[o]={language:u,default:!1,autoselect:!1,playlists:[],uri:""}),i[o].playlists.push(d0(F4(r),e)),i},{}),j4=s=>s.reduce((e,i)=>(i&&i.forEach(r=>{const{channel:o,language:u}=r;e[u]={autoselect:!1,default:!1,instreamId:o,language:u},r.hasOwnProperty("aspectRatio")&&(e[u].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(e[u].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(e[u]["3D"]=r["3D"])}),e),{}),V4=({attributes:s,segments:e,sidx:i,discontinuityStarts:r})=>{const o={attributes:{NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuityStarts:r,timelineStarts:s.timelineStarts,segments:e};return s.frameRate&&(o.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(o.contentProtection=s.contentProtection),s.serviceLocation&&(o.attributes.serviceLocation=s.serviceLocation),i&&(o.sidx=i),o},q4=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",$4=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",G4=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",X4=(s,e)=>{s.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:r}){return r===i.timeline}),i.segments&&i.segments.forEach((r,o)=>{r.number=o})})},s1=s=>s?Object.keys(s).reduce((e,i)=>{const r=s[i];return e.concat(r.playlists)},[]):[],Y4=({dashPlaylists:s,locations:e,contentSteering:i,sidxMapping:r={},previousManifest:o,eventStream:u})=>{if(!s.length)return{};const{sourceDuration:c,type:p,suggestedPresentationDelay:g,minimumUpdatePeriod:b}=s[0].attributes,S=c0(s.filter(q4)).map(V4),E=c0(s.filter($4)),A=c0(s.filter(G4)),R=s.map(W=>W.attributes.captionServices).filter(Boolean),P={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:c,playlists:U4(S,r)};b>=0&&(P.minimumUpdatePeriod=b*1e3),e&&(P.locations=e),i&&(P.contentSteering=i),p==="dynamic"&&(P.suggestedPresentationDelay=g),u&&u.length>0&&(P.eventStream=u);const w=P.playlists.length===0,z=E.length?H4(E,r,w):null,H=A.length?z4(A,r):null,X=S.concat(s1(z),s1(H)),$=X.map(({timelineStarts:W})=>W);return P.timelineStarts=t1($),X4(X,P.timelineStarts),z&&(P.mediaGroups.AUDIO.audio=z),H&&(P.mediaGroups.SUBTITLES.subs=H),R.length&&(P.mediaGroups["CLOSED-CAPTIONS"].cc=j4(R)),o?P4({oldManifest:o,newManifest:P}):P},W4=(s,e,i)=>{const{NOW:r,clientOffset:o,availabilityStartTime:u,timescale:c=1,periodStart:p=0,minimumUpdatePeriod:g=0}=s,b=(r+o)/1e3,S=u+p,A=b+g-S;return Math.ceil((A*c-e)/i)},r1=(s,e)=>{const{type:i,minimumUpdatePeriod:r=0,media:o="",sourceDuration:u,timescale:c=1,startNumber:p=1,periodStart:g}=s,b=[];let S=-1;for(let E=0;E<e.length;E++){const A=e[E],R=A.d,P=A.r||0,w=A.t||0;S<0&&(S=w),w&&w>S&&(S=w);let z;if(P<0){const $=E+1;$===e.length?i==="dynamic"&&r>0&&o.indexOf("$Number$")>0?z=W4(s,S,R):z=(u*c-S)/R:z=(e[$].t-S)/R}else z=P+1;const H=p+b.length+z;let X=p+b.length;for(;X<H;)b.push({number:X,duration:R/c,time:S,timeline:g}),S+=R,X++}return b},Q4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,K4=s=>(e,i,r,o)=>{if(e==="$$")return"$";if(typeof s[i]>"u")return e;const u=""+s[i];return i==="RepresentationID"||(r?o=parseInt(o,10):o=1,u.length>=o)?u:`${new Array(o-u.length+1).join("0")}${u}`},a1=(s,e)=>s.replace(Q4,K4(e)),Z4=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?l0(s):r1(s,e),J4=(s,e)=>{const i={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=s,o=fd({baseUrl:s.baseUrl,source:a1(r.sourceURL,i),range:r.range});return Z4(s,e).map(c=>{i.Number=c.number,i.Time=c.time;const p=a1(s.media||"",i),g=s.timescale||1,b=s.presentationTimeOffset||0,S=s.periodStart+(c.time-b)/g;return{uri:p,timeline:c.timeline,duration:c.duration,resolvedUri:Nf(s.baseUrl||"",p),map:o,number:c.number,presentationTime:S}})},eO=(s,e)=>{const{baseUrl:i,initialization:r={}}=s,o=fd({baseUrl:i,source:r.sourceURL,range:r.range}),u=fd({baseUrl:i,source:e.media,range:e.mediaRange});return u.map=o,u},tO=(s,e)=>{const{duration:i,segmentUrls:r=[],periodStart:o}=s;if(!i&&!e||i&&e)throw new Error(Ql.SEGMENT_TIME_UNSPECIFIED);const u=r.map(g=>eO(s,g));let c;return i&&(c=l0(s)),e&&(c=r1(s,e)),c.map((g,b)=>{if(u[b]){const S=u[b],E=s.timescale||1,A=s.presentationTimeOffset||0;return S.timeline=g.timeline,S.duration=g.duration,S.number=g.number,S.presentationTime=o+(g.time-A)/E,S}}).filter(g=>g)},iO=({attributes:s,segmentInfo:e})=>{let i,r;e.template?(r=J4,i=di(s,e.template)):e.base?(r=e1,i=di(s,e.base)):e.list&&(r=tO,i=di(s,e.list));const o={attributes:s};if(!r)return o;const u=r(i,e.segmentTimeline);if(i.duration){const{duration:c,timescale:p=1}=i;i.duration=c/p}else u.length?i.duration=u.reduce((c,p)=>Math.max(c,Math.ceil(p.duration)),0):i.duration=0;return o.attributes=i,o.segments=u,e.base&&i.indexRange&&(o.sidx=u[0],o.segments=[]),o},nO=s=>s.map(iO),Lt=(s,e)=>ZT(s.childNodes).filter(({tagName:i})=>i===e),pd=s=>s.textContent.trim(),sO=s=>parseFloat(s.split("/").reduce((e,i)=>e/i)),Kl=s=>{const p=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(s);if(!p)return 0;const[g,b,S,E,A,R]=p.slice(1);return parseFloat(g||0)*31536e3+parseFloat(b||0)*2592e3+parseFloat(S||0)*86400+parseFloat(E||0)*3600+parseFloat(A||0)*60+parseFloat(R||0)},rO=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),o1={mediaPresentationDuration(s){return Kl(s)},availabilityStartTime(s){return rO(s)/1e3},minimumUpdatePeriod(s){return Kl(s)},suggestedPresentationDelay(s){return Kl(s)},type(s){return s},timeShiftBufferDepth(s){return Kl(s)},start(s){return Kl(s)},width(s){return parseInt(s,10)},height(s){return parseInt(s,10)},bandwidth(s){return parseInt(s,10)},frameRate(s){return sO(s)},startNumber(s){return parseInt(s,10)},timescale(s){return parseInt(s,10)},presentationTimeOffset(s){return parseInt(s,10)},duration(s){const e=parseInt(s,10);return isNaN(e)?Kl(s):e},d(s){return parseInt(s,10)},t(s){return parseInt(s,10)},r(s){return parseInt(s,10)},presentationTime(s){return parseInt(s,10)},DEFAULT(s){return s}},Jt=s=>s&&s.attributes?ZT(s.attributes).reduce((e,i)=>{const r=o1[i.name]||o1.DEFAULT;return e[i.name]=r(i.value),e},{}):{},aO={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Gf=(s,e)=>e.length?Wl(s.map(function(i){return e.map(function(r){const o=pd(r),u=Nf(i.baseUrl,o),c=di(Jt(r),{baseUrl:u});return u!==o&&!c.serviceLocation&&i.serviceLocation&&(c.serviceLocation=i.serviceLocation),c})})):s,h0=s=>{const e=Lt(s,"SegmentTemplate")[0],i=Lt(s,"SegmentList")[0],r=i&&Lt(i,"SegmentURL").map(E=>di({tag:"SegmentURL"},Jt(E))),o=Lt(s,"SegmentBase")[0],u=i||e,c=u&&Lt(u,"SegmentTimeline")[0],p=i||o||e,g=p&&Lt(p,"Initialization")[0],b=e&&Jt(e);b&&g?b.initialization=g&&Jt(g):b&&b.initialization&&(b.initialization={sourceURL:b.initialization});const S={template:b,segmentTimeline:c&&Lt(c,"S").map(E=>Jt(E)),list:i&&di(Jt(i),{segmentUrls:r,initialization:Jt(g)}),base:o&&di(Jt(o),{initialization:Jt(g)})};return Object.keys(S).forEach(E=>{S[E]||delete S[E]}),S},oO=(s,e,i)=>r=>{const o=Lt(r,"BaseURL"),u=Gf(e,o),c=di(s,Jt(r)),p=h0(r);return u.map(g=>({segmentInfo:di(i,p),attributes:di(c,g)}))},lO=s=>s.reduce((e,i)=>{const r=Jt(i);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());const o=aO[r.schemeIdUri];if(o){e[o]={attributes:r};const u=Lt(i,"cenc:pssh")[0];if(u){const c=pd(u);e[o].pssh=c&&Z_(c)}}return e},{}),uO=s=>{if(s.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{let r,o;return o=i,/^CC\d=/.test(i)?[r,o]=i.split("="):/^CC\d$/.test(i)&&(r=i),{channel:r,language:o}});if(s.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{const r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[o,u=""]=i.split("=");r.channel=o,r.language=i,u.split(",").forEach(c=>{const[p,g]=c.split(":");p==="lang"?r.language=g:p==="er"?r.easyReader=Number(g):p==="war"?r.aspectRatio=Number(g):p==="3D"&&(r["3D"]=Number(g))})}else r.language=i;return r.channel&&(r.channel="SERVICE"+r.channel),r})},cO=s=>Wl(Lt(s.node,"EventStream").map(e=>{const i=Jt(e),r=i.schemeIdUri;return Lt(e,"Event").map(o=>{const u=Jt(o),c=u.presentationTime||0,p=i.timescale||1,g=u.duration||0,b=c/p+s.attributes.start;return{schemeIdUri:r,value:i.value,id:u.id,start:b,end:b+g/p,messageData:pd(o)||u.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),dO=(s,e,i)=>r=>{const o=Jt(r),u=Gf(e,Lt(r,"BaseURL")),c=Lt(r,"Role")[0],p={role:Jt(c)};let g=di(s,o,p);const b=Lt(r,"Accessibility")[0],S=uO(Jt(b));S&&(g=di(g,{captionServices:S}));const E=Lt(r,"Label")[0];if(E&&E.childNodes.length){const z=E.childNodes[0].nodeValue.trim();g=di(g,{label:z})}const A=lO(Lt(r,"ContentProtection"));Object.keys(A).length&&(g=di(g,{contentProtection:A}));const R=h0(r),P=Lt(r,"Representation"),w=di(i,R);return Wl(P.map(oO(g,u,w)))},hO=(s,e)=>(i,r)=>{const o=Gf(e,Lt(i.node,"BaseURL")),u=di(s,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(u.periodDuration=i.attributes.duration);const c=Lt(i.node,"AdaptationSet"),p=h0(i.node);return Wl(c.map(dO(u,o,p)))},fO=(s,e)=>{if(s.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!s.length)return null;const i=di({serverURL:pd(s[0])},Jt(s[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},pO=({attributes:s,priorPeriodAttributes:e,mpdType:i})=>typeof s.start=="number"?s.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,mO=(s,e={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:o=0,eventHandler:u=function(){}}=e,c=Lt(s,"Period");if(!c.length)throw new Error(Ql.INVALID_NUMBER_OF_PERIOD);const p=Lt(s,"Location"),g=Jt(s),b=Gf([{baseUrl:i}],Lt(s,"BaseURL")),S=Lt(s,"ContentSteering");g.type=g.type||"static",g.sourceDuration=g.mediaPresentationDuration||0,g.NOW=r,g.clientOffset=o,p.length&&(g.locations=p.map(pd));const E=[];return c.forEach((A,R)=>{const P=Jt(A),w=E[R-1];P.start=pO({attributes:P,priorPeriodAttributes:w?w.attributes:null,mpdType:g.type}),E.push({node:A,attributes:P})}),{locations:g.locations,contentSteeringInfo:fO(S,u),representationInfo:Wl(E.map(hO(g,b))),eventStream:Wl(E.map(cO))}},l1=s=>{if(s==="")throw new Error(Ql.DASH_EMPTY_MANIFEST);const e=new C4;let i,r;try{i=e.parseFromString(s,"application/xml"),r=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Ql.DASH_INVALID_XML);return r},gO=s=>{const e=Lt(s,"UTCTiming")[0];if(!e)return null;const i=Jt(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Ql.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},yO=(s,e={})=>{const i=mO(l1(s),e),r=nO(i.representationInfo);return Y4({dashPlaylists:r,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},vO=s=>gO(l1(s));var u1=Math.pow(2,32),bO=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i;return e.getBigUint64?(i=e.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?Number(i):i):e.getUint32(0)*u1+e.getUint32(4)},_O={getUint64:bO,MAX_UINT32:u1},c1=_O.getUint64,TO=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i={version:s[0],flags:new Uint8Array(s.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},r=12;i.version===0?(i.earliestPresentationTime=e.getUint32(r),i.firstOffset=e.getUint32(r+4),r+=8):(i.earliestPresentationTime=c1(s.subarray(r)),i.firstOffset=c1(s.subarray(r+8)),r+=16),r+=2;var o=e.getUint16(r);for(r+=2;o>0;r+=12,o--)i.references.push({referenceType:(s[r]&128)>>>7,referencedSize:e.getUint32(r)&2147483647,subsegmentDuration:e.getUint32(r+4),startsWithSap:!!(s[r+8]&128),sapType:(s[r+8]&112)>>>4,sapDeltaTime:e.getUint32(r+8)&268435455});return i},SO=TO;const xO=Xc(SO);var EO=Ne([73,68,51]),CO=function(e,i){i===void 0&&(i=0),e=Ne(e);var r=e[i+5],o=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],u=(r&16)>>4;return u?o+20:o+10},md=function s(e,i){return i===void 0&&(i=0),e=Ne(e),e.length-i<10||!Mt(e,EO,{offset:i})?i:(i+=CO(e,i),s(e,i))},d1=function(e){return typeof e=="string"?aT(e):e},AO=function(e){return Array.isArray(e)?e.map(function(i){return d1(i)}):[d1(e)]},wO=function s(e,i,r){r===void 0&&(r=!1),i=AO(i),e=Ne(e);var o=[];if(!i.length)return o;for(var u=0;u<e.length;){var c=(e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3])>>>0,p=e.subarray(u+4,u+8);if(c===0)break;var g=u+c;if(g>e.length){if(r)break;g=e.length}var b=e.subarray(u+8,g);Mt(p,i[0])&&(i.length===1?o.push(b):o.push.apply(o,s(b,i.slice(1),r))),u=g}return o},Xf={EBML:Ne([26,69,223,163]),DocType:Ne([66,130]),Segment:Ne([24,83,128,103]),SegmentInfo:Ne([21,73,169,102]),Tracks:Ne([22,84,174,107]),Track:Ne([174]),TrackNumber:Ne([215]),DefaultDuration:Ne([35,227,131]),TrackEntry:Ne([174]),TrackType:Ne([131]),FlagDefault:Ne([136]),CodecID:Ne([134]),CodecPrivate:Ne([99,162]),VideoTrack:Ne([224]),AudioTrack:Ne([225]),Cluster:Ne([31,67,182,117]),Timestamp:Ne([231]),TimestampScale:Ne([42,215,177]),BlockGroup:Ne([160]),BlockDuration:Ne([155]),Block:Ne([161]),SimpleBlock:Ne([163])},f0=[128,64,32,16,8,4,2,1],DO=function(e){for(var i=1,r=0;r<f0.length&&!(e&f0[r]);r++)i++;return i},Yf=function(e,i,r,o){r===void 0&&(r=!0),o===void 0&&(o=!1);var u=DO(e[i]),c=e.subarray(i,i+u);return r&&(c=Array.prototype.slice.call(e,i,i+u),c[0]^=f0[u-1]),{length:u,value:Yk(c,{signed:o}),bytes:c}},h1=function s(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return s(i)}):typeof e=="number"?Wk(e):e},kO=function(e){return Array.isArray(e)?e.map(function(i){return h1(i)}):[h1(e)]},OO=function s(e,i,r){if(r>=i.length)return i.length;var o=Yf(i,r,!1);if(Mt(e.bytes,o.bytes))return r;var u=Yf(i,r+o.length);return s(e,i,r+u.length+u.value+o.length)},f1=function s(e,i){i=kO(i),e=Ne(e);var r=[];if(!i.length)return r;for(var o=0;o<e.length;){var u=Yf(e,o,!1),c=Yf(e,o+u.length),p=o+u.length+c.length;c.value===127&&(c.value=OO(u,e,p),c.value!==e.length&&(c.value-=p));var g=p+c.value>e.length?e.length:p+c.value,b=e.subarray(p,g);Mt(i[0],u.bytes)&&(i.length===1?r.push(b):r=r.concat(s(b,i.slice(1))));var S=u.length+c.length+b.length;o+=S}return r},RO=Ne([0,0,0,1]),MO=Ne([0,0,1]),LO=Ne([0,0,3]),IO=function(e){for(var i=[],r=1;r<e.length-2;)Mt(e.subarray(r,r+3),LO)&&(i.push(r+2),r++),r++;if(i.length===0)return e;var o=e.length-i.length,u=new Uint8Array(o),c=0;for(r=0;r<o;c++,r++)c===i[0]&&(c++,i.shift()),u[r]=e[c];return u},p1=function(e,i,r,o){o===void 0&&(o=1/0),e=Ne(e),r=[].concat(r);for(var u=0,c,p=0;u<e.length&&(p<o||c);){var g=void 0;if(Mt(e.subarray(u),RO)?g=4:Mt(e.subarray(u),MO)&&(g=3),!g){u++;continue}if(p++,c)return IO(e.subarray(c,u));var b=void 0;i==="h264"?b=e[u+g]&31:i==="h265"&&(b=e[u+g]>>1&63),r.indexOf(b)!==-1&&(c=u+g),u+=g+(i==="h264"?1:2)}return e.subarray(0,0)},NO=function(e,i,r){return p1(e,"h264",i,r)},PO=function(e,i,r){return p1(e,"h265",i,r)},qi={webm:Ne([119,101,98,109]),matroska:Ne([109,97,116,114,111,115,107,97]),flac:Ne([102,76,97,67]),ogg:Ne([79,103,103,83]),ac3:Ne([11,119]),riff:Ne([82,73,70,70]),avi:Ne([65,86,73]),wav:Ne([87,65,86,69]),"3gp":Ne([102,116,121,112,51,103]),mp4:Ne([102,116,121,112]),fmp4:Ne([115,116,121,112]),mov:Ne([102,116,121,112,113,116]),moov:Ne([109,111,111,118]),moof:Ne([109,111,111,102])},Zl={aac:function(e){var i=md(e);return Mt(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=md(e);return Mt(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=f1(e,[Xf.EBML,Xf.DocType])[0];return Mt(i,qi.webm)},mkv:function(e){var i=f1(e,[Xf.EBML,Xf.DocType])[0];return Mt(i,qi.matroska)},mp4:function(e){if(Zl["3gp"](e)||Zl.mov(e))return!1;if(Mt(e,qi.mp4,{offset:4})||Mt(e,qi.fmp4,{offset:4})||Mt(e,qi.moof,{offset:4})||Mt(e,qi.moov,{offset:4}))return!0},mov:function(e){return Mt(e,qi.mov,{offset:4})},"3gp":function(e){return Mt(e,qi["3gp"],{offset:4})},ac3:function(e){var i=md(e);return Mt(e,qi.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=md(e);return Mt(e,qi.flac,{offset:i})},ogg:function(e){return Mt(e,qi.ogg)},avi:function(e){return Mt(e,qi.riff)&&Mt(e,qi.avi,{offset:8})},wav:function(e){return Mt(e,qi.riff)&&Mt(e,qi.wav,{offset:8})},h264:function(e){return NO(e,7,3).length},h265:function(e){return PO(e,[32,33],3).length}},p0=Object.keys(Zl).filter(function(s){return s!=="ts"&&s!=="h264"&&s!=="h265"}).concat(["ts","h264","h265"]);p0.forEach(function(s){var e=Zl[s];Zl[s]=function(i){return e(Ne(i))}});var UO=Zl,m0=function(e){e=Ne(e);for(var i=0;i<p0.length;i++){var r=p0[i];if(UO[r](e))return r}return""},BO=function(e){return wO(e,["moof"]).length>0},g0=9e4,y0,v0,Wf,b0,m1,g1,y1;y0=function(s){return s*g0},v0=function(s,e){return s*e},Wf=function(s){return s/g0},b0=function(s,e){return s/e},m1=function(s,e){return y0(b0(s,e))},g1=function(s,e){return v0(Wf(s),e)},y1=function(s,e,i){return Wf(i?s:s-e)};var Ao={ONE_SECOND_IN_TS:g0,secondsToVideoTs:y0,secondsToAudioTs:v0,videoTsToSeconds:Wf,audioTsToSeconds:b0,audioTsToVideoTs:m1,videoTsToAudioTs:g1,metadataTsToSeconds:y1};/**
|
||
* @license
|
||
* Video.js 8.23.3 <http://videojs.com/>
|
||
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/videojs/video.js/blob/main/LICENSE>
|
||
*
|
||
* Includes vtt.js <https://github.com/mozilla/vtt.js>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
|
||
*/var _0="8.23.3";const kr={},xa=function(s,e){return kr[s]=kr[s]||[],e&&(kr[s]=kr[s].concat(e)),kr[s]},FO=function(s,e){xa(s,e)},v1=function(s,e){const i=xa(s).indexOf(e);return i<=-1?!1:(kr[s]=kr[s].slice(),kr[s].splice(i,1),!0)},HO=function(s,e){xa(s,[].concat(e).map(i=>{const r=(...o)=>(v1(s,r),i(...o));return r}))},Qf={prefixed:!0},Kf=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],b1=Kf[0];let gd;for(let s=0;s<Kf.length;s++)if(Kf[s][1]in me){gd=Kf[s];break}if(gd){for(let s=0;s<gd.length;s++)Qf[b1[s]]=gd[s];Qf.prefixed=gd[0]!==b1[0]}let an=[];const zO=(s,e,i)=>(r,o,u)=>{const c=e.levels[o],p=new RegExp(`^(${c})$`);let g=s;if(r!=="log"&&u.unshift(r.toUpperCase()+":"),i&&(g=`%c${s}`,u.unshift(i)),u.unshift(g+":"),an){an.push([].concat(u));const S=an.length-1e3;an.splice(0,S>0?S:0)}if(!U.console)return;let b=U.console[r];!b&&r==="debug"&&(b=U.console.info||U.console.log),!(!b||!c||!p.test(r))&&b[Array.isArray(u)?"apply":"call"](U.console,u)};function T0(s,e=":",i=""){let r="info",o;function u(...c){o("log",r,c)}return o=zO(s,u,i),u.createLogger=(c,p,g)=>{const b=p!==void 0?p:e,S=g!==void 0?g:i,E=`${s} ${b} ${c}`;return T0(E,b,S)},u.createNewLogger=(c,p,g)=>T0(c,p,g),u.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},u.level=c=>{if(typeof c=="string"){if(!u.levels.hasOwnProperty(c))throw new Error(`"${c}" in not a valid log level`);r=c}return r},u.history=()=>an?[].concat(an):[],u.history.filter=c=>(an||[]).filter(p=>new RegExp(`.*${c}.*`).test(p[0])),u.history.clear=()=>{an&&(an.length=0)},u.history.disable=()=>{an!==null&&(an.length=0,an=null)},u.history.enable=()=>{an===null&&(an=[])},u.error=(...c)=>o("error",r,c),u.warn=(...c)=>o("warn",r,c),u.debug=(...c)=>o("debug",r,c),u}const Ke=T0("VIDEOJS"),_1=Ke.createLogger,jO=Object.prototype.toString,T1=function(s){return Is(s)?Object.keys(s):[]};function Jl(s,e){T1(s).forEach(i=>e(s[i],i))}function S1(s,e,i=0){return T1(s).reduce((r,o)=>e(r,s[o],o),i)}function Is(s){return!!s&&typeof s=="object"}function eu(s){return Is(s)&&jO.call(s)==="[object Object]"&&s.constructor===Object}function vt(...s){const e={};return s.forEach(i=>{i&&Jl(i,(r,o)=>{if(!eu(r)){e[o]=r;return}eu(e[o])||(e[o]={}),e[o]=vt(e[o],r)})}),e}function x1(s={}){const e=[];for(const i in s)if(s.hasOwnProperty(i)){const r=s[i];e.push(r)}return e}function Zf(s,e,i,r=!0){const o=c=>Object.defineProperty(s,e,{value:c,enumerable:!0,writable:!0}),u={configurable:!0,enumerable:!0,get(){const c=i();return o(c),c}};return r&&(u.set=o),Object.defineProperty(s,e,u)}var VO=Object.freeze({__proto__:null,each:Jl,reduce:S1,isObject:Is,isPlain:eu,merge:vt,values:x1,defineLazyProperty:Zf});let S0=!1,E1=null,ds=!1,C1,A1=!1,tu=!1,iu=!1,Ns=!1,x0=null,Jf=null;const qO=!!(U.cast&&U.cast.framework&&U.cast.framework.CastReceiverContext);let w1=null,ep=!1,tp=!1,ip=!1,np=!1,sp=!1,rp=!1,ap=!1;const yd=!!(nu()&&("ontouchstart"in U||U.navigator.maxTouchPoints||U.DocumentTouch&&U.document instanceof U.DocumentTouch)),Ea=U.navigator&&U.navigator.userAgentData;if(Ea&&Ea.platform&&Ea.brands&&(ds=Ea.platform==="Android",tu=!!Ea.brands.find(s=>s.brand==="Microsoft Edge"),iu=!!Ea.brands.find(s=>s.brand==="Chromium"),Ns=!tu&&iu,x0=Jf=(Ea.brands.find(s=>s.brand==="Chromium")||{}).version||null,tp=Ea.platform==="Windows"),!iu){const s=U.navigator&&U.navigator.userAgent||"";S0=/iPod/i.test(s),E1=function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),ds=/Android/i.test(s),C1=function(){const e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);return i&&r?parseFloat(e[1]+"."+e[2]):i||null}(),A1=/Firefox/i.test(s),tu=/Edg/i.test(s),iu=/Chrome/i.test(s)||/CriOS/i.test(s),Ns=!tu&&iu,x0=Jf=function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),w1=function(){const e=/MSIE\s(\d+)\.\d/.exec(s);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(i=11),i}(),sp=/Tizen/i.test(s),rp=/Web0S/i.test(s),ap=sp||rp,ep=/Safari/i.test(s)&&!Ns&&!ds&&!tu&&!ap,tp=/Windows/i.test(s),ip=/iPad/i.test(s)||ep&&yd&&!/iPhone/i.test(s),np=/iPhone/i.test(s)&&!ip}const Ii=np||ip||S0,op=(ep||Ii)&&!Ns;var D1=Object.freeze({__proto__:null,get IS_IPOD(){return S0},get IOS_VERSION(){return E1},get IS_ANDROID(){return ds},get ANDROID_VERSION(){return C1},get IS_FIREFOX(){return A1},get IS_EDGE(){return tu},get IS_CHROMIUM(){return iu},get IS_CHROME(){return Ns},get CHROMIUM_VERSION(){return x0},get CHROME_VERSION(){return Jf},IS_CHROMECAST_RECEIVER:qO,get IE_VERSION(){return w1},get IS_SAFARI(){return ep},get IS_WINDOWS(){return tp},get IS_IPAD(){return ip},get IS_IPHONE(){return np},get IS_TIZEN(){return sp},get IS_WEBOS(){return rp},get IS_SMART_TV(){return ap},TOUCH_ENABLED:yd,IS_IOS:Ii,IS_ANY_SAFARI:op});function k1(s){return typeof s=="string"&&!!s.trim()}function $O(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function nu(){return me===U.document}function su(s){return Is(s)&&s.nodeType===1}function O1(){try{return U.parent!==U.self}catch{return!0}}function R1(s){return function(e,i){if(!k1(e))return me[s](null);k1(i)&&(i=me.querySelector(i));const r=su(i)?i:me;return r[s]&&r[s](e)}}function Ue(s="div",e={},i={},r){const o=me.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(u){const c=e[u];u==="textContent"?Ca(o,c):(o[u]!==c||u==="tabIndex")&&(o[u]=c)}),Object.getOwnPropertyNames(i).forEach(function(u){o.setAttribute(u,i[u])}),r&&C0(o,r),o}function Ca(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function E0(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function vd(s,e){return $O(e),s.classList.contains(e)}function wo(s,...e){return s.classList.add(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s}function lp(s,...e){return s?(s.classList.remove(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s):(Ke.warn("removeClass was called with an element that doesn't exist"),null)}function M1(s,e,i){return typeof i=="function"&&(i=i(s,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(r=>s.classList.toggle(r,i)),s}function L1(s,e){Object.getOwnPropertyNames(e).forEach(function(i){const r=e[i];r===null||typeof r>"u"||r===!1?s.removeAttribute(i):s.setAttribute(i,r===!0?"":r)})}function Aa(s){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(s&&s.attributes&&s.attributes.length>0){const r=s.attributes;for(let o=r.length-1;o>=0;o--){const u=r[o].name;let c=r[o].value;i.includes(u)&&(c=c!==null),e[u]=c}}return e}function I1(s,e){return s.getAttribute(e)}function ru(s,e,i){s.setAttribute(e,i)}function up(s,e){s.removeAttribute(e)}function N1(){me.body.focus(),me.onselectstart=function(){return!1}}function P1(){me.onselectstart=function(){return!0}}function au(s){if(s&&s.getBoundingClientRect&&s.parentNode){const e=s.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(r=>{e[r]!==void 0&&(i[r]=e[r])}),i.height||(i.height=parseFloat(ou(s,"height"))),i.width||(i.width=parseFloat(ou(s,"width"))),i}}function bd(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};const e=s.offsetWidth,i=s.offsetHeight;let r=0,o=0;for(;s.offsetParent&&s!==me[Qf.fullscreenElement];)r+=s.offsetLeft,o+=s.offsetTop,s=s.offsetParent;return{left:r,top:o,width:e,height:i}}function cp(s,e){const i={x:0,y:0};if(Ii){let S=s;for(;S&&S.nodeName.toLowerCase()!=="html";){const E=ou(S,"transform");if(/^matrix/.test(E)){const A=E.slice(7,-1).split(/,\s/).map(Number);i.x+=A[4],i.y+=A[5]}else if(/^matrix3d/.test(E)){const A=E.slice(9,-1).split(/,\s/).map(Number);i.x+=A[12],i.y+=A[13]}if(S.assignedSlot&&S.assignedSlot.parentElement&&U.WebKitCSSMatrix){const A=U.getComputedStyle(S.assignedSlot.parentElement).transform,R=new U.WebKitCSSMatrix(A);i.x+=R.m41,i.y+=R.m42}S=S.parentNode||S.host}}const r={},o=bd(e.target),u=bd(s),c=u.width,p=u.height;let g=e.offsetY-(u.top-o.top),b=e.offsetX-(u.left-o.left);return e.changedTouches&&(b=e.changedTouches[0].pageX-u.left,g=e.changedTouches[0].pageY+u.top,Ii&&(b-=i.x,g-=i.y)),r.y=1-Math.max(0,Math.min(1,g/p)),r.x=Math.max(0,Math.min(1,b/c)),r}function U1(s){return Is(s)&&s.nodeType===3}function dp(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function B1(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),su(e)||U1(e))return e;if(typeof e=="string"&&/\S/.test(e))return me.createTextNode(e)}).filter(e=>e)}function C0(s,e){return B1(e).forEach(i=>s.appendChild(i)),s}function F1(s,e){return C0(dp(s),e)}function _d(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0||s.type==="mousedown"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}const wa=R1("querySelector"),H1=R1("querySelectorAll");function ou(s,e){if(!s||!e)return"";if(typeof U.getComputedStyle=="function"){let i;try{i=U.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function z1(s){[...me.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(o=>o.cssText).join(""),r=me.createElement("style");r.textContent=i,s.document.head.appendChild(r)}catch{const r=me.createElement("link");r.rel="stylesheet",r.type=e.type,r.media=e.media.mediaText,r.href=e.href,s.document.head.appendChild(r)}})}var j1=Object.freeze({__proto__:null,isReal:nu,isEl:su,isInFrame:O1,createEl:Ue,textContent:Ca,prependTo:E0,hasClass:vd,addClass:wo,removeClass:lp,toggleClass:M1,setAttributes:L1,getAttributes:Aa,getAttribute:I1,setAttribute:ru,removeAttribute:up,blockTextSelection:N1,unblockTextSelection:P1,getBoundingClientRect:au,findPosition:bd,getPointerPosition:cp,isTextNode:U1,emptyEl:dp,normalizeContent:B1,appendContent:C0,insertContent:F1,isSingleLeftClick:_d,$:wa,$$:H1,computedStyle:ou,copyStyleSheetsToWindow:z1});let V1=!1,A0;const GO=function(){if(A0.options.autoSetup===!1)return;const s=Array.prototype.slice.call(me.getElementsByTagName("video")),e=Array.prototype.slice.call(me.getElementsByTagName("audio")),i=Array.prototype.slice.call(me.getElementsByTagName("video-js")),r=s.concat(e,i);if(r&&r.length>0)for(let o=0,u=r.length;o<u;o++){const c=r[o];if(c&&c.getAttribute)c.player===void 0&&c.getAttribute("data-setup")!==null&&A0(c);else{w0(1);break}}else V1||w0(1)};function w0(s,e){nu()&&(e&&(A0=e),U.setTimeout(GO,s))}function D0(){V1=!0,U.removeEventListener("load",D0)}nu()&&(me.readyState==="complete"?D0():U.addEventListener("load",D0));const q1=function(s){const e=me.createElement("style");return e.className=s,e},$1=function(s,e){s.styleSheet?s.styleSheet.cssText=e:s.textContent=e};var $i=new WeakMap;let XO=3;function zn(){return XO++}function G1(s,e){if(!$i.has(s))return;const i=$i.get(s);i.handlers[e].length===0&&(delete i.handlers[e],s.removeEventListener?s.removeEventListener(e,i.dispatcher,!1):s.detachEvent&&s.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&$i.delete(s)}function k0(s,e,i,r){i.forEach(function(o){s(e,o,r)})}function hp(s){if(s.fixed_)return s;function e(){return!0}function i(){return!1}if(!s||!s.isPropagationStopped||!s.isImmediatePropagationStopped){const r=s||U.event;s={};const o=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const u in r)o.includes(u)||u==="returnValue"&&r.preventDefault||(s[u]=r[u]);if(s.target||(s.target=s.srcElement||me),s.relatedTarget||(s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement),s.preventDefault=function(){r.preventDefault&&r.preventDefault(),s.returnValue=!1,r.returnValue=!1,s.defaultPrevented=!0},s.defaultPrevented=!1,s.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),s.cancelBubble=!0,r.cancelBubble=!0,s.isPropagationStopped=e},s.isPropagationStopped=i,s.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),s.isImmediatePropagationStopped=e,s.stopPropagation()},s.isImmediatePropagationStopped=i,s.clientX!==null&&s.clientX!==void 0){const u=me.documentElement,c=me.body;s.pageX=s.clientX+(u&&u.scrollLeft||c&&c.scrollLeft||0)-(u&&u.clientLeft||c&&c.clientLeft||0),s.pageY=s.clientY+(u&&u.scrollTop||c&&c.scrollTop||0)-(u&&u.clientTop||c&&c.clientTop||0)}s.which=s.charCode||s.keyCode,s.button!==null&&s.button!==void 0&&(s.button=s.button&1?0:s.button&4?1:s.button&2?2:0)}return s.fixed_=!0,s}let fp;const YO=function(){if(typeof fp!="boolean"){fp=!1;try{const s=Object.defineProperty({},"passive",{get(){fp=!0}});U.addEventListener("test",null,s),U.removeEventListener("test",null,s)}catch{}}return fp},WO=["touchstart","touchmove"];function xn(s,e,i){if(Array.isArray(e))return k0(xn,s,e,i);$i.has(s)||$i.set(s,{});const r=$i.get(s);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),i.guid||(i.guid=zn()),r.handlers[e].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(o,u){if(r.disabled)return;o=hp(o);const c=r.handlers[o.type];if(c){const p=c.slice(0);for(let g=0,b=p.length;g<b&&!o.isImmediatePropagationStopped();g++)try{p[g].call(s,o,u)}catch(S){Ke.error(S)}}}),r.handlers[e].length===1)if(s.addEventListener){let o=!1;YO()&&WO.indexOf(e)>-1&&(o={passive:!0}),s.addEventListener(e,r.dispatcher,o)}else s.attachEvent&&s.attachEvent("on"+e,r.dispatcher)}function Ni(s,e,i){if(!$i.has(s))return;const r=$i.get(s);if(!r.handlers)return;if(Array.isArray(e))return k0(Ni,s,e,i);const o=function(c,p){r.handlers[p]=[],G1(c,p)};if(e===void 0){for(const c in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},c)&&o(s,c);return}const u=r.handlers[e];if(u){if(!i){o(s,e);return}if(i.guid)for(let c=0;c<u.length;c++)u[c].guid===i.guid&&u.splice(c--,1);G1(s,e)}}function lu(s,e,i){const r=$i.has(s)?$i.get(s):{},o=s.parentNode||s.ownerDocument;if(typeof e=="string"?e={type:e,target:s}:e.target||(e.target=s),e=hp(e),r.dispatcher&&r.dispatcher.call(s,e,i),o&&!e.isPropagationStopped()&&e.bubbles===!0)lu.call(null,o,e,i);else if(!o&&!e.defaultPrevented&&e.target&&e.target[e.type]){$i.has(e.target)||$i.set(e.target,{});const u=$i.get(e.target);e.target[e.type]&&(u.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),u.disabled=!1)}return!e.defaultPrevented}function pp(s,e,i){if(Array.isArray(e))return k0(pp,s,e,i);const r=function(){Ni(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||zn(),xn(s,e,r)}function O0(s,e,i){const r=function(){Ni(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||zn(),xn(s,e,r)}var QO=Object.freeze({__proto__:null,fixEvent:hp,on:xn,off:Ni,trigger:lu,one:pp,any:O0});const jn=30,wt=function(s,e,i){e.guid||(e.guid=zn());const r=e.bind(s);return r.guid=i?i+"_"+e.guid:e.guid,r},Ps=function(s,e){let i=U.performance.now();return function(...o){const u=U.performance.now();u-i>=e&&(s(...o),i=u)}},X1=function(s,e,i,r=U){let o;const u=()=>{r.clearTimeout(o),o=null},c=function(){const p=this,g=arguments;let b=function(){o=null,b=null,i||s.apply(p,g)};!o&&i&&s.apply(p,g),r.clearTimeout(o),o=r.setTimeout(b,e)};return c.cancel=u,c};var KO=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:jn,bind_:wt,throttle:Ps,debounce:X1});let Td;class En{on(e,i){const r=this.addEventListener;this.addEventListener=()=>{},xn(this,e,i),this.addEventListener=r}off(e,i){Ni(this,e,i)}one(e,i){const r=this.addEventListener;this.addEventListener=()=>{},pp(this,e,i),this.addEventListener=r}any(e,i){const r=this.addEventListener;this.addEventListener=()=>{},O0(this,e,i),this.addEventListener=r}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=hp(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),lu(this,e)}queueTrigger(e){Td||(Td=new Map);const i=e.type||e;let r=Td.get(this);r||(r=new Map,Td.set(this,r));const o=r.get(i);r.delete(i),U.clearTimeout(o);const u=U.setTimeout(()=>{r.delete(i),r.size===0&&(r=null,Td.delete(this)),this.trigger(e)},0);r.set(i,u)}}En.prototype.allowedEvents_={},En.prototype.addEventListener=En.prototype.on,En.prototype.removeEventListener=En.prototype.off,En.prototype.dispatchEvent=En.prototype.trigger;const mp=s=>typeof s.name=="function"?s.name():typeof s.name=="string"?s.name:s.name_?s.name_:s.constructor&&s.constructor.name?s.constructor.name:typeof s,Or=s=>s instanceof En||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),ZO=(s,e)=>{Or(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},R0=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,gp=(s,e,i)=>{if(!s||!s.nodeName&&!Or(s))throw new Error(`Invalid target for ${mp(e)}#${i}; must be a DOM node or evented object.`)},Y1=(s,e,i)=>{if(!R0(s))throw new Error(`Invalid event type for ${mp(e)}#${i}; must be a non-empty string or array.`)},W1=(s,e,i)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${mp(e)}#${i}; must be a function.`)},M0=(s,e,i)=>{const r=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let o,u,c;return r?(o=s.eventBusEl_,e.length>=3&&e.shift(),[u,c]=e):(o=e[0],u=e[1],c=e[2]),gp(o,s,i),Y1(u,s,i),W1(c,s,i),c=wt(s,c),{isTargetingSelf:r,target:o,type:u,listener:c}},Do=(s,e,i,r)=>{gp(s,s,e),s.nodeName?QO[e](s,i,r):s[e](i,r)},JO={on(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=M0(this,s,"on");if(Do(i,"on",r,o),!e){const u=()=>this.off(i,r,o);u.guid=o.guid;const c=()=>this.off("dispose",u);c.guid=o.guid,Do(this,"on","dispose",u),Do(i,"on","dispose",c)}},one(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=M0(this,s,"one");if(e)Do(i,"one",r,o);else{const u=(...c)=>{this.off(i,r,u),o.apply(null,c)};u.guid=o.guid,Do(i,"one",r,u)}},any(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=M0(this,s,"any");if(e)Do(i,"any",r,o);else{const u=(...c)=>{this.off(i,r,u),o.apply(null,c)};u.guid=o.guid,Do(i,"any",r,u)}},off(s,e,i){if(!s||R0(s))Ni(this.eventBusEl_,s,e);else{const r=s,o=e;gp(r,this,"off"),Y1(o,this,"off"),W1(i,this,"off"),i=wt(this,i),this.off("dispose",i),r.nodeName?(Ni(r,o,i),Ni(r,"dispose",i)):Or(r)&&(r.off(o,i),r.off("dispose",i))}},trigger(s,e){gp(this.eventBusEl_,this,"trigger");const i=s&&typeof s!="string"?s.type:s;if(!R0(i))throw new Error(`Invalid event type for ${mp(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return lu(this.eventBusEl_,s,e)}};function L0(s,e={}){const{eventBusKey:i}=e;if(i){if(!s[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);s.eventBusEl_=s[i]}else s.eventBusEl_=Ue("span",{className:"vjs-event-bus"});return Object.assign(s,JO),s.eventedCallbacks&&s.eventedCallbacks.forEach(r=>{r()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(r){r&&$i.has(r)&&$i.delete(r)}),U.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const e3={state:{},setState(s){typeof s=="function"&&(s=s());let e;return Jl(s,(i,r)=>{this.state[r]!==i&&(e=e||{},e[r]={from:this.state[r],to:i}),this.state[r]=i}),e&&Or(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function Q1(s,e){return Object.assign(s,e3),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&Or(s)&&s.on("statechanged",s.handleStateChanged),s}const Sd=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},Ht=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},K1=function(s,e){return Ht(s)===Ht(e)};var t3=Object.freeze({__proto__:null,toLowerCase:Sd,toTitleCase:Ht,titleCaseEquals:K1});let ce=class _n{constructor(e,i,r){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=vt({},this.options_),i=this.options_=vt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const o=e&&e.id&&e.id()||"no_player";this.id_=`${o}_component_${zn()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(o=>this.addClass(o)),["on","off","one","any","trigger"].forEach(o=>{this[o]=void 0}),i.evented!==!1&&(L0(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Q1(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(r),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=vt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,r){return Ue(e,i,r)}localize(e,i,r=e){const o=this.player_.language&&this.player_.language(),u=this.player_.languages&&this.player_.languages(),c=u&&u[o],p=o&&o.split("-")[0],g=u&&u[p];let b=r;return c&&c[e]?b=c[e]:g&&g[e]&&(b=g[e]),i&&(b=b.replace(/\{(\d+)\}/g,function(S,E){const A=i[E-1];let R=A;return typeof A>"u"&&(R=S),R})),b}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((r,o)=>r.concat(o),[]);let i=this;for(let r=0;r<e.length;r++)if(i=i.getChild(e[r]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const r="http://www.w3.org/2000/svg",o=Ue("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),u=me.createElementNS(r,"svg");u.setAttributeNS(null,"viewBox","0 0 512 512");const c=me.createElementNS(r,"use");return u.appendChild(c),c.setAttributeNS(null,"href",`#vjs-icon-${e}`),o.appendChild(u),this.iconIsSet_?i.replaceChild(o,i.querySelector(".vjs-icon-placeholder")):i.appendChild(o),this.iconIsSet_=!0,o}addChild(e,i={},r=this.children_.length){let o,u;if(typeof e=="string"){u=Ht(e);const c=i.componentClass||u;i.name=u;const p=_n.getComponent(c);if(!p)throw new Error(`Component ${c} does not exist`);if(typeof p!="function")return null;o=new p(this.player_||this,i)}else o=e;if(o.parentComponent_&&o.parentComponent_.removeChild(o),this.children_.splice(r,0,o),o.parentComponent_=this,typeof o.id=="function"&&(this.childIndex_[o.id()]=o),u=u||o.name&&Ht(o.name()),u&&(this.childNameIndex_[u]=o,this.childNameIndex_[Sd(u)]=o),typeof o.el=="function"&&o.el()){let c=null;this.children_[r+1]&&(this.children_[r+1].el_?c=this.children_[r+1].el_:su(this.children_[r+1])&&(c=this.children_[r+1])),this.contentEl().insertBefore(o.el(),c)}return o}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let o=this.children_.length-1;o>=0;o--)if(this.children_[o]===e){i=!0,this.children_.splice(o,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ht(e.name())]=null,this.childNameIndex_[Sd(e.name())]=null;const r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,r=c=>{const p=c.name;let g=c.opts;if(i[p]!==void 0&&(g=i[p]),g===!1)return;g===!0&&(g={}),g.playerOptions=this.options_.playerOptions;const b=this.addChild(p,g);b&&(this[p]=b)};let o;const u=_n.getComponent("Tech");Array.isArray(e)?o=e:o=Object.keys(e),o.concat(Object.keys(this.options_).filter(function(c){return!o.some(function(p){return typeof p=="string"?c===p:c===p.name})})).map(c=>{let p,g;return typeof c=="string"?(p=c,g=e[p]||this.options_[p]||{}):(p=c.name,g=c),{name:p,opts:g}}).filter(c=>{const p=_n.getComponent(c.opts.componentClass||Ht(c.name));return p&&!u.isTech(p)}).forEach(r)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return wa(e,i||this.contentEl())}$$(e,i){return H1(e,i||this.contentEl())}hasClass(e){return vd(this.el_,e)}addClass(...e){wo(this.el_,...e)}removeClass(...e){lp(this.el_,...e)}toggleClass(e,i){M1(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return I1(this.el_,e)}setAttribute(e,i){ru(this.el_,e,i)}removeAttribute(e){up(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,r){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",r||this.trigger("componentresize");return}if(!this.el_)return 0;const o=this.el_.style[e],u=o.indexOf("px");return parseInt(u!==-1?o.slice(0,u):this.el_["offset"+Ht(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=ou(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const r=`offset${Ht(e)}`;i=this.el_[r]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},r={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:r}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const r=10,o=200;let u;this.on("touchstart",function(p){p.touches.length===1&&(i={pageX:p.touches[0].pageX,pageY:p.touches[0].pageY},e=U.performance.now(),u=!0)}),this.on("touchmove",function(p){if(p.touches.length>1)u=!1;else if(i){const g=p.touches[0].pageX-i.pageX,b=p.touches[0].pageY-i.pageY;Math.sqrt(g*g+b*b)>r&&(u=!1)}});const c=function(){u=!1};this.on("touchleave",c),this.on("touchcancel",c),this.on("touchend",function(p){i=null,u===!0&&U.performance.now()-e<o&&(p.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=wt(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const r=function(o){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",r),this.on("touchcancel",r)}setTimeout(e,i){var r;return e=wt(this,e),this.clearTimersOnDispose_(),r=U.setTimeout(()=>{this.setTimeoutIds_.has(r)&&this.setTimeoutIds_.delete(r),e()},i),this.setTimeoutIds_.add(r),r}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),U.clearTimeout(e)),e}setInterval(e,i){e=wt(this,e),this.clearTimersOnDispose_();const r=U.setInterval(e,i);return this.setIntervalIds_.add(r),r}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),U.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=wt(this,e),i=U.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=wt(this,i);const r=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,r),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),U.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((r,o)=>this[i](o))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(u){const c=U.getComputedStyle(u,null),p=c.getPropertyValue("visibility");return c.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(p)}function r(u){return!(!i(u.parentElement)||!i(u)||u.style.opacity==="0"||U.getComputedStyle(u).height==="0px"||U.getComputedStyle(u).width==="0px")}function o(u){if(u.offsetWidth+u.offsetHeight+u.getBoundingClientRect().height+u.getBoundingClientRect().width===0)return!1;const c={x:u.getBoundingClientRect().left+u.offsetWidth/2,y:u.getBoundingClientRect().top+u.offsetHeight/2};if(c.x<0||c.x>(me.documentElement.clientWidth||U.innerWidth)||c.y<0||c.y>(me.documentElement.clientHeight||U.innerHeight))return!1;let p=me.elementFromPoint(c.x,c.y);for(;p;){if(p===u)return!0;if(p.parentNode)p=p.parentNode;else return!1}}return e||(e=this.el()),!!(o(e)&&r(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const r=_n.getComponent("Tech"),o=r&&r.isTech(i),u=_n===i||_n.prototype.isPrototypeOf(i.prototype);if(o||!u){let p;throw o?p="techs must be registered using Tech.registerTech()":p="must be a Component subclass",new Error(`Illegal component, "${e}"; ${p}.`)}e=Ht(e),_n.components_||(_n.components_={});const c=_n.getComponent("Player");if(e==="Player"&&c&&c.players){const p=c.players,g=Object.keys(p);if(p&&g.length>0){for(let b=0;b<g.length;b++)if(p[g[b]]!==null)throw new Error("Can not register Player component after player has been created.")}}return _n.components_[e]=i,_n.components_[Sd(e)]=i,i}static getComponent(e){if(!(!e||!_n.components_))return _n.components_[e]}};ce.registerComponent("Component",ce);function i3(s,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${s}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function Z1(s,e,i,r){return i3(s,r,i.length-1),i[r][e]}function I0(s){let e;return s===void 0||s.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:s.length,start:Z1.bind(null,"start",0,s),end:Z1.bind(null,"end",1,s)},U.Symbol&&U.Symbol.iterator&&(e[U.Symbol.iterator]=()=>(s||[]).values()),e}function hs(s,e){return Array.isArray(s)?I0(s):s===void 0||e===void 0?I0():I0([[s,e]])}const J1=function(s,e){s=s<0?0:s;let i=Math.floor(s%60),r=Math.floor(s/60%60),o=Math.floor(s/3600);const u=Math.floor(e/60%60),c=Math.floor(e/3600);return(isNaN(s)||s===1/0)&&(o=r=i="-"),o=o>0||c>0?o+":":"",r=((o||u>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,o+r+i};let N0=J1;function e2(s){N0=s}function t2(){N0=J1}function ko(s,e=s){return N0(s,e)}var n3=Object.freeze({__proto__:null,createTimeRanges:hs,createTimeRange:hs,setFormatTime:e2,resetFormatTime:t2,formatTime:ko});function i2(s,e){let i=0,r,o;if(!e)return 0;(!s||!s.length)&&(s=hs(0,0));for(let u=0;u<s.length;u++)r=s.start(u),o=s.end(u),o>e&&(o=e),i+=o-r;return i/e}function Nt(s){if(s instanceof Nt)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:Is(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=Nt.defaultMessages[this.code]||"")}Nt.prototype.code=0,Nt.prototype.message="",Nt.prototype.status=null,Nt.prototype.metadata=null,Nt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Nt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Nt.MEDIA_ERR_CUSTOM=0,Nt.prototype.MEDIA_ERR_CUSTOM=0,Nt.MEDIA_ERR_ABORTED=1,Nt.prototype.MEDIA_ERR_ABORTED=1,Nt.MEDIA_ERR_NETWORK=2,Nt.prototype.MEDIA_ERR_NETWORK=2,Nt.MEDIA_ERR_DECODE=3,Nt.prototype.MEDIA_ERR_DECODE=3,Nt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Nt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Nt.MEDIA_ERR_ENCRYPTED=5,Nt.prototype.MEDIA_ERR_ENCRYPTED=5;function xd(s){return s!=null&&typeof s.then=="function"}function Us(s){xd(s)&&s.then(null,e=>{})}const P0=function(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,r,o)=>(s[r]&&(i[r]=s[r]),i),{cues:s.cues&&Array.prototype.map.call(s.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})};var U0={textTracksToJson:function(s){const e=s.$$("track"),i=Array.prototype.map.call(e,o=>o.track);return Array.prototype.map.call(e,function(o){const u=P0(o.track);return o.src&&(u.src=o.src),u}).concat(Array.prototype.filter.call(s.textTracks(),function(o){return i.indexOf(o)===-1}).map(P0))},jsonToTextTracks:function(s,e){return s.forEach(function(i){const r=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(o=>r.addCue(o))}),e.textTracks()},trackToJson:P0};const B0="vjs-modal-dialog";class uu extends ce{constructor(e,i){super(e,i),this.handleKeyDown_=r=>this.handleKeyDown(r),this.close_=r=>this.close(r),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ue("div",{className:`${B0}-content`},{role:"document"}),this.descEl_=Ue("p",{className:`${B0}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Ca(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${B0} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let r=this.getChild("closeButton");if(i&&!r){const o=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(r,"close",this.close_)}!i&&r&&(this.off(r,"close",this.close_),this.removeChild(r),r.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),r=i.parentNode,o=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(i),this.empty(),F1(i,e),this.trigger("modalfill"),o?r.insertBefore(i,o):r.appendChild(i);const u=this.getChild("closeButton");u&&r.appendChild(u.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),dp(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=me.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),r=this.el_.querySelector(":focus");let o;for(let u=0;u<i.length;u++)if(r===i[u]){o=u;break}me.activeElement===this.el_&&(o=0),e.shiftKey&&o===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&o===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof U.HTMLAnchorElement||i instanceof U.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof U.HTMLInputElement||i instanceof U.HTMLSelectElement||i instanceof U.HTMLTextAreaElement||i instanceof U.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof U.HTMLIFrameElement||i instanceof U.HTMLObjectElement||i instanceof U.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}uu.prototype.options_={pauseOnOpen:!0,temporary:!0},ce.registerComponent("ModalDialog",uu);class Oo extends En{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let i=0;i<e.length;i++)this.addTrack(e[i])}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Or(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let r=0,o=this.length;r<o;r++)if(this[r]===e){i=this[r],i.off&&i.off(),this.tracks_.splice(r,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let r=0,o=this.length;r<o;r++){const u=this[r];if(u.id===e){i=u;break}}return i}}Oo.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const s in Oo.prototype.allowedEvents_)Oo.prototype["on"+s]=null;const F0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].enabled=!1)};class n2 extends Oo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){F0(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&F0(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,F0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const H0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].selected=!1)};class s2 extends Oo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){H0(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&H0(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,H0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class z0 extends Oo{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class s3{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,r=e.length;i<r;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let r=0,o=this.trackElements_.length;r<o;r++)if(e===this.trackElements_[r].track){i=this.trackElements_[r];break}return i}removeTrackElement_(e){for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class yp{constructor(e){yp.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let r=0;const o=e.length;this.cues_=e,this.length_=e.length;const u=function(c){""+c in this||Object.defineProperty(this,""+c,{get(){return this.cues_[c]}})};if(i<o)for(r=i;r<o;r++)u.call(this,r)}getCueById(e){let i=null;for(let r=0,o=this.length;r<o;r++){const u=this[r];if(u.id===e){i=u;break}}return i}}const r3={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},a3={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},o3={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},r2={disabled:"disabled",hidden:"hidden",showing:"showing"};class j0 extends En{constructor(e={}){super();const i={id:e.id||"vjs_track_"+zn(),kind:e.kind||"",language:e.language||""};let r=e.label||"";for(const o in i)Object.defineProperty(this,o,{get(){return i[o]},set(){}});Object.defineProperty(this,"label",{get(){return r},set(o){o!==r&&(r=o,this.trigger("labelchange"))}})}}const V0=function(s){return new URL(s,me.baseURI)},a2=function(s){return new URL(s,me.baseURI).href},q0=function(s){if(typeof s=="string"){const i=s.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},vp=function(s,e=U.location){return V0(s).origin!==e.origin};var l3=Object.freeze({__proto__:null,parseUrl:V0,getAbsoluteURL:a2,getFileExtension:q0,isCrossOrigin:vp});const o2=function(s,e){const i=new U.WebVTT.Parser(U,U.vttjs,U.WebVTT.StringDecoder()),r=[];i.oncue=function(o){e.addCue(o)},i.onparsingerror=function(o){r.push(o)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(s),r.length>0&&(U.console&&U.console.groupCollapsed&&U.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),r.forEach(o=>Ke.error(o)),U.console&&U.console.groupEnd&&U.console.groupEnd()),i.flush()},l2=function(s,e){const i={uri:s},r=vp(s);r&&(i.cors=r);const o=e.tech_.crossOrigin()==="use-credentials";o&&(i.withCredentials=o),j_(i,wt(this,function(u,c,p){if(u)return Ke.error(u,c);e.loaded_=!0,typeof U.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],g=>{if(g.type==="vttjserror"){Ke.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return o2(p,e)}):o2(p,e)}))};class Ed extends j0{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=vt(e,{kind:o3[e.kind]||"subtitles",language:e.language||e.srclang||""});let r=r2[i.mode]||"disabled";const o=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(r="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const u=new yp(this.cues_),c=new yp(this.activeCues_);let p=!1;this.timeupdateHandler=wt(this,function(b={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1),b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const g=()=>{this.stopTracking()};this.tech_.one("dispose",g),r!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return o},set(){}},mode:{get(){return r},set(b){r2[b]&&r!==b&&(r=b,!this.preload_&&r!=="disabled"&&this.cues.length===0&&l2(this.src,this),this.stopTracking(),r!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?u:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return c;const b=this.tech_.currentTime(),S=[];for(let E=0,A=this.cues.length;E<A;E++){const R=this.cues[E];R.startTime<=b&&R.endTime>=b&&S.push(R)}if(p=!1,S.length!==this.activeCues_.length)p=!0;else for(let E=0;E<S.length;E++)this.activeCues_.indexOf(S[E])===-1&&(p=!0);return this.activeCues_=S,c.setCues_(this.activeCues_),c},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&l2(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new U.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const o in e)o in i||(i[o]=e[o]);i.id=e.id,i.originalCue_=e}const r=this.tech_.textTracks();for(let o=0;o<r.length;o++)r[o]!==this&&r[o].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return U0.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const r=this.cues_[i];if(r===e||r.originalCue_&&r.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}Ed.prototype.allowedEvents_={cuechange:"cuechange"};class u2 extends j0{constructor(e={}){const i=vt(e,{kind:a3[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"enabled",{get(){return r},set(o){typeof o!="boolean"||o===r||(r=o,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class c2 extends j0{constructor(e={}){const i=vt(e,{kind:r3[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"selected",{get(){return r},set(o){typeof o!="boolean"||o===r||(r=o,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class Rr extends En{constructor(e={}){super();let i;const r=new Ed(e);this.kind=r.kind,this.src=r.src,this.srclang=r.language,this.label=r.label,this.default=r.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return r}}}),i=Rr.NONE,r.addEventListener("loadeddata",()=>{i=Rr.LOADED,this.trigger({type:"load",target:this})})}}Rr.prototype.allowedEvents_={load:"load"},Rr.NONE=0,Rr.LOADING=1,Rr.LOADED=2,Rr.ERROR=3;const Vn={audio:{ListClass:n2,TrackClass:u2,capitalName:"Audio"},video:{ListClass:s2,TrackClass:c2,capitalName:"Video"},text:{ListClass:z0,TrackClass:Ed,capitalName:"Text"}};Object.keys(Vn).forEach(function(s){Vn[s].getterName=`${s}Tracks`,Vn[s].privateName=`${s}Tracks_`});const cu={remoteText:{ListClass:z0,TrackClass:Ed,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:s3,TrackClass:Rr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Gi=Object.assign({},Vn,cu);cu.names=Object.keys(cu),Vn.names=Object.keys(Vn),Gi.names=[].concat(cu.names).concat(Vn.names);function u3(s,e,i,r,o={}){const u=s.textTracks();o.kind=e,i&&(o.label=i),r&&(o.language=r),o.tech=s;const c=new Gi.text.TrackClass(o);return u.addTrack(c),c}class qe extends ce{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=r=>this.onDurationChange(r),this.trackProgress_=r=>this.trackProgress(r),this.trackCurrentTime_=r=>this.trackCurrentTime(r),this.stopTrackingCurrentTime_=r=>this.stopTrackingCurrentTime(r),this.disposeSourceHandler_=r=>this.disposeSourceHandler(r),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Gi.names.forEach(r=>{const o=Gi[r];e&&e[o.getterName]&&(this[o.privateName]=e[o.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(r=>{e[`native${r}Tracks`]===!1&&(this[`featuresNative${r}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Gi.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(wt(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return hs(0,0)}bufferedPercent(){return i2(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Vn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const r=this[`${i}Tracks`]()||[];let o=r.length;for(;o--;){const u=r[o];i==="text"&&this.removeRemoteTextTrack(u),r.removeTrack(u)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const r=e[i];this.removeRemoteTextTrack(r)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Nt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?hs(0,0):hs()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Vn.names.forEach(e=>{const i=Vn[e],r=()=>{this.trigger(`${e}trackchange`)},o=this[i.getterName]();o.addEventListener("removetrack",r),o.addEventListener("addtrack",r),this.on("dispose",()=>{o.removeEventListener("removetrack",r),o.removeEventListener("addtrack",r)})})}addWebVttScript_(){if(!U.WebVTT)if(me.body.contains(this.el())){if(!this.options_["vtt.js"]&&eu(Q_)&&Object.keys(Q_).length>0){this.trigger("vttjsloaded");return}const e=me.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),U.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),r=p=>e.addTrack(p.track),o=p=>e.removeTrack(p.track);i.on("addtrack",r),i.on("removetrack",o),this.addWebVttScript_();const u=()=>this.trigger("texttrackchange"),c=()=>{u();for(let p=0;p<e.length;p++){const g=e[p];g.removeEventListener("cuechange",u),g.mode==="showing"&&g.addEventListener("cuechange",u)}};c(),e.addEventListener("change",c),e.addEventListener("addtrack",c),e.addEventListener("removetrack",c),this.on("dispose",function(){i.off("addtrack",r),i.off("removetrack",o),e.removeEventListener("change",c),e.removeEventListener("addtrack",c),e.removeEventListener("removetrack",c);for(let p=0;p<e.length;p++)e[p].removeEventListener("cuechange",u)})}addTextTrack(e,i,r){if(!e)throw new Error("TextTrack kind is required but was not provided");return u3(this,e,i,r)}createRemoteTextTrack(e){const i=vt(e,{tech:this});return new cu.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const r=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(r.track)),r}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=zn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return qe.canPlayType(e.type)}static isTech(e){return e.prototype instanceof qe||e instanceof qe||e===qe}static registerTech(e,i){if(qe.techs_||(qe.techs_={}),!qe.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!qe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!qe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ht(e),qe.techs_[e]=i,qe.techs_[Sd(e)]=i,e!=="Tech"&&qe.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(qe.techs_&&qe.techs_[e])return qe.techs_[e];if(e=Ht(e),U&&U.videojs&&U.videojs[e])return Ke.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),U.videojs[e]}}}Gi.names.forEach(function(s){const e=Gi[s];qe.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),qe.prototype.featuresVolumeControl=!0,qe.prototype.featuresMuteControl=!0,qe.prototype.featuresFullscreenResize=!1,qe.prototype.featuresPlaybackRate=!1,qe.prototype.featuresProgressEvents=!1,qe.prototype.featuresSourceset=!1,qe.prototype.featuresTimeupdateEvents=!1,qe.prototype.featuresNativeTextTracks=!1,qe.prototype.featuresVideoFrameCallback=!1,qe.withSourceHandlers=function(s){s.registerSourceHandler=function(i,r){let o=s.sourceHandlers;o||(o=s.sourceHandlers=[]),r===void 0&&(r=o.length),o.splice(r,0,i)},s.canPlayType=function(i){const r=s.sourceHandlers||[];let o;for(let u=0;u<r.length;u++)if(o=r[u].canPlayType(i),o)return o;return""},s.selectSourceHandler=function(i,r){const o=s.sourceHandlers||[];let u;for(let c=0;c<o.length;c++)if(u=o[c].canHandleSource(i,r),u)return o[c];return null},s.canPlaySource=function(i,r){const o=s.selectSourceHandler(i,r);return o?o.canHandleSource(i,r):""},["seekable","seeking","duration"].forEach(function(i){const r=this[i];typeof r=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):r.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(i){let r=s.selectSourceHandler(i,this.options_);r||(s.nativeSourceHandler?r=s.nativeSourceHandler:Ke.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),r!==s.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=r.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},s.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ce.registerComponent("Tech",qe),qe.registerTech("Tech",qe),qe.defaultTechOrder_=[];const Ro={},bp={},_p={};function c3(s,e){Ro[s]=Ro[s]||[],Ro[s].push(e)}function d3(s,e,i){s.setTimeout(()=>Mo(e,Ro[e.type],i,s),1)}function h3(s,e){s.forEach(i=>i.setTech&&i.setTech(e))}function f3(s,e,i){return s.reduceRight($0(i),e[i]())}function p3(s,e,i,r){return e[i](s.reduce($0(i),r))}function d2(s,e,i,r=null){const o="call"+Ht(i),u=s.reduce($0(o),r),c=u===_p,p=c?null:e[i](u);return y3(s,i,p,c),p}const m3={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},g3={setCurrentTime:1,setMuted:1,setVolume:1},h2={play:1,pause:1};function $0(s){return(e,i)=>e===_p?_p:i[s]?i[s](e):e}function y3(s,e,i,r){for(let o=s.length-1;o>=0;o--){const u=s[o];u[e]&&u[e](r,i)}}function v3(s){bp.hasOwnProperty(s.id())&&delete bp[s.id()]}function b3(s,e){const i=bp[s.id()];let r=null;if(i==null)return r=e(s),bp[s.id()]=[[e,r]],r;for(let o=0;o<i.length;o++){const[u,c]=i[o];u===e&&(r=c)}return r===null&&(r=e(s),i.push([e,r])),r}function Mo(s={},e=[],i,r,o=[],u=!1){const[c,...p]=e;if(typeof c=="string")Mo(s,Ro[c],i,r,o,u);else if(c){const g=b3(r,c);if(!g.setSource)return o.push(g),Mo(s,p,i,r,o,u);g.setSource(Object.assign({},s),function(b,S){if(b)return Mo(s,p,i,r,o,u);o.push(g),Mo(S,s.type===S.type?p:Ro[S.type],i,r,o,u)})}else p.length?Mo(s,p,i,r,o,u):u?i(s,o):Mo(s,Ro["*"],i,r,o,!0)}const _3={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Tp=function(s=""){const e=q0(s);return _3[e.toLowerCase()]||""},T3=(s,e)=>{if(!e)return"";if(s.cache_.source.src===e&&s.cache_.source.type)return s.cache_.source.type;const i=s.cache_.sources.filter(o=>o.src===e);if(i.length)return i[0].type;const r=s.$$("source");for(let o=0;o<r.length;o++){const u=r[o];if(u.type&&u.src&&u.src===e)return u.type}return Tp(e)},f2=function(s){if(Array.isArray(s)){let e=[];s.forEach(function(i){i=f2(i),Array.isArray(i)?e=e.concat(i):Is(i)&&e.push(i)}),s=e}else typeof s=="string"&&s.trim()?s=[p2({src:s})]:Is(s)&&typeof s.src=="string"&&s.src&&s.src.trim()?s=[p2(s)]:s=[];return s};function p2(s){if(!s.type){const e=Tp(s.src);e&&(s.type=e)}return s}var S3=`<svg xmlns="http://www.w3.org/2000/svg">
|
||
<defs>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
|
||
<path d="M16 10v28l22-14z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
|
||
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
|
||
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
|
||
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
|
||
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
|
||
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
|
||
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
|
||
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
|
||
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
|
||
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
|
||
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
|
||
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
|
||
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
|
||
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
|
||
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
|
||
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
|
||
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
|
||
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
|
||
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
|
||
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
|
||
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
|
||
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
|
||
<circle cx="24" cy="24" r="20"></circle>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
|
||
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
|
||
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
|
||
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
|
||
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
|
||
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
|
||
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
|
||
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
|
||
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
|
||
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
|
||
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
|
||
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
|
||
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
|
||
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
|
||
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
|
||
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
|
||
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
|
||
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
|
||
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
|
||
<path fill="none" d="M-1-3h24v24H-1z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
|
||
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
|
||
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
|
||
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
|
||
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
|
||
</symbol>
|
||
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
|
||
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
|
||
</symbol>
|
||
</defs>
|
||
</svg>`;const m2=sp?10009:rp?461:8,du={codes:{play:415,pause:19,ff:417,rw:412,back:m2},names:{415:"play",19:"pause",417:"ff",412:"rw",[m2]:"back"},isEventKey(s,e){return e=e.toLowerCase(),!!(this.names[s.keyCode]&&this.names[s.keyCode]===e)},getEventName(s){if(this.names[s.keyCode])return this.names[s.keyCode];if(this.codes[s.code]){const e=this.codes[s.code];return this.names[e]}return null}},g2=5;class x3 extends En{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const r=i.key.substring(5).toLowerCase();this.move(r)}else if(du.isEventKey(i,"play")||du.isEventKey(i,"pause")||du.isEventKey(i,"ff")||du.isEventKey(i,"rw")){i.preventDefault();const r=du.getEventName(i);this.performMediaAction_(r)}else du.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+g2);break;case"rw":this.userSeek_(this.player_.currentTime()-g2);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let r=null;const o=this.getCurrentComponent(e.target);i&&(r=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!r||!i)&&(o&&o.name()==="CloseButton"?this.refocusComponent():(this.pause(),o&&o.el()&&(this.lastFocusedComponent_=o)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function r(o){for(const u of o)u.hasOwnProperty("el_")&&u.getIsFocusable()&&u.getIsAvailableToBeFocused(u.el())&&i.push(u),u.hasOwnProperty("children_")&&u.children_.length>0&&r(u.children_)}return e.children_.forEach(o=>{if(o.hasOwnProperty("el_"))if(o.getIsFocusable&&o.getIsAvailableToBeFocused&&o.getIsFocusable()&&o.getIsAvailableToBeFocused(o.el())){i.push(o);return}else o.hasOwnProperty("children_")&&o.children_.length>0?r(o.children_):o.hasOwnProperty("items")&&o.items.length>0?r(o.items):this.findSuitableDOMChild(o)&&i.push(o);if(o.name_==="ErrorDisplay"&&o.opened_){const u=o.el_.querySelector(".vjs-errors-ok-button-container");u&&u.querySelectorAll("button").forEach((p,g)=>{i.push({name:()=>"ModalButton"+(g+1),el:()=>p,getPositions:()=>{const b=p.getBoundingClientRect(),S={x:b.x,y:b.y,width:b.width,height:b.height,top:b.top,right:b.right,bottom:b.bottom,left:b.left},E={x:b.left+b.width/2,y:b.top+b.height/2,width:0,height:0,top:b.top+b.height/2,right:b.left+b.width/2,bottom:b.top+b.height/2,left:b.left+b.width/2};return{boundingClientRect:S,center:E}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:b=>!0,focus:()=>p.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(r){if(e.getIsFocusable(r)&&e.getIsAvailableToBeFocused(r))return r;for(let o=0;o<r.children.length;o++){const u=r.children[o],c=i(u);if(c)return c}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const r of this.focusableComponents)if(r.el()===i)return r}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const r=i.getPositions(),o=this.focusableComponents.filter(c=>c!==i&&this.isInDirection_(r.boundingClientRect,c.getPositions().boundingClientRect,e)),u=this.findBestCandidate_(r.center,o,e);u?this.focus(u):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,r){let o=1/0,u=null;for(const c of i){const p=c.getPositions().center,g=this.calculateDistance_(e,p,r);g<o&&(o=g,u=c)}return u}isInDirection_(e,i,r){switch(r){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,r){const o=Math.abs(e.x-i.x),u=Math.abs(e.y-i.y);let c;switch(r){case"right":case"left":c=o+u*100;break;case"up":c=u*2+o*.5;break;case"down":c=u*5+o;break;default:c=o+u}return c}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class E3 extends ce{constructor(e,i,r){const o=vt({createEl:!1},i);if(super(e,o,r),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let u=0,c=i.playerOptions.techOrder;u<c.length;u++){const p=Ht(c[u]);let g=qe.getTech(p);if(p||(g=ce.getComponent(p)),g&&g.isSupported()){e.loadTech_(p);break}}else e.src(i.playerOptions.sources)}}ce.registerComponent("MediaLoader",E3);class Sp extends ce{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=r=>this.handleMouseOver(r),this.handleMouseOut_=r=>this.handleMouseOut(r),this.handleClick_=r=>this.handleClick(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.emitTapEvents(),this.enable()}createEl(e="div",i={},r={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&Ke.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),r=Object.assign({role:"button"},r),this.tabIndex_=i.tabIndex;const o=Ue(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ue("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const r=this.localize(e);this.controlText_=e,Ca(this.controlTextEl_,r),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",r)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("ClickableComponent",Sp);class G0 extends Sp{constructor(e,i){super(e,i),this.update(),this.update_=r=>this.update(r),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Ue("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Ue("picture",{className:"vjs-poster",tabIndex:-1},{},Ue("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Us(this.player_.play()):this.player_.pause())}}G0.prototype.crossorigin=G0.prototype.crossOrigin,ce.registerComponent("PosterImage",G0);const qn="#222",y2="#ccc",C3={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function X0(s,e){let i;if(s.length===4)i=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)i=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function Bs(s,e,i){try{s.style[e]=i}catch{return}}function v2(s){return s?`${s}px`:""}class A3 extends ce{constructor(e,i,r){super(e,i,r);const o=c=>this.updateDisplay(c),u=c=>{this.updateDisplayOverlay(),this.updateDisplay(c)};e.on("loadstart",c=>this.toggleDisplay(c)),e.on("useractive",o),e.on("userinactive",o),e.on("texttrackchange",o),e.on("loadedmetadata",c=>{this.updateDisplayOverlay(),this.preselectTrack(c)}),e.ready(wt(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",u),e.on("playerresize",u);const c=U.screen.orientation||U,p=U.screen.orientation?"change":"orientationchange";c.addEventListener(p,u),e.on("dispose",()=>c.removeEventListener(p,u));const g=this.options_.playerOptions.tracks||[];for(let b=0;b<g.length;b++)this.player_.addRemoteTextTrack(g[b],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage;let o,u,c;for(let p=0;p<i.length;p++){const g=i[p];r&&r.enabled&&r.language&&r.language===g.language&&g.kind in e?g.kind===r.kind?c=g:c||(c=g):r&&!r.enabled?(c=null,o=null,u=null):g.default&&(g.kind==="descriptions"&&!o?o=g:g.kind in e&&!u&&(u=g))}c?c.mode="showing":u?u.mode="showing":o&&(o.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof U.WebVTT=="function"&&U.WebVTT.processCues(U,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const c=[];for(let p=0;p<e.length;++p){const g=e[p];g.mode==="showing"&&c.push(g)}this.updateForTrack(c);return}let r=null,o=null,u=e.length;for(;u--;){const c=e[u];c.mode==="showing"&&(c.kind==="descriptions"?r=c:o=c)}if(o?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):r&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(r)),!U.CSS.supports("inset","10px")){const c=this.el_,p=c.querySelectorAll(".vjs-text-track-cue"),g=this.player_.controlBar.el_.getBoundingClientRect().height,b=this.player_.el_.getBoundingClientRect().height;c.style="",Bs(c,"position","relative"),Bs(c,"height",b-g+"px"),Bs(c,"top","unset"),ap?Bs(c,"bottom",b+"px"):Bs(c,"bottom","0px"),p.length>0&&p.forEach(S=>{if(S.style.inset){const E=S.style.inset.split(" ");E.length===3&&Object.assign(S.style,{top:E[0],right:E[1],bottom:E[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!U.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),r=e/i,o=this.player_.videoWidth()/this.player_.videoHeight();let u=0,c=0;Math.abs(r-o)>.1&&(r>o?u=Math.round((e-i*o)/2):c=Math.round((i-e/o)/2)),Bs(this.el_,"insetInline",v2(u)),Bs(this.el_,"insetBlock",v2(c))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),r=e.activeCues;let o=r.length;for(;o--;){const u=r[o];if(!u)continue;const c=u.displayState;if(i.color&&(c.firstChild.style.color=i.color),i.textOpacity&&Bs(c.firstChild,"color",X0(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(c.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Bs(c.firstChild,"backgroundColor",X0(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Bs(c,"backgroundColor",X0(i.windowColor,i.windowOpacity)):c.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?c.firstChild.style.textShadow=`2px 2px 3px ${qn}, 2px 2px 4px ${qn}, 2px 2px 5px ${qn}`:i.edgeStyle==="raised"?c.firstChild.style.textShadow=`1px 1px ${qn}, 2px 2px ${qn}, 3px 3px ${qn}`:i.edgeStyle==="depressed"?c.firstChild.style.textShadow=`1px 1px ${y2}, 0 1px ${y2}, -1px -1px ${qn}, 0 -1px ${qn}`:i.edgeStyle==="uniform"&&(c.firstChild.style.textShadow=`0 0 4px ${qn}, 0 0 4px ${qn}, 0 0 4px ${qn}, 0 0 4px ${qn}`)),i.fontPercent&&i.fontPercent!==1){const p=U.parseFloat(c.style.fontSize);c.style.fontSize=p*i.fontPercent+"px",c.style.height="auto",c.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?c.firstChild.style.fontVariant="small-caps":c.firstChild.style.fontFamily=C3[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof U.WebVTT!="function"||e.every(r=>!r.activeCues))return;const i=[];for(let r=0;r<e.length;++r){const o=e[r];for(let u=0;u<o.activeCues.length;++u)i.push(o.activeCues[u])}U.WebVTT.processCues(U,i,this.el_);for(let r=0;r<e.length;++r){const o=e[r];for(let u=0;u<o.activeCues.length;++u){const c=o.activeCues[u].displayState;wo(c,"vjs-text-track-cue","vjs-text-track-cue-"+(o.language?o.language:r)),o.language&&ru(c,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}}ce.registerComponent("TextTrackDisplay",A3);class w3 extends ce{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),r=Ue("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),o=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(r),o}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}ce.registerComponent("LoadingSpinner",w3);let Pi=class extends Sp{createEl(e,i={},r={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),r=Object.assign({type:"button"},r);const o=Ue(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}addChild(e,i={}){const r=this.constructor.name;return Ke.warn(`Adding an actionable (user controllable) child to a Button (${r}) is not supported; use a ClickableComponent instead.`),ce.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}};ce.registerComponent("Button",Pi);class b2 extends Pi{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",r=>this.handleMouseDown(r))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Us(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const r=this.player_.getChild("controlBar"),o=r&&r.getChild("playToggle");if(!o){this.player_.tech(!0).focus();return}const u=()=>o.focus();xd(i)?i.then(u,()=>{}):this.setTimeout(u,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}b2.prototype.controlText_="Play Video",ce.registerComponent("BigPlayButton",b2);class D3 extends Pi{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("CloseButton",D3);class _2 extends Pi{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",r=>this.handlePlay(r)),this.on(e,"pause",r=>this.handlePause(r)),i.replay&&this.on(e,"ended",r=>this.handleEnded(r))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Us(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}_2.prototype.controlText_="Play",ce.registerComponent("PlayToggle",_2);class hu extends ce{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],r=>this.update(r)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),r=Ue("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(r),this.contentEl_=Ue("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=ko(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,Ke.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=me.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}hu.prototype.labelText_="Time",hu.prototype.controlText_="Time",ce.registerComponent("TimeDisplay",hu);class Y0 extends hu{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}Y0.prototype.labelText_="Current Time",Y0.prototype.controlText_="Current Time",ce.registerComponent("CurrentTimeDisplay",Y0);class W0 extends hu{constructor(e,i){super(e,i);const r=o=>this.updateContent(o);this.on(e,"durationchange",r),this.on(e,"loadstart",r),this.on(e,"loadedmetadata",r)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}W0.prototype.labelText_="Duration",W0.prototype.controlText_="Duration",ce.registerComponent("DurationDisplay",W0);class k3 extends ce{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),r=super.createEl("span",{textContent:"/"});return i.appendChild(r),e.appendChild(i),e}}ce.registerComponent("TimeDivider",k3);class Q0 extends hu{constructor(e,i){super(e,i),this.on(e,"durationchange",r=>this.updateContent(r))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Ue("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}Q0.prototype.labelText_="Remaining Time",Q0.prototype.controlText_="Remaining Time",ce.registerComponent("RemainingTimeDisplay",Q0);class O3 extends ce{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",r=>this.updateShowing(r))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ue("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ue("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(me.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}ce.registerComponent("LiveDisplay",O3);class T2 extends Pi{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=r=>this.updateLiveEdgeStatus(r),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Ue("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}T2.prototype.controlText_="Seek to live, currently playing live",ce.registerComponent("SeekToLive",T2);function Cd(s,e,i){return s=Number(s),Math.min(i,Math.max(e,isNaN(s)?e:s))}var R3=Object.freeze({__proto__:null,clamp:Cd});class K0 extends ce{constructor(e,i){super(e,i),this.handleMouseDown_=r=>this.handleMouseDown(r),this.handleMouseUp_=r=>this.handleMouseUp(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.handleClick_=r=>this.handleClick(r),this.handleMouseMove_=r=>this.handleMouseMove(r),this.update_=r=>this.update(r),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},r={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),r=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},r),super.createEl(e,i,r)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Ns&&e.preventDefault(),N1(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;P1(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(Cd(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=cp(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,r=i&&i.enabled,o=i&&i.horizontalSeek;r?o&&e.key==="ArrowLeft"||!o&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):o&&e.key==="ArrowRight"||!o&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ce.registerComponent("Slider",K0);const Z0=(s,e)=>Cd(s/e*100,0,100).toFixed(2)+"%";class M3 extends ce{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",r=>this.update(r))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Ue("span",{className:"vjs-control-text"}),r=Ue("span",{textContent:this.localize("Loaded")}),o=me.createTextNode(": ");return this.percentageEl_=Ue("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(r),i.appendChild(o),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,r=this.player_.buffered(),o=i&&i.isLive()?i.seekableEnd():this.player_.duration(),u=this.player_.bufferedEnd(),c=this.partEls_,p=Z0(u,o);this.percent_!==p&&(this.el_.style.width=p,Ca(this.percentageEl_,p),this.percent_=p);for(let g=0;g<r.length;g++){const b=r.start(g),S=r.end(g);let E=c[g];E||(E=this.el_.appendChild(Ue()),c[g]=E),!(E.dataset.start===b&&E.dataset.end===S)&&(E.dataset.start=b,E.dataset.end=S,E.style.left=Z0(b,u),E.style.width=Z0(S-b,u))}for(let g=c.length;g>r.length;g--)this.el_.removeChild(c[g-1]);c.length=r.length})}}ce.registerComponent("LoadProgressBar",M3);class L3 extends ce{constructor(e,i){super(e,i),this.update=Ps(wt(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,r){const o=bd(this.el_),u=au(this.player_.el()),c=e.width*i;if(!u||!o)return;let p=e.left-u.left+c,g=e.width-c+(u.right-e.right);g||(g=e.width-c,p=c);let b=o.width/2;p<b?b+=b-p:g<b&&(b=g),b<0?b=0:b>o.width&&(b=o.width),b=Math.round(b),this.el_.style.right=`-${b}px`,this.write(r)}write(e){Ca(this.el_,e)}updateTime(e,i,r,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let u;const c=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const p=this.player_.liveTracker.liveWindow(),g=p-i*p;u=(g<1?"":"-")+ko(g,p)}else u=ko(r,c);this.update(e,i,u),o&&o()})}}ce.registerComponent("TimeTooltip",L3);class J0 extends ce{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=Ps(wt(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,r){const o=this.getChild("timeTooltip");if(!o)return;const u=r&&r.target&&typeof r.target.pendingSeekTime=="function"?r.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();o.updateTime(e,i,u)}}J0.prototype.options_={children:[]},!Ii&&!ds&&J0.prototype.options_.children.push("timeTooltip"),ce.registerComponent("PlayProgressBar",J0);class S2 extends ce{constructor(e,i){super(e,i),this.update=Ps(wt(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const r=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,r,()=>{this.el_.style.left=`${e.width*i}px`})}}S2.prototype.options_={children:["timeTooltip"]},ce.registerComponent("MouseTimeDisplay",S2);class xp extends K0{constructor(e,i){i=vt(xp.prototype.options_,i),i.children=[...i.children];const r=e.options_.disableSeekWhileScrubbingOnMobile&&(Ii||ds)||e.options_.disableSeekWhileScrubbingOnSTV;(!Ii&&!ds||r)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=r,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=wt(this,this.update),this.update=Ps(this.update_,jn),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in me&&"visibilityState"in me&&this.on(me,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){me.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,jn))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(me.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const r=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),o=this.player_.liveTracker;let u=this.player_.duration();o&&o.isLive()&&(u=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==r||this.duration_!==u)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ko(r,u),ko(u,u)],"{1} of {2}")),this.currentTime_=r,this.duration_=u),this.bar&&this.bar.update(au(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const r=this.player_.liveTracker;return r&&r.isLive()?(i=(e-r.seekableStart())/r.liveWindow(),r.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){_d(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!_d(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let r;const o=this.calculateDistance(e),u=this.player_.liveTracker;if(!u||!u.isLive())r=o*this.player_.duration(),r===this.player_.duration()&&(r=r-.1);else{if(o>=.99){u.seekToLiveEdge();return}const c=u.seekableStart(),p=u.liveCurrentTime();if(r=c+o*u.liveWindow(),r>=p&&(r=p),r<=c&&(r=c+.1),r===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(r):this.userSeek_(r),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Us(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const r=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in me&&"visibilityState"in me&&this.off(me,"visibilitychange",this.toggleVisibility_),super.dispose()}}xp.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},ce.registerComponent("SeekBar",xp);class x2 extends ce{constructor(e,i){super(e,i),this.handleMouseMove=Ps(wt(this,this.handleMouseMove),jn),this.throttledHandleMouseSeek=Ps(wt(this,this.handleMouseSeek),jn),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.handleMouseDownHandler_=r=>this.handleMouseDown(r),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const r=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(!r&&!o)return;const u=i.el(),c=bd(u);let p=cp(u,e).x;p=Cd(p,0,1),o&&o.update(c,p),r&&r.update(c,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Us(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}x2.prototype.options_={children:["seekBar"]},ce.registerComponent("ProgressControl",x2);class E2 extends Pi{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],r=>this.handlePictureInPictureChange(r)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],r=>this.handlePictureInPictureEnabledChange(r)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){me.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in U?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof me.exitPictureInPicture=="function"&&super.show()}}E2.prototype.controlText_="Picture-in-Picture",ce.registerComponent("PictureInPictureToggle",E2);class C2 extends Pi{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",r=>this.handleFullscreenChange(r)),me[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}C2.prototype.controlText_="Fullscreen",ce.registerComponent("FullscreenToggle",C2);const I3=function(s,e){e.tech_&&!e.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class N3 extends ce{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}ce.registerComponent("VolumeLevel",N3);class P3 extends ce{constructor(e,i){super(e,i),this.update=Ps(wt(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,r,o){if(!r){const u=au(this.el_),c=au(this.player_.el()),p=e.width*i;if(!c||!u)return;const g=e.left-c.left+p,b=e.width-p+(c.right-e.right);let S=u.width/2;g<S?S+=S-g:b<S&&(S=b),S<0?S=0:S>u.width&&(S=u.width),this.el_.style.right=`-${S}px`}this.write(`${o}%`)}write(e){Ca(this.el_,e)}updateVolume(e,i,r,o,u){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,r,o.toFixed(0)),u&&u()})}}ce.registerComponent("VolumeLevelTooltip",P3);class A2 extends ce{constructor(e,i){super(e,i),this.update=Ps(wt(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,r){const o=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,r,o,()=>{r?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}A2.prototype.options_={children:["volumeLevelTooltip"]},ce.registerComponent("MouseVolumeLevelDisplay",A2);class Ep extends K0{constructor(e,i){super(e,i),this.on("slideractive",r=>this.updateLastVolume_(r)),this.on(e,"volumechange",r=>this.updateARIAAttributes(r)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){_d(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const r=this.el(),o=au(r),u=this.vertical();let c=cp(r,e);c=u?c.y:c.x,c=Cd(c,0,1),i.update(o,c,u)}_d(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Ep.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Ii&&!ds&&Ep.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ep.prototype.playerEvent="volumechange",ce.registerComponent("VolumeBar",Ep);class w2 extends ce{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||eu(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),I3(this,e),this.throttledHandleMouseMove=Ps(wt(this,this.handleMouseMove),jn),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.on("mousedown",r=>this.handleMouseDown(r)),this.on("touchstart",r=>this.handleMouseDown(r)),this.on("mousemove",r=>this.handleMouseMove(r)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}w2.prototype.options_={children:["volumeBar"]},ce.registerComponent("VolumeControl",w2);const U3=function(s,e){e.tech_&&!e.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class D2 extends Pi{constructor(e,i){super(e,i),U3(this,e),this.on(e,["loadstart","volumechange"],r=>this.update(r))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),r=this.player_.lastVolume_();if(i===0){const o=r<.1?.1:r;this.player_.volume(o),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),Ii&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),lp(this.el_,[0,1,2,3].reduce((r,o)=>r+`${o?" ":""}vjs-vol-${o}`,"")),wo(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}D2.prototype.controlText_="Mute",ce.registerComponent("MuteToggle",D2);class k2 extends ce{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||eu(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=r=>this.handleKeyPress(r),this.on(e,["loadstart"],r=>this.volumePanelState_(r)),this.on(this.muteToggle,"keyup",r=>this.handleKeyPress(r)),this.on(this.volumeControl,"keyup",r=>this.handleVolumeControlKeyUp(r)),this.on("keydown",r=>this.handleKeyPress(r)),this.on("mouseover",r=>this.handleMouseOver(r)),this.on("mouseout",r=>this.handleMouseOut(r)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),xn(me,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ni(me,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}k2.prototype.options_={children:["muteToggle","volumeControl"]},ce.registerComponent("VolumePanel",k2);class O2 extends Pi{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),r=this.player_.liveTracker,o=r&&r.isLive()?r.seekableEnd():this.player_.duration();let u;i+this.skipTime<=o?u=i+this.skipTime:u=o,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}O2.prototype.controlText_="Skip Forward",ce.registerComponent("SkipForward",O2);class R2 extends Pi{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),r=this.player_.liveTracker,o=r&&r.isLive()&&r.seekableStart();let u;o&&i-this.skipTime<=o?u=o:i>=this.skipTime?u=i-this.skipTime:u=0,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}R2.prototype.controlText_="Skip Backward",ce.registerComponent("SkipBackward",R2);class M2 extends ce{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",r=>this.handleKeyDown(r)),this.boundHandleBlur_=r=>this.handleBlur(r),this.boundHandleTapClick_=r=>this.handleTapClick(r)}addEventListenerForItem(e){e instanceof ce&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ce&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ue(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),xn(i,"click",function(r){r.preventDefault(),r.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||me.activeElement;if(!this.children().some(r=>r.el()===i)){const r=this.menuButton_;r&&r.buttonPressed_&&i!==r.el().firstChild&&r.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const r=i.filter(o=>o.el()===e.target)[0];if(!r)return;r.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}ce.registerComponent("Menu",M2);class ey extends ce{constructor(e,i={}){super(e,i),this.menuButton_=new Pi(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const r=Pi.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+r,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const o=u=>this.handleClick(u);this.handleMenuKeyUp_=u=>this.handleMenuKeyUp(u),this.on(this.menuButton_,"tap",o),this.on(this.menuButton_,"click",o),this.on(this.menuButton_,"keydown",u=>this.handleKeyDown(u)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),xn(me,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",u=>this.handleMouseLeave(u)),this.on("keydown",u=>this.handleSubmenuKeyDown(u))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new M2(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Ue("li",{className:"vjs-menu-title",textContent:Ht(this.options_.title),tabIndex:-1}),r=new ce(this.player_,{el:i});e.addItem(r)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=Pi.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),Ni(me,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Ii&&O1())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}ce.registerComponent("MenuButton",ey);class ty extends ey{constructor(e,i){const r=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!r)return;const o=wt(this,this.update);r.addEventListener("removetrack",o),r.addEventListener("addtrack",o),r.addEventListener("labelchange",o),this.player_.on("ready",o),this.player_.on("dispose",function(){r.removeEventListener("removetrack",o),r.removeEventListener("addtrack",o),r.removeEventListener("labelchange",o)})}}ce.registerComponent("TrackButton",ty);class Ad extends Sp{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,r){this.nonIconControl=!0;const o=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),r),u=Ue("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?o.appendChild(u):o.replaceChild(u,o.querySelector(".vjs-icon-placeholder")),o}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ce.registerComponent("MenuItem",Ad);class wd extends Ad{constructor(e,i){const r=i.track,o=e.textTracks();i.label=r.label||r.language||"Unknown",i.selected=r.mode==="showing",super(e,i),this.track=r,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const u=(...p)=>{this.handleTracksChange.apply(this,p)},c=(...p)=>{this.handleSelectedLanguageChange.apply(this,p)};if(e.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",c),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===void 0){let p;this.on(["tap","click"],function(){if(typeof U.Event!="object")try{p=new U.Event("change")}catch{}p||(p=me.createEvent("Event"),p.initEvent("change",!0,!0)),o.dispatchEvent(p)})}this.handleTracksChange()}handleClick(e){const i=this.track,r=this.player_.textTracks();if(super.handleClick(e),!!r)for(let o=0;o<r.length;o++){const u=r[o];this.kinds.indexOf(u.kind)!==-1&&(u===i?u.mode!=="showing"&&(u.mode="showing"):u.mode!=="disabled"&&(u.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}ce.registerComponent("TextTrackMenuItem",wd);class L2 extends wd{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let r=!0;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(this.options_.kinds.indexOf(c.kind)>-1&&c.mode==="showing"){r=!1;break}}r!==this.isSelected_&&this.selected(r)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let r=!0;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(["captions","descriptions","subtitles"].indexOf(c.kind)>-1&&c.mode==="showing"){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ce.registerComponent("OffTextTrackMenuItem",L2);class fu extends ty{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=wd){let r;this.label_&&(r=`${this.label_} off`),e.push(new L2(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;const o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let u=0;u<o.length;u++){const c=o[u];if(this.kinds_.indexOf(c.kind)>-1){const p=new i(this.player_,{track:c,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});p.addClass(`vjs-${c.kind}-menu-item`),e.push(p)}}return e}}ce.registerComponent("TextTrackButton",fu);class I2 extends Ad{constructor(e,i){const r=i.track,o=i.cue,u=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=o.text,i.selected=o.startTime<=u&&u<o.endTime,super(e,i),this.track=r,this.cue=o}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}ce.registerComponent("ChaptersTrackMenuItem",I2);class iy extends fu{constructor(e,i,r){super(e,i,r),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(o=>{o.selected(this.track_.activeCues[0]===o.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const r=e[i];if(r.kind===this.kind_)return r}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ht(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let r=0,o=i.length;r<o;r++){const u=i[r],c=new I2(this.player_,{track:this.track_,cue:u});e.push(c)}return e}}iy.prototype.kind_="chapters",iy.prototype.controlText_="Chapters",ce.registerComponent("ChaptersButton",iy);class ny extends fu{constructor(e,i,r){super(e,i,r),this.setIcon("audio-description");const o=e.textTracks(),u=wt(this,this.handleTracksChange);o.addEventListener("change",u),this.on("dispose",function(){o.removeEventListener("change",u)})}handleTracksChange(e){const i=this.player().textTracks();let r=!1;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(c.kind!==this.kind_&&c.mode==="showing"){r=!0;break}}r?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}ny.prototype.kind_="descriptions",ny.prototype.controlText_="Descriptions",ce.registerComponent("DescriptionsButton",ny);class sy extends fu{constructor(e,i,r){super(e,i,r),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}sy.prototype.kind_="subtitles",sy.prototype.controlText_="Subtitles",ce.registerComponent("SubtitlesButton",sy);class ry extends wd{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}ce.registerComponent("CaptionSettingsMenuItem",ry);class ay extends fu{constructor(e,i,r){super(e,i,r),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ry(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}ay.prototype.kind_="captions",ay.prototype.controlText_="Captions",ce.registerComponent("CaptionsButton",ay);class N2 extends wd{createEl(e,i,r){const o=super.createEl(e,i,r),u=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",o):u.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(Ue("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),o}}ce.registerComponent("SubsCapsMenuItem",N2);class oy extends fu{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Ht(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ry(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,N2),e}}oy.prototype.kinds_=["captions","subtitles"],oy.prototype.controlText_="Subtitles",ce.registerComponent("SubsCapsButton",oy);class P2 extends Ad{constructor(e,i){const r=i.track,o=e.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,super(e,i),this.track=r,this.addClass(`vjs-${r.kind}-menu-item`);const u=(...c)=>{this.handleTracksChange.apply(this,c)};o.addEventListener("change",u),this.on("dispose",()=>{o.removeEventListener("change",u)})}createEl(e,i,r){const o=super.createEl(e,i,r),u=o.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(u.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(Ue("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const o=i[r];o!==this.track&&(o.enabled=o===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}ce.registerComponent("AudioTrackMenuItem",P2);class U2 extends ty{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const o=i[r];e.push(new P2(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e}}U2.prototype.controlText_="Audio Track",ce.registerComponent("AudioTrackButton",U2);class ly extends Ad{constructor(e,i){const r=i.rate,o=parseFloat(r,10);i.label=r,i.selected=o===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=r,this.rate=o,this.on(e,"ratechange",u=>this.update(u))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}ly.prototype.contentElType="button",ce.registerComponent("PlaybackRateMenuItem",ly);class B2 extends ey{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",r=>this.updateVisibility(r)),this.on(e,"ratechange",r=>this.updateLabel(r)),this.on(e,"playbackrateschange",r=>this.handlePlaybackRateschange(r))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ue("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let r=e.length-1;r>=0;r--)i.push(new ly(this.player(),{rate:e[r]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}B2.prototype.controlText_="Playback Rate",ce.registerComponent("PlaybackRateMenuButton",B2);class F2 extends ce{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},r={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,r)}}ce.registerComponent("Spacer",F2);class B3 extends F2{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}ce.registerComponent("CustomControlSpacer",B3);class H2 extends ce{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}H2.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},ce.registerComponent("ControlBar",H2);class z2 extends uu{constructor(e,i){super(e,i),this.on(e,"error",r=>{this.open(r)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}z2.prototype.options_=Object.assign({},uu.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ce.registerComponent("ErrorDisplay",z2);class j2 extends ce{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Ue("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const r=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${zn()}`)+"-"+i[1].replace(/\W+/g,""),o=Ue("option",{id:r,value:this.localize(i[0]),textContent:this.localize(i[1])});return o.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${r}`),o}))}}ce.registerComponent("TextTrackSelect",j2);class Lo extends ce{constructor(e,i={}){super(e,i);const r=Ue("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(r);const o=this.options_.selects;for(const u of o){const c=this.options_.selectConfigs[u],p=c.className,g=c.id.replace("%s",this.options_.id_);let b=null;const S=`vjs_select_${zn()}`;if(this.options_.type==="colors"){b=Ue("span",{className:p});const A=Ue("label",{id:g,className:"vjs-label",textContent:this.localize(c.label)});A.setAttribute("for",S),b.appendChild(A)}const E=new j2(e,{SelectOptions:c.options,legendId:this.options_.legendId,id:S,labelId:g});this.addChild(E),this.options_.type==="colors"&&(b.appendChild(E.el()),this.el().appendChild(b))}}createEl(){return Ue("fieldset",{className:this.options_.className})}}ce.registerComponent("TextTrackFieldset",Lo);class V2 extends ce{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new Lo(e,{id_:r,legendId:`captions-text-legend-${r}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o);const u=new Lo(e,{id_:r,legendId:`captions-background-${r}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(u);const c=new Lo(e,{id_:r,legendId:`captions-window-${r}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(c)}createEl(){return Ue("div",{className:"vjs-track-settings-colors"})}}ce.registerComponent("TextTrackSettingsColors",V2);class q2 extends ce{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new Lo(e,{id_:r,legendId:`captions-font-size-${r}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o);const u=new Lo(e,{id_:r,legendId:`captions-edge-style-${r}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(u);const c=new Lo(e,{id_:r,legendId:`captions-font-family-${r}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(c)}createEl(){return Ue("div",{className:"vjs-track-settings-font"})}}ce.registerComponent("TextTrackSettingsFont",q2);class $2 extends ce{constructor(e,i={}){super(e,i);const r=new Pi(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});r.el().classList.remove("vjs-control","vjs-button"),r.el().textContent=this.localize("Reset"),this.addChild(r);const o=this.localize("Done"),u=new Pi(e,{controlText:o,className:"vjs-done-button"});u.el().classList.remove("vjs-control","vjs-button"),u.el().textContent=o,this.addChild(u)}createEl(){return Ue("div",{className:"vjs-track-settings-controls"})}}ce.registerComponent("TrackSettingsControls",$2);const uy="vjs-text-track-settings",G2=["#000","Black"],X2=["#00F","Blue"],Y2=["#0FF","Cyan"],W2=["#0F0","Green"],Q2=["#F0F","Magenta"],K2=["#F00","Red"],Z2=["#FFF","White"],J2=["#FF0","Yellow"],cy=["1","Opaque"],dy=["0.5","Semi-Transparent"],eS=["0","Transparent"],Da={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[G2,Z2,K2,W2,X2,J2,Q2,Y2],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[cy,dy,eS],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Z2,G2,K2,W2,X2,J2,Q2,Y2],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:s=>s==="1.00"?null:Number(s)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[cy,dy],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[eS,dy,cy],className:"vjs-window-opacity vjs-opacity"}};Da.windowColor.options=Da.backgroundColor.options;function tS(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function F3(s,e){const i=s.options[s.options.selectedIndex].value;return tS(i,e)}function H3(s,e,i){if(e){for(let r=0;r<s.options.length;r++)if(tS(s.options[r].value,i)===e){s.selectedIndex=r;break}}}class z3 extends uu{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Ue("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new V2(e,{textTrackComponentid:this.id_,selectConfigs:Da,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const r=new q2(e,{textTrackComponentid:this.id_,selectConfigs:Da,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(r);const o=new $2(e);this.addChild(o)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Jl(Da,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return S1(Da,(e,i,r)=>{const o=F3(this.$(i.selector),i.parser);return o!==void 0&&(e[r]=o),e},{})}setValues(e){Jl(Da,(i,r)=>{H3(this.$(i.selector),e[r],i.parser)})}setDefaults(){Jl(Da,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(U.localStorage.getItem(uy))}catch(i){Ke.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?U.localStorage.setItem(uy,JSON.stringify(e)):U.localStorage.removeItem(uy)}catch(i){Ke.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}ce.registerComponent("TextTrackSettings",z3);class j3 extends ce{constructor(e,i){let r=i.ResizeObserver||U.ResizeObserver;i.ResizeObserver===null&&(r=!1);const o=vt({createEl:!r,reportTouchActivity:!1},i);super(e,o),this.ResizeObserver=i.ResizeObserver||U.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=X1(()=>{this.resizeHandler()},100,!1,this),r?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const u=this.debouncedHandler_;let c=this.unloadListener_=function(){Ni(this,"resize",u),Ni(this,"unload",c),c=null};xn(this.el_.contentWindow,"unload",c),xn(this.el_.contentWindow,"resize",u)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}ce.registerComponent("ResizeManager",j3);const V3={trackingThreshold:20,liveTolerance:15};class q3 extends ce{constructor(e,i){const r=vt(V3,i,{createEl:!1});super(e,r),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=o=>this.handlePlay(o),this.handleFirstTimeupdate_=o=>this.handleFirstTimeupdate(o),this.handleSeeked_=o=>this.handleSeeked(o),this.seekToLiveEdge_=o=>this.seekToLiveEdge(o),this.reset_(),this.on(this.player_,"durationchange",o=>this.handleDurationchange(o)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(U.performance.now().toFixed(4)),r=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+r;const o=this.liveCurrentTime(),u=this.player_.currentTime();let c=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-u)>this.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(c=!1),c!==this.behindLiveEdge_&&(this.behindLiveEdge_=c,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,jn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.end(r));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.start(r));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}ce.registerComponent("LiveTracker",q3);class $3 extends ce{constructor(e,i){super(e,i),this.on("statechanged",r=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ue("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${zn()}`}),description:Ue("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${zn()}`})},Ue("div",{className:"vjs-title-bar"},{},x1(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(o=>{const u=this.state[o],c=this.els[o],p=r[o];dp(c),u&&Ca(c,u),i&&(i.removeAttribute(p),u&&i.setAttribute(p,c.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}ce.registerComponent("TitleBar",$3);const G3={initialDisplay:4e3,position:[],takeFocus:!1};class X3 extends Pi{constructor(e,i){i=vt(G3,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],r=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Ue("button",{},{type:"button",class:this.buildCSSClass()},Ue("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}ce.registerComponent("TransientButton",X3);const hy=s=>{const e=s.el();if(e.hasAttribute("src"))return s.triggerSourceset(e.src),!0;const i=s.$$("source"),r=[];let o="";if(!i.length)return!1;for(let u=0;u<i.length;u++){const c=i[u].src;c&&r.indexOf(c)===-1&&r.push(c)}return r.length?(r.length===1&&(o=r[0]),s.triggerSourceset(o),!0):!1},Y3=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(s){const e=me.createElement(this.nodeName.toLowerCase());e.innerHTML=s;const i=me.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",U.Element.prototype.appendChild.call(this,i),this.innerHTML}}),iS=(s,e)=>{let i={};for(let r=0;r<s.length&&(i=Object.getOwnPropertyDescriptor(s[r],e),!(i&&i.set&&i.get));r++);return i.enumerable=!0,i.configurable=!0,i},W3=s=>iS([s.el(),U.HTMLMediaElement.prototype,U.Element.prototype,Y3],"innerHTML"),nS=function(s){const e=s.el();if(e.resetSourceWatch_)return;const i={},r=W3(s),o=u=>(...c)=>{const p=u.apply(e,c);return hy(s),p};["append","appendChild","insertAdjacentHTML"].forEach(u=>{e[u]&&(i[u]=e[u],e[u]=o(i[u]))}),Object.defineProperty(e,"innerHTML",vt(r,{set:o(r.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(u=>{e[u]=i[u]}),Object.defineProperty(e,"innerHTML",r)},s.one("sourceset",e.resetSourceWatch_)},Q3=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?a2(U.Element.prototype.getAttribute.call(this,"src")):""},set(s){return U.Element.prototype.setAttribute.call(this,"src",s),s}}),K3=s=>iS([s.el(),U.HTMLMediaElement.prototype,Q3],"src"),Z3=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const i=K3(s),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",vt(i,{set:u=>{const c=i.set.call(e,u);return s.triggerSourceset(e.src),c}})),e.setAttribute=(u,c)=>{const p=r.call(e,u,c);return/src/i.test(u)&&s.triggerSourceset(e.src),p},e.load=()=>{const u=o.call(e);return hy(s)||(s.triggerSourceset(""),nS(s)),u},e.currentSrc?s.triggerSourceset(e.currentSrc):hy(s)||nS(s),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=o,e.setAttribute=r,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class xe extends qe{constructor(e,i){super(e,i);const r=e.source;let o=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",r&&(this.el_.currentSrc!==r.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(r):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const u=this.el_.childNodes;let c=u.length;const p=[];for(;c--;){const g=u[c];g.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(g),this.remoteTextTracks().addTrack(g.track),this.textTracks().addTrack(g.track),!o&&!this.el_.hasAttribute("crossorigin")&&vp(g.src)&&(o=!0)):p.push(g))}for(let g=0;g<p.length;g++)this.el_.removeChild(p[g])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&o&&Ke.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
|
||
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(yd||np)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),xe.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Z3(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const r=()=>{i=[];for(let u=0;u<e.length;u++){const c=e[u];c.kind==="metadata"&&i.push({track:c,storedMode:c.mode})}};r(),e.addEventListener("change",r),this.on("dispose",()=>e.removeEventListener("change",r));const o=()=>{for(let u=0;u<i.length;u++){const c=i[u];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}e.removeEventListener("change",o)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",r),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",r),e.addEventListener("change",r),e.removeEventListener("change",o)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const r=e.toLowerCase();this[`${r}TracksListeners_`]&&Object.keys(this[`${r}TracksListeners_`]).forEach(o=>{this.el()[`${r}Tracks`].removeEventListener(o,this[`${r}TracksListeners_`][o])}),this[`featuresNative${e}Tracks`]=!i,this[`${r}TracksListeners_`]=null,this.proxyNativeTracksForType_(r)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=Vn[e],r=this.el()[i.getterName],o=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!r||!r.addEventListener)return;const u={change:p=>{const g={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(g),e==="text"&&this[cu.remoteText.getterName]().trigger(g)},addtrack(p){o.addTrack(p.track)},removetrack(p){o.removeTrack(p.track)}},c=function(){const p=[];for(let g=0;g<o.length;g++){let b=!1;for(let S=0;S<r.length;S++)if(r[S]===o[g]){b=!0;break}b||p.push(o[g])}for(;p.length;)o.removeTrack(p.shift())};this[i.getterName+"Listeners_"]=u,Object.keys(u).forEach(p=>{const g=u[p];r.addEventListener(p,g),this.on("dispose",b=>r.removeEventListener(p,g))}),this.on("loadstart",c),this.on("dispose",p=>this.off("loadstart",c))}proxyNativeTracks_(){Vn.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const r=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(r,e),xe.disposeMediaElement(e),e=r}else{e=me.createElement("video");const r=this.options_.tag&&Aa(this.options_.tag),o=vt({},r);(!yd||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,L1(e,Object.assign(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ru(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let r=0;r<i.length;r++){const o=i[r],u=this.options_[o];typeof u<"u"&&(u?ru(e,o,o):up(e,o),e[o]=u)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let r=!1;const o=function(){r=!0};this.on("loadstart",o);const u=function(){r||this.trigger("loadstart")};this.on("loadedmetadata",u),this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",u),r||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(r){this.trigger(r)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&op?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){Ke(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&ds&&Ns&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Us(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return Ke.error("Invalid source URL."),!1;const r={src:e};i&&(r.type=i);const o=Ue("source",{},r);return this.el_.appendChild(o),!0}removeSourceElement(e){if(!e)return Ke.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const r of i)if(r.src===e)return this.el_.removeChild(r),!0;return Ke.warn(`No matching source element found with src: ${e}`),!1}reset(){xe.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,r):super.addTextTrack(e,i,r)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=me.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const r=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(r),r}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let r=i.length;for(;r--;)(e===i[r]||e===i[r].track)&&this.el().removeChild(i[r])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),U.performance&&(e.creationTime=U.performance.now()),e}}Zf(xe,"TEST_VID",function(){if(!nu())return;const s=me.createElement("video"),e=me.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s}),xe.isSupported=function(){try{xe.TEST_VID.volume=.5}catch{return!1}return!!(xe.TEST_VID&&xe.TEST_VID.canPlayType)},xe.canPlayType=function(s){return xe.TEST_VID.canPlayType(s)},xe.canPlaySource=function(s,e){return xe.canPlayType(s.type)},xe.canControlVolume=function(){try{const s=xe.TEST_VID.volume;xe.TEST_VID.volume=s/2+.1;const e=s!==xe.TEST_VID.volume;return e&&Ii?(U.setTimeout(()=>{xe&&xe.prototype&&(xe.prototype.featuresVolumeControl=s!==xe.TEST_VID.volume)}),!1):e}catch{return!1}},xe.canMuteVolume=function(){try{const s=xe.TEST_VID.muted;return xe.TEST_VID.muted=!s,xe.TEST_VID.muted?ru(xe.TEST_VID,"muted","muted"):up(xe.TEST_VID,"muted","muted"),s!==xe.TEST_VID.muted}catch{return!1}},xe.canControlPlaybackRate=function(){if(ds&&Ns&&Jf<58)return!1;try{const s=xe.TEST_VID.playbackRate;return xe.TEST_VID.playbackRate=s/2+.1,s!==xe.TEST_VID.playbackRate}catch{return!1}},xe.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty(me.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(me.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(me.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(me.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},xe.supportsNativeTextTracks=function(){return op||Ii&&Ns},xe.supportsNativeVideoTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.videoTracks)},xe.supportsNativeAudioTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.audioTracks)},xe.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([s,e]){Zf(xe.prototype,s,()=>xe[e](),!0)}),xe.prototype.featuresVolumeControl=xe.canControlVolume(),xe.prototype.movingMediaElementInDOM=!Ii,xe.prototype.featuresFullscreenResize=!0,xe.prototype.featuresProgressEvents=!0,xe.prototype.featuresTimeupdateEvents=!0,xe.prototype.featuresVideoFrameCallback=!!(xe.TEST_VID&&xe.TEST_VID.requestVideoFrameCallback),xe.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()}},xe.resetMediaElement=function(s){if(!s)return;const e=s.querySelectorAll("source");let i=e.length;for(;i--;)s.removeChild(e[i]);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){xe.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){xe.prototype["set"+Ht(s)]=function(e){this.el_[s]=e,e?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){xe.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){xe.prototype["set"+Ht(s)]=function(e){this.el_[s]=e}}),["pause","load","play"].forEach(function(s){xe.prototype[s]=function(){return this.el_[s]()}}),qe.withSourceHandlers(xe),xe.nativeSourceHandler={},xe.nativeSourceHandler.canPlayType=function(s){try{return xe.TEST_VID.canPlayType(s)}catch{return""}},xe.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return xe.nativeSourceHandler.canPlayType(s.type);if(s.src){const i=q0(s.src);return xe.nativeSourceHandler.canPlayType(`video/${i}`)}return""},xe.nativeSourceHandler.handleSource=function(s,e,i){e.setSrc(s.src)},xe.nativeSourceHandler.dispose=function(){},xe.registerSourceHandler(xe.nativeSourceHandler),qe.registerTech("Html5",xe);const sS=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],fy={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},py=["tiny","xsmall","small","medium","large","xlarge","huge"],Cp={};py.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;Cp[s]=`vjs-layout-${e}`});const J3={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class ft extends ce{constructor(e,i,r){if(e.id=e.id||i.id||`vjs_video_${zn()}`,i=Object.assign(ft.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const c=e.closest("[lang]");c&&(i.language=c.getAttribute("lang"))}if(super(null,i,r),this.boundDocumentFullscreenChange_=c=>this.documentFullscreenChange_(c),this.boundFullWindowOnEscKey_=c=>this.fullWindowOnEscKey(c),this.boundUpdateStyleEl_=c=>this.updateStyleEl_(c),this.boundApplyInitTime_=c=>this.applyInitTime_(c),this.boundUpdateCurrentBreakpoint_=c=>this.updateCurrentBreakpoint_(c),this.boundHandleTechClick_=c=>this.handleTechClick_(c),this.boundHandleTechDoubleClick_=c=>this.handleTechDoubleClick_(c),this.boundHandleTechTouchStart_=c=>this.handleTechTouchStart_(c),this.boundHandleTechTouchMove_=c=>this.handleTechTouchMove_(c),this.boundHandleTechTouchEnd_=c=>this.handleTechTouchEnd_(c),this.boundHandleTechTap_=c=>this.handleTechTap_(c),this.boundUpdatePlayerHeightOnAudioOnlyMode_=c=>this.updatePlayerHeightOnAudioOnlyMode_(c),this.isFullscreen_=!1,this.log=_1(this.id_),this.fsApi_=Qf,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Aa(e),this.language(this.options_.language),i.languages){const c={};Object.getOwnPropertyNames(i.languages).forEach(function(p){c[p.toLowerCase()]=i.languages[p]}),this.languages_=c}else this.languages_=ft.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(c=>{if(typeof this[c]!="function")throw new Error(`plugin "${c}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),L0(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(xn(me,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const o=vt(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(c=>{this[c](i.plugins[c])}),i.debug&&this.debug(!0),this.options_.playerOptions=o,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const p=new U.DOMParser().parseFromString(S3,"image/svg+xml");if(p.querySelector("parsererror"))Ke.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const b=p.documentElement;b.style.display="none",this.el_.appendChild(b),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new x3(this),this.addClass("vjs-spatial-navigation-enabled")),yd&&this.addClass("vjs-touch-enabled"),Ii||this.addClass("vjs-workinghover"),ft.players[this.id_]=this;const u=_0.split(".")[0];this.addClass(`vjs-v${u}`),this.userActive(!0),this.reportUserActivity(),this.one("play",c=>this.listenForUserActivity_(c)),this.on("keydown",c=>this.handleKeyDown(c)),this.on("languagechange",c=>this.handleLanguagechange(c)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Ni(me,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ni(me,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),ft.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),v3(this),Gi.names.forEach(e=>{const i=Gi[e],r=this[i.getterName]();r&&r.off&&r.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const o=this.tag.tagName.toLowerCase()==="video-js";r?i=this.el_=e.parentNode:o||(i=this.el_=super.createEl("div"));const u=Aa(e);if(o){for(i=this.el_=e,e=this.tag=me.createElement("video");i.children.length;)e.appendChild(i.firstChild);vd(i,"video-js")||wo(i,"video-js"),i.appendChild(e),r=this.playerElIngest_=i,Object.keys(i).forEach(g=>{try{e[g]=i[g]}catch{}})}e.setAttribute("tabindex","-1"),u.tabindex="-1",Ns&&tp&&(e.setAttribute("role","application"),u.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in u&&delete u.width,"height"in u&&delete u.height,Object.getOwnPropertyNames(u).forEach(function(g){o&&g==="class"||i.setAttribute(g,u[g]),o&&e.setAttribute(g,u[g])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const c=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(g=>D1[g]).map(g=>"vjs-device-"+g.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...c),U.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=q1("vjs-styles-dimensions");const g=wa(".vjs-styles-defaults"),b=wa("head");b.insertBefore(this.styleEl_,g?g.nextSibling:b.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const p=e.getElementsByTagName("a");for(let g=0;g<p.length;g++){const b=p.item(g);wo(b,"vjs-hidden"),b.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(i,e),E0(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){Ke.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const r=e+"_";if(i===void 0)return this[r]||0;if(i===""||i==="auto"){this[r]=void 0,this.updateStyleEl_();return}const o=parseFloat(i);if(isNaN(o)){Ke.error(`Improper value "${i}" supplied for for ${e}`);return}this[r]=o,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Or(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),ZO(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(U.VIDEOJS_NO_DYNAMIC_STYLE===!0){const p=typeof this.width_=="number"?this.width_:this.options_.width,g=typeof this.height_=="number"?this.height_:this.options_.height,b=this.tech_&&this.tech_.el();b&&(p>=0&&(b.width=p),g>=0&&(b.height=g));return}let e,i,r,o;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?r=this.aspectRatio_:this.videoWidth()>0?r=this.videoWidth()+":"+this.videoHeight():r="16:9";const u=r.split(":"),c=u[1]/u[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/c:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*c,/^[^a-zA-Z]/.test(this.id())?o="dimensions-"+this.id():o=this.id()+"-dimensions",this.addClass(o),$1(this.styleEl_,`
|
||
.${o} {
|
||
width: ${e}px;
|
||
height: ${i}px;
|
||
}
|
||
|
||
.${o}.vjs-fluid:not(.vjs-audio-only-mode) {
|
||
padding-top: ${c*100}%;
|
||
}
|
||
`)}loadTech_(e,i){this.tech_&&this.unloadTech_();const r=Ht(e),o=e.charAt(0).toLowerCase()+e.slice(1);r!=="Html5"&&this.tag&&(qe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;let u=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(u=!1);const c={source:i,autoplay:u,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${o}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Gi.names.forEach(g=>{const b=Gi[g];c[b.getterName]=this[b.privateName]}),Object.assign(c,this.options_[r]),Object.assign(c,this.options_[o]),Object.assign(c,this.options_[e.toLowerCase()]),this.tag&&(c.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime);const p=qe.getTech(e);if(!p)throw new Error(`No Tech named '${r}' exists! '${r}' should be registered using videojs.registerTech()'`);this.tech_=new p(c),this.tech_.ready(wt(this,this.handleTechReady_),!0),U0.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sS.forEach(g=>{this.on(this.tech_,g,b=>this[`handleTech${Ht(g)}_`](b))}),Object.keys(fy).forEach(g=>{this.on(this.tech_,g,b=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${fy[g]}_`].bind(this),event:b});return}this[`handleTech${fy[g]}_`](b)})}),this.on(this.tech_,"loadstart",g=>this.handleTechLoadStart_(g)),this.on(this.tech_,"sourceset",g=>this.handleTechSourceset_(g)),this.on(this.tech_,"waiting",g=>this.handleTechWaiting_(g)),this.on(this.tech_,"ended",g=>this.handleTechEnded_(g)),this.on(this.tech_,"seeking",g=>this.handleTechSeeking_(g)),this.on(this.tech_,"play",g=>this.handleTechPlay_(g)),this.on(this.tech_,"pause",g=>this.handleTechPause_(g)),this.on(this.tech_,"durationchange",g=>this.handleTechDurationChange_(g)),this.on(this.tech_,"fullscreenchange",(g,b)=>this.handleTechFullscreenChange_(g,b)),this.on(this.tech_,"fullscreenerror",(g,b)=>this.handleTechFullscreenError_(g,b)),this.on(this.tech_,"enterpictureinpicture",g=>this.handleTechEnterPictureInPicture_(g)),this.on(this.tech_,"leavepictureinpicture",g=>this.handleTechLeavePictureInPicture_(g)),this.on(this.tech_,"error",g=>this.handleTechError_(g)),this.on(this.tech_,"posterchange",g=>this.handleTechPosterChange_(g)),this.on(this.tech_,"textdata",g=>this.handleTechTextData_(g)),this.on(this.tech_,"ratechange",g=>this.handleTechRateChange_(g)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(r!=="Html5"||!this.tag)&&E0(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Gi.names.forEach(e=>{const i=Gi[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=U0.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&Ke.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
|
||
See https://github.com/videojs/video.js/issues/2617 for more info.
|
||
`),this.tech_}version(){return{"video.js":_0}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const o=this.muted();this.muted(!0);const u=()=>{this.muted(o)};this.playTerminatedQueue_.push(u);const c=this.play();if(xd(c))return c.catch(p=>{throw u(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${p||""}`)})};let r;if(e==="any"&&!this.muted()?(r=this.play(),xd(r)&&(r=r.catch(i))):e==="muted"&&!this.muted()?r=i():r=this.play(),!!xd(r))return r.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,r="";typeof i!="string"&&(i=e.src,r=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!r&&(r=T3(this,i)),this.cache_.source=vt({},e,{src:i,type:r});const o=this.cache_.sources.filter(g=>g.src&&g.src===i),u=[],c=this.$$("source"),p=[];for(let g=0;g<c.length;g++){const b=Aa(c[g]);u.push(b),b.src&&b.src===i&&p.push(b.src)}p.length&&!o.length?this.cache_.sources=u:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=u=>this.updateSourceCaches_(u);const r=this.currentSource().src,o=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==r)&&(i=()=>{}),i(o),e.src||this.tech_.any(["sourceset","loadstart"],u=>{if(u.type==="sourceset")return;const c=this.techGet_("currentSrc");this.lastSource_.tech=c,this.updateSourceCaches_(c)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Us(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),r=>r.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!me.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const r=this.el();let o=me[this.fsApi_.fullscreenElement]===r;!o&&r.matches&&(o=r.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in g3)return p3(this.middleware_,this.tech_,e,i);if(e in h2)return d2(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(r){throw Ke(r),r}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in m3)return f3(this.middleware_,this.tech_,e);if(e in h2)return d2(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(Ke(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(Ke(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(Ke(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Us){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),r=!!(op||Ii);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=c=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&r&&this.load();return}const o=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),o===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(r){r(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||hs(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=hs(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=hs(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return i2(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let r=e.end(e.length-1);return r>i&&(r=i),r}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((r,o)=>{function u(){i.off("fullscreenerror",p),i.off("fullscreenchange",c)}function c(){u(),r()}function p(b,S){u(),o(S)}i.one("fullscreenchange",c),i.one("fullscreenerror",p);const g=i.requestFullscreenHelper_(e);g&&(g.then(u,u),g.then(r,o))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const r=this.el_[this.fsApi_.requestFullscreen](i);return r&&r.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),r}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,r)=>{function o(){e.off("fullscreenerror",c),e.off("fullscreenchange",u)}function u(){o(),i()}function c(g,b){o(),r(b)}e.one("fullscreenchange",u),e.one("fullscreenerror",c);const p=e.exitFullscreenHelper_();p&&(p.then(o,o),p.then(i,r))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=me[this.fsApi_.exitFullscreen]();return e&&Us(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=me.documentElement.style.overflow,xn(me,"keydown",this.boundFullWindowOnEscKey_),me.documentElement.style.overflow="hidden",wo(me.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Ni(me,"keydown",this.boundFullWindowOnEscKey_),me.documentElement.style.overflow=this.docOrigOverflow,lp(me.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&U.documentPictureInPicture){const e=me.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Ue("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),U.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(z1(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",r=>{const o=r.target.querySelector(".video-js");e.parentNode.replaceChild(o,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in me&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(U.documentPictureInPicture&&U.documentPictureInPicture.window)return U.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in me)return me.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(o=>{const u=o.tagName.toLowerCase();if(o.isContentEditable)return!0;const c=["button","checkbox","hidden","radio","reset","submit"];return u==="input"?c.indexOf(o.type)===-1:["textarea"].indexOf(u)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:r=c=>e.key.toLowerCase()==="f",muteKey:o=c=>e.key.toLowerCase()==="m",playPauseKey:u=c=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const c=ce.getComponent("FullscreenToggle");me[this.fsApi_.fullscreenEnabled]!==!1&&c.prototype.handleClick.call(this,e)}else o.call(this,e)?(e.preventDefault(),e.stopPropagation(),ce.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ce.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let r=0,o=this.options_.techOrder;r<o.length;r++){const u=o[r];let c=qe.getTech(u);if(c||(c=ce.getComponent(u)),!c){Ke.error(`The "${u}" tech is undefined. Skipped browser support check for that tech.`);continue}if(c.isSupported()&&(i=c.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(p=>[p,qe.getTech(p)]).filter(([p,g])=>g?g.isSupported():(Ke.error(`The "${p}" tech is undefined. Skipped browser support check for that tech.`),!1)),r=function(p,g,b){let S;return p.some(E=>g.some(A=>{if(S=b(E,A),S)return!0})),S};let o;const u=p=>(g,b)=>p(b,g),c=([p,g],b)=>{if(g.canPlaySource(b,this.options_[p.toLowerCase()]))return{source:b,tech:p}};return this.options_.sourceOrder?o=r(e,i,u(c)):o=r(i,e,c),o||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const r=f2(e);if(!r.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),d3(this,r[0],(o,u)=>{if(this.middleware_=u,i||(this.cache_.sources=r),this.updateSourceCaches_(o),this.src_(o)){if(r.length>1)return this.handleSrc_(r.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}h3(u,this.tech_)}),r.length>1){const o=()=>{this.error(null),this.handleSrc_(r.slice(1),!0)},u=()=>{this.off("error",o)};this.one("error",o),this.one("playing",u),this.resetRetryOnError_=()=>{this.off("error",o),this.off("playing",u)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?K1(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Us(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Or(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:r,remainingTimeDisplay:o}=this.controlBar||{},{seekBar:u}=r||{};e&&e.updateContent(),i&&i.updateContent(),o&&o.updateContent(),u&&(u.update(),u.loadProgressBar&&u.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(xa("beforeerror").forEach(i=>{const r=i(this,e);if(!(Is(r)&&!Array.isArray(r)||typeof r=="string"||typeof r=="number"||r===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=r}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Nt(e),this.addClass("vjs-error"),Ke.error(`(CODE:${this.error_.code} ${Nt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),xa("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,r;const o=wt(this,this.reportUserActivity),u=function(E){(E.screenX!==i||E.screenY!==r)&&(i=E.screenX,r=E.screenY,o())},c=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},p=function(E){o(),this.clearInterval(e)};this.on("mousedown",c),this.on("mousemove",u),this.on("mouseup",p),this.on("mouseleave",p);const g=this.getChild("controlBar");g&&!Ii&&!ds&&(g.on("mouseenter",function(E){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),g.on("mouseleave",function(E){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);let b;const S=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(b);const E=this.options_.inactivityTimeout;E<=0||(b=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},E))};this.setInterval(S,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),r=i&&i.currentHeight();e.forEach(o=>{o!==i&&o.el_&&!o.hasClass("vjs-hidden")&&(o.hide(),this.audioOnlyCache_.hiddenChildren.push(o))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=r,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(r),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,r){if(this.tech_)return this.tech_.addTextTrack(e,i,r)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Or(this)&&this.trigger("languagechange"))}languages(){return vt(ft.prototype.options_.languages,this.languages_)}toJSON(){const e=vt(this.options_),i=e.tracks;e.tracks=[];for(let r=0;r<i.length;r++){let o=i[r];o=vt(o),o.player=void 0,e.tracks[r]=o}return e}createModal(e,i){i=i||{},i.content=e||"";const r=new uu(this,i);return this.addChild(r),r.on("dispose",()=>{this.removeChild(r)}),r.open(),r}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let r=0;r<py.length;r++){const o=py[r],u=this.breakpoints_[o];if(i<=u){if(e===o)return;e&&this.removeClass(Cp[e]),this.addClass(Cp[o]),this.breakpoint_=o;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},J3,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Cp[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const r=this.crossOrigin();this.reset(),this.cache_.media=vt(e);const{artist:o,artwork:u,description:c,poster:p,src:g,textTracks:b,title:S}=this.cache_.media;!u&&p&&(this.cache_.media.artwork=[{src:p,type:Tp(p)}]),r&&this.crossOrigin(r),g&&this.src(g),p&&this.poster(p),Array.isArray(b)&&b.forEach(E=>this.addRemoteTextTrack(E,!1)),this.titleBar&&this.titleBar.update({title:S,description:c||o||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),r=Array.prototype.map.call(this.remoteTextTracks(),u=>({kind:u.kind,label:u.label,language:u.language,src:u.src})),o={src:i,textTracks:r};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:Tp(o.poster)}]),o}return vt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},r=Aa(e),o=r["data-setup"];if(vd(e,"vjs-fill")&&(r.fill=!0),vd(e,"vjs-fluid")&&(r.fluid=!0),o!==null)try{Object.assign(r,JSON.parse(o||"{}"))}catch(u){Ke.error("data-setup",u)}if(Object.assign(i,r),e.hasChildNodes()){const u=e.childNodes;for(let c=0,p=u.length;c<p;c++){const g=u[c],b=g.nodeName.toLowerCase();b==="source"?i.sources.push(Aa(g)):b==="track"&&i.tracks.push(Aa(g))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}ft.prototype.videoTracks=()=>{},ft.prototype.audioTracks=()=>{},ft.prototype.textTracks=()=>{},ft.prototype.remoteTextTracks=()=>{},ft.prototype.remoteTextTrackEls=()=>{},Gi.names.forEach(function(s){const e=Gi[s];ft.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),ft.prototype.crossorigin=ft.prototype.crossOrigin,ft.players={};const Dd=U.navigator;ft.prototype.options_={techOrder:qe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Dd&&(Dd.languages&&Dd.languages[0]||Dd.userLanguage||Dd.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},sS.forEach(function(s){ft.prototype[`handleTech${Ht(s)}_`]=function(){return this.trigger(s)}}),ce.registerComponent("Player",ft);const Ap="plugin",pu="activePlugins_",mu={},wp=s=>mu.hasOwnProperty(s),Dp=s=>wp(s)?mu[s]:void 0,rS=(s,e)=>{s[pu]=s[pu]||{},s[pu][e]=!0},kp=(s,e,i)=>{const r=(i?"before":"")+"pluginsetup";s.trigger(r,e),s.trigger(r+":"+e.name,e)},eR=function(s,e){const i=function(){kp(this,{name:s,plugin:e,instance:null},!0);const r=e.apply(this,arguments);return rS(this,s),kp(this,{name:s,plugin:e,instance:r}),r};return Object.keys(e).forEach(function(r){i[r]=e[r]}),i},aS=(s,e)=>(e.prototype.name=s,function(...i){kp(this,{name:s,plugin:e,instance:null},!0);const r=new e(this,...i);return this[s]=()=>r,kp(this,r.getEventHash()),r});class on{constructor(e){if(this.constructor===on)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),L0(this),delete this.trigger,Q1(this,this.constructor.defaultState),rS(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return lu(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[pu][e]=!1,this.player=this.state=null,i[e]=aS(e,mu[e])}static isBasic(e){const i=typeof e=="string"?Dp(e):e;return typeof i=="function"&&!on.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(wp(e))Ke.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(ft.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return mu[e]=i,e!==Ap&&(on.isBasic(i)?ft.prototype[e]=eR(e,i):ft.prototype[e]=aS(e,i)),i}static deregisterPlugin(e){if(e===Ap)throw new Error("Cannot de-register base plugin.");wp(e)&&(delete mu[e],delete ft.prototype[e])}static getPlugins(e=Object.keys(mu)){let i;return e.forEach(r=>{const o=Dp(r);o&&(i=i||{},i[r]=o)}),i}static getPluginVersion(e){const i=Dp(e);return i&&i.VERSION||""}}on.getPlugin=Dp,on.BASE_PLUGIN_NAME=Ap,on.registerPlugin(Ap,on),ft.prototype.usingPlugin=function(s){return!!this[pu]&&this[pu][s]===!0},ft.prototype.hasPlugin=function(s){return!!wp(s)};function tR(s,e){let i=!1;return function(...r){return i||Ke.warn(s),i=!0,e.apply(this,r)}}function fs(s,e,i,r){return tR(`${e} is deprecated and will be removed in ${s}.0; please use ${i} instead.`,r)}var iR={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const oS=s=>s.indexOf("#")===0?s.slice(1):s;function q(s,e,i){let r=q.getPlayer(s);if(r)return e&&Ke.warn(`Player "${s}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const o=typeof s=="string"?wa("#"+oS(s)):s;if(!su(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");const c=("getRootNode"in o?o.getRootNode()instanceof U.ShadowRoot:!1)?o.getRootNode():o.ownerDocument.body;(!o.ownerDocument.defaultView||!c.contains(o))&&Ke.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(o.parentNode&&o.parentNode.hasAttribute&&o.parentNode.hasAttribute("data-vjs-player")?o.parentNode:o).cloneNode(!0)),xa("beforesetup").forEach(g=>{const b=g(o,vt(e));if(!Is(b)||Array.isArray(b)){Ke.error("please return an object in beforesetup hooks");return}e=vt(e,b)});const p=ce.getComponent("Player");return r=new p(o,e,i),xa("setup").forEach(g=>g(r)),r}if(q.hooks_=kr,q.hooks=xa,q.hook=FO,q.hookOnce=HO,q.removeHook=v1,U.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&nu()){let s=wa(".vjs-styles-defaults");if(!s){s=q1("vjs-styles-defaults");const e=wa("head");e&&e.insertBefore(s,e.firstChild),$1(s,`
|
||
.video-js {
|
||
width: 300px;
|
||
height: 150px;
|
||
}
|
||
|
||
.vjs-fluid:not(.vjs-audio-only-mode) {
|
||
padding-top: 56.25%
|
||
}
|
||
`)}}w0(1,q),q.VERSION=_0,q.options=ft.prototype.options_,q.getPlayers=()=>ft.players,q.getPlayer=s=>{const e=ft.players;let i;if(typeof s=="string"){const r=oS(s),o=e[r];if(o)return o;i=wa("#"+r)}else i=s;if(su(i)){const{player:r,playerId:o}=i;if(r||e[o])return r||e[o]}},q.getAllPlayers=()=>Object.keys(ft.players).map(s=>ft.players[s]).filter(Boolean),q.players=ft.players,q.getComponent=ce.getComponent,q.registerComponent=(s,e)=>(qe.isTech(e)&&Ke.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ce.registerComponent.call(ce,s,e)),q.getTech=qe.getTech,q.registerTech=qe.registerTech,q.use=c3,Object.defineProperty(q,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(q.middleware,"TERMINATOR",{value:_p,writeable:!1,enumerable:!0}),q.browser=D1,q.obj=VO,q.mergeOptions=fs(9,"videojs.mergeOptions","videojs.obj.merge",vt),q.defineLazyProperty=fs(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Zf),q.bind=fs(9,"videojs.bind","native Function.prototype.bind",wt),q.registerPlugin=on.registerPlugin,q.deregisterPlugin=on.deregisterPlugin,q.plugin=(s,e)=>(Ke.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),on.registerPlugin(s,e)),q.getPlugins=on.getPlugins,q.getPlugin=on.getPlugin,q.getPluginVersion=on.getPluginVersion,q.addLanguage=function(s,e){return s=(""+s).toLowerCase(),q.options.languages=vt(q.options.languages,{[s]:e}),q.options.languages[s]},q.log=Ke,q.createLogger=_1,q.time=n3,q.createTimeRange=fs(9,"videojs.createTimeRange","videojs.time.createTimeRanges",hs),q.createTimeRanges=fs(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",hs),q.formatTime=fs(9,"videojs.formatTime","videojs.time.formatTime",ko),q.setFormatTime=fs(9,"videojs.setFormatTime","videojs.time.setFormatTime",e2),q.resetFormatTime=fs(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",t2),q.parseUrl=fs(9,"videojs.parseUrl","videojs.url.parseUrl",V0),q.isCrossOrigin=fs(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",vp),q.EventTarget=En,q.any=O0,q.on=xn,q.one=pp,q.off=Ni,q.trigger=lu,q.xhr=j_,q.TrackList=Oo,q.TextTrack=Ed,q.TextTrackList=z0,q.AudioTrack=u2,q.AudioTrackList=n2,q.VideoTrack=c2,q.VideoTrackList=s2,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{q[s]=function(){return Ke.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),j1[s].apply(null,arguments)}}),q.computedStyle=fs(9,"videojs.computedStyle","videojs.dom.computedStyle",ou),q.dom=j1,q.fn=KO,q.num=R3,q.str=t3,q.url=l3,q.Error=iR;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class nR{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(r){i.enabled_(r)}}),i}}class Op extends q.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const r=this.levels_.length;return i=new nR(e),""+r in this||Object.defineProperty(this,r,{get(){return this.levels_[r]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let r=0,o=this.length;r<o;r++)if(this[r]===e){i=this.levels_.splice(r,1)[0],this.selectedIndex_===r?this.selectedIndex_=-1:this.selectedIndex_>r&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,r=this.length;i<r;i++){const o=this[i];if(o.id===e)return o}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Op.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const s in Op.prototype.allowedEvents_)Op.prototype["on"+s]=null;var lS="4.1.0";const sR=function(s,e){const i=s.qualityLevels,r=new Op,o=function(){r.dispose(),s.qualityLevels=i,s.off("dispose",o)};return s.on("dispose",o),s.qualityLevels=()=>r,s.qualityLevels.VERSION=lS,r},uS=function(s){return sR(this,q.obj.merge({},s))};q.registerPlugin("qualityLevels",uS),uS.VERSION=lS;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const ln=Nf,Rp=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,$n=s=>q.log.debug?q.log.debug.bind(q,"VHS:",`${s} >`):function(){};function pt(...s){const e=q.obj||q;return(e.merge||e.mergeOptions).apply(e,s)}function hi(...s){const e=q.time||q;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}function rR(s){if(s.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
|
||
`;for(let i=0;i<s.length;i++){const r=s.start(i),o=s.end(i);e+=`${r} --> ${o}. Duration (${o-r})
|
||
`}return e}const Fs=1/30,Hs=Fs*3,cS=function(s,e){const i=[];let r;if(s&&s.length)for(r=0;r<s.length;r++)e(s.start(r),s.end(r))&&i.push([s.start(r),s.end(r)]);return hi(i)},gu=function(s,e){return cS(s,function(i,r){return i-Hs<=e&&r+Hs>=e})},Mp=function(s,e){return cS(s,function(i){return i-Fs>=e})},aR=function(s){if(s.length<2)return hi();const e=[];for(let i=1;i<s.length;i++){const r=s.end(i-1),o=s.start(i);e.push([r,o])}return hi(e)},oR=function(s,e){let i=null,r=null,o=0;const u=[],c=[];if(!s||!s.length||!e||!e.length)return hi();let p=s.length;for(;p--;)u.push({time:s.start(p),type:"start"}),u.push({time:s.end(p),type:"end"});for(p=e.length;p--;)u.push({time:e.start(p),type:"start"}),u.push({time:e.end(p),type:"end"});for(u.sort(function(g,b){return g.time-b.time}),p=0;p<u.length;p++)u[p].type==="start"?(o++,o===2&&(i=u[p].time)):u[p].type==="end"&&(o--,o===1&&(r=u[p].time)),i!==null&&r!==null&&(c.push([i,r]),i=null,r=null);return hi(c)},dS=s=>{const e=[];if(!s||!s.length)return"";for(let i=0;i<s.length;i++)e.push(s.start(i)+" => "+s.end(i));return e.join(", ")},lR=function(s,e,i=1){return((s.length?s.end(s.length-1):0)-e)/i},Io=s=>{const e=[];for(let i=0;i<s.length;i++)e.push({start:s.start(i),end:s.end(i)});return e},uR=function(s,e){if(s===e)return!1;if(!s&&e||!e&&s||s.length!==e.length)return!0;for(let i=0;i<s.length;i++)if(s.start(i)!==e.start(i)||s.end(i)!==e.end(i))return!0;return!1},my=function(s){if(!(!s||!s.length||!s.end))return s.end(s.length-1)},gy=function(s,e){let i=0;if(!s||!s.length)return i;for(let r=0;r<s.length;r++){const o=s.start(r),u=s.end(r);if(!(e>u)){if(e>o&&e<=u){i+=u-e;continue}i+=u-o}}return i},yy=(s,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(r){i+=r.duration}),(e.preloadHints||[]).forEach(function(r){r.type==="PART"&&(i+=s.partTargetDuration)}),i},vy=s=>(s.segments||[]).reduce((e,i,r)=>(i.parts?i.parts.forEach(function(o,u){e.push({duration:o.duration,segmentIndex:r,partIndex:u,part:o,segment:i})}):e.push({duration:i.duration,segmentIndex:r,partIndex:null,segment:i,part:null}),e),[]),hS=s=>{const e=s.segments&&s.segments.length&&s.segments[s.segments.length-1];return e&&e.parts||[]},fS=({preloadSegment:s})=>{if(!s)return;const{parts:e,preloadHints:i}=s;let r=(i||[]).reduce((o,u)=>o+(u.type==="PART"?1:0),0);return r+=e&&e.length?e.length:0,r},pS=(s,e)=>{if(e.endList)return 0;if(s&&s.suggestedPresentationDelay)return s.suggestedPresentationDelay;const i=hS(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},cR=function(s,e){let i=0,r=e-s.mediaSequence,o=s.segments[r];if(o){if(typeof o.start<"u")return{result:o.start,precise:!0};if(typeof o.end<"u")return{result:o.end-o.duration,precise:!0}}for(;r--;){if(o=s.segments[r],typeof o.end<"u")return{result:i+o.end,precise:!0};if(i+=yy(s,o),typeof o.start<"u")return{result:i+o.start,precise:!0}}return{result:i,precise:!1}},dR=function(s,e){let i=0,r,o=e-s.mediaSequence;for(;o<s.segments.length;o++){if(r=s.segments[o],typeof r.start<"u")return{result:r.start-i,precise:!0};if(i+=yy(s,r),typeof r.end<"u")return{result:r.end-i,precise:!0}}return{result:-1,precise:!1}},mS=function(s,e,i){if(typeof e>"u"&&(e=s.mediaSequence+s.segments.length),e<s.mediaSequence)return 0;const r=cR(s,e);if(r.precise)return r.result;const o=dR(s,e);return o.precise?o.result:r.result+i},gS=function(s,e,i){if(!s)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(s.totalDuration)return s.totalDuration;if(!s.endList)return U.Infinity}return mS(s,e,i)},kd=function({defaultDuration:s,durationList:e,startIndex:i,endIndex:r}){let o=0;if(i>r&&([i,r]=[r,i]),i<0){for(let u=i;u<Math.min(0,r);u++)o+=s;i=0}for(let u=i;u<r;u++)o+=e[u].duration;return o},yS=function(s,e,i,r){if(!s||!s.segments)return null;if(s.endList)return gS(s);if(e===null)return null;e=e||0;let o=mS(s,s.mediaSequence+s.segments.length,e);return i&&(r=typeof r=="number"?r:pS(null,s),o-=r),Math.max(0,o)},hR=function(s,e,i){const o=e||0;let u=yS(s,e,!0,i);return u===null?hi():(u<o&&(u=o),hi(o,u))},fR=function({playlist:s,currentTime:e,startingSegmentIndex:i,startingPartIndex:r,startTime:o,exactManifestTimings:u}){let c=e-o;const p=vy(s);let g=0;for(let b=0;b<p.length;b++){const S=p[b];if(i===S.segmentIndex&&!(typeof r=="number"&&typeof S.partIndex=="number"&&r!==S.partIndex)){g=b;break}}if(c<0){if(g>0)for(let b=g-1;b>=0;b--){const S=p[b];if(c+=S.duration,u){if(c<0)continue}else if(c+Fs<=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o-kd({defaultDuration:s.targetDuration,durationList:p,startIndex:g,endIndex:b})}}return{partIndex:p[0]&&p[0].partIndex||null,segmentIndex:p[0]&&p[0].segmentIndex||0,startTime:e}}if(g<0){for(let b=g;b<0;b++)if(c-=s.targetDuration,c<0)return{partIndex:p[0]&&p[0].partIndex||null,segmentIndex:p[0]&&p[0].segmentIndex||0,startTime:e};g=0}for(let b=g;b<p.length;b++){const S=p[b];c-=S.duration;const E=S.duration>Fs,A=c===0,R=E&&c+Fs>=0;if(!((A||R)&&b!==p.length-1)){if(u){if(c>0)continue}else if(c-Fs>=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o+kd({defaultDuration:s.targetDuration,durationList:p,startIndex:g,endIndex:b})}}}return{segmentIndex:p[p.length-1].segmentIndex,partIndex:p[p.length-1].partIndex,startTime:e}},vS=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},by=function(s){return s.excludeUntil&&s.excludeUntil===1/0},Lp=function(s){const e=vS(s);return!s.disabled&&!e},pR=function(s){return s.disabled},mR=function(s){for(let e=0;e<s.segments.length;e++)if(s.segments[e].key)return!0;return!1},bS=function(s,e){return e.attributes&&e.attributes[s]},gR=function(s,e,i,r=0){return bS("BANDWIDTH",i)?(s*i.attributes.BANDWIDTH-r*8)/e:NaN},_y=(s,e)=>{if(s.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(r=>Lp(r)?(r.attributes.BANDWIDTH||0)<i:!1).length===0},Ty=(s,e)=>!s&&!e||!s&&e||s&&!e?!1:!!(s===e||s.id&&e.id&&s.id===e.id||s.resolvedUri&&e.resolvedUri&&s.resolvedUri===e.resolvedUri||s.uri&&e.uri&&s.uri===e.uri),_S=function(s,e){const i=s&&s.mediaGroups&&s.mediaGroups.AUDIO||{};let r=!1;for(const o in i){for(const u in i[o])if(r=e(i[o][u]),r)break;if(r)break}return!!r},Od=s=>{if(!s||!s.playlists||!s.playlists.length)return _S(s,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<s.playlists.length;e++){const i=s.playlists[e],r=i.attributes&&i.attributes.CODECS;if(!(r&&r.split(",").every(u=>iT(u))||_S(s,u=>Ty(i,u))))return!1}return!0};var un={liveEdgeDelay:pS,duration:gS,seekable:hR,getMediaInfoForTime:fR,isEnabled:Lp,isDisabled:pR,isExcluded:vS,isIncompatible:by,playlistEnd:yS,isAes:mR,hasAttribute:bS,estimateSegmentRequestTime:gR,isLowestEnabledRendition:_y,isAudioOnly:Od,playlistMatch:Ty,segmentDurationWithParts:yy};const{log:TS}=q,yu=(s,e)=>`${s}-${e}`,SS=(s,e,i)=>`placeholder-uri-${s}-${e}-${i}`,yR=({onwarn:s,oninfo:e,manifestString:i,customTagParsers:r=[],customTagMappers:o=[],llhls:u})=>{const c=new Bk;s&&c.on("warn",s),e&&c.on("info",e),r.forEach(b=>c.addParser(b)),o.forEach(b=>c.addTagMapper(b)),c.push(i),c.end();const p=c.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(b){p.hasOwnProperty(b)&&delete p[b]}),p.segments&&p.segments.forEach(function(b){["parts","preloadHints"].forEach(function(S){b.hasOwnProperty(S)&&delete b[S]})})),!p.targetDuration){let b=10;p.segments&&p.segments.length&&(b=p.segments.reduce((S,E)=>Math.max(S,E.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${b}`}),p.targetDuration=b}const g=hS(p);if(g.length&&!p.partTargetDuration){const b=g.reduce((S,E)=>Math.max(S,E.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${b}`}),TS.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),p.partTargetDuration=b}return p},vu=(s,e)=>{s.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(s.mediaGroups[i])for(const r in s.mediaGroups[i])for(const o in s.mediaGroups[i][r]){const u=s.mediaGroups[i][r][o];e(u,i,r,o)}})},xS=({playlist:s,uri:e,id:i})=>{s.id=i,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},vR=s=>{let e=s.playlists.length;for(;e--;){const i=s.playlists[e];xS({playlist:i,id:yu(e,i.uri)}),i.resolvedUri=ln(s.uri,i.uri),s.playlists[i.id]=i,s.playlists[i.uri]=i,i.attributes.BANDWIDTH||TS.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},bR=s=>{vu(s,e=>{e.uri&&(e.resolvedUri=ln(s.uri,e.uri))})},_R=(s,e)=>{const i=yu(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:U.location.href,resolvedUri:U.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[e]=r.playlists[0],r},ES=(s,e,i=SS)=>{s.uri=e;for(let o=0;o<s.playlists.length;o++)if(!s.playlists[o].uri){const u=`placeholder-uri-${o}`;s.playlists[o].uri=u}const r=Od(s);vu(s,(o,u,c,p)=>{if(!o.playlists||!o.playlists.length){if(r&&u==="AUDIO"&&!o.uri)for(let g=0;g<s.playlists.length;g++){const b=s.playlists[g];if(b.attributes&&b.attributes.AUDIO&&b.attributes.AUDIO===c)return}o.playlists=[Ft({},o)]}o.playlists.forEach(function(g,b){const S=i(u,c,p,g),E=yu(b,S);g.uri?g.resolvedUri=g.resolvedUri||ln(s.uri,g.uri):(g.uri=b===0?S:E,g.resolvedUri=g.uri),g.id=g.id||E,g.attributes=g.attributes||{},s.playlists[g.id]=g,s.playlists[g.uri]=g})}),vR(s),bR(s)};class CS{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[i]=e,r=i.startDate.getTime();this.trimProcessedDateRanges_(r),this.pendingDateRanges_=e.reduce((o,u)=>(o.set(u.id,u),o),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},i=[];this.pendingDateRanges_.forEach((r,o)=>{if(!this.processedDateRanges_.has(o)&&(r.startTime=r.startDate.getTime()/1e3-this.offset_,r.processDateRange=()=>this.processDateRange(r),i.push(r),!!r.class))if(e[r.class]){const u=e[r.class].push(r);r.classListIndex=u-1}else e[r.class]=[r],r.classListIndex=0});for(const r of i){const o=e[r.class]||[];r.endDate?r.endTime=r.endDate.getTime()/1e3-this.offset_:r.endOnNext&&o[r.classListIndex+1]?r.endTime=o[r.classListIndex+1].startTime:r.duration?r.endTime=r.startTime+r.duration:r.plannedDuration?r.endTime=r.startTime+r.plannedDuration:r.endTime=r.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((r,o)=>{r.startDate.getTime()<e&&this.processedDateRanges_.delete(o)})}}const AS=22,No=({requestType:s,request:e,error:i,parseFailure:r})=>{const o=e.status<200||e.status>299,u=e.status>=400&&e.status<=499,c={uri:e.uri,requestType:s},p=o&&!u||r;if(i&&u)c.error=Ft({},i),c.errorType=q.Error.NetworkRequestFailed;else if(e.aborted)c.errorType=q.Error.NetworkRequestAborted;else if(e.timedout)c.erroType=q.Error.NetworkRequestTimeout;else if(p){const g=r?q.Error.NetworkBodyParserFailed:q.Error.NetworkBadStatus;c.errorType=g,c.status=e.status,c.headers=e.headers}return c},TR=$n("CodecUtils"),wS=function(s){const e=s.attributes||{};if(e.CODECS)return Rs(e.CODECS)},DS=(s,e)=>{const i=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&i.AUDIO&&s.mediaGroups.AUDIO[i.AUDIO]},SR=(s,e)=>{if(!DS(s,e))return!0;const i=e.attributes||{},r=s.mediaGroups.AUDIO[i.AUDIO];for(const o in r)if(!r[o].uri&&!r[o].playlists)return!0;return!1},Rd=function(s){const e={};return s.forEach(({mediaType:i,type:r,details:o})=>{e[i]=e[i]||[],e[i].push(tT(`${r}${o}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){TR(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return}e[i]=e[i][0]}),e},kS=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},Md=function(s,e){const i=e.attributes||{},r=Rd(wS(e)||[]);if(DS(s,e)&&!r.audio&&!SR(s,e)){const o=Rd(Hk(s,i.AUDIO)||[]);o.audio&&(r.audio=o.audio)}return r},{EventTarget:xR}=q,ER=(s,e)=>{if(e.endList||!e.serverControl)return s;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:r}=e;let o=e.mediaSequence+e.segments.length;if(r){const u=r.parts||[],c=fS(e)-1;c>-1&&c!==u.length-1&&(i._HLS_part=c),(c>-1||u.length)&&o--}i._HLS_msn=o}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const r=new U.URL(s);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(o){i.hasOwnProperty(o)&&r.searchParams.set(o,i[o])}),s=r.toString()}return s},CR=(s,e)=>{if(!s)return e;const i=pt(s,e);if(s.preloadHints&&!e.preloadHints&&delete i.preloadHints,s.parts&&!e.parts)delete i.parts;else if(s.parts&&e.parts)for(let r=0;r<e.parts.length;r++)s.parts&&s.parts[r]&&(i.parts[r]=pt(s.parts[r],e.parts[r]));return!s.skipped&&e.skipped&&(i.skipped=!1),s.preload&&!e.preload&&(i.preload=!1),i},AR=(s,e,i)=>{const r=s.slice(),o=e.slice();i=i||0;const u=[];let c;for(let p=0;p<o.length;p++){const g=r[p+i],b=o[p];g?(c=g.map||c,u.push(CR(g,b))):(c&&!b.map&&(b.map=c),u.push(b))}return u},OS=(s,e)=>{!s.resolvedUri&&s.uri&&(s.resolvedUri=ln(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=ln(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=ln(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=ln(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=ln(e,i.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=ln(e,i.uri))})},RS=function(s){const e=s.segments||[],i=s.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let r=0;r<i.preloadHints.length;r++)if(i.preloadHints[r].type==="MAP")return e}i.duration=s.targetDuration,i.preload=!0,e.push(i)}return e},MS=(s,e)=>s===e||s.segments&&e.segments&&s.segments.length===e.segments.length&&s.endList===e.endList&&s.mediaSequence===e.mediaSequence&&s.preloadSegment===e.preloadSegment,Sy=(s,e,i=MS)=>{const r=pt(s,{}),o=r.playlists[e.id];if(!o||i(o,e))return null;e.segments=RS(e);const u=pt(o,e);if(u.preloadSegment&&!e.preloadSegment&&delete u.preloadSegment,o.segments){if(e.skip){e.segments=e.segments||[];for(let c=0;c<e.skip.skippedSegments;c++)e.segments.unshift({skipped:!0})}u.segments=AR(o.segments,e.segments,e.mediaSequence-o.mediaSequence)}u.segments.forEach(c=>{OS(c,u.resolvedUri)});for(let c=0;c<r.playlists.length;c++)r.playlists[c].id===e.id&&(r.playlists[c]=u);return r.playlists[e.id]=u,r.playlists[e.uri]=u,vu(s,(c,p,g,b)=>{if(c.playlists)for(let S=0;S<c.playlists.length;S++)e.id===c.playlists[S].id&&(c.playlists[S]=u)}),r},xy=(s,e)=>{const i=s.segments||[],r=i[i.length-1],o=r&&r.parts&&r.parts[r.parts.length-1],u=o&&o.duration||r&&r.duration;return e&&u?u*1e3:(s.partTargetDuration||s.targetDuration||10)*500},LS=(s,e,i)=>{if(!s)return;const r=[];return s.forEach(o=>{if(!o.attributes)return;const{BANDWIDTH:u,RESOLUTION:c,CODECS:p}=o.attributes;r.push({id:o.id,bandwidth:u,resolution:c,codecs:p})}),{type:e,isLive:i,renditions:r}};class bu extends xR{constructor(e,i,r={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=$n("PlaylistLoader");const{withCredentials:o=!1}=r;this.src=e,this.vhs_=i,this.withCredentials=o,this.addDateRangesToTextTrack_=r.addDateRangesToTextTrack;const u=i.options_;this.customTagParsers=u&&u.customTagParsers||[],this.customTagMappers=u&&u.customTagMappers||[],this.llhls=u&&u.llhls,this.dateRangesStorage_=new CS,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let i=ln(this.main.uri,e.uri);this.llhls&&(i=ER(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(r,o)=>{if(this.request){if(r)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,i,r){const{uri:o,id:u}=i;this.request=null,r&&(this.state=r),this.error={playlist:this.main.playlists[u],status:e.status,message:`HLS playlist request error at URL: ${o}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:No({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const r=yR({onwarn:({message:o})=>this.logger_(`m3u8-parser warn for ${e}: ${o}`),oninfo:({message:o})=>this.logger_(`m3u8-parser info for ${e}: ${o}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!r.playlists||!r.playlists.length||this.excludeAudioOnlyVariants(r.playlists),r}catch(r){this.error=r,this.error.metadata={errorType:q.Error.StreamingHlsPlaylistParserError,error:r}}}excludeAudioOnlyVariants(e){const i=r=>{const o=r.attributes||{},{width:u,height:c}=o.RESOLUTION||{};if(u&&c)return!0;const p=wS(r)||[];return!!Rd(p).video};e.some(i)&&e.forEach(r=>{i(r)||(r.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:r,id:o}){this.request=null,this.state="HAVE_METADATA";const u={playlistInfo:{type:"media",uri:r}};this.trigger({type:"playlistparsestart",metadata:u});const c=i||this.parseManifest_({url:r,manifestString:e});c.lastRequest=Date.now(),xS({playlist:c,uri:r,id:o});const p=Sy(this.main,c);this.targetDuration=c.partTargetDuration||c.targetDuration,this.pendingMedia_=null,p?(this.main=p,this.media_=this.main.playlists[o]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(xy(this.media(),!!p)),u.parsedPlaylist=LS(this.main.playlists,u.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:u}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),U.clearTimeout(this.mediaUpdateTimeout),U.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new CS,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(U.clearTimeout(this.finalRenditionTimeout),i){const p=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=U.setTimeout(this.media.bind(this,e,!1),p);return}const r=this.state,o=!this.media_||e.id!==this.media_.id,u=this.main.playlists[e.id];if(u&&u.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,o&&(this.trigger("mediachanging"),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(xy(e,!0)),!o)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const c={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:c}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(p,g)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Rp(e.resolvedUri,g),p)return this.playlistRequestError(this.request,e,r);this.trigger({type:"playlistrequestcomplete",metadata:c}),this.haveMetadata({playlistString:g.responseText,url:e.uri,id:e.id}),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=U.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},r);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=U.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=U.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,r)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:r.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:r.responseText,code:2,metadata:No({requestType:r.requestType,request:r,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Rp(this.src,r),this.trigger({type:"playlistparsestart",metadata:e});const o=this.parseManifest_({manifestString:r.responseText,url:this.src});e.parsedPlaylist=LS(o.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(o)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,ES(this.main,this.srcUri()),e.playlists.forEach(r=>{r.segments=RS(r),r.segments.forEach(o=>{OS(o,r.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||U.location.href;this.main=_R(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const r=this.main,o=e.ID;let u=r.playlists.length;for(;u--;){const c=r.playlists[u];if(c.attributes["PATHWAY-ID"]===o){const p=c.resolvedUri,g=c.id;if(i){const b=this.createCloneURI_(c.resolvedUri,e),S=yu(o,b),E=this.createCloneAttributes_(o,c.attributes),A=this.createClonePlaylist_(c,S,e,E);r.playlists[u]=A,r.playlists[S]=A,r.playlists[b]=A}else r.playlists.splice(u,1);delete r.playlists[g],delete r.playlists[p]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const r=this.main,o=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!r.mediaGroups[u]||!r.mediaGroups[u][o])){for(const c in r.mediaGroups[u])if(c===o){for(const p in r.mediaGroups[u][c])r.mediaGroups[u][c][p].playlists.forEach((b,S)=>{const E=r.playlists[b.id],A=E.id,R=E.resolvedUri;delete r.playlists[A],delete r.playlists[R]});delete r.mediaGroups[u][c]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const r=this.main,o=r.playlists.length,u=this.createCloneURI_(i.resolvedUri,e),c=yu(e.ID,u),p=this.createCloneAttributes_(e.ID,i.attributes),g=this.createClonePlaylist_(i,c,e,p);r.playlists[o]=g,r.playlists[c]=g,r.playlists[u]=g,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,r=e["BASE-ID"],o=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!o.mediaGroups[u]||o.mediaGroups[u][i]))for(const c in o.mediaGroups[u]){if(c===r)o.mediaGroups[u][i]={};else continue;for(const p in o.mediaGroups[u][c]){const g=o.mediaGroups[u][c][p];o.mediaGroups[u][i][p]=Ft({},g);const b=o.mediaGroups[u][i][p],S=this.createCloneURI_(g.resolvedUri,e);b.resolvedUri=S,b.uri=S,b.playlists=[],g.playlists.forEach((E,A)=>{const R=o.playlists[E.id],P=SS(u,i,p),w=yu(i,P);if(R&&!o.playlists[w]){const z=this.createClonePlaylist_(R,w,e),H=z.resolvedUri;o.playlists[w]=z,o.playlists[H]=z}b.playlists[A]=this.createClonePlaylist_(E,w,e)})}}})}createClonePlaylist_(e,i,r,o){const u=this.createCloneURI_(e.resolvedUri,r),c={resolvedUri:u,uri:u,id:i};return e.segments&&(c.segments=[]),o&&(c.attributes=o),pt(e,c)}createCloneURI_(e,i){const r=new URL(e);r.hostname=i["URI-REPLACEMENT"].HOST;const o=i["URI-REPLACEMENT"].PARAMS;for(const u of Object.keys(o))r.searchParams.set(u,o[u]);return r.href}createCloneAttributes_(e,i){const r={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{i[o]&&(r[o]=e)}),r}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const r in e.contentProtection){const o=e.contentProtection[r].attributes.keyId;o&&i.add(o.toLowerCase())}return i}}}const Ey=function(s,e,i,r){const o=s.responseType==="arraybuffer"?s.response:s.responseText;!e&&o&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=o.byteLength||o.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),i.headers&&(s.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(s.timedout=!0),!e&&!s.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(s&&(o||s.responseText)))),r(e,s)},wR=(s,e)=>{if(!s||!s.size)return;let i=e;return s.forEach(r=>{i=r(i)}),i},DR=(s,e,i,r)=>{!s||!s.size||s.forEach(o=>{o(e,i,r)})},IS=function(){const s=function e(i,r){i=pt({timeout:45e3},i);const o=e.beforeRequest||q.Vhs.xhr.beforeRequest,u=e._requestCallbackSet||q.Vhs.xhr._requestCallbackSet||new Set,c=e._responseCallbackSet||q.Vhs.xhr._responseCallbackSet;o&&typeof o=="function"&&(q.log.warn("beforeRequest is deprecated, use onRequest instead."),u.add(o));const p=q.Vhs.xhr.original===!0?q.xhr:q.Vhs.xhr,g=wR(u,i);u.delete(o);const b=p(g||i,function(E,A){return DR(c,b,E,A),Ey(b,E,A,r)}),S=b.abort;return b.abort=function(){return b.aborted=!0,S.apply(b,arguments)},b.uri=i.uri,b.requestType=i.requestType,b.requestTime=Date.now(),b};return s.original=!0,s},kR=function(s){let e;const i=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=U.BigInt(s.offset)+U.BigInt(s.length)-U.BigInt(1):e=s.offset+s.length-1,"bytes="+i+"-"+e},Cy=function(s){const e={};return s.byterange&&(e.Range=kR(s.byterange)),e},OR=function(s,e){return s.start(e)+"-"+s.end(e)},RR=function(s,e){const i=s.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},MR=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},NS=function(s){const e={};return Object.keys(s).forEach(i=>{const r=s[i];rT(r)?e[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[i]=r}),e},Ip=function(s){const e=s.byterange||{length:1/0,offset:0};return[e.length,e.offset,s.resolvedUri].join(",")},PS=function(s){return s.resolvedUri},US=s=>{const e=Array.prototype.slice.call(s),i=16;let r="",o,u;for(let c=0;c<e.length/i;c++)o=e.slice(c*i,c*i+i).map(RR).join(""),u=e.slice(c*i,c*i+i).map(MR).join(""),r+=o+" "+u+`
|
||
`;return r};var LR=Object.freeze({__proto__:null,createTransferableMessage:NS,initSegmentId:Ip,segmentKeyId:PS,hexDump:US,tagDump:({bytes:s})=>US(s),textRanges:s=>{let e="",i;for(i=0;i<s.length;i++)e+=OR(s,i)+" ";return e}});const BS=.25,IR=(s,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,o=e.videoTimingInfo.transmuxedPresentationStart+i,u=s-o;return new Date(e.dateTimeObject.getTime()+u*1e3)},NR=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,PR=(s,e)=>{let i;try{i=new Date(s)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let r=e.segments[0];if(i<new Date(r.dateTimeObject))return null;for(let g=0;g<e.segments.length-1;g++){r=e.segments[g];const b=new Date(e.segments[g+1].dateTimeObject);if(i<b)break}const o=e.segments[e.segments.length-1],u=o.dateTimeObject,c=o.videoTimingInfo?NR(o.videoTimingInfo):o.duration+o.duration*BS,p=new Date(u.getTime()+c*1e3);return i>p?null:(i>new Date(u)&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:un.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},UR=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,r;for(let u=0;u<e.segments.length&&(r=e.segments[u],i=r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:i+r.duration,!(s<=i));u++);const o=e.segments[e.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<s)return null;if(s>i){if(s>i+o.duration*BS)return null;r=o}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:i-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}},BR=(s,e)=>{let i,r;try{i=new Date(s),r=new Date(e)}catch{}const o=i.getTime();return(r.getTime()-o)/1e3},FR=s=>{if(!s.segments||s.segments.length===0)return!1;for(let e=0;e<s.segments.length;e++)if(!s.segments[e].dateTimeObject)return!1;return!0},HR=({playlist:s,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!s||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const r=UR(e,s);if(!r)return i({message:"valid programTime was not found"});if(r.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const o={mediaSeconds:e},u=IR(e,r.segment);return u&&(o.programDateTime=u.toISOString()),i(null,o)},FS=({programTime:s,playlist:e,retryCount:i=2,seekTo:r,pauseAfterSeek:o=!0,tech:u,callback:c})=>{if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof s>"u"||!e||!r)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!FR(e))return c({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const p=PR(s,e);if(!p)return c({message:`${s} was not found in the stream`});const g=p.segment,b=BR(g.dateTimeObject,s);if(p.type==="estimate"){if(i===0)return c({message:`${s} is not buffered yet. Try again`});r(p.estimatedStart+b),u.one("seeked",()=>{FS({programTime:s,playlist:e,retryCount:i-1,seekTo:r,pauseAfterSeek:o,tech:u,callback:c})});return}const S=g.start+b,E=()=>c(null,u.currentTime());u.one("seeked",E),o&&u.pause(),r(S)},Ay=(s,e)=>{if(s.readyState===4)return e()},zR=(s,e,i,r)=>{let o=[],u,c=!1;const p=function(E,A,R,P){return A.abort(),c=!0,i(E,A,R,P)},g=function(E,A){if(c)return;if(E)return E.metadata=No({requestType:r,request:A,error:E}),p(E,A,"",o);const R=A.responseText.substring(o&&o.byteLength||0,A.responseText.length);if(o=Qk(o,aT(R,!0)),u=u||md(o),o.length<10||u&&o.length<u+2)return Ay(A,()=>p(E,A,"",o));const P=m0(o);return P==="ts"&&o.length<188?Ay(A,()=>p(E,A,"",o)):!P&&o.length<376?Ay(A,()=>p(E,A,"",o)):p(null,A,P,o)},S=e({uri:s,beforeSend(E){E.overrideMimeType("text/plain; charset=x-user-defined"),E.addEventListener("progress",function({total:A,loaded:R}){return Ey(E,null,{statusCode:E.status},g)})}},function(E,A){return Ey(S,E,A,g)});return S},{EventTarget:jR}=q,HS=function(s,e){if(!MS(s,e)||s.sidx&&e.sidx&&(s.sidx.offset!==e.sidx.offset||s.sidx.length!==e.sidx.length))return!1;if(!s.sidx&&e.sidx||s.sidx&&!e.sidx||s.segments&&!e.segments||!s.segments&&e.segments)return!1;if(!s.segments&&!e.segments)return!0;for(let i=0;i<s.segments.length;i++){const r=s.segments[i],o=e.segments[i];if(r.uri!==o.uri)return!1;if(!r.byterange&&!o.byterange)continue;const u=r.byterange,c=o.byterange;if(u&&!c||!u&&c||u.offset!==c.offset||u.length!==c.length)return!1}return!0},VR=(s,e,i,r)=>{const o=r.attributes.NAME||i;return`placeholder-uri-${s}-${e}-${o}`},qR=({mainXml:s,srcUrl:e,clientOffset:i,sidxMapping:r,previousManifest:o})=>{const u=yO(s,{manifestUri:e,clientOffset:i,sidxMapping:r,previousManifest:o});return ES(u,e,VR),u},$R=(s,e)=>{vu(s,(i,r,o,u)=>{(!e.mediaGroups[r][o]||!(u in e.mediaGroups[r][o]))&&delete s.mediaGroups[r][o][u]})},GR=(s,e,i)=>{let r=!0,o=pt(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let u=0;u<e.playlists.length;u++){const c=e.playlists[u];if(c.sidx){const g=$f(c.sidx);i&&i[g]&&i[g].sidx&&u0(c,i[g].sidx,c.sidx.resolvedUri)}const p=Sy(o,c,HS);p&&(o=p,r=!1)}return vu(e,(u,c,p,g)=>{if(u.playlists&&u.playlists.length){const b=u.playlists[0].id,S=Sy(o,u.playlists[0],HS);S&&(o=S,g in o.mediaGroups[c][p]||(o.mediaGroups[c][p][g]=u),o.mediaGroups[c][p][g].playlists[0]=o.playlists[b],r=!1)}}),$R(o,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(r=!1),r?null:o},XR=(s,e)=>(!s.map&&!e.map||!!(s.map&&e.map&&s.map.byterange.offset===e.map.byterange.offset&&s.map.byterange.length===e.map.byterange.length))&&s.uri===e.uri&&s.byterange.offset===e.byterange.offset&&s.byterange.length===e.byterange.length,zS=(s,e)=>{const i={};for(const r in s){const u=s[r].sidx;if(u){const c=$f(u);if(!e[c])break;const p=e[c].sidxInfo;XR(p,u)&&(i[c]=e[c])}}return i},YR=(s,e)=>{let r=zS(s.playlists,e);return vu(s,(o,u,c,p)=>{if(o.playlists&&o.playlists.length){const g=o.playlists;r=pt(r,zS(g,e))}}),r};class wy extends jR{constructor(e,i,r={},o){super(),this.isPaused_=!0,this.mainPlaylistLoader_=o||this,o||(this.isMain_=!0);const{withCredentials:u=!1}=r;if(this.vhs_=i,this.withCredentials=u,this.addMetadataToTextTrack=r.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=$n("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,r){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},r&&(this.state=r),this.trigger("error"),!0}addSidxSegments_(e,i,r){const o=e.sidx&&$f(e.sidx);if(!e.sidx||!o||this.mainPlaylistLoader_.sidxMapping_[o]){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=U.setTimeout(()=>r(!1),0);return}const u=Rp(e.sidx.resolvedUri),c=(g,b)=>{if(this.requestErrored_(g,b,i))return;const S=this.mainPlaylistLoader_.sidxMapping_,{requestType:E}=b;let A;try{A=xO(Ne(b.response).subarray(8))}catch(R){R.metadata=No({requestType:E,request:b,parseFailure:!0}),this.requestErrored_(R,b,i);return}return S[o]={sidxInfo:e.sidx,sidx:A},u0(e,A,e.sidx.resolvedUri),r(!0)},p="dash-sidx";this.request=zR(u,this.vhs_.xhr,(g,b,S,E)=>{if(g)return c(g,b);if(!S||S!=="mp4"){const P=S||"unknown";return c({status:b.status,message:`Unsupported ${P} container type for sidx segment at URL: ${u}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},b)}const{offset:A,length:R}=e.sidx.byterange;if(E.length>=R+A)return c(g,{response:E.subarray(A,A+R),status:b.status,uri:b.uri});this.request=this.vhs_.xhr({uri:u,responseType:"arraybuffer",requestType:"dash-sidx",headers:Cy({byterange:e.sidx.byterange})},c)},p)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},U.clearTimeout(this.minimumUpdatePeriodTimeout_),U.clearTimeout(this.mediaRequest_),U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,o=>{this.haveMetadata({startingState:i,playlist:e})}))}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,U.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(U.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=U.setTimeout(()=>this.load(),r);return}if(!this.started){this.start();return}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=U.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(r,o)=>{if(r){const{requestType:c}=o;r.metadata=No({requestType:c,request:o,error:r})}if(this.requestErrored_(r,o)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const u=o.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=o.responseText,o.responseHeaders&&o.responseHeaders.date?this.mainLoaded_=Date.parse(o.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Rp(this.mainPlaylistLoader_.srcUrl,o),u){this.handleMain_(),this.syncClientServerClock_(()=>e(o,u));return}return e(o,u)})}syncClientServerClock_(e){const i=vO(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:ln(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(r,o)=>{if(!this.request)return;if(r){const{requestType:c}=o;return this.error.metadata=No({requestType:c,request:o,error:r}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let u;i.method==="HEAD"?!o.responseHeaders||!o.responseHeaders.date?u=this.mainLoaded_:u=Date.parse(o.responseHeaders.date):u=Date.parse(o.responseText),this.mainPlaylistLoader_.clientOffset_=u-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let r;try{r=qR({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(u){this.error=u,this.error.metadata={errorType:q.Error.StreamingDashManifestParserError,error:u},this.trigger("error")}e&&(r=GR(e,r,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=r||e;const o=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(o&&o!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=o),(!e||r&&r.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(r),r){const{duration:u,endList:c}=r,p=[];r.playlists.forEach(b=>{p.push({id:b.id,bandwidth:b.attributes.BANDWIDTH,resolution:b.attributes.RESOLUTION,codecs:b.attributes.CODECS})});const g={duration:u,isLive:!c,renditions:p};i.parsedManifest=g,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!r}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(U.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return}this.createMUPTimeout_(i)}createMUPTimeout_(e){const i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=U.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=YR(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,r=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const i=this.mainPlaylistLoader_.main.playlists,r=!this.media_||this.media_!==i[e];if(r?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const o=()=>{this.media().endList||(this.mediaUpdateTimeout=U.setTimeout(()=>{this.trigger("mediaupdatetimeout"),o()},xy(this.media(),!!r)))};o()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(r=>({cueTime:r.start,frames:[{data:r.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const r in e.contentProtection){const o=e.contentProtection[r].attributes["cenc:default_KID"];o&&i.add(o.replace(/-/g,"").toLowerCase())}return i}}}var fi={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const WR=s=>{const e=new Uint8Array(new ArrayBuffer(s.length));for(let i=0;i<s.length;i++)e[i]=s.charCodeAt(i);return e.buffer},jS=function(s){return s.on=s.addEventListener,s.off=s.removeEventListener,s},QR=function(s){try{return URL.createObjectURL(new Blob([s],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(s),URL.createObjectURL(i.getBlob())}},VS=function(s){return function(){const e=QR(s),i=jS(new Worker(e));i.objURL=e;const r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),r.call(this)},i}},qS=function(s){return`var browserWorkerPolyFill = ${jS.toString()};
|
||
browserWorkerPolyFill(self);
|
||
`+s},$S=function(s){return s.toString().replace(/^function.+?{/,"").slice(0,-1)},KR=qS($S(function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var h={};this.on=function(m,y){h[m]||(h[m]=[]),h[m]=h[m].concat(y)},this.off=function(m,y){var v;return h[m]?(v=h[m].indexOf(y),h[m]=h[m].slice(),h[m].splice(v,1),v>-1):!1},this.trigger=function(m){var y,v,_,x;if(y=h[m],!!y)if(arguments.length===2)for(_=y.length,v=0;v<_;++v)y[v].call(this,arguments[1]);else{for(x=[],v=arguments.length,v=1;v<arguments.length;++v)x.push(arguments[v]);for(_=y.length,v=0;v<_;++v)y[v].apply(this,x)}},this.dispose=function(){h={}}}};e.prototype.pipe=function(h){return this.on("data",function(m){h.push(m)}),this.on("done",function(m){h.flush(m)}),this.on("partialdone",function(m){h.partialFlush(m)}),this.on("endedtimeline",function(m){h.endTimeline(m)}),this.on("reset",function(m){h.reset(m)}),h},e.prototype.push=function(h){this.trigger("data",h)},e.prototype.flush=function(h){this.trigger("done",h)},e.prototype.partialFlush=function(h){this.trigger("partialdone",h)},e.prototype.endTimeline=function(h){this.trigger("endedtimeline",h)},e.prototype.reset=function(h){this.trigger("reset",h)};var i=e,r=Math.pow(2,32),o=function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y;return m.getBigUint64?(y=m.getBigUint64(0),y<Number.MAX_SAFE_INTEGER?Number(y):y):m.getUint32(0)*r+m.getUint32(4)},u={getUint64:o,MAX_UINT32:r},c=u.MAX_UINT32,p,g,b,S,E,A,R,P,w,z,H,X,$,W,Z,le,J,Y,ee,ve,de,ge,pe,Oe,nt,he,Ee,Me,Ye,oe,Le,Ae,at,xt,Ut,st;(function(){var h;if(pe={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(h in pe)pe.hasOwnProperty(h)&&(pe[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);Oe=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),he=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),nt=new Uint8Array([0,0,0,1]),Ee=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]),Me=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]),Ye={video:Ee,audio:Me},Ae=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Le=new Uint8Array([0,0,0,0,0,0,0,0]),at=new Uint8Array([0,0,0,0,0,0,0,0]),xt=at,Ut=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),st=at,oe=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),p=function(h){var m=[],y=0,v,_,x;for(v=1;v<arguments.length;v++)m.push(arguments[v]);for(v=m.length;v--;)y+=m[v].byteLength;for(_=new Uint8Array(y+8),x=new DataView(_.buffer,_.byteOffset,_.byteLength),x.setUint32(0,_.byteLength),_.set(h,4),v=0,y=8;v<m.length;v++)_.set(m[v],y),y+=m[v].byteLength;return _},g=function(){return p(pe.dinf,p(pe.dref,Ae))},b=function(h){return p(pe.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,h.audioobjecttype<<3|h.samplingfrequencyindex>>>1,h.samplingfrequencyindex<<7|h.channelcount<<3,6,1,2]))},S=function(){return p(pe.ftyp,Oe,nt,Oe,he)},le=function(h){return p(pe.hdlr,Ye[h])},E=function(h){return p(pe.mdat,h)},Z=function(h){var m=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,h.duration>>>24&255,h.duration>>>16&255,h.duration>>>8&255,h.duration&255,85,196,0,0]);return h.samplerate&&(m[12]=h.samplerate>>>24&255,m[13]=h.samplerate>>>16&255,m[14]=h.samplerate>>>8&255,m[15]=h.samplerate&255),p(pe.mdhd,m)},W=function(h){return p(pe.mdia,Z(h),le(h.type),R(h))},A=function(h){return p(pe.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},R=function(h){return p(pe.minf,h.type==="video"?p(pe.vmhd,oe):p(pe.smhd,Le),g(),Y(h))},P=function(h,m){for(var y=[],v=m.length;v--;)y[v]=ve(m[v]);return p.apply(null,[pe.moof,A(h)].concat(y))},w=function(h){for(var m=h.length,y=[];m--;)y[m]=X(h[m]);return p.apply(null,[pe.moov,H(4294967295)].concat(y).concat(z(h)))},z=function(h){for(var m=h.length,y=[];m--;)y[m]=de(h[m]);return p.apply(null,[pe.mvex].concat(y))},H=function(h){var m=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return p(pe.mvhd,m)},J=function(h){var m=h.samples||[],y=new Uint8Array(4+m.length),v,_;for(_=0;_<m.length;_++)v=m[_].flags,y[_+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return p(pe.sdtp,y)},Y=function(h){return p(pe.stbl,ee(h),p(pe.stts,st),p(pe.stsc,xt),p(pe.stsz,Ut),p(pe.stco,at))},function(){var h,m;ee=function(y){return p(pe.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),y.type==="video"?h(y):m(y))},h=function(y){var v=y.sps||[],_=y.pps||[],x=[],k=[],M,I;for(M=0;M<v.length;M++)x.push((v[M].byteLength&65280)>>>8),x.push(v[M].byteLength&255),x=x.concat(Array.prototype.slice.call(v[M]));for(M=0;M<_.length;M++)k.push((_[M].byteLength&65280)>>>8),k.push(_[M].byteLength&255),k=k.concat(Array.prototype.slice.call(_[M]));if(I=[pe.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(y.width&65280)>>8,y.width&255,(y.height&65280)>>8,y.height&255,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]),p(pe.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([v.length],x,[_.length],k))),p(pe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var N=y.sarRatio[0],j=y.sarRatio[1];I.push(p(pe.pasp,new Uint8Array([(N&4278190080)>>24,(N&16711680)>>16,(N&65280)>>8,N&255,(j&4278190080)>>24,(j&16711680)>>16,(j&65280)>>8,j&255])))}return p.apply(null,I)},m=function(y){return p(pe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(y.channelcount&65280)>>8,y.channelcount&255,(y.samplesize&65280)>>8,y.samplesize&255,0,0,0,0,(y.samplerate&65280)>>8,y.samplerate&255,0,0]),b(y))}}(),$=function(h){var m=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,0,(h.duration&4278190080)>>24,(h.duration&16711680)>>16,(h.duration&65280)>>8,h.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(h.width&65280)>>8,h.width&255,0,0,(h.height&65280)>>8,h.height&255,0,0]);return p(pe.tkhd,m)},ve=function(h){var m,y,v,_,x,k,M;return m=p(pe.tfhd,new Uint8Array([0,0,0,58,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(h.baseMediaDecodeTime/c),M=Math.floor(h.baseMediaDecodeTime%c),y=p(pe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,k&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255])),x=32+20+8+16+8+8,h.type==="audio"?(v=ge(h,x),p(pe.traf,m,y,v)):(_=J(h),v=ge(h,_.length+x),p(pe.traf,m,y,v,_))},X=function(h){return h.duration=h.duration||4294967295,p(pe.trak,$(h),W(h))},de=function(h){var m=new Uint8Array([0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.type!=="video"&&(m[m.length-1]=0),p(pe.trex,m)},function(){var h,m,y;y=function(v,_){var x=0,k=0,M=0,I=0;return v.length&&(v[0].duration!==void 0&&(x=1),v[0].size!==void 0&&(k=2),v[0].flags!==void 0&&(M=4),v[0].compositionTimeOffset!==void 0&&(I=8)),[0,0,x|k|M|I,1,(v.length&4278190080)>>>24,(v.length&16711680)>>>16,(v.length&65280)>>>8,v.length&255,(_&4278190080)>>>24,(_&16711680)>>>16,(_&65280)>>>8,_&255]},m=function(v,_){var x,k,M,I,N,j;for(I=v.samples||[],_+=8+12+16*I.length,M=y(I,_),k=new Uint8Array(M.length+I.length*16),k.set(M),x=M.length,j=0;j<I.length;j++)N=I[j],k[x++]=(N.duration&4278190080)>>>24,k[x++]=(N.duration&16711680)>>>16,k[x++]=(N.duration&65280)>>>8,k[x++]=N.duration&255,k[x++]=(N.size&4278190080)>>>24,k[x++]=(N.size&16711680)>>>16,k[x++]=(N.size&65280)>>>8,k[x++]=N.size&255,k[x++]=N.flags.isLeading<<2|N.flags.dependsOn,k[x++]=N.flags.isDependedOn<<6|N.flags.hasRedundancy<<4|N.flags.paddingValue<<1|N.flags.isNonSyncSample,k[x++]=N.flags.degradationPriority&61440,k[x++]=N.flags.degradationPriority&15,k[x++]=(N.compositionTimeOffset&4278190080)>>>24,k[x++]=(N.compositionTimeOffset&16711680)>>>16,k[x++]=(N.compositionTimeOffset&65280)>>>8,k[x++]=N.compositionTimeOffset&255;return p(pe.trun,k)},h=function(v,_){var x,k,M,I,N,j;for(I=v.samples||[],_+=8+12+8*I.length,M=y(I,_),x=new Uint8Array(M.length+I.length*8),x.set(M),k=M.length,j=0;j<I.length;j++)N=I[j],x[k++]=(N.duration&4278190080)>>>24,x[k++]=(N.duration&16711680)>>>16,x[k++]=(N.duration&65280)>>>8,x[k++]=N.duration&255,x[k++]=(N.size&4278190080)>>>24,x[k++]=(N.size&16711680)>>>16,x[k++]=(N.size&65280)>>>8,x[k++]=N.size&255;return p(pe.trun,x)},ge=function(v,_){return v.type==="audio"?h(v,_):m(v,_)}}();var Lr={ftyp:S,mdat:E,moof:P,moov:w,initSegment:function(h){var m=S(),y=w(h),v;return v=new Uint8Array(m.byteLength+y.byteLength),v.set(m),v.set(y,m.byteLength),v}},Rt=function(h){var m,y,v=[],_=[];for(_.byteLength=0,_.nalCount=0,_.duration=0,v.byteLength=0,m=0;m<h.length;m++)y=h[m],y.nalUnitType==="access_unit_delimiter_rbsp"?(v.length&&(v.duration=y.dts-v.dts,_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v)),v=[y],v.byteLength=y.data.byteLength,v.pts=y.pts,v.dts=y.dts):(y.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(v.keyFrame=!0),v.duration=y.dts-v.dts,v.byteLength+=y.data.byteLength,v.push(y));return _.length&&(!v.duration||v.duration<=0)&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v),_},si=function(h){var m,y,v=[],_=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=h[0].pts,v.dts=h[0].dts,_.byteLength=0,_.nalCount=0,_.duration=0,_.pts=h[0].pts,_.dts=h[0].dts,m=0;m<h.length;m++)y=h[m],y.keyFrame?(v.length&&(_.push(v),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration),v=[y],v.nalCount=y.length,v.byteLength=y.byteLength,v.pts=y.pts,v.dts=y.dts,v.duration=y.duration):(v.duration+=y.duration,v.nalCount+=y.length,v.byteLength+=y.byteLength,v.push(y));return _.length&&v.duration<=0&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration,_.push(v),_},cn=function(h){var m;return!h[0][0].keyFrame&&h.length>1&&(m=h.shift(),h.byteLength-=m.byteLength,h.nalCount-=m.nalCount,h[0][0].dts=m.dts,h[0][0].pts=m.pts,h[0][0].duration+=m.duration),h},Ir=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ra=function(h,m){var y=Ir();return y.dataOffset=m,y.compositionTimeOffset=h.pts-h.dts,y.duration=h.duration,y.size=4*h.length,y.size+=h.byteLength,h.keyFrame&&(y.flags.dependsOn=2,y.flags.isNonSyncSample=0),y},Vs=function(h,m){var y,v,_,x,k,M=m||0,I=[];for(y=0;y<h.length;y++)for(x=h[y],v=0;v<x.length;v++)k=x[v],_=Ra(k,M),M+=_.size,I.push(_);return I},Cu=function(h){var m,y,v,_,x,k,M=0,I=h.byteLength,N=h.nalCount,j=I+4*N,te=new Uint8Array(j),be=new DataView(te.buffer);for(m=0;m<h.length;m++)for(_=h[m],y=0;y<_.length;y++)for(x=_[y],v=0;v<x.length;v++)k=x[v],be.setUint32(M,k.data.byteLength),M+=4,te.set(k.data,M),M+=k.data.byteLength;return te},Uo=function(h,m){var y,v=m||0,_=[];return y=Ra(h,v),_.push(y),_},zt=function(h){var m,y,v=0,_=h.byteLength,x=h.length,k=_+4*x,M=new Uint8Array(k),I=new DataView(M.buffer);for(m=0;m<h.length;m++)y=h[m],I.setUint32(v,y.data.byteLength),v+=4,M.set(y.data,v),v+=y.data.byteLength;return M},ps={groupNalsIntoFrames:Rt,groupFramesIntoGops:si,extendFirstKeyFrame:cn,generateSampleTable:Vs,concatenateNalData:Cu,generateSampleTableForFrame:Uo,concatenateNalDataForFrame:zt},_i=[33,16,5,32,164,27],Bo=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ce=function(h){for(var m=[];h--;)m.push(0);return m},Nr=function(h){return Object.keys(h).reduce(function(m,y){return m[y]=new Uint8Array(h[y].reduce(function(v,_){return v.concat(_)},[])),m},{})},qs,$s=function(){if(!qs){var h={96e3:[_i,[227,64],Ce(154),[56]],88200:[_i,[231],Ce(170),[56]],64e3:[_i,[248,192],Ce(240),[56]],48e3:[_i,[255,192],Ce(268),[55,148,128],Ce(54),[112]],44100:[_i,[255,192],Ce(268),[55,163,128],Ce(84),[112]],32e3:[_i,[255,192],Ce(268),[55,234],Ce(226),[112]],24e3:[_i,[255,192],Ce(268),[55,255,128],Ce(268),[111,112],Ce(126),[224]],16e3:[_i,[255,192],Ce(268),[55,255,128],Ce(268),[111,255],Ce(269),[223,108],Ce(195),[1,192]],12e3:[Bo,Ce(268),[3,127,248],Ce(268),[6,255,240],Ce(268),[13,255,224],Ce(268),[27,253,128],Ce(259),[56]],11025:[Bo,Ce(268),[3,127,248],Ce(268),[6,255,240],Ce(268),[13,255,224],Ce(268),[27,255,192],Ce(268),[55,175,128],Ce(108),[112]],8e3:[Bo,Ce(268),[3,121,16],Ce(47),[7]]};qs=Nr(h)}return qs},Ma=9e4,Pr,La,Gs,Ur,Ia,Br,Na;Pr=function(h){return h*Ma},La=function(h,m){return h*m},Gs=function(h){return h/Ma},Ur=function(h,m){return h/m},Ia=function(h,m){return Pr(Ur(h,m))},Br=function(h,m){return La(Gs(h),m)},Na=function(h,m,y){return Gs(y?h:h-m)};var ot={ONE_SECOND_IN_TS:Ma,secondsToVideoTs:Pr,secondsToAudioTs:La,videoTsToSeconds:Gs,audioTsToSeconds:Ur,audioTsToVideoTs:Ia,videoTsToAudioTs:Br,metadataTsToSeconds:Na},Xs=$s,Ui=ot,wn=function(h){var m,y,v=0;for(m=0;m<h.length;m++)y=h[m],v+=y.data.byteLength;return v},Ys=function(h,m,y,v){var _,x=0,k=0,M=0,I=0,N,j,te;if(m.length&&(_=Ui.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),x=Math.ceil(Ui.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&v&&(k=_-Math.max(y,v),M=Math.floor(k/x),I=M*x),!(M<1||I>Ui.ONE_SECOND_IN_TS/2))){for(N=Xs()[h.samplerate],N||(N=m[0].data),j=0;j<M;j++)te=m[0],m.splice(0,0,{data:N,dts:te.dts-x,pts:te.pts-x});return h.baseMediaDecodeTime-=Math.floor(Ui.videoTsToAudioTs(I,h.samplerate)),I}},D=function(h,m,y){return m.minSegmentDts>=y?h:(m.minSegmentDts=1/0,h.filter(function(v){return v.dts>=y?(m.minSegmentDts=Math.min(m.minSegmentDts,v.dts),m.minSegmentPts=m.minSegmentDts,!0):!1}))},G=function(h){var m,y,v=[];for(m=0;m<h.length;m++)y=h[m],v.push({size:y.data.byteLength,duration:1024});return v},ye=function(h){var m,y,v=0,_=new Uint8Array(wn(h));for(m=0;m<h.length;m++)y=h[m],_.set(y.data,v),v+=y.data.byteLength;return _},Te={prefixWithSilence:Ys,trimAdtsFramesByEarliestDts:D,generateSampleTable:G,concatenateFrameData:ye},Re=ot.ONE_SECOND_IN_TS,Ge=function(h,m){typeof m.pts=="number"&&(h.timelineStartInfo.pts===void 0&&(h.timelineStartInfo.pts=m.pts),h.minSegmentPts===void 0?h.minSegmentPts=m.pts:h.minSegmentPts=Math.min(h.minSegmentPts,m.pts),h.maxSegmentPts===void 0?h.maxSegmentPts=m.pts:h.maxSegmentPts=Math.max(h.maxSegmentPts,m.pts)),typeof m.dts=="number"&&(h.timelineStartInfo.dts===void 0&&(h.timelineStartInfo.dts=m.dts),h.minSegmentDts===void 0?h.minSegmentDts=m.dts:h.minSegmentDts=Math.min(h.minSegmentDts,m.dts),h.maxSegmentDts===void 0?h.maxSegmentDts=m.dts:h.maxSegmentDts=Math.max(h.maxSegmentDts,m.dts))},He=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},it=function(h,m){var y,v,_=h.minSegmentDts;return m||(_-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=_,y=Math.max(0,y),h.type==="audio"&&(v=h.samplerate/Re,y*=v,y=Math.floor(y)),y},ze={clearDtsInfo:He,calculateTrackBaseMediaDecodeTime:it,collectDtsInfo:Ge},Yt=4,ms=128,Nd=function(h){for(var m=0,y={payloadType:-1,payloadSize:0},v=0,_=0;m<h.byteLength&&h[m]!==ms;){for(;h[m]===255;)v+=255,m++;for(v+=h[m++];h[m]===255;)_+=255,m++;if(_+=h[m++],!y.payload&&v===Yt){var x=String.fromCharCode(h[m+3],h[m+4],h[m+5],h[m+6]);if(x==="GA94"){y.payloadType=v,y.payloadSize=_,y.payload=h.subarray(m,m+_);break}else y.payload=void 0}m+=_,v=0,_=0}return y},Pd=function(h){return h.payload[0]!==181||(h.payload[1]<<8|h.payload[2])!==49||String.fromCharCode(h.payload[3],h.payload[4],h.payload[5],h.payload[6])!=="GA94"||h.payload[7]!==3?null:h.payload.subarray(8,h.payload.length-1)},dn=function(h,m){var y=[],v,_,x,k;if(!(m[0]&64))return y;for(_=m[0]&31,v=0;v<_;v++)x=v*3,k={type:m[x+2]&3,pts:h},m[x+2]&4&&(k.ccData=m[x+3]<<8|m[x+4],y.push(k));return y},Ud=function(h){for(var m=h.byteLength,y=[],v=1,_,x;v<m-2;)h[v]===0&&h[v+1]===0&&h[v+2]===3?(y.push(v+2),v+=2):v++;if(y.length===0)return h;_=m-y.length,x=new Uint8Array(_);var k=0;for(v=0;v<_;k++,v++)k===y[0]&&(k++,y.shift()),x[v]=h[k];return x},Bd={parseSei:Nd,parseUserData:Pd,parseCaptionPackets:dn,discardEmulationPreventionBytes:Ud,USER_DATA_REGISTERED_ITU_T_T35:Yt},Fd=i,Fo=Bd,Ti=function(h){h=h||{},Ti.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Et(0,0),new Et(0,1),new Et(1,0),new Et(1,1)],this.parse708captions_&&(this.cc708Stream_=new mt({captionServices:h.captionServices})),this.reset(),this.ccStreams_.forEach(function(m){m.on("data",this.trigger.bind(this,"data")),m.on("partialdone",this.trigger.bind(this,"partialdone")),m.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ti.prototype=new Fd,Ti.prototype.push=function(h){var m,y,v;if(h.nalUnitType==="sei_rbsp"&&(m=Fo.parseSei(h.escapedRBSP),!!m.payload&&m.payloadType===Fo.USER_DATA_REGISTERED_ITU_T_T35&&(y=Fo.parseUserData(m),!!y))){if(h.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(h.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}v=Fo.parseCaptionPackets(h.pts,y),this.captionPackets_=this.captionPackets_.concat(v),this.latestDts_!==h.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=h.dts}},Ti.prototype.flushCCStreams=function(h){this.ccStreams_.forEach(function(m){return h==="flush"?m.flush():m.partialFlush()},this)},Ti.prototype.flushStream=function(h){if(!this.captionPackets_.length){this.flushCCStreams(h);return}this.captionPackets_.forEach(function(m,y){m.presortIndex=y}),this.captionPackets_.sort(function(m,y){return m.pts===y.pts?m.presortIndex-y.presortIndex:m.pts-y.pts}),this.captionPackets_.forEach(function(m){m.type<2?this.dispatchCea608Packet(m):this.dispatchCea708Packet(m)},this),this.captionPackets_.length=0,this.flushCCStreams(h)},Ti.prototype.flush=function(){return this.flushStream("flush")},Ti.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ti.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(h){h.reset()})},Ti.prototype.dispatchCea608Packet=function(h){this.setsTextOrXDSActive(h)?this.activeCea608Channel_[h.type]=null:this.setsChannel1Active(h)?this.activeCea608Channel_[h.type]=0:this.setsChannel2Active(h)&&(this.activeCea608Channel_[h.type]=1),this.activeCea608Channel_[h.type]!==null&&this.ccStreams_[(h.type<<1)+this.activeCea608Channel_[h.type]].push(h)},Ti.prototype.setsChannel1Active=function(h){return(h.ccData&30720)===4096},Ti.prototype.setsChannel2Active=function(h){return(h.ccData&30720)===6144},Ti.prototype.setsTextOrXDSActive=function(h){return(h.ccData&28928)===256||(h.ccData&30974)===4138||(h.ccData&30974)===6186},Ti.prototype.dispatchCea708Packet=function(h){this.parse708captions_&&this.cc708Stream_.push(h)};var Au={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Hy=function(h){var m=Au[h]||h;return h&4096&&h===m?"":String.fromCharCode(m)},ke=function(h){return 32<=h&&h<=127||160<=h&&h<=255},Dn=function(h){this.windowNum=h,this.reset()};Dn.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dn.prototype.getText=function(){return this.rows.join(`
|
||
`)},Dn.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dn.prototype.newLine=function(h){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(h),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dn.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dn.prototype.addText=function(h){this.rows[this.rowIdx]+=h},Dn.prototype.backspace=function(){if(!this.isEmpty()){var h=this.rows[this.rowIdx];this.rows[this.rowIdx]=h.substr(0,h.length-1)}};var Si=function(h,m,y){this.serviceNum=h,this.text="",this.currentWindow=new Dn(-1),this.windows=[],this.stream=y,typeof m=="string"&&this.createTextDecoder(m)};Si.prototype.init=function(h,m){this.startPts=h;for(var y=0;y<8;y++)this.windows[y]=new Dn(y),typeof m=="function"&&(this.windows[y].beforeRowOverflow=m)},Si.prototype.setCurrentWindow=function(h){this.currentWindow=this.windows[h]},Si.prototype.createTextDecoder=function(h){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(h)}catch(m){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+h+" encoding. "+m})}};var mt=function(h){h=h||{},mt.prototype.init.call(this);var m=this,y=h.captionServices||{},v={},_;Object.keys(y).forEach(x=>{_=y[x],/^SERVICE/.test(x)&&(v[x]=_.encoding)}),this.serviceEncodings=v,this.current708Packet=null,this.services={},this.push=function(x){x.type===3?(m.new708Packet(),m.add708Bytes(x)):(m.current708Packet===null&&m.new708Packet(),m.add708Bytes(x))}};mt.prototype=new Fd,mt.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},mt.prototype.add708Bytes=function(h){var m=h.ccData,y=m>>>8,v=m&255;this.current708Packet.ptsVals.push(h.pts),this.current708Packet.data.push(y),this.current708Packet.data.push(v)},mt.prototype.push708Packet=function(){var h=this.current708Packet,m=h.data,y=null,v=null,_=0,x=m[_++];for(h.seq=x>>6,h.sizeCode=x&63;_<m.length;_++)x=m[_++],y=x>>5,v=x&31,y===7&&v>0&&(x=m[_++],y=x),this.pushServiceBlock(y,_,v),v>0&&(_+=v-1)},mt.prototype.pushServiceBlock=function(h,m,y){var v,_=m,x=this.current708Packet.data,k=this.services[h];for(k||(k=this.initService(h,_));_<m+y&&_<x.length;_++)v=x[_],ke(v)?_=this.handleText(_,k):v===24?_=this.multiByteCharacter(_,k):v===16?_=this.extendedCommands(_,k):128<=v&&v<=135?_=this.setCurrentWindow(_,k):152<=v&&v<=159?_=this.defineWindow(_,k):v===136?_=this.clearWindows(_,k):v===140?_=this.deleteWindows(_,k):v===137?_=this.displayWindows(_,k):v===138?_=this.hideWindows(_,k):v===139?_=this.toggleWindows(_,k):v===151?_=this.setWindowAttributes(_,k):v===144?_=this.setPenAttributes(_,k):v===145?_=this.setPenColor(_,k):v===146?_=this.setPenLocation(_,k):v===143?k=this.reset(_,k):v===8?k.currentWindow.backspace():v===12?k.currentWindow.clearText():v===13?k.currentWindow.pendingNewLine=!0:v===14?k.currentWindow.clearText():v===141&&_++},mt.prototype.extendedCommands=function(h,m){var y=this.current708Packet.data,v=y[++h];return ke(v)&&(h=this.handleText(h,m,{isExtended:!0})),h},mt.prototype.getPts=function(h){return this.current708Packet.ptsVals[Math.floor(h/2)]},mt.prototype.initService=function(h,m){var v="SERVICE"+h,y=this,v,_;return v in this.serviceEncodings&&(_=this.serviceEncodings[v]),this.services[h]=new Si(h,_,y),this.services[h].init(this.getPts(m),function(x){y.flushDisplayed(x,y.services[h])}),this.services[h]},mt.prototype.handleText=function(h,m,y){var v=y&&y.isExtended,_=y&&y.isMultiByte,x=this.current708Packet.data,k=v?4096:0,M=x[h],I=x[h+1],N=m.currentWindow,j,te;function be(ue){return ue.map(Ie=>("0"+(Ie&255).toString(16)).slice(-2)).join("")}if(_?(te=[M,I],h++):te=[M],m.textDecoder_&&!v)j=m.textDecoder_.decode(new Uint8Array(te));else if(_){const ue=be(te);j=String.fromCharCode(parseInt(ue,16))}else j=Hy(k|M);return N.pendingNewLine&&!N.isEmpty()&&N.newLine(this.getPts(h)),N.pendingNewLine=!1,N.addText(j),h},mt.prototype.multiByteCharacter=function(h,m){var y=this.current708Packet.data,v=y[h+1],_=y[h+2];return ke(v)&&ke(_)&&(h=this.handleText(++h,m,{isMultiByte:!0})),h},mt.prototype.setCurrentWindow=function(h,m){var y=this.current708Packet.data,v=y[h],_=v&7;return m.setCurrentWindow(_),h},mt.prototype.defineWindow=function(h,m){var y=this.current708Packet.data,v=y[h],_=v&7;m.setCurrentWindow(_);var x=m.currentWindow;return v=y[++h],x.visible=(v&32)>>5,x.rowLock=(v&16)>>4,x.columnLock=(v&8)>>3,x.priority=v&7,v=y[++h],x.relativePositioning=(v&128)>>7,x.anchorVertical=v&127,v=y[++h],x.anchorHorizontal=v,v=y[++h],x.anchorPoint=(v&240)>>4,x.rowCount=v&15,v=y[++h],x.columnCount=v&63,v=y[++h],x.windowStyle=(v&56)>>3,x.penStyle=v&7,x.virtualRowCount=x.rowCount+1,h},mt.prototype.setWindowAttributes=function(h,m){var y=this.current708Packet.data,v=y[h],_=m.currentWindow.winAttr;return v=y[++h],_.fillOpacity=(v&192)>>6,_.fillRed=(v&48)>>4,_.fillGreen=(v&12)>>2,_.fillBlue=v&3,v=y[++h],_.borderType=(v&192)>>6,_.borderRed=(v&48)>>4,_.borderGreen=(v&12)>>2,_.borderBlue=v&3,v=y[++h],_.borderType+=(v&128)>>5,_.wordWrap=(v&64)>>6,_.printDirection=(v&48)>>4,_.scrollDirection=(v&12)>>2,_.justify=v&3,v=y[++h],_.effectSpeed=(v&240)>>4,_.effectDirection=(v&12)>>2,_.displayEffect=v&3,h},mt.prototype.flushDisplayed=function(h,m){for(var y=[],v=0;v<8;v++)m.windows[v].visible&&!m.windows[v].isEmpty()&&y.push(m.windows[v].getText());m.endPts=h,m.text=y.join(`
|
||
|
||
`),this.pushCaption(m),m.startPts=h},mt.prototype.pushCaption=function(h){h.text!==""&&(this.trigger("data",{startPts:h.startPts,endPts:h.endPts,text:h.text,stream:"cc708_"+h.serviceNum}),h.text="",h.startPts=h.endPts)},mt.prototype.displayWindows=function(h,m){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,m);for(var x=0;x<8;x++)v&1<<x&&(m.windows[x].visible=1);return h},mt.prototype.hideWindows=function(h,m){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,m);for(var x=0;x<8;x++)v&1<<x&&(m.windows[x].visible=0);return h},mt.prototype.toggleWindows=function(h,m){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,m);for(var x=0;x<8;x++)v&1<<x&&(m.windows[x].visible^=1);return h},mt.prototype.clearWindows=function(h,m){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,m);for(var x=0;x<8;x++)v&1<<x&&m.windows[x].clearText();return h},mt.prototype.deleteWindows=function(h,m){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,m);for(var x=0;x<8;x++)v&1<<x&&m.windows[x].reset();return h},mt.prototype.setPenAttributes=function(h,m){var y=this.current708Packet.data,v=y[h],_=m.currentWindow.penAttr;return v=y[++h],_.textTag=(v&240)>>4,_.offset=(v&12)>>2,_.penSize=v&3,v=y[++h],_.italics=(v&128)>>7,_.underline=(v&64)>>6,_.edgeType=(v&56)>>3,_.fontStyle=v&7,h},mt.prototype.setPenColor=function(h,m){var y=this.current708Packet.data,v=y[h],_=m.currentWindow.penColor;return v=y[++h],_.fgOpacity=(v&192)>>6,_.fgRed=(v&48)>>4,_.fgGreen=(v&12)>>2,_.fgBlue=v&3,v=y[++h],_.bgOpacity=(v&192)>>6,_.bgRed=(v&48)>>4,_.bgGreen=(v&12)>>2,_.bgBlue=v&3,v=y[++h],_.edgeRed=(v&48)>>4,_.edgeGreen=(v&12)>>2,_.edgeBlue=v&3,h},mt.prototype.setPenLocation=function(h,m){var y=this.current708Packet.data,v=y[h],_=m.currentWindow.penLoc;return m.currentWindow.pendingNewLine=!0,v=y[++h],_.row=v&15,v=y[++h],_.column=v&63,h},mt.prototype.reset=function(h,m){var y=this.getPts(h);return this.flushDisplayed(y,m),this.initService(m.serviceNum,h)};var zy={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Fr=function(h){return h===null?"":(h=zy[h]||h,String.fromCharCode(h))},Ho=14,wu=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],ei=function(){for(var h=[],m=Ho+1;m--;)h.push({text:"",indent:0,offset:0});return h},Et=function(h,m){Et.prototype.init.call(this),this.field_=h||0,this.dataChannel_=m||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(y){var v,_,x,k,M;if(v=y.ccData&32639,v===this.lastControlCode_){this.lastControlCode_=null;return}if((v&61440)===4096?this.lastControlCode_=v:v!==this.PADDING_&&(this.lastControlCode_=null),x=v>>>8,k=v&255,v!==this.PADDING_)if(v===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(v===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(y.pts),this.flushDisplayed(y.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=y.pts;else if(v===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(y.pts);else if(v===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(y.pts);else if(v===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(y.pts);else if(v===this.CARRIAGE_RETURN_)this.clearFormatting(y.pts),this.flushDisplayed(y.pts),this.shiftRowsUp_(),this.startPts_=y.pts;else if(v===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(v===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(y.pts),this.displayed_=ei();else if(v===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ei();else if(v===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=ei()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(x,k))x=(x&3)<<8,M=Fr(x|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isExtCharacter(x,k))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),x=(x&3)<<8,M=Fr(x|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isMidRowCode(x,k))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(k&14)===14&&this.addFormatting(y.pts,["i"]),(k&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(x,k)){const N=k&3;this.nonDisplayed_[this.row_].offset=N,this.column_+=N}else if(this.isPAC(x,k)){var I=wu.indexOf(v&7968);if(this.mode_==="rollUp"&&(I-this.rollUpRows_+1<0&&(I=this.rollUpRows_-1),this.setRollUp(y.pts,I)),I!==this.row_&&I>=0&&I<=14&&(this.clearFormatting(y.pts),this.row_=I),k&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(v&16)===16){const N=(v&14)>>1;this.column_=N*4,this.nonDisplayed_[this.row_].indent+=N}this.isColorPAC(k)&&(k&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(x)&&(k===0&&(k=null),M=Fr(x),M+=Fr(k),this[this.mode_](y.pts,M),this.column_+=M.length)}};Et.prototype=new Fd,Et.prototype.flushDisplayed=function(h){const m=v=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+v+"."})},y=[];this.displayed_.forEach((v,_)=>{if(v&&v.text&&v.text.length){try{v.text=v.text.trim()}catch{m(_)}v.text.length&&y.push({text:v.text,line:_+1,position:10+Math.min(70,v.indent*10)+v.offset*2.5})}else v==null&&m(_)}),y.length&&this.trigger("data",{startPts:this.startPts_,endPts:h,content:y,stream:this.name_})},Et.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ei(),this.nonDisplayed_=ei(),this.lastControlCode_=null,this.column_=0,this.row_=Ho,this.rollUpRows_=2,this.formatting_=[]},Et.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Et.prototype.isSpecialCharacter=function(h,m){return h===this.EXT_&&m>=48&&m<=63},Et.prototype.isExtCharacter=function(h,m){return(h===this.EXT_+1||h===this.EXT_+2)&&m>=32&&m<=63},Et.prototype.isMidRowCode=function(h,m){return h===this.EXT_&&m>=32&&m<=47},Et.prototype.isOffsetControlCode=function(h,m){return h===this.OFFSET_&&m>=33&&m<=35},Et.prototype.isPAC=function(h,m){return h>=this.BASE_&&h<this.BASE_+8&&m>=64&&m<=127},Et.prototype.isColorPAC=function(h){return h>=64&&h<=79||h>=96&&h<=127},Et.prototype.isNormalChar=function(h){return h>=32&&h<=127},Et.prototype.setRollUp=function(h,m){if(this.mode_!=="rollUp"&&(this.row_=Ho,this.mode_="rollUp",this.flushDisplayed(h),this.nonDisplayed_=ei(),this.displayed_=ei()),m!==void 0&&m!==this.row_)for(var y=0;y<this.rollUpRows_;y++)this.displayed_[m-y]=this.displayed_[this.row_-y],this.displayed_[this.row_-y]={text:"",indent:0,offset:0};m===void 0&&(m=this.row_),this.topRow_=m-this.rollUpRows_+1},Et.prototype.addFormatting=function(h,m){this.formatting_=this.formatting_.concat(m);var y=m.reduce(function(v,_){return v+"<"+_+">"},"");this[this.mode_](h,y)},Et.prototype.clearFormatting=function(h){if(this.formatting_.length){var m=this.formatting_.reverse().reduce(function(y,v){return y+"</"+v+">"},"");this.formatting_=[],this[this.mode_](h,m)}},Et.prototype.popOn=function(h,m){var y=this.nonDisplayed_[this.row_].text;y+=m,this.nonDisplayed_[this.row_].text=y},Et.prototype.rollUp=function(h,m){var y=this.displayed_[this.row_].text;y+=m,this.displayed_[this.row_].text=y},Et.prototype.shiftRowsUp_=function(){var h;for(h=0;h<this.topRow_;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.row_+1;h<Ho+1;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.topRow_;h<this.row_;h++)this.displayed_[h]=this.displayed_[h+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Et.prototype.paintOn=function(h,m){var y=this.displayed_[this.row_].text;y+=m,this.displayed_[this.row_].text=y};var Du={CaptionStream:Ti,Cea608Stream:Et,Cea708Stream:mt},zo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Hd=i,Fp=8589934592,Hp=4294967296,Hr="shared",ku=function(h,m){var y=1;for(h>m&&(y=-1);Math.abs(m-h)>Hp;)h+=y*Fp;return h},Ou=function(h){var m,y;Ou.prototype.init.call(this),this.type_=h||Hr,this.push=function(v){if(v.type==="metadata"){this.trigger("data",v);return}this.type_!==Hr&&v.type!==this.type_||(y===void 0&&(y=v.dts),v.dts=ku(v.dts,y),v.pts=ku(v.pts,y),m=v.dts,this.trigger("data",v))},this.flush=function(){y=m,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){y=void 0,m=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ou.prototype=new Hd;var zd={TimestampRolloverStream:Ou,handleRollover:ku},zp=(h,m,y)=>{if(!h)return-1;for(var v=y;v<h.length;v++)if(h[v]===m)return v;return-1},jp={typedArrayIndexOf:zp},pi=jp.typedArrayIndexOf,gs={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},Ws=function(h,m,y){var v,_="";for(v=m;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},Pa=function(h,m,y){return decodeURIComponent(Ws(h,m,y))},ys=function(h,m,y){return unescape(Ws(h,m,y))},Qs=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},zr={APIC:function(h){var m=1,y,v,_="-->";h.data[0]===gs.Utf8&&(y=pi(h.data,0,m),!(y<0)&&(h.mimeType=ys(h.data,m,y),m=y+1,h.pictureType=h.data[m],m++,v=pi(h.data,0,m),!(v<0)&&(h.description=Pa(h.data,m,v),m=v+1,h.mimeType===_?h.url=ys(h.data,m,h.data.length):h.pictureData=h.data.subarray(m,h.data.length))))},"T*":function(h){h.data[0]===gs.Utf8&&(h.value=Pa(h.data,1,h.data.length).replace(/\0*$/,""),h.values=h.value.split("\0"))},TXXX:function(h){var m;h.data[0]===gs.Utf8&&(m=pi(h.data,0,1),m!==-1&&(h.description=Pa(h.data,1,m),h.value=Pa(h.data,m+1,h.data.length).replace(/\0*$/,""),h.data=h.value))},"W*":function(h){h.url=ys(h.data,0,h.data.length).replace(/\0.*$/,"")},WXXX:function(h){var m;h.data[0]===gs.Utf8&&(m=pi(h.data,0,1),m!==-1&&(h.description=Pa(h.data,1,m),h.url=ys(h.data,m+1,h.data.length).replace(/\0.*$/,"")))},PRIV:function(h){var m;for(m=0;m<h.data.length;m++)if(h.data[m]===0){h.owner=ys(h.data,0,m);break}h.privateData=h.data.subarray(m+1),h.data=h.privateData}},jo=function(h){var m,y,v=10,_=0,x=[];if(!(h.length<10||h[0]!=="I".charCodeAt(0)||h[1]!=="D".charCodeAt(0)||h[2]!=="3".charCodeAt(0))){_=Qs(h.subarray(6,10)),_+=10;var k=h[5]&64;k&&(v+=4,v+=Qs(h.subarray(10,14)),_-=Qs(h.subarray(16,20)));do{if(m=Qs(h.subarray(v+4,v+8)),m<1)break;y=String.fromCharCode(h[v],h[v+1],h[v+2],h[v+3]);var M={id:y,data:h.subarray(v+10,v+m+10)};M.key=M.id,zr[M.id]?zr[M.id](M):M.id[0]==="T"?zr["T*"](M):M.id[0]==="W"&&zr["W*"](M),x.push(M),v+=10,v+=m}while(v<_);return x}},jr={parseId3Frames:jo,parseSyncSafeInteger:Qs,frameParsers:zr},jd=i,jy=zo,Ks=jr,Vo;Vo=function(h){var m={descriptor:h&&h.descriptor},y=0,v=[],_=0,x;if(Vo.prototype.init.call(this),this.dispatchType=jy.METADATA_STREAM_TYPE.toString(16),m.descriptor)for(x=0;x<m.descriptor.length;x++)this.dispatchType+=("00"+m.descriptor[x].toString(16)).slice(-2);this.push=function(k){var M,I,N,j,te,be;if(k.type==="timed-metadata"){if(k.dataAlignmentIndicator&&(_=0,v.length=0),v.length===0&&(k.data.length<10||k.data[0]!=="I".charCodeAt(0)||k.data[1]!=="D".charCodeAt(0)||k.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(v.push(k),_+=k.data.byteLength,v.length===1&&(y=Ks.parseSyncSafeInteger(k.data.subarray(6,10)),y+=10),!(_<y)){for(M={data:new Uint8Array(y),frames:[],pts:v[0].pts,dts:v[0].dts},te=0;te<y;)M.data.set(v[0].data.subarray(0,y-te),te),te+=v[0].data.byteLength,_-=v[0].data.byteLength,v.shift();I=10,M.data[5]&64&&(I+=4,I+=Ks.parseSyncSafeInteger(M.data.subarray(10,14)),y-=Ks.parseSyncSafeInteger(M.data.subarray(16,20)));do{if(N=Ks.parseSyncSafeInteger(M.data.subarray(I+4,I+8)),N<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(be=String.fromCharCode(M.data[I],M.data[I+1],M.data[I+2],M.data[I+3]),j={id:be,data:M.data.subarray(I+10,I+N+10)},j.key=j.id,Ks.frameParsers[j.id]?Ks.frameParsers[j.id](j):j.id[0]==="T"?Ks.frameParsers["T*"](j):j.id[0]==="W"&&Ks.frameParsers["W*"](j),j.owner==="com.apple.streaming.transportStreamTimestamp"){var ue=j.data,Ie=(ue[3]&1)<<30|ue[4]<<22|ue[5]<<14|ue[6]<<6|ue[7]>>>2;Ie*=4,Ie+=ue[7]&3,j.timeStamp=Ie,M.pts===void 0&&M.dts===void 0&&(M.pts=j.timeStamp,M.dts=j.timeStamp),this.trigger("timestamp",j)}M.frames.push(j),I+=10,I+=N}while(I<y);this.trigger("data",M)}}}},Vo.prototype=new jd;var Vd=Vo,qo=i,Ru=Du,hn=zo,Vp=zd.TimestampRolloverStream,Mu,Ua,Ba,vs=188,Vr=71;Mu=function(){var h=new Uint8Array(vs),m=0;Mu.prototype.init.call(this),this.push=function(y){var v=0,_=vs,x;for(m?(x=new Uint8Array(y.byteLength+m),x.set(h.subarray(0,m)),x.set(y,m),m=0):x=y;_<x.byteLength;){if(x[v]===Vr&&x[_]===Vr){this.trigger("data",x.subarray(v,_)),v+=vs,_+=vs;continue}v++,_++}v<x.byteLength&&(h.set(x.subarray(v),0),m=x.byteLength-v)},this.flush=function(){m===vs&&h[0]===Vr&&(this.trigger("data",h),m=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){m=0,this.trigger("reset")}},Mu.prototype=new qo,Ua=function(){var h,m,y,v;Ua.prototype.init.call(this),v=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(_,x){var k=0;x.payloadUnitStartIndicator&&(k+=_[k]+1),x.type==="pat"?m(_.subarray(k),x):y(_.subarray(k),x)},m=function(_,x){x.section_number=_[7],x.last_section_number=_[8],v.pmtPid=(_[10]&31)<<8|_[11],x.pmtPid=v.pmtPid},y=function(_,x){var k,M,I,N;if(_[5]&1){for(v.programMapTable={video:null,audio:null,"timed-metadata":{}},k=(_[1]&15)<<8|_[2],M=3+k-4,I=(_[10]&15)<<8|_[11],N=12+I;N<M;){var j=_[N],te=(_[N+1]&31)<<8|_[N+2];j===hn.H264_STREAM_TYPE&&v.programMapTable.video===null?v.programMapTable.video=te:j===hn.ADTS_STREAM_TYPE&&v.programMapTable.audio===null?v.programMapTable.audio=te:j===hn.METADATA_STREAM_TYPE&&(v.programMapTable["timed-metadata"][te]=j),N+=((_[N+3]&15)<<8|_[N+4])+5}x.programMapTable=v.programMapTable}},this.push=function(_){var x={},k=4;if(x.payloadUnitStartIndicator=!!(_[1]&64),x.pid=_[1]&31,x.pid<<=8,x.pid|=_[2],(_[3]&48)>>>4>1&&(k+=_[k]+1),x.pid===0)x.type="pat",h(_.subarray(k),x),this.trigger("data",x);else if(x.pid===this.pmtPid)for(x.type="pmt",h(_.subarray(k),x),this.trigger("data",x);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([_,k,x]):this.processPes_(_,k,x)},this.processPes_=function(_,x,k){k.pid===this.programMapTable.video?k.streamType=hn.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?k.streamType=hn.ADTS_STREAM_TYPE:k.streamType=this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(x),this.trigger("data",k)}},Ua.prototype=new qo,Ua.STREAM_TYPES={h264:27,adts:15},Ba=function(){var h=this,m=!1,y={data:[],size:0},v={data:[],size:0},_={data:[],size:0},x,k=function(I,N){var j;const te=I[0]<<16|I[1]<<8|I[2];N.data=new Uint8Array,te===1&&(N.packetLength=6+(I[4]<<8|I[5]),N.dataAlignmentIndicator=(I[6]&4)!==0,j=I[7],j&192&&(N.pts=(I[9]&14)<<27|(I[10]&255)<<20|(I[11]&254)<<12|(I[12]&255)<<5|(I[13]&254)>>>3,N.pts*=4,N.pts+=(I[13]&6)>>>1,N.dts=N.pts,j&64&&(N.dts=(I[14]&14)<<27|(I[15]&255)<<20|(I[16]&254)<<12|(I[17]&255)<<5|(I[18]&254)>>>3,N.dts*=4,N.dts+=(I[18]&6)>>>1)),N.data=I.subarray(9+I[8]))},M=function(I,N,j){var te=new Uint8Array(I.size),be={type:N},ue=0,Ie=0,Pe=!1,Vt;if(!(!I.data.length||I.size<9)){for(be.trackId=I.data[0].pid,ue=0;ue<I.data.length;ue++)Vt=I.data[ue],te.set(Vt.data,Ie),Ie+=Vt.data.byteLength;k(te,be),Pe=N==="video"||be.packetLength<=I.size,(j||Pe)&&(I.size=0,I.data.length=0),Pe&&h.trigger("data",be)}};Ba.prototype.init.call(this),this.push=function(I){({pat:function(){},pes:function(){var N,j;switch(I.streamType){case hn.H264_STREAM_TYPE:N=y,j="video";break;case hn.ADTS_STREAM_TYPE:N=v,j="audio";break;case hn.METADATA_STREAM_TYPE:N=_,j="timed-metadata";break;default:return}I.payloadUnitStartIndicator&&M(N,j,!0),N.data.push(I),N.size+=I.data.byteLength},pmt:function(){var N={type:"metadata",tracks:[]};x=I.programMapTable,x.video!==null&&N.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.video,codec:"avc",type:"video"}),x.audio!==null&&N.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.audio,codec:"adts",type:"audio"}),m=!0,h.trigger("data",N)}})[I.type]()},this.reset=function(){y.size=0,y.data.length=0,v.size=0,v.data.length=0,this.trigger("reset")},this.flushStreams_=function(){M(y,"video"),M(v,"audio"),M(_,"timed-metadata")},this.flush=function(){if(!m&&x){var I={type:"metadata",tracks:[]};x.video!==null&&I.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.video,codec:"avc",type:"video"}),x.audio!==null&&I.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.audio,codec:"adts",type:"audio"}),h.trigger("data",I)}m=!1,this.flushStreams_(),this.trigger("done")}},Ba.prototype=new qo;var qp={PAT_PID:0,MP2T_PACKET_LENGTH:vs,TransportPacketStream:Mu,TransportParseStream:Ua,ElementaryStream:Ba,TimestampRolloverStream:Vp,CaptionStream:Ru.CaptionStream,Cea608Stream:Ru.Cea608Stream,Cea708Stream:Ru.Cea708Stream,MetadataStream:Vd};for(var Lu in hn)hn.hasOwnProperty(Lu)&&(qp[Lu]=hn[Lu]);var $p=qp,$o=i,Gp=ot.ONE_SECOND_IN_TS,Iu,Xp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Iu=function(h){var m,y=0;Iu.prototype.init.call(this),this.skipWarn_=function(v,_){this.trigger("log",{level:"warn",message:`adts skiping bytes ${v} to ${_} in frame ${y} outside syncword`})},this.push=function(v){var _=0,x,k,M,I,N;if(h||(y=0),v.type==="audio"){m&&m.length?(M=m,m=new Uint8Array(M.byteLength+v.data.byteLength),m.set(M),m.set(v.data,M.byteLength)):m=v.data;for(var j;_+7<m.length;){if(m[_]!==255||(m[_+1]&246)!==240){typeof j!="number"&&(j=_),_++;continue}if(typeof j=="number"&&(this.skipWarn_(j,_),j=null),k=(~m[_+1]&1)*2,x=(m[_+3]&3)<<11|m[_+4]<<3|(m[_+5]&224)>>5,I=((m[_+6]&3)+1)*1024,N=I*Gp/Xp[(m[_+2]&60)>>>2],m.byteLength-_<x)break;this.trigger("data",{pts:v.pts+y*N,dts:v.dts+y*N,sampleCount:I,audioobjecttype:(m[_+2]>>>6&3)+1,channelcount:(m[_+2]&1)<<2|(m[_+3]&192)>>>6,samplerate:Xp[(m[_+2]&60)>>>2],samplingfrequencyindex:(m[_+2]&60)>>>2,samplesize:16,data:m.subarray(_+7+k,_+x)}),y++,_+=x}typeof j=="number"&&(this.skipWarn_(j,_),j=null),m=m.subarray(_)}},this.flush=function(){y=0,this.trigger("done")},this.reset=function(){m=void 0,this.trigger("reset")},this.endTimeline=function(){m=void 0,this.trigger("endedtimeline")}},Iu.prototype=new $o;var Vy=Iu,Yp;Yp=function(h){var m=h.byteLength,y=0,v=0;this.length=function(){return 8*m},this.bitsAvailable=function(){return 8*m+v},this.loadWord=function(){var _=h.byteLength-m,x=new Uint8Array(4),k=Math.min(4,m);if(k===0)throw new Error("no bytes available");x.set(h.subarray(_,_+k)),y=new DataView(x.buffer).getUint32(0),v=k*8,m-=k},this.skipBits=function(_){var x;v>_?(y<<=_,v-=_):(_-=v,x=Math.floor(_/8),_-=x*8,m-=x,this.loadWord(),y<<=_,v-=_)},this.readBits=function(_){var x=Math.min(v,_),k=y>>>32-x;return v-=x,v>0?y<<=x:m>0&&this.loadWord(),x=_-x,x>0?k<<x|this.readBits(x):k},this.skipLeadingZeros=function(){var _;for(_=0;_<v;++_)if(y&2147483648>>>_)return y<<=_,v-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Go=Yp,Nu=i,Wp=Go,Xo,bs,qd;bs=function(){var h=0,m,y;bs.prototype.init.call(this),this.push=function(v){var _;y?(_=new Uint8Array(y.byteLength+v.data.byteLength),_.set(y),_.set(v.data,y.byteLength),y=_):y=v.data;for(var x=y.byteLength;h<x-3;h++)if(y[h+2]===1){m=h+5;break}for(;m<x;)switch(y[m]){case 0:if(y[m-1]!==0){m+=2;break}else if(y[m-2]!==0){m++;break}h+3!==m-2&&this.trigger("data",y.subarray(h+3,m-2));do m++;while(y[m]!==1&&m<x);h=m-2,m+=3;break;case 1:if(y[m-1]!==0||y[m-2]!==0){m+=3;break}this.trigger("data",y.subarray(h+3,m-2)),h=m-2,m+=3;break;default:m+=3;break}y=y.subarray(h),m-=h,h=0},this.reset=function(){y=null,h=0,this.trigger("reset")},this.flush=function(){y&&y.byteLength>3&&this.trigger("data",y.subarray(h+3)),y=null,h=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new Nu,qd={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Xo=function(){var h=new bs,m,y,v,_,x,k,M;Xo.prototype.init.call(this),m=this,this.push=function(I){I.type==="video"&&(y=I.trackId,v=I.pts,_=I.dts,h.push(I))},h.on("data",function(I){var N={trackId:y,pts:v,dts:_,data:I,nalUnitTypeCode:I[0]&31};switch(N.nalUnitTypeCode){case 5:N.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:N.nalUnitType="sei_rbsp",N.escapedRBSP=x(I.subarray(1));break;case 7:N.nalUnitType="seq_parameter_set_rbsp",N.escapedRBSP=x(I.subarray(1)),N.config=k(N.escapedRBSP);break;case 8:N.nalUnitType="pic_parameter_set_rbsp";break;case 9:N.nalUnitType="access_unit_delimiter_rbsp";break}m.trigger("data",N)}),h.on("done",function(){m.trigger("done")}),h.on("partialdone",function(){m.trigger("partialdone")}),h.on("reset",function(){m.trigger("reset")}),h.on("endedtimeline",function(){m.trigger("endedtimeline")}),this.flush=function(){h.flush()},this.partialFlush=function(){h.partialFlush()},this.reset=function(){h.reset()},this.endTimeline=function(){h.endTimeline()},M=function(I,N){var j=8,te=8,be,ue;for(be=0;be<I;be++)te!==0&&(ue=N.readExpGolomb(),te=(j+ue+256)%256),j=te===0?j:te},x=function(I){for(var N=I.byteLength,j=[],te=1,be,ue;te<N-2;)I[te]===0&&I[te+1]===0&&I[te+2]===3?(j.push(te+2),te+=2):te++;if(j.length===0)return I;be=N-j.length,ue=new Uint8Array(be);var Ie=0;for(te=0;te<be;Ie++,te++)Ie===j[0]&&(Ie++,j.shift()),ue[te]=I[Ie];return ue},k=function(I){var N=0,j=0,te=0,be=0,ue,Ie,Pe,Vt,mi,Wn,lr,Zr,Xa,Ya,Wa,bt=[1,1],Qa,Yi;if(ue=new Wp(I),Ie=ue.readUnsignedByte(),Vt=ue.readUnsignedByte(),Pe=ue.readUnsignedByte(),ue.skipUnsignedExpGolomb(),qd[Ie]&&(mi=ue.readUnsignedExpGolomb(),mi===3&&ue.skipBits(1),ue.skipUnsignedExpGolomb(),ue.skipUnsignedExpGolomb(),ue.skipBits(1),ue.readBoolean()))for(Wa=mi!==3?8:12,Yi=0;Yi<Wa;Yi++)ue.readBoolean()&&(Yi<6?M(16,ue):M(64,ue));if(ue.skipUnsignedExpGolomb(),Wn=ue.readUnsignedExpGolomb(),Wn===0)ue.readUnsignedExpGolomb();else if(Wn===1)for(ue.skipBits(1),ue.skipExpGolomb(),ue.skipExpGolomb(),lr=ue.readUnsignedExpGolomb(),Yi=0;Yi<lr;Yi++)ue.skipExpGolomb();if(ue.skipUnsignedExpGolomb(),ue.skipBits(1),Zr=ue.readUnsignedExpGolomb(),Xa=ue.readUnsignedExpGolomb(),Ya=ue.readBits(1),Ya===0&&ue.skipBits(1),ue.skipBits(1),ue.readBoolean()&&(N=ue.readUnsignedExpGolomb(),j=ue.readUnsignedExpGolomb(),te=ue.readUnsignedExpGolomb(),be=ue.readUnsignedExpGolomb()),ue.readBoolean()&&ue.readBoolean()){switch(Qa=ue.readUnsignedByte(),Qa){case 1:bt=[1,1];break;case 2:bt=[12,11];break;case 3:bt=[10,11];break;case 4:bt=[16,11];break;case 5:bt=[40,33];break;case 6:bt=[24,11];break;case 7:bt=[20,11];break;case 8:bt=[32,11];break;case 9:bt=[80,33];break;case 10:bt=[18,11];break;case 11:bt=[15,11];break;case 12:bt=[64,33];break;case 13:bt=[160,99];break;case 14:bt=[4,3];break;case 15:bt=[3,2];break;case 16:bt=[2,1];break;case 255:{bt=[ue.readUnsignedByte()<<8|ue.readUnsignedByte(),ue.readUnsignedByte()<<8|ue.readUnsignedByte()];break}}bt&&bt[0]/bt[1]}return{profileIdc:Ie,levelIdc:Pe,profileCompatibility:Vt,width:(Zr+1)*16-N*2-j*2,height:(2-Ya)*(Xa+1)*16-te*2-be*2,sarRatio:bt}}},Xo.prototype=new Nu;var Pu={H264Stream:Xo,NalByteStream:bs},Uu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],$d=function(h,m){var y=h[m+6]<<21|h[m+7]<<14|h[m+8]<<7|h[m+9],v=h[m+5],_=(v&16)>>4;return y=y>=0?y:0,_?y+20:y+10},xi=function(h,m){return h.length-m<10||h[m]!=="I".charCodeAt(0)||h[m+1]!=="D".charCodeAt(0)||h[m+2]!=="3".charCodeAt(0)?m:(m+=$d(h,m),xi(h,m))},qy=function(h){var m=xi(h,0);return h.length>=m+2&&(h[m]&255)===255&&(h[m+1]&240)===240&&(h[m+1]&22)===16},Bu=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Qp=function(h,m,y){var v,_="";for(v=m;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},Kp=function(h,m,y){return unescape(Qp(h,m,y))},$y=function(h,m){var y=(h[m+5]&224)>>5,v=h[m+4]<<3,_=h[m+3]&6144;return _|v|y},Gy=function(h,m){return h[m]==="I".charCodeAt(0)&&h[m+1]==="D".charCodeAt(0)&&h[m+2]==="3".charCodeAt(0)?"timed-metadata":h[m]&!0&&(h[m+1]&240)===240?"audio":null},Zp=function(h){for(var m=0;m+5<h.length;){if(h[m]!==255||(h[m+1]&246)!==240){m++;continue}return Uu[(h[m+2]&60)>>>2]}return null},Xy=function(h){var m,y,v,_;m=10,h[5]&64&&(m+=4,m+=Bu(h.subarray(10,14)));do{if(y=Bu(h.subarray(m+4,m+8)),y<1)return null;if(_=String.fromCharCode(h[m],h[m+1],h[m+2],h[m+3]),_==="PRIV"){v=h.subarray(m+10,m+y+10);for(var x=0;x<v.byteLength;x++)if(v[x]===0){var k=Kp(v,0,x);if(k==="com.apple.streaming.transportStreamTimestamp"){var M=v.subarray(x+1),I=(M[3]&1)<<30|M[4]<<22|M[5]<<14|M[6]<<6|M[7]>>>2;return I*=4,I+=M[7]&3,I}break}}m+=10,m+=y}while(m<h.byteLength);return null},Fu={isLikelyAacData:qy,parseId3TagSize:$d,parseAdtsSize:$y,parseType:Gy,parseSampleRate:Zp,parseAacTimestamp:Xy},Yy=i,Yo=Fu,Wo;Wo=function(){var h=new Uint8Array,m=0;Wo.prototype.init.call(this),this.setTimestamp=function(y){m=y},this.push=function(y){var v=0,_=0,x,k,M,I;for(h.length?(I=h.length,h=new Uint8Array(y.byteLength+I),h.set(h.subarray(0,I)),h.set(y,I)):h=y;h.length-_>=3;){if(h[_]==="I".charCodeAt(0)&&h[_+1]==="D".charCodeAt(0)&&h[_+2]==="3".charCodeAt(0)){if(h.length-_<10||(v=Yo.parseId3TagSize(h,_),_+v>h.length))break;k={type:"timed-metadata",data:h.subarray(_,_+v)},this.trigger("data",k),_+=v;continue}else if((h[_]&255)===255&&(h[_+1]&240)===240){if(h.length-_<7||(v=Yo.parseAdtsSize(h,_),_+v>h.length))break;M={type:"audio",data:h.subarray(_,_+v),pts:m,dts:m},this.trigger("data",M),_+=v;continue}_++}x=h.length-_,x>0?h=h.subarray(_):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},Wo.prototype=new Yy;var Jp=Wo,em=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Wy=em,Qy=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ky=Qy,Hu=i,Qo=Lr,_s=ps,Ko=Te,fn=ze,Gn=$p,Zo=ot,zu=Vy,tm=Pu.H264Stream,qr=Jp,$r=Fu.isLikelyAacData,kn=ot.ONE_SECOND_IN_TS,Ei=Wy,Fa=Ky,Zs,Js,ri,er,ju=function(h,m){m.stream=h,this.trigger("log",m)},tr=function(h,m){for(var y=Object.keys(m),v=0;v<y.length;v++){var _=y[v];_==="headOfPipeline"||!m[_].on||m[_].on("log",ju.bind(h,_))}},Vu=function(h,m){var y;if(h.length!==m.length)return!1;for(y=0;y<h.length;y++)if(h[y]!==m[y])return!1;return!0},qu=function(h,m,y,v,_,x){var k=y-m,M=v-m,I=_-y;return{start:{dts:h,pts:h+k},end:{dts:h+M,pts:h+I},prependedContentDuration:x,baseMediaDecodeTime:h}};Js=function(h,m){var y=[],v,_=0,x=0,k=1/0;m=m||{},v=m.firstSequenceNumber||0,Js.prototype.init.call(this),this.push=function(M){fn.collectDtsInfo(h,M),h&&Ei.forEach(function(I){h[I]=M[I]}),y.push(M)},this.setEarliestDts=function(M){_=M},this.setVideoBaseMediaDecodeTime=function(M){k=M},this.setAudioAppendStart=function(M){x=M},this.flush=function(){var M,I,N,j,te,be,ue;if(y.length===0){this.trigger("done","AudioSegmentStream");return}M=Ko.trimAdtsFramesByEarliestDts(y,h,_),h.baseMediaDecodeTime=fn.calculateTrackBaseMediaDecodeTime(h,m.keepOriginalTimestamps),ue=Ko.prefixWithSilence(h,M,x,k),h.samples=Ko.generateSampleTable(M),N=Qo.mdat(Ko.concatenateFrameData(M)),y=[],I=Qo.moof(v,[h]),j=new Uint8Array(I.byteLength+N.byteLength),v++,j.set(I),j.set(N,I.byteLength),fn.clearDtsInfo(h),te=Math.ceil(kn*1024/h.samplerate),M.length&&(be=M.length*te,this.trigger("segmentTimingInfo",qu(Zo.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),M[0].dts,M[0].pts,M[0].dts+be,M[0].pts+be,ue||0)),this.trigger("timingInfo",{start:M[0].pts,end:M[0].pts+be})),this.trigger("data",{track:h,boxes:j}),this.trigger("done","AudioSegmentStream")},this.reset=function(){fn.clearDtsInfo(h),y=[],this.trigger("reset")}},Js.prototype=new Hu,Zs=function(h,m){var y,v=[],_=[],x,k;m=m||{},y=m.firstSequenceNumber||0,Zs.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(M){fn.collectDtsInfo(h,M),M.nalUnitType==="seq_parameter_set_rbsp"&&!x&&(x=M.config,h.sps=[M.data],Fa.forEach(function(I){h[I]=x[I]},this)),M.nalUnitType==="pic_parameter_set_rbsp"&&!k&&(k=M.data,h.pps=[M.data]),v.push(M)},this.flush=function(){for(var M,I,N,j,te,be,ue=0,Ie,Pe;v.length&&v[0].nalUnitType!=="access_unit_delimiter_rbsp";)v.shift();if(v.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(M=_s.groupNalsIntoFrames(v),N=_s.groupFramesIntoGops(M),N[0][0].keyFrame||(I=this.getGopForFusion_(v[0],h),I?(ue=I.duration,N.unshift(I),N.byteLength+=I.byteLength,N.nalCount+=I.nalCount,N.pts=I.pts,N.dts=I.dts,N.duration+=I.duration):N=_s.extendFirstKeyFrame(N)),_.length){var Vt;if(m.alignGopsAtEnd?Vt=this.alignGopsAtEnd_(N):Vt=this.alignGopsAtStart_(N),!Vt){this.gopCache_.unshift({gop:N.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}fn.clearDtsInfo(h),N=Vt}fn.collectDtsInfo(h,N),h.samples=_s.generateSampleTable(N),te=Qo.mdat(_s.concatenateNalData(N)),h.baseMediaDecodeTime=fn.calculateTrackBaseMediaDecodeTime(h,m.keepOriginalTimestamps),this.trigger("processedGopsInfo",N.map(function(mi){return{pts:mi.pts,dts:mi.dts,byteLength:mi.byteLength}})),Ie=N[0],Pe=N[N.length-1],this.trigger("segmentTimingInfo",qu(h.baseMediaDecodeTime,Ie.dts,Ie.pts,Pe.dts+Pe.duration,Pe.pts+Pe.duration,ue)),this.trigger("timingInfo",{start:N[0].pts,end:N[N.length-1].pts+N[N.length-1].duration}),this.gopCache_.unshift({gop:N.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.trigger("baseMediaDecodeTime",h.baseMediaDecodeTime),this.trigger("timelineStartInfo",h.timelineStartInfo),j=Qo.moof(y,[h]),be=new Uint8Array(j.byteLength+te.byteLength),y++,be.set(j),be.set(te,j.byteLength),this.trigger("data",{track:h,boxes:be}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),v=[],this.gopCache_.length=0,_.length=0,this.trigger("reset")},this.resetStream_=function(){fn.clearDtsInfo(h),x=void 0,k=void 0},this.getGopForFusion_=function(M){var I=45e3,N=1e4,j=1/0,te,be,ue,Ie,Pe;for(Pe=0;Pe<this.gopCache_.length;Pe++)Ie=this.gopCache_[Pe],ue=Ie.gop,!(!(h.pps&&Vu(h.pps[0],Ie.pps[0]))||!(h.sps&&Vu(h.sps[0],Ie.sps[0])))&&(ue.dts<h.timelineStartInfo.dts||(te=M.dts-ue.dts-ue.duration,te>=-N&&te<=I&&(!be||j>te)&&(be=Ie,j=te)));return be?be.gop:null},this.alignGopsAtStart_=function(M){var I,N,j,te,be,ue,Ie,Pe;for(be=M.byteLength,ue=M.nalCount,Ie=M.duration,I=N=0;I<_.length&&N<M.length&&(j=_[I],te=M[N],j.pts!==te.pts);){if(te.pts>j.pts){I++;continue}N++,be-=te.byteLength,ue-=te.nalCount,Ie-=te.duration}return N===0?M:N===M.length?null:(Pe=M.slice(N),Pe.byteLength=be,Pe.duration=Ie,Pe.nalCount=ue,Pe.pts=Pe[0].pts,Pe.dts=Pe[0].dts,Pe)},this.alignGopsAtEnd_=function(M){var I,N,j,te,be,ue;for(I=_.length-1,N=M.length-1,be=null,ue=!1;I>=0&&N>=0;){if(j=_[I],te=M[N],j.pts===te.pts){ue=!0;break}if(j.pts>te.pts){I--;continue}I===_.length-1&&(be=N),N--}if(!ue&&be===null)return null;var Ie;if(ue?Ie=N:Ie=be,Ie===0)return M;var Pe=M.slice(Ie),Vt=Pe.reduce(function(mi,Wn){return mi.byteLength+=Wn.byteLength,mi.duration+=Wn.duration,mi.nalCount+=Wn.nalCount,mi},{byteLength:0,duration:0,nalCount:0});return Pe.byteLength=Vt.byteLength,Pe.duration=Vt.duration,Pe.nalCount=Vt.nalCount,Pe.pts=Pe[0].pts,Pe.dts=Pe[0].dts,Pe},this.alignGopsWith=function(M){_=M}},Zs.prototype=new Hu,er=function(h,m){this.numberOfTracks=0,this.metadataStream=m,h=h||{},typeof h.remux<"u"?this.remuxTracks=!!h.remux:this.remuxTracks=!0,typeof h.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=h.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,er.prototype.init.call(this),this.push=function(y){if(y.content||y.text)return this.pendingCaptions.push(y);if(y.frames)return this.pendingMetadata.push(y);this.pendingTracks.push(y.track),this.pendingBytes+=y.boxes.byteLength,y.track.type==="video"&&(this.videoTrack=y.track,this.pendingBoxes.push(y.boxes)),y.track.type==="audio"&&(this.audioTrack=y.track,this.pendingBoxes.unshift(y.boxes))}},er.prototype=new Hu,er.prototype.flush=function(h){var m=0,y={captions:[],captionStreams:{},metadata:[],info:{}},v,_,x,k=0,M;if(this.pendingTracks.length<this.numberOfTracks){if(h!=="VideoSegmentStream"&&h!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(k=this.videoTrack.timelineStartInfo.pts,Fa.forEach(function(I){y.info[I]=this.videoTrack[I]},this)):this.audioTrack&&(k=this.audioTrack.timelineStartInfo.pts,Ei.forEach(function(I){y.info[I]=this.audioTrack[I]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?y.type=this.pendingTracks[0].type:y.type="combined",this.emittedTracks+=this.pendingTracks.length,x=Qo.initSegment(this.pendingTracks),y.initSegment=new Uint8Array(x.byteLength),y.initSegment.set(x),y.data=new Uint8Array(this.pendingBytes),M=0;M<this.pendingBoxes.length;M++)y.data.set(this.pendingBoxes[M],m),m+=this.pendingBoxes[M].byteLength;for(M=0;M<this.pendingCaptions.length;M++)v=this.pendingCaptions[M],v.startTime=Zo.metadataTsToSeconds(v.startPts,k,this.keepOriginalTimestamps),v.endTime=Zo.metadataTsToSeconds(v.endPts,k,this.keepOriginalTimestamps),y.captionStreams[v.stream]=!0,y.captions.push(v);for(M=0;M<this.pendingMetadata.length;M++)_=this.pendingMetadata[M],_.cueTime=Zo.metadataTsToSeconds(_.pts,k,this.keepOriginalTimestamps),y.metadata.push(_);for(y.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",y),M=0;M<y.captions.length;M++)v=y.captions[M],this.trigger("caption",v);for(M=0;M<y.metadata.length;M++)_=y.metadata[M],this.trigger("id3Frame",_)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},er.prototype.setRemux=function(h){this.remuxTracks=h},ri=function(h){var m=this,y=!0,v,_;ri.prototype.init.call(this),h=h||{},this.baseMediaDecodeTime=h.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var x={};this.transmuxPipeline_=x,x.type="aac",x.metadataStream=new Gn.MetadataStream,x.aacStream=new qr,x.audioTimestampRolloverStream=new Gn.TimestampRolloverStream("audio"),x.timedMetadataTimestampRolloverStream=new Gn.TimestampRolloverStream("timed-metadata"),x.adtsStream=new zu,x.coalesceStream=new er(h,x.metadataStream),x.headOfPipeline=x.aacStream,x.aacStream.pipe(x.audioTimestampRolloverStream).pipe(x.adtsStream),x.aacStream.pipe(x.timedMetadataTimestampRolloverStream).pipe(x.metadataStream).pipe(x.coalesceStream),x.metadataStream.on("timestamp",function(k){x.aacStream.setTimestamp(k.timeStamp)}),x.aacStream.on("data",function(k){k.type!=="timed-metadata"&&k.type!=="audio"||x.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:m.baseMediaDecodeTime},codec:"adts",type:"audio"},x.coalesceStream.numberOfTracks++,x.audioSegmentStream=new Js(_,h),x.audioSegmentStream.on("log",m.getLogTrigger_("audioSegmentStream")),x.audioSegmentStream.on("timingInfo",m.trigger.bind(m,"audioTimingInfo")),x.adtsStream.pipe(x.audioSegmentStream).pipe(x.coalesceStream),m.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!v}))}),x.coalesceStream.on("data",this.trigger.bind(this,"data")),x.coalesceStream.on("done",this.trigger.bind(this,"done")),tr(this,x)},this.setupTsPipeline=function(){var x={};this.transmuxPipeline_=x,x.type="ts",x.metadataStream=new Gn.MetadataStream,x.packetStream=new Gn.TransportPacketStream,x.parseStream=new Gn.TransportParseStream,x.elementaryStream=new Gn.ElementaryStream,x.timestampRolloverStream=new Gn.TimestampRolloverStream,x.adtsStream=new zu,x.h264Stream=new tm,x.captionStream=new Gn.CaptionStream(h),x.coalesceStream=new er(h,x.metadataStream),x.headOfPipeline=x.packetStream,x.packetStream.pipe(x.parseStream).pipe(x.elementaryStream).pipe(x.timestampRolloverStream),x.timestampRolloverStream.pipe(x.h264Stream),x.timestampRolloverStream.pipe(x.adtsStream),x.timestampRolloverStream.pipe(x.metadataStream).pipe(x.coalesceStream),x.h264Stream.pipe(x.captionStream).pipe(x.coalesceStream),x.elementaryStream.on("data",function(k){var M;if(k.type==="metadata"){for(M=k.tracks.length;M--;)!v&&k.tracks[M].type==="video"?(v=k.tracks[M],v.timelineStartInfo.baseMediaDecodeTime=m.baseMediaDecodeTime):!_&&k.tracks[M].type==="audio"&&(_=k.tracks[M],_.timelineStartInfo.baseMediaDecodeTime=m.baseMediaDecodeTime);v&&!x.videoSegmentStream&&(x.coalesceStream.numberOfTracks++,x.videoSegmentStream=new Zs(v,h),x.videoSegmentStream.on("log",m.getLogTrigger_("videoSegmentStream")),x.videoSegmentStream.on("timelineStartInfo",function(I){_&&!h.keepOriginalTimestamps&&(_.timelineStartInfo=I,x.audioSegmentStream.setEarliestDts(I.dts-m.baseMediaDecodeTime))}),x.videoSegmentStream.on("processedGopsInfo",m.trigger.bind(m,"gopInfo")),x.videoSegmentStream.on("segmentTimingInfo",m.trigger.bind(m,"videoSegmentTimingInfo")),x.videoSegmentStream.on("baseMediaDecodeTime",function(I){_&&x.audioSegmentStream.setVideoBaseMediaDecodeTime(I)}),x.videoSegmentStream.on("timingInfo",m.trigger.bind(m,"videoTimingInfo")),x.h264Stream.pipe(x.videoSegmentStream).pipe(x.coalesceStream)),_&&!x.audioSegmentStream&&(x.coalesceStream.numberOfTracks++,x.audioSegmentStream=new Js(_,h),x.audioSegmentStream.on("log",m.getLogTrigger_("audioSegmentStream")),x.audioSegmentStream.on("timingInfo",m.trigger.bind(m,"audioTimingInfo")),x.audioSegmentStream.on("segmentTimingInfo",m.trigger.bind(m,"audioSegmentTimingInfo")),x.adtsStream.pipe(x.audioSegmentStream).pipe(x.coalesceStream)),m.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!v})}}),x.coalesceStream.on("data",this.trigger.bind(this,"data")),x.coalesceStream.on("id3Frame",function(k){k.dispatchType=x.metadataStream.dispatchType,m.trigger("id3Frame",k)}),x.coalesceStream.on("caption",this.trigger.bind(this,"caption")),x.coalesceStream.on("done",this.trigger.bind(this,"done")),tr(this,x)},this.setBaseMediaDecodeTime=function(x){var k=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=x),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,fn.clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),v&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,fn.clearDtsInfo(v),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(x){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(x)},this.setRemux=function(x){var k=this.transmuxPipeline_;h.remux=x,k&&k.coalesceStream&&k.coalesceStream.setRemux(x)},this.alignGopsWith=function(x){v&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(x)},this.getLogTrigger_=function(x){var k=this;return function(M){M.stream=x,k.trigger("log",M)}},this.push=function(x){if(y){var k=$r(x);k&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!k&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),y=!1}this.transmuxPipeline_.headOfPipeline.push(x)},this.flush=function(){y=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ri.prototype=new Hu;var im={Transmuxer:ri,VideoSegmentStream:Zs,AudioSegmentStream:Js,AUDIO_PROPERTIES:Ei,VIDEO_PROPERTIES:Fa,generateSegmentTimingInfo:qu},Gd=function(h){return h>>>0},Zy=function(h){return("00"+h.toString(16)).slice(-2)},Ha={toUnsigned:Gd,toHexString:Zy},Ts=function(h){var m="";return m+=String.fromCharCode(h[0]),m+=String.fromCharCode(h[1]),m+=String.fromCharCode(h[2]),m+=String.fromCharCode(h[3]),m},$u=Ts,Xd=Ha.toUnsigned,Gu=$u,ir=function(h,m){var y=[],v,_,x,k,M;if(!m.length)return null;for(v=0;v<h.byteLength;)_=Xd(h[v]<<24|h[v+1]<<16|h[v+2]<<8|h[v+3]),x=Gu(h.subarray(v+4,v+8)),k=_>1?v+_:h.byteLength,x===m[0]&&(m.length===1?y.push(h.subarray(v+8,k)):(M=ir(h.subarray(v+8,k),m.slice(1)),M.length&&(y=y.concat(M)))),v=k;return y},za=ir,Yd=Ha.toUnsigned,Gr=u.getUint64,nm=function(h){var m={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return m.version===1?m.baseMediaDecodeTime=Gr(h.subarray(4)):m.baseMediaDecodeTime=Yd(h[4]<<24|h[5]<<16|h[6]<<8|h[7]),m},Jo=nm,Wd=function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:m.getUint32(4)},v=y.flags[2]&1,_=y.flags[2]&2,x=y.flags[2]&8,k=y.flags[2]&16,M=y.flags[2]&32,I=y.flags[0]&65536,N=y.flags[0]&131072,j;return j=8,v&&(j+=4,y.baseDataOffset=m.getUint32(12),j+=4),_&&(y.sampleDescriptionIndex=m.getUint32(j),j+=4),x&&(y.defaultSampleDuration=m.getUint32(j),j+=4),k&&(y.defaultSampleSize=m.getUint32(j),j+=4),M&&(y.defaultSampleFlags=m.getUint32(j)),I&&(y.durationIsEmpty=!0),!v&&N&&(y.baseDataOffsetIsMoof=!0),y},Ss=Wd,nr=u.getUint64,Qd=function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),references:[],referenceId:m.getUint32(4),timescale:m.getUint32(8)},v=12;y.version===0?(y.earliestPresentationTime=m.getUint32(v),y.firstOffset=m.getUint32(v+4),v+=8):(y.earliestPresentationTime=nr(h.subarray(v)),y.firstOffset=nr(h.subarray(v+8)),v+=16),v+=2;var _=m.getUint16(v);for(v+=2;_>0;v+=12,_--)y.references.push({referenceType:(h[v]&128)>>>7,referencedSize:m.getUint32(v)&2147483647,subsegmentDuration:m.getUint32(v+4),startsWithSap:!!(h[v+8]&128),sapType:(h[v+8]&112)>>>4,sapDeltaTime:m.getUint32(v+8)&268435455});return y},Xr=Qd,sm=function(h){return{isLeading:(h[0]&12)>>>2,dependsOn:h[0]&3,isDependedOn:(h[1]&192)>>>6,hasRedundancy:(h[1]&48)>>>4,paddingValue:(h[1]&14)>>>1,isNonSyncSample:h[1]&1,degradationPriority:h[2]<<8|h[3]}},rm=sm,ja=rm,el=function(h){var m={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y=new DataView(h.buffer,h.byteOffset,h.byteLength),v=m.flags[2]&1,_=m.flags[2]&4,x=m.flags[1]&1,k=m.flags[1]&2,M=m.flags[1]&4,I=m.flags[1]&8,N=y.getUint32(4),j=8,te;for(v&&(m.dataOffset=y.getInt32(j),j+=4),_&&N&&(te={flags:ja(h.subarray(j,j+4))},j+=4,x&&(te.duration=y.getUint32(j),j+=4),k&&(te.size=y.getUint32(j),j+=4),I&&(m.version===1?te.compositionTimeOffset=y.getInt32(j):te.compositionTimeOffset=y.getUint32(j),j+=4),m.samples.push(te),N--);N--;)te={},x&&(te.duration=y.getUint32(j),j+=4),k&&(te.size=y.getUint32(j),j+=4),M&&(te.flags=ja(h.subarray(j,j+4)),j+=4),I&&(m.version===1?te.compositionTimeOffset=y.getInt32(j):te.compositionTimeOffset=y.getUint32(j),j+=4),m.samples.push(te);return m},Kd=el,tl=u,Zd=tl.getUint64,Wt,Xn,jt=function(h){return new Date(h*1e3-20828448e5)},Yr=$u,Jd=za,il=function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y=[],v,_;for(v=0;v+4<h.length;v+=_){if(_=m.getUint32(v),v+=4,_<=0){y.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(h[v]&31){case 1:y.push("slice_layer_without_partitioning_rbsp");break;case 5:y.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:y.push("sei_rbsp");break;case 7:y.push("seq_parameter_set_rbsp");break;case 8:y.push("pic_parameter_set_rbsp");break;case 9:y.push("access_unit_delimiter_rbsp");break;default:y.push("UNKNOWN NAL - "+h[v]&31);break}}return y},On={avc1:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength);return{dataReferenceIndex:m.getUint16(6),width:m.getUint16(24),height:m.getUint16(26),horizresolution:m.getUint16(28)+m.getUint16(30)/16,vertresolution:m.getUint16(32)+m.getUint16(34)/16,frameCount:m.getUint16(40),depth:m.getUint16(74),config:Wt(h.subarray(78,h.byteLength))}},avcC:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={configurationVersion:h[0],avcProfileIndication:h[1],profileCompatibility:h[2],avcLevelIndication:h[3],lengthSizeMinusOne:h[4]&3,sps:[],pps:[]},v=h[5]&31,_,x,k,M;for(k=6,M=0;M<v;M++)x=m.getUint16(k),k+=2,y.sps.push(new Uint8Array(h.subarray(k,k+x))),k+=x;for(_=h[k],k++,M=0;M<_;M++)x=m.getUint16(k),k+=2,y.pps.push(new Uint8Array(h.subarray(k,k+x))),k+=x;return y},btrt:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength);return{bufferSizeDB:m.getUint32(0),maxBitrate:m.getUint32(4),avgBitrate:m.getUint32(8)}},edts:function(m){return{boxes:Wt(m)}},elst:function(m){var y=new DataView(m.buffer,m.byteOffset,m.byteLength),v={version:y.getUint8(0),flags:new Uint8Array(m.subarray(1,4)),edits:[]},_=y.getUint32(4),x;for(x=8;_;_--)v.version===0?(v.edits.push({segmentDuration:y.getUint32(x),mediaTime:y.getInt32(x+4),mediaRate:y.getUint16(x+8)+y.getUint16(x+10)/(256*256)}),x+=12):(v.edits.push({segmentDuration:Zd(m.subarray(x)),mediaTime:Zd(m.subarray(x+8)),mediaRate:y.getUint16(x+16)+y.getUint16(x+18)/(256*256)}),x+=20);return v},esds:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),esId:h[6]<<8|h[7],streamPriority:h[8]&31,decoderConfig:{objectProfileIndication:h[11],streamType:h[12]>>>2&63,bufferSize:h[13]<<16|h[14]<<8|h[15],maxBitrate:h[16]<<24|h[17]<<16|h[18]<<8|h[19],avgBitrate:h[20]<<24|h[21]<<16|h[22]<<8|h[23],decoderConfigDescriptor:{tag:h[24],length:h[25],audioObjectType:h[26]>>>3&31,samplingFrequencyIndex:(h[26]&7)<<1|h[27]>>>7&1,channelConfiguration:h[27]>>>3&15}}}},ftyp:function(h){for(var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={majorBrand:Yr(h.subarray(0,4)),minorVersion:m.getUint32(4),compatibleBrands:[]},v=8;v<h.byteLength;)y.compatibleBrands.push(Yr(h.subarray(v,v+4))),v+=4;return y},dinf:function(h){return{boxes:Wt(h)}},dref:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),dataReferences:Wt(h.subarray(8))}},hdlr:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),handlerType:Yr(h.subarray(8,12)),name:""},v=8;for(v=24;v<h.byteLength;v++){if(h[v]===0){v++;break}y.name+=String.fromCharCode(h[v])}return y.name=decodeURIComponent(escape(y.name)),y},mdat:function(h){return{byteLength:h.byteLength,nals:il(h)}},mdhd:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v,_={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),language:""};return _.version===1?(y+=4,_.creationTime=jt(m.getUint32(y)),y+=8,_.modificationTime=jt(m.getUint32(y)),y+=4,_.timescale=m.getUint32(y),y+=8,_.duration=m.getUint32(y)):(_.creationTime=jt(m.getUint32(y)),y+=4,_.modificationTime=jt(m.getUint32(y)),y+=4,_.timescale=m.getUint32(y),y+=4,_.duration=m.getUint32(y)),y+=4,v=m.getUint16(y),_.language+=String.fromCharCode((v>>10)+96),_.language+=String.fromCharCode(((v&992)>>5)+96),_.language+=String.fromCharCode((v&31)+96),_},mdia:function(h){return{boxes:Wt(h)}},mfhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sequenceNumber:h[4]<<24|h[5]<<16|h[6]<<8|h[7]}},minf:function(h){return{boxes:Wt(h)}},mp4a:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={dataReferenceIndex:m.getUint16(6),channelcount:m.getUint16(16),samplesize:m.getUint16(18),samplerate:m.getUint16(24)+m.getUint16(26)/65536};return h.byteLength>28&&(y.streamDescriptor=Wt(h.subarray(28))[0]),y},moof:function(h){return{boxes:Wt(h)}},moov:function(h){return{boxes:Wt(h)}},mvex:function(h){return{boxes:Wt(h)}},mvhd:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=jt(m.getUint32(y)),y+=8,v.modificationTime=jt(m.getUint32(y)),y+=4,v.timescale=m.getUint32(y),y+=8,v.duration=m.getUint32(y)):(v.creationTime=jt(m.getUint32(y)),y+=4,v.modificationTime=jt(m.getUint32(y)),y+=4,v.timescale=m.getUint32(y),y+=4,v.duration=m.getUint32(y)),y+=4,v.rate=m.getUint16(y)+m.getUint16(y+2)/16,y+=4,v.volume=m.getUint8(y)+m.getUint8(y+1)/8,y+=2,y+=2,y+=2*4,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,y+=6*4,v.nextTrackId=m.getUint32(y),v},pdin:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),rate:m.getUint32(4),initialDelay:m.getUint32(8)}},sdtp:function(h){var m={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y;for(y=4;y<h.byteLength;y++)m.samples.push({dependsOn:(h[y]&48)>>4,isDependedOn:(h[y]&12)>>2,hasRedundancy:h[y]&3});return m},sidx:Xr,smhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),balance:h[4]+h[5]/256}},stbl:function(h){return{boxes:Wt(h)}},ctts:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),compositionOffsets:[]},v=m.getUint32(4),_;for(_=8;v;_+=8,v--)y.compositionOffsets.push({sampleCount:m.getUint32(_),sampleOffset:m[y.version===0?"getUint32":"getInt32"](_+4)});return y},stss:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),syncSamples:[]},v=m.getUint32(4),_;for(_=8;v;_+=4,v--)y.syncSamples.push(m.getUint32(_));return y},stco:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),chunkOffsets:[]},v=m.getUint32(4),_;for(_=8;v;_+=4,v--)y.chunkOffsets.push(m.getUint32(_));return y},stsc:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y=m.getUint32(4),v={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleToChunks:[]},_;for(_=8;y;_+=12,y--)v.sampleToChunks.push({firstChunk:m.getUint32(_),samplesPerChunk:m.getUint32(_+4),sampleDescriptionIndex:m.getUint32(_+8)});return v},stsd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleDescriptions:Wt(h.subarray(8))}},stsz:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleSize:m.getUint32(4),entries:[]},v;for(v=12;v<h.byteLength;v+=4)y.entries.push(m.getUint32(v));return y},stts:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),timeToSamples:[]},v=m.getUint32(4),_;for(_=8;v;_+=8,v--)y.timeToSamples.push({sampleCount:m.getUint32(_),sampleDelta:m.getUint32(_+4)});return y},styp:function(h){return On.ftyp(h)},tfdt:Jo,tfhd:Ss,tkhd:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:m.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=jt(m.getUint32(y)),y+=8,v.modificationTime=jt(m.getUint32(y)),y+=4,v.trackId=m.getUint32(y),y+=4,y+=8,v.duration=m.getUint32(y)):(v.creationTime=jt(m.getUint32(y)),y+=4,v.modificationTime=jt(m.getUint32(y)),y+=4,v.trackId=m.getUint32(y),y+=4,y+=4,v.duration=m.getUint32(y)),y+=4,y+=2*4,v.layer=m.getUint16(y),y+=2,v.alternateGroup=m.getUint16(y),y+=2,v.volume=m.getUint8(y)+m.getUint8(y+1)/8,y+=2,y+=2,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,v.width=m.getUint16(y)+m.getUint16(y+2)/65536,y+=4,v.height=m.getUint16(y)+m.getUint16(y+2)/65536,v},traf:function(h){return{boxes:Wt(h)}},trak:function(h){return{boxes:Wt(h)}},trex:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:m.getUint32(4),defaultSampleDescriptionIndex:m.getUint32(8),defaultSampleDuration:m.getUint32(12),defaultSampleSize:m.getUint32(16),sampleDependsOn:h[20]&3,sampleIsDependedOn:(h[21]&192)>>6,sampleHasRedundancy:(h[21]&48)>>4,samplePaddingValue:(h[21]&14)>>1,sampleIsDifferenceSample:!!(h[21]&1),sampleDegradationPriority:m.getUint16(22)}},trun:Kd,"url ":function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4))}},vmhd:function(h){var m=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),graphicsmode:m.getUint16(4),opcolor:new Uint16Array([m.getUint16(6),m.getUint16(8),m.getUint16(10)])}}};Wt=function(h){for(var m=0,y=[],v,_,x,k,M,I=new ArrayBuffer(h.length),N=new Uint8Array(I),j=0;j<h.length;++j)N[j]=h[j];for(v=new DataView(I);m<h.byteLength;)_=v.getUint32(m),x=Yr(h.subarray(m+4,m+8)),k=_>1?m+_:h.byteLength,M=(On[x]||function(te){return{data:te}})(h.subarray(m+8,k)),M.size=_,M.type=x,y.push(M),m=k;return y},Xn=function(h,m){var y;return m=m||0,y=new Array(m*2+1).join(" "),h.map(function(v,_){return y+v.type+`
|
||
`+Object.keys(v).filter(function(x){return x!=="type"&&x!=="boxes"}).map(function(x){var k=y+" "+x+": ",M=v[x];if(M instanceof Uint8Array||M instanceof Uint32Array){var I=Array.prototype.slice.call(new Uint8Array(M.buffer,M.byteOffset,M.byteLength)).map(function(N){return" "+("00"+N.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return I?I.length===1?k+"<"+I.join("").slice(1)+">":k+`<
|
||
`+I.map(function(N){return y+" "+N}).join(`
|
||
`)+`
|
||
`+y+" >":k+"<>"}return k+JSON.stringify(M,null,2).split(`
|
||
`).map(function(N,j){return j===0?N:y+" "+N}).join(`
|
||
`)}).join(`
|
||
`)+(v.boxes?`
|
||
`+Xn(v.boxes,m+1):"")}).join(`
|
||
`)};var sr={inspect:Wt,textify:Xn,parseType:Yr,findBox:Jd,parseTraf:On.traf,parseTfdt:On.tfdt,parseHdlr:On.hdlr,parseTfhd:On.tfhd,parseTrun:On.trun,parseSidx:On.sidx},Dt=function(h){for(var m=0,y=String.fromCharCode(h[m]),v="";y!=="\0";)v+=y,m++,y=String.fromCharCode(h[m]);return v+=y,v},Xu={uint8ToCString:Dt},nl=Xu.uint8ToCString,eh=u.getUint64,Wr=function(h){var m=4,y=h[0],v,_,x,k,M,I,N,j;if(y===0){v=nl(h.subarray(m)),m+=v.length,_=nl(h.subarray(m)),m+=_.length;var te=new DataView(h.buffer);x=te.getUint32(m),m+=4,M=te.getUint32(m),m+=4,I=te.getUint32(m),m+=4,N=te.getUint32(m),m+=4}else if(y===1){var te=new DataView(h.buffer);x=te.getUint32(m),m+=4,k=eh(h.subarray(m)),m+=8,I=te.getUint32(m),m+=4,N=te.getUint32(m),m+=4,v=nl(h.subarray(m)),m+=v.length,_=nl(h.subarray(m)),m+=_.length}j=new Uint8Array(h.subarray(m,h.byteLength));var be={scheme_id_uri:v,value:_,timescale:x||1,presentation_time:k,presentation_time_delta:M,event_duration:I,id:N,message_data:j};return xs(y,be)?be:void 0},sl=function(h,m,y,v){return h||h===0?h/m:v+y/m},xs=function(h,m){var y=m.scheme_id_uri!=="\0",v=h===0&&rl(m.presentation_time_delta)&&y,_=h===1&&rl(m.presentation_time)&&y;return!(h>1)&&v||_},rl=function(h){return h!==void 0||h!==null},al={parseEmsgBox:Wr,scaleTime:sl},Qr;typeof window<"u"?Qr=window:typeof s<"u"?Qr=s:typeof self<"u"?Qr=self:Qr={};var Yu=Qr,ol=Ha.toUnsigned,Bi=Ha.toHexString,lt=za,Es=$u,th=al,am=Ss,Jy=Kd,ih=Jo,Wu=u.getUint64,nh,sh,rh,ll,ah,Qu,oh,ul=Yu,lh=jr.parseId3Frames;nh=function(h){var m={},y=lt(h,["moov","trak"]);return y.reduce(function(v,_){var x,k,M,I,N;return x=lt(_,["tkhd"])[0],!x||(k=x[0],M=k===0?12:20,I=ol(x[M]<<24|x[M+1]<<16|x[M+2]<<8|x[M+3]),N=lt(_,["mdia","mdhd"])[0],!N)?null:(k=N[0],M=k===0?12:20,v[I]=ol(N[M]<<24|N[M+1]<<16|N[M+2]<<8|N[M+3]),v)},m)},sh=function(h,m){var y;y=lt(m,["moof","traf"]);var v=y.reduce(function(_,x){var k=lt(x,["tfhd"])[0],M=ol(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),I=h[M]||9e4,N=lt(x,["tfdt"])[0],j=new DataView(N.buffer,N.byteOffset,N.byteLength),te;N[0]===1?te=Wu(N.subarray(4,12)):te=j.getUint32(4);let be;return typeof te=="bigint"?be=te/ul.BigInt(I):typeof te=="number"&&!isNaN(te)&&(be=te/I),be<Number.MAX_SAFE_INTEGER&&(be=Number(be)),be<_&&(_=be),_},1/0);return typeof v=="bigint"||isFinite(v)?v:0},rh=function(h,m){var y=lt(m,["moof","traf"]),v=0,_=0,x;if(y&&y.length){var k=lt(y[0],["tfhd"])[0],M=lt(y[0],["trun"])[0],I=lt(y[0],["tfdt"])[0];if(k){var N=am(k);x=N.trackId}if(I){var j=ih(I);v=j.baseMediaDecodeTime}if(M){var te=Jy(M);te.samples&&te.samples.length&&(_=te.samples[0].compositionTimeOffset||0)}}var be=h[x]||9e4;typeof v=="bigint"&&(_=ul.BigInt(_),be=ul.BigInt(be));var ue=(v+_)/be;return typeof ue=="bigint"&&ue<Number.MAX_SAFE_INTEGER&&(ue=Number(ue)),ue},ll=function(h){var m=lt(h,["moov","trak"]),y=[];return m.forEach(function(v){var _=lt(v,["mdia","hdlr"]),x=lt(v,["tkhd"]);_.forEach(function(k,M){var I=Es(k.subarray(8,12)),N=x[M],j,te,be;I==="vide"&&(j=new DataView(N.buffer,N.byteOffset,N.byteLength),te=j.getUint8(0),be=te===0?j.getUint32(12):j.getUint32(20),y.push(be))})}),y},Qu=function(h){var m=h[0],y=m===0?12:20;return ol(h[y]<<24|h[y+1]<<16|h[y+2]<<8|h[y+3])},ah=function(h){var m=lt(h,["moov","trak"]),y=[];return m.forEach(function(v){var _={},x=lt(v,["tkhd"])[0],k,M;x&&(k=new DataView(x.buffer,x.byteOffset,x.byteLength),M=k.getUint8(0),_.id=M===0?k.getUint32(12):k.getUint32(20));var I=lt(v,["mdia","hdlr"])[0];if(I){var N=Es(I.subarray(8,12));N==="vide"?_.type="video":N==="soun"?_.type="audio":_.type=N}var j=lt(v,["mdia","minf","stbl","stsd"])[0];if(j){var te=j.subarray(8);_.codec=Es(te.subarray(4,8));var be=lt(te,[_.codec])[0],ue,Ie;be&&(/^[asm]vc[1-9]$/i.test(_.codec)?(ue=be.subarray(78),Ie=Es(ue.subarray(4,8)),Ie==="avcC"&&ue.length>11?(_.codec+=".",_.codec+=Bi(ue[9]),_.codec+=Bi(ue[10]),_.codec+=Bi(ue[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(ue=be.subarray(28),Ie=Es(ue.subarray(4,8)),Ie==="esds"&&ue.length>20&&ue[19]!==0?(_.codec+="."+Bi(ue[19]),_.codec+="."+Bi(ue[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Pe=lt(v,["mdia","mdhd"])[0];Pe&&(_.timescale=Qu(Pe)),y.push(_)}),y},oh=function(h,m=0){var y=lt(h,["emsg"]);return y.map(v=>{var _=th.parseEmsgBox(new Uint8Array(v)),x=lh(_.message_data);return{cueTime:th.scaleTime(_.presentation_time,_.timescale,_.presentation_time_delta,m),duration:th.scaleTime(_.event_duration,_.timescale),frames:x}})};var pn={findBox:lt,parseType:Es,timescale:nh,startTime:sh,compositionStartTime:rh,videoTrackIds:ll,tracks:ah,getTimescaleFromMediaHeader:Qu,getEmsgID3:oh};const{parseTrun:rr}=sr,{findBox:Va}=pn;var cl=Yu,dl=function(h){var m=Va(h,["moof","traf"]),y=Va(h,["mdat"]),v=[];return y.forEach(function(_,x){var k=m[x];v.push({mdat:_,traf:k})}),v},hl=function(h,m,y){var v=m,_=y.defaultSampleDuration||0,x=y.defaultSampleSize||0,k=y.trackId,M=[];return h.forEach(function(I){var N=rr(I),j=N.samples;j.forEach(function(te){te.duration===void 0&&(te.duration=_),te.size===void 0&&(te.size=x),te.trackId=k,te.dts=v,te.compositionTimeOffset===void 0&&(te.compositionTimeOffset=0),typeof v=="bigint"?(te.pts=v+cl.BigInt(te.compositionTimeOffset),v+=cl.BigInt(te.duration)):(te.pts=v+te.compositionTimeOffset,v+=te.duration)}),M=M.concat(j)}),M},uh={getMdatTrafPairs:dl,parseSamples:hl},ev=Bd.discardEmulationPreventionBytes,om=Du.CaptionStream,Ku=za,ch=Jo,dh=Ss,{getMdatTrafPairs:We,parseSamples:fe}=uh,qa=function(h,m){for(var y=h,v=0;v<m.length;v++){var _=m[v];if(y<_.size)return _;y-=_.size}return null},Zu=function(h,m,y){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),_={logs:[],seiNals:[]},x,k,M,I;for(k=0;k+4<h.length;k+=M)if(M=v.getUint32(k),k+=4,!(M<=0))switch(h[k]&31){case 6:var N=h.subarray(k+1,k+1+M),j=qa(k,m);if(x={nalUnitType:"sei_rbsp",size:M,data:N,escapedRBSP:ev(N),trackId:y},j)x.pts=j.pts,x.dts=j.dts,I=j;else if(I)x.pts=I.pts,x.dts=I.dts;else{_.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+k+" for trackId "+y+". See mux.js#223."});break}_.seiNals.push(x);break}return _},Bt=function(h,m){var y={},v=We(h);return v.forEach(function(_){var x=_.mdat,k=_.traf,M=Ku(k,["tfhd"]),I=dh(M[0]),N=I.trackId,j=Ku(k,["tfdt"]),te=j.length>0?ch(j[0]).baseMediaDecodeTime:0,be=Ku(k,["trun"]),ue,Ie;m===N&&be.length>0&&(ue=fe(be,te,I),Ie=Zu(x,ue,N),y[N]||(y[N]={seiNals:[],logs:[]}),y[N].seiNals=y[N].seiNals.concat(Ie.seiNals),y[N].logs=y[N].logs.concat(Ie.logs))}),y},hh=function(h,m,y){var v;if(m===null)return null;v=Bt(h,m);var _=v[m]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:y}},fh=function(){var h=!1,m,y,v,_,x,k;this.isInitialized=function(){return h},this.init=function(M){m=new om,h=!0,k=M?M.isPartial:!1,m.on("data",function(I){I.startTime=I.startPts/_,I.endTime=I.endPts/_,x.captions.push(I),x.captionStreams[I.stream]=!0}),m.on("log",function(I){x.logs.push(I)})},this.isNewInit=function(M,I){return M&&M.length===0||I&&typeof I=="object"&&Object.keys(I).length===0?!1:v!==M[0]||_!==I[v]},this.parse=function(M,I,N){var j;if(this.isInitialized()){if(!I||!N)return null;if(this.isNewInit(I,N))v=I[0],_=N[v];else if(v===null||!_)return y.push(M),null}else return null;for(;y.length>0;){var te=y.shift();this.parse(te,I,N)}return j=hh(M,v,_),j&&j.logs&&(x.logs=x.logs.concat(j.logs)),j===null||!j.seiNals?x.logs.length?{logs:x.logs,captions:[],captionStreams:[]}:null:(this.pushNals(j.seiNals),this.flushStream(),x)},this.pushNals=function(M){if(!this.isInitialized()||!M||M.length===0)return null;M.forEach(function(I){m.push(I)})},this.flushStream=function(){if(!this.isInitialized())return null;k?m.partialFlush():m.flush()},this.clearParsedCaptions=function(){x.captions=[],x.captionStreams={},x.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;m.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){y=[],v=null,_=null,x?this.clearParsedCaptions():x={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},lm=fh;const{parseTfdt:ph}=sr,ar=za,{getTimescaleFromMediaHeader:mh}=pn,{parseSamples:gh,getMdatTrafPairs:yh}=uh;var ut=function(){let h=9e4;this.init=function(m){const y=ar(m,["moov","trak","mdia","mdhd"])[0];y&&(h=mh(y))},this.parseSegment=function(m){const y=[],v=yh(m);let _=0;return v.forEach(function(x){const k=x.mdat,M=x.traf,I=ar(M,["tfdt"])[0],N=ar(M,["tfhd"])[0],j=ar(M,["trun"]);if(I&&(_=ph(I).baseMediaDecodeTime),j.length&&N){const te=gh(j,_,N);let be=0;te.forEach(function(ue){const Ie="utf-8",Pe=new TextDecoder(Ie),Vt=k.slice(be,be+ue.size);if(ar(Vt,["vtte"])[0]){be+=ue.size;return}ar(Vt,["vttc"]).forEach(function(lr){const Zr=ar(lr,["payl"])[0],Xa=ar(lr,["sttg"])[0],Ya=ue.pts/h,Wa=(ue.pts+ue.duration)/h;let bt,Qa;if(Zr)try{bt=Pe.decode(Zr)}catch(Yi){console.error(Yi)}if(Xa)try{Qa=Pe.decode(Xa)}catch(Yi){console.error(Yi)}ue.duration&&bt&&y.push({cueText:bt,start:Ya,end:Wa,settings:Qa})}),be+=ue.size})}}),y}},fl=zo,$a=function(h){var m=h[1]&31;return m<<=8,m|=h[2],m},Rn=function(h){return!!(h[1]&64)},Yn=function(h){var m=0;return(h[3]&48)>>>4>1&&(m+=h[4]+1),m},Mn=function(h,m){var y=$a(h);return y===0?"pat":y===m?"pmt":m?"pes":null},vh=function(h){var m=Rn(h),y=4+Yn(h);return m&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},Ga=function(h){var m={},y=Rn(h),v=4+Yn(h);if(y&&(v+=h[v]+1),!!(h[v+5]&1)){var _,x,k;_=(h[v+1]&15)<<8|h[v+2],x=3+_-4,k=(h[v+10]&15)<<8|h[v+11];for(var M=12+k;M<x;){var I=v+M;m[(h[I+1]&31)<<8|h[I+2]]=h[I],M+=((h[I+3]&15)<<8|h[I+4])+5}return m}},bh=function(h,m){var y=$a(h),v=m[y];switch(v){case fl.H264_STREAM_TYPE:return"video";case fl.ADTS_STREAM_TYPE:return"audio";case fl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},pl=function(h){var m=Rn(h);if(!m)return null;var y=4+Yn(h);if(y>=h.byteLength)return null;var v=null,_;return _=h[y+7],_&192&&(v={},v.pts=(h[y+9]&14)<<27|(h[y+10]&255)<<20|(h[y+11]&254)<<12|(h[y+12]&255)<<5|(h[y+13]&254)>>>3,v.pts*=4,v.pts+=(h[y+13]&6)>>>1,v.dts=v.pts,_&64&&(v.dts=(h[y+14]&14)<<27|(h[y+15]&255)<<20|(h[y+16]&254)<<12|(h[y+17]&255)<<5|(h[y+18]&254)>>>3,v.dts*=4,v.dts+=(h[y+18]&6)>>>1)),v},ml=function(h){switch(h){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Ju=function(h){for(var m=4+Yn(h),y=h.subarray(m),v=0,_=0,x=!1,k;_<y.byteLength-3;_++)if(y[_+2]===1){v=_+5;break}for(;v<y.byteLength;)switch(y[v]){case 0:if(y[v-1]!==0){v+=2;break}else if(y[v-2]!==0){v++;break}_+3!==v-2&&(k=ml(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0));do v++;while(y[v]!==1&&v<y.length);_=v-2,v+=3;break;case 1:if(y[v-1]!==0||y[v-2]!==0){v+=3;break}k=ml(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0),_=v-2,v+=3;break;default:v+=3;break}return y=y.subarray(_),v-=_,_=0,y&&y.byteLength>3&&(k=ml(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0)),x},um={parseType:Mn,parsePat:vh,parsePmt:Ga,parsePayloadUnitStartIndicator:Rn,parsePesType:bh,parsePesTime:pl,videoPacketContainsKeyFrame:Ju},_h=zo,Kr=zd.handleRollover,ct={};ct.ts=um,ct.aac=Fu;var or=ot.ONE_SECOND_IN_TS,ai=188,mn=71,Th=function(h,m){for(var y=0,v=ai,_,x;v<h.byteLength;){if(h[y]===mn&&h[v]===mn){switch(_=h.subarray(y,v),x=ct.ts.parseType(_,m.pid),x){case"pat":m.pid=ct.ts.parsePat(_);break;case"pmt":var k=ct.ts.parsePmt(_);m.table=m.table||{},Object.keys(k).forEach(function(M){m.table[M]=k[M]});break}y+=ai,v+=ai;continue}y++,v++}},Sh=function(h,m,y){for(var v=0,_=ai,x,k,M,I,N,j=!1;_<=h.byteLength;){if(h[v]===mn&&(h[_]===mn||_===h.byteLength)){switch(x=h.subarray(v,_),k=ct.ts.parseType(x,m.pid),k){case"pes":M=ct.ts.parsePesType(x,m.table),I=ct.ts.parsePayloadUnitStartIndicator(x),M==="audio"&&I&&(N=ct.ts.parsePesTime(x),N&&(N.type="audio",y.audio.push(N),j=!0));break}if(j)break;v+=ai,_+=ai;continue}v++,_++}for(_=h.byteLength,v=_-ai,j=!1;v>=0;){if(h[v]===mn&&(h[_]===mn||_===h.byteLength)){switch(x=h.subarray(v,_),k=ct.ts.parseType(x,m.pid),k){case"pes":M=ct.ts.parsePesType(x,m.table),I=ct.ts.parsePayloadUnitStartIndicator(x),M==="audio"&&I&&(N=ct.ts.parsePesTime(x),N&&(N.type="audio",y.audio.push(N),j=!0));break}if(j)break;v-=ai,_-=ai;continue}v--,_--}},cm=function(h,m,y){for(var v=0,_=ai,x,k,M,I,N,j,te,be,ue=!1,Ie={data:[],size:0};_<h.byteLength;){if(h[v]===mn&&h[_]===mn){switch(x=h.subarray(v,_),k=ct.ts.parseType(x,m.pid),k){case"pes":if(M=ct.ts.parsePesType(x,m.table),I=ct.ts.parsePayloadUnitStartIndicator(x),M==="video"&&(I&&!ue&&(N=ct.ts.parsePesTime(x),N&&(N.type="video",y.video.push(N),ue=!0)),!y.firstKeyFrame)){if(I&&Ie.size!==0){for(j=new Uint8Array(Ie.size),te=0;Ie.data.length;)be=Ie.data.shift(),j.set(be,te),te+=be.byteLength;if(ct.ts.videoPacketContainsKeyFrame(j)){var Pe=ct.ts.parsePesTime(j);Pe?(y.firstKeyFrame=Pe,y.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Ie.size=0}Ie.data.push(x),Ie.size+=x.byteLength}break}if(ue&&y.firstKeyFrame)break;v+=ai,_+=ai;continue}v++,_++}for(_=h.byteLength,v=_-ai,ue=!1;v>=0;){if(h[v]===mn&&h[_]===mn){switch(x=h.subarray(v,_),k=ct.ts.parseType(x,m.pid),k){case"pes":M=ct.ts.parsePesType(x,m.table),I=ct.ts.parsePayloadUnitStartIndicator(x),M==="video"&&I&&(N=ct.ts.parsePesTime(x),N&&(N.type="video",y.video.push(N),ue=!0));break}if(ue)break;v-=ai,_-=ai;continue}v--,_--}},dm=function(h,m){if(h.audio&&h.audio.length){var y=m;(typeof y>"u"||isNaN(y))&&(y=h.audio[0].dts),h.audio.forEach(function(x){x.dts=Kr(x.dts,y),x.pts=Kr(x.pts,y),x.dtsTime=x.dts/or,x.ptsTime=x.pts/or})}if(h.video&&h.video.length){var v=m;if((typeof v>"u"||isNaN(v))&&(v=h.video[0].dts),h.video.forEach(function(x){x.dts=Kr(x.dts,v),x.pts=Kr(x.pts,v),x.dtsTime=x.dts/or,x.ptsTime=x.pts/or}),h.firstKeyFrame){var _=h.firstKeyFrame;_.dts=Kr(_.dts,v),_.pts=Kr(_.pts,v),_.dtsTime=_.dts/or,_.ptsTime=_.pts/or}}},tv=function(h){for(var m=!1,y=0,v=null,_=null,x=0,k=0,M;h.length-k>=3;){var I=ct.aac.parseType(h,k);switch(I){case"timed-metadata":if(h.length-k<10){m=!0;break}if(x=ct.aac.parseId3TagSize(h,k),x>h.length){m=!0;break}_===null&&(M=h.subarray(k,k+x),_=ct.aac.parseAacTimestamp(M)),k+=x;break;case"audio":if(h.length-k<7){m=!0;break}if(x=ct.aac.parseAdtsSize(h,k),x>h.length){m=!0;break}v===null&&(M=h.subarray(k,k+x),v=ct.aac.parseSampleRate(M)),y++,k+=x;break;default:k++;break}if(m)return null}if(v===null||_===null)return null;var N=or/v,j={audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+y*1024*N,pts:_+y*1024*N}]};return j},hm=function(h){var m={pid:null,table:null},y={};Th(h,m);for(var v in m.table)if(m.table.hasOwnProperty(v)){var _=m.table[v];switch(_){case _h.H264_STREAM_TYPE:y.video=[],cm(h,m,y),y.video.length===0&&delete y.video;break;case _h.ADTS_STREAM_TYPE:y.audio=[],Sh(h,m,y),y.audio.length===0&&delete y.audio;break}}return y},fm=function(h,m){var y=ct.aac.isLikelyAacData(h),v;return y?v=tv(h):v=hm(h),!v||!v.audio&&!v.video?null:(dm(v,m),v)},pm={inspect:fm,parseAudioPes_:Sh};const xh=function(h,m){m.on("data",function(y){const v=y.initSegment;y.initSegment={data:v.buffer,byteOffset:v.byteOffset,byteLength:v.byteLength};const _=y.data;y.data=_.buffer,h.postMessage({action:"data",segment:y,byteOffset:_.byteOffset,byteLength:_.byteLength},[y.data])}),m.on("done",function(y){h.postMessage({action:"done"})}),m.on("gopInfo",function(y){h.postMessage({action:"gopInfo",gopInfo:y})}),m.on("videoSegmentTimingInfo",function(y){const v={start:{decode:ot.videoTsToSeconds(y.start.dts),presentation:ot.videoTsToSeconds(y.start.pts)},end:{decode:ot.videoTsToSeconds(y.end.dts),presentation:ot.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:ot.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=ot.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:v})}),m.on("audioSegmentTimingInfo",function(y){const v={start:{decode:ot.videoTsToSeconds(y.start.dts),presentation:ot.videoTsToSeconds(y.start.pts)},end:{decode:ot.videoTsToSeconds(y.end.dts),presentation:ot.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:ot.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=ot.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:v})}),m.on("id3Frame",function(y){h.postMessage({action:"id3Frame",id3Frame:y})}),m.on("caption",function(y){h.postMessage({action:"caption",caption:y})}),m.on("trackinfo",function(y){h.postMessage({action:"trackinfo",trackInfo:y})}),m.on("audioTimingInfo",function(y){h.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ot.videoTsToSeconds(y.start),end:ot.videoTsToSeconds(y.end)}})}),m.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ot.videoTsToSeconds(y.start),end:ot.videoTsToSeconds(y.end)}})}),m.on("log",function(y){h.postMessage({action:"log",log:y})})};class Eh{constructor(m,y){this.options=y||{},this.self=m,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new im.Transmuxer(this.options),xh(this.self,this.transmuxer)}pushMp4Captions(m){this.captionParser||(this.captionParser=new lm,this.captionParser.init());const y=new Uint8Array(m.data,m.byteOffset,m.byteLength),v=this.captionParser.parse(y,m.trackIds,m.timescales);this.self.postMessage({action:"mp4Captions",captions:v&&v.captions||[],logs:v&&v.logs||[],data:y.buffer},[y.buffer])}initMp4WebVttParser(m){this.webVttParser||(this.webVttParser=new ut);const y=new Uint8Array(m.data,m.byteOffset,m.byteLength);this.webVttParser.init(y)}getMp4WebVttText(m){this.webVttParser||(this.webVttParser=new ut);const y=new Uint8Array(m.data,m.byteOffset,m.byteLength),v=this.webVttParser.parseSegment(y);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:v||[],data:y.buffer},[y.buffer])}probeMp4StartTime({timescales:m,data:y}){const v=pn.startTime(m,y);this.self.postMessage({action:"probeMp4StartTime",startTime:v,data:y},[y.buffer])}probeMp4Tracks({data:m}){const y=pn.tracks(m);this.self.postMessage({action:"probeMp4Tracks",tracks:y,data:m},[m.buffer])}probeEmsgID3({data:m,offset:y}){const v=pn.getEmsgID3(m,y);this.self.postMessage({action:"probeEmsgID3",id3Frames:v,emsgData:m},[m.buffer])}probeTs({data:m,baseStartTime:y}){const v=typeof y=="number"&&!isNaN(y)?y*ot.ONE_SECOND_IN_TS:void 0,_=pm.inspect(m,v);let x=null;_&&(x={hasVideo:_.video&&_.video.length===2||!1,hasAudio:_.audio&&_.audio.length===2||!1},x.hasVideo&&(x.videoStart=_.video[0].ptsTime),x.hasAudio&&(x.audioStart=_.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:x,data:m},[m.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(m){const y=new Uint8Array(m.data,m.byteOffset,m.byteLength);this.transmuxer.push(y)}reset(){this.transmuxer.reset()}setTimestampOffset(m){const y=m.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ot.secondsToVideoTs(y)))}setAudioAppendStart(m){this.transmuxer.setAudioAppendStart(Math.ceil(ot.secondsToVideoTs(m.appendStart)))}setRemux(m){this.transmuxer.setRemux(m.remux)}flush(m){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(m){this.transmuxer.alignGopsWith(m.gopsToAlignWith.slice())}}self.onmessage=function(h){if(h.data.action==="init"&&h.data.options){this.messageHandlers=new Eh(self,h.data.options);return}this.messageHandlers||(this.messageHandlers=new Eh(self)),h.data&&h.data.action&&h.data.action!=="init"&&this.messageHandlers[h.data.action]&&this.messageHandlers[h.data.action](h.data)}}));var ZR=VS(KR);const JR=(s,e,i)=>{const{type:r,initSegment:o,captions:u,captionStreams:c,metadata:p,videoFrameDtsTime:g,videoFramePtsTime:b}=s.data.segment;e.buffer.push({captions:u,captionStreams:c,metadata:p});const S=s.data.segment.boxes||{data:s.data.segment.data},E={type:r,data:new Uint8Array(S.data,S.data.byteOffset,S.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};typeof g<"u"&&(E.videoFrameDtsTime=g),typeof b<"u"&&(E.videoFramePtsTime=b),i(E)},e8=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},t8=(s,e)=>{e.gopInfo=s.data.gopInfo},GS=s=>{const{transmuxer:e,bytes:i,audioAppendStart:r,gopsToAlignWith:o,remux:u,onData:c,onTrackInfo:p,onAudioTimingInfo:g,onVideoTimingInfo:b,onVideoSegmentTimingInfo:S,onAudioSegmentTimingInfo:E,onId3:A,onCaptions:R,onDone:P,onEndedTimeline:w,onTransmuxerLog:z,isEndOfTimeline:H,segment:X,triggerSegmentEventFn:$}=s,W={buffer:[]};let Z=H;const le=Y=>{e.currentTransmux===s&&(Y.data.action==="data"&&JR(Y,W,c),Y.data.action==="trackinfo"&&p(Y.data.trackInfo),Y.data.action==="gopInfo"&&t8(Y,W),Y.data.action==="audioTimingInfo"&&g(Y.data.audioTimingInfo),Y.data.action==="videoTimingInfo"&&b(Y.data.videoTimingInfo),Y.data.action==="videoSegmentTimingInfo"&&S(Y.data.videoSegmentTimingInfo),Y.data.action==="audioSegmentTimingInfo"&&E(Y.data.audioSegmentTimingInfo),Y.data.action==="id3Frame"&&A([Y.data.id3Frame],Y.data.id3Frame.dispatchType),Y.data.action==="caption"&&R(Y.data.caption),Y.data.action==="endedtimeline"&&(Z=!1,w()),Y.data.action==="log"&&z(Y.data.log),Y.data.type==="transmuxed"&&(Z||(e.onmessage=null,e8({transmuxedData:W,callback:P}),XS(e))))},J=()=>{const Y={message:"Received an error message from the transmuxer worker",metadata:{errorType:q.Error.StreamingFailedToTransmuxSegment,segmentInfo:Po({segment:X})}};P(null,Y)};if(e.onmessage=le,e.onerror=J,r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(o)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof u<"u"&&e.postMessage({action:"setRemux",remux:u}),i.byteLength){const Y=i instanceof ArrayBuffer?i:i.buffer,ee=i instanceof ArrayBuffer?0:i.byteOffset;$({type:"segmenttransmuxingstart",segment:X}),e.postMessage({action:"push",data:Y,byteOffset:ee,byteLength:i.byteLength},[Y])}H&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},XS=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():GS(s.currentTransmux))},YS=(s,e)=>{s.postMessage({action:e}),XS(s)},WS=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,YS(e,s);return}e.transmuxQueue.push(YS.bind(null,e,s))},i8=s=>{WS("reset",s)},n8=s=>{WS("endTimeline",s)},QS=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,GS(s);return}s.transmuxer.transmuxQueue.push(s)};var Dy={reset:i8,endTimeline:n8,transmux:QS,createTransmuxer:s=>{const e=new ZR;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:s}),e}};const _u=function(s){const e=s.transmuxer,i=s.endAction||s.action,r=s.callback,o=Ft({},s,{endAction:null,transmuxer:null,callback:null}),u=c=>{c.data.action===i&&(e.removeEventListener("message",u),c.data.data&&(c.data.data=new Uint8Array(c.data.data,s.byteOffset||0,s.byteLength||c.data.data.byteLength),s.data&&(s.data=c.data.data)),r(c.data))};if(e.addEventListener("message",u),s.data){const c=s.data instanceof ArrayBuffer;o.byteOffset=c?0:s.data.byteOffset,o.byteLength=s.data.byteLength;const p=[c?s.data:s.data.buffer];e.postMessage(o,p)}else e.postMessage(o)},zs={FAILURE:2,TIMEOUT:-101,ABORTED:-102},KS="wvtt",ky=s=>{s.forEach(e=>{e.abort()})},s8=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),r8=s=>{const e=s.target,r={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return r.bytesReceived=s.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},Oy=(s,e)=>{const{requestType:i}=e,r=No({requestType:i,request:e,error:s});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:zs.TIMEOUT,xhr:e,metadata:r}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:zs.ABORTED,xhr:e,metadata:r}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:zs.FAILURE,xhr:e,metadata:r}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:zs.FAILURE,xhr:e,metadata:r}:null},ZS=(s,e,i,r)=>(o,u)=>{const c=u.response,p=Oy(o,u);if(p)return i(p,s);if(c.byteLength!==16)return i({status:u.status,message:"Invalid HLS key at URL: "+u.uri,code:zs.FAILURE,xhr:u},s);const g=new DataView(c),b=new Uint32Array([g.getUint32(0),g.getUint32(4),g.getUint32(8),g.getUint32(12)]);for(let E=0;E<e.length;E++)e[E].bytes=b;const S={uri:u.uri};return r({type:"segmentkeyloadcomplete",segment:s,keyInfo:S}),i(null,s)},a8=(s,e)=>{e===KS&&s.transmuxer.postMessage({action:"initMp4WebVttParser",data:s.map.bytes})},o8=(s,e,i)=>{e===KS&&_u({action:"getMp4WebVttText",data:s.bytes,transmuxer:s.transmuxer,callback:({data:r,mp4VttCues:o})=>{s.bytes=r,i(null,s,{mp4VttCues:o})}})},JS=(s,e)=>{const i=m0(s.map.bytes);if(i!=="mp4"){const r=s.map.resolvedUri||s.map.uri,o=i||"unknown";return e({internal:!0,message:`Found unsupported ${o} container for initialization segment at URL: ${r}`,code:zs.FAILURE,metadata:{mediaType:o}})}_u({action:"probeMp4Tracks",data:s.map.bytes,transmuxer:s.transmuxer,callback:({tracks:r,data:o})=>(s.map.bytes=o,r.forEach(function(u){s.map.tracks=s.map.tracks||{},!s.map.tracks[u.type]&&(s.map.tracks[u.type]=u,typeof u.id=="number"&&u.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[u.id]=u.timescale),u.type==="text"&&a8(s,u.codec))}),e(null))})},l8=({segment:s,finishProcessingFn:e,triggerSegmentEventFn:i})=>(r,o)=>{const u=Oy(r,o);if(u)return e(u,s);const c=new Uint8Array(o.response);if(i({type:"segmentloaded",segment:s}),s.map.key)return s.map.encryptedBytes=c,e(null,s);s.map.bytes=c,JS(s,function(p){if(p)return p.xhr=o,p.status=o.status,e(p,s);e(null,s)})},u8=({segment:s,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:r})=>(o,u)=>{const c=Oy(o,u);if(c)return e(c,s);r({type:"segmentloaded",segment:s});const p=i==="arraybuffer"||!u.responseText?u.response:WR(u.responseText.substring(s.lastReachedChar||0));return s.stats=s8(u),s.key?s.encryptedBytes=new Uint8Array(p):s.bytes=new Uint8Array(p),e(null,s)},c8=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{const P=s.map&&s.map.tracks||{},w=!!(P.audio&&P.video);let z=r.bind(null,s,"audio","start");const H=r.bind(null,s,"audio","end");let X=r.bind(null,s,"video","start");const $=r.bind(null,s,"video","end"),W=()=>QS({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:w,onData:Z=>{Z.type=Z.type==="combined"?"video":Z.type,S(s,Z)},onTrackInfo:Z=>{i&&(w&&(Z.isMuxed=!0),i(s,Z))},onAudioTimingInfo:Z=>{z&&typeof Z.start<"u"&&(z(Z.start),z=null),H&&typeof Z.end<"u"&&H(Z.end)},onVideoTimingInfo:Z=>{X&&typeof Z.start<"u"&&(X(Z.start),X=null),$&&typeof Z.end<"u"&&$(Z.end)},onVideoSegmentTimingInfo:Z=>{const le={pts:{start:Z.start.presentation,end:Z.end.presentation},dts:{start:Z.start.decode,end:Z.end.decode}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:le}),o(Z)},onAudioSegmentTimingInfo:Z=>{const le={pts:{start:Z.start.pts,end:Z.end.pts},dts:{start:Z.start.dts,end:Z.end.dts}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:le}),u(Z)},onId3:(Z,le)=>{c(s,Z,le)},onCaptions:Z=>{p(s,[Z])},isEndOfTimeline:g,onEndedTimeline:()=>{b()},onTransmuxerLog:A,onDone:(Z,le)=>{E&&(Z.type=Z.type==="combined"?"video":Z.type,R({type:"segmenttransmuxingcomplete",segment:s}),E(le,s,Z))},segment:s,triggerSegmentEventFn:R});_u({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:Z=>{s.bytes=e=Z.data;const le=Z.result;le&&(i(s,{hasAudio:le.hasAudio,hasVideo:le.hasVideo,isMuxed:w}),i=null),W()}})},ex=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{let P=new Uint8Array(e);if(BO(P)){s.isFmp4=!0;const{tracks:w}=s.map;if(w.text&&(!w.audio||!w.video)){S(s,{data:P,type:"text"}),o8(s,w.text.codec,E);return}const H={isFmp4:!0,hasVideo:!!w.video,hasAudio:!!w.audio};w.audio&&w.audio.codec&&w.audio.codec!=="enca"&&(H.audioCodec=w.audio.codec),w.video&&w.video.codec&&w.video.codec!=="encv"&&(H.videoCodec=w.video.codec),w.video&&w.audio&&(H.isMuxed=!0),i(s,H);const X=($,W)=>{S(s,{data:P,type:H.hasAudio&&!H.isMuxed?"audio":"video"}),W&&W.length&&c(s,W),$&&$.length&&p(s,$),E(null,s,{})};_u({action:"probeMp4StartTime",timescales:s.map.timescales,data:P,transmuxer:s.transmuxer,callback:({data:$,startTime:W})=>{e=$.buffer,s.bytes=P=$,H.hasAudio&&!H.isMuxed&&r(s,"audio","start",W),H.hasVideo&&r(s,"video","start",W),_u({action:"probeEmsgID3",data:P,transmuxer:s.transmuxer,offset:W,callback:({emsgData:Z,id3Frames:le})=>{if(e=Z.buffer,s.bytes=P=Z,!w.video||!Z.byteLength||!s.transmuxer){X(void 0,le);return}_u({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:P,timescales:s.map.timescales,trackIds:[w.video.id],callback:J=>{e=J.data.buffer,s.bytes=P=J.data,J.logs.forEach(function(Y){A(pt(Y,{stream:"mp4CaptionParser"}))}),X(J.captions,le)}})}})}});return}if(!s.transmuxer){E(null,s,{});return}if(typeof s.container>"u"&&(s.container=m0(P)),s.container!=="ts"&&s.container!=="aac"){i(s,{hasAudio:!1,hasVideo:!1}),E(null,s,{});return}c8({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})},tx=function({id:s,key:e,encryptedBytes:i,decryptionWorker:r,segment:o,doneFn:u},c){const p=b=>{if(b.data.source===s){r.removeEventListener("message",p);const S=b.data.decrypted;c(new Uint8Array(S.bytes,S.byteOffset,S.byteLength))}};r.onerror=()=>{const b="An error occurred in the decryption worker",S=Po({segment:o}),E={message:b,metadata:{error:new Error(b),errorType:q.Error.StreamingFailedToDecryptSegment,segmentInfo:S,keyInfo:{uri:o.key.resolvedUri||o.map.key.resolvedUri}}};u(E,o)},r.addEventListener("message",p);let g;e.bytes.slice?g=e.bytes.slice():g=new Uint32Array(Array.prototype.slice.call(e.bytes)),r.postMessage(NS({source:s,encrypted:i,key:g,iv:e.iv}),[i.buffer,g.buffer])},d8=({decryptionWorker:s,segment:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{R({type:"segmentdecryptionstart"}),tx({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s,segment:e,doneFn:E},P=>{e.bytes=P,R({type:"segmentdecryptioncomplete",segment:e}),ex({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})})},h8=({activeXhrs:s,decryptionWorker:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{let P=0,w=!1;return(z,H)=>{if(!w){if(z)return w=!0,ky(s),E(z,H);if(P+=1,P===s.length){const X=function(){if(H.encryptedBytes)return d8({decryptionWorker:e,segment:H,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R});ex({segment:H,bytes:H.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})};if(H.endOfAllRequests=Date.now(),H.map&&H.map.encryptedBytes&&!H.map.bytes)return R({type:"segmentdecryptionstart",segment:H}),tx({decryptionWorker:e,id:H.requestId+"-init",encryptedBytes:H.map.encryptedBytes,key:H.map.key,segment:H,doneFn:E},$=>{H.map.bytes=$,R({type:"segmentdecryptioncomplete",segment:H}),JS(H,W=>{if(W)return ky(s),E(W,H);X()})});X()}}}},f8=({loadendState:s,abortFn:e})=>i=>{i.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},p8=({segment:s,progressFn:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:p,isEndOfTimeline:g,endedTimelineFn:b,dataFn:S})=>E=>{if(!E.target.aborted)return s.stats=pt(s.stats,r8(E)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(E,s)},m8=({xhr:s,xhrOptions:e,decryptionWorker:i,segment:r,abortFn:o,progressFn:u,trackInfoFn:c,timingInfoFn:p,videoSegmentTimingInfoFn:g,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:P,doneFn:w,onTransmuxerLog:z,triggerSegmentEventFn:H})=>{const X=[],$=h8({activeXhrs:X,decryptionWorker:i,trackInfoFn:c,timingInfoFn:p,videoSegmentTimingInfoFn:g,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:P,doneFn:w,onTransmuxerLog:z,triggerSegmentEventFn:H});if(r.key&&!r.key.bytes){const Y=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&Y.push(r.map.key);const ee=pt(e,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),ve=ZS(r,Y,$,H),de={uri:r.key.resolvedUri};H({type:"segmentkeyloadstart",segment:r,keyInfo:de});const ge=s(ee,ve);X.push(ge)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const ge=pt(e,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),pe=ZS(r,[r.map.key],$,H),Oe={uri:r.map.key.resolvedUri};H({type:"segmentkeyloadstart",segment:r,keyInfo:Oe});const nt=s(ge,pe);X.push(nt)}const ee=pt(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Cy(r.map),requestType:"segment-media-initialization"}),ve=l8({segment:r,finishProcessingFn:$,triggerSegmentEventFn:H});H({type:"segmentloadstart",segment:r});const de=s(ee,ve);X.push(de)}const W=pt(e,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Cy(r),requestType:"segment"}),Z=u8({segment:r,finishProcessingFn:$,responseType:W.responseType,triggerSegmentEventFn:H});H({type:"segmentloadstart",segment:r});const le=s(W,Z);le.addEventListener("progress",p8({segment:r,progressFn:u,trackInfoFn:c,timingInfoFn:p,videoSegmentTimingInfoFn:g,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:P})),X.push(le);const J={};return X.forEach(Y=>{Y.addEventListener("loadend",f8({loadendState:J,abortFn:o}))}),()=>ky(X)},Np=$n("PlaylistSelector"),ix=function(s){if(!s||!s.playlist)return;const e=s.playlist;return JSON.stringify({id:e.id,bandwidth:s.bandwidth,width:s.width,height:s.height,codecs:e.attributes&&e.attributes.CODECS||""})},Tu=function(s,e){if(!s)return"";const i=U.getComputedStyle(s);return i?i[e]:""},Su=function(s,e){const i=s.slice();s.sort(function(r,o){const u=e(r,o);return u===0?i.indexOf(r)-i.indexOf(o):u})},Ry=function(s,e){let i,r;return s.attributes.BANDWIDTH&&(i=s.attributes.BANDWIDTH),i=i||U.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||U.Number.MAX_VALUE,i-r},g8=function(s,e){let i,r;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(i=s.attributes.RESOLUTION.width),i=i||U.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||U.Number.MAX_VALUE,i===r&&s.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?s.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-r};let nx=function(s){const{main:e,bandwidth:i,playerWidth:r,playerHeight:o,playerObjectFit:u,limitRenditionByPlayerDimensions:c,playlistController:p}=s;if(!e)return;const g={bandwidth:i,width:r,height:o,limitRenditionByPlayerDimensions:c};let b=e.playlists;un.isAudioOnly(e)&&(b=p.getAudioTrackPlaylists_(),g.audioOnly=!0);let S=b.map(J=>{let Y;const ee=J.attributes&&J.attributes.RESOLUTION&&J.attributes.RESOLUTION.width,ve=J.attributes&&J.attributes.RESOLUTION&&J.attributes.RESOLUTION.height;return Y=J.attributes&&J.attributes.BANDWIDTH,Y=Y||U.Number.MAX_VALUE,{bandwidth:Y,width:ee,height:ve,playlist:J}});Su(S,(J,Y)=>J.bandwidth-Y.bandwidth),S=S.filter(J=>!un.isIncompatible(J.playlist));let E=S.filter(J=>un.isEnabled(J.playlist));E.length||(E=S.filter(J=>!un.isDisabled(J.playlist)));const A=E.filter(J=>J.bandwidth*fi.BANDWIDTH_VARIANCE<i);let R=A[A.length-1];const P=A.filter(J=>J.bandwidth===R.bandwidth)[0];if(c===!1){const J=P||E[0]||S[0];if(J&&J.playlist){let Y="sortedPlaylistReps";return P&&(Y="bandwidthBestRep"),E[0]&&(Y="enabledPlaylistReps"),Np(`choosing ${ix(J)} using ${Y} with options`,g),J.playlist}return Np("could not choose a playlist with options",g),null}const w=A.filter(J=>J.width&&J.height);Su(w,(J,Y)=>J.width-Y.width);const z=w.filter(J=>J.width===r&&J.height===o);R=z[z.length-1];const H=z.filter(J=>J.bandwidth===R.bandwidth)[0];let X,$,W;H||(X=w.filter(J=>u==="cover"?J.width>r&&J.height>o:J.width>r||J.height>o),$=X.filter(J=>J.width===X[0].width&&J.height===X[0].height),R=$[$.length-1],W=$.filter(J=>J.bandwidth===R.bandwidth)[0]);let Z;if(p.leastPixelDiffSelector){const J=w.map(Y=>(Y.pixelDiff=Math.abs(Y.width-r)+Math.abs(Y.height-o),Y));Su(J,(Y,ee)=>Y.pixelDiff===ee.pixelDiff?ee.bandwidth-Y.bandwidth:Y.pixelDiff-ee.pixelDiff),Z=J[0]}const le=Z||W||H||P||E[0]||S[0];if(le&&le.playlist){let J="sortedPlaylistReps";return Z?J="leastPixelDiffRep":W?J="resolutionPlusOneRep":H?J="resolutionBestRep":P?J="bandwidthBestRep":E[0]&&(J="enabledPlaylistReps"),Np(`choosing ${ix(le)} using ${J} with options`,g),le.playlist}return Np("could not choose a playlist with options",g),null};const sx=function(){let s=this.useDevicePixelRatio&&U.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),nx({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Tu(this.tech_.el(),"width"),10)*s,playerHeight:parseInt(Tu(this.tech_.el(),"height"),10)*s,playerObjectFit:this.usePlayerObjectFit?Tu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},y8=function(s){let e=-1,i=-1;if(s<0||s>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let r=this.useDevicePixelRatio&&U.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=s*this.systemBandwidth+(1-s)*e,i=this.systemBandwidth),nx({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(Tu(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(Tu(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?Tu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},v8=function(s){const{main:e,currentTime:i,bandwidth:r,duration:o,segmentDuration:u,timeUntilRebuffer:c,currentTimeline:p,syncController:g}=s,b=e.playlists.filter(P=>!un.isIncompatible(P));let S=b.filter(un.isEnabled);S.length||(S=b.filter(P=>!un.isDisabled(P)));const A=S.filter(un.hasAttribute.bind(null,"BANDWIDTH")).map(P=>{const z=g.getSyncPoint(P,o,p,i)?1:2,X=un.estimateSegmentRequestTime(u,r,P)*z-c;return{playlist:P,rebufferingImpact:X}}),R=A.filter(P=>P.rebufferingImpact<=0);return Su(R,(P,w)=>Ry(w.playlist,P.playlist)),R.length?R[0]:(Su(A,(P,w)=>P.rebufferingImpact-w.rebufferingImpact),A[0]||null)},b8=function(){const s=this.playlists.main.playlists.filter(un.isEnabled);return Su(s,(i,r)=>Ry(i,r)),s.filter(i=>!!Md(this.playlists.main,i).video)[0]||null},_8=s=>{let e=0,i;return s.bytes&&(i=new Uint8Array(s.bytes),s.segments.forEach(r=>{i.set(r,e),e+=r.byteLength})),i};function rx(s){try{return new URL(s).pathname.split("/").slice(-2).join("/")}catch{return""}}const T8=function(s,e,i){if(!s[i]){e.trigger({type:"usage",name:"vhs-608"});let r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);const o=e.textTracks().getTrackById(r);if(o)s[i]=o;else{const u=e.options_.vhs&&e.options_.vhs.captionServices||{};let c=i,p=i,g=!1;const b=u[r];b&&(c=b.label,p=b.language,g=b.default),s[i]=e.addRemoteTextTrack({kind:"captions",id:r,default:g,label:c,language:p},!1).track}}},S8=function({inbandTextTracks:s,captionArray:e,timestampOffset:i}){if(!e)return;const r=U.WebKitDataCue||U.VTTCue;e.forEach(o=>{const u=o.stream;o.content?o.content.forEach(c=>{const p=new r(o.startTime+i,o.endTime+i,c.text);p.line=c.line,p.align="left",p.position=c.position,p.positionAlign="line-left",s[u].addCue(p)}):s[u].addCue(new r(o.startTime+i,o.endTime+i,o.text))})},x8=function(s){Object.defineProperties(s.frame,{id:{get(){return q.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return q.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return q.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},E8=({inbandTextTracks:s,metadataArray:e,timestampOffset:i,videoDuration:r})=>{if(!e)return;const o=U.WebKitDataCue||U.VTTCue,u=s.metadataTrack_;if(!u||(e.forEach(S=>{const E=S.cueTime+i;typeof E!="number"||U.isNaN(E)||E<0||!(E<1/0)||!S.frames||!S.frames.length||S.frames.forEach(A=>{const R=new o(E,E,A.value||A.url||A.data||"");R.frame=A,R.value=A,x8(R),u.addCue(R)})}),!u.cues||!u.cues.length))return;const c=u.cues,p=[];for(let S=0;S<c.length;S++)c[S]&&p.push(c[S]);const g=p.reduce((S,E)=>{const A=S[E.startTime]||[];return A.push(E),S[E.startTime]=A,S},{}),b=Object.keys(g).sort((S,E)=>Number(S)-Number(E));b.forEach((S,E)=>{const A=g[S],R=isFinite(r)?r:S,P=Number(b[E+1])||R;A.forEach(w=>{w.endTime=P})})},C8={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},A8=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),w8=({inbandTextTracks:s,dateRanges:e})=>{const i=s.metadataTrack_;if(!i)return;const r=U.WebKitDataCue||U.VTTCue;e.forEach(o=>{for(const u of Object.keys(o)){if(A8.has(u))continue;const c=new r(o.startTime,o.endTime,"");c.id=o.id,c.type="com.apple.quicktime.HLS",c.value={key:C8[u],data:o[u]},(u==="scte35Out"||u==="scte35In")&&(c.value.data=new Uint8Array(c.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(c)}o.processDateRange()})},ax=(s,e,i)=>{s.metadataTrack_||(s.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,q.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},Ld=function(s,e,i){let r,o;if(i&&i.cues)for(r=i.cues.length;r--;)o=i.cues[r],o.startTime>=s&&o.endTime<=e&&i.removeCue(o)},D8=function(s){const e=s.cues;if(!e)return;const i={};for(let r=e.length-1;r>=0;r--){const o=e[r],u=`${o.startTime}-${o.endTime}-${o.text}`;i[u]?s.removeCue(o):i[u]=o}},k8=(s,e,i)=>{if(typeof e>"u"||e===null||!s.length)return[];const r=Math.ceil((e-i+3)*Ao.ONE_SECOND_IN_TS);let o;for(o=0;o<s.length&&!(s[o].pts>r);o++);return s.slice(o)},O8=(s,e,i)=>{if(!e.length)return s;if(i)return e.slice();const r=e[0].pts;let o=0;for(o;o<s.length&&!(s[o].pts>=r);o++);return s.slice(0,o).concat(e)},R8=(s,e,i,r)=>{const o=Math.ceil((e-r)*Ao.ONE_SECOND_IN_TS),u=Math.ceil((i-r)*Ao.ONE_SECOND_IN_TS),c=s.slice();let p=s.length;for(;p--&&!(s[p].pts<=u););if(p===-1)return c;let g=p+1;for(;g--&&!(s[g].pts<=o););return g=Math.max(g,0),c.splice(g,p-g+1),c},M8=function(s,e){if(!s&&!e||!s&&e||s&&!e)return!1;if(s===e)return!0;const i=Object.keys(s).sort(),r=Object.keys(e).sort();if(i.length!==r.length)return!1;for(let o=0;o<i.length;o++){const u=i[o];if(u!==r[o]||s[u]!==e[u])return!1}return!0},L8=function(s,e,i){e=e||[];const r=[];let o=0;for(let u=0;u<e.length;u++){const c=e[u];if(s===c.timeline&&(r.push(u),o+=c.duration,o>i))return u}return r.length===0?0:r[r.length-1]},Id=1,I8=500,ox=s=>typeof s=="number"&&isFinite(s),Pp=1/60,N8=(s,e,i)=>s!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,P8=(s,e,i)=>{let r=e-fi.BACK_BUFFER_LENGTH;s.length&&(r=Math.max(r,s.start(0)));const o=e-i;return Math.min(o,r)},xu=s=>{const{startOfSegment:e,duration:i,segment:r,part:o,playlist:{mediaSequence:u,id:c,segments:p=[]},mediaIndex:g,partIndex:b,timeline:S}=s,E=p.length-1;let A="mediaIndex/partIndex increment";s.getMediaInfoForTime?A=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(A="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(A+=` with independent ${s.independent}`);const R=typeof b=="number",P=s.segment.uri?"segment":"pre-segment",w=R?fS({preloadSegment:r})-1:0;return`${P} [${u+g}/${u+E}]`+(R?` part [${b}/${w}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(R?` part start/end [${o.start} => ${o.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${S}] selected by [${A}] playlist [${c}]`},lx=s=>`${s}TimingInfo`,U8=({segmentTimeline:s,currentTimeline:e,startOfSegment:i,buffered:r,overrideCheck:o})=>!o&&s===e?null:s<e?i:r.length?r.end(r.length-1):i,My=({timelineChangeController:s,currentTimeline:e,segmentTimeline:i,loaderType:r,audioDisabled:o})=>{if(e===i)return!1;if(r==="audio"){const u=s.lastTimelineChange({type:"main"});return!u||u.to!==i}if(r==="main"&&o){const u=s.pendingTimelineChange({type:"audio"});return!(u&&u.to===i)}return!1},B8=s=>{if(!s)return!1;const e=s.pendingTimelineChange({type:"audio"}),i=s.pendingTimelineChange({type:"main"}),r=e&&i,o=r&&e.to!==i.to;return!!(r&&e.from!==-1&&i.from!==-1&&o)},F8=s=>{const e=s.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=s.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},ka=s=>{const e=s.pendingSegment_;if(!e)return;if(My({timelineChangeController:s.timelineChangeController_,currentTimeline:s.currentTimeline_,segmentTimeline:e.timeline,loaderType:s.loaderType_,audioDisabled:s.audioDisabled_})&&B8(s.timelineChangeController_)){if(F8(s)){s.timelineChangeController_.trigger("audioTimelineBehind");return}s.timelineChangeController_.trigger("fixBadTimelineChange")}},H8=s=>{let e=0;return["video","audio"].forEach(function(i){const r=s[`${i}TimingInfo`];if(!r)return;const{start:o,end:u}=r;let c;typeof o=="bigint"||typeof u=="bigint"?c=U.BigInt(u)-U.BigInt(o):typeof o=="number"&&typeof u=="number"&&(c=u-o),typeof c<"u"&&c>e&&(e=c)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},ux=({segmentDuration:s,maxDuration:e})=>s?Math.round(s)>e+Fs:!1,z8=(s,e)=>{if(e!=="hls")return null;const i=H8({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!i)return null;const r=s.playlist.targetDuration,o=ux({segmentDuration:i,maxDuration:r*2}),u=ux({segmentDuration:i,maxDuration:r}),c=`Segment with index ${s.mediaIndex} from playlist ${s.playlist.id} has a duration of ${i} when the reported duration is ${s.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return o||u?{severity:o?"warn":"info",message:c}:null},Po=({type:s,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),r=!!(e.map&&!e.map.bytes),o=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:s||e.type,uri:e.resolvedUri||e.uri,start:o,duration:e.duration,isEncrypted:i,isMediaInitialization:r}};class Ly extends q.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=$n(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(r){r!==this.state_&&(this.logger_(`${this.state_} -> ${r}`),this.state_=r,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ka(this)}),this.sourceUpdater_.on("codecschange",r=>{this.trigger(Ft({type:"codecschange"},r))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ka(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",r=>{this.trigger(Ft({type:"timelinechange"},r)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():ka(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ka(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Dy.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&U.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,U.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Dy.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return hi();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:r,isMuxed:o}=e;if(r&&i&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(r)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const r=Ip(e);let o=this.initSegments_[r];return i&&!o&&e.bytes&&(this.initSegments_[r]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e}segmentKey(e,i=!1){if(!e)return null;const r=PS(e);let o=this.keyCache_[r];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[r]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});const u={resolvedUri:(o||e).resolvedUri};return o&&(u.bytes=o.bytes),u}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const r=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let u=null;if(r&&(r.id?u=r.id:r.uri&&(u=r.uri)),this.logger_(`playlist update [${u} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
|
||
currentTime: ${this.currentTime_()}
|
||
bufferedEnd: ${my(this.buffered_())}
|
||
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!r||r.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const c=e.mediaSequence-r.mediaSequence;if(this.logger_(`live window shift [${c}]`),this.mediaIndex!==null)if(this.mediaIndex-=c,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const p=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!p.parts||!p.parts.length||!p.parts[this.partIndex])){const g=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=g}}o&&(o.mediaIndex-=c,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,e)}pause(){this.checkBufferTimeout_&&(U.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Dy.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,i,r=()=>{},o=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let u=1;const c=()=>{u--,u===0&&r()};(o||!this.audioDisabled_)&&(u++,this.sourceUpdater_.removeAudio(e,i,c)),(o||this.loaderType_==="main")&&(this.gopBuffer_=R8(this.gopBuffer_,e,i,this.timeMapping_),u++,this.sourceUpdater_.removeVideo(e,i,c));for(const p in this.inbandTextTracks_)Ld(e,i,this.inbandTextTracks_[p]);Ld(e,i,this.segmentMetadataTrack_),c()}monitorBuffer_(){this.checkBufferTimeout_&&U.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=U.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&U.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=U.setTimeout(this.monitorBufferTick_.bind(this),I8)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:Po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,r=this.partIndex){if(!i||!this.mediaSource_)return!1;const o=typeof e=="number"&&i.segments[e],u=e+1===i.segments.length,c=!o||!o.parts||r+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&u&&c}chooseNextRequest_(){const e=this.buffered_(),i=my(e)||0,r=gy(e,this.currentTime_()),o=!this.hasPlayed_()&&r>=1,u=r>=this.goalBufferLength_(),c=this.playlist_.segments;if(!c.length||o||u)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const p={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(p.isSyncRequest)p.mediaIndex=L8(this.currentTimeline_,c,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${p.mediaIndex}`);else if(this.mediaIndex!==null){const A=c[this.mediaIndex],R=typeof this.partIndex=="number"?this.partIndex:-1;p.startOfSegment=A.end?A.end:i,A.parts&&A.parts[R+1]?(p.mediaIndex=this.mediaIndex,p.partIndex=R+1):p.mediaIndex=this.mediaIndex+1}else{let A,R,P;const w=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
||
For TargetTime: ${w}.
|
||
CurrentTime: ${this.currentTime_()}
|
||
BufferedEnd: ${i}
|
||
Fetch At Buffer: ${this.fetchAtBuffer_}
|
||
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const z=this.getSyncInfoFromMediaSequenceSync_(w);if(!z){const H="No sync info found while using media sequence sync";return this.error({message:H,metadata:{errorType:q.Error.StreamingFailedToSelectNextSegment,error:new Error(H)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${z.start} --> ${z.end})`),A=z.segmentIndex,R=z.partIndex,P=z.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const z=un.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:w,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});A=z.segmentIndex,R=z.partIndex,P=z.startTime}p.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${w}`:`currentTime ${w}`,p.mediaIndex=A,p.startOfSegment=P,p.partIndex=R,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${p.mediaIndex} `)}const g=c[p.mediaIndex];let b=g&&typeof p.partIndex=="number"&&g.parts&&g.parts[p.partIndex];if(!g||typeof p.partIndex=="number"&&!b)return null;typeof p.partIndex!="number"&&g.parts&&(p.partIndex=0,b=g.parts[0]);const S=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!r&&b&&!S&&!b.independent)if(p.partIndex===0){const A=c[p.mediaIndex-1],R=A.parts&&A.parts.length&&A.parts[A.parts.length-1];R&&R.independent&&(p.mediaIndex-=1,p.partIndex=A.parts.length-1,p.independent="previous segment")}else g.parts[p.partIndex-1].independent&&(p.partIndex-=1,p.independent="previous part");const E=this.mediaSource_&&this.mediaSource_.readyState==="ended";return p.mediaIndex>=c.length-1&&E&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,p.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(p))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const i=Math.max(e,this.mediaSequenceSync_.start);e!==i&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${i}`);const r=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!r)return null;if(!r.isAppended)return r;const o=this.mediaSequenceSync_.getSyncInfoForTime(r.end);return o?(o.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),o):null}generateSegmentInfo_(e){const{independent:i,playlist:r,mediaIndex:o,startOfSegment:u,isSyncRequest:c,partIndex:p,forceTimestampOffset:g,getMediaInfoForTime:b}=e,S=r.segments[o],E=typeof p=="number"&&S.parts[p],A={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||S.resolvedUri,mediaIndex:o,partIndex:E?p:null,isSyncRequest:c,startOfSegment:u,playlist:r,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:S.timeline,duration:E&&E.duration||S.duration,segment:S,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:b,independent:i},R=typeof g<"u"?g:this.isPendingTimestampOffset_;A.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:S.timeline,currentTimeline:this.currentTimeline_,startOfSegment:u,buffered:this.buffered_(),overrideCheck:R});const P=my(this.sourceUpdater_.audioBuffered());return typeof P=="number"&&(A.audioAppendStart=P-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(A.gopsToAlignWith=k8(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),A}timestampOffsetForSegment_(e){return U8(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const i=this.currentTime_(),r=e.bandwidth,o=this.pendingSegment_.duration,u=un.estimateSegmentRequestTime(o,r,this.playlist_,e.bytesReceived),c=lR(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(u<=c)return;const p=v8({main:this.vhs_.playlists.main,currentTime:i,bandwidth:r,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:c,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!p)return;const b=u-c-p.rebufferingImpact;let S=.5;c<=Fs&&(S=1),!(!p.playlist||p.playlist.uri===this.playlist_.uri||b<S)&&(this.bandwidth=p.playlist.attributes.BANDWIDTH*fi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${xu(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:r,hasVideo:o}=i,u={segmentInfo:Po({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:r,hasVideo:o}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:u}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},M8(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()?this.processCallQueue_():ka(this))))}handleTimingInfo_(e,i,r,o){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const u=this.pendingSegment_,c=lx(i);u[c]=u[c]||{},u[c][r]=o,this.logger_(`timinginfo: ${i} - ${r} - ${o}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ka(this)}handleCaptions_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return}const o=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),u={};i.forEach(c=>{u[c.stream]=u[c.stream]||{startTime:1/0,captions:[],endTime:0};const p=u[c.stream];p.startTime=Math.min(p.startTime,c.startTime+o),p.endTime=Math.max(p.endTime,c.endTime+o),p.captions.push(c)}),Object.keys(u).forEach(c=>{const{startTime:p,endTime:g,captions:b}=u[c],S=this.inbandTextTracks_;this.logger_(`adding cues from ${p} -> ${g} for ${c}`),T8(S,this.vhs_.tech_,c),Ld(p,g,S[c]),S8({captionArray:b,inbandTextTracks:S,timestampOffset:o})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,r));return}this.addMetadataToTextTrack(r,i,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(i=>i())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(i=>i())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!My({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;const{hasAudio:r,hasVideo:o,isMuxed:u}=i;return!(o&&!e.videoTimingInfo||r&&!this.audioDisabled_&&!u&&!e.audioTimingInfo||My({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){ka(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return}const r=this.pendingSegment_;if(this.setTimeMapping_(r.timeline),this.updateMediaSecondsLoaded_(r.part||r.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),r.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),r.isFmp4=e.isFmp4,r.timingInfo=r.timingInfo||{},r.isFmp4)this.trigger("fmp4"),r.timingInfo.start=r[lx(i.type)].start;else{const o=this.getCurrentMediaInfo_(),u=this.loaderType_==="main"&&o&&o.hasVideo;let c;u&&(c=r.videoTimingInfo.start),r.timingInfo.start=this.trueSegmentStart_({currentStart:r.timingInfo.start,playlist:r.playlist,mediaIndex:r.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:u,firstVideoFrameTimeForData:c,videoTimingInfo:r.videoTimingInfo,audioTimingInfo:r.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(r,i.type),this.updateSourceBufferTimestampOffset_(r),r.isSyncRequest){this.updateTimingInfoEnd_(r),this.syncController_.saveSegmentTimingInfo({segmentInfo:r,shouldSaveTimelineMapping:this.loaderType_==="main"});const o=this.chooseNextRequest_();if(o.mediaIndex!==r.mediaIndex||o.partIndex!==r.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}r.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(r,i)}}updateAppendInitSegmentStatus(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:i,map:r,playlist:o}){if(r){const u=Ip(r);if(this.activeInitSegmentId_===u)return null;i=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=u}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=o,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r},o){const u=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Io(u).join(", ")),c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Io(c).join(", "));const p=u.length?u.start(0):0,g=u.length?u.end(u.length-1):0,b=c.length?c.start(0):0,S=c.length?c.end(c.length-1):0;if(g-p<=Id&&S-b<=Id){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${r.byteLength}, audio buffer: ${Io(u).join(", ")}, video buffer: ${Io(c).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:i,bytes:r}));const A=this.currentTime_()-Id;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${A}`),this.remove(0,A,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Id}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=U.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Id*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:r},o){if(o){if(o.code===AS){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",o),this.error({message:`${i} append of ${r.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:q.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:o,bytes:u}){if(!u){const p=[o];let g=o.byteLength;r&&(p.unshift(r),g+=r.byteLength),u=_8({bytes:g,segments:p})}const c={segmentInfo:Po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:c}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:u}))}handleSegmentTimingInfo_(e,i,r){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const o=this.pendingSegment_.segment,u=`${e}TimingInfo`;o[u]||(o[u]={}),o[u].transmuxerPrependedSeconds=r.prependedContentDuration||0,o[u].transmuxedPresentationStart=r.start.presentation,o[u].transmuxedDecodeStart=r.start.decode,o[u].transmuxedPresentationEnd=r.end.presentation,o[u].transmuxedDecodeEnd=r.end.decode,o[u].baseMediaDecodeTime=r.baseMediaDecodeTime}appendData_(e,i){const{type:r,data:o}=i;if(!o||!o.byteLength||r==="audio"&&this.audioDisabled_)return;const u=this.getInitSegmentAndUpdateState_({type:r,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:r,initSegment:u,data:o})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){ka(this),this.loadQueue_.push(()=>{const i=Ft({},e,{forceTimestampOffset:!0});Ft(e,this.generateSegmentInfo_(i)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const i=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),o=this.mediaIndex!==null,u=e.timeline!==this.currentTimeline_&&e.timeline>0,c=r||o&&u;this.logger_(`Requesting
|
||
${rx(e.uri)}
|
||
${xu(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=m8({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:p,level:g,stream:b})=>{this.logger_(`${xu(e)} logged from transmuxer stream ${b} as a ${g}: ${p}`)},triggerSegmentEventFn:({type:p,segment:g,keyInfo:b,trackInfo:S,timingInfo:E})=>{const R={segmentInfo:Po({segment:g})};b&&(R.keyInfo=b),S&&(R.trackInfo=S),E&&(R.timingInfo=E),this.trigger({type:p,metadata:R})}})}trimBackBuffer_(e){const i=P8(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,r=e.part,o=e.segment.key||e.segment.map&&e.segment.map.key,u=e.segment.map&&!e.segment.map.bytes,c={resolvedUri:r?r.resolvedUri:i.resolvedUri,byterange:r?r.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:o,isMediaInitialization:u},p=e.playlist.segments[e.mediaIndex-1];if(p&&p.timeline===i.timeline&&(p.videoTimingInfo?c.baseStartTime=p.videoTimingInfo.transmuxedDecodeEnd:p.audioTimingInfo&&(c.baseStartTime=p.audioTimingInfo.transmuxedDecodeEnd)),i.key){const g=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);c.key=this.segmentKey(i.key),c.key.iv=g}return i.map&&(c.map=this.initSegmentForMap(i.map)),c}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<Pp){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${Pp}`);return}const r={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:r}),this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,i,r){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,r));return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===zs.ABORTED)return;if(this.pause(),e.code===zs.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,i.stats),o.endOfAllRequests=i.endOfAllRequests,r.gopInfo&&(this.gopBuffer_=O8(this.gopBuffer_,r.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}setTimeMapping_(e){const i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:i,mediaIndex:r,firstVideoFrameTimeForData:o,currentVideoTimestampOffset:u,useVideoTimingInfo:c,videoTimingInfo:p,audioTimingInfo:g}){if(typeof e<"u")return e;if(!c)return g.start;const b=i.segments[r-1];return r===0||!b||typeof b.start>"u"||b.end!==o+u?o:p.start}waitForAppendsToComplete_(e){const i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:r,hasVideo:o,isMuxed:u}=i,c=this.loaderType_==="main"&&o,p=!this.audioDisabled_&&r&&!u;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}c&&e.waitingOnAppends++,p&&e.waitingOnAppends++,c&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),p&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const i=N8(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:i,timingInfo:r}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:r.start:r.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const i=this.getMediaInfo_(),o=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;o&&(e.timingInfo.end=typeof o.end=="number"?o.end:o.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const g={segmentInfo:Po({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:g})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=z8(e,this.sourceType_);if(i&&(i.severity==="warn"?q.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${xu(e)}`);return}this.logger_(`Appended ${xu(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const r=e.segment,o=e.part,u=r.end&&this.currentTime_()-r.end>e.playlist.targetDuration*3,c=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(u||c){this.logger_(`bad ${u?"segment":"part"} ${xu(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Pp){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${Pp}`);return}const i=this.throughput.rate,r=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/r*8*1e3);this.throughput.rate+=(o-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,r=i.start,o=i.end;if(!ox(r)||!ox(o))return;Ld(r,o,this.segmentMetadataTrack_);const u=U.WebKitDataCue||U.VTTCue,c={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,programDateTime:i.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:r,end:o},p=JSON.stringify(c),g=new u(r,o,p);g.value=c,this.segmentMetadataTrack_.addCue(g)}}function Mr(){}const cx=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},j8=["video","audio"],Iy=(s,e)=>{const i=e[`${s}Buffer`];return i&&i.updating||e.queuePending[s]},V8=(s,e)=>{for(let i=0;i<e.length;i++){const r=e[i];if(r.type==="mediaSource")return null;if(r.type===s)return i}return null},Eu=(s,e)=>{if(e.queue.length===0)return;let i=0,r=e.queue[i];if(r.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),r.action(e),r.doneFn&&r.doneFn(),Eu("audio",e),Eu("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Iy(s,e))){if(r.type!==s){if(i=V8(s,e.queue),i===null)return;r=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[s]=r,r.action(s,e),!r.doneFn){e.queuePending[s]=null,Eu(s,e);return}}},dx=(s,e)=>{const i=e[`${s}Buffer`],r=cx(s);i&&(i.removeEventListener("updateend",e[`on${r}UpdateEnd_`]),i.removeEventListener("error",e[`on${r}Error_`]),e.codecs[s]=null,e[`${s}Buffer`]=null)},js=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,Cn={appendBuffer:(s,e,i)=>(r,o)=>{const u=o[`${r}Buffer`];if(js(o.mediaSource,u)){o.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${r}Buffer`);try{u.appendBuffer(s)}catch(c){o.logger_(`Error with code ${c.code} `+(c.code===AS?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${r}Buffer`),o.queuePending[r]=null,i(c)}}},remove:(s,e)=>(i,r)=>{const o=r[`${i}Buffer`];if(js(r.mediaSource,o)){r.logger_(`Removing ${s} to ${e} from ${i}Buffer`);try{o.remove(s,e)}catch{r.logger_(`Remove ${s} to ${e} from ${i}Buffer failed`)}}},timestampOffset:s=>(e,i)=>{const r=i[`${e}Buffer`];js(i.mediaSource,r)&&(i.logger_(`Setting ${e}timestampOffset to ${s}`),r.timestampOffset=s)},callback:s=>(e,i)=>{s()},endOfStream:s=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${s||""})`);try{e.mediaSource.endOfStream(s)}catch(i){q.log.warn("Failed to call media source endOfStream",i)}}},duration:s=>e=>{e.logger_(`Setting mediaSource duration to ${s}`);try{e.mediaSource.duration=s}catch(i){q.log.warn("Failed to set media source duration",i)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${s}Buffer`];if(js(e.mediaSource,i)){e.logger_(`calling abort on ${s}Buffer`);try{i.abort()}catch(r){q.log.warn(`Failed to abort on ${s}Buffer`,r)}}},addSourceBuffer:(s,e)=>i=>{const r=cx(s),o=Hl(e);i.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const u=i.mediaSource.addSourceBuffer(o);u.addEventListener("updateend",i[`on${r}UpdateEnd_`]),u.addEventListener("error",i[`on${r}Error_`]),i.codecs[s]=e,i[`${s}Buffer`]=u},removeSourceBuffer:s=>e=>{const i=e[`${s}Buffer`];if(dx(s,e),!!js(e.mediaSource,i)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(r){q.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,r)}}},changeType:s=>(e,i)=>{const r=i[`${e}Buffer`],o=Hl(s);if(!js(i.mediaSource,r))return;const u=s.substring(0,s.indexOf(".")),c=i.codecs[e];if(c.substring(0,c.indexOf("."))===u)return;const g={codecsChangeInfo:{from:c,to:s}};i.trigger({type:"codecschange",metadata:g}),i.logger_(`changing ${e}Buffer codec from ${c} to ${s}`);try{r.changeType(o),i.codecs[e]=s}catch(b){g.errorType=q.Error.StreamingCodecsChangeError,g.error=b,b.metadata=g,i.error_=b,i.trigger("error"),q.log.warn(`Failed to changeType on ${e}Buffer`,b)}}},An=({type:s,sourceUpdater:e,action:i,doneFn:r,name:o})=>{e.queue.push({type:s,action:i,doneFn:r,name:o}),Eu(s,e)},hx=(s,e)=>i=>{const r=e[`${s}Buffered`](),o=rR(r);if(e.logger_(`received "updateend" event for ${s} Source Buffer: `,o),e.queuePending[s]){const u=e.queuePending[s].doneFn;e.queuePending[s]=null,u&&u(e[`${s}Error_`])}Eu(s,e)};class fx extends q.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Eu("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=$n("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=hx("video",this),this.onAudioUpdateEnd_=hx("audio",this),this.onVideoError_=i=>{this.videoError_=i},this.onAudioError_=i=>{this.audioError_=i},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,i){An({type:"mediaSource",sourceUpdater:this,action:Cn.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){An({type:e,sourceUpdater:this,action:Cn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){q.log.error("removeSourceBuffer is not supported!");return}An({type:"mediaSource",sourceUpdater:this,action:Cn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!q.browser.IS_FIREFOX&&U.MediaSource&&U.MediaSource.prototype&&typeof U.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return U.SourceBuffer&&U.SourceBuffer.prototype&&typeof U.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){q.log.error("changeType is not supported!");return}An({type:e,sourceUpdater:this,action:Cn.changeType(i),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(i=>{const r=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,r);this.canChangeType()&&this.changeType(i,r)})}appendBuffer(e,i){const{segmentInfo:r,type:o,bytes:u}=e;if(this.processedAppend_=!0,o==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${u.length} until video append`);return}const c=i;if(An({type:o,sourceUpdater:this,action:Cn.appendBuffer(u,r||{mediaIndex:-1},c),doneFn:i,name:"appendBuffer"}),o==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const p=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${p.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,p.forEach(g=>{this.appendBuffer.apply(this,g)})}}audioBuffered(){return js(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:hi()}videoBuffered(){return js(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:hi()}buffered(){const e=js(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=js(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():oR(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=Mr){An({type:"mediaSource",sourceUpdater:this,action:Cn.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=Mr){typeof e!="string"&&(e=void 0),An({type:"mediaSource",sourceUpdater:this,action:Cn.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,r=Mr){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){r();return}An({type:"audio",sourceUpdater:this,action:Cn.remove(e,i),doneFn:r,name:"remove"})}removeVideo(e,i,r=Mr){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){r();return}An({type:"video",sourceUpdater:this,action:Cn.remove(e,i),doneFn:r,name:"remove"})}updating(){return!!(Iy("audio",this)||Iy("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(An({type:"audio",sourceUpdater:this,action:Cn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(An({type:"video",sourceUpdater:this,action:Cn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&An({type:"audio",sourceUpdater:this,action:Cn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&An({type:"video",sourceUpdater:this,action:Cn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),j8.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>dx(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const px=s=>decodeURIComponent(escape(String.fromCharCode.apply(null,s))),q8=s=>{const e=new Uint8Array(s);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},mx=new Uint8Array(`
|
||
|
||
`.split("").map(s=>s.charCodeAt(0)));class $8 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class G8 extends Ly{constructor(e,i={}){super(e,i),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return hi();const e=this.subtitlesTrack_.cues,i=e[0].startTime,r=e[e.length-1].startTime;return hi([[i,r]])}initSegmentForMap(e,i=!1){if(!e)return null;const r=Ip(e);let o=this.initSegments_[r];if(i&&!o&&e.bytes){const u=mx.byteLength+e.bytes.byteLength,c=new Uint8Array(u);c.set(e.bytes),c.set(mx,e.bytes.byteLength),this.initSegments_[r]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:c}}return o||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,i){Ld(e,i,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const i=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",i),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,i,r){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===zs.TIMEOUT&&this.handleTimeout_(),e.code===zs.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const o=this.pendingSegment_,u=r.mp4VttCues&&r.mp4VttCues.length;u&&(o.mp4VttCues=r.mp4VttCues),this.saveBandwidthRelatedStats_(o.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");const c=o.segment;if(c.map&&(c.map.bytes=i.map.bytes),o.bytes=i.bytes,typeof U.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,r),()=>this.stopForError({message:"Error loading vtt.js"}));return}c.requested=!0;try{this.parseVTTCues_(o)}catch(p){this.stopForError({message:p.message,metadata:{errorType:q.Error.StreamingVttParserError,error:p}});return}if(u||this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=c.duration,o.cues.forEach(p=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new U.VTTCue(p.startTime,p.endTime,p.text):p)}),D8(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const r=e&&e.type==="vtt",o=i&&i.type==="text";r&&o&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(r=>{const o=r.start+i,u=r.end+i,c=new U.VTTCue(o,u,r.cueText);r.settings&&r.settings.split(" ").forEach(p=>{const g=p.split(":"),b=g[0],S=g[1];c[b]=isNaN(S)?S:Number(S)}),e.cues.push(c)})}parseVTTCues_(e){let i,r=!1;if(typeof U.WebVTT!="function")throw new $8;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof U.TextDecoder=="function"?i=new U.TextDecoder("utf8"):(i=U.WebVTT.StringDecoder(),r=!0);const o=new U.WebVTT.Parser(U,U.vttjs,i);if(o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=c=>{e.timestampmap=c},o.onparsingerror=c=>{q.log.warn("Error encountered when parsing cues: "+c.message)},e.segment.map){let c=e.segment.map.bytes;r&&(c=px(c)),o.parse(c)}let u=e.bytes;r&&(u=px(u)),o.parse(u),o.flush()}updateTimeMapping_(e,i,r){const o=e.segment;if(!i)return;if(!e.cues.length){o.empty=!0;return}const{MPEGTS:u,LOCAL:c}=e.timestampmap,g=u/Ao.ONE_SECOND_IN_TS-c+i.mapping;if(e.cues.forEach(b=>{const S=b.endTime-b.startTime,E=this.handleRollover_(b.startTime+g,i.time);b.startTime=Math.max(E,0),b.endTime=Math.max(E+S,0)}),!r.syncInfo){const b=e.cues[0].startTime,S=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(b,S-o.duration)}}}handleRollover_(e,i){if(i===null)return e;let r=e*Ao.ONE_SECOND_IN_TS;const o=i*Ao.ONE_SECOND_IN_TS;let u;for(o<r?u=-8589934592:u=8589934592;Math.abs(r-o)>4294967296;)r+=u;return r/Ao.ONE_SECOND_IN_TS}}const X8=function(s,e){const i=s.cues;for(let r=0;r<i.length;r++){const o=i[r];if(e>=o.adStartTime&&e<=o.adEndTime)return o}return null},Y8=function(s,e,i=0){if(!s.segments)return;let r=i,o;for(let u=0;u<s.segments.length;u++){const c=s.segments[u];if(o||(o=X8(e,r+c.duration/2)),o){if("cueIn"in c){o.endTime=r,o.adEndTime=r,r+=c.duration,o=null;continue}if(r<o.endTime){r+=c.duration;continue}o.endTime+=c.duration}else if("cueOut"in c&&(o=new U.VTTCue(r,r+c.duration,c.cueOut),o.adStartTime=r,o.adEndTime=r+parseFloat(c.cueOut),e.addCue(o)),"cueOutCont"in c){const[p,g]=c.cueOutCont.split("/").map(parseFloat);o=new U.VTTCue(r,r+c.duration,""),o.adStartTime=r-p,o.adEndTime=o.adStartTime+g,e.addCue(o)}r+=c.duration}};class gx{constructor({start:e,end:i,segmentIndex:r,partIndex:o=null,appended:u=!1}){this.start_=e,this.end_=i,this.segmentIndex_=r,this.partIndex_=o,this.appended_=u}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class W8{constructor(e,i=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=i}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class yx{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,i){const{mediaSequence:r,segments:o}=e;if(this.isReliable_=this.isReliablePlaylist_(r,o),!!this.isReliable_)return this.updateStorage_(o,r,this.calculateBaseTime_(r,o,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:r}of this.storage_.values())if(r.length){for(const o of r)if(o.isInRange(e))return o}else if(i.isInRange(e))return i;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,i,r){const o=new Map;let u=`
|
||
`,c=r,p=i;this.start_=c,e.forEach((g,b)=>{const S=this.storage_.get(p),E=c,A=E+g.duration,R=!!(S&&S.segmentSyncInfo&&S.segmentSyncInfo.isAppended),P=new gx({start:E,end:A,appended:R,segmentIndex:b});g.syncInfo=P;let w=c;const z=(g.parts||[]).map((H,X)=>{const $=w,W=w+H.duration,Z=!!(S&&S.partsSyncInfo&&S.partsSyncInfo[X]&&S.partsSyncInfo[X].isAppended),le=new gx({start:$,end:W,appended:Z,segmentIndex:b,partIndex:X});return w=W,u+=`Media Sequence: ${p}.${X} | Range: ${$} --> ${W} | Appended: ${Z}
|
||
`,H.syncInfo=le,le});o.set(p,new W8(P,z)),u+=`${rx(g.resolvedUri)} | Media Sequence: ${p} | Range: ${E} --> ${A} | Appended: ${R}
|
||
`,p++,c=A}),this.end_=c,this.storage_=o,this.diagnostics_=u}calculateBaseTime_(e,i,r){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const o=Math.min(...this.storage_.keys());if(e<o){const u=o-e;let c=this.storage_.get(o).segmentSyncInfo.start;for(let p=0;p<u;p++){const g=i[p];c-=g.duration}return c}return r}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class vx extends yx{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,r){if(!this.storage_.size){const o=this.parent_.getSyncInfoForMediaSequence(e);return o?o.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,r)}}const Q8=86400,Ny=[{name:"VOD",run:(s,e,i,r,o)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(s,e,i,r,o,u)=>{const c=s.getMediaSequenceSync(u);if(!c||!c.isReliable)return null;const p=c.getSyncInfoForTime(o);return p?{time:p.start,partIndex:p.partIndex,segmentIndex:p.segmentIndex}:null}},{name:"ProgramDateTime",run:(s,e,i,r,o)=>{if(!Object.keys(s.timelineToDatetimeMappings).length)return null;let u=null,c=null;const p=vy(e);o=o||0;for(let g=0;g<p.length;g++){const b=e.endList||o===0?g:p.length-(g+1),S=p[b],E=S.segment,A=s.timelineToDatetimeMappings[E.timeline];if(!A||!E.dateTimeObject)continue;let P=E.dateTimeObject.getTime()/1e3+A;if(E.parts&&typeof S.partIndex=="number")for(let z=0;z<S.partIndex;z++)P+=E.parts[z].duration;const w=Math.abs(o-P);if(c!==null&&(w===0||c<w))break;c=w,u={time:P,segmentIndex:S.segmentIndex,partIndex:S.partIndex}}return u}},{name:"Segment",run:(s,e,i,r,o)=>{let u=null,c=null;o=o||0;const p=vy(e);for(let g=0;g<p.length;g++){const b=e.endList||o===0?g:p.length-(g+1),S=p[b],E=S.segment,A=S.part&&S.part.start||E&&E.start;if(E.timeline===r&&typeof A<"u"){const R=Math.abs(o-A);if(c!==null&&c<R)break;(!u||c===null||c>=R)&&(c=R,u={time:A,segmentIndex:S.segmentIndex,partIndex:S.partIndex})}}return u}},{name:"Discontinuity",run:(s,e,i,r,o)=>{let u=null;if(o=o||0,e.discontinuityStarts&&e.discontinuityStarts.length){let c=null;for(let p=0;p<e.discontinuityStarts.length;p++){const g=e.discontinuityStarts[p],b=e.discontinuitySequence+p+1,S=s.discontinuities[b];if(S){const E=Math.abs(o-S.time);if(c!==null&&c<E)break;(!u||c===null||c>=E)&&(c=E,u={time:S.time,segmentIndex:g,partIndex:null})}}}return u}},{name:"Playlist",run:(s,e,i,r,o)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class K8 extends q.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new yx,r=new vx(i),o=new vx(i);this.mediaSequenceStorage_={main:i,audio:r,vtt:o},this.logger_=$n("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,r,o,u){if(i!==1/0)return Ny.find(({name:g})=>g==="VOD").run(this,e,i);const c=this.runStrategies_(e,i,r,o,u);if(!c.length)return null;for(const p of c){const{syncPoint:g,strategy:b}=p,{segmentIndex:S,time:E}=g;if(S<0)continue;const A=e.segments[S],R=E,P=R+A.duration;if(this.logger_(`Strategy: ${b}. Current time: ${o}. selected segment: ${S}. Time: [${R} -> ${P}]}`),o>=R&&o<P)return this.logger_("Found sync point with exact match: ",g),g}return this.selectSyncPoint_(c,{key:"time",value:o})}getExpiredTime(e,i){if(!e||!e.segments)return null;const r=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!r.length)return null;const o=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+kd({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))}runStrategies_(e,i,r,o,u){const c=[];for(let p=0;p<Ny.length;p++){const g=Ny[p],b=g.run(this,e,i,r,o,u);b&&(b.strategy=g.name,c.push({strategy:g.name,syncPoint:b}))}return c}selectSyncPoint_(e,i){let r=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),u=e[0].strategy;for(let c=1;c<e.length;c++){const p=Math.abs(e[c].syncPoint[i.key]-i.value);p<o&&(o=p,r=e[c].syncPoint,u=e[c].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${u}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,i){const r=i.mediaSequence-e.mediaSequence;if(r>Q8){q.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let o=r-1;o>=0;o--){const u=e.segments[o];if(u&&typeof u.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:u.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const i=e.segments[0],r=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),o=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:o.start}));const u=o.dateTimeObject;o.discontinuity&&i&&u&&(this.timelineToDatetimeMappings[o.timeline]=-(u.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,i,r){const o=e.segment,u=e.part;let c=this.timelines[e.timeline],p,g;if(typeof e.timestampOffset=="number")c={time:e.startOfSegment,mapping:e.startOfSegment-i.start},r&&(this.timelines[e.timeline]=c,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${c.time}] [mapping: ${c.mapping}]`)),p=e.startOfSegment,g=i.end+c.mapping;else if(c)p=i.start+c.mapping,g=i.end+c.mapping;else return!1;return u&&(u.start=p,u.end=g),(!o.start||p<o.start)&&(o.start=p),o.end=g,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let o=0;o<i.discontinuityStarts.length;o++){const u=i.discontinuityStarts[o],c=i.discontinuitySequence+o+1,p=u-e.mediaIndex,g=Math.abs(p);if(!this.discontinuities[c]||this.discontinuities[c].accuracy>g){let b;p<0?b=r.start-kd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:u}):b=r.end+kd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:u}),this.discontinuities[c]={time:b,accuracy:g}}}}dispose(){this.trigger("dispose"),this.off()}}class Z8 extends q.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:r}){return typeof i=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:r}){if(typeof i=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:r},delete this.pendingTimelineChanges_[e];const o={timelineChangeInfo:{from:i,to:r}};this.trigger({type:"timelinechange",metadata:o})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const J8=qS($S(function(){var s=function(){function w(){this.listeners={}}var z=w.prototype;return z.on=function(X,$){this.listeners[X]||(this.listeners[X]=[]),this.listeners[X].push($)},z.off=function(X,$){if(!this.listeners[X])return!1;var W=this.listeners[X].indexOf($);return this.listeners[X]=this.listeners[X].slice(0),this.listeners[X].splice(W,1),W>-1},z.trigger=function(X){var $=this.listeners[X];if($)if(arguments.length===2)for(var W=$.length,Z=0;Z<W;++Z)$[Z].call(this,arguments[1]);else for(var le=Array.prototype.slice.call(arguments,1),J=$.length,Y=0;Y<J;++Y)$[Y].apply(this,le)},z.dispose=function(){this.listeners={}},z.pipe=function(X){this.on("data",function($){X.push($)})},w}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(w){return w.subarray(0,w.byteLength-w[w.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const w=[[[],[],[],[],[]],[[],[],[],[],[]]],z=w[0],H=w[1],X=z[4],$=H[4];let W,Z,le;const J=[],Y=[];let ee,ve,de,ge,pe,Oe;for(W=0;W<256;W++)Y[(J[W]=W<<1^(W>>7)*283)^W]=W;for(Z=le=0;!X[Z];Z^=ee||1,le=Y[le]||1)for(ge=le^le<<1^le<<2^le<<3^le<<4,ge=ge>>8^ge&255^99,X[Z]=ge,$[ge]=Z,de=J[ve=J[ee=J[Z]]],Oe=de*16843009^ve*65537^ee*257^Z*16843008,pe=J[ge]*257^ge*16843008,W=0;W<4;W++)z[W][Z]=pe=pe<<24^pe>>>8,H[W][ge]=Oe=Oe<<24^Oe>>>8;for(W=0;W<5;W++)z[W]=z[W].slice(0),H[W]=H[W].slice(0);return w};let r=null;class o{constructor(z){r||(r=i()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];let H,X,$;const W=this._tables[0][4],Z=this._tables[1],le=z.length;let J=1;if(le!==4&&le!==6&&le!==8)throw new Error("Invalid aes key size");const Y=z.slice(0),ee=[];for(this._key=[Y,ee],H=le;H<4*le+28;H++)$=Y[H-1],(H%le===0||le===8&&H%le===4)&&($=W[$>>>24]<<24^W[$>>16&255]<<16^W[$>>8&255]<<8^W[$&255],H%le===0&&($=$<<8^$>>>24^J<<24,J=J<<1^(J>>7)*283)),Y[H]=Y[H-le]^$;for(X=0;H;X++,H--)$=Y[X&3?H:H-4],H<=4||X<4?ee[X]=$:ee[X]=Z[0][W[$>>>24]]^Z[1][W[$>>16&255]]^Z[2][W[$>>8&255]]^Z[3][W[$&255]]}decrypt(z,H,X,$,W,Z){const le=this._key[1];let J=z^le[0],Y=$^le[1],ee=X^le[2],ve=H^le[3],de,ge,pe;const Oe=le.length/4-2;let nt,he=4;const Ee=this._tables[1],Me=Ee[0],Ye=Ee[1],oe=Ee[2],Le=Ee[3],Ae=Ee[4];for(nt=0;nt<Oe;nt++)de=Me[J>>>24]^Ye[Y>>16&255]^oe[ee>>8&255]^Le[ve&255]^le[he],ge=Me[Y>>>24]^Ye[ee>>16&255]^oe[ve>>8&255]^Le[J&255]^le[he+1],pe=Me[ee>>>24]^Ye[ve>>16&255]^oe[J>>8&255]^Le[Y&255]^le[he+2],ve=Me[ve>>>24]^Ye[J>>16&255]^oe[Y>>8&255]^Le[ee&255]^le[he+3],he+=4,J=de,Y=ge,ee=pe;for(nt=0;nt<4;nt++)W[(3&-nt)+Z]=Ae[J>>>24]<<24^Ae[Y>>16&255]<<16^Ae[ee>>8&255]<<8^Ae[ve&255]^le[he++],de=J,J=Y,Y=ee,ee=ve,ve=de}}class u extends s{constructor(){super(s),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(z){this.jobs.push(z),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const c=function(w){return w<<24|(w&65280)<<8|(w&16711680)>>8|w>>>24},p=function(w,z,H){const X=new Int32Array(w.buffer,w.byteOffset,w.byteLength>>2),$=new o(Array.prototype.slice.call(z)),W=new Uint8Array(w.byteLength),Z=new Int32Array(W.buffer);let le,J,Y,ee,ve,de,ge,pe,Oe;for(le=H[0],J=H[1],Y=H[2],ee=H[3],Oe=0;Oe<X.length;Oe+=4)ve=c(X[Oe]),de=c(X[Oe+1]),ge=c(X[Oe+2]),pe=c(X[Oe+3]),$.decrypt(ve,de,ge,pe,Z,Oe),Z[Oe]=c(Z[Oe]^le),Z[Oe+1]=c(Z[Oe+1]^J),Z[Oe+2]=c(Z[Oe+2]^Y),Z[Oe+3]=c(Z[Oe+3]^ee),le=ve,J=de,Y=ge,ee=pe;return W};class g{constructor(z,H,X,$){const W=g.STEP,Z=new Int32Array(z.buffer),le=new Uint8Array(z.byteLength);let J=0;for(this.asyncStream_=new u,this.asyncStream_.push(this.decryptChunk_(Z.subarray(J,J+W),H,X,le)),J=W;J<Z.length;J+=W)X=new Uint32Array([c(Z[J-4]),c(Z[J-3]),c(Z[J-2]),c(Z[J-1])]),this.asyncStream_.push(this.decryptChunk_(Z.subarray(J,J+W),H,X,le));this.asyncStream_.push(function(){$(null,e(le))})}static get STEP(){return 32e3}decryptChunk_(z,H,X,$){return function(){const W=p(z,H,X);$.set(W,z.byteOffset)}}}var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S;typeof window<"u"?S=window:typeof b<"u"?S=b:typeof self<"u"?S=self:S={};var E=S,A=function(z){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(z):z&&z.buffer instanceof ArrayBuffer},R=E.BigInt||Number;R("0x1"),R("0x100"),R("0x10000"),R("0x1000000"),R("0x100000000"),R("0x10000000000"),R("0x1000000000000"),R("0x100000000000000"),R("0x10000000000000000"),function(){var w=new Uint16Array([65484]),z=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);return z[0]===255?"big":z[0]===204?"little":"unknown"}();const P=function(w){const z={};return Object.keys(w).forEach(H=>{const X=w[H];A(X)?z[H]={bytes:X.buffer,byteOffset:X.byteOffset,byteLength:X.byteLength}:z[H]=X}),z};self.onmessage=function(w){const z=w.data,H=new Uint8Array(z.encrypted.bytes,z.encrypted.byteOffset,z.encrypted.byteLength),X=new Uint32Array(z.key.bytes,z.key.byteOffset,z.key.byteLength/4),$=new Uint32Array(z.iv.bytes,z.iv.byteOffset,z.iv.byteLength/4);new g(H,X,$,function(W,Z){self.postMessage(P({source:z.source,decrypted:Z}),[Z.buffer])})}}));var eM=VS(J8);const tM=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},bx=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Py=(s,e)=>{e.activePlaylistLoader=s,s.load()},iM=(s,e)=>()=>{const{segmentLoaders:{[s]:i,main:r},mediaTypes:{[s]:o}}=e,u=o.activeTrack(),c=o.getActiveGroup(),p=o.activePlaylistLoader,g=o.lastGroup_;if(!(c&&g&&c.id===g.id)&&(o.lastGroup_=c,o.lastTrack_=u,bx(i,o),!(!c||c.isMainPlaylist))){if(!c.playlistLoader){p&&r.resetEverything();return}i.resyncLoader(),Py(c.playlistLoader,o)}},nM=(s,e)=>()=>{const{segmentLoaders:{[s]:i},mediaTypes:{[s]:r}}=e;r.lastGroup_=null,i.abort(),i.pause()},sM=(s,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[s]:r,main:o},mediaTypes:{[s]:u}}=e,c=u.activeTrack(),p=u.getActiveGroup(),g=u.activePlaylistLoader,b=u.lastTrack_;if(!(b&&c&&b.id===c.id)&&(u.lastGroup_=p,u.lastTrack_=c,bx(r,u),!!p)){if(p.isMainPlaylist){if(!c||!b||c.id===b.id)return;const S=e.vhs.playlistController_,E=S.selectPlaylist();if(S.media()===E)return;u.logger_(`track change. Switching main audio from ${b.id} to ${c.id}`),i.pause(),o.resetEverything(),S.fastQualityChange_(E);return}if(s==="AUDIO"){if(!p.playlistLoader){o.setAudio(!0),o.resetEverything();return}r.setAudio(!0),o.setAudio(!1)}if(g===p.playlistLoader){Py(p.playlistLoader,u);return}r.track&&r.track(c),r.resetEverything(),Py(p.playlistLoader,u)}},Up={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:i},excludePlaylist:r}=e,o=i.activeTrack(),u=i.activeGroup(),c=(u.filter(g=>g.default)[0]||u[0]).id,p=i.tracks[c];if(o===p){r({error:{message:"Problem encountered loading the default audio track."}});return}q.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const g in i.tracks)i.tracks[g].enabled=i.tracks[g]===p;i.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:i}}=e;q.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}},_x={AUDIO:(s,e,i)=>{if(!e)return;const{tech:r,requestOptions:o,segmentLoaders:{[s]:u}}=i;e.on("loadedmetadata",()=>{const c=e.media();u.playlist(c,o),(!r.paused()||c.endList&&r.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),r.paused()||u.load()}),e.on("error",Up[s](s,i))},SUBTITLES:(s,e,i)=>{const{tech:r,requestOptions:o,segmentLoaders:{[s]:u},mediaTypes:{[s]:c}}=i;e.on("loadedmetadata",()=>{const p=e.media();u.playlist(p,o),u.track(c.activeTrack()),(!r.paused()||p.endList&&r.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),r.paused()||u.load()}),e.on("error",Up[s](s,i))}},rM={AUDIO:(s,e)=>{const{vhs:i,sourceType:r,segmentLoaders:{[s]:o},requestOptions:u,main:{mediaGroups:c},mediaTypes:{[s]:{groups:p,tracks:g,logger_:b}},mainPlaylistLoader:S}=e,E=Od(S.main);(!c[s]||Object.keys(c[s]).length===0)&&(c[s]={main:{default:{default:!0}}},E&&(c[s].main.default.playlists=S.main.playlists));for(const A in c[s]){p[A]||(p[A]=[]);for(const R in c[s][A]){let P=c[s][A][R],w;if(E?(b(`AUDIO group '${A}' label '${R}' is a main playlist`),P.isMainPlaylist=!0,w=null):r==="vhs-json"&&P.playlists?w=new bu(P.playlists[0],i,u):P.resolvedUri?w=new bu(P.resolvedUri,i,u):P.playlists&&r==="dash"?w=new wy(P.playlists[0],i,u,S):w=null,P=pt({id:R,playlistLoader:w},P),_x[s](s,P.playlistLoader,e),p[A].push(P),typeof g[R]>"u"){const z=new q.AudioTrack({id:R,kind:tM(P),enabled:!1,language:P.language,default:P.default,label:R});g[R]=z}}}o.on("error",Up[s](s,e))},SUBTITLES:(s,e)=>{const{tech:i,vhs:r,sourceType:o,segmentLoaders:{[s]:u},requestOptions:c,main:{mediaGroups:p},mediaTypes:{[s]:{groups:g,tracks:b}},mainPlaylistLoader:S}=e;for(const E in p[s]){g[E]||(g[E]=[]);for(const A in p[s][E]){if(!r.options_.useForcedSubtitles&&p[s][E][A].forced)continue;let R=p[s][E][A],P;if(o==="hls")P=new bu(R.resolvedUri,r,c);else if(o==="dash"){if(!R.playlists.filter(z=>z.excludeUntil!==1/0).length)return;P=new wy(R.playlists[0],r,c,S)}else o==="vhs-json"&&(P=new bu(R.playlists?R.playlists[0]:R.resolvedUri,r,c));if(R=pt({id:A,playlistLoader:P},R),_x[s](s,R.playlistLoader,e),g[E].push(R),typeof b[A]>"u"){const w=i.addRemoteTextTrack({id:A,kind:"subtitles",default:R.default&&R.autoselect,language:R.language,label:A},!1).track;b[A]=w}}}u.on("error",Up[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[s]:{groups:o,tracks:u}}}=e;for(const c in r[s]){o[c]||(o[c]=[]);for(const p in r[s][c]){const g=r[s][c][p];if(!/^(?:CC|SERVICE)/.test(g.instreamId))continue;const b=i.options_.vhs&&i.options_.vhs.captionServices||{};let S={label:p,language:g.language,instreamId:g.instreamId,default:g.default&&g.autoselect};if(b[S.instreamId]&&(S=pt(S,b[S.instreamId])),S.default===void 0&&delete S.default,o[c].push(pt({id:p},g)),typeof u[p]>"u"){const E=i.addRemoteTextTrack({id:S.instreamId,kind:"captions",default:S.default,language:S.language,label:S.label},!1).track;u[p]=E}}}}},Tx=(s,e)=>{for(let i=0;i<s.length;i++)if(Ty(e,s[i])||s[i].playlists&&Tx(s[i].playlists,e))return!0;return!1},aM=(s,e)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[s]:{groups:o}}}=e,u=r.media();if(!u)return null;let c=null;u.attributes[s]&&(c=o[u.attributes[s]]);const p=Object.keys(o);if(!c)if(s==="AUDIO"&&p.length>1&&Od(e.main))for(let g=0;g<p.length;g++){const b=o[p[g]];if(Tx(b,u)){c=b;break}}else o.main?c=o.main:p.length===1&&(c=o[p[0]]);return typeof i>"u"?c:i===null||!c?null:c.filter(g=>g.id===i.id)[0]||null},oM={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].enabled)return i[r];return null},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].mode==="showing"||i[r].mode==="hidden")return i[r];return null}},lM=(s,{mediaTypes:e})=>()=>{const i=e[s].activeTrack();return i?e[s].activeGroup(i):null},uM=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(b=>{rM[b](b,s)});const{mediaTypes:e,mainPlaylistLoader:i,tech:r,vhs:o,segmentLoaders:{["AUDIO"]:u,main:c}}=s;["AUDIO","SUBTITLES"].forEach(b=>{e[b].activeGroup=aM(b,s),e[b].activeTrack=oM[b](b,s),e[b].onGroupChanged=iM(b,s),e[b].onGroupChanging=nM(b,s),e[b].onTrackChanged=sM(b,s),e[b].getActiveGroup=lM(b,s)});const p=e.AUDIO.activeGroup();if(p){const b=(p.filter(E=>E.default)[0]||p[0]).id;e.AUDIO.tracks[b].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(c.setAudio(!1),u.setAudio(!0)):c.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanging())});const g=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",g),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),o.on("dispose",()=>{r.audioTracks().removeEventListener("change",g),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const b in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[b])},cM=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Mr,activeTrack:Mr,getActiveGroup:Mr,onGroupChanged:Mr,onTrackChanged:Mr,lastTrack_:null,logger_:$n(`MediaGroups[${e}]`)}}),s};class Sx{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ln(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class dM extends q.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Sx,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=$n("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const r=i.serverUri||i.serverURL;if(!r){this.logger_(`steering manifest URL is ${r}, cannot request steering manifest.`),this.trigger("error");return}if(r.startsWith("data:")){this.decodeDataUriManifest_(r.substring(r.indexOf(",")+1));return}this.steeringManifest.reloadUri=ln(e,r),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const i=this.steeringManifest.reloadUri;if(!i)return;const r=e?i:this.getRequestURI(i);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const o={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:o}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(u,c)=>{if(u){if(c.status===410){this.logger_(`manifest request 410 ${u}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(c.status===429){const b=c.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${u}.`),this.logger_(`content steering will retry in ${b} seconds.`),this.startTTLTimeout_(parseInt(b,10));return}this.logger_(`manifest failed to load ${u}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:o});let p;try{p=JSON.parse(this.request_.responseText)}catch(b){const S={errorType:q.Error.StreamingContentSteeringParserError,error:b};this.trigger({type:"error",metadata:S})}this.assignSteeringProperties_(p);const g={contentSteeringInfo:o.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:g}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new U.URL(e),r=new U.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const i=JSON.parse(U.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new U.URL(e),r=this.getPathway(),o=this.getBandwidth_();if(r){const u=`_${this.manifestType_}_pathway`;i.searchParams.set(u,r)}if(o){const u=`_${this.manifestType_}_throughput`;i.searchParams.set(u,o)}return i.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const r=(o=>{for(const u of o)if(this.availablePathways_.has(u))return u;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==r&&(this.currentPathway=r,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=o=>this.excludedSteeringManifestURLs.has(o);if(this.proxyServerUrl_){const o=this.setProxyServerUrl_(e);if(!i(o))return o}const r=this.setSteeringParams_(e);return i(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=U.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){U.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Sx}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(ln(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const hM=(s,e)=>{let i=null;return(...r)=>{clearTimeout(i),i=setTimeout(()=>{s.apply(null,r)},e)}},fM=10;let Oa;const pM=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],mM=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},gM=function({currentPlaylist:s,buffered:e,currentTime:i,nextPlaylist:r,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:c,bufferBasedABR:p,log:g}){if(!r)return q.log.warn("We received no playlist to switch to. Please check your stream."),!1;const b=`allowing switch ${s&&s.id||"null"} -> ${r.id}`;if(!s)return g(`${b} as current playlist is not set`),!0;if(r.id===s.id)return!1;const S=!!gu(e,i).length;if(!s.endList)return!S&&typeof s.partTargetDuration=="number"?(g(`not ${b} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(g(`${b} as current playlist is live`),!0);const E=gy(e,i),A=p?fi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:fi.MAX_BUFFER_LOW_WATER_LINE;if(c<A)return g(`${b} as duration < max low water line (${c} < ${A})`),!0;const R=r.attributes.BANDWIDTH,P=s.attributes.BANDWIDTH;if(R<P&&(!p||E<u)){let w=`${b} as next bandwidth < current bandwidth (${R} < ${P})`;return p&&(w+=` and forwardBuffer < bufferHighWaterLine (${E} < ${u})`),g(w),!0}if((!p||R>P)&&E>=o){let w=`${b} as forwardBuffer >= bufferLowWaterLine (${E} >= ${o})`;return p&&(w+=` and next bandwidth > current bandwidth (${R} > ${P})`),g(w),!0}return g(`not ${b} as no switching criteria met`),!1};class yM extends q.EventTarget{constructor(e){super(),this.fastQualityChange_=hM(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:r,tech:o,bandwidth:u,externVhs:c,useCueTags:p,playlistExclusionDuration:g,enableLowInitialPlaylist:b,sourceType:S,cacheEncryptionKeys:E,bufferBasedABR:A,leastPixelDiffSelector:R,captionServices:P,experimentalUseMMS:w}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:z}=e;(z===null||typeof z>"u")&&(z=1/0),Oa=c,this.bufferBasedABR=!!A,this.leastPixelDiffSelector=!!R,this.withCredentials=r,this.tech_=o,this.vhs_=o.vhs,this.player_=e.player_,this.sourceType_=S,this.useCueTags_=p,this.playlistExclusionDuration=g,this.maxPlaylistRetries=z,this.enableLowInitialPlaylist=b,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:z,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=cM(),w&&U.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new U.ManagedMediaSource,this.usingManagedMediaSource_=!0,q.log("Using ManagedMediaSource")):U.MediaSource&&(this.mediaSource=new U.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=hi(),this.hasPlayed_=!1,this.syncController_=new K8(e),this.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new eM,this.sourceUpdater_=new fx(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Z8,this.keyStatusMap_=new Map;const H={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:P,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:u,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:E,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new wy(i,this.vhs_,pt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new bu(i,this.vhs_,pt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Ly(pt(H,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Ly(pt(H,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new G8(pt(H,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((W,Z)=>{function le(){o.off("vttjserror",J),W()}function J(){o.off("vttjsloaded",le),Z()}o.one("vttjsloaded",le),o.one("vttjserror",J),o.addWebVttScript_()})}),e);const X=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new dM(this.vhs_.xhr,X),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),pM.forEach(W=>{this[W+"_"]=mM.bind(this,W)}),this.logger_=$n("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const $=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one($,()=>{const W=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-W,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)}switchMedia_(e,i,r){const o=this.media(),u=o&&(o.id||o.uri),c=e&&(e.id||e.uri);if(u&&u!==c){this.logger_(`switch media ${u} -> ${c} from ${i}`);const p={renditionInfo:{id:c,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:p}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],r=i?i.activeGroup():null,o=this.contentSteeringController_.getPathway();if(r&&o){const c=(r.length?r[0].playlists:r.playlists).filter(p=>p.attributes.serviceLocation===o);c.length&&this.mediaTypes_[e].activePlaylistLoader.media(c[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=U.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(U.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;const r=e.mediaGroups.AUDIO,o=Object.keys(r);let u;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)u=this.mediaTypes_.AUDIO.activeTrack();else{const p=r.main||o.length&&r[o[0]];for(const g in p)if(p[g].default){u={label:g};break}}if(!u)return i;const c=[];for(const p in r)if(r[p][u.label]){const g=r[p][u.label];if(g.playlists&&g.playlists.length)c.push.apply(c,g.playlists);else if(g.uri)c.push(g);else if(e.playlists.length)for(let b=0;b<e.playlists.length;b++){const S=e.playlists[b];S.attributes&&S.attributes.AUDIO&&S.attributes.AUDIO===p&&c.push(S)}}return c.length?c:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),uM({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let r;if(this.enableLowInitialPlaylist&&(r=this.selectInitialPlaylist()),r||(r=this.selectPlaylist()),!r||!this.shouldSwitchToMedia_(r)||(this.initialMedia_=r,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_}this.handleUpdatedMediaPlaylist(i)}),this.mainPlaylistLoader_.on("error",()=>{const i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>{this.mainPlaylistLoader_.on(i,r=>{this.player_.trigger(Ft({},r))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,i){const r=e.mediaGroups||{};let o=!0;const u=Object.keys(r.AUDIO);for(const c in r.AUDIO)for(const p in r.AUDIO[c])r.AUDIO[c][p].uri||(o=!1);o&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Oa.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),u.length&&Object.keys(r.AUDIO[u[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),o=this.bufferLowWaterLine(),u=this.bufferHighWaterLine(),c=this.tech_.buffered();return gM({buffered:c,currentTime:r,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const r=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:r.playlist,error:r})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const r=this.audioSegmentLoader_.pendingSegment_;if(!r||!r.segment||!r.segment.syncInfo)return;const o=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(o)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",r=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:fM}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const r=this.getCodecsOrExclude_();r&&this.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(r=>{this.mainSegmentLoader_.on(r,o=>{this.player_.trigger(Ft({},o))}),this.audioSegmentLoader_.on(r,o=>{this.player_.trigger(Ft({},o))}),this.subtitleSegmentLoader_.on(r,o=>{this.player_.trigger(Ft({},o))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const i=this.seekable();if(!i.length)return!1;const r=i.end(0);let o=r;if(e.start){const u=e.start.timeOffset;u<0?o=Math.max(r+u,i.start(0)):o=Math.min(r,u)}this.trigger("firstplay"),this.tech_.setCurrentTime(o)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const r=this.syncController_.getExpiredTime(e,this.duration());if(r===null)return!1;const o=Oa.Playlist.playlistEnd(e,r),u=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return o-u<=Hs;const p=c.end(c.length-1);return p-u<=Hs&&o-p<=Hs}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const o=this.mainPlaylistLoader_.main.playlists,u=o.filter(Lp),c=u.length===1&&u[0]===e;if(o.length===1&&r!==1/0)return q.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(c);if(c){if(this.main().contentSteering){const P=this.pathwayAttribute_(e),w=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(P),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(P)},w);return}let R=!1;o.forEach(P=>{if(P===e)return;const w=P.excludeUntil;typeof w<"u"&&w!==1/0&&(R=!0,delete P.excludeUntil)}),R&&(q.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let p;e.playlistErrors_>this.maxPlaylistRetries?p=1/0:p=Date.now()+r*1e3,e.excludeUntil=p,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const g=this.selectPlaylist();if(!g){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const b=i.internal?this.logger_:q.log.warn,S=i.message?" "+i.message:"";b(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${S} Switching to playlist ${g.id}.`),g.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),g.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const E=g.targetDuration/2*1e3||5*1e3,A=typeof g.lastRequest=="number"&&Date.now()-g.lastRequest<=E;return this.switchMedia_(g,"exclude",c||A)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const r=[],o=e==="all";(o||e==="main")&&r.push(this.mainPlaylistLoader_);const u=[];(o||e==="audio")&&u.push("AUDIO"),(o||e==="subtitle")&&(u.push("CLOSED-CAPTIONS"),u.push("SUBTITLES")),u.forEach(c=>{const p=this.mediaTypes_[c]&&this.mediaTypes_[c].activePlaylistLoader;p&&r.push(p)}),["main","audio","subtitle"].forEach(c=>{const p=this[`${c}SegmentLoader_`];p&&(e===c||e==="all")&&r.push(p)}),r.forEach(c=>i.forEach(p=>{typeof c[p]=="function"&&c[p]()}))}setCurrentTime(e){const i=gu(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Oa.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const r=e.media();if(!r)return null;const o=this.syncController_.getMediaSequenceSync(i);if(o&&o.isReliable){const p=o.start,g=o.end;if(!isFinite(p)||!isFinite(g))return null;const b=Oa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r),S=Math.max(p,g-b);return hi([[p,S]])}const u=this.syncController_.getExpiredTime(r,this.duration());if(u===null)return null;const c=Oa.Playlist.seekable(r,u,Oa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r));return c.length?c:null}computeFinalSeekable_(e,i){if(!i)return e;const r=e.start(0),o=e.end(0),u=i.start(0),c=i.end(0);return u>o||r>c?e:hi([[Math.max(r,u),Math.min(o,c)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;const r=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||r&&r.length&&this.seekable_.length&&r.start(0)===this.seekable_.start(0)&&r.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${dS(this.seekable_)}]`);const o={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:o}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const o=this.seekable();if(!o.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<o.end(o.length-1))&&this.sourceUpdater_.setDuration(o.end(o.length-1));return}const i=this.tech_.buffered();let r=Oa.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(r=Math.max(r,i.end(i.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const i=this.mediaTypes_[e].groups;for(const r in i)i[r].forEach(o=>{o.playlistLoader&&o.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=Md(this.main(),i),o={},u=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(o.video=r.video||e.main.videoCodec||jk),e.main.isMuxed&&(o.video+=`,${r.audio||e.main.audioCodec||nT}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||u)&&(o.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||nT,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!o.audio&&!o.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const c=(b,S)=>b?id(S,this.usingManagedMediaSource_):Gg(S),p={};let g;if(["video","audio"].forEach(function(b){if(o.hasOwnProperty(b)&&!c(e[b].isFmp4,o[b])){const S=e[b].isFmp4?"browser":"muxer";p[S]=p[S]||[],p[S].push(o[b]),b==="audio"&&(g=S)}}),u&&g&&i.attributes.AUDIO){const b=i.attributes.AUDIO;this.main().playlists.forEach(S=>{(S.attributes&&S.attributes.AUDIO)===b&&S!==i&&(S.excludeUntil=1/0)}),this.logger_(`excluding audio group ${b} as ${g} does not support codec(s): "${o.audio}"`)}if(Object.keys(p).length){const b=Object.keys(p).reduce((S,E)=>(S&&(S+=", "),S+=`${E} does not support codec(s): "${p[E].join(",")}"`,S),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:b},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const b=[];if(["video","audio"].forEach(S=>{const E=(Rs(this.sourceUpdater_.codecs[S]||"")[0]||{}).type,A=(Rs(o[S]||"")[0]||{}).type;E&&A&&E.toLowerCase()!==A.toLowerCase()&&b.push(`"${this.sourceUpdater_.codecs[S]}" -> "${o[S]}"`)}),b.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${b.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return o}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}excludeUnsupportedVariants_(){const e=this.main().playlists,i=[];Object.keys(e).forEach(r=>{const o=e[r];if(i.indexOf(o.id)!==-1)return;i.push(o.id);const u=Md(this.main,o),c=[];u.audio&&!Gg(u.audio)&&!id(u.audio,this.usingManagedMediaSource_)&&c.push(`audio codec ${u.audio}`),u.video&&!Gg(u.video)&&!id(u.video,this.usingManagedMediaSource_)&&c.push(`video codec ${u.video}`),u.text&&u.text==="stpp.ttml.im1t"&&c.push(`text codec ${u.text}`),c.length&&(o.excludeUntil=1/0,this.logger_(`excluding ${o.id} for unsupported: ${c.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],r=this.main().playlists,o=Rd(Rs(e)),u=kS(o),c=o.video&&Rs(o.video)[0]||null,p=o.audio&&Rs(o.audio)[0]||null;Object.keys(r).forEach(g=>{const b=r[g];if(i.indexOf(b.id)!==-1||b.excludeUntil===1/0)return;i.push(b.id);const S=[],E=Md(this.mainPlaylistLoader_.main,b),A=kS(E);if(!(!E.audio&&!E.video)){if(A!==u&&S.push(`codec count "${A}" !== "${u}"`),!this.sourceUpdater_.canChangeType()){const R=E.video&&Rs(E.video)[0]||null,P=E.audio&&Rs(E.audio)[0]||null;R&&c&&R.type.toLowerCase()!==c.type.toLowerCase()&&S.push(`video codec "${R.type}" !== "${c.type}"`),P&&p&&P.type.toLowerCase()!==p.type.toLowerCase()&&S.push(`audio codec "${P.type}" !== "${p.type}"`)}S.length&&(b.excludeUntil=1/0,this.logger_(`excluding ${b.id}: ${S.join(" && ")}`))}})}updateAdCues_(e){let i=0;const r=this.seekable();r.length&&(i=r.start(0)),Y8(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=fi.GOAL_BUFFER_LENGTH,r=fi.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,fi.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*r,o)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=fi.BUFFER_LOW_WATER_LINE,r=fi.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,fi.MAX_BUFFER_LOW_WATER_LINE),u=Math.max(i,fi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*r,this.bufferBasedABR?u:o)}bufferHighWaterLine(){return fi.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){ax(this.inbandTextTracks_,"com.apple.streaming",this.tech_),w8({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,r){const o=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();ax(this.inbandTextTracks_,e,this.tech_),E8({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:o,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,r=>{this.trigger(Ft({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const u=this.contentSteeringController_.getAvailablePathways(),c=[];for(const p of i.playlists){const g=p.attributes.serviceLocation;if(g&&(c.push(g),!u.has(g)))return!0}return!!(!c.length&&u.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,o=new Set;let u=!1;Object.keys(r).forEach(c=>{const p=r[c],g=this.pathwayAttribute_(p),b=g&&e!==g;p.excludeUntil===1/0&&p.lastExcludeReason_==="content-steering"&&!b&&(delete p.excludeUntil,delete p.lastExcludeReason_,u=!0);const E=!p.excludeUntil&&p.excludeUntil!==1/0;!o.has(p.id)&&b&&E&&(o.add(p.id),p.excludeUntil=1/0,p.lastExcludeReason_="content-steering",this.logger_(`excluding ${p.id} for ${p.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(c=>{const p=this.mediaTypes_[c];if(p.activePlaylistLoader){const g=p.activePlaylistLoader.media_;g&&g.attributes.serviceLocation!==e&&(u=!0)}}),u&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,o=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||o&&o.size){for(const[c,p]of r.entries())o.get(c)||(this.mainPlaylistLoader_.updateOrDeleteClone(p),this.contentSteeringController_.excludePathway(c));for(const[c,p]of o.entries()){const g=r.get(c);if(!g){i.filter(S=>S.attributes["PATHWAY-ID"]===p["BASE-ID"]).forEach(S=>{this.mainPlaylistLoader_.addClonePathway(p,S)}),this.contentSteeringController_.addAvailablePathway(c);continue}this.equalPathwayClones_(g,p)||(this.mainPlaylistLoader_.updateOrDeleteClone(p,!0),this.contentSteeringController_.addAvailablePathway(c))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...o])))}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,o=i["URI-REPLACEMENT"].PARAMS;for(const u in r)if(r[u]!==o[u])return!1;for(const u in o)if(r[u]!==o[u])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const i="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const o=this.mainPlaylistLoader_.getKeyIdSet(r);!o||!o.size||o.forEach(u=>{const c="usable",p=this.keyStatusMap_.has(u)&&this.keyStatusMap_.get(u)===c,g=r.lastExcludeReason_===i&&r.excludeUntil===1/0;p?p&&g&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${u} is ${c}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==i&&(r.excludeUntil=1/0,r.lastExcludeReason_=i,this.logger_(`excluding playlist ${r.id} because the key ID ${u} doesn't exist in the keyStatusMap or is not ${c}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const o=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,u=r.excludeUntil===1/0&&r.lastExcludeReason_===i;o&&u&&(delete r.excludeUntil,q.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const u=(typeof e=="string"?e:q8(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${u} added to the keyStatusMap`),this.keyStatusMap_.set(u,i)}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const vM=(s,e,i)=>r=>{const o=s.main.playlists[e],u=by(o),c=Lp(o);if(typeof r>"u")return c;r?delete o.disabled:o.disabled=!0;const p={renditionInfo:{id:e,bandwidth:o.attributes.BANDWIDTH,resolution:o.attributes.RESOLUTION,codecs:o.attributes.CODECS},cause:"fast-quality"};return r!==c&&!u&&(r?(i(o),s.trigger({type:"renditionenabled",metadata:p})):s.trigger({type:"renditiondisabled",metadata:p})),r};class bM{constructor(e,i,r){const{playlistController_:o}=e,u=o.fastQualityChange_.bind(o);if(i.attributes){const c=i.attributes.RESOLUTION;this.width=c&&c.width,this.height=c&&c.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=Md(o.main(),i),this.playlist=i,this.id=r,this.enabled=vM(e.playlists,i.id,u)}}const _M=function(s){s.representations=()=>{const e=s.playlistController_.main(),i=Od(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(r=>!by(r)).map((r,o)=>new bM(s,r,r.id)):[]}},xx=["seeking","seeked","pause","playing","error"];class TM extends q.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=$n("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),o=()=>this.techWaiting_(),u=()=>this.resetTimeUpdate_(),c=this.playlistController_,p=["main","subtitle","audio"],g={};p.forEach(S=>{g[S]={reset:()=>this.resetSegmentDownloads_(S),updateend:()=>this.checkSegmentDownloads_(S)},c[`${S}SegmentLoader_`].on("appendsdone",g[S].updateend),c[`${S}SegmentLoader_`].on("playlistupdate",g[S].reset),this.tech_.on(["seeked","seeking"],g[S].reset)});const b=S=>{["main","audio"].forEach(E=>{c[`${E}SegmentLoader_`][S]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),b("off"))},this.clearSeekingAppendCheck_=()=>b("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),b("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",o),this.tech_.on(xx,u),this.tech_.on("canplay",r),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",o),this.tech_.off(xx,u),this.tech_.off("canplay",r),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),p.forEach(S=>{c[`${S}SegmentLoader_`].off("appendsdone",g[S].updateend),c[`${S}SegmentLoader_`].off("playlistupdate",g[S].reset),this.tech_.off(["seeked","seeking"],g[S].reset)}),this.checkCurrentTimeTimeout_&&U.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&U.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=U.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_()}checkSegmentDownloads_(e){const i=this.playlistController_,r=i[`${e}SegmentLoader_`],o=r.buffered_(),u=uR(this[`${e}Buffered_`],o);if(this[`${e}Buffered_`]=o,u){const c={bufferedRanges:o};i.trigger({type:"bufferedrangeschanged",metadata:c}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:r.playlist_&&r.playlist_.id,buffered:Io(o)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+Hs>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(hi([this.lastRecordedTime,e]));const r={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:r}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),r=this.tech_.currentTime(),o=this.afterSeekableWindow_(i,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let u;if(o&&(u=i.end(i.length-1)),this.beforeSeekableWindow_(i,r)){const P=i.start(0);u=P+(P===i.end(0)?0:Hs)}if(typeof u<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${dS(i)}. Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0;const c=this.playlistController_.sourceUpdater_,p=this.tech_.buffered(),g=c.audioBuffer?c.audioBuffered():null,b=c.videoBuffer?c.videoBuffered():null,S=this.media(),E=S.partTargetDuration?S.partTargetDuration:(S.targetDuration-Fs)*2,A=[g,b];for(let P=0;P<A.length;P++){if(!A[P])continue;if(gy(A[P],r)<E)return!1}const R=Mp(p,r);return R.length===0?!1:(u=R.start(0)+Hs,this.logger_(`Buffered region starts (${R.start(0)}) just beyond seek point (${r}). Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),r=gu(i,e);if(r.length&&e+3<=r.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${r.start(0)} -> ${r.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){const p=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${p}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(p),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const c=Mp(o,i);return c.length>0?(this.logger_(`Stopped at ${i} and seeking to ${c.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,r,o=!1){if(!e.length)return!1;let u=e.end(e.length-1)+Hs;const c=!r.endList,p=typeof r.partTargetDuration=="number";return c&&(p||o)&&(u=e.end(e.length-1)+r.targetDuration*3),i>u}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:r}){if(!e)return;let o;if(e.length&&i.length){const u=gu(e,r-3),c=gu(e,r),p=gu(i,r);p.length&&!c.length&&u.length&&(o={start:u.end(0),end:p.end(0)})}else Mp(e,r).length||(o=this.gapFromVideoUnderflow_(e,r));return o?(this.logger_(`Encountered a gap in video from ${o.start} to ${o.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),r=this.tech_.currentTime(),o=Mp(i,r);if(this.resetTimeUpdate_(),o.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",o.start(0)),this.tech_.setCurrentTime(o.start(0)+Fs);const u={gapInfo:{from:r,to:o.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:u}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const r=aR(e);for(let o=0;o<r.length;o++){const u=r.start(o),c=r.end(o);if(i-u<4&&i-u>2)return{start:u,end:c}}return null}}const SM={errorInterval:30,getSource(s){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(i)}},Ex=function(s,e){let i=0,r=0;const o=pt(SM,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const u=function(){r&&s.currentTime(r)},c=function(S){S!=null&&(r=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",u),s.src(S),s.trigger({type:"usage",name:"vhs-error-reload"}),s.play())},p=function(){if(Date.now()-i<o.errorInterval*1e3){s.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!o.getSource||typeof o.getSource!="function"){q.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),o.getSource.call(s,c)},g=function(){s.off("loadedmetadata",u),s.off("error",p),s.off("dispose",g)},b=function(S){g(),Ex(s,S)};s.on("error",p),s.on("dispose",g),s.reloadSourceOnError=b},xM=function(s){Ex(this,s)};var Cx="3.17.0",EM="7.1.0",CM="1.3.1",AM="7.2.0",wM="4.0.2";const Pt={PlaylistLoader:bu,Playlist:un,utils:LR,STANDARD_PLAYLIST_SELECTOR:sx,INITIAL_PLAYLIST_SELECTOR:b8,lastBandwidthSelector:sx,movingAverageBandwidthSelector:y8,comparePlaylistBandwidth:Ry,comparePlaylistResolution:g8,xhr:IS()};Object.keys(fi).forEach(s=>{Object.defineProperty(Pt,s,{get(){return q.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),fi[s]},set(e){if(q.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){q.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}fi[s]=e}})});const Ax="videojs-vhs",wx=function(s,e){const i=e.media();let r=-1;for(let o=0;o<s.length;o++)if(s[o].id===i.id){r=o;break}s.selectedIndex_=r,s.trigger({selectedIndex:r,type:"change"})},DM=function(s,e){e.representations().forEach(i=>{s.addQualityLevel(i)}),wx(s,e.playlists)};Pt.canPlaySource=function(){return q.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const kM=(s,e,i)=>{if(!s)return s;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=Rd(Rs(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const o=Hl(r.video),u=Hl(r.audio),c={};for(const p in s)c[p]={},u&&(c[p].audioContentType=u),o&&(c[p].videoContentType=o),e.contentProtection&&e.contentProtection[p]&&e.contentProtection[p].pssh&&(c[p].pssh=e.contentProtection[p].pssh),typeof s[p]=="string"&&(c[p].url=s[p]);return pt(s,c)},OM=(s,e)=>s.reduce((i,r)=>{if(!r.contentProtection)return i;const o=e.reduce((u,c)=>{const p=r.contentProtection[c];return p&&p.pssh&&(u[c]={pssh:p.pssh}),u},{});return Object.keys(o).length&&i.push(o),i},[]),RM=({player:s,sourceKeySystems:e,audioMedia:i,mainPlaylists:r})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const o=i?r.concat([i]):r,u=OM(o,Object.keys(e)),c=[],p=[];return u.forEach(g=>{p.push(new Promise((b,S)=>{s.tech_.one("keysessioncreated",b)})),c.push(new Promise((b,S)=>{s.eme.initializeMediaKeys({keySystems:g},E=>{if(E){S(E);return}b()})}))}),Promise.race([Promise.all(c),Promise.race(p)])},MM=({player:s,sourceKeySystems:e,media:i,audioMedia:r})=>{const o=kM(e,i,r);return o?(s.currentSource().keySystems=o,o&&!s.eme?(q.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Dx=()=>{if(!U.localStorage)return null;const s=U.localStorage.getItem(Ax);if(!s)return null;try{return JSON.parse(s)}catch{return null}},LM=s=>{if(!U.localStorage)return!1;let e=Dx();e=e?pt(e,s):s;try{U.localStorage.setItem(Ax,JSON.stringify(e))}catch{return!1}return e},IM=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,kx=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},Ox=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},Rx=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},Mx=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};Pt.supportsNativeHls=function(){if(!me||!me.createElement)return!1;const s=me.createElement("video");return q.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return/maybe|probably/i.test(s.canPlayType(i))}):!1}(),Pt.supportsNativeDash=function(){return!me||!me.createElement||!q.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(me.createElement("video").canPlayType("application/dash+xml"))}(),Pt.supportsTypeNatively=s=>s==="hls"?Pt.supportsNativeHls:s==="dash"?Pt.supportsNativeDash:!1,Pt.isSupported=function(){return q.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Pt.xhr.onRequest=function(s){kx(Pt.xhr,s)},Pt.xhr.onResponse=function(s){Ox(Pt.xhr,s)},Pt.xhr.offRequest=function(s){Rx(Pt.xhr,s)},Pt.xhr.offResponse=function(s){Mx(Pt.xhr,s)};const NM=q.getComponent("Component");class Lx extends NM{constructor(e,i,r){if(super(i,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=$n("VhsHandler"),i.options_&&i.options_.playerId){const o=q.getPlayer(i.options_.playerId);this.player_=o}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(me,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],o=>{const u=me.fullscreenElement||me.webkitFullscreenElement||me.mozFullScreenElement||me.msFullscreenElement;u&&u.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=pt(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const r=Dx();r&&r.bandwidth&&(this.options_.bandwidth=r.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),r&&r.throughput&&(this.options_.throughput=r.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=fi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===fi.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(r=>{typeof this.source_[r]<"u"&&(this.options_[r]=this.source_[r])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i)}setOptions(e={}){this.setOptions_(e)}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=IM(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Pt,this.options_.sourceType=sT(i),this.options_.seekTo=u=>{this.tech_.setCurrentTime(u)},this.options_.player_=this.player_,this.playlistController_=new yM(this.options_);const r=pt({liveRangeSafeTimeDelta:Hs},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new TM(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const u=q.players[this.tech_.options_.playerId];let c=this.playlistController_.error;typeof c=="object"&&!c.code?c.code=3:typeof c=="string"&&(c={message:c,code:3}),u.error(c)});const o=this.options_.bufferBasedABR?Pt.movingAverageBandwidthSelector(.55):Pt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.playlistController_.selectInitialPlaylist=Pt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(u){this.playlistController_.selectPlaylist=u.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(u){this.playlistController_.mainSegmentLoader_.throughput.rate=u,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let u=this.playlistController_.mainSegmentLoader_.bandwidth;const c=U.navigator.connection||U.navigator.mozConnection||U.navigator.webkitConnection,p=1e7;if(this.options_.useNetworkInformationApi&&c){const g=c.downlink*1e3*1e3;g>=p&&u>=p?u=Math.max(u,g):u=g}return u},set(u){this.playlistController_.mainSegmentLoader_.bandwidth=u,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const u=1/(this.bandwidth||1);let c;return this.throughput>0?c=1/this.throughput:c=0,Math.floor(1/(u+c))},set(){q.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Io(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Io(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&LM({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{_M(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=U.URL.createObjectURL(this.playlistController_.mediaSource),(q.browser.IS_ANY_SAFARI||q.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),RM({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=MM({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",r=>{this.playlistController_.updatePlaylistByKeyStatus(r.keyId,r.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=q.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{DM(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{wx(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Cx,"mux.js":EM,"mpd-parser":CM,"m3u8-parser":AM,"aes-decrypter":wM}}version(){return this.constructor.version()}canChangeType(){return fx.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&U.URL.revokeObjectURL&&(U.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return HR({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,r=!0,o=2){return FS({programTime:e,playlist:this.playlistController_.media(),retryCount:o,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{kx(this.xhr,e)},this.xhr.onResponse=e=>{Ox(this.xhr,e)},this.xhr.offRequest=e=>{Rx(this.xhr,e)},this.xhr.offResponse=e=>{Mx(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,o=>{this.player_.trigger(Ft({},o))})}),i.forEach(r=>{this.playbackWatcher_.on(r,o=>{this.player_.trigger(Ft({},o))})})}}const Bp={name:"videojs-http-streaming",VERSION:Cx,canHandleSource(s,e={}){const i=pt(q.options,e);return!i.vhs.experimentalUseMMS&&!id("avc1.4d400d,mp4a.40.2",!1)?!1:Bp.canPlayType(s.type,i)},handleSource(s,e,i={}){const r=pt(q.options,i);return e.vhs=new Lx(s,e,r),e.vhs.xhr=IS(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const i=sT(s);if(!i)return"";const r=Bp.getOverrideNative(e);return!Pt.supportsTypeNatively(i)||r?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,i=!(q.browser.IS_ANY_SAFARI||q.browser.IS_IOS),{overrideNative:r=i}=e;return r}};(()=>id("avc1.4d400d,mp4a.40.2",!0))()&&q.getTech("Html5").registerSourceHandler(Bp,0),q.VhsHandler=Lx,q.VhsSourceHandler=Bp,q.Vhs=Pt,q.use||q.registerComponent("Vhs",Pt),q.options.vhs=q.options.vhs||{},(!q.getPlugin||!q.getPlugin("reloadSourceOnError"))&&q.registerPlugin("reloadSourceOnError",xM);const JI="",PM=q.getComponent("Component");class Ix extends PM{constructor(e,i){i&&i.relatedVideos&&(i._relatedVideos=i.relatedVideos),super(e,i),this.relatedVideos=i&&i.relatedVideos?i.relatedVideos:[]}createEl(){const e=this.options_&&this.options_._relatedVideos?this.options_._relatedVideos:[],r=window.innerWidth<=768?6:12,o=e.slice(0,r),u=super.createEl("div",{className:"vjs-end-screen-overlay"}),c=q.dom.createEl("div",{className:"vjs-related-videos-grid"});if(o&&Array.isArray(o)&&o.length>0)o.forEach(p=>{const g=this.createVideoItem(p);c.appendChild(g)});else{const p=q.dom.createEl("div",{className:"vjs-no-related-videos"});p.textContent="No related videos available",p.style.color="white",p.style.textAlign="center",c.appendChild(p)}return u.appendChild(c),u}createVideoItem(e){const i=q.dom.createEl("div",{className:"vjs-related-video-item"}),r=q.dom.createEl("img",{className:"vjs-related-video-thumbnail",src:e.thumbnail,alt:e.title}),o=q.dom.createEl("div",{className:"vjs-related-video-overlay"}),u=q.dom.createEl("div",{className:"vjs-related-video-title"});u.textContent=e.title;const c=q.dom.createEl("div",{className:"vjs-related-video-meta"}),p=q.dom.createEl("div",{className:"vjs-related-video-author"});p.textContent=e.author;const g=q.dom.createEl("div",{className:"vjs-related-video-views"});g.textContent=e.views,c.appendChild(p),c.appendChild(g);const b=q.dom.createEl("div",{className:"vjs-related-video-duration"}),S=E=>{if(!E||E===0)return"";const A=Math.floor(E/60),R=Math.floor(E%60);return`${A}:${R.toString().padStart(2,"0")}`};return b.textContent=S(e.duration),o.appendChild(u),o.appendChild(c),i.appendChild(r),i.appendChild(o),e.duration&&e.duration>0&&i.appendChild(b),i.addEventListener("click",()=>{window.location.href=`/view?m=${e.id}`}),i}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}}q.registerComponent("EndScreenOverlay",Ix);const e6="",UM=q.getComponent("Component");class Nx extends UM{constructor(e,i){super(e,i),this.nextVideoData=i.nextVideoData||null,this.countdownSeconds=i.countdownSeconds||5,this.onPlayNext=i.onPlayNext||(()=>{}),this.onCancel=i.onCancel||(()=>{}),this.currentCountdown=this.countdownSeconds,this.countdownInterval=null,this.isActive=!1,this.startCountdown=this.startCountdown.bind(this),this.stopCountdown=this.stopCountdown.bind(this),this.handlePlayNext=this.handlePlayNext.bind(this),this.handleCancel=this.handleCancel.bind(this),this.updateCountdownDisplay=this.updateCountdownDisplay.bind(this)}createEl(){var c,p,g,b;const e=super.createEl("div",{className:"vjs-autoplay-countdown-overlay"}),i=((c=this.nextVideoData)==null?void 0:c.title)||"Next Video",r=((p=this.nextVideoData)==null?void 0:p.thumbnail)||"";e.innerHTML=`
|
||
<div class="autoplay-countdown-content">
|
||
<div class="autoplay-countdown-header">
|
||
<h3>Up next in <span class="countdown-timer">${this.countdownSeconds}</span></h3>
|
||
</div>
|
||
|
||
<div class="autoplay-countdown-video-info">
|
||
${r?`<div class="next-video-thumbnail">
|
||
<img src="${r}" alt="${i}" />
|
||
</div>`:""}
|
||
<div class="next-video-details">
|
||
<h4 class="next-video-title">${i}</h4>
|
||
${(g=this.nextVideoData)!=null&&g.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
|
||
${(b=this.nextVideoData)!=null&&b.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="autoplay-countdown-actions">
|
||
<button class="autoplay-play-button" type="button">
|
||
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
|
||
<path d="M8 5v14l11-7z"/>
|
||
</svg>
|
||
Play Now
|
||
</button>
|
||
<button class="autoplay-cancel-button" type="button">
|
||
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
|
||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
|
||
</svg>
|
||
Cancel
|
||
</button>
|
||
</div>
|
||
</div>
|
||
`;const o=e.querySelector(".autoplay-play-button"),u=e.querySelector(".autoplay-cancel-button");return o&&o.addEventListener("click",S=>{S.preventDefault(),this.handlePlayNext()}),u&&u.addEventListener("click",S=>{S.preventDefault(),this.handleCancel()}),e.style.display="none",e}startCountdown(){this.isActive=!0,this.currentCountdown=this.countdownSeconds,this.show(),this.updateCountdownDisplay(),this.countdownInterval=setInterval(()=>{this.currentCountdown--,this.updateCountdownDisplay(),this.currentCountdown<=0&&(this.stopCountdown(),this.handlePlayNext())},1e3),console.log("Autoplay countdown started:",this.countdownSeconds,"seconds")}stopCountdown(){this.isActive=!1,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),this.hide(),console.log("Autoplay countdown stopped")}updateCountdownDisplay(){const e=this.el().querySelector(".countdown-timer");e&&(e.textContent=this.currentCountdown)}handlePlayNext(){console.log("Autoplay: Playing next video immediately");try{this.stopCountdown(),this.onPlayNext()}catch(e){console.error("Error in handlePlayNext:",e)}}handleCancel(){console.log("Autoplay: Cancelled by user");try{this.stopCountdown(),this.onCancel()}catch(e){console.error("Error in handleCancel:",e)}}show(){this.el()&&(this.el().style.display="flex",this.el().classList.add("autoplay-countdown-show"))}hide(){this.el()&&(this.el().style.display="none",this.el().classList.remove("autoplay-countdown-show"))}formatDuration(e){if(!e||e===0)return"";const i=Math.floor(e/3600),r=Math.floor(e%3600/60),o=e%60;return i>0?`${i}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${r}:${o.toString().padStart(2,"0")}`}updateNextVideoData(e){var i,r,o,u;if(this.nextVideoData=e,this.el()){const c=((i=this.nextVideoData)==null?void 0:i.title)||"Next Video",p=((r=this.nextVideoData)==null?void 0:r.thumbnail)||"",g=this.el().querySelector(".autoplay-countdown-video-info");g&&(g.innerHTML=`
|
||
${p?`<div class="next-video-thumbnail">
|
||
<img src="${p}" alt="${c}" />
|
||
</div>`:""}
|
||
<div class="next-video-details">
|
||
<h4 class="next-video-title">${c}</h4>
|
||
${(o=this.nextVideoData)!=null&&o.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
|
||
${(u=this.nextVideoData)!=null&&u.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
|
||
</div>
|
||
`)}}dispose(){this.stopCountdown(),super.dispose()}}q.registerComponent("AutoplayCountdownOverlay",Nx);const BM=q.getComponent("Component");class Px extends BM{constructor(e,i){super(e,i),this.on(e,"loadedmetadata",this.updateChapterMarkers),this.on(e,"texttrackchange",this.updateChapterMarkers),this.chaptersData=[],this.tooltip=null,this.isHovering=!1,this.previewSprite=i.previewSprite||null}createEl(){const e=super.createEl("div",{className:"vjs-chapter-markers-track"});return this.tooltip=null,e}updateChapterMarkers(){const e=this.player(),i=e.textTracks();let r=null;for(let u=0;u<i.length;u++)if(i[u].kind==="chapters"){r=i[u];break}if(!r||!r.cues)return;this.chaptersData=[];for(let u=0;u<r.cues.length;u++){const c=r.cues[u];this.chaptersData.push({startTime:c.startTime,endTime:c.endTime,text:c.text})}this.el().innerHTML="";const o=e.duration();if(!(!o||o===1/0)){for(let u=0;u<r.cues.length;u++){const c=r.cues[u],p=this.createMarker(c,o);this.el().appendChild(p)}this.setupProgressBarHover()}}setupProgressBarHover(){const e=this.player().getChild("controlBar").getChild("progressControl");if(!e)return;const i=e.getChild("seekBar");if(!i)return;const r=i.el();if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=q.dom.createEl("div",{className:"vjs-chapter-floating-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",background:"rgba(0, 0, 0, 0.9)",color:"white",padding:"8px 12px",borderRadius:"6px",fontSize:"12px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:"1000",bottom:"45px",transform:"translateX(-50%)",display:"none",minWidth:"200px",maxWidth:"280px",width:"auto",textAlign:"center",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"}),this.chapterTitle=q.dom.createEl("div",{className:"chapter-title"}),Object.assign(this.chapterTitle.style,{fontWeight:"bold",marginBottom:"4px",color:"#fff"}),this.chapterInfo=q.dom.createEl("div",{className:"chapter-info"}),Object.assign(this.chapterInfo.style,{fontSize:"11px",opacity:"0.8",marginBottom:"2px"}),this.positionInfo=q.dom.createEl("div",{className:"position-info"}),Object.assign(this.positionInfo.style,{fontSize:"10px",opacity:"0.6"}),this.chapterImage=q.dom.createEl("div",{className:"chapter-image-sprite"}),Object.assign(this.chapterImage.style,{width:"160px",height:"90px",marginTop:"8px",borderRadius:"4px",border:"1px solid rgba(255,255,255,0.1)",display:"block",overflow:"hidden",backgroundRepeat:"no-repeat",backgroundSize:"auto"}),this.tooltip.appendChild(this.chapterTitle),this.tooltip.appendChild(this.chapterInfo),this.tooltip.appendChild(this.positionInfo),this.tooltip.appendChild(this.chapterImage)),!r.querySelector(".vjs-chapter-floating-tooltip"))try{r.appendChild(this.tooltip)}catch{return}const o=e.el();o.removeEventListener("mouseenter",this.handleMouseEnter),o.removeEventListener("mouseleave",this.handleMouseLeave),o.removeEventListener("mousemove",this.handleMouseMove),this.handleMouseEnter=()=>{this.isHovering=!0,this.tooltip.style.display="block"},this.handleMouseLeave=()=>{this.isHovering=!1,this.tooltip.style.display="none"},this.handleMouseMove=u=>{this.isHovering&&this.updateChapterTooltip(u,r,o)},o.addEventListener("mouseenter",this.handleMouseEnter),o.addEventListener("mouseleave",this.handleMouseLeave),o.addEventListener("mousemove",this.handleMouseMove)}updateChapterTooltip(e,i,r){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const u=i.getBoundingClientRect(),c=r.getBoundingClientRect(),p=e.clientX-u.left,b=Math.max(0,Math.min(1,p/u.width))*o,S=e.clientX-c.left,E=this.findChapterAtTime(b);if(E){const z=W=>{const Z=Math.floor(W/60),le=Math.floor(W%60);return`${Z}:${le.toString().padStart(2,"0")}`},H=z(E.startTime),X=z(E.endTime),$=z(b);this.chapterTitle.textContent=E.text,this.chapterInfo.textContent=`Chapter: ${H} - ${X}`,this.positionInfo.textContent=`Position: ${$}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}else{const z=this.formatTime(b);this.chapterTitle.textContent="No Chapter",this.chapterInfo.textContent="",this.positionInfo.textContent=`Position: ${z}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const A=this.tooltip.offsetWidth||240,R=c.width,P=A/2;let w=S;w-P<0?w=P+5:w+P>R&&(w=R-P-5),this.tooltip.style.left=`${w}px`,this.tooltip.style.visibility="visible",this.tooltip.style.display="block"}findChapterAtTime(e){for(const i of this.chaptersData)if(e>=i.startTime&&e<i.endTime)return i;return null}updateSpriteThumbnail(e){if(!this.previewSprite||!this.previewSprite.url){this.chapterImage.style.display="none",console.log("No sprite data available:",this.previewSprite);return}const{url:i,frame:r}=this.previewSprite,{width:o,height:u}=r,c=r.seconds||10,p=this.player().duration()||45,g=Math.ceil(p/c),b=Math.min(g,6);let S=Math.floor(e/c);S=Math.min(S,b-1);const E=S,A=0,R=-(A*o),P=-(E*u);if(console.log(`Time: ${e}s, Duration: ${this.player().duration()}s, Interval: ${c}s, Frame: ${S}/${b-1}, Row: ${E}, Col: ${A}, Pos: ${R}px ${P}px, URL: ${i}`),this.chapterImage.style.backgroundImage=`url("${i}")`,this.chapterImage.style.backgroundPosition=`${R}px ${P}px`,this.chapterImage.style.backgroundSize="auto",this.chapterImage.style.backgroundRepeat="no-repeat",this.chapterImage.style.display="block",S>=3&&e>30){const w=-(2*u);this.chapterImage.style.backgroundPosition=`${R}px ${w}px`,console.log(`Fallback: Using frame 2 instead of frame ${S} for time ${e}s`)}}formatTime(e){const i=Math.floor(e/60),r=Math.floor(e%60);return`${i}:${r.toString().padStart(2,"0")}`}createMarker(e,i){const r=q.dom.createEl("div",{className:"vjs-chapter-marker"}),o=e.startTime/i*100;r.style.left=o+"%";const u=q.dom.createEl("div",{className:"vjs-chapter-marker-tooltip"});return u.textContent=e.text,r.appendChild(u),r.addEventListener("click",c=>{c.stopPropagation(),this.player().currentTime(e.startTime)}),r.style.pointerEvents="auto",r.style.cursor="pointer",r}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const r=e.el();r.removeEventListener("mouseenter",this.handleMouseEnter),r.removeEventListener("mouseleave",this.handleMouseLeave),r.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}q.registerComponent("ChapterMarkers",Px);const FM=q.getComponent("Button");class Ux extends FM{constructor(e,i){super(e,i)}createEl(){const e=super.createEl("button",{className:"vjs-next-video-control vjs-control vjs-button",type:"button",title:"Next Video","aria-label":"Next Video"}),i=q.dom.createEl("span",{"aria-hidden":"true"});i.innerHTML=`
|
||
<svg viewBox="0 0 24 24" width="2em" height="2em" fill="currentColor" style="position: relative; top: 3px; left: 8px; right: 0; bottom: 0; margin: auto; cursor: pointer;">
|
||
<path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/>
|
||
</svg>
|
||
`;const r=q.dom.createEl("span",{className:"vjs-control-text"});return r.textContent="Next Video",e.appendChild(i),e.appendChild(r),e}handleClick(){this.player().trigger("nextVideo")}}q.registerComponent("NextVideoButton",Ux);const HM=q.getComponent("Button");class Bx extends HM{constructor(e,i){if(super(e,i),this.userPreferences=i.userPreferences,this.userPreferences){const r=this.userPreferences.getPreference("autoplay");this.isAutoplayEnabled=r===!0,console.log("Autoplay button initialized with saved preference:",this.isAutoplayEnabled)}else this.isAutoplayEnabled=!1,console.log("Autoplay button initialized with default (no userPreferences):",this.isAutoplayEnabled);this.updateIcon=this.updateIcon.bind(this),this.handleClick=this.handleClick.bind(this)}createEl(){const e=super.createEl("button",{className:"vjs-autoplay-toggle vjs-control vjs-button",type:"button",title:this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off","aria-label":this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off"});this.iconSpan=q.dom.createEl("span",{"aria-hidden":"true",className:"vjs-autoplay-icon"}),console.log("AutoplayToggleButton createEl: isAutoplayEnabled =",this.isAutoplayEnabled),this.isAutoplayEnabled?(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ff4444;">●</span>',console.log("Setting RED icon (autoplay ON)")):(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ccc;">○</span>',console.log("Setting GRAY icon (autoplay OFF)"));const i=q.dom.createEl("span",{className:"vjs-control-text"});return i.textContent=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off",e.appendChild(this.iconSpan),e.appendChild(i),e}updateIcon(){if(this.isAutoplayEnabled){if(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ff4444;">●</span>',this.el()){this.el().title="Autoplay is on",this.el().setAttribute("aria-label","Autoplay is on");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is on")}}else if(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ccc;">○</span>',this.el()){this.el().title="Autoplay is off",this.el().setAttribute("aria-label","Autoplay is off");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is off")}}handleClick(){this.isAutoplayEnabled=!this.isAutoplayEnabled,this.userPreferences&&(this.userPreferences.setAutoplayPreference(this.isAutoplayEnabled),console.log("Autoplay preference saved to localStorage:",this.isAutoplayEnabled)),this.updateIcon(),console.log("Autoplay toggled:",this.isAutoplayEnabled?"ON":"OFF"),this.player().trigger("autoplayToggle",{autoplay:this.isAutoplayEnabled})}setAutoplayState(e){this.isAutoplayEnabled=e,this.updateIcon()}}q.registerComponent("AutoplayToggleButton",Bx);const zM=q.getComponent("Component");class Uy extends zM{constructor(e,i){super(e,i),this.updateContent=this.updateContent.bind(this),this.on(e,"timeupdate",this.updateContent),this.on(e,"durationchange",this.updateContent),this.on(e,"loadedmetadata",this.updateContent),this.options_={displayNegative:!1,customPrefix:"",customSuffix:"",...i}}createEl(){const e=q.dom.createEl("div",{className:"vjs-remaining-time vjs-time-control vjs-control custom-remaining-time"});return e.innerHTML=`
|
||
<span class="vjs-control-text" role="presentation">Time Display </span>
|
||
<span class="vjs-remaining-time-display" role="presentation">0:00 / 0:00</span>
|
||
`,e}updateContent(){const e=this.player(),i=e.currentTime(),r=e.duration(),o=this.el().querySelector(".vjs-remaining-time-display");if(o){const u=this.formatTime(isNaN(i)?0:i),c=this.formatTime(isNaN(r)?0:r);o.textContent=`${u} / ${c}`}}formatTime(e){const{customPrefix:i,customSuffix:r}=this.options_,o=Math.floor(e/3600),u=Math.floor(e%3600/60),c=Math.floor(e%60);let p;return o>0?p=`${o}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`:p=`${u}:${c.toString().padStart(2,"0")}`,`${i}${p}${r}`}handleClick(){console.log("Time display clicked")}dispose(){super.dispose()}}Uy.prototype.controlText_="Time Display",q.registerComponent("CustomRemainingTime",Uy);const jM=q.getComponent("Component");class By extends jM{constructor(e,i){super(e,i),this.chaptersData=i.chaptersData||[],this.overlay=null,this.chaptersList=null,this.createOverlay=this.createOverlay.bind(this),this.updateCurrentChapter=this.updateCurrentChapter.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.player().ready(()=>{this.createOverlay(),this.setupChaptersButton()})}createOverlay(){if(!this.chaptersData||this.chaptersData.length===0){console.log("⚠ No chapters data available for overlay");return}const e=this.player().el();this.overlay=document.createElement("div"),this.overlay.className="custom-chapters-overlay",this.overlay.style.cssText=`
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
width: 300px;
|
||
height: 100%;
|
||
background: linear-gradient(180deg, rgba(20, 20, 30, 0.95) 0%, rgba(40, 40, 50, 0.95) 100%);
|
||
color: white;
|
||
z-index: 1000;
|
||
display: none;
|
||
overflow-y: auto;
|
||
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
|
||
`;const i=document.createElement("div");i.style.cssText=`
|
||
background: rgba(0, 0, 0, 0.8);
|
||
padding: 20px;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
font-size: 14px;
|
||
letter-spacing: 2px;
|
||
border-bottom: 2px solid #4a90e2;
|
||
position: sticky;
|
||
top: 0;
|
||
`,i.textContent="CHAPTERS",this.overlay.appendChild(i);const r=document.createElement("div");r.style.cssText=`
|
||
position: absolute;
|
||
top: 15px;
|
||
right: 15px;
|
||
width: 25px;
|
||
height: 25px;
|
||
background: rgba(0, 0, 0, 0.6);
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
font-size: 16px;
|
||
z-index: 10;
|
||
`,r.textContent="×",r.onclick=()=>{this.overlay.style.display="none"},this.overlay.appendChild(r),this.chaptersList=document.createElement("div"),this.chaptersList.style.cssText=`
|
||
padding: 10px 0;
|
||
`,this.chaptersData.forEach(o=>{const u=document.createElement("div");u.style.cssText=`
|
||
padding: 15px 20px;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||
cursor: pointer;
|
||
transition: background 0.2s ease;
|
||
font-size: 14px;
|
||
line-height: 1.4;
|
||
`,u.textContent=o.text,u.onmouseenter=()=>{u.style.background="rgba(74, 144, 226, 0.2)"},u.onmouseleave=()=>{u.style.background="transparent"},u.onclick=()=>{this.player().currentTime(o.startTime),this.overlay.style.display="none",this.chaptersList.querySelectorAll("div").forEach(c=>{c.style.background="transparent",c.style.fontWeight="normal"}),u.style.background="rgba(74, 144, 226, 0.4)",u.style.fontWeight="bold"},this.chaptersList.appendChild(u)}),this.overlay.appendChild(this.chaptersList),e.appendChild(this.overlay),this.player().on("timeupdate",this.updateCurrentChapter),console.log("✓ Custom chapters overlay created")}setupChaptersButton(){const e=this.player().getChild("controlBar").getChild("chaptersButton");e&&(e.off("click"),e.on("click",this.toggleOverlay))}toggleOverlay(){this.overlay&&(this.overlay.style.display==="none"||!this.overlay.style.display?this.overlay.style.display="block":this.overlay.style.display="none")}updateCurrentChapter(){if(!this.chaptersList||!this.chaptersData)return;const e=this.player().currentTime();this.chaptersList.querySelectorAll("div").forEach((r,o)=>{const u=this.chaptersData[o];e>=u.startTime&&(o===this.chaptersData.length-1||e<this.chaptersData[o+1].startTime)?(r.style.borderLeft="4px solid #10b981",r.style.paddingLeft="16px"):(r.style.borderLeft="none",r.style.paddingLeft="20px")})}dispose(){this.overlay&&this.overlay.remove(),super.dispose()}}By.prototype.controlText_="Chapters Overlay",q.registerComponent("CustomChaptersOverlay",By);const t6="";class Fx{constructor(){this.storageKey="videojs_user_preferences",this.isRestoringSubtitles=!1,this.subtitleAutoSaveDisabled=!1,this.defaultPreferences={volume:1,playbackRate:1,quality:"auto",subtitleLanguage:null,muted:!1,autoplay:!1}}getPreferences(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{...this.defaultPreferences,...i}}}catch(e){console.warn("Error reading user preferences from localStorage:",e)}return{...this.defaultPreferences}}savePreferences(e){try{const r={...this.getPreferences(),...e};localStorage.setItem(this.storageKey,JSON.stringify(r)),console.log("User preferences saved:",r)}catch(i){console.warn("Error saving user preferences to localStorage:",i)}}getPreference(e){return this.getPreferences()[e]}setPreference(e,i,r=!1){if(e==="subtitleLanguage"){if(console.log(`🔄 Setting subtitleLanguage: ${i} (restoring: ${this.isRestoringSubtitles}, autoSaveDisabled: ${this.subtitleAutoSaveDisabled}, forceSet: ${r})`),this.isRestoringSubtitles){console.log("🚫 BLOCKED: Subtitle language change during restoration");return}if(this.subtitleAutoSaveDisabled&&!r){console.log("🚫 BLOCKED: Subtitle language change during auto-save disabled period (use forceSet=true to override)");return}console.trace("Subtitle preference change stack trace")}this.savePreferences({[e]:i})}resetPreferences(){try{localStorage.removeItem(this.storageKey),console.log("User preferences reset to defaults")}catch(e){console.warn("Error resetting user preferences:",e)}}applyToPlayer(e){const i=this.getPreferences();this.subtitleAutoSaveDisabled=!0,console.log("🔒 Subtitle auto-save DISABLED during initial load"),setTimeout(()=>{this.subtitleAutoSaveDisabled=!1,console.log("🔓 Subtitle auto-save RE-ENABLED after initial load period")},3e3),typeof i.volume=="number"&&i.volume>=0&&i.volume<=1&&e.volume(i.volume),typeof i.muted=="boolean"&&e.muted(i.muted),typeof i.playbackRate=="number"&&i.playbackRate>0&&e.playbackRate(i.playbackRate),console.log("Applied user preferences to player:",i)}setupAutoSave(e){e.on("volumechange",()=>{this.setPreference("volume",e.volume()),this.setPreference("muted",e.muted())}),e.on("ratechange",()=>{this.setPreference("playbackRate",e.playbackRate())}),e.on("texttrackchange",()=>{if(this.isRestoringSubtitles){console.log("Skipping subtitle save - currently restoring preferences");return}setTimeout(()=>{const i=e.textTracks();let r=null;for(let o=0;o<i.length;o++){const u=i[o];if(u.kind==="subtitles"&&u.mode==="showing"){r=u.language,console.log("Active subtitle language detected:",r);break}}r||console.log("No subtitles active, saving null"),this.setPreference("subtitleLanguage",r)},100)}),this.setupSubtitleMenuListeners(e),console.log("Auto-save preferences listeners set up")}setupSubtitleMenuListeners(e){setTimeout(()=>{const i=e.getChild("controlBar");console.log("=== Searching for subtitle controls ===");const r=["subtitlesButton","captionsButton","subsCapsButton","textTrackButton"];let o=null;for(const u of r){const c=i.getChild(u);if(c){console.log(`Found subtitle button: ${u}`),o=c;break}}o||(console.log("Scanning all control bar children..."),i.children().forEach((c,p)=>{const g=c.name_||c.constructor.name||"Unknown";console.log(`Child ${p}: ${g}`),(g.toLowerCase().includes("subtitle")||g.toLowerCase().includes("caption")||g.toLowerCase().includes("text"))&&(console.log(`Potential subtitle button found: ${g}`),o=c)})),o?(console.log("Found subtitles button, setting up menu listeners"),setTimeout(()=>{this.attachMenuItemListeners(e,o)},500),setTimeout(()=>{this.attachMenuItemListeners(e,o)},2e3)):(console.log("No subtitles button found after exhaustive search"),this.setupDOMBasedListeners(e))},1e3)}setupDOMBasedListeners(e){console.log("Setting up DOM-based subtitle listeners as fallback"),setTimeout(()=>{const i=e.el();i&&(i.addEventListener("click",r=>{const o=r.target;(o.closest(".vjs-subtitles-menu-item")||o.closest(".vjs-captions-menu-item")||o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("subtitle"))&&(console.log("Subtitle menu item clicked via DOM listener:",o.textContent),setTimeout(()=>{this.detectActiveSubtitleFromDOM(e,!0)},200)),o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("off")&&(console.log("Captions off clicked via DOM listener"),setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},200))}),console.log("DOM-based subtitle listeners attached"))},1500)}detectActiveSubtitleFromDOM(e,i=!1){if(this.isRestoringSubtitles){console.log("Skipping DOM subtitle save - currently restoring preferences");return}const r=e.textTracks();let o=null;for(let u=0;u<r.length;u++){const c=r[u];if(c.kind==="subtitles"&&c.mode==="showing"){o=c.language,console.log("DOM detection - Active subtitle language:",o,c.label);break}}this.setPreference("subtitleLanguage",o,i)}attachMenuItemListeners(e,i){try{const r=i.menu;r&&r.children_?(console.log("Found subtitle menu with",r.children_.length,"items"),r.children_.forEach((o,u)=>{if(o.track){const c=o.track;console.log(`Menu item ${u}: ${c.label} (${c.language})`);const p=o.handleClick.bind(o);o.handleClick=()=>{console.log("Subtitle menu item clicked:",c.label,c.language),p(),setTimeout(()=>{c.mode==="showing"?(console.log("Saving subtitle preference:",c.language),this.setPreference("subtitleLanguage",c.language,!0)):(console.log("Subtitle disabled, saving null"),this.setPreference("subtitleLanguage",null,!0))},100)}}else if(o.label&&o.label.toLowerCase().includes("off")){console.log("Found captions off menu item");const c=o.handleClick.bind(o);o.handleClick=()=>{console.log("Captions off clicked"),c(),setTimeout(()=>{console.log("Saving subtitle preference: null (off)"),this.setPreference("subtitleLanguage",null,!0)},100)}}})):console.log("Could not find subtitle menu or menu items")}catch(r){console.error("Error setting up subtitle menu listeners:",r)}}applySubtitlePreference(e){const i=this.getPreference("subtitleLanguage");if(i){this.isRestoringSubtitles=!0,console.log("isRestoringSubtitles",this.isRestoringSubtitles);const r=(o=1)=>{const u=e.textTracks();console.log(`Subtitle application attempt ${o}, found ${u.length} text tracks`);for(let p=0;p<u.length;p++){const g=u[p];console.log(`Track ${p}: kind=${g.kind}, language=${g.language}, label=${g.label}, mode=${g.mode}`)}for(let p=0;p<u.length;p++){const g=u[p];g.kind==="subtitles"&&(g.mode="disabled")}let c=!1;for(let p=0;p<u.length;p++){const g=u[p];if(g.kind==="subtitles"&&g.language===i){g.mode="showing",console.log("✓ Applied saved subtitle language:",i,g.label),c=!0,this.updateSubtitleMenuUI(e,g);break}}setTimeout(()=>{this.isRestoringSubtitles=!1,console.log("✅ Subtitle restoration complete, auto-save re-enabled")},600),!c&&o<5?(console.log(`Subtitle language ${i} not found, retrying in ${o*200}ms...`),setTimeout(()=>r(o+1),o*200)):c||(console.warn("Could not find subtitle track for language:",i),this.isRestoringSubtitles=!1)};setTimeout(()=>r(),500)}else console.log("No saved subtitle language to apply")}updateSubtitleMenuUI(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");o&&o.menu&&o.menu.children_.forEach(c=>{c.track?c.track===i?(c.selected(!0),console.log("Updated menu UI for:",c.track.label)):c.selected(!1):c.label&&c.label.toLowerCase().includes("off")&&c.selected(!1)})}catch(r){console.error("Error updating subtitle menu UI:",r)}}getQualityPreference(){return this.getPreference("quality")}setQualityPreference(e){this.setPreference("quality",e)}forceSetSubtitleLanguage(e){console.log(`🚀 FORCE SAVING subtitle language: ${e}`);const r={...this.getPreferences(),subtitleLanguage:e};try{localStorage.setItem(this.storageKey,JSON.stringify(r)),console.log("✅ Force saved subtitle language:",e)}catch(o){console.error("❌ Error force saving subtitle language:",o)}}getAutoplayPreference(){return this.getPreference("autoplay")}setAutoplayPreference(e){this.setPreference("autoplay",e),console.log("Autoplay preference saved:",e)}}const VM=q.getComponent("Component");class Fy extends VM{constructor(e,i){super(e,i),this.settingsButton=null,this.settingsOverlay=null,this.speedSubmenu=null,this.userPreferences=(i==null?void 0:i.userPreferences)||new Fx,this.createSettingsButton=this.createSettingsButton.bind(this),this.createSettingsOverlay=this.createSettingsOverlay.bind(this),this.positionButton=this.positionButton.bind(this),this.toggleSettings=this.toggleSettings.bind(this),this.handleSpeedChange=this.handleSpeedChange.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.player().ready(()=>{this.createSettingsButton(),this.createSettingsOverlay(),this.setupEventListeners()})}createSettingsButton(){const e=this.player().getChild("controlBar"),i=e.getChild("playbackRateMenuButton");i&&i.hide(),this.settingsButton=e.addChild("button",{controlText:"Settings",className:"vjs-settings-button"});const r=this.settingsButton.el();r.innerHTML=`
|
||
<span class="vjs-icon-cog"></span>
|
||
`,this.positionButton(),this.settingsButton.on("click",this.toggleSettings)}createSettingsOverlay(){const e=this.player().getChild("controlBar");this.settingsOverlay=document.createElement("div"),this.settingsOverlay.className="custom-settings-overlay";const i=this.userPreferences.getPreference("playbackRate"),r=this.userPreferences.getPreference("quality"),o=i===1?"Normal":`${i}`,u=r.charAt(0).toUpperCase()+r.slice(1);this.settingsOverlay.innerHTML=`
|
||
<div class="settings-header">Settings</div>
|
||
|
||
<div class="settings-item" data-setting="playback-speed">
|
||
<span>Playback speed</span>
|
||
<span class="current-speed">${o}</span>
|
||
</div>
|
||
|
||
<div class="settings-item" data-setting="quality">
|
||
<span>Quality</span>
|
||
<span class="current-quality">${u}</span>
|
||
</div>
|
||
`,this.createSpeedSubmenu(),e.el().appendChild(this.settingsOverlay)}createSpeedSubmenu(){const e=[{label:"0.25",value:.25},{label:"0.5",value:.5},{label:"0.75",value:.75},{label:"Normal",value:1},{label:"1.25",value:1.25},{label:"1.5",value:1.5},{label:"1.75",value:1.75},{label:"2",value:2}];this.speedSubmenu=document.createElement("div"),this.speedSubmenu.className="speed-submenu";const i=this.userPreferences.getPreference("playbackRate");this.speedSubmenu.innerHTML=`
|
||
<div class="submenu-header">
|
||
<span style="margin-right: 8px;">←</span>
|
||
<span>Playback speed</span>
|
||
</div>
|
||
${e.map(r=>`
|
||
<div class="speed-option ${r.value===i?"active":""}" data-speed="${r.value}">
|
||
<span>${r.label}</span>
|
||
${r.value===i?"<span>✓</span>":""}
|
||
</div>
|
||
`).join("")}
|
||
`,this.settingsOverlay.appendChild(this.speedSubmenu)}positionButton(){const e=this.player().getChild("controlBar"),i=e.getChild("fullscreenToggle");this.settingsButton&&i&&setTimeout(()=>{const r=e.children().indexOf(i);e.removeChild(this.settingsButton),e.addChild(this.settingsButton,{},r+1),console.log("✓ Settings button positioned after fullscreen toggle")},50)}setupEventListeners(){this.settingsOverlay.addEventListener("click",e=>{e.stopPropagation(),e.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex")}),this.speedSubmenu.querySelector(".submenu-header").addEventListener("click",()=>{this.speedSubmenu.style.display="none"}),this.speedSubmenu.addEventListener("click",e=>{const i=e.target.closest(".speed-option");if(i){const r=parseFloat(i.dataset.speed);this.handleSpeedChange(r,i)}}),document.addEventListener("click",this.handleClickOutside),this.settingsOverlay.addEventListener("mouseover",e=>{const i=e.target.closest(".settings-item, .speed-option");i&&!i.style.background.includes("0.1")&&(i.style.background="rgba(255, 255, 255, 0.05)")}),this.settingsOverlay.addEventListener("mouseout",e=>{const i=e.target.closest(".settings-item, .speed-option");i&&!i.style.background.includes("0.1")&&(i.style.background="transparent")})}toggleSettings(e){e.stopPropagation();const i=this.settingsOverlay.style.display==="block";this.settingsOverlay.style.display=i?"none":"block",this.speedSubmenu.style.display="none"}handleSpeedChange(e,i){this.player().playbackRate(e),this.userPreferences.setPreference("playbackRate",e),document.querySelectorAll(".speed-option").forEach(u=>{var c;u.classList.remove("active"),u.style.background="transparent",(c=u.querySelector("span:last-child"))==null||c.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend","<span>✓</span>");const r=this.settingsOverlay.querySelector(".current-speed"),o=e===1?"Normal":`${e}`;r.textContent=o,this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none",console.log("Playback speed preference saved:",e)}handleClickOutside(e){this.settingsOverlay&&this.settingsButton&&!this.settingsOverlay.contains(e.target)&&!this.settingsButton.el().contains(e.target)&&(this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none")}dispose(){document.removeEventListener("click",this.handleClickOutside),this.settingsOverlay&&this.settingsOverlay.remove(),super.dispose()}}Fy.prototype.controlText_="Settings Menu",q.registerComponent("CustomSettingsMenu",Fy);const qM=q.getComponent("Component");class Hx extends qM{constructor(e,i){super(e,i),this.seekAmount=i.seekAmount||5,this.showTimeout=null}createEl(){const e=super.createEl("div",{className:"vjs-seek-indicator"});return e.innerHTML=`
|
||
<div class="vjs-seek-indicator-content">
|
||
<div class="vjs-seek-indicator-icon"></div>
|
||
<div class="vjs-seek-indicator-text"></div>
|
||
</div>
|
||
`,e.style.display="none",e.style.opacity="0",e.style.visibility="hidden",e}show(e,i=this.seekAmount){const r=this.el(),o=r.querySelector(".vjs-seek-indicator-icon"),u=r.querySelector(".vjs-seek-indicator-text");this.showTimeout&&clearTimeout(this.showTimeout),e==="forward"?o.innerHTML=`
|
||
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
|
||
<div style="
|
||
width: 80px;
|
||
height: 80px;
|
||
border-radius: 50%;
|
||
background: rgba(0, 0, 0, 0.3);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: none;
|
||
outline: none;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
-webkit-border-radius: 50%;
|
||
-moz-border-radius: 50%;
|
||
">
|
||
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
|
||
<svg viewBox="0 0 24 24" width="24" height="24" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
|
||
<path d="M8 5v14l11-7z"/>
|
||
<path d="M13 5v14l11-7z" opacity="0.6"/>
|
||
</svg>
|
||
</div>
|
||
<div style="
|
||
color: white;
|
||
font-size: 10px;
|
||
font-weight: 500;
|
||
text-align: center;
|
||
line-height: 1.2;
|
||
opacity: 0.9;
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
">${i} seconds</div>
|
||
</div>
|
||
</div>
|
||
`:o.innerHTML=`
|
||
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
|
||
<div style="
|
||
width: 80px;
|
||
height: 80px;
|
||
border-radius: 50%;
|
||
background: rgba(0, 0, 0, 0.3);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: none;
|
||
outline: none;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
-webkit-border-radius: 50%;
|
||
-moz-border-radius: 50%;
|
||
">
|
||
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
|
||
<svg viewBox="0 0 24 24" width="24" height="24" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
|
||
<path d="M16 19V5l-11 7z"/>
|
||
<path d="M11 19V5L0 12z" opacity="0.6"/>
|
||
</svg>
|
||
</div>
|
||
<div style="
|
||
color: white;
|
||
font-size: 10px;
|
||
font-weight: 500;
|
||
text-align: center;
|
||
line-height: 1.2;
|
||
opacity: 0.9;
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
">${i} seconds</div>
|
||
</div>
|
||
</div>
|
||
`,u.textContent="",r.style.cssText=`
|
||
position: absolute !important;
|
||
top: 50% !important;
|
||
left: 50% !important;
|
||
transform: translate(-50%, -50%) !important;
|
||
z-index: 99999 !important;
|
||
display: flex !important;
|
||
align-items: center !important;
|
||
justify-content: center !important;
|
||
visibility: visible !important;
|
||
opacity: 1 !important;
|
||
pointer-events: none !important;
|
||
width: auto !important;
|
||
height: auto !important;
|
||
`,this.showTimeout=setTimeout(()=>{this.hide()},1e3)}hide(){const e=this.el();e.style.opacity="0",setTimeout(()=>{e.style.display="none",e.style.visibility="hidden"},200)}dispose(){this.showTimeout&&clearTimeout(this.showTimeout),super.dispose()}}q.registerComponent("SeekIndicator",Hx);function $M(){const s=Tn.useRef(null),e=Tn.useRef(null),i=Tn.useRef(new Fx),r=Tn.useRef({}),o=Tn.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{related_media:[{friendly_token:"jgLkic37V",url:"http://localhost/view?m=jgLkic37V",api_url:"http://localhost/api/v1/media/jgLkic37V",user:"admin",title:"Screenshot20250312at15.58.35.png",description:"",add_date:"2025-03-12T14:28:24.757807Z",views:5,media_type:"image",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ad827f53568c4565b69ee59da88966c8.Screenshot20250312at15.58.35.png.jpg",is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"54Ip78oPK",url:"http://localhost/view?m=54Ip78oPK",api_url:"http://localhost/api/v1/media/54Ip78oPK",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 2",description:"",add_date:"2025-05-19T01:22:10.354407+01:00",views:8,media_type:"video",state:"public",duration:1,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ca19044d26af4eada1669c3373c771cb_nhCvKcl.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"0.6MB"},{friendly_token:"0VpZtWduU",url:"http://localhost/view?m=0VpZtWduU",api_url:"http://localhost/api/v1/media/0VpZtWduU",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed)",description:"",add_date:"2025-05-19T01:30:55.374863+01:00",views:13,media_type:"video",state:"public",duration:6,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/46b2bec8d79f496682640ce99b5c53af_RA16Oba.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/46b2bec8d79f496682640ce99b5c53af.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.0MB"},{friendly_token:"efM2aLP4P",url:"http://localhost/view?m=efM2aLP4P",api_url:"http://localhost/api/v1/media/efM2aLP4P",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 1",description:"",add_date:"2025-05-19T01:22:08.117300+01:00",views:11,media_type:"video",state:"public",duration:8,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/c27f570a84d64cdc857f87c50dace993_Ma3ap4p.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/c27f570a84d64cdc857f87c50dace993.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.8MB"},{friendly_token:"8RUHRjnji",url:"http://localhost/view?m=8RUHRjnji",api_url:"http://localhost/api/v1/media/8RUHRjnji",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed)",description:"",add_date:"2025-05-19T01:29:48.308159+01:00",views:7,media_type:"video",state:"public",duration:7,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/884cac6a306e4ae9995726fcd3c7aa49_fT7pnM4.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.6MB"},{friendly_token:"N5Vpnqfpf",url:"http://localhost/view?m=N5Vpnqfpf",api_url:"http://localhost/api/v1/media/N5Vpnqfpf",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov",description:"",add_date:"2025-05-19T01:15:03.594646+01:00",views:11,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/e549ebb4b1dc41a48cf76ebccf592836_1xqZHHc.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/e549ebb4b1dc41a48cf76ebccf592836.tmpu6x4f3js.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.3MB"},{friendly_token:"MmyuYCEfC",url:"http://localhost/view?m=MmyuYCEfC",api_url:"http://localhost/api/v1/media/MmyuYCEfC",user:"admin",title:"JmailLogIdeasforYiannis.mp4",description:"check the 00:12 and then the 00:39",add_date:"2025-03-12T02:37:42Z",views:49,media_type:"video",state:"public",duration:112,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/3d4e6f1c7e014720bc6390ed9d61aba5_BppzBiz.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"40.6MB"},{friendly_token:"E8ia0lfir",url:"http://localhost/view?m=E8ia0lfir",api_url:"http://localhost/api/v1/media/E8ia0lfir",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed)",description:"",add_date:"2025-05-19T01:22:27.251447+01:00",views:12,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/8572a325a9d649f79cc60181fbece78c_0H5arHy.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/8572a325a9d649f79cc60181fbece78c.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.4MB"},{friendly_token:"eZAl84zg6",url:"http://localhost/view?m=eZAl84zg6",api_url:"http://localhost/api/v1/media/eZAl84zg6",user:"admin",title:"20257855hd_1920_1080_60fps.mp4",description:"",add_date:"2025-03-12T02:35:59.779098Z",views:29,media_type:"video",state:"public",duration:90,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ed9c61a72c0445debfbedee011b6eba1_8HjWGZX.20257855hd_1920_1080_60fps.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/ed9c61a72c0445debfbedee011b6eba1.tmpil72jnbv.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"64.4MB"},{friendly_token:"6WShYNxZx",url:"http://localhost/view?m=6WShYNxZx",api_url:"http://localhost/api/v1/media/6WShYNxZx",user:"admin",title:"SampleVideo_1280x720_30mb.mp4 test abc",description:"test 123 yiannis",add_date:"2025-04-14T00:00:00+01:00",views:43,media_type:"video",state:"public",duration:171,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/c868df836ac34688b876e741b58ada93_LRvu388.SampleVideo_1280x720_30mb.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/c868df836ac34688b876e741b58ada93.tmpyl_r01_l.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:3,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"31.5MB"},{friendly_token:"SOgLTsrAH",url:"http://localhost/view?m=SOgLTsrAH",api_url:"http://localhost/api/v1/media/SOgLTsrAH",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed) 1",description:"",add_date:"2025-05-19T01:31:11.057879+01:00",views:8,media_type:"video",state:"public",duration:2,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/46c75315947e4a5f9dd464c1721206fd_6KJzqBH.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/46c75315947e4a5f9dd464c1721206fd.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"1.5MB"},{friendly_token:"PoDk009ue",url:"http://localhost/view?m=PoDk009ue",api_url:"http://localhost/api/v1/media/PoDk009ue",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov",description:"",add_date:"2025-05-19T01:17:44.296445+01:00",views:12,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/fd1d31460e614ca9b4645228e62c9eec_DB8nan8.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.4MB"},{friendly_token:"b7e06rUz5",url:"http://localhost/view?m=b7e06rUz5",api_url:"http://localhost/api/v1/media/b7e06rUz5",user:"admin",title:"Proto.cyTimesheet03_03_202507_03_2025.pdf",description:"",add_date:"2025-03-12T14:29:15.245599Z",views:16,media_type:"pdf",state:"public",duration:0,thumbnail_url:null,is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"wUu76zL5a",url:"http://localhost/view?m=wUu76zL5a",api_url:"http://localhost/api/v1/media/wUu76zL5a",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 2 (Trimmed)",description:"",add_date:"2025-05-19T01:28:52.829907+01:00",views:2,media_type:"video",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/1b3e7dc2431b46a5b7e40b297662137a_1V0DJz5.ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/1b3e7dc2431b46a5b7e40b297662137a.ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"0.3MB"},{friendly_token:"JBjMHLfLZ",url:"http://localhost/view?m=JBjMHLfLZ",api_url:"http://localhost/api/v1/media/JBjMHLfLZ",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed) 2",description:"",add_date:"2025-05-19T01:31:11.848403+01:00",views:19,media_type:"video",state:"public",duration:4,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/7759ca3e0ba1482aa9149201bd14139d_ISBMqD4.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/7759ca3e0ba1482aa9149201bd14139d.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"2.5MB"},{friendly_token:"w13x5uUXc",url:"http://localhost/view?m=w13x5uUXc",api_url:"http://localhost/api/v1/media/w13x5uUXc",user:"admin",title:"Web357202503112025_05_33_AM.png",description:"",add_date:"2025-03-12T14:27:55.078360Z",views:3,media_type:"image",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/1da967bcdca540efa1d2362af2f3a34b.Web357202503112025_05_33_AM.png.jpg",is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"sZxPpdon5",url:"http://localhost/view?m=sZxPpdon5",api_url:"http://localhost/api/v1/media/sZxPpdon5",user:"admin",title:"JmailLogIdeasforYiannis.mp4 (Trimmed)",description:"check the 00:12 and then the 00:39",add_date:"2025-05-15T02:16:19.580745+01:00",views:9,media_type:"video",state:"public",duration:17,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/7191a59cbfcd402ebed400e604a76840_5WRh0cp.3d4e6f1c7e014720bc6390ed9d61aba5.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/7191a59cbfcd402ebed400e604a76840.3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.5MB"},{friendly_token:"TCycDZROI",url:"http://localhost/view?m=TCycDZROI",api_url:"http://localhost/api/v1/media/TCycDZROI",user:"admin",title:"JmailLogIdeasforYiannis.mp4 (Trimmed)",description:"check the 00:12 and then the 00:39",add_date:"2025-05-15T02:14:58.855935+01:00",views:8,media_type:"video",state:"public",duration:112,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/5cbfbe93d06c453487c65d9d54749318_CUIZl8y.3d4e6f1c7e014720bc6390ed9d61aba5.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/5cbfbe93d06c453487c65d9d54749318.3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"40.6MB"},{friendly_token:"YjGJafibO",url:"http://localhost/view?m=YjGJafibO",api_url:"http://localhost/api/v1/media/YjGJafibO",user:"admin",title:"file_example_MP4_480_1_5MG.mp4",description:"",add_date:"2025-04-14T00:07:11.074523+01:00",views:18,media_type:"video",state:"public",duration:30,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/e76f4fff2b3d42adbadb0f1204b21b81_s8EEvSE.file_example_MP4_480_1_5MG.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/e76f4fff2b3d42adbadb0f1204b21b81.tmp04azp_tc.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"1.6MB"}]},previewSprite:{url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"",nextLink:"https://demo.mediacms.io/view?m=YjGJafibO"},[]),u=[{startTime:0,endTime:5,text:"Start111"},{startTime:5,endTime:10,text:"Introduction - EuroHPC"},{startTime:10,endTime:15,text:"Planning - EuroHPC"},{startTime:15,endTime:20,text:"Parcel Discounts - EuroHPC"},{startTime:20,endTime:25,text:"Class Studies - EuroHPC"},{startTime:25,endTime:30,text:"Sustainability - EuroHPC"},{startTime:30,endTime:31,text:"Funding and - EuroHPC"}],c=Tn.useMemo(()=>{var b,S,E,A,R;return{id:((b=o.data)==null?void 0:b.friendly_token)||"default-video",title:((S=o.data)==null?void 0:S.title)||"Video",poster:o.siteUrl+((E=o.data)==null?void 0:E.poster_url)||"",previewSprite:(o==null?void 0:o.previewSprite)||{},related_media:((A=o.data)==null?void 0:A.related_media)||[],nextLink:(o==null?void 0:o.nextLink)||null,sources:(R=o.data)!=null&&R.original_media_url?[{src:o.siteUrl+o.data.original_media_url,type:"video/mp4"}]:[{src:"/videos/sample-video.mp4",type:"video/mp4"}]}},[o]),p=Tn.useMemo(()=>{var b;return(b=o==null?void 0:o.data)!=null&&b.related_media?o.data.related_media.slice(0,12).map(S=>({id:S.friendly_token,title:S.title,author:S.user||S.author_name||"Unknown",views:`${S.views} views`,thumbnail:S.thumbnail_url||S.author_thumbnail,category:S.media_type,url:S.url,duration:S.duration,size:S.size,likes:S.likes,dislikes:S.dislikes,add_date:S.add_date,description:S.description})):[]},[o]),g=()=>{console.log("Next video functionality disabled for single video mode"),o.onClickNextCallback&&typeof o.onClickNextCallback=="function"&&o.onClickNextCallback()};return Tn.useEffect(()=>{if(s.current&&!e.current){if(s.current.player)return;const b=setTimeout(()=>{if(!e.current&&s.current&&!s.current.player){e.current=q(s.current,{controls:!0,autoplay:"muted",loop:!1,muted:!1,poster:c.poster,preload:"auto",sources:c.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:!1,autoSetup:void 0,breakpoints:{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:2561},disablePictureInPicture:!1,enableDocumentPictureInPicture:!1,enableSmoothSeeking:!1,experimentalSvgIcons:!1,fluid:!0,fullscreen:{options:{navigationUI:"hide"}},id:void 0,inactivityTimeout:2e3,language:"en",languages:{},liveui:!1,liveTracker:{trackingThreshold:20,liveTolerance:15},nativeControlsForTouch:!1,normalizeAutoplay:!1,notSupportedMessage:void 0,noUITitleAttributes:!1,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playsinline:!0,plugins:{},posterImage:!0,preferFullWindow:!1,responsive:!0,restoreEl:!1,suppressNotSupportedError:!1,techCanOverridePoster:!1,techOrder:["html5"],userActions:{click:!0,doubleClick:!0,hotkeys:{fullscreenKey:function(A){return A.which===70},muteKey:function(A){return A.which===77},playPauseKey:function(A){return A.which===75||A.which===32},seekForwardKey:function(A){return A.which===39},seekBackwardKey:function(A){return A.which===37}}},"vtt.js":void 0,spatialNavigation:{enabled:!1,horizontalSeek:!1},controlBar:{progressControl:{seekBar:{timeTooltip:{displayNegative:!1}}},remainingTimeDisplay:!1,volumePanel:{inline:!0,vertical:!1},fullscreenToggle:!0,pictureInPictureToggle:!0,playbackRateMenuButton:!0,descriptionsButton:!0,subtitlesButton:!1,captionsButton:!1,audioTrackButton:!0,liveDisplay:!0,seekToLive:!0,customControlSpacer:!0,chaptersButton:!0},html5:{nativeControlsForTouch:!1,nativeAudioTracks:!0,nativeTextTracks:!0,nativeVideoTracks:!0,preloadTextTracks:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),e.current.ready(()=>{i.current.applyToPlayer(e.current),i.current.setupAutoSave(e.current);const A=e.current.getChild("controlBar"),R=A.getChild("playToggle"),P=A.getChild("currentTimeDisplay"),w=A.getChild("progressControl"),z=w.getChild("seekBar"),H=A.getChild("chaptersButton"),X=A.getChild("fullscreenToggle");if(new URLSearchParams(window.location.search).get("m")&&setTimeout(()=>{e.current&&!e.current.isDisposed()&&e.current.play().catch(Y=>{console.log("ℹ️ Browser prevented autoplay (normal behavior):",Y.message)})},100),[{kind:"subtitles",src:"/sample-subtitles.vtt",srclang:"en",label:"English Subtitles",default:!1},{kind:"subtitles",src:"/sample-subtitles-greek.vtt",srclang:"el",label:"Greek Subtitles (Ελληνικά)",default:!1}].forEach(Y=>{e.current.addRemoteTextTrack(Y,!1)}),setTimeout(()=>{i.current.applySubtitlePreference(e.current)},1e3),u&&u.length>0){const Y=e.current.addTextTrack("chapters","Chapters","en");u.forEach(ee=>{const ve=new(window.VTTCue||window.TextTrackCue)(ee.startTime,ee.endTime,ee.text);Y.addCue(ve)})}const le=new Uy(e.current,{displayNegative:!1,customPrefix:"",customSuffix:""});if(P){const Y=A.children().indexOf(P);A.addChild(le,{},Y+1)}else A.addChild(le,{},2);if(o!=null&&o.nextLink){console.log("mediaData.nextLink edw",o.nextLink);const Y=new Ux(e.current,{nextLink:o.nextLink}),ee=A.children().indexOf(R);A.addChild(Y,{},ee+1)}try{const Y=new Bx(e.current,{userPreferences:i.current}),ee=A.children().indexOf(R);A.addChild(Y,{},ee+1),r.current.autoplayToggleButton=Y,setTimeout(()=>{Y.updateIcon(),console.log("✓ Autoplay toggle button icon updated after DOM insertion")},100),console.log("✓ Autoplay toggle button added successfully")}catch(Y){console.error("✗ Failed to add autoplay toggle button:",Y)}if(setTimeout(()=>{(()=>{["chaptersButton","subtitlesButton","playbackRateMenuButton"].forEach(ve=>{const de=A.getChild(ve);if(de&&de.menuButton_){const ge=de.menuButton_;ge.off("mouseenter"),ge.off("mouseleave"),ge.on("click",function(){this.menu.hasClass("vjs-lock-showing")?(this.menu.removeClass("vjs-lock-showing"),this.menu.hide()):(this.menu.addClass("vjs-lock-showing"),this.menu.show())}),console.log(`✓ Made ${ve} clickable`)}else if(de){const ge=de.el();ge&&(ge.addEventListener("click",function(pe){pe.preventDefault(),pe.stopPropagation();const Oe=ge.querySelector(".vjs-menu");Oe&&(Oe.style.display==="block"?Oe.style.display="none":(document.querySelectorAll(".vjs-menu").forEach(nt=>{nt!==Oe&&(nt.style.display="none")}),Oe.style.display="block"))}),console.log(`✓ Added click handler to ${ve}`))}})})()},1500),w&&z){const Y=new Px(e.current,{previewSprite:o.previewSprite});z.addChild(Y)}if(setTimeout(()=>{console.log("Setting up simplified button layout...");const Y=document.createElement("div");Y.className="vjs-spacer-control vjs-control",Y.style.flex="1",Y.style.minWidth="1px",Y.style.height="100%";const ee=A.getChild("durationDisplay");if(ee&&ee.el()){const ve=A.el(),ge=ee.el().nextSibling;ve.insertBefore(Y,ge),console.log("✓ Simple spacer added after duration display")}},300),H&&X)try{const Y=A.children().indexOf(X);A.addChild(H,{},Y+1),console.log("✓ Chapters button moved after fullscreen toggle")}catch(Y){console.log("✗ Failed to move chapters button:",Y)}u&&u.length>0?r.current.chaptersOverlay=new By(e.current,{chaptersData:u}):console.log("⚠ No chapters data available for overlay"),r.current.settingsMenu=new Fy(e.current,{userPreferences:i.current}),r.current.seekIndicator=new Hx(e.current,{seekAmount:5}),e.current.addChild(r.current.seekIndicator),r.current.seekIndicator.hide();const J=Y=>{const ee=document.activeElement;if(ee&&(ee.tagName==="INPUT"||ee.tagName==="TEXTAREA"||ee.contentEditable==="true"))return;const de=5;if(Y.key==="ArrowRight"||Y.keyCode===39){Y.preventDefault();const ge=e.current.currentTime(),pe=e.current.duration(),Oe=Math.min(ge+de,pe);e.current.currentTime(Oe),r.current.seekIndicator.show("forward",de)}else if(Y.key==="ArrowLeft"||Y.keyCode===37){Y.preventDefault();const ge=e.current.currentTime(),pe=Math.max(ge-de,0);e.current.currentTime(pe),r.current.seekIndicator.show("backward",de)}};document.addEventListener("keydown",J),r.current.cleanupKeyboardHandler=()=>{document.removeEventListener("keydown",J)},console.log("Current user preferences:",i.current.getPreferences()),window.debugSubtitles={showTracks:()=>{const Y=e.current.textTracks();console.log("=== Available Text Tracks ===");for(let ee=0;ee<Y.length;ee++){const ve=Y[ee];console.log(`${ee}: ${ve.kind} | ${ve.language} | ${ve.label} | mode: ${ve.mode}`)}},enableEnglish:()=>{const Y=e.current.textTracks();for(let ee=0;ee<Y.length;ee++){const ve=Y[ee];if(ve.kind==="subtitles"&&ve.language==="en"){ve.mode="showing",console.log("Enabled English subtitles");break}}},enableGreek:()=>{const Y=e.current.textTracks();for(let ee=0;ee<Y.length;ee++){const ve=Y[ee];if(ve.kind==="subtitles"&&ve.language==="el"){ve.mode="showing",console.log("Enabled Greek subtitles");break}}},disableAll:()=>{const Y=e.current.textTracks();for(let ee=0;ee<Y.length;ee++){const ve=Y[ee];ve.kind==="subtitles"&&(ve.mode="disabled")}console.log("Disabled all subtitles")},getPrefs:()=>{console.log("Saved preferences:",i.current.getPreferences())},reapplyPrefs:()=>{i.current.applySubtitlePreference(e.current)},showMenu:()=>{const Y=e.current.getChild("controlBar"),ee=["subtitlesButton","captionsButton","subsCapsButton"];let ve=null;for(const de of ee){const ge=Y.getChild(de);if(ge){console.log(`Found subtitle button: ${de}`),ve=ge;break}}if(ve&&ve.menu)console.log("=== Subtitle Menu Items ==="),ve.menu.children_.forEach((de,ge)=>{de.track?console.log(`${ge}: ${de.track.label} (${de.track.language}) - selected: ${de.selected()}`):console.log(`${ge}: ${de.label||"Unknown"} - selected: ${de.selected()}`)});else{console.log("No subtitle menu found, checking DOM...");const de=e.current.el().querySelectorAll(".vjs-menu-item");console.log(`Found ${de.length} menu items in DOM`),de.forEach((ge,pe)=>{(ge.textContent.toLowerCase().includes("subtitle")||ge.textContent.toLowerCase().includes("caption")||ge.textContent.toLowerCase().includes("off"))&&console.log(`DOM item ${pe}: ${ge.textContent} - classes: ${ge.className}`)})}},testMenuClick:Y=>{const ee=e.current.getChild("controlBar"),ve=["subtitlesButton","captionsButton","subsCapsButton"];let de=null;for(const ge of ve){const pe=ee.getChild(ge);if(pe){de=pe;break}}if(de&&de.menu&&de.menu.children_[Y]){const ge=de.menu.children_[Y];console.log("Simulating click on menu item:",Y),ge.handleClick()}else{console.log("Menu item not found at index:",Y,"trying DOM approach...");const ge=e.current.el().querySelectorAll(".vjs-menu-item"),pe=Array.from(ge).filter(Oe=>Oe.textContent.toLowerCase().includes("subtitle")||Oe.textContent.toLowerCase().includes("caption")||Oe.textContent.toLowerCase().includes("off"));pe[Y]?(console.log("Clicking DOM element:",pe[Y].textContent),pe[Y].click()):console.log("No DOM subtitle item found at index:",Y)}},forceEnableEnglish:()=>{console.log("Force enabling English subtitles...");const Y=e.current.textTracks();for(let ee=0;ee<Y.length;ee++){const ve=Y[ee];ve.kind==="subtitles"&&(ve.mode=ve.language==="en"?"showing":"disabled")}i.current.setPreference("subtitleLanguage","en"),console.log("English subtitles enabled and saved")},watchSubtitleChanges:()=>{console.log("👀 Watching subtitle preference changes...");const Y=i.current.setPreference;i.current.setPreference=function(ee,ve){return ee==="subtitleLanguage"&&(console.log(`🎯 SUBTITLE CHANGE: ${ve} at ${new Date().toISOString()}`),console.trace("Change origin:")),Y.call(this,ee,ve)},console.log("Subtitle change monitoring activated")},checkRestorationFlag:()=>{console.log("Restoration flag:",i.current.isRestoringSubtitles),console.log("Auto-save disabled:",i.current.subtitleAutoSaveDisabled)},forceSaveGreek:()=>{console.log("🚀 Force saving Greek subtitle preference..."),i.current.forceSetSubtitleLanguage("el"),console.log("Check result:",i.current.getPreferences())},forceSaveEnglish:()=>{console.log("🚀 Force saving English subtitle preference..."),i.current.forceSetSubtitleLanguage("en"),console.log("Check result:",i.current.getPreferences())},forceSaveNull:()=>{console.log("🚀 Force saving null subtitle preference..."),i.current.forceSetSubtitleLanguage(null),console.log("Check result:",i.current.getPreferences())}}}),e.current.on("nextVideo",()=>{console.log("Next video requested"),g()}),e.current.on("play",()=>{console.log("Video started playing")}),e.current.on("pause",()=>{console.log("Video paused")});let S=null,E=null;e.current.on("ended",()=>{console.log("Video ended"),console.log("Available relatedVideos:",p),setTimeout(()=>{if(e.current&&!e.current.isDisposed()&&e.current.el()){const z=e.current.getChild("controlBar");z&&(z.show(),z.el().style.opacity="1",z.el().style.pointerEvents="auto")}},50),console.log("mediaData.previewSprite",o.previewSprite),console.log("mediaData.nextLink",o.nextLink),console.log("userPreferences",i);const A=i.current.getAutoplayPreference(),R=o.nextLink!==null;if(console.log("isAutoplayEnabled",A),console.log("hasNextVideo",R),A&&R){let w={title:"Next Video",author:"",duration:0,thumbnail:""};if(p.length>0){const z=p[0];w={title:z.title||"Next Video",author:z.author||"",duration:z.duration||0,thumbnail:z.thumbnail||""}}S&&(e.current.removeChild(S),S=null),E&&(e.current.removeChild(E),E=null),E=new Nx(e.current,{nextVideoData:w,countdownSeconds:5,onPlayNext:()=>{console.log("Autoplay: Navigating to next video"),g()},onCancel:()=>{console.log("Autoplay: User cancelled, showing related videos"),E&&(e.current.removeChild(E),E=null),P()}}),e.current.addChild(E),E.startCountdown()}else P();function P(){S&&(console.log("End screen already exists, removing previous one"),e.current.removeChild(S),S=null),S=new Ix(e.current,{relatedVideos:p}),S.relatedVideos=p,e.current.addChild(S),S.show()}}),e.current.on("play",()=>{S&&S.hide(),E&&E.stopCountdown()}),e.current.on("seeking",()=>{S&&S.hide(),E&&E.stopCountdown()}),e.current.on("replay",()=>{S&&S.hide(),e.current.currentTime(0),e.current.play()}),e.current.on("error",A=>{console.error("Video.js error:",A)}),e.current.on("fullscreenchange",()=>{console.log("Fullscreen changed:",e.current.isFullscreen())}),e.current.on("volumechange",()=>{console.log("Volume changed:",e.current.volume(),"Muted:",e.current.muted())}),e.current.on("ratechange",()=>{console.log("Playback rate changed:",e.current.playbackRate())}),e.current.on("texttrackchange",()=>{console.log("Text track changed");const A=e.current.textTracks();for(let R=0;R<A.length;R++)console.log("Track",R,":",A[R].kind,A[R].label,"Mode:",A[R].mode)}),e.current.ready(()=>{e.current.el()&&(e.current.el().focus(),console.log("Video player focused for keyboard controls")),e.current.autoplay()&&e.current.play().catch(A=>{console.log("ℹ️ Browser prevented autoplay (normal behavior):",A.message)})})}},0);return()=>{clearTimeout(b)}}return()=>{r.current&&r.current.cleanupKeyboardHandler&&r.current.cleanupKeyboardHandler(),e.current&&!e.current.isDisposed()&&(e.current.dispose(),e.current=null)}},[]),Tn.useEffect(()=>{const b=()=>{e.current&&e.current.el()&&(e.current.el().focus(),console.log("Video element focused for keyboard controls"))},S=()=>{document.hidden||setTimeout(b,100)},E=()=>{setTimeout(b,100)};return document.addEventListener("visibilitychange",S),window.addEventListener("focus",E),setTimeout(b,500),()=>{document.removeEventListener("visibilitychange",S),window.removeEventListener("focus",E)}},[]),Rf.jsx("video",{ref:s,className:"video-js vjs-default-skin",tabIndex:"0"})}function GM(){return Rf.jsx($M,{})}const zx=()=>{const s=document.getElementById("video-js-root");s&&ID.createRoot(s).render(Rf.jsx(Tn.StrictMode,{children:Rf.jsx(GM,{})}))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",zx):zx()})();
|
||
//# sourceMappingURL=video-js.js.map
|