function _L(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function SL(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var FS={exports:{}},Bv={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var t3;function TL(){if(t3)return Bv;t3=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return Bv.Fragment=e,Bv.jsx=n,Bv.jsxs=n,Bv}var n3;function wL(){return n3||(n3=1,FS.exports=TL()),FS.exports}var c=wL(),US={exports:{}},yn={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r3;function CL(){if(r3)return yn;r3=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function x(G){return G===null||typeof G!="object"?null:(G=y&&G[y]||G["@@iterator"],typeof G=="function"?G:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function D(G,X,fe){this.props=G,this.context=X,this.refs=S,this.updater=fe||b}D.prototype.isReactComponent={},D.prototype.setState=function(G,X){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,X,"setState")},D.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function k(){}k.prototype=D.prototype;function O(G,X,fe){this.props=G,this.context=X,this.refs=S,this.updater=fe||b}var N=O.prototype=new k;N.constructor=O,w(N,D.prototype),N.isPureReactComponent=!0;var F=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function $(G,X,fe,be,we,pe){return fe=pe.ref,{$$typeof:t,type:G,key:X,ref:fe!==void 0?fe:null,props:pe}}function q(G,X){return $(G.type,X,void 0,void 0,void 0,G.props)}function B(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function z(G){var X={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(fe){return X[fe]})}var ee=/\/+/g;function Y(G,X){return typeof G=="object"&&G!==null&&G.key!=null?z(""+G.key):X.toString(36)}function Q(){}function oe(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(Q,Q):(G.status="pending",G.then(function(X){G.status==="pending"&&(G.status="fulfilled",G.value=X)},function(X){G.status==="pending"&&(G.status="rejected",G.reason=X)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function ue(G,X,fe,be,we){var pe=typeof G;(pe==="undefined"||pe==="boolean")&&(G=null);var Ce=!1;if(G===null)Ce=!0;else switch(pe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(G.$$typeof){case t:case e:Ce=!0;break;case m:return Ce=G._init,ue(Ce(G._payload),X,fe,be,we)}}if(Ce)return we=we(G),Ce=be===""?"."+Y(G,0):be,F(we)?(fe="",Ce!=null&&(fe=Ce.replace(ee,"$&/")+"/"),ue(we,X,fe,"",function(lt){return lt})):we!=null&&(B(we)&&(we=q(we,fe+(we.key==null||G&&G.key===we.key?"":(""+we.key).replace(ee,"$&/")+"/")+Ce)),X.push(we)),1;Ce=0;var Ke=be===""?".":be+":";if(F(G))for(var Me=0;Me<G.length;Me++)be=G[Me],pe=Ke+Y(be,Me),Ce+=ue(be,X,fe,pe,we);else if(Me=x(G),typeof Me=="function")for(G=Me.call(G),Me=0;!(be=G.next()).done;)be=be.value,pe=Ke+Y(be,Me++),Ce+=ue(be,X,fe,pe,we);else if(pe==="object"){if(typeof G.then=="function")return ue(oe(G),X,fe,be,we);throw X=String(G),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function H(G,X,fe){if(G==null)return G;var be=[],we=0;return ue(G,be,"","",function(pe){return X.call(fe,pe,we++)}),be}function te(G){if(G._status===-1){var X=G._result;X=X(),X.then(function(fe){(G._status===0||G._status===-1)&&(G._status=1,G._result=fe)},function(fe){(G._status===0||G._status===-1)&&(G._status=2,G._result=fe)}),G._status===-1&&(G._status=0,G._result=X)}if(G._status===1)return G._result.default;throw G._result}var Z=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function ie(){}return yn.Children={map:H,forEach:function(G,X,fe){H(G,function(){X.apply(this,arguments)},fe)},count:function(G){var X=0;return H(G,function(){X++}),X},toArray:function(G){return H(G,function(X){return X})||[]},only:function(G){if(!B(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},yn.Component=D,yn.Fragment=n,yn.Profiler=i,yn.PureComponent=O,yn.StrictMode=r,yn.Suspense=d,yn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,yn.__COMPILER_RUNTIME={__proto__:null,c:function(G){return M.H.useMemoCache(G)}},yn.cache=function(G){return function(){return G.apply(null,arguments)}},yn.cloneElement=function(G,X,fe){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var be=w({},G.props),we=G.key,pe=void 0;if(X!=null)for(Ce in X.ref!==void 0&&(pe=void 0),X.key!==void 0&&(we=""+X.key),X)!V.call(X,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&X.ref===void 0||(be[Ce]=X[Ce]);var Ce=arguments.length-2;if(Ce===1)be.children=fe;else if(1<Ce){for(var Ke=Array(Ce),Me=0;Me<Ce;Me++)Ke[Me]=arguments[Me+2];be.children=Ke}return $(G.type,we,void 0,void 0,pe,be)},yn.createContext=function(G){return G={$$typeof:o,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:s,_context:G},G},yn.createElement=function(G,X,fe){var be,we={},pe=null;if(X!=null)for(be in X.key!==void 0&&(pe=""+X.key),X)V.call(X,be)&&be!=="key"&&be!=="__self"&&be!=="__source"&&(we[be]=X[be]);var Ce=arguments.length-2;if(Ce===1)we.children=fe;else if(1<Ce){for(var Ke=Array(Ce),Me=0;Me<Ce;Me++)Ke[Me]=arguments[Me+2];we.children=Ke}if(G&&G.defaultProps)for(be in Ce=G.defaultProps,Ce)we[be]===void 0&&(we[be]=Ce[be]);return $(G,pe,void 0,void 0,null,we)},yn.createRef=function(){return{current:null}},yn.forwardRef=function(G){return{$$typeof:u,render:G}},yn.isValidElement=B,yn.lazy=function(G){return{$$typeof:m,_payload:{_status:-1,_result:G},_init:te}},yn.memo=function(G,X){return{$$typeof:f,type:G,compare:X===void 0?null:X}},yn.startTransition=function(G){var X=M.T,fe={};M.T=fe;try{var be=G(),we=M.S;we!==null&&we(fe,be),typeof be=="object"&&be!==null&&typeof be.then=="function"&&be.then(ie,Z)}catch(pe){Z(pe)}finally{M.T=X}},yn.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},yn.use=function(G){return M.H.use(G)},yn.useActionState=function(G,X,fe){return M.H.useActionState(G,X,fe)},yn.useCallback=function(G,X){return M.H.useCallback(G,X)},yn.useContext=function(G){return M.H.useContext(G)},yn.useDebugValue=function(){},yn.useDeferredValue=function(G,X){return M.H.useDeferredValue(G,X)},yn.useEffect=function(G,X,fe){var be=M.H;if(typeof fe=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return be.useEffect(G,X)},yn.useId=function(){return M.H.useId()},yn.useImperativeHandle=function(G,X,fe){return M.H.useImperativeHandle(G,X,fe)},yn.useInsertionEffect=function(G,X){return M.H.useInsertionEffect(G,X)},yn.useLayoutEffect=function(G,X){return M.H.useLayoutEffect(G,X)},yn.useMemo=function(G,X){return M.H.useMemo(G,X)},yn.useOptimistic=function(G,X){return M.H.useOptimistic(G,X)},yn.useReducer=function(G,X,fe){return M.H.useReducer(G,X,fe)},yn.useRef=function(G){return M.H.useRef(G)},yn.useState=function(G){return M.H.useState(G)},yn.useSyncExternalStore=function(G,X,fe){return M.H.useSyncExternalStore(G,X,fe)},yn.useTransition=function(){return M.H.useTransition()},yn.version="19.1.0",yn}var i3;function Hg(){return i3||(i3=1,US.exports=CL()),US.exports}var A=Hg();const Or=ko(A),EL=_L({__proto__:null,default:Or},[A]);var zS={exports:{}},Fv={},$S={exports:{}},VS={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var s3;function AL(){return s3||(s3=1,function(t){function e(H,te){var Z=H.length;H.push(te);e:for(;0<Z;){var ie=Z-1>>>1,G=H[ie];if(0<i(G,te))H[ie]=te,H[Z]=G,Z=ie;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var te=H[0],Z=H.pop();if(Z!==te){H[0]=Z;e:for(var ie=0,G=H.length,X=G>>>1;ie<X;){var fe=2*(ie+1)-1,be=H[fe],we=fe+1,pe=H[we];if(0>i(be,Z))we<G&&0>i(pe,be)?(H[ie]=pe,H[we]=Z,ie=we):(H[ie]=be,H[fe]=Z,ie=fe);else if(we<G&&0>i(pe,Z))H[ie]=pe,H[we]=Z,ie=we;else break e}}return te}function i(H,te){var Z=H.sortIndex-te.sortIndex;return Z!==0?Z:H.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,u=o.now();t.unstable_now=function(){return o.now()-u}}var d=[],f=[],m=1,y=null,x=3,b=!1,w=!1,S=!1,D=!1,k=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function F(H){for(var te=n(f);te!==null;){if(te.callback===null)r(f);else if(te.startTime<=H)r(f),te.sortIndex=te.expirationTime,e(d,te);else break;te=n(f)}}function M(H){if(S=!1,F(H),!w)if(n(d)!==null)w=!0,V||(V=!0,Y());else{var te=n(f);te!==null&&ue(M,te.startTime-H)}}var V=!1,$=-1,q=5,B=-1;function z(){return D?!0:!(t.unstable_now()-B<q)}function ee(){if(D=!1,V){var H=t.unstable_now();B=H;var te=!0;try{e:{w=!1,S&&(S=!1,O($),$=-1),b=!0;var Z=x;try{t:{for(F(H),y=n(d);y!==null&&!(y.expirationTime>H&&z());){var ie=y.callback;if(typeof ie=="function"){y.callback=null,x=y.priorityLevel;var G=ie(y.expirationTime<=H);if(H=t.unstable_now(),typeof G=="function"){y.callback=G,F(H),te=!0;break t}y===n(d)&&r(d),F(H)}else r(d);y=n(d)}if(y!==null)te=!0;else{var X=n(f);X!==null&&ue(M,X.startTime-H),te=!1}}break e}finally{y=null,x=Z,b=!1}te=void 0}}finally{te?Y():V=!1}}}var Y;if(typeof N=="function")Y=function(){N(ee)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,oe=Q.port2;Q.port1.onmessage=ee,Y=function(){oe.postMessage(null)}}else Y=function(){k(ee,0)};function ue(H,te){$=k(function(){H(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(H){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var Z=x;x=te;try{return H()}finally{x=Z}},t.unstable_requestPaint=function(){D=!0},t.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var Z=x;x=H;try{return te()}finally{x=Z}},t.unstable_scheduleCallback=function(H,te,Z){var ie=t.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ie+Z:ie):Z=ie,H){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Z+G,H={id:m++,callback:te,priorityLevel:H,startTime:Z,expirationTime:G,sortIndex:-1},Z>ie?(H.sortIndex=Z,e(f,H),n(d)===null&&H===n(f)&&(S?(O($),$=-1):S=!0,ue(M,Z-ie))):(H.sortIndex=G,e(d,H),w||b||(w=!0,V||(V=!0,Y()))),H},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(H){var te=x;return function(){var Z=x;x=te;try{return H.apply(this,arguments)}finally{x=Z}}}}(VS)),VS}var a3;function DL(){return a3||(a3=1,$S.exports=AL()),$S.exports}var HS={exports:{}},Cs={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var o3;function kL(){if(o3)return Cs;o3=1;var t=Hg();function e(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:d,containerInfo:f,implementation:m}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Cs.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Cs.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return s(d,f,null,m)},Cs.flushSync=function(d){var f=o.T,m=r.p;try{if(o.T=null,r.p=2,d)return d()}finally{o.T=f,r.p=m,r.d.f()}},Cs.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Cs.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Cs.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Cs.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Cs.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Cs.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Cs.requestFormReset=function(d){r.d.r(d)},Cs.unstable_batchedUpdates=function(d,f){return d(f)},Cs.useFormState=function(d,f,m){return o.H.useFormState(d,f,m)},Cs.useFormStatus=function(){return o.H.useHostTransitionStatus()},Cs.version="19.1.0",Cs}var l3;function PC(){if(l3)return HS.exports;l3=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),HS.exports=kL(),HS.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var u3;function RL(){if(u3)return Fv;u3=1;var t=DL(),e=Hg(),n=PC();function r(a){var l="https://react.dev/errors/"+a;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function s(a){var l=a,h=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(h=l.return),a=l.return;while(a)}return l.tag===3?h:null}function o(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function u(a){if(s(a)!==a)throw Error(r(188))}function d(a){var l=a.alternate;if(!l){if(l=s(a),l===null)throw Error(r(188));return l!==a?null:a}for(var h=a,v=l;;){var C=h.return;if(C===null)break;var R=C.alternate;if(R===null){if(v=C.return,v!==null){h=v;continue}break}if(C.child===R.child){for(R=C.child;R;){if(R===h)return u(C),a;if(R===v)return u(C),l;R=R.sibling}throw Error(r(188))}if(h.return!==v.return)h=C,v=R;else{for(var W=!1,ne=C.child;ne;){if(ne===h){W=!0,h=C,v=R;break}if(ne===v){W=!0,v=C,h=R;break}ne=ne.sibling}if(!W){for(ne=R.child;ne;){if(ne===h){W=!0,h=R,v=C;break}if(ne===v){W=!0,v=R,h=C;break}ne=ne.sibling}if(!W)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?a:l}function f(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a;for(a=a.child;a!==null;){if(l=f(a),l!==null)return l;a=a.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),N=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function Y(a){return a===null||typeof a!="object"?null:(a=ee&&a[ee]||a["@@iterator"],typeof a=="function"?a:null)}var Q=Symbol.for("react.client.reference");function oe(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Q?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case D:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case V:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case N:return(a.displayName||"Context")+".Provider";case O:return(a._context.displayName||"Context")+".Consumer";case F:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case $:return l=a.displayName||null,l!==null?l:oe(a.type)||"Memo";case q:l=a._payload,a=a._init;try{return oe(a(l))}catch{}}return null}var ue=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ie=[],G=-1;function X(a){return{current:a}}function fe(a){0>G||(a.current=ie[G],ie[G]=null,G--)}function be(a,l){G++,ie[G]=a.current,a.current=l}var we=X(null),pe=X(null),Ce=X(null),Ke=X(null);function Me(a,l){switch(be(Ce,l),be(pe,a),be(we,null),l.nodeType){case 9:case 11:a=(a=l.documentElement)&&(a=a.namespaceURI)?wr(a):0;break;default:if(a=l.tagName,l=l.namespaceURI)l=wr(l),a=Pr(l,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}fe(we),be(we,a)}function lt(){fe(we),fe(pe),fe(Ce)}function bt(a){a.memoizedState!==null&&be(Ke,a);var l=we.current,h=Pr(l,a.type);l!==h&&(be(pe,a),be(we,h))}function mt(a){pe.current===a&&(fe(we),fe(pe)),Ke.current===a&&(fe(Ke),Vd._currentValue=Z)}var _t=Object.prototype.hasOwnProperty,Qt=t.unstable_scheduleCallback,xt=t.unstable_cancelCallback,wt=t.unstable_shouldYield,Ot=t.unstable_requestPaint,qe=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Xe=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,rt=t.unstable_IdlePriority,$e=t.log,Ze=t.unstable_setDisableYieldValue,qt=null,jt=null;function un(a){if(typeof $e=="function"&&Ze(a),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(qt,a)}catch{}}var Pt=Math.clz32?Math.clz32:on,an=Math.log,rr=Math.LN2;function on(a){return a>>>=0,a===0?32:31-(an(a)/rr|0)|0}var oi=256,Hr=4194304;function kn(a){var l=a&42;if(l!==0)return l;switch(a&-a){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 a&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function qr(a,l,h){var v=a.pendingLanes;if(v===0)return 0;var C=0,R=a.suspendedLanes,W=a.pingedLanes;a=a.warmLanes;var ne=v&134217727;return ne!==0?(v=ne&~R,v!==0?C=kn(v):(W&=ne,W!==0?C=kn(W):h||(h=ne&~a,h!==0&&(C=kn(h))))):(ne=v&~R,ne!==0?C=kn(ne):W!==0?C=kn(W):h||(h=v&~a,h!==0&&(C=kn(h)))),C===0?0:l!==0&&l!==C&&(l&R)===0&&(R=C&-C,h=l&-l,R>=h||R===32&&(h&4194048)!==0)?l:C}function xr(a,l){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&l)===0}function Ka(a,l){switch(a){case 1:case 2:case 4:case 8:case 64:return l+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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Os(){var a=oi;return oi<<=1,(oi&4194048)===0&&(oi=256),a}function us(){var a=Hr;return Hr<<=1,(Hr&62914560)===0&&(Hr=4194304),a}function cs(a){for(var l=[],h=0;31>h;h++)l.push(a);return l}function J(a,l){a.pendingLanes|=l,l!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function re(a,l,h,v,C,R){var W=a.pendingLanes;a.pendingLanes=h,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=h,a.entangledLanes&=h,a.errorRecoveryDisabledLanes&=h,a.shellSuspendCounter=0;var ne=a.entanglements,ve=a.expirationTimes,Ie=a.hiddenUpdates;for(h=W&~h;0<h;){var Qe=31-Pt(h),it=1<<Qe;ne[Qe]=0,ve[Qe]=-1;var je=Ie[Qe];if(je!==null)for(Ie[Qe]=null,Qe=0;Qe<je.length;Qe++){var Oe=je[Qe];Oe!==null&&(Oe.lane&=-536870913)}h&=~it}v!==0&&ye(a,v,0),R!==0&&C===0&&a.tag!==0&&(a.suspendedLanes|=R&~(W&~l))}function ye(a,l,h){a.pendingLanes|=l,a.suspendedLanes&=~l;var v=31-Pt(l);a.entangledLanes|=l,a.entanglements[v]=a.entanglements[v]|1073741824|h&4194090}function Be(a,l){var h=a.entangledLanes|=l;for(a=a.entanglements;h;){var v=31-Pt(h),C=1<<v;C&l|a[v]&l&&(a[v]|=l),h&=~C}}function ft(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Nt(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Zt(){var a=te.p;return a!==0?a:(a=window.event,a===void 0?32:zx(a.type))}function cr(a,l){var h=te.p;try{return te.p=a,l()}finally{te.p=h}}var ir=Math.random().toString(36).slice(2),En="__reactFiber$"+ir,On="__reactProps$"+ir,dr="__reactContainer$"+ir,Gr="__reactEvents$"+ir,ct="__reactListeners$"+ir,sn="__reactHandles$"+ir,cn="__reactResources$"+ir,Zn="__reactMarker$"+ir;function _n(a){delete a[En],delete a[On],delete a[Gr],delete a[ct],delete a[sn]}function _r(a){var l=a[En];if(l)return l;for(var h=a.parentNode;h;){if(l=h[dr]||h[En]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(a=kx(a);a!==null;){if(h=a[En])return h;a=kx(a)}return l}a=h,h=a.parentNode}return null}function At(a){if(a=a[En]||a[dr]){var l=a.tag;if(l===5||l===6||l===13||l===26||l===27||l===3)return a}return null}function Wi(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a.stateNode;throw Error(r(33))}function Ns(a){var l=a[cn];return l||(l=a[cn]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Dr(a){a[Zn]=!0}var Tp=new Set,Qa={};function Fn(a,l){No(a,l),No(a+"Capture",l)}function No(a,l){for(Qa[a]=l,a=0;a<l.length;a++)Tp.add(l[a])}var Mo=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]*$"),wp={},qu={};function b0(a){return _t.call(qu,a)?!0:_t.call(wp,a)?!1:Mo.test(a)?qu[a]=!0:(wp[a]=!0,!1)}function Gu(a,l,h){if(b0(l))if(h===null)a.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":a.removeAttribute(l);return;case"boolean":var v=l.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){a.removeAttribute(l);return}}a.setAttribute(l,""+h)}}function Nl(a,l,h){if(h===null)a.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttribute(l,""+h)}}function ds(a,l,h,v){if(v===null)a.removeAttribute(h);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(h);return}a.setAttributeNS(l,h,""+v)}}var Wu,_f;function Ml(a){if(Wu===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);Wu=l&&l[1]||"",_f=-1<h.stack.indexOf(`
    at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Wu+a+_f}var jl=!1;function Ll(a,l){if(!a||jl)return"";jl=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(l){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(Oe){var je=Oe}Reflect.construct(a,[],it)}else{try{it.call()}catch(Oe){je=Oe}a.call(it.prototype)}}else{try{throw Error()}catch(Oe){je=Oe}(it=a())&&typeof it.catch=="function"&&it.catch(function(){})}}catch(Oe){if(Oe&&je&&typeof Oe.stack=="string")return[Oe.stack,je.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=v.DetermineComponentFrameRoot(),W=R[0],ne=R[1];if(W&&ne){var ve=W.split(`
`),Ie=ne.split(`
`);for(C=v=0;v<ve.length&&!ve[v].includes("DetermineComponentFrameRoot");)v++;for(;C<Ie.length&&!Ie[C].includes("DetermineComponentFrameRoot");)C++;if(v===ve.length||C===Ie.length)for(v=ve.length-1,C=Ie.length-1;1<=v&&0<=C&&ve[v]!==Ie[C];)C--;for(;1<=v&&0<=C;v--,C--)if(ve[v]!==Ie[C]){if(v!==1||C!==1)do if(v--,C--,0>C||ve[v]!==Ie[C]){var Qe=`
`+ve[v].replace(" at new "," at ");return a.displayName&&Qe.includes("<anonymous>")&&(Qe=Qe.replace("<anonymous>",a.displayName)),Qe}while(1<=v&&0<=C);break}}}finally{jl=!1,Error.prepareStackTrace=h}return(h=a?a.displayName||a.name:"")?Ml(h):""}function Cp(a){switch(a.tag){case 26:case 27:case 5:return Ml(a.type);case 16:return Ml("Lazy");case 13:return Ml("Suspense");case 19:return Ml("SuspenseList");case 0:case 15:return Ll(a.type,!1);case 11:return Ll(a.type.render,!1);case 1:return Ll(a.type,!0);case 31:return Ml("Activity");default:return""}}function jo(a){try{var l="";do l+=Cp(a),a=a.return;while(a);return l}catch(h){return`
Error generating stack: `+h.message+`
`+h.stack}}function li(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Lo(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Bo(a){var l=Lo(a)?"checked":"value",h=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),v=""+a[l];if(!a.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var C=h.get,R=h.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return C.call(this)},set:function(W){v=""+W,R.call(this,W)}}),Object.defineProperty(a,l,{enumerable:h.enumerable}),{getValue:function(){return v},setValue:function(W){v=""+W},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Zc(a){a._valueTracker||(a._valueTracker=Bo(a))}function Jc(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var h=l.getValue(),v="";return a&&(v=Lo(a)?a.checked?"true":"false":a.value),a=v,a!==h?(l.setValue(a),!0):!1}function Fo(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Ep=/[\n"\\]/g;function Wr(a){return a.replace(Ep,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Uo(a,l,h,v,C,R,W,ne){a.name="",W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?a.type=W:a.removeAttribute("type"),l!=null?W==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+li(l)):a.value!==""+li(l)&&(a.value=""+li(l)):W!=="submit"&&W!=="reset"||a.removeAttribute("value"),l!=null?zo(a,W,li(l)):h!=null?zo(a,W,li(h)):v!=null&&a.removeAttribute("value"),C==null&&R!=null&&(a.defaultChecked=!!R),C!=null&&(a.checked=C&&typeof C!="function"&&typeof C!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?a.name=""+li(ne):a.removeAttribute("name")}function Sf(a,l,h,v,C,R,W,ne){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(a.type=R),l!=null||h!=null){if(!(R!=="submit"&&R!=="reset"||l!=null))return;h=h!=null?""+li(h):"",l=l!=null?""+li(l):h,ne||l===a.value||(a.value=l),a.defaultValue=l}v=v??C,v=typeof v!="function"&&typeof v!="symbol"&&!!v,a.checked=ne?a.checked:!!v,a.defaultChecked=!!v,W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"&&(a.name=W)}function zo(a,l,h){l==="number"&&Fo(a.ownerDocument)===a||a.defaultValue===""+h||(a.defaultValue=""+h)}function Za(a,l,h,v){if(a=a.options,l){l={};for(var C=0;C<h.length;C++)l["$"+h[C]]=!0;for(h=0;h<a.length;h++)C=l.hasOwnProperty("$"+a[h].value),a[h].selected!==C&&(a[h].selected=C),C&&v&&(a[h].defaultSelected=!0)}else{for(h=""+li(h),l=null,C=0;C<a.length;C++){if(a[C].value===h){a[C].selected=!0,v&&(a[C].defaultSelected=!0);return}l!==null||a[C].disabled||(l=a[C])}l!==null&&(l.selected=!0)}}function Xi(a,l,h){if(l!=null&&(l=""+li(l),l!==a.value&&(a.value=l),h==null)){a.defaultValue!==l&&(a.defaultValue=l);return}a.defaultValue=h!=null?""+li(h):""}function ed(a,l,h,v){if(l==null){if(v!=null){if(h!=null)throw Error(r(92));if(ue(v)){if(1<v.length)throw Error(r(93));v=v[0]}h=v}h==null&&(h=""),l=h}h=li(l),a.defaultValue=h,v=a.textContent,v===h&&v!==""&&v!==null&&(a.value=v)}function Ms(a,l){if(l){var h=a.firstChild;if(h&&h===a.lastChild&&h.nodeType===3){h.nodeValue=l;return}}a.textContent=l}var ta=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Bl(a,l,h){var v=l.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?a.setProperty(l,""):l==="float"?a.cssFloat="":a[l]="":v?a.setProperty(l,h):typeof h!="number"||h===0||ta.has(l)?l==="float"?a.cssFloat=h:a[l]=(""+h).trim():a[l]=h+"px"}function Ja(a,l,h){if(l!=null&&typeof l!="object")throw Error(r(62));if(a=a.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||l!=null&&l.hasOwnProperty(v)||(v.indexOf("--")===0?a.setProperty(v,""):v==="float"?a.cssFloat="":a[v]="");for(var C in l)v=l[C],l.hasOwnProperty(C)&&h[C]!==v&&Bl(a,C,v)}else for(var R in l)l.hasOwnProperty(R)&&Bl(a,R,l[R])}function Xu(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tf=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"]]),td=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yu(a){return td.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}var nd=null;function wf(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Aa=null,$o=null;function Cf(a){var l=At(a);if(l&&(a=l.stateNode)){var h=a[On]||null;e:switch(a=l.stateNode,l.type){case"input":if(Uo(a,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),l=h.name,h.type==="radio"&&l!=null){for(h=a;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Wr(""+l)+'"][type="radio"]'),l=0;l<h.length;l++){var v=h[l];if(v!==a&&v.form===a.form){var C=v[On]||null;if(!C)throw Error(r(90));Uo(v,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(l=0;l<h.length;l++)v=h[l],v.form===a.form&&Jc(v)}break e;case"textarea":Xi(a,h.value,h.defaultValue);break e;case"select":l=h.value,l!=null&&Za(a,!!h.multiple,l,!1)}}}var rd=!1;function Ap(a,l,h){if(rd)return a(l,h);rd=!0;try{var v=a(l);return v}finally{if(rd=!1,(Aa!==null||$o!==null)&&(Sm(),Aa&&(l=Aa,a=$o,$o=Aa=null,Cf(l),a)))for(l=0;l<a.length;l++)Cf(a[l])}}function Fl(a,l){var h=a.stateNode;if(h===null)return null;var v=h[On]||null;if(v===null)return null;h=v[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(h&&typeof h!="function")throw Error(r(231,l,typeof h));return h}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eo=!1;if(Da)try{var to={};Object.defineProperty(to,"passive",{get:function(){eo=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{eo=!1}var ka=null,Ef=null,id=null;function Af(){if(id)return id;var a,l=Ef,h=l.length,v,C="value"in ka?ka.value:ka.textContent,R=C.length;for(a=0;a<h&&l[a]===C[a];a++);var W=h-a;for(v=1;v<=W&&l[h-v]===C[R-v];v++);return id=C.slice(a,1<v?1-v:void 0)}function zn(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function $n(){return!0}function Df(){return!1}function Ri(a){function l(h,v,C,R,W){this._reactName=h,this._targetInst=C,this.type=v,this.nativeEvent=R,this.target=W,this.currentTarget=null;for(var ne in a)a.hasOwnProperty(ne)&&(h=a[ne],this[ne]=h?h(R):R[ne]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?$n:Df,this.isPropagationStopped=Df,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=$n)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=$n)},persist:function(){},isPersistent:$n}),l}var Vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sd=Ri(Vo),Ku=m({},Vo,{view:0,detail:0}),x0=Ri(Ku),ad,Qu,kr,Ho=m({},Ku,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:na,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==kr&&(kr&&a.type==="mousemove"?(ad=a.screenX-kr.screenX,Qu=a.screenY-kr.screenY):Qu=ad=0,kr=a),ad)},movementY:function(a){return"movementY"in a?a.movementY:Qu}}),js=Ri(Ho),Dp=m({},Ho,{dataTransfer:0}),kf=Ri(Dp),fs=m({},Ku,{relatedTarget:0}),od=Ri(fs),kp=m({},Vo,{animationName:0,elapsedTime:0,pseudoElement:0}),Zu=Ri(kp),Ul=m({},Vo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),zl=Ri(Ul),Ju=m({},Vo,{data:0}),fr=Ri(Ju),Ra={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wi={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"},Rp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pp(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=Rp[a])?!!l[a]:!1}function na(){return Pp}var ld=m({},Ku,{key:function(a){if(a.key){var l=Ra[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=zn(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?wi[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:na,charCode:function(a){return a.type==="keypress"?zn(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?zn(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Rf=Ri(ld),sr=m({},Ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ra=Ri(sr),$l=m({},Ku,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:na}),ec=Ri($l),Vl=m({},Vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),qo=Ri(Vl),_0=m({},Ho,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Ip=Ri(_0),Pf=m({},Vo,{newState:0,oldState:0}),tc=Ri(Pf),Hl=[9,13,27,32],If=Da&&"CompositionEvent"in window,ql=null;Da&&"documentMode"in document&&(ql=document.documentMode);var nc=Da&&"TextEvent"in window&&!ql,ud=Da&&(!If||ql&&8<ql&&11>=ql),rc=" ",Of=!1;function Op(a,l){switch(a){case"keyup":return Hl.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ic(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ia=!1;function S0(a,l){switch(a){case"compositionend":return ic(l);case"keypress":return l.which!==32?null:(Of=!0,rc);case"textInput":return a=l.data,a===rc&&Of?null:a;default:return null}}function Np(a,l){if(ia)return a==="compositionend"||!If&&Op(a,l)?(a=Af(),id=Ef=ka=null,ia=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return ud&&l.locale!=="ko"?null:l.data;default:return null}}var Yi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gl(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!Yi[a.type]:l==="textarea"}function Wl(a,l,h,v){Aa?$o?$o.push(v):$o=[v]:Aa=v,l=km(l,"onChange"),0<l.length&&(h=new sd("onChange","change",null,h,v),a.push({event:h,listeners:l}))}var Go=null,Xl=null;function T0(a){_x(a,0)}function sc(a){var l=Wi(a);if(Jc(l))return a}function Mp(a,l){if(a==="change")return l}var Nf=!1;if(Da){var cd;if(Da){var Pa="oninput"in document;if(!Pa){var jp=document.createElement("div");jp.setAttribute("oninput","return;"),Pa=typeof jp.oninput=="function"}cd=Pa}else cd=!1;Nf=cd&&(!document.documentMode||9<document.documentMode)}function Lp(){Go&&(Go.detachEvent("onpropertychange",Wo),Xl=Go=null)}function Wo(a){if(a.propertyName==="value"&&sc(Xl)){var l=[];Wl(l,Xl,a,wf(a)),Ap(T0,l)}}function Bp(a,l,h){a==="focusin"?(Lp(),Go=l,Xl=h,Go.attachEvent("onpropertychange",Wo)):a==="focusout"&&Lp()}function no(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return sc(Xl)}function dd(a,l){if(a==="click")return sc(l)}function w0(a,l){if(a==="input"||a==="change")return sc(l)}function Fp(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var Ki=typeof Object.is=="function"?Object.is:Fp;function Pi(a,l){if(Ki(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var h=Object.keys(a),v=Object.keys(l);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var C=h[v];if(!_t.call(l,C)||!Ki(a[C],l[C]))return!1}return!0}function Qi(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Yl(a,l){var h=Qi(a);a=0;for(var v;h;){if(h.nodeType===3){if(v=a+h.textContent.length,a<=l&&v>=l)return{node:h,offset:l-a};a=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Qi(h)}}function Kl(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Kl(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function Sr(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var l=Fo(a.document);l instanceof a.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)a=l.contentWindow;else break;l=Fo(a.document)}return l}function ro(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}var Mf=Da&&"documentMode"in document&&11>=document.documentMode,Ql=null,io=null,Te=null,We=!1;function Ue(a,l,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;We||Ql==null||Ql!==Fo(v)||(v=Ql,"selectionStart"in v&&ro(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Te&&Pi(Te,v)||(Te=v,v=km(io,"onSelect"),0<v.length&&(l=new sd("onSelect","select",null,l,h),a.push({event:l,listeners:v}),l.target=Ql)))}function yt(a,l){var h={};return h[a.toLowerCase()]=l.toLowerCase(),h["Webkit"+a]="webkit"+l,h["Moz"+a]="moz"+l,h}var zt={animationend:yt("Animation","AnimationEnd"),animationiteration:yt("Animation","AnimationIteration"),animationstart:yt("Animation","AnimationStart"),transitionrun:yt("Transition","TransitionRun"),transitionstart:yt("Transition","TransitionStart"),transitioncancel:yt("Transition","TransitionCancel"),transitionend:yt("Transition","TransitionEnd")},An={},Rr={};Da&&(Rr=document.createElement("div").style,"AnimationEvent"in window||(delete zt.animationend.animation,delete zt.animationiteration.animation,delete zt.animationstart.animation),"TransitionEvent"in window||delete zt.transitionend.transition);function Sn(a){if(An[a])return An[a];if(!zt[a])return a;var l=zt[a],h;for(h in l)if(l.hasOwnProperty(h)&&h in Rr)return An[a]=l[h];return a}var ac=Sn("animationend"),fd=Sn("animationiteration"),Zi=Sn("animationstart"),so=Sn("transitionrun"),C0=Sn("transitionstart"),Xo=Sn("transitioncancel"),Zl=Sn("transitionend"),oc=new Map,Mn="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(" ");Mn.push("scrollEnd");function hs(a,l){oc.set(a,l),Fn(l,[a])}var jf=new WeakMap;function Ci(a,l){if(typeof a=="object"&&a!==null){var h=jf.get(a);return h!==void 0?h:(l={value:a,source:l,stack:jo(l)},jf.set(a,l),l)}return{value:a,source:l,stack:jo(l)}}var Ii=[],Jl=0,Lf=0;function Yo(){for(var a=Jl,l=Lf=Jl=0;l<a;){var h=Ii[l];Ii[l++]=null;var v=Ii[l];Ii[l++]=null;var C=Ii[l];Ii[l++]=null;var R=Ii[l];if(Ii[l++]=null,v!==null&&C!==null){var W=v.pending;W===null?C.next=C:(C.next=W.next,W.next=C),v.pending=C}R!==0&&lc(h,C,R)}}function Ls(a,l,h,v){Ii[Jl++]=a,Ii[Jl++]=l,Ii[Jl++]=h,Ii[Jl++]=v,Lf|=v,a.lanes|=v,a=a.alternate,a!==null&&(a.lanes|=v)}function eu(a,l,h,v){return Ls(a,l,h,v),uc(a)}function Ko(a,l){return Ls(a,null,null,l),uc(a)}function lc(a,l,h){a.lanes|=h;var v=a.alternate;v!==null&&(v.lanes|=h);for(var C=!1,R=a.return;R!==null;)R.childLanes|=h,v=R.alternate,v!==null&&(v.childLanes|=h),R.tag===22&&(a=R.stateNode,a===null||a._visibility&1||(C=!0)),a=R,R=R.return;return a.tag===3?(R=a.stateNode,C&&l!==null&&(C=31-Pt(h),a=R.hiddenUpdates,v=a[C],v===null?a[C]=[l]:v.push(l),l.lane=h|536870912),R):null}function uc(a){if(50<Md)throw Md=0,pv=null,Error(r(185));for(var l=a.return;l!==null;)a=l,l=a.return;return a.tag===3?a.stateNode:null}var Qo={};function hd(a,l,h,v){this.tag=a,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oi(a,l,h,v){return new hd(a,l,h,v)}function Ni(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ei(a,l){var h=a.alternate;return h===null?(h=Oi(a.tag,l,a.key,a.mode),h.elementType=a.elementType,h.type=a.type,h.stateNode=a.stateNode,h.alternate=a,a.alternate=h):(h.pendingProps=l,h.type=a.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=a.flags&65011712,h.childLanes=a.childLanes,h.lanes=a.lanes,h.child=a.child,h.memoizedProps=a.memoizedProps,h.memoizedState=a.memoizedState,h.updateQueue=a.updateQueue,l=a.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=a.sibling,h.index=a.index,h.ref=a.ref,h.refCleanup=a.refCleanup,h}function cc(a,l){a.flags&=65011714;var h=a.alternate;return h===null?(a.childLanes=0,a.lanes=l,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=h.childLanes,a.lanes=h.lanes,a.child=h.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=h.memoizedProps,a.memoizedState=h.memoizedState,a.updateQueue=h.updateQueue,a.type=h.type,l=h.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),a}function pd(a,l,h,v,C,R){var W=0;if(v=a,typeof a=="function")Ni(a)&&(W=1);else if(typeof a=="string")W=CS(a,h,we.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=Oi(31,h,l,C),a.elementType=B,a.lanes=R,a;case w:return tu(h.children,C,R,l);case S:W=8,C|=24;break;case D:return a=Oi(12,h,l,C|2),a.elementType=D,a.lanes=R,a;case M:return a=Oi(13,h,l,C),a.elementType=M,a.lanes=R,a;case V:return a=Oi(19,h,l,C),a.elementType=V,a.lanes=R,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case k:case N:W=10;break e;case O:W=9;break e;case F:W=11;break e;case $:W=14;break e;case q:W=16,v=null;break e}W=29,h=Error(r(130,a===null?"null":typeof a,"")),v=null}return l=Oi(W,h,l,C),l.elementType=a,l.type=v,l.lanes=R,l}function tu(a,l,h,v){return a=Oi(7,a,v,l),a.lanes=h,a}function md(a,l,h){return a=Oi(6,a,null,l),a.lanes=h,a}function ao(a,l,h){return l=Oi(4,a.children!==null?a.children:[],a.key,l),l.lanes=h,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}var sa=[],Bs=0,Zo=null,dc=0,ps=[],ms=0,ar=null,hr=1,Fs="";function Jo(a,l){sa[Bs++]=dc,sa[Bs++]=Zo,Zo=a,dc=l}function Bf(a,l,h){ps[ms++]=hr,ps[ms++]=Fs,ps[ms++]=ar,ar=a;var v=hr;a=Fs;var C=32-Pt(v)-1;v&=~(1<<C),h+=1;var R=32-Pt(l)+C;if(30<R){var W=C-C%5;R=(v&(1<<W)-1).toString(32),v>>=W,C-=W,hr=1<<32-Pt(l)+C|h<<C|v,Fs=R+a}else hr=1<<R|h<<C|v,Fs=a}function gd(a){a.return!==null&&(Jo(a,1),Bf(a,1,0))}function aa(a){for(;a===Zo;)Zo=sa[--Bs],sa[Bs]=null,dc=sa[--Bs],sa[Bs]=null;for(;a===ar;)ar=ps[--ms],ps[ms]=null,Fs=ps[--ms],ps[ms]=null,hr=ps[--ms],ps[ms]=null}var Yt=null,Un=null,$t=!1,Mr=null,Mi=!1,el=Error(r(519));function gs(a){var l=Error(r(418,""));throw oo(Ci(l,a)),el}function Up(a){var l=a.stateNode,h=a.type,v=a.memoizedProps;switch(l[En]=a,l[On]=v,h){case"dialog":wn("cancel",l),wn("close",l);break;case"iframe":case"object":case"embed":wn("load",l);break;case"video":case"audio":for(h=0;h<_h.length;h++)wn(_h[h],l);break;case"source":wn("error",l);break;case"img":case"image":case"link":wn("error",l),wn("load",l);break;case"details":wn("toggle",l);break;case"input":wn("invalid",l),Sf(l,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0),Zc(l);break;case"select":wn("invalid",l);break;case"textarea":wn("invalid",l),ed(l,v.value,v.defaultValue,v.children),Zc(l)}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||l.textContent===""+h||v.suppressHydrationWarning===!0||wx(l.textContent,h)?(v.popover!=null&&(wn("beforetoggle",l),wn("toggle",l)),v.onScroll!=null&&wn("scroll",l),v.onScrollEnd!=null&&wn("scrollend",l),v.onClick!=null&&(l.onclick=Rm),l=!0):l=!1,l||gs(a)}function zp(a){for(Yt=a.return;Yt;)switch(Yt.tag){case 5:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:Yt=Yt.return}}function fc(a){if(a!==Yt)return!1;if(!$t)return zp(a),$t=!0,!1;var l=a.tag,h;if((h=l!==3&&l!==27)&&((h=l===5)&&(h=a.type,h=!(h!=="form"&&h!=="button")||Im(a.type,a.memoizedProps)),h=!h),h&&Un&&gs(a),zp(a),l===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,l=0;a;){if(a.nodeType===8)if(h=a.data,h==="/$"){if(l===0){Un=La(a.nextSibling);break e}l--}else h!=="$"&&h!=="$!"&&h!=="$?"||l++;a=a.nextSibling}Un=null}}else l===27?(l=Un,fa(a.type)?(a=Dv,Dv=null,Un=a):Un=l):Un=Yt?La(a.stateNode.nextSibling):null;return!0}function hc(){Un=Yt=null,$t=!1}function $p(){var a=Mr;return a!==null&&(Ts===null?Ts=a:Ts.push.apply(Ts,a),Mr=null),a}function oo(a){Mr===null?Mr=[a]:Mr.push(a)}var lo=X(null),T=null,_=null;function I(a,l,h){be(lo,l._currentValue),l._currentValue=h}function P(a){a._currentValue=lo.current,fe(lo)}function j(a,l,h){for(;a!==null;){var v=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),a===h)break;a=a.return}}function U(a,l,h,v){var C=a.child;for(C!==null&&(C.return=a);C!==null;){var R=C.dependencies;if(R!==null){var W=C.child;R=R.firstContext;e:for(;R!==null;){var ne=R;R=C;for(var ve=0;ve<l.length;ve++)if(ne.context===l[ve]){R.lanes|=h,ne=R.alternate,ne!==null&&(ne.lanes|=h),j(R.return,h,a),v||(W=null);break e}R=ne.next}}else if(C.tag===18){if(W=C.return,W===null)throw Error(r(341));W.lanes|=h,R=W.alternate,R!==null&&(R.lanes|=h),j(W,h,a),W=null}else W=C.child;if(W!==null)W.return=C;else for(W=C;W!==null;){if(W===a){W=null;break}if(C=W.sibling,C!==null){C.return=W.return,W=C;break}W=W.return}C=W}}function ae(a,l,h,v){a=null;for(var C=l,R=!1;C!==null;){if(!R){if((C.flags&524288)!==0)R=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var W=C.alternate;if(W===null)throw Error(r(387));if(W=W.memoizedProps,W!==null){var ne=C.type;Ki(C.pendingProps.value,W.value)||(a!==null?a.push(ne):a=[ne])}}else if(C===Ke.current){if(W=C.alternate,W===null)throw Error(r(387));W.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(a!==null?a.push(Vd):a=[Vd])}C=C.return}a!==null&&U(l,a,h,v),l.flags|=262144}function le(a){for(a=a.firstContext;a!==null;){if(!Ki(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function de(a){T=a,_=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function ce(a){return ze(T,a)}function Se(a,l){return T===null&&de(a),ze(a,l)}function ze(a,l){var h=l._currentValue;if(l={context:l,memoizedValue:h,next:null},_===null){if(a===null)throw Error(r(308));_=l,a.dependencies={lanes:0,firstContext:l},a.flags|=524288}else _=_.next=l;return h}var gt=typeof AbortController<"u"?AbortController:function(){var a=[],l=this.signal={aborted:!1,addEventListener:function(h,v){a.push(v)}};this.abort=function(){l.aborted=!0,a.forEach(function(h){return h()})}},Ye=t.unstable_scheduleCallback,Lt=t.unstable_NormalPriority,Ct={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jr(){return{controller:new gt,data:new Map,refCount:0}}function ui(a){a.refCount--,a.refCount===0&&Ye(Lt,function(){a.controller.abort()})}var vs=null,tl=0,oa=0,ti=null;function pc(a,l){if(vs===null){var h=vs=[];tl=0,oa=Dm(),ti={status:"pending",value:void 0,then:function(v){h.push(v)}}}return tl++,l.then(mc,mc),l}function mc(){if(--tl===0&&vs!==null){ti!==null&&(ti.status="fulfilled");var a=vs;vs=null,oa=0,ti=null;for(var l=0;l<a.length;l++)(0,a[l])()}}function or(a,l){var h=[],v={status:"pending",value:null,reason:null,then:function(C){h.push(C)}};return a.then(function(){v.status="fulfilled",v.value=l;for(var C=0;C<h.length;C++)(0,h[C])(l)},function(C){for(v.status="rejected",v.reason=C,C=0;C<h.length;C++)(0,h[C])(void 0)}),v}var nu=H.S;H.S=function(a,l){typeof l=="object"&&l!==null&&typeof l.then=="function"&&pc(a,l),nu!==null&&nu(a,l)};var ci=X(null);function nl(){var a=ci.current;return a!==null?a:pr.pooledCache}function Vp(a,l){l===null?be(ci,ci.current):be(ci,l.pool)}function ob(){var a=nl();return a===null?null:{parent:Ct._currentValue,pool:a}}var Ji=Error(r(460)),lb=Error(r(474)),Hp=Error(r(542)),E0={then:function(){}};function ub(a){return a=a.status,a==="fulfilled"||a==="rejected"}function qp(){}function A0(a,l,h){switch(h=a[h],h===void 0?a.push(l):h!==l&&(l.then(qp,qp),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,db(a),a;default:if(typeof l.status=="string")l.then(qp,qp);else{if(a=pr,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=l,a.status="pending",a.then(function(v){if(l.status==="pending"){var C=l;C.status="fulfilled",C.value=v}},function(v){if(l.status==="pending"){var C=l;C.status="rejected",C.reason=v}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,db(a),a}throw vd=l,Ji}}var vd=null;function cb(){if(vd===null)throw Error(r(459));var a=vd;return vd=null,a}function db(a){if(a===Ji||a===Hp)throw Error(r(483))}var uo=!1;function gc(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yd(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ru(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function rl(a,l,h){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(Yn&2)!==0){var C=v.pending;return C===null?l.next=l:(l.next=C.next,C.next=l),v.pending=l,l=uc(a),lc(a,null,h),l}return Ls(a,v,l,h),uc(a)}function Ff(a,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var v=l.lanes;v&=a.pendingLanes,h|=v,l.lanes=h,Be(a,h)}}function Ia(a,l){var h=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var C=null,R=null;if(h=h.firstBaseUpdate,h!==null){do{var W={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};R===null?C=R=W:R=R.next=W,h=h.next}while(h!==null);R===null?C=R=l:R=R.next=l}else C=R=l;h={baseState:v.baseState,firstBaseUpdate:C,lastBaseUpdate:R,shared:v.shared,callbacks:v.callbacks},a.updateQueue=h;return}a=h.lastBaseUpdate,a===null?h.firstBaseUpdate=l:a.next=l,h.lastBaseUpdate=l}var Uf=!1;function Oa(){if(Uf){var a=ti;if(a!==null)throw a}}function ji(a,l,h,v){Uf=!1;var C=a.updateQueue;uo=!1;var R=C.firstBaseUpdate,W=C.lastBaseUpdate,ne=C.shared.pending;if(ne!==null){C.shared.pending=null;var ve=ne,Ie=ve.next;ve.next=null,W===null?R=Ie:W.next=Ie,W=ve;var Qe=a.alternate;Qe!==null&&(Qe=Qe.updateQueue,ne=Qe.lastBaseUpdate,ne!==W&&(ne===null?Qe.firstBaseUpdate=Ie:ne.next=Ie,Qe.lastBaseUpdate=ve))}if(R!==null){var it=C.baseState;W=0,Qe=Ie=ve=null,ne=R;do{var je=ne.lane&-536870913,Oe=je!==ne.lane;if(Oe?(Nn&je)===je:(v&je)===je){je!==0&&je===oa&&(Uf=!0),Qe!==null&&(Qe=Qe.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Gt=a,Vt=ne;je=l;var er=h;switch(Vt.tag){case 1:if(Gt=Vt.payload,typeof Gt=="function"){it=Gt.call(er,it,je);break e}it=Gt;break e;case 3:Gt.flags=Gt.flags&-65537|128;case 0:if(Gt=Vt.payload,je=typeof Gt=="function"?Gt.call(er,it,je):Gt,je==null)break e;it=m({},it,je);break e;case 2:uo=!0}}je=ne.callback,je!==null&&(a.flags|=64,Oe&&(a.flags|=8192),Oe=C.callbacks,Oe===null?C.callbacks=[je]:Oe.push(je))}else Oe={lane:je,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Qe===null?(Ie=Qe=Oe,ve=it):Qe=Qe.next=Oe,W|=je;if(ne=ne.next,ne===null){if(ne=C.shared.pending,ne===null)break;Oe=ne,ne=Oe.next,Oe.next=null,C.lastBaseUpdate=Oe,C.shared.pending=null}}while(!0);Qe===null&&(ve=it),C.baseState=ve,C.firstBaseUpdate=Ie,C.lastBaseUpdate=Qe,R===null&&(C.shared.lanes=0),fu|=W,a.lanes=W,a.memoizedState=it}}function fb(a,l){if(typeof a!="function")throw Error(r(191,a));a.call(l)}function D0(a,l){var h=a.callbacks;if(h!==null)for(a.callbacks=null,a=0;a<h.length;a++)fb(h[a],l)}var vc=X(null),iu=X(0);function il(a,l){a=hl,be(iu,a),be(vc,l),hl=a|l.baseLanes}function Gp(){be(iu,hl),be(vc,vc.current)}function k0(){hl=iu.current,fe(vc),fe(iu)}var Na=0,vn=null,Xn=null,Dn=null,bd=!1,yc=!1,Li=!1,xd=0,su=0,la=null,hb=0;function Rn(){throw Error(r(321))}function zf(a,l){if(l===null)return!1;for(var h=0;h<l.length&&h<a.length;h++)if(!Ki(a[h],l[h]))return!1;return!0}function R0(a,l,h,v,C,R){return Na=R,vn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,H.H=a===null||a.memoizedState===null?Eb:X0,Li=!1,R=h(v,C),Li=!1,yc&&(R=mb(l,h,v,C)),pb(a),R}function pb(a){H.H=Zf;var l=Xn!==null&&Xn.next!==null;if(Na=0,Dn=Xn=vn=null,bd=!1,su=0,la=null,l)throw Error(r(300));a===null||yi||(a=a.dependencies,a!==null&&le(a)&&(yi=!0))}function mb(a,l,h,v){vn=a;var C=0;do{if(yc&&(la=null),su=0,yc=!1,25<=C)throw Error(r(301));if(C+=1,Dn=Xn=null,a.updateQueue!=null){var R=a.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}H.H=Ab,R=l(h,v)}while(yc);return R}function P0(){var a=H.H,l=a.useState()[0];return l=typeof l.then=="function"?$f(l):l,a=a.useState()[0],(Xn!==null?Xn.memoizedState:null)!==a&&(vn.flags|=1024),l}function I0(){var a=xd!==0;return xd=0,a}function bc(a,l,h){l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~h}function Wp(a){if(bd){for(a=a.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}bd=!1}Na=0,Dn=Xn=vn=null,yc=!1,su=xd=0,la=null}function ys(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dn===null?vn.memoizedState=Dn=a:Dn=Dn.next=a,Dn}function ni(){if(Xn===null){var a=vn.alternate;a=a!==null?a.memoizedState:null}else a=Xn.next;var l=Dn===null?vn.memoizedState:Dn.next;if(l!==null)Dn=l,Xn=a;else{if(a===null)throw vn.alternate===null?Error(r(467)):Error(r(310));Xn=a,a={memoizedState:Xn.memoizedState,baseState:Xn.baseState,baseQueue:Xn.baseQueue,queue:Xn.queue,next:null},Dn===null?vn.memoizedState=Dn=a:Dn=Dn.next=a}return Dn}function xc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $f(a){var l=su;return su+=1,la===null&&(la=[]),a=A0(la,a,l),l=vn,(Dn===null?l.memoizedState:Dn.next)===null&&(l=l.alternate,H.H=l===null||l.memoizedState===null?Eb:X0),a}function Xp(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return $f(a);if(a.$$typeof===N)return ce(a)}throw Error(r(438,String(a)))}function Vf(a){var l=null,h=vn.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var v=vn.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(l={data:v.data.map(function(C){return C.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=xc(),vn.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(a),v=0;v<a;v++)h[v]=z;return l.index++,h}function co(a,l){return typeof l=="function"?l(a):l}function Yp(a){var l=ni();return O0(l,Xn,a)}function O0(a,l,h){var v=a.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var C=a.baseQueue,R=v.pending;if(R!==null){if(C!==null){var W=C.next;C.next=R.next,R.next=W}l.baseQueue=C=R,v.pending=null}if(R=a.baseState,C===null)a.memoizedState=R;else{l=C.next;var ne=W=null,ve=null,Ie=l,Qe=!1;do{var it=Ie.lane&-536870913;if(it!==Ie.lane?(Nn&it)===it:(Na&it)===it){var je=Ie.revertLane;if(je===0)ve!==null&&(ve=ve.next={lane:0,revertLane:0,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null}),it===oa&&(Qe=!0);else if((Na&je)===je){Ie=Ie.next,je===oa&&(Qe=!0);continue}else it={lane:0,revertLane:Ie.revertLane,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null},ve===null?(ne=ve=it,W=R):ve=ve.next=it,vn.lanes|=je,fu|=je;it=Ie.action,Li&&h(R,it),R=Ie.hasEagerState?Ie.eagerState:h(R,it)}else je={lane:it,revertLane:Ie.revertLane,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null},ve===null?(ne=ve=je,W=R):ve=ve.next=je,vn.lanes|=it,fu|=it;Ie=Ie.next}while(Ie!==null&&Ie!==l);if(ve===null?W=R:ve.next=ne,!Ki(R,a.memoizedState)&&(yi=!0,Qe&&(h=ti,h!==null)))throw h;a.memoizedState=R,a.baseState=W,a.baseQueue=ve,v.lastRenderedState=R}return C===null&&(v.lanes=0),[a.memoizedState,v.dispatch]}function N0(a){var l=ni(),h=l.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=a;var v=h.dispatch,C=h.pending,R=l.memoizedState;if(C!==null){h.pending=null;var W=C=C.next;do R=a(R,W.action),W=W.next;while(W!==C);Ki(R,l.memoizedState)||(yi=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),h.lastRenderedState=R}return[R,v]}function M0(a,l,h){var v=vn,C=ni(),R=$t;if(R){if(h===void 0)throw Error(r(407));h=h()}else h=l();var W=!Ki((Xn||C).memoizedState,h);W&&(C.memoizedState=h,yi=!0),C=C.queue;var ne=Qp.bind(null,v,C,a);if(Gf(2048,8,ne,[a]),C.getSnapshot!==l||W||Dn!==null&&Dn.memoizedState.tag&1){if(v.flags|=2048,_d(9,nm(),gb.bind(null,v,C,h,l),null),pr===null)throw Error(r(349));R||(Na&124)!==0||Kp(v,l,h)}return h}function Kp(a,l,h){a.flags|=16384,a={getSnapshot:l,value:h},l=vn.updateQueue,l===null?(l=xc(),vn.updateQueue=l,l.stores=[a]):(h=l.stores,h===null?l.stores=[a]:h.push(a))}function gb(a,l,h,v){l.value=h,l.getSnapshot=v,j0(l)&&L0(a)}function Qp(a,l,h){return h(function(){j0(l)&&L0(a)})}function j0(a){var l=a.getSnapshot;a=a.value;try{var h=l();return!Ki(a,h)}catch{return!0}}function L0(a){var l=Ko(a,2);l!==null&&Hs(l,a,2)}function Zp(a){var l=ys();if(typeof a=="function"){var h=a;if(a=h(),Li){un(!0);try{h()}finally{un(!1)}}}return l.memoizedState=l.baseState=a,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:a},l}function Hf(a,l,h,v){return a.baseState=h,O0(a,Xn,typeof v=="function"?v:co)}function eS(a,l,h,v,C){if(am(a))throw Error(r(485));if(a=l.action,a!==null){var R={payload:C,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(W){R.listeners.push(W)}};H.T!==null?h(!0):R.isTransition=!1,v(R),h=l.pending,h===null?(R.next=l.pending=R,B0(l,R)):(R.next=h.next,l.pending=h.next=R)}}function B0(a,l){var h=l.action,v=l.payload,C=a.state;if(l.isTransition){var R=H.T,W={};H.T=W;try{var ne=h(C,v),ve=H.S;ve!==null&&ve(W,ne),F0(a,l,ne)}catch(Ie){Jp(a,l,Ie)}finally{H.T=R}}else try{R=h(C,v),F0(a,l,R)}catch(Ie){Jp(a,l,Ie)}}function F0(a,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){vb(a,l,v)},function(v){return Jp(a,l,v)}):vb(a,l,h)}function vb(a,l,h){l.status="fulfilled",l.value=h,yb(l),a.state=h,l=a.pending,l!==null&&(h=l.next,h===l?a.pending=null:(h=h.next,l.next=h,B0(a,h)))}function Jp(a,l,h){var v=a.pending;if(a.pending=null,v!==null){v=v.next;do l.status="rejected",l.reason=h,yb(l),l=l.next;while(l!==v)}a.action=null}function yb(a){a=a.listeners;for(var l=0;l<a.length;l++)(0,a[l])()}function em(a,l){return l}function U0(a,l){if($t){var h=pr.formState;if(h!==null){e:{var v=vn;if($t){if(Un){t:{for(var C=Un,R=Mi;C.nodeType!==8;){if(!R){C=null;break t}if(C=La(C.nextSibling),C===null){C=null;break t}}R=C.data,C=R==="F!"||R==="F"?C:null}if(C){Un=La(C.nextSibling),v=C.data==="F!";break e}}gs(v)}v=!1}v&&(l=h[0])}}return h=ys(),h.memoizedState=h.baseState=l,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:l},h.queue=v,h=q0.bind(null,vn,v),v.dispatch=h,v=Zp(!1),R=G0.bind(null,vn,!1,v.queue),v=ys(),C={state:l,dispatch:null,action:a,pending:null},v.queue=C,h=eS.bind(null,vn,C,R,h),C.dispatch=h,v.memoizedState=a,[l,h,!1]}function tm(a){var l=ni();return bb(l,Xn,a)}function bb(a,l,h){if(l=O0(a,l,em)[0],a=Yp(co)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var v=$f(l)}catch(W){throw W===Ji?Hp:W}else v=l;l=ni();var C=l.queue,R=C.dispatch;return h!==l.memoizedState&&(vn.flags|=2048,_d(9,nm(),z0.bind(null,C,h),null)),[v,R,a]}function z0(a,l){a.action=l}function hn(a){var l=ni(),h=Xn;if(h!==null)return bb(l,h,a);ni(),l=l.memoizedState,h=ni();var v=h.queue.dispatch;return h.memoizedState=a,[l,v,!1]}function _d(a,l,h,v){return a={tag:a,create:h,deps:v,inst:l,next:null},l=vn.updateQueue,l===null&&(l=xc(),vn.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=a.next=a:(v=h.next,h.next=a,a.next=v,l.lastEffect=a),a}function nm(){return{destroy:void 0,resource:void 0}}function Sd(){return ni().memoizedState}function qf(a,l,h,v){var C=ys();v=v===void 0?null:v,vn.flags|=a,C.memoizedState=_d(1|l,nm(),h,v)}function Gf(a,l,h,v){var C=ni();v=v===void 0?null:v;var R=C.memoizedState.inst;Xn!==null&&v!==null&&zf(v,Xn.memoizedState.deps)?C.memoizedState=_d(l,R,h,v):(vn.flags|=a,C.memoizedState=_d(1|l,R,h,v))}function xb(a,l){qf(8390656,8,a,l)}function Us(a,l){Gf(2048,8,a,l)}function _b(a,l){return Gf(4,2,a,l)}function Wf(a,l){return Gf(4,4,a,l)}function rm(a,l){if(typeof l=="function"){a=a();var h=l(a);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function $0(a,l,h){h=h!=null?h.concat([a]):null,Gf(4,4,rm.bind(null,l,a),h)}function im(){}function bs(a,l){var h=ni();l=l===void 0?null:l;var v=h.memoizedState;return l!==null&&zf(l,v[1])?v[0]:(h.memoizedState=[a,l],a)}function sl(a,l){var h=ni();l=l===void 0?null:l;var v=h.memoizedState;if(l!==null&&zf(l,v[1]))return v[0];if(v=a(),Li){un(!0);try{a()}finally{un(!1)}}return h.memoizedState=[v,l],v}function Xf(a,l,h){return h===void 0||(Na&1073741824)!==0?a.memoizedState=l:(a.memoizedState=h,a=ex(),vn.lanes|=a,fu|=a,h)}function V0(a,l,h,v){return Ki(h,l)?h:vc.current!==null?(a=Xf(a,h,v),Ki(a,l)||(yi=!0),a):(Na&42)===0?(yi=!0,a.memoizedState=h):(a=ex(),vn.lanes|=a,fu|=a,l)}function Yf(a,l,h,v,C){var R=te.p;te.p=R!==0&&8>R?R:8;var W=H.T,ne={};H.T=ne,G0(a,!1,l,h);try{var ve=C(),Ie=H.S;if(Ie!==null&&Ie(ne,ve),ve!==null&&typeof ve=="object"&&typeof ve.then=="function"){var Qe=or(ve,v);_c(a,l,Qe,Fi(a))}else _c(a,l,v,Fi(a))}catch(it){_c(a,l,{then:function(){},status:"rejected",reason:it},Fi())}finally{te.p=R,H.T=W}}function Sb(){}function Kf(a,l,h,v){if(a.tag!==5)throw Error(r(476));var C=H0(a).queue;Yf(a,C,l,Z,h===null?Sb:function(){return sm(a),h(v)})}function H0(a){var l=a.memoizedState;if(l!==null)return l;l={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:Z},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:h},next:null},a.memoizedState=l,a=a.alternate,a!==null&&(a.memoizedState=l),l}function sm(a){var l=H0(a).next.queue;_c(a,l,{},Fi())}function Qf(){return ce(Vd)}function al(){return ni().memoizedState}function Tb(){return ni().memoizedState}function au(a){for(var l=a.return;l!==null;){switch(l.tag){case 24:case 3:var h=Fi();a=ru(h);var v=rl(l,a,h);v!==null&&(Hs(v,l,h),Ff(v,l,h)),l={cache:jr()},a.payload=l;return}l=l.return}}function wb(a,l,h){var v=Fi();h={lane:v,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},am(a)?Cb(l,h):(h=eu(a,l,h,v),h!==null&&(Hs(h,a,v),W0(h,l,v)))}function q0(a,l,h){var v=Fi();_c(a,l,h,v)}function _c(a,l,h,v){var C={lane:v,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(am(a))Cb(l,C);else{var R=a.alternate;if(a.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var W=l.lastRenderedState,ne=R(W,h);if(C.hasEagerState=!0,C.eagerState=ne,Ki(ne,W))return Ls(a,l,C,0),pr===null&&Yo(),!1}catch{}finally{}if(h=eu(a,l,C,v),h!==null)return Hs(h,a,v),W0(h,l,v),!0}return!1}function G0(a,l,h,v){if(v={lane:2,revertLane:Dm(),action:v,hasEagerState:!1,eagerState:null,next:null},am(a)){if(l)throw Error(r(479))}else l=eu(a,h,v,2),l!==null&&Hs(l,a,2)}function am(a){var l=a.alternate;return a===vn||l!==null&&l===vn}function Cb(a,l){yc=bd=!0;var h=a.pending;h===null?l.next=l:(l.next=h.next,h.next=l),a.pending=l}function W0(a,l,h){if((h&4194048)!==0){var v=l.lanes;v&=a.pendingLanes,h|=v,l.lanes=h,Be(a,h)}}var Zf={readContext:ce,use:Xp,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useLayoutEffect:Rn,useInsertionEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useSyncExternalStore:Rn,useId:Rn,useHostTransitionStatus:Rn,useFormState:Rn,useActionState:Rn,useOptimistic:Rn,useMemoCache:Rn,useCacheRefresh:Rn},Eb={readContext:ce,use:Xp,useCallback:function(a,l){return ys().memoizedState=[a,l===void 0?null:l],a},useContext:ce,useEffect:xb,useImperativeHandle:function(a,l,h){h=h!=null?h.concat([a]):null,qf(4194308,4,rm.bind(null,l,a),h)},useLayoutEffect:function(a,l){return qf(4194308,4,a,l)},useInsertionEffect:function(a,l){qf(4,2,a,l)},useMemo:function(a,l){var h=ys();l=l===void 0?null:l;var v=a();if(Li){un(!0);try{a()}finally{un(!1)}}return h.memoizedState=[v,l],v},useReducer:function(a,l,h){var v=ys();if(h!==void 0){var C=h(l);if(Li){un(!0);try{h(l)}finally{un(!1)}}}else C=l;return v.memoizedState=v.baseState=C,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:C},v.queue=a,a=a.dispatch=wb.bind(null,vn,a),[v.memoizedState,a]},useRef:function(a){var l=ys();return a={current:a},l.memoizedState=a},useState:function(a){a=Zp(a);var l=a.queue,h=q0.bind(null,vn,l);return l.dispatch=h,[a.memoizedState,h]},useDebugValue:im,useDeferredValue:function(a,l){var h=ys();return Xf(h,a,l)},useTransition:function(){var a=Zp(!1);return a=Yf.bind(null,vn,a.queue,!0,!1),ys().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,l,h){var v=vn,C=ys();if($t){if(h===void 0)throw Error(r(407));h=h()}else{if(h=l(),pr===null)throw Error(r(349));(Nn&124)!==0||Kp(v,l,h)}C.memoizedState=h;var R={value:h,getSnapshot:l};return C.queue=R,xb(Qp.bind(null,v,R,a),[a]),v.flags|=2048,_d(9,nm(),gb.bind(null,v,R,h,l),null),h},useId:function(){var a=ys(),l=pr.identifierPrefix;if($t){var h=Fs,v=hr;h=(v&~(1<<32-Pt(v)-1)).toString(32)+h,l="«"+l+"R"+h,h=xd++,0<h&&(l+="H"+h.toString(32)),l+="»"}else h=hb++,l="«"+l+"r"+h.toString(32)+"»";return a.memoizedState=l},useHostTransitionStatus:Qf,useFormState:U0,useActionState:U0,useOptimistic:function(a){var l=ys();l.memoizedState=l.baseState=a;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=G0.bind(null,vn,!0,h),h.dispatch=l,[a,l]},useMemoCache:Vf,useCacheRefresh:function(){return ys().memoizedState=au.bind(null,vn)}},X0={readContext:ce,use:Xp,useCallback:bs,useContext:ce,useEffect:Us,useImperativeHandle:$0,useInsertionEffect:_b,useLayoutEffect:Wf,useMemo:sl,useReducer:Yp,useRef:Sd,useState:function(){return Yp(co)},useDebugValue:im,useDeferredValue:function(a,l){var h=ni();return V0(h,Xn.memoizedState,a,l)},useTransition:function(){var a=Yp(co)[0],l=ni().memoizedState;return[typeof a=="boolean"?a:$f(a),l]},useSyncExternalStore:M0,useId:al,useHostTransitionStatus:Qf,useFormState:tm,useActionState:tm,useOptimistic:function(a,l){var h=ni();return Hf(h,Xn,a,l)},useMemoCache:Vf,useCacheRefresh:Tb},Ab={readContext:ce,use:Xp,useCallback:bs,useContext:ce,useEffect:Us,useImperativeHandle:$0,useInsertionEffect:_b,useLayoutEffect:Wf,useMemo:sl,useReducer:N0,useRef:Sd,useState:function(){return N0(co)},useDebugValue:im,useDeferredValue:function(a,l){var h=ni();return Xn===null?Xf(h,a,l):V0(h,Xn.memoizedState,a,l)},useTransition:function(){var a=N0(co)[0],l=ni().memoizedState;return[typeof a=="boolean"?a:$f(a),l]},useSyncExternalStore:M0,useId:al,useHostTransitionStatus:Qf,useFormState:hn,useActionState:hn,useOptimistic:function(a,l){var h=ni();return Xn!==null?Hf(h,Xn,a,l):(h.baseState=a,[a,h.queue.dispatch])},useMemoCache:Vf,useCacheRefresh:Tb},di=null,xs=0;function om(a){var l=xs;return xs+=1,di===null&&(di=[]),A0(di,a,l)}function Jf(a,l){l=l.props.ref,a.ref=l!==void 0?l:null}function Sc(a,l){throw l.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a)))}function Tc(a){var l=a._init;return l(a._payload)}function Y0(a){function l(De,_e){if(a){var Pe=De.deletions;Pe===null?(De.deletions=[_e],De.flags|=16):Pe.push(_e)}}function h(De,_e){if(!a)return null;for(;_e!==null;)l(De,_e),_e=_e.sibling;return null}function v(De){for(var _e=new Map;De!==null;)De.key!==null?_e.set(De.key,De):_e.set(De.index,De),De=De.sibling;return _e}function C(De,_e){return De=Ei(De,_e),De.index=0,De.sibling=null,De}function R(De,_e,Pe){return De.index=Pe,a?(Pe=De.alternate,Pe!==null?(Pe=Pe.index,Pe<_e?(De.flags|=67108866,_e):Pe):(De.flags|=67108866,_e)):(De.flags|=1048576,_e)}function W(De){return a&&De.alternate===null&&(De.flags|=67108866),De}function ne(De,_e,Pe,Je){return _e===null||_e.tag!==6?(_e=md(Pe,De.mode,Je),_e.return=De,_e):(_e=C(_e,Pe),_e.return=De,_e)}function ve(De,_e,Pe,Je){var Dt=Pe.type;return Dt===w?Qe(De,_e,Pe.props.children,Je,Pe.key):_e!==null&&(_e.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===q&&Tc(Dt)===_e.type)?(_e=C(_e,Pe.props),Jf(_e,Pe),_e.return=De,_e):(_e=pd(Pe.type,Pe.key,Pe.props,null,De.mode,Je),Jf(_e,Pe),_e.return=De,_e)}function Ie(De,_e,Pe,Je){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Pe.containerInfo||_e.stateNode.implementation!==Pe.implementation?(_e=ao(Pe,De.mode,Je),_e.return=De,_e):(_e=C(_e,Pe.children||[]),_e.return=De,_e)}function Qe(De,_e,Pe,Je,Dt){return _e===null||_e.tag!==7?(_e=tu(Pe,De.mode,Je,Dt),_e.return=De,_e):(_e=C(_e,Pe),_e.return=De,_e)}function it(De,_e,Pe){if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return _e=md(""+_e,De.mode,Pe),_e.return=De,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case x:return Pe=pd(_e.type,_e.key,_e.props,null,De.mode,Pe),Jf(Pe,_e),Pe.return=De,Pe;case b:return _e=ao(_e,De.mode,Pe),_e.return=De,_e;case q:var Je=_e._init;return _e=Je(_e._payload),it(De,_e,Pe)}if(ue(_e)||Y(_e))return _e=tu(_e,De.mode,Pe,null),_e.return=De,_e;if(typeof _e.then=="function")return it(De,om(_e),Pe);if(_e.$$typeof===N)return it(De,Se(De,_e),Pe);Sc(De,_e)}return null}function je(De,_e,Pe,Je){var Dt=_e!==null?_e.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return Dt!==null?null:ne(De,_e,""+Pe,Je);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case x:return Pe.key===Dt?ve(De,_e,Pe,Je):null;case b:return Pe.key===Dt?Ie(De,_e,Pe,Je):null;case q:return Dt=Pe._init,Pe=Dt(Pe._payload),je(De,_e,Pe,Je)}if(ue(Pe)||Y(Pe))return Dt!==null?null:Qe(De,_e,Pe,Je,null);if(typeof Pe.then=="function")return je(De,_e,om(Pe),Je);if(Pe.$$typeof===N)return je(De,_e,Se(De,Pe),Je);Sc(De,Pe)}return null}function Oe(De,_e,Pe,Je,Dt){if(typeof Je=="string"&&Je!==""||typeof Je=="number"||typeof Je=="bigint")return De=De.get(Pe)||null,ne(_e,De,""+Je,Dt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case x:return De=De.get(Je.key===null?Pe:Je.key)||null,ve(_e,De,Je,Dt);case b:return De=De.get(Je.key===null?Pe:Je.key)||null,Ie(_e,De,Je,Dt);case q:var bn=Je._init;return Je=bn(Je._payload),Oe(De,_e,Pe,Je,Dt)}if(ue(Je)||Y(Je))return De=De.get(Pe)||null,Qe(_e,De,Je,Dt,null);if(typeof Je.then=="function")return Oe(De,_e,Pe,om(Je),Dt);if(Je.$$typeof===N)return Oe(De,_e,Pe,Se(_e,Je),Dt);Sc(_e,Je)}return null}function Gt(De,_e,Pe,Je){for(var Dt=null,bn=null,Mt=_e,Wt=_e=0,_i=null;Mt!==null&&Wt<Pe.length;Wt++){Mt.index>Wt?(_i=Mt,Mt=null):_i=Mt.sibling;var jn=je(De,Mt,Pe[Wt],Je);if(jn===null){Mt===null&&(Mt=_i);break}a&&Mt&&jn.alternate===null&&l(De,Mt),_e=R(jn,_e,Wt),bn===null?Dt=jn:bn.sibling=jn,bn=jn,Mt=_i}if(Wt===Pe.length)return h(De,Mt),$t&&Jo(De,Wt),Dt;if(Mt===null){for(;Wt<Pe.length;Wt++)Mt=it(De,Pe[Wt],Je),Mt!==null&&(_e=R(Mt,_e,Wt),bn===null?Dt=Mt:bn.sibling=Mt,bn=Mt);return $t&&Jo(De,Wt),Dt}for(Mt=v(Mt);Wt<Pe.length;Wt++)_i=Oe(Mt,De,Wt,Pe[Wt],Je),_i!==null&&(a&&_i.alternate!==null&&Mt.delete(_i.key===null?Wt:_i.key),_e=R(_i,_e,Wt),bn===null?Dt=_i:bn.sibling=_i,bn=_i);return a&&Mt.forEach(function(Su){return l(De,Su)}),$t&&Jo(De,Wt),Dt}function Vt(De,_e,Pe,Je){if(Pe==null)throw Error(r(151));for(var Dt=null,bn=null,Mt=_e,Wt=_e=0,_i=null,jn=Pe.next();Mt!==null&&!jn.done;Wt++,jn=Pe.next()){Mt.index>Wt?(_i=Mt,Mt=null):_i=Mt.sibling;var Su=je(De,Mt,jn.value,Je);if(Su===null){Mt===null&&(Mt=_i);break}a&&Mt&&Su.alternate===null&&l(De,Mt),_e=R(Su,_e,Wt),bn===null?Dt=Su:bn.sibling=Su,bn=Su,Mt=_i}if(jn.done)return h(De,Mt),$t&&Jo(De,Wt),Dt;if(Mt===null){for(;!jn.done;Wt++,jn=Pe.next())jn=it(De,jn.value,Je),jn!==null&&(_e=R(jn,_e,Wt),bn===null?Dt=jn:bn.sibling=jn,bn=jn);return $t&&Jo(De,Wt),Dt}for(Mt=v(Mt);!jn.done;Wt++,jn=Pe.next())jn=Oe(Mt,De,Wt,jn.value,Je),jn!==null&&(a&&jn.alternate!==null&&Mt.delete(jn.key===null?Wt:jn.key),_e=R(jn,_e,Wt),bn===null?Dt=jn:bn.sibling=jn,bn=jn);return a&&Mt.forEach(function(jS){return l(De,jS)}),$t&&Jo(De,Wt),Dt}function er(De,_e,Pe,Je){if(typeof Pe=="object"&&Pe!==null&&Pe.type===w&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case x:e:{for(var Dt=Pe.key;_e!==null;){if(_e.key===Dt){if(Dt=Pe.type,Dt===w){if(_e.tag===7){h(De,_e.sibling),Je=C(_e,Pe.props.children),Je.return=De,De=Je;break e}}else if(_e.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===q&&Tc(Dt)===_e.type){h(De,_e.sibling),Je=C(_e,Pe.props),Jf(Je,Pe),Je.return=De,De=Je;break e}h(De,_e);break}else l(De,_e);_e=_e.sibling}Pe.type===w?(Je=tu(Pe.props.children,De.mode,Je,Pe.key),Je.return=De,De=Je):(Je=pd(Pe.type,Pe.key,Pe.props,null,De.mode,Je),Jf(Je,Pe),Je.return=De,De=Je)}return W(De);case b:e:{for(Dt=Pe.key;_e!==null;){if(_e.key===Dt)if(_e.tag===4&&_e.stateNode.containerInfo===Pe.containerInfo&&_e.stateNode.implementation===Pe.implementation){h(De,_e.sibling),Je=C(_e,Pe.children||[]),Je.return=De,De=Je;break e}else{h(De,_e);break}else l(De,_e);_e=_e.sibling}Je=ao(Pe,De.mode,Je),Je.return=De,De=Je}return W(De);case q:return Dt=Pe._init,Pe=Dt(Pe._payload),er(De,_e,Pe,Je)}if(ue(Pe))return Gt(De,_e,Pe,Je);if(Y(Pe)){if(Dt=Y(Pe),typeof Dt!="function")throw Error(r(150));return Pe=Dt.call(Pe),Vt(De,_e,Pe,Je)}if(typeof Pe.then=="function")return er(De,_e,om(Pe),Je);if(Pe.$$typeof===N)return er(De,_e,Se(De,Pe),Je);Sc(De,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint"?(Pe=""+Pe,_e!==null&&_e.tag===6?(h(De,_e.sibling),Je=C(_e,Pe),Je.return=De,De=Je):(h(De,_e),Je=md(Pe,De.mode,Je),Je.return=De,De=Je),W(De)):h(De,_e)}return function(De,_e,Pe,Je){try{xs=0;var Dt=er(De,_e,Pe,Je);return di=null,Dt}catch(Mt){if(Mt===Ji||Mt===Hp)throw Mt;var bn=Oi(29,Mt,null,De.mode);return bn.lanes=Je,bn.return=De,bn}finally{}}}var wc=Y0(!0),Db=Y0(!1),zs=X(null),es=null;function ua(a){var l=a.alternate;be(Lr,Lr.current&1),be(zs,a),es===null&&(l===null||vc.current!==null||l.memoizedState!==null)&&(es=a)}function kb(a){if(a.tag===22){if(be(Lr,Lr.current),be(zs,a),es===null){var l=a.alternate;l!==null&&l.memoizedState!==null&&(es=a)}}else ol()}function ol(){be(Lr,Lr.current),be(zs,zs.current)}function fo(a){fe(zs),es===a&&(es=null),fe(Lr)}var Lr=X(0);function eh(a){for(var l=a;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||ns(h)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function Td(a,l,h,v){l=a.memoizedState,h=h(v,l),h=h==null?l:m({},l,h),a.memoizedState=h,a.lanes===0&&(a.updateQueue.baseState=h)}var th={enqueueSetState:function(a,l,h){a=a._reactInternals;var v=Fi(),C=ru(v);C.payload=l,h!=null&&(C.callback=h),l=rl(a,C,v),l!==null&&(Hs(l,a,v),Ff(l,a,v))},enqueueReplaceState:function(a,l,h){a=a._reactInternals;var v=Fi(),C=ru(v);C.tag=1,C.payload=l,h!=null&&(C.callback=h),l=rl(a,C,v),l!==null&&(Hs(l,a,v),Ff(l,a,v))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var h=Fi(),v=ru(h);v.tag=2,l!=null&&(v.callback=l),l=rl(a,v,h),l!==null&&(Hs(l,a,h),Ff(l,a,h))}};function nh(a,l,h,v,C,R,W){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,R,W):l.prototype&&l.prototype.isPureReactComponent?!Pi(h,v)||!Pi(C,R):!0}function Rb(a,l,h,v){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,v),l.state!==a&&th.enqueueReplaceState(l,l.state,null)}function ou(a,l){var h=l;if("ref"in l){h={};for(var v in l)v!=="ref"&&(h[v]=l[v])}if(a=a.defaultProps){h===l&&(h=m({},h));for(var C in a)h[C]===void 0&&(h[C]=a[C])}return h}var Cc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function K0(a){Cc(a)}function lm(a){console.error(a)}function Pb(a){Cc(a)}function rh(a,l){try{var h=a.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(v){setTimeout(function(){throw v})}}function ho(a,l,h){try{var v=a.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function um(a,l,h){return h=ru(h),h.tag=3,h.payload={element:null},h.callback=function(){rh(a,l)},h}function Q0(a){return a=ru(a),a.tag=3,a}function Ib(a,l,h,v){var C=h.type.getDerivedStateFromError;if(typeof C=="function"){var R=v.value;a.payload=function(){return C(R)},a.callback=function(){ho(l,h,v)}}var W=h.stateNode;W!==null&&typeof W.componentDidCatch=="function"&&(a.callback=function(){ho(l,h,v),typeof C!="function"&&(hu===null?hu=new Set([this]):hu.add(this));var ne=v.stack;this.componentDidCatch(v.value,{componentStack:ne!==null?ne:""})})}function Ob(a,l,h,v,C){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(l=h.alternate,l!==null&&ae(l,h,C,!0),h=zs.current,h!==null){switch(h.tag){case 13:return es===null?gv():h.alternate===null&&Br===0&&(Br=3),h.flags&=-257,h.flags|=65536,h.lanes=C,v===E0?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([v]):l.add(v),bv(a,v,C)),!1;case 22:return h.flags|=65536,v===E0?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([v]):h.add(v)),bv(a,v,C)),!1}throw Error(r(435,h.tag))}return bv(a,v,C),gv(),!1}if($t)return l=zs.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=C,v!==el&&(a=Error(r(422),{cause:v}),oo(Ci(a,h)))):(v!==el&&(l=Error(r(423),{cause:v}),oo(Ci(l,h))),a=a.current.alternate,a.flags|=65536,C&=-C,a.lanes|=C,v=Ci(v,h),C=um(a.stateNode,v,C),Ia(a,C),Br!==4&&(Br=2)),!1;var R=Error(r(520),{cause:v});if(R=Ci(R,h),hh===null?hh=[R]:hh.push(R),Br!==4&&(Br=2),l===null)return!0;v=Ci(v,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,a=C&-C,h.lanes|=a,a=um(h.stateNode,v,a),Ia(h,a),!1;case 1:if(l=h.type,R=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(hu===null||!hu.has(R))))return h.flags|=65536,C&=-C,h.lanes|=C,C=Q0(C),Ib(C,a,h,v),Ia(h,C),!1}h=h.return}while(h!==null);return!1}var Nb=Error(r(461)),yi=!1;function vr(a,l,h,v){l.child=a===null?Db(l,null,h,v):wc(l,a.child,h,v)}function cm(a,l,h,v,C){h=h.render;var R=l.ref;if("ref"in v){var W={};for(var ne in v)ne!=="ref"&&(W[ne]=v[ne])}else W=v;return de(l),v=R0(a,l,h,W,R,C),ne=I0(),a!==null&&!yi?(bc(a,l,C),ll(a,l,C)):($t&&ne&&gd(l),l.flags|=1,vr(a,l,v,C),l.child)}function dm(a,l,h,v,C){if(a===null){var R=h.type;return typeof R=="function"&&!Ni(R)&&R.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=R,fm(a,l,R,v,C)):(a=pd(h.type,null,v,l,l.mode,C),a.ref=l.ref,a.return=l,l.child=a)}if(R=a.child,!Ma(a,C)){var W=R.memoizedProps;if(h=h.compare,h=h!==null?h:Pi,h(W,v)&&a.ref===l.ref)return ll(a,l,C)}return l.flags|=1,a=Ei(R,v),a.ref=l.ref,a.return=l,l.child=a}function fm(a,l,h,v,C){if(a!==null){var R=a.memoizedProps;if(Pi(R,v)&&a.ref===l.ref)if(yi=!1,l.pendingProps=v=R,Ma(a,C))(a.flags&131072)!==0&&(yi=!0);else return l.lanes=a.lanes,ll(a,l,C)}return wd(a,l,h,v,C)}function ih(a,l,h){var v=l.pendingProps,C=v.children,R=a!==null?a.memoizedState:null;if(v.mode==="hidden"){if((l.flags&128)!==0){if(v=R!==null?R.baseLanes|h:h,a!==null){for(C=l.child=a.child,R=0;C!==null;)R=R|C.lanes|C.childLanes,C=C.sibling;l.childLanes=R&~v}else l.childLanes=0,l.child=null;return Ec(a,l,v,h)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},a!==null&&Vp(l,R!==null?R.cachePool:null),R!==null?il(l,R):Gp(),kb(l);else return l.lanes=l.childLanes=536870912,Ec(a,l,R!==null?R.baseLanes|h:h,h)}else R!==null?(Vp(l,R.cachePool),il(l,R),ol(),l.memoizedState=null):(a!==null&&Vp(l,null),Gp(),ol());return vr(a,l,C,h),l.child}function Ec(a,l,h,v){var C=nl();return C=C===null?null:{parent:Ct._currentValue,pool:C},l.memoizedState={baseLanes:h,cachePool:C},a!==null&&Vp(l,null),Gp(),kb(l),a!==null&&ae(a,l,v,!0),null}function Ut(a,l){var h=l.ref;if(h===null)a!==null&&a.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(a===null||a.ref!==h)&&(l.flags|=4194816)}}function wd(a,l,h,v,C){return de(l),h=R0(a,l,h,v,void 0,C),v=I0(),a!==null&&!yi?(bc(a,l,C),ll(a,l,C)):($t&&v&&gd(l),l.flags|=1,vr(a,l,h,C),l.child)}function hm(a,l,h,v,C,R){return de(l),l.updateQueue=null,h=mb(l,v,h,C),pb(a),v=I0(),a!==null&&!yi?(bc(a,l,R),ll(a,l,R)):($t&&v&&gd(l),l.flags|=1,vr(a,l,h,R),l.child)}function lu(a,l,h,v,C){if(de(l),l.stateNode===null){var R=Qo,W=h.contextType;typeof W=="object"&&W!==null&&(R=ce(W)),R=new h(v,R),l.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=th,l.stateNode=R,R._reactInternals=l,R=l.stateNode,R.props=v,R.state=l.memoizedState,R.refs={},gc(l),W=h.contextType,R.context=typeof W=="object"&&W!==null?ce(W):Qo,R.state=l.memoizedState,W=h.getDerivedStateFromProps,typeof W=="function"&&(Td(l,h,W,v),R.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(W=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),W!==R.state&&th.enqueueReplaceState(R,R.state,null),ji(l,v,R,C),Oa(),R.state=l.memoizedState),typeof R.componentDidMount=="function"&&(l.flags|=4194308),v=!0}else if(a===null){R=l.stateNode;var ne=l.memoizedProps,ve=ou(h,ne);R.props=ve;var Ie=R.context,Qe=h.contextType;W=Qo,typeof Qe=="object"&&Qe!==null&&(W=ce(Qe));var it=h.getDerivedStateFromProps;Qe=typeof it=="function"||typeof R.getSnapshotBeforeUpdate=="function",ne=l.pendingProps!==ne,Qe||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(ne||Ie!==W)&&Rb(l,R,v,W),uo=!1;var je=l.memoizedState;R.state=je,ji(l,v,R,C),Oa(),Ie=l.memoizedState,ne||je!==Ie||uo?(typeof it=="function"&&(Td(l,h,it,v),Ie=l.memoizedState),(ve=uo||nh(l,h,ve,v,je,Ie,W))?(Qe||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=Ie),R.props=v,R.state=Ie,R.context=W,v=ve):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{R=l.stateNode,yd(a,l),W=l.memoizedProps,Qe=ou(h,W),R.props=Qe,it=l.pendingProps,je=R.context,Ie=h.contextType,ve=Qo,typeof Ie=="object"&&Ie!==null&&(ve=ce(Ie)),ne=h.getDerivedStateFromProps,(Ie=typeof ne=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(W!==it||je!==ve)&&Rb(l,R,v,ve),uo=!1,je=l.memoizedState,R.state=je,ji(l,v,R,C),Oa();var Oe=l.memoizedState;W!==it||je!==Oe||uo||a!==null&&a.dependencies!==null&&le(a.dependencies)?(typeof ne=="function"&&(Td(l,h,ne,v),Oe=l.memoizedState),(Qe=uo||nh(l,h,Qe,v,je,Oe,ve)||a!==null&&a.dependencies!==null&&le(a.dependencies))?(Ie||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(v,Oe,ve),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(v,Oe,ve)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||W===a.memoizedProps&&je===a.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===a.memoizedProps&&je===a.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=Oe),R.props=v,R.state=Oe,R.context=ve,v=Qe):(typeof R.componentDidUpdate!="function"||W===a.memoizedProps&&je===a.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||W===a.memoizedProps&&je===a.memoizedState||(l.flags|=1024),v=!1)}return R=v,Ut(a,l),v=(l.flags&128)!==0,R||v?(R=l.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:R.render(),l.flags|=1,a!==null&&v?(l.child=wc(l,a.child,null,C),l.child=wc(l,null,h,C)):vr(a,l,h,C),l.memoizedState=R.state,a=l.child):a=ll(a,l,C),a}function Mb(a,l,h,v){return hc(),l.flags|=256,vr(a,l,h,v),l.child}var sh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pm(a){return{baseLanes:a,cachePool:ob()}}function bi(a,l,h){return a=a!==null?a.childLanes&~h:0,l&&(a|=da),a}function jb(a,l,h){var v=l.pendingProps,C=!1,R=(l.flags&128)!==0,W;if((W=R)||(W=a!==null&&a.memoizedState===null?!1:(Lr.current&2)!==0),W&&(C=!0,l.flags&=-129),W=(l.flags&32)!==0,l.flags&=-33,a===null){if($t){if(C?ua(l):ol(),$t){var ne=Un,ve;if(ve=ne){e:{for(ve=ne,ne=Mi;ve.nodeType!==8;){if(!ne){ne=null;break e}if(ve=La(ve.nextSibling),ve===null){ne=null;break e}}ne=ve}ne!==null?(l.memoizedState={dehydrated:ne,treeContext:ar!==null?{id:hr,overflow:Fs}:null,retryLane:536870912,hydrationErrors:null},ve=Oi(18,null,null,0),ve.stateNode=ne,ve.return=l,l.child=ve,Yt=l,Un=null,ve=!0):ve=!1}ve||gs(l)}if(ne=l.memoizedState,ne!==null&&(ne=ne.dehydrated,ne!==null))return ns(ne)?l.lanes=32:l.lanes=536870912,null;fo(l)}return ne=v.children,v=v.fallback,C?(ol(),C=l.mode,ne=ah({mode:"hidden",children:ne},C),v=tu(v,C,h,null),ne.return=l,v.return=l,ne.sibling=v,l.child=ne,C=l.child,C.memoizedState=pm(h),C.childLanes=bi(a,W,h),l.memoizedState=sh,v):(ua(l),Z0(l,ne))}if(ve=a.memoizedState,ve!==null&&(ne=ve.dehydrated,ne!==null)){if(R)l.flags&256?(ua(l),l.flags&=-257,l=J0(a,l,h)):l.memoizedState!==null?(ol(),l.child=a.child,l.flags|=128,l=null):(ol(),C=v.fallback,ne=l.mode,v=ah({mode:"visible",children:v.children},ne),C=tu(C,ne,h,null),C.flags|=2,v.return=l,C.return=l,v.sibling=C,l.child=v,wc(l,a.child,null,h),v=l.child,v.memoizedState=pm(h),v.childLanes=bi(a,W,h),l.memoizedState=sh,l=C);else if(ua(l),ns(ne)){if(W=ne.nextSibling&&ne.nextSibling.dataset,W)var Ie=W.dgst;W=Ie,v=Error(r(419)),v.stack="",v.digest=W,oo({value:v,source:null,stack:null}),l=J0(a,l,h)}else if(yi||ae(a,l,h,!1),W=(h&a.childLanes)!==0,yi||W){if(W=pr,W!==null&&(v=h&-h,v=(v&42)!==0?1:ft(v),v=(v&(W.suspendedLanes|h))!==0?0:v,v!==0&&v!==ve.retryLane))throw ve.retryLane=v,Ko(a,v),Hs(W,a,v),Nb;ne.data==="$?"||gv(),l=J0(a,l,h)}else ne.data==="$?"?(l.flags|=192,l.child=a.child,l=null):(a=ve.treeContext,Un=La(ne.nextSibling),Yt=l,$t=!0,Mr=null,Mi=!1,a!==null&&(ps[ms++]=hr,ps[ms++]=Fs,ps[ms++]=ar,hr=a.id,Fs=a.overflow,ar=l),l=Z0(l,v.children),l.flags|=4096);return l}return C?(ol(),C=v.fallback,ne=l.mode,ve=a.child,Ie=ve.sibling,v=Ei(ve,{mode:"hidden",children:v.children}),v.subtreeFlags=ve.subtreeFlags&65011712,Ie!==null?C=Ei(Ie,C):(C=tu(C,ne,h,null),C.flags|=2),C.return=l,v.return=l,v.sibling=C,l.child=v,v=C,C=l.child,ne=a.child.memoizedState,ne===null?ne=pm(h):(ve=ne.cachePool,ve!==null?(Ie=Ct._currentValue,ve=ve.parent!==Ie?{parent:Ie,pool:Ie}:ve):ve=ob(),ne={baseLanes:ne.baseLanes|h,cachePool:ve}),C.memoizedState=ne,C.childLanes=bi(a,W,h),l.memoizedState=sh,v):(ua(l),h=a.child,a=h.sibling,h=Ei(h,{mode:"visible",children:v.children}),h.return=l,h.sibling=null,a!==null&&(W=l.deletions,W===null?(l.deletions=[a],l.flags|=16):W.push(a)),l.child=h,l.memoizedState=null,h)}function Z0(a,l){return l=ah({mode:"visible",children:l},a.mode),l.return=a,a.child=l}function ah(a,l){return a=Oi(22,a,null,l),a.lanes=0,a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},a}function J0(a,l,h){return wc(l,a.child,null,h),a=Z0(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function ev(a,l,h){a.lanes|=l;var v=a.alternate;v!==null&&(v.lanes|=l),j(a.return,l,h)}function tv(a,l,h,v,C){var R=a.memoizedState;R===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:C}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=v,R.tail=h,R.tailMode=C)}function Lb(a,l,h){var v=l.pendingProps,C=v.revealOrder,R=v.tail;if(vr(a,l,v.children,h),v=Lr.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&ev(a,h,l);else if(a.tag===19)ev(a,h,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}v&=1}switch(be(Lr,v),C){case"forwards":for(h=l.child,C=null;h!==null;)a=h.alternate,a!==null&&eh(a)===null&&(C=h),h=h.sibling;h=C,h===null?(C=l.child,l.child=null):(C=h.sibling,h.sibling=null),tv(l,!1,C,h,R);break;case"backwards":for(h=null,C=l.child,l.child=null;C!==null;){if(a=C.alternate,a!==null&&eh(a)===null){l.child=C;break}a=C.sibling,C.sibling=h,h=C,C=a}tv(l,!0,h,null,R);break;case"together":tv(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function ll(a,l,h){if(a!==null&&(l.dependencies=a.dependencies),fu|=l.lanes,(h&l.childLanes)===0)if(a!==null){if(ae(a,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,h=Ei(a,a.pendingProps),l.child=h,h.return=l;a.sibling!==null;)a=a.sibling,h=h.sibling=Ei(a,a.pendingProps),h.return=l;h.sibling=null}return l.child}function Ma(a,l){return(a.lanes&l)!==0?!0:(a=a.dependencies,!!(a!==null&&le(a)))}function ts(a,l,h){switch(l.tag){case 3:Me(l,l.stateNode.containerInfo),I(l,Ct,a.memoizedState.cache),hc();break;case 27:case 5:bt(l);break;case 4:Me(l,l.stateNode.containerInfo);break;case 10:I(l,l.type,l.memoizedProps.value);break;case 13:var v=l.memoizedState;if(v!==null)return v.dehydrated!==null?(ua(l),l.flags|=128,null):(h&l.child.childLanes)!==0?jb(a,l,h):(ua(l),a=ll(a,l,h),a!==null?a.sibling:null);ua(l);break;case 19:var C=(a.flags&128)!==0;if(v=(h&l.childLanes)!==0,v||(ae(a,l,h,!1),v=(h&l.childLanes)!==0),C){if(v)return Lb(a,l,h);l.flags|=128}if(C=l.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),be(Lr,Lr.current),v)break;return null;case 22:case 23:return l.lanes=0,ih(a,l,h);case 24:I(l,Ct,a.memoizedState.cache)}return ll(a,l,h)}function mm(a,l,h){if(a!==null)if(a.memoizedProps!==l.pendingProps)yi=!0;else{if(!Ma(a,h)&&(l.flags&128)===0)return yi=!1,ts(a,l,h);yi=(a.flags&131072)!==0}else yi=!1,$t&&(l.flags&1048576)!==0&&Bf(l,dc,l.index);switch(l.lanes=0,l.tag){case 16:e:{a=l.pendingProps;var v=l.elementType,C=v._init;if(v=C(v._payload),l.type=v,typeof v=="function")Ni(v)?(a=ou(v,a),l.tag=1,l=lu(null,l,v,a,h)):(l.tag=0,l=wd(null,l,v,a,h));else{if(v!=null){if(C=v.$$typeof,C===F){l.tag=11,l=cm(null,l,v,a,h);break e}else if(C===$){l.tag=14,l=dm(null,l,v,a,h);break e}}throw l=oe(v)||v,Error(r(306,l,""))}}return l;case 0:return wd(a,l,l.type,l.pendingProps,h);case 1:return v=l.type,C=ou(v,l.pendingProps),lu(a,l,v,C,h);case 3:e:{if(Me(l,l.stateNode.containerInfo),a===null)throw Error(r(387));v=l.pendingProps;var R=l.memoizedState;C=R.element,yd(a,l),ji(l,v,null,h);var W=l.memoizedState;if(v=W.cache,I(l,Ct,v),v!==R.cache&&U(l,[Ct],h,!0),Oa(),v=W.element,R.isDehydrated)if(R={element:v,isDehydrated:!1,cache:W.cache},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){l=Mb(a,l,v,h);break e}else if(v!==C){C=Ci(Error(r(424)),l),oo(C),l=Mb(a,l,v,h);break e}else{switch(a=l.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Un=La(a.firstChild),Yt=l,$t=!0,Mr=null,Mi=!0,h=Db(l,null,v,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(hc(),v===C){l=ll(a,l,h);break e}vr(a,l,v,h)}l=l.child}return l;case 26:return Ut(a,l),a===null?(h=Ox(l.type,null,l.pendingProps,null))?l.memoizedState=h:$t||(h=l.type,a=l.pendingProps,v=kc(Ce.current).createElement(h),v[En]=l,v[On]=a,pi(v,h,a),Dr(v),l.stateNode=v):l.memoizedState=Ox(l.type,a.memoizedProps,l.pendingProps,a.memoizedState),null;case 27:return bt(l),a===null&&$t&&(v=l.stateNode=Rx(l.type,l.pendingProps,Ce.current),Yt=l,Mi=!0,C=Un,fa(l.type)?(Dv=C,Un=La(v.firstChild)):Un=C),vr(a,l,l.pendingProps.children,h),Ut(a,l),a===null&&(l.flags|=4194304),l.child;case 5:return a===null&&$t&&((C=v=Un)&&(v=Dx(v,l.type,l.pendingProps,Mi),v!==null?(l.stateNode=v,Yt=l,Un=La(v.firstChild),Mi=!1,C=!0):C=!1),C||gs(l)),bt(l),C=l.type,R=l.pendingProps,W=a!==null?a.memoizedProps:null,v=R.children,Im(C,R)?v=null:W!==null&&Im(C,W)&&(l.flags|=32),l.memoizedState!==null&&(C=R0(a,l,P0,null,null,h),Vd._currentValue=C),Ut(a,l),vr(a,l,v,h),l.child;case 6:return a===null&&$t&&((a=h=Un)&&(h=Nm(h,l.pendingProps,Mi),h!==null?(l.stateNode=h,Yt=l,Un=null,a=!0):a=!1),a||gs(l)),null;case 13:return jb(a,l,h);case 4:return Me(l,l.stateNode.containerInfo),v=l.pendingProps,a===null?l.child=wc(l,null,v,h):vr(a,l,v,h),l.child;case 11:return cm(a,l,l.type,l.pendingProps,h);case 7:return vr(a,l,l.pendingProps,h),l.child;case 8:return vr(a,l,l.pendingProps.children,h),l.child;case 12:return vr(a,l,l.pendingProps.children,h),l.child;case 10:return v=l.pendingProps,I(l,l.type,v.value),vr(a,l,v.children,h),l.child;case 9:return C=l.type._context,v=l.pendingProps.children,de(l),C=ce(C),v=v(C),l.flags|=1,vr(a,l,v,h),l.child;case 14:return dm(a,l,l.type,l.pendingProps,h);case 15:return fm(a,l,l.type,l.pendingProps,h);case 19:return Lb(a,l,h);case 31:return v=l.pendingProps,h=l.mode,v={mode:v.mode,children:v.children},a===null?(h=ah(v,h),h.ref=l.ref,l.child=h,h.return=l,l=h):(h=Ei(a.child,v),h.ref=l.ref,l.child=h,h.return=l,l=h),l;case 22:return ih(a,l,h);case 24:return de(l),v=ce(Ct),a===null?(C=nl(),C===null&&(C=pr,R=jr(),C.pooledCache=R,R.refCount++,R!==null&&(C.pooledCacheLanes|=h),C=R),l.memoizedState={parent:v,cache:C},gc(l),I(l,Ct,C)):((a.lanes&h)!==0&&(yd(a,l),ji(l,null,null,h),Oa()),C=a.memoizedState,R=l.memoizedState,C.parent!==v?(C={parent:v,cache:v},l.memoizedState=C,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=C),I(l,Ct,v)):(v=R.cache,I(l,Ct,v),v!==C.cache&&U(l,[Ct],h,!0))),vr(a,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function ul(a){a.flags|=4}function gm(a,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!mi(l)){if(l=zs.current,l!==null&&((Nn&4194048)===Nn?es!==null:(Nn&62914560)!==Nn&&(Nn&536870912)===0||l!==es))throw vd=E0,lb;a.flags|=8192}}function vm(a,l){l!==null&&(a.flags|=4),a.flags&16384&&(l=a.tag!==22?us():536870912,a.lanes|=l,Pd|=l)}function oh(a,l){if(!$t)switch(a.tailMode){case"hidden":l=a.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?a.tail=null:h.sibling=null;break;case"collapsed":h=a.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function lr(a){var l=a.alternate!==null&&a.alternate.child===a.child,h=0,v=0;if(l)for(var C=a.child;C!==null;)h|=C.lanes|C.childLanes,v|=C.subtreeFlags&65011712,v|=C.flags&65011712,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)h|=C.lanes|C.childLanes,v|=C.subtreeFlags,v|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=v,a.childLanes=h,l}function Bb(a,l,h){var v=l.pendingProps;switch(aa(l),l.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lr(l),null;case 1:return lr(l),null;case 3:return h=l.stateNode,v=null,a!==null&&(v=a.memoizedState.cache),l.memoizedState.cache!==v&&(l.flags|=2048),P(Ct),lt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(a===null||a.child===null)&&(fc(l)?ul(l):a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,$p())),lr(l),null;case 26:return h=l.memoizedState,a===null?(ul(l),h!==null?(lr(l),gm(l,h)):(lr(l),l.flags&=-16777217)):h?h!==a.memoizedState?(ul(l),lr(l),gm(l,h)):(lr(l),l.flags&=-16777217):(a.memoizedProps!==v&&ul(l),lr(l),l.flags&=-16777217),null;case 27:mt(l),h=Ce.current;var C=l.type;if(a!==null&&l.stateNode!=null)a.memoizedProps!==v&&ul(l);else{if(!v){if(l.stateNode===null)throw Error(r(166));return lr(l),null}a=we.current,fc(l)?Up(l):(a=Rx(C,v,h),l.stateNode=a,ul(l))}return lr(l),null;case 5:if(mt(l),h=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==v&&ul(l);else{if(!v){if(l.stateNode===null)throw Error(r(166));return lr(l),null}if(a=we.current,fc(l))Up(l);else{switch(C=kc(Ce.current),a){case 1:a=C.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:a=C.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":a=C.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":a=C.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":a=C.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof v.is=="string"?C.createElement("select",{is:v.is}):C.createElement("select"),v.multiple?a.multiple=!0:v.size&&(a.size=v.size);break;default:a=typeof v.is=="string"?C.createElement(h,{is:v.is}):C.createElement(h)}}a[En]=l,a[On]=v;e:for(C=l.child;C!==null;){if(C.tag===5||C.tag===6)a.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===l)break e;for(;C.sibling===null;){if(C.return===null||C.return===l)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}l.stateNode=a;e:switch(pi(a,h,v),h){case"button":case"input":case"select":case"textarea":a=!!v.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ul(l)}}return lr(l),l.flags&=-16777217,null;case 6:if(a&&l.stateNode!=null)a.memoizedProps!==v&&ul(l);else{if(typeof v!="string"&&l.stateNode===null)throw Error(r(166));if(a=Ce.current,fc(l)){if(a=l.stateNode,h=l.memoizedProps,v=null,C=Yt,C!==null)switch(C.tag){case 27:case 5:v=C.memoizedProps}a[En]=l,a=!!(a.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||wx(a.nodeValue,h)),a||gs(l)}else a=kc(a).createTextNode(v),a[En]=l,l.stateNode=a}return lr(l),null;case 13:if(v=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(C=fc(l),v!==null&&v.dehydrated!==null){if(a===null){if(!C)throw Error(r(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[En]=l}else hc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;lr(l),C=!1}else C=$p(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=C),C=!0;if(!C)return l.flags&256?(fo(l),l):(fo(l),null)}if(fo(l),(l.flags&128)!==0)return l.lanes=h,l;if(h=v!==null,a=a!==null&&a.memoizedState!==null,h){v=l.child,C=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(C=v.alternate.memoizedState.cachePool.pool);var R=null;v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(R=v.memoizedState.cachePool.pool),R!==C&&(v.flags|=2048)}return h!==a&&h&&(l.child.flags|=8192),vm(l,l.updateQueue),lr(l),null;case 4:return lt(),a===null&&wv(l.stateNode.containerInfo),lr(l),null;case 10:return P(l.type),lr(l),null;case 19:if(fe(Lr),C=l.memoizedState,C===null)return lr(l),null;if(v=(l.flags&128)!==0,R=C.rendering,R===null)if(v)oh(C,!1);else{if(Br!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(R=eh(a),R!==null){for(l.flags|=128,oh(C,!1),a=R.updateQueue,l.updateQueue=a,vm(l,a),l.subtreeFlags=0,a=h,h=l.child;h!==null;)cc(h,a),h=h.sibling;return be(Lr,Lr.current&1|2),l.child}a=a.sibling}C.tail!==null&&qe()>Id&&(l.flags|=128,v=!0,oh(C,!1),l.lanes=4194304)}else{if(!v)if(a=eh(R),a!==null){if(l.flags|=128,v=!0,a=a.updateQueue,l.updateQueue=a,vm(l,a),oh(C,!0),C.tail===null&&C.tailMode==="hidden"&&!R.alternate&&!$t)return lr(l),null}else 2*qe()-C.renderingStartTime>Id&&h!==536870912&&(l.flags|=128,v=!0,oh(C,!1),l.lanes=4194304);C.isBackwards?(R.sibling=l.child,l.child=R):(a=C.last,a!==null?a.sibling=R:l.child=R,C.last=R)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=qe(),l.sibling=null,a=Lr.current,be(Lr,v?a&1|2:a&1),l):(lr(l),null);case 22:case 23:return fo(l),k0(),v=l.memoizedState!==null,a!==null?a.memoizedState!==null!==v&&(l.flags|=8192):v&&(l.flags|=8192),v?(h&536870912)!==0&&(l.flags&128)===0&&(lr(l),l.subtreeFlags&6&&(l.flags|=8192)):lr(l),h=l.updateQueue,h!==null&&vm(l,h.retryQueue),h=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),v=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(v=l.memoizedState.cachePool.pool),v!==h&&(l.flags|=2048),a!==null&&fe(ci),null;case 24:return h=null,a!==null&&(h=a.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),P(Ct),lr(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function Fb(a,l){switch(aa(l),l.tag){case 1:return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return P(Ct),lt(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 26:case 27:case 5:return mt(l),null;case 13:if(fo(l),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));hc()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return fe(Lr),null;case 4:return lt(),null;case 10:return P(l.type),null;case 22:case 23:return fo(l),k0(),a!==null&&fe(ci),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 24:return P(Ct),null;case 25:return null;default:return null}}function Ub(a,l){switch(aa(l),l.tag){case 3:P(Ct),lt();break;case 26:case 27:case 5:mt(l);break;case 4:lt();break;case 13:fo(l);break;case 19:fe(Lr);break;case 10:P(l.type);break;case 22:case 23:fo(l),k0(),a!==null&&fe(ci);break;case 24:P(Ct)}}function lh(a,l){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var C=v.next;h=C;do{if((h.tag&a)===a){v=void 0;var R=h.create,W=h.inst;v=R(),W.destroy=v}h=h.next}while(h!==C)}}catch(ne){ur(l,l.return,ne)}}function uu(a,l,h){try{var v=l.updateQueue,C=v!==null?v.lastEffect:null;if(C!==null){var R=C.next;v=R;do{if((v.tag&a)===a){var W=v.inst,ne=W.destroy;if(ne!==void 0){W.destroy=void 0,C=l;var ve=h,Ie=ne;try{Ie()}catch(Qe){ur(C,ve,Qe)}}}v=v.next}while(v!==R)}}catch(Qe){ur(l,l.return,Qe)}}function zb(a){var l=a.updateQueue;if(l!==null){var h=a.stateNode;try{D0(l,h)}catch(v){ur(a,a.return,v)}}}function nv(a,l,h){h.props=ou(a.type,a.memoizedProps),h.state=a.memoizedState;try{h.componentWillUnmount()}catch(v){ur(a,l,v)}}function Cd(a,l){try{var h=a.ref;if(h!==null){switch(a.tag){case 26:case 27:case 5:var v=a.stateNode;break;case 30:v=a.stateNode;break;default:v=a.stateNode}typeof h=="function"?a.refCleanup=h(v):h.current=v}}catch(C){ur(a,l,C)}}function po(a,l){var h=a.ref,v=a.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(C){ur(a,l,C)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(C){ur(a,l,C)}else h.current=null}function ym(a){var l=a.type,h=a.memoizedProps,v=a.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":h.autoFocus&&v.focus();break e;case"img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet)}}catch(C){ur(a,a.return,C)}}function bm(a,l,h){try{var v=a.stateNode;mS(v,a.type,h,l),v[On]=l}catch(C){ur(a,a.return,C)}}function Ed(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&fa(a.type)||a.tag===4}function uh(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Ed(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&fa(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function xm(a,l,h){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(a,l):(l=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,l.appendChild(a),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=Rm));else if(v!==4&&(v===27&&fa(a.type)&&(h=a.stateNode,l=null),a=a.child,a!==null))for(xm(a,l,h),a=a.sibling;a!==null;)xm(a,l,h),a=a.sibling}function ch(a,l,h){var v=a.tag;if(v===5||v===6)a=a.stateNode,l?h.insertBefore(a,l):h.appendChild(a);else if(v!==4&&(v===27&&fa(a.type)&&(h=a.stateNode),a=a.child,a!==null))for(ch(a,l,h),a=a.sibling;a!==null;)ch(a,l,h),a=a.sibling}function dh(a){var l=a.stateNode,h=a.memoizedProps;try{for(var v=a.type,C=l.attributes;C.length;)l.removeAttributeNode(C[0]);pi(l,v,h),l[En]=a,l[On]=h}catch(R){ur(a,a.return,R)}}var mo=!1,Gn=!1,cl=!1,$b=typeof WeakSet=="function"?WeakSet:Set,fi=null;function tS(a,l){if(a=a.containerInfo,ja=Bm,a=Sr(a),ro(a)){if("selectionStart"in a)var h={start:a.selectionStart,end:a.selectionEnd};else e:{h=(h=a.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var C=v.anchorOffset,R=v.focusNode;v=v.focusOffset;try{h.nodeType,R.nodeType}catch{h=null;break e}var W=0,ne=-1,ve=-1,Ie=0,Qe=0,it=a,je=null;t:for(;;){for(var Oe;it!==h||C!==0&&it.nodeType!==3||(ne=W+C),it!==R||v!==0&&it.nodeType!==3||(ve=W+v),it.nodeType===3&&(W+=it.nodeValue.length),(Oe=it.firstChild)!==null;)je=it,it=Oe;for(;;){if(it===a)break t;if(je===h&&++Ie===C&&(ne=W),je===R&&++Qe===v&&(ve=W),(Oe=it.nextSibling)!==null)break;it=je,je=it.parentNode}it=Oe}h=ne===-1||ve===-1?null:{start:ne,end:ve}}else h=null}h=h||{start:0,end:0}}else h=null;for(Pm={focusedElem:a,selectionRange:h},Bm=!1,fi=l;fi!==null;)if(l=fi,a=l.child,(l.subtreeFlags&1024)!==0&&a!==null)a.return=l,fi=a;else for(;fi!==null;){switch(l=fi,R=l.alternate,a=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((a&1024)!==0&&R!==null){a=void 0,h=l,C=R.memoizedProps,R=R.memoizedState,v=h.stateNode;try{var Gt=ou(h.type,C,h.elementType===h.type);a=v.getSnapshotBeforeUpdate(Gt,R),v.__reactInternalSnapshotBeforeUpdate=a}catch(Vt){ur(h,h.return,Vt)}}break;case 3:if((a&1024)!==0){if(a=l.stateNode.containerInfo,h=a.nodeType,h===9)Av(a);else if(h===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Av(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=l.sibling,a!==null){a.return=l.return,fi=a;break}fi=l.return}}function Vb(a,l,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:cu(a,h),v&4&&lh(5,h);break;case 1:if(cu(a,h),v&4)if(a=h.stateNode,l===null)try{a.componentDidMount()}catch(W){ur(h,h.return,W)}else{var C=ou(h.type,l.memoizedProps);l=l.memoizedState;try{a.componentDidUpdate(C,l,a.__reactInternalSnapshotBeforeUpdate)}catch(W){ur(h,h.return,W)}}v&64&&zb(h),v&512&&Cd(h,h.return);break;case 3:if(cu(a,h),v&64&&(a=h.updateQueue,a!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=h.child.stateNode;break;case 1:l=h.child.stateNode}try{D0(a,l)}catch(W){ur(h,h.return,W)}}break;case 27:l===null&&v&4&&dh(h);case 26:case 5:cu(a,h),l===null&&v&4&&ym(h),v&512&&Cd(h,h.return);break;case 12:cu(a,h);break;case 13:cu(a,h),v&4&&Gb(a,h),v&64&&(a=h.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(h=Cm.bind(null,h),Bd(a,h))));break;case 22:if(v=h.memoizedState!==null||mo,!v){l=l!==null&&l.memoizedState!==null||Gn,C=mo;var R=Gn;mo=v,(Gn=l)&&!R?fl(a,h,(h.subtreeFlags&8772)!==0):cu(a,h),mo=C,Gn=R}break;case 30:break;default:cu(a,h)}}function Hb(a){var l=a.alternate;l!==null&&(a.alternate=null,Hb(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&_n(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Tr=null,_s=!1;function dl(a,l,h){for(h=h.child;h!==null;)qb(a,l,h),h=h.sibling}function qb(a,l,h){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(qt,h)}catch{}switch(h.tag){case 26:Gn||po(h,l),dl(a,l,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Gn||po(h,l);var v=Tr,C=_s;fa(h.type)&&(Tr=h.stateNode,_s=!1),dl(a,l,h),Sh(h.stateNode),Tr=v,_s=C;break;case 5:Gn||po(h,l);case 6:if(v=Tr,C=_s,Tr=null,dl(a,l,h),Tr=v,_s=C,Tr!==null)if(_s)try{(Tr.nodeType===9?Tr.body:Tr.nodeName==="HTML"?Tr.ownerDocument.body:Tr).removeChild(h.stateNode)}catch(R){ur(h,l,R)}else try{Tr.removeChild(h.stateNode)}catch(R){ur(h,l,R)}break;case 18:Tr!==null&&(_s?(a=Tr,Om(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,h.stateNode),Rh(a)):Om(Tr,h.stateNode));break;case 4:v=Tr,C=_s,Tr=h.stateNode.containerInfo,_s=!0,dl(a,l,h),Tr=v,_s=C;break;case 0:case 11:case 14:case 15:Gn||uu(2,h,l),Gn||uu(4,h,l),dl(a,l,h);break;case 1:Gn||(po(h,l),v=h.stateNode,typeof v.componentWillUnmount=="function"&&nv(h,l,v)),dl(a,l,h);break;case 21:dl(a,l,h);break;case 22:Gn=(v=Gn)||h.memoizedState!==null,dl(a,l,h),Gn=v;break;default:dl(a,l,h)}}function Gb(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Rh(a)}catch(h){ur(l,l.return,h)}}function nS(a){switch(a.tag){case 13:case 19:var l=a.stateNode;return l===null&&(l=a.stateNode=new $b),l;case 22:return a=a.stateNode,l=a._retryCache,l===null&&(l=a._retryCache=new $b),l;default:throw Error(r(435,a.tag))}}function rv(a,l){var h=nS(a);l.forEach(function(v){var C=lS.bind(null,a,v);h.has(v)||(h.add(v),v.then(C,C))})}function $s(a,l){var h=l.deletions;if(h!==null)for(var v=0;v<h.length;v++){var C=h[v],R=a,W=l,ne=W;e:for(;ne!==null;){switch(ne.tag){case 27:if(fa(ne.type)){Tr=ne.stateNode,_s=!1;break e}break;case 5:Tr=ne.stateNode,_s=!1;break e;case 3:case 4:Tr=ne.stateNode.containerInfo,_s=!0;break e}ne=ne.return}if(Tr===null)throw Error(r(160));qb(R,W,C),Tr=null,_s=!1,R=C.alternate,R!==null&&(R.return=null),C.return=null}if(l.subtreeFlags&13878)for(l=l.child;l!==null;)iv(l,a),l=l.sibling}var ca=null;function iv(a,l){var h=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:$s(l,a),Ss(a),v&4&&(uu(3,a,a.return),lh(3,a),uu(5,a,a.return));break;case 1:$s(l,a),Ss(a),v&512&&(Gn||h===null||po(h,h.return)),v&64&&mo&&(a=a.updateQueue,a!==null&&(v=a.callbacks,v!==null&&(h=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var C=ca;if($s(l,a),Ss(a),v&512&&(Gn||h===null||po(h,h.return)),v&4){var R=h!==null?h.memoizedState:null;if(v=a.memoizedState,h===null)if(v===null)if(a.stateNode===null){e:{v=a.type,h=a.memoizedProps,C=C.ownerDocument||C;t:switch(v){case"title":R=C.getElementsByTagName("title")[0],(!R||R[Zn]||R[En]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=C.createElement(v),C.head.insertBefore(R,C.querySelector("head > title"))),pi(R,v,h),R[En]=a,Dr(R),v=R;break e;case"link":var W=jx("link","href",C).get(v+(h.href||""));if(W){for(var ne=0;ne<W.length;ne++)if(R=W[ne],R.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&R.getAttribute("rel")===(h.rel==null?null:h.rel)&&R.getAttribute("title")===(h.title==null?null:h.title)&&R.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){W.splice(ne,1);break t}}R=C.createElement(v),pi(R,v,h),C.head.appendChild(R);break;case"meta":if(W=jx("meta","content",C).get(v+(h.content||""))){for(ne=0;ne<W.length;ne++)if(R=W[ne],R.getAttribute("content")===(h.content==null?null:""+h.content)&&R.getAttribute("name")===(h.name==null?null:h.name)&&R.getAttribute("property")===(h.property==null?null:h.property)&&R.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&R.getAttribute("charset")===(h.charSet==null?null:h.charSet)){W.splice(ne,1);break t}}R=C.createElement(v),pi(R,v,h),C.head.appendChild(R);break;default:throw Error(r(468,v))}R[En]=a,Dr(R),v=R}a.stateNode=v}else Lx(C,a.type,a.stateNode);else a.stateNode=Mx(C,v,a.memoizedProps);else R!==v?(R===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):R.count--,v===null?Lx(C,a.type,a.stateNode):Mx(C,v,a.memoizedProps)):v===null&&a.stateNode!==null&&bm(a,a.memoizedProps,h.memoizedProps)}break;case 27:$s(l,a),Ss(a),v&512&&(Gn||h===null||po(h,h.return)),h!==null&&v&4&&bm(a,a.memoizedProps,h.memoizedProps);break;case 5:if($s(l,a),Ss(a),v&512&&(Gn||h===null||po(h,h.return)),a.flags&32){C=a.stateNode;try{Ms(C,"")}catch(Oe){ur(a,a.return,Oe)}}v&4&&a.stateNode!=null&&(C=a.memoizedProps,bm(a,C,h!==null?h.memoizedProps:C)),v&1024&&(cl=!0);break;case 6:if($s(l,a),Ss(a),v&4){if(a.stateNode===null)throw Error(r(162));v=a.memoizedProps,h=a.stateNode;try{h.nodeValue=v}catch(Oe){ur(a,a.return,Oe)}}break;case 3:if($d=null,C=ca,ca=ln(l.containerInfo),$s(l,a),ca=C,Ss(a),v&4&&h!==null&&h.memoizedState.isDehydrated)try{Rh(l.containerInfo)}catch(Oe){ur(a,a.return,Oe)}cl&&(cl=!1,Wb(a));break;case 4:v=ca,ca=ln(a.stateNode.containerInfo),$s(l,a),Ss(a),ca=v;break;case 12:$s(l,a),Ss(a);break;case 13:$s(l,a),Ss(a),a.child.flags&8192&&a.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(dv=qe()),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,rv(a,v)));break;case 22:C=a.memoizedState!==null;var ve=h!==null&&h.memoizedState!==null,Ie=mo,Qe=Gn;if(mo=Ie||C,Gn=Qe||ve,$s(l,a),Gn=Qe,mo=Ie,Ss(a),v&8192)e:for(l=a.stateNode,l._visibility=C?l._visibility&-2:l._visibility|1,C&&(h===null||ve||mo||Gn||Ac(a)),h=null,l=a;;){if(l.tag===5||l.tag===26){if(h===null){ve=h=l;try{if(R=ve.stateNode,C)W=R.style,typeof W.setProperty=="function"?W.setProperty("display","none","important"):W.display="none";else{ne=ve.stateNode;var it=ve.memoizedProps.style,je=it!=null&&it.hasOwnProperty("display")?it.display:null;ne.style.display=je==null||typeof je=="boolean"?"":(""+je).trim()}}catch(Oe){ur(ve,ve.return,Oe)}}}else if(l.tag===6){if(h===null){ve=l;try{ve.stateNode.nodeValue=C?"":ve.memoizedProps}catch(Oe){ur(ve,ve.return,Oe)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===a)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}v&4&&(v=a.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,rv(a,h))));break;case 19:$s(l,a),Ss(a),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,rv(a,v)));break;case 30:break;case 21:break;default:$s(l,a),Ss(a)}}function Ss(a){var l=a.flags;if(l&2){try{for(var h,v=a.return;v!==null;){if(Ed(v)){h=v;break}v=v.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var C=h.stateNode,R=uh(a);ch(a,R,C);break;case 5:var W=h.stateNode;h.flags&32&&(Ms(W,""),h.flags&=-33);var ne=uh(a);ch(a,ne,W);break;case 3:case 4:var ve=h.stateNode.containerInfo,Ie=uh(a);xm(a,Ie,ve);break;default:throw Error(r(161))}}catch(Qe){ur(a,a.return,Qe)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function Wb(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var l=a;Wb(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),a=a.sibling}}function cu(a,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Vb(a,l.alternate,l),l=l.sibling}function Ac(a){for(a=a.child;a!==null;){var l=a;switch(l.tag){case 0:case 11:case 14:case 15:uu(4,l,l.return),Ac(l);break;case 1:po(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&nv(l,l.return,h),Ac(l);break;case 27:Sh(l.stateNode);case 26:case 5:po(l,l.return),Ac(l);break;case 22:l.memoizedState===null&&Ac(l);break;case 30:Ac(l);break;default:Ac(l)}a=a.sibling}}function fl(a,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var v=l.alternate,C=a,R=l,W=R.flags;switch(R.tag){case 0:case 11:case 15:fl(C,R,h),lh(4,R);break;case 1:if(fl(C,R,h),v=R,C=v.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(Ie){ur(v,v.return,Ie)}if(v=R,C=v.updateQueue,C!==null){var ne=v.stateNode;try{var ve=C.shared.hiddenCallbacks;if(ve!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ve.length;C++)fb(ve[C],ne)}catch(Ie){ur(v,v.return,Ie)}}h&&W&64&&zb(R),Cd(R,R.return);break;case 27:dh(R);case 26:case 5:fl(C,R,h),h&&v===null&&W&4&&ym(R),Cd(R,R.return);break;case 12:fl(C,R,h);break;case 13:fl(C,R,h),h&&W&4&&Gb(C,R);break;case 22:R.memoizedState===null&&fl(C,R,h),Cd(R,R.return);break;case 30:break;default:fl(C,R,h)}l=l.sibling}}function sv(a,l){var h=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==h&&(a!=null&&a.refCount++,h!=null&&ui(h))}function av(a,l){a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&ui(a))}function go(a,l,h,v){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Xb(a,l,h,v),l=l.sibling}function Xb(a,l,h,v){var C=l.flags;switch(l.tag){case 0:case 11:case 15:go(a,l,h,v),C&2048&&lh(9,l);break;case 1:go(a,l,h,v);break;case 3:go(a,l,h,v),C&2048&&(a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&ui(a)));break;case 12:if(C&2048){go(a,l,h,v),a=l.stateNode;try{var R=l.memoizedProps,W=R.id,ne=R.onPostCommit;typeof ne=="function"&&ne(W,l.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(ve){ur(l,l.return,ve)}}else go(a,l,h,v);break;case 13:go(a,l,h,v);break;case 23:break;case 22:R=l.stateNode,W=l.alternate,l.memoizedState!==null?R._visibility&2?go(a,l,h,v):fh(a,l):R._visibility&2?go(a,l,h,v):(R._visibility|=2,Ad(a,l,h,v,(l.subtreeFlags&10256)!==0)),C&2048&&sv(W,l);break;case 24:go(a,l,h,v),C&2048&&av(l.alternate,l);break;default:go(a,l,h,v)}}function Ad(a,l,h,v,C){for(C=C&&(l.subtreeFlags&10256)!==0,l=l.child;l!==null;){var R=a,W=l,ne=h,ve=v,Ie=W.flags;switch(W.tag){case 0:case 11:case 15:Ad(R,W,ne,ve,C),lh(8,W);break;case 23:break;case 22:var Qe=W.stateNode;W.memoizedState!==null?Qe._visibility&2?Ad(R,W,ne,ve,C):fh(R,W):(Qe._visibility|=2,Ad(R,W,ne,ve,C)),C&&Ie&2048&&sv(W.alternate,W);break;case 24:Ad(R,W,ne,ve,C),C&&Ie&2048&&av(W.alternate,W);break;default:Ad(R,W,ne,ve,C)}l=l.sibling}}function fh(a,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=a,v=l,C=v.flags;switch(v.tag){case 22:fh(h,v),C&2048&&sv(v.alternate,v);break;case 24:fh(h,v),C&2048&&av(v.alternate,v);break;default:fh(h,v)}l=l.sibling}}var Bi=8192;function Dd(a){if(a.subtreeFlags&Bi)for(a=a.child;a!==null;)Yb(a),a=a.sibling}function Yb(a){switch(a.tag){case 26:Dd(a),a.flags&Bi&&a.memoizedState!==null&&AS(ca,a.memoizedState,a.memoizedProps);break;case 5:Dd(a);break;case 3:case 4:var l=ca;ca=ln(a.stateNode.containerInfo),Dd(a),ca=l;break;case 22:a.memoizedState===null&&(l=a.alternate,l!==null&&l.memoizedState!==null?(l=Bi,Bi=16777216,Dd(a),Bi=l):Dd(a));break;default:Dd(a)}}function Kb(a){var l=a.alternate;if(l!==null&&(a=l.child,a!==null)){l.child=null;do l=a.sibling,a.sibling=null,a=l;while(a!==null)}}function kd(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var v=l[h];fi=v,Zb(v,a)}Kb(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Qb(a),a=a.sibling}function Qb(a){switch(a.tag){case 0:case 11:case 15:kd(a),a.flags&2048&&uu(9,a,a.return);break;case 3:kd(a);break;case 12:kd(a);break;case 22:var l=a.stateNode;a.memoizedState!==null&&l._visibility&2&&(a.return===null||a.return.tag!==13)?(l._visibility&=-3,_m(a)):kd(a);break;default:kd(a)}}function _m(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var v=l[h];fi=v,Zb(v,a)}Kb(a)}for(a=a.child;a!==null;){switch(l=a,l.tag){case 0:case 11:case 15:uu(8,l,l.return),_m(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,_m(l));break;default:_m(l)}a=a.sibling}}function Zb(a,l){for(;fi!==null;){var h=fi;switch(h.tag){case 0:case 11:case 15:uu(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:ui(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,fi=v;else e:for(h=a;fi!==null;){v=fi;var C=v.sibling,R=v.return;if(Hb(v),v===h){fi=null;break e}if(C!==null){C.return=R,fi=C;break e}fi=R}}}var rS={getCacheForType:function(a){var l=ce(Ct),h=l.data.get(a);return h===void 0&&(h=a(),l.data.set(a,h)),h}},ov=typeof WeakMap=="function"?WeakMap:Map,Yn=0,pr=null,Tn=null,Nn=0,Kn=0,Vs=null,du=!1,Rd=!1,lv=!1,hl=0,Br=0,fu=0,Dc=0,uv=0,da=0,Pd=0,hh=null,Ts=null,cv=!1,dv=0,Id=1/0,ph=null,hu=null,Ai=0,pu=null,Od=null,Nd=0,fv=0,hv=null,Jb=null,Md=0,pv=null;function Fi(){if((Yn&2)!==0&&Nn!==0)return Nn&-Nn;if(H.T!==null){var a=oa;return a!==0?a:Dm()}return Zt()}function ex(){da===0&&(da=(Nn&536870912)===0||$t?Os():536870912);var a=zs.current;return a!==null&&(a.flags|=32),da}function Hs(a,l,h){(a===pr&&(Kn===2||Kn===9)||a.cancelPendingCommit!==null)&&(jd(a,0),mu(a,Nn,da,!1)),J(a,h),((Yn&2)===0||a!==pr)&&(a===pr&&((Yn&2)===0&&(Dc|=h),Br===4&&mu(a,Nn,da,!1)),vo(a))}function tx(a,l,h){if((Yn&6)!==0)throw Error(r(327));var v=!h&&(l&124)===0&&(l&a.expiredLanes)===0||xr(a,l),C=v?aS(a,l):vv(a,l,!0),R=v;do{if(C===0){Rd&&!v&&mu(a,l,0,!1);break}else{if(h=a.current.alternate,R&&!iS(h)){C=vv(a,l,!1),R=!1;continue}if(C===2){if(R=l,a.errorRecoveryDisabledLanes&R)var W=0;else W=a.pendingLanes&-536870913,W=W!==0?W:W&536870912?536870912:0;if(W!==0){l=W;e:{var ne=a;C=hh;var ve=ne.current.memoizedState.isDehydrated;if(ve&&(jd(ne,W).flags|=256),W=vv(ne,W,!1),W!==2){if(lv&&!ve){ne.errorRecoveryDisabledLanes|=R,Dc|=R,C=4;break e}R=Ts,Ts=C,R!==null&&(Ts===null?Ts=R:Ts.push.apply(Ts,R))}C=W}if(R=!1,C!==2)continue}}if(C===1){jd(a,0),mu(a,l,0,!0);break}e:{switch(v=a,R=C,R){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:mu(v,l,da,!du);break e;case 2:Ts=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(C=dv+300-qe(),10<C)){if(mu(v,l,da,!du),qr(v,0,!0)!==0)break e;v.timeoutHandle=Cx(nx.bind(null,v,h,Ts,ph,cv,l,da,Dc,Pd,du,R,2,-0,0),C);break e}nx(v,h,Ts,ph,cv,l,da,Dc,Pd,du,R,0,-0,0)}}break}while(!0);vo(a)}function nx(a,l,h,v,C,R,W,ne,ve,Ie,Qe,it,je,Oe){if(a.timeoutHandle=-1,it=l.subtreeFlags,(it&8192||(it&16785408)===16785408)&&(xi={stylesheets:null,count:0,unsuspend:ES},Yb(l),it=DS(),it!==null)){a.cancelPendingCommit=it(mh.bind(null,a,l,R,h,v,C,W,ne,ve,Qe,1,je,Oe)),mu(a,R,W,!Ie);return}mh(a,l,R,h,v,C,W,ne,ve)}function iS(a){for(var l=a;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var C=h[v],R=C.getSnapshot;C=C.value;try{if(!Ki(R(),C))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function mu(a,l,h,v){l&=~uv,l&=~Dc,a.suspendedLanes|=l,a.pingedLanes&=~l,v&&(a.warmLanes|=l),v=a.expirationTimes;for(var C=l;0<C;){var R=31-Pt(C),W=1<<R;v[R]=-1,C&=~W}h!==0&&ye(a,h,l)}function Sm(){return(Yn&6)===0?(yh(0),!1):!0}function mv(){if(Tn!==null){if(Kn===0)var a=Tn.return;else a=Tn,_=T=null,Wp(a),di=null,xs=0,a=Tn;for(;a!==null;)Ub(a.alternate,a),a=a.return;Tn=null}}function jd(a,l){var h=a.timeoutHandle;h!==-1&&(a.timeoutHandle=-1,vS(h)),h=a.cancelPendingCommit,h!==null&&(a.cancelPendingCommit=null,h()),mv(),pr=a,Tn=h=Ei(a.current,null),Nn=l,Kn=0,Vs=null,du=!1,Rd=xr(a,l),lv=!1,Pd=da=uv=Dc=fu=Br=0,Ts=hh=null,cv=!1,(l&8)!==0&&(l|=l&32);var v=a.entangledLanes;if(v!==0)for(a=a.entanglements,v&=l;0<v;){var C=31-Pt(v),R=1<<C;l|=a[C],v&=~R}return hl=l,Yo(),h}function rx(a,l){vn=null,H.H=Zf,l===Ji||l===Hp?(l=cb(),Kn=3):l===lb?(l=cb(),Kn=4):Kn=l===Nb?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Vs=l,Tn===null&&(Br=1,rh(a,Ci(l,a.current)))}function ix(){var a=H.H;return H.H=Zf,a===null?Zf:a}function sx(){var a=H.A;return H.A=rS,a}function gv(){Br=4,du||(Nn&4194048)!==Nn&&zs.current!==null||(Rd=!0),(fu&134217727)===0&&(Dc&134217727)===0||pr===null||mu(pr,Nn,da,!1)}function vv(a,l,h){var v=Yn;Yn|=2;var C=ix(),R=sx();(pr!==a||Nn!==l)&&(ph=null,jd(a,l)),l=!1;var W=Br;e:do try{if(Kn!==0&&Tn!==null){var ne=Tn,ve=Vs;switch(Kn){case 8:mv(),W=6;break e;case 3:case 2:case 9:case 6:zs.current===null&&(l=!0);var Ie=Kn;if(Kn=0,Vs=null,Ld(a,ne,ve,Ie),h&&Rd){W=0;break e}break;default:Ie=Kn,Kn=0,Vs=null,Ld(a,ne,ve,Ie)}}sS(),W=Br;break}catch(Qe){rx(a,Qe)}while(!0);return l&&a.shellSuspendCounter++,_=T=null,Yn=v,H.H=C,H.A=R,Tn===null&&(pr=null,Nn=0,Yo()),W}function sS(){for(;Tn!==null;)yv(Tn)}function aS(a,l){var h=Yn;Yn|=2;var v=ix(),C=sx();pr!==a||Nn!==l?(ph=null,Id=qe()+500,jd(a,l)):Rd=xr(a,l);e:do try{if(Kn!==0&&Tn!==null){l=Tn;var R=Vs;t:switch(Kn){case 1:Kn=0,Vs=null,Ld(a,l,R,1);break;case 2:case 9:if(ub(R)){Kn=0,Vs=null,ox(l);break}l=function(){Kn!==2&&Kn!==9||pr!==a||(Kn=7),vo(a)},R.then(l,l);break e;case 3:Kn=7;break e;case 4:Kn=5;break e;case 7:ub(R)?(Kn=0,Vs=null,ox(l)):(Kn=0,Vs=null,Ld(a,l,R,7));break;case 5:var W=null;switch(Tn.tag){case 26:W=Tn.memoizedState;case 5:case 27:var ne=Tn;if(!W||mi(W)){Kn=0,Vs=null;var ve=ne.sibling;if(ve!==null)Tn=ve;else{var Ie=ne.return;Ie!==null?(Tn=Ie,Tm(Ie)):Tn=null}break t}}Kn=0,Vs=null,Ld(a,l,R,5);break;case 6:Kn=0,Vs=null,Ld(a,l,R,6);break;case 8:mv(),Br=6;break e;default:throw Error(r(462))}}ax();break}catch(Qe){rx(a,Qe)}while(!0);return _=T=null,H.H=v,H.A=C,Yn=h,Tn!==null?0:(pr=null,Nn=0,Yo(),Br)}function ax(){for(;Tn!==null&&!wt();)yv(Tn)}function yv(a){var l=mm(a.alternate,a,hl);a.memoizedProps=a.pendingProps,l===null?Tm(a):Tn=l}function ox(a){var l=a,h=l.alternate;switch(l.tag){case 15:case 0:l=hm(h,l,l.pendingProps,l.type,void 0,Nn);break;case 11:l=hm(h,l,l.pendingProps,l.type.render,l.ref,Nn);break;case 5:Wp(l);default:Ub(h,l),l=Tn=cc(l,hl),l=mm(h,l,hl)}a.memoizedProps=a.pendingProps,l===null?Tm(a):Tn=l}function Ld(a,l,h,v){_=T=null,Wp(l),di=null,xs=0;var C=l.return;try{if(Ob(a,C,l,h,Nn)){Br=1,rh(a,Ci(h,a.current)),Tn=null;return}}catch(R){if(C!==null)throw Tn=C,R;Br=1,rh(a,Ci(h,a.current)),Tn=null;return}l.flags&32768?($t||v===1?a=!0:Rd||(Nn&536870912)!==0?a=!1:(du=a=!0,(v===2||v===9||v===3||v===6)&&(v=zs.current,v!==null&&v.tag===13&&(v.flags|=16384))),lx(l,a)):Tm(l)}function Tm(a){var l=a;do{if((l.flags&32768)!==0){lx(l,du);return}a=l.return;var h=Bb(l.alternate,l,hl);if(h!==null){Tn=h;return}if(l=l.sibling,l!==null){Tn=l;return}Tn=l=a}while(l!==null);Br===0&&(Br=5)}function lx(a,l){do{var h=Fb(a.alternate,a);if(h!==null){h.flags&=32767,Tn=h;return}if(h=a.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(a=a.sibling,a!==null)){Tn=a;return}Tn=a=h}while(a!==null);Br=6,Tn=null}function mh(a,l,h,v,C,R,W,ne,ve){a.cancelPendingCommit=null;do wm();while(Ai!==0);if((Yn&6)!==0)throw Error(r(327));if(l!==null){if(l===a.current)throw Error(r(177));if(R=l.lanes|l.childLanes,R|=Lf,re(a,h,R,W,ne,ve),a===pr&&(Tn=pr=null,Nn=0),Od=l,pu=a,Nd=h,fv=R,hv=C,Jb=v,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,gx(he,function(){return hx(),null})):(a.callbackNode=null,a.callbackPriority=0),v=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||v){v=H.T,H.T=null,C=te.p,te.p=2,W=Yn,Yn|=4;try{tS(a,l,h)}finally{Yn=W,te.p=C,H.T=v}}Ai=1,ux(),cx(),dx()}}function ux(){if(Ai===1){Ai=0;var a=pu,l=Od,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=H.T,H.T=null;var v=te.p;te.p=2;var C=Yn;Yn|=4;try{iv(l,a);var R=Pm,W=Sr(a.containerInfo),ne=R.focusedElem,ve=R.selectionRange;if(W!==ne&&ne&&ne.ownerDocument&&Kl(ne.ownerDocument.documentElement,ne)){if(ve!==null&&ro(ne)){var Ie=ve.start,Qe=ve.end;if(Qe===void 0&&(Qe=Ie),"selectionStart"in ne)ne.selectionStart=Ie,ne.selectionEnd=Math.min(Qe,ne.value.length);else{var it=ne.ownerDocument||document,je=it&&it.defaultView||window;if(je.getSelection){var Oe=je.getSelection(),Gt=ne.textContent.length,Vt=Math.min(ve.start,Gt),er=ve.end===void 0?Vt:Math.min(ve.end,Gt);!Oe.extend&&Vt>er&&(W=er,er=Vt,Vt=W);var De=Yl(ne,Vt),_e=Yl(ne,er);if(De&&_e&&(Oe.rangeCount!==1||Oe.anchorNode!==De.node||Oe.anchorOffset!==De.offset||Oe.focusNode!==_e.node||Oe.focusOffset!==_e.offset)){var Pe=it.createRange();Pe.setStart(De.node,De.offset),Oe.removeAllRanges(),Vt>er?(Oe.addRange(Pe),Oe.extend(_e.node,_e.offset)):(Pe.setEnd(_e.node,_e.offset),Oe.addRange(Pe))}}}}for(it=[],Oe=ne;Oe=Oe.parentNode;)Oe.nodeType===1&&it.push({element:Oe,left:Oe.scrollLeft,top:Oe.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;ne<it.length;ne++){var Je=it[ne];Je.element.scrollLeft=Je.left,Je.element.scrollTop=Je.top}}Bm=!!ja,Pm=ja=null}finally{Yn=C,te.p=v,H.T=h}}a.current=l,Ai=2}}function cx(){if(Ai===2){Ai=0;var a=pu,l=Od,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=H.T,H.T=null;var v=te.p;te.p=2;var C=Yn;Yn|=4;try{Vb(a,l.alternate,l)}finally{Yn=C,te.p=v,H.T=h}}Ai=3}}function dx(){if(Ai===4||Ai===3){Ai=0,Ot();var a=pu,l=Od,h=Nd,v=Jb;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ai=5:(Ai=0,Od=pu=null,fx(a,a.pendingLanes));var C=a.pendingLanes;if(C===0&&(hu=null),Nt(h),l=l.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(qt,l,void 0,(l.current.flags&128)===128)}catch{}if(v!==null){l=H.T,C=te.p,te.p=2,H.T=null;try{for(var R=a.onRecoverableError,W=0;W<v.length;W++){var ne=v[W];R(ne.value,{componentStack:ne.stack})}}finally{H.T=l,te.p=C}}(Nd&3)!==0&&wm(),vo(a),C=a.pendingLanes,(h&4194090)!==0&&(C&42)!==0?a===pv?Md++:(Md=0,pv=a):Md=0,yh(0)}}function fx(a,l){(a.pooledCacheLanes&=l)===0&&(l=a.pooledCache,l!=null&&(a.pooledCache=null,ui(l)))}function wm(a){return ux(),cx(),dx(),hx()}function hx(){if(Ai!==5)return!1;var a=pu,l=fv;fv=0;var h=Nt(Nd),v=H.T,C=te.p;try{te.p=32>h?32:h,H.T=null,h=hv,hv=null;var R=pu,W=Nd;if(Ai=0,Od=pu=null,Nd=0,(Yn&6)!==0)throw Error(r(331));var ne=Yn;if(Yn|=4,Qb(R.current),Xb(R,R.current,W,h),Yn=ne,yh(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(qt,R)}catch{}return!0}finally{te.p=C,H.T=v,fx(a,l)}}function px(a,l,h){l=Ci(h,l),l=um(a.stateNode,l,2),a=rl(a,l,2),a!==null&&(J(a,2),vo(a))}function ur(a,l,h){if(a.tag===3)px(a,a,h);else for(;l!==null;){if(l.tag===3){px(l,a,h);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(hu===null||!hu.has(v))){a=Ci(h,a),h=Q0(2),v=rl(l,h,2),v!==null&&(Ib(h,v,l,a),J(v,2),vo(v));break}}l=l.return}}function bv(a,l,h){var v=a.pingCache;if(v===null){v=a.pingCache=new ov;var C=new Set;v.set(l,C)}else C=v.get(l),C===void 0&&(C=new Set,v.set(l,C));C.has(h)||(lv=!0,C.add(h),a=oS.bind(null,a,l,h),l.then(a,a))}function oS(a,l,h){var v=a.pingCache;v!==null&&v.delete(l),a.pingedLanes|=a.suspendedLanes&h,a.warmLanes&=~h,pr===a&&(Nn&h)===h&&(Br===4||Br===3&&(Nn&62914560)===Nn&&300>qe()-dv?(Yn&2)===0&&jd(a,0):uv|=h,Pd===Nn&&(Pd=0)),vo(a)}function mx(a,l){l===0&&(l=us()),a=Ko(a,l),a!==null&&(J(a,l),vo(a))}function Cm(a){var l=a.memoizedState,h=0;l!==null&&(h=l.retryLane),mx(a,h)}function lS(a,l){var h=0;switch(a.tag){case 13:var v=a.stateNode,C=a.memoizedState;C!==null&&(h=C.retryLane);break;case 19:v=a.stateNode;break;case 22:v=a.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(l),mx(a,h)}function gx(a,l){return Qt(a,l)}var gh=null,gu=null,Em=!1,vh=!1,Am=!1,vu=0;function vo(a){a!==gu&&a.next===null&&(gu===null?gh=gu=a:gu=gu.next=a),vh=!0,Em||(Em=!0,xv())}function yh(a,l){if(!Am&&vh){Am=!0;do for(var h=!1,v=gh;v!==null;){if(a!==0){var C=v.pendingLanes;if(C===0)var R=0;else{var W=v.suspendedLanes,ne=v.pingedLanes;R=(1<<31-Pt(42|a)+1)-1,R&=C&~(W&~ne),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(h=!0,yx(v,R))}else R=Nn,R=qr(v,v===pr?R:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(R&3)===0||xr(v,R)||(h=!0,yx(v,R));v=v.next}while(h);Am=!1}}function uS(){bh()}function bh(){vh=Em=!1;var a=0;vu!==0&&(gS()&&(a=vu),vu=0);for(var l=qe(),h=null,v=gh;v!==null;){var C=v.next,R=xh(v,l);R===0?(v.next=null,h===null?gh=C:h.next=C,C===null&&(gu=h)):(h=v,(a!==0||(R&3)!==0)&&(vh=!0)),v=C}yh(a)}function xh(a,l){for(var h=a.suspendedLanes,v=a.pingedLanes,C=a.expirationTimes,R=a.pendingLanes&-62914561;0<R;){var W=31-Pt(R),ne=1<<W,ve=C[W];ve===-1?((ne&h)===0||(ne&v)!==0)&&(C[W]=Ka(ne,l)):ve<=l&&(a.expiredLanes|=ne),R&=~ne}if(l=pr,h=Nn,h=qr(a,a===l?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v=a.callbackNode,h===0||a===l&&(Kn===2||Kn===9)||a.cancelPendingCommit!==null)return v!==null&&v!==null&&xt(v),a.callbackNode=null,a.callbackPriority=0;if((h&3)===0||xr(a,h)){if(l=h&-h,l===a.callbackPriority)return l;switch(v!==null&&xt(v),Nt(h)){case 2:case 8:h=Xe;break;case 32:h=he;break;case 268435456:h=rt;break;default:h=he}return v=vx.bind(null,a),h=Qt(h,v),a.callbackPriority=l,a.callbackNode=h,l}return v!==null&&v!==null&&xt(v),a.callbackPriority=2,a.callbackNode=null,2}function vx(a,l){if(Ai!==0&&Ai!==5)return a.callbackNode=null,a.callbackPriority=0,null;var h=a.callbackNode;if(wm()&&a.callbackNode!==h)return null;var v=Nn;return v=qr(a,a===pr?v:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v===0?null:(tx(a,v,l),xh(a,qe()),a.callbackNode!=null&&a.callbackNode===h?vx.bind(null,a):null)}function yx(a,l){if(wm())return null;tx(a,l,!0)}function xv(){yS(function(){(Yn&6)!==0?Qt(He,uS):bh()})}function Dm(){return vu===0&&(vu=Os()),vu}function bx(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Yu(""+a)}function xx(a,l){var h=l.ownerDocument.createElement("input");return h.name=l.name,h.value=l.value,a.id&&h.setAttribute("form",a.id),l.parentNode.insertBefore(h,l),a=new FormData(a),h.parentNode.removeChild(h),a}function cS(a,l,h,v,C){if(l==="submit"&&h&&h.stateNode===C){var R=bx((C[On]||null).action),W=v.submitter;W&&(l=(l=W[On]||null)?bx(l.formAction):W.getAttribute("formAction"),l!==null&&(R=l,W=null));var ne=new sd("action","action",null,v,C);a.push({event:ne,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(vu!==0){var ve=W?xx(C,W):new FormData(C);Kf(h,{pending:!0,data:ve,method:C.method,action:R},null,ve)}}else typeof R=="function"&&(ne.preventDefault(),ve=W?xx(C,W):new FormData(C),Kf(h,{pending:!0,data:ve,method:C.method,action:R},R,ve))},currentTarget:C}]})}}for(var _v=0;_v<Mn.length;_v++){var Sv=Mn[_v],dS=Sv.toLowerCase(),fS=Sv[0].toUpperCase()+Sv.slice(1);hs(dS,"on"+fS)}hs(ac,"onAnimationEnd"),hs(fd,"onAnimationIteration"),hs(Zi,"onAnimationStart"),hs("dblclick","onDoubleClick"),hs("focusin","onFocus"),hs("focusout","onBlur"),hs(so,"onTransitionRun"),hs(C0,"onTransitionStart"),hs(Xo,"onTransitionCancel"),hs(Zl,"onTransitionEnd"),No("onMouseEnter",["mouseout","mouseover"]),No("onMouseLeave",["mouseout","mouseover"]),No("onPointerEnter",["pointerout","pointerover"]),No("onPointerLeave",["pointerout","pointerover"]),Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _h="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(" "),hS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_h));function _x(a,l){l=(l&4)!==0;for(var h=0;h<a.length;h++){var v=a[h],C=v.event;v=v.listeners;e:{var R=void 0;if(l)for(var W=v.length-1;0<=W;W--){var ne=v[W],ve=ne.instance,Ie=ne.currentTarget;if(ne=ne.listener,ve!==R&&C.isPropagationStopped())break e;R=ne,C.currentTarget=Ie;try{R(C)}catch(Qe){Cc(Qe)}C.currentTarget=null,R=ve}else for(W=0;W<v.length;W++){if(ne=v[W],ve=ne.instance,Ie=ne.currentTarget,ne=ne.listener,ve!==R&&C.isPropagationStopped())break e;R=ne,C.currentTarget=Ie;try{R(C)}catch(Qe){Cc(Qe)}C.currentTarget=null,R=ve}}}}function wn(a,l){var h=l[Gr];h===void 0&&(h=l[Gr]=new Set);var v=a+"__bubble";h.has(v)||(Sx(l,a,2,!1),h.add(v))}function Tv(a,l,h){var v=0;l&&(v|=4),Sx(h,a,v,l)}var ws="_reactListening"+Math.random().toString(36).slice(2);function wv(a){if(!a[ws]){a[ws]=!0,Tp.forEach(function(h){h!=="selectionchange"&&(hS.has(h)||Tv(h,!1,a),Tv(h,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[ws]||(l[ws]=!0,Tv("selectionchange",!1,l))}}function Sx(a,l,h,v){switch(zx(l)){case 2:var C=PS;break;case 8:C=Hd;break;default:C=Nv}h=C.bind(null,l,h,a),C=void 0,!eo||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(C=!0),v?C!==void 0?a.addEventListener(l,h,{capture:!0,passive:C}):a.addEventListener(l,h,!0):C!==void 0?a.addEventListener(l,h,{passive:C}):a.addEventListener(l,h,!1)}function pl(a,l,h,v,C){var R=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var W=v.tag;if(W===3||W===4){var ne=v.stateNode.containerInfo;if(ne===C)break;if(W===4)for(W=v.return;W!==null;){var ve=W.tag;if((ve===3||ve===4)&&W.stateNode.containerInfo===C)return;W=W.return}for(;ne!==null;){if(W=_r(ne),W===null)return;if(ve=W.tag,ve===5||ve===6||ve===26||ve===27){v=R=W;continue e}ne=ne.parentNode}}v=v.return}Ap(function(){var Ie=R,Qe=wf(h),it=[];e:{var je=oc.get(a);if(je!==void 0){var Oe=sd,Gt=a;switch(a){case"keypress":if(zn(h)===0)break e;case"keydown":case"keyup":Oe=Rf;break;case"focusin":Gt="focus",Oe=od;break;case"focusout":Gt="blur",Oe=od;break;case"beforeblur":case"afterblur":Oe=od;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=js;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=kf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=ec;break;case ac:case fd:case Zi:Oe=Zu;break;case Zl:Oe=qo;break;case"scroll":case"scrollend":Oe=x0;break;case"wheel":Oe=Ip;break;case"copy":case"cut":case"paste":Oe=zl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=ra;break;case"toggle":case"beforetoggle":Oe=tc}var Vt=(l&4)!==0,er=!Vt&&(a==="scroll"||a==="scrollend"),De=Vt?je!==null?je+"Capture":null:je;Vt=[];for(var _e=Ie,Pe;_e!==null;){var Je=_e;if(Pe=Je.stateNode,Je=Je.tag,Je!==5&&Je!==26&&Je!==27||Pe===null||De===null||(Je=Fl(_e,De),Je!=null&&Vt.push(rn(_e,Je,Pe))),er)break;_e=_e.return}0<Vt.length&&(je=new Oe(je,Gt,null,h,Qe),it.push({event:je,listeners:Vt}))}}if((l&7)===0){e:{if(je=a==="mouseover"||a==="pointerover",Oe=a==="mouseout"||a==="pointerout",je&&h!==nd&&(Gt=h.relatedTarget||h.fromElement)&&(_r(Gt)||Gt[dr]))break e;if((Oe||je)&&(je=Qe.window===Qe?Qe:(je=Qe.ownerDocument)?je.defaultView||je.parentWindow:window,Oe?(Gt=h.relatedTarget||h.toElement,Oe=Ie,Gt=Gt?_r(Gt):null,Gt!==null&&(er=s(Gt),Vt=Gt.tag,Gt!==er||Vt!==5&&Vt!==27&&Vt!==6)&&(Gt=null)):(Oe=null,Gt=Ie),Oe!==Gt)){if(Vt=js,Je="onMouseLeave",De="onMouseEnter",_e="mouse",(a==="pointerout"||a==="pointerover")&&(Vt=ra,Je="onPointerLeave",De="onPointerEnter",_e="pointer"),er=Oe==null?je:Wi(Oe),Pe=Gt==null?je:Wi(Gt),je=new Vt(Je,_e+"leave",Oe,h,Qe),je.target=er,je.relatedTarget=Pe,Je=null,_r(Qe)===Ie&&(Vt=new Vt(De,_e+"enter",Gt,h,Qe),Vt.target=Pe,Vt.relatedTarget=er,Je=Vt),er=Je,Oe&&Gt)t:{for(Vt=Oe,De=Gt,_e=0,Pe=Vt;Pe;Pe=hi(Pe))_e++;for(Pe=0,Je=De;Je;Je=hi(Je))Pe++;for(;0<_e-Pe;)Vt=hi(Vt),_e--;for(;0<Pe-_e;)De=hi(De),Pe--;for(;_e--;){if(Vt===De||De!==null&&Vt===De.alternate)break t;Vt=hi(Vt),De=hi(De)}Vt=null}else Vt=null;Oe!==null&&Fr(it,je,Oe,Vt,!1),Gt!==null&&er!==null&&Fr(it,er,Gt,Vt,!0)}}e:{if(je=Ie?Wi(Ie):window,Oe=je.nodeName&&je.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&je.type==="file")var Dt=Mp;else if(Gl(je))if(Nf)Dt=w0;else{Dt=no;var bn=Bp}else Oe=je.nodeName,!Oe||Oe.toLowerCase()!=="input"||je.type!=="checkbox"&&je.type!=="radio"?Ie&&Xu(Ie.elementType)&&(Dt=Mp):Dt=dd;if(Dt&&(Dt=Dt(a,Ie))){Wl(it,Dt,h,Qe);break e}bn&&bn(a,je,Ie),a==="focusout"&&Ie&&je.type==="number"&&Ie.memoizedProps.value!=null&&zo(je,"number",je.value)}switch(bn=Ie?Wi(Ie):window,a){case"focusin":(Gl(bn)||bn.contentEditable==="true")&&(Ql=bn,io=Ie,Te=null);break;case"focusout":Te=io=Ql=null;break;case"mousedown":We=!0;break;case"contextmenu":case"mouseup":case"dragend":We=!1,Ue(it,h,Qe);break;case"selectionchange":if(Mf)break;case"keydown":case"keyup":Ue(it,h,Qe)}var Mt;if(If)e:{switch(a){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else ia?Op(a,h)&&(Wt="onCompositionEnd"):a==="keydown"&&h.keyCode===229&&(Wt="onCompositionStart");Wt&&(ud&&h.locale!=="ko"&&(ia||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&ia&&(Mt=Af()):(ka=Qe,Ef="value"in ka?ka.value:ka.textContent,ia=!0)),bn=km(Ie,Wt),0<bn.length&&(Wt=new fr(Wt,a,null,h,Qe),it.push({event:Wt,listeners:bn}),Mt?Wt.data=Mt:(Mt=ic(h),Mt!==null&&(Wt.data=Mt)))),(Mt=nc?S0(a,h):Np(a,h))&&(Wt=km(Ie,"onBeforeInput"),0<Wt.length&&(bn=new fr("onBeforeInput","beforeinput",null,h,Qe),it.push({event:bn,listeners:Wt}),bn.data=Mt)),cS(it,a,Ie,h,Qe)}_x(it,l)})}function rn(a,l,h){return{instance:a,listener:l,currentTarget:h}}function km(a,l){for(var h=l+"Capture",v=[];a!==null;){var C=a,R=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||R===null||(C=Fl(a,h),C!=null&&v.unshift(rn(a,C,R)),C=Fl(a,l),C!=null&&v.push(rn(a,C,R))),a.tag===3)return v;a=a.return}return[]}function hi(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Fr(a,l,h,v,C){for(var R=l._reactName,W=[];h!==null&&h!==v;){var ne=h,ve=ne.alternate,Ie=ne.stateNode;if(ne=ne.tag,ve!==null&&ve===v)break;ne!==5&&ne!==26&&ne!==27||Ie===null||(ve=Ie,C?(Ie=Fl(h,R),Ie!=null&&W.unshift(rn(h,Ie,ve))):C||(Ie=Fl(h,R),Ie!=null&&W.push(rn(h,Ie,ve)))),h=h.return}W.length!==0&&a.push({event:l,listeners:W})}var pS=/\r\n?/g,yu=/\u0000|\uFFFD/g;function Tx(a){return(typeof a=="string"?a:""+a).replace(pS,`
`).replace(yu,"")}function wx(a,l){return l=Tx(l),Tx(a)===l}function Rm(){}function Jn(a,l,h,v,C,R){switch(h){case"children":typeof v=="string"?l==="body"||l==="textarea"&&v===""||Ms(a,v):(typeof v=="number"||typeof v=="bigint")&&l!=="body"&&Ms(a,""+v);break;case"className":Nl(a,"class",v);break;case"tabIndex":Nl(a,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Nl(a,h,v);break;case"style":Ja(a,v,R);break;case"data":if(l!=="object"){Nl(a,"data",v);break}case"src":case"href":if(v===""&&(l!=="a"||h!=="href")){a.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(h);break}v=Yu(""+v),a.setAttribute(h,v);break;case"action":case"formAction":if(typeof v=="function"){a.setAttribute(h,"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 R=="function"&&(h==="formAction"?(l!=="input"&&Jn(a,l,"name",C.name,C,null),Jn(a,l,"formEncType",C.formEncType,C,null),Jn(a,l,"formMethod",C.formMethod,C,null),Jn(a,l,"formTarget",C.formTarget,C,null)):(Jn(a,l,"encType",C.encType,C,null),Jn(a,l,"method",C.method,C,null),Jn(a,l,"target",C.target,C,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(h);break}v=Yu(""+v),a.setAttribute(h,v);break;case"onClick":v!=null&&(a.onclick=Rm);break;case"onScroll":v!=null&&wn("scroll",a);break;case"onScrollEnd":v!=null&&wn("scrollend",a);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(C.children!=null)throw Error(r(60));a.innerHTML=h}}break;case"multiple":a.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":a.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){a.removeAttribute("xlink:href");break}h=Yu(""+v),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(h,""+v):a.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(h,""):a.removeAttribute(h);break;case"capture":case"download":v===!0?a.setAttribute(h,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(h,v):a.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?a.setAttribute(h,v):a.removeAttribute(h);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?a.removeAttribute(h):a.setAttribute(h,v);break;case"popover":wn("beforetoggle",a),wn("toggle",a),Gu(a,"popover",v);break;case"xlinkActuate":ds(a,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":ds(a,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":ds(a,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":ds(a,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":ds(a,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":ds(a,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":ds(a,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":ds(a,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":ds(a,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Gu(a,"is",v);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=Tf.get(h)||h,Gu(a,h,v))}}function Cv(a,l,h,v,C,R){switch(h){case"style":Ja(a,v,R);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(C.children!=null)throw Error(r(60));a.innerHTML=h}}break;case"children":typeof v=="string"?Ms(a,v):(typeof v=="number"||typeof v=="bigint")&&Ms(a,""+v);break;case"onScroll":v!=null&&wn("scroll",a);break;case"onScrollEnd":v!=null&&wn("scrollend",a);break;case"onClick":v!=null&&(a.onclick=Rm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qa.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(C=h.endsWith("Capture"),l=h.slice(2,C?h.length-7:void 0),R=a[On]||null,R=R!=null?R[h]:null,typeof R=="function"&&a.removeEventListener(l,R,C),typeof v=="function")){typeof R!="function"&&R!==null&&(h in a?a[h]=null:a.hasAttribute(h)&&a.removeAttribute(h)),a.addEventListener(l,v,C);break e}h in a?a[h]=v:v===!0?a.setAttribute(h,""):Gu(a,h,v)}}}function pi(a,l,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wn("error",a),wn("load",a);var v=!1,C=!1,R;for(R in h)if(h.hasOwnProperty(R)){var W=h[R];if(W!=null)switch(R){case"src":v=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Jn(a,l,R,W,h,null)}}C&&Jn(a,l,"srcSet",h.srcSet,h,null),v&&Jn(a,l,"src",h.src,h,null);return;case"input":wn("invalid",a);var ne=R=W=C=null,ve=null,Ie=null;for(v in h)if(h.hasOwnProperty(v)){var Qe=h[v];if(Qe!=null)switch(v){case"name":C=Qe;break;case"type":W=Qe;break;case"checked":ve=Qe;break;case"defaultChecked":Ie=Qe;break;case"value":R=Qe;break;case"defaultValue":ne=Qe;break;case"children":case"dangerouslySetInnerHTML":if(Qe!=null)throw Error(r(137,l));break;default:Jn(a,l,v,Qe,h,null)}}Sf(a,R,ne,ve,Ie,W,C,!1),Zc(a);return;case"select":wn("invalid",a),v=W=R=null;for(C in h)if(h.hasOwnProperty(C)&&(ne=h[C],ne!=null))switch(C){case"value":R=ne;break;case"defaultValue":W=ne;break;case"multiple":v=ne;default:Jn(a,l,C,ne,h,null)}l=R,h=W,a.multiple=!!v,l!=null?Za(a,!!v,l,!1):h!=null&&Za(a,!!v,h,!0);return;case"textarea":wn("invalid",a),R=C=v=null;for(W in h)if(h.hasOwnProperty(W)&&(ne=h[W],ne!=null))switch(W){case"value":v=ne;break;case"defaultValue":C=ne;break;case"children":R=ne;break;case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(91));break;default:Jn(a,l,W,ne,h,null)}ed(a,v,C,R),Zc(a);return;case"option":for(ve in h)if(h.hasOwnProperty(ve)&&(v=h[ve],v!=null))switch(ve){case"selected":a.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Jn(a,l,ve,v,h,null)}return;case"dialog":wn("beforetoggle",a),wn("toggle",a),wn("cancel",a),wn("close",a);break;case"iframe":case"object":wn("load",a);break;case"video":case"audio":for(v=0;v<_h.length;v++)wn(_h[v],a);break;case"image":wn("error",a),wn("load",a);break;case"details":wn("toggle",a);break;case"embed":case"source":case"link":wn("error",a),wn("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ie in h)if(h.hasOwnProperty(Ie)&&(v=h[Ie],v!=null))switch(Ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Jn(a,l,Ie,v,h,null)}return;default:if(Xu(l)){for(Qe in h)h.hasOwnProperty(Qe)&&(v=h[Qe],v!==void 0&&Cv(a,l,Qe,v,h,void 0));return}}for(ne in h)h.hasOwnProperty(ne)&&(v=h[ne],v!=null&&Jn(a,l,ne,v,h,null))}function mS(a,l,h,v){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,R=null,W=null,ne=null,ve=null,Ie=null,Qe=null;for(Oe in h){var it=h[Oe];if(h.hasOwnProperty(Oe)&&it!=null)switch(Oe){case"checked":break;case"value":break;case"defaultValue":ve=it;default:v.hasOwnProperty(Oe)||Jn(a,l,Oe,null,v,it)}}for(var je in v){var Oe=v[je];if(it=h[je],v.hasOwnProperty(je)&&(Oe!=null||it!=null))switch(je){case"type":R=Oe;break;case"name":C=Oe;break;case"checked":Ie=Oe;break;case"defaultChecked":Qe=Oe;break;case"value":W=Oe;break;case"defaultValue":ne=Oe;break;case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(r(137,l));break;default:Oe!==it&&Jn(a,l,je,Oe,v,it)}}Uo(a,W,ne,ve,Ie,Qe,R,C);return;case"select":Oe=W=ne=je=null;for(R in h)if(ve=h[R],h.hasOwnProperty(R)&&ve!=null)switch(R){case"value":break;case"multiple":Oe=ve;default:v.hasOwnProperty(R)||Jn(a,l,R,null,v,ve)}for(C in v)if(R=v[C],ve=h[C],v.hasOwnProperty(C)&&(R!=null||ve!=null))switch(C){case"value":je=R;break;case"defaultValue":ne=R;break;case"multiple":W=R;default:R!==ve&&Jn(a,l,C,R,v,ve)}l=ne,h=W,v=Oe,je!=null?Za(a,!!h,je,!1):!!v!=!!h&&(l!=null?Za(a,!!h,l,!0):Za(a,!!h,h?[]:"",!1));return;case"textarea":Oe=je=null;for(ne in h)if(C=h[ne],h.hasOwnProperty(ne)&&C!=null&&!v.hasOwnProperty(ne))switch(ne){case"value":break;case"children":break;default:Jn(a,l,ne,null,v,C)}for(W in v)if(C=v[W],R=h[W],v.hasOwnProperty(W)&&(C!=null||R!=null))switch(W){case"value":je=C;break;case"defaultValue":Oe=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==R&&Jn(a,l,W,C,v,R)}Xi(a,je,Oe);return;case"option":for(var Gt in h)if(je=h[Gt],h.hasOwnProperty(Gt)&&je!=null&&!v.hasOwnProperty(Gt))switch(Gt){case"selected":a.selected=!1;break;default:Jn(a,l,Gt,null,v,je)}for(ve in v)if(je=v[ve],Oe=h[ve],v.hasOwnProperty(ve)&&je!==Oe&&(je!=null||Oe!=null))switch(ve){case"selected":a.selected=je&&typeof je!="function"&&typeof je!="symbol";break;default:Jn(a,l,ve,je,v,Oe)}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 Vt in h)je=h[Vt],h.hasOwnProperty(Vt)&&je!=null&&!v.hasOwnProperty(Vt)&&Jn(a,l,Vt,null,v,je);for(Ie in v)if(je=v[Ie],Oe=h[Ie],v.hasOwnProperty(Ie)&&je!==Oe&&(je!=null||Oe!=null))switch(Ie){case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(r(137,l));break;default:Jn(a,l,Ie,je,v,Oe)}return;default:if(Xu(l)){for(var er in h)je=h[er],h.hasOwnProperty(er)&&je!==void 0&&!v.hasOwnProperty(er)&&Cv(a,l,er,void 0,v,je);for(Qe in v)je=v[Qe],Oe=h[Qe],!v.hasOwnProperty(Qe)||je===Oe||je===void 0&&Oe===void 0||Cv(a,l,Qe,je,v,Oe);return}}for(var De in h)je=h[De],h.hasOwnProperty(De)&&je!=null&&!v.hasOwnProperty(De)&&Jn(a,l,De,null,v,je);for(it in v)je=v[it],Oe=h[it],!v.hasOwnProperty(it)||je===Oe||je==null&&Oe==null||Jn(a,l,it,je,v,Oe)}var ja=null,Pm=null;function kc(a){return a.nodeType===9?a:a.ownerDocument}function wr(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pr(a,l){if(a===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&l==="foreignObject"?0:a}function Im(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ev=null;function gS(){var a=window.event;return a&&a.type==="popstate"?a===Ev?!1:(Ev=a,!0):(Ev=null,!1)}var Cx=typeof setTimeout=="function"?setTimeout:void 0,vS=typeof clearTimeout=="function"?clearTimeout:void 0,Ex=typeof Promise=="function"?Promise:void 0,yS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex<"u"?function(a){return Ex.resolve(null).then(a).catch(Ax)}:Cx;function Ax(a){setTimeout(function(){throw a})}function fa(a){return a==="head"}function Om(a,l){var h=l,v=0,C=0;do{var R=h.nextSibling;if(a.removeChild(h),R&&R.nodeType===8)if(h=R.data,h==="/$"){if(0<v&&8>v){h=v;var W=a.ownerDocument;if(h&1&&Sh(W.documentElement),h&2&&Sh(W.body),h&4)for(h=W.head,Sh(h),W=h.firstChild;W;){var ne=W.nextSibling,ve=W.nodeName;W[Zn]||ve==="SCRIPT"||ve==="STYLE"||ve==="LINK"&&W.rel.toLowerCase()==="stylesheet"||h.removeChild(W),W=ne}}if(C===0){a.removeChild(R),Rh(l);return}C--}else h==="$"||h==="$?"||h==="$!"?C++:v=h.charCodeAt(0)-48;else v=0;h=R}while(h);Rh(l)}function Av(a){var l=a.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var h=l;switch(l=l.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Av(h),_n(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}a.removeChild(h)}}function Dx(a,l,h,v){for(;a.nodeType===1;){var C=h;if(a.nodeName.toLowerCase()!==l.toLowerCase()){if(!v&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(v){if(!a[Zn])switch(l){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(R=a.getAttribute("rel"),R==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(R!==C.rel||a.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||a.getAttribute("title")!==(C.title==null?null:C.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(R=a.getAttribute("src"),(R!==(C.src==null?null:C.src)||a.getAttribute("type")!==(C.type==null?null:C.type)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&R&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(l==="input"&&a.type==="hidden"){var R=C.name==null?null:""+C.name;if(C.type==="hidden"&&a.getAttribute("name")===R)return a}else return a;if(a=La(a.nextSibling),a===null)break}return null}function Nm(a,l,h){if(l==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!h||(a=La(a.nextSibling),a===null))return null;return a}function ns(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState==="complete"}function Bd(a,l){var h=a.ownerDocument;if(a.data!=="$?"||h.readyState==="complete")l();else{var v=function(){l(),h.removeEventListener("DOMContentLoaded",v)};h.addEventListener("DOMContentLoaded",v),a._reactRetry=v}}function La(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?"||l==="F!"||l==="F")break;if(l==="/$")return null}}return a}var Dv=null;function kx(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var h=a.data;if(h==="$"||h==="$!"||h==="$?"){if(l===0)return a;l--}else h==="/$"&&l++}a=a.previousSibling}return null}function Rx(a,l,h){switch(l=kc(h),a){case"html":if(a=l.documentElement,!a)throw Error(r(452));return a;case"head":if(a=l.head,!a)throw Error(r(453));return a;case"body":if(a=l.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Sh(a){for(var l=a.attributes;l.length;)a.removeAttributeNode(l[0]);_n(a)}var qs=new Map,yo=new Set;function ln(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var bo=te.d;te.d={f:ha,r:Px,D:bS,C:Ix,L:Mm,m:xS,X:SS,S:_S,M:TS};function ha(){var a=bo.f(),l=Sm();return a||l}function Px(a){var l=At(a);l!==null&&l.tag===5&&l.type==="form"?sm(l):bo.r(a)}var Fd=typeof document>"u"?null:document;function Vn(a,l,h){var v=Fd;if(v&&typeof l=="string"&&l){var C=Wr(l);C='link[rel="'+a+'"][href="'+C+'"]',typeof h=="string"&&(C+='[crossorigin="'+h+'"]'),yo.has(C)||(yo.add(C),a={rel:a,crossOrigin:h,href:l},v.querySelector(C)===null&&(l=v.createElement("link"),pi(l,"link",a),Dr(l),v.head.appendChild(l)))}}function bS(a){bo.D(a),Vn("dns-prefetch",a,null)}function Ix(a,l){bo.C(a,l),Vn("preconnect",a,l)}function Mm(a,l,h){bo.L(a,l,h);var v=Fd;if(v&&a&&l){var C='link[rel="preload"][as="'+Wr(l)+'"]';l==="image"&&h&&h.imageSrcSet?(C+='[imagesrcset="'+Wr(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(C+='[imagesizes="'+Wr(h.imageSizes)+'"]')):C+='[href="'+Wr(a)+'"]';var R=C;switch(l){case"style":R=Ud(a);break;case"script":R=zd(a)}qs.has(R)||(a=m({rel:"preload",href:l==="image"&&h&&h.imageSrcSet?void 0:a,as:l},h),qs.set(R,a),v.querySelector(C)!==null||l==="style"&&v.querySelector(Th(R))||l==="script"&&v.querySelector(wh(R))||(l=v.createElement("link"),pi(l,"link",a),Dr(l),v.head.appendChild(l)))}}function xS(a,l){bo.m(a,l);var h=Fd;if(h&&a){var v=l&&typeof l.as=="string"?l.as:"script",C='link[rel="modulepreload"][as="'+Wr(v)+'"][href="'+Wr(a)+'"]',R=C;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=zd(a)}if(!qs.has(R)&&(a=m({rel:"modulepreload",href:a},l),qs.set(R,a),h.querySelector(C)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(wh(R)))return}v=h.createElement("link"),pi(v,"link",a),Dr(v),h.head.appendChild(v)}}}function _S(a,l,h){bo.S(a,l,h);var v=Fd;if(v&&a){var C=Ns(v).hoistableStyles,R=Ud(a);l=l||"default";var W=C.get(R);if(!W){var ne={loading:0,preload:null};if(W=v.querySelector(Th(R)))ne.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":l},h),(h=qs.get(R))&&Ch(a,h);var ve=W=v.createElement("link");Dr(ve),pi(ve,"link",a),ve._p=new Promise(function(Ie,Qe){ve.onload=Ie,ve.onerror=Qe}),ve.addEventListener("load",function(){ne.loading|=1}),ve.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,jm(W,l,v)}W={type:"stylesheet",instance:W,count:1,state:ne},C.set(R,W)}}}function SS(a,l){bo.X(a,l);var h=Fd;if(h&&a){var v=Ns(h).hoistableScripts,C=zd(a),R=v.get(C);R||(R=h.querySelector(wh(C)),R||(a=m({src:a,async:!0},l),(l=qs.get(C))&&kv(a,l),R=h.createElement("script"),Dr(R),pi(R,"link",a),h.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},v.set(C,R))}}function TS(a,l){bo.M(a,l);var h=Fd;if(h&&a){var v=Ns(h).hoistableScripts,C=zd(a),R=v.get(C);R||(R=h.querySelector(wh(C)),R||(a=m({src:a,async:!0,type:"module"},l),(l=qs.get(C))&&kv(a,l),R=h.createElement("script"),Dr(R),pi(R,"link",a),h.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},v.set(C,R))}}function Ox(a,l,h,v){var C=(C=Ce.current)?ln(C):null;if(!C)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(l=Ud(h.href),h=Ns(C).hoistableStyles,v=h.get(l),v||(v={type:"style",instance:null,count:0,state:null},h.set(l,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){a=Ud(h.href);var R=Ns(C).hoistableStyles,W=R.get(a);if(W||(C=C.ownerDocument||C,W={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(a,W),(R=C.querySelector(Th(a)))&&!R._p&&(W.instance=R,W.state.loading=5),qs.has(a)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},qs.set(a,h),R||wS(C,a,h,W.state))),l&&v===null)throw Error(r(528,""));return W}if(l&&v!==null)throw Error(r(529,""));return null;case"script":return l=h.async,h=h.src,typeof h=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=zd(h),h=Ns(C).hoistableScripts,v=h.get(l),v||(v={type:"script",instance:null,count:0,state:null},h.set(l,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Ud(a){return'href="'+Wr(a)+'"'}function Th(a){return'link[rel="stylesheet"]['+a+"]"}function Nx(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function wS(a,l,h,v){a.querySelector('link[rel="preload"][as="style"]['+l+"]")?v.loading=1:(l=a.createElement("link"),v.preload=l,l.addEventListener("load",function(){return v.loading|=1}),l.addEventListener("error",function(){return v.loading|=2}),pi(l,"link",h),Dr(l),a.head.appendChild(l))}function zd(a){return'[src="'+Wr(a)+'"]'}function wh(a){return"script[async]"+a}function Mx(a,l,h){if(l.count++,l.instance===null)switch(l.type){case"style":var v=a.querySelector('style[data-href~="'+Wr(h.href)+'"]');if(v)return l.instance=v,Dr(v),v;var C=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(a.ownerDocument||a).createElement("style"),Dr(v),pi(v,"style",C),jm(v,h.precedence,a),l.instance=v;case"stylesheet":C=Ud(h.href);var R=a.querySelector(Th(C));if(R)return l.state.loading|=4,l.instance=R,Dr(R),R;v=Nx(h),(C=qs.get(C))&&Ch(v,C),R=(a.ownerDocument||a).createElement("link"),Dr(R);var W=R;return W._p=new Promise(function(ne,ve){W.onload=ne,W.onerror=ve}),pi(R,"link",v),l.state.loading|=4,jm(R,h.precedence,a),l.instance=R;case"script":return R=zd(h.src),(C=a.querySelector(wh(R)))?(l.instance=C,Dr(C),C):(v=h,(C=qs.get(R))&&(v=m({},h),kv(v,C)),a=a.ownerDocument||a,C=a.createElement("script"),Dr(C),pi(C,"link",v),a.head.appendChild(C),l.instance=C);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(v=l.instance,l.state.loading|=4,jm(v,h.precedence,a));return l.instance}function jm(a,l,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=v.length?v[v.length-1]:null,R=C,W=0;W<v.length;W++){var ne=v[W];if(ne.dataset.precedence===l)R=ne;else if(R!==C)break}R?R.parentNode.insertBefore(a,R.nextSibling):(l=h.nodeType===9?h.head:h,l.insertBefore(a,l.firstChild))}function Ch(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.title==null&&(a.title=l.title)}function kv(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.integrity==null&&(a.integrity=l.integrity)}var $d=null;function jx(a,l,h){if($d===null){var v=new Map,C=$d=new Map;C.set(h,v)}else C=$d,v=C.get(h),v||(v=new Map,C.set(h,v));if(v.has(a))return v;for(v.set(a,null),h=h.getElementsByTagName(a),C=0;C<h.length;C++){var R=h[C];if(!(R[Zn]||R[En]||a==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var W=R.getAttribute(l)||"";W=a+W;var ne=v.get(W);ne?ne.push(R):v.set(W,[R])}}return v}function Lx(a,l,h){a=a.ownerDocument||a,a.head.insertBefore(h,l==="title"?a.querySelector("head > title"):null)}function CS(a,l,h){if(h===1||l.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return a=l.disabled,typeof l.precedence=="string"&&a==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function mi(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}var xi=null;function ES(){}function AS(a,l,h){if(xi===null)throw Error(r(475));var v=xi;if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var C=Ud(h.href),R=a.querySelector(Th(C));if(R){a=R._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(v.count++,v=Eh.bind(v),a.then(v,v)),l.state.loading|=4,l.instance=R,Dr(R);return}R=a.ownerDocument||a,h=Nx(h),(C=qs.get(C))&&Ch(h,C),R=R.createElement("link"),Dr(R);var W=R;W._p=new Promise(function(ne,ve){W.onload=ne,W.onerror=ve}),pi(R,"link",h),l.instance=R}v.stylesheets===null&&(v.stylesheets=new Map),v.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(v.count++,l=Eh.bind(v),a.addEventListener("load",l),a.addEventListener("error",l))}}function DS(){if(xi===null)throw Error(r(475));var a=xi;return a.stylesheets&&a.count===0&&Rv(a,a.stylesheets),0<a.count?function(l){var h=setTimeout(function(){if(a.stylesheets&&Rv(a,a.stylesheets),a.unsuspend){var v=a.unsuspend;a.unsuspend=null,v()}},6e4);return a.unsuspend=l,function(){a.unsuspend=null,clearTimeout(h)}}:null}function Eh(){if(this.count--,this.count===0){if(this.stylesheets)Rv(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Lm=null;function Rv(a,l){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Lm=new Map,l.forEach(kS,a),Lm=null,Eh.call(a))}function kS(a,l){if(!(l.state.loading&4)){var h=Lm.get(a);if(h)var v=h.get(null);else{h=new Map,Lm.set(a,h);for(var C=a.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<C.length;R++){var W=C[R];(W.nodeName==="LINK"||W.getAttribute("media")!=="not all")&&(h.set(W.dataset.precedence,W),v=W)}v&&h.set(null,v)}C=l.instance,W=C.getAttribute("data-precedence"),R=h.get(W)||v,R===v&&h.set(null,C),h.set(W,C),this.count++,v=Eh.bind(this),C.addEventListener("load",v),C.addEventListener("error",v),R?R.parentNode.insertBefore(C,R.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(C,a.firstChild)),l.state.loading|=4}}var Vd={$$typeof:N,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function RS(a,l,h,v,C,R,W,ne){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=cs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cs(0),this.hiddenUpdates=cs(null),this.identifierPrefix=v,this.onUncaughtError=C,this.onCaughtError=R,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ne,this.incompleteTransitions=new Map}function Bx(a,l,h,v,C,R,W,ne,ve,Ie,Qe,it){return a=new RS(a,l,h,W,ne,ve,Ie,it),l=1,R===!0&&(l|=24),R=Oi(3,null,null,l),a.current=R,R.stateNode=a,l=jr(),l.refCount++,a.pooledCache=l,l.refCount++,R.memoizedState={element:v,isDehydrated:h,cache:l},gc(R),a}function Fx(a){return a?(a=Qo,a):Qo}function Pv(a,l,h,v,C,R){C=Fx(C),v.context===null?v.context=C:v.pendingContext=C,v=ru(l),v.payload={element:h},R=R===void 0?null:R,R!==null&&(v.callback=R),h=rl(a,v,l),h!==null&&(Hs(h,a,l),Ff(h,a,l))}function Iv(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var h=a.retryLane;a.retryLane=h!==0&&h<l?h:l}}function Ov(a,l){Iv(a,l),(a=a.alternate)&&Iv(a,l)}function Ux(a){if(a.tag===13){var l=Ko(a,67108864);l!==null&&Hs(l,a,67108864),Ov(a,67108864)}}var Bm=!0;function PS(a,l,h,v){var C=H.T;H.T=null;var R=te.p;try{te.p=2,Nv(a,l,h,v)}finally{te.p=R,H.T=C}}function Hd(a,l,h,v){var C=H.T;H.T=null;var R=te.p;try{te.p=8,Nv(a,l,h,v)}finally{te.p=R,H.T=C}}function Nv(a,l,h,v){if(Bm){var C=Mv(v);if(C===null)pl(a,l,v,Fm,h),$x(a,v);else if(OS(C,a,l,h,v))v.stopPropagation();else if($x(a,v),l&4&&-1<IS.indexOf(a)){for(;C!==null;){var R=At(C);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var W=kn(R.pendingLanes);if(W!==0){var ne=R;for(ne.pendingLanes|=2,ne.entangledLanes|=2;W;){var ve=1<<31-Pt(W);ne.entanglements[1]|=ve,W&=~ve}vo(R),(Yn&6)===0&&(Id=qe()+500,yh(0))}}break;case 13:ne=Ko(R,2),ne!==null&&Hs(ne,R,2),Sm(),Ov(R,2)}if(R=Mv(v),R===null&&pl(a,l,v,Fm,h),R===C)break;C=R}C!==null&&v.stopPropagation()}else pl(a,l,v,null,h)}}function Mv(a){return a=wf(a),jv(a)}var Fm=null;function jv(a){if(Fm=null,a=_r(a),a!==null){var l=s(a);if(l===null)a=null;else{var h=l.tag;if(h===13){if(a=o(l),a!==null)return a;a=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Fm=a,null}function zx(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Le()){case He:return 2;case Xe:return 8;case he:case Ae:return 32;case rt:return 268435456;default:return 32}default:return 32}}var Um=!1,ml=null,bu=null,xu=null,Ah=new Map,Dh=new Map,_u=[],IS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function $x(a,l){switch(a){case"focusin":case"focusout":ml=null;break;case"dragenter":case"dragleave":bu=null;break;case"mouseover":case"mouseout":xu=null;break;case"pointerover":case"pointerout":Ah.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dh.delete(l.pointerId)}}function kh(a,l,h,v,C,R){return a===null||a.nativeEvent!==R?(a={blockedOn:l,domEventName:h,eventSystemFlags:v,nativeEvent:R,targetContainers:[C]},l!==null&&(l=At(l),l!==null&&Ux(l)),a):(a.eventSystemFlags|=v,l=a.targetContainers,C!==null&&l.indexOf(C)===-1&&l.push(C),a)}function OS(a,l,h,v,C){switch(l){case"focusin":return ml=kh(ml,a,l,h,v,C),!0;case"dragenter":return bu=kh(bu,a,l,h,v,C),!0;case"mouseover":return xu=kh(xu,a,l,h,v,C),!0;case"pointerover":var R=C.pointerId;return Ah.set(R,kh(Ah.get(R)||null,a,l,h,v,C)),!0;case"gotpointercapture":return R=C.pointerId,Dh.set(R,kh(Dh.get(R)||null,a,l,h,v,C)),!0}return!1}function Vx(a){var l=_r(a.target);if(l!==null){var h=s(l);if(h!==null){if(l=h.tag,l===13){if(l=o(h),l!==null){a.blockedOn=l,cr(a.priority,function(){if(h.tag===13){var v=Fi();v=ft(v);var C=Ko(h,v);C!==null&&Hs(C,h,v),Ov(h,v)}});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){a.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}a.blockedOn=null}function zm(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var h=Mv(a.nativeEvent);if(h===null){h=a.nativeEvent;var v=new h.constructor(h.type,h);nd=v,h.target.dispatchEvent(v),nd=null}else return l=At(h),l!==null&&Ux(l),a.blockedOn=h,!1;l.shift()}return!0}function Hx(a,l,h){zm(a)&&h.delete(l)}function NS(){Um=!1,ml!==null&&zm(ml)&&(ml=null),bu!==null&&zm(bu)&&(bu=null),xu!==null&&zm(xu)&&(xu=null),Ah.forEach(Hx),Dh.forEach(Hx)}function $m(a,l){a.blockedOn===l&&(a.blockedOn=null,Um||(Um=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,NS)))}var Vm=null;function qx(a){Vm!==a&&(Vm=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vm===a&&(Vm=null);for(var l=0;l<a.length;l+=3){var h=a[l],v=a[l+1],C=a[l+2];if(typeof v!="function"){if(jv(v||h)===null)continue;break}var R=At(h);R!==null&&(a.splice(l,3),l-=3,Kf(R,{pending:!0,data:C,method:h.method,action:v},v,C))}}))}function Rh(a){function l(ve){return $m(ve,a)}ml!==null&&$m(ml,a),bu!==null&&$m(bu,a),xu!==null&&$m(xu,a),Ah.forEach(l),Dh.forEach(l);for(var h=0;h<_u.length;h++){var v=_u[h];v.blockedOn===a&&(v.blockedOn=null)}for(;0<_u.length&&(h=_u[0],h.blockedOn===null);)Vx(h),h.blockedOn===null&&_u.shift();if(h=(a.ownerDocument||a).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var C=h[v],R=h[v+1],W=C[On]||null;if(typeof R=="function")W||qx(h);else if(W){var ne=null;if(R&&R.hasAttribute("formAction")){if(C=R,W=R[On]||null)ne=W.formAction;else if(jv(C)!==null)continue}else ne=W.action;typeof ne=="function"?h[v+1]=ne:(h.splice(v,3),v-=3),qx(h)}}}function Lv(a){this._internalRoot=a}Hm.prototype.render=Lv.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));var h=l.current,v=Fi();Pv(h,v,a,l,null,null)},Hm.prototype.unmount=Lv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;Pv(a.current,2,null,a,null,null),Sm(),l[dr]=null}};function Hm(a){this._internalRoot=a}Hm.prototype.unstable_scheduleHydration=function(a){if(a){var l=Zt();a={blockedOn:null,target:a,priority:l};for(var h=0;h<_u.length&&l!==0&&l<_u[h].priority;h++);_u.splice(h,0,a),h===0&&Vx(a)}};var Gx=e.version;if(Gx!=="19.1.0")throw Error(r(527,Gx,"19.1.0"));te.findDOMNode=function(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=d(l),a=a!==null?f(a):null,a=a===null?null:a.stateNode,a};var MS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qm.isDisabled&&qm.supportsFiber)try{qt=qm.inject(MS),jt=qm}catch{}}return Fv.createRoot=function(a,l){if(!i(a))throw Error(r(299));var h=!1,v="",C=K0,R=lm,W=Pb,ne=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(C=l.onUncaughtError),l.onCaughtError!==void 0&&(R=l.onCaughtError),l.onRecoverableError!==void 0&&(W=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(ne=l.unstable_transitionCallbacks)),l=Bx(a,1,!1,null,null,h,v,C,R,W,ne,null),a[dr]=l.current,wv(a),new Lv(l)},Fv.hydrateRoot=function(a,l,h){if(!i(a))throw Error(r(299));var v=!1,C="",R=K0,W=lm,ne=Pb,ve=null,Ie=null;return h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(C=h.identifierPrefix),h.onUncaughtError!==void 0&&(R=h.onUncaughtError),h.onCaughtError!==void 0&&(W=h.onCaughtError),h.onRecoverableError!==void 0&&(ne=h.onRecoverableError),h.unstable_transitionCallbacks!==void 0&&(ve=h.unstable_transitionCallbacks),h.formState!==void 0&&(Ie=h.formState)),l=Bx(a,1,!0,l,h??null,v,C,R,W,ne,ve,Ie),l.context=Fx(null),h=l.current,v=Fi(),v=ft(v),C=ru(v),C.callback=null,rl(h,C,v),h=v,l.current.lanes=h,J(l,h),vo(l),a[dr]=l.current,wv(a),new Hm(l)},Fv.version="19.1.0",Fv}var c3;function PL(){if(c3)return zS.exports;c3=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),zS.exports=RL(),zS.exports}var IL=PL();const OL=ko(IL);var ku=function(){return ku=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},ku.apply(this,arguments)};function S5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function NL(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var v1="right-scroll-bar-position",y1="width-before-scroll-bar",ML="with-scroll-bars-hidden",jL="--removed-body-scroll-bar-size";function qS(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function LL(t,e){var n=A.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var BL=typeof window<"u"?A.useLayoutEffect:A.useEffect,d3=new WeakMap;function FL(t,e){var n=LL(null,function(r){return t.forEach(function(i){return qS(i,r)})});return BL(function(){var r=d3.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(u){s.has(u)||qS(u,null)}),s.forEach(function(u){i.has(u)||qS(u,o)})}d3.set(n,t)},[t]),n}function UL(t){return t}function zL(t,e){e===void 0&&(e=UL);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(u){return u!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var u=n;n=[],u.forEach(s),o=n}var d=function(){var m=o;o=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){o.push(m),f()},filter:function(m){return o=o.filter(m),n}}}};return i}function $L(t){t===void 0&&(t={});var e=zL(null);return e.options=ku({async:!0,ssr:!1},t),e}var T5=function(t){var e=t.sideCar,n=S5(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,ku({},n))};T5.isSideCarExport=!0;function VL(t,e){return t.useMedium(e),T5}var w5=$L(),GS=function(){},A_=A.forwardRef(function(t,e){var n=A.useRef(null),r=A.useState({onScrollCapture:GS,onWheelCapture:GS,onTouchMoveCapture:GS}),i=r[0],s=r[1],o=t.forwardProps,u=t.children,d=t.className,f=t.removeScrollBar,m=t.enabled,y=t.shards,x=t.sideCar,b=t.noRelative,w=t.noIsolation,S=t.inert,D=t.allowPinchZoom,k=t.as,O=k===void 0?"div":k,N=t.gapMode,F=S5(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=x,V=FL([n,e]),$=ku(ku({},F),i);return A.createElement(A.Fragment,null,m&&A.createElement(M,{sideCar:w5,removeScrollBar:f,shards:y,noRelative:b,noIsolation:w,inert:S,setCallbacks:s,allowPinchZoom:!!D,lockRef:n,gapMode:N}),o?A.cloneElement(A.Children.only(u),ku(ku({},$),{ref:V})):A.createElement(O,ku({},$,{className:d,ref:V}),u))});A_.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};A_.classNames={fullWidth:y1,zeroRight:v1};var HL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qL(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=HL();return e&&t.setAttribute("nonce",e),t}function GL(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function WL(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var XL=function(){var t=0,e=null;return{add:function(n){t==0&&(e=qL())&&(GL(e,n),WL(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},YL=function(){var t=XL();return function(e,n){A.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},C5=function(){var t=YL(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},KL={left:0,top:0,right:0,gap:0},WS=function(t){return parseInt(t||"",10)||0},QL=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[WS(n),WS(r),WS(i)]},ZL=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return KL;var e=QL(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},JL=C5(),cg="data-scroll-locked",e7=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,u=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(ML,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(u,"px ").concat(r,`;
  }
  body[`).concat(cg,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(u,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(v1,` {
    right: `).concat(u,"px ").concat(r,`;
  }
  
  .`).concat(y1,` {
    margin-right: `).concat(u,"px ").concat(r,`;
  }
  
  .`).concat(v1," .").concat(v1,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(y1," .").concat(y1,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(cg,`] {
    `).concat(jL,": ").concat(u,`px;
  }
`)},f3=function(){var t=parseInt(document.body.getAttribute(cg)||"0",10);return isFinite(t)?t:0},t7=function(){A.useEffect(function(){return document.body.setAttribute(cg,(f3()+1).toString()),function(){var t=f3()-1;t<=0?document.body.removeAttribute(cg):document.body.setAttribute(cg,t.toString())}},[])},n7=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;t7();var s=A.useMemo(function(){return ZL(i)},[i]);return A.createElement(JL,{styles:e7(s,!e,i,n?"":"!important")})},mw=!1;if(typeof window<"u")try{var Wx=Object.defineProperty({},"passive",{get:function(){return mw=!0,!0}});window.addEventListener("test",Wx,Wx),window.removeEventListener("test",Wx,Wx)}catch{mw=!1}var Gm=mw?{passive:!1}:!1,r7=function(t){return t.tagName==="TEXTAREA"},E5=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!r7(t)&&n[e]==="visible")},i7=function(t){return E5(t,"overflowY")},s7=function(t){return E5(t,"overflowX")},h3=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=A5(t,r);if(i){var s=D5(t,r),o=s[1],u=s[2];if(o>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},a7=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},o7=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},A5=function(t,e){return t==="v"?i7(e):s7(e)},D5=function(t,e){return t==="v"?a7(e):o7(e)},l7=function(t,e){return t==="h"&&e==="rtl"?-1:1},u7=function(t,e,n,r,i){var s=l7(t,window.getComputedStyle(e).direction),o=s*r,u=n.target,d=e.contains(u),f=!1,m=o>0,y=0,x=0;do{if(!u)break;var b=D5(t,u),w=b[0],S=b[1],D=b[2],k=S-D-s*w;(w||k)&&A5(t,u)&&(y+=k,x+=w);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!d&&u!==document.body||d&&(e.contains(u)||e===u));return(m&&Math.abs(y)<1||!m&&Math.abs(x)<1)&&(f=!0),f},Xx=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},p3=function(t){return[t.deltaX,t.deltaY]},m3=function(t){return t&&"current"in t?t.current:t},c7=function(t,e){return t[0]===e[0]&&t[1]===e[1]},d7=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},f7=0,Wm=[];function h7(t){var e=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),i=A.useState(f7++)[0],s=A.useState(C5)[0],o=A.useRef(t);A.useEffect(function(){o.current=t},[t]),A.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var S=NL([t.lockRef.current],(t.shards||[]).map(m3),!0).filter(Boolean);return S.forEach(function(D){return D.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(D){return D.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var u=A.useCallback(function(S,D){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!o.current.allowPinchZoom;var k=Xx(S),O=n.current,N="deltaX"in S?S.deltaX:O[0]-k[0],F="deltaY"in S?S.deltaY:O[1]-k[1],M,V=S.target,$=Math.abs(N)>Math.abs(F)?"h":"v";if("touches"in S&&$==="h"&&V.type==="range")return!1;var q=h3($,V);if(!q)return!0;if(q?M=$:(M=$==="v"?"h":"v",q=h3($,V)),!q)return!1;if(!r.current&&"changedTouches"in S&&(N||F)&&(r.current=M),!M)return!0;var B=r.current||M;return u7(B,D,S,B==="h"?N:F)},[]),d=A.useCallback(function(S){var D=S;if(!(!Wm.length||Wm[Wm.length-1]!==s)){var k="deltaY"in D?p3(D):Xx(D),O=e.current.filter(function(M){return M.name===D.type&&(M.target===D.target||D.target===M.shadowParent)&&c7(M.delta,k)})[0];if(O&&O.should){D.cancelable&&D.preventDefault();return}if(!O){var N=(o.current.shards||[]).map(m3).filter(Boolean).filter(function(M){return M.contains(D.target)}),F=N.length>0?u(D,N[0]):!o.current.noIsolation;F&&D.cancelable&&D.preventDefault()}}},[]),f=A.useCallback(function(S,D,k,O){var N={name:S,delta:D,target:k,should:O,shadowParent:p7(k)};e.current.push(N),setTimeout(function(){e.current=e.current.filter(function(F){return F!==N})},1)},[]),m=A.useCallback(function(S){n.current=Xx(S),r.current=void 0},[]),y=A.useCallback(function(S){f(S.type,p3(S),S.target,u(S,t.lockRef.current))},[]),x=A.useCallback(function(S){f(S.type,Xx(S),S.target,u(S,t.lockRef.current))},[]);A.useEffect(function(){return Wm.push(s),t.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",d,Gm),document.addEventListener("touchmove",d,Gm),document.addEventListener("touchstart",m,Gm),function(){Wm=Wm.filter(function(S){return S!==s}),document.removeEventListener("wheel",d,Gm),document.removeEventListener("touchmove",d,Gm),document.removeEventListener("touchstart",m,Gm)}},[]);var b=t.removeScrollBar,w=t.inert;return A.createElement(A.Fragment,null,w?A.createElement(s,{styles:d7(i)}):null,b?A.createElement(n7,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function p7(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const m7=VL(w5,h7);var wg=A.forwardRef(function(t,e){return A.createElement(A_,ku({},t,{ref:e,sideCar:m7}))});wg.classNames=A_.classNames;function Qr(t){return Object.keys(t)}function XS(t){return t&&typeof t=="object"&&!Array.isArray(t)}function IC(t,e){const n={...t},r=e;return XS(t)&&XS(e)&&Object.keys(e).forEach(i=>{XS(r[i])&&i in t?n[i]=IC(n[i],r[i]):n[i]=r[i]}),n}function g7(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function v7(t){return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:t.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function gw(t){const e=v7(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function YS(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function k5(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const i=`${r/16}${t}`;return e?YS(i):i}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(s=>n(s)).join(",");if(r.includes(" "))return r.split(" ").map(s=>n(s)).join(" ");if(r.includes(t))return e?YS(r):r;const i=r.replace("px","");if(!Number.isNaN(Number(i))){const s=`${Number(i)/16}${t}`;return e?YS(s):s}}return r}return n}const Fe=k5("rem",{shouldScale:!0}),I1=k5("em");function qg(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function R5(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(r=>e.test(r))}return!1}function Al(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==A.Fragment:!1}function si(t){const e=A.createContext(null);return[({children:i,value:s})=>c.jsx(e.Provider,{value:s,children:i}),()=>{const i=A.useContext(e);if(i===null)throw new Error(t);return i}]}function pf(t=null){const e=A.createContext(t);return[({children:i,value:s})=>c.jsx(e.Provider,{value:s,children:i}),()=>A.useContext(e)]}function O1(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function N1(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function y7(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function b7(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function x7(t,e,n){return N1(t,n)===N1(e,n)}function OC({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:s="rtl",orientation:o}){return u=>{n?.(u);const d=Array.from(N1(u.currentTarget,t)?.querySelectorAll(e)||[]).filter(w=>x7(u.currentTarget,w,t)),f=d.findIndex(w=>u.currentTarget===w),m=b7(f,d,r),y=y7(f,d,r),x=s==="rtl"?y:m,b=s==="rtl"?m:y;switch(u.key){case"ArrowRight":{o==="horizontal"&&(u.stopPropagation(),u.preventDefault(),d[x].focus(),i&&d[x].click());break}case"ArrowLeft":{o==="horizontal"&&(u.stopPropagation(),u.preventDefault(),d[b].focus(),i&&d[b].click());break}case"ArrowUp":{o==="vertical"&&(u.stopPropagation(),u.preventDefault(),d[y].focus(),i&&d[y].click());break}case"ArrowDown":{o==="vertical"&&(u.stopPropagation(),u.preventDefault(),d[m].focus(),i&&d[m].click());break}case"Home":{u.stopPropagation(),u.preventDefault(),!d[0].disabled&&d[0].focus();break}case"End":{u.stopPropagation(),u.preventDefault();const w=d.length-1;!d[w].disabled&&d[w].focus();break}}}}const _7={app:100,modal:200,popover:300,overlay:400,max:9999};function Gi(t){return _7[t]}const M1=()=>{};function S7(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||M1:n=>{n.key==="Escape"&&(t(n),e.onTrigger?.())}}function Xt(t,e="size",n=!0){if(t!==void 0)return R5(t)?n?Fe(t):t:`var(--${e}-${t})`}function Di(t){return Xt(t,"mantine-spacing")}function nr(t){return t===void 0?"var(--mantine-radius-default)":Xt(t,"mantine-radius")}function ki(t){return Xt(t,"mantine-font-size")}function P5(t){return Xt(t,"mantine-line-height",!1)}function NC(t){if(t)return Xt(t,"mantine-shadow",!1)}function Vi(t,e){return n=>{t?.(n),e?.(n)}}function MC(t,e){return t in e?gw(e[t]):gw(t)}function j1(t,e){const n=t.map(r=>({value:r,px:MC(r,e)}));return n.sort((r,i)=>r.px-i.px),n}function ty(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function T7(t,e,n){return n?Array.from(N1(n,e)?.querySelectorAll(t)||[]).findIndex(r=>r===n):null}function w7(){const[t,e]=A.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function wo(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function L1(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function C7(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:r}=n;if(r!==Object.keys(e).length)return!1;for(let i=0;i<r;i+=1){const s=n[i];if(!(s in e)||t[s]!==e[s]&&!(Number.isNaN(t[s])&&Number.isNaN(e[s])))return!1}return!0}function g3(t){return typeof t!="string"?"":t.charAt(0).toUpperCase()+t.slice(1)}function Fh(t){const e=A.useRef(t);return A.useEffect(()=>{e.current=t}),A.useMemo(()=>(...n)=>e.current?.(...n),[])}function D_(t,e){const n=typeof e=="number"?e:e.delay,r=typeof e=="number"?!1:e.flushOnUnmount,i=Fh(t),s=A.useRef(0),o=A.useRef(()=>{}),u=Object.assign(A.useCallback((...d)=>{window.clearTimeout(s.current);const f=()=>{s.current!==0&&(s.current=0,i(...d))};o.current=f,u.flush=f,s.current=window.setTimeout(f,n)},[i,n]),{flush:o.current});return A.useEffect(()=>()=>{window.clearTimeout(s.current),r&&u.flush()},[u,r]),u}const v3=["mousedown","touchstart"];function E7(t,e,n){const r=A.useRef(null);return A.useEffect(()=>{const i=s=>{const{target:o}=s??{};if(Array.isArray(n)){const u=o?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(o)&&o.tagName!=="HTML";n.every(f=>!!f&&!s.composedPath().includes(f))&&!u&&t()}else r.current&&!r.current.contains(o)&&t()};return(e||v3).forEach(s=>document.addEventListener(s,i)),()=>{(e||v3).forEach(s=>document.removeEventListener(s,i))}},[r,t,n]),r}function A7(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function D7(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function Uh(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=A.useState(n?e:D7(t)),s=A.useRef(null);return A.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(t),i(s.current.matches),A7(s.current,o=>i(o.matches))},[t]),r}function I5(t,e){return Uh("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}const hp=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Ha(t,e){const n=A.useRef(!1);A.useEffect(()=>()=>{n.current=!1},[]),A.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function O5({opened:t,shouldReturnFocus:e=!0}){const n=A.useRef(null),r=()=>{n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&n.current?.focus({preventScroll:!0})};return Ha(()=>{let i=-1;const s=o=>{o.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",s),t?n.current=document.activeElement:e&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",s)}},[t,e]),r}const k7=/input|select|textarea|button|object/,N5="a, input, select, textarea, button, object, [tabindex]";function R7(t){return t.style.display==="none"}function P7(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(R7(n))return!1;n=n.parentNode}return!0}function M5(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function vw(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(M5(t));return(k7.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&P7(t)}function j5(t){const e=M5(t);return(Number.isNaN(e)||e>=0)&&vw(t)}function I7(t){return Array.from(t.querySelectorAll(N5)).filter(j5)}function O7(t,e){const n=I7(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],i=t.getRootNode();let s=r===i.activeElement||t===i.activeElement;const o=i.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(s=n.filter(m=>m.getAttribute("type")==="radio"&&m.getAttribute("name")===o.getAttribute("name")).includes(r)),!s)return;e.preventDefault();const d=n[e.shiftKey?n.length-1:0];d&&d.focus()}function N7(t=!0){const e=A.useRef(null),n=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const o=Array.from(i.querySelectorAll(N5));s=o.find(j5)||o.find(vw)||null,!s&&vw(i)&&(s=i)}s&&s.focus({preventScroll:!0})},r=A.useCallback(i=>{t&&i!==null&&e.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),e.current=i):e.current=null)},[t]);return A.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const i=s=>{s.key==="Tab"&&e.current&&O7(e.current,s)};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t]),r}const M7=t=>(t+1)%1e6;function j7(){const[,t]=A.useReducer(M7,0);return t}const L7=Or.useId||(()=>{});function B7(){const t=L7();return t?`mantine-${t.replace(/:/g,"")}`:""}function ls(t){const e=B7(),[n,r]=A.useState(e);return hp(()=>{r(L1())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function F7(t,e,{autoInvoke:n=!1}={}){const[r,i]=A.useState(!1),s=A.useRef(null),o=A.useRef(null),u=()=>{i(m=>(!m&&(!s.current||s.current===-1)&&(s.current=window.setInterval(o.current,e)),!0))},d=()=>{i(!1),window.clearInterval(s.current||-1),s.current=-1},f=()=>{r?d():u()};return A.useEffect(()=>(o.current=t,r&&u(),d),[t,r,e]),A.useEffect(()=>{n&&u()},[]),{start:u,stop:d,toggle:f,active:r}}function B1(t,e,n){A.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function U7(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function z7(t){try{return t&&JSON.parse(t)}catch{return t}}function $7(t){return{getItem:i=>{try{return window[t].getItem(i)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(i,s)=>{try{window[t].setItem(i,s)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:i=>{try{window[t].removeItem(i)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function L5(t,e){const n=t==="localStorage"?"mantine-local-storage":"mantine-session-storage",{getItem:r,setItem:i,removeItem:s}=$7(t);return function({key:u,defaultValue:d,getInitialValueInEffect:f=!0,sync:m=!0,deserialize:y=z7,serialize:x=b=>U7(b,e)}){const b=A.useCallback(O=>{let N;try{N=typeof window>"u"||!(t in window)||window[t]===null||!!O}catch{N=!0}if(N)return d;const F=r(u);return F!==null?y(F):d},[u,d]),[w,S]=A.useState(b(f)),D=A.useCallback(O=>{O instanceof Function?S(N=>{const F=O(N);return i(u,x(F)),window.dispatchEvent(new CustomEvent(n,{detail:{key:u,value:O(N)}})),F}):(i(u,x(O)),window.dispatchEvent(new CustomEvent(n,{detail:{key:u,value:O}})),S(O))},[u]),k=A.useCallback(()=>{s(u),window.dispatchEvent(new CustomEvent(n,{detail:{key:u,value:d}}))},[]);return B1("storage",O=>{m&&O.storageArea===window[t]&&O.key===u&&S(y(O.newValue??void 0))}),B1(n,O=>{m&&O.detail.key===u&&S(O.detail.value)}),A.useEffect(()=>{d!==void 0&&w===void 0&&D(d)},[d,w,D]),A.useEffect(()=>{const O=b();O!==void 0&&D(O)},[u]),[w===void 0?d:w,D,k]}}function So(t){return L5("localStorage","use-local-storage")(t)}function B5(t){return L5("sessionStorage","use-session-storage")(t)}function Cg(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function F5(...t){const e=new Map;return n=>{if(t.forEach(r=>{const i=Cg(r,n);i&&e.set(r,i)}),e.size>0)return()=>{t.forEach(r=>{const i=e.get(r);i?i():Cg(r,null)}),e.clear()}}}function ei(...t){return A.useCallback(F5(...t),t)}function U5(t){return{x:wo(t.x,0,1),y:wo(t.y,0,1)}}function jC(t,e,n="ltr"){const r=A.useRef(null),i=A.useRef(!1),s=A.useRef(!1),o=A.useRef(0),[u,d]=A.useState(!1);return A.useEffect(()=>{i.current=!0},[]),A.useEffect(()=>{const f=r.current,m=({x:N,y:F})=>{cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{if(i.current&&f){f.style.userSelect="none";const M=f.getBoundingClientRect();if(M.width&&M.height){const V=wo((N-M.left)/M.width,0,1);t({x:n==="ltr"?V:1-V,y:wo((F-M.top)/M.height,0,1)})}}})},y=()=>{document.addEventListener("mousemove",D),document.addEventListener("mouseup",w),document.addEventListener("touchmove",O),document.addEventListener("touchend",w)},x=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",w)},b=()=>{!s.current&&i.current&&(s.current=!0,typeof e?.onScrubStart=="function"&&e.onScrubStart(),d(!0),y())},w=()=>{s.current&&i.current&&(s.current=!1,d(!1),x(),setTimeout(()=>{typeof e?.onScrubEnd=="function"&&e.onScrubEnd()},0))},S=N=>{b(),N.preventDefault(),D(N)},D=N=>m({x:N.clientX,y:N.clientY}),k=N=>{N.cancelable&&N.preventDefault(),b(),O(N)},O=N=>{N.cancelable&&N.preventDefault(),m({x:N.changedTouches[0].clientX,y:N.changedTouches[0].clientY})};return f?.addEventListener("mousedown",S),f?.addEventListener("touchstart",k,{passive:!1}),()=>{f&&(f.removeEventListener("mousedown",S),f.removeEventListener("touchstart",k))}},[n,t]),{ref:r,active:u}}function Zr({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[i,s]=A.useState(e!==void 0?e:n),o=(u,...d)=>{s(u),r?.(u,...d)};return t!==void 0?[t,r,!0]:[i,o,!1]}function qd(t,e){const n=e-t+1;return Array.from({length:n},(r,i)=>i+t)}const Yx="dots";function V7({total:t,siblings:e=1,boundaries:n=1,page:r,initialPage:i=1,onChange:s}){const o=Math.max(Math.trunc(t),0),[u,d]=Zr({value:r,onChange:s,defaultValue:i,finalValue:i}),f=S=>{S<=0?d(1):S>o?d(o):d(S)},m=()=>f(u+1),y=()=>f(u-1),x=()=>f(1),b=()=>f(o);return{range:A.useMemo(()=>{if(e*2+3+n*2>=o)return qd(1,o);const D=Math.max(u-e,n),k=Math.min(u+e,o-n),O=D>n+2,N=k<o-(n+1);if(!O&&N){const F=e*2+n+2;return[...qd(1,F),Yx,...qd(o-(n-1),o)]}if(O&&!N){const F=n+1+2*e;return[...qd(1,n),Yx,...qd(o-F,o)]}return[...qd(1,n),Yx,...qd(D,k),Yx,...qd(o-n+1,o)]},[o,e,u]),active:u,setPage:f,next:m,previous:y,first:x,last:b}}function k_(t,e){return Uh("(prefers-reduced-motion: reduce)",t,e)}const H7={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function q7(t){const e=A.useRef(0),n=A.useRef(null),[r,i]=A.useState(H7),s=A.useMemo(()=>typeof window<"u"?new ResizeObserver(o=>{const u=o[0];u&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{if(n.current){const d=u.borderBoxSize?.[0]||u.contentBoxSize?.[0];if(d){const f=d.inlineSize,m=d.blockSize;i({width:f,height:m,x:u.contentRect.x,y:u.contentRect.y,top:u.contentRect.top,left:u.contentRect.left,bottom:u.contentRect.bottom,right:u.contentRect.right})}else i(u.contentRect)}}))}):null,[]);return A.useEffect(()=>(n.current&&s?.observe(n.current,t),()=>{s?.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[n.current]),[n,r]}function G7(t){const[e,{width:n,height:r}]=q7(t);return{ref:e,width:n,height:r}}function W7(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!C7(t[n],e[n]))return!1;return!0}function X7(t){const e=A.useRef([]),n=A.useRef(0);return W7(e.current,t)||(e.current=t,n.current+=1),[n.current]}function Y7(t,e){A.useEffect(t,X7(e))}function pp(t=!1,e){const{onOpen:n,onClose:r}=e||{},[i,s]=A.useState(t),o=A.useCallback(()=>{s(f=>f||(n?.(),!0))},[n]),u=A.useCallback(()=>{s(f=>f&&(r?.(),!1))},[r]),d=A.useCallback(()=>{i?u():o()},[u,o,i]);return[i,{open:o,close:u,toggle:d}]}function K7(t,e,n={autoInvoke:!1}){const r=A.useRef(null),i=A.useCallback((...o)=>{r.current||(r.current=window.setTimeout(()=>{t(o),r.current=null},e))},[e]),s=A.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return A.useEffect(()=>(n.autoInvoke&&i(),s),[s,i]),{start:i,clear:s}}function Q7(t){const e=A.useRef(void 0);return A.useEffect(()=>{e.current=t},[t]),e.current}function Z7(t,e,n){const r=A.useRef(null),i=A.useRef(null);return A.useEffect(()=>{const s=typeof n=="function"?n():n;return(s||i.current)&&(r.current=new MutationObserver(t),r.current.observe(s||i.current,e)),()=>{r.current?.disconnect()}},[t,e]),i}function J7(){const[t,e]=A.useState(!1);return A.useEffect(()=>e(!0),[]),t}var e8={};function z5(){return typeof process<"u"&&e8?"production":"development"}function y3(t,e){return e.length===0?t:e.reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n)}function R_(t){const e=Or.version;return typeof Or.version!="string"||e.startsWith("18.")?t?.ref:t?.props?.ref}function $5(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=$5(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ii(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=$5(t))&&(r&&(r+=" "),r+=e);return r}const t8={};function n8(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,i])=>{e[r]?e[r]=ii(e[r],i):e[r]=i})}),e}function P_({theme:t,classNames:e,props:n,stylesCtx:r}){const s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o(t,n,r):o||t8);return n8(s)}function F1({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((s,o)=>typeof o=="function"?{...s,...o(t,n,r)}:{...s,...o},{})}const LC=A.createContext(null);function qc(){const t=A.useContext(LC);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function r8(){return qc().cssVariablesResolver}function i8(){return qc().classNamesPrefix}function I_(){return qc().getStyleNonce}function s8(){return qc().withStaticClasses}function a8(){return qc().headless}function o8(){return qc().stylesTransform?.sx}function l8(){return qc().stylesTransform?.styles}function V5(){return qc().env||"default"}function u8(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function c8(t){let e=t.replace("#","");if(e.length===3){const o=e.split("");e=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}if(e.length===8){const o=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:o}}const n=parseInt(e,16),r=n>>16&255,i=n>>8&255,s=n&255;return{r,g:i,b:s,a:1}}function d8(t){const[e,n,r,i]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:i===void 0?1:i}}function f8(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),i=parseInt(n[2],10)/100,s=parseInt(n[3],10)/100,o=n[5]?parseFloat(n[5]):void 0,u=(1-Math.abs(2*s-1))*i,d=r/60,f=u*(1-Math.abs(d%2-1)),m=s-u/2;let y,x,b;return d>=0&&d<1?(y=u,x=f,b=0):d>=1&&d<2?(y=f,x=u,b=0):d>=2&&d<3?(y=0,x=u,b=f):d>=3&&d<4?(y=0,x=f,b=u):d>=4&&d<5?(y=f,x=0,b=u):(y=u,x=0,b=f),{r:Math.round((y+m)*255),g:Math.round((x+m)*255),b:Math.round((b+m)*255),a:o||1}}function BC(t){return u8(t)?c8(t):t.startsWith("rgb")?d8(t):t.startsWith("hsl")?f8(t):{r:0,g:0,b:0,a:1}}function Kx(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:i,a:s}=BC(t),o=1-e,u=d=>Math.round(d*o);return`rgba(${u(n)}, ${u(r)}, ${u(i)}, ${s})`}function vy(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function KS(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function h8(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function p8(t){if(t.startsWith("oklch("))return(h8(t)||0)/100;const{r:e,g:n,b:r}=BC(t),i=e/255,s=n/255,o=r/255,u=KS(i),d=KS(s),f=KS(o);return .2126*u+.7152*d+.0722*f}function Uv(t,e=.179){return t.startsWith("var(")?!1:p8(t)>e}function mf({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Uv(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Uv(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Uv(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,i]=t.split("."),s=i?Number(i):void 0,o=r in e.colors;if(o){const u=s!==void 0?e.colors[r][s]:e.colors[r][vy(e,n||"light")];return{color:r,value:u,shade:s,isThemeColor:o,isLight:Uv(u,e.luminanceThreshold),variable:i?`--mantine-color-${r}-${s}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:o,isLight:Uv(t,e.luminanceThreshold),shade:s,variable:void 0}}function gr(t,e){const n=mf({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function yw(t,e){const n={from:t?.from||e.defaultGradient.from,to:t?.to||e.defaultGradient.to,deg:t?.deg??e.defaultGradient.deg??0},r=gr(n.from,e),i=gr(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Eu(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const s=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${s}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:i}=BC(t);return`rgba(${n}, ${r}, ${i}, ${e})`}const Xm=Eu,m8=({color:t,theme:e,variant:n,gradient:r,autoContrast:i})=>{const s=mf({color:t,theme:e}),o=typeof i=="boolean"?i:e.autoContrast;if(n==="filled"){const u=o&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?s.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:u,border:`${Fe(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${s.shade===9?8:s.shade+1})`,color:u,border:`${Fe(1)} solid transparent`}:{background:t,hover:Kx(t,.1),color:u,border:`${Fe(1)} solid transparent`}}if(n==="light"){if(s.isThemeColor){if(s.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const u=e.colors[s.color][s.shade];return{background:Eu(u,.1),hover:Eu(u,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:Eu(t,.1),hover:Eu(t,.12),color:t,border:`${Fe(1)} solid transparent`}}if(n==="outline")return s.isThemeColor?s.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Fe(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:Eu(e.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${Fe(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:Eu(t,.05),color:t,border:`${Fe(1)} solid ${t}`};if(n==="subtle"){if(s.isThemeColor){if(s.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`};const u=e.colors[s.color][s.shade];return{background:"transparent",hover:Eu(u,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Fe(1)} solid transparent`}}return{background:"transparent",hover:Eu(t,.12),color:t,border:`${Fe(1)} solid transparent`}}return n==="transparent"?s.isThemeColor?s.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Fe(1)} solid transparent`}:n==="white"?s.isThemeColor?s.shade===void 0?{background:"var(--mantine-color-white)",hover:Kx(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Kx(e.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${Fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Kx(e.white,.01),color:t,border:`${Fe(1)} solid transparent`}:n==="gradient"?{background:yw(r,e),hover:yw(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Fe(1)} solid var(--mantine-color-default-border)`}:{}},g8={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},b3="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",FC={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:g8,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:m8,autoContrast:!1,luminanceThreshold:.3,fontFamily:b3,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:b3,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Fe(34),lineHeight:"1.3"},h2:{fontSize:Fe(26),lineHeight:"1.35"},h3:{fontSize:Fe(22),lineHeight:"1.4"},h4:{fontSize:Fe(18),lineHeight:"1.45"},h5:{fontSize:Fe(16),lineHeight:"1.5"},h6:{fontSize:Fe(14),lineHeight:"1.5"}}},fontSizes:{xs:Fe(12),sm:Fe(14),md:Fe(16),lg:Fe(18),xl:Fe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Fe(2),sm:Fe(4),md:Fe(8),lg:Fe(16),xl:Fe(32)},spacing:{xs:Fe(10),sm:Fe(12),md:Fe(16),lg:Fe(20),xl:Fe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), 0 ${Fe(1)} ${Fe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(10)} ${Fe(15)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(7)} ${Fe(7)} ${Fe(-5)}`,md:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(20)} ${Fe(25)} ${Fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Fe(10)} ${Fe(10)} ${Fe(-5)}`,lg:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(28)} ${Fe(23)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(12)} ${Fe(12)} ${Fe(-7)}`,xl:`0 ${Fe(1)} ${Fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Fe(36)} ${Fe(28)} ${Fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Fe(17)} ${Fe(17)} ${Fe(-7)}`},other:{},components:{}};function x3(t){return t==="auto"||t==="dark"||t==="light"}function v8({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return x3(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&x3(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const y8="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",_3="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function QS(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function S3(t){if(!(t.primaryColor in t.colors))throw new Error(y8);if(typeof t.primaryShade=="object"&&(!QS(t.primaryShade.dark)||!QS(t.primaryShade.light)))throw new Error(_3);if(typeof t.primaryShade=="number"&&!QS(t.primaryShade))throw new Error(_3)}function b8(t,e){if(!e)return S3(t),t;const n=IC(t,e);return e.fontFamily&&!e.headings?.fontFamily&&(n.headings.fontFamily=e.fontFamily),S3(n),n}const UC=A.createContext(null),x8=()=>A.useContext(UC)||FC;function ai(){const t=A.useContext(UC);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function H5({theme:t,children:e,inherit:n=!0}){const r=x8(),i=A.useMemo(()=>b8(n?r:FC,t),[t,r,n]);return c.jsx(UC.Provider,{value:i,children:e})}H5.displayName="@mantine/core/MantineThemeProvider";function _8(){const t=ai(),e=I_(),n=Qr(t.breakpoints).reduce((r,i)=>{const s=t.breakpoints[i].includes("px"),o=gw(t.breakpoints[i]),u=s?`${o-.1}px`:I1(o-.1),d=s?`${o}px`:I1(o);return`${r}@media (max-width: ${u}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${d}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return c.jsx("style",{"data-mantine-styles":"classes",nonce:e?.(),dangerouslySetInnerHTML:{__html:n}})}function ZS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function zv(t,e){return(Array.isArray(t)?t:[t]).reduce((r,i)=>`${i}{${r}}`,e)}function S8(t,e){const n=ZS(t.variables),r=n?zv(e,n):"",i=ZS(t.dark),s=ZS(t.light),o=i?zv(e===":host"?`${e}([data-mantine-color-scheme="dark"])`:`${e}[data-mantine-color-scheme="dark"]`,i):"",u=s?zv(e===":host"?`${e}([data-mantine-color-scheme="light"])`:`${e}[data-mantine-color-scheme="light"]`,s):"";return`${r}${o}${u}`}function gf({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&mf({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function T3(t,e){return gf({color:t.colors[t.primaryColor][vy(t,e)],theme:t,autoContrast:null})}function Qx({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:i=!0}){if(!t.colors[e])return{};if(n==="light"){const u=vy(t,"light"),d={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${u})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${u===9?8:u+1})`,[`--mantine-color-${r}-light`]:Xm(t.colors[e][u],.1),[`--mantine-color-${r}-light-hover`]:Xm(t.colors[e][u],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${u})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${u})`,[`--mantine-color-${r}-outline-hover`]:Xm(t.colors[e][u],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...d}:d}const s=vy(t,"dark"),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:Xm(t.colors[e][Math.max(0,s-2)],.15),[`--mantine-color-${r}-light-hover`]:Xm(t.colors[e][Math.max(0,s-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(s-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:Xm(t.colors[e][Math.max(s-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...o}:o}function T8(t){return Array.isArray(t)?t:Array(10).fill(t)}function w8(t){const e=T8(Array.from({length:10}).map((n,r)=>`var(--mantine-color-${t.name}-${r})`));return Object.defineProperty(e,"mantine-virtual-color",{enumerable:!1,writable:!1,configurable:!1,value:!0}),Object.defineProperty(e,"dark",{enumerable:!1,writable:!1,configurable:!1,value:t.dark}),Object.defineProperty(e,"light",{enumerable:!1,writable:!1,configurable:!1,value:t.light}),Object.defineProperty(e,"name",{enumerable:!1,writable:!1,configurable:!1,value:t.name}),e}function C8(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Ym(t,e,n){Qr(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const q5=t=>{const e=vy(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Fe(t.defaultRadius),r={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":T3(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":T3(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};Ym(r.variables,t.breakpoints,"breakpoint"),Ym(r.variables,t.spacing,"spacing"),Ym(r.variables,t.fontSizes,"font-size"),Ym(r.variables,t.lineHeights,"line-height"),Ym(r.variables,t.shadows,"shadow"),Ym(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((s,o)=>{r.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${t.primaryColor}-${o})`}),Qr(t.colors).forEach(s=>{const o=t.colors[s];if(C8(o)){Object.assign(r.light,Qx({theme:t,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,Qx({theme:t,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((u,d)=>{r.variables[`--mantine-color-${s}-${d}`]=u}),Object.assign(r.light,Qx({theme:t,color:s,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,Qx({theme:t,color:s,colorScheme:"dark",withColorValues:!1}))});const i=t.headings.sizes;return Qr(i).forEach(s=>{r.variables[`--mantine-${s}-font-size`]=i[s].fontSize,r.variables[`--mantine-${s}-line-height`]=i[s].lineHeight,r.variables[`--mantine-${s}-font-weight`]=i[s].fontWeight||t.headings.fontWeight}),r};function E8({theme:t,generator:e}){const n=q5(t),r=e?.(t);return r?IC(n,r):n}const JS=q5(FC);function A8(t){const e={variables:{},light:{},dark:{}};return Qr(t.variables).forEach(n=>{JS.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),Qr(t.light).forEach(n=>{JS.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),Qr(t.dark).forEach(n=>{JS.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function D8(t){return`
  ${t}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
  ${t}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
`}function G5({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=ai(),r=I_(),i=r8(),s=E8({theme:n,generator:i}),o=t===":root"&&e,u=o?A8(s):s,d=S8(u,t);return d?c.jsx("style",{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${d}${o?"":D8(t)}`}}):null}G5.displayName="@mantine/CssVariables";function k8(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}function Km(t,e){const n=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,r=t!=="auto"?t:n?"dark":"light";e()?.setAttribute("data-mantine-color-scheme",r)}function R8({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const i=A.useRef(null),[s,o]=A.useState(()=>t.get(e)),u=r||s,d=A.useCallback(m=>{r||(Km(m,n),o(m),t.set(m))},[t.set,u,r]),f=A.useCallback(()=>{o(e),Km(e,n),t.clear()},[t.clear,e]);return A.useEffect(()=>(t.subscribe(d),t.unsubscribe),[t.subscribe,t.unsubscribe]),hp(()=>{Km(t.get(e),n)},[]),A.useEffect(()=>{if(r)return Km(r,n),()=>{};r===void 0&&Km(s,n),typeof window<"u"&&"matchMedia"in window&&(i.current=window.matchMedia("(prefers-color-scheme: dark)"));const m=y=>{s==="auto"&&Km(y.matches?"dark":"light",n)};return i.current?.addEventListener("change",m),()=>i.current?.removeEventListener("change",m)},[s,r]),{colorScheme:u,setColorScheme:d,clearColorScheme:f}}function P8({respectReducedMotion:t,getRootElement:e}){hp(()=>{t&&e()?.setAttribute("data-respect-reduced-motion","true")},[t])}k8();function W5({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:s=!0,withCssVariables:o=!0,cssVariablesSelector:u=":root",classNamesPrefix:d="mantine",colorSchemeManager:f=v8(),defaultColorScheme:m="light",getRootElement:y=()=>document.documentElement,cssVariablesResolver:x,forceColorScheme:b,stylesTransform:w,env:S}){const{colorScheme:D,setColorScheme:k,clearColorScheme:O}=R8({defaultColorScheme:m,forceColorScheme:b,manager:f,getRootElement:y});return P8({respectReducedMotion:t?.respectReducedMotion||!1,getRootElement:y}),c.jsx(LC.Provider,{value:{colorScheme:D,setColorScheme:k,clearColorScheme:O,getRootElement:y,classNamesPrefix:d,getStyleNonce:n,cssVariablesResolver:x,cssVariablesSelector:u,withStaticClasses:r,stylesTransform:w,env:S},children:c.jsxs(H5,{theme:t,children:[o&&c.jsx(G5,{cssVariablesSelector:u,deduplicateCssVariables:s}),i&&c.jsx(_8,{}),e]})})}W5.displayName="@mantine/core/MantineProvider";function zu({classNames:t,styles:e,props:n,stylesCtx:r}){const i=ai();return{resolvedClassNames:P_({theme:i,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:F1({theme:i,styles:e,props:n,stylesCtx:r||void 0})}}const I8={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function O8({theme:t,options:e,unstyled:n}){return ii(e?.focusable&&!n&&(t.focusClassName||I8[t.focusRing]),e?.active&&!n&&t.activeClassName)}function N8({selector:t,stylesCtx:e,options:n,props:r,theme:i}){return P_({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:e})[t]}function w3({selector:t,stylesCtx:e,theme:n,classNames:r,props:i}){return P_({theme:n,classNames:r,props:i,stylesCtx:e})[t]}function M8({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function j8({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function L8({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(i=>`${e}-${i}-${n}`)}function B8({themeName:t,theme:e,selector:n,props:r,stylesCtx:i}){return t.map(s=>P_({theme:e,classNames:e.components[s]?.classNames,props:r,stylesCtx:i})?.[n])}function F8({options:t,classes:e,selector:n,unstyled:r}){return t?.variant&&!r?e[`${n}--${t.variant}`]:void 0}function U8({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:i,classNames:s,classes:o,unstyled:u,className:d,rootSelector:f,props:m,stylesCtx:y,withStaticClasses:x,headless:b,transformedStyles:w}){return ii(O8({theme:t,options:e,unstyled:u||b}),B8({theme:t,themeName:n,selector:r,props:m,stylesCtx:y}),F8({options:e,classes:o,selector:r,unstyled:u}),w3({selector:r,stylesCtx:y,theme:t,classNames:s,props:m}),w3({selector:r,stylesCtx:y,theme:t,classNames:w,props:m}),N8({selector:r,stylesCtx:y,options:e,props:m,theme:t}),M8({rootSelector:f,selector:r,className:d}),j8({selector:r,classes:o,unstyled:u||b}),x&&!b&&L8({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:e?.withStaticClass}),e?.className)}function z8({theme:t,themeName:e,props:n,stylesCtx:r,selector:i}){return e.map(s=>F1({theme:t,styles:t.components[s]?.styles,props:n,stylesCtx:r})[i]).reduce((s,o)=>({...s,...o}),{})}function bw({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...bw({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function $8(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...qg(n[r])}}),e),{})}function V8({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:i,selector:s,themeName:o,headless:u}){return $8([u?{}:e?.(n,r,i),...o.map(d=>n.components?.[d]?.vars?.(n,r,i)),t?.(n,r,i)])?.[s]}function H8({theme:t,themeName:e,selector:n,options:r,props:i,stylesCtx:s,rootSelector:o,styles:u,style:d,vars:f,varsResolver:m,headless:y,withStylesTransform:x}){return{...!x&&z8({theme:t,themeName:e,props:i,stylesCtx:s,selector:n}),...!x&&F1({theme:t,styles:u,props:i,stylesCtx:s})[n],...!x&&F1({theme:t,styles:r?.styles,props:r?.props||i,stylesCtx:s})[n],...V8({theme:t,props:i,stylesCtx:s,vars:f,varsResolver:m,selector:n,themeName:e,headless:y}),...o===n?bw({style:d,theme:t}):null,...bw({style:r?.style,theme:t})}}function q8({props:t,stylesCtx:e,themeName:n}){const r=ai(),i=l8()?.();return{getTransformedStyles:o=>i?[...o.map(d=>i(d,{props:t,theme:r,ctx:e})),...n.map(d=>i(r.components[d]?.styles,{props:t,theme:r,ctx:e}))].filter(Boolean):[],withStylesTransform:!!i}}function vt({name:t,classes:e,props:n,stylesCtx:r,className:i,style:s,rootSelector:o="root",unstyled:u,classNames:d,styles:f,vars:m,varsResolver:y}){const x=ai(),b=i8(),w=s8(),S=a8(),D=(Array.isArray(t)?t:[t]).filter(N=>N),{withStylesTransform:k,getTransformedStyles:O}=q8({props:n,stylesCtx:r,themeName:D});return(N,F)=>({className:U8({theme:x,options:F,themeName:D,selector:N,classNamesPrefix:b,classNames:d,classes:e,unstyled:u,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:w,headless:S,transformedStyles:O([F?.styles,f])}),style:H8({theme:x,themeName:D,selector:N,options:F,props:n,stylesCtx:r,rootSelector:o,styles:f,style:s,vars:m,varsResolver:y,headless:S,withStylesTransform:k})})}function Gg(t,e){return typeof t=="boolean"?t:e.autoContrast}function C3(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function X5({keepTransitions:t}={}){const e=A.useRef(M1),n=A.useRef(-1),r=A.useContext(LC),i=I_(),s=A.useRef(i?.());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const o=y=>{r.setColorScheme(y),e.current=t?()=>{}:C3(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{e.current?.()},10)},u=()=>{r.clearColorScheme(),e.current=t?()=>{}:C3(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{e.current?.()},10)},d=I5("light",{getInitialValueInEffect:!1}),f=r.colorScheme==="auto"?d:r.colorScheme,m=A.useCallback(()=>o(f==="light"?"dark":"light"),[o,f]);return A.useEffect(()=>()=>{e.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:o,clearColorScheme:u,toggleColorScheme:m}}function G8(t,e={getInitialValueInEffect:!0}){const n=I5(t,e),{colorScheme:r}=X5();return r==="auto"?n:r}const W8=({defaultColorScheme:t,localStorageKey:e,forceColorScheme:n})=>n?`document.documentElement.setAttribute("data-mantine-color-scheme", '${n}');`:`try {
  var _colorScheme = window.localStorage.getItem("${e}");
  var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${t}";
  var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
  document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
} catch (e) {}
`;function X8({defaultColorScheme:t="light",localStorageKey:e="mantine-color-scheme-value",forceColorScheme:n,...r}){const i=["light","dark","auto"].includes(t)?t:"light";return c.jsx("script",{...r,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:W8({defaultColorScheme:i,localStorageKey:e,forceColorScheme:n})}})}function Ne(t,e,n){const r=ai(),i=r.components[t]?.defaultProps,s=typeof i=="function"?i(r):i;return{...e,...s,...qg(n)}}const b1=["xs","sm","md","lg","xl"];function Y8(t,e){if(!e)return t.base;let n=b1.indexOf(e);for(;n>=0;){if(b1[n]in t)return t[b1[n]];n-=1}return t.base}function K8(t){return t.findLastIndex(e=>e)}function E3(t,e){const n=ai(),r=Uh(`(min-width: ${n.breakpoints.xs})`,!1,e),i=Uh(`(min-width: ${n.breakpoints.sm})`,!1,e),s=Uh(`(min-width: ${n.breakpoints.md})`,!1,e),o=Uh(`(min-width: ${n.breakpoints.lg})`,!1,e),u=Uh(`(min-width: ${n.breakpoints.xl})`,!1,e),f=K8([r,i,s,o,u]);return Y8(t,b1[f])}function eT(t){return Qr(t).reduce((e,n)=>t[n]!==void 0?`${e}${g7(n)}:${t[n]};`:e,"").trim()}function Q8({selector:t,styles:e,media:n,container:r}){const i=e?eT(e):"",s=Array.isArray(n)?n.map(u=>`@media${u.query}{${t}{${eT(u.styles)}}}`):[],o=Array.isArray(r)?r.map(u=>`@container ${u.query}{${t}{${eT(u.styles)}}}`):[];return`${i?`${t}{${i}}`:""}${s.join("")}${o.join("")}`.trim()}function Iy(t){const e=I_();return c.jsx("style",{"data-mantine-styles":"inline",nonce:e?.(),dangerouslySetInnerHTML:{__html:Q8(t)}})}function mp(t){const{m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:u,me:d,ms:f,p:m,px:y,py:x,pt:b,pb:w,pl:S,pr:D,pe:k,ps:O,bd:N,bg:F,c:M,opacity:V,ff:$,fz:q,fw:B,lts:z,ta:ee,lh:Y,fs:Q,tt:oe,td:ue,w:H,miw:te,maw:Z,h:ie,mih:G,mah:X,bgsz:fe,bgp:be,bgr:we,bga:pe,pos:Ce,top:Ke,left:Me,bottom:lt,right:bt,inset:mt,display:_t,flex:Qt,hiddenFrom:xt,visibleFrom:wt,lightHidden:Ot,darkHidden:qe,sx:Le,...He}=t;return{styleProps:qg({m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:u,me:d,ms:f,p:m,px:y,py:x,pt:b,pb:w,pl:S,pr:D,pe:k,ps:O,bd:N,bg:F,c:M,opacity:V,ff:$,fz:q,fw:B,lts:z,ta:ee,lh:Y,fs:Q,tt:oe,td:ue,w:H,miw:te,maw:Z,h:ie,mih:G,mah:X,bgsz:fe,bgp:be,bgr:we,bga:pe,pos:Ce,top:Ke,left:Me,bottom:lt,right:bt,inset:mt,display:_t,flex:Qt,hiddenFrom:xt,visibleFrom:wt,lightHidden:Ot,darkHidden:qe,sx:Le}),rest:He}}const Z8={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function zC(t,e){const n=mf({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function J8(t,e){const n=mf({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:zC(t,e)}function e9(t,e){if(typeof t=="number")return Fe(t);if(typeof t=="string"){const[n,r,...i]=t.split(" ").filter(o=>o.trim()!=="");let s=`${Fe(n)}`;return r&&(s+=` ${r}`),i.length>0&&(s+=` ${zC(i.join(" "),e)}`),s.trim()}return t}const A3={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function t9(t){return typeof t=="string"&&t in A3?A3[t]:t}const n9=["h1","h2","h3","h4","h5","h6"];function r9(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&n9.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?Fe(t):t}function i9(t){return t}const s9=["h1","h2","h3","h4","h5","h6"];function a9(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&s9.includes(t)?`var(--mantine-${t}-line-height)`:t}function o9(t){return typeof t=="number"?Fe(t):t}function l9(t,e){if(typeof t=="number")return Fe(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return Fe(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const tT={color:zC,textColor:J8,fontSize:r9,spacing:l9,identity:i9,size:o9,lineHeight:a9,fontFamily:t9,border:e9};function D3(t){return t.replace("(min-width: ","").replace("em)","")}function u9({media:t,...e}){const r=Object.keys(t).sort((i,s)=>Number(D3(i))-Number(D3(s))).map(i=>({query:i,styles:t[i]}));return{...e,media:r}}function c9(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function d9(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function f9(t){return typeof t=="object"&&t!==null?Qr(t).filter(e=>e!=="base"):[]}function h9(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function Y5({styleProps:t,data:e,theme:n}){return u9(Qr(t).reduce((r,i)=>{if(i==="hiddenFrom"||i==="visibleFrom"||i==="sx")return r;const s=e[i],o=Array.isArray(s.property)?s.property:[s.property],u=d9(t[i]);if(!c9(t[i]))return o.forEach(f=>{r.inlineStyles[f]=tT[s.type](u,n)}),r;r.hasResponsiveStyles=!0;const d=f9(t[i]);return o.forEach(f=>{u&&(r.styles[f]=tT[s.type](u,n)),d.forEach(m=>{const y=`(min-width: ${n.breakpoints[m]})`;r.media[y]={...r.media[y],[f]:tT[s.type](h9(t[i],m),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function O_(){return`__m__-${A.useId().replace(/:/g,"")}`}function $C(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...$C(r,e)}),{}):typeof t=="function"?t(e):t??{}}function K5(t){return t.startsWith("data-")?t:`data-${t}`}function p9(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[K5(n)]=t[n]),e},{})}function Q5(t){return t?typeof t=="string"?{[K5(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...Q5(n)}),{}):p9(t):null}function xw(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...xw(r,e)}),{}):typeof t=="function"?t(e):t??{}}function m9({theme:t,style:e,vars:n,styleProps:r}){const i=xw(e,t),s=xw(n,t);return{...i,...s,...r}}const Z5=A.forwardRef(({component:t,style:e,__vars:n,className:r,variant:i,mod:s,size:o,hiddenFrom:u,visibleFrom:d,lightHidden:f,darkHidden:m,renderRoot:y,__size:x,...b},w)=>{const S=ai(),D=t||"div",{styleProps:k,rest:O}=mp(b),F=o8()?.()?.(k.sx),M=O_(),V=Y5({styleProps:k,theme:S,data:Z8}),$={ref:w,style:m9({theme:S,style:e,vars:n,styleProps:V.inlineStyles}),className:ii(r,F,{[M]:V.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":m,[`mantine-hidden-from-${u}`]:u,[`mantine-visible-from-${d}`]:d}),"data-variant":i,"data-size":R5(o)?void 0:o||void 0,size:x,...Q5(s),...O};return c.jsxs(c.Fragment,{children:[V.hasResponsiveStyles&&c.jsx(Iy,{selector:`.${M}`,styles:V.styles,media:V.media}),typeof y=="function"?y($):c.jsx(D,{...$})]})});Z5.displayName="@mantine/core/Box";const Ee=Z5;function J5(t){return t}function eP(t){const e=t;return n=>{const r=A.forwardRef((i,s)=>c.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r}}function tt(t){const e=A.forwardRef(t);return e.extend=J5,e.withProps=n=>{const r=A.forwardRef((i,s)=>c.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function vi(t){const e=A.forwardRef(t);return e.withProps=n=>{const r=A.forwardRef((i,s)=>c.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=J5,e}const tP=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Xa(){return A.useContext(tP)}function g9({children:t,initialDirection:e="ltr",detectDirection:n=!0}){const[r,i]=A.useState(e),s=u=>{i(u),document.documentElement.setAttribute("dir",u)},o=()=>s(r==="ltr"?"rtl":"ltr");return hp(()=>{if(n){const u=document.documentElement.getAttribute("dir");(u==="rtl"||u==="ltr")&&s(u)}},[]),c.jsx(tP.Provider,{value:{dir:r,toggleDirection:o,setDirection:s},children:t})}var Oy=PC();const ny=ko(Oy);function v9(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function nT(t){return t?.current?t.current.scrollHeight:"auto"}const $v=typeof window<"u"&&window.requestAnimationFrame;function y9({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r}){const i=A.useRef(null),s=0,o={height:0,overflow:"hidden"},[u,d]=A.useState(r?{}:o),f=w=>{Oy.flushSync(()=>d(w))},m=w=>{f(S=>({...S,...w}))};function y(w){const S=t||v9(w);return{transition:`height ${S}ms ${e}, opacity ${S}ms ${e}`}}Ha(()=>{typeof $v=="function"&&$v(r?()=>{m({willChange:"height",display:"block",overflow:"hidden"}),$v(()=>{const w=nT(i);m({...y(w),height:w})})}:()=>{const w=nT(i);m({...y(w),willChange:"height",height:w}),$v(()=>m({height:s,overflow:"hidden"}))})},[r]);const x=w=>{if(!(w.target!==i.current||w.propertyName!=="height"))if(r){const S=nT(i);S===u.height?f({}):m({height:S}),n()}else u.height===s&&(f(o),n())};function b({style:w={},refKey:S="ref",...D}={}){const k=D[S],O={"aria-hidden":!r,...D,[S]:F5(i,k),onTransitionEnd:x,style:{boxSizing:"border-box",...w,...u}};return Or.version.startsWith("18")?r||(O.inert=""):O.inert=!r,O}return b}const b9={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},gp=tt((t,e)=>{const{children:n,in:r,transitionDuration:i,transitionTimingFunction:s,style:o,onTransitionEnd:u,animateOpacity:d,...f}=Ne("Collapse",b9,t),m=ai(),y=k_(),b=(m.respectReducedMotion?y:!1)?0:i,w=y9({opened:r,transitionDuration:b,transitionTimingFunction:s,onTransitionEnd:u});return b===0?r?c.jsx(Ee,{...f,children:n}):null:c.jsx(Ee,{...w({style:{opacity:r||!d?1:0,transition:d?`opacity ${b}ms ${s}`:"none",...$C(o,m)},ref:e,...f}),children:n})});gp.displayName="@mantine/core/Collapse";function N_(){return typeof window<"u"}function Wg(t){return nP(t)?(t.nodeName||"").toLowerCase():"#document"}function ba(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $u(t){var e;return(e=(nP(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function nP(t){return N_()?t instanceof Node||t instanceof ba(t).Node:!1}function Ir(t){return N_()?t instanceof Element||t instanceof ba(t).Element:!1}function qa(t){return N_()?t instanceof HTMLElement||t instanceof ba(t).HTMLElement:!1}function _w(t){return!N_()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ba(t).ShadowRoot}const x9=new Set(["inline","contents"]);function Ny(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Eo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!x9.has(i)}const _9=new Set(["table","td","th"]);function S9(t){return _9.has(Wg(t))}const T9=[":popover-open",":modal"];function M_(t){return T9.some(e=>{try{return t.matches(e)}catch{return!1}})}const w9=["transform","translate","scale","rotate","perspective"],C9=["transform","translate","scale","rotate","perspective","filter"],E9=["paint","layout","strict","content"];function VC(t){const e=j_(),n=Ir(t)?Eo(t):t;return w9.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||C9.some(r=>(n.willChange||"").includes(r))||E9.some(r=>(n.contain||"").includes(r))}function A9(t){let e=zc(t);for(;qa(e)&&!df(e);){if(VC(e))return e;if(M_(e))return null;e=zc(e)}return null}function j_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const D9=new Set(["html","body","#document"]);function df(t){return D9.has(Wg(t))}function Eo(t){return ba(t).getComputedStyle(t)}function L_(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zc(t){if(Wg(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_w(t)&&t.host||$u(t);return _w(e)?e.host:e}function rP(t){const e=zc(t);return df(e)?t.ownerDocument?t.ownerDocument.body:t.body:qa(e)&&Ny(e)?e:rP(e)}function Bc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=rP(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ba(i);if(s){const u=Sw(o);return e.concat(o,o.visualViewport||[],Ny(i)?i:[],u&&n?Bc(u):[])}return e.concat(i,Bc(i,[],n))}function Sw(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function k3(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function yy(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&_w(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function iP(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function sP(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function k9(t){return I9()?!1:!R3()&&t.width===0&&t.height===0||R3()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function R9(){return/apple/i.test(navigator.vendor)}function R3(){const t=/android/i;return t.test(iP())||t.test(sP())}function P9(){return iP().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function I9(){return sP().includes("jsdom/")}function Tw(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}function O9(t){return"nativeEvent"in t}function N9(t){return t.matches("html,body")}function qh(t){return t?.ownerDocument||document}function rT(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function rg(t){return"composedPath"in t?t.composedPath()[0]:t.target}const M9="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function j9(t){return qa(t)&&t.matches(M9)}const Tl=Math.min,As=Math.max,U1=Math.round,Zx=Math.floor,Nu=t=>({x:t,y:t}),L9={left:"right",right:"left",bottom:"top",top:"bottom"},B9={start:"end",end:"start"};function ww(t,e,n){return As(t,Tl(e,n))}function $c(t,e){return typeof t=="function"?t(e):t}function wl(t){return t.split("-")[0]}function Xg(t){return t.split("-")[1]}function HC(t){return t==="x"?"y":"x"}function qC(t){return t==="y"?"height":"width"}const F9=new Set(["top","bottom"]);function bl(t){return F9.has(wl(t))?"y":"x"}function GC(t){return HC(bl(t))}function U9(t,e,n){n===void 0&&(n=!1);const r=Xg(t),i=GC(t),s=qC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=z1(o)),[o,z1(o)]}function z9(t){const e=z1(t);return[Cw(t),e,Cw(e)]}function Cw(t){return t.replace(/start|end/g,e=>B9[e])}const P3=["left","right"],I3=["right","left"],$9=["top","bottom"],V9=["bottom","top"];function H9(t,e,n){switch(t){case"top":case"bottom":return n?e?I3:P3:e?P3:I3;case"left":case"right":return e?$9:V9;default:return[]}}function q9(t,e,n,r){const i=Xg(t);let s=H9(wl(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Cw)))),s}function z1(t){return t.replace(/left|right|bottom|top/g,e=>L9[e])}function G9(t){return{top:0,right:0,bottom:0,left:0,...t}}function WC(t){return typeof t!="number"?G9(t):{top:t,right:t,bottom:t,left:t}}function Eg(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function O3(t,e,n){let{reference:r,floating:i}=t;const s=bl(e),o=GC(e),u=qC(o),d=wl(e),f=s==="y",m=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,x=r[u]/2-i[u]/2;let b;switch(d){case"top":b={x:m,y:r.y-i.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y};break;case"left":b={x:r.x-i.width,y};break;default:b={x:r.x,y:r.y}}switch(Xg(e)){case"start":b[o]-=x*(n&&f?-1:1);break;case"end":b[o]+=x*(n&&f?-1:1);break}return b}const W9=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,u=s.filter(Boolean),d=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:m,y}=O3(f,r,d),x=r,b={},w=0;for(let S=0;S<u.length;S++){const{name:D,fn:k}=u[S],{x:O,y:N,data:F,reset:M}=await k({x:m,y,initialPlacement:r,placement:x,strategy:i,middlewareData:b,rects:f,platform:o,elements:{reference:t,floating:e}});m=O??m,y=N??y,b={...b,[D]:{...b[D],...F}},M&&w<=50&&(w++,typeof M=="object"&&(M.placement&&(x=M.placement),M.rects&&(f=M.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):M.rects),{x:m,y}=O3(f,x,d)),S=-1)}return{x:m,y,placement:x,strategy:i,middlewareData:b}};async function XC(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:u,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:x=!1,padding:b=0}=$c(e,t),w=WC(b),D=u[x?y==="floating"?"reference":"floating":y],k=Eg(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(D)))==null||n?D:D.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),O=y==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),F=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},M=Eg(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:N,strategy:d}):O);return{top:(k.top-M.top+w.top)/F.y,bottom:(M.bottom-k.bottom+w.bottom)/F.y,left:(k.left-M.left+w.left)/F.x,right:(M.right-k.right+w.right)/F.x}}const X9=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:u,middlewareData:d}=e,{element:f,padding:m=0}=$c(t,e)||{};if(f==null)return{};const y=WC(m),x={x:n,y:r},b=GC(i),w=qC(b),S=await o.getDimensions(f),D=b==="y",k=D?"top":"left",O=D?"bottom":"right",N=D?"clientHeight":"clientWidth",F=s.reference[w]+s.reference[b]-x[b]-s.floating[w],M=x[b]-s.reference[b],V=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let $=V?V[N]:0;(!$||!await(o.isElement==null?void 0:o.isElement(V)))&&($=u.floating[N]||s.floating[w]);const q=F/2-M/2,B=$/2-S[w]/2-1,z=Tl(y[k],B),ee=Tl(y[O],B),Y=z,Q=$-S[w]-ee,oe=$/2-S[w]/2+q,ue=ww(Y,oe,Q),H=!d.arrow&&Xg(i)!=null&&oe!==ue&&s.reference[w]/2-(oe<Y?z:ee)-S[w]/2<0,te=H?oe<Y?oe-Y:oe-Q:0;return{[b]:x[b]+te,data:{[b]:ue,centerOffset:oe-ue-te,...H&&{alignmentOffset:te}},reset:H}}}),Y9=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:u,platform:d,elements:f}=e,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...D}=$c(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=wl(i),O=bl(u),N=wl(u)===u,F=await(d.isRTL==null?void 0:d.isRTL(f.floating)),M=x||(N||!S?[z1(u)]:z9(u)),V=w!=="none";!x&&V&&M.push(...q9(u,S,w,F));const $=[u,...M],q=await XC(e,D),B=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&B.push(q[k]),y){const oe=U9(i,o,F);B.push(q[oe[0]],q[oe[1]])}if(z=[...z,{placement:i,overflows:B}],!B.every(oe=>oe<=0)){var ee,Y;const oe=(((ee=s.flip)==null?void 0:ee.index)||0)+1,ue=$[oe];if(ue&&(!(y==="alignment"?O!==bl(ue):!1)||z.every(Z=>Z.overflows[0]>0&&bl(Z.placement)===O)))return{data:{index:oe,overflows:z},reset:{placement:ue}};let H=(Y=z.filter(te=>te.overflows[0]<=0).sort((te,Z)=>te.overflows[1]-Z.overflows[1])[0])==null?void 0:Y.placement;if(!H)switch(b){case"bestFit":{var Q;const te=(Q=z.filter(Z=>{if(V){const ie=bl(Z.placement);return ie===O||ie==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ie=>ie>0).reduce((ie,G)=>ie+G,0)]).sort((Z,ie)=>Z[1]-ie[1])[0])==null?void 0:Q[0];te&&(H=te);break}case"initialPlacement":H=u;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function aP(t){const e=Tl(...t.map(s=>s.left)),n=Tl(...t.map(s=>s.top)),r=As(...t.map(s=>s.right)),i=As(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function K9(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>Eg(aP(i)))}const Q9=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:s,strategy:o}=e,{padding:u=2,x:d,y:f}=$c(t,e),m=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),y=K9(m),x=Eg(aP(m)),b=WC(u);function w(){if(y.length===2&&y[0].left>y[1].right&&d!=null&&f!=null)return y.find(D=>d>D.left-b.left&&d<D.right+b.right&&f>D.top-b.top&&f<D.bottom+b.bottom)||x;if(y.length>=2){if(bl(n)==="y"){const z=y[0],ee=y[y.length-1],Y=wl(n)==="top",Q=z.top,oe=ee.bottom,ue=Y?z.left:ee.left,H=Y?z.right:ee.right,te=H-ue,Z=oe-Q;return{top:Q,bottom:oe,left:ue,right:H,width:te,height:Z,x:ue,y:Q}}const D=wl(n)==="left",k=As(...y.map(z=>z.right)),O=Tl(...y.map(z=>z.left)),N=y.filter(z=>D?z.left===O:z.right===k),F=N[0].top,M=N[N.length-1].bottom,V=O,$=k,q=$-V,B=M-F;return{top:F,bottom:M,left:V,right:$,width:q,height:B,x:V,y:F}}return x}const S=await s.getElementRects({reference:{getBoundingClientRect:w},floating:r.floating,strategy:o});return i.reference.x!==S.reference.x||i.reference.y!==S.reference.y||i.reference.width!==S.reference.width||i.reference.height!==S.reference.height?{reset:{rects:S}}:{}}}},oP=new Set(["left","top"]);async function Z9(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wl(n),u=Xg(n),d=bl(n)==="y",f=oP.has(o)?-1:1,m=s&&d?-1:1,y=$c(e,t);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof w=="number"&&(b=u==="end"?w*-1:w),d?{x:b*m,y:x*f}:{x:x*f,y:b*m}}const J9=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:u}=e,d=await Z9(e,t);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:o}}}}},eB=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:u={fn:D=>{let{x:k,y:O}=D;return{x:k,y:O}}},...d}=$c(t,e),f={x:n,y:r},m=await XC(e,d),y=bl(wl(i)),x=HC(y);let b=f[x],w=f[y];if(s){const D=x==="y"?"top":"left",k=x==="y"?"bottom":"right",O=b+m[D],N=b-m[k];b=ww(O,b,N)}if(o){const D=y==="y"?"top":"left",k=y==="y"?"bottom":"right",O=w+m[D],N=w-m[k];w=ww(O,w,N)}const S=u.fn({...e,[x]:b,[y]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[x]:s,[y]:o}}}}}},tB=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=$c(t,e),m={x:n,y:r},y=bl(i),x=HC(y);let b=m[x],w=m[y];const S=$c(u,e),D=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const N=x==="y"?"height":"width",F=s.reference[x]-s.floating[N]+D.mainAxis,M=s.reference[x]+s.reference[N]-D.mainAxis;b<F?b=F:b>M&&(b=M)}if(f){var k,O;const N=x==="y"?"width":"height",F=oP.has(wl(i)),M=s.reference[y]-s.floating[N]+(F&&((k=o.offset)==null?void 0:k[y])||0)+(F?0:D.crossAxis),V=s.reference[y]+s.reference[N]+(F?0:((O=o.offset)==null?void 0:O[y])||0)-(F?D.crossAxis:0);w<M?w=M:w>V&&(w=V)}return{[x]:b,[y]:w}}}},nB=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:u}=e,{apply:d=()=>{},...f}=$c(t,e),m=await XC(e,f),y=wl(i),x=Xg(i),b=bl(i)==="y",{width:w,height:S}=s.floating;let D,k;y==="top"||y==="bottom"?(D=y,k=x===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(k=y,D=x==="end"?"top":"bottom");const O=S-m.top-m.bottom,N=w-m.left-m.right,F=Tl(S-m[D],O),M=Tl(w-m[k],N),V=!e.middlewareData.shift;let $=F,q=M;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(q=N),(r=e.middlewareData.shift)!=null&&r.enabled.y&&($=O),V&&!x){const z=As(m.left,0),ee=As(m.right,0),Y=As(m.top,0),Q=As(m.bottom,0);b?q=w-2*(z!==0||ee!==0?z+ee:As(m.left,m.right)):$=S-2*(Y!==0||Q!==0?Y+Q:As(m.top,m.bottom))}await d({...e,availableWidth:q,availableHeight:$});const B=await o.getDimensions(u.floating);return w!==B.width||S!==B.height?{reset:{rects:!0}}:{}}}};function lP(t){const e=Eo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=qa(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=U1(n)!==s||U1(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function YC(t){return Ir(t)?t:t.contextElement}function dg(t){const e=YC(t);if(!qa(e))return Nu(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=lP(e);let o=(s?U1(n.width):n.width)/r,u=(s?U1(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const rB=Nu(0);function uP(t){const e=ba(t);return!j_()||!e.visualViewport?rB:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function iB(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ba(t)?!1:e}function op(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=YC(t);let o=Nu(1);e&&(r?Ir(r)&&(o=dg(r)):o=dg(t));const u=iB(s,n,r)?uP(s):Nu(0);let d=(i.left+u.x)/o.x,f=(i.top+u.y)/o.y,m=i.width/o.x,y=i.height/o.y;if(s){const x=ba(s),b=r&&Ir(r)?ba(r):r;let w=x,S=Sw(w);for(;S&&r&&b!==w;){const D=dg(S),k=S.getBoundingClientRect(),O=Eo(S),N=k.left+(S.clientLeft+parseFloat(O.paddingLeft))*D.x,F=k.top+(S.clientTop+parseFloat(O.paddingTop))*D.y;d*=D.x,f*=D.y,m*=D.x,y*=D.y,d+=N,f+=F,w=ba(S),S=Sw(w)}}return Eg({width:m,height:y,x:d,y:f})}function KC(t,e){const n=L_(t).scrollLeft;return e?e.left+n:op($u(t)).left+n}function cP(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:KC(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function sB(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=$u(r),u=e?M_(e.floating):!1;if(r===o||u&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Nu(1);const m=Nu(0),y=qa(r);if((y||!y&&!s)&&((Wg(r)!=="body"||Ny(o))&&(d=L_(r)),qa(r))){const b=op(r);f=dg(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const x=o&&!y&&!s?cP(o,d,!0):Nu(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+x.x,y:n.y*f.y-d.scrollTop*f.y+m.y+x.y}}function aB(t){return Array.from(t.getClientRects())}function oB(t){const e=$u(t),n=L_(t),r=t.ownerDocument.body,i=As(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=As(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+KC(t);const u=-n.scrollTop;return Eo(r).direction==="rtl"&&(o+=As(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function lB(t,e){const n=ba(t),r=$u(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,d=0;if(i){s=i.width,o=i.height;const f=j_();(!f||f&&e==="fixed")&&(u=i.offsetLeft,d=i.offsetTop)}return{width:s,height:o,x:u,y:d}}const uB=new Set(["absolute","fixed"]);function cB(t,e){const n=op(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=qa(t)?dg(t):Nu(1),o=t.clientWidth*s.x,u=t.clientHeight*s.y,d=i*s.x,f=r*s.y;return{width:o,height:u,x:d,y:f}}function N3(t,e,n){let r;if(e==="viewport")r=lB(t,n);else if(e==="document")r=oB($u(t));else if(Ir(e))r=cB(e,n);else{const i=uP(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Eg(r)}function dP(t,e){const n=zc(t);return n===e||!Ir(n)||df(n)?!1:Eo(n).position==="fixed"||dP(n,e)}function dB(t,e){const n=e.get(t);if(n)return n;let r=Bc(t,[],!1).filter(u=>Ir(u)&&Wg(u)!=="body"),i=null;const s=Eo(t).position==="fixed";let o=s?zc(t):t;for(;Ir(o)&&!df(o);){const u=Eo(o),d=VC(o);!d&&u.position==="fixed"&&(i=null),(s?!d&&!i:!d&&u.position==="static"&&!!i&&uB.has(i.position)||Ny(o)&&!d&&dP(t,o))?r=r.filter(m=>m!==o):i=u,o=zc(o)}return e.set(t,r),r}function fB(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?M_(e)?[]:dB(e,this._c):[].concat(n),r],u=o[0],d=o.reduce((f,m)=>{const y=N3(e,m,i);return f.top=As(y.top,f.top),f.right=Tl(y.right,f.right),f.bottom=Tl(y.bottom,f.bottom),f.left=As(y.left,f.left),f},N3(e,u,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function hB(t){const{width:e,height:n}=lP(t);return{width:e,height:n}}function pB(t,e,n){const r=qa(e),i=$u(e),s=n==="fixed",o=op(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const d=Nu(0);function f(){d.x=KC(i)}if(r||!r&&!s)if((Wg(e)!=="body"||Ny(i))&&(u=L_(e)),r){const b=op(e,!0,s,e);d.x=b.x+e.clientLeft,d.y=b.y+e.clientTop}else i&&f();s&&!r&&i&&f();const m=i&&!r&&!s?cP(i,u):Nu(0),y=o.left+u.scrollLeft-d.x-m.x,x=o.top+u.scrollTop-d.y-m.y;return{x:y,y:x,width:o.width,height:o.height}}function iT(t){return Eo(t).position==="static"}function M3(t,e){if(!qa(t)||Eo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $u(t)===n&&(n=n.ownerDocument.body),n}function fP(t,e){const n=ba(t);if(M_(t))return n;if(!qa(t)){let i=zc(t);for(;i&&!df(i);){if(Ir(i)&&!iT(i))return i;i=zc(i)}return n}let r=M3(t,e);for(;r&&S9(r)&&iT(r);)r=M3(r,e);return r&&df(r)&&iT(r)&&!VC(r)?n:r||A9(t)||n}const mB=async function(t){const e=this.getOffsetParent||fP,n=this.getDimensions,r=await n(t.floating);return{reference:pB(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gB(t){return Eo(t).direction==="rtl"}const vB={convertOffsetParentRelativeRectToViewportRelativeRect:sB,getDocumentElement:$u,getClippingRect:fB,getOffsetParent:fP,getElementRects:mB,getClientRects:aB,getDimensions:hB,getScale:dg,isElement:Ir,isRTL:gB};function hP(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function yB(t,e){let n=null,r;const i=$u(t);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),s();const f=t.getBoundingClientRect(),{left:m,top:y,width:x,height:b}=f;if(u||e(),!x||!b)return;const w=Zx(y),S=Zx(i.clientWidth-(m+x)),D=Zx(i.clientHeight-(y+b)),k=Zx(m),N={rootMargin:-w+"px "+-S+"px "+-D+"px "+-k+"px",threshold:As(0,Tl(1,d))||1};let F=!0;function M(V){const $=V[0].intersectionRatio;if($!==d){if(!F)return o();$?o(!1,$):r=setTimeout(()=>{o(!1,1e-7)},1e3)}$===1&&!hP(f,t.getBoundingClientRect())&&o(),F=!1}try{n=new IntersectionObserver(M,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(M,N)}n.observe(t)}return o(!0),s}function bB(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=YC(t),m=i||s?[...f?Bc(f):[],...Bc(e)]:[];m.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),s&&k.addEventListener("resize",n)});const y=f&&u?yB(f,n):null;let x=-1,b=null;o&&(b=new ResizeObserver(k=>{let[O]=k;O&&O.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(e)})),n()}),f&&!d&&b.observe(f),b.observe(e));let w,S=d?op(t):null;d&&D();function D(){const k=op(t);S&&!hP(S,k)&&n(),S=k,w=requestAnimationFrame(D)}return n(),()=>{var k;m.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),y?.(),(k=b)==null||k.disconnect(),b=null,d&&cancelAnimationFrame(w)}}const xB=J9,_B=eB,SB=Y9,TB=nB,j3=X9,wB=Q9,CB=tB,EB=(t,e,n)=>{const r=new Map,i={platform:vB,...n},s={...i.platform,_c:r};return W9(t,e,{...i,platform:s})};var AB=typeof document<"u",DB=function(){},x1=AB?A.useLayoutEffect:DB;function $1(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!$1(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!$1(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function pP(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function L3(t,e){const n=pP(t);return Math.round(e*n)/n}function sT(t){const e=A.useRef(t);return x1(()=>{e.current=t}),e}function kB(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:u=!0,whileElementsMounted:d,open:f}=t,[m,y]=A.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=A.useState(r);$1(x,r)||b(r);const[w,S]=A.useState(null),[D,k]=A.useState(null),O=A.useCallback(Z=>{Z!==V.current&&(V.current=Z,S(Z))},[]),N=A.useCallback(Z=>{Z!==$.current&&($.current=Z,k(Z))},[]),F=s||w,M=o||D,V=A.useRef(null),$=A.useRef(null),q=A.useRef(m),B=d!=null,z=sT(d),ee=sT(i),Y=sT(f),Q=A.useCallback(()=>{if(!V.current||!$.current)return;const Z={placement:e,strategy:n,middleware:x};ee.current&&(Z.platform=ee.current),EB(V.current,$.current,Z).then(ie=>{const G={...ie,isPositioned:Y.current!==!1};oe.current&&!$1(q.current,G)&&(q.current=G,Oy.flushSync(()=>{y(G)}))})},[x,e,n,ee,Y]);x1(()=>{f===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,y(Z=>({...Z,isPositioned:!1})))},[f]);const oe=A.useRef(!1);x1(()=>(oe.current=!0,()=>{oe.current=!1}),[]),x1(()=>{if(F&&(V.current=F),M&&($.current=M),F&&M){if(z.current)return z.current(F,M,Q);Q()}},[F,M,Q,z,B]);const ue=A.useMemo(()=>({reference:V,floating:$,setReference:O,setFloating:N}),[O,N]),H=A.useMemo(()=>({reference:F,floating:M}),[F,M]),te=A.useMemo(()=>{const Z={position:n,left:0,top:0};if(!H.floating)return Z;const ie=L3(H.floating,m.x),G=L3(H.floating,m.y);return u?{...Z,transform:"translate("+ie+"px, "+G+"px)",...pP(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:G}},[n,u,H.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:Q,refs:ue,elements:H,floatingStyles:te}),[m,Q,ue,H,te])}const RB=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?j3({element:r.current,padding:i}).fn(n):{}:r?j3({element:r,padding:i}).fn(n):{}}}},mP=(t,e)=>({...xB(t),options:[t,e]}),QC=(t,e)=>({..._B(t),options:[t,e]}),B3=(t,e)=>({...CB(t),options:[t,e]}),V1=(t,e)=>({...SB(t),options:[t,e]}),PB=(t,e)=>({...TB(t),options:[t,e]}),cy=(t,e)=>({...wB(t),options:[t,e]}),gP=(t,e)=>({...RB(t),options:[t,e]});function IB(t){return A.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const vP={...EL},OB=vP.useInsertionEffect,NB=OB||(t=>t());function Mc(t){const e=A.useRef(()=>{});return NB(()=>{e.current=t}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}var Mu=typeof document<"u"?A.useLayoutEffect:A.useEffect;let F3=!1,MB=0;const U3=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+MB++;function jB(){const[t,e]=A.useState(()=>F3?U3():void 0);return Mu(()=>{t==null&&e(U3())},[]),A.useEffect(()=>{F3=!0},[]),t}const LB=vP.useId,yP=LB||jB;function BB(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(i=>i!==n))||[])}}}const FB=A.createContext(null),UB=A.createContext(null),ZC=()=>{var t;return((t=A.useContext(FB))==null?void 0:t.id)||null},JC=()=>A.useContext(UB);function eE(t){return"data-floating-ui-"+t}function aT(t){const e=A.useRef(t);return Mu(()=>{e.current=t}),e}const z3=eE("safe-polygon");function _1(t,e,n){return n&&!Tw(n)?0:typeof t=="number"?t:t?.[e]}function zB(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,events:s,elements:o}=t,{enabled:u=!0,delay:d=0,handleClose:f=null,mouseOnly:m=!1,restMs:y=0,move:x=!0}=e,b=JC(),w=ZC(),S=aT(f),D=aT(d),k=aT(n),O=A.useRef(),N=A.useRef(-1),F=A.useRef(),M=A.useRef(-1),V=A.useRef(!0),$=A.useRef(!1),q=A.useRef(()=>{}),B=A.useRef(!1),z=A.useCallback(()=>{var te;const Z=(te=i.current.openEvent)==null?void 0:te.type;return Z?.includes("mouse")&&Z!=="mousedown"},[i]);A.useEffect(()=>{if(!u)return;function te(Z){let{open:ie}=Z;ie||(clearTimeout(N.current),clearTimeout(M.current),V.current=!0,B.current=!1)}return s.on("openchange",te),()=>{s.off("openchange",te)}},[u,s]),A.useEffect(()=>{if(!u||!S.current||!n)return;function te(ie){z()&&r(!1,ie,"hover")}const Z=qh(o.floating).documentElement;return Z.addEventListener("mouseleave",te),()=>{Z.removeEventListener("mouseleave",te)}},[o.floating,n,r,u,S,z]);const ee=A.useCallback(function(te,Z,ie){Z===void 0&&(Z=!0),ie===void 0&&(ie="hover");const G=_1(D.current,"close",O.current);G&&!F.current?(clearTimeout(N.current),N.current=window.setTimeout(()=>r(!1,te,ie),G)):Z&&(clearTimeout(N.current),r(!1,te,ie))},[D,r]),Y=Mc(()=>{q.current(),F.current=void 0}),Q=Mc(()=>{if($.current){const te=qh(o.floating).body;te.style.pointerEvents="",te.removeAttribute(z3),$.current=!1}}),oe=Mc(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);A.useEffect(()=>{if(!u)return;function te(X){if(clearTimeout(N.current),V.current=!1,m&&!Tw(O.current)||y>0&&!_1(D.current,"open"))return;const fe=_1(D.current,"open",O.current);fe?N.current=window.setTimeout(()=>{k.current||r(!0,X,"hover")},fe):n||r(!0,X,"hover")}function Z(X){if(oe())return;q.current();const fe=qh(o.floating);if(clearTimeout(M.current),B.current=!1,S.current&&i.current.floatingContext){n||clearTimeout(N.current),F.current=S.current({...i.current.floatingContext,tree:b,x:X.clientX,y:X.clientY,onClose(){Q(),Y(),oe()||ee(X,!0,"safe-polygon")}});const we=F.current;fe.addEventListener("mousemove",we),q.current=()=>{fe.removeEventListener("mousemove",we)};return}(O.current==="touch"?!yy(o.floating,X.relatedTarget):!0)&&ee(X)}function ie(X){oe()||i.current.floatingContext&&(S.current==null||S.current({...i.current.floatingContext,tree:b,x:X.clientX,y:X.clientY,onClose(){Q(),Y(),oe()||ee(X)}})(X))}if(Ir(o.domReference)){var G;const X=o.domReference;return n&&X.addEventListener("mouseleave",ie),(G=o.floating)==null||G.addEventListener("mouseleave",ie),x&&X.addEventListener("mousemove",te,{once:!0}),X.addEventListener("mouseenter",te),X.addEventListener("mouseleave",Z),()=>{var fe;n&&X.removeEventListener("mouseleave",ie),(fe=o.floating)==null||fe.removeEventListener("mouseleave",ie),x&&X.removeEventListener("mousemove",te),X.removeEventListener("mouseenter",te),X.removeEventListener("mouseleave",Z)}}},[o,u,t,m,y,x,ee,Y,Q,r,n,k,b,D,S,i,oe]),Mu(()=>{var te;if(u&&n&&(te=S.current)!=null&&te.__options.blockPointerEvents&&z()){$.current=!0;const ie=o.floating;if(Ir(o.domReference)&&ie){var Z;const G=qh(o.floating).body;G.setAttribute(z3,"");const X=o.domReference,fe=b==null||(Z=b.nodesRef.current.find(be=>be.id===w))==null||(Z=Z.context)==null?void 0:Z.elements.floating;return fe&&(fe.style.pointerEvents=""),G.style.pointerEvents="none",X.style.pointerEvents="auto",ie.style.pointerEvents="auto",()=>{G.style.pointerEvents="",X.style.pointerEvents="",ie.style.pointerEvents=""}}}},[u,n,w,o,b,S,z]),Mu(()=>{n||(O.current=void 0,B.current=!1,Y(),Q())},[n,Y,Q]),A.useEffect(()=>()=>{Y(),clearTimeout(N.current),clearTimeout(M.current),Q()},[u,o.domReference,Y,Q]);const ue=A.useMemo(()=>{function te(Z){O.current=Z.pointerType}return{onPointerDown:te,onPointerEnter:te,onMouseMove(Z){const{nativeEvent:ie}=Z;function G(){!V.current&&!k.current&&r(!0,ie,"hover")}m&&!Tw(O.current)||n||y===0||B.current&&Z.movementX**2+Z.movementY**2<2||(clearTimeout(M.current),O.current==="touch"?G():(B.current=!0,M.current=window.setTimeout(G,y)))}}},[m,r,n,k,y]),H=A.useMemo(()=>({onMouseEnter(){clearTimeout(N.current)},onMouseLeave(te){oe()||ee(te.nativeEvent,!1)}}),[ee,oe]);return A.useMemo(()=>u?{reference:ue,floating:H}:{},[u,ue,H])}const Ew=()=>{},bP=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Ew,setState:Ew,isInstantPhase:!1}),$B=()=>A.useContext(bP);function VB(t){const{children:e,delay:n,timeoutMs:r=0}=t,[i,s]=A.useReducer((d,f)=>({...d,...f}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=A.useRef(null),u=A.useCallback(d=>{s({currentId:d})},[]);return Mu(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||s({isInstantPhase:!0}):(i.isInstantPhase&&s({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),A.createElement(bP.Provider,{value:A.useMemo(()=>({...i,setState:s,setCurrentId:u}),[i,u])},e)}function HB(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,floatingId:i}=t,{id:s,enabled:o=!0}=e,u=s??i,d=$B(),{currentId:f,setCurrentId:m,initialDelay:y,setState:x,timeoutMs:b}=d;return Mu(()=>{o&&f&&(x({delay:{open:1,close:_1(y,"close")}}),f!==u&&r(!1))},[o,u,r,x,f,y]),Mu(()=>{function w(){r(!1),x({delay:y,currentId:null})}if(o&&f&&!n&&f===u){if(b){const S=window.setTimeout(w,b);return()=>{clearTimeout(S)}}w()}},[o,n,x,f,u,r,y,b]),Mu(()=>{o&&(m===Ew||!n||m(u))},[o,n,m,u]),d}function oT(t,e){let n=t.filter(i=>{var s;return i.parentId===e&&((s=i.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=t.filter(i=>{var s;return(s=r)==null?void 0:s.some(o=>{var u;return i.parentId===o.id&&((u=i.context)==null?void 0:u.open)})}),n=n.concat(r);return n}const qB="data-floating-ui-focusable",GB={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},WB={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$3=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function XB(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:i,dataRef:s}=t,{enabled:o=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:m=!1,referencePressEvent:y="pointerdown",ancestorScroll:x=!1,bubbles:b,capture:w}=e,S=JC(),D=Mc(typeof d=="function"?d:()=>!1),k=typeof d=="function"?D:d,O=A.useRef(!1),N=A.useRef(!1),{escapeKey:F,outsidePress:M}=$3(b),{escapeKey:V,outsidePress:$}=$3(w),q=A.useRef(!1),B=Mc(ue=>{var H;if(!n||!o||!u||ue.key!=="Escape"||q.current)return;const te=(H=s.current.floatingContext)==null?void 0:H.nodeId,Z=S?oT(S.nodesRef.current,te):[];if(!F&&(ue.stopPropagation(),Z.length>0)){let ie=!0;if(Z.forEach(G=>{var X;if((X=G.context)!=null&&X.open&&!G.context.dataRef.current.__escapeKeyBubbles){ie=!1;return}}),!ie)return}r(!1,O9(ue)?ue.nativeEvent:ue,"escape-key")}),z=Mc(ue=>{var H;const te=()=>{var Z;B(ue),(Z=rg(ue))==null||Z.removeEventListener("keydown",te)};(H=rg(ue))==null||H.addEventListener("keydown",te)}),ee=Mc(ue=>{var H;const te=O.current;O.current=!1;const Z=N.current;if(N.current=!1,f==="click"&&Z||te||typeof k=="function"&&!k(ue))return;const ie=rg(ue),G="["+eE("inert")+"]",X=qh(i.floating).querySelectorAll(G);let fe=Ir(ie)?ie:null;for(;fe&&!df(fe);){const Ce=zc(fe);if(df(Ce)||!Ir(Ce))break;fe=Ce}if(X.length&&Ir(ie)&&!N9(ie)&&!yy(ie,i.floating)&&Array.from(X).every(Ce=>!yy(fe,Ce)))return;if(qa(ie)&&oe){const Ce=ie.clientWidth>0&&ie.scrollWidth>ie.clientWidth,Ke=ie.clientHeight>0&&ie.scrollHeight>ie.clientHeight;let Me=Ke&&ue.offsetX>ie.clientWidth;if(Ke&&Eo(ie).direction==="rtl"&&(Me=ue.offsetX<=ie.offsetWidth-ie.clientWidth),Me||Ce&&ue.offsetY>ie.clientHeight)return}const be=(H=s.current.floatingContext)==null?void 0:H.nodeId,we=S&&oT(S.nodesRef.current,be).some(Ce=>{var Ke;return rT(ue,(Ke=Ce.context)==null?void 0:Ke.elements.floating)});if(rT(ue,i.floating)||rT(ue,i.domReference)||we)return;const pe=S?oT(S.nodesRef.current,be):[];if(pe.length>0){let Ce=!0;if(pe.forEach(Ke=>{var Me;if((Me=Ke.context)!=null&&Me.open&&!Ke.context.dataRef.current.__outsidePressBubbles){Ce=!1;return}}),!Ce)return}r(!1,ue,"outside-press")}),Y=Mc(ue=>{var H;const te=()=>{var Z;ee(ue),(Z=rg(ue))==null||Z.removeEventListener(f,te)};(H=rg(ue))==null||H.addEventListener(f,te)});A.useEffect(()=>{if(!n||!o)return;s.current.__escapeKeyBubbles=F,s.current.__outsidePressBubbles=M;let ue=-1;function H(X){r(!1,X,"ancestor-scroll")}function te(){window.clearTimeout(ue),q.current=!0}function Z(){ue=window.setTimeout(()=>{q.current=!1},j_()?5:0)}const ie=qh(i.floating);u&&(ie.addEventListener("keydown",V?z:B,V),ie.addEventListener("compositionstart",te),ie.addEventListener("compositionend",Z)),k&&ie.addEventListener(f,$?Y:ee,$);let G=[];return x&&(Ir(i.domReference)&&(G=Bc(i.domReference)),Ir(i.floating)&&(G=G.concat(Bc(i.floating))),!Ir(i.reference)&&i.reference&&i.reference.contextElement&&(G=G.concat(Bc(i.reference.contextElement)))),G=G.filter(X=>{var fe;return X!==((fe=ie.defaultView)==null?void 0:fe.visualViewport)}),G.forEach(X=>{X.addEventListener("scroll",H,{passive:!0})}),()=>{u&&(ie.removeEventListener("keydown",V?z:B,V),ie.removeEventListener("compositionstart",te),ie.removeEventListener("compositionend",Z)),k&&ie.removeEventListener(f,$?Y:ee,$),G.forEach(X=>{X.removeEventListener("scroll",H)}),window.clearTimeout(ue)}},[s,i,u,k,f,n,r,x,o,F,M,B,V,z,ee,$,Y]),A.useEffect(()=>{O.current=!1},[k,f]);const Q=A.useMemo(()=>({onKeyDown:B,[GB[y]]:ue=>{m&&r(!1,ue.nativeEvent,"reference-press")}}),[B,r,m,y]),oe=A.useMemo(()=>({onKeyDown:B,onMouseDown(){N.current=!0},onMouseUp(){N.current=!0},[WB[f]]:()=>{O.current=!0}}),[B,f]);return A.useMemo(()=>o?{reference:Q,floating:oe}:{},[o,Q,oe])}function YB(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=yP(),s=A.useRef({}),[o]=A.useState(()=>BB()),u=ZC()!=null,[d,f]=A.useState(r.reference),m=Mc((b,w,S)=>{s.current.openEvent=b?w:void 0,o.emit("openchange",{open:b,event:w,reason:S,nested:u}),n?.(b,w,S)}),y=A.useMemo(()=>({setPositionReference:f}),[]),x=A.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return A.useMemo(()=>({dataRef:s,open:e,onOpenChange:m,elements:x,events:o,floatingId:i,refs:y}),[e,m,x,o,i,y])}function tE(t){t===void 0&&(t={});const{nodeId:e}=t,n=YB({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[s,o]=A.useState(null),[u,d]=A.useState(null),m=i?.domReference||s,y=A.useRef(null),x=JC();Mu(()=>{m&&(y.current=m)},[m]);const b=kB({...t,elements:{...i,...u&&{reference:u}}}),w=A.useCallback(N=>{const F=Ir(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),contextElement:N}:N;d(F),b.refs.setReference(F)},[b.refs]),S=A.useCallback(N=>{(Ir(N)||N===null)&&(y.current=N,o(N)),(Ir(b.refs.reference.current)||b.refs.reference.current===null||N!==null&&!Ir(N))&&b.refs.setReference(N)},[b.refs]),D=A.useMemo(()=>({...b.refs,setReference:S,setPositionReference:w,domReference:y}),[b.refs,S,w]),k=A.useMemo(()=>({...b.elements,domReference:m}),[b.elements,m]),O=A.useMemo(()=>({...b,...r,refs:D,elements:k,nodeId:e}),[b,D,k,e,r]);return Mu(()=>{r.dataRef.current.floatingContext=O;const N=x?.nodesRef.current.find(F=>F.id===e);N&&(N.context=O)}),A.useMemo(()=>({...b,context:O,refs:D,elements:k}),[b,D,k,O])}function KB(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:i,dataRef:s,elements:o}=t,{enabled:u=!0,visibleOnly:d=!0}=e,f=A.useRef(!1),m=A.useRef(),y=A.useRef(!0);A.useEffect(()=>{if(!u)return;const b=ba(o.domReference);function w(){!n&&qa(o.domReference)&&o.domReference===k3(qh(o.domReference))&&(f.current=!0)}function S(){y.current=!0}return b.addEventListener("blur",w),b.addEventListener("keydown",S,!0),()=>{b.removeEventListener("blur",w),b.removeEventListener("keydown",S,!0)}},[o.domReference,n,u]),A.useEffect(()=>{if(!u)return;function b(w){let{reason:S}=w;(S==="reference-press"||S==="escape-key")&&(f.current=!0)}return i.on("openchange",b),()=>{i.off("openchange",b)}},[i,u]),A.useEffect(()=>()=>{clearTimeout(m.current)},[]);const x=A.useMemo(()=>({onPointerDown(b){k9(b.nativeEvent)||(y.current=!1)},onMouseLeave(){f.current=!1},onFocus(b){if(f.current)return;const w=rg(b.nativeEvent);if(d&&Ir(w))try{if(R9()&&P9())throw Error();if(!w.matches(":focus-visible"))return}catch{if(!y.current&&!j9(w))return}r(!0,b.nativeEvent,"focus")},onBlur(b){f.current=!1;const w=b.relatedTarget,S=b.nativeEvent,D=Ir(w)&&w.hasAttribute(eE("focus-guard"))&&w.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var k;const O=k3(o.domReference?o.domReference.ownerDocument:document);!w&&O===o.domReference||yy((k=s.current.floatingContext)==null?void 0:k.refs.floating.current,O)||yy(o.domReference,O)||D||r(!1,S,"focus")})}}),[s,o.domReference,r,d]);return A.useMemo(()=>u?{reference:x}:{},[u,x])}const V3="active",H3="selected";function lT(t,e,n){const r=new Map,i=n==="item";let s=t;if(i&&t){const{[V3]:o,[H3]:u,...d}=t;s=d}return{...n==="floating"&&{tabIndex:-1,[qB]:""},...s,...e.map(o=>{const u=o?o[n]:null;return typeof u=="function"?t?u(t):null:u}).concat(t).reduce((o,u)=>(u&&Object.entries(u).forEach(d=>{let[f,m]=d;if(!(i&&[V3,H3].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof m=="function"){var y;(y=r.get(f))==null||y.push(m),o[f]=function(){for(var x,b=arguments.length,w=new Array(b),S=0;S<b;S++)w[S]=arguments[S];return(x=r.get(f))==null?void 0:x.map(D=>D(...w)).find(D=>D!==void 0)}}}else o[f]=m}),o),{})}}function QB(t){t===void 0&&(t=[]);const e=t.map(u=>u?.reference),n=t.map(u=>u?.floating),r=t.map(u=>u?.item),i=A.useCallback(u=>lT(u,t,"reference"),e),s=A.useCallback(u=>lT(u,t,"floating"),n),o=A.useCallback(u=>lT(u,t,"item"),r);return A.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}const ZB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function JB(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:i}=t,{enabled:s=!0,role:o="dialog"}=e,u=(n=ZB.get(o))!=null?n:o,d=yP(),m=ZC()!=null,y=A.useMemo(()=>u==="tooltip"||o==="label"?{["aria-"+(o==="label"?"labelledby":"describedby")]:r?i:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":u==="alertdialog"?"dialog":u,"aria-controls":r?i:void 0,...u==="listbox"&&{role:"combobox"},...u==="menu"&&{id:d},...u==="menu"&&m&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},[u,i,m,r,d,o]),x=A.useMemo(()=>{const w={id:i,...u&&{role:u}};return u==="tooltip"||o==="label"?w:{...w,...u==="menu"&&{"aria-labelledby":d}}},[u,i,d,o]),b=A.useCallback(w=>{let{active:S,selected:D}=w;const k={role:"option",...S&&{id:i+"-option"}};switch(o){case"select":return{...k,"aria-selected":S&&D};case"combobox":return{...k,...S&&{"aria-selected":!0}}}return{}},[i,o]);return A.useMemo(()=>s?{reference:y,floating:x,item:b}:{},[s,y,x,b])}const[eF,Ro]=si("ScrollArea.Root component was not found in tree");function Ag(t,e){const n=Fh(e);hp(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const tF=A.forwardRef((t,e)=>{const{style:n,...r}=t,i=Ro(),[s,o]=A.useState(0),[u,d]=A.useState(0),f=!!(s&&u);return Ag(i.scrollbarX,()=>{const m=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(m),d(m)}),Ag(i.scrollbarY,()=>{const m=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(m),o(m)}),f?c.jsx("div",{...r,ref:e,style:{...n,width:s,height:u}}):null}),nF=A.forwardRef((t,e)=>{const n=Ro(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(tF,{...t,ref:e}):null}),rF={scrollHideDelay:1e3,type:"hover"},xP=A.forwardRef((t,e)=>{const n=Ne("ScrollAreaRoot",rF,t),{type:r,scrollHideDelay:i,scrollbars:s,...o}=n,[u,d]=A.useState(null),[f,m]=A.useState(null),[y,x]=A.useState(null),[b,w]=A.useState(null),[S,D]=A.useState(null),[k,O]=A.useState(0),[N,F]=A.useState(0),[M,V]=A.useState(!1),[$,q]=A.useState(!1),B=ei(e,z=>d(z));return c.jsx(eF,{value:{type:r,scrollHideDelay:i,scrollArea:u,viewport:f,onViewportChange:m,content:y,onContentChange:x,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:M,onScrollbarXEnabledChange:V,scrollbarY:S,onScrollbarYChange:D,scrollbarYEnabled:$,onScrollbarYEnabledChange:q,onCornerWidthChange:O,onCornerHeightChange:F},children:c.jsx(Ee,{...o,ref:B,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${k}px`,"--sa-corner-height":s!=="xy"?"0px":`${N}px`}})})});xP.displayName="@mantine/core/ScrollAreaRoot";function _P(t,e){const n=t/e;return Number.isNaN(n)?0:n}function B_(t){const e=_P(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function SP(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function iF(t,[e,n]){return Math.min(n,Math.max(e,t))}function q3(t,e,n="ltr"){const r=B_(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,u=s-r,d=n==="ltr"?[0,o]:[o*-1,0],f=iF(t,d);return SP([0,o],[0,u])(f)}function sF(t,e,n,r="ltr"){const i=B_(n),s=i/2,o=e||s,u=i-o,d=n.scrollbar.paddingStart+o,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,y=r==="ltr"?[0,m]:[m*-1,0];return SP([d,f],y)(t)}function TP(t,e){return t>0&&t<e}function lf(t){return t?parseInt(t,10):0}function Kh(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t?.(r),(n===!1||!r.defaultPrevented)&&e?.(r)}}const[aF,wP]=si("ScrollAreaScrollbar was not found in tree"),CP=A.forwardRef((t,e)=>{const{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:o,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:f,onResize:m,...y}=t,x=Ro(),[b,w]=A.useState(null),S=ei(e,q=>w(q)),D=A.useRef(null),k=A.useRef(""),{viewport:O}=x,N=n.content-n.viewport,F=Fh(f),M=Fh(u),V=D_(m,10),$=q=>{if(D.current){const B=q.clientX-D.current.left,z=q.clientY-D.current.top;d({x:B,y:z})}};return A.useEffect(()=>{const q=B=>{const z=B.target;b?.contains(z)&&F(B,N)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[O,b,N,F]),A.useEffect(M,[n,M]),Ag(b,V),Ag(x.content,V),c.jsx(aF,{value:{scrollbar:b,hasThumb:r,onThumbChange:Fh(i),onThumbPointerUp:Fh(s),onThumbPositionChange:M,onThumbPointerDown:Fh(o)},children:c.jsx("div",{...y,ref:S,"data-mantine-scrollbar":!0,style:{position:"absolute",...y.style},onPointerDown:Kh(t.onPointerDown,q=>{q.preventDefault(),q.button===0&&(q.target.setPointerCapture(q.pointerId),D.current=b.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",$(q))}),onPointerMove:Kh(t.onPointerMove,$),onPointerUp:Kh(t.onPointerUp,q=>{const B=q.target;B.hasPointerCapture(q.pointerId)&&(q.preventDefault(),B.releasePointerCapture(q.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=k.current,D.current=null}})})}),EP=A.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:i,...s}=t,o=Ro(),[u,d]=A.useState(),f=A.useRef(null),m=ei(e,f,o.onScrollbarXChange);return A.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),c.jsx(CP,{"data-orientation":"horizontal",...s,ref:m,sizes:n,style:{...i,"--sa-thumb-width":`${B_(n)}px`},onThumbPointerDown:y=>t.onThumbPointerDown(y.x),onDragScroll:y=>t.onDragScroll(y.x),onWheelScroll:(y,x)=>{if(o.viewport){const b=o.viewport.scrollLeft+y.deltaX;t.onWheelScroll(b),TP(b,x)&&y.preventDefault()}},onResize:()=>{f.current&&o.viewport&&u&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:lf(u.paddingLeft),paddingEnd:lf(u.paddingRight)}})}})});EP.displayName="@mantine/core/ScrollAreaScrollbarX";const AP=A.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:i,...s}=t,o=Ro(),[u,d]=A.useState(),f=A.useRef(null),m=ei(e,f,o.onScrollbarYChange);return A.useEffect(()=>{f.current&&d(window.getComputedStyle(f.current))},[]),c.jsx(CP,{...s,"data-orientation":"vertical",ref:m,sizes:n,style:{"--sa-thumb-height":`${B_(n)}px`,...i},onThumbPointerDown:y=>t.onThumbPointerDown(y.y),onDragScroll:y=>t.onDragScroll(y.y),onWheelScroll:(y,x)=>{if(o.viewport){const b=o.viewport.scrollTop+y.deltaY;t.onWheelScroll(b),TP(b,x)&&y.preventDefault()}},onResize:()=>{f.current&&o.viewport&&u&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:lf(u.paddingTop),paddingEnd:lf(u.paddingBottom)}})}})});AP.displayName="@mantine/core/ScrollAreaScrollbarY";const F_=A.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,{dir:i}=Xa(),s=Ro(),o=A.useRef(null),u=A.useRef(0),[d,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=_P(d.viewport,d.content),y={...r,sizes:d,onSizesChange:f,hasThumb:m>0&&m<1,onThumbChange:b=>{o.current=b},onThumbPointerUp:()=>{u.current=0},onThumbPointerDown:b=>{u.current=b}},x=(b,w)=>sF(b,u.current,d,w);return n==="horizontal"?c.jsx(EP,{...y,ref:e,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollLeft,w=q3(b,d,i);o.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollLeft=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollLeft=x(b,i))}}):n==="vertical"?c.jsx(AP,{...y,ref:e,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollTop,w=q3(b,d);d.scrollbar.size===0?o.current.style.setProperty("--thumb-opacity","0"):o.current.style.setProperty("--thumb-opacity","1"),o.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollTop=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollTop=x(b))}}):null});F_.displayName="@mantine/core/ScrollAreaScrollbarVisible";const nE=A.forwardRef((t,e)=>{const n=Ro(),{forceMount:r,...i}=t,[s,o]=A.useState(!1),u=t.orientation==="horizontal",d=D_(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;o(u?f:m)}},10);return Ag(n.viewport,d),Ag(n.content,d),r||s?c.jsx(F_,{"data-state":s?"visible":"hidden",...i,ref:e}):null});nE.displayName="@mantine/core/ScrollAreaScrollbarAuto";const DP=A.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ro(),[s,o]=A.useState(!1);return A.useEffect(()=>{const{scrollArea:u}=i;let d=0;if(u){const f=()=>{window.clearTimeout(d),o(!0)},m=()=>{d=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",m)}}},[i.scrollArea,i.scrollHideDelay]),n||s?c.jsx(nE,{"data-state":s?"visible":"hidden",...r,ref:e}):null});DP.displayName="@mantine/core/ScrollAreaScrollbarHover";const oF=A.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ro(),s=t.orientation==="horizontal",[o,u]=A.useState("hidden"),d=D_(()=>u("idle"),100);return A.useEffect(()=>{if(o==="idle"){const f=window.setTimeout(()=>u("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[o,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:f}=i,m=s?"scrollLeft":"scrollTop";if(f){let y=f[m];const x=()=>{const b=f[m];y!==b&&(u("scrolling"),d()),y=b};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[i.viewport,s,d]),n||o!=="hidden"?c.jsx(F_,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:Kh(t.onPointerEnter,()=>u("interacting")),onPointerLeave:Kh(t.onPointerLeave,()=>u("idle"))}):null}),Aw=A.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ro(),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,u=t.orientation==="horizontal";return A.useEffect(()=>(u?s(!0):o(!0),()=>{u?s(!1):o(!1)}),[u,s,o]),i.type==="hover"?c.jsx(DP,{...r,ref:e,forceMount:n}):i.type==="scroll"?c.jsx(oF,{...r,ref:e,forceMount:n}):i.type==="auto"?c.jsx(nE,{...r,ref:e,forceMount:n}):i.type==="always"?c.jsx(F_,{...r,ref:e}):null});Aw.displayName="@mantine/core/ScrollAreaScrollbar";function lF(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,u=n.top!==s.top;(o||u)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}const kP=A.forwardRef((t,e)=>{const{style:n,...r}=t,i=Ro(),s=wP(),{onThumbPositionChange:o}=s,u=ei(e,m=>s.onThumbChange(m)),d=A.useRef(void 0),f=D_(()=>{d.current&&(d.current(),d.current=void 0)},100);return A.useEffect(()=>{const{viewport:m}=i;if(m){const y=()=>{if(f(),!d.current){const x=lF(m,o);d.current=x,o()}};return o(),m.addEventListener("scroll",y),()=>m.removeEventListener("scroll",y)}},[i.viewport,f,o]),c.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...r,ref:u,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:Kh(t.onPointerDownCapture,m=>{const x=m.target.getBoundingClientRect(),b=m.clientX-x.left,w=m.clientY-x.top;s.onThumbPointerDown({x:b,y:w})}),onPointerUp:Kh(t.onPointerUp,s.onThumbPointerUp)})});kP.displayName="@mantine/core/ScrollAreaThumb";const Dw=A.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=wP();return n||i.hasThumb?c.jsx(kP,{ref:e,...r}):null});Dw.displayName="@mantine/core/ScrollAreaThumb";const RP=A.forwardRef(({children:t,style:e,...n},r)=>{const i=Ro(),s=ei(r,i.onViewportChange);return c.jsx(Ee,{...n,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e},children:c.jsx("div",{style:{minWidth:"100%"},ref:i.onContentChange,children:t})})});RP.displayName="@mantine/core/ScrollAreaViewport";var rE={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const PP={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},uF=(t,{scrollbarSize:e,overscrollBehavior:n})=>({root:{"--scrollarea-scrollbar-size":Fe(e),"--scrollarea-over-scroll-behavior":n}}),Ar=tt((t,e)=>{const n=Ne("ScrollArea",PP,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,scrollbarSize:d,vars:f,type:m,scrollHideDelay:y,viewportProps:x,viewportRef:b,onScrollPositionChange:w,children:S,offsetScrollbars:D,scrollbars:k,onBottomReached:O,onTopReached:N,overscrollBehavior:F,...M}=n,[V,$]=A.useState(!1),[q,B]=A.useState(!1),[z,ee]=A.useState(!1),Y=vt({name:"ScrollArea",props:n,classes:rE,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:f,varsResolver:uF}),Q=A.useRef(null),oe=IB([b,Q]);return A.useEffect(()=>{if(!Q.current||D!=="present")return;const ue=Q.current,H=new ResizeObserver(()=>{const{scrollHeight:te,clientHeight:Z,scrollWidth:ie,clientWidth:G}=ue;B(te>Z),ee(ie>G)});return H.observe(ue),()=>H.disconnect()},[Q,D]),c.jsxs(xP,{type:m==="never"?"always":m,scrollHideDelay:y,ref:e,scrollbars:k,...Y("root"),...M,children:[c.jsx(RP,{...x,...Y("viewport",{style:x?.style}),ref:oe,"data-offset-scrollbars":D===!0?"xy":D||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":D==="present"&&!z?"true":void 0,"data-vertical-hidden":D==="present"&&!q?"true":void 0,onScroll:ue=>{x?.onScroll?.(ue),w?.({x:ue.currentTarget.scrollLeft,y:ue.currentTarget.scrollTop});const{scrollTop:H,scrollHeight:te,clientHeight:Z}=ue.currentTarget;H-(te-Z)>=-.6&&O?.(),H===0&&N?.()},children:S}),(k==="xy"||k==="x")&&c.jsx(Aw,{...Y("scrollbar"),orientation:"horizontal","data-hidden":m==="never"||D==="present"&&!z?!0:void 0,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:c.jsx(Dw,{...Y("thumb")})}),(k==="xy"||k==="y")&&c.jsx(Aw,{...Y("scrollbar"),orientation:"vertical","data-hidden":m==="never"||D==="present"&&!q?!0:void 0,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:c.jsx(Dw,{...Y("thumb")})}),c.jsx(nF,{...Y("corner"),"data-hovered":V||void 0,"data-hidden":m==="never"||void 0})]})});Ar.displayName="@mantine/core/ScrollArea";const U_=tt((t,e)=>{const{children:n,classNames:r,styles:i,scrollbarSize:s,scrollHideDelay:o,type:u,dir:d,offsetScrollbars:f,viewportRef:m,onScrollPositionChange:y,unstyled:x,variant:b,viewportProps:w,scrollbars:S,style:D,vars:k,onBottomReached:O,onTopReached:N,...F}=Ne("ScrollAreaAutosize",PP,t);return c.jsx(Ee,{...F,ref:e,style:[{display:"flex",overflow:"auto"},D],children:c.jsx(Ee,{style:{display:"flex",flexDirection:"column",flex:1},children:c.jsx(Ar,{classNames:r,styles:i,scrollHideDelay:o,scrollbarSize:s,type:u,dir:d,offsetScrollbars:f,viewportRef:m,onScrollPositionChange:y,unstyled:x,variant:b,viewportProps:w,vars:k,scrollbars:S,onBottomReached:O,onTopReached:N,children:n})})})});Ar.classes=rE;U_.displayName="@mantine/core/ScrollAreaAutosize";U_.classes=rE;Ar.Autosize=U_;var IP={root:"m_87cf2631"};const cF={__staticSelector:"UnstyledButton"},Ta=vi((t,e)=>{const n=Ne("UnstyledButton",cF,t),{className:r,component:i="button",__staticSelector:s,unstyled:o,classNames:u,styles:d,style:f,...m}=n,y=vt({name:s,props:n,classes:IP,className:r,style:f,classNames:u,styles:d,unstyled:o});return c.jsx(Ee,{...y("root",{focusable:!0}),component:i,ref:e,type:i==="button"?"button":void 0,...m})});Ta.classes=IP;Ta.displayName="@mantine/core/UnstyledButton";var OP={root:"m_515a97f8"};const dF={},z_=tt((t,e)=>{const n=Ne("VisuallyHidden",dF,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,...f}=n,m=vt({name:"VisuallyHidden",classes:OP,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u});return c.jsx(Ee,{component:"span",ref:e,...m("root"),...f})});z_.classes=OP;z_.displayName="@mantine/core/VisuallyHidden";var NP={root:"m_1b7284a3"};const fF={},hF=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:nr(e),"--paper-shadow":NC(n)}}),Hi=vi((t,e)=>{const n=Ne("Paper",fF,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,withBorder:d,vars:f,radius:m,shadow:y,variant:x,mod:b,...w}=n,S=vt({name:"Paper",props:n,classes:NP,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:f,varsResolver:hF});return c.jsx(Ee,{ref:e,mod:[{"data-with-border":d},b],...S("root"),variant:x,...w})});Hi.classes=NP;Hi.displayName="@mantine/core/Paper";function MP(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),i=n==="right"?"left":"right";return r===void 0?i:`${i}-${r}`}return e}function G3(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function W3(t,e,n,r,i){return t==="center"||r==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:n}:t==="start"?{[i==="ltr"?"left":"right"]:n}:{}}const pF={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function mF({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:s,arrowY:o,dir:u}){const[d,f="center"]=t.split("-"),m={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[pF[d]]:r},y=-e/2;return d==="left"?{...m,...G3(f,o,n,i),right:y,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:d==="right"?{...m,...G3(f,o,n,i),left:y,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:d==="top"?{...m,...W3(f,s,n,i,u),bottom:y,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:d==="bottom"?{...m,...W3(f,s,n,i,u),top:y,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const iE=A.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:s,arrowX:o,arrowY:u,style:d,...f},m)=>{const{dir:y}=Xa();return s?c.jsx("div",{...f,ref:m,style:{...d,...mF({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:y,arrowX:o,arrowY:u})}}):null});iE.displayName="@mantine/core/FloatingArrow";var jP={root:"m_9814e45f"};const gF={zIndex:Gi("modal")},vF=(t,{gradient:e,color:n,backgroundOpacity:r,blur:i,radius:s,zIndex:o})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&Eu(n||"#000",r??.6)||void 0,"--overlay-filter":i?`blur(${Fe(i)})`:void 0,"--overlay-radius":s===void 0?void 0:nr(s),"--overlay-z-index":o?.toString()}}),Dg=vi((t,e)=>{const n=Ne("Overlay",gF,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,fixed:f,center:m,children:y,radius:x,zIndex:b,gradient:w,blur:S,color:D,backgroundOpacity:k,mod:O,...N}=n,F=vt({name:"Overlay",props:n,classes:jP,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:vF});return c.jsx(Ee,{ref:e,...F("root"),mod:[{center:m,fixed:f},O],...N,children:y})});Dg.classes=jP;Dg.displayName="@mantine/core/Overlay";function uT(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function yF({target:t,reuseTargetNode:e,...n}){if(t)return typeof t=="string"?document.querySelector(t)||uT(n):t;if(e){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const i=uT(n);return i.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(i),i}return uT(n)}const bF={},LP=tt((t,e)=>{const{children:n,target:r,reuseTargetNode:i,...s}=Ne("Portal",bF,t),[o,u]=A.useState(!1),d=A.useRef(null);return hp(()=>(u(!0),d.current=yF({target:r,reuseTargetNode:i,...s}),Cg(e,d.current),!r&&!i&&d.current&&document.body.appendChild(d.current),()=>{!r&&!i&&d.current&&document.body.removeChild(d.current)}),[r]),!o||!d.current?null:Oy.createPortal(c.jsx(c.Fragment,{children:n}),d.current)});LP.displayName="@mantine/core/Portal";const Gc=tt(({withinPortal:t=!0,children:e,...n},r)=>V5()==="test"||!t?c.jsx(c.Fragment,{children:e}):c.jsx(LP,{ref:r,...n,children:e}));Gc.displayName="@mantine/core/OptionalPortal";const Vv=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Jx={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Vv("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Vv("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Vv("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Vv("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Vv("top"),common:{transformOrigin:"top right"}}},X3={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function xF({transition:t,state:e,duration:n,timingFunction:r}){const i={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in Jx?{transitionProperty:Jx[t].transitionProperty,...i,...Jx[t].common,...Jx[t][X3[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[X3[e]]}}function _F({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:s,onEntered:o,onExited:u,enterDelay:d,exitDelay:f}){const m=ai(),y=k_(),x=m.respectReducedMotion?y:!1,[b,w]=A.useState(x?0:t),[S,D]=A.useState(r?"entered":"exited"),k=A.useRef(-1),O=A.useRef(-1),N=A.useRef(-1);function F(){window.clearTimeout(k.current),window.clearTimeout(O.current),cancelAnimationFrame(N.current)}const M=$=>{F();const q=$?i:s,B=$?o:u,z=x?0:$?t:e;w(z),z===0?(typeof q=="function"&&q(),typeof B=="function"&&B(),D($?"entered":"exited")):N.current=requestAnimationFrame(()=>{ny.flushSync(()=>{D($?"pre-entering":"pre-exiting")}),N.current=requestAnimationFrame(()=>{typeof q=="function"&&q(),D($?"entering":"exiting"),k.current=window.setTimeout(()=>{typeof B=="function"&&B(),D($?"entered":"exited")},z)})})},V=$=>{if(F(),typeof($?d:f)!="number"){M($);return}O.current=window.setTimeout(()=>{M($)},$?d:f)};return Ha(()=>{V(r)},[r]),A.useEffect(()=>()=>{F()},[]),{transitionDuration:b,transitionStatus:S,transitionTimingFunction:n||"ease"}}function Vu({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:i,children:s,timingFunction:o="ease",onExit:u,onEntered:d,onEnter:f,onExited:m,enterDelay:y,exitDelay:x}){const b=V5(),{transitionDuration:w,transitionStatus:S,transitionTimingFunction:D}=_F({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:u,onEntered:d,onEnter:f,onExited:m,enterDelay:y,exitDelay:x});return w===0||b==="test"?i?c.jsx(c.Fragment,{children:s({})}):t?s({display:"none"}):null:S==="exited"?t?s({display:"none"}):null:c.jsx(c.Fragment,{children:s(xF({transition:e,duration:w,state:S,timingFunction:D}))})}Vu.displayName="@mantine/core/Transition";const[SF,BP]=si("Popover component was not found in the tree");function $_({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const i=N7(e),s=ei(i,r);return Al(t)?A.cloneElement(t,{[n]:s}):t}function FP(t){return c.jsx(z_,{tabIndex:-1,"data-autofocus":!0,...t})}$_.displayName="@mantine/core/FocusTrap";FP.displayName="@mantine/core/FocusTrapInitialFocus";$_.InitialFocus=FP;var UP={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const TF={},sE=tt((t,e)=>{const n=Ne("PopoverDropdown",TF,t),{className:r,style:i,vars:s,children:o,onKeyDownCapture:u,variant:d,classNames:f,styles:m,...y}=n,x=BP(),b=O5({opened:x.opened,shouldReturnFocus:x.returnFocus}),w=x.withRoles?{"aria-labelledby":x.getTargetId(),id:x.getDropdownId(),role:"dialog",tabIndex:-1}:{},S=ei(e,x.floating);return x.disabled?null:c.jsx(Gc,{...x.portalProps,withinPortal:x.withinPortal,children:c.jsx(Vu,{mounted:x.opened,...x.transitionProps,transition:x.transitionProps?.transition||"fade",duration:x.transitionProps?.duration??150,keepMounted:x.keepMounted,exitDuration:typeof x.transitionProps?.exitDuration=="number"?x.transitionProps.exitDuration:x.transitionProps?.duration,children:D=>c.jsx($_,{active:x.trapFocus&&x.opened,innerRef:S,children:c.jsxs(Ee,{...w,...y,variant:d,onKeyDownCapture:S7(()=>{x.onClose?.(),x.onDismiss?.()},{active:x.closeOnEscape,onTrigger:b,onKeyDown:u}),"data-position":x.placement,"data-fixed":x.floatingStrategy==="fixed"||void 0,...x.getStyles("dropdown",{className:r,props:n,classNames:f,styles:m,style:[{...D,zIndex:x.zIndex,top:x.y??0,left:x.x??0,width:x.width==="target"?void 0:Fe(x.width)},x.resolvedStyles.dropdown,m?.dropdown,i]}),children:[o,c.jsx(iE,{ref:x.arrowRef,arrowX:x.arrowX,arrowY:x.arrowY,visible:x.withArrow,position:x.placement,arrowSize:x.arrowSize,arrowRadius:x.arrowRadius,arrowOffset:x.arrowOffset,arrowPosition:x.arrowPosition,...x.getStyles("arrow",{props:n,classNames:f,styles:m})})]})})})})});sE.classes=UP;sE.displayName="@mantine/core/PopoverDropdown";const wF={refProp:"ref",popupType:"dialog"},zP=tt((t,e)=>{const{children:n,refProp:r,popupType:i,...s}=Ne("PopoverTarget",wF,t);if(!Al(n))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=s,u=BP(),d=ei(u.reference,R_(n),e),f=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:u.getTargetId()}:{};return A.cloneElement(n,{...o,...f,...u.targetProps,className:ii(u.targetProps.className,o.className,n.props.className),[r]:d,...u.controlled?null:{onClick:u.onToggle}})});zP.displayName="@mantine/core/PopoverTarget";function $P({opened:t,floating:e,position:n,positionDependencies:r}){const[i,s]=A.useState(0);A.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current&&t)return bB(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,n]),Ha(()=>{e.update()},r),Ha(()=>{s(o=>o+1)},[t])}function CF(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function EF(t,e){const n=CF(t.middlewares),r=[mP(t.offset)];return n.shift&&r.push(QC(typeof n.shift=="boolean"?{limiter:B3(),padding:5}:{limiter:B3(),padding:5,...n.shift})),n.flip&&r.push(typeof n.flip=="boolean"?V1():V1(n.flip)),n.inline&&r.push(typeof n.inline=="boolean"?cy():cy(n.inline)),r.push(gP({element:t.arrowRef,padding:t.arrowOffset})),(n.size||t.width==="target")&&r.push(PB({...typeof n.size=="boolean"?{}:n.size,apply({rects:i,availableWidth:s,availableHeight:o,...u}){const f=e().refs.floating.current?.style??{};n.size&&(typeof n.size=="object"&&n.size.apply?n.size.apply({rects:i,availableWidth:s,availableHeight:o,...u}):Object.assign(f,{maxWidth:`${s}px`,maxHeight:`${o}px`})),t.width==="target"&&Object.assign(f,{width:`${i.reference.width}px`})}})),r}function AF(t){const[e,n]=Zr({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),r=A.useRef(e),i=()=>{e&&!t.disabled&&n(!1)},s=()=>!t.disabled&&n(!e),o=tE({strategy:t.strategy,placement:t.position,middleware:EF(t,()=>o)});return $P({opened:e,position:t.position,positionDependencies:t.positionDependencies||[],floating:o}),Ha(()=>{t.onPositionChange?.(o.placement)},[o.placement]),Ha(()=>{e!==r.current&&(e?t.onOpen?.():t.onClose?.()),r.current=e},[e,t.onClose,t.onOpen]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:i,onToggle:s}}const DF={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Gi("popover"),__staticSelector:"Popover",width:"max-content"},kF=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:nr(e),"--popover-shadow":NC(n)}});function Ca(t){const e=Ne("Popover",DF,t),{children:n,position:r,offset:i,onPositionChange:s,positionDependencies:o,opened:u,transitionProps:d,onExitTransitionEnd:f,onEnterTransitionEnd:m,width:y,middlewares:x,withArrow:b,arrowSize:w,arrowOffset:S,arrowRadius:D,arrowPosition:k,unstyled:O,classNames:N,styles:F,closeOnClickOutside:M,withinPortal:V,portalProps:$,closeOnEscape:q,clickOutsideEvents:B,trapFocus:z,onClose:ee,onDismiss:Y,onOpen:Q,onChange:oe,zIndex:ue,radius:H,shadow:te,id:Z,defaultOpened:ie,__staticSelector:G,withRoles:X,disabled:fe,returnFocus:be,variant:we,keepMounted:pe,vars:Ce,floatingStrategy:Ke,withOverlay:Me,overlayProps:lt,...bt}=e,mt=vt({name:G,props:e,classes:UP,classNames:N,styles:F,unstyled:O,rootSelector:"dropdown",vars:Ce,varsResolver:kF}),{resolvedStyles:_t}=zu({classNames:N,styles:F,props:e}),Qt=A.useRef(null),[xt,wt]=A.useState(null),[Ot,qe]=A.useState(null),{dir:Le}=Xa(),He=ls(Z),Xe=AF({middlewares:x,width:y,position:MP(Le,r),offset:typeof i=="number"?i+(b?w/2:0):i,arrowRef:Qt,arrowOffset:S,onPositionChange:s,positionDependencies:o,opened:u,defaultOpened:ie,onChange:oe,onOpen:Q,onClose:ee,onDismiss:Y,strategy:Ke,disabled:fe});E7(()=>{M&&(Xe.onClose(),Y?.())},B,[xt,Ot]);const he=A.useCallback(Ze=>{wt(Ze),Xe.floating.refs.setReference(Ze)},[Xe.floating.refs.setReference]),Ae=A.useCallback(Ze=>{qe(Ze),Xe.floating.refs.setFloating(Ze)},[Xe.floating.refs.setFloating]),rt=A.useCallback(()=>{d?.onExited?.(),f?.()},[d?.onExited,f]),$e=A.useCallback(()=>{d?.onEntered?.(),m?.()},[d?.onEntered,m]);return c.jsxs(SF,{value:{returnFocus:be,disabled:fe,controlled:Xe.controlled,reference:he,floating:Ae,x:Xe.floating.x,y:Xe.floating.y,arrowX:Xe.floating?.middlewareData?.arrow?.x,arrowY:Xe.floating?.middlewareData?.arrow?.y,opened:Xe.opened,arrowRef:Qt,transitionProps:{...d,onExited:rt,onEntered:$e},width:y,withArrow:b,arrowSize:w,arrowOffset:S,arrowRadius:D,arrowPosition:k,placement:Xe.floating.placement,trapFocus:z,withinPortal:V,portalProps:$,zIndex:ue,radius:H,shadow:te,closeOnEscape:q,onDismiss:Y,onClose:Xe.onClose,onToggle:Xe.onToggle,getTargetId:()=>`${He}-target`,getDropdownId:()=>`${He}-dropdown`,withRoles:X,targetProps:bt,__staticSelector:G,classNames:N,styles:F,unstyled:O,variant:we,keepMounted:pe,getStyles:mt,resolvedStyles:_t,floatingStrategy:Ke},children:[n,Me&&c.jsx(Vu,{transition:"fade",mounted:Xe.opened,duration:d?.duration||250,exitDuration:d?.exitDuration||250,children:Ze=>c.jsx(Gc,{withinPortal:V,children:c.jsx(Dg,{...lt,...mt("overlay",{className:lt?.className,style:[Ze,lt?.style]})})})})]})}Ca.Target=zP;Ca.Dropdown=sE;Ca.displayName="@mantine/core/Popover";Ca.extend=t=>t;var xl={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const VP=A.forwardRef(({className:t,...e},n)=>c.jsxs(Ee,{component:"span",className:ii(xl.barsLoader,t),...e,ref:n,children:[c.jsx("span",{className:xl.bar}),c.jsx("span",{className:xl.bar}),c.jsx("span",{className:xl.bar})]}));VP.displayName="@mantine/core/Bars";const HP=A.forwardRef(({className:t,...e},n)=>c.jsxs(Ee,{component:"span",className:ii(xl.dotsLoader,t),...e,ref:n,children:[c.jsx("span",{className:xl.dot}),c.jsx("span",{className:xl.dot}),c.jsx("span",{className:xl.dot})]}));HP.displayName="@mantine/core/Dots";const qP=A.forwardRef(({className:t,...e},n)=>c.jsx(Ee,{component:"span",className:ii(xl.ovalLoader,t),...e,ref:n}));qP.displayName="@mantine/core/Oval";const GP={bars:VP,oval:qP,dots:HP},RF={loaders:GP,type:"oval"},PF=(t,{size:e,color:n})=>({root:{"--loader-size":Xt(e,"loader-size"),"--loader-color":n?gr(n,t):void 0}}),ju=tt((t,e)=>{const n=Ne("Loader",RF,t),{size:r,color:i,type:s,vars:o,className:u,style:d,classNames:f,styles:m,unstyled:y,loaders:x,variant:b,children:w,...S}=n,D=vt({name:"Loader",props:n,classes:xl,className:u,style:d,classNames:f,styles:m,unstyled:y,vars:o,varsResolver:PF});return w?c.jsx(Ee,{...D("root"),ref:e,...S,children:w}):c.jsx(Ee,{...D("root"),ref:e,component:x[s],variant:b,size:r,...S})});ju.defaultLoaders=GP;ju.classes=xl;ju.displayName="@mantine/core/Loader";var Yg={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const Y3={orientation:"horizontal"},IF=(t,{borderWidth:e})=>({group:{"--ai-border-width":Fe(e)}}),aE=tt((t,e)=>{const n=Ne("ActionIconGroup",Y3,t),{className:r,style:i,classNames:s,styles:o,unstyled:u,orientation:d,vars:f,borderWidth:m,variant:y,mod:x,...b}=Ne("ActionIconGroup",Y3,t),w=vt({name:"ActionIconGroup",props:n,classes:Yg,className:r,style:i,classNames:s,styles:o,unstyled:u,vars:f,varsResolver:IF,rootSelector:"group"});return c.jsx(Ee,{...w("group"),ref:e,variant:y,mod:[{"data-orientation":d},x],role:"group",...b})});aE.classes=Yg;aE.displayName="@mantine/core/ActionIconGroup";const K3={},OF=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":Xt(o,"section-height"),"--section-padding-x":Xt(o,"section-padding-x"),"--section-fz":ki(o),"--section-radius":e===void 0?void 0:nr(e),"--section-bg":n||i?u.background:void 0,"--section-color":u.color,"--section-bd":n||i?u.border:void 0}}},oE=tt((t,e)=>{const n=Ne("ActionIconGroupSection",K3,t),{className:r,style:i,classNames:s,styles:o,unstyled:u,vars:d,variant:f,gradient:m,radius:y,autoContrast:x,...b}=Ne("ActionIconGroupSection",K3,t),w=vt({name:"ActionIconGroupSection",props:n,classes:Yg,className:r,style:i,classNames:s,styles:o,unstyled:u,vars:d,varsResolver:OF,rootSelector:"groupSection"});return c.jsx(Ee,{...w("groupSection"),ref:e,variant:f,...b})});oE.classes=Yg;oE.displayName="@mantine/core/ActionIconGroupSection";const NF={},MF=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o})=>{const u=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--ai-size":Xt(e,"ai-size"),"--ai-radius":n===void 0?void 0:nr(n),"--ai-bg":s||r?u.background:void 0,"--ai-hover":s||r?u.hover:void 0,"--ai-hover-color":s||r?u.hoverColor:void 0,"--ai-color":u.color,"--ai-bd":s||r?u.border:void 0}}},br=vi((t,e)=>{const n=Ne("ActionIcon",NF,t),{className:r,unstyled:i,variant:s,classNames:o,styles:u,style:d,loading:f,loaderProps:m,size:y,color:x,radius:b,__staticSelector:w,gradient:S,vars:D,children:k,disabled:O,"data-disabled":N,autoContrast:F,mod:M,...V}=n,$=vt({name:["ActionIcon",w],props:n,className:r,style:d,classes:Yg,classNames:o,styles:u,unstyled:i,vars:D,varsResolver:MF});return c.jsxs(Ta,{...$("root",{active:!O&&!f&&!N}),...V,unstyled:i,variant:s,size:y,disabled:O||f,ref:e,mod:[{loading:f,disabled:O||N},M],children:[c.jsx(Vu,{mounted:!!f,transition:"slide-down",duration:150,children:q=>c.jsx(Ee,{component:"span",...$("loader",{style:q}),"aria-hidden":!0,children:c.jsx(ju,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...m})})}),c.jsx(Ee,{component:"span",mod:{loading:f},...$("icon"),children:k})]})});br.classes=Yg;br.displayName="@mantine/core/ActionIcon";br.Group=aE;br.GroupSection=oE;const WP=A.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},r)=>c.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:r,...n,children:c.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));WP.displayName="@mantine/core/CloseIcon";var XP={root:"m_86a44da5","root--subtle":"m_220c80f2"};const jF={variant:"subtle"},LF=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":Xt(e,"cb-size"),"--cb-radius":n===void 0?void 0:nr(n),"--cb-icon-size":Fe(r)}}),Kg=vi((t,e)=>{const n=Ne("CloseButton",jF,t),{iconSize:r,children:i,vars:s,radius:o,className:u,classNames:d,style:f,styles:m,unstyled:y,"data-disabled":x,disabled:b,variant:w,icon:S,mod:D,__staticSelector:k,...O}=n,N=vt({name:k||"CloseButton",props:n,className:u,style:f,classes:XP,classNames:d,styles:m,unstyled:y,vars:s,varsResolver:LF});return c.jsxs(Ta,{ref:e,...O,unstyled:y,variant:w,disabled:b,mod:[{disabled:b||x},D],...N("root",{variant:w,active:!b&&!x}),children:[S||c.jsx(WP,{}),i]})});Kg.classes=XP;Kg.displayName="@mantine/core/CloseButton";function BF(t){return A.Children.toArray(t).filter(Boolean)}var YP={root:"m_4081bf90"};const FF={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},UF=(t,{grow:e,preventGrowOverflow:n,gap:r,align:i,justify:s,wrap:o},{childWidth:u})=>({root:{"--group-child-width":e&&n?u:void 0,"--group-gap":Di(r),"--group-align":i,"--group-justify":s,"--group-wrap":o}}),ut=tt((t,e)=>{const n=Ne("Group",FF,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,children:d,gap:f,align:m,justify:y,wrap:x,grow:b,preventGrowOverflow:w,vars:S,variant:D,__size:k,mod:O,...N}=n,F=BF(d),M=F.length,V=Di(f??"md"),q={childWidth:`calc(${100/M}% - (${V} - ${V} / ${M}))`},B=vt({name:"Group",props:n,stylesCtx:q,className:i,style:s,classes:YP,classNames:r,styles:o,unstyled:u,vars:S,varsResolver:UF});return c.jsx(Ee,{...B("root"),ref:e,variant:D,mod:[{grow:b},O],size:k,...N,children:F})});ut.classes=YP;ut.displayName="@mantine/core/Group";const[zF,Wc]=si("ModalBase component was not found in tree");function $F({opened:t,transitionDuration:e}){const[n,r]=A.useState(t),i=A.useRef(-1),o=k_()?0:e;return A.useEffect(()=>(t?(r(!0),window.clearTimeout(i.current)):o===0?r(!1):i.current=window.setTimeout(()=>r(!1),o),()=>window.clearTimeout(i.current)),[t,o]),n}function VF({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:i,onClose:s,returnFocus:o}){const u=ls(t),[d,f]=A.useState(!1),[m,y]=A.useState(!1),x=typeof e?.duration=="number"?e?.duration:200,b=$F({opened:n,transitionDuration:x});return B1("keydown",w=>{w.key==="Escape"&&i&&!w.isComposing&&n&&w.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&s()},{capture:!0}),O5({opened:n,shouldReturnFocus:r&&o}),{_id:u,titleMounted:d,bodyMounted:m,shouldLockScroll:b,setTitleMounted:f,setBodyMounted:y}}const lE=A.forwardRef(({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:s,onEnterTransitionEnd:o,trapFocus:u,closeOnEscape:d,returnFocus:f,closeOnClickOutside:m,withinPortal:y,portalProps:x,lockScroll:b,children:w,zIndex:S,shadow:D,padding:k,__vars:O,unstyled:N,removeScrollProps:F,...M},V)=>{const{_id:$,titleMounted:q,bodyMounted:B,shouldLockScroll:z,setTitleMounted:ee,setBodyMounted:Y}=VF({id:r,transitionProps:i,opened:e,trapFocus:u,closeOnEscape:d,onClose:n,returnFocus:f}),{key:Q,...oe}=F||{};return c.jsx(Gc,{...x,withinPortal:y,children:c.jsx(zF,{value:{opened:e,onClose:n,closeOnClickOutside:m,onExitTransitionEnd:s,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${$}-title`,getBodyId:()=>`${$}-body`,titleMounted:q,bodyMounted:B,setTitleMounted:ee,setBodyMounted:Y,trapFocus:u,closeOnEscape:d,zIndex:S,unstyled:N},children:c.jsx(wg,{enabled:z&&b,...oe,children:c.jsx(Ee,{ref:V,...M,__vars:{...O,"--mb-z-index":(S||Gi("modal")).toString(),"--mb-shadow":NC(D),"--mb-padding":Di(k)},children:w})},Q)})})});lE.displayName="@mantine/core/ModalBase";function HF(){const t=Wc();return A.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var kg={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const uE=A.forwardRef(({className:t,...e},n)=>{const r=HF(),i=Wc();return c.jsx(Ee,{ref:n,...e,id:r,className:ii({[kg.body]:!i.unstyled},t)})});uE.displayName="@mantine/core/ModalBaseBody";const cE=A.forwardRef(({className:t,onClick:e,...n},r)=>{const i=Wc();return c.jsx(Kg,{ref:r,...n,onClick:s=>{i.onClose(),e?.(s)},className:ii({[kg.close]:!i.unstyled},t),unstyled:i.unstyled})});cE.displayName="@mantine/core/ModalBaseCloseButton";const dE=A.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:i,...s},o)=>{const u=Wc();return c.jsx(Vu,{mounted:u.opened,transition:"pop",...u.transitionProps,onExited:()=>{u.onExitTransitionEnd?.(),u.transitionProps?.onExited?.()},onEntered:()=>{u.onEnterTransitionEnd?.(),u.transitionProps?.onEntered?.()},...t,children:d=>c.jsx("div",{...n,className:ii({[kg.inner]:!u.unstyled},n.className),children:c.jsx($_,{active:u.opened&&u.trapFocus,innerRef:o,children:c.jsx(Hi,{...s,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":u.bodyMounted?u.getBodyId():void 0,"aria-labelledby":u.titleMounted?u.getTitleId():void 0,style:[i,d],className:ii({[kg.content]:!u.unstyled},e),unstyled:u.unstyled,children:s.children})})})})});dE.displayName="@mantine/core/ModalBaseContent";const fE=A.forwardRef(({className:t,...e},n)=>{const r=Wc();return c.jsx(Ee,{component:"header",ref:n,className:ii({[kg.header]:!r.unstyled},t),...e})});fE.displayName="@mantine/core/ModalBaseHeader";const qF={duration:200,timingFunction:"ease",transition:"fade"};function GF(t){const e=Wc();return{...qF,...e.transitionProps,...t}}const hE=A.forwardRef(({onClick:t,transitionProps:e,style:n,visible:r,...i},s)=>{const o=Wc(),u=GF(e);return c.jsx(Vu,{mounted:r!==void 0?r:o.opened,...u,transition:"fade",children:d=>c.jsx(Dg,{ref:s,fixed:!0,style:[n,d],zIndex:o.zIndex,unstyled:o.unstyled,onClick:f=>{t?.(f),o.closeOnClickOutside&&o.onClose()},...i})})});hE.displayName="@mantine/core/ModalBaseOverlay";function WF(){const t=Wc();return A.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const pE=A.forwardRef(({className:t,...e},n)=>{const r=WF(),i=Wc();return c.jsx(Ee,{component:"h2",ref:n,className:ii({[kg.title]:!i.unstyled},t),...e,id:r})});pE.displayName="@mantine/core/ModalBaseTitle";function KP({children:t}){return c.jsx(c.Fragment,{children:t})}const[XF,YF]=pf({size:"sm"}),KF={},QP=tt((t,e)=>{const n=Ne("InputClearButton",KF,t),{size:r,variant:i,vars:s,classNames:o,styles:u,...d}=n,f=YF(),{resolvedClassNames:m,resolvedStyles:y}=zu({classNames:o,styles:u,props:n});return c.jsx(Kg,{variant:i||"transparent",ref:e,size:r||f?.size||"sm",classNames:m,styles:y,__staticSelector:"InputClearButton",...d})});QP.displayName="@mantine/core/InputClearButton";const[QF,Qg]=pf({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Po={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const Q3={},ZF=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${ki(e)} - ${Fe(2)})`}}),V_=tt((t,e)=>{const n=Ne("InputDescription",Q3,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,size:f,__staticSelector:m,__inheritStyles:y=!0,variant:x,...b}=Ne("InputDescription",Q3,n),w=Qg(),S=vt({name:["InputWrapper",m],props:n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"description",vars:d,varsResolver:ZF}),D=y&&w?.getStyles||S;return c.jsx(Ee,{component:"p",ref:e,variant:x,size:f,...D("description",w?.getStyles?{className:i,style:s}:void 0),...b})});V_.classes=Po;V_.displayName="@mantine/core/InputDescription";const JF={},eU=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${ki(e)} - ${Fe(2)})`}}),H_=tt((t,e)=>{const n=Ne("InputError",JF,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,size:f,__staticSelector:m,__inheritStyles:y=!0,variant:x,...b}=n,w=vt({name:["InputWrapper",m],props:n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"error",vars:d,varsResolver:eU}),S=Qg(),D=y&&S?.getStyles||w;return c.jsx(Ee,{component:"p",ref:e,variant:x,size:f,...D("error",S?.getStyles?{className:i,style:s}:void 0),...b})});H_.classes=Po;H_.displayName="@mantine/core/InputError";const Z3={labelElement:"label"},tU=(t,{size:e})=>({label:{"--input-label-size":ki(e),"--input-asterisk-color":void 0}}),q_=tt((t,e)=>{const n=Ne("InputLabel",Z3,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,labelElement:f,size:m,required:y,htmlFor:x,onMouseDown:b,children:w,__staticSelector:S,variant:D,mod:k,...O}=Ne("InputLabel",Z3,n),N=vt({name:["InputWrapper",S],props:n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"label",vars:d,varsResolver:tU}),F=Qg(),M=F?.getStyles||N;return c.jsxs(Ee,{...M("label",F?.getStyles?{className:i,style:s}:void 0),component:f,variant:D,size:m,ref:e,htmlFor:f==="label"?x:void 0,mod:[{required:y},k],onMouseDown:V=>{b?.(V),!V.defaultPrevented&&V.detail>1&&V.preventDefault()},...O,children:[w,y&&c.jsx("span",{...M("required"),"aria-hidden":!0,children:" *"})]})});q_.classes=Po;q_.displayName="@mantine/core/InputLabel";const J3={},mE=tt((t,e)=>{const n=Ne("InputPlaceholder",J3,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,__staticSelector:f,variant:m,error:y,mod:x,...b}=Ne("InputPlaceholder",J3,n),w=vt({name:["InputPlaceholder",f],props:n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"placeholder"});return c.jsx(Ee,{...w("placeholder"),mod:[{error:!!y},x],component:"span",variant:m,ref:e,...b})});mE.classes=Po;mE.displayName="@mantine/core/InputPlaceholder";function nU(t,{hasDescription:e,hasError:n}){const r=t.findIndex(d=>d==="input"),i=t.slice(0,r),s=t.slice(r+1),o=e&&i.includes("description")||n&&i.includes("error");return{offsetBottom:e&&s.includes("description")||n&&s.includes("error"),offsetTop:o}}const rU={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},iU=(t,{size:e})=>({label:{"--input-label-size":ki(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${ki(e)} - ${Fe(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${ki(e)} - ${Fe(2)})`}}),gE=tt((t,e)=>{const n=Ne("InputWrapper",rU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,size:f,variant:m,__staticSelector:y,inputContainer:x,inputWrapperOrder:b,label:w,error:S,description:D,labelProps:k,descriptionProps:O,errorProps:N,labelElement:F,children:M,withAsterisk:V,id:$,required:q,__stylesApiProps:B,mod:z,...ee}=n,Y=vt({name:["InputWrapper",y],props:B||n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:iU}),Q={size:f,variant:m,__staticSelector:y},oe=ls($),ue=typeof V=="boolean"?V:q,H=N?.id||`${oe}-error`,te=O?.id||`${oe}-description`,Z=oe,ie=!!S&&typeof S!="boolean",G=!!D,X=`${ie?H:""} ${G?te:""}`,fe=X.trim().length>0?X.trim():void 0,be=k?.id||`${oe}-label`,we=w&&c.jsx(q_,{labelElement:F,id:be,htmlFor:Z,required:ue,...Q,...k,children:w},"label"),pe=G&&c.jsx(V_,{...O,...Q,size:O?.size||Q.size,id:O?.id||te,children:D},"description"),Ce=c.jsx(A.Fragment,{children:x(M)},"input"),Ke=ie&&A.createElement(H_,{...N,...Q,size:N?.size||Q.size,key:"error",id:N?.id||H},S),Me=b.map(lt=>{switch(lt){case"label":return we;case"input":return Ce;case"description":return pe;case"error":return Ke;default:return null}});return c.jsx(QF,{value:{getStyles:Y,describedBy:fe,inputId:Z,labelId:be,...nU(b,{hasDescription:G,hasError:ie})},children:c.jsx(Ee,{ref:e,variant:m,size:f,mod:[{error:!!S},z],...Y("root"),...ee,children:Me})})});gE.classes=Po;gE.displayName="@mantine/core/InputWrapper";const sU={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},aU=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Xt(e.size,"input-height"),"--input-fz":ki(e.size),"--input-radius":e.radius===void 0?void 0:nr(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Fe(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Fe(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?Xt(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),Nr=vi((t,e)=>{const n=Ne("Input",sU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,required:d,__staticSelector:f,__stylesApiProps:m,size:y,wrapperProps:x,error:b,disabled:w,leftSection:S,leftSectionProps:D,leftSectionWidth:k,rightSection:O,rightSectionProps:N,rightSectionWidth:F,rightSectionPointerEvents:M,leftSectionPointerEvents:V,variant:$,vars:q,pointer:B,multiline:z,radius:ee,id:Y,withAria:Q,withErrorStyles:oe,mod:ue,inputSize:H,__clearSection:te,__clearable:Z,__defaultRightSection:ie,...G}=n,{styleProps:X,rest:fe}=mp(G),be=Qg(),we={offsetBottom:be?.offsetBottom,offsetTop:be?.offsetTop},pe=vt({name:["Input",f],props:m||n,classes:Po,className:i,style:s,classNames:r,styles:o,unstyled:u,stylesCtx:we,rootSelector:"wrapper",vars:q,varsResolver:aU}),Ce=Q?{required:d,disabled:w,"aria-invalid":!!b,"aria-describedby":be?.describedBy,id:be?.inputId||Y}:{},Ke=O||Z&&te||ie;return c.jsx(XF,{value:{size:y||"sm"},children:c.jsxs(Ee,{...pe("wrapper"),...X,...x,mod:[{error:!!b&&oe,pointer:B,disabled:w,multiline:z,"data-with-right-section":!!Ke,"data-with-left-section":!!S},ue],variant:$,size:y,children:[S&&c.jsx("div",{...D,"data-position":"left",...pe("section",{className:D?.className,style:D?.style}),children:S}),c.jsx(Ee,{component:"input",...fe,...Ce,ref:e,required:d,mod:{disabled:w,error:!!b&&oe},variant:$,__size:H,...pe("input")}),Ke&&c.jsx("div",{...N,"data-position":"right",...pe("section",{className:N?.className,style:N?.style}),children:Ke})]})})});Nr.classes=Po;Nr.Wrapper=gE;Nr.Label=q_;Nr.Error=H_;Nr.Description=V_;Nr.Placeholder=mE;Nr.ClearButton=QP;Nr.displayName="@mantine/core/Input";function oU(t,e,n){const r=Ne(t,e,n),{label:i,description:s,error:o,required:u,classNames:d,styles:f,className:m,unstyled:y,__staticSelector:x,__stylesApiProps:b,errorProps:w,labelProps:S,descriptionProps:D,wrapperProps:k,id:O,size:N,style:F,inputContainer:M,inputWrapperOrder:V,withAsterisk:$,variant:q,vars:B,mod:z,...ee}=r,{styleProps:Y,rest:Q}=mp(ee),oe={label:i,description:s,error:o,required:u,classNames:d,className:m,__staticSelector:x,__stylesApiProps:b||r,errorProps:w,labelProps:S,descriptionProps:D,unstyled:y,styles:f,size:N,style:F,inputContainer:M,inputWrapperOrder:V,withAsterisk:$,variant:q,id:O,mod:z,...k};return{...Q,classNames:d,styles:f,unstyled:y,wrapperProps:{...oe,...Y},inputProps:{required:u,classNames:d,styles:f,unstyled:y,size:N,__staticSelector:x,__stylesApiProps:b||r,error:o,variant:q,id:O}}}const lU={__staticSelector:"InputBase",withAria:!0},Ea=vi((t,e)=>{const{inputProps:n,wrapperProps:r,...i}=oU("InputBase",lU,t);return c.jsx(Nr.Wrapper,{...r,children:c.jsx(Nr,{...n,...i,ref:e})})});Ea.classes={...Nr.classes,...Nr.Wrapper.classes};Ea.displayName="@mantine/core/InputBase";const uU={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var ZP={root:"m_8bffd616"};const cU={},H1=vi((t,e)=>{const n=Ne("Flex",cU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,gap:f,rowGap:m,columnGap:y,align:x,justify:b,wrap:w,direction:S,...D}=n,k=vt({name:"Flex",classes:ZP,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d}),O=ai(),N=O_(),F=Y5({styleProps:{gap:f,rowGap:m,columnGap:y,align:x,justify:b,wrap:w,direction:S},theme:O,data:uU});return c.jsxs(c.Fragment,{children:[F.hasResponsiveStyles&&c.jsx(Iy,{selector:`.${N}`,styles:F.styles,media:F.media}),c.jsx(Ee,{ref:e,...k("root",{className:N,style:qg(F.inlineStyles)}),...D})]})});H1.classes=ZP;H1.displayName="@mantine/core/Flex";function dU(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function fU({target:t,parent:e,ref:n,displayAfterTransitionEnd:r}){const i=A.useRef(-1),[s,o]=A.useState(!1),[u,d]=A.useState(typeof r=="boolean"?r:!1),f=()=>{if(!t||!e||!n.current)return;const b=t.getBoundingClientRect(),w=e.getBoundingClientRect(),S=window.getComputedStyle(t),D=window.getComputedStyle(e),k=lf(S.borderTopWidth)+lf(D.borderTopWidth),O=lf(S.borderLeftWidth)+lf(D.borderLeftWidth),N={top:b.top-w.top-k,left:b.left-w.left-O,width:b.width,height:b.height};n.current.style.transform=`translateY(${N.top}px) translateX(${N.left}px)`,n.current.style.width=`${N.width}px`,n.current.style.height=`${N.height}px`},m=()=>{window.clearTimeout(i.current),n.current&&(n.current.style.transitionDuration="0ms"),f(),i.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},y=A.useRef(null),x=A.useRef(null);return A.useEffect(()=>{if(f(),t)return y.current=new ResizeObserver(m),y.current.observe(t),e&&(x.current=new ResizeObserver(m),x.current.observe(e)),()=>{y.current?.disconnect(),x.current?.disconnect()}},[e,t]),A.useEffect(()=>{if(e){const b=w=>{dU(w.target,e)&&(m(),d(!1))};return e.addEventListener("transitionend",b),()=>{e.removeEventListener("transitionend",b)}}},[e]),K7(()=>{z5()!=="test"&&o(!0)},20,{autoInvoke:!0}),Z7(b=>{b.forEach(w=>{w.type==="attributes"&&w.attributeName==="dir"&&m()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:s,hidden:u}}var JP={root:"m_96b553a6"};const hU={},pU=(t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}}),vE=tt((t,e)=>{const n=Ne("FloatingIndicator",hU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,target:f,parent:m,transitionDuration:y,mod:x,displayAfterTransitionEnd:b,...w}=n,S=vt({name:"FloatingIndicator",classes:JP,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:pU}),D=A.useRef(null),{initialized:k,hidden:O}=fU({target:f,parent:m,ref:D,displayAfterTransitionEnd:b}),N=ei(e,D);return!f||!m?null:c.jsx(Ee,{ref:N,mod:[{initialized:k,hidden:O},x],...S("root"),...w})});vE.displayName="@mantine/core/FloatingIndicator";vE.classes=JP;const[mU,yE]=si("Accordion component was not found in the tree");function G_({style:t,size:e=16,...n}){return c.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:Fe(e),height:Fe(e),display:"block"},...n,children:c.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}G_.displayName="@mantine/core/AccordionChevron";const[gU,eI]=si("Accordion.Item component was not found in the tree");var My={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const vU={},bE=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,chevron:u,icon:d,onClick:f,onKeyDown:m,children:y,disabled:x,mod:b,...w}=Ne("AccordionControl",vU,t),{value:S}=eI(),D=yE(),k=D.isItemActive(S),O=typeof D.order=="number",N=`h${D.order}`,F=c.jsxs(Ta,{...w,...D.getStyles("control",{className:r,classNames:n,style:i,styles:s,variant:D.variant}),unstyled:D.unstyled,mod:["accordion-control",{active:k,"chevron-position":D.chevronPosition,disabled:x},b],ref:e,onClick:M=>{f?.(M),D.onChange(S)},type:"button",disabled:x,"aria-expanded":k,"aria-controls":D.getRegionId(S),id:D.getControlId(S),onKeyDown:OC({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:D.loop,orientation:"vertical",onKeyDown:m}),children:[c.jsx(Ee,{component:"span",mod:{rotate:!D.disableChevronRotation&&k,position:D.chevronPosition},...D.getStyles("chevron",{classNames:n,styles:s}),children:u||D.chevron}),c.jsx("span",{...D.getStyles("label",{classNames:n,styles:s}),children:y}),d&&c.jsx(Ee,{component:"span",mod:{"chevron-position":D.chevronPosition},...D.getStyles("icon",{classNames:n,styles:s}),children:d})]});return O?c.jsx(N,{...D.getStyles("itemTitle",{classNames:n,styles:s}),children:F}):F});bE.displayName="@mantine/core/AccordionControl";bE.classes=My;const yU={},xE=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,value:u,mod:d,...f}=Ne("AccordionItem",yU,t),m=yE();return c.jsx(gU,{value:{value:u},children:c.jsx(Ee,{ref:e,mod:[{active:m.isItemActive(u)},d],...m.getStyles("item",{className:r,classNames:n,styles:s,style:i,variant:m.variant}),...f})})});xE.displayName="@mantine/core/AccordionItem";xE.classes=My;const bU={},_E=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,children:u,...d}=Ne("AccordionPanel",bU,t),{value:f}=eI(),m=yE();return c.jsx(gp,{ref:e,...m.getStyles("panel",{className:r,classNames:n,style:i,styles:s}),...d,in:m.isItemActive(f),transitionDuration:m.transitionDuration??200,role:"region",id:m.getRegionId(f),"aria-labelledby":m.getControlId(f),children:c.jsx("div",{...m.getStyles("content",{classNames:n,styles:s}),children:u})})});_E.displayName="@mantine/core/AccordionPanel";_E.classes=My;const xU={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevron:c.jsx(G_,{})},_U=(t,{transitionDuration:e,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:Fe(n),"--accordion-radius":r===void 0?void 0:nr(r)}});function Tt(t){const e=Ne("Accordion",xU,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:u,children:d,multiple:f,value:m,defaultValue:y,onChange:x,id:b,loop:w,transitionDuration:S,disableChevronRotation:D,chevronPosition:k,chevronSize:O,order:N,chevron:F,variant:M,radius:V,...$}=e,q=ls(b),[B,z]=Zr({value:m,defaultValue:y,finalValue:f?[]:null,onChange:x}),ee=oe=>Array.isArray(B)?B.includes(oe):oe===B,Y=oe=>{const ue=Array.isArray(B)?B.includes(oe)?B.filter(H=>H!==oe):[...B,oe]:oe===B?null:oe;z(ue)},Q=vt({name:"Accordion",classes:My,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,vars:u,varsResolver:_U});return c.jsx(mU,{value:{isItemActive:ee,onChange:Y,getControlId:O1(`${q}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:O1(`${q}-panel`,"Accordion.Item component was rendered with invalid value or without value"),transitionDuration:S,disableChevronRotation:D,chevronPosition:k,order:N,chevron:F,loop:w,getStyles:Q,variant:M,unstyled:o},children:c.jsx(Ee,{...Q("root"),id:q,...$,variant:M,"data-accordion":!0,children:d})})}const SU=t=>t;Tt.extend=SU;Tt.withProps=eP(Tt);Tt.classes=My;Tt.displayName="@mantine/core/Accordion";Tt.Item=xE;Tt.Panel=_E;Tt.Control=bE;Tt.Chevron=G_;var tI={root:"m_7f854edf"};const TU={position:{bottom:0,right:0},zIndex:Gi("modal"),withinPortal:!0},wU=(t,{zIndex:e,position:n})=>({root:{"--affix-z-index":e?.toString(),"--affix-top":Di(n?.top),"--affix-left":Di(n?.left),"--affix-bottom":Di(n?.bottom),"--affix-right":Di(n?.right)}}),SE=tt((t,e)=>{const n=Ne("Affix",TU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,portalProps:f,zIndex:m,withinPortal:y,position:x,...b}=n,w=vt({name:"Affix",classes:tI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:wU});return c.jsx(Gc,{...f,withinPortal:y,children:c.jsx(Ee,{ref:e,...w("root"),...b})})});SE.classes=tI;SE.displayName="@mantine/core/Affix";var nI={root:"m_b6d8b162"};function CU(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const EU={inherit:!1},AU=(t,{variant:e,lineClamp:n,gradient:r,size:i,color:s})=>({root:{"--text-fz":ki(i),"--text-lh":P5(i),"--text-gradient":e==="gradient"?yw(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":s?gr(s,t):void 0}}),et=vi((t,e)=>{const n=Ne("Text",EU,t),{lineClamp:r,truncate:i,inline:s,inherit:o,gradient:u,span:d,__staticSelector:f,vars:m,className:y,style:x,classNames:b,styles:w,unstyled:S,variant:D,mod:k,size:O,...N}=n,F=vt({name:["Text",f],props:n,classes:nI,className:y,style:x,classNames:b,styles:w,unstyled:S,vars:m,varsResolver:AU});return c.jsx(Ee,{...F("root",{focusable:!0}),ref:e,component:d?"span":"p",variant:D,mod:[{"data-truncate":CU(i),"data-line-clamp":typeof r=="number","data-inline":s,"data-inherit":o},k],size:O,...N})});et.classes=nI;et.displayName="@mantine/core/Text";var rI={root:"m_849cf0da"};const DU={underline:"hover"},jy=vi((t,e)=>{const{underline:n,className:r,unstyled:i,mod:s,...o}=Ne("Anchor",DU,t);return c.jsx(et,{component:"a",ref:e,className:ii({[rI.root]:!i},r),...o,mod:[{underline:n},s],__staticSelector:"Anchor",unstyled:i})});jy.classes=rI;jy.displayName="@mantine/core/Anchor";const[kU,Zg]=si("AppShell was not found in tree");var vf={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const RU={},TE=tt((t,e)=>{const n=Ne("AppShellAside",RU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,withBorder:f,zIndex:m,mod:y,...x}=n,b=Zg();return b.disabled?null:c.jsx(Ee,{component:"aside",ref:e,mod:[{"with-border":f??b.withBorder},y],...b.getStyles("aside",{className:i,classNames:r,styles:o,style:s}),...x,__vars:{"--app-shell-aside-z-index":`calc(${m??b.zIndex} + 1)`}})});TE.classes=vf;TE.displayName="@mantine/core/AppShellAside";const PU={},wE=tt((t,e)=>{const n=Ne("AppShellFooter",PU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,withBorder:f,zIndex:m,mod:y,...x}=n,b=Zg();return b.disabled?null:c.jsx(Ee,{component:"footer",ref:e,mod:[{"with-border":f??b.withBorder},y],...b.getStyles("footer",{className:ii({[wg.classNames.zeroRight]:b.offsetScrollbars},i),classNames:r,styles:o,style:s}),...x,__vars:{"--app-shell-footer-z-index":(m??b.zIndex)?.toString()}})});wE.classes=vf;wE.displayName="@mantine/core/AppShellFooter";const IU={},CE=tt((t,e)=>{const n=Ne("AppShellHeader",IU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,withBorder:f,zIndex:m,mod:y,...x}=n,b=Zg();return b.disabled?null:c.jsx(Ee,{component:"header",ref:e,mod:[{"with-border":f??b.withBorder},y],...b.getStyles("header",{className:ii({[wg.classNames.zeroRight]:b.offsetScrollbars},i),classNames:r,styles:o,style:s}),...x,__vars:{"--app-shell-header-z-index":(m??b.zIndex)?.toString()}})});CE.classes=vf;CE.displayName="@mantine/core/AppShellHeader";const OU={},EE=tt((t,e)=>{const n=Ne("AppShellMain",OU,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=Zg();return c.jsx(Ee,{component:"main",ref:e,...f.getStyles("main",{className:i,style:s,classNames:r,styles:o}),...d})});EE.classes=vf;EE.displayName="@mantine/core/AppShellMain";function Ly(t){return typeof t=="object"?t.base:t}function By(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function Fy(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function NU({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:i}){const s=r?.width,o="translateX(var(--app-shell-aside-width))",u="translateX(calc(var(--app-shell-aside-width) * -1))";if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint]["--app-shell-aside-width"]="100%",n[r?.breakpoint]["--app-shell-aside-offset"]="0px"),By(s)){const d=Fe(Ly(s));t["--app-shell-aside-width"]=d,t["--app-shell-aside-offset"]=d}if(Fy(s)&&(typeof s.base<"u"&&(t["--app-shell-aside-width"]=Fe(s.base),t["--app-shell-aside-offset"]=Fe(s.base)),Qr(s).forEach(d=>{d!=="base"&&(e[d]=e[d]||{},e[d]["--app-shell-aside-width"]=Fe(s[d]),e[d]["--app-shell-aside-offset"]=Fe(s[d]))})),r?.collapsed?.desktop){const d=r.breakpoint;e[d]=e[d]||{},e[d]["--app-shell-aside-transform"]=o,e[d]["--app-shell-aside-transform-rtl"]=u,e[d]["--app-shell-aside-offset"]="0px !important"}if(r?.collapsed?.mobile){const d=MC(r.breakpoint,i.breakpoints)-.1;n[d]=n[d]||{},n[d]["--app-shell-aside-width"]="100%",n[d]["--app-shell-aside-offset"]="0px",n[d]["--app-shell-aside-transform"]=o,n[d]["--app-shell-aside-transform-rtl"]=u}}function MU({baseStyles:t,minMediaStyles:e,footer:n}){const r=n?.height,i="translateY(var(--app-shell-footer-height))",s=n?.offset??!0;if(By(r)){const o=Fe(Ly(r));t["--app-shell-footer-height"]=o,s&&(t["--app-shell-footer-offset"]=o)}Fy(r)&&(typeof r.base<"u"&&(t["--app-shell-footer-height"]=Fe(r.base),s&&(t["--app-shell-footer-offset"]=Fe(r.base))),Qr(r).forEach(o=>{o!=="base"&&(e[o]=e[o]||{},e[o]["--app-shell-footer-height"]=Fe(r[o]),s&&(e[o]["--app-shell-footer-offset"]=Fe(r[o])))})),n?.collapsed&&(t["--app-shell-footer-transform"]=i,t["--app-shell-footer-offset"]="0px !important")}function jU({baseStyles:t,minMediaStyles:e,header:n}){const r=n?.height,i="translateY(calc(var(--app-shell-header-height) * -1))",s=n?.offset??!0;if(By(r)){const o=Fe(Ly(r));t["--app-shell-header-height"]=o,s&&(t["--app-shell-header-offset"]=o)}Fy(r)&&(typeof r.base<"u"&&(t["--app-shell-header-height"]=Fe(r.base),s&&(t["--app-shell-header-offset"]=Fe(r.base))),Qr(r).forEach(o=>{o!=="base"&&(e[o]=e[o]||{},e[o]["--app-shell-header-height"]=Fe(r[o]),s&&(e[o]["--app-shell-header-offset"]=Fe(r[o])))})),n?.collapsed&&(t["--app-shell-header-transform"]=i,t["--app-shell-header-offset"]="0px !important")}function LU({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:i}){const s=r?.width,o="translateX(calc(var(--app-shell-navbar-width) * -1))",u="translateX(var(--app-shell-navbar-width))";if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint]["--app-shell-navbar-width"]="100%",n[r?.breakpoint]["--app-shell-navbar-offset"]="0px"),By(s)){const d=Fe(Ly(s));t["--app-shell-navbar-width"]=d,t["--app-shell-navbar-offset"]=d}if(Fy(s)&&(typeof s.base<"u"&&(t["--app-shell-navbar-width"]=Fe(s.base),t["--app-shell-navbar-offset"]=Fe(s.base)),Qr(s).forEach(d=>{d!=="base"&&(e[d]=e[d]||{},e[d]["--app-shell-navbar-width"]=Fe(s[d]),e[d]["--app-shell-navbar-offset"]=Fe(s[d]))})),r?.collapsed?.desktop){const d=r.breakpoint;e[d]=e[d]||{},e[d]["--app-shell-navbar-transform"]=o,e[d]["--app-shell-navbar-transform-rtl"]=u,e[d]["--app-shell-navbar-offset"]="0px !important"}if(r?.collapsed?.mobile){const d=MC(r.breakpoint,i.breakpoints)-.1;n[d]=n[d]||{},n[d]["--app-shell-navbar-width"]="100%",n[d]["--app-shell-navbar-offset"]="0px",n[d]["--app-shell-navbar-transform"]=o,n[d]["--app-shell-navbar-transform-rtl"]=u}}function cT(t){return Number(t)===0?"0px":Di(t)}function BU({padding:t,baseStyles:e,minMediaStyles:n}){By(t)&&(e["--app-shell-padding"]=cT(Ly(t))),Fy(t)&&(t.base&&(e["--app-shell-padding"]=cT(t.base)),Qr(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=cT(t[r]))}))}function FU({navbar:t,header:e,footer:n,aside:r,padding:i,theme:s}){const o={},u={},d={};LU({baseStyles:d,minMediaStyles:o,maxMediaStyles:u,navbar:t,theme:s}),NU({baseStyles:d,minMediaStyles:o,maxMediaStyles:u,aside:r,theme:s}),jU({baseStyles:d,minMediaStyles:o,header:e}),MU({baseStyles:d,minMediaStyles:o,footer:n}),BU({baseStyles:d,minMediaStyles:o,padding:i});const f=j1(Qr(o),s.breakpoints).map(x=>({query:`(min-width: ${I1(x.px)})`,styles:o[x.value]})),m=j1(Qr(u),s.breakpoints).map(x=>({query:`(max-width: ${I1(x.px)})`,styles:u[x.value]})),y=[...f,...m];return{baseStyles:d,media:y}}function UU({navbar:t,header:e,aside:n,footer:r,padding:i}){const s=ai(),o=qc(),{media:u,baseStyles:d}=FU({navbar:t,header:e,footer:r,aside:n,padding:i,theme:s});return c.jsx(Iy,{media:u,styles:d,selector:o.cssVariablesSelector})}const zU={},AE=tt((t,e)=>{const n=Ne("AppShellNavbar",zU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,withBorder:f,zIndex:m,mod:y,...x}=n,b=Zg();return b.disabled?null:c.jsx(Ee,{component:"nav",ref:e,mod:[{"with-border":f??b.withBorder},y],...b.getStyles("navbar",{className:i,classNames:r,styles:o,style:s}),...x,__vars:{"--app-shell-navbar-z-index":`calc(${m??b.zIndex} + 1)`}})});AE.classes=vf;AE.displayName="@mantine/core/AppShellNavbar";const $U={},DE=vi((t,e)=>{const n=Ne("AppShellSection",$U,t),{classNames:r,className:i,style:s,styles:o,vars:u,grow:d,mod:f,...m}=n,y=Zg();return c.jsx(Ee,{ref:e,mod:[{grow:d},f],...y.getStyles("section",{className:i,style:s,classNames:r,styles:o}),...m})});DE.classes=vf;DE.displayName="@mantine/core/AppShellSection";function VU({transitionDuration:t,disabled:e}){const[n,r]=A.useState(!0),i=A.useRef(-1),s=A.useRef(-1);return B1("resize",()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>A.startTransition(()=>{r(!1)}),200)}),hp(()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>A.startTransition(()=>{r(!1)}),t||0)},[e,t]),n}const HU={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Gi("app")},qU=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),ya=tt((t,e)=>{const n=Ne("AppShell",HU,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,navbar:f,withBorder:m,padding:y,transitionDuration:x,transitionTimingFunction:b,header:w,zIndex:S,layout:D,disabled:k,aside:O,footer:N,offsetScrollbars:F=D!=="alt",mod:M,...V}=n,$=vt({name:"AppShell",classes:vf,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:qU}),q=VU({disabled:k,transitionDuration:x});return c.jsxs(kU,{value:{getStyles:$,withBorder:m,zIndex:S,disabled:k,offsetScrollbars:F},children:[c.jsx(UU,{navbar:f,header:w,aside:O,footer:N,padding:y}),c.jsx(Ee,{ref:e,...$("root"),mod:[{resizing:q,layout:D,disabled:k},M],...V})]})});ya.classes=vf;ya.displayName="@mantine/core/AppShell";ya.Navbar=AE;ya.Header=CE;ya.Main=EE;ya.Aside=TE;ya.Footer=wE;ya.Section=DE;function iI(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>iI(e))}:t}function sI(t){return t?t.map(e=>iI(e)):[]}function kE(t){return t.reduce((e,n)=>"group"in n?{...e,...kE(n.items)}:(e[n.value]=n,e),{})}var wa={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const GU={error:null},WU=(t,{size:e,color:n})=>({chevron:{"--combobox-chevron-size":Xt(e,"combobox-chevron-size"),"--combobox-chevron-color":n?gr(n,t):void 0}}),RE=tt((t,e)=>{const n=Ne("ComboboxChevron",GU,t),{size:r,error:i,style:s,className:o,classNames:u,styles:d,unstyled:f,vars:m,mod:y,...x}=n,b=vt({name:"ComboboxChevron",classes:wa,props:n,style:s,className:o,classNames:u,styles:d,unstyled:f,vars:m,varsResolver:WU,rootSelector:"chevron"});return c.jsx(Ee,{component:"svg",...x,...b("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},y],ref:e,children:c.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});RE.classes=wa;RE.displayName="@mantine/core/ComboboxChevron";const[XU,Io]=si("Combobox component was not found in tree"),aI=A.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:r,...i},s)=>c.jsx(Nr.ClearButton,{ref:s,tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:o=>{o.preventDefault(),e?.(o)},onClick:o=>{r(),n?.(o)}}));aI.displayName="@mantine/core/ComboboxClearButton";const YU={},PE=tt((t,e)=>{const{classNames:n,styles:r,className:i,style:s,hidden:o,...u}=Ne("ComboboxDropdown",YU,t),d=Io();return c.jsx(Ca.Dropdown,{...u,ref:e,role:"presentation","data-hidden":o||void 0,...d.getStyles("dropdown",{className:i,style:s,classNames:n,styles:r})})});PE.classes=wa;PE.displayName="@mantine/core/ComboboxDropdown";const KU={refProp:"ref"},oI=tt((t,e)=>{const{children:n,refProp:r}=Ne("ComboboxDropdownTarget",KU,t);if(Io(),!Al(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return c.jsx(Ca.Target,{ref:e,refProp:r,children:n})});oI.displayName="@mantine/core/ComboboxDropdownTarget";const QU={},IE=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("ComboboxEmpty",QU,t),d=Io();return c.jsx(Ee,{ref:e,...d.getStyles("empty",{className:r,classNames:n,styles:s,style:i}),...u})});IE.classes=wa;IE.displayName="@mantine/core/ComboboxEmpty";function OE({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:s}){const o=Io(),[u,d]=A.useState(null),f=y=>{if(t?.(y),!o.readOnly&&e){if(y.nativeEvent.isComposing)return;if(y.nativeEvent.code==="ArrowDown"&&(y.preventDefault(),o.store.dropdownOpened?d(o.store.selectNextOption()):(o.store.openDropdown("keyboard"),d(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),y.nativeEvent.code==="ArrowUp"&&(y.preventDefault(),o.store.dropdownOpened?d(o.store.selectPreviousOption()):(o.store.openDropdown("keyboard"),d(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),y.nativeEvent.code==="Enter"||y.nativeEvent.code==="NumpadEnter"){if(y.nativeEvent.keyCode===229)return;const x=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&x!==-1?(y.preventDefault(),o.store.clickSelectedOption()):i==="button"&&(y.preventDefault(),o.store.openDropdown("keyboard"))}y.key==="Escape"&&o.store.closeDropdown("keyboard"),y.nativeEvent.code==="Space"&&i==="button"&&(y.preventDefault(),o.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r&&!!(o.store.listId&&o.store.dropdownOpened)||void 0,"aria-controls":o.store.dropdownOpened?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&u||void 0,autoComplete:s,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:f}}const ZU={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},lI=tt((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:s,withExpandedAttribute:o,targetType:u,autoComplete:d,...f}=Ne("ComboboxEventsTarget",ZU,t);if(!Al(n))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const m=Io(),y=OE({targetType:u,withAriaAttributes:s,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:n.props.onKeyDown,autoComplete:d});return A.cloneElement(n,{...y,...f,[r]:ei(e,m.store.targetRef,R_(n))})});lI.displayName="@mantine/core/ComboboxEventsTarget";const JU={},NE=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("ComboboxFooter",JU,t),d=Io();return c.jsx(Ee,{ref:e,...d.getStyles("footer",{className:r,classNames:n,style:i,styles:s}),...u,onMouseDown:f=>{f.preventDefault()}})});NE.classes=wa;NE.displayName="@mantine/core/ComboboxFooter";const ez={},ME=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,children:u,label:d,...f}=Ne("ComboboxGroup",ez,t),m=Io();return c.jsxs(Ee,{ref:e,...m.getStyles("group",{className:r,classNames:n,style:i,styles:s}),...f,children:[d&&c.jsx("div",{...m.getStyles("groupLabel",{classNames:n,styles:s}),children:d}),u]})});ME.classes=wa;ME.displayName="@mantine/core/ComboboxGroup";const tz={},jE=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("ComboboxHeader",tz,t),d=Io();return c.jsx(Ee,{ref:e,...d.getStyles("header",{className:r,classNames:n,style:i,styles:s}),...u,onMouseDown:f=>{f.preventDefault()}})});jE.classes=wa;jE.displayName="@mantine/core/ComboboxHeader";function uI({value:t,valuesDivider:e=",",...n}){return c.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}uI.displayName="@mantine/core/ComboboxHiddenInput";const nz={},LE=tt((t,e)=>{const n=Ne("ComboboxOption",nz,t),{classNames:r,className:i,style:s,styles:o,vars:u,onClick:d,id:f,active:m,onMouseDown:y,onMouseOver:x,disabled:b,selected:w,mod:S,...D}=n,k=Io(),O=A.useId(),N=f||O;return c.jsx(Ee,{...k.getStyles("option",{className:i,classNames:r,styles:o,style:s}),...D,ref:e,id:N,mod:["combobox-option",{"combobox-active":m,"combobox-disabled":b,"combobox-selected":w},S],role:"option",onClick:F=>{b?F.preventDefault():(k.onOptionSubmit?.(n.value,n),d?.(F))},onMouseDown:F=>{F.preventDefault(),y?.(F)},onMouseOver:F=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),x?.(F)}})});LE.classes=wa;LE.displayName="@mantine/core/ComboboxOption";const rz={},BE=tt((t,e)=>{const n=Ne("ComboboxOptions",rz,t),{classNames:r,className:i,style:s,styles:o,id:u,onMouseDown:d,labelledBy:f,...m}=n,y=Io(),x=ls(u);return A.useEffect(()=>{y.store.setListId(x)},[x]),c.jsx(Ee,{ref:e,...y.getStyles("options",{className:i,style:s,classNames:r,styles:o}),...m,id:x,role:"listbox","aria-labelledby":f,onMouseDown:b=>{b.preventDefault(),d?.(b)}})});BE.classes=wa;BE.displayName="@mantine/core/ComboboxOptions";const iz={withAriaAttributes:!0,withKeyboardNavigation:!0},FE=tt((t,e)=>{const n=Ne("ComboboxSearch",iz,t),{classNames:r,styles:i,unstyled:s,vars:o,withAriaAttributes:u,onKeyDown:d,withKeyboardNavigation:f,size:m,...y}=n,x=Io(),b=x.getStyles("search"),w=OE({targetType:"input",withAriaAttributes:u,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:d,autoComplete:"off"});return c.jsx(Nr,{ref:ei(e,x.store.searchRef),classNames:[{input:b.className},r],styles:[{input:b.style},i],size:m||x.size,...w,...y,__staticSelector:"Combobox"})});FE.classes=wa;FE.displayName="@mantine/core/ComboboxSearch";const sz={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},cI=tt((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:s,withExpandedAttribute:o,targetType:u,autoComplete:d,...f}=Ne("ComboboxTarget",sz,t);if(!Al(n))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const m=Io(),y=OE({targetType:u,withAriaAttributes:s,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:n.props.onKeyDown,autoComplete:d}),x=A.cloneElement(n,{...y,...f});return c.jsx(Ca.Target,{ref:ei(e,m.store.targetRef),children:x})});cI.displayName="@mantine/core/ComboboxTarget";function az(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function oz(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function lz(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function UE({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:s=!0,scrollBehavior:o="instant"}={}){const[u,d]=Zr({value:e,defaultValue:t,finalValue:!1,onChange:n}),f=A.useRef(null),m=A.useRef(-1),y=A.useRef(null),x=A.useRef(null),b=A.useRef(-1),w=A.useRef(-1),S=A.useRef(-1),D=A.useCallback((H="unknown")=>{u||(d(!0),i?.(H))},[d,i,u]),k=A.useCallback((H="unknown")=>{u&&(d(!1),r?.(H))},[d,r,u]),O=A.useCallback((H="unknown")=>{u?k(H):D(H)},[k,D,u]),N=A.useCallback(()=>{const H=document.querySelector(`#${f.current} [data-combobox-selected]`);H?.removeAttribute("data-combobox-selected"),H?.removeAttribute("aria-selected")},[]),F=A.useCallback(H=>{const Z=document.getElementById(f.current)?.querySelectorAll("[data-combobox-option]");if(!Z)return null;const ie=H>=Z.length?0:H<0?Z.length-1:H;return m.current=ie,Z?.[ie]&&!Z[ie].hasAttribute("data-combobox-disabled")?(N(),Z[ie].setAttribute("data-combobox-selected","true"),Z[ie].setAttribute("aria-selected","true"),Z[ie].scrollIntoView({block:"nearest",behavior:o}),Z[ie].id):null},[o,N]),M=A.useCallback(()=>{const H=document.querySelector(`#${f.current} [data-combobox-active]`);if(H){const te=document.querySelectorAll(`#${f.current} [data-combobox-option]`),Z=Array.from(te).findIndex(ie=>ie===H);return F(Z)}return F(0)},[F]),V=A.useCallback(()=>F(oz(m.current,document.querySelectorAll(`#${f.current} [data-combobox-option]`),s)),[F,s]),$=A.useCallback(()=>F(az(m.current,document.querySelectorAll(`#${f.current} [data-combobox-option]`),s)),[F,s]),q=A.useCallback(()=>F(lz(document.querySelectorAll(`#${f.current} [data-combobox-option]`))),[F]),B=A.useCallback((H="selected",te)=>{S.current=window.setTimeout(()=>{const Z=document.querySelectorAll(`#${f.current} [data-combobox-option]`),ie=Array.from(Z).findIndex(G=>G.hasAttribute(`data-combobox-${H}`));m.current=ie,te?.scrollIntoView&&Z[ie]?.scrollIntoView({block:"nearest",behavior:o})},0)},[]),z=A.useCallback(()=>{m.current=-1,N()},[N]),ee=A.useCallback(()=>{document.querySelectorAll(`#${f.current} [data-combobox-option]`)?.[m.current]?.click()},[]),Y=A.useCallback(H=>{f.current=H},[]),Q=A.useCallback(()=>{b.current=window.setTimeout(()=>y.current.focus(),0)},[]),oe=A.useCallback(()=>{w.current=window.setTimeout(()=>x.current.focus(),0)},[]),ue=A.useCallback(()=>m.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(b.current),window.clearTimeout(w.current),window.clearTimeout(S.current)},[]),{dropdownOpened:u,openDropdown:D,closeDropdown:k,toggleDropdown:O,selectedOptionIndex:m.current,getSelectedOptionIndex:ue,selectOption:F,selectFirstOption:q,selectActiveOption:M,selectNextOption:V,selectPreviousOption:$,resetSelectedOption:z,updateSelectedOptionIndex:B,listId:f.current,setListId:Y,clickSelectedOption:ee,searchRef:y,focusSearchInput:Q,targetRef:x,focusTarget:oe}}const uz={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},cz=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":ki(e),"--combobox-option-padding":Xt(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:Fe(n),"--combobox-option-fz":ki(e),"--combobox-option-padding":Xt(e,"combobox-option-padding")}});function Bn(t){const e=Ne("Combobox",uz,t),{classNames:n,styles:r,unstyled:i,children:s,store:o,vars:u,onOptionSubmit:d,onClose:f,size:m,dropdownPadding:y,resetSelectionOnOptionHover:x,__staticSelector:b,readOnly:w,...S}=e,D=UE(),k=o||D,O=vt({name:b||"Combobox",classes:wa,props:e,classNames:n,styles:r,unstyled:i,vars:u,varsResolver:cz}),N=()=>{f?.(),k.closeDropdown()};return c.jsx(XU,{value:{getStyles:O,store:k,onOptionSubmit:d,size:m,resetSelectionOnOptionHover:x,readOnly:w},children:c.jsx(Ca,{opened:k.dropdownOpened,...S,onChange:F=>!F&&N(),withRoles:!1,unstyled:i,children:s})})}const dz=t=>t;Bn.extend=dz;Bn.classes=wa;Bn.displayName="@mantine/core/Combobox";Bn.Target=cI;Bn.Dropdown=PE;Bn.Options=BE;Bn.Option=LE;Bn.Search=FE;Bn.Empty=IE;Bn.Chevron=RE;Bn.Footer=NE;Bn.Header=jE;Bn.EventsTarget=lI;Bn.DropdownTarget=oI;Bn.Group=ME;Bn.ClearButton=aI;Bn.HiddenInput=uI;var dI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const fI=dI,zE=A.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:i,unstyled:s,children:o,label:u,description:d,id:f,disabled:m,error:y,size:x,labelPosition:b="left",bodyElement:w="div",labelElement:S="label",variant:D,style:k,vars:O,mod:N,...F},M)=>{const V=vt({name:t,props:e,className:n,style:k,classes:dI,classNames:r,styles:i,unstyled:s});return c.jsx(Ee,{...V("root"),ref:M,__vars:{"--label-fz":ki(x),"--label-lh":Xt(x,"label-lh")},mod:[{"label-position":b},N],variant:D,size:x,...F,children:c.jsxs(Ee,{component:w,htmlFor:w==="label"?f:void 0,...V("body"),children:[o,c.jsxs("div",{...V("labelWrapper"),"data-disabled":m||void 0,children:[u&&c.jsx(Ee,{component:S,htmlFor:S==="label"?f:void 0,...V("label"),"data-disabled":m||void 0,children:u}),d&&c.jsx(Nr.Description,{size:x,__inheritStyles:!1,...V("description"),children:d}),y&&typeof y!="boolean"&&c.jsx(Nr.Error,{size:x,__inheritStyles:!1,...V("error"),children:y})]})]})})});zE.displayName="@mantine/core/InlineInput";const hI=A.createContext(null),fz=hI.Provider,pI=()=>A.useContext(hI),[hz,pz]=pf();var mI={card:"m_26775b0a"};const mz={withBorder:!0},gz=(t,{radius:e})=>({card:{"--card-radius":nr(e)}}),$E=tt((t,e)=>{const n=Ne("CheckboxCard",mz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,checked:f,mod:m,withBorder:y,value:x,onClick:b,defaultChecked:w,onChange:S,...D}=n,k=vt({name:"CheckboxCard",classes:mI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:gz,rootSelector:"card"}),O=pI(),N=typeof f=="boolean"?f:O?O.value.includes(x||""):void 0,[F,M]=Zr({value:N,defaultValue:w,finalValue:!1,onChange:S});return c.jsx(hz,{value:{checked:F},children:c.jsx(Ta,{ref:e,mod:[{"with-border":y,checked:F},m],...k("card"),...D,role:"checkbox","aria-checked":F,onClick:V=>{b?.(V),O?.onChange(x||""),M(!F)}})})});$E.displayName="@mantine/core/CheckboxCard";$E.classes=mI;function gI({children:t,role:e}){const n=Qg();return n?c.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):c.jsx(c.Fragment,{children:t})}const vz={},VE=tt((t,e)=>{const{value:n,defaultValue:r,onChange:i,size:s,wrapperProps:o,children:u,readOnly:d,...f}=Ne("CheckboxGroup",vz,t),[m,y]=Zr({value:n,defaultValue:r,finalValue:[],onChange:i}),x=b=>{const w=typeof b=="string"?b:b.currentTarget.value;!d&&y(m.includes(w)?m.filter(S=>S!==w):[...m,w])};return c.jsx(fz,{value:{value:m,onChange:x,size:s},children:c.jsx(Nr.Wrapper,{size:s,ref:e,...o,...f,labelElement:"div",__staticSelector:"CheckboxGroup",children:c.jsx(gI,{role:"group",children:u})})})});VE.classes=Nr.Wrapper.classes;VE.displayName="@mantine/core/CheckboxGroup";function vI({size:t,style:e,...n}){const r=t!==void 0?{width:Fe(t),height:Fe(t),...e}:e;return c.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,children:c.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function yI({indeterminate:t,...e}){return t?c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:c.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):c.jsx(vI,{...e})}var bI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const yz={icon:yI},bz=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const u=mf({color:n||t.primaryColor,theme:t}),d=u.isThemeColor&&u.shade===void 0?`var(--mantine-color-${u.color}-outline)`:u.color;return{indicator:{"--checkbox-size":Xt(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:nr(e),"--checkbox-color":s==="outline"?d:gr(n,t),"--checkbox-icon-color":i?gr(i,t):Gg(o,t)?gf({color:n,theme:t,autoContrast:o}):void 0}}},HE=tt((t,e)=>{const n=Ne("CheckboxIndicator",yz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,icon:f,indeterminate:m,radius:y,color:x,iconColor:b,autoContrast:w,checked:S,mod:D,variant:k,disabled:O,...N}=n,F=f,M=vt({name:"CheckboxIndicator",classes:bI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:bz,rootSelector:"indicator"}),V=pz(),$=typeof S=="boolean"||typeof m=="boolean"?S||m:V?.checked||!1;return c.jsx(Ee,{ref:e,...M("indicator",{variant:k}),variant:k,mod:[{checked:$,disabled:O},D],...N,children:c.jsx(F,{indeterminate:m,...M("icon")})})});HE.displayName="@mantine/core/CheckboxIndicator";HE.classes=bI;var xI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const xz={labelPosition:"right",icon:yI},_z=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const u=mf({color:n||t.primaryColor,theme:t}),d=u.isThemeColor&&u.shade===void 0?`var(--mantine-color-${u.color}-outline)`:u.color;return{root:{"--checkbox-size":Xt(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:nr(e),"--checkbox-color":s==="outline"?d:gr(n,t),"--checkbox-icon-color":i?gr(i,t):Gg(o,t)?gf({color:n,theme:t,autoContrast:o}):void 0}}},pt=tt((t,e)=>{const n=Ne("Checkbox",xz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,color:f,label:m,id:y,size:x,radius:b,wrapperProps:w,checked:S,labelPosition:D,description:k,error:O,disabled:N,variant:F,indeterminate:M,icon:V,rootRef:$,iconColor:q,onChange:B,autoContrast:z,mod:ee,...Y}=n,Q=pI(),oe=x||Q?.size,ue=V,H=vt({name:"Checkbox",props:n,classes:xI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:_z}),{styleProps:te,rest:Z}=mp(Y),ie=ls(y),G=Q?{checked:Q.value.includes(Z.value),onChange:be=>{Q.onChange(be),B?.(be)}}:{},X=A.useRef(null),fe=e||X;return A.useEffect(()=>{fe&&"current"in fe&&fe.current&&(fe.current.indeterminate=M||!1)},[M,fe]),c.jsx(zE,{...H("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:ie,size:oe,labelPosition:D,label:m,description:k,error:O,disabled:N,classNames:r,styles:o,unstyled:u,"data-checked":G.checked||S||void 0,variant:F,ref:$,mod:ee,...te,...w,children:c.jsxs(Ee,{...H("inner"),mod:{"data-label-position":D},children:[c.jsx(Ee,{component:"input",id:ie,ref:fe,checked:S,disabled:N,mod:{error:!!O,indeterminate:M},...H("input",{focusable:!0,variant:F}),onChange:B,...Z,...G,type:"checkbox"}),c.jsx(ue,{indeterminate:M,...H("icon")})]})})});pt.classes={...xI,...fI};pt.displayName="@mantine/core/Checkbox";pt.Group=VE;pt.Indicator=HE;pt.Card=$E;function Rg(t){return"group"in t}function _I({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),i=[];for(let s=0;s<t.length;s+=1){const o=t[s];if(i.length===n)return i;Rg(o)&&i.push({group:o.group,items:_I({options:o.items,search:e,limit:n-i.length})}),Rg(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Sz(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function SI(t,e=new Set){if(Array.isArray(t))for(const n of t)if(Rg(n))SI(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function Tz(t,e){return Array.isArray(t)?t.includes(e):t===e}function TI({data:t,withCheckIcon:e,value:n,checkIconPosition:r,unstyled:i,renderOption:s}){if(!Rg(t)){const u=Tz(n,t.value),d=e&&u&&c.jsx(vI,{className:wa.optionsDropdownCheckIcon}),f=c.jsxs(c.Fragment,{children:[r==="left"&&d,c.jsx("span",{children:t.label}),r==="right"&&d]});return c.jsx(Bn.Option,{value:t.value,disabled:t.disabled,className:ii({[wa.optionsDropdownOption]:!i}),"data-reverse":r==="right"||void 0,"data-checked":u||void 0,"aria-selected":u,active:u,children:typeof s=="function"?s({option:t,checked:u}):f})}const o=t.items.map(u=>c.jsx(TI,{data:u,value:n,unstyled:i,withCheckIcon:e,checkIconPosition:r,renderOption:s},u.value));return c.jsx(Bn.Group,{label:t.group,children:o})}function wI({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:i,limit:s,maxDropdownHeight:o,withScrollArea:u=!0,filterOptions:d=!0,withCheckIcon:f=!1,value:m,checkIconPosition:y,nothingFoundMessage:x,unstyled:b,labelId:w,renderOption:S,scrollAreaProps:D,"aria-label":k}){SI(t);const N=typeof i=="string"?(r||_I)({options:t,search:d?i:"",limit:s??1/0}):t,F=Sz(N),M=N.map(V=>c.jsx(TI,{data:V,withCheckIcon:f,value:m,checkIconPosition:y,unstyled:b,renderOption:S},Rg(V)?V.group:V.value));return c.jsx(Bn.Dropdown,{hidden:e||n&&F,"data-composed":!0,children:c.jsxs(Bn.Options,{labelledBy:w,"aria-label":k,children:[u?c.jsx(Ar.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...D,children:M}):M,F&&x&&c.jsx(Bn.Empty,{children:x})]})})}const CI=A.createContext(null),wz=CI.Provider;function Cz(){return{withinGroup:!!A.useContext(CI)}}var W_={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const Ez={},Az=(t,{spacing:e})=>({group:{"--ag-spacing":Di(e)}}),qE=tt((t,e)=>{const n=Ne("AvatarGroup",Ez,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,spacing:f,...m}=n,y=vt({name:"AvatarGroup",classes:W_,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Az,rootSelector:"group"});return c.jsx(wz,{value:!0,children:c.jsx(Ee,{ref:e,...y("group"),...m})})});qE.classes=W_;qE.displayName="@mantine/core/AvatarGroup";function Dz(t){return c.jsx("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function kz(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}const Rz=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function Pz(t,e=Rz){const n=kz(t),r=Math.abs(n)%e.length;return e[r]}function Iz(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(r=>r[0]).slice(0,e).join("").toUpperCase()}const Oz={},Nz=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o,name:u,allowedInitialsColors:d})=>{const f=s==="initials"&&typeof u=="string"?Pz(u,d):s,m=t.variantColorResolver({color:f||"gray",theme:t,gradient:i,variant:r||"light",autoContrast:o});return{root:{"--avatar-size":Xt(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:nr(n),"--avatar-bg":f||r?m.background:void 0,"--avatar-color":f||r?m.color:void 0,"--avatar-bd":f||r?m.border:void 0}}},_l=vi((t,e)=>{const n=Ne("Avatar",Oz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,src:f,alt:m,radius:y,color:x,gradient:b,imageProps:w,children:S,autoContrast:D,mod:k,name:O,allowedInitialsColors:N,...F}=n,M=Cz(),[V,$]=A.useState(!f),q=vt({name:"Avatar",props:n,classes:W_,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Nz});return A.useEffect(()=>$(!f),[f]),c.jsx(Ee,{...q("root"),mod:[{"within-group":M.withinGroup},k],ref:e,...F,children:V?c.jsx("span",{...q("placeholder"),title:m,children:S||typeof O=="string"&&Iz(O)||c.jsx(Dz,{})}):c.jsx("img",{...w,...q("image"),src:f,alt:m,onError:B=>{$(!0),w?.onError?.(B)}})})});_l.classes=W_;_l.displayName="@mantine/core/Avatar";_l.Group=qE;var EI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const Mz={},jz=(t,{radius:e,color:n,gradient:r,variant:i,size:s,autoContrast:o})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--badge-height":Xt(s,"badge-height"),"--badge-padding-x":Xt(s,"badge-padding-x"),"--badge-fz":Xt(s,"badge-fz"),"--badge-radius":e===void 0?void 0:nr(e),"--badge-bg":n||i?u.background:void 0,"--badge-color":n||i?u.color:void 0,"--badge-bd":n||i?u.border:void 0,"--badge-dot-color":i==="dot"?gr(n,t):void 0}}},Pg=vi((t,e)=>{const n=Ne("Badge",Mz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,radius:f,color:m,gradient:y,leftSection:x,rightSection:b,children:w,variant:S,fullWidth:D,autoContrast:k,circle:O,mod:N,...F}=n,M=vt({name:"Badge",props:n,classes:EI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:jz});return c.jsxs(Ee,{variant:S,mod:[{block:D,circle:O,"with-right-section":!!b,"with-left-section":!!x},N],...M("root",{variant:S}),ref:e,...F,children:[x&&c.jsx("span",{...M("section"),"data-position":"left",children:x}),c.jsx("span",{...M("label"),children:w}),b&&c.jsx("span",{...M("section"),"data-position":"right",children:b})]})});Pg.classes=EI;Pg.displayName="@mantine/core/Badge";var AI={root:"m_8b3717df",breadcrumb:"m_f678d540",separator:"m_3b8f2208"};const Lz={separator:"/"},Bz=(t,{separatorMargin:e})=>({root:{"--bc-separator-margin":Di(e)}}),X_=tt((t,e)=>{const n=Ne("Breadcrumbs",Lz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,children:f,separator:m,separatorMargin:y,...x}=n,b=vt({name:"Breadcrumbs",classes:AI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Bz}),w=A.Children.toArray(f).reduce((S,D,k,O)=>{const N=Al(D)?A.cloneElement(D,{...b("breadcrumb",{className:D.props?.className}),key:k}):A.createElement("div",{...b("breadcrumb"),key:k},D);return S.push(N),k!==O.length-1&&S.push(A.createElement(Ee,{...b("separator"),key:`separator-${k}`},m)),S},[]);return c.jsx(Ee,{ref:e,...b("root"),...x,children:w})});X_.classes=AI;X_.displayName="@mantine/core/Breadcrumbs";var DI={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const Fz={},Uz=(t,{color:e,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:s})=>({root:{"--burger-color":e?gr(e,t):void 0,"--burger-size":Xt(n,"burger-size"),"--burger-line-size":r?Fe(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":s}}),GE=tt((t,e)=>{const n=Ne("Burger",Fz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,opened:f,children:m,transitionDuration:y,transitionTimingFunction:x,lineSize:b,...w}=n,S=vt({name:"Burger",classes:DI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Uz});return c.jsxs(Ta,{...S("root"),ref:e,...w,children:[c.jsx(Ee,{mod:["reduce-motion",{opened:f}],...S("burger")}),m]})});GE.classes=DI;GE.displayName="@mantine/core/Burger";var Jg={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const ek={orientation:"horizontal"},zz=(t,{borderWidth:e})=>({group:{"--button-border-width":Fe(e)}}),WE=tt((t,e)=>{const n=Ne("ButtonGroup",ek,t),{className:r,style:i,classNames:s,styles:o,unstyled:u,orientation:d,vars:f,borderWidth:m,variant:y,mod:x,...b}=Ne("ButtonGroup",ek,t),w=vt({name:"ButtonGroup",props:n,classes:Jg,className:r,style:i,classNames:s,styles:o,unstyled:u,vars:f,varsResolver:zz,rootSelector:"group"});return c.jsx(Ee,{...w("group"),ref:e,variant:y,mod:[{"data-orientation":d},x],role:"group",...b})});WE.classes=Jg;WE.displayName="@mantine/core/ButtonGroup";const tk={},$z=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":Xt(o,"section-height"),"--section-padding-x":Xt(o,"section-padding-x"),"--section-fz":o?.includes("compact")?ki(o.replace("compact-","")):ki(o),"--section-radius":e===void 0?void 0:nr(e),"--section-bg":n||i?u.background:void 0,"--section-color":u.color,"--section-bd":n||i?u.border:void 0}}},XE=tt((t,e)=>{const n=Ne("ButtonGroupSection",tk,t),{className:r,style:i,classNames:s,styles:o,unstyled:u,vars:d,variant:f,gradient:m,radius:y,autoContrast:x,...b}=Ne("ButtonGroupSection",tk,t),w=vt({name:"ButtonGroupSection",props:n,classes:Jg,className:r,style:i,classNames:s,styles:o,unstyled:u,vars:d,varsResolver:$z,rootSelector:"groupSection"});return c.jsx(Ee,{...w("groupSection"),ref:e,variant:f,...b})});XE.classes=Jg;XE.displayName="@mantine/core/ButtonGroupSection";const Vz={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Fe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Hz={},qz=(t,{radius:e,color:n,gradient:r,variant:i,size:s,justify:o,autoContrast:u})=>{const d=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:u});return{root:{"--button-justify":o,"--button-height":Xt(s,"button-height"),"--button-padding-x":Xt(s,"button-padding-x"),"--button-fz":s?.includes("compact")?ki(s.replace("compact-","")):ki(s),"--button-radius":e===void 0?void 0:nr(e),"--button-bg":n||i?d.background:void 0,"--button-hover":n||i?d.hover:void 0,"--button-color":d.color,"--button-bd":n||i?d.border:void 0,"--button-hover-color":n||i?d.hoverColor:void 0}}},at=vi((t,e)=>{const n=Ne("Button",Hz,t),{style:r,vars:i,className:s,color:o,disabled:u,children:d,leftSection:f,rightSection:m,fullWidth:y,variant:x,radius:b,loading:w,loaderProps:S,gradient:D,classNames:k,styles:O,unstyled:N,"data-disabled":F,autoContrast:M,mod:V,...$}=n,q=vt({name:"Button",props:n,classes:Jg,className:s,style:r,classNames:k,styles:O,unstyled:N,vars:i,varsResolver:qz}),B=!!f,z=!!m;return c.jsxs(Ta,{ref:e,...q("root",{active:!u&&!w&&!F}),unstyled:N,variant:x,disabled:u||w,mod:[{disabled:u||F,loading:w,block:y,"with-left-section":B,"with-right-section":z},V],...$,children:[c.jsx(Vu,{mounted:!!w,transition:Vz,duration:150,children:ee=>c.jsx(Ee,{component:"span",...q("loader",{style:ee}),"aria-hidden":!0,children:c.jsx(ju,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...S})})}),c.jsxs("span",{...q("inner"),children:[f&&c.jsx(Ee,{component:"span",...q("section"),mod:{position:"left"},children:f}),c.jsx(Ee,{component:"span",mod:{loading:w},...q("label"),children:d}),m&&c.jsx(Ee,{component:"span",...q("section"),mod:{position:"right"},children:m})]})]})});at.classes=Jg;at.displayName="@mantine/core/Button";at.Group=WE;at.GroupSection=XE;const[Gz,Wz]=si("Card component was not found in tree");var YE={root:"m_e615b15f",section:"m_599a2148"};const Xz={},Y_=vi((t,e)=>{const n=Ne("CardSection",Xz,t),{classNames:r,className:i,style:s,styles:o,vars:u,withBorder:d,inheritPadding:f,mod:m,...y}=n,x=Wz();return c.jsx(Ee,{ref:e,mod:[{"with-border":d,"inherit-padding":f},m],...x.getStyles("section",{className:i,style:s,styles:o,classNames:r}),...y})});Y_.classes=YE;Y_.displayName="@mantine/core/CardSection";const Yz={},Kz=(t,{padding:e})=>({root:{"--card-padding":Di(e)}}),Ti=vi((t,e)=>{const n=Ne("Card",Yz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,children:f,padding:m,...y}=n,x=vt({name:"Card",props:n,classes:YE,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Kz}),b=A.Children.toArray(f),w=b.map((S,D)=>typeof S=="object"&&S&&"type"in S&&S.type===Y_?A.cloneElement(S,{"data-first-section":D===0||void 0,"data-last-section":D===b.length-1||void 0}):S);return c.jsx(Gz,{value:{getStyles:x},children:c.jsx(Hi,{ref:e,unstyled:u,...x("root"),...y,children:w})})});Ti.classes=YE;Ti.displayName="@mantine/core/Card";Ti.Section=Y_;var kI={root:"m_4451eb3a"};const Qz={},by=vi((t,e)=>{const n=Ne("Center",Qz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,inline:f,mod:m,...y}=n,x=vt({name:"Center",props:n,classes:kI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d});return c.jsx(Ee,{ref:e,mod:[{inline:f},m],...x("root"),...y})});by.classes=kI;by.displayName="@mantine/core/Center";var RI={root:"m_b183c0a2"};const Zz={},Jz=(t,{color:e})=>({root:{"--code-bg":e?gr(e,t):void 0}}),yl=tt((t,e)=>{const n=Ne("Code",Zz,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,color:f,block:m,variant:y,mod:x,...b}=n,w=vt({name:"Code",props:n,classes:RI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Jz});return c.jsx(Ee,{component:m?"pre":"code",variant:y,ref:e,mod:[{block:m},x],...w("root"),...b,dir:"ltr"})});yl.classes=RI;yl.displayName="@mantine/core/Code";var PI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const nk={withShadow:!0},e$=(t,{radius:e,size:n})=>({root:{"--cs-radius":e===void 0?void 0:nr(e),"--cs-size":Fe(n)}}),Uy=vi((t,e)=>{const n=Ne("ColorSwatch",nk,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,color:f,size:m,radius:y,withShadow:x,children:b,variant:w,...S}=Ne("ColorSwatch",nk,n),D=vt({name:"ColorSwatch",props:n,classes:PI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:e$});return c.jsxs(Ee,{ref:e,variant:w,size:m,...D("root",{focusable:!0}),...S,children:[c.jsx("span",{...D("alphaOverlay")}),x&&c.jsx("span",{...D("shadowOverlay")}),c.jsx("span",{...D("colorOverlay",{style:{backgroundColor:f}})}),c.jsx("span",{...D("childrenOverlay"),children:b})]})});Uy.classes=PI;Uy.displayName="@mantine/core/ColorSwatch";const[t$,KE]=pf(null),QE=A.forwardRef(({position:t,...e},n)=>c.jsx(Ee,{ref:n,__vars:{"--thumb-y-offset":`${t.y*100}%`,"--thumb-x-offset":`${t.x*100}%`},...e}));QE.displayName="@mantine/core/ColorPickerThumb";var ZE={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const n$={},JE=tt((t,e)=>{const n=Ne("ColorSlider",n$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,onChange:f,onChangeEnd:m,maxValue:y,round:x,size:b="md",focusable:w=!0,value:S,overlays:D,thumbColor:k="transparent",onScrubStart:O,onScrubEnd:N,__staticSelector:F="ColorPicker",...M}=n,V=vt({name:F,classes:ZE,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u}),q=KE()?.getStyles||V,B=ai(),[z,ee]=A.useState({y:0,x:S/y}),Y=A.useRef(z),Q=Z=>x?Math.round(Z*y):Z*y,{ref:oe}=jC(({x:Z,y:ie})=>{Y.current={x:Z,y:ie},f?.(Q(Z))},{onScrubEnd:()=>{const{x:Z}=Y.current;m?.(Q(Z)),N?.()},onScrubStart:O});Ha(()=>{ee({y:0,x:S/y})},[S]);const ue=(Z,ie)=>{Z.preventDefault();const G=U5(ie);f?.(Q(G.x)),m?.(Q(G.x))},H=Z=>{switch(Z.key){case"ArrowRight":{ue(Z,{x:z.x+.05,y:z.y});break}case"ArrowLeft":{ue(Z,{x:z.x-.05,y:z.y});break}}},te=D.map((Z,ie)=>A.createElement("div",{...q("sliderOverlay"),style:Z,key:ie}));return c.jsxs(Ee,{...M,ref:ei(oe,e),...q("slider"),role:"slider","aria-valuenow":S,"aria-valuemax":y,"aria-valuemin":0,tabIndex:w?0:-1,onKeyDown:H,"data-focus-ring":B.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${b})`},children:[te,c.jsx(QE,{position:z,...q("thumb",{style:{top:Fe(1),background:k}})})]})});JE.displayName="@mantine/core/ColorSlider";function To(t,e=0,n=10**e){return Math.round(n*t)/n}function r$({h:t,s:e,l:n,a:r}){const i=e*((n<50?n:100-n)/100);return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}const i$={grad:360/400,turn:360,rad:360/(Math.PI*2)};function s$(t,e="deg"){return Number(t)*(i$[e]||1)}const a$=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function rk(t){const e=a$.exec(t);return e?r$({h:s$(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function kw({r:t,g:e,b:n,a:r}){const i=Math.max(t,e,n),s=i-Math.min(t,e,n),o=s?i===t?(e-n)/s:i===e?2+(n-t)/s:4+(t-e)/s:0;return{h:To(60*(o<0?o+6:o),3),s:To(i?s/i*100:0,3),v:To(i/255*100,3),a:r}}function Rw(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?kw({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):kw({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function o$(t){const e=t[0]==="#"?t.slice(1):t,n=o=>To(parseInt(o,16)/255,3);if(e.length===4){const o=e.slice(0,3),u=n(e[3]+e[3]);return{...Rw(o),a:u}}const r=e.slice(0,6),i=n(e.slice(6,8));return{...Rw(r),a:i}}const l$=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function ik(t){const e=l$.exec(t);return e?kw({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const II={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},u$={hex:Rw,hexa:o$,rgb:ik,rgba:ik,hsl:rk,hsla:rk};function c$(t){for(const[,e]of Object.entries(II))if(e.test(t))return!0;return!1}function e1(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(II))if(r.test(e))return u$[n](e);return{h:0,s:0,v:0,a:1}}const d$={},OI=A.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:i,color:s,...o}=Ne("AlphaSlider",d$,t);return c.jsx(JE,{...o,ref:e,value:n,onChange:u=>r?.(To(u,2)),onChangeEnd:u=>i?.(To(u,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${Fe(8)} ${Fe(8)}`,backgroundPosition:`0 0, 0 ${Fe(4)}, ${Fe(4)} ${Fe(-4)}, ${Fe(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Fe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Fe(4)} inset`}]})});OI.displayName="@mantine/core/AlphaSlider";function NI({h:t,s:e,v:n,a:r}){const i=t/360*6,s=e/100,o=n/100,u=Math.floor(i),d=o*(1-s),f=o*(1-(i-u)*s),m=o*(1-(1-i+u)*s),y=u%6;return{r:To([o,f,d,d,m,o][y]*255),g:To([m,o,o,f,d,d][y]*255),b:To([d,d,m,o,o,f][y]*255),a:To(r,2)}}function sk(t,e){const{r:n,g:r,b:i,a:s}=NI(t);return e?`rgba(${n}, ${r}, ${i}, ${To(s,2)})`:`rgb(${n}, ${r}, ${i})`}function ak({h:t,s:e,v:n,a:r},i){const s=(200-e)*n/100,o={h:Math.round(t),s:Math.round(s>0&&s<200?e*n/100/(s<=100?s:200-s)*100:0),l:Math.round(s/2)};return i?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${To(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function S1(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function MI(t){const{r:e,g:n,b:r}=NI(t);return`#${S1(e)}${S1(n)}${S1(r)}`}function f$(t){const e=Math.round(t.a*255);return`${MI(t)}${S1(e)}`}const dT={hex:MI,hexa:t=>f$(t),rgb:t=>sk(t,!1),rgba:t=>sk(t,!0),hsl:t=>ak(t,!1),hsla:t=>ak(t,!0)};function ef(t,e){return e?t in dT?dT[t](e):dT.hex(e):"#000000"}const jI=A.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:i,color:s,...o}=Ne("HueSlider",{},t);return c.jsx(JE,{...o,ref:e,value:n,onChange:r,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Fe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Fe(4)} inset`}]})});jI.displayName="@mantine/core/HueSlider";function LI({className:t,onChange:e,onChangeEnd:n,value:r,saturationLabel:i,focusable:s=!0,size:o,color:u,onScrubStart:d,onScrubEnd:f,...m}){const{getStyles:y}=KE(),[x,b]=A.useState({x:r.s/100,y:1-r.v/100}),w=A.useRef(x),{ref:S}=jC(({x:O,y:N})=>{w.current={x:O,y:N},e({s:Math.round(O*100),v:Math.round((1-N)*100)})},{onScrubEnd:()=>{const{x:O,y:N}=w.current;n({s:Math.round(O*100),v:Math.round((1-N)*100)}),f?.()},onScrubStart:d});A.useEffect(()=>{b({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const D=(O,N)=>{O.preventDefault();const F=U5(N);e({s:Math.round(F.x*100),v:Math.round((1-F.y)*100)}),n({s:Math.round(F.x*100),v:Math.round((1-F.y)*100)})},k=O=>{switch(O.key){case"ArrowUp":{D(O,{y:x.y-.05,x:x.x});break}case"ArrowDown":{D(O,{y:x.y+.05,x:x.x});break}case"ArrowRight":{D(O,{x:x.x+.05,y:x.y});break}case"ArrowLeft":{D(O,{x:x.x-.05,y:x.y});break}}};return c.jsxs(Ee,{...y("saturation"),ref:S,...m,role:"slider","aria-label":i,"aria-valuenow":x.x,"aria-valuetext":ef("rgba",r),tabIndex:s?0:-1,onKeyDown:k,children:[c.jsx("div",{...y("saturationOverlay",{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),c.jsx("div",{...y("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),c.jsx("div",{...y("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),c.jsx(QE,{position:x,...y("thumb",{style:{backgroundColor:u}})})]})}LI.displayName="@mantine/core/Saturation";const BI=A.forwardRef(({className:t,datatype:e,setValue:n,onChangeEnd:r,size:i,focusable:s,data:o,swatchesPerRow:u,...d},f)=>{const m=KE(),y=o.map((x,b)=>A.createElement(Uy,{...m.getStyles("swatch"),unstyled:m.unstyled,component:"button",type:"button",color:x,key:b,radius:"sm",onClick:()=>{n(x),r?.(x)},"aria-label":x,tabIndex:s?0:-1,"data-swatch":!0}));return c.jsx(Ee,{...m.getStyles("swatches"),ref:f,...d,children:y})});BI.displayName="@mantine/core/Swatches";const h$={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},p$=(t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":Xt(e,"cp-preview-size"),"--cp-width":Xt(e,"cp-width"),"--cp-body-spacing":Di(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":Xt(e,"cp-thumb-size"),"--cp-saturation-height":Xt(e,"cp-saturation-height")}}),eA=tt((t,e)=>{const n=Ne("ColorPicker",h$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,format:f,value:m,defaultValue:y,onChange:x,onChangeEnd:b,withPicker:w,size:S,saturationLabel:D,hueLabel:k,alphaLabel:O,focusable:N,swatches:F,swatchesPerRow:M,fullWidth:V,onColorSwatchClick:$,__staticSelector:q,mod:B,...z}=n,ee=vt({name:q,props:n,classes:ZE,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"wrapper",vars:d,varsResolver:p$}),Y=A.useRef(f),Q=A.useRef(""),oe=A.useRef(-1),ue=A.useRef(!1),H=f==="hexa"||f==="rgba"||f==="hsla",[te,Z,ie]=Zr({value:m,defaultValue:y,finalValue:"#FFFFFF",onChange:x}),[G,X]=A.useState(e1(te)),fe=()=>{window.clearTimeout(oe.current),ue.current=!0},be=()=>{window.clearTimeout(oe.current),oe.current=window.setTimeout(()=>{ue.current=!1},200)},we=pe=>{X(Ce=>{const Ke={...Ce,...pe};return Q.current=ef(Y.current,Ke),Ke}),Z(Q.current)};return Ha(()=>{c$(m)&&!ue.current&&X(e1(m))},[m]),Ha(()=>{Y.current=f,Z(ef(f,G))},[f]),c.jsx(t$,{value:{getStyles:ee,unstyled:u},children:c.jsxs(Ee,{ref:e,...ee("wrapper"),size:S,mod:[{"full-width":V},B],...z,children:[w&&c.jsxs(c.Fragment,{children:[c.jsx(LI,{value:G,onChange:we,onChangeEnd:({s:pe,v:Ce})=>b?.(ef(Y.current,{...G,s:pe,v:Ce})),color:te,size:S,focusable:N,saturationLabel:D,onScrubStart:fe,onScrubEnd:be}),c.jsxs("div",{...ee("body"),children:[c.jsxs("div",{...ee("sliders"),children:[c.jsx(jI,{value:G.h,onChange:pe=>we({h:pe}),onChangeEnd:pe=>b?.(ef(Y.current,{...G,h:pe})),size:S,focusable:N,"aria-label":k,onScrubStart:fe,onScrubEnd:be}),H&&c.jsx(OI,{value:G.a,onChange:pe=>we({a:pe}),onChangeEnd:pe=>{b?.(ef(Y.current,{...G,a:pe}))},size:S,color:ef("hex",G),focusable:N,"aria-label":O,onScrubStart:fe,onScrubEnd:be})]}),H&&c.jsx(Uy,{color:te,radius:"sm",size:"var(--cp-preview-size)",...ee("preview")})]})]}),Array.isArray(F)&&c.jsx(BI,{data:F,swatchesPerRow:M,focusable:N,setValue:Z,onChangeEnd:pe=>{const Ce=ef(f,e1(pe));$?.(Ce),b?.(Ce),ie||X(e1(pe))}})]})})});eA.classes=ZE;eA.displayName="@mantine/core/ColorPicker";var FI={root:"m_3eebeb36",label:"m_9e365f20"};const m$={orientation:"horizontal"},g$=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?gr(e,t):void 0,"--divider-border-style":n,"--divider-size":Xt(r,"divider-size")}}),ks=tt((t,e)=>{const n=Ne("Divider",m$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,color:f,orientation:m,label:y,labelPosition:x,mod:b,...w}=n,S=vt({name:"Divider",classes:FI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:g$});return c.jsx(Ee,{ref:e,mod:[{orientation:m,"with-label":!!y},b],...S("root"),...w,role:"separator",children:y&&c.jsx(Ee,{component:"span",mod:{position:x},...S("label"),children:y})})});ks.classes=FI;ks.displayName="@mantine/core/Divider";const[v$,e0]=si("Drawer component was not found in tree");var Xc={root:"m_f11b401e",header:"m_5a7c2c9",content:"m_b8a05bbd",inner:"m_31cd769a"};const y$={},K_=tt((t,e)=>{const n=Ne("DrawerBody",y$,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=e0();return c.jsx(uE,{ref:e,...f.getStyles("body",{classNames:r,style:s,styles:o,className:i}),...d})});K_.classes=Xc;K_.displayName="@mantine/core/DrawerBody";const b$={},Q_=tt((t,e)=>{const n=Ne("DrawerCloseButton",b$,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=e0();return c.jsx(cE,{ref:e,...f.getStyles("close",{classNames:r,style:s,styles:o,className:i}),...d})});Q_.classes=Xc;Q_.displayName="@mantine/core/DrawerCloseButton";const x$={},Z_=tt((t,e)=>{const n=Ne("DrawerContent",x$,t),{classNames:r,className:i,style:s,styles:o,vars:u,children:d,radius:f,__hidden:m,...y}=n,x=e0(),b=x.scrollAreaComponent||KP;return c.jsx(dE,{...x.getStyles("content",{className:i,style:s,styles:o,classNames:r}),innerProps:x.getStyles("inner",{className:i,style:s,styles:o,classNames:r}),ref:e,...y,radius:f||x.radius||0,"data-hidden":m||void 0,children:c.jsx(b,{style:{height:"calc(100vh - var(--drawer-offset) * 2)"},children:d})})});Z_.classes=Xc;Z_.displayName="@mantine/core/DrawerContent";const _$={},J_=tt((t,e)=>{const n=Ne("DrawerHeader",_$,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=e0();return c.jsx(fE,{ref:e,...f.getStyles("header",{classNames:r,style:s,styles:o,className:i}),...d})});J_.classes=Xc;J_.displayName="@mantine/core/DrawerHeader";const S$={},e2=tt((t,e)=>{const n=Ne("DrawerOverlay",S$,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=e0();return c.jsx(hE,{ref:e,...f.getStyles("overlay",{classNames:r,style:s,styles:o,className:i}),...d})});e2.classes=Xc;e2.displayName="@mantine/core/DrawerOverlay";function T$(t){switch(t){case"top":return"flex-start";case"bottom":return"flex-end";default:return}}function w$(t){if(t==="top"||t==="bottom")return"0 0 calc(100% - var(--drawer-offset, 0rem) * 2)"}const C$={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},E$={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},A$={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Gi("modal"),position:"left"},D$=(t,{position:e,size:n,offset:r})=>({root:{"--drawer-size":Xt(n,"drawer-size"),"--drawer-flex":w$(e),"--drawer-height":e==="left"||e==="right"?void 0:"var(--drawer-size)","--drawer-align":T$(e),"--drawer-justify":e==="right"?"flex-end":void 0,"--drawer-offset":Fe(r)}}),t2=tt((t,e)=>{const n=Ne("DrawerRoot",A$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,scrollAreaComponent:f,position:m,transitionProps:y,radius:x,...b}=n,{dir:w}=Xa(),S=vt({name:"Drawer",classes:Xc,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:D$}),D=(w==="rtl"?E$:C$)[m];return c.jsx(v$,{value:{scrollAreaComponent:f,getStyles:S,radius:x},children:c.jsx(lE,{ref:e,...S("root"),transitionProps:{transition:D,...y},"data-offset-scrollbars":f===Ar.Autosize||void 0,unstyled:u,...b})})});t2.classes=Xc;t2.displayName="@mantine/core/DrawerRoot";const[k$,R$]=pf();function UI({children:t}){const[e,n]=A.useState([]),[r,i]=A.useState(Gi("modal"));return c.jsx(k$,{value:{stack:e,addModal:(s,o)=>{n(u=>[...new Set([...u,s])]),i(u=>typeof o=="number"&&typeof u=="number"?Math.max(u,o):u)},removeModal:s=>n(o=>o.filter(u=>u!==s)),getZIndex:s=>`calc(${r} + ${e.indexOf(s)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}UI.displayName="@mantine/core/DrawerStack";const P$={},n2=tt((t,e)=>{const n=Ne("DrawerTitle",P$,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=e0();return c.jsx(pE,{ref:e,...f.getStyles("title",{classNames:r,style:s,styles:o,className:i}),...d})});n2.classes=Xc;n2.displayName="@mantine/core/DrawerTitle";const I$={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Gi("modal"),withOverlay:!0,withCloseButton:!0},Dl=tt((t,e)=>{const{title:n,withOverlay:r,overlayProps:i,withCloseButton:s,closeButtonProps:o,children:u,opened:d,stackId:f,zIndex:m,...y}=Ne("Drawer",I$,t),x=R$(),b=!!n||s,w=x&&f?{closeOnEscape:x.currentId===f,trapFocus:x.currentId===f,zIndex:x.getZIndex(f)}:{},S=r===!1?!1:f&&x?x.currentId===f:d;return A.useEffect(()=>{x&&f&&(d?x.addModal(f,m||Gi("modal")):x.removeModal(f))},[d,f,m]),c.jsxs(t2,{ref:e,opened:d,zIndex:x&&f?x.getZIndex(f):m,...y,...w,children:[r&&c.jsx(e2,{visible:S,transitionProps:x&&f?{duration:0}:void 0,...i}),c.jsxs(Z_,{__hidden:x&&f&&d?f!==x.currentId:!1,children:[b&&c.jsxs(J_,{children:[n&&c.jsx(n2,{children:n}),s&&c.jsx(Q_,{...o})]}),c.jsx(K_,{children:u})]})]})});Dl.classes=Xc;Dl.displayName="@mantine/core/Drawer";Dl.Root=t2;Dl.Overlay=e2;Dl.Content=Z_;Dl.Body=K_;Dl.Header=J_;Dl.Title=n2;Dl.CloseButton=Q_;Dl.Stack=UI;function zI({open:t,close:e,openDelay:n,closeDelay:r}){const i=A.useRef(-1),s=A.useRef(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(s.current)},u=()=>{o(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)},d=()=>{o(),r===0||r===void 0?e():s.current=window.setTimeout(e,r)};return A.useEffect(()=>o,[]),{openDropdown:u,closeDropdown:d}}const[ok,$I]=si("Grid component was not found in tree"),Pw=(t,e)=>t==="content"?"auto":t==="auto"?"0rem":t?`${100/(e/t)}%`:void 0,lk=(t,e,n)=>n||t==="auto"?"100%":t==="content"?"unset":Pw(t,e),uk=(t,e)=>{if(t)return t==="auto"||e?"1":"auto"},ck=(t,e)=>t===0?"0":t?`${100/(e/t)}%`:void 0;function O$({span:t,order:e,offset:n,selector:r}){const i=ai(),s=$I(),o=s.breakpoints||i.breakpoints,d=ty(t)===void 0?12:ty(t),f=qg({"--col-order":ty(e)?.toString(),"--col-flex-grow":uk(d,s.grow),"--col-flex-basis":Pw(d,s.columns),"--col-width":d==="content"?"auto":void 0,"--col-max-width":lk(d,s.columns,s.grow),"--col-offset":ck(ty(n),s.columns)}),m=Qr(o).reduce((b,w)=>(b[w]||(b[w]={}),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-order"]=e[w]?.toString()),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-flex-grow"]=uk(t[w],s.grow),b[w]["--col-flex-basis"]=Pw(t[w],s.columns),b[w]["--col-width"]=t[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=lk(t[w],s.columns,s.grow)),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-offset"]=ck(n[w],s.columns)),b),{}),x=j1(Qr(m),o).filter(b=>Qr(m[b.value]).length>0).map(b=>({query:s.type==="container"?`mantine-grid (min-width: ${o[b.value]})`:`(min-width: ${o[b.value]})`,styles:m[b.value]}));return c.jsx(Iy,{styles:f,media:s.type==="container"?void 0:x,container:s.type==="container"?x:void 0,selector:r})}var tA={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const N$={span:12},nA=tt((t,e)=>{const n=Ne("GridCol",N$,t),{classNames:r,className:i,style:s,styles:o,vars:u,span:d,order:f,offset:m,...y}=n,x=$I(),b=O_();return c.jsxs(c.Fragment,{children:[c.jsx(O$,{selector:`.${b}`,span:d,order:f,offset:m}),c.jsx(Ee,{ref:e,...x.getStyles("col",{className:ii(i,b),style:s,classNames:r,styles:o}),...y})]})});nA.classes=tA;nA.displayName="@mantine/core/GridCol";function dk({gutter:t,selector:e,breakpoints:n,type:r}){const i=ai(),s=n||i.breakpoints,o=qg({"--grid-gutter":Di(ty(t))}),u=Qr(s).reduce((m,y)=>(m[y]||(m[y]={}),typeof t=="object"&&t[y]!==void 0&&(m[y]["--grid-gutter"]=Di(t[y])),m),{}),f=j1(Qr(u),s).filter(m=>Qr(u[m.value]).length>0).map(m=>({query:r==="container"?`mantine-grid (min-width: ${s[m.value]})`:`(min-width: ${s[m.value]})`,styles:u[m.value]}));return c.jsx(Iy,{styles:o,media:r==="container"?void 0:f,container:r==="container"?f:void 0,selector:e})}const M$={gutter:"md",grow:!1,columns:12},j$=(t,{justify:e,align:n,overflow:r})=>({root:{"--grid-justify":e,"--grid-align":n,"--grid-overflow":r}}),qn=tt((t,e)=>{const n=Ne("Grid",M$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,grow:f,gutter:m,columns:y,align:x,justify:b,children:w,breakpoints:S,type:D,...k}=n,O=vt({name:"Grid",classes:tA,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:j$}),N=O_();return D==="container"&&S?c.jsxs(ok,{value:{getStyles:O,grow:f,columns:y||12,breakpoints:S,type:D},children:[c.jsx(dk,{selector:`.${N}`,...n}),c.jsx("div",{...O("container"),children:c.jsx(Ee,{ref:e,...O("root",{className:N}),...k,children:c.jsx("div",{...O("inner"),children:w})})})]}):c.jsxs(ok,{value:{getStyles:O,grow:f,columns:y||12,breakpoints:S,type:D},children:[c.jsx(dk,{selector:`.${N}`,...n}),c.jsx(Ee,{ref:e,...O("root",{className:N}),...k,children:c.jsx("div",{...O("inner"),children:w})})]})});qn.classes=tA;qn.displayName="@mantine/core/Grid";qn.Col=nA;const[L$,VI]=si("HoverCard component was not found in the tree"),B$={};function HI(t){const{children:e,onMouseEnter:n,onMouseLeave:r,...i}=Ne("HoverCardDropdown",B$,t),s=VI(),o=Vi(n,s.openDropdown),u=Vi(r,s.closeDropdown);return c.jsx(Ca.Dropdown,{onMouseEnter:o,onMouseLeave:u,...i,children:e})}HI.displayName="@mantine/core/HoverCardDropdown";const F$={refProp:"ref"},qI=A.forwardRef((t,e)=>{const{children:n,refProp:r,eventPropsWrapperName:i,...s}=Ne("HoverCardTarget",F$,t);if(!Al(n))throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=VI(),u=Vi(n.props.onMouseEnter,o.openDropdown),d=Vi(n.props.onMouseLeave,o.closeDropdown),f={onMouseEnter:u,onMouseLeave:d};return c.jsx(Ca.Target,{refProp:r,ref:e,...s,children:A.cloneElement(n,i?{[i]:f}:f)})});qI.displayName="@mantine/core/HoverCardTarget";const U$={openDelay:0,closeDelay:150,initiallyOpened:!1};function Qh(t){const{children:e,onOpen:n,onClose:r,openDelay:i,closeDelay:s,initiallyOpened:o,...u}=Ne("HoverCard",U$,t),[d,{open:f,close:m}]=pp(o,{onClose:r,onOpen:n}),{openDropdown:y,closeDropdown:x}=zI({open:f,close:m,openDelay:i,closeDelay:s});return c.jsx(L$,{value:{openDropdown:y,closeDropdown:x},children:c.jsx(Ca,{...u,opened:d,__staticSelector:"HoverCard",children:e})})}Qh.displayName="@mantine/core/HoverCard";Qh.Target=qI;Qh.Dropdown=HI;Qh.extend=t=>t;var GI={root:"m_9e117634"};const z$={},$$=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:nr(e),"--image-object-fit":n}}),vp=vi((t,e)=>{const n=Ne("Image",z$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,onError:f,src:m,radius:y,fit:x,fallbackSrc:b,mod:w,...S}=n,[D,k]=A.useState(!m);A.useEffect(()=>k(!m),[m]);const O=vt({name:"Image",classes:GI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:$$});return D&&b?c.jsx(Ee,{component:"img",ref:e,src:b,...O("root"),onError:f,mod:["fallback",w],...S}):c.jsx(Ee,{component:"img",ref:e,...O("root"),src:m,onError:N=>{f?.(N),k(!0)},mod:w,...S})});vp.classes=GI;vp.displayName="@mantine/core/Image";function V$(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=Fe(e),[i,s]=t.split("-");return i==="top"&&(n["--indicator-top"]=r,n["--indicator-translate-y"]="-50%"),i==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),i==="bottom"&&(n["--indicator-bottom"]=r,n["--indicator-translate-y"]="50%"),s==="start"&&(n["--indicator-left"]=r,n["--indicator-translate-x"]="-50%"),s==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),s==="end"&&(n["--indicator-right"]=r,n["--indicator-translate-x"]="50%"),n}var WI={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const H$={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1},q$=(t,{color:e,position:n,offset:r,size:i,radius:s,zIndex:o,autoContrast:u})=>({root:{"--indicator-color":e?gr(e,t):void 0,"--indicator-text-color":Gg(u,t)?gf({color:e,theme:t,autoContrast:u}):void 0,"--indicator-size":Fe(i),"--indicator-radius":s===void 0?void 0:nr(s),"--indicator-z-index":o?.toString(),...V$(n,r)}}),rA=tt((t,e)=>{const n=Ne("Indicator",H$,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,children:f,position:m,offset:y,inline:x,label:b,radius:w,color:S,withBorder:D,disabled:k,processing:O,zIndex:N,autoContrast:F,mod:M,...V}=n,$=vt({name:"Indicator",classes:WI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:q$});return c.jsxs(Ee,{ref:e,...$("root"),mod:[{inline:x},M],...V,children:[!k&&c.jsx(Ee,{mod:{"with-label":!!b,"with-border":D,processing:O},...$("indicator"),children:b}),f]})});rA.classes=WI;rA.displayName="@mantine/core/Indicator";function Xr(){return Xr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xr.apply(null,arguments)}function iA(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var G$=A.useLayoutEffect,W$=function(e){var n=Or.useRef(e);return G$(function(){n.current=e}),n},fk=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},X$=function(e,n){var r=Or.useRef();return Or.useCallback(function(i){e.current=i,r.current&&fk(r.current,null),r.current=n,n&&fk(n,i)},[n])},hk={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y$=function(e){Object.keys(hk).forEach(function(n){e.style.setProperty(n,hk[n],"important")})},pk=Y$,Ws=null,mk=function(e,n){var r=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function K$(t,e,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Ws||(Ws=document.createElement("textarea"),Ws.setAttribute("tabindex","-1"),Ws.setAttribute("aria-hidden","true"),pk(Ws)),Ws.parentNode===null&&document.body.appendChild(Ws);var i=t.paddingSize,s=t.borderSize,o=t.sizingStyle,u=o.boxSizing;Object.keys(o).forEach(function(x){var b=x;Ws.style[b]=o[b]}),pk(Ws),Ws.value=e;var d=mk(Ws,t);Ws.value=e,d=mk(Ws,t),Ws.value="x";var f=Ws.scrollHeight-i,m=f*n;u==="border-box"&&(m=m+i+s),d=Math.max(m,d);var y=f*r;return u==="border-box"&&(y=y+i+s),d=Math.min(y,d),[d,f]}var gk=function(){},Q$=function(e,n){return e.reduce(function(r,i){return r[i]=n[i],r},{})},Z$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],J$=!!document.documentElement.currentStyle,eV=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var r=Q$(Z$,n),i=r.boxSizing;if(i==="")return null;J$&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:o}},tV=eV;function sA(t,e,n){var r=W$(n);A.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(t)return t.addEventListener(e,i),function(){return t.removeEventListener(e,i)}},[])}var nV=function(e,n){sA(document.body,"reset",function(r){e.current.form===r.target&&n(r)})},rV=function(e){sA(window,"resize",e)},iV=function(e){sA(document.fonts,"loadingdone",e)},sV=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],aV=function(e,n){var r=e.cacheMeasurements,i=e.maxRows,s=e.minRows,o=e.onChange,u=o===void 0?gk:o,d=e.onHeightChange,f=d===void 0?gk:d,m=iA(e,sV),y=m.value!==void 0,x=A.useRef(null),b=X$(x,n),w=A.useRef(0),S=A.useRef(),D=function(){var N=x.current,F=r&&S.current?S.current:tV(N);if(F){S.current=F;var M=K$(F,N.value||N.placeholder||"x",s,i),V=M[0],$=M[1];w.current!==V&&(w.current=V,N.style.setProperty("height",V+"px","important"),f(V,{rowHeight:$}))}},k=function(N){y||D(),u(N)};return A.useLayoutEffect(D),nV(x,function(){if(!y){var O=x.current.value;requestAnimationFrame(function(){var N=x.current;N&&O!==N.value&&D()})}}),rV(D),iV(D),A.createElement("textarea",Xr({},m,{onChange:k,ref:b}))},oV=A.forwardRef(aV);const lV={},aA=tt((t,e)=>{const{autosize:n,maxRows:r,minRows:i,__staticSelector:s,resize:o,...u}=Ne("Textarea",lV,t),d=n&&z5()!=="test",f=d?{maxRows:r,minRows:i}:{};return c.jsx(Ea,{component:d?oV:"textarea",ref:e,...u,__staticSelector:s||"Textarea",multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":o},...f})});aA.classes=Ea.classes;aA.displayName="@mantine/core/Textarea";const[uV,cV]=si("List component was not found in tree");var oA={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const dV={},lA=tt((t,e)=>{const n=Ne("ListItem",dV,t),{classNames:r,className:i,style:s,styles:o,vars:u,icon:d,children:f,mod:m,...y}=n,x=cV(),b=d||x.icon,w={classNames:r,styles:o};return c.jsx(Ee,{...x.getStyles("item",{...w,className:i,style:s}),component:"li",mod:[{"with-icon":!!b,centered:x.center},m],ref:e,...y,children:c.jsxs("div",{...x.getStyles("itemWrapper",w),children:[b&&c.jsx("span",{...x.getStyles("itemIcon",w),children:b}),c.jsx("span",{...x.getStyles("itemLabel",w),children:f})]})})});lA.classes=oA;lA.displayName="@mantine/core/ListItem";const fV={type:"unordered"},hV=(t,{size:e,spacing:n})=>({root:{"--list-fz":ki(e),"--list-lh":P5(e),"--list-spacing":Di(n)}}),Ks=tt((t,e)=>{const n=Ne("List",fV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,children:f,type:m,withPadding:y,icon:x,spacing:b,center:w,listStyleType:S,mod:D,...k}=n,O=vt({name:"List",classes:oA,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:hV});return c.jsx(uV,{value:{center:w,icon:x,getStyles:O},children:c.jsx(Ee,{...O("root",{style:{listStyleType:S}}),component:m==="unordered"?"ul":"ol",mod:[{"with-padding":y},D],ref:e,...k,children:f})})});Ks.classes=oA;Ks.displayName="@mantine/core/List";Ks.Item=lA;var XI={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const vk={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:Gi("overlay")},pV=(t,{zIndex:e})=>({root:{"--lo-z-index":e?.toString()}}),t0=tt((t,e)=>{const n=Ne("LoadingOverlay",vk,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,transitionProps:f,loaderProps:m,overlayProps:y,visible:x,zIndex:b,...w}=n,S=ai(),D=vt({name:"LoadingOverlay",classes:XI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:pV}),k={...vk.overlayProps,...y};return c.jsx(Vu,{transition:"fade",...f,mounted:!!x,children:O=>c.jsxs(Ee,{...D("root",{style:O}),ref:e,...w,children:[c.jsx(ju,{...D("loader"),unstyled:u,...m}),c.jsx(Dg,{...k,...D("overlay"),darkHidden:!0,unstyled:u,color:y?.color||S.white}),c.jsx(Dg,{...k,...D("overlay"),lightHidden:!0,unstyled:u,color:y?.color||S.colors.dark[5]})]})})});t0.classes=XI;t0.displayName="@mantine/core/LoadingOverlay";const[mV,zy]=si("Menu component was not found in the tree");var n0={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};const gV={},uA=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("MenuDivider",gV,t),d=zy();return c.jsx(Ee,{ref:e,...d.getStyles("divider",{className:r,style:i,styles:s,classNames:n}),...u})});uA.classes=n0;uA.displayName="@mantine/core/MenuDivider";const vV={},cA=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,onMouseEnter:u,onMouseLeave:d,onKeyDown:f,children:m,...y}=Ne("MenuDropdown",vV,t),x=A.useRef(null),b=zy(),w=Vi(f,k=>{(k.key==="ArrowUp"||k.key==="ArrowDown")&&(k.preventDefault(),x.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),S=Vi(u,()=>(b.trigger==="hover"||b.trigger==="click-hover")&&b.openDropdown()),D=Vi(d,()=>(b.trigger==="hover"||b.trigger==="click-hover")&&b.closeDropdown());return c.jsxs(Ca.Dropdown,{...y,onMouseEnter:S,onMouseLeave:D,role:"menu","aria-orientation":"vertical",ref:ei(e,x),...b.getStyles("dropdown",{className:r,style:i,styles:s,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[b.withInitialFocusPlaceholder&&c.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),m]})});cA.classes=n0;cA.displayName="@mantine/core/MenuDropdown";const yV={},dA=vi((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,color:u,closeMenuOnClick:d,leftSection:f,rightSection:m,children:y,disabled:x,"data-disabled":b,...w}=Ne("MenuItem",yV,t),S=zy(),D=ai(),{dir:k}=Xa(),O=A.useRef(null),N=S.getItemIndex(O.current),F=w,M=Vi(F.onMouseLeave,()=>S.setHovered(-1)),V=Vi(F.onMouseEnter,()=>S.setHovered(S.getItemIndex(O.current))),$=Vi(F.onClick,()=>{b||(typeof d=="boolean"?d&&S.closeDropdownImmediately():S.closeOnItemClick&&S.closeDropdownImmediately())}),q=Vi(F.onFocus,()=>S.setHovered(S.getItemIndex(O.current))),B=u?D.variantColorResolver({color:u,theme:D,variant:"light"}):void 0,z=u?mf({color:u,theme:D}):null;return c.jsxs(Ta,{...w,unstyled:S.unstyled,tabIndex:S.menuItemTabIndex,onFocus:q,...S.getStyles("item",{className:r,style:i,styles:s,classNames:n}),ref:ei(O,e),role:"menuitem",disabled:x,"data-menu-item":!0,"data-disabled":x||b||void 0,"data-hovered":S.hovered===N?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:V,onMouseLeave:M,onClick:$,onKeyDown:OC({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:S.loop,dir:k,orientation:"vertical",onKeyDown:F.onKeyDown}),__vars:{"--menu-item-color":z?.isThemeColor&&z?.shade===void 0?`var(--mantine-color-${z.color}-6)`:B?.color,"--menu-item-hover":B?.hover},children:[f&&c.jsx("div",{...S.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"left",children:f}),y&&c.jsx("div",{...S.getStyles("itemLabel",{styles:s,classNames:n}),children:y}),m&&c.jsx("div",{...S.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"right",children:m})]})});dA.classes=n0;dA.displayName="@mantine/core/MenuItem";const bV={},fA=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("MenuLabel",bV,t),d=zy();return c.jsx(Ee,{ref:e,...d.getStyles("label",{className:r,style:i,styles:s,classNames:n}),...u})});fA.classes=n0;fA.displayName="@mantine/core/MenuLabel";const xV={refProp:"ref"},YI=A.forwardRef((t,e)=>{const{children:n,refProp:r,...i}=Ne("MenuTarget",xV,t);if(!Al(n))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=zy(),o=n.props,u=Vi(o.onClick,()=>{s.trigger==="click"?s.toggleDropdown():s.trigger==="click-hover"&&(s.setOpenedViaClick(!0),s.opened||s.openDropdown())}),d=Vi(o.onMouseEnter,()=>(s.trigger==="hover"||s.trigger==="click-hover")&&s.openDropdown()),f=Vi(o.onMouseLeave,()=>{(s.trigger==="hover"||s.trigger==="click-hover"&&!s.openedViaClick)&&s.closeDropdown()});return c.jsx(Ca.Target,{refProp:r,popupType:"menu",ref:e,...i,children:A.cloneElement(n,{onClick:u,onMouseEnter:d,onMouseLeave:f,"data-expanded":s.opened?!0:void 0})})});YI.displayName="@mantine/core/MenuTarget";const _V={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function kt(t){const e=Ne("Menu",_V,t),{children:n,onOpen:r,onClose:i,opened:s,defaultOpened:o,trapFocus:u,onChange:d,closeOnItemClick:f,loop:m,closeOnEscape:y,trigger:x,openDelay:b,closeDelay:w,classNames:S,styles:D,unstyled:k,variant:O,vars:N,menuItemTabIndex:F,keepMounted:M,withInitialFocusPlaceholder:V,...$}=e,q=vt({name:"Menu",classes:n0,props:e,classNames:S,styles:D,unstyled:k}),[B,{setHovered:z,resetHovered:ee}]=w7(),[Y,Q]=Zr({value:s,defaultValue:o,finalValue:!1,onChange:d}),[oe,ue]=A.useState(!1),H=()=>{Q(!1),ue(!1),Y&&i?.()},te=()=>{Q(!0),!Y&&r?.()},Z=()=>{Y?H():te()},{openDropdown:ie,closeDropdown:G}=zI({open:te,close:H,closeDelay:w,openDelay:b}),X=we=>T7("[data-menu-item]","[data-menu-dropdown]",we),{resolvedClassNames:fe,resolvedStyles:be}=zu({classNames:S,styles:D,props:e});return Ha(()=>{ee()},[Y]),c.jsx(mV,{value:{getStyles:q,opened:Y,toggleDropdown:Z,getItemIndex:X,hovered:B,setHovered:z,openedViaClick:oe,setOpenedViaClick:ue,closeOnItemClick:f,closeDropdown:x==="click"?H:G,openDropdown:x==="click"?te:ie,closeDropdownImmediately:H,loop:m,trigger:x,unstyled:k,menuItemTabIndex:F,withInitialFocusPlaceholder:V},children:c.jsx(Ca,{...$,opened:Y,onChange:Z,defaultOpened:o,trapFocus:M?!1:u,closeOnEscape:y,__staticSelector:"Menu",classNames:fe,styles:be,unstyled:k,variant:O,keepMounted:M,children:n})})}kt.extend=t=>t;kt.withProps=eP(kt);kt.classes=n0;kt.displayName="@mantine/core/Menu";kt.Item=dA;kt.Label=fA;kt.Dropdown=cA;kt.Target=YI;kt.Divider=uA;const[SV,r0]=si("Modal component was not found in tree");var Yc={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const TV={},r2=tt((t,e)=>{const n=Ne("ModalBody",TV,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=r0();return c.jsx(uE,{ref:e,...f.getStyles("body",{classNames:r,style:s,styles:o,className:i}),...d})});r2.classes=Yc;r2.displayName="@mantine/core/ModalBody";const wV={},i2=tt((t,e)=>{const n=Ne("ModalCloseButton",wV,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=r0();return c.jsx(cE,{ref:e,...f.getStyles("close",{classNames:r,style:s,styles:o,className:i}),...d})});i2.classes=Yc;i2.displayName="@mantine/core/ModalCloseButton";const CV={},s2=tt((t,e)=>{const n=Ne("ModalContent",CV,t),{classNames:r,className:i,style:s,styles:o,vars:u,children:d,__hidden:f,...m}=n,y=r0(),x=y.scrollAreaComponent||KP;return c.jsx(dE,{...y.getStyles("content",{className:i,style:s,styles:o,classNames:r}),innerProps:y.getStyles("inner",{className:i,style:s,styles:o,classNames:r}),"data-full-screen":y.fullScreen||void 0,"data-modal-content":!0,"data-hidden":f||void 0,ref:e,...m,children:c.jsx(x,{style:{maxHeight:y.fullScreen?"100dvh":`calc(100dvh - (${Fe(y.yOffset)} * 2))`},children:d})})});s2.classes=Yc;s2.displayName="@mantine/core/ModalContent";const EV={},a2=tt((t,e)=>{const n=Ne("ModalHeader",EV,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=r0();return c.jsx(fE,{ref:e,...f.getStyles("header",{classNames:r,style:s,styles:o,className:i}),...d})});a2.classes=Yc;a2.displayName="@mantine/core/ModalHeader";const AV={},o2=tt((t,e)=>{const n=Ne("ModalOverlay",AV,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=r0();return c.jsx(hE,{ref:e,...f.getStyles("overlay",{classNames:r,style:s,styles:o,className:i}),...d})});o2.classes=Yc;o2.displayName="@mantine/core/ModalOverlay";const DV={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Gi("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},kV=(t,{radius:e,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:nr(e),"--modal-size":Xt(n,"modal-size"),"--modal-y-offset":Fe(r),"--modal-x-offset":Fe(i)}}),l2=tt((t,e)=>{const n=Ne("ModalRoot",DV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,yOffset:f,scrollAreaComponent:m,radius:y,fullScreen:x,centered:b,xOffset:w,__staticSelector:S,...D}=n,k=vt({name:S,classes:Yc,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:kV});return c.jsx(SV,{value:{yOffset:f,scrollAreaComponent:m,getStyles:k,fullScreen:x},children:c.jsx(lE,{ref:e,...k("root"),"data-full-screen":x||void 0,"data-centered":b||void 0,"data-offset-scrollbars":m===Ar.Autosize||void 0,unstyled:u,...D})})});l2.classes=Yc;l2.displayName="@mantine/core/ModalRoot";const[RV,PV]=pf();function KI({children:t}){const[e,n]=A.useState([]),[r,i]=A.useState(Gi("modal"));return c.jsx(RV,{value:{stack:e,addModal:(s,o)=>{n(u=>[...new Set([...u,s])]),i(u=>typeof o=="number"&&typeof u=="number"?Math.max(u,o):u)},removeModal:s=>n(o=>o.filter(u=>u!==s)),getZIndex:s=>`calc(${r} + ${e.indexOf(s)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}KI.displayName="@mantine/core/ModalStack";const IV={},u2=tt((t,e)=>{const n=Ne("ModalTitle",IV,t),{classNames:r,className:i,style:s,styles:o,vars:u,...d}=n,f=r0();return c.jsx(pE,{ref:e,...f.getStyles("title",{classNames:r,style:s,styles:o,className:i}),...d})});u2.classes=Yc;u2.displayName="@mantine/core/ModalTitle";const OV={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Gi("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Qn=tt((t,e)=>{const{title:n,withOverlay:r,overlayProps:i,withCloseButton:s,closeButtonProps:o,children:u,radius:d,opened:f,stackId:m,zIndex:y,...x}=Ne("Modal",OV,t),b=PV(),w=!!n||s,S=b&&m?{closeOnEscape:b.currentId===m,trapFocus:b.currentId===m,zIndex:b.getZIndex(m)}:{},D=r===!1?!1:m&&b?b.currentId===m:f;return A.useEffect(()=>{b&&m&&(f?b.addModal(m,y||Gi("modal")):b.removeModal(m))},[f,m,y]),c.jsxs(l2,{ref:e,radius:d,opened:f,zIndex:b&&m?b.getZIndex(m):y,...x,...S,children:[r&&c.jsx(o2,{visible:D,transitionProps:b&&m?{duration:0}:void 0,...i}),c.jsxs(s2,{radius:d,__hidden:b&&m&&f?m!==b.currentId:!1,children:[w&&c.jsxs(a2,{children:[n&&c.jsx(u2,{children:n}),s&&c.jsx(i2,{...o})]}),c.jsx(r2,{children:u})]})]})});Qn.classes=Yc;Qn.displayName="@mantine/core/Modal";Qn.Root=l2;Qn.Overlay=o2;Qn.Content=s2;Qn.Body=r2;Qn.Header=a2;Qn.Title=u2;Qn.CloseButton=i2;Qn.Stack=KI;const[NV,hA]=pf(),[MV,jV]=pf();var c2={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const LV={},BV=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?Xt(e):Xt(n,"pg-gap")}}),pA=tt((t,e)=>{const n=Ne("PillGroup",LV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,size:f,disabled:m,...y}=n,b=hA()?.size||f||void 0,w=vt({name:"PillGroup",classes:c2,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:BV,stylesCtx:{size:b},rootSelector:"group"});return c.jsx(MV,{value:{size:b,disabled:m},children:c.jsx(Ee,{ref:e,size:b,...w("group"),...y})})});pA.classes=c2;pA.displayName="@mantine/core/PillGroup";const FV={variant:"default"},UV=(t,{radius:e},{size:n})=>({root:{"--pill-fz":Xt(n,"pill-fz"),"--pill-height":Xt(n,"pill-height"),"--pill-radius":e===void 0?void 0:nr(e)}}),xy=tt((t,e)=>{const n=Ne("Pill",FV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,variant:f,children:m,withRemoveButton:y,onRemove:x,removeButtonProps:b,radius:w,size:S,disabled:D,mod:k,...O}=n,N=jV(),F=hA(),M=S||N?.size||void 0,V=F?.variant==="filled"?"contrast":f||"default",$=vt({name:"Pill",classes:c2,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:UV,stylesCtx:{size:M}});return c.jsxs(Ee,{component:"span",ref:e,variant:V,size:M,...$("root",{variant:V}),mod:[{"with-remove":y&&!D,disabled:D||N?.disabled},k],...O,children:[c.jsx("span",{...$("label"),children:m}),y&&c.jsx(Kg,{variant:"transparent",radius:w,tabIndex:-1,"aria-hidden":!0,unstyled:u,...b,...$("remove",{className:b?.className,style:b?.style}),onMouseDown:q=>{q.preventDefault(),q.stopPropagation(),b?.onMouseDown?.(q)},onClick:q=>{q.stopPropagation(),x?.(),b?.onClick?.(q)}})]})});xy.classes=c2;xy.displayName="@mantine/core/Pill";xy.Group=pA;var QI={field:"m_45c4369d"};const zV={type:"visible"},mA=tt((t,e)=>{const n=Ne("PillsInputField",zV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,type:f,disabled:m,id:y,pointer:x,mod:b,...w}=n,S=hA(),D=Qg(),k=vt({name:"PillsInputField",classes:QI,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"field"}),O=m||S?.disabled;return c.jsx(Ee,{component:"input",ref:ei(e,S?.fieldRef),"data-type":f,disabled:O,mod:[{disabled:O,pointer:x},b],...k("field"),...w,id:D?.inputId||y,"aria-invalid":S?.hasError,"aria-describedby":D?.describedBy,type:"text",onMouseDown:N=>!x&&N.stopPropagation()})});mA.classes=QI;mA.displayName="@mantine/core/PillsInputField";const $V={},q1=tt((t,e)=>{const n=Ne("PillsInput",$V,t),{children:r,onMouseDown:i,onClick:s,size:o,disabled:u,__staticSelector:d,error:f,variant:m,...y}=n,x=A.useRef(null);return c.jsx(NV,{value:{fieldRef:x,size:o,disabled:u,hasError:!!f,variant:m},children:c.jsx(Ea,{size:o,error:f,variant:m,component:"div",ref:e,onMouseDown:b=>{b.preventDefault(),i?.(b),x.current?.focus()},onClick:b=>{b.preventDefault(),b.currentTarget.closest("fieldset")?.disabled||(x.current?.focus(),s?.(b))},...y,multiline:!0,disabled:u,__staticSelector:d||"PillsInput",withAria:!1,children:r})})});q1.displayName="@mantine/core/PillsInput";q1.Field=mA;function VV({data:t,value:e}){const n=e.map(i=>i.trim().toLowerCase());return t.reduce((i,s)=>(Rg(s)?i.push({group:s.group,items:s.items.filter(o=>n.indexOf(o.value.toLowerCase().trim())===-1)}):n.indexOf(s.value.toLowerCase().trim())===-1&&i.push(s),i),[])}const HV={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},lp=tt((t,e)=>{const n=Ne("MultiSelect",HV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,size:f,value:m,defaultValue:y,onChange:x,onKeyDown:b,variant:w,data:S,dropdownOpened:D,defaultDropdownOpened:k,onDropdownOpen:O,onDropdownClose:N,selectFirstOptionOnChange:F,onOptionSubmit:M,comboboxProps:V,filter:$,limit:q,withScrollArea:B,maxDropdownHeight:z,searchValue:ee,defaultSearchValue:Y,onSearchChange:Q,readOnly:oe,disabled:ue,onFocus:H,onBlur:te,radius:Z,rightSection:ie,rightSectionWidth:G,rightSectionPointerEvents:X,rightSectionProps:fe,leftSection:be,leftSectionWidth:we,leftSectionPointerEvents:pe,leftSectionProps:Ce,inputContainer:Ke,inputWrapperOrder:Me,withAsterisk:lt,labelProps:bt,descriptionProps:mt,errorProps:_t,wrapperProps:Qt,description:xt,label:wt,error:Ot,maxValues:qe,searchable:Le,nothingFoundMessage:He,withCheckIcon:Xe,checkIconPosition:he,hidePickedOptions:Ae,withErrorStyles:rt,name:$e,form:Ze,id:qt,clearable:jt,clearButtonProps:un,hiddenInputProps:Pt,placeholder:an,hiddenInputValuesDivider:rr,required:on,mod:oi,renderOption:Hr,onRemove:kn,onClear:qr,scrollAreaProps:xr,chevronColor:Ka,...Os}=n,us=ls(qt),cs=sI(S),J=kE(cs),re=UE({opened:D,defaultOpened:k,onDropdownOpen:O,onDropdownClose:()=>{N?.(),re.resetSelectedOption()}}),{styleProps:ye,rest:{type:Be,autoComplete:ft,...Nt}}=mp(Os),[Zt,cr]=Zr({value:m,defaultValue:y,finalValue:[],onChange:x}),[ir,En]=Zr({value:ee,defaultValue:Y,finalValue:"",onChange:Q}),On=At=>{En(At),re.resetSelectedOption()},dr=vt({name:"MultiSelect",classes:{},props:n,classNames:r,styles:o,unstyled:u}),{resolvedClassNames:Gr,resolvedStyles:ct}=zu({props:n,styles:o,classNames:r}),sn=At=>{b?.(At),At.key===" "&&!Le&&(At.preventDefault(),re.toggleDropdown()),At.key==="Backspace"&&ir.length===0&&Zt.length>0&&(kn?.(Zt[Zt.length-1]),cr(Zt.slice(0,Zt.length-1)))},cn=Zt.map((At,Wi)=>c.jsx(xy,{withRemoveButton:!oe&&!J[At]?.disabled,onRemove:()=>{cr(Zt.filter(Ns=>At!==Ns)),kn?.(At)},unstyled:u,disabled:ue,...dr("pill"),children:J[At]?.label||At},`${At}-${Wi}`));A.useEffect(()=>{F&&re.selectFirstOption()},[F,ir]);const Zn=c.jsx(Bn.ClearButton,{...un,onClear:()=>{qr?.(),cr([]),On("")}}),_n=VV({data:cs,value:Zt}),_r=jt&&Zt.length>0&&!ue&&!oe;return c.jsxs(c.Fragment,{children:[c.jsxs(Bn,{store:re,classNames:Gr,styles:ct,unstyled:u,size:f,readOnly:oe,__staticSelector:"MultiSelect",onOptionSubmit:At=>{M?.(At),On(""),re.updateSelectedOptionIndex("selected"),Zt.includes(J[At].value)?(cr(Zt.filter(Wi=>Wi!==J[At].value)),kn?.(J[At].value)):Zt.length<qe&&cr([...Zt,J[At].value])},...V,children:[c.jsx(Bn.DropdownTarget,{children:c.jsx(q1,{...ye,__staticSelector:"MultiSelect",classNames:Gr,styles:ct,unstyled:u,size:f,className:i,style:s,variant:w,disabled:ue,radius:Z,__defaultRightSection:c.jsx(Bn.Chevron,{size:f,error:Ot,unstyled:u,color:Ka}),__clearSection:Zn,__clearable:_r,rightSection:ie,rightSectionPointerEvents:X||(Zn?"all":"none"),rightSectionWidth:G,rightSectionProps:fe,leftSection:be,leftSectionWidth:we,leftSectionPointerEvents:pe,leftSectionProps:Ce,inputContainer:Ke,inputWrapperOrder:Me,withAsterisk:lt,labelProps:bt,descriptionProps:mt,errorProps:_t,wrapperProps:Qt,description:xt,label:wt,error:Ot,withErrorStyles:rt,__stylesApiProps:{...n,rightSectionPointerEvents:X||(_r?"all":"none"),multiline:!0},pointer:!Le,onClick:()=>Le?re.openDropdown():re.toggleDropdown(),"data-expanded":re.dropdownOpened||void 0,id:us,required:on,mod:oi,children:c.jsxs(xy.Group,{disabled:ue,unstyled:u,...dr("pillsList"),children:[cn,c.jsx(Bn.EventsTarget,{autoComplete:ft,children:c.jsx(q1.Field,{...Nt,ref:e,id:us,placeholder:an,type:!Le&&!an?"hidden":"visible",...dr("inputField"),unstyled:u,onFocus:At=>{H?.(At),Le&&re.openDropdown()},onBlur:At=>{te?.(At),re.closeDropdown(),On("")},onKeyDown:sn,value:ir,onChange:At=>{On(At.currentTarget.value),Le&&re.openDropdown(),F&&re.selectFirstOption()},disabled:ue,readOnly:oe||!Le,pointer:!Le})})]})})}),c.jsx(wI,{data:Ae?_n:cs,hidden:oe||ue,filter:$,search:ir,limit:q,hiddenWhenEmpty:!He,withScrollArea:B,maxDropdownHeight:z,filterOptions:Le,value:Zt,checkIconPosition:he,withCheckIcon:Xe,nothingFoundMessage:He,unstyled:u,labelId:wt?`${us}-label`:void 0,"aria-label":wt?void 0:Os["aria-label"],renderOption:Hr,scrollAreaProps:xr})]}),c.jsx(Bn.HiddenInput,{name:$e,valuesDivider:rr,value:Zt,form:Ze,disabled:ue,...Pt})]})});lp.classes={...Ea.classes,...Bn.classes};lp.displayName="@mantine/core/MultiSelect";var ZI={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};const qV={},GV=(t,{variant:e,color:n,childrenOffset:r,autoContrast:i})=>{const s=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:e||"light",autoContrast:i});return{root:{"--nl-bg":n||e?s.background:void 0,"--nl-hover":n||e?s.hover:void 0,"--nl-color":n||e?s.color:void 0},children:{"--nl-offset":Di(r)}}},gA=vi((t,e)=>{const n=Ne("NavLink",qV,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,opened:f,defaultOpened:m,onChange:y,children:x,onClick:b,active:w,disabled:S,leftSection:D,rightSection:k,label:O,description:N,disableRightSectionRotation:F,noWrap:M,childrenOffset:V,onKeyDown:$,autoContrast:q,mod:B,...z}=n,ee=vt({name:"NavLink",props:n,classes:ZI,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:GV}),[Y,Q]=Zr({value:f,defaultValue:m,finalValue:!1,onChange:y}),oe=!!x,ue=H=>{b?.(H),oe&&(H.preventDefault(),Q(!Y))};return c.jsxs(c.Fragment,{children:[c.jsxs(Ta,{...ee("root"),component:"a",ref:e,onClick:ue,onKeyDown:H=>{$?.(H),H.nativeEvent.code==="Space"&&oe&&(H.preventDefault(),Q(!Y))},unstyled:u,mod:[{disabled:S,active:w,expanded:Y},B],...z,children:[D&&c.jsx(Ee,{component:"span",...ee("section"),mod:{position:"left"},children:D}),c.jsxs(Ee,{...ee("body"),mod:{"no-wrap":M},children:[c.jsx(Ee,{component:"span",...ee("label"),children:O}),c.jsx(Ee,{component:"span",mod:{active:w},...ee("description"),children:N})]}),(oe||k!==void 0)&&c.jsx(Ee,{...ee("section"),component:"span",mod:{rotate:Y&&!F,position:"right"},children:oe?k!==void 0?k:c.jsx(G_,{...ee("chevron")}):k})]}),oe&&c.jsx(gp,{in:Y,...ee("collapse"),children:c.jsx("div",{...ee("children"),children:x})})]})});gA.classes=ZI;gA.displayName="@mantine/core/NavLink";var JI={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const WV={withCloseButton:!0},XV=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:nr(e),"--notification-color":n?gr(n,t):void 0}}),vA=tt((t,e)=>{const n=Ne("Notification",WV,t),{className:r,color:i,radius:s,loading:o,withCloseButton:u,withBorder:d,title:f,icon:m,children:y,onClose:x,closeButtonProps:b,classNames:w,style:S,styles:D,unstyled:k,variant:O,vars:N,mod:F,loaderProps:M,role:V,...$}=n,q=vt({name:"Notification",classes:JI,props:n,className:r,style:S,classNames:w,styles:D,unstyled:k,vars:N,varsResolver:XV});return c.jsxs(Ee,{...q("root"),mod:[{"data-with-icon":!!m||o,"data-with-border":d},F],ref:e,variant:O,role:V||"alert",...$,children:[m&&!o&&c.jsx("div",{...q("icon"),children:m}),o&&c.jsx(ju,{size:28,color:i,...M,...q("loader")}),c.jsxs("div",{...q("body"),children:[f&&c.jsx("div",{...q("title"),children:f}),c.jsx(Ee,{...q("description"),mod:{"data-with-title":!!f},children:y})]}),u&&c.jsx(Kg,{iconSize:16,color:"gray",...b,unstyled:k,onClick:x,...q("closeButton")})]})});vA.classes=JI;vA.displayName="@mantine/core/Notification";function eO(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var _y;(function(t){t.event="event",t.props="prop"})(_y||(_y={}));function af(){}function YV(t){var e,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e&&r.length===e.length&&r.every(function(s,o){return s===e[o]})||(e=r,n=t.apply(void 0,r)),n}}function Sy(t){return!!(t||"").match(/\d/)}function fg(t){return t==null}function KV(t){return typeof t=="number"&&isNaN(t)}function tO(t){return fg(t)||KV(t)||typeof t=="number"&&!isFinite(t)}function nO(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function QV(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function ZV(t,e,n){var r=QV(n),i=t.search(/[1-9]/);return i=i===-1?t.length:i,t.substring(0,i)+t.substring(i,t.length).replace(r,"$1"+e)}function JV(t){var e=A.useRef(t);e.current=t;var n=A.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e.current.apply(e,r)});return n.current}function yA(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var i=t.split("."),s=i[0],o=i[1]||"";return{beforeDecimal:s,afterDecimal:o,hasNegation:n,addNegation:r}}function eH(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")}function rO(t,e,n){for(var r="",i=n?"0":"",s=0;s<=e-1;s++)r+=t[s]||i;return r}function yk(t,e){return Array(e+1).join(t)}function iO(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),i=r[0],s=r[1];if(s=Number(s),!s)return n+i;i=i.replace(".","");var o=1+s,u=i.length;return o<0?i="0."+yk("0",Math.abs(o))+i:o>=u?i=i+yk("0",o-u):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function bk(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,i=yA(t),s=i.beforeDecimal,o=i.afterDecimal,u=i.hasNegation,d=parseFloat("0."+(o||"0")),f=o.length<=e?"0."+o:d.toFixed(e),m=f.split("."),y=s;s&&Number(m[0])&&(y=s.split("").reverse().reduce(function(S,D,k){return S.length>k?(Number(S[0])+Number(D)).toString()+S.substring(1,S.length):D+S},m[0]));var x=rO(m[1]||"",e,n),b=u?"-":"",w=r?".":"";return""+b+y+w+x}function zh(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var sO=YV(function(t,e){for(var n=0,r=0,i=t.length,s=e.length;t[n]===e[n]&&n<i;)n++;for(;t[i-1-r]===e[s-1-r]&&s-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:s-r}}}),tH=function(t,e){var n=Math.min(t.selectionStart,e);return{from:{start:n,end:t.selectionEnd},to:{start:n,end:e}}};function nH(t,e,n){return Math.min(Math.max(t,e),n)}function fT(t){return Math.max(t.selectionStart,t.selectionEnd)}function rH(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function iH(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function sH(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,i=t.formattedValueIndex;return e[r]===n[i]}function aH(t,e,n,r,i,s,o){o===void 0&&(o=sH);var u=i.findIndex(function(F){return F}),d=t.slice(0,u);!e&&!n.startsWith(d)&&(e=d,n=d+n,r=r+d.length);for(var f=n.length,m=t.length,y={},x=new Array(f),b=0;b<f;b++){x[b]=-1;for(var w=0,S=m;w<S;w++){var D=o({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:b,formattedValueIndex:w});if(D&&y[w]!==!0){x[b]=w,y[w]=!0;break}}}for(var k=r;k<f&&(x[k]===-1||!s(n[k]));)k++;var O=k===f||x[k]===-1?m:x[k];for(k=r-1;k>0&&x[k]===-1;)k--;var N=k===-1||x[k]===-1?0:x[k]+1;return N>O?O:r-N<O-r?N:O}function xk(t,e,n,r){var i=t.length;if(e=nH(e,0,i),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=i&&!n[e];)e++;e>i&&(e=n.lastIndexOf(!0))}return e===-1&&(e=i),e}function oH(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(Sy(t[n])||Sy(t[n-1]));return e}function aO(t,e,n,r,i,s){s===void 0&&(s=af);var o=JV(function(w,S){var D,k;return tO(w)?(k="",D=""):typeof w=="number"||S?(k=typeof w=="number"?iO(w):w,D=r(k)):(k=i(w,void 0),D=r(k)),{formattedValue:D,numAsString:k}}),u=A.useState(function(){return o(fg(t)?e:t,n)}),d=u[0],f=u[1],m=function(w,S){w.formattedValue!==d.formattedValue&&f({formattedValue:w.formattedValue,numAsString:w.value}),s(w,S)},y=t,x=n;fg(t)&&(y=d.numAsString,x=!0);var b=o(y,x);return A.useMemo(function(){f(b)},[b.formattedValue]),[d,m]}function lH(t){return t.replace(/[^0-9]/g,"")}function uH(t){return t}function cH(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,i=t.renderText,s=t.getInputRef,o=t.format;o===void 0&&(o=uH);var u=t.removeFormatting;u===void 0&&(u=lH);var d=t.defaultValue,f=t.valueIsNumericString,m=t.onValueChange,y=t.isAllowed,x=t.onChange;x===void 0&&(x=af);var b=t.onKeyDown;b===void 0&&(b=af);var w=t.onMouseUp;w===void 0&&(w=af);var S=t.onFocus;S===void 0&&(S=af);var D=t.onBlur;D===void 0&&(D=af);var k=t.value,O=t.getCaretBoundary;O===void 0&&(O=oH);var N=t.isValidInputCharacter;N===void 0&&(N=Sy);var F=t.isCharacterSame,M=eO(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),V=aO(k,d,!!f,o,u,m),$=V[0],q=$.formattedValue,B=$.numAsString,z=V[1],ee=A.useRef(),Y=A.useRef({formattedValue:q,numAsString:B}),Q=function(qe,Le){Y.current={formattedValue:qe.formattedValue,numAsString:qe.value},z(qe,Le)},oe=A.useState(!1),ue=oe[0],H=oe[1],te=A.useRef(null),Z=A.useRef({setCaretTimeout:null,focusTimeout:null});A.useEffect(function(){return H(!0),function(){clearTimeout(Z.current.setCaretTimeout),clearTimeout(Z.current.focusTimeout)}},[]);var ie=o,G=function(qe,Le){var He=parseFloat(Le);return{formattedValue:qe,value:Le,floatValue:isNaN(He)?void 0:He}},X=function(qe,Le,He){qe.selectionStart===0&&qe.selectionEnd===qe.value.length||(zh(qe,Le),Z.current.setCaretTimeout=setTimeout(function(){qe.value===He&&qe.selectionStart!==Le&&zh(qe,Le)},0))},fe=function(qe,Le,He){return xk(qe,Le,O(qe),He)},be=function(qe,Le,He){var Xe=O(Le),he=aH(Le,q,qe,He,Xe,N,F);return he=xk(Le,he,Xe),he},we=function(qe){var Le=qe.formattedValue;Le===void 0&&(Le="");var He=qe.input,Xe=qe.source,he=qe.event,Ae=qe.numAsString,rt;if(He){var $e=qe.inputValue||He.value,Ze=fT(He);He.value=Le,rt=be($e,Le,Ze),rt!==void 0&&X(He,rt,Le)}Le!==q&&Q(G(Le,Ae),{event:he,source:Xe})};A.useEffect(function(){var qe=Y.current,Le=qe.formattedValue,He=qe.numAsString;(q!==Le||B!==He)&&Q(G(q,B),{event:void 0,source:_y.props})},[q,B]);var pe=te.current?fT(te.current):void 0,Ce=typeof window<"u"?A.useLayoutEffect:A.useEffect;Ce(function(){var qe=te.current;if(q!==Y.current.formattedValue&&qe){var Le=be(Y.current.formattedValue,q,pe);qe.value=q,X(qe,Le,q)}},[q]);var Ke=function(qe,Le,He){var Xe=Le.target,he=ee.current?tH(ee.current,Xe.selectionEnd):sO(q,qe),Ae=Object.assign(Object.assign({},he),{lastValue:q}),rt=u(qe,Ae),$e=ie(rt);if(rt=u($e,void 0),y&&!y(G($e,rt))){var Ze=Le.target,qt=fT(Ze),jt=be(qe,q,qt);return Ze.value=q,X(Ze,jt,q),!1}return we({formattedValue:$e,numAsString:rt,inputValue:qe,event:Le,source:He,input:Le.target}),!0},Me=function(qe,Le){Le===void 0&&(Le=0);var He=qe.selectionStart,Xe=qe.selectionEnd;ee.current={selectionStart:He,selectionEnd:Xe+Le}},lt=function(qe){var Le=qe.target,He=Le.value,Xe=Ke(He,qe,_y.event);Xe&&x(qe),ee.current=void 0},bt=function(qe){var Le=qe.target,He=qe.key,Xe=Le.selectionStart,he=Le.selectionEnd,Ae=Le.value;Ae===void 0&&(Ae="");var rt;He==="ArrowLeft"||He==="Backspace"?rt=Math.max(Xe-1,0):He==="ArrowRight"?rt=Math.min(Xe+1,Ae.length):He==="Delete"&&(rt=Xe);var $e=0;He==="Delete"&&Xe===he&&($e=1);var Ze=He==="ArrowLeft"||He==="ArrowRight";if(rt===void 0||Xe!==he&&!Ze){b(qe),Me(Le,$e);return}var qt=rt;if(Ze){var jt=He==="ArrowLeft"?"left":"right";qt=fe(Ae,rt,jt),qt!==rt&&qe.preventDefault()}else He==="Delete"&&!N(Ae[rt])?qt=fe(Ae,rt,"right"):He==="Backspace"&&!N(Ae[rt])&&(qt=fe(Ae,rt,"left"));qt!==rt&&X(Le,qt,Ae),b(qe),Me(Le,$e)},mt=function(qe){var Le=qe.target,He=function(){var Xe=Le.selectionStart,he=Le.selectionEnd,Ae=Le.value;if(Ae===void 0&&(Ae=""),Xe===he){var rt=fe(Ae,Xe);rt!==Xe&&X(Le,rt,Ae)}};He(),requestAnimationFrame(function(){He()}),w(qe),Me(Le)},_t=function(qe){qe.persist&&qe.persist();var Le=qe.target,He=qe.currentTarget;te.current=Le,Z.current.focusTimeout=setTimeout(function(){var Xe=Le.selectionStart,he=Le.selectionEnd,Ae=Le.value;Ae===void 0&&(Ae="");var rt=fe(Ae,Xe);rt!==Xe&&!(Xe===0&&he===Ae.length)&&X(Le,rt,Ae),S(Object.assign(Object.assign({},qe),{currentTarget:He}))},0)},Qt=function(qe){te.current=null,clearTimeout(Z.current.focusTimeout),clearTimeout(Z.current.setCaretTimeout),D(qe)},xt=ue&&rH()?"numeric":void 0,wt=Object.assign({inputMode:xt},M,{type:e,value:q,onChange:lt,onKeyDown:bt,onMouseUp:mt,onFocus:_t,onBlur:Qt});if(n==="text")return i?Or.createElement(Or.Fragment,null,i(q,M)||null):Or.createElement("span",Object.assign({},M,{ref:s}),q);if(r){var Ot=r;return Or.createElement(Ot,Object.assign({},wt,{ref:s}))}return Or.createElement("input",Object.assign({},wt,{ref:s}))}function _k(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix;i===void 0&&(i="");var s=e.suffix;s===void 0&&(s="");var o=e.allowNegative,u=e.thousandsGroupStyle;if(u===void 0&&(u="thousand"),t===""||t==="-")return t;var d=d2(e),f=d.thousandSeparator,m=d.decimalSeparator,y=n!==0&&t.indexOf(".")!==-1||n&&r,x=yA(t,o),b=x.beforeDecimal,w=x.afterDecimal,S=x.addNegation;return n!==void 0&&(w=rO(w,n,!!r)),f&&(b=ZV(b,f,u)),i&&(b=i+b),s&&(w=w+s),S&&(b="-"+b),t=b+(y&&m||"")+w,t}function d2(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function dH(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),s=r.test(t);return t=t.replace(/-/g,""),i&&!s&&e&&(t="-"+t),t}function fH(t,e){return new RegExp("(^-)|[0-9]|"+nO(t),"g")}function hH(t,e,n){return t===""?!0:!e?.match(/\d/)&&!n?.match(/\d/)&&typeof t=="string"&&!isNaN(Number(t))}function pH(t,e,n){var r;e===void 0&&(e=iH(t));var i=n.allowNegative,s=n.prefix;s===void 0&&(s="");var o=n.suffix;o===void 0&&(o="");var u=n.decimalScale,d=e.from,f=e.to,m=f.start,y=f.end,x=d2(n),b=x.allowedDecimalSeparators,w=x.decimalSeparator,S=t[y]===w;if(Sy(t)&&(t===s||t===o)&&e.lastValue==="")return t;if(y-m===1&&b.indexOf(t[m])!==-1){var D=u===0?"":w;t=t.substring(0,m)+D+t.substring(m+1,t.length)}var k=function(te,Z,ie){var G=!1,X=!1;s.startsWith("-")?G=!1:te.startsWith("--")?(G=!1,X=!0):o.startsWith("-")&&te.length===o.length?G=!1:te[0]==="-"&&(G=!0);var fe=G?1:0;return X&&(fe=2),fe&&(te=te.substring(fe),Z-=fe,ie-=fe),{value:te,start:Z,end:ie,hasNegation:G}},O=k(t,m,y),N=O.hasNegation;r=O,t=r.value,m=r.start,y=r.end;var F=k(e.lastValue,d.start,d.end),M=F.start,V=F.end,$=F.value,q=t.substring(m,y);t.length&&$.length&&(M>$.length-o.length||V<s.length)&&!(q&&o.startsWith(q))&&(t=$);var B=0;t.startsWith(s)?B+=s.length:m<s.length&&(B=m),t=t.substring(B),y-=B;var z=t.length,ee=t.length-o.length;t.endsWith(o)?z=ee:(y>ee||y>t.length-o.length)&&(z=y),t=t.substring(0,z),t=dH(N?"-"+t:t,i),t=(t.match(fH(w))||[]).join("");var Y=t.indexOf(w);t=t.replace(new RegExp(nO(w),"g"),function(te,Z){return Z===Y?".":""});var Q=yA(t,i),oe=Q.beforeDecimal,ue=Q.afterDecimal,H=Q.addNegation;return f.end-f.start<d.end-d.start&&oe===""&&S&&!parseFloat(ue)&&(t=H?"-":""),t}function mH(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var i=Array.from({length:t.length+1}).map(function(){return!0}),s=t[0]==="-";i.fill(!1,0,n.length+(s?1:0));var o=t.length;return i.fill(!1,o-r.length+1,o+1),i}function gH(t){var e=d2(t),n=e.thousandSeparator,r=e.decimalSeparator,i=t.prefix;i===void 0&&(i="");var s=t.allowNegative;if(s===void 0&&(s=!0),n===r)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+r+` (default value for decimalSeparator is .)
     `);return i.startsWith("-")&&s&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+i+`
      allowNegative: `+s+`
    `),s=!1),Object.assign(Object.assign({},t),{allowNegative:s})}function vH(t){t=gH(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=af);var s=t.onBlur;s===void 0&&(s=af);var o=t.thousandSeparator,u=t.decimalScale,d=t.fixedDecimalScale,f=t.prefix;f===void 0&&(f="");var m=t.defaultValue,y=t.value,x=t.valueIsNumericString,b=t.onValueChange,w=eO(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),S=d2(t),D=S.decimalSeparator,k=S.allowedDecimalSeparators,O=function(H){return _k(H,t)},N=function(H,te){return pH(H,te,t)},F=fg(y)?m:y,M=x??hH(F,f,e);fg(y)?fg(m)||(M=M||typeof m=="number"):M=M||typeof y=="number";var V=function(H){return tO(H)?H:(typeof H=="number"&&(H=iO(H)),M&&typeof u=="number"?bk(H,u,!!d):H)},$=aO(V(y),V(m),!!M,O,N,b),q=$[0],B=q.numAsString,z=q.formattedValue,ee=$[1],Y=function(H){var te=H.target,Z=H.key,ie=te.selectionStart,G=te.selectionEnd,X=te.value;if(X===void 0&&(X=""),(Z==="Backspace"||Z==="Delete")&&G<f.length){H.preventDefault();return}if(ie!==G){i(H);return}Z==="Backspace"&&X[0]==="-"&&ie===f.length+1&&n&&zh(te,1),u&&d&&(Z==="Backspace"&&X[ie-1]===D?(zh(te,ie-1),H.preventDefault()):Z==="Delete"&&X[ie]===D&&H.preventDefault()),k?.includes(Z)&&X[ie]===D&&zh(te,ie+1);var fe=o===!0?",":o;Z==="Backspace"&&X[ie-1]===fe&&zh(te,ie-1),Z==="Delete"&&X[ie]===fe&&zh(te,ie+1),i(H)},Q=function(H){var te=B;if(te.match(/\d/g)||(te=""),r||(te=eH(te)),d&&u&&(te=bk(te,u,d)),te!==B){var Z=_k(te,t);ee({formattedValue:Z,value:te,floatValue:parseFloat(te)},{event:H,source:_y.event})}s(H)},oe=function(H){return H===D?!0:Sy(H)},ue=function(H){var te=H.currentValue,Z=H.lastValue,ie=H.formattedValue,G=H.currentValueIndex,X=H.formattedValueIndex,fe=te[G],be=ie[X],we=sO(Z,te),pe=we.to,Ce=function(Ke){return N(Ke).indexOf(".")+f.length};return y===0&&d&&u&&te[pe.start]===D&&Ce(te)<G&&Ce(ie)>X?!1:G>=pe.start&&G<pe.end&&k&&k.includes(fe)&&be===D?!0:fe===be};return Object.assign(Object.assign({},w),{value:z,valueIsNumericString:!1,isValidInputCharacter:oe,isCharacterSame:ue,onValueChange:ee,format:O,removeFormatting:N,getCaretBoundary:function(H){return mH(H,t)},onKeyDown:Y,onBlur:Q})}function yH(t){var e=vH(t);return Or.createElement(cH,Object.assign({},e))}function Sk({direction:t,style:e,...n}){return c.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:t==="up"?"rotate(180deg)":void 0,...e},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:c.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var Iw={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const bH=/^(0\.0*|-0(\.0*)?)$/,xH=/^-?0\d+(\.\d+)?\.?$/;function Ow(t){return typeof t=="string"&&t!==""&&!Number.isNaN(Number(t))}function hT(t){return typeof t=="number"?t<Number.MAX_SAFE_INTEGER:t===""||Ow(t)&&Number(t)<Number.MAX_SAFE_INTEGER}function _H(t){return t.toString().replace(".","").length}function SH(t,e){return(typeof t=="number"?t<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(t)))&&!Number.isNaN(t)&&_H(e)<14&&e!==""}function Tk(t,e,n){if(t===void 0)return!0;const r=e===void 0||t>=e,i=n===void 0||t<=n;return r&&i}const TH={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},wH=(t,{size:e})=>({controls:{"--ni-chevron-size":Xt(e,"ni-chevron-size")}});function CH(t,e,n){const r=t.toString().replace(/^0+/,""),i=parseFloat(r);return Number.isNaN(i)?r:i>Number.MAX_SAFE_INTEGER?e!==void 0?String(e):r:wo(i,n,e)}const ss=tt((t,e)=>{const n=Ne("NumberInput",TH,t),{className:r,classNames:i,styles:s,unstyled:o,vars:u,onChange:d,onValueChange:f,value:m,defaultValue:y,max:x,min:b,step:w,hideControls:S,rightSection:D,isAllowed:k,clampBehavior:O,onBlur:N,allowDecimal:F,decimalScale:M,onKeyDown:V,onKeyDownCapture:$,handlersRef:q,startValue:B,disabled:z,rightSectionPointerEvents:ee,allowNegative:Y,readOnly:Q,size:oe,rightSectionWidth:ue,stepHoldInterval:H,stepHoldDelay:te,allowLeadingZeros:Z,withKeyboardEvents:ie,trimLeadingZeroesOnBlur:G,...X}=n,fe=vt({name:"NumberInput",classes:Iw,props:n,classNames:i,styles:s,unstyled:o,vars:u,varsResolver:wH}),{resolvedClassNames:be,resolvedStyles:we}=zu({classNames:i,styles:s,props:n}),[pe,Ce]=Zr({value:m,defaultValue:y,finalValue:"",onChange:d}),Ke=te!==void 0&&H!==void 0,Me=A.useRef(null),lt=A.useRef(null),bt=A.useRef(0),mt=($e,Ze)=>{Ze.source==="event"&&Ce(SH($e.floatValue,$e.value)&&!bH.test($e.value)&&!(Z&&xH.test($e.value))?$e.floatValue:$e.value),f?.($e,Ze)},_t=$e=>{const Ze=String($e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Ze?Math.max(0,(Ze[1]?Ze[1].length:0)-(Ze[2]?+Ze[2]:0)):0},Qt=$e=>{Me.current&&typeof $e<"u"&&Me.current.setSelectionRange($e,$e)},xt=A.useRef(M1);xt.current=()=>{if(!hT(pe))return;let $e;const Ze=_t(pe),qt=_t(w),jt=Math.max(Ze,qt),un=10**jt;if(!Ow(pe)&&(typeof pe!="number"||Number.isNaN(pe)))$e=wo(B,b,x);else if(x!==void 0){const an=(Math.round(Number(pe)*un)+Math.round(w*un))/un;$e=an<=x?an:x}else $e=(Math.round(Number(pe)*un)+Math.round(w*un))/un;const Pt=$e.toFixed(jt);Ce(parseFloat(Pt)),f?.({floatValue:parseFloat(Pt),formattedValue:Pt,value:Pt},{source:"increment"}),setTimeout(()=>Qt(Me.current?.value.length),0)};const wt=A.useRef(M1);wt.current=()=>{if(!hT(pe))return;let $e;const Ze=b!==void 0?b:Y?Number.MIN_SAFE_INTEGER:0,qt=_t(pe),jt=_t(w),un=Math.max(qt,jt),Pt=10**un;if(!Ow(pe)&&typeof pe!="number"||Number.isNaN(pe))$e=wo(B,Ze,x);else{const rr=(Math.round(Number(pe)*Pt)-Math.round(w*Pt))/Pt;$e=Ze!==void 0&&rr<Ze?Ze:rr}const an=$e.toFixed(un);Ce(parseFloat(an)),f?.({floatValue:parseFloat(an),formattedValue:an,value:an},{source:"decrement"}),setTimeout(()=>Qt(Me.current?.value.length),0)};const Ot=$e=>{V?.($e),!(Q||!ie)&&($e.key==="ArrowUp"&&($e.preventDefault(),xt.current()),$e.key==="ArrowDown"&&($e.preventDefault(),wt.current()))},qe=$e=>{if($?.($e),$e.key==="Backspace"){const Ze=Me.current;Ze.selectionStart===0&&Ze.selectionStart===Ze.selectionEnd&&($e.preventDefault(),window.setTimeout(()=>Qt(0),0))}},Le=$e=>{let Ze=pe;O==="blur"&&typeof Ze=="number"&&(Ze=wo(Ze,b,x)),G&&typeof Ze=="string"&&_t(Ze)<15&&(Ze=CH(Ze,x,b)),pe!==Ze&&Ce(Ze),N?.($e)};Cg(q,{increment:xt.current,decrement:wt.current});const He=$e=>{$e?xt.current():wt.current(),bt.current+=1},Xe=$e=>{if(He($e),Ke){const Ze=typeof H=="number"?H:H(bt.current);lt.current=window.setTimeout(()=>Xe($e),Ze)}},he=($e,Ze)=>{$e.preventDefault(),Me.current?.focus(),He(Ze),Ke&&(lt.current=window.setTimeout(()=>Xe(Ze),te))},Ae=()=>{lt.current&&window.clearTimeout(lt.current),lt.current=null,bt.current=0},rt=c.jsxs("div",{...fe("controls"),children:[c.jsx(Ta,{...fe("control"),tabIndex:-1,"aria-hidden":!0,disabled:z||typeof pe=="number"&&x!==void 0&&pe>=x,mod:{direction:"up"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{he($e,!0)},onPointerUp:Ae,onPointerLeave:Ae,children:c.jsx(Sk,{direction:"up"})}),c.jsx(Ta,{...fe("control"),tabIndex:-1,"aria-hidden":!0,disabled:z||typeof pe=="number"&&b!==void 0&&pe<=b,mod:{direction:"down"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{he($e,!1)},onPointerUp:Ae,onPointerLeave:Ae,children:c.jsx(Sk,{direction:"down"})})]});return c.jsx(Ea,{component:yH,allowNegative:Y,className:ii(Iw.root,r),size:oe,...X,readOnly:Q,disabled:z,value:pe,getInputRef:ei(e,Me),onValueChange:mt,rightSection:S||Q||!hT(pe)?D:D||rt,classNames:be,styles:we,unstyled:o,__staticSelector:"NumberInput",decimalScale:F?M:0,onKeyDown:Ot,onKeyDownCapture:qe,rightSectionPointerEvents:ee??(z?"none":void 0),rightSectionWidth:ue??`var(--ni-right-section-width-${oe||"sm"})`,allowLeadingZeros:Z,onBlur:Le,isAllowed:$e=>O==="strict"?k?k($e)&&Tk($e.floatValue,b,x):Tk($e.floatValue,b,x):k?k($e):!0})});ss.classes={...Ea.classes,...Iw};ss.displayName="@mantine/core/NumberInput";const[EH,f2]=si("Pagination.Root component was not found in tree");var $y={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const AH={withPadding:!0},Vy=tt((t,e)=>{const n=Ne("PaginationControl",AH,t),{classNames:r,className:i,style:s,styles:o,vars:u,active:d,disabled:f,withPadding:m,mod:y,...x}=n,b=f2(),w=f||b.disabled;return c.jsx(Ta,{ref:e,disabled:w,mod:[{active:d,disabled:w,"with-padding":m},y],...b.getStyles("control",{className:i,style:s,classNames:r,styles:o,active:!w}),...x})});Vy.classes=$y;Vy.displayName="@mantine/core/PaginationControl";function Hy({style:t,children:e,path:n,...r}){return c.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...t},...r,children:c.jsx("path",{d:n,fill:"currentColor"})})}const DH=t=>c.jsx(Hy,{...t,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),kH=t=>c.jsx(Hy,{...t,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),RH=t=>c.jsx(Hy,{...t,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),PH=t=>c.jsx(Hy,{...t,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),IH=t=>c.jsx(Hy,{...t,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),OH={icon:IH},h2=tt((t,e)=>{const n=Ne("PaginationDots",OH,t),{classNames:r,className:i,style:s,styles:o,vars:u,icon:d,...f}=n,m=f2(),y=d;return c.jsx(Ee,{ref:e,...m.getStyles("dots",{className:i,style:s,styles:o,classNames:r}),...f,children:c.jsx(y,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});h2.classes=$y;h2.displayName="@mantine/core/PaginationDots";function p2({icon:t,name:e,action:n,type:r}){const i={icon:t},s=A.forwardRef((o,u)=>{const{icon:d,...f}=Ne(e,i,o),m=d,y=f2(),x=r==="next"?y.active===y.total:y.active===1;return c.jsx(Vy,{disabled:y.disabled||x,ref:u,onClick:y[n],withPadding:!1,...f,children:c.jsx(m,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return s.displayName=`@mantine/core/${e}`,s}const oO=p2({icon:DH,name:"PaginationNext",action:"onNext",type:"next"}),lO=p2({icon:kH,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),uO=p2({icon:RH,name:"PaginationFirst",action:"onFirst",type:"previous"}),cO=p2({icon:PH,name:"PaginationLast",action:"onLast",type:"next"});function bA({dotsIcon:t}){const e=f2(),n=e.range.map((r,i)=>r==="dots"?c.jsx(h2,{icon:t},i):c.jsx(Vy,{active:r===e.active,"aria-current":r===e.active?"page":void 0,onClick:()=>e.onChange(r),disabled:e.disabled,...e.getItemProps?.(r),children:e.getItemProps?.(r)?.children??r},i));return c.jsx(c.Fragment,{children:n})}bA.displayName="@mantine/core/PaginationItems";const NH={siblings:1,boundaries:1},MH=(t,{size:e,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:nr(n),"--pagination-control-size":Xt(e,"pagination-control-size"),"--pagination-control-fz":ki(e),"--pagination-active-bg":r?gr(r,t):void 0,"--pagination-active-color":Gg(i,t)?gf({color:r,theme:t,autoContrast:i}):void 0}}),m2=tt((t,e)=>{const n=Ne("PaginationRoot",NH,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,total:f,value:m,defaultValue:y,onChange:x,disabled:b,siblings:w,boundaries:S,color:D,radius:k,onNextPage:O,onPreviousPage:N,onFirstPage:F,onLastPage:M,getItemProps:V,autoContrast:$,...q}=n,B=vt({name:"Pagination",classes:$y,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:MH}),{range:z,setPage:ee,next:Y,previous:Q,active:oe,first:ue,last:H}=V7({page:m,initialPage:y,onChange:x,total:f,siblings:w,boundaries:S}),te=Vi(O,Y),Z=Vi(N,Q),ie=Vi(F,ue),G=Vi(M,H);return c.jsx(EH,{value:{total:f,range:z,active:oe,disabled:b,getItemProps:V,onChange:ee,onNext:te,onPrevious:Z,onFirst:ie,onLast:G,getStyles:B},children:c.jsx(Ee,{ref:e,...B("root"),...q})})});m2.classes=$y;m2.displayName="@mantine/core/PaginationRoot";const jH={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},kl=tt((t,e)=>{const n=Ne("Pagination",jH,t),{withEdges:r,withControls:i,getControlProps:s,nextIcon:o,previousIcon:u,lastIcon:d,firstIcon:f,dotsIcon:m,total:y,gap:x,hideWithOnePage:b,withPages:w,...S}=n;return y<=0||b&&y===1?null:c.jsx(m2,{ref:e,total:y,...S,children:c.jsxs(ut,{gap:x,children:[r&&c.jsx(uO,{icon:f,...s?.("first")}),i&&c.jsx(lO,{icon:u,...s?.("previous")}),w&&c.jsx(bA,{dotsIcon:m}),i&&c.jsx(oO,{icon:o,...s?.("next")}),r&&c.jsx(cO,{icon:d,...s?.("last")})]})})});kl.classes=$y;kl.displayName="@mantine/core/Pagination";kl.Root=m2;kl.Control=Vy;kl.Dots=h2;kl.First=uO;kl.Last=cO;kl.Next=oO;kl.Previous=lO;kl.Items=bA;const LH=({reveal:t})=>c.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:c.jsx("path",{d:t?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var Nw={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const BH={visibilityToggleIcon:LH},FH=(t,{size:e})=>({root:{"--psi-icon-size":Xt(e,"psi-icon-size"),"--psi-button-size":Xt(e,"psi-button-size")}}),g2=tt((t,e)=>{const n=Ne("PasswordInput",BH,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,required:f,error:m,leftSection:y,disabled:x,id:b,variant:w,inputContainer:S,description:D,label:k,size:O,errorProps:N,descriptionProps:F,labelProps:M,withAsterisk:V,inputWrapperOrder:$,wrapperProps:q,radius:B,rightSection:z,rightSectionWidth:ee,rightSectionPointerEvents:Y,leftSectionWidth:Q,visible:oe,defaultVisible:ue,onVisibilityChange:H,visibilityToggleIcon:te,visibilityToggleButtonProps:Z,rightSectionProps:ie,leftSectionProps:G,leftSectionPointerEvents:X,withErrorStyles:fe,mod:be,...we}=n,pe=ls(b),[Ce,Ke]=Zr({value:oe,defaultValue:ue,finalValue:!1,onChange:H}),Me=()=>Ke(!Ce),lt=vt({name:"PasswordInput",classes:Nw,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:FH}),{resolvedClassNames:bt,resolvedStyles:mt}=zu({classNames:r,styles:o,props:n}),{styleProps:_t,rest:Qt}=mp(we),xt=te,wt=N?.id||`${pe}-error`,Ot=F?.id||`${pe}-description`,He=`${!!m&&typeof m!="boolean"?wt:""} ${!!D?Ot:""}`,Xe=He.trim().length>0?He.trim():void 0,he=c.jsx(br,{...lt("visibilityToggle"),disabled:x,radius:B,"aria-hidden":!Z,tabIndex:-1,...Z,variant:Z?.variant??"subtle",color:"gray",unstyled:u,onTouchEnd:Ae=>{Ae.preventDefault(),Z?.onTouchEnd?.(Ae),Me()},onMouseDown:Ae=>{Ae.preventDefault(),Z?.onMouseDown?.(Ae),Me()},onKeyDown:Ae=>{Z?.onKeyDown?.(Ae),Ae.key===" "&&(Ae.preventDefault(),Me())},children:c.jsx(xt,{reveal:Ce})});return c.jsx(Nr.Wrapper,{required:f,id:pe,label:k,error:m,description:D,size:O,classNames:bt,styles:mt,__staticSelector:"PasswordInput",unstyled:u,withAsterisk:V,inputWrapperOrder:$,inputContainer:S,variant:w,labelProps:{...M,htmlFor:pe},descriptionProps:{...F,id:Ot},errorProps:{...N,id:wt},mod:be,...lt("root"),..._t,...q,children:c.jsx(Nr,{component:"div",error:m,leftSection:y,size:O,classNames:{...bt,input:ii(Nw.input,bt.input)},styles:mt,radius:B,disabled:x,__staticSelector:"PasswordInput",rightSectionWidth:ee,rightSection:z??he,variant:w,unstyled:u,leftSectionWidth:Q,rightSectionPointerEvents:Y||"all",rightSectionProps:ie,leftSectionProps:G,leftSectionPointerEvents:X,withAria:!1,withErrorStyles:fe,children:c.jsx("input",{required:f,"data-invalid":!!m||void 0,"data-with-left-section":!!y||void 0,...lt("innerInput"),disabled:x,id:pe,ref:e,...Qt,"aria-describedby":Xe,autoComplete:Qt.autoComplete||"off",type:Ce?"text":"password"})})})});g2.classes={...Ea.classes,...Nw};g2.displayName="@mantine/core/PasswordInput";function Qm(t,e){if(t<1)return[];const n=new Array(t).fill("");if(e){const r=e.trim().split("");for(let i=0;i<Math.min(t,r.length);i+=1)n[i]=r[i]===" "?"":r[i]}return n}var dO={root:"m_f1cb205a",pinInput:"m_cb288ead"};const wk={number:/^[0-9]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i},fO={gap:"sm",length:4,manageFocus:!0,oneTimeCode:!0,placeholder:"○",type:"alphanumeric",ariaLabel:"PinInput"},UH=(t,{size:e})=>({root:{"--pin-input-size":Xt(e??fO.size,"pin-input-size")}}),v2=tt((t,e)=>{const{name:n,form:r,className:i,value:s,defaultValue:o,variant:u,gap:d,style:f,size:m,classNames:y,styles:x,unstyled:b,length:w,onChange:S,onComplete:D,manageFocus:k,autoFocus:O,error:N,radius:F,disabled:M,oneTimeCode:V,placeholder:$,type:q,mask:B,readOnly:z,inputType:ee,inputMode:Y,ariaLabel:Q,vars:oe,id:ue,hiddenInputProps:H,rootRef:te,getInputProps:Z,...ie}=Ne("PinInput",fO,t),G=ls(ue),X=vt({name:"PinInput",classes:dO,props:t,className:i,style:f,classNames:y,styles:x,unstyled:b,vars:oe,varsResolver:UH}),{resolvedClassNames:fe,resolvedStyles:be}=zu({classNames:y,styles:x,props:t}),[we,pe]=A.useState(-1),[Ce,Ke]=Zr({value:s?Qm(w??0,s):void 0,defaultValue:o?.split("").slice(0,w??0),finalValue:Qm(w??0,""),onChange:typeof S=="function"?Le=>{S(Le.join("").trim())}:void 0}),Me=Ce.join("").trim(),lt=A.useRef([]),bt=Le=>(q instanceof RegExp?q:q&&q in wk?wk[q]:null)?.test(Le),mt=(Le,He,Xe)=>{if(!k){Xe?.preventDefault();return}if(Le==="next"){const he=He+1;he<(w??0)&&(Xe?.preventDefault(),lt.current[he].focus())}if(Le==="prev"){const he=He-1;he>-1&&(Xe?.preventDefault(),lt.current[he].focus())}},_t=(Le,He)=>{const Xe=[...Ce];Xe[He]=Le,Ke(Xe)},Qt=(Le,He)=>{const Xe=Le.target.value,he=Xe.length===2?Xe.split("")[Xe.length-1]:Xe,Ae=bt(he);he.length<2?Ae?(_t(he,He),mt("next",He)):_t("",He):Ae&&Ke(Qm(w??0,Xe))},xt=(Le,He)=>{const{ctrlKey:Xe,metaKey:he,key:Ae,shiftKey:rt,target:$e}=Le,Ze=$e.value;Y==="numeric"&&(Ae==="Backspace"||Ae==="Tab"||Ae==="Control"||Ae==="Delete"||Xe&&Ae==="v"||he&&Ae==="v"||!Number.isNaN(Number(Ae))||Le.preventDefault()),Ae==="ArrowLeft"||rt&&Ae==="Tab"?mt("prev",He,Le):Ae==="ArrowRight"||Ae==="Tab"||Ae===" "?mt("next",He,Le):Ae==="Delete"?_t("",He):Ae==="Backspace"?He!==0&&(_t("",He),w===He+1?Le.target.value===""&&mt("prev",He,Le):mt("prev",He,Le)):Ze.length>0&&Ae===Ce[He]&&mt("next",He,Le)},wt=(Le,He)=>{Le.target.select(),pe(He)},Ot=()=>{pe(-1)},qe=Le=>{Le.preventDefault();const He=Le.clipboardData.getData("text/plain").replace(/[\n\r\s]+/g,"");if(bt(He.trim())){const he=Qm(w??0,He);Ke(he),mt("next",he.length-2)}};return A.useEffect(()=>{Me.length===w&&D?.(Me)},[w,Me]),A.useEffect(()=>{w!==Ce.length&&Ke(Qm(w??0,Ce.join("")))},[w,Ce]),A.useEffect(()=>{s===""&&Ke(Qm(w??0,s))},[s]),A.useEffect(()=>{M&&pe(-1)},[M]),c.jsxs(c.Fragment,{children:[c.jsx(ut,{...ie,...X("root"),ref:te,role:"group",id:G,gap:d,unstyled:b,wrap:"nowrap",variant:u,__size:m,dir:"ltr",children:Ce.map((Le,He)=>A.createElement(Nr,{component:"input",...X("pinInput",{style:{"--input-padding":"0","--input-text-align":"center"}}),classNames:fe,styles:be,size:m,__staticSelector:"PinInput",id:`${G}-${He+1}`,key:`${G}-${He}`,inputMode:Y||(q==="number"?"numeric":"text"),onChange:Xe=>Qt(Xe,He),onKeyDown:Xe=>xt(Xe,He),onFocus:Xe=>wt(Xe,He),onBlur:Ot,onPaste:qe,type:ee||(B?"password":q==="number"?"tel":"text"),radius:F,error:N,variant:u,disabled:M,ref:Xe=>{He===0&&Cg(e,Xe),lt.current[He]=Xe},autoComplete:V?"one-time-code":"off",placeholder:we===He?"":$,value:Le,autoFocus:O&&He===0,unstyled:b,"aria-label":Q,readOnly:z,...Z?.(He)}))}),c.jsx("input",{type:"hidden",name:n,form:r,value:Me,...H})]})});v2.classes={...dO,...Ea.classes};v2.displayName="@mantine/core/PinInput";const[zH,hO]=si("Progress.Root component was not found in tree");var qy={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};const $H={},xA=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...u}=Ne("ProgressLabel",$H,t),d=hO();return c.jsx(Ee,{ref:e,...d.getStyles("label",{className:r,style:i,classNames:n,styles:s}),...u})});xA.classes=qy;xA.displayName="@mantine/core/ProgressLabel";const VH={},HH=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":Xt(e,"progress-size"),"--progress-radius":n===void 0?void 0:nr(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),y2=tt((t,e)=>{const n=Ne("ProgressRoot",VH,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,autoContrast:f,transitionDuration:m,...y}=n,x=vt({name:"Progress",classes:qy,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:HH});return c.jsx(zH,{value:{getStyles:x,autoContrast:f},children:c.jsx(Ee,{ref:e,...x("root"),...y})})});y2.classes=qy;y2.displayName="@mantine/core/ProgressRoot";const qH={withAria:!0},b2=tt((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,value:u,withAria:d,color:f,striped:m,animated:y,mod:x,...b}=Ne("ProgressSection",qH,t),w=hO(),S=ai(),D=d?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":u,"aria-valuetext":`${u}%`}:{};return c.jsx(Ee,{ref:e,...w.getStyles("section",{className:r,classNames:n,styles:s,style:i}),...b,...D,mod:[{striped:m||y,animated:y},x],__vars:{"--progress-section-width":`${u}%`,"--progress-section-color":gr(f,S),"--progress-label-color":Gg(w.autoContrast,S)?gf({color:f,theme:S,autoContrast:w.autoContrast}):void 0}})});b2.classes=qy;b2.displayName="@mantine/core/ProgressSection";const GH={},_o=tt((t,e)=>{const n=Ne("Progress",GH,t),{value:r,classNames:i,styles:s,vars:o,color:u,striped:d,animated:f,"aria-label":m,...y}=n,{resolvedClassNames:x,resolvedStyles:b}=zu({classNames:i,styles:s,props:n});return c.jsx(y2,{ref:e,classNames:x,styles:b,vars:o,...y,children:c.jsx(b2,{value:r,color:u,striped:d,animated:f,"aria-label":m})})});_o.classes=qy;_o.displayName="@mantine/core/Progress";_o.Section=b2;_o.Root=y2;_o.Label=xA;const[WH,pO]=si("Rating was not found in tree");function mO(t){const{width:e,height:n,style:r,...i}=t;return c.jsx("svg",{viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:e,height:n,...r},...i,children:c.jsx("path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"})})}mO.displayName="@mantine/core/StarIcon";function Mw({type:t}){const e=pO();return c.jsx(mO,{...e.getStyles("starSymbol"),"data-filled":t==="full"||void 0})}Mw.displayName="@mantine/core/StarSymbol";function gO({getSymbolLabel:t,emptyIcon:e,fullIcon:n,full:r,active:i,value:s,readOnly:o,fractionValue:u,color:d,id:f,onBlur:m,onChange:y,onInputChange:x,style:b,...w}){const S=pO(),D=typeof n=="function"?n(s):n,k=typeof e=="function"?e(s):e,{dir:O}=Xa();return c.jsxs(c.Fragment,{children:[!o&&c.jsx("input",{...S.getStyles("input"),onKeyDown:N=>N.key===" "&&y(s),id:f,type:"radio","data-active":i||void 0,"aria-label":t?.(s),value:s,onBlur:m,onChange:x,...w}),c.jsx(Ee,{component:o?"div":"label",...S.getStyles("label"),"data-read-only":o||void 0,htmlFor:f,onClick:()=>y(s),__vars:{"--rating-item-z-index":(u===1?void 0:i?2:0)?.toString()},children:c.jsx(Ee,{...S.getStyles("symbolBody"),__vars:{"--rating-symbol-clip-path":u===1?void 0:O==="ltr"?`inset(0 ${i?100-u*100:100}% 0 0)`:`inset(0 0 0 ${i?100-u*100:100}% )`},children:r?D||c.jsx(Mw,{type:"full"}):k||c.jsx(Mw,{type:"empty"})})})]})}gO.displayName="@mantine/core/RatingItem";var vO={root:"m_f8d312f2",symbolGroup:"m_61734bb7",starSymbol:"m_5662a89a",input:"m_211007ba",label:"m_21342ee4",symbolBody:"m_fae05d6a"};function pT(t,e){const n=Math.round(t/e)*e,r=`${e}`.split(".")[1]?.length||0;return Number(n.toFixed(r))}const XH={size:"sm",getSymbolLabel:t=>`${t}`,count:5,fractions:1,color:"yellow"},YH=(t,{size:e,color:n})=>({root:{"--rating-size":Xt(e,"rating-size"),"--rating-color":gr(n,t)}}),_A=tt((t,e)=>{const n=Ne("Rating",XH,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,name:f,id:m,value:y,defaultValue:x,onChange:b,fractions:w,count:S,onMouseEnter:D,readOnly:k,onMouseMove:O,onHover:N,onMouseLeave:F,onTouchStart:M,onTouchEnd:V,size:$,variant:q,getSymbolLabel:B,color:z,emptySymbol:ee,fullSymbol:Y,highlightSelectedOnly:Q,...oe}=n,ue=vt({name:"Rating",classes:vO,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:YH}),{dir:H}=Xa(),te=ls(f),Z=ls(m),ie=A.useRef(null),[G,X]=Zr({value:y,defaultValue:x,finalValue:0,onChange:b}),[fe,be]=A.useState(-1),[we,pe]=A.useState(!0),Ce=Math.floor(w),Ke=Math.floor(S),Me=1/Ce,lt=pT(G,Me),bt=fe!==-1?fe:lt,mt=he=>{const{left:Ae,right:rt,width:$e}=ie.current.getBoundingClientRect(),Ze=$e/Ke,jt=(H==="rtl"?rt-he:he-Ae)/Ze;return wo(pT(jt+Me/2,Me),Me,Ke)},_t=he=>{D?.(he),!k&&pe(!1)},Qt=he=>{if(O?.(he),k)return;const Ae=mt(he.clientX);be(Ae),Ae!==fe&&N?.(Ae)},xt=he=>{F?.(he),!k&&(be(-1),pe(!0),fe!==-1&&N?.(-1))},wt=he=>{const{touches:Ae}=he;if(Ae.length===1){if(!k){const rt=Ae[0];X(mt(rt.clientX))}M?.(he)}},Ot=he=>{he.preventDefault(),V?.(he)},qe=()=>we&&be(-1),Le=he=>{k||be(typeof he=="number"?he:parseFloat(he.target.value))},He=he=>{k||X(typeof he=="number"?he:parseFloat(he.target.value))},Xe=Array(Ke).fill(0).map((he,Ae)=>{const rt=Ae+1,$e=Array.from(new Array(Ae===0?Ce+1:Ce)),Ze=!k&&Math.ceil(fe)===rt;return c.jsx("div",{"data-active":Ze||void 0,...ue("symbolGroup"),children:$e.map((qt,jt)=>{const un=Me*(Ae===0?jt:jt+1),Pt=pT(rt-1+un,Me);return c.jsx(gO,{getSymbolLabel:B,emptyIcon:ee,fullIcon:Y,full:Q?Pt===bt:Pt<=bt,active:Pt===bt,checked:Pt===lt,readOnly:k,fractionValue:un,value:Pt,name:te,onChange:He,onBlur:qe,onInputChange:Le,id:`${Z}-${Ae}-${jt}`},`${rt}-${Pt}`)})},rt)});return c.jsx(WH,{value:{getStyles:ue},children:c.jsx(Ee,{ref:ei(ie,e),...ue("root"),onMouseMove:Qt,onMouseEnter:_t,onMouseLeave:xt,onTouchStart:wt,onTouchEnd:Ot,variant:q,size:$,id:Z,...oe,children:Xe})})});_A.classes=vO;_A.displayName="@mantine/core/Rating";const KH={duration:100,transition:"fade"};function QH(t,e){return{...KH,...e,...t}}function ZH({offset:t,position:e,defaultOpened:n}){const[r,i]=A.useState(n),s=A.useRef(null),{x:o,y:u,elements:d,refs:f,update:m,placement:y}=tE({placement:e,middleware:[QC({crossAxis:!0,padding:5,rootBoundary:"document"})]}),x=y.includes("right")?t:e.includes("left")?t*-1:0,b=y.includes("bottom")?t:e.includes("top")?t*-1:0,w=A.useCallback(({clientX:S,clientY:D})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:S,y:D,left:S+x,top:D+b,right:S,bottom:D}}})},[d.reference]);return A.useEffect(()=>{if(f.floating.current){const S=s.current;S.addEventListener("mousemove",w);const D=Bc(f.floating.current);return D.forEach(k=>{k.addEventListener("scroll",m)}),()=>{S.removeEventListener("mousemove",w),D.forEach(k=>{k.removeEventListener("scroll",m)})}}},[d.reference,f.floating.current,m,w,r]),{handleMouseMove:w,x:o,y:u,opened:r,setOpened:i,boundaryRef:s,floating:f.setFloating}}var x2={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const JH={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:Gi("popover")},eq=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:nr(e),"--tooltip-bg":n?gr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),SA=tt((t,e)=>{const n=Ne("TooltipFloating",JH,t),{children:r,refProp:i,withinPortal:s,style:o,className:u,classNames:d,styles:f,unstyled:m,radius:y,color:x,label:b,offset:w,position:S,multiline:D,zIndex:k,disabled:O,defaultOpened:N,variant:F,vars:M,portalProps:V,...$}=n,q=ai(),B=vt({name:"TooltipFloating",props:n,classes:x2,className:u,style:o,classNames:d,styles:f,unstyled:m,rootSelector:"tooltip",vars:M,varsResolver:eq}),{handleMouseMove:z,x:ee,y:Y,opened:Q,boundaryRef:oe,floating:ue,setOpened:H}=ZH({offset:w,position:S,defaultOpened:N});if(!Al(r))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const te=ei(oe,R_(r),e),Z=r.props,ie=X=>{Z.onMouseEnter?.(X),z(X),H(!0)},G=X=>{Z.onMouseLeave?.(X),H(!1)};return c.jsxs(c.Fragment,{children:[c.jsx(Gc,{...V,withinPortal:s,children:c.jsx(Ee,{...$,...B("tooltip",{style:{...$C(o,q),zIndex:k,display:!O&&Q?"block":"none",top:(Y&&Math.round(Y))??"",left:(ee&&Math.round(ee))??""}}),variant:F,ref:ue,mod:{multiline:D},children:b})}),A.cloneElement(r,{...Z,[i]:te,onMouseEnter:ie,onMouseLeave:G})]})});SA.classes=x2;SA.displayName="@mantine/core/TooltipFloating";const yO=A.createContext(!1),tq=yO.Provider,nq=()=>A.useContext(yO),rq={openDelay:0,closeDelay:0};function TA(t){const{openDelay:e,closeDelay:n,children:r}=Ne("TooltipGroup",rq,t);return c.jsx(tq,{value:!0,children:c.jsx(VB,{delay:{open:e,close:n},children:r})})}TA.displayName="@mantine/core/TooltipGroup";TA.extend=t=>t;function iq(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function sq(t){const e=iq(t.middlewares),n=[mP(t.offset)];return e.shift&&n.push(QC(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&n.push(typeof e.flip=="boolean"?V1():V1(e.flip)),n.push(gP({element:t.arrowRef,padding:t.arrowOffset})),e.inline?n.push(typeof e.inline=="boolean"?cy():cy(e.inline)):t.inline&&n.push(cy()),n}function aq(t){const[e,n]=A.useState(t.defaultOpened),i=typeof t.opened=="boolean"?t.opened:e,s=nq(),o=ls(),u=A.useCallback(V=>{n(V),V&&O(o)},[o]),{x:d,y:f,context:m,refs:y,update:x,placement:b,middlewareData:{arrow:{x:w,y:S}={}}}=tE({strategy:t.strategy,placement:t.position,open:i,onOpenChange:u,middleware:sq(t)}),{delay:D,currentId:k,setCurrentId:O}=HB(m,{id:o}),{getReferenceProps:N,getFloatingProps:F}=QB([zB(m,{enabled:t.events?.hover,delay:s?D:{open:t.openDelay,close:t.closeDelay},mouseOnly:!t.events?.touch}),KB(m,{enabled:t.events?.focus,visibleOnly:!0}),JB(m,{role:"tooltip"}),XB(m,{enabled:typeof t.opened>"u"})]);$P({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:y,update:x}}),Ha(()=>{t.onPositionChange?.(b)},[b]);const M=i&&k&&k!==o;return{x:d,y:f,arrowX:w,arrowY:S,reference:y.setReference,floating:y.setFloating,getFloatingProps:F,getReferenceProps:N,isGroupPhase:M,opened:i,placement:b}}const Ck={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Gi("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},oq=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:nr(e),"--tooltip-bg":n?gr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),Ft=tt((t,e)=>{const n=Ne("Tooltip",Ck,t),{children:r,position:i,refProp:s,label:o,openDelay:u,closeDelay:d,onPositionChange:f,opened:m,defaultOpened:y,withinPortal:x,radius:b,color:w,classNames:S,styles:D,unstyled:k,style:O,className:N,withArrow:F,arrowSize:M,arrowOffset:V,arrowRadius:$,arrowPosition:q,offset:B,transitionProps:z,multiline:ee,events:Y,zIndex:Q,disabled:oe,positionDependencies:ue,onClick:H,onMouseEnter:te,onMouseLeave:Z,inline:ie,variant:G,keepMounted:X,vars:fe,portalProps:be,mod:we,floatingStrategy:pe,middlewares:Ce,...Ke}=Ne("Tooltip",Ck,n),{dir:Me}=Xa(),lt=A.useRef(null),bt=aq({position:MP(Me,i),closeDelay:d,openDelay:u,onPositionChange:f,opened:m,defaultOpened:y,events:Y,arrowRef:lt,arrowOffset:V,offset:typeof B=="number"?B+(F?M/2:0):B,positionDependencies:[...ue,r],inline:ie,strategy:pe,middlewares:Ce}),mt=vt({name:"Tooltip",props:n,classes:x2,className:N,style:O,classNames:S,styles:D,unstyled:k,rootSelector:"tooltip",vars:fe,varsResolver:oq});if(!Al(r))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const _t=ei(bt.reference,R_(r),e),Qt=QH(z,{duration:100,transition:"fade"}),xt=r.props;return c.jsxs(c.Fragment,{children:[c.jsx(Gc,{...be,withinPortal:x,children:c.jsx(Vu,{...Qt,keepMounted:X,mounted:!oe&&!!bt.opened,duration:bt.isGroupPhase?10:Qt.duration,children:wt=>c.jsxs(Ee,{...Ke,"data-fixed":pe==="fixed"||void 0,variant:G,mod:[{multiline:ee},we],...bt.getFloatingProps({ref:bt.floating,className:mt("tooltip").className,style:{...mt("tooltip").style,...wt,zIndex:Q,top:bt.y??0,left:bt.x??0}}),children:[o,c.jsx(iE,{ref:lt,arrowX:bt.arrowX,arrowY:bt.arrowY,visible:F,position:bt.placement,arrowSize:M,arrowOffset:V,arrowRadius:$,arrowPosition:q,...mt("arrow")})]})})}),A.cloneElement(r,bt.getReferenceProps({onClick:H,onMouseEnter:te,onMouseLeave:Z,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,className:ii(N,xt.className),...xt,[s]:_t}))]})});Ft.classes=x2;Ft.displayName="@mantine/core/Tooltip";Ft.Floating=SA;Ft.Group=TA;var bO={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const lq={withItemsBorders:!0},uq=(t,{radius:e,color:n,transitionDuration:r,size:i,transitionTimingFunction:s})=>({root:{"--sc-radius":e===void 0?void 0:nr(e),"--sc-color":n?gr(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":s,"--sc-padding":Xt(i,"sc-padding"),"--sc-font-size":ki(i)}}),wA=tt((t,e)=>{const n=Ne("SegmentedControl",lq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,data:f,value:m,defaultValue:y,onChange:x,size:b,name:w,disabled:S,readOnly:D,fullWidth:k,orientation:O,radius:N,color:F,transitionDuration:M,transitionTimingFunction:V,variant:$,autoContrast:q,withItemsBorders:B,mod:z,...ee}=n,Y=vt({name:"SegmentedControl",props:n,classes:bO,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:uq}),Q=ai(),oe=f.map(Me=>typeof Me=="string"?{label:Me,value:Me}:Me),ue=J7(),[H,te]=A.useState(L1()),[Z,ie]=A.useState(null),[G,X]=A.useState({}),fe=(Me,lt)=>{G[lt]=Me,X(G)},[be,we]=Zr({value:m,defaultValue:y,finalValue:Array.isArray(f)?oe.find(Me=>!Me.disabled)?.value??f[0]?.value??null:null,onChange:x}),pe=ls(w),Ce=oe.map(Me=>A.createElement(Ee,{...Y("control"),mod:{active:be===Me.value,orientation:O},key:Me.value},A.createElement("input",{...Y("input"),disabled:S||Me.disabled,type:"radio",name:pe,value:Me.value,id:`${pe}-${Me.value}`,checked:be===Me.value,onChange:()=>!D&&we(Me.value),"data-focus-ring":Q.focusRing,key:`${Me.value}-input`}),A.createElement(Ee,{component:"label",...Y("label"),mod:{active:be===Me.value&&!(S||Me.disabled),disabled:S||Me.disabled,"read-only":D},htmlFor:`${pe}-${Me.value}`,ref:lt=>fe(lt,Me.value),__vars:{"--sc-label-color":F!==void 0?gf({color:F,theme:Q,autoContrast:q}):void 0},key:`${Me.value}-label`},c.jsx("span",{...Y("innerLabel"),children:Me.label})))),Ke=ei(e,Me=>ie(Me));return Y7(()=>{te(L1())},[f.length]),f.length===0?null:c.jsxs(Ee,{...Y("root"),variant:$,size:b,ref:Ke,mod:[{"full-width":k,orientation:O,initialized:ue,"with-items-borders":B},z],...ee,role:"radiogroup","data-disabled":S,children:[typeof be=="string"&&c.jsx(vE,{target:G[be],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...Y("indicator")},H),Ce]})});wA.classes=bO;wA.displayName="@mantine/core/SegmentedControl";const cq={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Cr=tt((t,e)=>{const n=Ne("Select",cq,t),{classNames:r,styles:i,unstyled:s,vars:o,dropdownOpened:u,defaultDropdownOpened:d,onDropdownClose:f,onDropdownOpen:m,onFocus:y,onBlur:x,onClick:b,onChange:w,data:S,value:D,defaultValue:k,selectFirstOptionOnChange:O,onOptionSubmit:N,comboboxProps:F,readOnly:M,disabled:V,filter:$,limit:q,withScrollArea:B,maxDropdownHeight:z,size:ee,searchable:Y,rightSection:Q,checkIconPosition:oe,withCheckIcon:ue,nothingFoundMessage:H,name:te,form:Z,searchValue:ie,defaultSearchValue:G,onSearchChange:X,allowDeselect:fe,error:be,rightSectionPointerEvents:we,id:pe,clearable:Ce,clearButtonProps:Ke,hiddenInputProps:Me,renderOption:lt,onClear:bt,autoComplete:mt,scrollAreaProps:_t,__defaultRightSection:Qt,__clearSection:xt,__clearable:wt,chevronColor:Ot,...qe}=n,Le=A.useMemo(()=>sI(S),[S]),He=A.useMemo(()=>kE(Le),[Le]),Xe=ls(pe),[he,Ae,rt]=Zr({value:D,defaultValue:k,finalValue:null,onChange:w}),$e=typeof he=="string"?He[he]:void 0,Ze=Q7($e),[qt,jt,un]=Zr({value:ie,defaultValue:G,finalValue:$e?$e.label:"",onChange:X}),Pt=UE({opened:u,defaultOpened:d,onDropdownOpen:()=>{m?.(),Pt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f?.(),Pt.resetSelectedOption()}}),an=kn=>{jt(kn),Pt.resetSelectedOption()},{resolvedClassNames:rr,resolvedStyles:on}=zu({props:n,styles:i,classNames:r});A.useEffect(()=>{O&&Pt.selectFirstOption()},[O,qt]),A.useEffect(()=>{D===null&&an(""),typeof D=="string"&&$e&&(Ze?.value!==$e.value||Ze?.label!==$e.label)&&an($e.label)},[D,$e]),A.useEffect(()=>{!rt&&!un&&an(typeof he=="string"&&He[he]?.label||"")},[S,he]);const oi=c.jsx(Bn.ClearButton,{...Ke,onClear:()=>{Ae(null,null),an(""),bt?.()}}),Hr=Ce&&!!he&&!V&&!M;return c.jsxs(c.Fragment,{children:[c.jsxs(Bn,{store:Pt,__staticSelector:"Select",classNames:rr,styles:on,unstyled:s,readOnly:M,onOptionSubmit:kn=>{N?.(kn);const qr=fe&&He[kn].value===he?null:He[kn],xr=qr?qr.value:null;xr!==he&&Ae(xr,qr),!rt&&an(typeof xr=="string"&&qr?.label||""),Pt.closeDropdown()},size:ee,...F,children:[c.jsx(Bn.Target,{targetType:Y?"input":"button",autoComplete:mt,children:c.jsx(Ea,{id:Xe,ref:e,__defaultRightSection:c.jsx(Bn.Chevron,{size:ee,error:be,unstyled:s,color:Ot}),__clearSection:oi,__clearable:Hr,rightSection:Q,rightSectionPointerEvents:we||(Hr?"all":"none"),...qe,size:ee,__staticSelector:"Select",disabled:V,readOnly:M||!Y,value:qt,onChange:kn=>{an(kn.currentTarget.value),Pt.openDropdown(),O&&Pt.selectFirstOption()},onFocus:kn=>{Y&&Pt.openDropdown(),y?.(kn)},onBlur:kn=>{Y&&Pt.closeDropdown(),an(he!=null&&He[he]?.label||""),x?.(kn)},onClick:kn=>{Y?Pt.openDropdown():Pt.toggleDropdown(),b?.(kn)},classNames:rr,styles:on,unstyled:s,pointer:!Y,error:be})}),c.jsx(wI,{data:Le,hidden:M||V,filter:$,search:qt,limit:q,hiddenWhenEmpty:!H,withScrollArea:B,maxDropdownHeight:z,filterOptions:Y&&$e?.label!==qt,value:he,checkIconPosition:oe,withCheckIcon:ue,nothingFoundMessage:H,unstyled:s,labelId:qe.label?`${Xe}-label`:void 0,"aria-label":qe.label?void 0:qe["aria-label"],renderOption:lt,scrollAreaProps:_t})]}),c.jsx(Bn.HiddenInput,{value:he,name:te,form:Z,disabled:V,...Me})]})});Cr.classes={...Ea.classes,...Bn.classes};Cr.displayName="@mantine/core/Select";const[dq,_2]=si("SliderProvider was not found in tree"),xO=A.forwardRef(({size:t,disabled:e,variant:n,color:r,thumbSize:i,radius:s,...o},u)=>{const{getStyles:d}=_2();return c.jsx(Ee,{tabIndex:-1,variant:n,size:t,ref:u,...d("root"),...o})});xO.displayName="@mantine/core/SliderRoot";const _O=A.forwardRef(({max:t,min:e,value:n,position:r,label:i,dragging:s,onMouseDown:o,onKeyDownCapture:u,labelTransitionProps:d,labelAlwaysOn:f,thumbLabel:m,onFocus:y,onBlur:x,showLabelOnHover:b,isHovered:w,children:S=null,disabled:D},k)=>{const{getStyles:O}=_2(),[N,F]=A.useState(!1),M=f||s||N||b&&w;return c.jsxs(Ee,{tabIndex:0,role:"slider","aria-label":m,"aria-valuemax":t,"aria-valuemin":e,"aria-valuenow":n,ref:k,__vars:{"--slider-thumb-offset":`${r}%`},...O("thumb",{focusable:!0}),mod:{dragging:s,disabled:D},onFocus:V=>{F(!0),typeof y=="function"&&y(V)},onBlur:V=>{F(!1),typeof x=="function"&&x(V)},onTouchStart:o,onMouseDown:o,onKeyDownCapture:u,onClick:V=>V.stopPropagation(),children:[S,c.jsx(Vu,{mounted:i!=null&&!!M,transition:"fade",duration:0,...d,children:V=>c.jsx("div",{...O("label",{style:V}),children:i})})]})});_O.displayName="@mantine/core/SliderThumb";function SO({value:t,min:e,max:n}){const r=(t-e)/(n-e)*100;return Math.min(Math.max(r,0),100)}function fq({mark:t,offset:e,value:n,inverted:r=!1}){return r?typeof e=="number"&&t.value<=e||t.value>=n:typeof e=="number"?t.value>=e&&t.value<=n:t.value<=n}function TO({marks:t,min:e,max:n,disabled:r,value:i,offset:s,inverted:o}){const{getStyles:u}=_2();if(!t)return null;const d=t.map((f,m)=>A.createElement(Ee,{...u("markWrapper"),__vars:{"--mark-offset":`${SO({value:f.value,min:e,max:n})}%`},key:m},c.jsx(Ee,{...u("mark"),mod:{filled:fq({mark:f,value:i,offset:s,inverted:o}),disabled:r}}),f.label&&c.jsx("div",{...u("markLabel"),children:f.label})));return c.jsx("div",{children:d})}TO.displayName="@mantine/core/SliderMarks";function wO({filled:t,children:e,offset:n,disabled:r,marksOffset:i,inverted:s,containerProps:o,...u}){const{getStyles:d}=_2();return c.jsx(Ee,{...d("trackContainer"),mod:{disabled:r},...o,children:c.jsxs(Ee,{...d("track"),mod:{inverted:s,disabled:r},children:[c.jsx(Ee,{mod:{inverted:s,disabled:r},__vars:{"--slider-bar-width":`calc(${t}% + var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...d("bar")}),e,c.jsx(TO,{...u,offset:i,disabled:r,inverted:s})]})})}wO.displayName="@mantine/core/SliderTrack";function hq({value:t,containerWidth:e,min:n,max:r,step:i,precision:s}){const u=(e?Math.min(Math.max(t,0),e)/e:t)*(r-n),d=(u!==0?Math.round(u/i)*i:0)+n,f=Math.max(d,n);return s!==void 0?Number(f.toFixed(s)):f}function t1(t,e){return parseFloat(t.toFixed(e))}function pq(t){if(!t)return 0;const e=t.toString().split(".");return e.length>1?e[1].length:0}function mT(t,e){const r=[...e].sort((i,s)=>i.value-s.value).find(i=>i.value>t);return r?r.value:t}function gT(t,e){const r=[...e].sort((i,s)=>s.value-i.value).find(i=>i.value<t);return r?r.value:t}function Ek(t){const e=[...t].sort((n,r)=>n.value-r.value);return e.length>0?e[0].value:0}function Ak(t){const e=[...t].sort((n,r)=>n.value-r.value);return e.length>0?e[e.length-1].value:100}var CO={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const mq={radius:"xl",min:0,max:100,step:1,marks:[],label:t=>t,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:t=>t},gq=(t,{size:e,color:n,thumbSize:r,radius:i})=>({root:{"--slider-size":Xt(e,"slider-size"),"--slider-color":n?gr(n,t):void 0,"--slider-radius":i===void 0?void 0:nr(i),"--slider-thumb-size":r!==void 0?Fe(r):"calc(var(--slider-size) * 2)"}}),i0=tt((t,e)=>{const n=Ne("Slider",mq,t),{classNames:r,styles:i,value:s,onChange:o,onChangeEnd:u,size:d,min:f,max:m,step:y,precision:x,defaultValue:b,name:w,marks:S,label:D,labelTransitionProps:k,labelAlwaysOn:O,thumbLabel:N,showLabelOnHover:F,thumbChildren:M,disabled:V,unstyled:$,scale:q,inverted:B,className:z,style:ee,vars:Y,hiddenInputProps:Q,restrictToMarks:oe,thumbProps:ue,...H}=n,te=vt({name:"Slider",props:n,classes:CO,classNames:r,className:z,styles:i,style:ee,vars:Y,varsResolver:gq,unstyled:$}),{dir:Z}=Xa(),[ie,G]=A.useState(!1),[X,fe]=Zr({value:typeof s=="number"?wo(s,f,m):s,defaultValue:typeof b=="number"?wo(b,f,m):b,finalValue:wo(0,f,m),onChange:o}),be=A.useRef(X),we=A.useRef(u);A.useEffect(()=>{we.current=u},[u]);const pe=A.useRef(null),Ce=A.useRef(null),Ke=SO({value:X,min:f,max:m}),Me=q(X),lt=typeof D=="function"?D(Me):D,bt=x??pq(y),mt=A.useCallback(({x:qe})=>{if(!V){const Le=hq({value:qe,min:f,max:m,step:y,precision:bt});fe(oe&&S?.length?y3(Le,S.map(He=>He.value)):Le),be.current=Le}},[V,f,m,y,bt,fe,S,oe]),_t=A.useCallback(()=>{if(!V&&we.current){const qe=oe&&S?.length?y3(be.current,S.map(Le=>Le.value)):be.current;we.current(qe)}},[V,S,oe]),{ref:Qt,active:xt}=jC(mt,{onScrubEnd:_t},Z),wt=A.useCallback(qe=>{!V&&we.current&&we.current(qe)},[V]),Ot=qe=>{if(!V)switch(qe.key){case"ArrowUp":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){const He=mT(X,S);fe(He),wt(He);break}const Le=t1(Math.min(Math.max(X+y,f),m),bt);fe(Le),wt(Le);break}case"ArrowRight":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){const He=Z==="rtl"?gT(X,S):mT(X,S);fe(He),wt(He);break}const Le=t1(Math.min(Math.max(Z==="rtl"?X-y:X+y,f),m),bt);fe(Le),wt(Le);break}case"ArrowDown":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){const He=gT(X,S);fe(He),wt(He);break}const Le=t1(Math.min(Math.max(X-y,f),m),bt);fe(Le),wt(Le);break}case"ArrowLeft":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){const He=Z==="rtl"?mT(X,S):gT(X,S);fe(He),wt(He);break}const Le=t1(Math.min(Math.max(Z==="rtl"?X+y:X-y,f),m),bt);fe(Le),wt(Le);break}case"Home":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){fe(Ek(S)),wt(Ek(S));break}fe(f),wt(f);break}case"End":{if(qe.preventDefault(),Ce.current?.focus(),oe&&S){fe(Ak(S)),wt(Ak(S));break}fe(m),wt(m);break}}};return c.jsx(dq,{value:{getStyles:te},children:c.jsxs(xO,{...H,ref:ei(e,pe),onKeyDownCapture:Ot,onMouseDownCapture:()=>pe.current?.focus(),size:d,disabled:V,children:[c.jsx(wO,{inverted:B,offset:0,filled:Ke,marks:S,min:f,max:m,value:Me,disabled:V,containerProps:{ref:Qt,onMouseEnter:F?()=>G(!0):void 0,onMouseLeave:F?()=>G(!1):void 0},children:c.jsx(_O,{max:m,min:f,value:Me,position:Ke,dragging:xt,label:lt,ref:Ce,labelTransitionProps:k,labelAlwaysOn:O,thumbLabel:N,showLabelOnHover:F,isHovered:ie,disabled:V,...ue,children:M})}),c.jsx("input",{type:"hidden",name:w,value:Me,...Q})]})})});i0.classes=CO;i0.displayName="@mantine/core/Slider";var EO={root:"m_559cce2d",content:"m_b912df4e",control:"m_b9131032"};const vq={maxHeight:100,initialState:!1},yq=(t,{transitionDuration:e})=>({root:{"--spoiler-transition-duration":e!==void 0?`${e}ms`:void 0}}),CA=tt((t,e)=>{const n=Ne("Spoiler",vq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,initialState:f,maxHeight:m,hideLabel:y,showLabel:x,children:b,controlRef:w,transitionDuration:S,id:D,expanded:k,onExpandedChange:O,...N}=n,F=vt({name:"Spoiler",classes:EO,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:yq}),M=ls(D),V=`${M}-region`,[$,q]=Zr({value:k,defaultValue:f,finalValue:!1,onChange:O}),{ref:B,height:z}=G7(),ee=$?y:x,Y=ee!==null&&m<z;return c.jsxs(Ee,{...F("root"),id:M,ref:e,"data-has-spoiler":Y||void 0,...N,children:[Y&&c.jsx(jy,{component:"button",type:"button",ref:w,onClick:()=>q(!$),"aria-expanded":$,"aria-controls":V,...F("control"),children:ee}),c.jsx("div",{...F("content",{style:{maxHeight:$?z?Fe(z):void 0:Fe(m)}}),"data-reduce-motion":!0,role:"region",id:V,children:c.jsx("div",{ref:B,children:b})})]})});CA.classes=EO;CA.displayName="@mantine/core/Spoiler";var AO={root:"m_6d731127"};const bq={gap:"md",align:"stretch",justify:"flex-start"},xq=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":Di(e),"--stack-align":n,"--stack-justify":r}}),tn=tt((t,e)=>{const n=Ne("Stack",bq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,align:f,justify:m,gap:y,variant:x,...b}=n,w=vt({name:"Stack",props:n,classes:AO,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:xq});return c.jsx(Ee,{ref:e,...w("root"),variant:x,...b})});tn.classes=AO;tn.displayName="@mantine/core/Stack";const DO=A.createContext(null),_q=DO.Provider,Sq=()=>A.useContext(DO),Tq={},EA=tt((t,e)=>{const{value:n,defaultValue:r,onChange:i,size:s,wrapperProps:o,children:u,readOnly:d,...f}=Ne("SwitchGroup",Tq,t),[m,y]=Zr({value:n,defaultValue:r,finalValue:[],onChange:i}),x=b=>{const w=b.currentTarget.value;!d&&y(m.includes(w)?m.filter(S=>S!==w):[...m,w])};return c.jsx(_q,{value:{value:m,onChange:x,size:s},children:c.jsx(Nr.Wrapper,{size:s,ref:e,...o,...f,labelElement:"div",__staticSelector:"SwitchGroup",children:c.jsx(gI,{role:"group",children:u})})})});EA.classes=Nr.Wrapper.classes;EA.displayName="@mantine/core/SwitchGroup";var kO={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const wq={labelPosition:"right"},Cq=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:nr(e),"--switch-height":Xt(r,"switch-height"),"--switch-width":Xt(r,"switch-width"),"--switch-thumb-size":Xt(r,"switch-thumb-size"),"--switch-label-font-size":Xt(r,"switch-label-font-size"),"--switch-track-label-padding":Xt(r,"switch-track-label-padding"),"--switch-color":n?gr(n,t):void 0}}),Ty=tt((t,e)=>{const n=Ne("Switch",wq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,color:f,label:m,offLabel:y,onLabel:x,id:b,size:w,radius:S,wrapperProps:D,thumbIcon:k,checked:O,defaultChecked:N,onChange:F,labelPosition:M,description:V,error:$,disabled:q,variant:B,rootRef:z,mod:ee,...Y}=n,Q=Sq(),oe=w||Q?.size,ue=vt({name:"Switch",props:n,classes:kO,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Cq}),{styleProps:H,rest:te}=mp(Y),Z=ls(b),ie=Q?{checked:Q.value.includes(te.value),onChange:Q.onChange}:{},[G,X]=Zr({value:ie.checked??O,defaultValue:N,finalValue:!1});return c.jsxs(zE,{...ue("root"),__staticSelector:"Switch",__stylesApiProps:n,id:Z,size:oe,labelPosition:M,label:m,description:V,error:$,disabled:q,bodyElement:"label",labelElement:"span",classNames:r,styles:o,unstyled:u,"data-checked":ie.checked||O||void 0,variant:B,ref:z,mod:ee,...H,...D,children:[c.jsx("input",{...te,disabled:q,checked:G,"data-checked":ie.checked||O||void 0,onChange:fe=>{Q?ie.onChange?.(fe):F?.(fe),X(fe.currentTarget.checked)},id:Z,ref:e,type:"checkbox",role:"switch",...ue("input")}),c.jsxs(Ee,{"aria-hidden":"true",component:"span",mod:{error:$,"label-position":M,"without-labels":!x&&!y},...ue("track"),children:[c.jsx(Ee,{component:"span",mod:"reduce-motion",...ue("thumb"),children:k}),c.jsx("span",{...ue("trackLabel"),children:G?x:y})]})]})});Ty.classes={...kO,...fI};Ty.displayName="@mantine/core/Switch";Ty.Group=EA;const[Eq,Aq]=si("Table component was not found in the tree");var Gy={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Dq(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function yp(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=tt((i,s)=>{const o=Ne(n,{},i),{classNames:u,className:d,style:f,styles:m,...y}=o,x=Aq();return c.jsx(Ee,{component:t,ref:s,...Dq(x,e),...x.getStyles(t,{className:d,classNames:u,style:f,styles:m,props:o}),...y})});return r.displayName=`@mantine/core/${n}`,r.classes=Gy,r}const jw=yp("th",{columnBorder:!0}),RO=yp("td",{columnBorder:!0}),T1=yp("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),PO=yp("thead",{stickyHeader:!0}),IO=yp("tbody"),OO=yp("tfoot"),NO=yp("caption",{captionSide:!0});function AA({data:t}){return c.jsxs(c.Fragment,{children:[t.caption&&c.jsx(NO,{children:t.caption}),t.head&&c.jsx(PO,{children:c.jsx(T1,{children:t.head.map((e,n)=>c.jsx(jw,{children:e},n))})}),t.body&&c.jsx(IO,{children:t.body.map((e,n)=>c.jsx(T1,{children:e.map((r,i)=>c.jsx(RO,{children:r},i))},n))}),t.foot&&c.jsx(OO,{children:c.jsx(T1,{children:t.foot.map((e,n)=>c.jsx(jw,{children:e},n))})})]})}AA.displayName="@mantine/core/TableDataRenderer";const kq={type:"scrollarea"},Rq=(t,{minWidth:e,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":Fe(e),"--table-max-height":Fe(n),"--table-overflow":r==="native"?"auto":void 0}}),DA=tt((t,e)=>{const n=Ne("TableScrollContainer",kq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,children:f,minWidth:m,maxHeight:y,type:x,scrollAreaProps:b,...w}=n,S=vt({name:"TableScrollContainer",classes:Gy,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:Rq,rootSelector:"scrollContainer"});return c.jsx(Ee,{component:x==="scrollarea"?Ar:"div",...x==="scrollarea"?y?{offsetScrollbars:"xy",...b}:{offsetScrollbars:"x",...b}:{},ref:e,...S("scrollContainer"),...w,children:c.jsx("div",{...S("scrollContainerInner"),children:f})})});DA.classes=Gy;DA.displayName="@mantine/core/TableScrollContainer";const Pq={withRowBorders:!0,verticalSpacing:7},Iq=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:s,stripedColor:o,highlightOnHoverColor:u,striped:d,highlightOnHover:f,stickyHeaderOffset:m,stickyHeader:y})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":Di(r),"--table-vertical-spacing":Di(i),"--table-border-color":s?gr(s,t):void 0,"--table-striped-color":d&&o?gr(o,t):void 0,"--table-highlight-on-hover-color":f&&u?gr(u,t):void 0,"--table-sticky-header-offset":y?Fe(m):void 0}}),Bt=tt((t,e)=>{const n=Ne("Table",Pq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,horizontalSpacing:f,verticalSpacing:m,captionSide:y,stripedColor:x,highlightOnHoverColor:b,striped:w,highlightOnHover:S,withColumnBorders:D,withRowBorders:k,withTableBorder:O,borderColor:N,layout:F,variant:M,data:V,children:$,stickyHeader:q,stickyHeaderOffset:B,mod:z,tabularNums:ee,...Y}=n,Q=vt({name:"Table",props:n,className:i,style:s,classes:Gy,classNames:r,styles:o,unstyled:u,rootSelector:"table",vars:d,varsResolver:Iq});return c.jsx(Eq,{value:{getStyles:Q,stickyHeader:q,striped:w===!0?"odd":w||void 0,highlightOnHover:S,withColumnBorders:D,withRowBorders:k,captionSide:y||"bottom"},children:c.jsx(Ee,{component:"table",variant:M,ref:e,mod:[{"data-with-table-border":O,"data-tabular-nums":ee},z],...Q("table"),...Y,children:$||!!V&&c.jsx(AA,{data:V})})})});Bt.classes=Gy;Bt.displayName="@mantine/core/Table";Bt.Td=RO;Bt.Th=jw;Bt.Tr=T1;Bt.Thead=PO;Bt.Tbody=IO;Bt.Tfoot=OO;Bt.Caption=NO;Bt.ScrollContainer=DA;Bt.DataRenderer=AA;const[Oq,kA]=si("Tabs component was not found in the tree");var Wy={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",panel:"m_b0c91715",tab:"m_4ec4dce6",tabSection:"m_fc420b1f","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const Nq={},RA=tt((t,e)=>{const n=Ne("TabsList",Nq,t),{children:r,className:i,grow:s,justify:o,classNames:u,styles:d,style:f,mod:m,...y}=n,x=kA();return c.jsx(Ee,{...y,...x.getStyles("list",{className:i,style:f,classNames:u,styles:d,props:n,variant:x.variant}),ref:e,role:"tablist",variant:x.variant,mod:[{grow:s,orientation:x.orientation,placement:x.orientation==="vertical"&&x.placement,inverted:x.inverted},m],"aria-orientation":x.orientation,__vars:{"--tabs-justify":o},children:r})});RA.classes=Wy;RA.displayName="@mantine/core/TabsList";const Mq={},PA=tt((t,e)=>{const n=Ne("TabsPanel",Mq,t),{children:r,className:i,value:s,classNames:o,styles:u,style:d,mod:f,keepMounted:m,...y}=n,x=kA(),b=x.value===s,w=x.keepMounted||m||b?r:null;return c.jsx(Ee,{...y,...x.getStyles("panel",{className:i,classNames:o,styles:u,style:[d,b?void 0:{display:"none"}],props:n}),ref:e,mod:[{orientation:x.orientation},f],role:"tabpanel",id:x.getPanelId(s),"aria-labelledby":x.getTabId(s),children:w})});PA.classes=Wy;PA.displayName="@mantine/core/TabsPanel";const jq={},IA=tt((t,e)=>{const n=Ne("TabsTab",jq,t),{className:r,children:i,rightSection:s,leftSection:o,value:u,onClick:d,onKeyDown:f,disabled:m,color:y,style:x,classNames:b,styles:w,vars:S,mod:D,tabIndex:k,...O}=n,N=ai(),{dir:F}=Xa(),M=kA(),V=u===M.value,$=B=>{M.onChange(M.allowTabDeactivation&&u===M.value?null:u),d?.(B)},q={classNames:b,styles:w,props:n};return c.jsxs(Ta,{...O,...M.getStyles("tab",{className:r,style:x,variant:M.variant,...q}),disabled:m,unstyled:M.unstyled,variant:M.variant,mod:[{active:V,disabled:m,orientation:M.orientation,inverted:M.inverted,placement:M.orientation==="vertical"&&M.placement},D],ref:e,role:"tab",id:M.getTabId(u),"aria-selected":V,tabIndex:k!==void 0?k:V||M.value===null?0:-1,"aria-controls":M.getPanelId(u),onClick:$,__vars:{"--tabs-color":y?gr(y,N):void 0},onKeyDown:OC({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:M.activateTabWithKeyboard,loop:M.loop,orientation:M.orientation||"horizontal",dir:F,onKeyDown:f}),children:[o&&c.jsx("span",{...M.getStyles("tabSection",q),"data-position":"left",children:o}),i&&c.jsx("span",{...M.getStyles("tabLabel",q),children:i}),s&&c.jsx("span",{...M.getStyles("tabSection",q),"data-position":"right",children:s})]})});IA.classes=Wy;IA.displayName="@mantine/core/TabsTab";const Dk="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Lq={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},Bq=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":nr(e),"--tabs-color":gr(n,t),"--tabs-text-color":Gg(r,t)?gf({color:n,theme:t,autoContrast:r}):void 0}}),Kt=tt((t,e)=>{const n=Ne("Tabs",Lq,t),{defaultValue:r,value:i,onChange:s,orientation:o,children:u,loop:d,id:f,activateTabWithKeyboard:m,allowTabDeactivation:y,variant:x,color:b,radius:w,inverted:S,placement:D,keepMounted:k,classNames:O,styles:N,unstyled:F,className:M,style:V,vars:$,autoContrast:q,mod:B,...z}=n,ee=ls(f),[Y,Q]=Zr({value:i,defaultValue:r,finalValue:null,onChange:s}),oe=vt({name:"Tabs",props:n,classes:Wy,className:M,style:V,classNames:O,styles:N,unstyled:F,vars:$,varsResolver:Bq});return c.jsx(Oq,{value:{placement:D,value:Y,orientation:o,id:ee,loop:d,activateTabWithKeyboard:m,getTabId:O1(`${ee}-tab`,Dk),getPanelId:O1(`${ee}-panel`,Dk),onChange:Q,allowTabDeactivation:y,variant:x,color:b,radius:w,inverted:S,keepMounted:k,unstyled:F,getStyles:oe},children:c.jsx(Ee,{ref:e,id:ee,variant:x,mod:[{orientation:o,inverted:o==="horizontal"&&S,placement:o==="vertical"&&D},B],...oe("root"),...z,children:u})})});Kt.classes=Wy;Kt.displayName="@mantine/core/Tabs";Kt.Tab=IA;Kt.Panel=PA;Kt.List=RA;const Fq={},pn=tt((t,e)=>{const n=Ne("TextInput",Fq,t);return c.jsx(Ea,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});pn.classes=Ea.classes;pn.displayName="@mantine/core/TextInput";const Uq=["h1","h2","h3","h4","h5","h6"],zq=["xs","sm","md","lg","xl"];function $q(t,e){const n=e!==void 0?e:`h${t}`;return Uq.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:zq.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}:{fontSize:Fe(n),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var MO={root:"m_8a5d1357"};const Vq={order:1},Hq=(t,{order:e,size:n,lineClamp:r,textWrap:i})=>{const s=$q(e,n);return{root:{"--title-fw":s.fontWeight,"--title-lh":s.lineHeight,"--title-fz":s.fontSize,"--title-line-clamp":typeof r=="number"?r.toString():void 0,"--title-text-wrap":i}}},Es=tt((t,e)=>{const n=Ne("Title",Vq,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,order:d,vars:f,size:m,variant:y,lineClamp:x,textWrap:b,mod:w,...S}=n,D=vt({name:"Title",props:n,classes:MO,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:f,varsResolver:Hq});return[1,2,3,4,5,6].includes(d)?c.jsx(Ee,{...D("root"),component:`h${d}`,variant:y,ref:e,mod:[{order:d,"data-line-clamp":typeof x=="number"},w],size:m,...S}):null});Es.classes=MO;Es.displayName="@mantine/core/Title";function qq(t){let e=t,n=!1;const r=new Set;return{getState(){return e},updateState(i){e=typeof i=="function"?i(e):i},setState(i){this.updateState(i),r.forEach(s=>s(e))},initialize(i){n||(e=i,n=!0)},subscribe(i){return r.add(i),()=>r.delete(i)}}}function Gq(t){return A.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function Wq(t,e,n){const r=[],i=[],s={};for(const o of t){const u=o.position||e;s[u]=s[u]||0,s[u]+=1,s[u]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}const Xq=()=>qq({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),bp=Xq(),Yq=(t=bp)=>Gq(t);function s0(t,e){const n=t.getState(),r=e([...n.notifications,...n.queue]),i=Wq(r,n.defaultPosition,n.limit);t.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function OA(t,e=bp){const n=t.id||L1();return s0(e,r=>t.id&&r.some(i=>i.id===t.id)?r:[...r,{...t,id:n}]),n}function Lu(t,e=bp){return s0(e,n=>n.filter(r=>r.id===t?(r.onClose?.(r),!1):!0)),t}function Kq(t,e=bp){return s0(e,n=>n.map(r=>r.id===t.id?{...r,...t}:r)),t.id}function Qq(t=bp){s0(t,()=>[])}function Zq(t=bp){s0(t,e=>e.slice(0,t.getState().limit))}const Ya={show:OA,hide:Lu,update:Kq,clean:Qq,cleanQueue:Zq,updateState:s0};function Lw(t,e){return Lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Lw(t,e)}function jO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Lw(t,e)}var vT={exports:{}},yT,kk;function Jq(){if(kk)return yT;kk=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yT=t,yT}var bT,Rk;function eG(){if(Rk)return bT;Rk=1;var t=Jq();function e(){}function n(){}return n.resetWarningCache=e,bT=function(){function r(o,u,d,f,m,y){if(y!==t){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},bT}var Pk;function tG(){return Pk||(Pk=1,vT.exports=eG()()),vT.exports}var nG=tG();const yr=ko(nG),Ik={disabled:!1},G1=Or.createContext(null);var rG=function(e){return e.scrollTop},ry="unmounted",jh="exited",Lh="entering",ig="entered",Bw="exiting",Kc=function(t){jO(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,u=o&&!o.isMounting?r.enter:r.appear,d;return s.appearStatus=null,r.in?u?(d=jh,s.appearStatus=Lh):d=ig:r.unmountOnExit||r.mountOnEnter?d=ry:d=jh,s.state={status:d},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===ry?{status:jh}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Lh&&o!==ig&&(s=Lh):(o===Lh||o===ig)&&(s=Bw)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,u;return s=o=u=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,u=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:u}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Lh){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:ny.findDOMNode(this);o&&rG(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===jh&&this.setState({status:ry})},n.performEnter=function(i){var s=this,o=this.props.enter,u=this.context?this.context.isMounting:i,d=this.props.nodeRef?[u]:[ny.findDOMNode(this),u],f=d[0],m=d[1],y=this.getTimeouts(),x=u?y.appear:y.enter;if(!i&&!o||Ik.disabled){this.safeSetState({status:ig},function(){s.props.onEntered(f)});return}this.props.onEnter(f,m),this.safeSetState({status:Lh},function(){s.props.onEntering(f,m),s.onTransitionEnd(x,function(){s.safeSetState({status:ig},function(){s.props.onEntered(f,m)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),u=this.props.nodeRef?void 0:ny.findDOMNode(this);if(!s||Ik.disabled){this.safeSetState({status:jh},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:Bw},function(){i.props.onExiting(u),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:jh},function(){i.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(u){o&&(o=!1,s.nextCallback=null,i(u))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:ny.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!o||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],f=d[0],m=d[1];this.props.addEndListener(f,m)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ry)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var u=iA(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Or.createElement(G1.Provider,{value:null},typeof o=="function"?o(i,u):Or.cloneElement(Or.Children.only(o),u))},e}(Or.Component);Kc.contextType=G1;Kc.propTypes={};function Zm(){}Kc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zm,onEntering:Zm,onEntered:Zm,onExit:Zm,onExiting:Zm,onExited:Zm};Kc.UNMOUNTED=ry;Kc.EXITED=jh;Kc.ENTERING=Lh;Kc.ENTERED=ig;Kc.EXITING=Bw;function iG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function NA(t,e){var n=function(s){return e&&A.isValidElement(s)?e(s):s},r=Object.create(null);return t&&A.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function sG(t,e){t=t||{},e=e||{};function n(m){return m in e?e[m]:t[m]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,u={};for(var d in e){if(r[d])for(o=0;o<r[d].length;o++){var f=r[d][o];u[r[d][o]]=n(f)}u[d]=n(d)}for(o=0;o<i.length;o++)u[i[o]]=n(i[o]);return u}function Gh(t,e,n){return n[e]!=null?n[e]:t.props[e]}function aG(t,e){return NA(t.children,function(n){return A.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Gh(n,"appear",t),enter:Gh(n,"enter",t),exit:Gh(n,"exit",t)})})}function oG(t,e,n){var r=NA(t.children),i=sG(e,r);return Object.keys(i).forEach(function(s){var o=i[s];if(A.isValidElement(o)){var u=s in e,d=s in r,f=e[s],m=A.isValidElement(f)&&!f.props.in;d&&(!u||m)?i[s]=A.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:Gh(o,"exit",t),enter:Gh(o,"enter",t)}):!d&&u&&!m?i[s]=A.cloneElement(o,{in:!1}):d&&u&&A.isValidElement(f)&&(i[s]=A.cloneElement(o,{onExited:n.bind(null,o),in:f.props.in,exit:Gh(o,"exit",t),enter:Gh(o,"enter",t)}))}}),i}var lG=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},uG={component:"div",childFactory:function(e){return e}},tf=function(t){jO(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=s.handleExited.bind(iG(s));return s.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,s){var o=s.children,u=s.handleExited,d=s.firstRender;return{children:d?aG(i,u):oG(i,o,u),firstRender:!1}},n.handleExited=function(i,s){var o=NA(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(u){var d=Xr({},u.children);return delete d[i.key],{children:d}}))},n.render=function(){var i=this.props,s=i.component,o=i.childFactory,u=iA(i,["component","childFactory"]),d=this.state.contextValue,f=lG(this.state.children).map(o);return delete u.appear,delete u.enter,delete u.exit,s===null?Or.createElement(G1.Provider,{value:d},f):Or.createElement(G1.Provider,{value:d},Or.createElement(s,u,f))},e}(Or.Component);tf.propTypes={};tf.defaultProps=uG;const LO=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function cG(t,e){return t.reduce((n,r)=>(n[r.position||e].push(r),n),LO.reduce((n,r)=>(n[r]=[],n),{}))}const Ok={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},dG={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function fG({state:t,maxHeight:e,position:n,transitionDuration:r}){const[i,s]=n.split("-"),o=s==="center"?`${i}-center`:s,u={opacity:0,maxHeight:e,transform:Ok[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},d={opacity:1,transform:dG[o]},f={opacity:0,maxHeight:0,transform:Ok[o]};return{...u,...{entering:d,entered:d,exiting:f,exited:f}[t]}}function hG(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const BO=A.forwardRef(({data:t,onHide:e,autoClose:n,...r},i)=>{const{autoClose:s,message:o,...u}=t,d=hG(n,t.autoClose),f=A.useRef(-1),m=()=>window.clearTimeout(f.current),y=()=>{e(t.id),m()},x=()=>{typeof d=="number"&&(f.current=window.setTimeout(y,d))};return A.useEffect(()=>{t.onOpen?.(t)},[]),A.useEffect(()=>(x(),m),[d]),c.jsx(vA,{...r,...u,onClose:y,ref:i,onMouseEnter:m,onMouseLeave:x,children:o})});BO.displayName="@mantine/notifications/NotificationContainer";var FO={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const pG=Kc,mG={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Gi("overlay"),store:bp,withinPortal:!0},gG=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e?.toString(),"--notifications-container-width":Fe(n)}}),Qc=tt((t,e)=>{const n=Ne("Notifications",mG,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,position:f,autoClose:m,transitionDuration:y,containerWidth:x,notificationMaxHeight:b,limit:w,zIndex:S,store:D,portalProps:k,withinPortal:O,...N}=n,F=ai(),M=Yq(D),V=j7(),$=k_(),q=A.useRef({}),B=A.useRef(0),ee=(F.respectReducedMotion?$:!1)?1:y,Y=vt({name:"Notifications",classes:FO,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:gG});A.useEffect(()=>{D?.updateState(ue=>({...ue,limit:w||5,defaultPosition:f}))},[w,f]),Ha(()=>{M.notifications.length>B.current&&setTimeout(()=>V(),0),B.current=M.notifications.length},[M.notifications]);const Q=cG(M.notifications,f),oe=LO.reduce((ue,H)=>(ue[H]=Q[H].map(({style:te,...Z})=>c.jsx(pG,{timeout:ee,onEnter:()=>q.current[Z.id].offsetHeight,nodeRef:{current:q.current[Z.id]},children:ie=>c.jsx(BO,{ref:G=>{q.current[Z.id]=G},data:Z,onHide:G=>Lu(G,D),autoClose:m,...Y("notification",{style:{...fG({state:ie,position:H,transitionDuration:ee,maxHeight:b}),...te}})})},Z.id)),ue),{});return c.jsxs(Gc,{withinPortal:O,...k,children:[c.jsx(Ee,{...Y("root"),"data-position":"top-center",ref:e,...N,children:c.jsx(tf,{children:oe["top-center"]})}),c.jsx(Ee,{...Y("root"),"data-position":"top-left",...N,children:c.jsx(tf,{children:oe["top-left"]})}),c.jsx(Ee,{...Y("root",{className:wg.classNames.fullWidth}),"data-position":"top-right",...N,children:c.jsx(tf,{children:oe["top-right"]})}),c.jsx(Ee,{...Y("root",{className:wg.classNames.fullWidth}),"data-position":"bottom-right",...N,children:c.jsx(tf,{children:oe["bottom-right"]})}),c.jsx(Ee,{...Y("root"),"data-position":"bottom-left",...N,children:c.jsx(tf,{children:oe["bottom-left"]})}),c.jsx(Ee,{...Y("root"),"data-position":"bottom-center",...N,children:c.jsx(tf,{children:oe["bottom-center"]})})]})});Qc.classes=FO;Qc.displayName="@mantine/notifications/Notifications";Qc.show=Ya.show;Qc.hide=Ya.hide;Qc.update=Ya.update;Qc.clean=Ya.clean;Qc.cleanQueue=Ya.cleanQueue;Qc.updateState=Ya.updateState;/**
 * react-router v7.8.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var Nk="popstate";function vG(t={}){function e(r,i){let{pathname:s,search:o,hash:u}=r.location;return Fw("",{pathname:s,search:o,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:wy(i)}return bG(e,n,null,t)}function Vr(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Cl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function yG(){return Math.random().toString(36).substring(2,10)}function Mk(t,e){return{usr:t.state,key:t.key,idx:e}}function Fw(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?a0(e):e,state:n,key:e&&e.key||r||yG()}}function wy({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function a0(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function bG(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,u="POP",d=null,f=m();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function m(){return(o.state||{idx:null}).idx}function y(){u="POP";let D=m(),k=D==null?null:D-f;f=D,d&&d({action:u,location:S.location,delta:k})}function x(D,k){u="PUSH";let O=Fw(S.location,D,k);f=m()+1;let N=Mk(O,f),F=S.createHref(O);try{o.pushState(N,"",F)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;i.location.assign(F)}s&&d&&d({action:u,location:S.location,delta:1})}function b(D,k){u="REPLACE";let O=Fw(S.location,D,k);f=m();let N=Mk(O,f),F=S.createHref(O);o.replaceState(N,"",F),s&&d&&d({action:u,location:S.location,delta:0})}function w(D){return xG(D)}let S={get action(){return u},get location(){return t(i,o)},listen(D){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Nk,y),d=D,()=>{i.removeEventListener(Nk,y),d=null}},createHref(D){return e(i,D)},createURL:w,encodeLocation(D){let k=w(D);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:b,go(D){return o.go(D)}};return S}function xG(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Vr(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:wy(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function UO(t,e,n="/"){return _G(t,e,n,!1)}function _G(t,e,n,r){let i=typeof e=="string"?a0(e):e,s=Vc(i.pathname||"/",n);if(s==null)return null;let o=zO(t);SG(o);let u=null;for(let d=0;u==null&&d<o.length;++d){let f=OG(s);u=PG(o[d],f,r)}return u}function zO(t,e=[],n=[],r=""){let i=(s,o,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};d.relativePath.startsWith("/")&&(Vr(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let f=Fc([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(Vr(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),zO(s.children,e,m,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:kG(f,s.index),routesMeta:m})};return t.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))i(s,o);else for(let u of $O(s.path))i(s,o,u)}),e}function $O(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=$O(r.join("/")),u=[];return u.push(...o.map(d=>d===""?s:[s,d].join("/"))),i&&u.push(...o),u.map(d=>t.startsWith("/")&&d===""?"/":d)}function SG(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:RG(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var TG=/^:[\w-]+$/,wG=3,CG=2,EG=1,AG=10,DG=-2,jk=t=>t==="*";function kG(t,e){let n=t.split("/"),r=n.length;return n.some(jk)&&(r+=DG),e&&(r+=CG),n.filter(i=>!jk(i)).reduce((i,s)=>i+(TG.test(s)?wG:s===""?EG:AG),r)}function RG(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function PG(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=s==="/"?e:e.slice(s.length)||"/",y=W1({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),x=d.route;if(!y&&f&&n&&!r[r.length-1].route.index&&(y=W1({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(i,y.params),o.push({params:i,pathname:Fc([s,y.pathname]),pathnameBase:LG(Fc([s,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(s=Fc([s,y.pathnameBase]))}return o}function W1(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=IG(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:y},x)=>{if(m==="*"){let w=u[x]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const b=u[x];return y&&!b?f[m]=void 0:f[m]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:o,pattern:t}}function IG(t,e=!1,n=!0){Cl(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function OG(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Cl(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Vc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function NG(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?a0(t):t;return{pathname:n?n.startsWith("/")?n:MG(n,e):e,search:BG(r),hash:FG(i)}}function MG(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xT(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jG(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function MA(t){let e=jG(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function jA(t,e,n,r=!1){let i;typeof t=="string"?i=a0(t):(i={...t},Vr(!i.pathname||!i.pathname.includes("?"),xT("?","pathname","search",i)),Vr(!i.pathname||!i.pathname.includes("#"),xT("#","pathname","hash",i)),Vr(!i.search||!i.search.includes("#"),xT("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,u;if(o==null)u=n;else{let y=e.length-1;if(!r&&o.startsWith("..")){let x=o.split("/");for(;x[0]==="..";)x.shift(),y-=1;i.pathname=x.join("/")}u=y>=0?e[y]:"/"}let d=NG(i,u),f=o&&o!=="/"&&o.endsWith("/"),m=(s||o===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Fc=t=>t.join("/").replace(/\/\/+/g,"/"),LG=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),BG=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,FG=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function UG(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var VO=["POST","PUT","PATCH","DELETE"];new Set(VO);var zG=["GET",...VO];new Set(zG);var o0=A.createContext(null);o0.displayName="DataRouter";var S2=A.createContext(null);S2.displayName="DataRouterState";A.createContext(!1);var HO=A.createContext({isTransitioning:!1});HO.displayName="ViewTransition";var $G=A.createContext(new Map);$G.displayName="Fetchers";var VG=A.createContext(null);VG.displayName="Await";var Rl=A.createContext(null);Rl.displayName="Navigation";var Xy=A.createContext(null);Xy.displayName="Location";var Pl=A.createContext({outlet:null,matches:[],isDataRoute:!1});Pl.displayName="Route";var LA=A.createContext(null);LA.displayName="RouteError";function HG(t,{relative:e}={}){Vr(l0(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=A.useContext(Rl),{hash:i,pathname:s,search:o}=Yy(t,{relative:e}),u=s;return n!=="/"&&(u=s==="/"?n:Fc([n,s])),r.createHref({pathname:u,search:o,hash:i})}function l0(){return A.useContext(Xy)!=null}function yf(){return Vr(l0(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Xy).location}var qO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function GO(t){A.useContext(Rl).static||A.useLayoutEffect(t)}function u0(){let{isDataRoute:t}=A.useContext(Pl);return t?iW():qG()}function qG(){Vr(l0(),"useNavigate() may be used only in the context of a <Router> component.");let t=A.useContext(o0),{basename:e,navigator:n}=A.useContext(Rl),{matches:r}=A.useContext(Pl),{pathname:i}=yf(),s=JSON.stringify(MA(r)),o=A.useRef(!1);return GO(()=>{o.current=!0}),A.useCallback((d,f={})=>{if(Cl(o.current,qO),!o.current)return;if(typeof d=="number"){n.go(d);return}let m=jA(d,JSON.parse(s),i,f.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:Fc([e,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[e,n,s,i,t])}A.createContext(null);function GG(){let{matches:t}=A.useContext(Pl),e=t[t.length-1];return e?e.params:{}}function Yy(t,{relative:e}={}){let{matches:n}=A.useContext(Pl),{pathname:r}=yf(),i=JSON.stringify(MA(n));return A.useMemo(()=>jA(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function WG(t,e){return WO(t,e)}function WO(t,e,n,r){Vr(l0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=A.useContext(Rl),{matches:s}=A.useContext(Pl),o=s[s.length-1],u=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",m=o&&o.route;{let k=m&&m.path||"";XO(d,!m||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let y=yf(),x;if(e){let k=typeof e=="string"?a0(e):e;Vr(f==="/"||k.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${k.pathname}" was given in the \`location\` prop.`),x=k}else x=y;let b=x.pathname||"/",w=b;if(f!=="/"){let k=f.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(k.length).join("/")}let S=UO(t,{pathname:w});Cl(m||S!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Cl(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=ZG(S&&S.map(k=>Object.assign({},k,{params:Object.assign({},u,k.params),pathname:Fc([f,i.encodeLocation?i.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?f:Fc([f,i.encodeLocation?i.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),s,n,r);return e&&D?A.createElement(Xy.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},D):D}function XG(){let t=rW(),e=UG(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:s},"ErrorBoundary")," or"," ",A.createElement("code",{style:s},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:i},n):null,o)}var YG=A.createElement(XG,null),KG=class extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?A.createElement(Pl.Provider,{value:this.props.routeContext},A.createElement(LA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function QG({routeContext:t,match:e,children:n}){let r=A.useContext(o0);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),A.createElement(Pl.Provider,{value:t},n)}function ZG(t,e=[],n=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,s=n?.errors;if(s!=null){let d=i.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);Vr(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let o=!1,u=-1;if(n)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:y}=n,x=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||x){o=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let y,x=!1,b=null,w=null;n&&(y=s&&f.route.id?s[f.route.id]:void 0,b=f.route.errorElement||YG,o&&(u<0&&m===0?(XO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):u===m&&(x=!0,w=f.route.hydrateFallbackElement||null)));let S=e.concat(i.slice(0,m+1)),D=()=>{let k;return y?k=b:x?k=w:f.route.Component?k=A.createElement(f.route.Component,null):f.route.element?k=f.route.element:k=d,A.createElement(QG,{match:f,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:k})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?A.createElement(KG,{location:n.location,revalidation:n.revalidation,component:b,error:y,children:D(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):D()},null)}function BA(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function JG(t){let e=A.useContext(o0);return Vr(e,BA(t)),e}function eW(t){let e=A.useContext(S2);return Vr(e,BA(t)),e}function tW(t){let e=A.useContext(Pl);return Vr(e,BA(t)),e}function FA(t){let e=tW(t),n=e.matches[e.matches.length-1];return Vr(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function nW(){return FA("useRouteId")}function rW(){let t=A.useContext(LA),e=eW("useRouteError"),n=FA("useRouteError");return t!==void 0?t:e.errors?.[n]}function iW(){let{router:t}=JG("useNavigate"),e=FA("useNavigate"),n=A.useRef(!1);return GO(()=>{n.current=!0}),A.useCallback(async(i,s={})=>{Cl(n.current,qO),n.current&&(typeof i=="number"?t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Lk={};function XO(t,e,n){!e&&!Lk[t]&&(Lk[t]=!0,Cl(!1,n))}A.memo(sW);function sW({routes:t,future:e,state:n}){return WO(t,void 0,n,e)}function aW({to:t,replace:e,state:n,relative:r}){Vr(l0(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=A.useContext(Rl);Cl(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=A.useContext(Pl),{pathname:o}=yf(),u=u0(),d=jA(t,MA(s),o,r==="path"),f=JSON.stringify(d);return A.useEffect(()=>{u(JSON.parse(f),{replace:e,state:n,relative:r})},[u,f,r,e,n]),null}function Ui(t){Vr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function oW({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){Vr(!l0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=t.replace(/^\/*/,"/"),u=A.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=a0(n));let{pathname:d="/",search:f="",hash:m="",state:y=null,key:x="default"}=n,b=A.useMemo(()=>{let w=Vc(d,o);return w==null?null:{location:{pathname:w,search:f,hash:m,state:y,key:x},navigationType:r}},[o,d,f,m,y,x,r]);return Cl(b!=null,`<Router basename="${o}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:A.createElement(Rl.Provider,{value:u},A.createElement(Xy.Provider,{children:e,value:b}))}function Bk({children:t,location:e}){return WG(Uw(t),e)}function Uw(t,e=[]){let n=[];return A.Children.forEach(t,(r,i)=>{if(!A.isValidElement(r))return;let s=[...e,i];if(r.type===A.Fragment){n.push.apply(n,Uw(r.props.children,s));return}Vr(r.type===Ui,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Vr(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Uw(r.props.children,s)),n.push(o)}),n}var w1="get",C1="application/x-www-form-urlencoded";function T2(t){return t!=null&&typeof t.tagName=="string"}function lW(t){return T2(t)&&t.tagName.toLowerCase()==="button"}function uW(t){return T2(t)&&t.tagName.toLowerCase()==="form"}function cW(t){return T2(t)&&t.tagName.toLowerCase()==="input"}function dW(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function fW(t,e){return t.button===0&&(!e||e==="_self")&&!dW(t)}var n1=null;function hW(){if(n1===null)try{new FormData(document.createElement("form"),0),n1=!1}catch{n1=!0}return n1}var pW=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _T(t){return t!=null&&!pW.has(t)?(Cl(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${C1}"`),null):t}function mW(t,e){let n,r,i,s,o;if(uW(t)){let u=t.getAttribute("action");r=u?Vc(u,e):null,n=t.getAttribute("method")||w1,i=_T(t.getAttribute("enctype"))||C1,s=new FormData(t)}else if(lW(t)||cW(t)&&(t.type==="submit"||t.type==="image")){let u=t.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||u.getAttribute("action");if(r=d?Vc(d,e):null,n=t.getAttribute("formmethod")||u.getAttribute("method")||w1,i=_T(t.getAttribute("formenctype"))||_T(u.getAttribute("enctype"))||C1,s=new FormData(u,t),!hW()){let{name:f,type:m,value:y}=t;if(m==="image"){let x=f?`${f}.`:"";s.append(`${x}x`,"0"),s.append(`${x}y`,"0")}else f&&s.append(f,y)}}else{if(T2(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=w1,r=null,i=C1,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function UA(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function gW(t,e,n){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname=`_root.${n}`:e&&Vc(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function vW(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yW(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function bW(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await vW(s,n);return o.links?o.links():[]}return[]}));return TW(r.flat(1).filter(yW).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Fk(t,e,n,r,i,s){let o=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>n[f].pathname!==d.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==d.params["*"];return s==="assets"?e.filter((d,f)=>o(d,f)||u(d,f)):s==="data"?e.filter((d,f)=>{let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(o(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function xW(t,e,{includeHydrateFallback:n}={}){return _W(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function _W(t){return[...new Set(t)]}function SW(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function TW(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(SW(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function YO(){let t=A.useContext(o0);return UA(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function wW(){let t=A.useContext(S2);return UA(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var zA=A.createContext(void 0);zA.displayName="FrameworkContext";function KO(){let t=A.useContext(zA);return UA(t,"You must render this element inside a <HydratedRouter> element"),t}function CW(t,e){let n=A.useContext(zA),[r,i]=A.useState(!1),[s,o]=A.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:y}=e,x=A.useRef(null);A.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let S=k=>{k.forEach(O=>{o(O.isIntersecting)})},D=new IntersectionObserver(S,{threshold:.5});return x.current&&D.observe(x.current),()=>{D.disconnect()}}},[t]),A.useEffect(()=>{if(r){let S=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(S)}}},[r]);let b=()=>{i(!0)},w=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,x,{}]:[s,x,{onFocus:Hv(u,b),onBlur:Hv(d,w),onMouseEnter:Hv(f,b),onMouseLeave:Hv(m,w),onTouchStart:Hv(y,b)}]:[!1,x,{}]}function Hv(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function EW({page:t,...e}){let{router:n}=YO(),r=A.useMemo(()=>UO(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?A.createElement(DW,{page:t,matches:r,...e}):null}function AW(t){let{manifest:e,routeModules:n}=KO(),[r,i]=A.useState([]);return A.useEffect(()=>{let s=!1;return bW(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function DW({page:t,matches:e,...n}){let r=yf(),{manifest:i,routeModules:s}=KO(),{basename:o}=YO(),{loaderData:u,matches:d}=wW(),f=A.useMemo(()=>Fk(t,e,d,i,r,"data"),[t,e,d,i,r]),m=A.useMemo(()=>Fk(t,e,d,i,r,"assets"),[t,e,d,i,r]),y=A.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(e.forEach(k=>{let O=i.routes[k.route.id];!O||!O.hasLoader||(!f.some(N=>N.route.id===k.route.id)&&k.route.id in u&&s[k.route.id]?.shouldRevalidate||O.hasClientLoader?S=!0:w.add(k.route.id))}),w.size===0)return[];let D=gW(t,o,"data");return S&&w.size>0&&D.searchParams.set("_routes",e.filter(k=>w.has(k.route.id)).map(k=>k.route.id).join(",")),[D.pathname+D.search]},[o,u,r,i,f,e,t,s]),x=A.useMemo(()=>xW(m,i),[m,i]),b=AW(m);return A.createElement(A.Fragment,null,y.map(w=>A.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>A.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:S})=>A.createElement("link",{key:w,nonce:n.nonce,...S})))}function kW(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var QO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{QO&&(window.__reactRouterVersion="7.8.0")}catch{}function RW({basename:t,children:e,window:n}){let r=A.useRef();r.current==null&&(r.current=vG({window:n,v5Compat:!0}));let i=r.current,[s,o]=A.useState({action:i.action,location:i.location}),u=A.useCallback(d=>{A.startTransition(()=>o(d))},[o]);return A.useLayoutEffect(()=>i.listen(u),[i,u]),A.createElement(oW,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:i})}var ZO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,JO=A.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:u,target:d,to:f,preventScrollReset:m,viewTransition:y,...x},b){let{basename:w}=A.useContext(Rl),S=typeof f=="string"&&ZO.test(f),D,k=!1;if(typeof f=="string"&&S&&(D=f,QO))try{let B=new URL(window.location.href),z=f.startsWith("//")?new URL(B.protocol+f):new URL(f),ee=Vc(z.pathname,w);z.origin===B.origin&&ee!=null?f=ee+z.search+z.hash:k=!0}catch{Cl(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let O=HG(f,{relative:i}),[N,F,M]=CW(r,x),V=NW(f,{replace:o,state:u,target:d,preventScrollReset:m,relative:i,viewTransition:y});function $(B){e&&e(B),B.defaultPrevented||V(B)}let q=A.createElement("a",{...x,...M,href:D||O,onClick:k||s?e:$,ref:kW(b,F),target:d,"data-discover":!S&&n==="render"?"true":void 0});return N&&!S?A.createElement(A.Fragment,null,q,A.createElement(EW,{page:O})):q});JO.displayName="Link";var PW=A.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:u,children:d,...f},m){let y=Yy(o,{relative:f.relative}),x=yf(),b=A.useContext(S2),{navigator:w,basename:S}=A.useContext(Rl),D=b!=null&&FW(y)&&u===!0,k=w.encodeLocation?w.encodeLocation(y).pathname:y.pathname,O=x.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(O=O.toLowerCase(),N=N?N.toLowerCase():null,k=k.toLowerCase()),N&&S&&(N=Vc(N,S)||N);const F=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let M=O===k||!i&&O.startsWith(k)&&O.charAt(F)==="/",V=N!=null&&(N===k||!i&&N.startsWith(k)&&N.charAt(k.length)==="/"),$={isActive:M,isPending:V,isTransitioning:D},q=M?e:void 0,B;typeof r=="function"?B=r($):B=[r,M?"active":null,V?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let z=typeof s=="function"?s($):s;return A.createElement(JO,{...f,"aria-current":q,className:B,ref:m,style:z,to:o,viewTransition:u},typeof d=="function"?d($):d)});PW.displayName="NavLink";var IW=A.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=w1,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:y,...x},b)=>{let w=LW(),S=BW(u,{relative:f}),D=o.toLowerCase()==="get"?"get":"post",k=typeof u=="string"&&ZO.test(u),O=N=>{if(d&&d(N),N.defaultPrevented)return;N.preventDefault();let F=N.nativeEvent.submitter,M=F?.getAttribute("formmethod")||o;w(F||N.currentTarget,{fetcherKey:e,method:M,navigate:n,replace:i,state:s,relative:f,preventScrollReset:m,viewTransition:y})};return A.createElement("form",{ref:b,method:D,action:S,onSubmit:r?d:O,...x,"data-discover":!k&&t==="render"?"true":void 0})});IW.displayName="Form";function OW(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function eN(t){let e=A.useContext(o0);return Vr(e,OW(t)),e}function NW(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let u=u0(),d=yf(),f=Yy(t,{relative:s});return A.useCallback(m=>{if(fW(m,e)){m.preventDefault();let y=n!==void 0?n:wy(d)===wy(f);u(t,{replace:y,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[d,u,f,n,r,e,t,i,s,o])}var MW=0,jW=()=>`__${String(++MW)}__`;function LW(){let{router:t}=eN("useSubmit"),{basename:e}=A.useContext(Rl),n=nW();return A.useCallback(async(r,i={})=>{let{action:s,method:o,encType:u,formData:d,body:f}=mW(r,e);if(i.navigate===!1){let m=i.fetcherKey||jW();await t.fetch(m,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||o,formEncType:i.encType||u,flushSync:i.flushSync})}else await t.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||o,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[t,e,n])}function BW(t,{relative:e}={}){let{basename:n}=A.useContext(Rl),r=A.useContext(Pl);Vr(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Yy(t||".",{relative:e})},o=yf();if(t==null){s.search=o.search;let u=new URLSearchParams(s.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(y=>y).forEach(y=>u.append("index",y));let m=u.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Fc([n,s.pathname])),wy(s)}function FW(t,{relative:e}={}){let n=A.useContext(HO);Vr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=eN("useViewTransitionState"),i=Yy(t,{relative:e});if(!n.isTransitioning)return!1;let s=Vc(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Vc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return W1(i.pathname,o)!=null||W1(i.pathname,s)!=null}/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var UW={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ot=(t,e,n,r)=>{const i=A.forwardRef(({color:s="currentColor",size:o=24,stroke:u=2,title:d,className:f,children:m,...y},x)=>A.createElement("svg",{ref:x,...UW[t],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,f].join(" "),strokeWidth:u,stroke:s,...y},[d&&A.createElement("title",{key:"svg-title"},d),...r.map(([b,w])=>A.createElement(b,w)),...Array.isArray(m)?m:[m]]));return i.displayName=`${n}`,i};/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const zW=[["path",{d:"M3 12h4l3 8l4 -16l3 8h4",key:"svg-0"}]],$W=ot("outline","activity","Activity",zW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const VW=[["path",{d:"M20 11a8.1 8.1 0 0 0 -6.986 -6.918a8.086 8.086 0 0 0 -4.31 .62m-2.383 1.608a8.089 8.089 0 0 0 -1.326 1.69",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 13.687 4.676",key:"svg-1"}],["path",{d:"M20 16a1 1 0 0 0 -1 -1",key:"svg-2"}],["path",{d:"M5 8m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9.888 9.87a3 3 0 1 0 4.233 4.252m.595 -3.397a3.012 3.012 0 0 0 -1.426 -1.435",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]],HW=ot("outline","analyze-off","AnalyzeOff",VW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qW=[["path",{d:"M20 11a8.1 8.1 0 0 0 -6.986 -6.918a8.095 8.095 0 0 0 -8.019 3.918",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15 3",key:"svg-1"}],["path",{d:"M19 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M5 8m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-4"}]],GW=ot("outline","analyze","Analyze",qW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const WW=[["path",{d:"M20 15h-8v3.586a1 1 0 0 1 -1.707 .707l-6.586 -6.586a1 1 0 0 1 0 -1.414l6.586 -6.586a1 1 0 0 1 1.707 .707v3.586h8a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1z",key:"svg-0"}]],XW=ot("outline","arrow-big-left","ArrowBigLeft",WW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const YW=[["path",{d:"M4 9h8v-3.586a1 1 0 0 1 1.707 -.707l6.586 6.586a1 1 0 0 1 0 1.414l-6.586 6.586a1 1 0 0 1 -1.707 -.707v-3.586h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1z",key:"svg-0"}]],KW=ot("outline","arrow-big-right","ArrowBigRight",YW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const QW=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M16 15l-4 4",key:"svg-1"}],["path",{d:"M8 15l4 4",key:"svg-2"}]],tN=ot("outline","arrow-narrow-down","ArrowNarrowDown",QW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZW=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M16 9l-4 -4",key:"svg-1"}],["path",{d:"M8 9l4 -4",key:"svg-2"}]],nN=ot("outline","arrow-narrow-up","ArrowNarrowUp",ZW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const JW=[["path",{d:"M18 4l3 3l-3 3",key:"svg-0"}],["path",{d:"M18 20l3 -3l-3 -3",key:"svg-1"}],["path",{d:"M3 7h3a5 5 0 0 1 5 5a5 5 0 0 0 5 5h5",key:"svg-2"}],["path",{d:"M21 7h-5a4.978 4.978 0 0 0 -3 1m-4 8a4.984 4.984 0 0 1 -3 1h-3",key:"svg-3"}]],eX=ot("outline","arrows-shuffle","ArrowsShuffle",JW);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tX=[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]],rN=ot("outline","arrows-vertical","ArrowsVertical",tX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nX=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M7 9h1.5a1.5 1.5 0 0 1 0 3h-.5h.5a1.5 1.5 0 0 1 0 3h-1.5",key:"svg-1"}],["path",{d:"M14 9v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2z",key:"svg-2"}]],rX=ot("outline","badge-3d","Badge3d",nX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const iX=[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M7 9v2a1 1 0 0 0 1 1h1",key:"svg-1"}],["path",{d:"M10 9v6",key:"svg-2"}],["path",{d:"M14 9v6",key:"svg-3"}],["path",{d:"M17 9l-2 3l2 3",key:"svg-4"}],["path",{d:"M15 12h-1",key:"svg-5"}]],sX=ot("outline","badge-4k","Badge4k",iX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const aX=[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 9v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z",key:"svg-1"}],["path",{d:"M7 15v-6",key:"svg-2"}],["path",{d:"M10 15v-6",key:"svg-3"}],["path",{d:"M7 12h3",key:"svg-4"}]],oX=ot("outline","badge-hd","BadgeHd",aX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lX=[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 9v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z",key:"svg-1"}],["path",{d:"M7 14.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-2"}]],uX=ot("outline","badge-sd","BadgeSd",lX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cX=[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M5.7 5.7l12.6 12.6",key:"svg-1"}]],dX=ot("outline","ban","Ban",cX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fX=[["path",{d:"M10.002 20.003v-16h-5a1 1 0 0 0 -1 1v14a1 1 0 0 0 1 1h5z",key:"svg-0"}],["path",{d:"M15.002 20.003h-.01",key:"svg-1"}],["path",{d:"M20.003 20.003h-.011",key:"svg-2"}],["path",{d:"M20.003 15.002h-.011",key:"svg-3"}],["path",{d:"M20.003 9.002h-.011",key:"svg-4"}],["path",{d:"M20.003 4.002h-.011",key:"svg-5"}],["path",{d:"M15.002 4.002h-.01",key:"svg-6"}]],hX=ot("outline","box-align-left","BoxAlignLeft",fX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pX=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3z",key:"svg-1"}]],mX=ot("outline","brand-youtube","BrandYoutube",pX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gX=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],vX=ot("outline","calendar","Calendar",gX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yX=[["path",{d:"M3 19l.01 0",key:"svg-0"}],["path",{d:"M7 19a4 4 0 0 0 -4 -4",key:"svg-1"}],["path",{d:"M11 19a8 8 0 0 0 -8 -8",key:"svg-2"}],["path",{d:"M15 19h3a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-12a3 3 0 0 0 -2.8 2",key:"svg-3"}]],iN=ot("outline","cast","Cast",yX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bX=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],sN=ot("outline","check","Check",bX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xX=[["path",{d:"M20.986 12.502a9 9 0 1 0 -5.973 7.98",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}],["path",{d:"M19 16v3",key:"svg-2"}],["path",{d:"M19 22v.01",key:"svg-3"}]],_X=ot("outline","clock-exclamation","ClockExclamation",xX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const SX=[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 9v6",key:"svg-1"}],["path",{d:"M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2",key:"svg-2"}],["path",{d:"M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2",key:"svg-3"}]],Uk=ot("outline","code-plus","CodePlus",SX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const TX=[["path",{d:"M12 16h-8a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v7",key:"svg-0"}],["path",{d:"M7 20h5",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M19.001 15.5v1.5",key:"svg-4"}],["path",{d:"M19.001 21v1.5",key:"svg-5"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-6"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-7"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-8"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-9"}]],wX=ot("outline","device-desktop-cog","DeviceDesktopCog",TX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const CX=[["path",{d:"M10 16h-6a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v6.5",key:"svg-0"}],["path",{d:"M7 20h3.5",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M17.8 20.817l-2.172 1.138a.392 .392 0 0 1 -.568 -.41l.415 -2.411l-1.757 -1.707a.389 .389 0 0 1 .217 -.665l2.428 -.352l1.086 -2.193a.392 .392 0 0 1 .702 0l1.086 2.193l2.428 .352a.39 .39 0 0 1 .217 .665l-1.757 1.707l.414 2.41a.39 .39 0 0 1 -.567 .411l-2.172 -1.138z",key:"svg-3"}]],zw=ot("outline","device-desktop-star","DeviceDesktopStar",CX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const EX=[["path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 14m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M12 7l0 .01",key:"svg-2"}]],AX=ot("outline","device-speaker","DeviceSpeaker",EX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const DX=[["path",{d:"M3 7m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 3l-4 4l-4 -4",key:"svg-1"}]],kX=ot("outline","device-tv","DeviceTv",DX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const RX=[["path",{d:"M10 15h-6a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h6",key:"svg-0"}],["path",{d:"M13 4m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M7 19l3 0",key:"svg-2"}],["path",{d:"M17 8l0 .01",key:"svg-3"}],["path",{d:"M17 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M9 15l0 4",key:"svg-5"}]],PX=ot("outline","devices-2","Devices2",RX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const IX=[["path",{d:"M9 9v10h-6v-14h2",key:"svg-0"}],["path",{d:"M13 9h9v7h-2m-4 0h-4v-4",key:"svg-1"}],["path",{d:"M14 19h5",key:"svg-2"}],["path",{d:"M17 17v2",key:"svg-3"}],["path",{d:"M6 13v.01",key:"svg-4"}],["path",{d:"M6 16v.01",key:"svg-5"}],["path",{d:"M3 3l18 18",key:"svg-6"}]],hg=ot("outline","devices-pc-off","DevicesPcOff",IX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const OX=[["path",{d:"M3 5h6v14h-6z",key:"svg-0"}],["path",{d:"M12 9h10v7h-10z",key:"svg-1"}],["path",{d:"M14 19h6",key:"svg-2"}],["path",{d:"M17 16v3",key:"svg-3"}],["path",{d:"M6 13v.01",key:"svg-4"}],["path",{d:"M6 16v.01",key:"svg-5"}]],X1=ot("outline","devices-pc","DevicesPc",OX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const NX=[["path",{d:"M3 5h11",key:"svg-0"}],["path",{d:"M12 7l2 -2l-2 -2",key:"svg-1"}],["path",{d:"M5 3l-2 2l2 2",key:"svg-2"}],["path",{d:"M19 10v11",key:"svg-3"}],["path",{d:"M17 19l2 2l2 -2",key:"svg-4"}],["path",{d:"M21 12l-2 -2l-2 2",key:"svg-5"}],["path",{d:"M3 10m0 2a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2z",key:"svg-6"}]],MX=ot("outline","dimensions","Dimensions",NX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jX=[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-2"}],["path",{d:"M12 17a5 5 0 0 0 5 -5",key:"svg-3"}]],LX=ot("outline","disc","Disc",jX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const BX=[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Y1=ot("outline","dots","Dots",BX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const FX=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],UX=ot("outline","download","Download",FX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const zX=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M10.507 10.498l-1.507 1.502v3h3l1.493 -1.498m2 -2.01l4.89 -4.907a2.1 2.1 0 0 0 -2.97 -2.97l-4.913 4.896",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],$X=ot("outline","edit-off","EditOff",zX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const VX=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],$A=ot("outline","edit","Edit",VX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const HX=[["path",{d:"M12 19v.01",key:"svg-0"}],["path",{d:"M12 15v-10",key:"svg-1"}]],Ig=ot("outline","exclamation-mark","ExclamationMark",HX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qX=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M11.102 17.957c-3.204 -.307 -5.904 -2.294 -8.102 -5.957c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6a19.5 19.5 0 0 1 -.663 1.032",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],GX=ot("outline","eye-check","EyeCheck",qX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const WX=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],XX=ot("outline","eye-off","EyeOff",WX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const YX=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],KX=ot("outline","eye","Eye",YX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const QX=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17h6",key:"svg-2"}],["path",{d:"M9 13h6",key:"svg-3"}]],ZX=ot("outline","file-description","FileDescription",QX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const JX=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M11 14h1v4h1",key:"svg-2"}],["path",{d:"M12 11h.01",key:"svg-3"}]],eY=ot("outline","file-info","FileInfo",JX);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tY=[["path",{d:"M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1",key:"svg-0"}],["path",{d:"M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z",key:"svg-1"}],["path",{d:"M11 5l-1 0",key:"svg-2"}],["path",{d:"M13 7l-1 0",key:"svg-3"}],["path",{d:"M11 9l-1 0",key:"svg-4"}],["path",{d:"M13 11l-1 0",key:"svg-5"}],["path",{d:"M11 13l-1 0",key:"svg-6"}],["path",{d:"M13 15l-1 0",key:"svg-7"}]],nY=ot("outline","file-zip","FileZip",tY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const rY=[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]],iY=ot("outline","filter","Filter",rY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const sY=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]],aY=ot("outline","folder-check","FolderCheck",sY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const oY=[["path",{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}]],lY=ot("outline","folder-plus","FolderPlus",oY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const uY=[["path",{d:"M13.5 19h-8.5a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M22 22l-5 -5",key:"svg-1"}],["path",{d:"M17 22l5 -5",key:"svg-2"}]],cY=ot("outline","folder-x","FolderX",uY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const dY=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Og=ot("outline","folder","Folder",dY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fY=[["path",{d:"M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2",key:"svg-1"}]],aN=ot("outline","folders","Folders",fY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hY=[["path",{d:"M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572",key:"svg-0"}]],pY=ot("outline","heart","Heart",hY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const mY=[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 17l0 .01",key:"svg-1"}],["path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4",key:"svg-2"}]],gY=ot("outline","help","Help",mY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const vY=[["path",{d:"M5 12l-2 0l9 -9l9 9l-2 0",key:"svg-0"}],["path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7",key:"svg-1"}],["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6",key:"svg-2"}]],VA=ot("outline","home","Home",vY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yY=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],bY=ot("outline","info-circle","InfoCircle",yY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xY=[["path",{d:"M12 9h.01",key:"svg-0"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],_Y=ot("outline","info-square","InfoSquare",xY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const SY=[["path",{d:"M12 20l2.463 -5.541m1.228 -2.764l.309 -.695l.8 1.8",key:"svg-0"}],["path",{d:"M18 18h-5.1",key:"svg-1"}],["path",{d:"M8.747 8.748c-.66 2.834 -2.536 4.252 -4.747 4.252",key:"svg-2"}],["path",{d:"M4 6.371l2.371 0",key:"svg-3"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]],TY=ot("outline","language-off","LanguageOff",SY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wY=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],CY=ot("outline","language","Language",wY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const EY=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],AY=ot("outline","link","Link",EY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const DY=[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]],kY=ot("outline","list-details","ListDetails",DY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const RY=[["path",{d:"M15 15m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M18.5 18.5l2.5 2.5",key:"svg-1"}],["path",{d:"M4 6h16",key:"svg-2"}],["path",{d:"M4 12h4",key:"svg-3"}],["path",{d:"M4 18h4",key:"svg-4"}]],HA=ot("outline","list-search","ListSearch",RY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const PY=[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]],IY=ot("outline","loader-2","Loader2",PY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const OY=[["path",{d:"M12 6l0 -3",key:"svg-0"}],["path",{d:"M16.25 7.75l2.15 -2.15",key:"svg-1"}],["path",{d:"M18 12l3 0",key:"svg-2"}],["path",{d:"M16.25 16.25l2.15 2.15",key:"svg-3"}],["path",{d:"M12 18l0 3",key:"svg-4"}],["path",{d:"M7.75 16.25l-2.15 2.15",key:"svg-5"}],["path",{d:"M6 12l-3 0",key:"svg-6"}],["path",{d:"M7.75 7.75l-2.15 -2.15",key:"svg-7"}]],NY=ot("outline","loader","Loader",OY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const MY=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],oN=ot("outline","lock","Lock",MY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jY=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],LY=ot("outline","logout","Logout",jY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const BY=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],FY=ot("outline","menu-2","Menu2",BY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const UY=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]],zY=ot("outline","moon-stars","MoonStars",UY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $Y=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M8 4l0 16",key:"svg-1"}],["path",{d:"M16 4l0 16",key:"svg-2"}],["path",{d:"M4 8l4 0",key:"svg-3"}],["path",{d:"M4 16l4 0",key:"svg-4"}],["path",{d:"M4 12l16 0",key:"svg-5"}],["path",{d:"M16 8l4 0",key:"svg-6"}],["path",{d:"M16 16l4 0",key:"svg-7"}]],lN=ot("outline","movie","Movie",$Y);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const VY=[["path",{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M13 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M9 17v-13h10v13",key:"svg-2"}],["path",{d:"M9 8h10",key:"svg-3"}]],HY=ot("outline","music","Music",VY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qY=[["path",{d:"M17 11l1.5 -1.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4h4l3 -3",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}],["path",{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M20.2 20.2l1.8 1.8",key:"svg-3"}]],GY=ot("outline","pencil-search","PencilSearch",qY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const WY=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l3.5 3.5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.679 -.653 1.473 -.829 2.214 -.526",key:"svg-3"}],["path",{d:"M19 22v-6",key:"svg-4"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-5"}]],XY=ot("outline","photo-up","PhotoUp",WY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const YY=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M13 21h-7a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v7",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0",key:"svg-3"}],["path",{d:"M22 22l-5 -5",key:"svg-4"}],["path",{d:"M17 22l5 -5",key:"svg-5"}]],KY=ot("outline","photo-x","PhotoX",YY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const QY=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],ZY=ot("outline","photo","Photo",QY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const JY=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M7 9l4 4",key:"svg-2"}],["path",{d:"M8 13h3v-3",key:"svg-3"}]],zk=ot("outline","picture-in-picture-on","PictureInPictureOn",JY);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const eK=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z",key:"svg-1"}]],tK=ot("outline","picture-in-picture","PictureInPicture",eK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nK=[["path",{d:"M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}]],rK=ot("outline","player-pause","PlayerPause",nK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const iK=[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]],Zh=ot("outline","player-play","PlayerPlay",iK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const sK=[["path",{d:"M20 5v14l-12 -7z",key:"svg-0"}],["path",{d:"M4 5l0 14",key:"svg-1"}]],aK=ot("outline","player-skip-back","PlayerSkipBack",sK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const oK=[["path",{d:"M4 5v14l12 -7z",key:"svg-0"}],["path",{d:"M20 5l0 14",key:"svg-1"}]],lK=ot("outline","player-skip-forward","PlayerSkipForward",oK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const uK=[["path",{d:"M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}]],cK=ot("outline","player-stop","PlayerStop",uK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const dK=[["path",{d:"M3 5v14l8 -7z",key:"svg-0"}],["path",{d:"M14 5v14l8 -7z",key:"svg-1"}]],fK=ot("outline","player-track-next","PlayerTrackNext",dK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hK=[["path",{d:"M21 5v14l-8 -7z",key:"svg-0"}],["path",{d:"M10 5v14l-8 -7z",key:"svg-1"}]],pK=ot("outline","player-track-prev","PlayerTrackPrev",hK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const mK=[["path",{d:"M19 8h-14",key:"svg-0"}],["path",{d:"M5 12h9",key:"svg-1"}],["path",{d:"M11 16h-6",key:"svg-2"}],["path",{d:"M15 16h6",key:"svg-3"}],["path",{d:"M18 13v6",key:"svg-4"}]],gK=ot("outline","playlist-add","PlaylistAdd",mK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const vK=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],yK=ot("outline","plus","Plus",vK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bK=[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]],xK=ot("outline","power","Power",bK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _K=[["path",{d:"M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4",key:"svg-0"}],["path",{d:"M12 19l0 .01",key:"svg-1"}]],SK=ot("outline","question-mark","QuestionMark",_K);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const TK=[["path",{d:"M7 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M18.569 14.557a3 3 0 1 0 -4.113 -4.149",key:"svg-1"}],["path",{d:"M7 15h8",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],wK=ot("outline","record-mail-off","RecordMailOff",TK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const CK=[["path",{d:"M7 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M17 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M7 15l10 0",key:"svg-2"}]],EK=ot("outline","record-mail","RecordMail",CK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const AK=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 9l0 3",key:"svg-2"}],["path",{d:"M12 15l.01 0",key:"svg-3"}]],DK=ot("outline","refresh-alert","RefreshAlert",AK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const kK=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],uN=ot("outline","refresh","Refresh",kK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const RK=[["path",{d:"M21 11v-3c0 -.53 -.211 -1.039 -.586 -1.414c-.375 -.375 -.884 -.586 -1.414 -.586h-6m0 0l3 3m-3 -3l3 -3",key:"svg-0"}],["path",{d:"M3 13.013v3c0 .53 .211 1.039 .586 1.414c.375 .375 .884 .586 1.414 .586h6m0 0l-3 -3m3 3l-3 3",key:"svg-1"}],["path",{d:"M16 16.502c0 .53 .211 1.039 .586 1.414c.375 .375 .884 .586 1.414 .586c.53 0 1.039 -.211 1.414 -.586c.375 -.375 .586 -.884 .586 -1.414c0 -.53 -.211 -1.039 -.586 -1.414c-.375 -.375 -.884 -.586 -1.414 -.586c-.53 0 -1.039 .211 -1.414 .586c-.375 .375 -.586 .884 -.586 1.414z",key:"svg-2"}],["path",{d:"M4 4.502c0 .53 .211 1.039 .586 1.414c.375 .375 .884 .586 1.414 .586c.53 0 1.039 -.211 1.414 -.586c.375 -.375 .586 -.884 .586 -1.414c0 -.53 -.211 -1.039 -.586 -1.414c-.375 -.375 -.884 -.586 -1.414 -.586c-.53 0 -1.039 .211 -1.414 .586c-.375 .375 -.586 .884 -.586 1.414z",key:"svg-3"}],["path",{d:"M21 21.499c0 -.53 -.211 -1.039 -.586 -1.414c-.375 -.375 -.884 -.586 -1.414 -.586h-2c-.53 0 -1.039 .211 -1.414 .586c-.375 .375 -.586 .884 -.586 1.414",key:"svg-4"}],["path",{d:"M9 9.499c0 -.53 -.211 -1.039 -.586 -1.414c-.375 -.375 -.884 -.586 -1.414 -.586h-2c-.53 0 -1.039 .211 -1.414 .586c-.375 .375 -.586 .884 -.586 1.414",key:"svg-5"}]],PK=ot("outline","replace-user","ReplaceUser",RK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const IK=[["path",{d:"M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M18 11v-4a2 2 0 0 0 -2 -2h-2",key:"svg-2"}],["path",{d:"M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-3"}],["path",{d:"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-4"}],["path",{d:"M8 11h4",key:"svg-5"}],["path",{d:"M8 15h3",key:"svg-6"}]],OK=ot("outline","report","Report",IK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const NK=[["path",{d:"M21 12v3a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1h9",key:"svg-0"}],["path",{d:"M7 20l10 0",key:"svg-1"}],["path",{d:"M9 16l0 4",key:"svg-2"}],["path",{d:"M15 16l0 4",key:"svg-3"}],["path",{d:"M17 4h4v4",key:"svg-4"}],["path",{d:"M16 9l5 -5",key:"svg-5"}]],MK=ot("outline","screen-share","ScreenShare",NK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jK=[["path",{d:"M12 12h-6a3 3 0 0 1 -3 -3v-2c0 -1.083 .574 -2.033 1.435 -2.56m3.565 -.44h10a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-2",key:"svg-0"}],["path",{d:"M16 12h2a3 3 0 0 1 3 3v2m-1.448 2.568a2.986 2.986 0 0 1 -1.552 .432h-12a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h6",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],cN=ot("outline","server-off","ServerOff",jK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const LK=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],BK=ot("outline","server","Server",LK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const FK=[["path",{d:"M9.451 5.437c.418 -.218 .75 -.609 .874 -1.12c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35c-.486 .118 -.894 .44 -1.123 .878m-.188 3.803c-.517 .523 -1.349 .734 -2.125 .262a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.472 -.774 -.262 -1.604 .259 -2.121",key:"svg-0"}],["path",{d:"M9.889 9.869a3 3 0 1 0 4.226 4.26m.592 -3.424a3.012 3.012 0 0 0 -1.419 -1.415",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],UK=ot("outline","settings-off","SettingsOff",FK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const zK=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],pg=ot("outline","settings","Settings",zK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $K=[["path",{d:"M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M15.861 15.896a3 3 0 0 0 4.265 4.22m.578 -3.417a3.012 3.012 0 0 0 -1.507 -1.45",key:"svg-2"}],["path",{d:"M8.7 10.7l1.336 -.688m2.624 -1.352l2.64 -1.36",key:"svg-3"}],["path",{d:"M8.7 13.3l6.6 3.4",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]],$k=ot("outline","share-off","ShareOff",$K);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const VK=[["path",{d:"M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M8.7 10.7l6.6 -3.4",key:"svg-3"}],["path",{d:"M8.7 13.3l6.6 3.4",key:"svg-4"}]],$w=ot("outline","share","Share",VK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const HK=[["path",{d:"M17.67 17.667a12 12 0 0 1 -5.67 3.333a12 12 0 0 1 -8.5 -15c.794 .036 1.583 -.006 2.357 -.124m3.128 -.926a11.997 11.997 0 0 0 3.015 -1.95a12 12 0 0 0 8.5 3a12 12 0 0 1 -1.116 9.376",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]],qK=ot("outline","shield-off","ShieldOff",HK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const GK=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M9 9l6 6m0 -6l-6 6",key:"svg-1"}]],WK=ot("outline","square-x","SquareX",GK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const XK=[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],YK=ot("outline","sun","Sun",XK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const KK=[["path",{d:"M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z",key:"svg-1"}]],QK=ot("outline","tag","Tag",KK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZK=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],JK=ot("outline","tool","Tool",ZK);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const eQ=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],tQ=ot("outline","user-plus","UserPlus",eQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nQ=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h3.5",key:"svg-1"}],["path",{d:"M19 22v.01",key:"svg-2"}],["path",{d:"M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-3"}]],rQ=ot("outline","user-question","UserQuestion",nQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const iQ=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],xp=ot("outline","user","User",iQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const sQ=[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],dN=ot("outline","users","Users",sQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const aQ=[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z",key:"svg-0"}],["path",{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]],oQ=ot("outline","video","Video",aQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lQ=[["path",{d:"M15 8a5 5 0 0 1 1.912 4.934m-1.377 2.602a5 5 0 0 1 -.535 .464",key:"svg-0"}],["path",{d:"M17.7 5a9 9 0 0 1 2.362 11.086m-1.676 2.299a9 9 0 0 1 -.686 .615",key:"svg-1"}],["path",{d:"M9.069 5.054l.431 -.554a.8 .8 0 0 1 1.5 .5v2m0 4v8a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l1.294 -1.664",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],uQ=ot("outline","volume-off","VolumeOff",lQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cQ=[["path",{d:"M15 8a5 5 0 0 1 0 8",key:"svg-0"}],["path",{d:"M17.7 5a9 9 0 0 1 0 14",key:"svg-1"}],["path",{d:"M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a.8 .8 0 0 1 1.5 .5v14a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5",key:"svg-2"}]],dQ=ot("outline","volume","Volume",cQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fQ=[["path",{d:"M19.5 7a9 9 0 0 0 -7.5 -4a8.991 8.991 0 0 0 -7.484 4",key:"svg-0"}],["path",{d:"M11.5 3a16.989 16.989 0 0 0 -1.826 4",key:"svg-1"}],["path",{d:"M12.5 3a16.989 16.989 0 0 1 1.828 4",key:"svg-2"}],["path",{d:"M19.5 17a9 9 0 0 1 -7.5 4a8.991 8.991 0 0 1 -7.484 -4",key:"svg-3"}],["path",{d:"M11.5 21a16.989 16.989 0 0 1 -1.826 -4",key:"svg-4"}],["path",{d:"M12.5 21a16.989 16.989 0 0 0 1.828 -4",key:"svg-5"}],["path",{d:"M2 10l1 4l1.5 -4l1.5 4l1 -4",key:"svg-6"}],["path",{d:"M17 10l1 4l1.5 -4l1.5 4l1 -4",key:"svg-7"}],["path",{d:"M9.5 10l1 4l1.5 -4l1.5 4l1 -4",key:"svg-8"}]],hQ=ot("outline","world-www","WorldWww",fQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pQ=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],fN=ot("outline","x","X",pQ);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const mQ=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}],["path",{d:"M7 10l2 2l4 -4",key:"svg-2"}]],gQ=ot("outline","zoom-check","ZoomCheck",mQ),dn={users_manage:1,groups_manage:2,settings_view:1024,settings_modify:2048,devices_control:4096,server_restart:1<<20,application_restart:1<<21,application_shutdown:1<<22,computer_shutdown:1<<23,web_player_browse:1<<25,web_player_download:1<<26,web_player_edit:1<<27,all:-1};function hN(t,e){return function(){return t.apply(e,arguments)}}const{toString:vQ}=Object.prototype,{getPrototypeOf:qA}=Object,{iterator:w2,toStringTag:pN}=Symbol,C2=(t=>e=>{const n=vQ.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Il=t=>(t=t.toLowerCase(),e=>C2(e)===t),E2=t=>e=>typeof e===t,{isArray:c0}=Array,Cy=E2("undefined");function Ky(t){return t!==null&&!Cy(t)&&t.constructor!==null&&!Cy(t.constructor)&&xa(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const mN=Il("ArrayBuffer");function yQ(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&mN(t.buffer),e}const bQ=E2("string"),xa=E2("function"),gN=E2("number"),Qy=t=>t!==null&&typeof t=="object",xQ=t=>t===!0||t===!1,E1=t=>{if(C2(t)!=="object")return!1;const e=qA(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(pN in t)&&!(w2 in t)},_Q=t=>{if(!Qy(t)||Ky(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},SQ=Il("Date"),TQ=Il("File"),wQ=Il("Blob"),CQ=Il("FileList"),EQ=t=>Qy(t)&&xa(t.pipe),AQ=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||xa(t.append)&&((e=C2(t))==="formdata"||e==="object"&&xa(t.toString)&&t.toString()==="[object FormData]"))},DQ=Il("URLSearchParams"),[kQ,RQ,PQ,IQ]=["ReadableStream","Request","Response","Headers"].map(Il),OQ=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zy(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),c0(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(Ky(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let u;for(r=0;r<o;r++)u=s[r],e.call(null,t[u],u,t)}}function vN(t,e){if(Ky(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Wh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yN=t=>!Cy(t)&&t!==Wh;function Vw(){const{caseless:t}=yN(this)&&this||{},e={},n=(r,i)=>{const s=t&&vN(e,i)||i;E1(e[s])&&E1(r)?e[s]=Vw(e[s],r):E1(r)?e[s]=Vw({},r):c0(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Zy(arguments[r],n);return e}const NQ=(t,e,n,{allOwnKeys:r}={})=>(Zy(e,(i,s)=>{n&&xa(i)?t[s]=hN(i,n):t[s]=i},{allOwnKeys:r}),t),MQ=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jQ=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},LQ=(t,e,n,r)=>{let i,s,o;const u={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!u[o]&&(e[o]=t[o],u[o]=!0);t=n!==!1&&qA(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},BQ=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},FQ=t=>{if(!t)return null;if(c0(t))return t;let e=t.length;if(!gN(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},UQ=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qA(Uint8Array)),zQ=(t,e)=>{const r=(t&&t[w2]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},$Q=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},VQ=Il("HTMLFormElement"),HQ=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Vk=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),qQ=Il("RegExp"),bN=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Zy(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},GQ=t=>{bN(t,(e,n)=>{if(xa(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(xa(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},WQ=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return c0(t)?r(t):r(String(t).split(e)),n},XQ=()=>{},YQ=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function KQ(t){return!!(t&&xa(t.append)&&t[pN]==="FormData"&&t[w2])}const QQ=t=>{const e=new Array(10),n=(r,i)=>{if(Qy(r)){if(e.indexOf(r)>=0)return;if(Ky(r))return r;if(!("toJSON"in r)){e[i]=r;const s=c0(r)?[]:{};return Zy(r,(o,u)=>{const d=n(o,i+1);!Cy(d)&&(s[u]=d)}),e[i]=void 0,s}}return r};return n(t,0)},ZQ=Il("AsyncFunction"),JQ=t=>t&&(Qy(t)||xa(t))&&xa(t.then)&&xa(t.catch),xN=((t,e)=>t?setImmediate:e?((n,r)=>(Wh.addEventListener("message",({source:i,data:s})=>{i===Wh&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Wh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xa(Wh.postMessage)),eZ=typeof queueMicrotask<"u"?queueMicrotask.bind(Wh):typeof process<"u"&&process.nextTick||xN,tZ=t=>t!=null&&xa(t[w2]),Ve={isArray:c0,isArrayBuffer:mN,isBuffer:Ky,isFormData:AQ,isArrayBufferView:yQ,isString:bQ,isNumber:gN,isBoolean:xQ,isObject:Qy,isPlainObject:E1,isEmptyObject:_Q,isReadableStream:kQ,isRequest:RQ,isResponse:PQ,isHeaders:IQ,isUndefined:Cy,isDate:SQ,isFile:TQ,isBlob:wQ,isRegExp:qQ,isFunction:xa,isStream:EQ,isURLSearchParams:DQ,isTypedArray:UQ,isFileList:CQ,forEach:Zy,merge:Vw,extend:NQ,trim:OQ,stripBOM:MQ,inherits:jQ,toFlatObject:LQ,kindOf:C2,kindOfTest:Il,endsWith:BQ,toArray:FQ,forEachEntry:zQ,matchAll:$Q,isHTMLForm:VQ,hasOwnProperty:Vk,hasOwnProp:Vk,reduceDescriptors:bN,freezeMethods:GQ,toObjectSet:WQ,toCamelCase:HQ,noop:XQ,toFiniteNumber:YQ,findKey:vN,global:Wh,isContextDefined:yN,isSpecCompliantForm:KQ,toJSONObject:QQ,isAsyncFn:ZQ,isThenable:JQ,setImmediate:xN,asap:eZ,isIterable:tZ};function gn(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Ve.inherits(gn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ve.toJSONObject(this.config),code:this.code,status:this.status}}});const _N=gn.prototype,SN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{SN[t]={value:t}});Object.defineProperties(gn,SN);Object.defineProperty(_N,"isAxiosError",{value:!0});gn.from=(t,e,n,r,i,s)=>{const o=Object.create(_N);return Ve.toFlatObject(t,o,function(d){return d!==Error.prototype},u=>u!=="isAxiosError"),gn.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const nZ=null;function Hw(t){return Ve.isPlainObject(t)||Ve.isArray(t)}function TN(t){return Ve.endsWith(t,"[]")?t.slice(0,-2):t}function Hk(t,e,n){return t?t.concat(e).map(function(i,s){return i=TN(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function rZ(t){return Ve.isArray(t)&&!t.some(Hw)}const iZ=Ve.toFlatObject(Ve,{},null,function(e){return/^is[A-Z]/.test(e)});function A2(t,e,n){if(!Ve.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ve.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,D){return!Ve.isUndefined(D[S])});const r=n.metaTokens,i=n.visitor||m,s=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&Ve.isSpecCompliantForm(e);if(!Ve.isFunction(i))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(Ve.isDate(w))return w.toISOString();if(Ve.isBoolean(w))return w.toString();if(!d&&Ve.isBlob(w))throw new gn("Blob is not supported. Use a Buffer instead.");return Ve.isArrayBuffer(w)||Ve.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,S,D){let k=w;if(w&&!D&&typeof w=="object"){if(Ve.endsWith(S,"{}"))S=r?S:S.slice(0,-2),w=JSON.stringify(w);else if(Ve.isArray(w)&&rZ(w)||(Ve.isFileList(w)||Ve.endsWith(S,"[]"))&&(k=Ve.toArray(w)))return S=TN(S),k.forEach(function(N,F){!(Ve.isUndefined(N)||N===null)&&e.append(o===!0?Hk([S],F,s):o===null?S:S+"[]",f(N))}),!1}return Hw(w)?!0:(e.append(Hk(D,S,s),f(w)),!1)}const y=[],x=Object.assign(iZ,{defaultVisitor:m,convertValue:f,isVisitable:Hw});function b(w,S){if(!Ve.isUndefined(w)){if(y.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));y.push(w),Ve.forEach(w,function(k,O){(!(Ve.isUndefined(k)||k===null)&&i.call(e,k,Ve.isString(O)?O.trim():O,S,x))===!0&&b(k,S?S.concat(O):[O])}),y.pop()}}if(!Ve.isObject(t))throw new TypeError("data must be an object");return b(t),e}function qk(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function GA(t,e){this._pairs=[],t&&A2(t,this,e)}const wN=GA.prototype;wN.append=function(e,n){this._pairs.push([e,n])};wN.toString=function(e){const n=e?function(r){return e.call(this,r,qk)}:qk;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function sZ(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function CN(t,e,n){if(!e)return t;const r=n&&n.encode||sZ;Ve.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=Ve.isURLSearchParams(e)?e.toString():new GA(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Gk{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ve.forEach(this.handlers,function(r){r!==null&&e(r)})}}const EN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},aZ=typeof URLSearchParams<"u"?URLSearchParams:GA,oZ=typeof FormData<"u"?FormData:null,lZ=typeof Blob<"u"?Blob:null,uZ={isBrowser:!0,classes:{URLSearchParams:aZ,FormData:oZ,Blob:lZ},protocols:["http","https","file","blob","url","data"]},WA=typeof window<"u"&&typeof document<"u",qw=typeof navigator=="object"&&navigator||void 0,cZ=WA&&(!qw||["ReactNative","NativeScript","NS"].indexOf(qw.product)<0),dZ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fZ=WA&&window.location.href||"http://localhost",hZ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:WA,hasStandardBrowserEnv:cZ,hasStandardBrowserWebWorkerEnv:dZ,navigator:qw,origin:fZ},Symbol.toStringTag,{value:"Module"})),Ds={...hZ,...uZ};function pZ(t,e){return A2(t,new Ds.classes.URLSearchParams,{visitor:function(n,r,i,s){return Ds.isNode&&Ve.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function mZ(t){return Ve.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gZ(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function AN(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),d=s>=n.length;return o=!o&&Ve.isArray(i)?i.length:o,d?(Ve.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!u):((!i[o]||!Ve.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&Ve.isArray(i[o])&&(i[o]=gZ(i[o])),!u)}if(Ve.isFormData(t)&&Ve.isFunction(t.entries)){const n={};return Ve.forEachEntry(t,(r,i)=>{e(mZ(r),i,n,0)}),n}return null}function vZ(t,e,n){if(Ve.isString(t))try{return(e||JSON.parse)(t),Ve.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Jy={transitional:EN,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=Ve.isObject(e);if(s&&Ve.isHTMLForm(e)&&(e=new FormData(e)),Ve.isFormData(e))return i?JSON.stringify(AN(e)):e;if(Ve.isArrayBuffer(e)||Ve.isBuffer(e)||Ve.isStream(e)||Ve.isFile(e)||Ve.isBlob(e)||Ve.isReadableStream(e))return e;if(Ve.isArrayBufferView(e))return e.buffer;if(Ve.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pZ(e,this.formSerializer).toString();if((u=Ve.isFileList(e))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return A2(u?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),vZ(e)):e}],transformResponse:[function(e){const n=this.transitional||Jy.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Ve.isResponse(e)||Ve.isReadableStream(e))return e;if(e&&Ve.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(u){if(o)throw u.name==="SyntaxError"?gn.from(u,gn.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ds.classes.FormData,Blob:Ds.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ve.forEach(["delete","get","head","post","put","patch"],t=>{Jy.headers[t]={}});const yZ=Ve.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bZ=t=>{const e={};let n,r,i;return t&&t.split(`
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&yZ[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Wk=Symbol("internals");function qv(t){return t&&String(t).trim().toLowerCase()}function A1(t){return t===!1||t==null?t:Ve.isArray(t)?t.map(A1):String(t)}function xZ(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const _Z=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ST(t,e,n,r,i){if(Ve.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Ve.isString(e)){if(Ve.isString(r))return e.indexOf(r)!==-1;if(Ve.isRegExp(r))return r.test(e)}}function SZ(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function TZ(t,e){const n=Ve.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let _a=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(u,d,f){const m=qv(d);if(!m)throw new Error("header name must be a non-empty string");const y=Ve.findKey(i,m);(!y||i[y]===void 0||f===!0||f===void 0&&i[y]!==!1)&&(i[y||d]=A1(u))}const o=(u,d)=>Ve.forEach(u,(f,m)=>s(f,m,d));if(Ve.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(Ve.isString(e)&&(e=e.trim())&&!_Z(e))o(bZ(e),n);else if(Ve.isObject(e)&&Ve.isIterable(e)){let u={},d,f;for(const m of e){if(!Ve.isArray(m))throw TypeError("Object iterator must return a key-value pair");u[f=m[0]]=(d=u[f])?Ve.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}o(u,n)}else e!=null&&s(n,e,r);return this}get(e,n){if(e=qv(e),e){const r=Ve.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return xZ(i);if(Ve.isFunction(n))return n.call(this,i,r);if(Ve.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=qv(e),e){const r=Ve.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ST(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=qv(o),o){const u=Ve.findKey(r,o);u&&(!n||ST(r,r[u],u,n))&&(delete r[u],i=!0)}}return Ve.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||ST(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return Ve.forEach(this,(i,s)=>{const o=Ve.findKey(r,s);if(o){n[o]=A1(i),delete n[s];return}const u=e?SZ(s):String(s).trim();u!==s&&delete n[s],n[u]=A1(i),r[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ve.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Ve.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Wk]=this[Wk]={accessors:{}}).accessors,i=this.prototype;function s(o){const u=qv(o);r[u]||(TZ(i,o),r[u]=!0)}return Ve.isArray(e)?e.forEach(s):s(e),this}};_a.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(_a.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Ve.freezeMethods(_a);function TT(t,e){const n=this||Jy,r=e||n,i=_a.from(r.headers);let s=r.data;return Ve.forEach(t,function(u){s=u.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function DN(t){return!!(t&&t.__CANCEL__)}function d0(t,e,n){gn.call(this,t??"canceled",gn.ERR_CANCELED,e,n),this.name="CanceledError"}Ve.inherits(d0,gn,{__CANCEL__:!0});function kN(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new gn("Request failed with status code "+n.status,[gn.ERR_BAD_REQUEST,gn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wZ(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function CZ(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(d){const f=Date.now(),m=r[s];o||(o=f),n[i]=d,r[i]=f;let y=s,x=0;for(;y!==i;)x+=n[y++],y=y%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),f-o<e)return;const b=m&&f-m;return b?Math.round(x*1e3/b):void 0}}function EZ(t,e){let n=0,r=1e3/e,i,s;const o=(f,m=Date.now())=>{n=m,i=null,s&&(clearTimeout(s),s=null),t(...f)};return[(...f)=>{const m=Date.now(),y=m-n;y>=r?o(f,m):(i=f,s||(s=setTimeout(()=>{s=null,o(i)},r-y)))},()=>i&&o(i)]}const K1=(t,e,n=3)=>{let r=0;const i=CZ(50,250);return EZ(s=>{const o=s.loaded,u=s.lengthComputable?s.total:void 0,d=o-r,f=i(d),m=o<=u;r=o;const y={loaded:o,total:u,progress:u?o/u:void 0,bytes:d,rate:f||void 0,estimated:f&&u&&m?(u-o)/f:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(y)},n)},Xk=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yk=t=>(...e)=>Ve.asap(()=>t(...e)),AZ=Ds.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Ds.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Ds.origin),Ds.navigator&&/(msie|trident)/i.test(Ds.navigator.userAgent)):()=>!0,DZ=Ds.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];Ve.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Ve.isString(r)&&o.push("path="+r),Ve.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kZ(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function RZ(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function RN(t,e,n){let r=!kZ(e);return t&&(r||n==!1)?RZ(t,e):e}const Kk=t=>t instanceof _a?{...t}:t;function up(t,e){e=e||{};const n={};function r(f,m,y,x){return Ve.isPlainObject(f)&&Ve.isPlainObject(m)?Ve.merge.call({caseless:x},f,m):Ve.isPlainObject(m)?Ve.merge({},m):Ve.isArray(m)?m.slice():m}function i(f,m,y,x){if(Ve.isUndefined(m)){if(!Ve.isUndefined(f))return r(void 0,f,y,x)}else return r(f,m,y,x)}function s(f,m){if(!Ve.isUndefined(m))return r(void 0,m)}function o(f,m){if(Ve.isUndefined(m)){if(!Ve.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function u(f,m,y){if(y in e)return r(f,m);if(y in t)return r(void 0,f)}const d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(f,m,y)=>i(Kk(f),Kk(m),y,!0)};return Ve.forEach(Object.keys({...t,...e}),function(m){const y=d[m]||i,x=y(t[m],e[m],m);Ve.isUndefined(x)&&y!==u||(n[m]=x)}),n}const PN=t=>{const e=up({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:u}=e;e.headers=o=_a.from(o),e.url=CN(RN(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let d;if(Ve.isFormData(n)){if(Ds.hasStandardBrowserEnv||Ds.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[f,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([f||"multipart/form-data",...m].join("; "))}}if(Ds.hasStandardBrowserEnv&&(r&&Ve.isFunction(r)&&(r=r(e)),r||r!==!1&&AZ(e.url))){const f=i&&s&&DZ.read(s);f&&o.set(i,f)}return e},PZ=typeof XMLHttpRequest<"u",IZ=PZ&&function(t){return new Promise(function(n,r){const i=PN(t);let s=i.data;const o=_a.from(i.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:f}=i,m,y,x,b,w;function S(){b&&b(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let D=new XMLHttpRequest;D.open(i.method.toUpperCase(),i.url,!0),D.timeout=i.timeout;function k(){if(!D)return;const N=_a.from("getAllResponseHeaders"in D&&D.getAllResponseHeaders()),M={data:!u||u==="text"||u==="json"?D.responseText:D.response,status:D.status,statusText:D.statusText,headers:N,config:t,request:D};kN(function($){n($),S()},function($){r($),S()},M),D=null}"onloadend"in D?D.onloadend=k:D.onreadystatechange=function(){!D||D.readyState!==4||D.status===0&&!(D.responseURL&&D.responseURL.indexOf("file:")===0)||setTimeout(k)},D.onabort=function(){D&&(r(new gn("Request aborted",gn.ECONNABORTED,t,D)),D=null)},D.onerror=function(){r(new gn("Network Error",gn.ERR_NETWORK,t,D)),D=null},D.ontimeout=function(){let F=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const M=i.transitional||EN;i.timeoutErrorMessage&&(F=i.timeoutErrorMessage),r(new gn(F,M.clarifyTimeoutError?gn.ETIMEDOUT:gn.ECONNABORTED,t,D)),D=null},s===void 0&&o.setContentType(null),"setRequestHeader"in D&&Ve.forEach(o.toJSON(),function(F,M){D.setRequestHeader(M,F)}),Ve.isUndefined(i.withCredentials)||(D.withCredentials=!!i.withCredentials),u&&u!=="json"&&(D.responseType=i.responseType),f&&([x,w]=K1(f,!0),D.addEventListener("progress",x)),d&&D.upload&&([y,b]=K1(d),D.upload.addEventListener("progress",y),D.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(m=N=>{D&&(r(!N||N.type?new d0(null,t,D):N),D.abort(),D=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const O=wZ(i.url);if(O&&Ds.protocols.indexOf(O)===-1){r(new gn("Unsupported protocol "+O+":",gn.ERR_BAD_REQUEST,t));return}D.send(s||null)})},OZ=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(f){if(!i){i=!0,u();const m=f instanceof Error?f:this.reason;r.abort(m instanceof gn?m:new d0(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,s(new gn(`timeout ${e} of ms exceeded`,gn.ETIMEDOUT))},e);const u=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(s):f.removeEventListener("abort",s)}),t=null)};t.forEach(f=>f.addEventListener("abort",s));const{signal:d}=r;return d.unsubscribe=()=>Ve.asap(u),d}},NZ=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},MZ=async function*(t,e){for await(const n of jZ(t))yield*NZ(n,e)},jZ=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Qk=(t,e,n,r)=>{const i=MZ(t,e);let s=0,o,u=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:m}=await i.next();if(f){u(),d.close();return}let y=m.byteLength;if(n){let x=s+=y;n(x)}d.enqueue(new Uint8Array(m))}catch(f){throw u(f),f}},cancel(d){return u(d),i.return()}},{highWaterMark:2})},D2=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",IN=D2&&typeof ReadableStream=="function",LZ=D2&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ON=(t,...e)=>{try{return!!t(...e)}catch{return!1}},BZ=IN&&ON(()=>{let t=!1;const e=new Request(Ds.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Zk=64*1024,Gw=IN&&ON(()=>Ve.isReadableStream(new Response("").body)),Q1={stream:Gw&&(t=>t.body)};D2&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Q1[e]&&(Q1[e]=Ve.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new gn(`Response type '${e}' is not supported`,gn.ERR_NOT_SUPPORT,r)})})})(new Response);const FZ=async t=>{if(t==null)return 0;if(Ve.isBlob(t))return t.size;if(Ve.isSpecCompliantForm(t))return(await new Request(Ds.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ve.isArrayBufferView(t)||Ve.isArrayBuffer(t))return t.byteLength;if(Ve.isURLSearchParams(t)&&(t=t+""),Ve.isString(t))return(await LZ(t)).byteLength},UZ=async(t,e)=>{const n=Ve.toFiniteNumber(t.getContentLength());return n??FZ(e)},zZ=D2&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:u,onUploadProgress:d,responseType:f,headers:m,withCredentials:y="same-origin",fetchOptions:x}=PN(t);f=f?(f+"").toLowerCase():"text";let b=OZ([i,s&&s.toAbortSignal()],o),w;const S=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let D;try{if(d&&BZ&&n!=="get"&&n!=="head"&&(D=await UZ(m,r))!==0){let M=new Request(e,{method:"POST",body:r,duplex:"half"}),V;if(Ve.isFormData(r)&&(V=M.headers.get("content-type"))&&m.setContentType(V),M.body){const[$,q]=Xk(D,K1(Yk(d)));r=Qk(M.body,Zk,$,q)}}Ve.isString(y)||(y=y?"include":"omit");const k="credentials"in Request.prototype;w=new Request(e,{...x,signal:b,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:r,duplex:"half",credentials:k?y:void 0});let O=await fetch(w,x);const N=Gw&&(f==="stream"||f==="response");if(Gw&&(u||N&&S)){const M={};["status","statusText","headers"].forEach(B=>{M[B]=O[B]});const V=Ve.toFiniteNumber(O.headers.get("content-length")),[$,q]=u&&Xk(V,K1(Yk(u),!0))||[];O=new Response(Qk(O.body,Zk,$,()=>{q&&q(),S&&S()}),M)}f=f||"text";let F=await Q1[Ve.findKey(Q1,f)||"text"](O,t);return!N&&S&&S(),await new Promise((M,V)=>{kN(M,V,{data:F,headers:_a.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:w})})}catch(k){throw S&&S(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new gn("Network Error",gn.ERR_NETWORK,t,w),{cause:k.cause||k}):gn.from(k,k&&k.code,t,w)}}),Ww={http:nZ,xhr:IZ,fetch:zZ};Ve.forEach(Ww,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jk=t=>`- ${t}`,$Z=t=>Ve.isFunction(t)||t===null||t===!1,NN={getAdapter:t=>{t=Ve.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!$Z(n)&&(r=Ww[(o=String(n)).toLowerCase()],r===void 0))throw new gn(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
`+s.map(Jk).join(`
`):" "+Jk(s[0]):"as no adapter specified";throw new gn("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Ww};function wT(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new d0(null,t)}function e4(t){return wT(t),t.headers=_a.from(t.headers),t.data=TT.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),NN.getAdapter(t.adapter||Jy.adapter)(t).then(function(r){return wT(t),r.data=TT.call(t,t.transformResponse,r),r.headers=_a.from(r.headers),r},function(r){return DN(r)||(wT(t),r&&r.response&&(r.response.data=TT.call(t,t.transformResponse,r.response),r.response.headers=_a.from(r.response.headers))),Promise.reject(r)})}const MN="1.11.0",k2={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{k2[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const t4={};k2.transitional=function(e,n,r){function i(s,o){return"[Axios v"+MN+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,u)=>{if(e===!1)throw new gn(i(o," has been removed"+(n?" in "+n:"")),gn.ERR_DEPRECATED);return n&&!t4[o]&&(t4[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,u):!0}};k2.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function VZ(t,e,n){if(typeof t!="object")throw new gn("options must be an object",gn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const u=t[s],d=u===void 0||o(u,s,t);if(d!==!0)throw new gn("option "+s+" must be "+d,gn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new gn("Unknown option "+s,gn.ERR_BAD_OPTION)}}const D1={assertOptions:VZ,validators:k2},Tu=D1.validators;let Jh=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Gk,response:new Gk}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=up(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&D1.assertOptions(r,{silentJSONParsing:Tu.transitional(Tu.boolean),forcedJSONParsing:Tu.transitional(Tu.boolean),clarifyTimeoutError:Tu.transitional(Tu.boolean)},!1),i!=null&&(Ve.isFunction(i)?n.paramsSerializer={serialize:i}:D1.assertOptions(i,{encode:Tu.function,serialize:Tu.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),D1.assertOptions(n,{baseUrl:Tu.spelling("baseURL"),withXsrfToken:Tu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&Ve.merge(s.common,s[n.method]);s&&Ve.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),n.headers=_a.concat(o,s);const u=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(d=d&&S.synchronous,u.unshift(S.fulfilled,S.rejected))});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let m,y=0,x;if(!d){const w=[e4.bind(this),void 0];for(w.unshift(...u),w.push(...f),x=w.length,m=Promise.resolve(n);y<x;)m=m.then(w[y++],w[y++]);return m}x=u.length;let b=n;for(y=0;y<x;){const w=u[y++],S=u[y++];try{b=w(b)}catch(D){S.call(this,D);break}}try{m=e4.call(this,b)}catch(w){return Promise.reject(w)}for(y=0,x=f.length;y<x;)m=m.then(f[y++],f[y++]);return m}getUri(e){e=up(this.defaults,e);const n=RN(e.baseURL,e.url,e.allowAbsoluteUrls);return CN(n,e.params,e.paramsSerializer)}};Ve.forEach(["delete","get","head","options"],function(e){Jh.prototype[e]=function(n,r){return this.request(up(r||{},{method:e,url:n,data:(r||{}).data}))}});Ve.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,u){return this.request(up(u||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Jh.prototype[e]=n(),Jh.prototype[e+"Form"]=n(!0)});let HZ=class jN{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(u=>{r.subscribe(u),s=u}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,u){r.reason||(r.reason=new d0(s,o,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new jN(function(i){e=i}),cancel:e}}};function qZ(t){return function(n){return t.apply(null,n)}}function GZ(t){return Ve.isObject(t)&&t.isAxiosError===!0}const Xw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xw).forEach(([t,e])=>{Xw[e]=t});function LN(t){const e=new Jh(t),n=hN(Jh.prototype.request,e);return Ve.extend(n,Jh.prototype,e,{allOwnKeys:!0}),Ve.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return LN(up(t,i))},n}const Rt=LN(Jy);Rt.Axios=Jh;Rt.CanceledError=d0;Rt.CancelToken=HZ;Rt.isCancel=DN;Rt.VERSION=MN;Rt.toFormData=A2;Rt.AxiosError=gn;Rt.Cancel=Rt.CanceledError;Rt.all=function(e){return Promise.all(e)};Rt.spread=qZ;Rt.isAxiosError=GZ;Rt.mergeConfig=up;Rt.AxiosHeaders=_a;Rt.formToJSON=t=>AN(Ve.isHTMLForm(t)?new FormData(t):t);Rt.getAdapter=NN.getAdapter;Rt.HttpStatusCode=Xw;Rt.default=Rt;const{Axios:wle,AxiosError:Cle,CanceledError:Ele,isCancel:Ale,CancelToken:Dle,VERSION:kle,all:Rle,Cancel:Ple,isAxiosError:Ile,spread:Ole,toFormData:Nle,AxiosHeaders:Mle,HttpStatusCode:jle,formToJSON:Lle,getAdapter:Ble,mergeConfig:Fle}=Rt;function Z1(){return Z1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Z1.apply(this,arguments)}function WZ(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var XZ=["cdnSuffix","cdnUrl","countryCode","style","svg"],YZ="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",KZ="svg",QZ=127397,XA=function(e){var n=e.cdnSuffix,r=n===void 0?KZ:n,i=e.cdnUrl,s=i===void 0?YZ:i,o=e.countryCode,u=e.style,d=e.svg,f=d===void 0?!1:d,m=WZ(e,XZ);if(typeof o!="string")return null;if(f){var y=""+s+o.toLowerCase()+"."+r;return A.createElement("img",Object.assign({},m,{src:y,style:Z1({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},u)}))}var x=o.toUpperCase().replace(/./g,function(b){return String.fromCodePoint(b.charCodeAt(0)+QZ)});return A.createElement("span",Object.assign({role:"img"},m,{style:Z1({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},u)}),x)};const ZZ=({decorate:t,memory:e,i18n:n})=>{const r=()=>e.max.toString(),i=()=>Math.max(0,e.used-e.dbcache-e.buffer),s=()=>Math.ceil(i()/e.max*100),o=()=>s().toString()+" %",u=()=>Math.floor(e.dbcache/e.max*100),d=()=>u().toString()+" %",f=()=>Math.floor(e.buffer/e.max*100),m=c.jsxs(_o.Root,{size:"xl",mt:"4px",children:[c.jsx(Ft,{label:"UMS: "+i()+" "+n.get("Mb"),children:c.jsx(_o.Section,{value:s(),color:"pink",children:c.jsx(_o.Label,{children:s()>10?o():""})})}),c.jsx(Ft,{label:n.get("DatabaseCache")+" "+e.dbcache+" "+n.get("Mb"),children:c.jsx(_o.Section,{value:u(),color:"grape",children:c.jsx(_o.Label,{children:u()>10?d():""})})}),c.jsx(Ft,{label:e.buffer+" "+n.get("Mb"),children:c.jsx(_o.Section,{value:f(),color:"orange"})})]});return t?c.jsxs(ut,{justify:"center",gap:"xs",grow:!0,children:[c.jsx(et,{children:n.get("MemoryUsage")}),m,c.jsx(et,{children:r()+" "+n.get("Mb")})]}):m};function In(t){return c.jsx("span",{dangerouslySetInnerHTML:{__html:t}})}const mn={width:350,color:"blue",multiline:!0,withArrow:!0},JZ="https://github.com/UniversalMediaServer/UniversalMediaServer/issues/new",eJ="/v1/api/about/",BN="/v1/api/actions/",Yw="/v1/api/account/",$h="/v1/api/auth/",n4="/v1/api/i18n/",CT="/v1/api/logs/",os="/v1/api/player/",ep="/v1/api/renderers/",Kw="/v1/api/settings/",J1="/v1/api/shared/",tJ="/v1/api/ws",YA=(t,e,n)=>{n==e?localStorage.removeItem(t):isNaN(n)||localStorage.setItem(t,n.toString())},KA=(t,e)=>{if(!localStorage.getItem(t))return e;const n=Number(localStorage.getItem(t));return isNaN(n)?e:n},FN="infoDuration",UN=4e3,nJ=t=>{YA(FN,UN,t)},R2=()=>KA(FN,UN),zN="warningDuration",$N=8e3,rJ=t=>{YA(zN,$N,t)},VN=()=>KA(zN,$N),HN="errorDuration",qN=0,iJ=t=>{YA(HN,qN,t)},QA=()=>KA(HN,qN),_p=(t,e)=>e?c.jsxs(tn,{gap:"xs",children:[c.jsx(Ee,{children:t}),c.jsx(Ee,{children:e})]}):t,ZA=({id:t,message:e,message2:n,title:r})=>{Ya.show({id:t,loading:!0,title:r,message:_p(e,n),autoClose:!1,withCloseButton:!1})},e_=({id:t,message:e,message2:n,title:r})=>{const i=R2();Ya.show({id:t,title:r,message:_p(e,n),autoClose:i===0?!1:i,withCloseButton:i===0||i>5e3})},JA=({id:t,message:e,message2:n,title:r,onClick:i})=>{const s=VN();Ya.show({id:t,color:"orange",title:r,message:_p(e,n),autoClose:s===0?!1:s,onClick:i,withCloseButton:s===0||s>5e3})},Wn=({id:t,message:e,message2:n,title:r,icon:i,onClick:s})=>{const o=QA();Ya.show({id:t,color:"red",title:r,message:_p(e,n),icon:i,autoClose:o===0?!1:o,withCloseButton:o===0||o>5e3,onClick:s})},eD=({id:t,message:e,message2:n,title:r,icon:i})=>{const s=R2();Ya.update({id:t,loading:!1,color:"teal",title:r,message:_p(e,n),icon:i,autoClose:s===0?!1:s,withCloseButton:s===0||s>5e3})},sJ=({id:t,message:e,message2:n,title:r,icon:i})=>{const s=R2();Ya.update({id:t,loading:!1,color:void 0,title:r,message:_p(e,n),icon:i,autoClose:s===0?!1:s,withCloseButton:s===0||s>5e3})},tD=({id:t,message:e,message2:n,title:r,icon:i,onClick:s})=>{const o=QA();Ya.update({id:t,loading:!1,color:"red",title:r,message:_p(e,n),icon:i,autoClose:o===0?!1:o,withCloseButton:o===0||o>5e3,onClick:s})},t_=({i18n:t,session:e})=>{const[n,r]=A.useState(),[i,s]=A.useState(),o=e.havePermission(dn.settings_view|dn.settings_modify),u=t.languages.map(f=>c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:c.jsxs(ut,{style:{cursor:"default"},children:[c.jsx(XA,{countryCode:f.country,style:{fontSize:"1.5em"}}),c.jsx(et,{children:f.name})]})}),f.id==="en-US"?c.jsx(Bt.Td,{children:c.jsxs(ut,{style:{cursor:"default"},justify:"flex-end",children:[c.jsx(et,{children:t.get("Source")}),c.jsx(br,{disabled:!0,children:c.jsx($X,{})})]})}):c.jsx(Bt.Td,{children:c.jsxs(ut,{style:{cursor:"default"},justify:"flex-end",children:[c.jsx(et,{children:f.coverage===100?t.get("Completed"):t.get("InProgress")+" ("+f.coverage+"%)"}),c.jsx(br,{variant:"default",onClick:()=>{window.open("https://crowdin.com/project/universalmediaserver/"+f.id,"_blank")},children:c.jsx($A,{})})]})})]},f.id)),d=n?.links.map(f=>c.jsx(Bt.Tr,{children:c.jsx(Bt.Td,{children:c.jsx(et,{ta:"center",style:{cursor:"pointer"},onClick:()=>{window.open(f.value,"_blank")},children:f.key})})},f.key));return A.useEffect(()=>{o&&!e.player?e.subscribeTo("About"):e.unsubscribe(),e.stopPlayerSse(),e.setDocumentI18nTitle("About"),e.setNavbarManage(t_.name)},[]),A.useEffect(()=>{Rt.get(eJ).then(function(f){r(f.data)}).catch(function(f){!f.response&&f.request?t.showServerUnreachable():Wn({id:"about-data-loading",title:t.get("Error"),message:t.get("DataNotReceived")})})},[t]),A.useEffect(()=>{s(e.memory)},[e.memory]),c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsxs(Kt,{defaultValue:"application",children:[c.jsxs(Kt.List,{children:[c.jsx(Kt.Tab,{value:"application",children:t.get("Application")}),c.jsx(Kt.Tab,{value:"translations",children:t.get("Translations")}),c.jsx(Kt.Tab,{value:"relatedLinks",children:t.get("RelatedLinks_title")})]}),c.jsx(Kt.Panel,{value:"application",pt:"xs",children:c.jsxs(Bt,{striped:!0,children:[c.jsx(Bt.Thead,{children:c.jsx(Bt.Tr,{children:c.jsx(Bt.Th,{colSpan:2,children:c.jsx(et,{c:"blue",size:"lg",ta:"center",children:n?.app})})})}),c.jsxs(Bt.Tbody,{children:[c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("Version")}),c.jsx(Bt.Td,{children:n?.version})]}),c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("GitCommitHash")}),c.jsx(Bt.Td,{children:c.jsx(et,{style:{cursor:"pointer"},onClick:()=>{window.open(n?.commitUrl,"_blank")},children:n?.commit})})]}),c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("Website")}),c.jsx(Bt.Td,{children:c.jsx(et,{style:{cursor:"pointer"},onClick:()=>{window.open(n?.website,"_blank")},children:n?.website})})]}),c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("Licence")}),c.jsx(Bt.Td,{children:c.jsx(et,{style:{cursor:"pointer"},onClick:()=>{window.open(n?.licenceUrl,"_blank")},children:n?.licence})})]})]}),o&&!e.player&&c.jsxs(c.Fragment,{children:[c.jsx(Bt.Thead,{children:c.jsx(Bt.Tr,{children:c.jsx(Bt.Th,{colSpan:2,children:c.jsx(et,{c:"blue",size:"lg",ta:"center",children:t.get("System")})})})}),c.jsxs(Bt.Tbody,{children:[c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("OperatingSystem")}),c.jsx(Bt.Td,{children:n?.operatingSystem})]}),c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("SystemMemorySize")}),c.jsx(Bt.Td,{children:n?.systemMemorySize})]}),c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("JVMMemoryMax")}),c.jsx(Bt.Td,{children:n?.jvmMemoryMax})]}),i&&c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:t.get("JVMMemoryUsage")}),c.jsx(Bt.Td,{children:c.jsx(ZZ,{decorate:!1,memory:i,i18n:t})})]})]})]})]})}),c.jsx(Kt.Panel,{value:"translations",children:c.jsx(Bt,{highlightOnHover:!0,children:c.jsx(Bt.Tbody,{children:u})})}),c.jsx(Kt.Panel,{value:"relatedLinks",children:c.jsx(Bt,{children:c.jsx(Bt.Tbody,{children:d})})})]})})};function aJ({i18n:t,session:e,accounts:n}){const[r,i]=A.useState(!1),[s,o]=A.useState(!1),u=async(x,b)=>{try{await Rt.post(Yw+"action",x),await e.logout(!1)}catch{Wn({title:"Error",message:b})}},d=()=>{const x={operation:"localhost",enabled:!n.localhost};u(x,t.get("AuthenticationServiceNotToggled"))},f=()=>{const x={operation:"authentication",enabled:!n.enabled};u(x,n.enabled?t.get("AuthenticationServiceNotDisabled"):t.get("AuthenticationServiceNotEnabled"))},m=()=>n.localhost?c.jsxs(ut,{justify:"flex-start",mt:"md",children:[c.jsx(at,{onClick:()=>d(),children:t.get("Disable")}),c.jsx(et,{children:t.get("AuthenticateLocalhostAdminEnabled")})]}):c.jsxs(ut,{justify:"flex-start",mt:"md",children:[c.jsxs(Qn,{centered:!0,opened:s,onClose:()=>o(!1),title:t.get("Warning"),children:[c.jsx(et,{children:t.get("EnablingAuthenticateLocalhost")}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>o(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{o(!1),d()},children:t.get("Confirm")})]})]}),c.jsx(at,{onClick:()=>o(!0),children:t.get("Enable")}),c.jsx(et,{children:t.get("AuthenticateLocalhostAdminDisabled")})]}),y=()=>n.enabled?c.jsxs(ut,{justify:"flex-start",mt:"md",children:[c.jsxs(Qn,{centered:!0,opened:r,onClose:()=>i(!1),title:t.get("Warning"),children:[c.jsx(et,{children:In(t.get("DisablingAuthenticationReduces"))}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>i(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{i(!1),f()},children:t.get("Confirm")})]})]}),c.jsx(at,{onClick:()=>i(!0),children:t.get("Disable")}),c.jsx(et,{children:t.get("AuthenticationServiceEnabled")})]}):c.jsxs(ut,{justify:"flex-start",mt:"md",children:[c.jsx(at,{onClick:()=>f(),children:t.get("Enable")}),c.jsx(et,{children:t.get("AuthenticationServiceDisabled")})]});return n.enabled?c.jsxs(c.Fragment,{children:[c.jsx(y,{}),c.jsx(m,{})]}):c.jsx(y,{})}function GN({group:t}){return c.jsxs(ut,{wrap:"nowrap",children:[c.jsx(_l,{radius:"xl",size:"lg",children:t.id===0?c.jsx(lY,{size:24}):c.jsx(Og,{size:24})}),c.jsx(et,{children:t.displayName})]})}function oJ(t){if(!/^[0-9a-zA-Z-]+$/.test(t))throw new Error(`[@mantine/use-form] Form name "${t}" is invalid, it should contain only letters, numbers and dashes`)}const lJ=typeof window<"u"?A.useLayoutEffect:A.useEffect;function rs(t,e){lJ(()=>{if(t)return window.addEventListener(t,e),()=>window.removeEventListener(t,e)},[t])}function uJ(t,e){t&&oJ(t),rs(`mantine-form:${t}:set-field-value`,n=>e.setFieldValue(n.detail.path,n.detail.value)),rs(`mantine-form:${t}:set-values`,n=>e.setValues(n.detail)),rs(`mantine-form:${t}:set-initial-values`,n=>e.setInitialValues(n.detail)),rs(`mantine-form:${t}:set-errors`,n=>e.setErrors(n.detail)),rs(`mantine-form:${t}:set-field-error`,n=>e.setFieldError(n.detail.path,n.detail.error)),rs(`mantine-form:${t}:clear-field-error`,n=>e.clearFieldError(n.detail)),rs(`mantine-form:${t}:clear-errors`,e.clearErrors),rs(`mantine-form:${t}:reset`,e.reset),rs(`mantine-form:${t}:validate`,e.validate),rs(`mantine-form:${t}:validate-field`,n=>e.validateField(n.detail)),rs(`mantine-form:${t}:reorder-list-item`,n=>e.reorderListItem(n.detail.path,n.detail.payload)),rs(`mantine-form:${t}:remove-list-item`,n=>e.removeListItem(n.detail.path,n.detail.index)),rs(`mantine-form:${t}:insert-list-item`,n=>e.insertListItem(n.detail.path,n.detail.item,n.detail.index)),rs(`mantine-form:${t}:set-dirty`,n=>e.setDirty(n.detail)),rs(`mantine-form:${t}:set-touched`,n=>e.setTouched(n.detail)),rs(`mantine-form:${t}:reset-dirty`,n=>e.resetDirty(n.detail)),rs(`mantine-form:${t}:reset-touched`,e.resetTouched)}function cJ(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n instanceof HTMLInputElement?n.type==="checkbox"?t(n.checked):t(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&t(n.value)}else t(e)}}function Qw(t){return t===null||typeof t!="object"?{}:Object.keys(t).reduce((e,n)=>{const r=t[n];return r!=null&&r!==!1&&(e[n]=r),e},{})}function dJ(t){const[e,n]=A.useState(Qw(t)),r=A.useRef(e),i=A.useCallback(d=>{n(f=>{const m=Qw(typeof d=="function"?d(f):d);return r.current=m,m})},[]),s=A.useCallback(()=>i({}),[]),o=A.useCallback(d=>{r.current[d]!==void 0&&i(f=>{const m={...f};return delete m[d],m})},[e]),u=A.useCallback((d,f)=>{f==null||f===!1?o(d):r.current[d]!==f&&i(m=>({...m,[d]:f}))},[e]);return{errorsState:e,setErrors:i,clearErrors:s,setFieldError:u,clearFieldError:o}}function Zw(t,e){if(e===null||typeof e!="object")return{};const n={...e};return Object.keys(e).forEach(r=>{r.includes(`${String(t)}.`)&&delete n[r]}),n}function r4(t,e){const n=t.substring(e.length+1).split(".")[0];return parseInt(n,10)}function i4(t,e,n,r){if(e===void 0)return n;const i=`${String(t)}`;let s=n;r===-1&&(s=Zw(`${i}.${e}`,s));const o={...s},u=new Set;return Object.entries(s).filter(([d])=>{if(!d.startsWith(`${i}.`))return!1;const f=r4(d,i);return Number.isNaN(f)?!1:f>=e}).forEach(([d,f])=>{const m=r4(d,i),y=d.replace(`${i}.${m}`,`${i}.${m+r}`);o[y]=f,u.add(y),u.has(d)||delete o[d]}),o}function fJ(t,{from:e,to:n},r){const i=`${t}.${e}`,s=`${t}.${n}`,o={...r},u=new Set;return Object.keys(r).forEach(d=>{if(u.has(d))return;let f,m;if(d.startsWith(i)?(f=d,m=d.replace(i,s)):d.startsWith(s)&&(f=d.replace(s,i),m=d),f&&m){const y=o[f],x=o[m];x===void 0?delete o[f]:o[f]=x,y===void 0?delete o[m]:o[m]=y,u.add(f),u.add(m)}}),o}function s4(t,e,n){typeof n.value=="object"&&(n.value=ag(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function ag(t){if(typeof t!="object")return t;var e=0,n,r,i,s=Object.prototype.toString.call(t);if(s==="[object Object]"?i=Object.create(t.__proto__||null):s==="[object Array]"?i=Array(t.length):s==="[object Set]"?(i=new Set,t.forEach(function(o){i.add(ag(o))})):s==="[object Map]"?(i=new Map,t.forEach(function(o,u){i.set(ag(u),ag(o))})):s==="[object Date]"?i=new Date(+t):s==="[object RegExp]"?i=new RegExp(t.source,t.flags):s==="[object DataView]"?i=new t.constructor(ag(t.buffer)):s==="[object ArrayBuffer]"?i=t.slice(0):s.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)s4(i,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(i,n=r[e])&&i[n]===t[n]||s4(i,n,Object.getOwnPropertyDescriptor(t,n))}return i||t}function WN(t){return typeof t!="string"?[]:t.split(".")}function as(t,e){const n=WN(t);if(n.length===0||typeof e!="object"||e===null)return;let r=e[n[0]];for(let i=1;i<n.length&&r!=null;i+=1)r=r[n[i]];return r}function eb(t,e,n){const r=WN(t);if(r.length===0)return n;const i=ag(n);if(r.length===1)return i[r[0]]=e,i;let s=i[r[0]];for(let o=1;o<r.length-1;o+=1){if(s===void 0)return i;s=s[r[o]]}return s[r[r.length-1]]=e,i}function hJ(t,{from:e,to:n},r){const i=as(t,r);if(!Array.isArray(i))return r;const s=[...i],o=i[e];return s.splice(e,1),s.splice(n,0,o),eb(t,s,r)}function pJ(t,e,n,r){const i=as(t,r);if(!Array.isArray(i))return r;const s=[...i];return s.splice(typeof n=="number"?n:s.length,0,e),eb(t,s,r)}function mJ(t,e,n){const r=as(t,n);return Array.isArray(r)?eb(t,r.filter((i,s)=>s!==e),n):n}function gJ(t,e,n,r){const i=as(t,r);if(!Array.isArray(i)||i.length<=n)return r;const s=[...i];return s[n]=e,eb(t,s,r)}function vJ({$values:t,$errors:e,$status:n}){const r=A.useCallback((u,d)=>{n.clearFieldDirty(u),e.setErrors(f=>fJ(u,d,f)),t.setValues({values:hJ(u,d,t.refValues.current),updateState:!0})},[]),i=A.useCallback((u,d)=>{n.clearFieldDirty(u),e.setErrors(f=>i4(u,d,f,-1)),t.setValues({values:mJ(u,d,t.refValues.current),updateState:!0})},[]),s=A.useCallback((u,d,f)=>{n.clearFieldDirty(u),e.setErrors(m=>i4(u,f,m,1)),t.setValues({values:pJ(u,d,f,t.refValues.current),updateState:!0})},[]),o=A.useCallback((u,d,f)=>{n.clearFieldDirty(u),t.setValues({values:gJ(u,f,d,t.refValues.current),updateState:!0})},[]);return{reorderListItem:r,removeListItem:i,insertListItem:s,replaceListItem:o}}var ET,a4;function yJ(){return a4||(a4=1,ET=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),ET}var bJ=yJ();const r1=ko(bJ);function Gv(t,e){const n=Object.keys(t);if(typeof e=="string"){const r=n.filter(i=>i.startsWith(`${e}.`));return t[e]||r.some(i=>t[i])||!1}return n.some(r=>t[r])}function xJ({initialDirty:t,initialTouched:e,mode:n,$values:r}){const[i,s]=A.useState(e),[o,u]=A.useState(t),d=A.useRef(e),f=A.useRef(t),m=A.useCallback(V=>{const $=typeof V=="function"?V(d.current):V;d.current=$,n==="controlled"&&s($)},[]),y=A.useCallback((V,$=!1)=>{const q=typeof V=="function"?V(f.current):V;f.current=q,(n==="controlled"||$)&&u(q)},[]),x=A.useCallback(()=>m({}),[]),b=A.useCallback(V=>{const $=V?{...r.refValues.current,...V}:r.refValues.current;r.setValuesSnapshot($),y({})},[]),w=A.useCallback((V,$)=>{m(q=>Gv(q,V)===$?q:{...q,[V]:$})},[]),S=A.useCallback((V,$,q)=>{y(B=>Gv(B,V)===$?B:{...B,[V]:$},q)},[]),D=A.useCallback((V,$)=>{const q=Gv(f.current,V),B=!r1(as(V,r.getValuesSnapshot()),$),z=Zw(V,f.current);z[V]=B,y(z,q!==B)},[]),k=A.useCallback(V=>Gv(d.current,V),[]),O=A.useCallback(V=>y($=>{if(typeof V!="string")return $;const q=Zw(V,$);return delete q[V],r1(q,$)?$:q}),[]),N=A.useCallback(V=>{if(V){const q=as(V,f.current);if(typeof q=="boolean")return q;const B=as(V,r.refValues.current),z=as(V,r.valuesSnapshot.current);return!r1(B,z)}return Object.keys(f.current).length>0?Gv(f.current):!r1(r.refValues.current,r.valuesSnapshot.current)},[]),F=A.useCallback(()=>f.current,[]),M=A.useCallback(()=>d.current,[]);return{touchedState:i,dirtyState:o,touchedRef:d,dirtyRef:f,setTouched:m,setDirty:y,resetDirty:b,resetTouched:x,isTouched:k,setFieldTouched:w,setFieldDirty:S,setTouchedState:s,setDirtyState:u,clearFieldDirty:O,isDirty:N,getDirty:F,getTouched:M,setCalculatedFieldDirty:D}}function _J({initialValues:t,onValuesChange:e,mode:n}){const r=A.useRef(!1),[i,s]=A.useState(t||{}),o=A.useRef(i),u=A.useRef(i),d=A.useCallback(({values:S,subscribers:D,updateState:k=!0,mergeWithPreviousValues:O=!0})=>{const N=o.current,F=S instanceof Function?S(o.current):S,M=O?{...N,...F}:F;o.current=M,k&&s(M),e?.(M,N),D?.filter(Boolean).forEach(V=>V({updatedValues:M,previousValues:N}))},[e]),f=A.useCallback(S=>{const D=as(S.path,o.current),k=S.value instanceof Function?S.value(D):S.value;if(D!==k){const O=o.current,N=eb(S.path,k,o.current);d({values:N,updateState:S.updateState}),S.subscribers?.filter(Boolean).forEach(F=>F({path:S.path,updatedValues:N,previousValues:O}))}},[d]),m=A.useCallback(S=>{u.current=S},[]),y=A.useCallback((S,D)=>{r.current||(r.current=!0,d({values:S,updateState:n==="controlled"}),m(S),D())},[d]),x=A.useCallback(()=>{d({values:u.current,updateState:!0,mergeWithPreviousValues:!1})},[d]),b=A.useCallback(()=>o.current,[]),w=A.useCallback(()=>u.current,[]);return{initialized:r,stateValues:i,refValues:o,valuesSnapshot:u,setValues:d,setFieldValue:f,resetValues:x,setValuesSnapshot:m,initialize:y,getValues:b,getValuesSnapshot:w}}function SJ({$status:t}){const e=A.useRef({}),n=A.useCallback((i,s)=>{A.useEffect(()=>(e.current[i]=e.current[i]||[],e.current[i].push(s),()=>{e.current[i]=e.current[i].filter(o=>o!==s)}),[s])},[]),r=A.useCallback(i=>e.current[i]?e.current[i].map(s=>o=>s({previousValue:as(i,o.previousValues),value:as(i,o.updatedValues),touched:t.isTouched(i),dirty:t.isDirty(i)})):[],[]);return{subscribers:e,watch:n,getFieldSubscribers:r}}function o4(t,e){return t?`${t}-${e.toString()}`:e.toString()}const i1=Symbol("root-rule");function l4(t){const e=Qw(t);return{hasErrors:Object.keys(e).length>0,errors:e}}function Jw(t,e,n="",r={}){return typeof t!="object"||t===null?r:Object.keys(t).reduce((i,s)=>{const o=t[s],u=`${n===""?"":`${n}.`}${s}`,d=as(u,e);let f=!1;return typeof o=="function"&&(i[u]=o(d,e,u)),typeof o=="object"&&Array.isArray(d)&&(f=!0,d.forEach((m,y)=>Jw(o,e,`${u}.${y}`,i)),i1 in o&&(i[u]=o[i1](d,e,u))),typeof o=="object"&&typeof d=="object"&&d!==null&&(f||Jw(o,e,u,i),i1 in o&&(i[u]=o[i1](d,e,u))),i},r)}function eC(t,e){return l4(typeof t=="function"?t(e):Jw(t,e))}function s1(t,e,n){if(typeof t!="string")return{hasError:!1,error:null};const r=eC(e,n),i=Object.keys(r.errors).find(s=>t.split(".").every((o,u)=>o===s.split(".")[u]));return{hasError:!!i,error:i?r.errors[i]:null}}const TJ="__MANTINE_FORM_INDEX__";function u4(t,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(t.replace(/[.][0-9]+/g,`.${TJ}`)):!1:!1}function ea({name:t,mode:e="controlled",initialValues:n,initialErrors:r={},initialDirty:i={},initialTouched:s={},clearInputErrorOnChange:o=!0,validateInputOnChange:u=!1,validateInputOnBlur:d=!1,onValuesChange:f,transformValues:m=S=>S,enhanceGetInputProps:y,validate:x,onSubmitPreventDefault:b="always",touchTrigger:w="change"}={}){const S=dJ(r),D=_J({initialValues:n,onValuesChange:f,mode:e}),k=xJ({initialDirty:i,initialTouched:s,$values:D,mode:e}),O=vJ({$values:D,$errors:S,$status:k}),N=SJ({$status:k}),[F,M]=A.useState(0),[V,$]=A.useState({}),[q,B]=A.useState(!1),z=A.useCallback(()=>{D.resetValues(),S.clearErrors(),k.resetDirty(),k.resetTouched(),e==="uncontrolled"&&M(pe=>pe+1)},[]),ee=A.useCallback(pe=>{o&&S.clearErrors(),e==="uncontrolled"&&M(Ce=>Ce+1),Object.keys(N.subscribers.current).forEach(Ce=>{const Ke=as(Ce,D.refValues.current),Me=as(Ce,pe);Ke!==Me&&N.getFieldSubscribers(Ce).forEach(lt=>lt({previousValues:pe,updatedValues:D.refValues.current}))})},[o]),Y=A.useCallback(pe=>{const Ce=D.refValues.current;D.initialize(pe,()=>e==="uncontrolled"&&M(Ke=>Ke+1)),ee(Ce)},[ee]),Q=A.useCallback((pe,Ce,Ke)=>{const Me=u4(pe,u),lt=Ce instanceof Function?Ce(as(pe,D.refValues.current)):Ce;k.setCalculatedFieldDirty(pe,lt),w==="change"&&k.setFieldTouched(pe,!0),!Me&&o&&S.clearFieldError(pe),D.setFieldValue({path:pe,value:Ce,updateState:e==="controlled",subscribers:[...N.getFieldSubscribers(pe),Me?bt=>{const mt=s1(pe,x,bt.updatedValues);mt.hasError?S.setFieldError(pe,mt.error):S.clearFieldError(pe)}:null,Ke?.forceUpdate!==!1&&e!=="controlled"?()=>$(bt=>({...bt,[pe]:(bt[pe]||0)+1})):null]})},[f,x]),oe=A.useCallback(pe=>{const Ce=D.refValues.current;D.setValues({values:pe,updateState:e==="controlled"}),ee(Ce)},[f,ee]),ue=A.useCallback(()=>{const pe=eC(x,D.refValues.current);return S.setErrors(pe.errors),pe},[x]),H=A.useCallback(pe=>{const Ce=s1(pe,x,D.refValues.current);return Ce.hasError?S.setFieldError(pe,Ce.error):S.clearFieldError(pe),Ce},[x]),te=(pe,{type:Ce="input",withError:Ke=!0,withFocus:Me=!0,...lt}={})=>{const mt={onChange:cJ(_t=>Q(pe,_t,{forceUpdate:!1})),"data-path":o4(t,pe)};return Ke&&(mt.error=S.errorsState[pe]),Ce==="checkbox"?mt[e==="controlled"?"checked":"defaultChecked"]=as(pe,D.refValues.current):mt[e==="controlled"?"value":"defaultValue"]=as(pe,D.refValues.current),Me&&(mt.onFocus=()=>k.setFieldTouched(pe,!0),mt.onBlur=()=>{if(u4(pe,d)){const _t=s1(pe,x,D.refValues.current);_t.hasError?S.setFieldError(pe,_t.error):S.clearFieldError(pe)}}),Object.assign(mt,y?.({inputProps:mt,field:pe,options:{type:Ce,withError:Ke,withFocus:Me,...lt},form:we}))},Z=(pe,Ce)=>Ke=>{b==="always"&&Ke?.preventDefault();const Me=ue();if(Me.hasErrors)b==="validation-failed"&&Ke?.preventDefault(),Ce?.(Me.errors,D.refValues.current,Ke);else{const lt=pe?.(m(D.refValues.current),Ke);lt instanceof Promise&&(B(!0),lt.finally(()=>B(!1)))}},ie=pe=>m(pe||D.refValues.current),G=A.useCallback(pe=>{pe.preventDefault(),z()},[]),X=A.useCallback(pe=>pe?!s1(pe,x,D.refValues.current).hasError:!eC(x,D.refValues.current).hasErrors,[x]),fe=pe=>`${F}-${pe}-${V[pe]||0}`,be=A.useCallback(pe=>document.querySelector(`[data-path="${o4(t,pe)}"]`),[]),we={watch:N.watch,initialized:D.initialized.current,values:D.stateValues,getValues:D.getValues,getInitialValues:D.getValuesSnapshot,setInitialValues:D.setValuesSnapshot,initialize:Y,setValues:oe,setFieldValue:Q,submitting:q,setSubmitting:B,errors:S.errorsState,setErrors:S.setErrors,setFieldError:S.setFieldError,clearFieldError:S.clearFieldError,clearErrors:S.clearErrors,resetDirty:k.resetDirty,setTouched:k.setTouched,setDirty:k.setDirty,isTouched:k.isTouched,resetTouched:k.resetTouched,isDirty:k.isDirty,getTouched:k.getTouched,getDirty:k.getDirty,reorderListItem:O.reorderListItem,insertListItem:O.insertListItem,removeListItem:O.removeListItem,replaceListItem:O.replaceListItem,reset:z,validate:ue,validateField:H,getInputProps:te,onSubmit:Z,onReset:G,isValid:X,getTransformedValues:ie,key:fe,getInputNode:be};return uJ(t,we),we}function wJ({i18n:t,group:e,postAccountAction:n}){const r=ea({initialValues:{id:e.id}}),i=()=>{const u={operation:"deletegroup",groupid:e.id};n(u,t.get("GroupDeletion"),t.get("GroupDeleting"),t.get("GroupDeleted"),t.get("GroupNotDeleted"))},[s,o]=A.useState(!1);return e.id>1?c.jsxs("form",{onSubmit:r.onSubmit(i),children:[c.jsx(ks,{my:"sm"}),s?c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(et,{c:"red",children:t.get("WarningGroupWillBeDeleted")}),c.jsx(at,{onClick:()=>o(!1),children:t.get("Cancel")}),c.jsx(at,{type:"submit",color:"red",leftSection:c.jsx(Ig,{}),rightSection:c.jsx(Ig,{}),children:t.get("Confirm")})]}):c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(et,{c:"red",children:t.get("DeleteGroup")}),c.jsx(at,{onClick:()=>o(!0),color:"red",leftSection:c.jsx(fN,{}),children:t.get("Delete")})]})]}):void 0}function CJ({i18n:t,group:e,postAccountAction:n}){const r=ea({initialValues:{id:e.id,displayName:e.displayName}}),i=s=>{const o={operation:"modifygroup",groupid:e.id,name:s.displayName};n(o,t.get("DisplayNameUpdate"),t.get("DisplayNameUpdating"),t.get("DisplayNameUpdated"),t.get("DisplayNameNotUpdated"))};return c.jsxs("form",{onSubmit:r.onSubmit(i),children:[c.jsx(ks,{my:"sm",label:t.get("DisplayName"),fz:"md",c:"var(--mantine-color-text)"}),c.jsx(pn,{label:t.get("DisplayName"),name:"displayName",...r.getInputProps("displayName")}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Update_verb")})})]})}function EJ({i18n:t,group:e,postAccountAction:n}){const[r,i]=A.useState(e.permissions?e.permissions.value:0),s=y=>{i(r|y)},o=y=>{i(r&~y)},u=y=>(r&y)===y,d=ea({initialValues:{id:e.id}}),f=()=>{const y={operation:"updatepermission",groupid:e.id,permissions:r};n(y,t.get("PermissionsUpdate"),t.get("PermissionsUpdating"),t.get("PermissionsUpdated"),t.get("PermissionsNotUpdated"))},m=({label:y,permission:x})=>c.jsx(pt,{disabled:e.id<2,label:y,checked:u(x),onChange:b=>b.currentTarget.checked?s(x):o(x)});return c.jsxs("form",{onSubmit:d.onSubmit(f),children:[c.jsx(ks,{my:"sm",label:t.get("Permissions"),fz:"md",c:"var(--mantine-color-text)"}),c.jsxs(tn,{children:[c.jsx(m,{label:t.get("AllPermissions"),permission:dn.all}),c.jsx(m,{label:t.get("ManageUsers"),permission:dn.users_manage}),c.jsx(m,{label:t.get("ManageGroups"),permission:dn.groups_manage}),c.jsx(m,{label:t.get("ViewSettings"),permission:dn.settings_view}),c.jsx(m,{label:t.get("ModifySettings"),permission:dn.settings_modify}),c.jsx(m,{label:t.get("ControlDevices"),permission:dn.devices_control}),c.jsx(m,{label:t.get("RestartServer"),permission:dn.server_restart}),c.jsx(m,{label:t.get("ShutDownComputer"),permission:dn.computer_shutdown}),c.jsx(m,{label:t.get("RestartApplication"),permission:dn.application_restart}),c.jsx(m,{label:t.get("ShutdownApplication"),permission:dn.application_shutdown}),c.jsx(m,{label:t.get("BrowseWebPlayer"),permission:dn.web_player_browse}),c.jsx(m,{label:t.get("DownloadWebPlayer"),permission:dn.web_player_download}),c.jsx(m,{label:t.get("EditMetadataWebPlayer"),permission:dn.web_player_edit})]}),e.id>1&&c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Update_verb")})})]})}function AJ({i18n:t,group:e,postAccountAction:n}){return e.id>0?c.jsxs(Tt.Item,{value:e.id.toString(),children:[c.jsx(Tt.Control,{children:c.jsx(GN,{group:e})}),c.jsxs(Tt.Panel,{children:[c.jsx(CJ,{i18n:t,group:e,postAccountAction:n}),c.jsx(EJ,{i18n:t,group:e,postAccountAction:n}),c.jsx(wJ,{i18n:t,group:e,postAccountAction:n})]})]},e.id):void 0}function DJ({i18n:t,accounts:e,postAccountAction:n}){return e.groups.map(r=>c.jsx(AJ,{i18n:t,group:r,postAccountAction:n},r.id))}function kJ({i18n:t,postAccountAction:e}){const n=ea({initialValues:{displayName:""}}),r=i=>{const s={operation:"creategroup",name:i.displayName};e(s,t.get("GroupCreation"),t.get("NewGroupCreating"),t.get("NewGroupCreated"),t.get("NewGroupNotCreated"))};return c.jsxs("form",{onSubmit:n.onSubmit(r),children:[c.jsx(pn,{required:!0,label:t.get("DisplayName"),name:"displayName",...n.getInputProps("displayName")}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Create")})})]})}function RJ({i18n:t,postAccountAction:e}){const n={id:0,displayName:t.get("NewGroup")};return c.jsxs(Tt.Item,{value:n.id.toString(),children:[c.jsx(Tt.Control,{children:c.jsx(GN,{group:n})}),c.jsx(Tt.Panel,{children:c.jsx(kJ,{i18n:t,postAccountAction:e})})]},n.id)}function PJ({i18n:t,accounts:e,postAccountAction:n}){return c.jsxs(Tt,{children:[c.jsx(RJ,{i18n:t,postAccountAction:n}),c.jsx(DJ,{i18n:t,accounts:e,postAccountAction:n})]})}const IJ=(t,e)=>typeof t.group<"u"&&typeof t.group.permissions<"u"&&(t.group.permissions.value&e)!==0,OJ=(t,e)=>{const n=e.groups&&e.groups.find(r=>r.id===t.groupId);return n!==void 0?n:{id:0,displayName:""}},NJ=(t,e)=>{const n=e&&e.find(r=>r.id===t);return n!==void 0?n.displayName:null},XN=(t,e)=>{const n=[];return e&&n.push({value:"0",label:e}),t&&t.forEach(r=>{r.id>0&&n.push({value:r.id.toString(),label:r.displayName})}),n};function YN({user:t,group:e}){const n=t.displayName==null||t.displayName.length===0||t.displayName===t.username,r=e.displayName.length!==0?" (".concat(e.displayName).concat(")"):"",i=n?t.username:t.displayName;return c.jsxs(ut,{wrap:"nowrap",children:[c.jsx(_l,{radius:"xl",size:"lg",src:t.avatar,children:!t.avatar&&(t.id===0?c.jsx(tQ,{size:24}):c.jsx(xp,{size:24}))}),c.jsxs("div",{children:[c.jsxs(et,{children:[i,r]}),!n&&c.jsx(et,{size:"sm",c:"dimmed",fw:400,children:t.username})]})]})}function MJ({i18n:t,user:e,postAccountAction:n}){const r=ea({initialValues:{id:e.id}}),i=()=>{const u={operation:"deleteuser",userid:e.id};n(u,t.get("UserDeletion"),t.get("UserDeleting"),t.get("UserDeleted"),t.get("UserNotDeleted"))},[s,o]=A.useState(!1);return c.jsxs("form",{onSubmit:r.onSubmit(i),children:[c.jsx(ks,{my:"sm"}),s?c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(et,{c:"red",children:t.get("WarningUserWillBeDeleted")}),c.jsx(at,{onClick:()=>o(!1),children:t.get("Cancel")}),c.jsx(at,{type:"submit",color:"red",leftSection:c.jsx(Ig,{}),rightSection:c.jsx(Ig,{}),children:t.get("Confirm")})]}):c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(et,{c:"red",children:t.get("DeleteUser")}),c.jsx(at,{onClick:()=>o(!0),color:"red",leftSection:c.jsx(fN,{}),children:t.get("Delete")})]})]})}function jJ({i18n:t,user:e,canManageGroups:n,groupSelectionDatas:r,postAccountAction:i}){const s=ea({initialValues:{id:e.id,groupId:e.groupId.toString()}}),o=u=>{const d={operation:"modifyuser",userid:e.id,groupid:u.groupId};i(d,t.get("UserGroupChange"),t.get("UserGroupChanging"),t.get("UserGroupChanged"),t.get("UserGroupNotChanged"))};return c.jsxs("form",{onSubmit:s.onSubmit(o),children:[c.jsx(ks,{my:"sm",label:t.get("Group"),fz:"md",c:"var(--mantine-color-text)"}),c.jsx(Cr,{label:t.get("Group"),name:"groupId",disabled:!n,data:r,...s.getInputProps("groupId")}),n&&s.isDirty()&&c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Apply")})})]})}function LJ({i18n:t,user:e,postAccountAction:n}){const r=ea({initialValues:{id:e.id,username:e.username,password:""}}),i=s=>{const o={operation:"changelogin",userid:e.id,username:s.username,password:s.password};n(o,t.get("CredentialsUpdate"),t.get("CredentialsUpdating"),t.get("CredentialsUpdated"),t.get("CredentialsNotUpdated"))};return c.jsxs("form",{onSubmit:r.onSubmit(i),children:[c.jsx(ks,{my:"sm",label:t.get("Credentials"),fz:"md",c:"var(--mantine-color-text)"}),c.jsx(pn,{required:!0,label:t.get("Username"),name:"username",...r.getInputProps("username")}),c.jsx(g2,{required:!0,label:t.get("Password"),name:"username",type:"password",...r.getInputProps("password")}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Apply")})})]})}const BJ=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ng(t,e,n){const r=FJ(t),{webkitRelativePath:i}=t,s=typeof e=="string"?e:typeof i=="string"&&i.length>0?i:`./${t.name}`;return typeof r.path!="string"&&c4(r,"path",s),c4(r,"relativePath",s),r}function FJ(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const r=e.split(".").pop().toLowerCase(),i=BJ.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}function c4(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}var Sp=(t,e,n)=>new Promise((r,i)=>{var s=d=>{try{u(n.next(d))}catch(f){i(f)}},o=d=>{try{u(n.throw(d))}catch(f){i(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,o);u((n=n.apply(t,e)).next())});const UJ=[".DS_Store","Thumbs.db"];function zJ(t){return Sp(this,null,function*(){return n_(t)&&$J(t.dataTransfer)?GJ(t.dataTransfer,t.type):VJ(t)?HJ(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?qJ(t):[]})}function $J(t){return n_(t)}function VJ(t){return n_(t)&&n_(t.target)}function n_(t){return typeof t=="object"&&t!==null}function HJ(t){return tC(t.target.files).map(e=>Ng(e))}function qJ(t){return Sp(this,null,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>Ng(n))})}function GJ(t,e){return Sp(this,null,function*(){if(t.items){const n=tC(t.items).filter(i=>i.kind==="file");if(e!=="drop")return n;const r=yield Promise.all(n.map(WJ));return d4(KN(r))}return d4(tC(t.files).map(n=>Ng(n)))})}function d4(t){return t.filter(e=>UJ.indexOf(e.name)===-1)}function tC(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const r=t[n];e.push(r)}return e}function WJ(t){if(typeof t.webkitGetAsEntry!="function")return f4(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?QN(e):f4(t,e)}function KN(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?KN(n):[n]],[])}function f4(t,e){var n;if(typeof t.getAsFileSystemHandle=="function")return t.getAsFileSystemHandle().then(s=>Sp(this,null,function*(){const o=yield s.getFile();return o.handle=s,Ng(o)}));const r=t.getAsFile();if(!r)return Promise.reject(`${t} is not a File`);const i=Ng(r,(n=e?.fullPath)!=null?n:void 0);return Promise.resolve(i)}function XJ(t){return Sp(this,null,function*(){return t.isDirectory?QN(t):YJ(t)})}function QN(t){const e=t.createReader();return new Promise((n,r)=>{const i=[];function s(){e.readEntries(o=>Sp(this,null,function*(){if(o.length){const u=Promise.all(o.map(XJ));i.push(u),s()}else try{const u=yield Promise.all(i);n(u)}catch(u){r(u)}}),o=>{r(o)})}s()})}function YJ(t){return Sp(this,null,function*(){return new Promise((e,n)=>{t.file(r=>{const i=Ng(r,t.fullPath);e(i)},r=>{n(r)})})})}function AT(t,e){if(t&&e){const n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;const r=t.name||"",i=(t.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(o=>{const u=o.trim().toLowerCase();return u.charAt(0)==="."?r.toLowerCase().endsWith(u):u.endsWith("/*")?s===u.replace(/\/.*$/,""):i===u})}return!0}var KJ=Object.defineProperty,QJ=Object.defineProperties,ZJ=Object.getOwnPropertyDescriptors,h4=Object.getOwnPropertySymbols,JJ=Object.prototype.hasOwnProperty,eee=Object.prototype.propertyIsEnumerable,p4=(t,e,n)=>e in t?KJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tee=(t,e)=>{for(var n in e||(e={}))JJ.call(e,n)&&p4(t,n,e[n]);if(h4)for(var n of h4(e))eee.call(e,n)&&p4(t,n,e[n]);return t},nee=(t,e)=>QJ(t,ZJ(e));const ree=typeof AT=="function"?AT:AT.default,iee="file-invalid-type",see="file-too-large",aee="file-too-small",oee="too-many-files",lee=(t="")=>{const e=t.split(","),n=e.length>1?`one of ${e.join(", ")}`:e[0];return{code:iee,message:`File type must be ${n}`}},m4=t=>({code:see,message:`File is larger than ${t} ${t===1?"byte":"bytes"}`}),g4=t=>({code:aee,message:`File is smaller than ${t} ${t===1?"byte":"bytes"}`}),uee={code:oee,message:"Too many files"};function ZN(t,e){const n=t.type==="application/x-moz-file"||ree(t,e);return[n,n?null:lee(e)]}function JN(t,e,n){if(Vh(t.size))if(Vh(e)&&Vh(n)){if(t.size>n)return[!1,m4(n)];if(t.size<e)return[!1,g4(e)]}else{if(Vh(e)&&t.size<e)return[!1,g4(e)];if(Vh(n)&&t.size>n)return[!1,m4(n)]}return[!0,null]}function Vh(t){return t!=null}function cee({files:t,accept:e,minSize:n,maxSize:r,multiple:i,maxFiles:s,validator:o}){return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(u=>{const[d]=ZN(u,e),[f]=JN(u,n,r),m=o?o(u):null;return d&&f&&!m})}function r_(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function a1(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,e=>e==="Files"||e==="application/x-moz-file"):!!t.target&&!!t.target.files}function v4(t){t.preventDefault()}function dee(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function fee(t){return t.indexOf("Edge/")!==-1}function hee(t=window.navigator.userAgent){return dee(t)||fee(t)}function wu(...t){return(e,...n)=>t.some(r=>(!r_(e)&&r&&r(e,...n),r_(e)))}function pee(){return"showOpenFilePicker"in window}function mee(t){return Vh(t)?[{description:"Files",accept:Object.entries(t).filter(([n,r])=>{let i=!0;return eM(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),i=!1),(!Array.isArray(r)||!r.every(tM))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),i=!1),i}).reduce((n,[r,i])=>nee(tee({},n),{[r]:i}),{})}]:t}function gee(t){if(Vh(t))return Object.entries(t).reduce((e,[n,r])=>[...e,n,...r],[]).filter(e=>eM(e)||tM(e)).join(",")}function vee(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function yee(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function eM(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||t==="application/*"||/\w+\/[-+.\w]+/g.test(t)}function tM(t){return/^.*\.[\w]+$/.test(t)}var bee=Object.defineProperty,xee=Object.defineProperties,_ee=Object.getOwnPropertyDescriptors,i_=Object.getOwnPropertySymbols,nM=Object.prototype.hasOwnProperty,rM=Object.prototype.propertyIsEnumerable,y4=(t,e,n)=>e in t?bee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qs=(t,e)=>{for(var n in e||(e={}))nM.call(e,n)&&y4(t,n,e[n]);if(i_)for(var n of i_(e))rM.call(e,n)&&y4(t,n,e[n]);return t},nf=(t,e)=>xee(t,_ee(e)),s_=(t,e)=>{var n={};for(var r in t)nM.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&i_)for(var r of i_(t))e.indexOf(r)<0&&rM.call(t,r)&&(n[r]=t[r]);return n};const nD=A.forwardRef((t,e)=>{var n=t,{children:r}=n,i=s_(n,["children"]);const s=sM(i),{open:o}=s,u=s_(s,["open"]);return A.useImperativeHandle(e,()=>({open:o}),[o]),Or.createElement(A.Fragment,null,r(nf(Qs({},u),{open:o})))});nD.displayName="Dropzone";const iM={disabled:!1,getFilesFromEvent:zJ,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};nD.defaultProps=iM;nD.propTypes={children:yr.func,accept:yr.objectOf(yr.arrayOf(yr.string)),multiple:yr.bool,preventDropOnDocument:yr.bool,noClick:yr.bool,noKeyboard:yr.bool,noDrag:yr.bool,noDragEventsBubbling:yr.bool,minSize:yr.number,maxSize:yr.number,maxFiles:yr.number,disabled:yr.bool,getFilesFromEvent:yr.func,onFileDialogCancel:yr.func,onFileDialogOpen:yr.func,useFsAccessApi:yr.bool,autoFocus:yr.bool,onDragEnter:yr.func,onDragLeave:yr.func,onDragOver:yr.func,onDrop:yr.func,onDropAccepted:yr.func,onDropRejected:yr.func,onError:yr.func,validator:yr.func};const nC={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sM(t={}){const{accept:e,disabled:n,getFilesFromEvent:r,maxSize:i,minSize:s,multiple:o,maxFiles:u,onDragEnter:d,onDragLeave:f,onDragOver:m,onDrop:y,onDropAccepted:x,onDropRejected:b,onFileDialogCancel:w,onFileDialogOpen:S,useFsAccessApi:D,autoFocus:k,preventDropOnDocument:O,noClick:N,noKeyboard:F,noDrag:M,noDragEventsBubbling:V,onError:$,validator:q}=Qs(Qs({},iM),t),B=A.useMemo(()=>gee(e),[e]),z=A.useMemo(()=>mee(e),[e]),ee=A.useMemo(()=>typeof S=="function"?S:b4,[S]),Y=A.useMemo(()=>typeof w=="function"?w:b4,[w]),Q=A.useRef(null),oe=A.useRef(null),[ue,H]=A.useReducer(See,nC),{isFocused:te,isFileDialogActive:Z}=ue,ie=A.useRef(typeof window<"u"&&window.isSecureContext&&D&&pee()),G=()=>{!ie.current&&Z&&setTimeout(()=>{if(oe.current){const{files:he}=oe.current;he.length||(H({type:"closeDialog"}),Y())}},300)};A.useEffect(()=>(window.addEventListener("focus",G,!1),()=>{window.removeEventListener("focus",G,!1)}),[oe,Z,Y,ie]);const X=A.useRef([]),fe=he=>{Q.current&&Q.current.contains(he.target)||(he.preventDefault(),X.current=[])};A.useEffect(()=>(O&&(document.addEventListener("dragover",v4,!1),document.addEventListener("drop",fe,!1)),()=>{O&&(document.removeEventListener("dragover",v4),document.removeEventListener("drop",fe))}),[Q,O]),A.useEffect(()=>(!n&&k&&Q.current&&Q.current.focus(),()=>{}),[Q,k,n]);const be=A.useCallback(he=>{$?$(he):console.error(he)},[$]),we=A.useCallback(he=>{he.preventDefault(),he.persist(),qe(he),X.current=[...X.current,he.target],a1(he)&&Promise.resolve(r(he)).then(Ae=>{if(r_(he)&&!V)return;const rt=Ae.length,$e=rt>0&&cee({files:Ae,accept:B,minSize:s,maxSize:i,multiple:o,maxFiles:u,validator:q}),Ze=rt>0&&!$e;H({isDragAccept:$e,isDragReject:Ze,isDragActive:!0,type:"setDraggedFiles"}),d&&d(he)}).catch(Ae=>be(Ae))},[r,d,be,V,B,s,i,o,u,q]),pe=A.useCallback(he=>{he.preventDefault(),he.persist(),qe(he);const Ae=a1(he);if(Ae&&he.dataTransfer)try{he.dataTransfer.dropEffect="copy"}catch{}return Ae&&m&&m(he),!1},[m,V]),Ce=A.useCallback(he=>{he.preventDefault(),he.persist(),qe(he);const Ae=X.current.filter($e=>Q.current&&Q.current.contains($e)),rt=Ae.indexOf(he.target);rt!==-1&&Ae.splice(rt,1),X.current=Ae,!(Ae.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),a1(he)&&f&&f(he))},[Q,f,V]),Ke=A.useCallback((he,Ae)=>{const rt=[],$e=[];he.forEach(Ze=>{const[qt,jt]=ZN(Ze,B),[un,Pt]=JN(Ze,s,i),an=q?q(Ze):null;if(qt&&un&&!an)rt.push(Ze);else{let rr=[jt,Pt];an&&(rr=rr.concat(an)),$e.push({file:Ze,errors:rr.filter(on=>on)})}}),(!o&&rt.length>1||o&&u>=1&&rt.length>u)&&(rt.forEach(Ze=>{$e.push({file:Ze,errors:[uee]})}),rt.splice(0)),H({acceptedFiles:rt,fileRejections:$e,isDragReject:$e.length>0,type:"setFiles"}),y&&y(rt,$e,Ae),$e.length>0&&b&&b($e,Ae),rt.length>0&&x&&x(rt,Ae)},[H,o,B,s,i,u,y,x,b,q]),Me=A.useCallback(he=>{he.preventDefault(),he.persist(),qe(he),X.current=[],a1(he)&&Promise.resolve(r(he)).then(Ae=>{r_(he)&&!V||Ke(Ae,he)}).catch(Ae=>be(Ae)),H({type:"reset"})},[r,Ke,be,V]),lt=A.useCallback(()=>{if(ie.current){H({type:"openDialog"}),ee();const he={multiple:o,types:z};window.showOpenFilePicker(he).then(Ae=>r(Ae)).then(Ae=>{Ke(Ae,null),H({type:"closeDialog"})}).catch(Ae=>{vee(Ae)?(Y(Ae),H({type:"closeDialog"})):yee(Ae)?(ie.current=!1,oe.current?(oe.current.value=null,oe.current.click()):be(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):be(Ae)});return}oe.current&&(H({type:"openDialog"}),ee(),oe.current.value=null,oe.current.click())},[H,ee,Y,D,Ke,be,z,o]),bt=A.useCallback(he=>{!Q.current||!Q.current.isEqualNode(he.target)||(he.key===" "||he.key==="Enter"||he.keyCode===32||he.keyCode===13)&&(he.preventDefault(),lt())},[Q,lt]),mt=A.useCallback(()=>{H({type:"focus"})},[]),_t=A.useCallback(()=>{H({type:"blur"})},[]),Qt=A.useCallback(()=>{N||(hee()?setTimeout(lt,0):lt())},[N,lt]),xt=he=>n?null:he,wt=he=>F?null:xt(he),Ot=he=>M?null:xt(he),qe=he=>{V&&he.stopPropagation()},Le=A.useMemo(()=>(he={})=>{var Ae=he,{refKey:rt="ref",role:$e,onKeyDown:Ze,onFocus:qt,onBlur:jt,onClick:un,onDragEnter:Pt,onDragOver:an,onDragLeave:rr,onDrop:on}=Ae,oi=s_(Ae,["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return Qs(Qs({onKeyDown:wt(wu(Ze,bt)),onFocus:wt(wu(qt,mt)),onBlur:wt(wu(jt,_t)),onClick:xt(wu(un,Qt)),onDragEnter:Ot(wu(Pt,we)),onDragOver:Ot(wu(an,pe)),onDragLeave:Ot(wu(rr,Ce)),onDrop:Ot(wu(on,Me)),role:typeof $e=="string"&&$e!==""?$e:"presentation",[rt]:Q},!n&&!F?{tabIndex:0}:{}),oi)},[Q,bt,mt,_t,Qt,we,pe,Ce,Me,F,M,n]),He=A.useCallback(he=>{he.stopPropagation()},[]),Xe=A.useMemo(()=>(he={})=>{var Ae=he,{refKey:rt="ref",onChange:$e,onClick:Ze}=Ae,qt=s_(Ae,["refKey","onChange","onClick"]);const jt={accept:B,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:xt(wu($e,Me)),onClick:xt(wu(Ze,He)),tabIndex:-1,[rt]:oe};return Qs(Qs({},jt),qt)},[oe,e,o,Me,n]);return nf(Qs({},ue),{isFocused:te&&!n,getRootProps:Le,getInputProps:Xe,rootRef:Q,inputRef:oe,open:xt(lt)})}function See(t,e){switch(e.type){case"focus":return nf(Qs({},t),{isFocused:!0});case"blur":return nf(Qs({},t),{isFocused:!1});case"openDialog":return nf(Qs({},nC),{isFileDialogActive:!0});case"closeDialog":return nf(Qs({},t),{isFileDialogActive:!1});case"setDraggedFiles":return nf(Qs({},t),{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return nf(Qs({},t),{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return Qs({},nC);default:return t}}function b4(){}const[Tee,wee]=si("Dropzone component was not found in tree");function rD(t){const e=n=>{const{children:r,...i}=Ne(`Dropzone${g3(t)}`,{},n),s=wee(),o=Al(r)?r:c.jsx("span",{children:r});return s[t]?A.cloneElement(o,i):null};return e.displayName=`@mantine/dropzone/${g3(t)}`,e}const Cee=rD("accept"),Eee=rD("reject"),Aee=rD("idle");var Ey={root:"m_d46a4834",inner:"m_b85f7144",fullScreen:"m_96f6e9ad",dropzone:"m_7946116d"};const Dee={loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0,variant:"light",rejectColor:"red"},kee=(t,{radius:e,variant:n,acceptColor:r,rejectColor:i})=>{const s=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:n}),o=t.variantColorResolver({color:i||"red",theme:t,variant:n});return{root:{"--dropzone-radius":nr(e),"--dropzone-accept-color":s.color,"--dropzone-accept-bg":s.background,"--dropzone-reject-color":o.color,"--dropzone-reject-bg":o.background}}},bf=tt((t,e)=>{const n=Ne("Dropzone",Dee,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,radius:f,disabled:m,loading:y,multiple:x,maxSize:b,accept:w,children:S,onDropAny:D,onDrop:k,onReject:O,openRef:N,name:F,maxFiles:M,autoFocus:V,activateOnClick:$,activateOnDrag:q,dragEventsBubbling:B,activateOnKeyboard:z,onDragEnter:ee,onDragLeave:Y,onDragOver:Q,onFileDialogCancel:oe,onFileDialogOpen:ue,preventDropOnDocument:H,useFsAccessApi:te,getFilesFromEvent:Z,validator:ie,rejectColor:G,acceptColor:X,enablePointerEvents:fe,loaderProps:be,inputProps:we,mod:pe,...Ce}=n,Ke=vt({name:"Dropzone",classes:Ey,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,vars:d,varsResolver:kee}),{getRootProps:Me,getInputProps:lt,isDragAccept:bt,isDragReject:mt,isDragActive:_t,open:Qt}=sM({onDrop:D,onDropAccepted:k,onDropRejected:O,disabled:m||y,accept:Array.isArray(w)?w.reduce((qe,Le)=>({...qe,[Le]:[]}),{}):w,multiple:x,maxSize:b,maxFiles:M,autoFocus:V,noClick:!$,noDrag:!q,noDragEventsBubbling:!B,noKeyboard:!z,onDragEnter:ee,onDragLeave:Y,onDragOver:Q,onFileDialogCancel:oe,onFileDialogOpen:ue,preventDropOnDocument:H,useFsAccessApi:te,validator:ie,...Z?{getFilesFromEvent:Z}:null});Cg(N,Qt);const xt=_t&&bt,wt=_t&&mt,Ot=!xt&&!wt;return c.jsx(Tee,{value:{accept:xt,reject:wt,idle:Ot},children:c.jsxs(Ee,{...Me(),...Ke("root",{focusable:!0}),...Ce,mod:[{accept:xt,reject:wt,idle:Ot,disabled:m,loading:y,"activate-on-click":$},pe],children:[c.jsx(t0,{visible:y,overlayProps:{radius:f},unstyled:u,loaderProps:be}),c.jsx("input",{...lt(we),name:F}),c.jsx("div",{...Ke("inner"),ref:e,"data-enable-pointer-events":fe||void 0,children:S})]})})});bf.classes=Ey;bf.displayName="@mantine/dropzone/Dropzone";bf.Accept=Cee;bf.Idle=Aee;bf.Reject=Eee;const Ree={loading:!1,maxSize:1/0,activateOnClick:!1,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:Gi("max"),withinPortal:!0},iD=tt((t,e)=>{const n=Ne("DropzoneFullScreen",Ree,t),{classNames:r,className:i,style:s,styles:o,unstyled:u,vars:d,active:f,onDrop:m,onReject:y,zIndex:x,withinPortal:b,portalProps:w,...S}=n,D=vt({name:"DropzoneFullScreen",classes:Ey,props:n,className:i,style:s,classNames:r,styles:o,unstyled:u,rootSelector:"fullScreen"}),{resolvedClassNames:k,resolvedStyles:O}=zu({classNames:r,styles:o,props:n}),[N,F]=A.useState(0),[M,{open:V,close:$}]=pp(!1),q=z=>{z.dataTransfer?.types.includes("Files")&&(F(ee=>ee+1),V())},B=()=>{F(z=>z-1)};return A.useEffect(()=>{N===0&&$()},[N]),A.useEffect(()=>{if(f)return document.addEventListener("dragenter",q,!1),document.addEventListener("dragleave",B,!1),()=>{document.removeEventListener("dragenter",q,!1),document.removeEventListener("dragleave",B,!1)}},[f]),c.jsx(Gc,{...w,withinPortal:b,children:c.jsx(Ee,{...D("fullScreen",{style:{opacity:M?1:0,pointerEvents:M?"all":"none",zIndex:x}}),ref:e,children:c.jsx(bf,{...S,classNames:k,styles:O,unstyled:u,className:Ey.dropzone,onDrop:z=>{m?.(z),$(),F(0)},onReject:z=>{y?.(z),$(),F(0)}})})})});iD.classes=Ey;iD.displayName="@mantine/dropzone/DropzoneFullScreen";const Gd={png:"image/png",gif:"image/gif",jpeg:"image/jpeg",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",heic:"image/heic",heif:"image/heif"},Pee=[Gd.png,Gd.gif,Gd.jpeg,Gd.svg,Gd.webp,Gd.avif,Gd.heic,Gd.heif];bf.FullScreen=iD;const iy=bf;function Iee({i18n:t,user:e,postAccountAction:n}){const[r,i]=A.useState(e.avatar?e.avatar:""),s=ea({initialValues:{id:e.id,displayName:e.displayName,avatar:e.avatar?e.avatar:"",pinCode:e.pinCode?e.pinCode:"",libraryHidden:e.libraryHidden}}),o=u=>{const d={operation:"modifyuser",userid:e.id,name:u.displayName};s.isDirty("displayName")&&(d.name=u.displayName),s.isDirty("avatar")&&(d.avatar=u.avatar),s.isDirty("pinCode")&&(d.pincode=u.pinCode),s.isDirty("libraryHidden")&&(d.library_hidden=u.libraryHidden),n(d,t.get("UserProfileUpdate"),t.get("UserProfileUpdating"),t.get("UserProfileUpdated"),t.get("UserProfileNotUpdated"))};return c.jsxs("form",{onSubmit:s.onSubmit(o),children:[c.jsx(ks,{my:"sm",label:t.get("Profile"),fz:"md",c:"var(--mantine-color-text)"}),c.jsx(pn,{label:t.get("DisplayName"),name:"displayName",...s.getInputProps("displayName")}),c.jsx(Nr.Wrapper,{label:t.get("Avatar"),children:c.jsx(iy,{name:"avatar",maxSize:2*1024**2,accept:Pee,multiple:!1,styles:{inner:{pointerEvents:"all"}},onDrop:u=>{const d=new FileReader;d.onload=()=>{const f=d.result;f&&(i(f),s.setFieldValue("avatar",f))},u[0]&&d.readAsDataURL(u[0])},children:c.jsxs(ut,{justify:"center",children:[c.jsx(iy.Accept,{children:c.jsx(XY,{})}),c.jsx(iy.Reject,{children:c.jsx(KY,{})}),c.jsx(iy.Idle,{children:c.jsxs(Qh,{disabled:r==="",children:[c.jsx(Qh.Target,{children:c.jsx(_l,{radius:"xl",size:"lg",src:r!==""?r:null,onClick:u=>{u.stopPropagation()},children:r===""&&c.jsx(xp,{size:24})})}),c.jsx(Qh.Dropdown,{children:c.jsx(at,{onClick:()=>{const u=e.avatar&&r!==e.avatar?e.avatar:"";i(u),s.setFieldValue("avatar",u)},children:"Delete"})})]})}),c.jsxs("div",{children:[c.jsx(et,{inline:!0,children:"Drag image here or click to select file"}),c.jsx(et,{size:"sm",c:"dimmed",inline:!0,mt:7,children:"File should not exceed 2mb"})]})]})})}),c.jsx(Nr.Wrapper,{label:t.get("PinCode"),children:c.jsx(v2,{name:"pincode",type:"number",oneTimeCode:!0,...s.getInputProps("pinCode")})}),c.jsx(Ft,{label:In(t.get("HideUserChoiceLibrary")),children:c.jsx(pt,{mt:"xl",label:t.get("HideUserLibrary"),...s.getInputProps("library_hidden",{type:"checkbox"})})}),s.isDirty()&&c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Apply")})})]})}function Oee({i18n:t,user:e,accounts:n,canManageGroups:r,groupSelectionDatas:i,postAccountAction:s}){const o=OJ(e,n);return c.jsxs(Tt.Item,{value:e.id.toString(),children:[c.jsx(Tt.Control,{children:c.jsx(YN,{user:e,group:o})}),c.jsxs(Tt.Panel,{children:[c.jsx(LJ,{i18n:t,user:e,postAccountAction:s}),c.jsx(Iee,{i18n:t,user:e,postAccountAction:s}),c.jsx(jJ,{i18n:t,user:e,postAccountAction:s,canManageGroups:r,groupSelectionDatas:i}),c.jsx(MJ,{i18n:t,user:e,postAccountAction:s})]})]},e.id)}function Nee({i18n:t,accounts:e,canManageGroups:n,groupSelectionDatas:r,postAccountAction:i}){return e.users.map(s=>c.jsx(Oee,{i18n:t,user:s,accounts:e,postAccountAction:i,canManageGroups:n,groupSelectionDatas:r},s.id))}function Mee({i18n:t,groupSelectionDatas:e,postAccountAction:n}){const r=ea({initialValues:{username:"",password:"",groupid:"0",displayname:""}}),i=s=>{const o={operation:"createuser",username:s.username,password:s.password,groupid:s.groupid,displayname:s.displayname};n(o,t.get("UserCreation"),t.get("NewUserCreating"),t.get("NewUserCreated"),t.get("NewUserNotCreated"))};return c.jsxs("form",{onSubmit:r.onSubmit(i),children:[c.jsx(pn,{required:!0,label:t.get("Username"),name:"username",...r.getInputProps("username")}),c.jsx(g2,{required:!0,label:t.get("Password"),name:"username",type:"password",...r.getInputProps("password")}),c.jsx(pn,{required:!0,label:t.get("DisplayName"),name:"displayname",...r.getInputProps("displayname")}),c.jsx(Cr,{required:!0,label:t.get("Group"),name:"groupId",data:e,...r.getInputProps("groupid")}),r.isValid()&&c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Create")})})]})}function jee({i18n:t,canManageUsers:e,groupSelectionDatas:n,postAccountAction:r}){const i={id:0,username:t.get("NewUser")},s={id:0,displayName:""};return e?c.jsxs(Tt.Item,{value:i.id.toString(),children:[c.jsx(Tt.Control,{children:c.jsx(YN,{user:i,group:s})}),c.jsx(Tt.Panel,{children:c.jsx(Mee,{i18n:t,groupSelectionDatas:n,postAccountAction:r})})]},i.id):void 0}function x4({i18n:t,session:e,accounts:n,postAccountAction:r}){const i=e.havePermission(dn.users_manage),s=e.havePermission(dn.groups_manage),o=XN(n.groups,t.get("None"));return c.jsxs(Tt,{children:[c.jsx(jee,{i18n:t,canManageUsers:i,groupSelectionDatas:o,postAccountAction:r}),c.jsx(Nee,{i18n:t,accounts:n,postAccountAction:r,canManageGroups:s,groupSelectionDatas:o})]})}const sD=({i18n:t,session:e})=>{const[n,r]=A.useState({users:[],groups:[],enabled:!0,localhost:!1}),i=e.havePermission(dn.settings_modify),s=e.havePermission(dn.groups_manage),[o,u]=A.useState(!1);A.useEffect(()=>{e.subscribeTo("Accounts"),e.stopPlayerSse(),e.setDocumentI18nTitle("ManageAccounts"),e.setNavbarManage(sD.name)},[]),A.useEffect(()=>{o&&!e.updateAccounts||(u(!0),e.setUpdateAccounts(!1),Rt.get(Yw+"accounts").then(function(f){r(f.data)}).catch(function(f){!f.response&&f.request?t.showServerUnreachable():Wn({title:t.get("Error"),message:t.get("AccountsNotReceived")})}))},[e.updateAccounts,e.setUpdateAccounts]);const d=(f,m,y,x,b)=>(ZA({id:"account-action",title:m,message:y}),Rt.post(Yw+"action",f).then(function(){eD({id:"account-action",title:m,message:x})}).catch(function(w){!w.response&&w.request?(Lu("account-action"),t.showServerUnreachable()):tD({id:"account-action",title:t.get("Error"),message:b})}));return c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:s?c.jsxs(Kt,{defaultValue:n.enabled&&e.authenticate?"users":"settings",children:[c.jsxs(Kt.List,{children:[e.authenticate&&c.jsx(Kt.Tab,{value:"users",children:t.get("Users")}),e.authenticate&&c.jsx(Kt.Tab,{value:"groups",children:t.get("Groups")}),i&&c.jsx(Kt.Tab,{value:"settings",children:t.get("Settings")})]}),e.authenticate&&c.jsx(Kt.Panel,{value:"users",children:c.jsx(x4,{i18n:t,session:e,accounts:n,postAccountAction:d})}),e.authenticate&&c.jsx(Kt.Panel,{value:"groups",children:c.jsx(PJ,{i18n:t,accounts:n,postAccountAction:d})}),i&&c.jsx(Kt.Panel,{value:"settings",children:c.jsx(aJ,{i18n:t,session:e,accounts:n})})]}):e.authenticate?c.jsx(x4,{i18n:t,session:e,accounts:n,postAccountAction:d}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})})},Lee=["Process.Exit","Process.Reboot","Process.Reboot.Trace","Server.ResetCache","Server.Restart","Computer.Shutdown","Server.ScanAllSharedFolders","Server.ScanAllSharedFoldersCancel","Server.ScanAllSharedFoldersCancel"],uf=async t=>{if(Lee.includes(t))return Rt.post(BN,{operation:t}).then(e=>e.data)},aD=({i18n:t,session:e})=>{const n=e.havePermission(dn.settings_modify),[r,i]=A.useState({canShutdownComputer:!1}),s=u0(),o=e.havePermission(dn.server_restart),[u,d]=A.useState(!1),f=async()=>{await uf("Server.Restart")},m=e.havePermission(dn.computer_shutdown),[y,x]=A.useState(!1),b=async()=>{await uf("Computer.Shutdown")},w=e.havePermission(dn.application_restart|dn.application_shutdown),[S,D]=A.useState(!1),k=async()=>{await uf("Process.Reboot")},O=e.havePermission(dn.application_shutdown),[N,F]=A.useState(!1),M=async()=>{await uf("Process.Exit")};return A.useEffect(()=>{e.unsubscribe(),e.stopPlayerSse(),e.setDocumentI18nTitle("Tools"),e.setNavbarManage(aD.name),Rt.get(BN).then(V=>{i(V.data)})},[]),c.jsxs(Ee,{style:{maxWidth:1024},mx:"auto",children:[o&&c.jsxs(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:u,onClose:()=>d(!1),title:c.jsx(et,{c:"red",children:t.get("Warning")}),children:[c.jsx(et,{fw:600,children:t.get("ThisRestartsMediaServices")}),c.jsx(et,{children:t.get("NetworkConnectionsWillClosed")}),c.jsx(et,{children:t.get("AreYouSureContinue")}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>d(!1),variant:"default",children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{d(!1),f()},children:t.get("Confirm")})]})]}),w&&c.jsxs(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:S,onClose:()=>D(!1),title:c.jsx(et,{c:"red",children:t.get("Warning")}),children:[c.jsx(et,{fw:600,children:t.get("ThisStopsRestartsApp")}),c.jsxs(Ks,{children:[c.jsx(Ks.Item,{children:c.jsx(yl,{children:t.get("NetworkConnectionsWillClosed")})}),c.jsx(Ks.Item,{children:c.jsx(yl,{children:t.get("YouWillTemporarilyNotAbleAccessServer")})})]}),c.jsx(et,{children:t.get("AreYouSureContinue")}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>D(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{D(!1),k()},children:t.get("Confirm")})]})]}),O&&c.jsxs(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:N,onClose:()=>F(!1),title:c.jsx(et,{c:"red",children:t.get("Warning")}),children:[c.jsx(et,{fw:600,children:t.get("ThisClosesApp")}),c.jsxs(Ks,{children:[c.jsx(Ks.Item,{children:c.jsx(yl,{children:t.get("NetworkConnectionsWillClosed")})}),c.jsx(Ks.Item,{children:c.jsx(yl,{color:"red",children:t.get("YouWillNotAbleAccessServer")})})]}),c.jsx(et,{children:t.get("AreYouSureContinue")}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>F(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{F(!1),M()},children:t.get("Confirm")})]})]}),m&&c.jsxs(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:y,onClose:()=>x(!1),title:c.jsx(et,{c:"red",children:t.get("Warning")}),children:[c.jsx(et,{fw:600,children:t.get("ThisShutDownComputer")}),c.jsxs(Ks,{children:[c.jsx(Ks.Item,{children:c.jsx(yl,{children:t.get("NetworkConnectionsWillClosed")})}),c.jsx(Ks.Item,{children:c.jsx(yl,{color:"red",children:t.get("YouWillNotAbleAccessServerOrComputer")})}),!r.canShutdownComputer&&c.jsx(Ks.Item,{children:c.jsx(yl,{color:"orange",children:t.get("ShutDownComputerRequiresRoot")})})]}),c.jsx(et,{children:t.get("AreYouSureContinue")}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>x(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>{x(!1),b()},children:t.get("Confirm")})]})]}),c.jsxs(tn,{children:[n&&c.jsx(at,{variant:"default",leftSection:c.jsx(OK,{}),onClick:()=>{s("/logs")},children:"View Logs"}),o&&c.jsx(Ft,{label:t.get("ThisRestartsMediaServices"),...mn,children:c.jsx(at,{variant:"default",leftSection:c.jsx(uN,{}),onClick:()=>{d(!0)},children:t.get("RestartServer")})}),w&&c.jsx(Ft,{label:t.get("ThisStopsRestartsApp"),...mn,children:c.jsx(at,{variant:"default",leftSection:c.jsx(DK,{}),onClick:()=>{D(!0)},children:t.get("RestartApplication")})}),O&&c.jsx(Ft,{label:t.get("ThisClosesApp"),...mn,children:c.jsx(at,{variant:"default",leftSection:c.jsx(xK,{strokeWidth:3,color:"red"}),onClick:()=>{F(!0)},children:t.get("ShutdownApplication")})}),m&&c.jsx(Ft,{label:t.get("ThisShutDownComputer"),...mn,children:c.jsx(at,{variant:"default",leftSection:c.jsx(hg,{strokeWidth:2,color:"red"}),onClick:()=>{x(!0)},children:t.get("ShutDownComputer")})})]})]})};function DT({i18n:t,title:e,color:n,duration:r,setDuration:i,test:s}){const o=t.get("Never"),u=[{value:0,label:o},{value:1e4,label:"10s"}],d=f=>f===0?s?o:"":f/1e3+"s";return c.jsxs(Hi,{shadow:"xs",py:"xs",px:"xl",m:"10",children:[c.jsxs(ut,{justify:"space-between",children:[c.jsx(et,{size:"sm",children:e}),c.jsx(at,{radius:"xl",size:"compact-xs",onClick:()=>s&&s({message:e,message2:"Test message"}),children:"Try"})]}),c.jsx(i0,{defaultValue:r,label:d,marks:u,min:0,max:1e4,step:1e3,mb:"xl",color:n,onChangeEnd:i})]})}function kT({title:t,storageKey:e,defaultValue:n,visibleFrom:r,hiddenFrom:i}){const[s,o]=A.useState(n),[u,d]=So({key:e,defaultValue:n});return A.useEffect(()=>{o(u)},[u]),c.jsxs(Hi,{shadow:"xs",py:"xs",px:"xl",m:"10",children:[c.jsxs(ut,{children:[c.jsx(Pg,{visibleFrom:r,hiddenFrom:i,children:"Current"}),c.jsx(et,{children:t}),c.jsxs(et,{children:[u,"px"]})]}),c.jsx(i0,{value:s,min:100,max:500,step:10,mb:"xl",onChange:o,onChangeEnd:d})]})}function Bee(){const[t,e]=So({key:"mantine-scrollbar-size",defaultValue:10});return c.jsxs(Hi,{shadow:"xs",py:"xs",px:"xl",m:"10",children:[c.jsx(i0,{value:t,min:1,max:20,mb:"xl",onChange:e}),c.jsx(Hi,{shadow:"xs",withBorder:!0,children:c.jsx(Ar,{h:100,type:"always",scrollbars:"y",children:c.jsx(Ee,{h:600,c:"blue"})})})]})}const a_=({i18n:t,session:e})=>(A.useEffect(()=>{e.unsubscribe(),e.stopPlayerSse(),e.setDocumentI18nTitle("Customize"),e.setNavbarManage(a_.name)},[]),c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsxs(Tt,{children:[c.jsxs(Tt.Item,{value:"NotificationDuration",children:[c.jsx(Tt.Control,{icon:c.jsx(_X,{}),children:"Notification duration"}),c.jsxs(Tt.Panel,{children:[c.jsx(DT,{i18n:t,title:"Info auto close",duration:R2(),setDuration:nJ,test:e_}),c.jsx(DT,{i18n:t,title:"Warning auto close",duration:VN(),setDuration:rJ,test:JA,color:"orange"}),c.jsx(DT,{i18n:t,title:"Error auto close",duration:QA(),setDuration:iJ,test:Wn,color:"red"})]})]}),c.jsxs(Tt.Item,{value:"ScrollbarSize",children:[c.jsx(Tt.Control,{icon:c.jsx(MX,{}),children:"Scrollbar size"}),c.jsx(Tt.Panel,{children:c.jsx(Bee,{})})]}),c.jsxs(Tt.Item,{value:"NavbarWidth",children:[c.jsx(Tt.Control,{icon:c.jsx(hX,{}),children:"Navbar width"}),c.jsxs(Tt.Panel,{children:[c.jsx(kT,{title:"Large viewport",visibleFrom:"lg",storageKey:"mantine-navbar-width-lg",defaultValue:400}),c.jsx(kT,{title:"Medium viewport",visibleFrom:"md",hiddenFrom:"lg",storageKey:"mantine-navbar-width-md",defaultValue:300}),c.jsx(kT,{title:"Small viewport",visibleFrom:"sm",hiddenFrom:"md",storageKey:"mantine-navbar-width-sm",defaultValue:250})]})]}),c.jsxs(Tt.Item,{value:"PlayerSettings",children:[c.jsx(Tt.Control,{icon:c.jsx(Zh,{}),children:"Player Settings"}),c.jsxs(Tt.Panel,{children:[c.jsxs(Hi,{shadow:"xs",py:"xs",px:"xl",m:"10",children:[c.jsx(et,{children:"Player Navbar"}),c.jsx(pt,{label:"Use Navbar on player",checked:e.playerNavbar,onChange:n=>e.setPlayerNavbar(n.currentTarget.checked)})]}),c.jsxs(Hi,{shadow:"xs",py:"xs",px:"xl",m:"10",children:[c.jsx(et,{children:"Player show metadata"}),c.jsx(pt,{label:"Direct play on playable content",checked:e.playerDirectPlay,onChange:n=>e.setPlayerDirectPlay(n.currentTarget.checked)})]})]})]})]})}));function Fee({i18n:t}){const e=G8("dark",{getInitialValueInEffect:!0}),{toggleColorScheme:n}=X5();return c.jsx(br,{variant:"default","aria-label":t.get("TogglesBetweenLightAndDarkModes"),onClick:()=>n(),size:"input-xs",children:e==="dark"?c.jsx(YK,{size:16}):c.jsx(zY,{size:16})})}var sy={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var Uee=sy.exports,_4;function zee(){return _4||(_4=1,function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",u="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",y=1,x=2,b=4,w=1,S=2,D=1,k=2,O=4,N=8,F=16,M=32,V=64,$=128,q=256,B=512,z=30,ee="...",Y=800,Q=16,oe=1,ue=2,H=3,te=1/0,Z=9007199254740991,ie=17976931348623157e292,G=NaN,X=4294967295,fe=X-1,be=X>>>1,we=[["ary",$],["bind",D],["bindKey",k],["curry",N],["curryRight",F],["flip",B],["partial",M],["partialRight",V],["rearg",q]],pe="[object Arguments]",Ce="[object Array]",Ke="[object AsyncFunction]",Me="[object Boolean]",lt="[object Date]",bt="[object DOMException]",mt="[object Error]",_t="[object Function]",Qt="[object GeneratorFunction]",xt="[object Map]",wt="[object Number]",Ot="[object Null]",qe="[object Object]",Le="[object Promise]",He="[object Proxy]",Xe="[object RegExp]",he="[object Set]",Ae="[object String]",rt="[object Symbol]",$e="[object Undefined]",Ze="[object WeakMap]",qt="[object WeakSet]",jt="[object ArrayBuffer]",un="[object DataView]",Pt="[object Float32Array]",an="[object Float64Array]",rr="[object Int8Array]",on="[object Int16Array]",oi="[object Int32Array]",Hr="[object Uint8Array]",kn="[object Uint8ClampedArray]",qr="[object Uint16Array]",xr="[object Uint32Array]",Ka=/\b__p \+= '';/g,Os=/\b(__p \+=) '' \+/g,us=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cs=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,re=RegExp(cs.source),ye=RegExp(J.source),Be=/<%-([\s\S]+?)%>/g,ft=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,Zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cr=/^\w*$/,ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/[\\^$.*+?()[\]{}|]/g,On=RegExp(En.source),dr=/^\s+/,Gr=/\s/,ct=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sn=/\{\n\/\* \[wrapped with (.+)\] \*/,cn=/,? & /,Zn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_n=/[()=,{}\[\]\/\s]/,_r=/\\(\\)?/g,At=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wi=/\w*$/,Ns=/^[-+]0x[0-9a-f]+$/i,Dr=/^0b[01]+$/i,Tp=/^\[object .+?Constructor\]$/,Qa=/^0o[0-7]+$/i,Fn=/^(?:0|[1-9]\d*)$/,No=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mo=/($^)/,wp=/['\n\r\u2028\u2029\\]/g,qu="\\ud800-\\udfff",b0="\\u0300-\\u036f",Gu="\\ufe20-\\ufe2f",Nl="\\u20d0-\\u20ff",ds=b0+Gu+Nl,Wu="\\u2700-\\u27bf",_f="a-z\\xdf-\\xf6\\xf8-\\xff",Ml="\\xac\\xb1\\xd7\\xf7",jl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ll="\\u2000-\\u206f",Cp=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jo="A-Z\\xc0-\\xd6\\xd8-\\xde",li="\\ufe0e\\ufe0f",Lo=Ml+jl+Ll+Cp,Bo="['’]",Zc="["+qu+"]",Jc="["+Lo+"]",Fo="["+ds+"]",Ep="\\d+",Wr="["+Wu+"]",Uo="["+_f+"]",Sf="[^"+qu+Lo+Ep+Wu+_f+jo+"]",zo="\\ud83c[\\udffb-\\udfff]",Za="(?:"+Fo+"|"+zo+")",Xi="[^"+qu+"]",ed="(?:\\ud83c[\\udde6-\\uddff]){2}",Ms="[\\ud800-\\udbff][\\udc00-\\udfff]",ta="["+jo+"]",Bl="\\u200d",Ja="(?:"+Uo+"|"+Sf+")",Xu="(?:"+ta+"|"+Sf+")",Tf="(?:"+Bo+"(?:d|ll|m|re|s|t|ve))?",td="(?:"+Bo+"(?:D|LL|M|RE|S|T|VE))?",Yu=Za+"?",nd="["+li+"]?",wf="(?:"+Bl+"(?:"+[Xi,ed,Ms].join("|")+")"+nd+Yu+")*",Aa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$o="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Cf=nd+Yu+wf,rd="(?:"+[Wr,ed,Ms].join("|")+")"+Cf,Ap="(?:"+[Xi+Fo+"?",Fo,ed,Ms,Zc].join("|")+")",Fl=RegExp(Bo,"g"),Da=RegExp(Fo,"g"),eo=RegExp(zo+"(?="+zo+")|"+Ap+Cf,"g"),to=RegExp([ta+"?"+Uo+"+"+Tf+"(?="+[Jc,ta,"$"].join("|")+")",Xu+"+"+td+"(?="+[Jc,ta+Ja,"$"].join("|")+")",ta+"?"+Ja+"+"+Tf,ta+"+"+td,$o,Aa,Ep,rd].join("|"),"g"),ka=RegExp("["+Bl+qu+ds+li+"]"),Ef=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,id=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Af=-1,zn={};zn[Pt]=zn[an]=zn[rr]=zn[on]=zn[oi]=zn[Hr]=zn[kn]=zn[qr]=zn[xr]=!0,zn[pe]=zn[Ce]=zn[jt]=zn[Me]=zn[un]=zn[lt]=zn[mt]=zn[_t]=zn[xt]=zn[wt]=zn[qe]=zn[Xe]=zn[he]=zn[Ae]=zn[Ze]=!1;var $n={};$n[pe]=$n[Ce]=$n[jt]=$n[un]=$n[Me]=$n[lt]=$n[Pt]=$n[an]=$n[rr]=$n[on]=$n[oi]=$n[xt]=$n[wt]=$n[qe]=$n[Xe]=$n[he]=$n[Ae]=$n[rt]=$n[Hr]=$n[kn]=$n[qr]=$n[xr]=!0,$n[mt]=$n[_t]=$n[Ze]=!1;var Df={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},Ri={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vo={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},sd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ku=parseFloat,x0=parseInt,ad=typeof of=="object"&&of&&of.Object===Object&&of,Qu=typeof self=="object"&&self&&self.Object===Object&&self,kr=ad||Qu||Function("return this")(),Ho=e&&!e.nodeType&&e,js=Ho&&!0&&t&&!t.nodeType&&t,Dp=js&&js.exports===Ho,kf=Dp&&ad.process,fs=function(){try{var Te=js&&js.require&&js.require("util").types;return Te||kf&&kf.binding&&kf.binding("util")}catch{}}(),od=fs&&fs.isArrayBuffer,kp=fs&&fs.isDate,Zu=fs&&fs.isMap,Ul=fs&&fs.isRegExp,zl=fs&&fs.isSet,Ju=fs&&fs.isTypedArray;function fr(Te,We,Ue){switch(Ue.length){case 0:return Te.call(We);case 1:return Te.call(We,Ue[0]);case 2:return Te.call(We,Ue[0],Ue[1]);case 3:return Te.call(We,Ue[0],Ue[1],Ue[2])}return Te.apply(We,Ue)}function Ra(Te,We,Ue,yt){for(var zt=-1,An=Te==null?0:Te.length;++zt<An;){var Rr=Te[zt];We(yt,Rr,Ue(Rr),Te)}return yt}function wi(Te,We){for(var Ue=-1,yt=Te==null?0:Te.length;++Ue<yt&&We(Te[Ue],Ue,Te)!==!1;);return Te}function Rp(Te,We){for(var Ue=Te==null?0:Te.length;Ue--&&We(Te[Ue],Ue,Te)!==!1;);return Te}function Pp(Te,We){for(var Ue=-1,yt=Te==null?0:Te.length;++Ue<yt;)if(!We(Te[Ue],Ue,Te))return!1;return!0}function na(Te,We){for(var Ue=-1,yt=Te==null?0:Te.length,zt=0,An=[];++Ue<yt;){var Rr=Te[Ue];We(Rr,Ue,Te)&&(An[zt++]=Rr)}return An}function ld(Te,We){var Ue=Te==null?0:Te.length;return!!Ue&&Hl(Te,We,0)>-1}function Rf(Te,We,Ue){for(var yt=-1,zt=Te==null?0:Te.length;++yt<zt;)if(Ue(We,Te[yt]))return!0;return!1}function sr(Te,We){for(var Ue=-1,yt=Te==null?0:Te.length,zt=Array(yt);++Ue<yt;)zt[Ue]=We(Te[Ue],Ue,Te);return zt}function ra(Te,We){for(var Ue=-1,yt=We.length,zt=Te.length;++Ue<yt;)Te[zt+Ue]=We[Ue];return Te}function $l(Te,We,Ue,yt){var zt=-1,An=Te==null?0:Te.length;for(yt&&An&&(Ue=Te[++zt]);++zt<An;)Ue=We(Ue,Te[zt],zt,Te);return Ue}function ec(Te,We,Ue,yt){var zt=Te==null?0:Te.length;for(yt&&zt&&(Ue=Te[--zt]);zt--;)Ue=We(Ue,Te[zt],zt,Te);return Ue}function Vl(Te,We){for(var Ue=-1,yt=Te==null?0:Te.length;++Ue<yt;)if(We(Te[Ue],Ue,Te))return!0;return!1}var qo=ud("length");function _0(Te){return Te.split("")}function Ip(Te){return Te.match(Zn)||[]}function Pf(Te,We,Ue){var yt;return Ue(Te,function(zt,An,Rr){if(We(zt,An,Rr))return yt=An,!1}),yt}function tc(Te,We,Ue,yt){for(var zt=Te.length,An=Ue+(yt?1:-1);yt?An--:++An<zt;)if(We(Te[An],An,Te))return An;return-1}function Hl(Te,We,Ue){return We===We?Fp(Te,We,Ue):tc(Te,ql,Ue)}function If(Te,We,Ue,yt){for(var zt=Ue-1,An=Te.length;++zt<An;)if(yt(Te[zt],We))return zt;return-1}function ql(Te){return Te!==Te}function nc(Te,We){var Ue=Te==null?0:Te.length;return Ue?ic(Te,We)/Ue:G}function ud(Te){return function(We){return We==null?n:We[Te]}}function rc(Te){return function(We){return Te==null?n:Te[We]}}function Of(Te,We,Ue,yt,zt){return zt(Te,function(An,Rr,Sn){Ue=yt?(yt=!1,An):We(Ue,An,Rr,Sn)}),Ue}function Op(Te,We){var Ue=Te.length;for(Te.sort(We);Ue--;)Te[Ue]=Te[Ue].value;return Te}function ic(Te,We){for(var Ue,yt=-1,zt=Te.length;++yt<zt;){var An=We(Te[yt]);An!==n&&(Ue=Ue===n?An:Ue+An)}return Ue}function ia(Te,We){for(var Ue=-1,yt=Array(Te);++Ue<Te;)yt[Ue]=We(Ue);return yt}function S0(Te,We){return sr(We,function(Ue){return[Ue,Te[Ue]]})}function Np(Te){return Te&&Te.slice(0,Yl(Te)+1).replace(dr,"")}function Yi(Te){return function(We){return Te(We)}}function Gl(Te,We){return sr(We,function(Ue){return Te[Ue]})}function Wl(Te,We){return Te.has(We)}function Go(Te,We){for(var Ue=-1,yt=Te.length;++Ue<yt&&Hl(We,Te[Ue],0)>-1;);return Ue}function Xl(Te,We){for(var Ue=Te.length;Ue--&&Hl(We,Te[Ue],0)>-1;);return Ue}function T0(Te,We){for(var Ue=Te.length,yt=0;Ue--;)Te[Ue]===We&&++yt;return yt}var sc=rc(Df),Mp=rc(Ri);function Nf(Te){return"\\"+sd[Te]}function cd(Te,We){return Te==null?n:Te[We]}function Pa(Te){return ka.test(Te)}function jp(Te){return Ef.test(Te)}function Lp(Te){for(var We,Ue=[];!(We=Te.next()).done;)Ue.push(We.value);return Ue}function Wo(Te){var We=-1,Ue=Array(Te.size);return Te.forEach(function(yt,zt){Ue[++We]=[zt,yt]}),Ue}function Bp(Te,We){return function(Ue){return Te(We(Ue))}}function no(Te,We){for(var Ue=-1,yt=Te.length,zt=0,An=[];++Ue<yt;){var Rr=Te[Ue];(Rr===We||Rr===m)&&(Te[Ue]=m,An[zt++]=Ue)}return An}function dd(Te){var We=-1,Ue=Array(Te.size);return Te.forEach(function(yt){Ue[++We]=yt}),Ue}function w0(Te){var We=-1,Ue=Array(Te.size);return Te.forEach(function(yt){Ue[++We]=[yt,yt]}),Ue}function Fp(Te,We,Ue){for(var yt=Ue-1,zt=Te.length;++yt<zt;)if(Te[yt]===We)return yt;return-1}function Ki(Te,We,Ue){for(var yt=Ue+1;yt--;)if(Te[yt]===We)return yt;return yt}function Pi(Te){return Pa(Te)?Sr(Te):qo(Te)}function Qi(Te){return Pa(Te)?ro(Te):_0(Te)}function Yl(Te){for(var We=Te.length;We--&&Gr.test(Te.charAt(We)););return We}var Kl=rc(Vo);function Sr(Te){for(var We=eo.lastIndex=0;eo.test(Te);)++We;return We}function ro(Te){return Te.match(eo)||[]}function Mf(Te){return Te.match(to)||[]}var Ql=function Te(We){We=We==null?kr:io.defaults(kr.Object(),We,io.pick(kr,id));var Ue=We.Array,yt=We.Date,zt=We.Error,An=We.Function,Rr=We.Math,Sn=We.Object,ac=We.RegExp,fd=We.String,Zi=We.TypeError,so=Ue.prototype,C0=An.prototype,Xo=Sn.prototype,Zl=We["__core-js_shared__"],oc=C0.toString,Mn=Xo.hasOwnProperty,hs=0,jf=function(){var p=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Ci=Xo.toString,Ii=oc.call(Sn),Jl=kr._,Lf=ac("^"+oc.call(Mn).replace(En,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yo=Dp?We.Buffer:n,Ls=We.Symbol,eu=We.Uint8Array,Ko=Yo?Yo.allocUnsafe:n,lc=Bp(Sn.getPrototypeOf,Sn),uc=Sn.create,Qo=Xo.propertyIsEnumerable,hd=so.splice,Oi=Ls?Ls.isConcatSpreadable:n,Ni=Ls?Ls.iterator:n,Ei=Ls?Ls.toStringTag:n,cc=function(){try{var p=lu(Sn,"defineProperty");return p({},"",{}),p}catch{}}(),pd=We.clearTimeout!==kr.clearTimeout&&We.clearTimeout,tu=yt&&yt.now!==kr.Date.now&&yt.now,md=We.setTimeout!==kr.setTimeout&&We.setTimeout,ao=Rr.ceil,sa=Rr.floor,Bs=Sn.getOwnPropertySymbols,Zo=Yo?Yo.isBuffer:n,dc=We.isFinite,ps=so.join,ms=Bp(Sn.keys,Sn),ar=Rr.max,hr=Rr.min,Fs=yt.now,Jo=We.parseInt,Bf=Rr.random,gd=so.reverse,aa=lu(We,"DataView"),Yt=lu(We,"Map"),Un=lu(We,"Promise"),$t=lu(We,"Set"),Mr=lu(We,"WeakMap"),Mi=lu(Sn,"create"),el=Mr&&new Mr,gs={},Up=cl(aa),zp=cl(Yt),fc=cl(Un),hc=cl($t),$p=cl(Mr),oo=Ls?Ls.prototype:n,lo=oo?oo.valueOf:n,T=oo?oo.toString:n;function _(p){if(Pr(p)&&!rn(p)&&!(p instanceof U)){if(p instanceof j)return p;if(Mn.call(p,"__wrapped__"))return fi(p)}return new j(p)}var I=function(){function p(){}return function(g){if(!wr(g))return{};if(uc)return uc(g);p.prototype=g;var E=new p;return p.prototype=n,E}}();function P(){}function j(p,g){this.__wrapped__=p,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}_.templateSettings={escape:Be,evaluate:ft,interpolate:Nt,variable:"",imports:{_}},_.prototype=P.prototype,_.prototype.constructor=_,j.prototype=I(P.prototype),j.prototype.constructor=j;function U(p){this.__wrapped__=p,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function ae(){var p=new U(this.__wrapped__);return p.__actions__=di(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=di(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=di(this.__views__),p}function le(){if(this.__filtered__){var p=new U(this);p.__dir__=-1,p.__filtered__=!0}else p=this.clone(),p.__dir__*=-1;return p}function de(){var p=this.__wrapped__.value(),g=this.__dir__,E=rn(p),L=g<0,K=E?p.length:0,se=jb(0,K,this.__views__),ge=se.start,xe=se.end,ke=xe-ge,nt=L?xe:ge-1,st=this.__iteratees__,dt=st.length,St=0,It=hr(ke,this.__takeCount__);if(!E||!L&&K==ke&&It==ke)return Sb(p,this.__actions__);var Jt=[];e:for(;ke--&&St<It;){nt+=g;for(var xn=-1,en=p[nt];++xn<dt;){var Pn=st[xn],Ln=Pn.iteratee,Ba=Pn.type,Gs=Ln(en);if(Ba==ue)en=Gs;else if(!Gs){if(Ba==oe)continue e;break e}}Jt[St++]=en}return Jt}U.prototype=I(P.prototype),U.prototype.constructor=U;function ce(p){var g=-1,E=p==null?0:p.length;for(this.clear();++g<E;){var L=p[g];this.set(L[0],L[1])}}function Se(){this.__data__=Mi?Mi(null):{},this.size=0}function ze(p){var g=this.has(p)&&delete this.__data__[p];return this.size-=g?1:0,g}function gt(p){var g=this.__data__;if(Mi){var E=g[p];return E===d?n:E}return Mn.call(g,p)?g[p]:n}function Ye(p){var g=this.__data__;return Mi?g[p]!==n:Mn.call(g,p)}function Lt(p,g){var E=this.__data__;return this.size+=this.has(p)?0:1,E[p]=Mi&&g===n?d:g,this}ce.prototype.clear=Se,ce.prototype.delete=ze,ce.prototype.get=gt,ce.prototype.has=Ye,ce.prototype.set=Lt;function Ct(p){var g=-1,E=p==null?0:p.length;for(this.clear();++g<E;){var L=p[g];this.set(L[0],L[1])}}function jr(){this.__data__=[],this.size=0}function ui(p){var g=this.__data__,E=yd(g,p);if(E<0)return!1;var L=g.length-1;return E==L?g.pop():hd.call(g,E,1),--this.size,!0}function vs(p){var g=this.__data__,E=yd(g,p);return E<0?n:g[E][1]}function tl(p){return yd(this.__data__,p)>-1}function oa(p,g){var E=this.__data__,L=yd(E,p);return L<0?(++this.size,E.push([p,g])):E[L][1]=g,this}Ct.prototype.clear=jr,Ct.prototype.delete=ui,Ct.prototype.get=vs,Ct.prototype.has=tl,Ct.prototype.set=oa;function ti(p){var g=-1,E=p==null?0:p.length;for(this.clear();++g<E;){var L=p[g];this.set(L[0],L[1])}}function pc(){this.size=0,this.__data__={hash:new ce,map:new(Yt||Ct),string:new ce}}function mc(p){var g=wd(this,p).delete(p);return this.size-=g?1:0,g}function or(p){return wd(this,p).get(p)}function nu(p){return wd(this,p).has(p)}function ci(p,g){var E=wd(this,p),L=E.size;return E.set(p,g),this.size+=E.size==L?0:1,this}ti.prototype.clear=pc,ti.prototype.delete=mc,ti.prototype.get=or,ti.prototype.has=nu,ti.prototype.set=ci;function nl(p){var g=-1,E=p==null?0:p.length;for(this.__data__=new ti;++g<E;)this.add(p[g])}function Vp(p){return this.__data__.set(p,d),this}function ob(p){return this.__data__.has(p)}nl.prototype.add=nl.prototype.push=Vp,nl.prototype.has=ob;function Ji(p){var g=this.__data__=new Ct(p);this.size=g.size}function lb(){this.__data__=new Ct,this.size=0}function Hp(p){var g=this.__data__,E=g.delete(p);return this.size=g.size,E}function E0(p){return this.__data__.get(p)}function ub(p){return this.__data__.has(p)}function qp(p,g){var E=this.__data__;if(E instanceof Ct){var L=E.__data__;if(!Yt||L.length<i-1)return L.push([p,g]),this.size=++E.size,this;E=this.__data__=new ti(L)}return E.set(p,g),this.size=E.size,this}Ji.prototype.clear=lb,Ji.prototype.delete=Hp,Ji.prototype.get=E0,Ji.prototype.has=ub,Ji.prototype.set=qp;function A0(p,g){var E=rn(p),L=!E&&pl(p),K=!E&&!L&&yu(p),se=!E&&!L&&!K&&Bd(p),ge=E||L||K||se,xe=ge?ia(p.length,fd):[],ke=xe.length;for(var nt in p)(g||Mn.call(p,nt))&&!(ge&&(nt=="length"||K&&(nt=="offset"||nt=="parent")||se&&(nt=="buffer"||nt=="byteLength"||nt=="byteOffset")||Ma(nt,ke)))&&xe.push(nt);return xe}function vd(p){var g=p.length;return g?p[tm(0,g-1)]:n}function cb(p,g){return dh(di(p),Oa(g,0,p.length))}function db(p){return dh(di(p))}function uo(p,g,E){(E!==n&&!ws(p[g],E)||E===n&&!(g in p))&&Ia(p,g,E)}function gc(p,g,E){var L=p[g];(!(Mn.call(p,g)&&ws(L,E))||E===n&&!(g in p))&&Ia(p,g,E)}function yd(p,g){for(var E=p.length;E--;)if(ws(p[E][0],g))return E;return-1}function ru(p,g,E,L){return il(p,function(K,se,ge){g(L,K,E(K),ge)}),L}function rl(p,g){return p&&xs(g,mi(g),p)}function Ff(p,g){return p&&xs(g,xi(g),p)}function Ia(p,g,E){g=="__proto__"&&cc?cc(p,g,{configurable:!0,enumerable:!0,value:E,writable:!0}):p[g]=E}function Uf(p,g){for(var E=-1,L=g.length,K=Ue(L),se=p==null;++E<L;)K[E]=se?n:Ch(p,g[E]);return K}function Oa(p,g,E){return p===p&&(E!==n&&(p=p<=E?p:E),g!==n&&(p=p>=g?p:g)),p}function ji(p,g,E,L,K,se){var ge,xe=g&y,ke=g&x,nt=g&b;if(E&&(ge=K?E(p,L,K,se):E(p)),ge!==n)return ge;if(!wr(p))return p;var st=rn(p);if(st){if(ge=J0(p),!xe)return di(p,ge)}else{var dt=bi(p),St=dt==_t||dt==Qt;if(yu(p))return q0(p,xe);if(dt==qe||dt==pe||St&&!K){if(ge=ke||St?{}:ev(p),!xe)return ke?Jf(p,Ff(ge,p)):om(p,rl(ge,p))}else{if(!$n[dt])return K?p:{};ge=tv(p,dt,xe)}}se||(se=new Ji);var It=se.get(p);if(It)return It;se.set(p,ge),Dx(p)?p.forEach(function(en){ge.add(ji(en,g,E,en,p,se))}):Im(p)&&p.forEach(function(en,Pn){ge.set(Pn,ji(en,g,E,Pn,p,se))});var Jt=nt?ke?dm:cm:ke?xi:mi,xn=st?n:Jt(p);return wi(xn||p,function(en,Pn){xn&&(Pn=en,en=p[Pn]),gc(ge,Pn,ji(en,g,E,Pn,p,se))}),ge}function fb(p){var g=mi(p);return function(E){return D0(E,p,g)}}function D0(p,g,E){var L=E.length;if(p==null)return!L;for(p=Sn(p);L--;){var K=E[L],se=g[K],ge=p[K];if(ge===n&&!(K in p)||!se(ge))return!1}return!0}function vc(p,g,E){if(typeof p!="function")throw new Zi(o);return Ed(function(){p.apply(n,E)},g)}function iu(p,g,E,L){var K=-1,se=ld,ge=!0,xe=p.length,ke=[],nt=g.length;if(!xe)return ke;E&&(g=sr(g,Yi(E))),L?(se=Rf,ge=!1):g.length>=i&&(se=Wl,ge=!1,g=new nl(g));e:for(;++K<xe;){var st=p[K],dt=E==null?st:E(st);if(st=L||st!==0?st:0,ge&&dt===dt){for(var St=nt;St--;)if(g[St]===dt)continue e;ke.push(st)}else se(g,dt,L)||ke.push(st)}return ke}var il=Y0(Li),Gp=Y0(xd,!0);function k0(p,g){var E=!0;return il(p,function(L,K,se){return E=!!g(L,K,se),E}),E}function Na(p,g,E){for(var L=-1,K=p.length;++L<K;){var se=p[L],ge=g(se);if(ge!=null&&(xe===n?ge===ge&&!ns(ge):E(ge,xe)))var xe=ge,ke=se}return ke}function vn(p,g,E,L){var K=p.length;for(E=ln(E),E<0&&(E=-E>K?0:K+E),L=L===n||L>K?K:ln(L),L<0&&(L+=K),L=E>L?0:bo(L);E<L;)p[E++]=g;return p}function Xn(p,g){var E=[];return il(p,function(L,K,se){g(L,K,se)&&E.push(L)}),E}function Dn(p,g,E,L,K){var se=-1,ge=p.length;for(E||(E=ll),K||(K=[]);++se<ge;){var xe=p[se];g>0&&E(xe)?g>1?Dn(xe,g-1,E,L,K):ra(K,xe):L||(K[K.length]=xe)}return K}var bd=wc(),yc=wc(!0);function Li(p,g){return p&&bd(p,g,mi)}function xd(p,g){return p&&yc(p,g,mi)}function su(p,g){return na(g,function(E){return ja(p[E])})}function la(p,g){g=al(g,p);for(var E=0,L=g.length;p!=null&&E<L;)p=p[Gn(g[E++])];return E&&E==L?p:n}function hb(p,g,E){var L=g(p);return rn(p)?L:ra(L,E(p))}function Rn(p){return p==null?p===n?$e:Ot:Ei&&Ei in Sn(p)?Mb(p):zb(p)}function zf(p,g){return p>g}function R0(p,g){return p!=null&&Mn.call(p,g)}function pb(p,g){return p!=null&&g in Sn(p)}function mb(p,g,E){return p>=hr(g,E)&&p<ar(g,E)}function P0(p,g,E){for(var L=E?Rf:ld,K=p[0].length,se=p.length,ge=se,xe=Ue(se),ke=1/0,nt=[];ge--;){var st=p[ge];ge&&g&&(st=sr(st,Yi(g))),ke=hr(st.length,ke),xe[ge]=!E&&(g||K>=120&&st.length>=120)?new nl(ge&&st):n}st=p[0];var dt=-1,St=xe[0];e:for(;++dt<K&&nt.length<ke;){var It=st[dt],Jt=g?g(It):It;if(It=E||It!==0?It:0,!(St?Wl(St,Jt):L(nt,Jt,E))){for(ge=se;--ge;){var xn=xe[ge];if(!(xn?Wl(xn,Jt):L(p[ge],Jt,E)))continue e}St&&St.push(Jt),nt.push(It)}}return nt}function I0(p,g,E,L){return Li(p,function(K,se,ge){g(L,E(K),se,ge)}),L}function bc(p,g,E){g=al(g,p),p=Cd(p,g);var L=p==null?p:p[Gn(Bi(g))];return L==null?n:fr(L,p,E)}function Wp(p){return Pr(p)&&Rn(p)==pe}function ys(p){return Pr(p)&&Rn(p)==jt}function ni(p){return Pr(p)&&Rn(p)==lt}function xc(p,g,E,L,K){return p===g?!0:p==null||g==null||!Pr(p)&&!Pr(g)?p!==p&&g!==g:$f(p,g,E,L,xc,K)}function $f(p,g,E,L,K,se){var ge=rn(p),xe=rn(g),ke=ge?Ce:bi(p),nt=xe?Ce:bi(g);ke=ke==pe?qe:ke,nt=nt==pe?qe:nt;var st=ke==qe,dt=nt==qe,St=ke==nt;if(St&&yu(p)){if(!yu(g))return!1;ge=!0,st=!1}if(St&&!st)return se||(se=new Ji),ge||Bd(p)?Ob(p,g,E,L,K,se):Nb(p,g,ke,E,L,K,se);if(!(E&w)){var It=st&&Mn.call(p,"__wrapped__"),Jt=dt&&Mn.call(g,"__wrapped__");if(It||Jt){var xn=It?p.value():p,en=Jt?g.value():g;return se||(se=new Ji),K(xn,en,E,L,se)}}return St?(se||(se=new Ji),yi(p,g,E,L,K,se)):!1}function Xp(p){return Pr(p)&&bi(p)==xt}function Vf(p,g,E,L){var K=E.length,se=K,ge=!L;if(p==null)return!se;for(p=Sn(p);K--;){var xe=E[K];if(ge&&xe[2]?xe[1]!==p[xe[0]]:!(xe[0]in p))return!1}for(;++K<se;){xe=E[K];var ke=xe[0],nt=p[ke],st=xe[1];if(ge&&xe[2]){if(nt===n&&!(ke in p))return!1}else{var dt=new Ji;if(L)var St=L(nt,st,ke,p,g,dt);if(!(St===n?xc(st,nt,w|S,L,dt):St))return!1}}return!0}function co(p){if(!wr(p)||vm(p))return!1;var g=ja(p)?Lf:Tp;return g.test(cl(p))}function Yp(p){return Pr(p)&&Rn(p)==Xe}function O0(p){return Pr(p)&&bi(p)==he}function N0(p){return Pr(p)&&kc(p.length)&&!!zn[Rn(p)]}function M0(p){return typeof p=="function"?p:p==null?Oe:typeof p=="object"?rn(p)?Zp(p[0],p[1]):L0(p):jn(p)}function Kp(p){if(!lr(p))return ms(p);var g=[];for(var E in Sn(p))Mn.call(p,E)&&E!="constructor"&&g.push(E);return g}function gb(p){if(!wr(p))return uu(p);var g=lr(p),E=[];for(var L in p)L=="constructor"&&(g||!Mn.call(p,L))||E.push(L);return E}function Qp(p,g){return p<g}function j0(p,g){var E=-1,L=hi(p)?Ue(p.length):[];return il(p,function(K,se,ge){L[++E]=g(K,se,ge)}),L}function L0(p){var g=hm(p);return g.length==1&&g[0][2]?Fb(g[0][0],g[0][1]):function(E){return E===p||Vf(E,p,g)}}function Zp(p,g){return mm(p)&&Bb(g)?Fb(Gn(p),g):function(E){var L=Ch(E,p);return L===n&&L===g?$d(E,p):xc(g,L,w|S)}}function Hf(p,g,E,L,K){p!==g&&bd(g,function(se,ge){if(K||(K=new Ji),wr(se))eS(p,g,ge,E,Hf,L,K);else{var xe=L?L(ym(p,ge),se,ge+"",p,g,K):n;xe===n&&(xe=se),uo(p,ge,xe)}},xi)}function eS(p,g,E,L,K,se,ge){var xe=ym(p,E),ke=ym(g,E),nt=ge.get(ke);if(nt){uo(p,E,nt);return}var st=se?se(xe,ke,E+"",p,g,ge):n,dt=st===n;if(dt){var St=rn(ke),It=!St&&yu(ke),Jt=!St&&!It&&Bd(ke);st=ke,St||It||Jt?rn(xe)?st=xe:Fr(xe)?st=di(xe):It?(dt=!1,st=q0(ke,!0)):Jt?(dt=!1,st=W0(ke,!0)):st=[]:fa(ke)||pl(ke)?(st=xe,pl(xe)?st=Px(xe):(!wr(xe)||ja(xe))&&(st=ev(ke))):dt=!1}dt&&(ge.set(ke,st),K(st,ke,L,se,ge),ge.delete(ke)),uo(p,E,st)}function B0(p,g){var E=p.length;if(E)return g+=g<0?E:0,Ma(g,E)?p[g]:n}function F0(p,g,E){g.length?g=sr(g,function(se){return rn(se)?function(ge){return la(ge,se.length===1?se[0]:se)}:se}):g=[Oe];var L=-1;g=sr(g,Yi(Ut()));var K=j0(p,function(se,ge,xe){var ke=sr(g,function(nt){return nt(se)});return{criteria:ke,index:++L,value:se}});return Op(K,function(se,ge){return Eb(se,ge,E)})}function vb(p,g){return Jp(p,g,function(E,L){return $d(p,L)})}function Jp(p,g,E){for(var L=-1,K=g.length,se={};++L<K;){var ge=g[L],xe=la(p,ge);E(xe,ge)&&Sd(se,al(ge,p),xe)}return se}function yb(p){return function(g){return la(g,p)}}function em(p,g,E,L){var K=L?If:Hl,se=-1,ge=g.length,xe=p;for(p===g&&(g=di(g)),E&&(xe=sr(p,Yi(E)));++se<ge;)for(var ke=0,nt=g[se],st=E?E(nt):nt;(ke=K(xe,st,ke,L))>-1;)xe!==p&&hd.call(xe,ke,1),hd.call(p,ke,1);return p}function U0(p,g){for(var E=p?g.length:0,L=E-1;E--;){var K=g[E];if(E==L||K!==se){var se=K;Ma(K)?hd.call(p,K,1):Xf(p,K)}}return p}function tm(p,g){return p+sa(Bf()*(g-p+1))}function bb(p,g,E,L){for(var K=-1,se=ar(ao((g-p)/(E||1)),0),ge=Ue(se);se--;)ge[L?se:++K]=p,p+=E;return ge}function z0(p,g){var E="";if(!p||g<1||g>Z)return E;do g%2&&(E+=p),g=sa(g/2),g&&(p+=p);while(g);return E}function hn(p,g){return uh(nv(p,g,Oe),p+"")}function _d(p){return vd(Hd(p))}function nm(p,g){var E=Hd(p);return dh(E,Oa(g,0,E.length))}function Sd(p,g,E,L){if(!wr(p))return p;g=al(g,p);for(var K=-1,se=g.length,ge=se-1,xe=p;xe!=null&&++K<se;){var ke=Gn(g[K]),nt=E;if(ke==="__proto__"||ke==="constructor"||ke==="prototype")return p;if(K!=ge){var st=xe[ke];nt=L?L(st,ke,xe):n,nt===n&&(nt=wr(st)?st:Ma(g[K+1])?[]:{})}gc(xe,ke,nt),xe=xe[ke]}return p}var qf=el?function(p,g){return el.set(p,g),p}:Oe,Gf=cc?function(p,g){return cc(p,"toString",{configurable:!0,enumerable:!1,value:Ie(g),writable:!0})}:Oe;function xb(p){return dh(Hd(p))}function Us(p,g,E){var L=-1,K=p.length;g<0&&(g=-g>K?0:K+g),E=E>K?K:E,E<0&&(E+=K),K=g>E?0:E-g>>>0,g>>>=0;for(var se=Ue(K);++L<K;)se[L]=p[L+g];return se}function _b(p,g){var E;return il(p,function(L,K,se){return E=g(L,K,se),!E}),!!E}function Wf(p,g,E){var L=0,K=p==null?L:p.length;if(typeof g=="number"&&g===g&&K<=be){for(;L<K;){var se=L+K>>>1,ge=p[se];ge!==null&&!ns(ge)&&(E?ge<=g:ge<g)?L=se+1:K=se}return K}return rm(p,g,Oe,E)}function rm(p,g,E,L){var K=0,se=p==null?0:p.length;if(se===0)return 0;g=E(g);for(var ge=g!==g,xe=g===null,ke=ns(g),nt=g===n;K<se;){var st=sa((K+se)/2),dt=E(p[st]),St=dt!==n,It=dt===null,Jt=dt===dt,xn=ns(dt);if(ge)var en=L||Jt;else nt?en=Jt&&(L||St):xe?en=Jt&&St&&(L||!It):ke?en=Jt&&St&&!It&&(L||!xn):It||xn?en=!1:en=L?dt<=g:dt<g;en?K=st+1:se=st}return hr(se,fe)}function $0(p,g){for(var E=-1,L=p.length,K=0,se=[];++E<L;){var ge=p[E],xe=g?g(ge):ge;if(!E||!ws(xe,ke)){var ke=xe;se[K++]=ge===0?0:ge}}return se}function im(p){return typeof p=="number"?p:ns(p)?G:+p}function bs(p){if(typeof p=="string")return p;if(rn(p))return sr(p,bs)+"";if(ns(p))return T?T.call(p):"";var g=p+"";return g=="0"&&1/p==-te?"-0":g}function sl(p,g,E){var L=-1,K=ld,se=p.length,ge=!0,xe=[],ke=xe;if(E)ge=!1,K=Rf;else if(se>=i){var nt=g?null:Pb(p);if(nt)return dd(nt);ge=!1,K=Wl,ke=new nl}else ke=g?[]:xe;e:for(;++L<se;){var st=p[L],dt=g?g(st):st;if(st=E||st!==0?st:0,ge&&dt===dt){for(var St=ke.length;St--;)if(ke[St]===dt)continue e;g&&ke.push(dt),xe.push(st)}else K(ke,dt,E)||(ke!==xe&&ke.push(dt),xe.push(st))}return xe}function Xf(p,g){return g=al(g,p),p=Cd(p,g),p==null||delete p[Gn(Bi(g))]}function V0(p,g,E,L){return Sd(p,g,E(la(p,g)),L)}function Yf(p,g,E,L){for(var K=p.length,se=L?K:-1;(L?se--:++se<K)&&g(p[se],se,p););return E?Us(p,L?0:se,L?se+1:K):Us(p,L?se+1:0,L?K:se)}function Sb(p,g){var E=p;return E instanceof U&&(E=E.value()),$l(g,function(L,K){return K.func.apply(K.thisArg,ra([L],K.args))},E)}function Kf(p,g,E){var L=p.length;if(L<2)return L?sl(p[0]):[];for(var K=-1,se=Ue(L);++K<L;)for(var ge=p[K],xe=-1;++xe<L;)xe!=K&&(se[K]=iu(se[K]||ge,p[xe],g,E));return sl(Dn(se,1),g,E)}function H0(p,g,E){for(var L=-1,K=p.length,se=g.length,ge={};++L<K;){var xe=L<se?g[L]:n;E(ge,p[L],xe)}return ge}function sm(p){return Fr(p)?p:[]}function Qf(p){return typeof p=="function"?p:Oe}function al(p,g){return rn(p)?p:mm(p,g)?[p]:mo(Vn(p))}var Tb=hn;function au(p,g,E){var L=p.length;return E=E===n?L:E,!g&&E>=L?p:Us(p,g,E)}var wb=pd||function(p){return kr.clearTimeout(p)};function q0(p,g){if(g)return p.slice();var E=p.length,L=Ko?Ko(E):new p.constructor(E);return p.copy(L),L}function _c(p){var g=new p.constructor(p.byteLength);return new eu(g).set(new eu(p)),g}function G0(p,g){var E=g?_c(p.buffer):p.buffer;return new p.constructor(E,p.byteOffset,p.byteLength)}function am(p){var g=new p.constructor(p.source,Wi.exec(p));return g.lastIndex=p.lastIndex,g}function Cb(p){return lo?Sn(lo.call(p)):{}}function W0(p,g){var E=g?_c(p.buffer):p.buffer;return new p.constructor(E,p.byteOffset,p.length)}function Zf(p,g){if(p!==g){var E=p!==n,L=p===null,K=p===p,se=ns(p),ge=g!==n,xe=g===null,ke=g===g,nt=ns(g);if(!xe&&!nt&&!se&&p>g||se&&ge&&ke&&!xe&&!nt||L&&ge&&ke||!E&&ke||!K)return 1;if(!L&&!se&&!nt&&p<g||nt&&E&&K&&!L&&!se||xe&&E&&K||!ge&&K||!ke)return-1}return 0}function Eb(p,g,E){for(var L=-1,K=p.criteria,se=g.criteria,ge=K.length,xe=E.length;++L<ge;){var ke=Zf(K[L],se[L]);if(ke){if(L>=xe)return ke;var nt=E[L];return ke*(nt=="desc"?-1:1)}}return p.index-g.index}function X0(p,g,E,L){for(var K=-1,se=p.length,ge=E.length,xe=-1,ke=g.length,nt=ar(se-ge,0),st=Ue(ke+nt),dt=!L;++xe<ke;)st[xe]=g[xe];for(;++K<ge;)(dt||K<se)&&(st[E[K]]=p[K]);for(;nt--;)st[xe++]=p[K++];return st}function Ab(p,g,E,L){for(var K=-1,se=p.length,ge=-1,xe=E.length,ke=-1,nt=g.length,st=ar(se-xe,0),dt=Ue(st+nt),St=!L;++K<st;)dt[K]=p[K];for(var It=K;++ke<nt;)dt[It+ke]=g[ke];for(;++ge<xe;)(St||K<se)&&(dt[It+E[ge]]=p[K++]);return dt}function di(p,g){var E=-1,L=p.length;for(g||(g=Ue(L));++E<L;)g[E]=p[E];return g}function xs(p,g,E,L){var K=!E;E||(E={});for(var se=-1,ge=g.length;++se<ge;){var xe=g[se],ke=L?L(E[xe],p[xe],xe,E,p):n;ke===n&&(ke=p[xe]),K?Ia(E,xe,ke):gc(E,xe,ke)}return E}function om(p,g){return xs(p,sh(p),g)}function Jf(p,g){return xs(p,pm(p),g)}function Sc(p,g){return function(E,L){var K=rn(E)?Ra:ru,se=g?g():{};return K(E,p,Ut(L,2),se)}}function Tc(p){return hn(function(g,E){var L=-1,K=E.length,se=K>1?E[K-1]:n,ge=K>2?E[2]:n;for(se=p.length>3&&typeof se=="function"?(K--,se):n,ge&&ts(E[0],E[1],ge)&&(se=K<3?n:se,K=1),g=Sn(g);++L<K;){var xe=E[L];xe&&p(g,xe,L,se)}return g})}function Y0(p,g){return function(E,L){if(E==null)return E;if(!hi(E))return p(E,L);for(var K=E.length,se=g?K:-1,ge=Sn(E);(g?se--:++se<K)&&L(ge[se],se,ge)!==!1;);return E}}function wc(p){return function(g,E,L){for(var K=-1,se=Sn(g),ge=L(g),xe=ge.length;xe--;){var ke=ge[p?xe:++K];if(E(se[ke],ke,se)===!1)break}return g}}function Db(p,g,E){var L=g&D,K=ua(p);function se(){var ge=this&&this!==kr&&this instanceof se?K:p;return ge.apply(L?E:this,arguments)}return se}function zs(p){return function(g){g=Vn(g);var E=Pa(g)?Qi(g):n,L=E?E[0]:g.charAt(0),K=E?au(E,1).join(""):g.slice(1);return L[p]()+K}}function es(p){return function(g){return $l(C(ml(g).replace(Fl,"")),p,"")}}function ua(p){return function(){var g=arguments;switch(g.length){case 0:return new p;case 1:return new p(g[0]);case 2:return new p(g[0],g[1]);case 3:return new p(g[0],g[1],g[2]);case 4:return new p(g[0],g[1],g[2],g[3]);case 5:return new p(g[0],g[1],g[2],g[3],g[4]);case 6:return new p(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new p(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var E=I(p.prototype),L=p.apply(E,g);return wr(L)?L:E}}function kb(p,g,E){var L=ua(p);function K(){for(var se=arguments.length,ge=Ue(se),xe=se,ke=Ec(K);xe--;)ge[xe]=arguments[xe];var nt=se<3&&ge[0]!==ke&&ge[se-1]!==ke?[]:no(ge,ke);if(se-=nt.length,se<E)return K0(p,g,Lr,K.placeholder,n,ge,nt,n,n,E-se);var st=this&&this!==kr&&this instanceof K?L:p;return fr(st,this,ge)}return K}function ol(p){return function(g,E,L){var K=Sn(g);if(!hi(g)){var se=Ut(E,3);g=mi(g),E=function(xe){return se(K[xe],xe,K)}}var ge=p(g,E,L);return ge>-1?K[se?g[ge]:ge]:n}}function fo(p){return vr(function(g){var E=g.length,L=E,K=j.prototype.thru;for(p&&g.reverse();L--;){var se=g[L];if(typeof se!="function")throw new Zi(o);if(K&&!ge&&ih(se)=="wrapper")var ge=new j([],!0)}for(L=ge?L:E;++L<E;){se=g[L];var xe=ih(se),ke=xe=="wrapper"?fm(se):n;ke&&gm(ke[0])&&ke[1]==($|N|M|q)&&!ke[4].length&&ke[9]==1?ge=ge[ih(ke[0])].apply(ge,ke[3]):ge=se.length==1&&gm(se)?ge[xe]():ge.thru(se)}return function(){var nt=arguments,st=nt[0];if(ge&&nt.length==1&&rn(st))return ge.plant(st).value();for(var dt=0,St=E?g[dt].apply(this,nt):st;++dt<E;)St=g[dt].call(this,St);return St}})}function Lr(p,g,E,L,K,se,ge,xe,ke,nt){var st=g&$,dt=g&D,St=g&k,It=g&(N|F),Jt=g&B,xn=St?n:ua(p);function en(){for(var Pn=arguments.length,Ln=Ue(Pn),Ba=Pn;Ba--;)Ln[Ba]=arguments[Ba];if(It)var Gs=Ec(en),Fa=T0(Ln,Gs);if(L&&(Ln=X0(Ln,L,K,It)),se&&(Ln=Ab(Ln,se,ge,It)),Pn-=Fa,It&&Pn<nt){var gi=no(Ln,Gs);return K0(p,g,Lr,en.placeholder,E,Ln,gi,xe,ke,nt-Pn)}var gl=dt?E:this,Rc=St?gl[p]:p;return Pn=Ln.length,xe?Ln=po(Ln,xe):Jt&&Pn>1&&Ln.reverse(),st&&ke<Pn&&(Ln.length=ke),this&&this!==kr&&this instanceof en&&(Rc=xn||ua(Rc)),Rc.apply(gl,Ln)}return en}function eh(p,g){return function(E,L){return I0(E,p,g(L),{})}}function Td(p,g){return function(E,L){var K;if(E===n&&L===n)return g;if(E!==n&&(K=E),L!==n){if(K===n)return L;typeof E=="string"||typeof L=="string"?(E=bs(E),L=bs(L)):(E=im(E),L=im(L)),K=p(E,L)}return K}}function th(p){return vr(function(g){return g=sr(g,Yi(Ut())),hn(function(E){var L=this;return p(g,function(K){return fr(K,L,E)})})})}function nh(p,g){g=g===n?" ":bs(g);var E=g.length;if(E<2)return E?z0(g,p):g;var L=z0(g,ao(p/Pi(g)));return Pa(g)?au(Qi(L),0,p).join(""):L.slice(0,p)}function Rb(p,g,E,L){var K=g&D,se=ua(p);function ge(){for(var xe=-1,ke=arguments.length,nt=-1,st=L.length,dt=Ue(st+ke),St=this&&this!==kr&&this instanceof ge?se:p;++nt<st;)dt[nt]=L[nt];for(;ke--;)dt[nt++]=arguments[++xe];return fr(St,K?E:this,dt)}return ge}function ou(p){return function(g,E,L){return L&&typeof L!="number"&&ts(g,E,L)&&(E=L=n),g=yo(g),E===n?(E=g,g=0):E=yo(E),L=L===n?g<E?1:-1:yo(L),bb(g,E,L,p)}}function Cc(p){return function(g,E){return typeof g=="string"&&typeof E=="string"||(g=ha(g),E=ha(E)),p(g,E)}}function K0(p,g,E,L,K,se,ge,xe,ke,nt){var st=g&N,dt=st?ge:n,St=st?n:ge,It=st?se:n,Jt=st?n:se;g|=st?M:V,g&=~(st?V:M),g&O||(g&=-4);var xn=[p,g,K,It,dt,Jt,St,xe,ke,nt],en=E.apply(n,xn);return gm(p)&&bm(en,xn),en.placeholder=L,xm(en,p,g)}function lm(p){var g=Rr[p];return function(E,L){if(E=ha(E),L=L==null?0:hr(ln(L),292),L&&dc(E)){var K=(Vn(E)+"e").split("e"),se=g(K[0]+"e"+(+K[1]+L));return K=(Vn(se)+"e").split("e"),+(K[0]+"e"+(+K[1]-L))}return g(E)}}var Pb=$t&&1/dd(new $t([,-0]))[1]==te?function(p){return new $t(p)}:Dt;function rh(p){return function(g){var E=bi(g);return E==xt?Wo(g):E==he?w0(g):S0(g,p(g))}}function ho(p,g,E,L,K,se,ge,xe){var ke=g&k;if(!ke&&typeof p!="function")throw new Zi(o);var nt=L?L.length:0;if(nt||(g&=-97,L=K=n),ge=ge===n?ge:ar(ln(ge),0),xe=xe===n?xe:ln(xe),nt-=K?K.length:0,g&V){var st=L,dt=K;L=K=n}var St=ke?n:fm(p),It=[p,g,E,L,K,st,dt,se,ge,xe];if(St&&lh(It,St),p=It[0],g=It[1],E=It[2],L=It[3],K=It[4],xe=It[9]=It[9]===n?ke?0:p.length:ar(It[9]-nt,0),!xe&&g&(N|F)&&(g&=-25),!g||g==D)var Jt=Db(p,g,E);else g==N||g==F?Jt=kb(p,g,xe):(g==M||g==(D|M))&&!K.length?Jt=Rb(p,g,E,L):Jt=Lr.apply(n,It);var xn=St?qf:bm;return xm(xn(Jt,It),p,g)}function um(p,g,E,L){return p===n||ws(p,Xo[E])&&!Mn.call(L,E)?g:p}function Q0(p,g,E,L,K,se){return wr(p)&&wr(g)&&(se.set(g,p),Hf(p,g,n,Q0,se),se.delete(g)),p}function Ib(p){return fa(p)?n:p}function Ob(p,g,E,L,K,se){var ge=E&w,xe=p.length,ke=g.length;if(xe!=ke&&!(ge&&ke>xe))return!1;var nt=se.get(p),st=se.get(g);if(nt&&st)return nt==g&&st==p;var dt=-1,St=!0,It=E&S?new nl:n;for(se.set(p,g),se.set(g,p);++dt<xe;){var Jt=p[dt],xn=g[dt];if(L)var en=ge?L(xn,Jt,dt,g,p,se):L(Jt,xn,dt,p,g,se);if(en!==n){if(en)continue;St=!1;break}if(It){if(!Vl(g,function(Pn,Ln){if(!Wl(It,Ln)&&(Jt===Pn||K(Jt,Pn,E,L,se)))return It.push(Ln)})){St=!1;break}}else if(!(Jt===xn||K(Jt,xn,E,L,se))){St=!1;break}}return se.delete(p),se.delete(g),St}function Nb(p,g,E,L,K,se,ge){switch(E){case un:if(p.byteLength!=g.byteLength||p.byteOffset!=g.byteOffset)return!1;p=p.buffer,g=g.buffer;case jt:return!(p.byteLength!=g.byteLength||!se(new eu(p),new eu(g)));case Me:case lt:case wt:return ws(+p,+g);case mt:return p.name==g.name&&p.message==g.message;case Xe:case Ae:return p==g+"";case xt:var xe=Wo;case he:var ke=L&w;if(xe||(xe=dd),p.size!=g.size&&!ke)return!1;var nt=ge.get(p);if(nt)return nt==g;L|=S,ge.set(p,g);var st=Ob(xe(p),xe(g),L,K,se,ge);return ge.delete(p),st;case rt:if(lo)return lo.call(p)==lo.call(g)}return!1}function yi(p,g,E,L,K,se){var ge=E&w,xe=cm(p),ke=xe.length,nt=cm(g),st=nt.length;if(ke!=st&&!ge)return!1;for(var dt=ke;dt--;){var St=xe[dt];if(!(ge?St in g:Mn.call(g,St)))return!1}var It=se.get(p),Jt=se.get(g);if(It&&Jt)return It==g&&Jt==p;var xn=!0;se.set(p,g),se.set(g,p);for(var en=ge;++dt<ke;){St=xe[dt];var Pn=p[St],Ln=g[St];if(L)var Ba=ge?L(Ln,Pn,St,g,p,se):L(Pn,Ln,St,p,g,se);if(!(Ba===n?Pn===Ln||K(Pn,Ln,E,L,se):Ba)){xn=!1;break}en||(en=St=="constructor")}if(xn&&!en){var Gs=p.constructor,Fa=g.constructor;Gs!=Fa&&"constructor"in p&&"constructor"in g&&!(typeof Gs=="function"&&Gs instanceof Gs&&typeof Fa=="function"&&Fa instanceof Fa)&&(xn=!1)}return se.delete(p),se.delete(g),xn}function vr(p){return uh(nv(p,n,Ss),p+"")}function cm(p){return hb(p,mi,sh)}function dm(p){return hb(p,xi,pm)}var fm=el?function(p){return el.get(p)}:Dt;function ih(p){for(var g=p.name+"",E=gs[g],L=Mn.call(gs,g)?E.length:0;L--;){var K=E[L],se=K.func;if(se==null||se==p)return K.name}return g}function Ec(p){var g=Mn.call(_,"placeholder")?_:p;return g.placeholder}function Ut(){var p=_.iteratee||Gt;return p=p===Gt?M0:p,arguments.length?p(arguments[0],arguments[1]):p}function wd(p,g){var E=p.__data__;return ul(g)?E[typeof g=="string"?"string":"hash"]:E.map}function hm(p){for(var g=mi(p),E=g.length;E--;){var L=g[E],K=p[L];g[E]=[L,K,Bb(K)]}return g}function lu(p,g){var E=cd(p,g);return co(E)?E:n}function Mb(p){var g=Mn.call(p,Ei),E=p[Ei];try{p[Ei]=n;var L=!0}catch{}var K=Ci.call(p);return L&&(g?p[Ei]=E:delete p[Ei]),K}var sh=Bs?function(p){return p==null?[]:(p=Sn(p),na(Bs(p),function(g){return Qo.call(p,g)}))}:LS,pm=Bs?function(p){for(var g=[];p;)ra(g,sh(p)),p=lc(p);return g}:LS,bi=Rn;(aa&&bi(new aa(new ArrayBuffer(1)))!=un||Yt&&bi(new Yt)!=xt||Un&&bi(Un.resolve())!=Le||$t&&bi(new $t)!=he||Mr&&bi(new Mr)!=Ze)&&(bi=function(p){var g=Rn(p),E=g==qe?p.constructor:n,L=E?cl(E):"";if(L)switch(L){case Up:return un;case zp:return xt;case fc:return Le;case hc:return he;case $p:return Ze}return g});function jb(p,g,E){for(var L=-1,K=E.length;++L<K;){var se=E[L],ge=se.size;switch(se.type){case"drop":p+=ge;break;case"dropRight":g-=ge;break;case"take":g=hr(g,p+ge);break;case"takeRight":p=ar(p,g-ge);break}}return{start:p,end:g}}function Z0(p){var g=p.match(sn);return g?g[1].split(cn):[]}function ah(p,g,E){g=al(g,p);for(var L=-1,K=g.length,se=!1;++L<K;){var ge=Gn(g[L]);if(!(se=p!=null&&E(p,ge)))break;p=p[ge]}return se||++L!=K?se:(K=p==null?0:p.length,!!K&&kc(K)&&Ma(ge,K)&&(rn(p)||pl(p)))}function J0(p){var g=p.length,E=new p.constructor(g);return g&&typeof p[0]=="string"&&Mn.call(p,"index")&&(E.index=p.index,E.input=p.input),E}function ev(p){return typeof p.constructor=="function"&&!lr(p)?I(lc(p)):{}}function tv(p,g,E){var L=p.constructor;switch(g){case jt:return _c(p);case Me:case lt:return new L(+p);case un:return G0(p,E);case Pt:case an:case rr:case on:case oi:case Hr:case kn:case qr:case xr:return W0(p,E);case xt:return new L;case wt:case Ae:return new L(p);case Xe:return am(p);case he:return new L;case rt:return Cb(p)}}function Lb(p,g){var E=g.length;if(!E)return p;var L=E-1;return g[L]=(E>1?"& ":"")+g[L],g=g.join(E>2?", ":" "),p.replace(ct,`{
/* [wrapped with `+g+`] */
`)}function ll(p){return rn(p)||pl(p)||!!(Oi&&p&&p[Oi])}function Ma(p,g){var E=typeof p;return g=g??Z,!!g&&(E=="number"||E!="symbol"&&Fn.test(p))&&p>-1&&p%1==0&&p<g}function ts(p,g,E){if(!wr(E))return!1;var L=typeof g;return(L=="number"?hi(E)&&Ma(g,E.length):L=="string"&&g in E)?ws(E[g],p):!1}function mm(p,g){if(rn(p))return!1;var E=typeof p;return E=="number"||E=="symbol"||E=="boolean"||p==null||ns(p)?!0:cr.test(p)||!Zt.test(p)||g!=null&&p in Sn(g)}function ul(p){var g=typeof p;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?p!=="__proto__":p===null}function gm(p){var g=ih(p),E=_[g];if(typeof E!="function"||!(g in U.prototype))return!1;if(p===E)return!0;var L=fm(E);return!!L&&p===L[0]}function vm(p){return!!jf&&jf in p}var oh=Zl?ja:BS;function lr(p){var g=p&&p.constructor,E=typeof g=="function"&&g.prototype||Xo;return p===E}function Bb(p){return p===p&&!wr(p)}function Fb(p,g){return function(E){return E==null?!1:E[p]===g&&(g!==n||p in Sn(E))}}function Ub(p){var g=bh(p,function(L){return E.size===f&&E.clear(),L}),E=g.cache;return g}function lh(p,g){var E=p[1],L=g[1],K=E|L,se=K<(D|k|$),ge=L==$&&E==N||L==$&&E==q&&p[7].length<=g[8]||L==($|q)&&g[7].length<=g[8]&&E==N;if(!(se||ge))return p;L&D&&(p[2]=g[2],K|=E&D?0:O);var xe=g[3];if(xe){var ke=p[3];p[3]=ke?X0(ke,xe,g[4]):xe,p[4]=ke?no(p[3],m):g[4]}return xe=g[5],xe&&(ke=p[5],p[5]=ke?Ab(ke,xe,g[6]):xe,p[6]=ke?no(p[5],m):g[6]),xe=g[7],xe&&(p[7]=xe),L&$&&(p[8]=p[8]==null?g[8]:hr(p[8],g[8])),p[9]==null&&(p[9]=g[9]),p[0]=g[0],p[1]=K,p}function uu(p){var g=[];if(p!=null)for(var E in Sn(p))g.push(E);return g}function zb(p){return Ci.call(p)}function nv(p,g,E){return g=ar(g===n?p.length-1:g,0),function(){for(var L=arguments,K=-1,se=ar(L.length-g,0),ge=Ue(se);++K<se;)ge[K]=L[g+K];K=-1;for(var xe=Ue(g+1);++K<g;)xe[K]=L[K];return xe[g]=E(ge),fr(p,this,xe)}}function Cd(p,g){return g.length<2?p:la(p,Us(g,0,-1))}function po(p,g){for(var E=p.length,L=hr(g.length,E),K=di(p);L--;){var se=g[L];p[L]=Ma(se,E)?K[se]:n}return p}function ym(p,g){if(!(g==="constructor"&&typeof p[g]=="function")&&g!="__proto__")return p[g]}var bm=ch(qf),Ed=md||function(p,g){return kr.setTimeout(p,g)},uh=ch(Gf);function xm(p,g,E){var L=g+"";return uh(p,Lb(L,$b(Z0(L),E)))}function ch(p){var g=0,E=0;return function(){var L=Fs(),K=Q-(L-E);if(E=L,K>0){if(++g>=Y)return arguments[0]}else g=0;return p.apply(n,arguments)}}function dh(p,g){var E=-1,L=p.length,K=L-1;for(g=g===n?L:g;++E<g;){var se=tm(E,K),ge=p[se];p[se]=p[E],p[E]=ge}return p.length=g,p}var mo=Ub(function(p){var g=[];return p.charCodeAt(0)===46&&g.push(""),p.replace(ir,function(E,L,K,se){g.push(K?se.replace(_r,"$1"):L||E)}),g});function Gn(p){if(typeof p=="string"||ns(p))return p;var g=p+"";return g=="0"&&1/p==-te?"-0":g}function cl(p){if(p!=null){try{return oc.call(p)}catch{}try{return p+""}catch{}}return""}function $b(p,g){return wi(we,function(E){var L="_."+E[0];g&E[1]&&!ld(p,L)&&p.push(L)}),p.sort()}function fi(p){if(p instanceof U)return p.clone();var g=new j(p.__wrapped__,p.__chain__);return g.__actions__=di(p.__actions__),g.__index__=p.__index__,g.__values__=p.__values__,g}function tS(p,g,E){(E?ts(p,g,E):g===n)?g=1:g=ar(ln(g),0);var L=p==null?0:p.length;if(!L||g<1)return[];for(var K=0,se=0,ge=Ue(ao(L/g));K<L;)ge[se++]=Us(p,K,K+=g);return ge}function Vb(p){for(var g=-1,E=p==null?0:p.length,L=0,K=[];++g<E;){var se=p[g];se&&(K[L++]=se)}return K}function Hb(){var p=arguments.length;if(!p)return[];for(var g=Ue(p-1),E=arguments[0],L=p;L--;)g[L-1]=arguments[L];return ra(rn(E)?di(E):[E],Dn(g,1))}var Tr=hn(function(p,g){return Fr(p)?iu(p,Dn(g,1,Fr,!0)):[]}),_s=hn(function(p,g){var E=Bi(g);return Fr(E)&&(E=n),Fr(p)?iu(p,Dn(g,1,Fr,!0),Ut(E,2)):[]}),dl=hn(function(p,g){var E=Bi(g);return Fr(E)&&(E=n),Fr(p)?iu(p,Dn(g,1,Fr,!0),n,E):[]});function qb(p,g,E){var L=p==null?0:p.length;return L?(g=E||g===n?1:ln(g),Us(p,g<0?0:g,L)):[]}function Gb(p,g,E){var L=p==null?0:p.length;return L?(g=E||g===n?1:ln(g),g=L-g,Us(p,0,g<0?0:g)):[]}function nS(p,g){return p&&p.length?Yf(p,Ut(g,3),!0,!0):[]}function rv(p,g){return p&&p.length?Yf(p,Ut(g,3),!0):[]}function $s(p,g,E,L){var K=p==null?0:p.length;return K?(E&&typeof E!="number"&&ts(p,g,E)&&(E=0,L=K),vn(p,g,E,L)):[]}function ca(p,g,E){var L=p==null?0:p.length;if(!L)return-1;var K=E==null?0:ln(E);return K<0&&(K=ar(L+K,0)),tc(p,Ut(g,3),K)}function iv(p,g,E){var L=p==null?0:p.length;if(!L)return-1;var K=L-1;return E!==n&&(K=ln(E),K=E<0?ar(L+K,0):hr(K,L-1)),tc(p,Ut(g,3),K,!0)}function Ss(p){var g=p==null?0:p.length;return g?Dn(p,1):[]}function Wb(p){var g=p==null?0:p.length;return g?Dn(p,te):[]}function cu(p,g){var E=p==null?0:p.length;return E?(g=g===n?1:ln(g),Dn(p,g)):[]}function Ac(p){for(var g=-1,E=p==null?0:p.length,L={};++g<E;){var K=p[g];L[K[0]]=K[1]}return L}function fl(p){return p&&p.length?p[0]:n}function sv(p,g,E){var L=p==null?0:p.length;if(!L)return-1;var K=E==null?0:ln(E);return K<0&&(K=ar(L+K,0)),Hl(p,g,K)}function av(p){var g=p==null?0:p.length;return g?Us(p,0,-1):[]}var go=hn(function(p){var g=sr(p,sm);return g.length&&g[0]===p[0]?P0(g):[]}),Xb=hn(function(p){var g=Bi(p),E=sr(p,sm);return g===Bi(E)?g=n:E.pop(),E.length&&E[0]===p[0]?P0(E,Ut(g,2)):[]}),Ad=hn(function(p){var g=Bi(p),E=sr(p,sm);return g=typeof g=="function"?g:n,g&&E.pop(),E.length&&E[0]===p[0]?P0(E,n,g):[]});function fh(p,g){return p==null?"":ps.call(p,g)}function Bi(p){var g=p==null?0:p.length;return g?p[g-1]:n}function Dd(p,g,E){var L=p==null?0:p.length;if(!L)return-1;var K=L;return E!==n&&(K=ln(E),K=K<0?ar(L+K,0):hr(K,L-1)),g===g?Ki(p,g,K):tc(p,ql,K,!0)}function Yb(p,g){return p&&p.length?B0(p,ln(g)):n}var Kb=hn(kd);function kd(p,g){return p&&p.length&&g&&g.length?em(p,g):p}function Qb(p,g,E){return p&&p.length&&g&&g.length?em(p,g,Ut(E,2)):p}function _m(p,g,E){return p&&p.length&&g&&g.length?em(p,g,n,E):p}var Zb=vr(function(p,g){var E=p==null?0:p.length,L=Uf(p,g);return U0(p,sr(g,function(K){return Ma(K,E)?+K:K}).sort(Zf)),L});function rS(p,g){var E=[];if(!(p&&p.length))return E;var L=-1,K=[],se=p.length;for(g=Ut(g,3);++L<se;){var ge=p[L];g(ge,L,p)&&(E.push(ge),K.push(L))}return U0(p,K),E}function ov(p){return p==null?p:gd.call(p)}function Yn(p,g,E){var L=p==null?0:p.length;return L?(E&&typeof E!="number"&&ts(p,g,E)?(g=0,E=L):(g=g==null?0:ln(g),E=E===n?L:ln(E)),Us(p,g,E)):[]}function pr(p,g){return Wf(p,g)}function Tn(p,g,E){return rm(p,g,Ut(E,2))}function Nn(p,g){var E=p==null?0:p.length;if(E){var L=Wf(p,g);if(L<E&&ws(p[L],g))return L}return-1}function Kn(p,g){return Wf(p,g,!0)}function Vs(p,g,E){return rm(p,g,Ut(E,2),!0)}function du(p,g){var E=p==null?0:p.length;if(E){var L=Wf(p,g,!0)-1;if(ws(p[L],g))return L}return-1}function Rd(p){return p&&p.length?$0(p):[]}function lv(p,g){return p&&p.length?$0(p,Ut(g,2)):[]}function hl(p){var g=p==null?0:p.length;return g?Us(p,1,g):[]}function Br(p,g,E){return p&&p.length?(g=E||g===n?1:ln(g),Us(p,0,g<0?0:g)):[]}function fu(p,g,E){var L=p==null?0:p.length;return L?(g=E||g===n?1:ln(g),g=L-g,Us(p,g<0?0:g,L)):[]}function Dc(p,g){return p&&p.length?Yf(p,Ut(g,3),!1,!0):[]}function uv(p,g){return p&&p.length?Yf(p,Ut(g,3)):[]}var da=hn(function(p){return sl(Dn(p,1,Fr,!0))}),Pd=hn(function(p){var g=Bi(p);return Fr(g)&&(g=n),sl(Dn(p,1,Fr,!0),Ut(g,2))}),hh=hn(function(p){var g=Bi(p);return g=typeof g=="function"?g:n,sl(Dn(p,1,Fr,!0),n,g)});function Ts(p){return p&&p.length?sl(p):[]}function cv(p,g){return p&&p.length?sl(p,Ut(g,2)):[]}function dv(p,g){return g=typeof g=="function"?g:n,p&&p.length?sl(p,n,g):[]}function Id(p){if(!(p&&p.length))return[];var g=0;return p=na(p,function(E){if(Fr(E))return g=ar(E.length,g),!0}),ia(g,function(E){return sr(p,ud(E))})}function ph(p,g){if(!(p&&p.length))return[];var E=Id(p);return g==null?E:sr(E,function(L){return fr(g,n,L)})}var hu=hn(function(p,g){return Fr(p)?iu(p,g):[]}),Ai=hn(function(p){return Kf(na(p,Fr))}),pu=hn(function(p){var g=Bi(p);return Fr(g)&&(g=n),Kf(na(p,Fr),Ut(g,2))}),Od=hn(function(p){var g=Bi(p);return g=typeof g=="function"?g:n,Kf(na(p,Fr),n,g)}),Nd=hn(Id);function fv(p,g){return H0(p||[],g||[],gc)}function hv(p,g){return H0(p||[],g||[],Sd)}var Jb=hn(function(p){var g=p.length,E=g>1?p[g-1]:n;return E=typeof E=="function"?(p.pop(),E):n,ph(p,E)});function Md(p){var g=_(p);return g.__chain__=!0,g}function pv(p,g){return g(p),p}function Fi(p,g){return g(p)}var ex=vr(function(p){var g=p.length,E=g?p[0]:0,L=this.__wrapped__,K=function(se){return Uf(se,p)};return g>1||this.__actions__.length||!(L instanceof U)||!Ma(E)?this.thru(K):(L=L.slice(E,+E+(g?1:0)),L.__actions__.push({func:Fi,args:[K],thisArg:n}),new j(L,this.__chain__).thru(function(se){return g&&!se.length&&se.push(n),se}))});function Hs(){return Md(this)}function tx(){return new j(this.value(),this.__chain__)}function nx(){this.__values__===n&&(this.__values__=qs(this.value()));var p=this.__index__>=this.__values__.length,g=p?n:this.__values__[this.__index__++];return{done:p,value:g}}function iS(){return this}function mu(p){for(var g,E=this;E instanceof P;){var L=fi(E);L.__index__=0,L.__values__=n,g?K.__wrapped__=L:g=L;var K=L;E=E.__wrapped__}return K.__wrapped__=p,g}function Sm(){var p=this.__wrapped__;if(p instanceof U){var g=p;return this.__actions__.length&&(g=new U(this)),g=g.reverse(),g.__actions__.push({func:Fi,args:[ov],thisArg:n}),new j(g,this.__chain__)}return this.thru(ov)}function mv(){return Sb(this.__wrapped__,this.__actions__)}var jd=Sc(function(p,g,E){Mn.call(p,E)?++p[E]:Ia(p,E,1)});function rx(p,g,E){var L=rn(p)?Pp:k0;return E&&ts(p,g,E)&&(g=n),L(p,Ut(g,3))}function ix(p,g){var E=rn(p)?na:Xn;return E(p,Ut(g,3))}var sx=ol(ca),gv=ol(iv);function vv(p,g){return Dn(mh(p,g),1)}function sS(p,g){return Dn(mh(p,g),te)}function aS(p,g,E){return E=E===n?1:ln(E),Dn(mh(p,g),E)}function ax(p,g){var E=rn(p)?wi:il;return E(p,Ut(g,3))}function yv(p,g){var E=rn(p)?Rp:Gp;return E(p,Ut(g,3))}var ox=Sc(function(p,g,E){Mn.call(p,E)?p[E].push(g):Ia(p,E,[g])});function Ld(p,g,E,L){p=hi(p)?p:Hd(p),E=E&&!L?ln(E):0;var K=p.length;return E<0&&(E=ar(K+E,0)),Nm(p)?E<=K&&p.indexOf(g,E)>-1:!!K&&Hl(p,g,E)>-1}var Tm=hn(function(p,g,E){var L=-1,K=typeof g=="function",se=hi(p)?Ue(p.length):[];return il(p,function(ge){se[++L]=K?fr(g,ge,E):bc(ge,g,E)}),se}),lx=Sc(function(p,g,E){Ia(p,E,g)});function mh(p,g){var E=rn(p)?sr:j0;return E(p,Ut(g,3))}function ux(p,g,E,L){return p==null?[]:(rn(g)||(g=g==null?[]:[g]),E=L?n:E,rn(E)||(E=E==null?[]:[E]),F0(p,g,E))}var cx=Sc(function(p,g,E){p[E?0:1].push(g)},function(){return[[],[]]});function dx(p,g,E){var L=rn(p)?$l:Of,K=arguments.length<3;return L(p,Ut(g,4),E,K,il)}function fx(p,g,E){var L=rn(p)?ec:Of,K=arguments.length<3;return L(p,Ut(g,4),E,K,Gp)}function wm(p,g){var E=rn(p)?na:Xn;return E(p,xh(Ut(g,3)))}function hx(p){var g=rn(p)?vd:_d;return g(p)}function px(p,g,E){(E?ts(p,g,E):g===n)?g=1:g=ln(g);var L=rn(p)?cb:nm;return L(p,g)}function ur(p){var g=rn(p)?db:xb;return g(p)}function bv(p){if(p==null)return 0;if(hi(p))return Nm(p)?Pi(p):p.length;var g=bi(p);return g==xt||g==he?p.size:Kp(p).length}function oS(p,g,E){var L=rn(p)?Vl:_b;return E&&ts(p,g,E)&&(g=n),L(p,Ut(g,3))}var mx=hn(function(p,g){if(p==null)return[];var E=g.length;return E>1&&ts(p,g[0],g[1])?g=[]:E>2&&ts(g[0],g[1],g[2])&&(g=[g[0]]),F0(p,Dn(g,1),[])}),Cm=tu||function(){return kr.Date.now()};function lS(p,g){if(typeof g!="function")throw new Zi(o);return p=ln(p),function(){if(--p<1)return g.apply(this,arguments)}}function gx(p,g,E){return g=E?n:g,g=p&&g==null?p.length:g,ho(p,$,n,n,n,n,g)}function gh(p,g){var E;if(typeof g!="function")throw new Zi(o);return p=ln(p),function(){return--p>0&&(E=g.apply(this,arguments)),p<=1&&(g=n),E}}var gu=hn(function(p,g,E){var L=D;if(E.length){var K=no(E,Ec(gu));L|=M}return ho(p,L,g,E,K)}),Em=hn(function(p,g,E){var L=D|k;if(E.length){var K=no(E,Ec(Em));L|=M}return ho(g,L,p,E,K)});function vh(p,g,E){g=E?n:g;var L=ho(p,N,n,n,n,n,n,g);return L.placeholder=vh.placeholder,L}function Am(p,g,E){g=E?n:g;var L=ho(p,F,n,n,n,n,n,g);return L.placeholder=Am.placeholder,L}function vu(p,g,E){var L,K,se,ge,xe,ke,nt=0,st=!1,dt=!1,St=!0;if(typeof p!="function")throw new Zi(o);g=ha(g)||0,wr(E)&&(st=!!E.leading,dt="maxWait"in E,se=dt?ar(ha(E.maxWait)||0,g):se,St="trailing"in E?!!E.trailing:St);function It(gi){var gl=L,Rc=K;return L=K=n,nt=gi,ge=p.apply(Rc,gl),ge}function Jt(gi){return nt=gi,xe=Ed(Pn,g),st?It(gi):ge}function xn(gi){var gl=gi-ke,Rc=gi-nt,e3=g-gl;return dt?hr(e3,se-Rc):e3}function en(gi){var gl=gi-ke,Rc=gi-nt;return ke===n||gl>=g||gl<0||dt&&Rc>=se}function Pn(){var gi=Cm();if(en(gi))return Ln(gi);xe=Ed(Pn,xn(gi))}function Ln(gi){return xe=n,St&&L?It(gi):(L=K=n,ge)}function Ba(){xe!==n&&wb(xe),nt=0,L=ke=K=xe=n}function Gs(){return xe===n?ge:Ln(Cm())}function Fa(){var gi=Cm(),gl=en(gi);if(L=arguments,K=this,ke=gi,gl){if(xe===n)return Jt(ke);if(dt)return wb(xe),xe=Ed(Pn,g),It(ke)}return xe===n&&(xe=Ed(Pn,g)),ge}return Fa.cancel=Ba,Fa.flush=Gs,Fa}var vo=hn(function(p,g){return vc(p,1,g)}),yh=hn(function(p,g,E){return vc(p,ha(g)||0,E)});function uS(p){return ho(p,B)}function bh(p,g){if(typeof p!="function"||g!=null&&typeof g!="function")throw new Zi(o);var E=function(){var L=arguments,K=g?g.apply(this,L):L[0],se=E.cache;if(se.has(K))return se.get(K);var ge=p.apply(this,L);return E.cache=se.set(K,ge)||se,ge};return E.cache=new(bh.Cache||ti),E}bh.Cache=ti;function xh(p){if(typeof p!="function")throw new Zi(o);return function(){var g=arguments;switch(g.length){case 0:return!p.call(this);case 1:return!p.call(this,g[0]);case 2:return!p.call(this,g[0],g[1]);case 3:return!p.call(this,g[0],g[1],g[2])}return!p.apply(this,g)}}function vx(p){return gh(2,p)}var yx=Tb(function(p,g){g=g.length==1&&rn(g[0])?sr(g[0],Yi(Ut())):sr(Dn(g,1),Yi(Ut()));var E=g.length;return hn(function(L){for(var K=-1,se=hr(L.length,E);++K<se;)L[K]=g[K].call(this,L[K]);return fr(p,this,L)})}),xv=hn(function(p,g){var E=no(g,Ec(xv));return ho(p,M,n,g,E)}),Dm=hn(function(p,g){var E=no(g,Ec(Dm));return ho(p,V,n,g,E)}),bx=vr(function(p,g){return ho(p,q,n,n,n,g)});function xx(p,g){if(typeof p!="function")throw new Zi(o);return g=g===n?g:ln(g),hn(p,g)}function cS(p,g){if(typeof p!="function")throw new Zi(o);return g=g==null?0:ar(ln(g),0),hn(function(E){var L=E[g],K=au(E,0,g);return L&&ra(K,L),fr(p,this,K)})}function _v(p,g,E){var L=!0,K=!0;if(typeof p!="function")throw new Zi(o);return wr(E)&&(L="leading"in E?!!E.leading:L,K="trailing"in E?!!E.trailing:K),vu(p,g,{leading:L,maxWait:g,trailing:K})}function Sv(p){return gx(p,1)}function dS(p,g){return xv(Qf(g),p)}function fS(){if(!arguments.length)return[];var p=arguments[0];return rn(p)?p:[p]}function _h(p){return ji(p,b)}function hS(p,g){return g=typeof g=="function"?g:n,ji(p,b,g)}function _x(p){return ji(p,y|b)}function wn(p,g){return g=typeof g=="function"?g:n,ji(p,y|b,g)}function Tv(p,g){return g==null||D0(p,g,mi(g))}function ws(p,g){return p===g||p!==p&&g!==g}var wv=Cc(zf),Sx=Cc(function(p,g){return p>=g}),pl=Wp(function(){return arguments}())?Wp:function(p){return Pr(p)&&Mn.call(p,"callee")&&!Qo.call(p,"callee")},rn=Ue.isArray,km=od?Yi(od):ys;function hi(p){return p!=null&&kc(p.length)&&!ja(p)}function Fr(p){return Pr(p)&&hi(p)}function pS(p){return p===!0||p===!1||Pr(p)&&Rn(p)==Me}var yu=Zo||BS,Tx=kp?Yi(kp):ni;function wx(p){return Pr(p)&&p.nodeType===1&&!fa(p)}function Rm(p){if(p==null)return!0;if(hi(p)&&(rn(p)||typeof p=="string"||typeof p.splice=="function"||yu(p)||Bd(p)||pl(p)))return!p.length;var g=bi(p);if(g==xt||g==he)return!p.size;if(lr(p))return!Kp(p).length;for(var E in p)if(Mn.call(p,E))return!1;return!0}function Jn(p,g){return xc(p,g)}function Cv(p,g,E){E=typeof E=="function"?E:n;var L=E?E(p,g):n;return L===n?xc(p,g,n,E):!!L}function pi(p){if(!Pr(p))return!1;var g=Rn(p);return g==mt||g==bt||typeof p.message=="string"&&typeof p.name=="string"&&!fa(p)}function mS(p){return typeof p=="number"&&dc(p)}function ja(p){if(!wr(p))return!1;var g=Rn(p);return g==_t||g==Qt||g==Ke||g==He}function Pm(p){return typeof p=="number"&&p==ln(p)}function kc(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=Z}function wr(p){var g=typeof p;return p!=null&&(g=="object"||g=="function")}function Pr(p){return p!=null&&typeof p=="object"}var Im=Zu?Yi(Zu):Xp;function Ev(p,g){return p===g||Vf(p,g,hm(g))}function gS(p,g,E){return E=typeof E=="function"?E:n,Vf(p,g,hm(g),E)}function Cx(p){return Ax(p)&&p!=+p}function vS(p){if(oh(p))throw new zt(s);return co(p)}function Ex(p){return p===null}function yS(p){return p==null}function Ax(p){return typeof p=="number"||Pr(p)&&Rn(p)==wt}function fa(p){if(!Pr(p)||Rn(p)!=qe)return!1;var g=lc(p);if(g===null)return!0;var E=Mn.call(g,"constructor")&&g.constructor;return typeof E=="function"&&E instanceof E&&oc.call(E)==Ii}var Om=Ul?Yi(Ul):Yp;function Av(p){return Pm(p)&&p>=-Z&&p<=Z}var Dx=zl?Yi(zl):O0;function Nm(p){return typeof p=="string"||!rn(p)&&Pr(p)&&Rn(p)==Ae}function ns(p){return typeof p=="symbol"||Pr(p)&&Rn(p)==rt}var Bd=Ju?Yi(Ju):N0;function La(p){return p===n}function Dv(p){return Pr(p)&&bi(p)==Ze}function kx(p){return Pr(p)&&Rn(p)==qt}var Rx=Cc(Qp),Sh=Cc(function(p,g){return p<=g});function qs(p){if(!p)return[];if(hi(p))return Nm(p)?Qi(p):di(p);if(Ni&&p[Ni])return Lp(p[Ni]());var g=bi(p),E=g==xt?Wo:g==he?dd:Hd;return E(p)}function yo(p){if(!p)return p===0?p:0;if(p=ha(p),p===te||p===-te){var g=p<0?-1:1;return g*ie}return p===p?p:0}function ln(p){var g=yo(p),E=g%1;return g===g?E?g-E:g:0}function bo(p){return p?Oa(ln(p),0,X):0}function ha(p){if(typeof p=="number")return p;if(ns(p))return G;if(wr(p)){var g=typeof p.valueOf=="function"?p.valueOf():p;p=wr(g)?g+"":g}if(typeof p!="string")return p===0?p:+p;p=Np(p);var E=Dr.test(p);return E||Qa.test(p)?x0(p.slice(2),E?2:8):Ns.test(p)?G:+p}function Px(p){return xs(p,xi(p))}function Fd(p){return p?Oa(ln(p),-Z,Z):p===0?p:0}function Vn(p){return p==null?"":bs(p)}var bS=Tc(function(p,g){if(lr(g)||hi(g)){xs(g,mi(g),p);return}for(var E in g)Mn.call(g,E)&&gc(p,E,g[E])}),Ix=Tc(function(p,g){xs(g,xi(g),p)}),Mm=Tc(function(p,g,E,L){xs(g,xi(g),p,L)}),xS=Tc(function(p,g,E,L){xs(g,mi(g),p,L)}),_S=vr(Uf);function SS(p,g){var E=I(p);return g==null?E:rl(E,g)}var TS=hn(function(p,g){p=Sn(p);var E=-1,L=g.length,K=L>2?g[2]:n;for(K&&ts(g[0],g[1],K)&&(L=1);++E<L;)for(var se=g[E],ge=xi(se),xe=-1,ke=ge.length;++xe<ke;){var nt=ge[xe],st=p[nt];(st===n||ws(st,Xo[nt])&&!Mn.call(p,nt))&&(p[nt]=se[nt])}return p}),Ox=hn(function(p){return p.push(n,Q0),fr(Eh,n,p)});function Ud(p,g){return Pf(p,Ut(g,3),Li)}function Th(p,g){return Pf(p,Ut(g,3),xd)}function Nx(p,g){return p==null?p:bd(p,Ut(g,3),xi)}function wS(p,g){return p==null?p:yc(p,Ut(g,3),xi)}function zd(p,g){return p&&Li(p,Ut(g,3))}function wh(p,g){return p&&xd(p,Ut(g,3))}function Mx(p){return p==null?[]:su(p,mi(p))}function jm(p){return p==null?[]:su(p,xi(p))}function Ch(p,g,E){var L=p==null?n:la(p,g);return L===n?E:L}function kv(p,g){return p!=null&&ah(p,g,R0)}function $d(p,g){return p!=null&&ah(p,g,pb)}var jx=eh(function(p,g,E){g!=null&&typeof g.toString!="function"&&(g=Ci.call(g)),p[g]=E},Ie(Oe)),Lx=eh(function(p,g,E){g!=null&&typeof g.toString!="function"&&(g=Ci.call(g)),Mn.call(p,g)?p[g].push(E):p[g]=[E]},Ut),CS=hn(bc);function mi(p){return hi(p)?A0(p):Kp(p)}function xi(p){return hi(p)?A0(p,!0):gb(p)}function ES(p,g){var E={};return g=Ut(g,3),Li(p,function(L,K,se){Ia(E,g(L,K,se),L)}),E}function AS(p,g){var E={};return g=Ut(g,3),Li(p,function(L,K,se){Ia(E,K,g(L,K,se))}),E}var DS=Tc(function(p,g,E){Hf(p,g,E)}),Eh=Tc(function(p,g,E,L){Hf(p,g,E,L)}),Lm=vr(function(p,g){var E={};if(p==null)return E;var L=!1;g=sr(g,function(se){return se=al(se,p),L||(L=se.length>1),se}),xs(p,dm(p),E),L&&(E=ji(E,y|x|b,Ib));for(var K=g.length;K--;)Xf(E,g[K]);return E});function Rv(p,g){return Vd(p,xh(Ut(g)))}var kS=vr(function(p,g){return p==null?{}:vb(p,g)});function Vd(p,g){if(p==null)return{};var E=sr(dm(p),function(L){return[L]});return g=Ut(g),Jp(p,E,function(L,K){return g(L,K[0])})}function RS(p,g,E){g=al(g,p);var L=-1,K=g.length;for(K||(K=1,p=n);++L<K;){var se=p==null?n:p[Gn(g[L])];se===n&&(L=K,se=E),p=ja(se)?se.call(p):se}return p}function Bx(p,g,E){return p==null?p:Sd(p,g,E)}function Fx(p,g,E,L){return L=typeof L=="function"?L:n,p==null?p:Sd(p,g,E,L)}var Pv=rh(mi),Iv=rh(xi);function Ov(p,g,E){var L=rn(p),K=L||yu(p)||Bd(p);if(g=Ut(g,4),E==null){var se=p&&p.constructor;K?E=L?new se:[]:wr(p)?E=ja(se)?I(lc(p)):{}:E={}}return(K?wi:Li)(p,function(ge,xe,ke){return g(E,ge,xe,ke)}),E}function Ux(p,g){return p==null?!0:Xf(p,g)}function Bm(p,g,E){return p==null?p:V0(p,g,Qf(E))}function PS(p,g,E,L){return L=typeof L=="function"?L:n,p==null?p:V0(p,g,Qf(E),L)}function Hd(p){return p==null?[]:Gl(p,mi(p))}function Nv(p){return p==null?[]:Gl(p,xi(p))}function Mv(p,g,E){return E===n&&(E=g,g=n),E!==n&&(E=ha(E),E=E===E?E:0),g!==n&&(g=ha(g),g=g===g?g:0),Oa(ha(p),g,E)}function Fm(p,g,E){return g=yo(g),E===n?(E=g,g=0):E=yo(E),p=ha(p),mb(p,g,E)}function jv(p,g,E){if(E&&typeof E!="boolean"&&ts(p,g,E)&&(g=E=n),E===n&&(typeof g=="boolean"?(E=g,g=n):typeof p=="boolean"&&(E=p,p=n)),p===n&&g===n?(p=0,g=1):(p=yo(p),g===n?(g=p,p=0):g=yo(g)),p>g){var L=p;p=g,g=L}if(E||p%1||g%1){var K=Bf();return hr(p+K*(g-p+Ku("1e-"+((K+"").length-1))),g)}return tm(p,g)}var zx=es(function(p,g,E){return g=g.toLowerCase(),p+(E?Um(g):g)});function Um(p){return v(Vn(p).toLowerCase())}function ml(p){return p=Vn(p),p&&p.replace(No,sc).replace(Da,"")}function bu(p,g,E){p=Vn(p),g=bs(g);var L=p.length;E=E===n?L:Oa(ln(E),0,L);var K=E;return E-=g.length,E>=0&&p.slice(E,K)==g}function xu(p){return p=Vn(p),p&&ye.test(p)?p.replace(J,Mp):p}function Ah(p){return p=Vn(p),p&&On.test(p)?p.replace(En,"\\$&"):p}var Dh=es(function(p,g,E){return p+(E?"-":"")+g.toLowerCase()}),_u=es(function(p,g,E){return p+(E?" ":"")+g.toLowerCase()}),IS=zs("toLowerCase");function $x(p,g,E){p=Vn(p),g=ln(g);var L=g?Pi(p):0;if(!g||L>=g)return p;var K=(g-L)/2;return nh(sa(K),E)+p+nh(ao(K),E)}function kh(p,g,E){p=Vn(p),g=ln(g);var L=g?Pi(p):0;return g&&L<g?p+nh(g-L,E):p}function OS(p,g,E){p=Vn(p),g=ln(g);var L=g?Pi(p):0;return g&&L<g?nh(g-L,E)+p:p}function Vx(p,g,E){return E||g==null?g=0:g&&(g=+g),Jo(Vn(p).replace(dr,""),g||0)}function zm(p,g,E){return(E?ts(p,g,E):g===n)?g=1:g=ln(g),z0(Vn(p),g)}function Hx(){var p=arguments,g=Vn(p[0]);return p.length<3?g:g.replace(p[1],p[2])}var NS=es(function(p,g,E){return p+(E?"_":"")+g.toLowerCase()});function $m(p,g,E){return E&&typeof E!="number"&&ts(p,g,E)&&(g=E=n),E=E===n?X:E>>>0,E?(p=Vn(p),p&&(typeof g=="string"||g!=null&&!Om(g))&&(g=bs(g),!g&&Pa(p))?au(Qi(p),0,E):p.split(g,E)):[]}var Vm=es(function(p,g,E){return p+(E?" ":"")+v(g)});function qx(p,g,E){return p=Vn(p),E=E==null?0:Oa(ln(E),0,p.length),g=bs(g),p.slice(E,E+g.length)==g}function Rh(p,g,E){var L=_.templateSettings;E&&ts(p,g,E)&&(g=n),p=Vn(p),g=Mm({},g,L,um);var K=Mm({},g.imports,L.imports,um),se=mi(K),ge=Gl(K,se),xe,ke,nt=0,st=g.interpolate||Mo,dt="__p += '",St=ac((g.escape||Mo).source+"|"+st.source+"|"+(st===Nt?At:Mo).source+"|"+(g.evaluate||Mo).source+"|$","g"),It="//# sourceURL="+(Mn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Af+"]")+`
`;p.replace(St,function(en,Pn,Ln,Ba,Gs,Fa){return Ln||(Ln=Ba),dt+=p.slice(nt,Fa).replace(wp,Nf),Pn&&(xe=!0,dt+=`' +
__e(`+Pn+`) +
'`),Gs&&(ke=!0,dt+=`';
`+Gs+`;
__p += '`),Ln&&(dt+=`' +
((__t = (`+Ln+`)) == null ? '' : __t) +
'`),nt=Fa+en.length,en}),dt+=`';
`;var Jt=Mn.call(g,"variable")&&g.variable;if(!Jt)dt=`with (obj) {
`+dt+`
}
`;else if(_n.test(Jt))throw new zt(u);dt=(ke?dt.replace(Ka,""):dt).replace(Os,"$1").replace(us,"$1;"),dt="function("+(Jt||"obj")+`) {
`+(Jt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(xe?", __e = _.escape":"")+(ke?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+dt+`return __p
}`;var xn=R(function(){return An(se,It+"return "+dt).apply(n,ge)});if(xn.source=dt,pi(xn))throw xn;return xn}function Lv(p){return Vn(p).toLowerCase()}function Hm(p){return Vn(p).toUpperCase()}function Gx(p,g,E){if(p=Vn(p),p&&(E||g===n))return Np(p);if(!p||!(g=bs(g)))return p;var L=Qi(p),K=Qi(g),se=Go(L,K),ge=Xl(L,K)+1;return au(L,se,ge).join("")}function MS(p,g,E){if(p=Vn(p),p&&(E||g===n))return p.slice(0,Yl(p)+1);if(!p||!(g=bs(g)))return p;var L=Qi(p),K=Xl(L,Qi(g))+1;return au(L,0,K).join("")}function qm(p,g,E){if(p=Vn(p),p&&(E||g===n))return p.replace(dr,"");if(!p||!(g=bs(g)))return p;var L=Qi(p),K=Go(L,Qi(g));return au(L,K).join("")}function a(p,g){var E=z,L=ee;if(wr(g)){var K="separator"in g?g.separator:K;E="length"in g?ln(g.length):E,L="omission"in g?bs(g.omission):L}p=Vn(p);var se=p.length;if(Pa(p)){var ge=Qi(p);se=ge.length}if(E>=se)return p;var xe=E-Pi(L);if(xe<1)return L;var ke=ge?au(ge,0,xe).join(""):p.slice(0,xe);if(K===n)return ke+L;if(ge&&(xe+=ke.length-xe),Om(K)){if(p.slice(xe).search(K)){var nt,st=ke;for(K.global||(K=ac(K.source,Vn(Wi.exec(K))+"g")),K.lastIndex=0;nt=K.exec(st);)var dt=nt.index;ke=ke.slice(0,dt===n?xe:dt)}}else if(p.indexOf(bs(K),xe)!=xe){var St=ke.lastIndexOf(K);St>-1&&(ke=ke.slice(0,St))}return ke+L}function l(p){return p=Vn(p),p&&re.test(p)?p.replace(cs,Kl):p}var h=es(function(p,g,E){return p+(E?" ":"")+g.toUpperCase()}),v=zs("toUpperCase");function C(p,g,E){return p=Vn(p),g=E?n:g,g===n?jp(p)?Mf(p):Ip(p):p.match(g)||[]}var R=hn(function(p,g){try{return fr(p,n,g)}catch(E){return pi(E)?E:new zt(E)}}),W=vr(function(p,g){return wi(g,function(E){E=Gn(E),Ia(p,E,gu(p[E],p))}),p});function ne(p){var g=p==null?0:p.length,E=Ut();return p=g?sr(p,function(L){if(typeof L[1]!="function")throw new Zi(o);return[E(L[0]),L[1]]}):[],hn(function(L){for(var K=-1;++K<g;){var se=p[K];if(fr(se[0],this,L))return fr(se[1],this,L)}})}function ve(p){return fb(ji(p,y))}function Ie(p){return function(){return p}}function Qe(p,g){return p==null||p!==p?g:p}var it=fo(),je=fo(!0);function Oe(p){return p}function Gt(p){return M0(typeof p=="function"?p:ji(p,y))}function Vt(p){return L0(ji(p,y))}function er(p,g){return Zp(p,ji(g,y))}var De=hn(function(p,g){return function(E){return bc(E,p,g)}}),_e=hn(function(p,g){return function(E){return bc(p,E,g)}});function Pe(p,g,E){var L=mi(g),K=su(g,L);E==null&&!(wr(g)&&(K.length||!L.length))&&(E=g,g=p,p=this,K=su(g,mi(g)));var se=!(wr(E)&&"chain"in E)||!!E.chain,ge=ja(p);return wi(K,function(xe){var ke=g[xe];p[xe]=ke,ge&&(p.prototype[xe]=function(){var nt=this.__chain__;if(se||nt){var st=p(this.__wrapped__),dt=st.__actions__=di(this.__actions__);return dt.push({func:ke,args:arguments,thisArg:p}),st.__chain__=nt,st}return ke.apply(p,ra([this.value()],arguments))})}),p}function Je(){return kr._===this&&(kr._=Jl),this}function Dt(){}function bn(p){return p=ln(p),hn(function(g){return B0(g,p)})}var Mt=th(sr),Wt=th(Pp),_i=th(Vl);function jn(p){return mm(p)?ud(Gn(p)):yb(p)}function Su(p){return function(g){return p==null?n:la(p,g)}}var jS=ou(),J6=ou(!0);function LS(){return[]}function BS(){return!1}function eL(){return{}}function tL(){return""}function nL(){return!0}function rL(p,g){if(p=ln(p),p<1||p>Z)return[];var E=X,L=hr(p,X);g=Ut(g),p-=X;for(var K=ia(L,g);++E<p;)g(E);return K}function iL(p){return rn(p)?sr(p,Gn):ns(p)?[p]:di(mo(Vn(p)))}function sL(p){var g=++hs;return Vn(p)+g}var aL=Td(function(p,g){return p+g},0),oL=lm("ceil"),lL=Td(function(p,g){return p/g},1),uL=lm("floor");function cL(p){return p&&p.length?Na(p,Oe,zf):n}function dL(p,g){return p&&p.length?Na(p,Ut(g,2),zf):n}function fL(p){return nc(p,Oe)}function hL(p,g){return nc(p,Ut(g,2))}function pL(p){return p&&p.length?Na(p,Oe,Qp):n}function mL(p,g){return p&&p.length?Na(p,Ut(g,2),Qp):n}var gL=Td(function(p,g){return p*g},1),vL=lm("round"),yL=Td(function(p,g){return p-g},0);function bL(p){return p&&p.length?ic(p,Oe):0}function xL(p,g){return p&&p.length?ic(p,Ut(g,2)):0}return _.after=lS,_.ary=gx,_.assign=bS,_.assignIn=Ix,_.assignInWith=Mm,_.assignWith=xS,_.at=_S,_.before=gh,_.bind=gu,_.bindAll=W,_.bindKey=Em,_.castArray=fS,_.chain=Md,_.chunk=tS,_.compact=Vb,_.concat=Hb,_.cond=ne,_.conforms=ve,_.constant=Ie,_.countBy=jd,_.create=SS,_.curry=vh,_.curryRight=Am,_.debounce=vu,_.defaults=TS,_.defaultsDeep=Ox,_.defer=vo,_.delay=yh,_.difference=Tr,_.differenceBy=_s,_.differenceWith=dl,_.drop=qb,_.dropRight=Gb,_.dropRightWhile=nS,_.dropWhile=rv,_.fill=$s,_.filter=ix,_.flatMap=vv,_.flatMapDeep=sS,_.flatMapDepth=aS,_.flatten=Ss,_.flattenDeep=Wb,_.flattenDepth=cu,_.flip=uS,_.flow=it,_.flowRight=je,_.fromPairs=Ac,_.functions=Mx,_.functionsIn=jm,_.groupBy=ox,_.initial=av,_.intersection=go,_.intersectionBy=Xb,_.intersectionWith=Ad,_.invert=jx,_.invertBy=Lx,_.invokeMap=Tm,_.iteratee=Gt,_.keyBy=lx,_.keys=mi,_.keysIn=xi,_.map=mh,_.mapKeys=ES,_.mapValues=AS,_.matches=Vt,_.matchesProperty=er,_.memoize=bh,_.merge=DS,_.mergeWith=Eh,_.method=De,_.methodOf=_e,_.mixin=Pe,_.negate=xh,_.nthArg=bn,_.omit=Lm,_.omitBy=Rv,_.once=vx,_.orderBy=ux,_.over=Mt,_.overArgs=yx,_.overEvery=Wt,_.overSome=_i,_.partial=xv,_.partialRight=Dm,_.partition=cx,_.pick=kS,_.pickBy=Vd,_.property=jn,_.propertyOf=Su,_.pull=Kb,_.pullAll=kd,_.pullAllBy=Qb,_.pullAllWith=_m,_.pullAt=Zb,_.range=jS,_.rangeRight=J6,_.rearg=bx,_.reject=wm,_.remove=rS,_.rest=xx,_.reverse=ov,_.sampleSize=px,_.set=Bx,_.setWith=Fx,_.shuffle=ur,_.slice=Yn,_.sortBy=mx,_.sortedUniq=Rd,_.sortedUniqBy=lv,_.split=$m,_.spread=cS,_.tail=hl,_.take=Br,_.takeRight=fu,_.takeRightWhile=Dc,_.takeWhile=uv,_.tap=pv,_.throttle=_v,_.thru=Fi,_.toArray=qs,_.toPairs=Pv,_.toPairsIn=Iv,_.toPath=iL,_.toPlainObject=Px,_.transform=Ov,_.unary=Sv,_.union=da,_.unionBy=Pd,_.unionWith=hh,_.uniq=Ts,_.uniqBy=cv,_.uniqWith=dv,_.unset=Ux,_.unzip=Id,_.unzipWith=ph,_.update=Bm,_.updateWith=PS,_.values=Hd,_.valuesIn=Nv,_.without=hu,_.words=C,_.wrap=dS,_.xor=Ai,_.xorBy=pu,_.xorWith=Od,_.zip=Nd,_.zipObject=fv,_.zipObjectDeep=hv,_.zipWith=Jb,_.entries=Pv,_.entriesIn=Iv,_.extend=Ix,_.extendWith=Mm,Pe(_,_),_.add=aL,_.attempt=R,_.camelCase=zx,_.capitalize=Um,_.ceil=oL,_.clamp=Mv,_.clone=_h,_.cloneDeep=_x,_.cloneDeepWith=wn,_.cloneWith=hS,_.conformsTo=Tv,_.deburr=ml,_.defaultTo=Qe,_.divide=lL,_.endsWith=bu,_.eq=ws,_.escape=xu,_.escapeRegExp=Ah,_.every=rx,_.find=sx,_.findIndex=ca,_.findKey=Ud,_.findLast=gv,_.findLastIndex=iv,_.findLastKey=Th,_.floor=uL,_.forEach=ax,_.forEachRight=yv,_.forIn=Nx,_.forInRight=wS,_.forOwn=zd,_.forOwnRight=wh,_.get=Ch,_.gt=wv,_.gte=Sx,_.has=kv,_.hasIn=$d,_.head=fl,_.identity=Oe,_.includes=Ld,_.indexOf=sv,_.inRange=Fm,_.invoke=CS,_.isArguments=pl,_.isArray=rn,_.isArrayBuffer=km,_.isArrayLike=hi,_.isArrayLikeObject=Fr,_.isBoolean=pS,_.isBuffer=yu,_.isDate=Tx,_.isElement=wx,_.isEmpty=Rm,_.isEqual=Jn,_.isEqualWith=Cv,_.isError=pi,_.isFinite=mS,_.isFunction=ja,_.isInteger=Pm,_.isLength=kc,_.isMap=Im,_.isMatch=Ev,_.isMatchWith=gS,_.isNaN=Cx,_.isNative=vS,_.isNil=yS,_.isNull=Ex,_.isNumber=Ax,_.isObject=wr,_.isObjectLike=Pr,_.isPlainObject=fa,_.isRegExp=Om,_.isSafeInteger=Av,_.isSet=Dx,_.isString=Nm,_.isSymbol=ns,_.isTypedArray=Bd,_.isUndefined=La,_.isWeakMap=Dv,_.isWeakSet=kx,_.join=fh,_.kebabCase=Dh,_.last=Bi,_.lastIndexOf=Dd,_.lowerCase=_u,_.lowerFirst=IS,_.lt=Rx,_.lte=Sh,_.max=cL,_.maxBy=dL,_.mean=fL,_.meanBy=hL,_.min=pL,_.minBy=mL,_.stubArray=LS,_.stubFalse=BS,_.stubObject=eL,_.stubString=tL,_.stubTrue=nL,_.multiply=gL,_.nth=Yb,_.noConflict=Je,_.noop=Dt,_.now=Cm,_.pad=$x,_.padEnd=kh,_.padStart=OS,_.parseInt=Vx,_.random=jv,_.reduce=dx,_.reduceRight=fx,_.repeat=zm,_.replace=Hx,_.result=RS,_.round=vL,_.runInContext=Te,_.sample=hx,_.size=bv,_.snakeCase=NS,_.some=oS,_.sortedIndex=pr,_.sortedIndexBy=Tn,_.sortedIndexOf=Nn,_.sortedLastIndex=Kn,_.sortedLastIndexBy=Vs,_.sortedLastIndexOf=du,_.startCase=Vm,_.startsWith=qx,_.subtract=yL,_.sum=bL,_.sumBy=xL,_.template=Rh,_.times=rL,_.toFinite=yo,_.toInteger=ln,_.toLength=bo,_.toLower=Lv,_.toNumber=ha,_.toSafeInteger=Fd,_.toString=Vn,_.toUpper=Hm,_.trim=Gx,_.trimEnd=MS,_.trimStart=qm,_.truncate=a,_.unescape=l,_.uniqueId=sL,_.upperCase=h,_.upperFirst=v,_.each=ax,_.eachRight=yv,_.first=fl,Pe(_,function(){var p={};return Li(_,function(g,E){Mn.call(_.prototype,E)||(p[E]=g)}),p}(),{chain:!1}),_.VERSION=r,wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){_[p].placeholder=_}),wi(["drop","take"],function(p,g){U.prototype[p]=function(E){E=E===n?1:ar(ln(E),0);var L=this.__filtered__&&!g?new U(this):this.clone();return L.__filtered__?L.__takeCount__=hr(E,L.__takeCount__):L.__views__.push({size:hr(E,X),type:p+(L.__dir__<0?"Right":"")}),L},U.prototype[p+"Right"]=function(E){return this.reverse()[p](E).reverse()}}),wi(["filter","map","takeWhile"],function(p,g){var E=g+1,L=E==oe||E==H;U.prototype[p]=function(K){var se=this.clone();return se.__iteratees__.push({iteratee:Ut(K,3),type:E}),se.__filtered__=se.__filtered__||L,se}}),wi(["head","last"],function(p,g){var E="take"+(g?"Right":"");U.prototype[p]=function(){return this[E](1).value()[0]}}),wi(["initial","tail"],function(p,g){var E="drop"+(g?"":"Right");U.prototype[p]=function(){return this.__filtered__?new U(this):this[E](1)}}),U.prototype.compact=function(){return this.filter(Oe)},U.prototype.find=function(p){return this.filter(p).head()},U.prototype.findLast=function(p){return this.reverse().find(p)},U.prototype.invokeMap=hn(function(p,g){return typeof p=="function"?new U(this):this.map(function(E){return bc(E,p,g)})}),U.prototype.reject=function(p){return this.filter(xh(Ut(p)))},U.prototype.slice=function(p,g){p=ln(p);var E=this;return E.__filtered__&&(p>0||g<0)?new U(E):(p<0?E=E.takeRight(-p):p&&(E=E.drop(p)),g!==n&&(g=ln(g),E=g<0?E.dropRight(-g):E.take(g-p)),E)},U.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},U.prototype.toArray=function(){return this.take(X)},Li(U.prototype,function(p,g){var E=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),K=_[L?"take"+(g=="last"?"Right":""):g],se=L||/^find/.test(g);K&&(_.prototype[g]=function(){var ge=this.__wrapped__,xe=L?[1]:arguments,ke=ge instanceof U,nt=xe[0],st=ke||rn(ge),dt=function(Pn){var Ln=K.apply(_,ra([Pn],xe));return L&&St?Ln[0]:Ln};st&&E&&typeof nt=="function"&&nt.length!=1&&(ke=st=!1);var St=this.__chain__,It=!!this.__actions__.length,Jt=se&&!St,xn=ke&&!It;if(!se&&st){ge=xn?ge:new U(this);var en=p.apply(ge,xe);return en.__actions__.push({func:Fi,args:[dt],thisArg:n}),new j(en,St)}return Jt&&xn?p.apply(this,xe):(en=this.thru(dt),Jt?L?en.value()[0]:en.value():en)})}),wi(["pop","push","shift","sort","splice","unshift"],function(p){var g=so[p],E=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",L=/^(?:pop|shift)$/.test(p);_.prototype[p]=function(){var K=arguments;if(L&&!this.__chain__){var se=this.value();return g.apply(rn(se)?se:[],K)}return this[E](function(ge){return g.apply(rn(ge)?ge:[],K)})}}),Li(U.prototype,function(p,g){var E=_[g];if(E){var L=E.name+"";Mn.call(gs,L)||(gs[L]=[]),gs[L].push({name:g,func:E})}}),gs[Lr(n,k).name]=[{name:"wrapper",func:n}],U.prototype.clone=ae,U.prototype.reverse=le,U.prototype.value=de,_.prototype.at=ex,_.prototype.chain=Hs,_.prototype.commit=tx,_.prototype.next=nx,_.prototype.plant=mu,_.prototype.reverse=Sm,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=mv,_.prototype.first=_.prototype.head,Ni&&(_.prototype[Ni]=iS),_},io=Ql();js?((js.exports=io)._=io,Ho._=io):kr._=io}).call(Uee)}(sy,sy.exports)),sy.exports}var $ee=zee();const Yr=ko($ee);function Vee({i18n:t,tooltipText:e,id:n,media:r,callback:i,label:s,disabled:o,size:u}){const[d,f]=A.useState(!0),[m,y]=A.useState(!1),[x,b]=A.useState([]),[w,S]=A.useState([]),[D,k]=A.useState(null),O=()=>{if(D)return i(D),y(!1);Wn({title:t.get("Error"),message:t.get("NoMediaSelected")})},N=M=>{Rt.post(ep+"browse",{id:n,media:M||"0"}).then(function(V){const $=V.data;b($.childrens),S($.parents.reverse())}).catch(function(V){!V.response&&V.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:t.get("DataNotReceived"),message2:t.getReportLink()})}).then(function(){f(!1)})},F=()=>c.jsx(pn,{size:u,label:s,disabled:o,style:{flex:1},value:r?r.label:"",readOnly:!0});return c.jsx(ut,{children:c.jsxs(c.Fragment,{children:[c.jsx(Qn,{opened:m,onClose:()=>y(!1),title:c.jsxs(ut,{children:[c.jsx(zk,{}),t.get("SelectedMedia")]}),scrollAreaComponent:Ar.Autosize,size:"lg",children:c.jsxs(Ee,{mx:"auto",children:[c.jsx(Hi,{shadow:"md",p:"xs",withBorder:!0,children:c.jsx(ut,{children:c.jsxs(X_,{children:[c.jsx(at,{loading:d,onClick:()=>N("0"),variant:"default",size:"compact-md",children:c.jsx(VA,{})}),w.map(M=>c.jsx(at,{loading:d,onClick:()=>N(M.value),variant:"default",size:"compact-md",children:M.label},"breadcrumb"+M.label))]})})}),c.jsx(tn,{gap:"xs",align:"flex-start",justify:"flex-start",mt:"sm",children:x.map(M=>c.jsxs(ut,{children:[c.jsx(at,{leftSection:M.browsable?c.jsx(Og,{size:18}):c.jsx(tK,{size:18}),variant:D?.value===M.value?"light":"subtle",loading:d,onClick:()=>M.browsable?N(M.value):k(M),size:"compact-md",children:M.label},M.label),D?.value===M.value&&c.jsx(at,{variant:"filled",loading:d,onClick:()=>O(),size:"compact-md",children:"Select"},"select"+M.label)]},"group"+M.label))})]})}),e?c.jsx(Ft,{label:e,style:{width:350},color:"blue",multiline:!0,withArrow:!0,children:F()}):F(),!o&&c.jsx(at,{mt:s?"24px":void 0,size:u,onClick:()=>{N(r?r.value:"0"),y(!0)},leftSection:c.jsx(zk,{size:18}),children:"..."})]})})}const S4=({allowed:t,blockedByDefault:e,canControlRenderers:n,canModify:r,i18n:i,renderers:s,users:o,setAllowed:u,setUserId:d})=>{const[f,m]=A.useState(-1),[y,x]=A.useState(null),[b,w]=A.useState(-1),[S,D]=A.useState(null),[k,O]=A.useState(),[N,F]=A.useState(null);A.useEffect(()=>{if(f<0){x(null);return}Rt.post(ep+"infos",{id:f}).then(function(H){x(H.data)}).catch(function(){x(null)})},[f]);const M=(H,te,Z)=>{Rt.post(ep+"control",{id:H,action:te,value:Z})},V=H=>s.find(te=>te.id===H),$=c.jsx(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:y!=null,onClose:()=>m(-1),title:y?.title,children:c.jsx(Bt,{children:c.jsx("tbody",{children:y?.details.map(H=>c.jsxs(Bt.Tr,{children:[c.jsx(Bt.Td,{children:i.getString(H.key)}),c.jsx(Bt.Td,{children:H.value})]},H.key))})})}),q=()=>[{value:"-1",label:i.get("NoAccountAssigned")},{value:"0",label:i.get("DefaultAccount")}].concat(o.map(H=>({value:H.value.toString(),label:H.label}))),B=c.jsxs(Qn,{centered:!0,opened:k!=null,title:k?.name=="UnknownRenderer"?i.get("UnknownRenderer"):k?.name,onClose:()=>O(null),withinPortal:!1,lockScroll:!1,children:[c.jsx(Cr,{mb:"xl",label:i.get("LinkRendererTo"),defaultValue:k?.userId.toString(),onChange:H=>{F(H)},withScrollArea:!1,styles:{dropdown:{maxHeight:70,overflowY:"auto"}},data:q()}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{disabled:!N||N==k?.userId.toString(),onClick:()=>{k&&d(k.uuid,N),O(null)},children:i.get("Apply")})})]}),z=H=>{switch(H){case-1:return i.get("NoAccountAssigned");case 0:return i.get("DefaultAccount");default:{const te=o.find(Z=>Z.value===H);return te?te.label:i.get("NonExistentUser")}}},ee=H=>{if(H.isAllowed)if(H.isActive){if(H.state.playback>0)return"green"}else return"dimmed";else return"red";return""},Y=s&&s.map(H=>t==H.isAllowed&&c.jsx(qn.Col,{span:{base:12,xs:6},children:c.jsxs(Ti,{shadow:"sm",p:"lg",radius:"md",withBorder:!0,children:[c.jsx(Ti.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:c.jsxs(ut,{justify:"space-between",children:[c.jsx(et,{fw:500,c:ee(H),children:H.name=="UnknownRenderer"?i.get("UnknownRenderer"):H.name}),c.jsxs(kt,{withinPortal:!0,position:"bottom-end",shadow:"sm",children:[c.jsx(kt.Target,{children:c.jsx(br,{children:c.jsx(Y1,{size:16})})}),c.jsxs(kt.Dropdown,{children:[c.jsx(kt.Item,{leftSection:c.jsx(kY,{size:14}),onClick:()=>m(H.id),children:i.get("Info")}),r&&c.jsxs(c.Fragment,{children:[c.jsx(kt.Item,{leftSection:c.jsx(pg,{size:14}),color:"red",disabled:!0,children:i.get("Settings")}),!H.isAuthenticated&&H.uuid&&c.jsx(kt.Item,{leftSection:c.jsx(AY,{size:14}),onClick:()=>O(H),children:z(H.userId)}),!H.isAuthenticated&&!H.isAllowed&&H.uuid&&c.jsx(kt.Item,{leftSection:c.jsx(X1,{size:14}),onClick:()=>u(H.uuid,!0),color:"green",children:i.get("Allow")}),!H.isAuthenticated&&H.isAllowed&&H.uuid&&c.jsx(kt.Item,{leftSection:c.jsx(hg,{size:14}),onClick:()=>u(H.uuid,!1),color:"red",children:i.get("Block")})]}),n&&c.jsx(kt.Item,{leftSection:c.jsx(MK,{size:14}),disabled:!H.isActive||H.controls<1,onClick:()=>w(H.id),children:i.get("Controls")})]})]})]})}),c.jsx(Ti.Section,{children:c.jsx(vp,{src:ep+"icon/"+H.id+"/"+H.icon,height:160,fit:"contain",style:H.isActive?void 0:{filter:"grayscale(95%)"},alt:H.name})}),H.address&&c.jsx(et,{ta:"center",size:"sm",c:"dimmed",children:H.address}),H.playing&&c.jsx(_o,{value:H.progressPercent}),H.playing&&c.jsx(et,{ta:"center",size:"sm",c:"dimmed",children:H.playing}),H.time&&c.jsx(et,{ta:"center",size:"sm",c:"dimmed",children:H.time})]})},H.id)),Q=V(b),oe=Q!==void 0&&c.jsx(Dl,{size:"full",opened:b>-1,onClose:()=>w(-1),title:Q.name=="UnknownRenderer"?i.get("UnknownRenderer"):Q.name,children:c.jsxs(tn,{children:[!Q.isActive&&c.jsx(et,{ta:"center",c:"red",children:i.get("RendererNoLongerControllable")}),Q.isActive&&Q.playing&&c.jsxs(c.Fragment,{children:[c.jsx(et,{ta:"center",c:"blue",children:Q.playing}),c.jsx(et,{ta:"center",children:Q.time})]}),(Q.controls&1)===1&&Q.isActive&&c.jsxs(ut,{gap:"xs",grow:!0,mt:"md",children:[c.jsx(br,{style:{flexGrow:"unset"},variant:"filled",onClick:()=>M(Q.id,"mute"),children:Q.state.mute?c.jsx(uQ,{}):c.jsx(dQ,{})}),c.jsx(i0,{labelAlwaysOn:!0,mt:"lg",style:{maxWidth:"unset",marginInlineEnd:"10px"},defaultValue:Q.state.volume,onChangeEnd:H=>M(Q.id,"volume",H)})]}),(Q.controls&2)===2&&Q.isActive&&c.jsxs(ut,{justify:"center",children:[c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"back"),children:c.jsx(aK,{})}),c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"prev"),children:c.jsx(pK,{})}),Q.state.playback===1?c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"pause"),children:c.jsx(rK,{})}):c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"play"),children:c.jsx(Zh,{})}),c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"stop"),children:c.jsx(cK,{})}),c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"next"),children:c.jsx(fK,{})}),c.jsx(br,{variant:"filled",onClick:()=>M(Q.id,"forward"),children:c.jsx(lK,{})})]}),Q.isActive&&c.jsxs(ut,{justify:"center",children:[c.jsx(Vee,{i18n:i,disabled:!r,size:"xs",id:Q.id,media:S,callback:H=>D(H)}),S&&c.jsx(br,{onClick:()=>M(Q.id,"mediaid",S.value),children:c.jsx(iN,{})})]})]})}),ue=!t&&c.jsx(Ti,{shadow:"sm",p:"lg",radius:"md",mb:"lg",withBorder:!0,children:c.jsx(Ti.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:c.jsxs(ut,{justify:"space-between",children:[c.jsx(et,{fw:500,c:e?"red":"green",children:e?i.get("RenderersBlockedByDefault"):i.get("RenderersAllowedByDefault")}),r&&c.jsxs(kt,{withinPortal:!0,position:"bottom-end",shadow:"sm",children:[c.jsx(kt.Target,{children:c.jsx(br,{children:c.jsx(Y1,{size:16})})}),c.jsx(kt.Dropdown,{children:c.jsx(c.Fragment,{children:e?c.jsx(kt.Item,{leftSection:c.jsx(X1,{size:14}),onClick:()=>u("DEFAULT",!0),color:"green",children:i.get("AllowByDefault")}):c.jsx(kt.Item,{leftSection:c.jsx(hg,{size:14}),onClick:()=>u("DEFAULT",!1),color:"red",children:i.get("BlockByDefault")})})})]})]})})});return c.jsxs(c.Fragment,{children:[$,B,oe,ue,c.jsx(qn,{children:Y})]})},Hee=({blockedByDefault:t,isLocalhost:e,canModify:n,currentTime:r,i18n:i,networkDeviceFilters:s,refreshDeviceData:o,setAllowed:u,reset:d})=>{const[f,{open:m,close:y}]=pp(!1),[x,b]=A.useState(""),[w,S]=A.useState(!1),D=$=>{let q=(r-$)/1e3;const B=Math.floor(q%60),z=B<10?"0"+B:B;q=Math.floor(q/60);const ee=q%60,Y=ee<10?"0"+ee:ee;q=Math.floor(q/60);const Q=q%24,oe=Q<10?"0"+Q:Q;return q=Math.floor(q/24),q+" "+(q>1?i.get("Days"):i.get("Day"))+" "+oe+":"+Y+":"+z},k=$=>{b($),S(O($))},O=$=>{const q=/(\d{0,3}-?\d{0,3}|\*)\.(\d{0,3}-?\d{0,3}|\*)\.(\d{0,3}-?\d{0,3}|\*)\.(\d{0,3}-?\d{0,3}|\*)/gm.exec($);console.log(JSON.stringify(q));const B=/[\w.-]*/gm.exec($);return console.log(JSON.stringify(B)),q!=null&&q[0]===$||B!=null&&B[0]===$},N=()=>{O(x)&&u(x,t),b(""),S(!1),y()},F=c.jsx(Ti,{shadow:"sm",p:"lg",radius:"md",mb:"lg",withBorder:!0,children:c.jsx(Ti.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:c.jsxs(ut,{justify:"space-between",children:[c.jsx(et,{fw:500,c:t?"red":"green",children:t?i.get("NetworkDevicesBlockedByDefault"):i.get("NetworkDevicesAllowedByDefault")}),n&&c.jsxs(kt,{withinPortal:!0,position:"bottom-end",shadow:"sm",children:[c.jsx(kt.Target,{children:c.jsx(br,{children:c.jsx(Y1,{size:16})})}),c.jsx(kt.Dropdown,{children:c.jsxs(c.Fragment,{children:[t?c.jsx(kt.Item,{leftSection:c.jsx(X1,{size:14}),onClick:()=>u("DEFAULT",!0),color:"green",children:i.get("AllowByDefault")}):e?c.jsx(kt.Item,{leftSection:c.jsx(hg,{size:14}),onClick:()=>u("DEFAULT",!1),color:"red",children:i.get("BlockByDefault")}):c.jsx(Ft,{label:i.get("YouHaveToNavigateFromLocalhost"),...mn,children:c.jsx(kt.Item,{leftSection:c.jsx(hg,{size:14}),closeMenuOnClick:!1,color:"grey",children:i.get("BlockByDefault")})}),c.jsx(kt.Item,{leftSection:c.jsx(uN,{size:14}),onClick:()=>o(),children:i.get("Refresh")}),c.jsx(kt.Item,{leftSection:c.jsx(Uk,{size:14}),onClick:()=>m(),children:i.get("AddCustomFilter")}),c.jsx(kt.Item,{leftSection:c.jsx(UK,{size:14}),onClick:()=>d(),color:"orange",children:i.get("ResetToDefaultSettings")})]})})]})]})})}),M=n&&c.jsx(Qn,{opened:f,onClose:y,title:i.get("AddCustomFilter"),children:c.jsx(pn,{value:x,onChange:$=>k($.currentTarget.value),rightSection:w&&c.jsx(br,{variant:"outline",onClick:()=>N(),children:c.jsx(Uk,{size:16})})})}),V=s&&s.map($=>c.jsx(qn.Col,{span:{base:12,xs:6},children:c.jsxs(Ti,{shadow:"sm",p:"lg",radius:"md",withBorder:!0,children:[c.jsx(Ti.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:c.jsxs(ut,{justify:"space-between",children:[c.jsx(et,{fw:500,c:$.isAllowed?"green":"red",children:$.name}),n&&!$.isDefault&&c.jsxs(kt,{withinPortal:!0,position:"bottom-end",shadow:"sm",children:[c.jsx(kt.Target,{children:c.jsx(br,{children:c.jsx(Y1,{size:16})})}),c.jsx(kt.Dropdown,{children:c.jsxs(c.Fragment,{children:[!$.isAllowed&&c.jsx(kt.Item,{leftSection:c.jsx(X1,{size:14}),onClick:()=>u($.name,!0),color:"green",children:i.get("Allow")}),$.isAllowed&&c.jsx(kt.Item,{leftSection:c.jsx(hg,{size:14}),onClick:()=>u($.name,!1),color:"red",children:i.get("Block")})]})})]})]})}),$.devices&&$.devices.map((q,B)=>c.jsxs(Ti.Section,{children:[c.jsx(et,{ta:"center",size:"sm",children:q.hostName}),q.ipAddress!=q.hostName&&c.jsx(et,{ta:"center",size:"sm",c:"dimmed",children:q.ipAddress}),q.lastSeen&&c.jsx(et,{ta:"center",size:"sm",c:"dimmed",children:D(q.lastSeen)})]},"devices"+B))]})},$.name));return A.useEffect(()=>{o()},[n]),c.jsxs(c.Fragment,{children:[F,M,c.jsx(qn,{children:V})]})},oD=({i18n:t,session:e})=>{const[n,r]=A.useState([]),[i,s]=A.useState(!1),[o,u]=A.useState([]),[d,f]=A.useState(!1),[m,y]=A.useState(!1),[x,b]=A.useState([]),[w,S]=A.useState(0),D=e.havePermission(dn.settings_modify),k=D||e.havePermission(dn.settings_view),O=e.havePermission(dn.devices_control),[N,F]=A.useState(!1);A.useEffect(()=>{if(!e.hasRendererAction)return;const Y=Yr.cloneDeep(n);for(;e.hasRendererAction;){const Q=e.getRendererAction();if(Q===void 0)break;switch(Q.action){case"renderer_add":{Y.push(Q.data);break}case"renderer_delete":{const oe=Y.findIndex(ue=>ue.id===Q.data.id);oe>-1&&Y.splice(oe,1);break}case"renderer_update":{const oe=Y.findIndex(ue=>ue.id===Q.data.id);oe>-1&&(Y[oe]=Q.data);break}}}r(Y)},[n,e.hasRendererAction]),A.useEffect(()=>{k&&M()},[k]),A.useEffect(()=>{e.setDocumentTitle(""),e.subscribeTo("Home"),e.stopPlayerSse(),e.setNavbarManage(oD.name)},[]);const M=async()=>{F(!0),Rt.get(ep).then(function(Y){r(Y.data.renderers),s(Y.data.renderersBlockedByDefault),f(Y.data.networkDevicesBlockedByDefault),b(Y.data.users),S(Y.data.currentTime)}).catch(function(Y){!Y.response&&Y.request?t.showServerUnreachable():Wn({id:"renderers-data-loading",title:t.get("Error"),message:t.get("DataNotReceived")})}).then(function(){F(!1)})},V=async()=>{F(!0),Rt.get(ep+"devices").then(function(Y){y(Y.data.isLocalhost),u(Y.data.networkDevices),f(Y.data.networkDevicesBlockedByDefault),S(Y.data.currentTime)}).catch(function(Y){!Y.response&&Y.request?t.showServerUnreachable():Wn({id:"renderers-data-loading",title:t.get("Error"),message:t.get("DataNotReceived")})}).then(function(){F(!1)})},$=async(Y,Q)=>{ee("renderers",{rule:Y,userId:Q},!1)},q=async(Y,Q)=>{ee("renderers",{rule:Y,isAllowed:Q},!1)},B=async(Y,Q)=>{ee("devices",{rule:Y,isAllowed:Q},!0)},z=async()=>{ee("reset",null,!0)},ee=async(Y,Q,oe)=>{ZA({id:"settings-save",title:t.get("Save"),message:t.get("SavingConfiguration")}),await Rt.post(ep+Y,Q).then(function(){eD({id:"settings-save",title:t.get("Saved"),message:t.get("ConfigurationSaved"),icon:c.jsx(sN,{size:"1rem"})}),oe?V():M()}).catch(function(ue){!ue.response&&ue.request?(Lu("settings-save"),t.showServerUnreachable()):tD({id:"settings-save",title:t.get("Error"),message:t.get("ConfigurationNotSaved")})})};return k?c.jsxs(Ee,{style:{maxWidth:1024},mx:"auto",children:[c.jsx(t0,{visible:N}),c.jsxs(Kt,{keepMounted:!1,defaultValue:"renderers",children:[c.jsxs(Kt.List,{children:[c.jsx(Kt.Tab,{value:"renderers",children:t.get("DetectedMediaRenderers")}),c.jsx(Kt.Tab,{value:"blocked_renderers",children:t.get("BlockedMediaRenderers")}),c.jsx(Kt.Tab,{value:"network_devices",children:t.get("NetworkDevices")})]}),c.jsx(Kt.Panel,{value:"renderers",pt:"xs",children:c.jsx(S4,{allowed:!0,blockedByDefault:i,canControlRenderers:O,canModify:D,i18n:t,renderers:n,users:x,setAllowed:q,setUserId:$})}),c.jsx(Kt.Panel,{value:"blocked_renderers",pt:"xs",children:c.jsx(S4,{allowed:!1,blockedByDefault:i,canControlRenderers:O,canModify:D,i18n:t,renderers:n,users:x,setAllowed:q,setUserId:$})}),c.jsx(Kt.Panel,{value:"network_devices",pt:"xs",children:c.jsx(Hee,{blockedByDefault:d,isLocalhost:m,canModify:D,currentTime:w,i18n:t,networkDeviceFilters:o,refreshDeviceData:V,setAllowed:B,reset:z})})]})]}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})};function qee({i18n:t}){const e=r=>c.jsx(kt.Item,{onClick:()=>{t.setLanguage(r.id)},children:c.jsxs(ut,{gap:"xs",children:[c.jsx(XA,{countryCode:r.country,style:{fontSize:"1.5em"}}),c.jsx(et,{children:r.name}),r.name!==r.defaultname&&c.jsx(et,{children:"("+r.defaultname+")"})]})},r.id),n=t.languages.map(r=>e(r));return c.jsxs(kt,{"aria-label":t.get("OpensTheLanguagesMenu"),children:[c.jsx(kt.Target,{children:c.jsx(br,{variant:"default",size:"input-xs",children:c.jsx(CY,{size:16})})}),c.jsxs(kt.Dropdown,{children:[c.jsx(kt.Label,{children:t.get("Language")}),c.jsx(Ar,{h:250,children:n})]})]})}function Gee({i18n:t,session:e}){const[n,r]=A.useState(!1),i=ea({initialValues:{username:"",password:""}}),s=async(f,m)=>{const y=await Rt.post($h+"create",{username:f,password:m});return y.data.token&&e.setToken(y.data.token),y.data.account,y.data},o=async()=>await Rt.get($h+"disable"),u=f=>{const{username:m,password:y}=f;s(m,y).then(()=>{e.resetLogout()},()=>{Wn({id:"user-creation-error",title:t.get("Error"),message:t.get("NewUserNotCreated")})})},d=()=>{o().then(()=>{e.logout(!1),e.resetLogout()},()=>{Wn({id:"auth-disable-error",title:t.get("Error"),message:t.get("AuthenticationServiceNotDisabled")})})};return c.jsxs("form",{onSubmit:i.onSubmit(u),children:[c.jsx(pn,{required:!0,label:t.get("Username"),leftSection:c.jsx(xp,{size:14}),...i.getInputProps("username")}),c.jsx(pn,{required:!0,label:t.get("Password"),type:"password",leftSection:c.jsx(oN,{size:14}),...i.getInputProps("password")}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",children:t.get("Create")})}),e.authenticate&&c.jsxs(c.Fragment,{children:[c.jsx(ks,{my:"lg",label:t.get("Or"),labelPosition:"center",fz:"md",c:"var(--mantine-color-text)"}),c.jsxs(Qn,{centered:!0,opened:n,onClose:()=>r(!1),title:t.get("Warning"),children:[c.jsx(et,{children:In(t.get("DisablingAuthenticationReduces"))}),c.jsxs(ut,{justify:"flex-end",mt:"md",children:[c.jsx(at,{onClick:()=>r(!1),children:t.get("Cancel")}),c.jsx(at,{color:"red",onClick:()=>d(),children:t.get("Confirm")})]})]}),c.jsx(ut,{justify:"center",mt:"md",children:c.jsx(at,{color:"red",onClick:()=>r(!0),children:t.get("DisableAuthentication")})})]})]})}function aM({i18n:t,session:e,user:n}){const r=n&&n.username?n.username:"",[i,s]=A.useState(!1),o=ea({initialValues:{username:r,password:""}}),u=d=>{const{username:f,password:m}=d;s(!0),e.login(f,m).then(()=>s(!1))};return c.jsxs("form",{onSubmit:o.onSubmit(u),children:[r?c.jsx(z_,{children:c.jsx(pn,{name:"username",...o.getInputProps("username")})}):c.jsx(pn,{required:!0,label:t.get("Username"),leftSection:c.jsx(xp,{size:14}),...o.getInputProps("username")}),c.jsx(pn,{required:!0,label:t.get("Password"),type:"password",leftSection:c.jsx(oN,{size:14}),...o.getInputProps("password")}),c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{disabled:i,loading:i,type:"submit",children:t.get("LogIn")})})]})}function Wee({i18n:t,session:e}){return c.jsx(at,{variant:"default",onClick:()=>e.resetLogout(),children:t.get("LogIn")})}function Xee({i18n:t,user:e,selectedUser:n,selectUser:r}){const i=A.useRef(null),s=e.login==="token",o=n&&n.id===e.id,u=()=>e.id===2147483647?t.get("Localhost"):e.id===0?t.get("User"):e.displayName,d=({user:f})=>f.id===2147483647?c.jsx(zw,{size:60}):f.id===0?c.jsx(rQ,{size:60}):c.jsx(xp,{size:60});return c.jsxs(Hi,{ref:i,style:{cursor:"pointer"},radius:"md",withBorder:!0,p:"xs",bg:o?"var(--mantine-color-default-hover)":"var(--mantine-color-body)",miw:"100",onClick:()=>{i.current?.scrollIntoView({inline:"center",block:"start"}),o||r(e)},children:[c.jsx(rA,{color:"teal",processing:s,disabled:!s,children:c.jsx(_l,{src:e.avatar?e.avatar:void 0,size:120,radius:120,mx:"auto",children:c.jsx(d,{user:e})})}),c.jsx(et,{ta:"center",mt:"xs",children:u()})]})}function Yee({i18n:t,session:e,user:n}){const[r,i]=A.useState(!1),s=(o,u)=>{i(!0),e.loginPin(o,u).then(()=>{e.resetLogout()},()=>{Wn({id:"pwd-error",title:t.get("Error"),message:t.get("ErrorLoggingIn")})}),i(!1)};return c.jsx(at,{disabled:r,loading:r,variant:"default",onClick:()=>s(n.id,""),children:t.get("LogIn")})}function Kee({session:t,user:e}){const[n,r]=A.useState(!1),i=(s,o)=>{r(!0),t.loginPin(s,o).then(()=>r(!1))};return c.jsx(v2,{disabled:n,oneTimeCode:!0,mask:!0,type:"number",onComplete:s=>{i(e.id,s)}})}function Qee({i18n:t,session:e,user:n}){const[r,i]=A.useState(!1);return c.jsxs(at.Group,{children:[c.jsx(at,{disabled:r,loading:r,variant:"default",onClick:()=>{i(!0),n.token&&e.removeLocalUser(n.id),i(!1)},children:t.get("LogOut")}),c.jsx(at,{disabled:r,loading:r,onClick:()=>{i(!0),n.token&&(e.setToken(n.token),e.resetLogout()),i(!1)},children:t.get("LogIn")})]})}function Zee({i18n:t,session:e}){const[n,r]=A.useState(),i=A.useRef(null),s=n?.id===0&&e.users?.length==1,o=()=>{if(e.users&&e.users.length>0){const d=e.users.find(f=>f.id===e.lastUserId);return d||e.users[0]}},u=()=>{if(n){if(n.login==="pass")return c.jsx(aM,{i18n:t,session:e,user:n});if(n.login==="localhost")return c.jsx(Wee,{i18n:t,session:e});if(n.login==="token")return c.jsx(Qee,{i18n:t,session:e,user:n});if(n.login==="pin")return c.jsx(Kee,{session:e,user:n});if(n.login==="none")return c.jsx(Yee,{i18n:t,session:e,user:n})}};return A.useEffect(()=>{r(o())},[e.users]),c.jsxs(tn,{justify:"center",align:"center",h:"100%",children:[!s&&c.jsx(Ar,{scrollbars:"x",h:180,viewportRef:i,overscrollBehavior:"contain",onWheel:d=>{d.preventDefault(),i.current.scrollBy({top:0,left:d.deltaY,behavior:"smooth"})},children:c.jsx(ut,{justify:"center",grow:!0,preventGrowOverflow:!1,wrap:"nowrap",children:e.users?.map(d=>c.jsx(Xee,{i18n:t,user:d,selectedUser:n,selectUser:r},d.id))})}),c.jsx(u,{})]})}function T4({i18n:t,session:e}){return A.useEffect(()=>{e.setDocumentI18nTitle("Login"),e.unsubscribe(),e.stopPlayerSse(),e.setNavbarValue(void 0)},[]),c.jsxs(Ee,{mx:"auto",style:{maxWidth:300},children:[c.jsx(et,{size:"xl",children:e.serverName}),c.jsx(et,{size:"lg",pb:"md",children:t.get("LogIn")}),e.noAdminFound&&!e.player?c.jsx(Gee,{i18n:t,session:e}):e.users?c.jsx(Zee,{i18n:t,session:e}):c.jsx(aM,{i18n:t,session:e})]})}const lD=({i18n:t,session:e})=>{const n=e.havePermission(dn.settings_modify),[r,i]=A.useState(0),[s,o]=A.useState(0),[u,d]=A.useState(0),[f,m]=A.useState([]),[y,x]=A.useState({search:"",isCapSensitive:!0,isRexp:!1}),[b,w]=A.useState([]),[S,D]=A.useState(0),[k,O]=A.useState([]),[N,F]=A.useState([]),[M,V]=A.useState(0),[$,q]=A.useState([]),[B,z]=A.useState([]),[ee,Y]=A.useState([]),[Q,oe]=A.useState(1),[ue,H]=A.useState(1),[te,Z]=A.useState(!1),[ie,G]=A.useState(!1),[X,fe]=A.useState(!1),[be,we]=A.useState(!1),[pe,Ce]=A.useState([]),[Ke,Me]=A.useState([]),[lt,bt]=A.useState(""),mt=ea({initialValues:{search:"",isCapSensitive:!0,isRexp:!1}}),_t=[{value:"1",label:t.get("Error")},{value:"2",label:t.get("Warning")},{value:"3",label:t.get("Info")},{value:"4",label:t.get("Debug")},{value:"5",label:t.get("Trace")}],Qt=_t.concat([{value:"6",label:t.get("All")},{value:"0",label:t.get("Off")}]),xt=he=>{if(he)switch(he){case"ALL":return 6;case"TRACE":return 5;case"DEBUG":return 4;case"INFO":return 3;case"WARN":return 2;case"ERROR":return 1}return 0};A.useEffect(()=>{e.subscribeTo("Logs"),e.stopPlayerSse(),e.setDocumentI18nTitle("Logs"),e.setNavbarManage(lD.name)},[]),A.useEffect(()=>{if(!n||lt){q([]);return}Rt.get(CT).then(function(he){q(he.data.logs),F([]),O([]),i(xt(he.data.rootLogLevel)),o(xt(he.data.guiLogLevel)),d(xt(he.data.guiLogLevel)),V(he.data.traceMode)}).catch(function(he){!he.response&&he.request?t.showServerUnreachable():Wn({id:"logs-data-loading",title:t.get("Error"),message:t.get("DataNotReceived")})})},[t,n,lt]),A.useEffect(()=>{const he=Ze=>f.length===0||f.length===5?!0:f.includes(Ze),Ae=Ze=>{if(u===0)return!1;if(u===6&&f.length===0)return!0;switch(lt?Ze.substring(0,5):Ze.substring(9,14)){case"TRACE":return u>4&&he("5");case"DEBUG":return u>3&&he("4");case"INFO ":return u>2&&he("3");case"WARN ":return u>1&&he("2");case"ERROR":return u>0&&he("1")}return u===6},rt=Ze=>{if(N.length===0)return!0;const qt=Ze.substring(31,Ze.indexOf("]")).replace(/[\d|-]+$/,"");return N.includes(qt)},$e=$.filter(Ae).filter(rt);z($e)},[$,u,f,N,lt]);const wt=he=>{y.search!==he.search||y.search!==he.search||y.search!==he.search?(x(he),D(0)):D(S+1)};A.useEffect(()=>{const he=rt=>y.search?rt.includes(y.search):!1,Ae=B.map((rt,$e)=>he(rt)?$e:-1).filter(rt=>rt!==-1);w(Ae)},[B,y]),A.useEffect(()=>{if(S<0)return;const he=b[S];if(isNaN(he))return;const Ae=Math.max(Math.ceil(he/500),1);oe(Ae)},[B,S,b]),A.useEffect(()=>{const he=Math.max(Math.ceil(B.length/500),1);if(H(he),Q>he){oe(he);return}const Ae=500*Q,rt=Ae-500,$e=B.slice(rt,Ae);(ee.at(0)!==$e.at(0)||ee.at(-1)!==$e.at(-1))&&Y($e)},[ee,Q,B]),A.useEffect(()=>{if(!e.hasNewLogLine||lt)return;const he=Yr.clone($);for(;e.hasNewLogLine;){const Ae=e.getNewLogLine();if(Ae===void 0)break;he.length>1e4&&he.slice(0,he.length-1e4),he.push(Ae)}q(he)},[$,e.hasNewLogLine,e.getNewLogLine,lt]),A.useEffect(()=>{be&&Rt.get(CT+"packer").then(function(he){const Ae=he.data,rt=[];for(const $e of Ae)$e.exists&&rt.push($e.path);Ce(Ae),Me(rt)})},[be]);const Ot=()=>{Rt.post(CT+"packer",{items:Ke},{responseType:"blob"}).then(function(he){const Ae=he.headers["content-disposition"].split("filename=")[1].replaceAll('"',""),rt=he.headers["content-type"],$e=new Blob([he.data],{type:rt}),Ze=document.createElement("a");Ze.href=window.URL.createObjectURL($e),Ze.download=Ae,Ze.click(),Ze.remove()})},qe=()=>pe.map(he=>c.jsx(pt,{value:he.path,disabled:!he.exists,label:he.name},he.path)),Le=new FileReader;Le.onloadend=he=>{const Ae=he?.target?.result;Xe(Ae)};const He=he=>{Le.readAsText(he[0])},Xe=he=>{const Ae=he.split(/\r?\n/),rt=[],$e=[];for(let Ze=0;Ze<Ae.length;Ze++)if(Ae[Ze].length>30&&Ae[Ze].substring(30,31)==="["){const qt=Ae[Ze].substring(31,Ae[Ze].indexOf("]")).replace(/[\d|-]+$/,"");$e.includes(qt)||$e.push(qt),rt.push(Ae[Ze])}else rt.length===0?rt.push(Ae[Ze]):rt[rt.length-1]=rt[rt.length-1].concat("\r",Ae[Ze]);O($e),q(rt)};return n?c.jsxs(Ee,{style:{maxWidth:1024},mx:"auto",children:[c.jsxs(Qn,{centered:!0,opened:te,onClose:()=>Z(!1),title:t.get("Filter"),children:[c.jsx(Cr,{label:t.get("LogLevel"),value:u.toString(),onChange:he=>he===null?0:d(parseInt(he)),data:Qt}),c.jsx(ks,{my:"sm"}),c.jsxs("form",{onSubmit:mt.onSubmit(wt),children:[c.jsx(pn,{label:t.get("EnterSearchString"),...mt.getInputProps("search")}),c.jsx(Ft,{label:t.get("FilterLogMessagesLogWindow"),...mn,children:c.jsx(Ty,{label:t.get("CaseSensitive"),...mt.getInputProps("isCapSensitive",{type:"checkbox"})})}),c.jsx(Ft,{label:t.get("SearchUsingRegularExpressions"),...mn,children:c.jsx(Ty,{label:t.get("RegularExpression"),...mt.getInputProps("isRexp",{type:"checkbox"})})}),c.jsx(at,{type:"submit",leftSection:c.jsx(HA,{}),children:t.get("Search")})]}),c.jsx(lp,{label:t.get("FilterBySeverity"),value:f,onChange:m,data:_t}),lt&&c.jsx(lp,{label:t.get("FilterByThread"),value:N,onChange:F,data:k,searchable:!0})]}),c.jsx(Qn,{centered:!0,scrollAreaComponent:Ar.Autosize,opened:ie,onClose:()=>G(!1),title:t.get("Settings"),children:c.jsxs(tn,{children:[c.jsx(Ft,{label:In(t.get("FilterLogMessagesLogWindow")),...mn,children:c.jsx(Cr,{label:t.get("Filter"),value:s.toString(),onChange:he=>he===null?0:o(parseInt(he)),data:[{value:"1",label:t.get("Error"),disabled:r<1},{value:"2",label:t.get("Warning"),disabled:r<2},{value:"3",label:t.get("Info"),disabled:r<3},{value:"4",label:t.get("Debug"),disabled:r<4},{value:"5",label:t.get("Trace"),disabled:r<5},{value:"6",label:t.get("All"),disabled:r<6},{value:"0",label:t.get("Off")}]})}),M===0&&c.jsx(Ft,{label:In(t.get("RestartUniversalMediaServerTrace")),...mn,children:c.jsx(at,{leftSection:c.jsx(ZX,{}),onClick:()=>{fe(!0)},children:t.get("CreateTraceLogs")})}),c.jsx(Ft,{label:In(t.get("PackLogConfigurationFileCompressed")),...mn,children:c.jsx(at,{leftSection:c.jsx(nY,{}),onClick:()=>{we(!0),M===0&&fe(!0)},children:t.get("PackDebugFiles")})})]})}),!lt&&c.jsxs(c.Fragment,{children:[c.jsxs(Qn,{scrollAreaComponent:Ar.Autosize,centered:!0,opened:be,onClose:()=>{we(!1)},title:t.get("PackDebugFiles"),children:[c.jsx(at,{disabled:Ke.length===0,onClick:()=>{Ot(),we(!1),G(!1)},children:t.get("ZipSelectedFiles")}),c.jsx(pt.Group,{value:Ke,onChange:Me,children:qe()})]}),c.jsxs(Qn,{centered:!0,opened:X,onClose:()=>{fe(!1),fe(!1)},title:t.get("StartupLogLevelNotTrace"),children:[c.jsx("span",{dangerouslySetInnerHTML:{__html:t.get("ForReportingMostIssuesBest")}}),c.jsxs(ut,{children:[c.jsx(at,{onClick:()=>{uf("Process.Reboot.Trace"),fe(!1),G(!1)},children:t.get("Yes")}),c.jsx(at,{onClick:()=>{fe(!1)},children:t.get("No")})]})]})]}),c.jsxs(ut,{children:[c.jsx(wA,{value:lt,onChange:bt,data:[{label:t.get("Server"),value:""},{label:t.get("File"),value:"file"}]}),c.jsx(at,{leftSection:c.jsx(iY,{}),onClick:()=>{Z(!0)},children:t.get("Filter")}),lt?c.jsx(iy,{p:5,onDrop:he=>He(he),maxFiles:1,children:c.jsx(et,{ta:"center",children:"Drop/Select log here"})}):c.jsx(at,{leftSection:c.jsx($W,{}),onClick:()=>{G(!0)},children:t.get("Options")})]}),c.jsx(ks,{my:"sm"}),c.jsx(kl,{value:Q,onChange:oe,total:ue}),c.jsx(ks,{my:"sm"}),c.jsx(yl,{block:!0,children:ee.join(lt?`
`:"")})]}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})};function Jee({i18n:t,session:e}){const n=u0(),r=!e.isLogout&&e.havePermission(dn.web_player_browse),i=!e.isLogout&&!e.player&&e.havePermission(dn.settings_view),s=location.pathname.startsWith("/player")||!i&&location.pathname=="/",o=E3({sm:c.jsx(Zh,{size:16})}),u=E3({sm:c.jsx(pg,{size:16})});return r?i?c.jsxs(at.Group,{children:[c.jsxs(at,{size:"compact-md",leftSection:o,variant:s?"filled":"default",onClick:()=>{n("/player")},"aria-describedby":t.get("SwitchesToPlayerMode"),children:[c.jsx(Ee,{visibleFrom:"sm",children:t.get("Player")}),c.jsx(Ee,{hiddenFrom:"sm",children:c.jsx(Zh,{size:16})})]}),c.jsxs(at,{size:"compact-md",rightSection:u,variant:s?"default":"filled",onClick:()=>{n("/")},"aria-describedby":t.get("SwitchesToSettingsMode"),children:[c.jsx(Ee,{visibleFrom:"sm",children:t.get("Settings")}),c.jsx(Ee,{hiddenFrom:"sm",children:c.jsx(pg,{size:16})})]})]}):c.jsxs(at.Group,{children:[c.jsx(at,{size:"compact-md",variant:s?"filled":"default",onClick:()=>{n("/player")},children:c.jsx(Zh,{size:16})}),c.jsx(at,{size:"compact-md",variant:s?"default":"filled",onClick:()=>{n("/customize")},children:c.jsx(pg,{size:16})})]}):void 0}var RT,w4;function P2(){if(w4)return RT;w4=1;var t;return typeof window<"u"?t=window:typeof of<"u"?t=of:typeof self<"u"?t=self:t={},RT=t,RT}var ete=P2();const me=ko(ete),tte={},nte=Object.freeze(Object.defineProperty({__proto__:null,default:tte},Symbol.toStringTag,{value:"Module"})),rte=SL(nte);var PT,C4;function oM(){if(C4)return PT;C4=1;var t=typeof of<"u"?of:typeof window<"u"?window:{},e=rte,n;return typeof document<"u"?n=document:(n=t["__GLOBAL_DOCUMENT_CACHE@4"],n||(n=t["__GLOBAL_DOCUMENT_CACHE@4"]=e)),PT=n,PT}var ite=oM();const ht=ko(ite);var o1={exports:{}},IT={exports:{}},E4;function ste(){return E4||(E4=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)({}).hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(IT)),IT.exports}var OT,A4;function ate(){if(A4)return OT;A4=1,OT=e;var t=Object.prototype.toString;function e(n){if(!n)return!1;var r=t.call(n);return r==="[object Function]"||typeof n=="function"&&r!=="[object RegExp]"||typeof window<"u"&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}return OT}var NT,D4;function ote(){if(D4)return NT;D4=1;function t(i,s){var o=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(o)return(o=o.call(i)).next.bind(o);if(Array.isArray(i)||(o=e(i))||s){o&&(i=o);var u=0;return function(){return u>=i.length?{done:!0}:{done:!1,value:i[u++]}}}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 e(i,s){if(i){if(typeof i=="string")return n(i,s);var o=Object.prototype.toString.call(i).slice(8,-1);if(o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set")return Array.from(i);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(i,s)}}function n(i,s){(s==null||s>i.length)&&(s=i.length);for(var o=0,u=new Array(s);o<s;o++)u[o]=i[o];return u}var r=function(){function i(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var s=i.prototype;return s.getIsEnabled=function(){return this.enabled_},s.enable=function(){this.enabled_=!0},s.disable=function(){this.enabled_=!1},s.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},s.addInterceptor=function(u,d){this.typeToInterceptorsMap_.has(u)||this.typeToInterceptorsMap_.set(u,new Set);var f=this.typeToInterceptorsMap_.get(u);return f.has(d)?!1:(f.add(d),!0)},s.removeInterceptor=function(u,d){var f=this.typeToInterceptorsMap_.get(u);return f&&f.has(d)?(f.delete(d),!0):!1},s.clearInterceptorsByType=function(u){var d=this.typeToInterceptorsMap_.get(u);return d?(this.typeToInterceptorsMap_.delete(u),this.typeToInterceptorsMap_.set(u,new Set),!0):!1},s.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},s.getForType=function(u){return this.typeToInterceptorsMap_.get(u)||new Set},s.execute=function(u,d){for(var f=this.getForType(u),m=t(f),y;!(y=m()).done;){var x=y.value;try{d=x(d)}catch{}}return d},i}();return NT=r,NT}var MT,k4;function lte(){if(k4)return MT;k4=1;var t=function(){function n(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var r=n.prototype;return r.getIsEnabled=function(){return this.enabled_},r.enable=function(){this.enabled_=!0},r.disable=function(){this.enabled_=!1},r.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},r.getMaxAttempts=function(){return this.maxAttempts_},r.setMaxAttempts=function(s){this.maxAttempts_=s},r.getDelayFactor=function(){return this.delayFactor_},r.setDelayFactor=function(s){this.delayFactor_=s},r.getFuzzFactor=function(){return this.fuzzFactor_},r.setFuzzFactor=function(s){this.fuzzFactor_=s},r.getInitialDelay=function(){return this.initialDelay_},r.setInitialDelay=function(s){this.initialDelay_=s},r.createRetry=function(s){var o=s===void 0?{}:s,u=o.maxAttempts,d=o.delayFactor,f=o.fuzzFactor,m=o.initialDelay;return new e({maxAttempts:u||this.maxAttempts_,delayFactor:d||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},n}(),e=function(){function n(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1}var r=n.prototype;return r.moveToNextAttempt=function(){this.currentAttempt_++;var s=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+s},r.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},r.getCurrentDelay=function(){return this.currentDelay_},r.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},r.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},r.getCurrentFuzzedDelay=function(){var s=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return s+Math.random()*(o-s)},n}();return MT=t,MT}var jT,R4;function ute(){if(R4)return jT;R4=1;var t=P2(),e=function(i,s){return s===void 0&&(s=!1),function(o,u,d){if(o){i(o);return}if(u.statusCode>=400&&u.statusCode<=599){var f=d;if(s)if(t.TextDecoder){var m=n(u.headers&&u.headers["content-type"]);try{f=new TextDecoder(m).decode(d)}catch{}}else f=String.fromCharCode.apply(null,new Uint8Array(d));i({cause:f});return}i(null,d)}};function n(r){return r===void 0&&(r=""),r.toLowerCase().split(";").reduce(function(i,s){var o=s.split("="),u=o[0],d=o[1];return u.trim()==="charset"?d.trim():i},"utf-8")}return jT=e,jT}var P4;function cte(){if(P4)return o1.exports;P4=1;var t=P2(),e=ste(),n=ate(),r=ote(),i=lte();f.httpHandler=ute(),f.requestInterceptorsStorage=new r,f.responseInterceptorsStorage=new r,f.retryManager=new i;/**
 * @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 s=function(w){var S={};return w&&w.trim().split(`
`).forEach(function(D){var k=D.indexOf(":"),O=D.slice(0,k).trim().toLowerCase(),N=D.slice(k+1).trim();typeof S[O]>"u"?S[O]=N:Array.isArray(S[O])?S[O].push(N):S[O]=[S[O],N]}),S};o1.exports=f,o1.exports.default=f,f.XMLHttpRequest=t.XMLHttpRequest||x,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:t.XDomainRequest,o(["get","put","post","patch","head","delete"],function(b){f[b==="delete"?"del":b]=function(w,S,D){return S=d(w,S,D),S.method=b.toUpperCase(),m(S)}});function o(b,w){for(var S=0;S<b.length;S++)w(b[S])}function u(b){for(var w in b)if(b.hasOwnProperty(w))return!1;return!0}function d(b,w,S){var D=b;return n(w)?(S=w,typeof b=="string"&&(D={uri:b})):D=e({},w,{uri:b}),D.callback=S,D}function f(b,w,S){return w=d(b,w,S),m(w)}function m(b){if(typeof b.callback>"u")throw new Error("callback argument missing");if(b.requestType&&f.requestInterceptorsStorage.getIsEnabled()){var w={uri:b.uri||b.url,headers:b.headers||{},body:b.body,metadata:b.metadata||{},retry:b.retry,timeout:b.timeout},S=f.requestInterceptorsStorage.execute(b.requestType,w);b.uri=S.uri,b.headers=S.headers,b.body=S.body,b.metadata=S.metadata,b.retry=S.retry,b.timeout=S.timeout}var D=!1,k=function(Z,ie,G){D||(D=!0,b.callback(Z,ie,G))};function O(){V.readyState===4&&!f.responseInterceptorsStorage.getIsEnabled()&&setTimeout(M,0)}function N(){var te=void 0;if(V.response?te=V.response:te=V.responseText||y(V),oe)try{te=JSON.parse(te)}catch{}return te}function F(te){if(clearTimeout(ue),clearTimeout(b.retryTimeout),te instanceof Error||(te=new Error(""+(te||"Unknown XMLHttpRequest Error"))),te.statusCode=0,!q&&f.retryManager.getIsEnabled()&&b.retry&&b.retry.shouldRetry()){b.retryTimeout=setTimeout(function(){b.retry.moveToNextAttempt(),b.xhr=V,m(b)},b.retry.getCurrentFuzzedDelay());return}if(b.requestType&&f.responseInterceptorsStorage.getIsEnabled()){var Z={headers:H.headers||{},body:H.body,responseUrl:V.responseURL,responseType:V.responseType},ie=f.responseInterceptorsStorage.execute(b.requestType,Z);H.body=ie.body,H.headers=ie.headers}return k(te,H)}function M(){if(!q){var te;clearTimeout(ue),clearTimeout(b.retryTimeout),b.useXDR&&V.status===void 0?te=200:te=V.status===1223?204:V.status;var Z=H,ie=null;if(te!==0?(Z={body:N(),statusCode:te,method:z,headers:{},url:B,rawRequest:V},V.getAllResponseHeaders&&(Z.headers=s(V.getAllResponseHeaders()))):ie=new Error("Internal XMLHttpRequest Error"),b.requestType&&f.responseInterceptorsStorage.getIsEnabled()){var G={headers:Z.headers||{},body:Z.body,responseUrl:V.responseURL,responseType:V.responseType},X=f.responseInterceptorsStorage.execute(b.requestType,G);Z.body=X.body,Z.headers=X.headers}return k(ie,Z,Z.body)}}var V=b.xhr||null;V||(b.cors||b.useXDR?V=new f.XDomainRequest:V=new f.XMLHttpRequest);var $,q,B=V.url=b.uri||b.url,z=V.method=b.method||"GET",ee=b.body||b.data,Y=V.headers=b.headers||{},Q=!!b.sync,oe=!1,ue,H={body:void 0,headers:{},statusCode:0,method:z,url:B,rawRequest:V};if("json"in b&&b.json!==!1&&(oe=!0,Y.accept||Y.Accept||(Y.Accept="application/json"),z!=="GET"&&z!=="HEAD"&&(Y["content-type"]||Y["Content-Type"]||(Y["Content-Type"]="application/json"),ee=JSON.stringify(b.json===!0?ee:b.json))),V.onreadystatechange=O,V.onload=M,V.onerror=F,V.onprogress=function(){},V.onabort=function(){q=!0,clearTimeout(b.retryTimeout)},V.ontimeout=F,V.open(z,B,!Q,b.username,b.password),Q||(V.withCredentials=!!b.withCredentials),!Q&&b.timeout>0&&(ue=setTimeout(function(){if(!q){q=!0,V.abort("timeout");var te=new Error("XMLHttpRequest timeout");te.code="ETIMEDOUT",F(te)}},b.timeout)),V.setRequestHeader)for($ in Y)Y.hasOwnProperty($)&&V.setRequestHeader($,Y[$]);else if(b.headers&&!u(b.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in b&&(V.responseType=b.responseType),"beforeSend"in b&&typeof b.beforeSend=="function"&&b.beforeSend(V),V.send(ee||null),V}function y(b){try{if(b.responseType==="document")return b.responseXML;var w=b.responseXML&&b.responseXML.documentElement.nodeName==="parsererror";if(b.responseType===""&&!w)return b.responseXML}catch{}return null}function x(){}return o1.exports}var dte=cte();const lM=ko(dte);var LT={exports:{}},BT,I4;function fte(){if(I4)return BT;I4=1;var t=oM(),e=Object.create||function(){function B(){}return function(z){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return B.prototype=z,new B}}();function n(B,z){this.name="ParsingError",this.code=B.code,this.message=z||B.message}n.prototype=e(Error.prototype),n.prototype.constructor=n,n.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function r(B){function z(Y,Q,oe,ue){return(Y|0)*3600+(Q|0)*60+(oe|0)+(ue|0)/1e3}var ee=B.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return ee?ee[3]?z(ee[1],ee[2],ee[3].replace(":",""),ee[4]):ee[1]>59?z(ee[1],ee[2],0,ee[4]):z(0,ee[1],ee[2],ee[4]):null}function i(){this.values=e(null)}i.prototype={set:function(B,z){!this.get(B)&&z!==""&&(this.values[B]=z)},get:function(B,z,ee){return ee?this.has(B)?this.values[B]:z[ee]:this.has(B)?this.values[B]:z},has:function(B){return B in this.values},alt:function(B,z,ee){for(var Y=0;Y<ee.length;++Y)if(z===ee[Y]){this.set(B,z);break}},integer:function(B,z){/^-?\d+$/.test(z)&&this.set(B,parseInt(z,10))},percent:function(B,z){return z.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(z=parseFloat(z),z>=0&&z<=100)?(this.set(B,z),!0):!1}};function s(B,z,ee,Y){var Q=Y?B.split(Y):[B];for(var oe in Q)if(typeof Q[oe]=="string"){var ue=Q[oe].split(ee);if(ue.length===2){var H=ue[0].trim(),te=ue[1].trim();z(H,te)}}}function o(B,z,ee){var Y=B;function Q(){var H=r(B);if(H===null)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+Y);return B=B.replace(/^[^\sa-zA-Z-]+/,""),H}function oe(H,te){var Z=new i;s(H,function(ie,G){switch(ie){case"region":for(var X=ee.length-1;X>=0;X--)if(ee[X].id===G){Z.set(ie,ee[X].region);break}break;case"vertical":Z.alt(ie,G,["rl","lr"]);break;case"line":var fe=G.split(","),be=fe[0];Z.integer(ie,be),Z.percent(ie,be)&&Z.set("snapToLines",!1),Z.alt(ie,be,["auto"]),fe.length===2&&Z.alt("lineAlign",fe[1],["start","center","end"]);break;case"position":fe=G.split(","),Z.percent(ie,fe[0]),fe.length===2&&Z.alt("positionAlign",fe[1],["start","center","end"]);break;case"size":Z.percent(ie,G);break;case"align":Z.alt(ie,G,["start","center","end","left","right"]);break}},/:/,/\s/),te.region=Z.get("region",null),te.vertical=Z.get("vertical","");try{te.line=Z.get("line","auto")}catch{}te.lineAlign=Z.get("lineAlign","start"),te.snapToLines=Z.get("snapToLines",!0),te.size=Z.get("size",100);try{te.align=Z.get("align","center")}catch{te.align=Z.get("align","middle")}try{te.position=Z.get("position","auto")}catch{te.position=Z.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},te.align)}te.positionAlign=Z.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},te.align)}function ue(){B=B.replace(/^\s+/,"")}if(ue(),z.startTime=Q(),ue(),B.substr(0,3)!=="-->")throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+Y);B=B.substr(3),ue(),z.endTime=Q(),ue(),oe(B,z)}var u=t.createElement&&t.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={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)"},m={v:"title",lang:"lang"},y={rt:"ruby"};function x(B,z){function ee(){if(!z)return null;function be(pe){return z=z.substr(pe.length),pe}var we=z.match(/^([^<]*)(<[^>]*>?)?/);return be(we[1]?we[1]:we[2])}function Y(be){return u.innerHTML=be,be=u.textContent,u.textContent="",be}function Q(be,we){return!y[we.localName]||y[we.localName]===be.localName}function oe(be,we){var pe=d[be];if(!pe)return null;var Ce=B.document.createElement(pe),Ke=m[be];return Ke&&we&&(Ce[Ke]=we.trim()),Ce}for(var ue=B.document.createElement("div"),H=ue,te,Z=[];(te=ee())!==null;){if(te[0]==="<"){if(te[1]==="/"){Z.length&&Z[Z.length-1]===te.substr(2).replace(">","")&&(Z.pop(),H=H.parentNode);continue}var ie=r(te.substr(1,te.length-2)),G;if(ie){G=B.document.createProcessingInstruction("timestamp",ie),H.appendChild(G);continue}var X=te.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!X||(G=oe(X[1],X[3]),!G)||!Q(H,G))continue;if(X[2]){var fe=X[2].split(".");fe.forEach(function(be){var we=/^bg_/.test(be),pe=we?be.slice(3):be;if(f.hasOwnProperty(pe)){var Ce=we?"background-color":"color",Ke=f[pe];G.style[Ce]=Ke}}),G.className=fe.join(" ")}Z.push(X[1]),H.appendChild(G),H=G;continue}H.appendChild(B.document.createTextNode(Y(te)))}return ue}var b=[[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 w(B){for(var z=0;z<b.length;z++){var ee=b[z];if(B>=ee[0]&&B<=ee[1])return!0}return!1}function S(B){var z=[],ee="",Y;if(!B||!B.childNodes)return"ltr";function Q(H,te){for(var Z=te.childNodes.length-1;Z>=0;Z--)H.push(te.childNodes[Z])}function oe(H){if(!H||!H.length)return null;var te=H.pop(),Z=te.textContent||te.innerText;if(Z){var ie=Z.match(/^.*(\n|\r)/);return ie?(H.length=0,ie[0]):Z}if(te.tagName==="ruby")return oe(H);if(te.childNodes)return Q(H,te),oe(H)}for(Q(z,B);ee=oe(z);)for(var ue=0;ue<ee.length;ue++)if(Y=ee.charCodeAt(ue),w(Y))return"rtl";return"ltr"}function D(B){if(typeof B.line=="number"&&(B.snapToLines||B.line>=0&&B.line<=100))return B.line;if(!B.track||!B.track.textTrackList||!B.track.textTrackList.mediaElement)return-1;for(var z=B.track,ee=z.textTrackList,Y=0,Q=0;Q<ee.length&&ee[Q]!==z;Q++)ee[Q].mode==="showing"&&Y++;return++Y*-1}function k(){}k.prototype.applyStyles=function(B,z){z=z||this.div;for(var ee in B)B.hasOwnProperty(ee)&&(z.style[ee]=B[ee])},k.prototype.formatStyle=function(B,z){return B===0?0:B+z};function O(B,z,ee){k.call(this),this.cue=z,this.cueDiv=x(B,z.text);var Y={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:z.vertical===""?"horizontal-tb":z.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(Y,this.cueDiv),this.div=B.document.createElement("div"),Y={direction:S(this.cueDiv),writingMode:z.vertical===""?"horizontal-tb":z.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:z.align==="middle"?"center":z.align,font:ee.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(Y),this.div.appendChild(this.cueDiv);var Q=0;switch(z.positionAlign){case"start":case"line-left":Q=z.position;break;case"center":Q=z.position-z.size/2;break;case"end":case"line-right":Q=z.position-z.size;break}z.vertical===""?this.applyStyles({left:this.formatStyle(Q,"%"),width:this.formatStyle(z.size,"%")}):this.applyStyles({top:this.formatStyle(Q,"%"),height:this.formatStyle(z.size,"%")}),this.move=function(oe){this.applyStyles({top:this.formatStyle(oe.top,"px"),bottom:this.formatStyle(oe.bottom,"px"),left:this.formatStyle(oe.left,"px"),right:this.formatStyle(oe.right,"px"),height:this.formatStyle(oe.height,"px"),width:this.formatStyle(oe.width,"px")})}}O.prototype=e(k.prototype),O.prototype.constructor=O;function N(B){var z,ee,Y,Q;if(B.div){ee=B.div.offsetHeight,Y=B.div.offsetWidth,Q=B.div.offsetTop;var oe=(oe=B.div.childNodes)&&(oe=oe[0])&&oe.getClientRects&&oe.getClientRects();B=B.div.getBoundingClientRect(),z=oe?Math.max(oe[0]&&oe[0].height||0,B.height/oe.length):0}this.left=B.left,this.right=B.right,this.top=B.top||Q,this.height=B.height||ee,this.bottom=B.bottom||Q+(B.height||ee),this.width=B.width||Y,this.lineHeight=z!==void 0?z:B.lineHeight}N.prototype.move=function(B,z){switch(z=z!==void 0?z:this.lineHeight,B){case"+x":this.left+=z,this.right+=z;break;case"-x":this.left-=z,this.right-=z;break;case"+y":this.top+=z,this.bottom+=z;break;case"-y":this.top-=z,this.bottom-=z;break}},N.prototype.overlaps=function(B){return this.left<B.right&&this.right>B.left&&this.top<B.bottom&&this.bottom>B.top},N.prototype.overlapsAny=function(B){for(var z=0;z<B.length;z++)if(this.overlaps(B[z]))return!0;return!1},N.prototype.within=function(B){return this.top>=B.top&&this.bottom<=B.bottom&&this.left>=B.left&&this.right<=B.right},N.prototype.overlapsOppositeAxis=function(B,z){switch(z){case"+x":return this.left<B.left;case"-x":return this.right>B.right;case"+y":return this.top<B.top;case"-y":return this.bottom>B.bottom}},N.prototype.intersectPercentage=function(B){var z=Math.max(0,Math.min(this.right,B.right)-Math.max(this.left,B.left)),ee=Math.max(0,Math.min(this.bottom,B.bottom)-Math.max(this.top,B.top)),Y=z*ee;return Y/(this.height*this.width)},N.prototype.toCSSCompatValues=function(B){return{top:this.top-B.top,bottom:B.bottom-this.bottom,left:this.left-B.left,right:B.right-this.right,height:this.height,width:this.width}},N.getSimpleBoxPosition=function(B){var z=B.div?B.div.offsetHeight:B.tagName?B.offsetHeight:0,ee=B.div?B.div.offsetWidth:B.tagName?B.offsetWidth:0,Y=B.div?B.div.offsetTop:B.tagName?B.offsetTop:0;B=B.div?B.div.getBoundingClientRect():B.tagName?B.getBoundingClientRect():B;var Q={left:B.left,right:B.right,top:B.top||Y,height:B.height||z,bottom:B.bottom||Y+(B.height||z),width:B.width||ee};return Q};function F(B,z,ee,Y){function Q(pe,Ce){for(var Ke,Me=new N(pe),lt=1,bt=0;bt<Ce.length;bt++){for(;pe.overlapsOppositeAxis(ee,Ce[bt])||pe.within(ee)&&pe.overlapsAny(Y);)pe.move(Ce[bt]);if(pe.within(ee))return pe;var mt=pe.intersectPercentage(ee);lt>mt&&(Ke=new N(pe),lt=mt),pe=new N(Me)}return Ke||Me}var oe=new N(z),ue=z.cue,H=D(ue),te=[];if(ue.snapToLines){var Z;switch(ue.vertical){case"":te=["+y","-y"],Z="height";break;case"rl":te=["+x","-x"],Z="width";break;case"lr":te=["-x","+x"],Z="width";break}var ie=oe.lineHeight,G=ie*Math.round(H),X=ee[Z]+ie,fe=te[0];Math.abs(G)>X&&(G=G<0?-1:1,G*=Math.ceil(X/ie)*ie),H<0&&(G+=ue.vertical===""?ee.height:ee.width,te=te.reverse()),oe.move(fe,G)}else{var be=oe.lineHeight/ee.height*100;switch(ue.lineAlign){case"center":H-=be/2;break;case"end":H-=be;break}switch(ue.vertical){case"":z.applyStyles({top:z.formatStyle(H,"%")});break;case"rl":z.applyStyles({left:z.formatStyle(H,"%")});break;case"lr":z.applyStyles({right:z.formatStyle(H,"%")});break}te=["+y","-x","+x","-y"],oe=new N(z)}var we=Q(oe,te);z.move(we.toCSSCompatValues(ee))}function M(){}M.StringDecoder=function(){return{decode:function(B){if(!B)return"";if(typeof B!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(B))}}},M.convertCueToDOMTree=function(B,z){return!B||!z?null:x(B,z)};var V=.05,$="sans-serif",q="1.5%";return M.processCues=function(B,z,ee){if(!B||!z||!ee)return null;for(;ee.firstChild;)ee.removeChild(ee.firstChild);var Y=B.document.createElement("div");Y.style.position="absolute",Y.style.left="0",Y.style.right="0",Y.style.top="0",Y.style.bottom="0",Y.style.margin=q,ee.appendChild(Y);function Q(ie){for(var G=0;G<ie.length;G++)if(ie[G].hasBeenReset||!ie[G].displayState)return!0;return!1}if(!Q(z)){for(var oe=0;oe<z.length;oe++)Y.appendChild(z[oe].displayState);return}var ue=[],H=N.getSimpleBoxPosition(Y),te=Math.round(H.height*V*100)/100,Z={font:te+"px "+$};(function(){for(var ie,G,X=0;X<z.length;X++)G=z[X],ie=new O(B,G,Z),Y.appendChild(ie.div),F(B,ie,H,ue),G.displayState=ie.div,ue.push(N.getSimpleBoxPosition(ie))})()},M.Parser=function(B,z,ee){ee||(ee=z,z={}),z||(z={}),this.window=B,this.vttjs=z,this.state="INITIAL",this.buffer="",this.decoder=ee||new TextDecoder("utf8"),this.regionList=[]},M.Parser.prototype={reportOrThrowError:function(B){if(B instanceof n)this.onparsingerror&&this.onparsingerror(B);else throw B},parse:function(B){var z=this;B&&(z.buffer+=z.decoder.decode(B,{stream:!0}));function ee(){for(var ie=z.buffer,G=0;G<ie.length&&ie[G]!=="\r"&&ie[G]!==`
`;)++G;var X=ie.substr(0,G);return ie[G]==="\r"&&++G,ie[G]===`
`&&++G,z.buffer=ie.substr(G),X}function Y(ie){var G=new i;if(s(ie,function(fe,be){switch(fe){case"id":G.set(fe,be);break;case"width":G.percent(fe,be);break;case"lines":G.integer(fe,be);break;case"regionanchor":case"viewportanchor":var we=be.split(",");if(we.length!==2)break;var pe=new i;if(pe.percent("x",we[0]),pe.percent("y",we[1]),!pe.has("x")||!pe.has("y"))break;G.set(fe+"X",pe.get("x")),G.set(fe+"Y",pe.get("y"));break;case"scroll":G.alt(fe,be,["up"]);break}},/=/,/\s/),G.has("id")){var X=new(z.vttjs.VTTRegion||z.window.VTTRegion);X.width=G.get("width",100),X.lines=G.get("lines",3),X.regionAnchorX=G.get("regionanchorX",0),X.regionAnchorY=G.get("regionanchorY",100),X.viewportAnchorX=G.get("viewportanchorX",0),X.viewportAnchorY=G.get("viewportanchorY",100),X.scroll=G.get("scroll",""),z.onregion&&z.onregion(X),z.regionList.push({id:G.get("id"),region:X})}}function Q(ie){var G=new i;s(ie,function(X,fe){switch(X){case"MPEGT":G.integer(X+"S",fe);break;case"LOCA":G.set(X+"L",r(fe));break}},/[^\d]:/,/,/),z.ontimestampmap&&z.ontimestampmap({MPEGTS:G.get("MPEGTS"),LOCAL:G.get("LOCAL")})}function oe(ie){ie.match(/X-TIMESTAMP-MAP/)?s(ie,function(G,X){switch(G){case"X-TIMESTAMP-MAP":Q(X);break}},/=/):s(ie,function(G,X){switch(G){case"Region":Y(X);break}},/:/)}try{var ue;if(z.state==="INITIAL"){if(!/\r\n|\n/.test(z.buffer))return this;ue=ee();var H=ue.match(/^WEBVTT([ \t].*)?$/);if(!H||!H[0])throw new n(n.Errors.BadSignature);z.state="HEADER"}for(var te=!1;z.buffer;){if(!/\r\n|\n/.test(z.buffer))return this;switch(te?te=!1:ue=ee(),z.state){case"HEADER":/:/.test(ue)?oe(ue):ue||(z.state="ID");continue;case"NOTE":ue||(z.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(ue)){z.state="NOTE";break}if(!ue)continue;z.cue=new(z.vttjs.VTTCue||z.window.VTTCue)(0,0,"");try{z.cue.align="center"}catch{z.cue.align="middle"}if(z.state="CUE",ue.indexOf("-->")===-1){z.cue.id=ue;continue}case"CUE":try{o(ue,z.cue,z.regionList)}catch(ie){z.reportOrThrowError(ie),z.cue=null,z.state="BADCUE";continue}z.state="CUETEXT";continue;case"CUETEXT":var Z=ue.indexOf("-->")!==-1;if(!ue||Z&&(te=!0)){z.oncue&&z.oncue(z.cue),z.cue=null,z.state="ID";continue}z.cue.text&&(z.cue.text+=`
`),z.cue.text+=ue.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":ue||(z.state="ID");continue}}}catch(ie){z.reportOrThrowError(ie),z.state==="CUETEXT"&&z.cue&&z.oncue&&z.oncue(z.cue),z.cue=null,z.state=z.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var B=this;try{if(B.buffer+=B.decoder.decode(),(B.cue||B.state==="HEADER")&&(B.buffer+=`

`,B.parse()),B.state==="INITIAL")throw new n(n.Errors.BadSignature)}catch(z){B.reportOrThrowError(z)}return B.onflush&&B.onflush(),this}},BT=M,BT}var FT,O4;function hte(){if(O4)return FT;O4=1;var t="auto",e={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(o){if(typeof o!="string")return!1;var u=e[o.toLowerCase()];return u?o.toLowerCase():!1}function i(o){if(typeof o!="string")return!1;var u=n[o.toLowerCase()];return u?o.toLowerCase():!1}function s(o,u,d){this.hasBeenReset=!1;var f="",m=!1,y=o,x=u,b=d,w=null,S="",D=!0,k="auto",O="start",N="auto",F="auto",M=100,V="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return f},set:function($){f=""+$}},pauseOnExit:{enumerable:!0,get:function(){return m},set:function($){m=!!$}},startTime:{enumerable:!0,get:function(){return y},set:function($){if(typeof $!="number")throw new TypeError("Start time must be set to a number.");y=$,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return x},set:function($){if(typeof $!="number")throw new TypeError("End time must be set to a number.");x=$,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return b},set:function($){b=""+$,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return w},set:function($){w=$,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return S},set:function($){var q=r($);if(q===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");S=q,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return D},set:function($){D=!!$,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return k},set:function($){if(typeof $!="number"&&$!==t)throw new SyntaxError("Line: an invalid number or illegal string was specified.");k=$,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return O},set:function($){var q=i($);q?(O=q,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return N},set:function($){if($<0||$>100)throw new Error("Position must be between 0 and 100.");N=$,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return F},set:function($){var q=i($);q?(F=q,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return M},set:function($){if($<0||$>100)throw new Error("Size must be between 0 and 100.");M=$,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return V},set:function($){var q=i($);if(!q)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");V=q,this.hasBeenReset=!0}}}),this.displayState=void 0}return s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},FT=s,FT}var UT,N4;function pte(){if(N4)return UT;N4=1;var t={"":!0,up:!0};function e(i){if(typeof i!="string")return!1;var s=t[i.toLowerCase()];return s?i.toLowerCase():!1}function n(i){return typeof i=="number"&&i>=0&&i<=100}function r(){var i=100,s=3,o=0,u=100,d=0,f=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return i},set:function(y){if(!n(y))throw new Error("Width must be between 0 and 100.");i=y}},lines:{enumerable:!0,get:function(){return s},set:function(y){if(typeof y!="number")throw new TypeError("Lines must be set to a number.");s=y}},regionAnchorY:{enumerable:!0,get:function(){return u},set:function(y){if(!n(y))throw new Error("RegionAnchorX must be between 0 and 100.");u=y}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(y){if(!n(y))throw new Error("RegionAnchorY must be between 0 and 100.");o=y}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(y){if(!n(y))throw new Error("ViewportAnchorY must be between 0 and 100.");f=y}},viewportAnchorX:{enumerable:!0,get:function(){return d},set:function(y){if(!n(y))throw new Error("ViewportAnchorX must be between 0 and 100.");d=y}},scroll:{enumerable:!0,get:function(){return m},set:function(y){var x=e(y);x===!1?console.warn("Scroll: an invalid or illegal string was specified."):m=x}}})}return UT=r,UT}var M4;function mte(){if(M4)return LT.exports;M4=1;var t=P2(),e=LT.exports={WebVTT:fte(),VTTCue:hte(),VTTRegion:pte()};t.vttjs=e,t.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=t.VTTCue,s=t.VTTRegion;return e.shim=function(){t.VTTCue=n,t.VTTRegion=r},e.restore=function(){t.VTTCue=i,t.VTTRegion=s},t.VTTCue||e.shim(),LT.exports}var gte=mte();const j4=ko(gte);var L4="https://example.com",I2=function(e,n){if(/^[a-z]+:/i.test(n))return n;/^data:/.test(e)&&(e=me.location&&me.location.href||"");var r=/^\/\//.test(e),i=!me.location&&!/\/\//i.test(e);e=new me.URL(e,me.location||L4);var s=new URL(n,e);return i?s.href.slice(L4.length):r?s.href.slice(s.protocol.length):s.href},uD=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(r,i){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(i)},e.off=function(r,i){if(!this.listeners[r])return!1;var s=this.listeners[r].indexOf(i);return this.listeners[r]=this.listeners[r].slice(0),this.listeners[r].splice(s,1),s>-1},e.trigger=function(r){var i=this.listeners[r];if(i)if(arguments.length===2)for(var s=i.length,o=0;o<s;++o)i[o].call(this,arguments[1]);else for(var u=Array.prototype.slice.call(arguments,1),d=i.length,f=0;f<d;++f)i[f].apply(this,u)},e.dispose=function(){this.listeners={}},e.pipe=function(r){this.on("data",function(i){r.push(i)})},t}(),vte=function(e){return me.atob?me.atob(e):Buffer.from(e,"base64").toString("binary")};function uM(t){for(var e=vte(t),n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class yte extends uD{constructor(){super(),this.buffer=""}push(e){let n;for(this.buffer+=e,n=this.buffer.indexOf(`
`);n>-1;n=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,n)),this.buffer=this.buffer.substring(n+1)}}const bte="	",zT=function(t){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),n={};return e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),n},xte=function(){const n="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+n+")")},Xs=function(t){const e={};if(!t)return e;const n=t.split(xte());let r=n.length,i;for(;r--;)n[r]!==""&&(i=/([^=]*)=(.*)/.exec(n[r]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),e[i[0]]=i[1]);return e},B4=t=>{const e=t.split("x"),n={};return e[0]&&(n.width=parseInt(e[0],10)),e[1]&&(n.height=parseInt(e[1],10)),n};class _te extends uD{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let n,r;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((s,o)=>{const u=o(e);return u===e?s:s.concat([u])},[e]).forEach(s=>{for(let o=0;o<this.customParsers.length;o++)if(this.customParsers[o].call(this,s))return;if(s.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:s.slice(1)});return}if(s=s.replace("\r",""),n=/^#EXTM3U/.exec(s),n){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(n=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(s),n){r={type:"tag",tagType:"inf"},n[1]&&(r.duration=parseFloat(n[1])),n[2]&&(r.title=n[2]),this.trigger("data",r);return}if(n=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(s),n){r={type:"tag",tagType:"targetduration"},n[1]&&(r.duration=parseInt(n[1],10)),this.trigger("data",r);return}if(n=/^#EXT-X-VERSION:([0-9.]*)?/.exec(s),n){r={type:"tag",tagType:"version"},n[1]&&(r.version=parseInt(n[1],10)),this.trigger("data",r);return}if(n=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(s),n){r={type:"tag",tagType:"media-sequence"},n[1]&&(r.number=parseInt(n[1],10)),this.trigger("data",r);return}if(n=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(s),n){r={type:"tag",tagType:"discontinuity-sequence"},n[1]&&(r.number=parseInt(n[1],10)),this.trigger("data",r);return}if(n=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(s),n){r={type:"tag",tagType:"playlist-type"},n[1]&&(r.playlistType=n[1]),this.trigger("data",r);return}if(n=/^#EXT-X-BYTERANGE:(.*)?$/.exec(s),n){r=Xr(zT(n[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(n=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(s),n){r={type:"tag",tagType:"allow-cache"},n[1]&&(r.allowed=!/NO/.test(n[1])),this.trigger("data",r);return}if(n=/^#EXT-X-MAP:(.*)$/.exec(s),n){if(r={type:"tag",tagType:"map"},n[1]){const o=Xs(n[1]);o.URI&&(r.uri=o.URI),o.BYTERANGE&&(r.byterange=zT(o.BYTERANGE))}this.trigger("data",r);return}if(n=/^#EXT-X-STREAM-INF:(.*)$/.exec(s),n){r={type:"tag",tagType:"stream-inf"},n[1]&&(r.attributes=Xs(n[1]),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=B4(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(n=/^#EXT-X-MEDIA:(.*)$/.exec(s),n){r={type:"tag",tagType:"media"},n[1]&&(r.attributes=Xs(n[1])),this.trigger("data",r);return}if(n=/^#EXT-X-ENDLIST/.exec(s),n){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(n=/^#EXT-X-DISCONTINUITY/.exec(s),n){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(n=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(s),n){r={type:"tag",tagType:"program-date-time"},n[1]&&(r.dateTimeString=n[1],r.dateTimeObject=new Date(n[1])),this.trigger("data",r);return}if(n=/^#EXT-X-KEY:(.*)$/.exec(s),n){r={type:"tag",tagType:"key"},n[1]&&(r.attributes=Xs(n[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(n=/^#EXT-X-START:(.*)$/.exec(s),n){r={type:"tag",tagType:"start"},n[1]&&(r.attributes=Xs(n[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),this.trigger("data",r);return}if(n=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(s),n){r={type:"tag",tagType:"cue-out-cont"},n[1]?r.data=n[1]:r.data="",this.trigger("data",r);return}if(n=/^#EXT-X-CUE-OUT:(.*)?$/.exec(s),n){r={type:"tag",tagType:"cue-out"},n[1]?r.data=n[1]:r.data="",this.trigger("data",r);return}if(n=/^#EXT-X-CUE-IN:?(.*)?$/.exec(s),n){r={type:"tag",tagType:"cue-in"},n[1]?r.data=n[1]:r.data="",this.trigger("data",r);return}if(n=/^#EXT-X-SKIP:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"skip"},r.attributes=Xs(n[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(bte)),this.trigger("data",r);return}if(n=/^#EXT-X-PART:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"part"},r.attributes=Xs(n[1]),["DURATION"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=parseFloat(r.attributes[o]))}),["INDEPENDENT","GAP"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=/YES/.test(r.attributes[o]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=zT(r.attributes.BYTERANGE)),this.trigger("data",r);return}if(n=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"server-control"},r.attributes=Xs(n[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=parseFloat(r.attributes[o]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=/YES/.test(r.attributes[o]))}),this.trigger("data",r);return}if(n=/^#EXT-X-PART-INF:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"part-inf"},r.attributes=Xs(n[1]),["PART-TARGET"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=parseFloat(r.attributes[o]))}),this.trigger("data",r);return}if(n=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"preload-hint"},r.attributes=Xs(n[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(o){if(r.attributes.hasOwnProperty(o)){r.attributes[o]=parseInt(r.attributes[o],10);const u=o==="BYTERANGE-LENGTH"?"length":"offset";r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange[u]=r.attributes[o],delete r.attributes[o]}}),this.trigger("data",r);return}if(n=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"rendition-report"},r.attributes=Xs(n[1]),["LAST-MSN","LAST-PART"].forEach(function(o){r.attributes.hasOwnProperty(o)&&(r.attributes[o]=parseInt(r.attributes[o],10))}),this.trigger("data",r);return}if(n=/^#EXT-X-DATERANGE:(.*)$/.exec(s),n&&n[1]){r={type:"tag",tagType:"daterange"},r.attributes=Xs(n[1]),["ID","CLASS"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=String(r.attributes[u]))}),["START-DATE","END-DATE"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=new Date(r.attributes[u]))}),["DURATION","PLANNED-DURATION"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=parseFloat(r.attributes[u]))}),["END-ON-NEXT"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=/YES/i.test(r.attributes[u]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=r.attributes[u].toString(16))});const o=/^X-([A-Z]+-)+[A-Z]+$/;for(const u in r.attributes){if(!o.test(u))continue;const d=/[0-9A-Fa-f]{6}/g.test(r.attributes[u]),f=/^\d+(\.\d+)?$/.test(r.attributes[u]);r.attributes[u]=d?r.attributes[u].toString(16):f?parseFloat(r.attributes[u]):String(r.attributes[u])}this.trigger("data",r);return}if(n=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(s),n){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(n=/^#EXT-X-I-FRAMES-ONLY/.exec(s),n){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(n=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(s),n){r={type:"tag",tagType:"content-steering"},r.attributes=Xs(n[1]),this.trigger("data",r);return}if(n=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(s),n){r={type:"tag",tagType:"i-frame-playlist"},r.attributes=Xs(n[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=B4(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(n=/^#EXT-X-DEFINE:(.*)$/.exec(s),n){r={type:"tag",tagType:"define"},r.attributes=Xs(n[1]),this.trigger("data",r);return}this.trigger("data",{type:"tag",data:s.slice(4)})})}addParser({expression:e,customType:n,dataParser:r,segment:i}){typeof r!="function"&&(r=s=>s),this.customParsers.push(s=>{if(e.exec(s))return this.trigger("data",{type:"custom",data:r(s),customType:n,segment:i}),!0})}addTagMapper({expression:e,map:n}){const r=i=>e.test(i)?n(i):i;this.tagMappers.push(r)}}const Ste=t=>t.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),Wd=function(t){const e={};return Object.keys(t).forEach(function(n){e[Ste(n)]=t[n]}),e},$T=function(t){const{serverControl:e,targetDuration:n,partTargetDuration:r}=t;if(!e)return;const i="#EXT-X-SERVER-CONTROL",s="holdBack",o="partHoldBack",u=n&&n*3,d=r&&r*2;n&&!e.hasOwnProperty(s)&&(e[s]=u,this.trigger("info",{message:`${i} defaulting HOLD-BACK to targetDuration * 3 (${u}).`})),u&&e[s]<u&&(this.trigger("warn",{message:`${i} clamping HOLD-BACK (${e[s]}) to targetDuration * 3 (${u})`}),e[s]=u),r&&!e.hasOwnProperty(o)&&(e[o]=r*3,this.trigger("info",{message:`${i} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),r&&e[o]<d&&(this.trigger("warn",{message:`${i} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${d}).`}),e[o]=d)};class Tte extends uD{constructor(e={}){super(),this.lineStream=new yte,this.parseStream=new _te,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const n=this,r=[];let i={},s,o,u=!1;const d=function(){},f={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let y=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let x=0,b=0;const w={};this.on("end",()=>{i.uri||!i.parts&&!i.preloadHints||(!i.map&&s&&(i.map=s),!i.key&&o&&(i.key=o),!i.timeline&&typeof y=="number"&&(i.timeline=y),this.manifest.preloadSegment=i)}),this.parseStream.on("data",function(S){let D,k;if(n.manifest.definitions){for(const O in n.manifest.definitions)if(S.uri&&(S.uri=S.uri.replace(`{$${O}}`,n.manifest.definitions[O])),S.attributes)for(const N in S.attributes)typeof S.attributes[N]=="string"&&(S.attributes[N]=S.attributes[N].replace(`{$${O}}`,n.manifest.definitions[O]))}({tag(){({version(){S.version&&(this.manifest.version=S.version)},"allow-cache"(){this.manifest.allowCache=S.allowed,"allowed"in S||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const O={};"length"in S&&(i.byterange=O,O.length=S.length,"offset"in S||(S.offset=x)),"offset"in S&&(i.byterange=O,O.offset=S.offset),x=O.offset+O.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"})),S.title&&(i.title=S.title),S.duration>0&&(i.duration=S.duration),S.duration===0&&(i.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(!S.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(S.attributes.METHOD==="NONE"){o=null;return}if(!S.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(S.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:S.attributes};return}if(S.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:S.attributes.URI};return}if(S.attributes.KEYFORMAT===m){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(S.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(S.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),S.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(S.attributes.KEYID&&S.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:S.attributes.KEYFORMAT,keyId:S.attributes.KEYID.substring(2)},pssh:uM(S.attributes.URI.split(",")[1])};return}S.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:S.attributes.METHOD||"AES-128",uri:S.attributes.URI},typeof S.attributes.IV<"u"&&(o.iv=S.attributes.IV)},"media-sequence"(){if(!isFinite(S.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+S.number});return}this.manifest.mediaSequence=S.number},"discontinuity-sequence"(){if(!isFinite(S.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+S.number});return}this.manifest.discontinuitySequence=S.number,y=S.number},"playlist-type"(){if(!/VOD|EVENT/.test(S.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+S.playlist});return}this.manifest.playlistType=S.playlistType},map(){s={},S.uri&&(s.uri=S.uri),S.byterange&&(s.byterange=S.byterange),o&&(s.key=o)},"stream-inf"(){if(this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||f,!S.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}i.attributes||(i.attributes={}),Xr(i.attributes,S.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,!(S.attributes&&S.attributes.TYPE&&S.attributes["GROUP-ID"]&&S.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const O=this.manifest.mediaGroups[S.attributes.TYPE];O[S.attributes["GROUP-ID"]]=O[S.attributes["GROUP-ID"]]||{},D=O[S.attributes["GROUP-ID"]],k={default:/yes/i.test(S.attributes.DEFAULT)},k.default?k.autoselect=!0:k.autoselect=/yes/i.test(S.attributes.AUTOSELECT),S.attributes.LANGUAGE&&(k.language=S.attributes.LANGUAGE),S.attributes.URI&&(k.uri=S.attributes.URI),S.attributes["INSTREAM-ID"]&&(k.instreamId=S.attributes["INSTREAM-ID"]),S.attributes.CHARACTERISTICS&&(k.characteristics=S.attributes.CHARACTERISTICS),S.attributes.FORCED&&(k.forced=/yes/i.test(S.attributes.FORCED)),D[S.attributes.NAME]=k},discontinuity(){y+=1,i.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=S.dateTimeString,this.manifest.dateTimeObject=S.dateTimeObject),i.dateTimeString=S.dateTimeString,i.dateTimeObject=S.dateTimeObject;const{lastProgramDateTime:O}=this;this.lastProgramDateTime=new Date(S.dateTimeString).getTime(),O===null&&this.manifest.segments.reduceRight((N,F)=>(F.programDateTime=N-F.duration*1e3,F.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(S.duration)||S.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+S.duration});return}this.manifest.targetDuration=S.duration,$T.call(this,this.manifest)},start(){if(!S.attributes||isNaN(S.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:S.attributes["TIME-OFFSET"],precise:S.attributes.PRECISE}},"cue-out"(){i.cueOut=S.data},"cue-out-cont"(){i.cueOutCont=S.data},"cue-in"(){i.cueIn=S.data},skip(){this.manifest.skip=Wd(S.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",S.attributes,["SKIPPED-SEGMENTS"])},part(){u=!0;const O=this.manifest.segments.length,N=Wd(S.attributes);i.parts=i.parts||[],i.parts.push(N),N.byterange&&(N.byterange.hasOwnProperty("offset")||(N.byterange.offset=b),b=N.byterange.offset+N.byterange.length);const F=i.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${F} for segment #${O}`,S.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((M,V)=>{M.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${V} lacks required attribute(s): LAST-PART`})})},"server-control"(){const O=this.manifest.serverControl=Wd(S.attributes);O.hasOwnProperty("canBlockReload")||(O.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),$T.call(this,this.manifest),O.canSkipDateranges&&!O.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 O=this.manifest.segments.length,N=Wd(S.attributes),F=N.type&&N.type==="PART";i.preloadHints=i.preloadHints||[],i.preloadHints.push(N),N.byterange&&(N.byterange.hasOwnProperty("offset")||(N.byterange.offset=F?b:0,F&&(b=N.byterange.offset+N.byterange.length)));const M=i.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${M} for segment #${O}`,S.attributes,["TYPE","URI"]),!!N.type)for(let V=0;V<i.preloadHints.length-1;V++){const $=i.preloadHints[V];$.type&&$.type===N.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${M} for segment #${O} has the same TYPE ${N.type} as preload hint #${V}`})}},"rendition-report"(){const O=Wd(S.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(O);const N=this.manifest.renditionReports.length-1,F=["LAST-MSN","URI"];u&&F.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${N}`,S.attributes,F)},"part-inf"(){this.manifest.partInf=Wd(S.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",S.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),$T.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Wd(S.attributes));const O=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${O}`,S.attributes,["ID","START-DATE"]);const N=this.manifest.dateRanges[O];N.endDate&&N.startDate&&new Date(N.endDate)<new Date(N.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),N.duration&&N.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),N.plannedDuration&&N.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const F=!!N.endOnNext;if(F&&!N.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),F&&(N.duration||N.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),N.duration&&N.endDate){const V=N.startDate.getTime()+N.duration*1e3;this.manifest.dateRanges[O].endDate=new Date(V)}if(!w[N.id])w[N.id]=N;else{for(const V in w[N.id])if(N[V]&&JSON.stringify(w[N.id][V])!==JSON.stringify(N[V])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const M=this.manifest.dateRanges.findIndex(V=>V.id===N.id);this.manifest.dateRanges[M]=Xr(this.manifest.dateRanges[M],N),w[N.id]=Xr(w[N.id],N),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=Wd(S.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",S.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const O=(N,F)=>{if(N in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${N}`});return}this.manifest.definitions[N]=F};if("QUERYPARAM"in S.attributes){if("NAME"in S.attributes||"IMPORT"in S.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const N=this.params.get(S.attributes.QUERYPARAM);if(!N){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${S.attributes.QUERYPARAM}`});return}O(S.attributes.QUERYPARAM,decodeURIComponent(N));return}if("NAME"in S.attributes){if("IMPORT"in S.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in S.attributes)||typeof S.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${S.attributes.NAME}`});return}O(S.attributes.NAME,S.attributes.VALUE);return}if("IMPORT"in S.attributes){if(!this.mainDefinitions[S.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${S.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}O(S.attributes.IMPORT,this.mainDefinitions[S.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:S.attributes,uri:S.uri,timeline:y}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",S.attributes,["BANDWIDTH","URI"])}}[S.tagType]||d).call(n)},uri(){i.uri=S.uri,r.push(i),this.manifest.targetDuration&&!("duration"in i)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),i.duration=this.manifest.targetDuration),o&&(i.key=o),i.timeline=y,s&&(i.map=s),b=0,this.lastProgramDateTime!==null&&(i.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=i.duration*1e3),i={}},comment(){},custom(){S.segment?(i.custom=i.custom||{},i.custom[S.customType]=S.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[S.customType]=S.data)}})[S.type].call(n)})}requiredCompatibilityversion(e,n){(e<n||!e)&&this.trigger("warn",{message:`manifest must be at least version ${n}`})}warnOnMissingAttributes_(e,n,r){const i=[];r.forEach(function(s){n.hasOwnProperty(s)||i.push(s)}),i.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${i.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 tp={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^/},wte=["video","audio","text"],F4=["Video","Audio","Text"],cM=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(n,r,i){var s=("00"+Number(r).toString(16)).slice(-2),o=("00"+Number(i).toString(16)).slice(-2);return"avc1."+s+"00"+o})},Au=function(e){e===void 0&&(e="");var n=e.split(","),r=[];return n.forEach(function(i){i=i.trim();var s;wte.forEach(function(o){var u=tp[o].exec(i.toLowerCase());if(!(!u||u.length<=1)){s=o;var d=i.substring(0,u[1].length),f=i.replace(d,"");r.push({type:d,details:f,mediaType:o})}}),s||r.push({type:i,details:"",mediaType:"unknown"})}),r},Cte=function(e,n){if(!e.mediaGroups.AUDIO||!n)return null;var r=e.mediaGroups.AUDIO[n];if(!r)return null;for(var i in r){var s=r[i];if(s.default&&s.playlists)return Au(s.playlists[0].attributes.CODECS)}return null},dM=function(e){return e===void 0&&(e=""),tp.audio.test(e.trim().toLowerCase())},Ete=function(e){return e===void 0&&(e=""),tp.text.test(e.trim().toLowerCase())},Mg=function(e){if(!(!e||typeof e!="string")){var n=e.toLowerCase().split(",").map(function(s){return cM(s.trim())}),r="video";n.length===1&&dM(n[0])?r="audio":n.length===1&&Ete(n[0])&&(r="application");var i="mp4";return n.every(function(s){return tp.mp4.test(s)})?i="mp4":n.every(function(s){return tp.webm.test(s)})?i="webm":n.every(function(s){return tp.ogg.test(s)})&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},dy=function(e,n){return e===void 0&&(e=""),n===void 0&&(n=!1),me.MediaSource&&me.MediaSource.isTypeSupported&&me.MediaSource.isTypeSupported(Mg(e))||n&&me.ManagedMediaSource&&me.ManagedMediaSource.isTypeSupported&&me.ManagedMediaSource.isTypeSupported(Mg(e))||!1},VT=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(n){n=n.trim();for(var r=0;r<F4.length;r++){var i=F4[r];if(tp["muxer"+i].test(n))return!0}return!1})},U4="mp4a.40.2",Ate="avc1.4d400d",Dte=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,kte=/^application\/dash\+xml/i,fM=function(e){return Dte.test(e)?"hls":kte.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},Rte=function(e){return e.toString(2).length},Pte=function(e){return Math.ceil(Rte(e)/8)},hM=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Ite=function(e){return hM(e)},Ht=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!Ite(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))},is=me.BigInt||Number,rC=[is("0x1"),is("0x100"),is("0x10000"),is("0x1000000"),is("0x100000000"),is("0x10000000000"),is("0x1000000000000"),is("0x100000000000000"),is("0x10000000000000000")];(function(){var t=new Uint16Array([65484]),e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var Ote=function(e,n){var r=n===void 0?{}:n,i=r.signed,s=i===void 0?!1:i,o=r.le,u=o===void 0?!1:o;e=Ht(e);var d=u?"reduce":"reduceRight",f=e[d]?e[d]:Array.prototype[d],m=f.call(e,function(x,b,w){var S=u?w:Math.abs(w+1-e.length);return x+is(b)*rC[S]},is(0));if(s){var y=rC[e.length]/is(2)-is(1);m=is(m),m>y&&(m-=y,m-=y,m-=is(2))}return Number(m)},Nte=function(e,n){var r={},i=r.le,s=i===void 0?!1:i;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=is(e);for(var o=Pte(e),u=new Uint8Array(new ArrayBuffer(o)),d=0;d<o;d++){var f=s?d:Math.abs(d+1-u.length);u[f]=Number(e/rC[d]&is(255)),e<0&&(u[f]=Math.abs(~u[f]),u[f]-=d===0?1:2)}return u},pM=function(e,n){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;n||(e=unescape(encodeURIComponent(e)));for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r},Mte=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(n=n.filter(function(u){return u&&(u.byteLength||u.length)&&typeof u!="string"}),n.length<=1)return Ht(n[0]);var i=n.reduce(function(u,d,f){return u+(d.byteLength||d.length)},0),s=new Uint8Array(i),o=0;return n.forEach(function(u){u=Ht(u),s.set(u,o),o+=u.byteLength}),s},Ur=function(e,n,r){var i=r===void 0?{}:r,s=i.offset,o=s===void 0?0:s,u=i.mask,d=u===void 0?[]:u;e=Ht(e),n=Ht(n);var f=n.every?n.every:Array.prototype.every;return n.length&&e.length-o>=n.length&&f.call(n,function(m,y){var x=d[y]?d[y]&e[o+y]:e[o+y];return m===x})},jte=function(e,n,r){n.forEach(function(i){for(var s in e.mediaGroups[i])for(var o in e.mediaGroups[i][s]){var u=e.mediaGroups[i][s][o];r(u,i,s,o)}})},Wv={},Pc={},Ph={},z4;function O2(){if(z4)return Ph;z4=1;function t(s,o,u){if(u===void 0&&(u=Array.prototype),s&&typeof u.find=="function")return u.find.call(s,o);for(var d=0;d<s.length;d++)if(Object.prototype.hasOwnProperty.call(s,d)){var f=s[d];if(o.call(void 0,f,d,s))return f}}function e(s,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(s):s}function n(s,o){if(s===null||typeof s!="object")throw new TypeError("target is not an object");for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u]);return s}var r=e({HTML:"text/html",isHTML:function(s){return s===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(s){return s===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Ph.assign=n,Ph.find=t,Ph.freeze=e,Ph.MIME_TYPE=r,Ph.NAMESPACE=i,Ph}var $4;function mM(){if($4)return Pc;$4=1;var t=O2(),e=t.find,n=t.NAMESPACE;function r(J){return J!==""}function i(J){return J?J.split(/[\t\n\f\r ]+/).filter(r):[]}function s(J,re){return J.hasOwnProperty(re)||(J[re]=!0),J}function o(J){if(!J)return[];var re=i(J);return Object.keys(re.reduce(s,{}))}function u(J){return function(re){return J&&J.indexOf(re)!==-1}}function d(J,re){for(var ye in J)Object.prototype.hasOwnProperty.call(J,ye)&&(re[ye]=J[ye])}function f(J,re){var ye=J.prototype;if(!(ye instanceof re)){let ft=function(){};var Be=ft;ft.prototype=re.prototype,ft=new ft,d(ye,ft),J.prototype=ye=ft}ye.constructor!=J&&(typeof J!="function"&&console.error("unknown Class:"+J),ye.constructor=J)}var m={},y=m.ELEMENT_NODE=1,x=m.ATTRIBUTE_NODE=2,b=m.TEXT_NODE=3,w=m.CDATA_SECTION_NODE=4,S=m.ENTITY_REFERENCE_NODE=5,D=m.ENTITY_NODE=6,k=m.PROCESSING_INSTRUCTION_NODE=7,O=m.COMMENT_NODE=8,N=m.DOCUMENT_NODE=9,F=m.DOCUMENT_TYPE_NODE=10,M=m.DOCUMENT_FRAGMENT_NODE=11,V=m.NOTATION_NODE=12,$={},q={};$.INDEX_SIZE_ERR=(q[1]="Index size error",1),$.DOMSTRING_SIZE_ERR=(q[2]="DOMString size error",2);var B=$.HIERARCHY_REQUEST_ERR=(q[3]="Hierarchy request error",3);$.WRONG_DOCUMENT_ERR=(q[4]="Wrong document",4),$.INVALID_CHARACTER_ERR=(q[5]="Invalid character",5),$.NO_DATA_ALLOWED_ERR=(q[6]="No data allowed",6),$.NO_MODIFICATION_ALLOWED_ERR=(q[7]="No modification allowed",7);var z=$.NOT_FOUND_ERR=(q[8]="Not found",8);$.NOT_SUPPORTED_ERR=(q[9]="Not supported",9);var ee=$.INUSE_ATTRIBUTE_ERR=(q[10]="Attribute in use",10);$.INVALID_STATE_ERR=(q[11]="Invalid state",11),$.SYNTAX_ERR=(q[12]="Syntax error",12),$.INVALID_MODIFICATION_ERR=(q[13]="Invalid modification",13),$.NAMESPACE_ERR=(q[14]="Invalid namespace",14),$.INVALID_ACCESS_ERR=(q[15]="Invalid access",15);function Y(J,re){if(re instanceof Error)var ye=re;else ye=this,Error.call(this,q[J]),this.message=q[J],Error.captureStackTrace&&Error.captureStackTrace(this,Y);return ye.code=J,re&&(this.message=this.message+": "+re),ye}Y.prototype=Error.prototype,d($,Y);function Q(){}Q.prototype={length:0,item:function(J){return J>=0&&J<this.length?this[J]:null},toString:function(J,re){for(var ye=[],Be=0;Be<this.length;Be++)xr(this[Be],ye,J,re);return ye.join("")},filter:function(J){return Array.prototype.filter.call(this,J)},indexOf:function(J){return Array.prototype.indexOf.call(this,J)}};function oe(J,re){this._node=J,this._refresh=re,ue(this)}function ue(J){var re=J._node._inc||J._node.ownerDocument._inc;if(J._inc!==re){var ye=J._refresh(J._node);if(us(J,"length",ye.length),!J.$$length||ye.length<J.$$length)for(var Be=ye.length;Be in J;Be++)Object.prototype.hasOwnProperty.call(J,Be)&&delete J[Be];d(ye,J),J._inc=re}}oe.prototype.item=function(J){return ue(this),this[J]||null},f(oe,Q);function H(){}function te(J,re){for(var ye=J.length;ye--;)if(J[ye]===re)return ye}function Z(J,re,ye,Be){if(Be?re[te(re,Be)]=ye:re[re.length++]=ye,J){ye.ownerElement=J;var ft=J.ownerDocument;ft&&(Be&&Ce(ft,J,Be),pe(ft,J,ye))}}function ie(J,re,ye){var Be=te(re,ye);if(Be>=0){for(var ft=re.length-1;Be<ft;)re[Be]=re[++Be];if(re.length=ft,J){var Nt=J.ownerDocument;Nt&&(Ce(Nt,J,ye),ye.ownerElement=null)}}else throw new Y(z,new Error(J.tagName+"@"+ye))}H.prototype={length:0,item:Q.prototype.item,getNamedItem:function(J){for(var re=this.length;re--;){var ye=this[re];if(ye.nodeName==J)return ye}},setNamedItem:function(J){var re=J.ownerElement;if(re&&re!=this._ownerElement)throw new Y(ee);var ye=this.getNamedItem(J.nodeName);return Z(this._ownerElement,this,J,ye),ye},setNamedItemNS:function(J){var re=J.ownerElement,ye;if(re&&re!=this._ownerElement)throw new Y(ee);return ye=this.getNamedItemNS(J.namespaceURI,J.localName),Z(this._ownerElement,this,J,ye),ye},removeNamedItem:function(J){var re=this.getNamedItem(J);return ie(this._ownerElement,this,re),re},removeNamedItemNS:function(J,re){var ye=this.getNamedItemNS(J,re);return ie(this._ownerElement,this,ye),ye},getNamedItemNS:function(J,re){for(var ye=this.length;ye--;){var Be=this[ye];if(Be.localName==re&&Be.namespaceURI==J)return Be}return null}};function G(){}G.prototype={hasFeature:function(J,re){return!0},createDocument:function(J,re,ye){var Be=new we;if(Be.implementation=this,Be.childNodes=new Q,Be.doctype=ye||null,ye&&Be.appendChild(ye),re){var ft=Be.createElementNS(J,re);Be.appendChild(ft)}return Be},createDocumentType:function(J,re,ye){var Be=new jt;return Be.name=J,Be.nodeName=J,Be.publicId=re||"",Be.systemId=ye||"",Be}};function X(){}X.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(J,re){return He(this,J,re)},replaceChild:function(J,re){He(this,J,re,Le),re&&this.removeChild(re)},removeChild:function(J){return Me(this,J)},appendChild:function(J){return this.insertBefore(J,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(J){return Os(this.ownerDocument||this,this,J)},normalize:function(){for(var J=this.firstChild;J;){var re=J.nextSibling;re&&re.nodeType==b&&J.nodeType==b?(this.removeChild(re),J.appendData(re.data)):(J.normalize(),J=re)}},isSupported:function(J,re){return this.ownerDocument.implementation.hasFeature(J,re)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(J){for(var re=this;re;){var ye=re._nsMap;if(ye){for(var Be in ye)if(Object.prototype.hasOwnProperty.call(ye,Be)&&ye[Be]===J)return Be}re=re.nodeType==x?re.ownerDocument:re.parentNode}return null},lookupNamespaceURI:function(J){for(var re=this;re;){var ye=re._nsMap;if(ye&&Object.prototype.hasOwnProperty.call(ye,J))return ye[J];re=re.nodeType==x?re.ownerDocument:re.parentNode}return null},isDefaultNamespace:function(J){var re=this.lookupPrefix(J);return re==null}};function fe(J){return J=="<"&&"&lt;"||J==">"&&"&gt;"||J=="&"&&"&amp;"||J=='"'&&"&quot;"||"&#"+J.charCodeAt()+";"}d(m,X),d(m,X.prototype);function be(J,re){if(re(J))return!0;if(J=J.firstChild)do if(be(J,re))return!0;while(J=J.nextSibling)}function we(){this.ownerDocument=this}function pe(J,re,ye){J&&J._inc++;var Be=ye.namespaceURI;Be===n.XMLNS&&(re._nsMap[ye.prefix?ye.localName:""]=ye.value)}function Ce(J,re,ye,Be){J&&J._inc++;var ft=ye.namespaceURI;ft===n.XMLNS&&delete re._nsMap[ye.prefix?ye.localName:""]}function Ke(J,re,ye){if(J&&J._inc){J._inc++;var Be=re.childNodes;if(ye)Be[Be.length++]=ye;else{for(var ft=re.firstChild,Nt=0;ft;)Be[Nt++]=ft,ft=ft.nextSibling;Be.length=Nt,delete Be[Be.length]}}}function Me(J,re){var ye=re.previousSibling,Be=re.nextSibling;return ye?ye.nextSibling=Be:J.firstChild=Be,Be?Be.previousSibling=ye:J.lastChild=ye,re.parentNode=null,re.previousSibling=null,re.nextSibling=null,Ke(J.ownerDocument,J),re}function lt(J){return J&&(J.nodeType===X.DOCUMENT_NODE||J.nodeType===X.DOCUMENT_FRAGMENT_NODE||J.nodeType===X.ELEMENT_NODE)}function bt(J){return J&&(_t(J)||Qt(J)||mt(J)||J.nodeType===X.DOCUMENT_FRAGMENT_NODE||J.nodeType===X.COMMENT_NODE||J.nodeType===X.PROCESSING_INSTRUCTION_NODE)}function mt(J){return J&&J.nodeType===X.DOCUMENT_TYPE_NODE}function _t(J){return J&&J.nodeType===X.ELEMENT_NODE}function Qt(J){return J&&J.nodeType===X.TEXT_NODE}function xt(J,re){var ye=J.childNodes||[];if(e(ye,_t)||mt(re))return!1;var Be=e(ye,mt);return!(re&&Be&&ye.indexOf(Be)>ye.indexOf(re))}function wt(J,re){var ye=J.childNodes||[];function Be(Nt){return _t(Nt)&&Nt!==re}if(e(ye,Be))return!1;var ft=e(ye,mt);return!(re&&ft&&ye.indexOf(ft)>ye.indexOf(re))}function Ot(J,re,ye){if(!lt(J))throw new Y(B,"Unexpected parent node type "+J.nodeType);if(ye&&ye.parentNode!==J)throw new Y(z,"child not in parent");if(!bt(re)||mt(re)&&J.nodeType!==X.DOCUMENT_NODE)throw new Y(B,"Unexpected node type "+re.nodeType+" for parent node type "+J.nodeType)}function qe(J,re,ye){var Be=J.childNodes||[],ft=re.childNodes||[];if(re.nodeType===X.DOCUMENT_FRAGMENT_NODE){var Nt=ft.filter(_t);if(Nt.length>1||e(ft,Qt))throw new Y(B,"More than one element or text in fragment");if(Nt.length===1&&!xt(J,ye))throw new Y(B,"Element in fragment can not be inserted before doctype")}if(_t(re)&&!xt(J,ye))throw new Y(B,"Only one element can be added and only after doctype");if(mt(re)){if(e(Be,mt))throw new Y(B,"Only one doctype is allowed");var Zt=e(Be,_t);if(ye&&Be.indexOf(Zt)<Be.indexOf(ye))throw new Y(B,"Doctype can only be inserted before an element");if(!ye&&Zt)throw new Y(B,"Doctype can not be appended since element is present")}}function Le(J,re,ye){var Be=J.childNodes||[],ft=re.childNodes||[];if(re.nodeType===X.DOCUMENT_FRAGMENT_NODE){var Nt=ft.filter(_t);if(Nt.length>1||e(ft,Qt))throw new Y(B,"More than one element or text in fragment");if(Nt.length===1&&!wt(J,ye))throw new Y(B,"Element in fragment can not be inserted before doctype")}if(_t(re)&&!wt(J,ye))throw new Y(B,"Only one element can be added and only after doctype");if(mt(re)){let ir=function(En){return mt(En)&&En!==ye};var cr=ir;if(e(Be,ir))throw new Y(B,"Only one doctype is allowed");var Zt=e(Be,_t);if(ye&&Be.indexOf(Zt)<Be.indexOf(ye))throw new Y(B,"Doctype can only be inserted before an element")}}function He(J,re,ye,Be){Ot(J,re,ye),J.nodeType===X.DOCUMENT_NODE&&(Be||qe)(J,re,ye);var ft=re.parentNode;if(ft&&ft.removeChild(re),re.nodeType===M){var Nt=re.firstChild;if(Nt==null)return re;var Zt=re.lastChild}else Nt=Zt=re;var cr=ye?ye.previousSibling:J.lastChild;Nt.previousSibling=cr,Zt.nextSibling=ye,cr?cr.nextSibling=Nt:J.firstChild=Nt,ye==null?J.lastChild=Zt:ye.previousSibling=Zt;do Nt.parentNode=J;while(Nt!==Zt&&(Nt=Nt.nextSibling));return Ke(J.ownerDocument||J,J),re.nodeType==M&&(re.firstChild=re.lastChild=null),re}function Xe(J,re){return re.parentNode&&re.parentNode.removeChild(re),re.parentNode=J,re.previousSibling=J.lastChild,re.nextSibling=null,re.previousSibling?re.previousSibling.nextSibling=re:J.firstChild=re,J.lastChild=re,Ke(J.ownerDocument,J,re),re}we.prototype={nodeName:"#document",nodeType:N,doctype:null,documentElement:null,_inc:1,insertBefore:function(J,re){if(J.nodeType==M){for(var ye=J.firstChild;ye;){var Be=ye.nextSibling;this.insertBefore(ye,re),ye=Be}return J}return He(this,J,re),J.ownerDocument=this,this.documentElement===null&&J.nodeType===y&&(this.documentElement=J),J},removeChild:function(J){return this.documentElement==J&&(this.documentElement=null),Me(this,J)},replaceChild:function(J,re){He(this,J,re,Le),J.ownerDocument=this,re&&this.removeChild(re),_t(J)&&(this.documentElement=J)},importNode:function(J,re){return Ka(this,J,re)},getElementById:function(J){var re=null;return be(this.documentElement,function(ye){if(ye.nodeType==y&&ye.getAttribute("id")==J)return re=ye,!0}),re},getElementsByClassName:function(J){var re=o(J);return new oe(this,function(ye){var Be=[];return re.length>0&&be(ye.documentElement,function(ft){if(ft!==ye&&ft.nodeType===y){var Nt=ft.getAttribute("class");if(Nt){var Zt=J===Nt;if(!Zt){var cr=o(Nt);Zt=re.every(u(cr))}Zt&&Be.push(ft)}}}),Be})},createElement:function(J){var re=new he;re.ownerDocument=this,re.nodeName=J,re.tagName=J,re.localName=J,re.childNodes=new Q;var ye=re.attributes=new H;return ye._ownerElement=re,re},createDocumentFragment:function(){var J=new rr;return J.ownerDocument=this,J.childNodes=new Q,J},createTextNode:function(J){var re=new $e;return re.ownerDocument=this,re.appendData(J),re},createComment:function(J){var re=new Ze;return re.ownerDocument=this,re.appendData(J),re},createCDATASection:function(J){var re=new qt;return re.ownerDocument=this,re.appendData(J),re},createProcessingInstruction:function(J,re){var ye=new on;return ye.ownerDocument=this,ye.tagName=ye.nodeName=ye.target=J,ye.nodeValue=ye.data=re,ye},createAttribute:function(J){var re=new Ae;return re.ownerDocument=this,re.name=J,re.nodeName=J,re.localName=J,re.specified=!0,re},createEntityReference:function(J){var re=new an;return re.ownerDocument=this,re.nodeName=J,re},createElementNS:function(J,re){var ye=new he,Be=re.split(":"),ft=ye.attributes=new H;return ye.childNodes=new Q,ye.ownerDocument=this,ye.nodeName=re,ye.tagName=re,ye.namespaceURI=J,Be.length==2?(ye.prefix=Be[0],ye.localName=Be[1]):ye.localName=re,ft._ownerElement=ye,ye},createAttributeNS:function(J,re){var ye=new Ae,Be=re.split(":");return ye.ownerDocument=this,ye.nodeName=re,ye.name=re,ye.namespaceURI=J,ye.specified=!0,Be.length==2?(ye.prefix=Be[0],ye.localName=Be[1]):ye.localName=re,ye}},f(we,X);function he(){this._nsMap={}}he.prototype={nodeType:y,hasAttribute:function(J){return this.getAttributeNode(J)!=null},getAttribute:function(J){var re=this.getAttributeNode(J);return re&&re.value||""},getAttributeNode:function(J){return this.attributes.getNamedItem(J)},setAttribute:function(J,re){var ye=this.ownerDocument.createAttribute(J);ye.value=ye.nodeValue=""+re,this.setAttributeNode(ye)},removeAttribute:function(J){var re=this.getAttributeNode(J);re&&this.removeAttributeNode(re)},appendChild:function(J){return J.nodeType===M?this.insertBefore(J,null):Xe(this,J)},setAttributeNode:function(J){return this.attributes.setNamedItem(J)},setAttributeNodeNS:function(J){return this.attributes.setNamedItemNS(J)},removeAttributeNode:function(J){return this.attributes.removeNamedItem(J.nodeName)},removeAttributeNS:function(J,re){var ye=this.getAttributeNodeNS(J,re);ye&&this.removeAttributeNode(ye)},hasAttributeNS:function(J,re){return this.getAttributeNodeNS(J,re)!=null},getAttributeNS:function(J,re){var ye=this.getAttributeNodeNS(J,re);return ye&&ye.value||""},setAttributeNS:function(J,re,ye){var Be=this.ownerDocument.createAttributeNS(J,re);Be.value=Be.nodeValue=""+ye,this.setAttributeNode(Be)},getAttributeNodeNS:function(J,re){return this.attributes.getNamedItemNS(J,re)},getElementsByTagName:function(J){return new oe(this,function(re){var ye=[];return be(re,function(Be){Be!==re&&Be.nodeType==y&&(J==="*"||Be.tagName==J)&&ye.push(Be)}),ye})},getElementsByTagNameNS:function(J,re){return new oe(this,function(ye){var Be=[];return be(ye,function(ft){ft!==ye&&ft.nodeType===y&&(J==="*"||ft.namespaceURI===J)&&(re==="*"||ft.localName==re)&&Be.push(ft)}),Be})}},we.prototype.getElementsByTagName=he.prototype.getElementsByTagName,we.prototype.getElementsByTagNameNS=he.prototype.getElementsByTagNameNS,f(he,X);function Ae(){}Ae.prototype.nodeType=x,f(Ae,X);function rt(){}rt.prototype={data:"",substringData:function(J,re){return this.data.substring(J,J+re)},appendData:function(J){J=this.data+J,this.nodeValue=this.data=J,this.length=J.length},insertData:function(J,re){this.replaceData(J,0,re)},appendChild:function(J){throw new Error(q[B])},deleteData:function(J,re){this.replaceData(J,re,"")},replaceData:function(J,re,ye){var Be=this.data.substring(0,J),ft=this.data.substring(J+re);ye=Be+ye+ft,this.nodeValue=this.data=ye,this.length=ye.length}},f(rt,X);function $e(){}$e.prototype={nodeName:"#text",nodeType:b,splitText:function(J){var re=this.data,ye=re.substring(J);re=re.substring(0,J),this.data=this.nodeValue=re,this.length=re.length;var Be=this.ownerDocument.createTextNode(ye);return this.parentNode&&this.parentNode.insertBefore(Be,this.nextSibling),Be}},f($e,rt);function Ze(){}Ze.prototype={nodeName:"#comment",nodeType:O},f(Ze,rt);function qt(){}qt.prototype={nodeName:"#cdata-section",nodeType:w},f(qt,rt);function jt(){}jt.prototype.nodeType=F,f(jt,X);function un(){}un.prototype.nodeType=V,f(un,X);function Pt(){}Pt.prototype.nodeType=D,f(Pt,X);function an(){}an.prototype.nodeType=S,f(an,X);function rr(){}rr.prototype.nodeName="#document-fragment",rr.prototype.nodeType=M,f(rr,X);function on(){}on.prototype.nodeType=k,f(on,X);function oi(){}oi.prototype.serializeToString=function(J,re,ye){return Hr.call(J,re,ye)},X.prototype.toString=Hr;function Hr(J,re){var ye=[],Be=this.nodeType==9&&this.documentElement||this,ft=Be.prefix,Nt=Be.namespaceURI;if(Nt&&ft==null){var ft=Be.lookupPrefix(Nt);if(ft==null)var Zt=[{namespace:Nt,prefix:null}]}return xr(this,ye,J,re,Zt),ye.join("")}function kn(J,re,ye){var Be=J.prefix||"",ft=J.namespaceURI;if(!ft||Be==="xml"&&ft===n.XML||ft===n.XMLNS)return!1;for(var Nt=ye.length;Nt--;){var Zt=ye[Nt];if(Zt.prefix===Be)return Zt.namespace!==ft}return!0}function qr(J,re,ye){J.push(" ",re,'="',ye.replace(/[<>&"\t\n\r]/g,fe),'"')}function xr(J,re,ye,Be,ft){if(ft||(ft=[]),Be)if(J=Be(J),J){if(typeof J=="string"){re.push(J);return}}else return;switch(J.nodeType){case y:var Nt=J.attributes,Zt=Nt.length,_n=J.firstChild,cr=J.tagName;ye=n.isHTML(J.namespaceURI)||ye;var ir=cr;if(!ye&&!J.prefix&&J.namespaceURI){for(var En,On=0;On<Nt.length;On++)if(Nt.item(On).name==="xmlns"){En=Nt.item(On).value;break}if(!En)for(var dr=ft.length-1;dr>=0;dr--){var Gr=ft[dr];if(Gr.prefix===""&&Gr.namespace===J.namespaceURI){En=Gr.namespace;break}}if(En!==J.namespaceURI)for(var dr=ft.length-1;dr>=0;dr--){var Gr=ft[dr];if(Gr.namespace===J.namespaceURI){Gr.prefix&&(ir=Gr.prefix+":"+cr);break}}}re.push("<",ir);for(var ct=0;ct<Zt;ct++){var sn=Nt.item(ct);sn.prefix=="xmlns"?ft.push({prefix:sn.localName,namespace:sn.value}):sn.nodeName=="xmlns"&&ft.push({prefix:"",namespace:sn.value})}for(var ct=0;ct<Zt;ct++){var sn=Nt.item(ct);if(kn(sn,ye,ft)){var cn=sn.prefix||"",Zn=sn.namespaceURI;qr(re,cn?"xmlns:"+cn:"xmlns",Zn),ft.push({prefix:cn,namespace:Zn})}xr(sn,re,ye,Be,ft)}if(cr===ir&&kn(J,ye,ft)){var cn=J.prefix||"",Zn=J.namespaceURI;qr(re,cn?"xmlns:"+cn:"xmlns",Zn),ft.push({prefix:cn,namespace:Zn})}if(_n||ye&&!/^(?:meta|link|img|br|hr|input)$/i.test(cr)){if(re.push(">"),ye&&/^script$/i.test(cr))for(;_n;)_n.data?re.push(_n.data):xr(_n,re,ye,Be,ft.slice()),_n=_n.nextSibling;else for(;_n;)xr(_n,re,ye,Be,ft.slice()),_n=_n.nextSibling;re.push("</",ir,">")}else re.push("/>");return;case N:case M:for(var _n=J.firstChild;_n;)xr(_n,re,ye,Be,ft.slice()),_n=_n.nextSibling;return;case x:return qr(re,J.name,J.value);case b:return re.push(J.data.replace(/[<&>]/g,fe));case w:return re.push("<![CDATA[",J.data,"]]>");case O:return re.push("<!--",J.data,"-->");case F:var _r=J.publicId,At=J.systemId;if(re.push("<!DOCTYPE ",J.name),_r)re.push(" PUBLIC ",_r),At&&At!="."&&re.push(" ",At),re.push(">");else if(At&&At!=".")re.push(" SYSTEM ",At,">");else{var Wi=J.internalSubset;Wi&&re.push(" [",Wi,"]"),re.push(">")}return;case k:return re.push("<?",J.target," ",J.data,"?>");case S:return re.push("&",J.nodeName,";");default:re.push("??",J.nodeName)}}function Ka(J,re,ye){var Be;switch(re.nodeType){case y:Be=re.cloneNode(!1),Be.ownerDocument=J;case M:break;case x:ye=!0;break}if(Be||(Be=re.cloneNode(!1)),Be.ownerDocument=J,Be.parentNode=null,ye)for(var ft=re.firstChild;ft;)Be.appendChild(Ka(J,ft,ye)),ft=ft.nextSibling;return Be}function Os(J,re,ye){var Be=new re.constructor;for(var ft in re)if(Object.prototype.hasOwnProperty.call(re,ft)){var Nt=re[ft];typeof Nt!="object"&&Nt!=Be[ft]&&(Be[ft]=Nt)}switch(re.childNodes&&(Be.childNodes=new Q),Be.ownerDocument=J,Be.nodeType){case y:var Zt=re.attributes,cr=Be.attributes=new H,ir=Zt.length;cr._ownerElement=Be;for(var En=0;En<ir;En++)Be.setAttributeNode(Os(J,Zt.item(En),!0));break;case x:ye=!0}if(ye)for(var On=re.firstChild;On;)Be.appendChild(Os(J,On,ye)),On=On.nextSibling;return Be}function us(J,re,ye){J[re]=ye}try{if(Object.defineProperty){let J=function(re){switch(re.nodeType){case y:case M:var ye=[];for(re=re.firstChild;re;)re.nodeType!==7&&re.nodeType!==8&&ye.push(J(re)),re=re.nextSibling;return ye.join("");default:return re.nodeValue}};var cs=J;Object.defineProperty(oe.prototype,"length",{get:function(){return ue(this),this.$$length}}),Object.defineProperty(X.prototype,"textContent",{get:function(){return J(this)},set:function(re){switch(this.nodeType){case y:case M:for(;this.firstChild;)this.removeChild(this.firstChild);(re||String(re))&&this.appendChild(this.ownerDocument.createTextNode(re));break;default:this.data=re,this.value=re,this.nodeValue=re}}}),us=function(re,ye,Be){re["$$"+ye]=Be}}}catch{}return Pc.DocumentType=jt,Pc.DOMException=Y,Pc.DOMImplementation=G,Pc.Element=he,Pc.Node=X,Pc.NodeList=Q,Pc.XMLSerializer=oi,Pc}var Xv={},HT={},V4;function Lte(){return V4||(V4=1,function(t){var e=O2().freeze;t.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.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:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",Ffr:"𝔉",ffr:"𝔣",filig:"ﬁ",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"ﬂ",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:"Ĳ",ijlig:"ĳ",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:"ŉ",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:"‌"}),t.entityMap=t.HTML_ENTITIES}(HT)),HT}var l1={},H4;function Bte(){if(H4)return l1;H4=1;var t=O2().NAMESPACE,e=/[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]/,n=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+e.source+n.source+"*(?::"+e.source+n.source+"*)?$"),i=0,s=1,o=2,u=3,d=4,f=5,m=6,y=7;function x(B,z){this.message=B,this.locator=z,Error.captureStackTrace&&Error.captureStackTrace(this,x)}x.prototype=new Error,x.prototype.name=x.name;function b(){}b.prototype={parse:function(B,z,ee){var Y=this.domBuilder;Y.startDocument(),F(z,z={}),w(B,z,ee,Y,this.errorHandler),Y.endDocument()}};function w(B,z,ee,Y,Q){function oe(he){if(he>65535){he-=65536;var Ae=55296+(he>>10),rt=56320+(he&1023);return String.fromCharCode(Ae,rt)}else return String.fromCharCode(he)}function ue(he){var Ae=he.slice(1,-1);return Object.hasOwnProperty.call(ee,Ae)?ee[Ae]:Ae.charAt(0)==="#"?oe(parseInt(Ae.substr(1).replace("x","0x"))):(Q.error("entity not found:"+he),he)}function H(he){if(he>we){var Ae=B.substring(we,he).replace(/&#?\w+;/g,ue);X&&te(we),Y.characters(Ae,0,he-we),we=he}}function te(he,Ae){for(;he>=ie&&(Ae=G.exec(B));)Z=Ae.index,ie=Z+Ae[0].length,X.lineNumber++;X.columnNumber=he-Z+1}for(var Z=0,ie=0,G=/.*(?:\r\n?|\n)|.*$/g,X=Y.locator,fe=[{currentNSMap:z}],be={},we=0;;){try{var pe=B.indexOf("<",we);if(pe<0){if(!B.substr(we).match(/^\s*$/)){var Ce=Y.doc,Ke=Ce.createTextNode(B.substr(we));Ce.appendChild(Ke),Y.currentElement=Ke}return}switch(pe>we&&H(pe),B.charAt(pe+1)){case"/":var Ot=B.indexOf(">",pe+3),Me=B.substring(pe+2,Ot).replace(/[ \t\n\r]+$/g,""),lt=fe.pop();Ot<0?(Me=B.substring(pe+2).replace(/[\s<].*/,""),Q.error("end tag name: "+Me+" is not complete:"+lt.tagName),Ot=pe+1+Me.length):Me.match(/\s</)&&(Me=Me.replace(/[\s<].*/,""),Q.error("end tag name: "+Me+" maybe not complete"),Ot=pe+1+Me.length);var bt=lt.localNSMap,mt=lt.tagName==Me,_t=mt||lt.tagName&&lt.tagName.toLowerCase()==Me.toLowerCase();if(_t){if(Y.endElement(lt.uri,lt.localName,Me),bt)for(var Qt in bt)Object.prototype.hasOwnProperty.call(bt,Qt)&&Y.endPrefixMapping(Qt);mt||Q.fatalError("end tag name: "+Me+" is not match the current start tagName:"+lt.tagName)}else fe.push(lt);Ot++;break;case"?":X&&te(pe),Ot=V(B,pe,Y);break;case"!":X&&te(pe),Ot=M(B,pe,Y,Q);break;default:X&&te(pe);var xt=new $,wt=fe[fe.length-1].currentNSMap,Ot=D(B,pe,xt,wt,ue,Q),qe=xt.length;if(!xt.closed&&N(B,Ot,xt.tagName,be)&&(xt.closed=!0,ee.nbsp||Q.warning("unclosed xml attribute")),X&&qe){for(var Le=S(X,{}),He=0;He<qe;He++){var Xe=xt[He];te(Xe.offset),Xe.locator=S(X,{})}Y.locator=Le,k(xt,Y,wt)&&fe.push(xt),Y.locator=X}else k(xt,Y,wt)&&fe.push(xt);t.isHTML(xt.uri)&&!xt.closed?Ot=O(B,Ot,xt.tagName,ue,Y):Ot++}}catch(he){if(he instanceof x)throw he;Q.error("element parse error: "+he),Ot=-1}Ot>we?we=Ot:H(Math.max(pe,we)+1)}}function S(B,z){return z.lineNumber=B.lineNumber,z.columnNumber=B.columnNumber,z}function D(B,z,ee,Y,Q,oe){function ue(X,fe,be){ee.attributeNames.hasOwnProperty(X)&&oe.fatalError("Attribute "+X+" redefined"),ee.addValue(X,fe.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,Q),be)}for(var H,te,Z=++z,ie=i;;){var G=B.charAt(Z);switch(G){case"=":if(ie===s)H=B.slice(z,Z),ie=u;else if(ie===o)ie=u;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ie===u||ie===s)if(ie===s&&(oe.warning('attribute value must after "="'),H=B.slice(z,Z)),z=Z+1,Z=B.indexOf(G,z),Z>0)te=B.slice(z,Z),ue(H,te,z-1),ie=f;else throw new Error("attribute value no end '"+G+"' match");else if(ie==d)te=B.slice(z,Z),ue(H,te,z),oe.warning('attribute "'+H+'" missed start quot('+G+")!!"),z=Z+1,ie=f;else throw new Error('attribute value must after "="');break;case"/":switch(ie){case i:ee.setTagName(B.slice(z,Z));case f:case m:case y:ie=y,ee.closed=!0;case d:case s:break;case o:ee.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return oe.error("unexpected end of input"),ie==i&&ee.setTagName(B.slice(z,Z)),Z;case">":switch(ie){case i:ee.setTagName(B.slice(z,Z));case f:case m:case y:break;case d:case s:te=B.slice(z,Z),te.slice(-1)==="/"&&(ee.closed=!0,te=te.slice(0,-1));case o:ie===o&&(te=H),ie==d?(oe.warning('attribute "'+te+'" missed quot(")!'),ue(H,te,z)):((!t.isHTML(Y[""])||!te.match(/^(?:disabled|checked|selected)$/i))&&oe.warning('attribute "'+te+'" missed value!! "'+te+'" instead!!'),ue(te,te,z));break;case u:throw new Error("attribute value missed!!")}return Z;case"":G=" ";default:if(G<=" ")switch(ie){case i:ee.setTagName(B.slice(z,Z)),ie=m;break;case s:H=B.slice(z,Z),ie=o;break;case d:var te=B.slice(z,Z);oe.warning('attribute "'+te+'" missed quot(")!!'),ue(H,te,z);case f:ie=m;break}else switch(ie){case o:ee.tagName,(!t.isHTML(Y[""])||!H.match(/^(?:disabled|checked|selected)$/i))&&oe.warning('attribute "'+H+'" missed value!! "'+H+'" instead2!!'),ue(H,H,z),z=Z,ie=s;break;case f:oe.warning('attribute space is required"'+H+'"!!');case m:ie=s,z=Z;break;case u:ie=d,z=Z;break;case y:throw new Error("elements closed character '/' and '>' must be connected to")}}Z++}}function k(B,z,ee){for(var Y=B.tagName,Q=null,G=B.length;G--;){var oe=B[G],ue=oe.qName,H=oe.value,X=ue.indexOf(":");if(X>0)var te=oe.prefix=ue.slice(0,X),Z=ue.slice(X+1),ie=te==="xmlns"&&Z;else Z=ue,te=null,ie=ue==="xmlns"&&"";oe.localName=Z,ie!==!1&&(Q==null&&(Q={},F(ee,ee={})),ee[ie]=Q[ie]=H,oe.uri=t.XMLNS,z.startPrefixMapping(ie,H))}for(var G=B.length;G--;){oe=B[G];var te=oe.prefix;te&&(te==="xml"&&(oe.uri=t.XML),te!=="xmlns"&&(oe.uri=ee[te||""]))}var X=Y.indexOf(":");X>0?(te=B.prefix=Y.slice(0,X),Z=B.localName=Y.slice(X+1)):(te=null,Z=B.localName=Y);var fe=B.uri=ee[te||""];if(z.startElement(fe,Z,Y,B),B.closed){if(z.endElement(fe,Z,Y),Q)for(te in Q)Object.prototype.hasOwnProperty.call(Q,te)&&z.endPrefixMapping(te)}else return B.currentNSMap=ee,B.localNSMap=Q,!0}function O(B,z,ee,Y,Q){if(/^(?:script|textarea)$/i.test(ee)){var oe=B.indexOf("</"+ee+">",z),ue=B.substring(z+1,oe);if(/[&<]/.test(ue))return/^script$/i.test(ee)?(Q.characters(ue,0,ue.length),oe):(ue=ue.replace(/&#?\w+;/g,Y),Q.characters(ue,0,ue.length),oe)}return z+1}function N(B,z,ee,Y){var Q=Y[ee];return Q==null&&(Q=B.lastIndexOf("</"+ee+">"),Q<z&&(Q=B.lastIndexOf("</"+ee)),Y[ee]=Q),Q<z}function F(B,z){for(var ee in B)Object.prototype.hasOwnProperty.call(B,ee)&&(z[ee]=B[ee])}function M(B,z,ee,Y){var Q=B.charAt(z+2);switch(Q){case"-":if(B.charAt(z+3)==="-"){var oe=B.indexOf("-->",z+4);return oe>z?(ee.comment(B,z+4,oe-z-4),oe+3):(Y.error("Unclosed comment"),-1)}else return-1;default:if(B.substr(z+3,6)=="CDATA["){var oe=B.indexOf("]]>",z+9);return ee.startCDATA(),ee.characters(B,z+9,oe-z-9),ee.endCDATA(),oe+3}var ue=q(B,z),H=ue.length;if(H>1&&/!doctype/i.test(ue[0][0])){var te=ue[1][0],Z=!1,ie=!1;H>3&&(/^public$/i.test(ue[2][0])?(Z=ue[3][0],ie=H>4&&ue[4][0]):/^system$/i.test(ue[2][0])&&(ie=ue[3][0]));var G=ue[H-1];return ee.startDTD(te,Z,ie),ee.endDTD(),G.index+G[0].length}}return-1}function V(B,z,ee){var Y=B.indexOf("?>",z);if(Y){var Q=B.substring(z,Y).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Q?(Q[0].length,ee.processingInstruction(Q[1],Q[2]),Y+2):-1}return-1}function $(){this.attributeNames={}}$.prototype={setTagName:function(B){if(!r.test(B))throw new Error("invalid tagName:"+B);this.tagName=B},addValue:function(B,z,ee){if(!r.test(B))throw new Error("invalid attribute:"+B);this.attributeNames[B]=this.length,this[this.length++]={qName:B,value:z,offset:ee}},length:0,getLocalName:function(B){return this[B].localName},getLocator:function(B){return this[B].locator},getQName:function(B){return this[B].qName},getURI:function(B){return this[B].uri},getValue:function(B){return this[B].value}};function q(B,z){var ee,Y=[],Q=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Q.lastIndex=z,Q.exec(B);ee=Q.exec(B);)if(Y.push(ee),ee[1])return Y}return l1.XMLReader=b,l1.ParseError=x,l1}var q4;function Fte(){if(q4)return Xv;q4=1;var t=O2(),e=mM(),n=Lte(),r=Bte(),i=e.DOMImplementation,s=t.NAMESPACE,o=r.ParseError,u=r.XMLReader;function d(D){return D.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function f(D){this.options=D||{locator:{}}}f.prototype.parseFromString=function(D,k){var O=this.options,N=new u,F=O.domBuilder||new y,M=O.errorHandler,V=O.locator,$=O.xmlns||{},q=/\/x?html?$/.test(k),B=q?n.HTML_ENTITIES:n.XML_ENTITIES;V&&F.setDocumentLocator(V),N.errorHandler=m(M,F,V),N.domBuilder=O.domBuilder||F,q&&($[""]=s.HTML),$.xml=$.xml||s.XML;var z=O.normalizeLineEndings||d;return D&&typeof D=="string"?N.parse(z(D),$,B):N.errorHandler.error("invalid doc source"),F.doc};function m(D,k,O){if(!D){if(k instanceof y)return k;D=k}var N={},F=D instanceof Function;O=O||{};function M(V){var $=D[V];!$&&F&&($=D.length==2?function(q){D(V,q)}:D),N[V]=$&&function(q){$("[xmldom "+V+"]	"+q+b(O))}||function(){}}return M("warning"),M("error"),M("fatalError"),N}function y(){this.cdata=!1}function x(D,k){k.lineNumber=D.lineNumber,k.columnNumber=D.columnNumber}y.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(D,k,O,N){var F=this.doc,M=F.createElementNS(D,O||k),V=N.length;S(this,M),this.currentElement=M,this.locator&&x(this.locator,M);for(var $=0;$<V;$++){var D=N.getURI($),q=N.getValue($),O=N.getQName($),B=F.createAttributeNS(D,O);this.locator&&x(N.getLocator($),B),B.value=B.nodeValue=q,M.setAttributeNode(B)}},endElement:function(D,k,O){var N=this.currentElement;N.tagName,this.currentElement=N.parentNode},startPrefixMapping:function(D,k){},endPrefixMapping:function(D){},processingInstruction:function(D,k){var O=this.doc.createProcessingInstruction(D,k);this.locator&&x(this.locator,O),S(this,O)},ignorableWhitespace:function(D,k,O){},characters:function(D,k,O){if(D=w.apply(this,arguments),D){if(this.cdata)var N=this.doc.createCDATASection(D);else var N=this.doc.createTextNode(D);this.currentElement?this.currentElement.appendChild(N):/^\s*$/.test(D)&&this.doc.appendChild(N),this.locator&&x(this.locator,N)}},skippedEntity:function(D){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(D){(this.locator=D)&&(D.lineNumber=0)},comment:function(D,k,O){D=w.apply(this,arguments);var N=this.doc.createComment(D);this.locator&&x(this.locator,N),S(this,N)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(D,k,O){var N=this.doc.implementation;if(N&&N.createDocumentType){var F=N.createDocumentType(D,k,O);this.locator&&x(this.locator,F),S(this,F),this.doc.doctype=F}},warning:function(D){console.warn("[xmldom warning]	"+D,b(this.locator))},error:function(D){console.error("[xmldom error]	"+D,b(this.locator))},fatalError:function(D){throw new o(D,this.locator)}};function b(D){if(D)return`
@`+(D.systemId||"")+"#[line:"+D.lineNumber+",col:"+D.columnNumber+"]"}function w(D,k,O){return typeof D=="string"?D.substr(k,O):D.length>=k+O||k?new java.lang.String(D,k,O)+"":D}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(D){y.prototype[D]=function(){return null}});function S(D,k){D.currentElement?D.currentElement.appendChild(k):D.doc.appendChild(k)}return Xv.__DOMHandler=y,Xv.normalizeLineEndings=d,Xv.DOMParser=f,Xv}var G4;function Ute(){if(G4)return Wv;G4=1;var t=mM();return Wv.DOMImplementation=t.DOMImplementation,Wv.XMLSerializer=t.XMLSerializer,Wv.DOMParser=Fte().DOMParser,Wv}var zte=Ute();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const W4=t=>!!t&&typeof t=="object",$i=(...t)=>t.reduce((e,n)=>(typeof n!="object"||Object.keys(n).forEach(r=>{Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=e[r].concat(n[r]):W4(e[r])&&W4(n[r])?e[r]=$i(e[r],n[r]):e[r]=n[r]}),e),{}),gM=t=>Object.keys(t).map(e=>t[e]),$te=(t,e)=>{const n=[];for(let r=t;r<e;r++)n.push(r);return n},jg=t=>t.reduce((e,n)=>e.concat(n),[]),vM=t=>{if(!t.length)return[];const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e},Vte=(t,e)=>t.reduce((n,r,i)=>(r[e]&&n.push(i),n),[]),Hte=(t,e)=>gM(t.reduce((n,r)=>(r.forEach(i=>{n[e(i)]=i}),n),{}));var Lg={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const Ay=({baseUrl:t="",source:e="",range:n="",indexRange:r=""})=>{const i={uri:e,resolvedUri:I2(t||"",e)};if(n||r){const o=(n||r).split("-");let u=me.BigInt?me.BigInt(o[0]):parseInt(o[0],10),d=me.BigInt?me.BigInt(o[1]):parseInt(o[1],10);u<Number.MAX_SAFE_INTEGER&&typeof u=="bigint"&&(u=Number(u)),d<Number.MAX_SAFE_INTEGER&&typeof d=="bigint"&&(d=Number(d));let f;typeof d=="bigint"||typeof u=="bigint"?f=me.BigInt(d)-me.BigInt(u)+me.BigInt(1):f=d-u+1,typeof f=="bigint"&&f<Number.MAX_SAFE_INTEGER&&(f=Number(f)),i.byterange={length:f,offset:u}}return i},qte=t=>{let e;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=me.BigInt(t.offset)+me.BigInt(t.length)-me.BigInt(1):e=t.offset+t.length-1,`${t.offset}-${e}`},X4=t=>(t&&typeof t!="number"&&(t=parseInt(t,10)),isNaN(t)?null:t),Gte={static(t){const{duration:e,timescale:n=1,sourceDuration:r,periodDuration:i}=t,s=X4(t.endNumber),o=e/n;return typeof s=="number"?{start:0,end:s}:typeof i=="number"?{start:0,end:i/o}:{start:0,end:r/o}},dynamic(t){const{NOW:e,clientOffset:n,availabilityStartTime:r,timescale:i=1,duration:s,periodStart:o=0,minimumUpdatePeriod:u=0,timeShiftBufferDepth:d=1/0}=t,f=X4(t.endNumber),m=(e+n)/1e3,y=r+o,b=m+u-y,w=Math.ceil(b*i/s),S=Math.floor((m-y-d)*i/s),D=Math.floor((m-y)*i/s);return{start:Math.max(0,S),end:typeof f=="number"?f:Math.min(w,D)}}},Wte=t=>e=>{const{duration:n,timescale:r=1,periodStart:i,startNumber:s=1}=t;return{number:s+e,duration:n/r,timeline:i,time:e*n}},cD=t=>{const{type:e,duration:n,timescale:r=1,periodDuration:i,sourceDuration:s}=t,{start:o,end:u}=Gte[e](t),d=$te(o,u).map(Wte(t));if(e==="static"){const f=d.length-1,m=typeof i=="number"?i:s;d[f].duration=m-n/r*f}return d},yM=t=>{const{baseUrl:e,initialization:n={},sourceDuration:r,indexRange:i="",periodStart:s,presentationTime:o,number:u=0,duration:d}=t;if(!e)throw new Error(Lg.NO_BASE_URL);const f=Ay({baseUrl:e,source:n.sourceURL,range:n.range}),m=Ay({baseUrl:e,source:e,indexRange:i});if(m.map=f,d){const y=cD(t);y.length&&(m.duration=y[0].duration,m.timeline=y[0].timeline)}else r&&(m.duration=r,m.timeline=s);return m.presentationTime=o||s,m.number=u,[m]},dD=(t,e,n)=>{const r=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,s=t.timeline||0,o=t.sidx.byterange,u=o.offset+o.length,d=e.timescale,f=e.references.filter(D=>D.referenceType!==1),m=[],y=t.endList?"static":"dynamic",x=t.sidx.timeline;let b=x,w=t.mediaSequence||0,S;typeof e.firstOffset=="bigint"?S=me.BigInt(u)+e.firstOffset:S=u+e.firstOffset;for(let D=0;D<f.length;D++){const k=e.references[D],O=k.referencedSize,N=k.subsegmentDuration;let F;typeof S=="bigint"?F=S+me.BigInt(O)-me.BigInt(1):F=S+O-1;const M=`${S}-${F}`,$=yM({baseUrl:n,timescale:d,timeline:s,periodStart:x,presentationTime:b,number:w,duration:N,sourceDuration:i,indexRange:M,type:y})[0];r&&($.map=r),m.push($),typeof S=="bigint"?S+=me.BigInt(O):S+=O,b+=N/d,w++}return t.segments=m,t},Xte=["AUDIO","SUBTITLES"],Yte=1/60,bM=t=>Hte(t,({timeline:e})=>e).sort((e,n)=>e.timeline>n.timeline?1:-1),Kte=(t,e)=>{for(let n=0;n<t.length;n++)if(t[n].attributes.NAME===e)return t[n];return null},Y4=t=>{let e=[];return jte(t,Xte,(n,r,i,s)=>{e=e.concat(n.playlists||[])}),e},K4=({playlist:t,mediaSequence:e})=>{t.mediaSequence=e,t.segments.forEach((n,r)=>{n.number=t.mediaSequence+r})},Qte=({oldPlaylists:t,newPlaylists:e,timelineStarts:n})=>{e.forEach(r=>{r.discontinuitySequence=n.findIndex(function({timeline:d}){return d===r.timeline});const i=Kte(t,r.attributes.NAME);if(!i||r.sidx)return;const s=r.segments[0],o=i.segments.findIndex(function(d){return Math.abs(d.presentationTime-s.presentationTime)<Yte});if(o===-1){K4({playlist:r,mediaSequence:i.mediaSequence+i.segments.length}),r.segments[0].discontinuity=!0,r.discontinuityStarts.unshift(0),(!i.segments.length&&r.timeline>i.timeline||i.segments.length&&r.timeline>i.segments[i.segments.length-1].timeline)&&r.discontinuitySequence--;return}i.segments[o].discontinuity&&!s.discontinuity&&(s.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),K4({playlist:r,mediaSequence:i.segments[o].number})})},Zte=({oldManifest:t,newManifest:e})=>{const n=t.playlists.concat(Y4(t)),r=e.playlists.concat(Y4(e));return e.timelineStarts=bM([t.timelineStarts,e.timelineStarts]),Qte({oldPlaylists:n,newPlaylists:r,timelineStarts:e.timelineStarts}),e},N2=t=>t&&t.uri+"-"+qte(t.byterange),qT=t=>{const e=t.reduce(function(r,i){return r[i.attributes.baseUrl]||(r[i.attributes.baseUrl]=[]),r[i.attributes.baseUrl].push(i),r},{});let n=[];return Object.values(e).forEach(r=>{const i=gM(r.reduce((s,o)=>{const u=o.attributes.id+(o.attributes.lang||"");return s[u]?(o.segments&&(o.segments[0]&&(o.segments[0].discontinuity=!0),s[u].segments.push(...o.segments)),o.attributes.contentProtection&&(s[u].attributes.contentProtection=o.attributes.contentProtection)):(s[u]=o,s[u].attributes.timelineStarts=[]),s[u].attributes.timelineStarts.push({start:o.attributes.periodStart,timeline:o.attributes.periodStart}),s},{}));n=n.concat(i)}),n.map(r=>(r.discontinuityStarts=Vte(r.segments||[],"discontinuity"),r))},fD=(t,e)=>{const n=N2(t.sidx),r=n&&e[n]&&e[n].sidx;return r&&dD(t,r,t.sidx.resolvedUri),t},Jte=(t,e={})=>{if(!Object.keys(e).length)return t;for(const n in t)t[n]=fD(t[n],e);return t},ene=({attributes:t,segments:e,sidx:n,mediaSequence:r,discontinuitySequence:i,discontinuityStarts:s},o)=>{const u={attributes:{NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuitySequence:i,discontinuityStarts:s,timelineStarts:t.timelineStarts,mediaSequence:r,segments:e};return t.contentProtection&&(u.contentProtection=t.contentProtection),t.serviceLocation&&(u.attributes.serviceLocation=t.serviceLocation),n&&(u.sidx=n),o&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u},tne=({attributes:t,segments:e,mediaSequence:n,discontinuityStarts:r,discontinuitySequence:i})=>{typeof e>"u"&&(e=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);const s={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};t.codecs&&(s.CODECS=t.codecs);const o={attributes:s,uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:r,discontinuitySequence:i,mediaSequence:n,segments:e};return t.serviceLocation&&(o.attributes.serviceLocation=t.serviceLocation),o},nne=(t,e={},n=!1)=>{let r;const i=t.reduce((s,o)=>{const u=o.attributes.role&&o.attributes.role.value||"",d=o.attributes.lang||"";let f=o.attributes.label||"main";if(d&&!o.attributes.label){const y=u?` (${u})`:"";f=`${o.attributes.lang}${y}`}s[f]||(s[f]={language:d,autoselect:!0,default:u==="main",playlists:[],uri:""});const m=fD(ene(o,n),e);return s[f].playlists.push(m),typeof r>"u"&&u==="main"&&(r=o,r.default=!0),s},{});if(!r){const s=Object.keys(i)[0];i[s].default=!0}return i},rne=(t,e={})=>t.reduce((n,r)=>{const i=r.attributes.label||r.attributes.lang||"text",s=r.attributes.lang||"und";return n[i]||(n[i]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),n[i].playlists.push(fD(tne(r),e)),n},{}),ine=t=>t.reduce((e,n)=>(n&&n.forEach(r=>{const{channel:i,language:s}=r;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},r.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(e[s].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(e[s]["3D"]=r["3D"])}),e),{}),sne=({attributes:t,segments:e,sidx:n,discontinuityStarts:r})=>{const i={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuityStarts:r,timelineStarts:t.timelineStarts,segments:e};return t.frameRate&&(i.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(i.contentProtection=t.contentProtection),t.serviceLocation&&(i.attributes.serviceLocation=t.serviceLocation),n&&(i.sidx=n),i},ane=({attributes:t})=>t.mimeType==="video/mp4"||t.mimeType==="video/webm"||t.contentType==="video",one=({attributes:t})=>t.mimeType==="audio/mp4"||t.mimeType==="audio/webm"||t.contentType==="audio",lne=({attributes:t})=>t.mimeType==="text/vtt"||t.contentType==="text",une=(t,e)=>{t.forEach(n=>{n.mediaSequence=0,n.discontinuitySequence=e.findIndex(function({timeline:r}){return r===n.timeline}),n.segments&&n.segments.forEach((r,i)=>{r.number=i})})},Q4=t=>t?Object.keys(t).reduce((e,n)=>{const r=t[n];return e.concat(r.playlists)},[]):[],cne=({dashPlaylists:t,locations:e,contentSteering:n,sidxMapping:r={},previousManifest:i,eventStream:s})=>{if(!t.length)return{};const{sourceDuration:o,type:u,suggestedPresentationDelay:d,minimumUpdatePeriod:f}=t[0].attributes,m=qT(t.filter(ane)).map(sne),y=qT(t.filter(one)),x=qT(t.filter(lne)),b=t.map(F=>F.attributes.captionServices).filter(Boolean),w={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:Jte(m,r)};f>=0&&(w.minimumUpdatePeriod=f*1e3),e&&(w.locations=e),n&&(w.contentSteering=n),u==="dynamic"&&(w.suggestedPresentationDelay=d),s&&s.length>0&&(w.eventStream=s);const S=w.playlists.length===0,D=y.length?nne(y,r,S):null,k=x.length?rne(x,r):null,O=m.concat(Q4(D),Q4(k)),N=O.map(({timelineStarts:F})=>F);return w.timelineStarts=bM(N),une(O,w.timelineStarts),D&&(w.mediaGroups.AUDIO.audio=D),k&&(w.mediaGroups.SUBTITLES.subs=k),b.length&&(w.mediaGroups["CLOSED-CAPTIONS"].cc=ine(b)),i?Zte({oldManifest:i,newManifest:w}):w},dne=(t,e,n)=>{const{NOW:r,clientOffset:i,availabilityStartTime:s,timescale:o=1,periodStart:u=0,minimumUpdatePeriod:d=0}=t,f=(r+i)/1e3,m=s+u,x=f+d-m;return Math.ceil((x*o-e)/n)},xM=(t,e)=>{const{type:n,minimumUpdatePeriod:r=0,media:i="",sourceDuration:s,timescale:o=1,startNumber:u=1,periodStart:d}=t,f=[];let m=-1;for(let y=0;y<e.length;y++){const x=e[y],b=x.d,w=x.r||0,S=x.t||0;m<0&&(m=S),S&&S>m&&(m=S);let D;if(w<0){const N=y+1;N===e.length?n==="dynamic"&&r>0&&i.indexOf("$Number$")>0?D=dne(t,m,b):D=(s*o-m)/b:D=(e[N].t-m)/b}else D=w+1;const k=u+f.length+D;let O=u+f.length;for(;O<k;)f.push({number:O,duration:b/o,time:m,timeline:d}),m+=b,O++}return f},fne=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,hne=t=>(e,n,r,i)=>{if(e==="$$")return"$";if(typeof t[n]>"u")return e;const s=""+t[n];return n==="RepresentationID"||(r?i=parseInt(i,10):i=1,s.length>=i)?s:`${new Array(i-s.length+1).join("0")}${s}`},Z4=(t,e)=>t.replace(fne,hne(e)),pne=(t,e)=>!t.duration&&!e?[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}]:t.duration?cD(t):xM(t,e),mne=(t,e)=>{const n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=t,i=Ay({baseUrl:t.baseUrl,source:Z4(r.sourceURL,n),range:r.range});return pne(t,e).map(o=>{n.Number=o.number,n.Time=o.time;const u=Z4(t.media||"",n),d=t.timescale||1,f=t.presentationTimeOffset||0,m=t.periodStart+(o.time-f)/d;return{uri:u,timeline:o.timeline,duration:o.duration,resolvedUri:I2(t.baseUrl||"",u),map:i,number:o.number,presentationTime:m}})},gne=(t,e)=>{const{baseUrl:n,initialization:r={}}=t,i=Ay({baseUrl:n,source:r.sourceURL,range:r.range}),s=Ay({baseUrl:n,source:e.media,range:e.mediaRange});return s.map=i,s},vne=(t,e)=>{const{duration:n,segmentUrls:r=[],periodStart:i}=t;if(!n&&!e||n&&e)throw new Error(Lg.SEGMENT_TIME_UNSPECIFIED);const s=r.map(d=>gne(t,d));let o;return n&&(o=cD(t)),e&&(o=xM(t,e)),o.map((d,f)=>{if(s[f]){const m=s[f],y=t.timescale||1,x=t.presentationTimeOffset||0;return m.timeline=d.timeline,m.duration=d.duration,m.number=d.number,m.presentationTime=i+(d.time-x)/y,m}}).filter(d=>d)},yne=({attributes:t,segmentInfo:e})=>{let n,r;e.template?(r=mne,n=$i(t,e.template)):e.base?(r=yM,n=$i(t,e.base)):e.list&&(r=vne,n=$i(t,e.list));const i={attributes:t};if(!r)return i;const s=r(n,e.segmentTimeline);if(n.duration){const{duration:o,timescale:u=1}=n;n.duration=o/u}else s.length?n.duration=s.reduce((o,u)=>Math.max(o,Math.ceil(u.duration)),0):n.duration=0;return i.attributes=n,i.segments=s,e.base&&n.indexRange&&(i.sidx=s[0],i.segments=[]),i},bne=t=>t.map(yne),zr=(t,e)=>vM(t.childNodes).filter(({tagName:n})=>n===e),tb=t=>t.textContent.trim(),xne=t=>parseFloat(t.split("/").reduce((e,n)=>e/n)),Jm=t=>{const u=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!u)return 0;const[d,f,m,y,x,b]=u.slice(1);return parseFloat(d||0)*31536e3+parseFloat(f||0)*2592e3+parseFloat(m||0)*86400+parseFloat(y||0)*3600+parseFloat(x||0)*60+parseFloat(b||0)},_ne=t=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)),J4={mediaPresentationDuration(t){return Jm(t)},availabilityStartTime(t){return _ne(t)/1e3},minimumUpdatePeriod(t){return Jm(t)},suggestedPresentationDelay(t){return Jm(t)},type(t){return t},timeShiftBufferDepth(t){return Jm(t)},start(t){return Jm(t)},width(t){return parseInt(t,10)},height(t){return parseInt(t,10)},bandwidth(t){return parseInt(t,10)},frameRate(t){return xne(t)},startNumber(t){return parseInt(t,10)},timescale(t){return parseInt(t,10)},presentationTimeOffset(t){return parseInt(t,10)},duration(t){const e=parseInt(t,10);return isNaN(e)?Jm(t):e},d(t){return parseInt(t,10)},t(t){return parseInt(t,10)},r(t){return parseInt(t,10)},presentationTime(t){return parseInt(t,10)},DEFAULT(t){return t}},Si=t=>t&&t.attributes?vM(t.attributes).reduce((e,n)=>{const r=J4[n.name]||J4.DEFAULT;return e[n.name]=r(n.value),e},{}):{},Sne={"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"},M2=(t,e)=>e.length?jg(t.map(function(n){return e.map(function(r){const i=tb(r),s=I2(n.baseUrl,i),o=$i(Si(r),{baseUrl:s});return s!==i&&!o.serviceLocation&&n.serviceLocation&&(o.serviceLocation=n.serviceLocation),o})})):t,hD=t=>{const e=zr(t,"SegmentTemplate")[0],n=zr(t,"SegmentList")[0],r=n&&zr(n,"SegmentURL").map(y=>$i({tag:"SegmentURL"},Si(y))),i=zr(t,"SegmentBase")[0],s=n||e,o=s&&zr(s,"SegmentTimeline")[0],u=n||i||e,d=u&&zr(u,"Initialization")[0],f=e&&Si(e);f&&d?f.initialization=d&&Si(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});const m={template:f,segmentTimeline:o&&zr(o,"S").map(y=>Si(y)),list:n&&$i(Si(n),{segmentUrls:r,initialization:Si(d)}),base:i&&$i(Si(i),{initialization:Si(d)})};return Object.keys(m).forEach(y=>{m[y]||delete m[y]}),m},Tne=(t,e,n)=>r=>{const i=zr(r,"BaseURL"),s=M2(e,i),o=$i(t,Si(r)),u=hD(r);return s.map(d=>({segmentInfo:$i(n,u),attributes:$i(o,d)}))},wne=t=>t.reduce((e,n)=>{const r=Si(n);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());const i=Sne[r.schemeIdUri];if(i){e[i]={attributes:r};const s=zr(n,"cenc:pssh")[0];if(s){const o=tb(s);e[i].pssh=o&&uM(o)}}return e},{}),Cne=t=>{if(t.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(n=>{let r,i;return i=n,/^CC\d=/.test(n)?[r,i]=n.split("="):/^CC\d$/.test(n)&&(r=n),{channel:r,language:i}});if(t.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(n=>{const r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(n)){const[i,s=""]=n.split("=");r.channel=i,r.language=n,s.split(",").forEach(o=>{const[u,d]=o.split(":");u==="lang"?r.language=d:u==="er"?r.easyReader=Number(d):u==="war"?r.aspectRatio=Number(d):u==="3D"&&(r["3D"]=Number(d))})}else r.language=n;return r.channel&&(r.channel="SERVICE"+r.channel),r})},Ene=t=>jg(zr(t.node,"EventStream").map(e=>{const n=Si(e),r=n.schemeIdUri;return zr(e,"Event").map(i=>{const s=Si(i),o=s.presentationTime||0,u=n.timescale||1,d=s.duration||0,f=o/u+t.attributes.start;return{schemeIdUri:r,value:n.value,id:s.id,start:f,end:f+d/u,messageData:tb(i)||s.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}})})),Ane=(t,e,n)=>r=>{const i=Si(r),s=M2(e,zr(r,"BaseURL")),o=zr(r,"Role")[0],u={role:Si(o)};let d=$i(t,i,u);const f=zr(r,"Accessibility")[0],m=Cne(Si(f));m&&(d=$i(d,{captionServices:m}));const y=zr(r,"Label")[0];if(y&&y.childNodes.length){const D=y.childNodes[0].nodeValue.trim();d=$i(d,{label:D})}const x=wne(zr(r,"ContentProtection"));Object.keys(x).length&&(d=$i(d,{contentProtection:x}));const b=hD(r),w=zr(r,"Representation"),S=$i(n,b);return jg(w.map(Tne(d,s,S)))},Dne=(t,e)=>(n,r)=>{const i=M2(e,zr(n.node,"BaseURL")),s=$i(t,{periodStart:n.attributes.start});typeof n.attributes.duration=="number"&&(s.periodDuration=n.attributes.duration);const o=zr(n.node,"AdaptationSet"),u=hD(n.node);return jg(o.map(Ane(s,i,u)))},kne=(t,e)=>{if(t.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!t.length)return null;const n=$i({serverURL:tb(t[0])},Si(t[0]));return n.queryBeforeStart=n.queryBeforeStart==="true",n},Rne=({attributes:t,priorPeriodAttributes:e,mpdType:n})=>typeof t.start=="number"?t.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&n==="static"?0:null,Pne=(t,e={})=>{const{manifestUri:n="",NOW:r=Date.now(),clientOffset:i=0,eventHandler:s=function(){}}=e,o=zr(t,"Period");if(!o.length)throw new Error(Lg.INVALID_NUMBER_OF_PERIOD);const u=zr(t,"Location"),d=Si(t),f=M2([{baseUrl:n}],zr(t,"BaseURL")),m=zr(t,"ContentSteering");d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=r,d.clientOffset=i,u.length&&(d.locations=u.map(tb));const y=[];return o.forEach((x,b)=>{const w=Si(x),S=y[b-1];w.start=Rne({attributes:w,priorPeriodAttributes:S?S.attributes:null,mpdType:d.type}),y.push({node:x,attributes:w})}),{locations:d.locations,contentSteeringInfo:kne(m,s),representationInfo:jg(y.map(Dne(d,f))),eventStream:jg(y.map(Ene))}},_M=t=>{if(t==="")throw new Error(Lg.DASH_EMPTY_MANIFEST);const e=new zte.DOMParser;let n,r;try{n=e.parseFromString(t,"application/xml"),r=n&&n.documentElement.tagName==="MPD"?n.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Lg.DASH_INVALID_XML);return r},Ine=t=>{const e=zr(t,"UTCTiming")[0];if(!e)return null;const n=Si(e);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Lg.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},One=(t,e={})=>{const n=Pne(_M(t),e),r=bne(n.representationInfo);return cne({dashPlaylists:r,locations:n.locations,contentSteering:n.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:n.eventStream})},Nne=t=>Ine(_M(t));var GT,eR;function Mne(){if(eR)return GT;eR=1;var t=Math.pow(2,32),e=function(n){var r=new DataView(n.buffer,n.byteOffset,n.byteLength),i;return r.getBigUint64?(i=r.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?Number(i):i):r.getUint32(0)*t+r.getUint32(4)};return GT={getUint64:e,MAX_UINT32:t},GT}var WT,tR;function jne(){if(tR)return WT;tR=1;var t=Mne().getUint64,e=function(n){var r=new DataView(n.buffer,n.byteOffset,n.byteLength),i={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8)},s=12;i.version===0?(i.earliestPresentationTime=r.getUint32(s),i.firstOffset=r.getUint32(s+4),s+=8):(i.earliestPresentationTime=t(n.subarray(s)),i.firstOffset=t(n.subarray(s+8)),s+=16),s+=2;var o=r.getUint16(s);for(s+=2;o>0;s+=12,o--)i.references.push({referenceType:(n[s]&128)>>>7,referencedSize:r.getUint32(s)&2147483647,subsegmentDuration:r.getUint32(s+4),startsWithSap:!!(n[s+8]&128),sapType:(n[s+8]&112)>>>4,sapDeltaTime:r.getUint32(s+8)&268435455});return i};return WT=e,WT}var Lne=jne();const Bne=ko(Lne);var Fne=Ht([73,68,51]),Une=function(e,n){n===void 0&&(n=0),e=Ht(e);var r=e[n+5],i=e[n+6]<<21|e[n+7]<<14|e[n+8]<<7|e[n+9],s=(r&16)>>4;return s?i+20:i+10},ay=function t(e,n){return n===void 0&&(n=0),e=Ht(e),e.length-n<10||!Ur(e,Fne,{offset:n})?n:(n+=Une(e,n),t(e,n))},nR=function(e){return typeof e=="string"?pM(e):e},zne=function(e){return Array.isArray(e)?e.map(function(n){return nR(n)}):[nR(e)]},$ne=function t(e,n,r){r===void 0&&(r=!1),n=zne(n),e=Ht(e);var i=[];if(!n.length)return i;for(var s=0;s<e.length;){var o=(e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3])>>>0,u=e.subarray(s+4,s+8);if(o===0)break;var d=s+o;if(d>e.length){if(r)break;d=e.length}var f=e.subarray(s+8,d);Ur(u,n[0])&&(n.length===1?i.push(f):i.push.apply(i,t(f,n.slice(1),r))),s=d}return i},u1={EBML:Ht([26,69,223,163]),DocType:Ht([66,130]),Segment:Ht([24,83,128,103]),SegmentInfo:Ht([21,73,169,102]),Tracks:Ht([22,84,174,107]),Track:Ht([174]),TrackNumber:Ht([215]),DefaultDuration:Ht([35,227,131]),TrackEntry:Ht([174]),TrackType:Ht([131]),FlagDefault:Ht([136]),CodecID:Ht([134]),CodecPrivate:Ht([99,162]),VideoTrack:Ht([224]),AudioTrack:Ht([225]),Cluster:Ht([31,67,182,117]),Timestamp:Ht([231]),TimestampScale:Ht([42,215,177]),BlockGroup:Ht([160]),BlockDuration:Ht([155]),Block:Ht([161]),SimpleBlock:Ht([163])},iC=[128,64,32,16,8,4,2,1],Vne=function(e){for(var n=1,r=0;r<iC.length&&!(e&iC[r]);r++)n++;return n},o_=function(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=!1);var s=Vne(e[n]),o=e.subarray(n,n+s);return r&&(o=Array.prototype.slice.call(e,n,n+s),o[0]^=iC[s-1]),{length:s,value:Ote(o,{signed:i}),bytes:o}},rR=function t(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(n){return t(n)}):typeof e=="number"?Nte(e):e},Hne=function(e){return Array.isArray(e)?e.map(function(n){return rR(n)}):[rR(e)]},qne=function t(e,n,r){if(r>=n.length)return n.length;var i=o_(n,r,!1);if(Ur(e.bytes,i.bytes))return r;var s=o_(n,r+i.length);return t(e,n,r+s.length+s.value+i.length)},iR=function t(e,n){n=Hne(n),e=Ht(e);var r=[];if(!n.length)return r;for(var i=0;i<e.length;){var s=o_(e,i,!1),o=o_(e,i+s.length),u=i+s.length+o.length;o.value===127&&(o.value=qne(s,e,u),o.value!==e.length&&(o.value-=u));var d=u+o.value>e.length?e.length:u+o.value,f=e.subarray(u,d);Ur(n[0],s.bytes)&&(n.length===1?r.push(f):r=r.concat(t(f,n.slice(1))));var m=s.length+o.length+f.length;i+=m}return r},Gne=Ht([0,0,0,1]),Wne=Ht([0,0,1]),Xne=Ht([0,0,3]),Yne=function(e){for(var n=[],r=1;r<e.length-2;)Ur(e.subarray(r,r+3),Xne)&&(n.push(r+2),r++),r++;if(n.length===0)return e;var i=e.length-n.length,s=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),s[r]=e[o];return s},SM=function(e,n,r,i){e=Ht(e),r=[].concat(r);for(var s=0,o,u=0;s<e.length&&(u<i||o);){var d=void 0;if(Ur(e.subarray(s),Gne)?d=4:Ur(e.subarray(s),Wne)&&(d=3),!d){s++;continue}if(u++,o)return Yne(e.subarray(o,s));var f=void 0;n==="h264"?f=e[s+d]&31:n==="h265"&&(f=e[s+d]>>1&63),r.indexOf(f)!==-1&&(o=s+d),s+=d+(n==="h264"?1:2)}return e.subarray(0,0)},Kne=function(e,n,r){return SM(e,"h264",n,r)},Qne=function(e,n,r){return SM(e,"h265",n,r)},Ys={webm:Ht([119,101,98,109]),matroska:Ht([109,97,116,114,111,115,107,97]),flac:Ht([102,76,97,67]),ogg:Ht([79,103,103,83]),ac3:Ht([11,119]),riff:Ht([82,73,70,70]),avi:Ht([65,86,73]),wav:Ht([87,65,86,69]),"3gp":Ht([102,116,121,112,51,103]),mp4:Ht([102,116,121,112]),fmp4:Ht([115,116,121,112]),mov:Ht([102,116,121,112,113,116]),moov:Ht([109,111,111,118]),moof:Ht([109,111,111,102])},Bg={aac:function(e){var n=ay(e);return Ur(e,[255,16],{offset:n,mask:[255,22]})},mp3:function(e){var n=ay(e);return Ur(e,[255,2],{offset:n,mask:[255,6]})},webm:function(e){var n=iR(e,[u1.EBML,u1.DocType])[0];return Ur(n,Ys.webm)},mkv:function(e){var n=iR(e,[u1.EBML,u1.DocType])[0];return Ur(n,Ys.matroska)},mp4:function(e){if(Bg["3gp"](e)||Bg.mov(e))return!1;if(Ur(e,Ys.mp4,{offset:4})||Ur(e,Ys.fmp4,{offset:4})||Ur(e,Ys.moof,{offset:4})||Ur(e,Ys.moov,{offset:4}))return!0},mov:function(e){return Ur(e,Ys.mov,{offset:4})},"3gp":function(e){return Ur(e,Ys["3gp"],{offset:4})},ac3:function(e){var n=ay(e);return Ur(e,Ys.ac3,{offset:n})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var n=0;n+188<e.length&&n<188;){if(e[n]===71&&e[n+188]===71)return!0;n+=1}return!1},flac:function(e){var n=ay(e);return Ur(e,Ys.flac,{offset:n})},ogg:function(e){return Ur(e,Ys.ogg)},avi:function(e){return Ur(e,Ys.riff)&&Ur(e,Ys.avi,{offset:8})},wav:function(e){return Ur(e,Ys.riff)&&Ur(e,Ys.wav,{offset:8})},h264:function(e){return Kne(e,7,3).length},h265:function(e){return Qne(e,[32,33],3).length}},sC=Object.keys(Bg).filter(function(t){return t!=="ts"&&t!=="h264"&&t!=="h265"}).concat(["ts","h264","h265"]);sC.forEach(function(t){var e=Bg[t];Bg[t]=function(n){return e(Ht(n))}});var Zne=Bg,pD=function(e){e=Ht(e);for(var n=0;n<sC.length;n++){var r=sC[n];if(Zne[r](e))return r}return""},Jne=function(e){return $ne(e,["moof"]).length>0},XT,sR;function ere(){if(sR)return XT;sR=1;var t=9e4,e,n,r,i,s,o,u;return e=function(d){return d*t},n=function(d,f){return d*f},r=function(d){return d/t},i=function(d,f){return d/f},s=function(d,f){return e(i(d,f))},o=function(d,f){return n(r(d),f)},u=function(d,f,m){return r(m?d:d-f)},XT={ONE_SECOND_IN_TS:t,secondsToVideoTs:e,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:i,audioTsToVideoTs:s,videoTsToAudioTs:o,metadataTsToSeconds:u},XT}var Xh=ere();/**
 * @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 aC="8.23.3";const jc={},ff=function(t,e){return jc[t]=jc[t]||[],e&&(jc[t]=jc[t].concat(e)),jc[t]},tre=function(t,e){ff(t,e)},TM=function(t,e){const n=ff(t).indexOf(e);return n<=-1?!1:(jc[t]=jc[t].slice(),jc[t].splice(n,1),!0)},nre=function(t,e){ff(t,[].concat(e).map(n=>{const r=(...i)=>(TM(t,r),n(...i));return r}))},l_={prefixed:!0},k1=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],aR=k1[0];let oy;for(let t=0;t<k1.length;t++)if(k1[t][1]in ht){oy=k1[t];break}if(oy){for(let t=0;t<oy.length;t++)l_[aR[t]]=oy[t];l_.prefixed=oy[0]!==aR[0]}let pa=[];const rre=(t,e,n)=>(r,i,s)=>{const o=e.levels[i],u=new RegExp(`^(${o})$`);let d=t;if(r!=="log"&&s.unshift(r.toUpperCase()+":"),n&&(d=`%c${t}`,s.unshift(n)),s.unshift(d+":"),pa){pa.push([].concat(s));const m=pa.length-1e3;pa.splice(0,m>0?m:0)}if(!me.console)return;let f=me.console[r];!f&&r==="debug"&&(f=me.console.info||me.console.log),!(!f||!o||!u.test(r))&&f[Array.isArray(s)?"apply":"call"](me.console,s)};function oC(t,e=":",n=""){let r="info",i;function s(...o){i("log",r,o)}return i=rre(t,s,n),s.createLogger=(o,u,d)=>{const f=u!==void 0?u:e,m=d!==void 0?d:n,y=`${t} ${f} ${o}`;return oC(y,f,m)},s.createNewLogger=(o,u,d)=>oC(o,u,d),s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},s.level=o=>{if(typeof o=="string"){if(!s.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);r=o}return r},s.history=()=>pa?[].concat(pa):[],s.history.filter=o=>(pa||[]).filter(u=>new RegExp(`.*${o}.*`).test(u[0])),s.history.clear=()=>{pa&&(pa.length=0)},s.history.disable=()=>{pa!==null&&(pa.length=0,pa=null)},s.history.enable=()=>{pa===null&&(pa=[])},s.error=(...o)=>i("error",r,o),s.warn=(...o)=>i("warn",r,o),s.debug=(...o)=>i("debug",r,o),s}const Cn=oC("VIDEOJS"),wM=Cn.createLogger,ire=Object.prototype.toString,CM=function(t){return Bu(t)?Object.keys(t):[]};function mg(t,e){CM(t).forEach(n=>e(t[n],n))}function EM(t,e,n=0){return CM(t).reduce((r,i)=>e(r,t[i],i),n)}function Bu(t){return!!t&&typeof t=="object"}function Fg(t){return Bu(t)&&ire.call(t)==="[object Object]"&&t.constructor===Object}function mr(...t){const e={};return t.forEach(n=>{n&&mg(n,(r,i)=>{if(!Fg(r)){e[i]=r;return}Fg(e[i])||(e[i]={}),e[i]=mr(e[i],r)})}),e}function AM(t={}){const e=[];for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];e.push(r)}return e}function j2(t,e,n,r=!0){const i=o=>Object.defineProperty(t,e,{value:o,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){const o=n();return i(o),o}};return r&&(s.set=i),Object.defineProperty(t,e,s)}var sre=Object.freeze({__proto__:null,each:mg,reduce:EM,isObject:Bu,isPlain:Fg,merge:mr,values:AM,defineLazyProperty:j2});let mD=!1,DM=null,El=!1,kM,RM=!1,gg=!1,vg=!1,Fu=!1,gD=null,L2=null;const are=!!(me.cast&&me.cast.framework&&me.cast.framework.CastReceiverContext);let PM=null,u_=!1,B2=!1,c_=!1,F2=!1,d_=!1,f_=!1,h_=!1;const Dy=!!(f0()&&("ontouchstart"in me||me.navigator.maxTouchPoints||me.DocumentTouch&&me.document instanceof me.DocumentTouch)),Xd=me.navigator&&me.navigator.userAgentData;Xd&&Xd.platform&&Xd.brands&&(El=Xd.platform==="Android",gg=!!Xd.brands.find(t=>t.brand==="Microsoft Edge"),vg=!!Xd.brands.find(t=>t.brand==="Chromium"),Fu=!gg&&vg,gD=L2=(Xd.brands.find(t=>t.brand==="Chromium")||{}).version||null,B2=Xd.platform==="Windows");if(!vg){const t=me.navigator&&me.navigator.userAgent||"";mD=/iPod/i.test(t),DM=function(){const e=t.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),El=/Android/i.test(t),kM=function(){const e=t.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const n=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);return n&&r?parseFloat(e[1]+"."+e[2]):n||null}(),RM=/Firefox/i.test(t),gg=/Edg/i.test(t),vg=/Chrome/i.test(t)||/CriOS/i.test(t),Fu=!gg&&vg,gD=L2=function(){const e=t.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),PM=function(){const e=/MSIE\s(\d+)\.\d/.exec(t);let n=e&&parseFloat(e[1]);return!n&&/Trident\/7.0/i.test(t)&&/rv:11.0/.test(t)&&(n=11),n}(),d_=/Tizen/i.test(t),f_=/Web0S/i.test(t),h_=d_||f_,u_=/Safari/i.test(t)&&!Fu&&!El&&!gg&&!h_,B2=/Windows/i.test(t),c_=/iPad/i.test(t)||u_&&Dy&&!/iPhone/i.test(t),F2=/iPhone/i.test(t)&&!c_}const Rs=F2||c_||mD,U2=(u_||Rs)&&!Fu;var IM=Object.freeze({__proto__:null,get IS_IPOD(){return mD},get IOS_VERSION(){return DM},get IS_ANDROID(){return El},get ANDROID_VERSION(){return kM},get IS_FIREFOX(){return RM},get IS_EDGE(){return gg},get IS_CHROMIUM(){return vg},get IS_CHROME(){return Fu},get CHROMIUM_VERSION(){return gD},get CHROME_VERSION(){return L2},IS_CHROMECAST_RECEIVER:are,get IE_VERSION(){return PM},get IS_SAFARI(){return u_},get IS_WINDOWS(){return B2},get IS_IPAD(){return c_},get IS_IPHONE(){return F2},get IS_TIZEN(){return d_},get IS_WEBOS(){return f_},get IS_SMART_TV(){return h_},TOUCH_ENABLED:Dy,IS_IOS:Rs,IS_ANY_SAFARI:U2});function oR(t){return typeof t=="string"&&!!t.trim()}function ore(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function f0(){return ht===me.document}function h0(t){return Bu(t)&&t.nodeType===1}function OM(){try{return me.parent!==me.self}catch{return!0}}function NM(t){return function(e,n){if(!oR(e))return ht[t](null);oR(n)&&(n=ht.querySelector(n));const r=h0(n)?n:ht;return r[t]&&r[t](e)}}function nn(t="div",e={},n={},r){const i=ht.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(s){const o=e[s];s==="textContent"?xf(i,o):(i[s]!==o||s==="tabIndex")&&(i[s]=o)}),Object.getOwnPropertyNames(n).forEach(function(s){i.setAttribute(s,n[s])}),r&&vD(i,r),i}function xf(t,e){return typeof t.textContent>"u"?t.innerText=e:t.textContent=e,t}function lC(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function fy(t,e){return ore(e),t.classList.contains(e)}function np(t,...e){return t.classList.add(...e.reduce((n,r)=>n.concat(r.split(/\s+/)),[])),t}function z2(t,...e){return t?(t.classList.remove(...e.reduce((n,r)=>n.concat(r.split(/\s+/)),[])),t):(Cn.warn("removeClass was called with an element that doesn't exist"),null)}function MM(t,e,n){return typeof n=="function"&&(n=n(t,e)),typeof n!="boolean"&&(n=void 0),e.split(/\s+/).forEach(r=>t.classList.toggle(r,n)),t}function jM(t,e){Object.getOwnPropertyNames(e).forEach(function(n){const r=e[n];r===null||typeof r>"u"||r===!1?t.removeAttribute(n):t.setAttribute(n,r===!0?"":r)})}function rf(t){const e={},n=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(t&&t.attributes&&t.attributes.length>0){const r=t.attributes;for(let i=r.length-1;i>=0;i--){const s=r[i].name;let o=r[i].value;n.includes(s)&&(o=o!==null),e[s]=o}}return e}function LM(t,e){return t.getAttribute(e)}function Ug(t,e,n){t.setAttribute(e,n)}function $2(t,e){t.removeAttribute(e)}function BM(){ht.body.focus(),ht.onselectstart=function(){return!1}}function FM(){ht.onselectstart=function(){return!0}}function zg(t){if(t&&t.getBoundingClientRect&&t.parentNode){const e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(r=>{e[r]!==void 0&&(n[r]=e[r])}),n.height||(n.height=parseFloat($g(t,"height"))),n.width||(n.width=parseFloat($g(t,"width"))),n}}function ky(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};const e=t.offsetWidth,n=t.offsetHeight;let r=0,i=0;for(;t.offsetParent&&t!==ht[l_.fullscreenElement];)r+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;return{left:r,top:i,width:e,height:n}}function V2(t,e){const n={x:0,y:0};if(Rs){let m=t;for(;m&&m.nodeName.toLowerCase()!=="html";){const y=$g(m,"transform");if(/^matrix/.test(y)){const x=y.slice(7,-1).split(/,\s/).map(Number);n.x+=x[4],n.y+=x[5]}else if(/^matrix3d/.test(y)){const x=y.slice(9,-1).split(/,\s/).map(Number);n.x+=x[12],n.y+=x[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&me.WebKitCSSMatrix){const x=me.getComputedStyle(m.assignedSlot.parentElement).transform,b=new me.WebKitCSSMatrix(x);n.x+=b.m41,n.y+=b.m42}m=m.parentNode||m.host}}const r={},i=ky(e.target),s=ky(t),o=s.width,u=s.height;let d=e.offsetY-(s.top-i.top),f=e.offsetX-(s.left-i.left);return e.changedTouches&&(f=e.changedTouches[0].pageX-s.left,d=e.changedTouches[0].pageY+s.top,Rs&&(f-=n.x,d-=n.y)),r.y=1-Math.max(0,Math.min(1,d/u)),r.x=Math.max(0,Math.min(1,f/o)),r}function UM(t){return Bu(t)&&t.nodeType===3}function H2(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function zM(t){return typeof t=="function"&&(t=t()),(Array.isArray(t)?t:[t]).map(e=>{if(typeof e=="function"&&(e=e()),h0(e)||UM(e))return e;if(typeof e=="string"&&/\S/.test(e))return ht.createTextNode(e)}).filter(e=>e)}function vD(t,e){return zM(e).forEach(n=>t.appendChild(n)),t}function $M(t,e){return vD(H2(t),e)}function Ry(t){return t.button===void 0&&t.buttons===void 0||t.button===0&&t.buttons===void 0||t.type==="mouseup"&&t.button===0&&t.buttons===0||t.type==="mousedown"&&t.button===0&&t.buttons===0?!0:!(t.button!==0||t.buttons!==1)}const hf=NM("querySelector"),VM=NM("querySelectorAll");function $g(t,e){if(!t||!e)return"";if(typeof me.getComputedStyle=="function"){let n;try{n=me.getComputedStyle(t)}catch{return""}return n?n.getPropertyValue(e)||n[e]:""}return""}function HM(t){[...ht.styleSheets].forEach(e=>{try{const n=[...e.cssRules].map(i=>i.cssText).join(""),r=ht.createElement("style");r.textContent=n,t.document.head.appendChild(r)}catch{const r=ht.createElement("link");r.rel="stylesheet",r.type=e.type,r.media=e.media.mediaText,r.href=e.href,t.document.head.appendChild(r)}})}var qM=Object.freeze({__proto__:null,isReal:f0,isEl:h0,isInFrame:OM,createEl:nn,textContent:xf,prependTo:lC,hasClass:fy,addClass:np,removeClass:z2,toggleClass:MM,setAttributes:jM,getAttributes:rf,getAttribute:LM,setAttribute:Ug,removeAttribute:$2,blockTextSelection:BM,unblockTextSelection:FM,getBoundingClientRect:zg,findPosition:ky,getPointerPosition:V2,isTextNode:UM,emptyEl:H2,normalizeContent:zM,appendContent:vD,insertContent:$M,isSingleLeftClick:Ry,$:hf,$$:VM,computedStyle:$g,copyStyleSheetsToWindow:HM});let GM=!1,uC;const lre=function(){if(uC.options.autoSetup===!1)return;const t=Array.prototype.slice.call(ht.getElementsByTagName("video")),e=Array.prototype.slice.call(ht.getElementsByTagName("audio")),n=Array.prototype.slice.call(ht.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&r.length>0)for(let i=0,s=r.length;i<s;i++){const o=r[i];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&uC(o);else{cC(1);break}}else GM||cC(1)};function cC(t,e){f0()&&(e&&(uC=e),me.setTimeout(lre,t))}function dC(){GM=!0,me.removeEventListener("load",dC)}f0()&&(ht.readyState==="complete"?dC():me.addEventListener("load",dC));const WM=function(t){const e=ht.createElement("style");return e.className=t,e},XM=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e};var Js=new WeakMap;const ure=3;let cre=ure;function Ao(){return cre++}function lR(t,e){if(!Js.has(t))return;const n=Js.get(t);n.handlers[e].length===0&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),Object.getOwnPropertyNames(n).length===0&&Js.delete(t)}function yD(t,e,n,r){n.forEach(function(i){t(e,i,r)})}function q2(t){if(t.fixed_)return t;function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){const r=t||me.event;t={};const i=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const s in r)i.includes(s)||s==="returnValue"&&r.preventDefault||(t[s]=r[s]);if(t.target||(t.target=t.srcElement||ht),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,t.clientX!==null&&t.clientX!==void 0){const s=ht.documentElement,o=ht.body;t.pageX=t.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)}t.which=t.charCode||t.keyCode,t.button!==null&&t.button!==void 0&&(t.button=t.button&1?0:t.button&4?1:t.button&2?2:0)}return t.fixed_=!0,t}let c1;const dre=function(){if(typeof c1!="boolean"){c1=!1;try{const t=Object.defineProperty({},"passive",{get(){c1=!0}});me.addEventListener("test",null,t),me.removeEventListener("test",null,t)}catch{}}return c1},fre=["touchstart","touchmove"];function Ga(t,e,n){if(Array.isArray(e))return yD(Ga,t,e,n);Js.has(t)||Js.set(t,{});const r=Js.get(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Ao()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(i,s){if(r.disabled)return;i=q2(i);const o=r.handlers[i.type];if(o){const u=o.slice(0);for(let d=0,f=u.length;d<f&&!i.isImmediatePropagationStopped();d++)try{u[d].call(t,i,s)}catch(m){Cn.error(m)}}}),r.handlers[e].length===1)if(t.addEventListener){let i=!1;dre()&&fre.indexOf(e)>-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function Ps(t,e,n){if(!Js.has(t))return;const r=Js.get(t);if(!r.handlers)return;if(Array.isArray(e))return yD(Ps,t,e,n);const i=function(o,u){r.handlers[u]=[],lR(o,u)};if(e===void 0){for(const o in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},o)&&i(t,o);return}const s=r.handlers[e];if(s){if(!n){i(t,e);return}if(n.guid)for(let o=0;o<s.length;o++)s[o].guid===n.guid&&s.splice(o--,1);lR(t,e)}}function p0(t,e,n){const r=Js.has(t)?Js.get(t):{},i=t.parentNode||t.ownerDocument;if(typeof e=="string"?e={type:e,target:t}:e.target||(e.target=t),e=q2(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&e.bubbles===!0)p0.call(null,i,e,n);else if(!i&&!e.defaultPrevented&&e.target&&e.target[e.type]){Js.has(e.target)||Js.set(e.target,{});const s=Js.get(e.target);e.target[e.type]&&(s.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),s.disabled=!1)}return!e.defaultPrevented}function G2(t,e,n){if(Array.isArray(e))return yD(G2,t,e,n);const r=function(){Ps(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Ao(),Ga(t,e,r)}function bD(t,e,n){const r=function(){Ps(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Ao(),Ga(t,e,r)}var hre=Object.freeze({__proto__:null,fixEvent:q2,on:Ga,off:Ps,trigger:p0,one:G2,any:bD});const Do=30,Er=function(t,e,n){e.guid||(e.guid=Ao());const r=e.bind(t);return r.guid=n?n+"_"+e.guid:e.guid,r},Uu=function(t,e){let n=me.performance.now();return function(...i){const s=me.performance.now();s-n>=e&&(t(...i),n=s)}},YM=function(t,e,n,r=me){let i;const s=()=>{r.clearTimeout(i),i=null},o=function(){const u=this,d=arguments;let f=function(){i=null,f=null,n||t.apply(u,d)};!i&&n&&t.apply(u,d),r.clearTimeout(i),i=r.setTimeout(f,e)};return o.cancel=s,o};var pre=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Do,bind_:Er,throttle:Uu,debounce:YM});let Yv;class Wa{on(e,n){const r=this.addEventListener;this.addEventListener=()=>{},Ga(this,e,n),this.addEventListener=r}off(e,n){Ps(this,e,n)}one(e,n){const r=this.addEventListener;this.addEventListener=()=>{},G2(this,e,n),this.addEventListener=r}any(e,n){const r=this.addEventListener;this.addEventListener=()=>{},bD(this,e,n),this.addEventListener=r}trigger(e){const n=e.type||e;typeof e=="string"&&(e={type:n}),e=q2(e),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](e),p0(this,e)}queueTrigger(e){Yv||(Yv=new Map);const n=e.type||e;let r=Yv.get(this);r||(r=new Map,Yv.set(this,r));const i=r.get(n);r.delete(n),me.clearTimeout(i);const s=me.setTimeout(()=>{r.delete(n),r.size===0&&(r=null,Yv.delete(this)),this.trigger(e)},0);r.set(n,s)}}Wa.prototype.allowedEvents_={};Wa.prototype.addEventListener=Wa.prototype.on;Wa.prototype.removeEventListener=Wa.prototype.off;Wa.prototype.dispatchEvent=Wa.prototype.trigger;const W2=t=>typeof t.name=="function"?t.name():typeof t.name=="string"?t.name:t.name_?t.name_:t.constructor&&t.constructor.name?t.constructor.name:typeof t,Uc=t=>t instanceof Wa||!!t.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof t[e]=="function"),mre=(t,e)=>{Uc(t)?e():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(e))},fC=t=>typeof t=="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length,p_=(t,e,n)=>{if(!t||!t.nodeName&&!Uc(t))throw new Error(`Invalid target for ${W2(e)}#${n}; must be a DOM node or evented object.`)},KM=(t,e,n)=>{if(!fC(t))throw new Error(`Invalid event type for ${W2(e)}#${n}; must be a non-empty string or array.`)},QM=(t,e,n)=>{if(typeof t!="function")throw new Error(`Invalid listener for ${W2(e)}#${n}; must be a function.`)},YT=(t,e,n)=>{const r=e.length<3||e[0]===t||e[0]===t.eventBusEl_;let i,s,o;return r?(i=t.eventBusEl_,e.length>=3&&e.shift(),[s,o]=e):(i=e[0],s=e[1],o=e[2]),p_(i,t,n),KM(s,t,n),QM(o,t,n),o=Er(t,o),{isTargetingSelf:r,target:i,type:s,listener:o}},Ih=(t,e,n,r)=>{p_(t,t,e),t.nodeName?hre[e](t,n,r):t[e](n,r)},gre={on(...t){const{isTargetingSelf:e,target:n,type:r,listener:i}=YT(this,t,"on");if(Ih(n,"on",r,i),!e){const s=()=>this.off(n,r,i);s.guid=i.guid;const o=()=>this.off("dispose",s);o.guid=i.guid,Ih(this,"on","dispose",s),Ih(n,"on","dispose",o)}},one(...t){const{isTargetingSelf:e,target:n,type:r,listener:i}=YT(this,t,"one");if(e)Ih(n,"one",r,i);else{const s=(...o)=>{this.off(n,r,s),i.apply(null,o)};s.guid=i.guid,Ih(n,"one",r,s)}},any(...t){const{isTargetingSelf:e,target:n,type:r,listener:i}=YT(this,t,"any");if(e)Ih(n,"any",r,i);else{const s=(...o)=>{this.off(n,r,s),i.apply(null,o)};s.guid=i.guid,Ih(n,"any",r,s)}},off(t,e,n){if(!t||fC(t))Ps(this.eventBusEl_,t,e);else{const r=t,i=e;p_(r,this,"off"),KM(i,this,"off"),QM(n,this,"off"),n=Er(this,n),this.off("dispose",n),r.nodeName?(Ps(r,i,n),Ps(r,"dispose",n)):Uc(r)&&(r.off(i,n),r.off("dispose",n))}},trigger(t,e){p_(this.eventBusEl_,this,"trigger");const n=t&&typeof t!="string"?t.type:t;if(!fC(n))throw new Error(`Invalid event type for ${W2(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return p0(this.eventBusEl_,t,e)}};function xD(t,e={}){const{eventBusKey:n}=e;if(n){if(!t[n].nodeName)throw new Error(`The eventBusKey "${n}" does not refer to an element.`);t.eventBusEl_=t[n]}else t.eventBusEl_=nn("span",{className:"vjs-event-bus"});return Object.assign(t,gre),t.eventedCallbacks&&t.eventedCallbacks.forEach(r=>{r()}),t.on("dispose",()=>{t.off(),[t,t.el_,t.eventBusEl_].forEach(function(r){r&&Js.has(r)&&Js.delete(r)}),me.setTimeout(()=>{t.eventBusEl_=null},0)}),t}const vre={state:{},setState(t){typeof t=="function"&&(t=t());let e;return mg(t,(n,r)=>{this.state[r]!==n&&(e=e||{},e[r]={from:this.state[r],to:n}),this.state[r]=n}),e&&Uc(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function ZM(t,e){return Object.assign(t,vre),t.state=Object.assign({},t.state,e),typeof t.handleStateChanged=="function"&&Uc(t)&&t.on("statechanged",t.handleStateChanged),t}const hy=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toLowerCase())},ri=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase())},JM=function(t,e){return ri(t)===ri(e)};var yre=Object.freeze({__proto__:null,toLowerCase:hy,toTitleCase:ri,titleCaseEquals:JM});class Ge{constructor(e,n,r){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=mr({},this.options_),n=this.options_=mr(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){const i=e&&e.id&&e.id()||"no_player";this.id_=`${i}_component_${Ao()}`}this.name_=n.name||null,n.el?this.el_=n.el:n.createEl!==!1&&(this.el_=this.createEl()),n.className&&this.el_&&n.className.split(" ").forEach(i=>this.addClass(i)),["on","off","one","any","trigger"].forEach(i=>{this[i]=void 0}),n.evented!==!1&&(xD(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),ZM(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,n.initChildren!==!1&&this.initChildren(),this.ready(r),n.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 n=this.children_.length-1;n>=0;n--)this.children_[n].dispose&&this.children_[n].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_=mr(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,n,r){return nn(e,n,r)}localize(e,n,r=e){const i=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),o=s&&s[i],u=i&&i.split("-")[0],d=s&&s[u];let f=r;return o&&o[e]?f=o[e]:d&&d[e]&&(f=d[e]),n&&(f=f.replace(/\{(\d+)\}/g,function(m,y){const x=n[y-1];let b=x;return typeof x>"u"&&(b=m),b})),f}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,i)=>r.concat(i),[]);let n=this;for(let r=0;r<e.length;r++)if(n=n.getChild(e[r]),!n||!n.getChild)return;return n}setIcon(e,n=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const r="http://www.w3.org/2000/svg",i=nn("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=ht.createElementNS(r,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");const o=ht.createElementNS(r,"use");return s.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),i.appendChild(s),this.iconIsSet_?n.replaceChild(i,n.querySelector(".vjs-icon-placeholder")):n.appendChild(i),this.iconIsSet_=!0,i}addChild(e,n={},r=this.children_.length){let i,s;if(typeof e=="string"){s=ri(e);const o=n.componentClass||s;n.name=s;const u=Ge.getComponent(o);if(!u)throw new Error(`Component ${o} does not exist`);if(typeof u!="function")return null;i=new u(this.player_||this,n)}else i=e;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,typeof i.id=="function"&&(this.childIndex_[i.id()]=i),s=s||i.name&&ri(i.name()),s&&(this.childNameIndex_[s]=i,this.childNameIndex_[hy(s)]=i),typeof i.el=="function"&&i.el()){let o=null;this.children_[r+1]&&(this.children_[r+1].el_?o=this.children_[r+1].el_:h0(this.children_[r+1])&&(o=this.children_[r+1])),this.contentEl().insertBefore(i.el(),o)}return i}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let n=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){n=!0,this.children_.splice(i,1);break}if(!n)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[ri(e.name())]=null,this.childNameIndex_[hy(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 n=this.options_,r=o=>{const u=o.name;let d=o.opts;if(n[u]!==void 0&&(d=n[u]),d===!1)return;d===!0&&(d={}),d.playerOptions=this.options_.playerOptions;const f=this.addChild(u,d);f&&(this[u]=f)};let i;const s=Ge.getComponent("Tech");Array.isArray(e)?i=e:i=Object.keys(e),i.concat(Object.keys(this.options_).filter(function(o){return!i.some(function(u){return typeof u=="string"?o===u:o===u.name})})).map(o=>{let u,d;return typeof o=="string"?(u=o,d=e[u]||this.options_[u]||{}):(u=o.name,d=o),{name:u,opts:d}}).filter(o=>{const u=Ge.getComponent(o.opts.componentClass||ri(o.name));return u&&!s.isTech(u)}).forEach(r)}}buildCSSClass(){return""}ready(e,n=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}n?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(n){n.call(this)},this),this.trigger("ready")},1)}$(e,n){return hf(e,n||this.contentEl())}$$(e,n){return VM(e,n||this.contentEl())}hasClass(e){return fy(this.el_,e)}addClass(...e){np(this.el_,...e)}removeClass(...e){z2(this.el_,...e)}toggleClass(e,n){MM(this.el_,e,n)}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 LM(this.el_,e)}setAttribute(e,n){Ug(this.el_,e,n)}removeAttribute(e){$2(this.el_,e)}width(e,n){return this.dimension("width",e,n)}height(e,n){return this.dimension("height",e,n)}dimensions(e,n){this.width(e,!0),this.height(n)}dimension(e,n,r){if(n!==void 0){(n===null||n!==n)&&(n=0),(""+n).indexOf("%")!==-1||(""+n).indexOf("px")!==-1?this.el_.style[e]=n:n==="auto"?this.el_.style[e]="":this.el_.style[e]=n+"px",r||this.trigger("componentresize");return}if(!this.el_)return 0;const i=this.el_.style[e],s=i.indexOf("px");return parseInt(s!==-1?i.slice(0,s):this.el_["offset"+ri(e)],10)}currentDimension(e){let n=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(n=$g(this.el_,e),n=parseFloat(n),n===0||isNaN(n)){const r=`offset${ri(e)}`;n=this.el_[r]}return n}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(),n={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:n,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,n=null;const r=10,i=200;let s;this.on("touchstart",function(u){u.touches.length===1&&(n={pageX:u.touches[0].pageX,pageY:u.touches[0].pageY},e=me.performance.now(),s=!0)}),this.on("touchmove",function(u){if(u.touches.length>1)s=!1;else if(n){const d=u.touches[0].pageX-n.pageX,f=u.touches[0].pageY-n.pageY;Math.sqrt(d*d+f*f)>r&&(s=!1)}});const o=function(){s=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(u){n=null,s===!0&&me.performance.now()-e<i&&(u.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Er(this.player(),this.player().reportUserActivity);let n;this.on("touchstart",function(){e(),this.clearInterval(n),n=this.setInterval(e,250)});const r=function(i){e(),this.clearInterval(n)};this.on("touchmove",e),this.on("touchend",r),this.on("touchcancel",r)}setTimeout(e,n){var r;return e=Er(this,e),this.clearTimersOnDispose_(),r=me.setTimeout(()=>{this.setTimeoutIds_.has(r)&&this.setTimeoutIds_.delete(r),e()},n),this.setTimeoutIds_.add(r),r}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),me.clearTimeout(e)),e}setInterval(e,n){e=Er(this,e),this.clearTimersOnDispose_();const r=me.setInterval(e,n);return this.setIntervalIds_.add(r),r}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),me.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var n;return e=Er(this,e),n=me.requestAnimationFrame(()=>{this.rafIds_.has(n)&&this.rafIds_.delete(n),e()}),this.rafIds_.add(n),n}requestNamedAnimationFrame(e,n){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),n=Er(this,n);const r=this.requestAnimationFrame(()=>{n(),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),me.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,n])=>{this[e].forEach((r,i)=>this[n](i))}),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 n(s){const o=me.getComputedStyle(s,null),u=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(u)}function r(s){return!(!n(s.parentElement)||!n(s)||s.style.opacity==="0"||me.getComputedStyle(s).height==="0px"||me.getComputedStyle(s).width==="0px")}function i(s){if(s.offsetWidth+s.offsetHeight+s.getBoundingClientRect().height+s.getBoundingClientRect().width===0)return!1;const o={x:s.getBoundingClientRect().left+s.offsetWidth/2,y:s.getBoundingClientRect().top+s.offsetHeight/2};if(o.x<0||o.x>(ht.documentElement.clientWidth||me.innerWidth)||o.y<0||o.y>(ht.documentElement.clientHeight||me.innerHeight))return!1;let u=ht.elementFromPoint(o.x,o.y);for(;u;){if(u===s)return!0;if(u.parentNode)u=u.parentNode;else return!1}}return e||(e=this.el()),!!(i(e)&&r(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,n){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const r=Ge.getComponent("Tech"),i=r&&r.isTech(n),s=Ge===n||Ge.prototype.isPrototypeOf(n.prototype);if(i||!s){let u;throw i?u="techs must be registered using Tech.registerTech()":u="must be a Component subclass",new Error(`Illegal component, "${e}"; ${u}.`)}e=ri(e),Ge.components_||(Ge.components_={});const o=Ge.getComponent("Player");if(e==="Player"&&o&&o.players){const u=o.players,d=Object.keys(u);if(u&&d.length>0){for(let f=0;f<d.length;f++)if(u[d[f]]!==null)throw new Error("Can not register Player component after player has been created.")}}return Ge.components_[e]=n,Ge.components_[hy(e)]=n,n}static getComponent(e){if(!(!e||!Ge.components_))return Ge.components_[e]}}Ge.registerComponent("Component",Ge);function bre(t,e,n){if(typeof e!="number"||e<0||e>n)throw new Error(`Failed to execute '${t}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${n}).`)}function uR(t,e,n,r){return bre(t,r,n.length-1),n[r][e]}function KT(t){let e;return t===void 0||t.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:t.length,start:uR.bind(null,"start",0,t),end:uR.bind(null,"end",1,t)},me.Symbol&&me.Symbol.iterator&&(e[me.Symbol.iterator]=()=>(t||[]).values()),e}function Sl(t,e){return Array.isArray(t)?KT(t):t===void 0||e===void 0?KT():KT([[t,e]])}const ej=function(t,e){t=t<0?0:t;let n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||o>0?i+":":"",r=((i||s>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n};let _D=ej;function tj(t){_D=t}function nj(){_D=ej}function cp(t,e=t){return _D(t,e)}var xre=Object.freeze({__proto__:null,createTimeRanges:Sl,createTimeRange:Sl,setFormatTime:tj,resetFormatTime:nj,formatTime:cp});function rj(t,e){let n=0,r,i;if(!e)return 0;(!t||!t.length)&&(t=Sl(0,0));for(let s=0;s<t.length;s++)r=t.start(s),i=t.end(s),i>e&&(i=e),n+=i-r;return n/e}function Jr(t){if(t instanceof Jr)return t;typeof t=="number"?this.code=t:typeof t=="string"?this.message=t:Bu(t)&&(typeof t.code=="number"&&(this.code=t.code),Object.assign(this,t)),this.message||(this.message=Jr.defaultMessages[this.code]||"")}Jr.prototype.code=0;Jr.prototype.message="";Jr.prototype.status=null;Jr.prototype.metadata=null;Jr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Jr.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."};Jr.MEDIA_ERR_CUSTOM=0;Jr.prototype.MEDIA_ERR_CUSTOM=0;Jr.MEDIA_ERR_ABORTED=1;Jr.prototype.MEDIA_ERR_ABORTED=1;Jr.MEDIA_ERR_NETWORK=2;Jr.prototype.MEDIA_ERR_NETWORK=2;Jr.MEDIA_ERR_DECODE=3;Jr.prototype.MEDIA_ERR_DECODE=3;Jr.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Jr.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Jr.MEDIA_ERR_ENCRYPTED=5;Jr.prototype.MEDIA_ERR_ENCRYPTED=5;function py(t){return t!=null&&typeof t.then=="function"}function Ru(t){py(t)&&t.then(null,e=>{})}const hC=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((n,r,i)=>(t[r]&&(n[r]=t[r]),n),{cues:t.cues&&Array.prototype.map.call(t.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})})},_re=function(t){const e=t.$$("track"),n=Array.prototype.map.call(e,i=>i.track);return Array.prototype.map.call(e,function(i){const s=hC(i.track);return i.src&&(s.src=i.src),s}).concat(Array.prototype.filter.call(t.textTracks(),function(i){return n.indexOf(i)===-1}).map(hC))},Sre=function(t,e){return t.forEach(function(n){const r=e.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(i=>r.addCue(i))}),e.textTracks()};var pC={textTracksToJson:_re,jsonToTextTracks:Sre,trackToJson:hC};const QT="vjs-modal-dialog";class m0 extends Ge{constructor(e,n){super(e,n),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_=nn("div",{className:`${QT}-content`},{role:"document"}),this.descEl_=nn("p",{className:`${QT}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),xf(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`${QT} 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 n=this.closeable_=!!e;let r=this.getChild("closeButton");if(n&&!r){const i=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(r,"close",this.close_)}!n&&r&&(this.off(r,"close",this.close_),this.removeChild(r),r.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const n=this.contentEl(),r=n.parentNode,i=n.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(n),this.empty(),$M(n,e),this.trigger("modalfill"),i?r.insertBefore(n,i):r.appendChild(n);const s=this.getChild("closeButton");s&&r.appendChild(s.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),H2(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=ht.activeElement,n=this.player_.el_;this.previouslyActiveEl_=null,(n.contains(e)||n===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 n=this.focusableEls_(),r=this.el_.querySelector(":focus");let i;for(let s=0;s<n.length;s++)if(r===n[s]){i=s;break}ht.activeElement===this.el_&&(i=0),e.shiftKey&&i===0?(n[n.length-1].focus(),e.preventDefault()):!e.shiftKey&&i===n.length-1&&(n[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,n=>(n instanceof me.HTMLAnchorElement||n instanceof me.HTMLAreaElement)&&n.hasAttribute("href")||(n instanceof me.HTMLInputElement||n instanceof me.HTMLSelectElement||n instanceof me.HTMLTextAreaElement||n instanceof me.HTMLButtonElement)&&!n.hasAttribute("disabled")||n instanceof me.HTMLIFrameElement||n instanceof me.HTMLObjectElement||n instanceof me.HTMLEmbedElement||n.hasAttribute("tabindex")&&n.getAttribute("tabindex")!==-1||n.hasAttribute("contenteditable"))}}m0.prototype.options_={pauseOnOpen:!0,temporary:!0};Ge.registerComponent("ModalDialog",m0);class dp extends Wa{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let n=0;n<e.length;n++)this.addTrack(e[n])}addTrack(e){const n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get(){return this.tracks_[n]}}),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})},Uc(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let n;for(let r=0,i=this.length;r<i;r++)if(this[r]===e){n=this[r],n.off&&n.off(),this.tracks_.splice(r,1);break}n&&this.trigger({track:n,type:"removetrack",target:this})}getTrackById(e){let n=null;for(let r=0,i=this.length;r<i;r++){const s=this[r];if(s.id===e){n=s;break}}return n}}dp.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in dp.prototype.allowedEvents_)dp.prototype["on"+t]=null;const ZT=function(t,e){for(let n=0;n<t.length;n++)!Object.keys(t[n]).length||e.id===t[n].id||(t[n].enabled=!1)};class ij extends dp{constructor(e=[]){for(let n=e.length-1;n>=0;n--)if(e[n].enabled){ZT(e,e[n]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&ZT(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,ZT(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 JT=function(t,e){for(let n=0;n<t.length;n++)!Object.keys(t[n]).length||e.id===t[n].id||(t[n].selected=!1)};class sj extends dp{constructor(e=[]){for(let n=e.length-1;n>=0;n--)if(e[n].selected){JT(e,e[n]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let n=0;n<this.length;n++)if(this[n].selected)return n;return-1},set(){}})}addTrack(e){e.selected&&JT(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,JT(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 SD extends dp{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 Tre{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let n=0,r=e.length;n<r;n++)this.addTrackElement_(e[n])}addTrackElement_(e){const n=this.trackElements_.length;""+n in this||Object.defineProperty(this,n,{get(){return this.trackElements_[n]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let n;for(let r=0,i=this.trackElements_.length;r<i;r++)if(e===this.trackElements_[r].track){n=this.trackElements_[r];break}return n}removeTrackElement_(e){for(let n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n]){this.trackElements_[n].track&&typeof this.trackElements_[n].track.off=="function"&&this.trackElements_[n].track.off(),typeof this.trackElements_[n].off=="function"&&this.trackElements_[n].off(),this.trackElements_.splice(n,1);break}}}class m_{constructor(e){m_.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const n=this.length||0;let r=0;const i=e.length;this.cues_=e,this.length_=e.length;const s=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(n<i)for(r=n;r<i;r++)s.call(this,r)}getCueById(e){let n=null;for(let r=0,i=this.length;r<i;r++){const s=this[r];if(s.id===e){n=s;break}}return n}}const wre={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Cre={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ere={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},cR={disabled:"disabled",hidden:"hidden",showing:"showing"};class TD extends Wa{constructor(e={}){super();const n={id:e.id||"vjs_track_"+Ao(),kind:e.kind||"",language:e.language||""};let r=e.label||"";for(const i in n)Object.defineProperty(this,i,{get(){return n[i]},set(){}});Object.defineProperty(this,"label",{get(){return r},set(i){i!==r&&(r=i,this.trigger("labelchange"))}})}}const wD=function(t){return new URL(t,ht.baseURI)},aj=function(t){return new URL(t,ht.baseURI).href},CD=function(t){if(typeof t=="string"){const n=t.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return n?n[1].toLowerCase():""}return""},X2=function(t,e=me.location){return wD(t).origin!==e.origin};var Are=Object.freeze({__proto__:null,parseUrl:wD,getAbsoluteURL:aj,getFileExtension:CD,isCrossOrigin:X2});const dR=function(t,e){const n=new me.WebVTT.Parser(me,me.vttjs,me.WebVTT.StringDecoder()),r=[];n.oncue=function(i){e.addCue(i)},n.onparsingerror=function(i){r.push(i)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(me.console&&me.console.groupCollapsed&&me.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),r.forEach(i=>Cn.error(i)),me.console&&me.console.groupEnd&&me.console.groupEnd()),n.flush()},fR=function(t,e){const n={uri:t},r=X2(t);r&&(n.cors=r);const i=e.tech_.crossOrigin()==="use-credentials";i&&(n.withCredentials=i),lM(n,Er(this,function(s,o,u){if(s)return Cn.error(s,o);e.loaded_=!0,typeof me.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],d=>{if(d.type==="vttjserror"){Cn.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return dR(u,e)}):dR(u,e)}))};class nb extends TD{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const n=mr(e,{kind:Ere[e.kind]||"subtitles",language:e.language||e.srclang||""});let r=cR[n.mode]||"disabled";const i=n.default;(n.kind==="metadata"||n.kind==="chapters")&&(r="hidden"),super(n),this.tech_=n.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const s=new m_(this.cues_),o=new m_(this.activeCues_);let u=!1;this.timeupdateHandler=Er(this,function(f={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const d=()=>{this.stopTracking()};this.tech_.one("dispose",d),r!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return i},set(){}},mode:{get(){return r},set(f){cR[f]&&r!==f&&(r=f,!this.preload_&&r!=="disabled"&&this.cues.length===0&&fR(this.src,this),this.stopTracking(),r!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const f=this.tech_.currentTime(),m=[];for(let y=0,x=this.cues.length;y<x;y++){const b=this.cues[y];b.startTime<=f&&b.endTime>=f&&m.push(b)}if(u=!1,m.length!==this.activeCues_.length)u=!0;else for(let y=0;y<m.length;y++)this.activeCues_.indexOf(m[y])===-1&&(u=!0);return this.activeCues_=m,o.setCues_(this.activeCues_),o},set(){}}}),n.src?(this.src=n.src,this.preload_||(this.loaded_=!0),(this.preload_||n.kind!=="subtitles"&&n.kind!=="captions")&&fR(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 n=e;if(!("getCueAsHTML"in n)){n=new me.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in n||(n[i]=e[i]);n.id=e.id,n.originalCue_=e}const r=this.tech_.textTracks();for(let i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)}toJSON(){return pC.trackToJson(this)}removeCue(e){let n=this.cues_.length;for(;n--;){const r=this.cues_[n];if(r===e||r.originalCue_&&r.originalCue_===e){this.cues_.splice(n,1),this.cues.setCues_(this.cues_);break}}}}nb.prototype.allowedEvents_={cuechange:"cuechange"};class oj extends TD{constructor(e={}){const n=mr(e,{kind:Cre[e.kind]||""});super(n);let r=!1;Object.defineProperty(this,"enabled",{get(){return r},set(i){typeof i!="boolean"||i===r||(r=i,this.trigger("enabledchange"))}}),n.enabled&&(this.enabled=n.enabled),this.loaded_=!0}}class lj extends TD{constructor(e={}){const n=mr(e,{kind:wre[e.kind]||""});super(n);let r=!1;Object.defineProperty(this,"selected",{get(){return r},set(i){typeof i!="boolean"||i===r||(r=i,this.trigger("selectedchange"))}}),n.selected&&(this.selected=n.selected)}}class Hc extends Wa{constructor(e={}){super();let n;const r=new nb(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 n}},track:{get(){return r}}}),n=Hc.NONE,r.addEventListener("loadeddata",()=>{n=Hc.LOADED,this.trigger({type:"load",target:this})})}}Hc.prototype.allowedEvents_={load:"load"};Hc.NONE=0;Hc.LOADING=1;Hc.LOADED=2;Hc.ERROR=3;const Co={audio:{ListClass:ij,TrackClass:oj,capitalName:"Audio"},video:{ListClass:sj,TrackClass:lj,capitalName:"Video"},text:{ListClass:SD,TrackClass:nb,capitalName:"Text"}};Object.keys(Co).forEach(function(t){Co[t].getterName=`${t}Tracks`,Co[t].privateName=`${t}Tracks_`});const Vg={remoteText:{ListClass:SD,TrackClass:nb,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Tre,TrackClass:Hc,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Zs=Object.assign({},Co,Vg);Vg.names=Object.keys(Vg);Co.names=Object.keys(Co);Zs.names=[].concat(Vg.names).concat(Co.names);function Dre(t,e,n,r,i={}){const s=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;const o=new Zs.text.TrackClass(i);return s.addTrack(o),o}class fn extends Ge{constructor(e={},n=function(){}){e.reportTouchActivity=!1,super(null,e,n),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}),Zs.names.forEach(r=>{const i=Zs[r];e&&e[i.getterName]&&(this[i.privateName]=e[i.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 Zs.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(Er(this,function(){const n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress"),this.bufferedPercent_=n,n===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Sl(0,0)}bufferedPercent(){return rj(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(Co.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(n=>{const r=this[`${n}Tracks`]()||[];let i=r.length;for(;i--;){const s=r[i];n==="text"&&this.removeRemoteTextTrack(s),r.removeTrack(s)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let n=e.length;for(;n--;){const r=e[n];this.removeRemoteTextTrack(r)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Jr(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Sl(0,0):Sl()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Co.names.forEach(e=>{const n=Co[e],r=()=>{this.trigger(`${e}trackchange`)},i=this[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),this.on("dispose",()=>{i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})}addWebVttScript_(){if(!me.WebVTT)if(ht.body.contains(this.el())){if(!this.options_["vtt.js"]&&Fg(j4)&&Object.keys(j4).length>0){this.trigger("vttjsloaded");return}const e=ht.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}),me.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),n=this.remoteTextTracks(),r=u=>e.addTrack(u.track),i=u=>e.removeTrack(u.track);n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),o=()=>{s();for(let u=0;u<e.length;u++){const d=e[u];d.removeEventListener("cuechange",s),d.mode==="showing"&&d.addEventListener("cuechange",s)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let u=0;u<e.length;u++)e[u].removeEventListener("cuechange",s)})}addTextTrack(e,n,r){if(!e)throw new Error("TextTrack kind is required but was not provided");return Dre(this,e,n,r)}createRemoteTextTrack(e){const n=mr(e,{tech:this});return new Vg.remoteTextEl.TrackClass(n)}addRemoteTextTrack(e={},n){const r=this.createRemoteTextTrack(e);return typeof n!="boolean"&&(n=!1),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),n===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(r.track)),r}removeRemoteTextTrack(e){const n=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(n),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const n=Ao();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",()=>{this.queuedHanders_.has(n)&&(this.queuedHanders_.delete(n),e())})):this.requestNamedAnimationFrame(n,e),n}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,n){return fn.canPlayType(e.type)}static isTech(e){return e.prototype instanceof fn||e instanceof fn||e===fn}static registerTech(e,n){if(fn.techs_||(fn.techs_={}),!fn.isTech(n))throw new Error(`Tech ${e} must be a Tech`);if(!fn.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!fn.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ri(e),fn.techs_[e]=n,fn.techs_[hy(e)]=n,e!=="Tech"&&fn.defaultTechOrder_.push(e),n}static getTech(e){if(e){if(fn.techs_&&fn.techs_[e])return fn.techs_[e];if(e=ri(e),me&&me.videojs&&me.videojs[e])return Cn.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),me.videojs[e]}}}Zs.names.forEach(function(t){const e=Zs[t];fn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});fn.prototype.featuresVolumeControl=!0;fn.prototype.featuresMuteControl=!0;fn.prototype.featuresFullscreenResize=!1;fn.prototype.featuresPlaybackRate=!1;fn.prototype.featuresProgressEvents=!1;fn.prototype.featuresSourceset=!1;fn.prototype.featuresTimeupdateEvents=!1;fn.prototype.featuresNativeTextTracks=!1;fn.prototype.featuresVideoFrameCallback=!1;fn.withSourceHandlers=function(t){t.registerSourceHandler=function(n,r){let i=t.sourceHandlers;i||(i=t.sourceHandlers=[]),r===void 0&&(r=i.length),i.splice(r,0,n)},t.canPlayType=function(n){const r=t.sourceHandlers||[];let i;for(let s=0;s<r.length;s++)if(i=r[s].canPlayType(n),i)return i;return""},t.selectSourceHandler=function(n,r){const i=t.sourceHandlers||[];let s;for(let o=0;o<i.length;o++)if(s=i[o].canHandleSource(n,r),s)return i[o];return null},t.canPlaySource=function(n,r){const i=t.selectSourceHandler(n,r);return i?i.canHandleSource(n,r):""},["seekable","seeking","duration"].forEach(function(n){const r=this[n];typeof r=="function"&&(this[n]=function(){return this.sourceHandler_&&this.sourceHandler_[n]?this.sourceHandler_[n].apply(this.sourceHandler_,arguments):r.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(n){let r=t.selectSourceHandler(n,this.options_);r||(t.nativeSourceHandler?r=t.nativeSourceHandler:Cn.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),r!==t.nativeSourceHandler&&(this.currentSource_=n),this.sourceHandler_=r.handleSource(n,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},t.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)}};Ge.registerComponent("Tech",fn);fn.registerTech("Tech",fn);fn.defaultTechOrder_=[];const rp={},g_={},v_={};function kre(t,e){rp[t]=rp[t]||[],rp[t].push(e)}function Rre(t,e,n){t.setTimeout(()=>Bh(e,rp[e.type],n,t),1)}function Pre(t,e){t.forEach(n=>n.setTech&&n.setTech(e))}function Ire(t,e,n){return t.reduceRight(ED(n),e[n]())}function Ore(t,e,n,r){return e[n](t.reduce(ED(n),r))}function hR(t,e,n,r=null){const i="call"+ri(n),s=t.reduce(ED(i),r),o=s===v_,u=o?null:e[n](s);return jre(t,n,u,o),u}const Nre={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Mre={setCurrentTime:1,setMuted:1,setVolume:1},pR={play:1,pause:1};function ED(t){return(e,n)=>e===v_?v_:n[t]?n[t](e):e}function jre(t,e,n,r){for(let i=t.length-1;i>=0;i--){const s=t[i];s[e]&&s[e](r,n)}}function Lre(t){g_.hasOwnProperty(t.id())&&delete g_[t.id()]}function Bre(t,e){const n=g_[t.id()];let r=null;if(n==null)return r=e(t),g_[t.id()]=[[e,r]],r;for(let i=0;i<n.length;i++){const[s,o]=n[i];s===e&&(r=o)}return r===null&&(r=e(t),n.push([e,r])),r}function Bh(t={},e=[],n,r,i=[],s=!1){const[o,...u]=e;if(typeof o=="string")Bh(t,rp[o],n,r,i,s);else if(o){const d=Bre(r,o);if(!d.setSource)return i.push(d),Bh(t,u,n,r,i,s);d.setSource(Object.assign({},t),function(f,m){if(f)return Bh(t,u,n,r,i,s);i.push(d),Bh(m,t.type===m.type?u:rp[m.type],n,r,i,s)})}else u.length?Bh(t,u,n,r,i,s):s?n(t,i):Bh(t,rp["*"],n,r,i,!0)}const Fre={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"},y_=function(t=""){const e=CD(t);return Fre[e.toLowerCase()]||""},Ure=(t,e)=>{if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;const n=t.cache_.sources.filter(i=>i.src===e);if(n.length)return n[0].type;const r=t.$$("source");for(let i=0;i<r.length;i++){const s=r[i];if(s.type&&s.src&&s.src===e)return s.type}return y_(e)},uj=function(t){if(Array.isArray(t)){let e=[];t.forEach(function(n){n=uj(n),Array.isArray(n)?e=e.concat(n):Bu(n)&&e.push(n)}),t=e}else typeof t=="string"&&t.trim()?t=[mR({src:t})]:Bu(t)&&typeof t.src=="string"&&t.src&&t.src.trim()?t=[mR(t)]:t=[];return t};function mR(t){if(!t.type){const e=y_(t.src);e&&(t.type=e)}return t}var zre=`<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 gR=d_?10009:f_?461:8,eg={codes:{play:415,pause:19,ff:417,rw:412,back:gR},names:{415:"play",19:"pause",417:"ff",412:"rw",[gR]:"back"},isEventKey(t,e){return e=e.toLowerCase(),!!(this.names[t.keyCode]&&this.names[t.keyCode]===e)},getEventName(t){if(this.names[t.keyCode])return this.names[t.keyCode];if(this.codes[t.code]){const e=this.codes[t.code];return this.names[e]}return null}},vR=5;class $re extends Wa{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 n=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(n.key)){if(this.isPaused_)return;n.preventDefault();const r=n.key.substring(5).toLowerCase();this.move(r)}else if(eg.isEventKey(n,"play")||eg.isEventKey(n,"pause")||eg.isEventKey(n,"ff")||eg.isEventKey(n,"rw")){n.preventDefault();const r=eg.getEventName(n);this.performMediaAction_(r)}else eg.isEventKey(n,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(n.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()+vR);break;case"rw":this.userSeek_(this.player_.currentTime()-vR);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 n=e.relatedTarget;let r=null;const i=this.getCurrentComponent(e.target);n&&(r=!!n.closest(".video-js"),n.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!r||!n)&&(i&&i.name()==="CloseButton"?this.refocusComponent():(this.pause(),i&&i.el()&&(this.lastFocusedComponent_=i)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,n=[];function r(i){for(const s of i)s.hasOwnProperty("el_")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&n.push(s),s.hasOwnProperty("children_")&&s.children_.length>0&&r(s.children_)}return e.children_.forEach(i=>{if(i.hasOwnProperty("el_"))if(i.getIsFocusable&&i.getIsAvailableToBeFocused&&i.getIsFocusable()&&i.getIsAvailableToBeFocused(i.el())){n.push(i);return}else i.hasOwnProperty("children_")&&i.children_.length>0?r(i.children_):i.hasOwnProperty("items")&&i.items.length>0?r(i.items):this.findSuitableDOMChild(i)&&n.push(i);if(i.name_==="ErrorDisplay"&&i.opened_){const s=i.el_.querySelector(".vjs-errors-ok-button-container");s&&s.querySelectorAll("button").forEach((u,d)=>{n.push({name:()=>"ModalButton"+(d+1),el:()=>u,getPositions:()=>{const f=u.getBoundingClientRect(),m={x:f.x,y:f.y,width:f.width,height:f.height,top:f.top,right:f.right,bottom:f.bottom,left:f.left},y={x:f.left+f.width/2,y:f.top+f.height/2,width:0,height:0,top:f.top+f.height/2,right:f.left+f.width/2,bottom:f.top+f.height/2,left:f.left+f.width/2};return{boundingClientRect:m,center:y}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:f=>!0,focus:()=>u.focus()})})}}),this.focusableComponents=n,this.focusableComponents}findSuitableDOMChild(e){function n(r){if(e.getIsFocusable(r)&&e.getIsAvailableToBeFocused(r))return r;for(let i=0;i<r.children.length;i++){const s=r.children[i],o=n(s);if(o)return o}return null}return e.el()?n(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const n=e||document.activeElement;if(this.focusableComponents.length){for(const r of this.focusableComponents)if(r.el()===n)return r}}add(e){const n=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&n.push(e),this.focusableComponents=n,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let n=0;n<this.focusableComponents.length;n++)if(this.focusableComponents[n].name()===e.name()){this.focusableComponents.splice(n,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 n=this.getCurrentComponent();if(!n)return;const r=n.getPositions(),i=this.focusableComponents.filter(o=>o!==n&&this.isInDirection_(r.boundingClientRect,o.getPositions().boundingClientRect,e)),s=this.findBestCandidate_(r.center,i,e);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:n})}findBestCandidate_(e,n,r){let i=1/0,s=null;for(const o of n){const u=o.getPositions().center,d=this.calculateDistance_(e,u,r);d<i&&(i=d,s=o)}return s}isInDirection_(e,n,r){switch(r){case"right":return n.left>=e.right;case"left":return n.right<=e.left;case"down":return n.top>=e.bottom;case"up":return n.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,n,r){const i=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);let o;switch(r){case"right":case"left":o=i+s*100;break;case"up":o=s*2+i*.5;break;case"down":o=s*5+i;break;default:o=i+s}return o}searchForTrackSelect_(){const e=this;for(const n of e.updateFocusableComponents())if(n.constructor.name==="TextTrackSelect"){e.focus(n);break}}}class Vre extends Ge{constructor(e,n,r){const i=mr({createEl:!1},n);if(super(e,i,r),!n.playerOptions.sources||n.playerOptions.sources.length===0)for(let s=0,o=n.playerOptions.techOrder;s<o.length;s++){const u=ri(o[s]);let d=fn.getTech(u);if(u||(d=Ge.getComponent(u)),d&&d.isSupported()){e.loadTech_(u);break}}else e.src(n.playerOptions.sources)}}Ge.registerComponent("MediaLoader",Vre);class Y2 extends Ge{constructor(e,n){super(e,n),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",n={},r={}){n=Object.assign({className:this.buildCSSClass(),tabIndex:0},n),e==="button"&&Cn.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_=n.tabIndex;const i=nn(e,n,r);return this.player_.options_.experimentalSvgIcons||i.appendChild(nn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=nn("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,n=this.el()){if(e===void 0)return this.controlText_||"Need Text";const r=this.localize(e);this.controlText_=e,xf(this.controlTextEl_,r),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&n.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)}}Ge.registerComponent("ClickableComponent",Y2);class mC extends Y2{constructor(e,n){super(e,n),this.update(),this.update_=r=>this.update(r),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return nn("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 n=this.player().poster();this.setSrc(n),n?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(nn("picture",{className:"vjs-poster",tabIndex:-1},{},nn("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()?Ru(this.player_.play()):this.player_.pause())}}mC.prototype.crossorigin=mC.prototype.crossOrigin;Ge.registerComponent("PosterImage",mC);const xo="#222",yR="#ccc",Hre={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 ew(t,e){let n;if(t.length===4)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else if(t.length===7)n=t.slice(1);else throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Cu(t,e,n){try{t.style[e]=n}catch{return}}function bR(t){return t?`${t}px`:""}class qre extends Ge{constructor(e,n,r){super(e,n,r);const i=o=>this.updateDisplay(o),s=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("useractive",i),e.on("userinactive",i),e.on("texttrackchange",i),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(Er(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",s),e.on("playerresize",s);const o=me.screen.orientation||me,u=me.screen.orientation?"change":"orientationchange";o.addEventListener(u,s),e.on("dispose",()=>o.removeEventListener(u,s));const d=this.options_.playerOptions.tracks||[];for(let f=0;f<d.length;f++)this.player_.addRemoteTextTrack(d[f],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},n=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage;let i,s,o;for(let u=0;u<n.length;u++){const d=n[u];r&&r.enabled&&r.language&&r.language===d.language&&d.kind in e?d.kind===r.kind?o=d:o||(o=d):r&&!r.enabled?(o=null,i=null,s=null):d.default&&(d.kind==="descriptions"&&!i?i=d:d.kind in e&&!s&&(s=d))}o?o.mode="showing":s?s.mode="showing":i&&(i.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 me.WebVTT=="function"&&me.WebVTT.processCues(me,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),n=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),n){const o=[];for(let u=0;u<e.length;++u){const d=e[u];d.mode==="showing"&&o.push(d)}this.updateForTrack(o);return}let r=null,i=null,s=e.length;for(;s--;){const o=e[s];o.mode==="showing"&&(o.kind==="descriptions"?r=o:i=o)}if(i?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):r&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(r)),!me.CSS.supports("inset","10px")){const o=this.el_,u=o.querySelectorAll(".vjs-text-track-cue"),d=this.player_.controlBar.el_.getBoundingClientRect().height,f=this.player_.el_.getBoundingClientRect().height;o.style="",Cu(o,"position","relative"),Cu(o,"height",f-d+"px"),Cu(o,"top","unset"),h_?Cu(o,"bottom",f+"px"):Cu(o,"bottom","0px"),u.length>0&&u.forEach(m=>{if(m.style.inset){const y=m.style.inset.split(" ");y.length===3&&Object.assign(m.style,{top:y[0],right:y[1],bottom:y[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!me.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),n=this.player_.currentHeight(),r=e/n,i=this.player_.videoWidth()/this.player_.videoHeight();let s=0,o=0;Math.abs(r-i)>.1&&(r>i?s=Math.round((e-n*i)/2):o=Math.round((n-e/i)/2)),Cu(this.el_,"insetInline",bR(s)),Cu(this.el_,"insetBlock",bR(o))}updateDisplayState(e){const n=this.player_.textTrackSettings.getValues(),r=e.activeCues;let i=r.length;for(;i--;){const s=r[i];if(!s)continue;const o=s.displayState;if(n.color&&(o.firstChild.style.color=n.color),n.textOpacity&&Cu(o.firstChild,"color",ew(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(o.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Cu(o.firstChild,"backgroundColor",ew(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Cu(o,"backgroundColor",ew(n.windowColor,n.windowOpacity)):o.style.backgroundColor=n.windowColor),n.edgeStyle&&(n.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${xo}, 2px 2px 4px ${xo}, 2px 2px 5px ${xo}`:n.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${xo}, 2px 2px ${xo}, 3px 3px ${xo}`:n.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${yR}, 0 1px ${yR}, -1px -1px ${xo}, 0 -1px ${xo}`:n.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${xo}, 0 0 4px ${xo}, 0 0 4px ${xo}, 0 0 4px ${xo}`)),n.fontPercent&&n.fontPercent!==1){const u=me.parseFloat(o.style.fontSize);o.style.fontSize=u*n.fontPercent+"px",o.style.height="auto",o.style.top="auto"}n.fontFamily&&n.fontFamily!=="default"&&(n.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Hre[n.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof me.WebVTT!="function"||e.every(r=>!r.activeCues))return;const n=[];for(let r=0;r<e.length;++r){const i=e[r];for(let s=0;s<i.activeCues.length;++s)n.push(i.activeCues[s])}me.WebVTT.processCues(me,n,this.el_);for(let r=0;r<e.length;++r){const i=e[r];for(let s=0;s<i.activeCues.length;++s){const o=i.activeCues[s].displayState;np(o,"vjs-text-track-cue","vjs-text-track-cue-"+(i.language?i.language:r)),i.language&&Ug(o,"lang",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}}Ge.registerComponent("TextTrackDisplay",qre);class Gre extends Ge{createEl(){const e=this.player_.isAudio(),n=this.localize(e?"Audio Player":"Video Player"),r=nn("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),i=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}Ge.registerComponent("LoadingSpinner",Gre);class Is extends Y2{createEl(e,n={},r={}){e="button",n=Object.assign({className:this.buildCSSClass()},n),r=Object.assign({type:"button"},r);const i=nn(e,n,r);return this.player_.options_.experimentalSvgIcons||i.appendChild(nn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}addChild(e,n={}){const r=this.constructor.name;return Cn.warn(`Adding an actionable (user controllable) child to a Button (${r}) is not supported; use a ClickableComponent instead.`),Ge.prototype.addChild.call(this,e,n)}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)}}Ge.registerComponent("Button",Is);class cj extends Is{constructor(e,n){super(e,n),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",r=>this.handleMouseDown(r))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const n=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Ru(n),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(!i){this.player_.tech(!0).focus();return}const s=()=>i.focus();py(n)?n.then(s,()=>{}):this.setTimeout(s,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}cj.prototype.controlText_="Play Video";Ge.registerComponent("BigPlayButton",cj);class Wre extends Is{constructor(e,n){super(e,n),this.setIcon("cancel"),this.controlText(n&&n.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)}}Ge.registerComponent("CloseButton",Wre);class dj extends Is{constructor(e,n={}){super(e,n),n.replay=n.replay===void 0||n.replay,this.setIcon("play"),this.on(e,"play",r=>this.handlePlay(r)),this.on(e,"pause",r=>this.handlePause(r)),n.replay&&this.on(e,"ended",r=>this.handleEnded(r))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Ru(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",n=>this.handleSeeked(n))}}dj.prototype.controlText_="Play";Ge.registerComponent("PlayToggle",dj);class g0 extends Ge{constructor(e,n){super(e,n),this.on(e,["timeupdate","ended","seeking"],r=>this.update(r)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),n=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),r=nn("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return n.appendChild(r),this.contentEl_=nn("span",{className:`${e}-display`},{role:"presentation"}),n.appendChild(this.contentEl_),n}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=cp(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let n=this.textNode_;n&&this.contentEl_.firstChild!==n&&(n=null,Cn.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_=ht.createTextNode(this.formattedTime_),this.textNode_&&(n?this.contentEl_.replaceChild(this.textNode_,n):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}g0.prototype.labelText_="Time";g0.prototype.controlText_="Time";Ge.registerComponent("TimeDisplay",g0);class AD extends g0{buildCSSClass(){return"vjs-current-time"}updateContent(e){let n;this.player_.ended()?n=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"?n=e.target.pendingSeekTime():n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(n)}}AD.prototype.labelText_="Current Time";AD.prototype.controlText_="Current Time";Ge.registerComponent("CurrentTimeDisplay",AD);class DD extends g0{constructor(e,n){super(e,n);const r=i=>this.updateContent(i);this.on(e,"durationchange",r),this.on(e,"loadstart",r),this.on(e,"loadedmetadata",r)}buildCSSClass(){return"vjs-duration"}updateContent(e){const n=this.player_.duration();this.updateTextNode_(n)}}DD.prototype.labelText_="Duration";DD.prototype.controlText_="Duration";Ge.registerComponent("DurationDisplay",DD);class Xre extends Ge{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=super.createEl("div"),r=super.createEl("span",{textContent:"/"});return n.appendChild(r),e.appendChild(n),e}}Ge.registerComponent("TimeDivider",Xre);class kD extends g0{constructor(e,n){super(e,n),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(nn("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let n;this.player_.ended()?n=0:this.player_.remainingTimeDisplay?n=this.player_.remainingTimeDisplay():n=this.player_.remainingTime(),this.updateTextNode_(n)}}kD.prototype.labelText_="Remaining Time";kD.prototype.controlText_="Remaining Time";Ge.registerComponent("RemainingTimeDisplay",kD);class Yre extends Ge{constructor(e,n){super(e,n),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_=nn("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(nn("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(ht.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()}}Ge.registerComponent("LiveDisplay",Yre);class fj extends Is{constructor(e,n){super(e,n),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_=nn("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()}}fj.prototype.controlText_="Seek to live, currently playing live";Ge.registerComponent("SeekToLive",fj);function rb(t,e,n){return t=Number(t),Math.min(n,Math.max(e,isNaN(t)?e:t))}var Kre=Object.freeze({__proto__:null,clamp:rb});class RD extends Ge{constructor(e,n){super(e,n),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,n={},r={}){return n.className=n.className+" vjs-slider",n=Object.assign({tabIndex:0},n),r=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},r),super.createEl(e,n,r)}handleMouseDown(e){const n=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Fu&&e.preventDefault(),BM(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(n,"mousemove",this.handleMouseMove_),this.on(n,"mouseup",this.handleMouseUp_),this.on(n,"touchmove",this.handleMouseMove_),this.on(n,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const n=this.bar.el_.ownerDocument;FM(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(n,"mousemove",this.handleMouseMove_),this.off(n,"mouseup",this.handleMouseUp_),this.off(n,"touchmove",this.handleMouseMove_),this.off(n,"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 n=this.vertical()?"height":"width";this.bar.el().style[n]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(rb(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const n=V2(this.el_,e);return this.vertical()?n.y:n.x}handleKeyDown(e){const n=this.options_.playerOptions.spatialNavigation,r=n&&n.enabled,i=n&&n.horizontalSeek;r?i&&e.key==="ArrowLeft"||!i&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):i&&e.key==="ArrowRight"||!i&&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")}}Ge.registerComponent("Slider",RD);const tw=(t,e)=>rb(t/e*100,0,100).toFixed(2)+"%";class Qre extends Ge{constructor(e,n){super(e,n),this.partEls_=[],this.on(e,"progress",r=>this.update(r))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),n=nn("span",{className:"vjs-control-text"}),r=nn("span",{textContent:this.localize("Loaded")}),i=ht.createTextNode(": ");return this.percentageEl_=nn("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const n=this.player_.liveTracker,r=this.player_.buffered(),i=n&&n.isLive()?n.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),o=this.partEls_,u=tw(s,i);this.percent_!==u&&(this.el_.style.width=u,xf(this.percentageEl_,u),this.percent_=u);for(let d=0;d<r.length;d++){const f=r.start(d),m=r.end(d);let y=o[d];y||(y=this.el_.appendChild(nn()),o[d]=y),!(y.dataset.start===f&&y.dataset.end===m)&&(y.dataset.start=f,y.dataset.end=m,y.style.left=tw(f,s),y.style.width=tw(m-f,s))}for(let d=o.length;d>r.length;d--)this.el_.removeChild(o[d-1]);o.length=r.length})}}Ge.registerComponent("LoadProgressBar",Qre);class Zre extends Ge{constructor(e,n){super(e,n),this.update=Uu(Er(this,this.update),Do)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,n,r){const i=ky(this.el_),s=zg(this.player_.el()),o=e.width*n;if(!s||!i)return;let u=e.left-s.left+o,d=e.width-o+(s.right-e.right);d||(d=e.width-o,u=o);let f=i.width/2;u<f?f+=f-u:d<f&&(f=d),f<0?f=0:f>i.width&&(f=i.width),f=Math.round(f),this.el_.style.right=`-${f}px`,this.write(r)}write(e){xf(this.el_,e)}updateTime(e,n,r,i){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s;const o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const u=this.player_.liveTracker.liveWindow(),d=u-n*u;s=(d<1?"":"-")+cp(d,u)}else s=cp(r,o);this.update(e,n,s),i&&i()})}}Ge.registerComponent("TimeTooltip",Zre);class PD extends Ge{constructor(e,n){super(e,n),this.setIcon("circle"),this.update=Uu(Er(this,this.update),Do)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,n,r){const i=this.getChild("timeTooltip");if(!i)return;const s=r&&r.target&&typeof r.target.pendingSeekTime=="function"?r.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,n,s)}}PD.prototype.options_={children:[]};!Rs&&!El&&PD.prototype.options_.children.push("timeTooltip");Ge.registerComponent("PlayProgressBar",PD);class hj extends Ge{constructor(e,n){super(e,n),this.update=Uu(Er(this,this.update),Do)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,n){const r=n*this.player_.duration();this.getChild("timeTooltip").updateTime(e,n,r,()=>{this.el_.style.left=`${e.width*n}px`})}}hj.prototype.options_={children:["timeTooltip"]};Ge.registerComponent("MouseTimeDisplay",hj);class K2 extends RD{constructor(e,n){n=mr(K2.prototype.options_,n),n.children=[...n.children];const r=e.options_.disableSeekWhileScrubbingOnMobile&&(Rs||El)||e.options_.disableSeekWhileScrubbingOnSTV;(!Rs&&!El||r)&&n.children.splice(1,0,"mouseTimeDisplay"),super(e,n),this.shouldDisableSeekWhileScrubbing_=r,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Er(this,this.update),this.update=Uu(this.update_,Do),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 ht&&"visibilityState"in ht&&this.on(ht,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){ht.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,Do))}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(ht.visibilityState==="hidden")return;const n=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const r=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let s=this.player_.duration();i&&i.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==n&&(this.el_.setAttribute("aria-valuenow",(n*100).toFixed(2)),this.percent_=n),(this.currentTime_!==r||this.duration_!==s)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[cp(r,s),cp(s,s)],"{1} of {2}")),this.currentTime_=r,this.duration_=s),this.bar&&this.bar.update(zg(this.el()),this.getProgress(),e)}),n}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 n=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,n))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let n;const r=this.player_.liveTracker;return r&&r.isLive()?(n=(e-r.seekableStart())/r.liveWindow(),r.atLiveEdge()&&(n=1)):n=e/this.player_.duration(),n}handleMouseDown(e){Ry(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,n=!1){if(!Ry(e)||isNaN(this.player_.duration()))return;!n&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let r;const i=this.calculateDistance(e),s=this.player_.liveTracker;if(!s||!s.isLive())r=i*this.player_.duration(),r===this.player_.duration()&&(r=r-.1);else{if(i>=.99){s.seekToLiveEdge();return}const o=s.seekableStart(),u=s.liveCurrentTime();if(r=o+i*s.liveWindow(),r>=u&&(r=u),r<=o&&(r=o+.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?Ru(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const n=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(n+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 n=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(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const r=parseInt(e.key,10)*.1;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.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 ht&&"visibilityState"in ht&&this.off(ht,"visibilitychange",this.toggleVisibility_),super.dispose()}}K2.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};Ge.registerComponent("SeekBar",K2);class pj extends Ge{constructor(e,n){super(e,n),this.handleMouseMove=Uu(Er(this,this.handleMouseMove),Do),this.throttledHandleMouseSeek=Uu(Er(this,this.handleMouseSeek),Do),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 n=this.getChild("seekBar");if(!n)return;const r=n.getChild("playProgressBar"),i=n.getChild("mouseTimeDisplay");if(!r&&!i)return;const s=n.el(),o=ky(s);let u=V2(s,e).x;u=rb(u,0,1),i&&i.update(o,u),r&&r.update(o,n.getProgress())}handleMouseSeek(e){const n=this.getChild("seekBar");n&&n.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&&Ru(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 n=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(e),this.on(n,"mousemove",this.throttledHandleMouseSeek),this.on(n,"touchmove",this.throttledHandleMouseSeek),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}pj.prototype.options_={children:["seekBar"]};Ge.registerComponent("ProgressControl",pj);class mj extends Is{constructor(e,n){super(e,n),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(){ht.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in me?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 ht.exitPictureInPicture=="function"&&super.show()}}mj.prototype.controlText_="Picture-in-Picture";Ge.registerComponent("PictureInPictureToggle",mj);class gj extends Is{constructor(e,n){super(e,n),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",r=>this.handleFullscreenChange(r)),ht[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()}}gj.prototype.controlText_="Fullscreen";Ge.registerComponent("FullscreenToggle",gj);const Jre=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})};class eie extends Ge{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}}Ge.registerComponent("VolumeLevel",eie);class tie extends Ge{constructor(e,n){super(e,n),this.update=Uu(Er(this,this.update),Do)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,n,r,i){if(!r){const s=zg(this.el_),o=zg(this.player_.el()),u=e.width*n;if(!o||!s)return;const d=e.left-o.left+u,f=e.width-u+(o.right-e.right);let m=s.width/2;d<m?m+=m-d:f<m&&(m=f),m<0?m=0:m>s.width&&(m=s.width),this.el_.style.right=`-${m}px`}this.write(`${i}%`)}write(e){xf(this.el_,e)}updateVolume(e,n,r,i,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,n,r,i.toFixed(0)),s&&s()})}}Ge.registerComponent("VolumeLevelTooltip",tie);class vj extends Ge{constructor(e,n){super(e,n),this.update=Uu(Er(this,this.update),Do)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,n,r){const i=100*n;this.getChild("volumeLevelTooltip").updateVolume(e,n,r,i,()=>{r?this.el_.style.bottom=`${e.height*n}px`:this.el_.style.left=`${e.width*n}px`})}}vj.prototype.options_={children:["volumeLevelTooltip"]};Ge.registerComponent("MouseVolumeLevelDisplay",vj);class Q2 extends RD{constructor(e,n){super(e,n),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){Ry(e)&&super.handleMouseDown(e)}handleMouseMove(e){const n=this.getChild("mouseVolumeLevelDisplay");if(n){const r=this.el(),i=zg(r),s=this.vertical();let o=V2(r,e);o=s?o.y:o.x,o=rb(o,0,1),n.update(i,o,s)}Ry(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 n=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",n),this.el_.setAttribute("aria-valuetext",n+"%")}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)})}}Q2.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Rs&&!El&&Q2.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Q2.prototype.playerEvent="volumechange";Ge.registerComponent("VolumeBar",Q2);class yj extends Ge{constructor(e,n={}){n.vertical=n.vertical||!1,(typeof n.volumeBar>"u"||Fg(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),super(e,n),Jre(this,e),this.throttledHandleMouseMove=Uu(Er(this,this.handleMouseMove),Do),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 n=this.el_.ownerDocument;this.on(n,"mousemove",this.throttledHandleMouseMove),this.on(n,"touchmove",this.throttledHandleMouseMove),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const n=this.el_.ownerDocument;this.off(n,"mousemove",this.throttledHandleMouseMove),this.off(n,"touchmove",this.throttledHandleMouseMove),this.off(n,"mouseup",this.handleMouseUpHandler_),this.off(n,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}yj.prototype.options_={children:["volumeBar"]};Ge.registerComponent("VolumeControl",yj);const nie=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})};class bj extends Is{constructor(e,n){super(e,n),nie(this,e),this.on(e,["loadstart","volumechange"],r=>this.update(r))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const n=this.player_.volume(),r=this.player_.lastVolume_();if(n===0){const i=r<.1?.1:r;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let n=3;this.setIcon("volume-high"),Rs&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),n=0):e<.33?(this.setIcon("volume-low"),n=1):e<.67&&(this.setIcon("volume-medium"),n=2),z2(this.el_,[0,1,2,3].reduce((r,i)=>r+`${i?" ":""}vjs-vol-${i}`,"")),np(this.el_,`vjs-vol-${n}`)}updateControlText_(){const n=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n)}}bj.prototype.controlText_="Mute";Ge.registerComponent("MuteToggle",bj);class xj extends Ge{constructor(e,n={}){typeof n.inline<"u"?n.inline=n.inline:n.inline=!0,(typeof n.volumeControl>"u"||Fg(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),super(e,n),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"),Ga(ht,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ps(ht,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}xj.prototype.options_={children:["muteToggle","volumeControl"]};Ge.registerComponent("VolumePanel",xj);class _j extends Is{constructor(e,n){super(e,n),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 n=this.player_.currentTime(),r=this.player_.liveTracker,i=r&&r.isLive()?r.seekableEnd():this.player_.duration();let s;n+this.skipTime<=i?s=n+this.skipTime:s=i,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}_j.prototype.controlText_="Skip Forward";Ge.registerComponent("SkipForward",_j);class Sj extends Is{constructor(e,n){super(e,n),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 n=this.player_.currentTime(),r=this.player_.liveTracker,i=r&&r.isLive()&&r.seekableStart();let s;i&&n-this.skipTime<=i?s=i:n>=this.skipTime?s=n-this.skipTime:s=0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}Sj.prototype.controlText_="Skip Backward";Ge.registerComponent("SkipBackward",Sj);class Tj extends Ge{constructor(e,n){super(e,n),n&&(this.menuButton_=n.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 Ge&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Ge&&(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 n=this.addChild(e);n&&this.addEventListenerForItem(n)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=nn(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const n=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ga(n,"click",function(r){r.preventDefault(),r.stopImmediatePropagation()}),n}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const n=e.relatedTarget||ht.activeElement;if(!this.children().some(r=>r.el()===n)){const r=this.menuButton_;r&&r.buttonPressed_&&n!==r.el().firstChild&&r.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const n=this.children();if(!Array.isArray(n))return;const r=n.filter(i=>i.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 n=this.children().slice();n.length&&n[0].hasClass("vjs-menu-title")&&n.shift(),n.length>0&&(e<0?e=0:e>=n.length&&(e=n.length-1),this.focusedChild_=e,n[e].el_.focus())}}Ge.registerComponent("Menu",Tj);class ID extends Ge{constructor(e,n={}){super(e,n),this.menuButton_=new Is(e,n),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const r=Is.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+r,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const i=s=>this.handleClick(s);this.handleMenuKeyUp_=s=>this.handleMenuKeyUp(s),this.on(this.menuButton_,"tap",i),this.on(this.menuButton_,"click",i),this.on(this.menuButton_,"keydown",s=>this.handleKeyDown(s)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),Ga(ht,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",s=>this.handleMouseLeave(s)),this.on("keydown",s=>this.handleSubmenuKeyDown(s))}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 Tj(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const n=nn("li",{className:"vjs-menu-title",textContent:ri(this.options_.title),tabIndex:-1}),r=new Ge(this.player_,{el:n});e.addItem(r)}if(this.items=this.createItems(),this.items)for(let n=0;n<this.items.length;n++)e.addItem(this.items[n]);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 n=Is.prototype.buildCSSClass();return`vjs-menu-button ${e} ${n} ${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,n=this.menuButton_.el()){return this.menuButton_.controlText(e,n)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),Ps(ht,"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"),Rs&&OM())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()}}Ge.registerComponent("MenuButton",ID);class OD extends ID{constructor(e,n){const r=n.tracks;if(super(e,n),this.items.length<=1&&this.hide(),!r)return;const i=Er(this,this.update);r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),r.addEventListener("labelchange",i),this.player_.on("ready",i),this.player_.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i),r.removeEventListener("labelchange",i)})}}Ge.registerComponent("TrackButton",OD);class ib extends Y2{constructor(e,n){super(e,n),this.selectable=n.selectable,this.isSelected_=n.selected||!1,this.multiSelectable=n.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,n,r){this.nonIconControl=!0;const i=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},n),r),s=nn("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?i.appendChild(s):i.replaceChild(s,i.querySelector(".vjs-icon-placeholder")),i}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))}}Ge.registerComponent("MenuItem",ib);class sb extends ib{constructor(e,n){const r=n.track,i=e.textTracks();n.label=r.label||r.language||"Unknown",n.selected=r.mode==="showing",super(e,n),this.track=r,this.kinds=(n.kinds||[n.kind||this.track.kind]).filter(Boolean);const s=(...u)=>{this.handleTracksChange.apply(this,u)},o=(...u)=>{this.handleSelectedLanguageChange.apply(this,u)};if(e.on(["loadstart","texttrackchange"],s),i.addEventListener("change",s),i.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],s),i.removeEventListener("change",s),i.removeEventListener("selectedlanguagechange",o)}),i.onchange===void 0){let u;this.on(["tap","click"],function(){if(typeof me.Event!="object")try{u=new me.Event("change")}catch{}u||(u=ht.createEvent("Event"),u.initEvent("change",!0,!0)),i.dispatchEvent(u)})}this.handleTracksChange()}handleClick(e){const n=this.track,r=this.player_.textTracks();if(super.handleClick(e),!!r)for(let i=0;i<r.length;i++){const s=r[i];this.kinds.indexOf(s.kind)!==-1&&(s===n?s.mode!=="showing"&&(s.mode="showing"):s.mode!=="disabled"&&(s.mode="disabled"))}}handleTracksChange(e){const n=this.track.mode==="showing";n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const n=this.player_.cache_.selectedLanguage;if(n&&n.enabled&&n.language===this.track.language&&n.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()}}Ge.registerComponent("TextTrackMenuItem",sb);class wj extends sb{constructor(e,n){n.track={player:e,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,super(e,n)}handleTracksChange(e){const n=this.player().textTracks();let r=!0;for(let i=0,s=n.length;i<s;i++){const o=n[i];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){r=!1;break}}r!==this.isSelected_&&this.selected(r)}handleSelectedLanguageChange(e){const n=this.player().textTracks();let r=!0;for(let i=0,s=n.length;i<s;i++){const o=n[i];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.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()}}Ge.registerComponent("OffTextTrackMenuItem",wj);class v0 extends OD{constructor(e,n={}){n.tracks=e.textTracks(),super(e,n)}createItems(e=[],n=sb){let r;this.label_&&(r=`${this.label_} off`),e.push(new wj(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;const i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<i.length;s++){const o=i[s];if(this.kinds_.indexOf(o.kind)>-1){const u=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});u.addClass(`vjs-${o.kind}-menu-item`),e.push(u)}}return e}}Ge.registerComponent("TextTrackButton",v0);class Cj extends ib{constructor(e,n){const r=n.track,i=n.cue,s=e.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=i.text,n.selected=i.startTime<=s&&s<i.endTime,super(e,n),this.track=r,this.cue=i}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Ge.registerComponent("ChaptersTrackMenuItem",Cj);class ND extends v0{constructor(e,n,r){super(e,n,r),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(i=>{i.selected(this.track_.activeCues[0]===i.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 n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),super.update()):(!this.items||n&&n.cues&&n.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 n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.kind===this.kind_)return r}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(ri(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const n=this.track_.cues;if(!n)return e;for(let r=0,i=n.length;r<i;r++){const s=n[r],o=new Cj(this.player_,{track:this.track_,cue:s});e.push(o)}return e}}ND.prototype.kind_="chapters";ND.prototype.controlText_="Chapters";Ge.registerComponent("ChaptersButton",ND);class MD extends v0{constructor(e,n,r){super(e,n,r),this.setIcon("audio-description");const i=e.textTracks(),s=Er(this,this.handleTracksChange);i.addEventListener("change",s),this.on("dispose",function(){i.removeEventListener("change",s)})}handleTracksChange(e){const n=this.player().textTracks();let r=!1;for(let i=0,s=n.length;i<s;i++){const o=n[i];if(o.kind!==this.kind_&&o.mode==="showing"){r=!0;break}}r?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}MD.prototype.kind_="descriptions";MD.prototype.controlText_="Descriptions";Ge.registerComponent("DescriptionsButton",MD);class jD extends v0{constructor(e,n,r){super(e,n,r),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}jD.prototype.kind_="subtitles";jD.prototype.controlText_="Subtitles";Ge.registerComponent("SubtitlesButton",jD);class LD extends sb{constructor(e,n){n.track={player:e,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",super(e,n),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+n.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()}}Ge.registerComponent("CaptionSettingsMenuItem",LD);class BD extends v0{constructor(e,n,r){super(e,n,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 LD(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}BD.prototype.kind_="captions";BD.prototype.controlText_="Captions";Ge.registerComponent("CaptionsButton",BD);class Ej extends sb{createEl(e,n,r){const i=super.createEl(e,n,r),s=i.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",i):s.appendChild(nn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(nn("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),i}}Ge.registerComponent("SubsCapsMenuItem",Ej);class FD extends v0{constructor(e,n={}){super(e,n),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(ri(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 LD(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,Ej),e}}FD.prototype.kinds_=["captions","subtitles"];FD.prototype.controlText_="Subtitles";Ge.registerComponent("SubsCapsButton",FD);class Aj extends ib{constructor(e,n){const r=n.track,i=e.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,super(e,n),this.track=r,this.addClass(`vjs-${r.kind}-menu-item`);const s=(...o)=>{this.handleTracksChange.apply(this,o)};i.addEventListener("change",s),this.on("dispose",()=>{i.removeEventListener("change",s)})}createEl(e,n,r){const i=super.createEl(e,n,r),s=i.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(nn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(nn("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const n=this.player_.audioTracks();for(let r=0;r<n.length;r++){const i=n[r];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Ge.registerComponent("AudioTrackMenuItem",Aj);class Dj extends OD{constructor(e,n={}){n.tracks=e.audioTracks(),super(e,n),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const n=this.player_.audioTracks();for(let r=0;r<n.length;r++){const i=n[r];e.push(new Aj(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e}}Dj.prototype.controlText_="Audio Track";Ge.registerComponent("AudioTrackButton",Dj);class UD extends ib{constructor(e,n){const r=n.rate,i=parseFloat(r,10);n.label=r,n.selected=i===e.playbackRate(),n.selectable=!0,n.multiSelectable=!1,super(e,n),this.label=r,this.rate=i,this.on(e,"ratechange",s=>this.update(s))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}UD.prototype.contentElType="button";Ge.registerComponent("PlaybackRateMenuItem",UD);class kj extends ID{constructor(e,n){super(e,n),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_=nn("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(),n=[];for(let r=e.length-1;r>=0;r--)n.push(new UD(this.player(),{rate:e[r]+"x"}));return n}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")}}kj.prototype.controlText_="Playback Rate";Ge.registerComponent("PlaybackRateMenuButton",kj);class Rj extends Ge{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",n={},r={}){return n.className||(n.className=this.buildCSSClass()),super.createEl(e,n,r)}}Ge.registerComponent("Spacer",Rj);class rie extends Rj{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}Ge.registerComponent("CustomControlSpacer",rie);class Pj extends Ge{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Pj.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};Ge.registerComponent("ControlBar",Pj);class Ij extends m0{constructor(e,n){super(e,n),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):""}}Ij.prototype.options_=Object.assign({},m0.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});Ge.registerComponent("ErrorDisplay",Ij);class Oj extends Ge{constructor(e,n={}){super(e,n),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),nn("select",{id:this.options_.id},{},this.options_.SelectOptions.map(n=>{const r=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Ao()}`)+"-"+n[1].replace(/\W+/g,""),i=nn("option",{id:r,value:this.localize(n[0]),textContent:this.localize(n[1])});return i.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${r}`),i}))}}Ge.registerComponent("TextTrackSelect",Oj);class ip extends Ge{constructor(e,n={}){super(e,n);const r=nn("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(r);const i=this.options_.selects;for(const s of i){const o=this.options_.selectConfigs[s],u=o.className,d=o.id.replace("%s",this.options_.id_);let f=null;const m=`vjs_select_${Ao()}`;if(this.options_.type==="colors"){f=nn("span",{className:u});const x=nn("label",{id:d,className:"vjs-label",textContent:this.localize(o.label)});x.setAttribute("for",m),f.appendChild(x)}const y=new Oj(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:m,labelId:d});this.addChild(y),this.options_.type==="colors"&&(f.appendChild(y.el()),this.el().appendChild(f))}}createEl(){return nn("fieldset",{className:this.options_.className})}}Ge.registerComponent("TextTrackFieldset",ip);class Nj extends Ge{constructor(e,n={}){super(e,n);const r=this.options_.textTrackComponentid,i=new ip(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(i);const s=new ip(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(s);const o=new ip(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(o)}createEl(){return nn("div",{className:"vjs-track-settings-colors"})}}Ge.registerComponent("TextTrackSettingsColors",Nj);class Mj extends Ge{constructor(e,n={}){super(e,n);const r=this.options_.textTrackComponentid,i=new ip(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(i);const s=new ip(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(s);const o=new ip(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(o)}createEl(){return nn("div",{className:"vjs-track-settings-font"})}}Ge.registerComponent("TextTrackSettingsFont",Mj);class jj extends Ge{constructor(e,n={}){super(e,n);const r=new Is(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 i=this.localize("Done"),s=new Is(e,{controlText:i,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=i,this.addChild(s)}createEl(){return nn("div",{className:"vjs-track-settings-controls"})}}Ge.registerComponent("TrackSettingsControls",jj);const nw="vjs-text-track-settings",xR=["#000","Black"],_R=["#00F","Blue"],SR=["#0FF","Cyan"],TR=["#0F0","Green"],wR=["#F0F","Magenta"],CR=["#F00","Red"],ER=["#FFF","White"],AR=["#FF0","Yellow"],rw=["1","Opaque"],iw=["0.5","Semi-Transparent"],DR=["0","Transparent"],sf={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[xR,ER,CR,TR,_R,AR,wR,SR],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[rw,iw,DR],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ER,xR,CR,TR,_R,AR,wR,SR],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:t=>t==="1.00"?null:Number(t)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[rw,iw],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:[DR,iw,rw],className:"vjs-window-opacity vjs-opacity"}};sf.windowColor.options=sf.backgroundColor.options;function Lj(t,e){if(e&&(t=e(t)),t&&t!=="none")return t}function iie(t,e){const n=t.options[t.options.selectedIndex].value;return Lj(n,e)}function sie(t,e,n){if(e){for(let r=0;r<t.options.length;r++)if(Lj(t.options[r].value,n)===e){t.selectedIndex=r;break}}}class aie extends m0{constructor(e,n){n.temporary=!1,super(e,n),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=nn("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),n.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const n=new Nj(e,{textTrackComponentid:this.id_,selectConfigs:sf,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(n);const r=new Mj(e,{textTrackComponentid:this.id_,selectConfigs:sf,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(r);const i=new jj(e);this.addChild(i)}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()}),mg(sf,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 EM(sf,(e,n,r)=>{const i=iie(this.$(n.selector),n.parser);return i!==void 0&&(e[r]=i),e},{})}setValues(e){mg(sf,(n,r)=>{sie(this.$(n.selector),e[r],n.parser)})}setDefaults(){mg(sf,e=>{const n=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=n})}restoreSettings(){let e;try{e=JSON.parse(me.localStorage.getItem(nw))}catch(n){Cn.warn(n)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?me.localStorage.setItem(nw,JSON.stringify(e)):me.localStorage.removeItem(nw)}catch(n){Cn.warn(n)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}Ge.registerComponent("TextTrackSettings",aie);class oie extends Ge{constructor(e,n){let r=n.ResizeObserver||me.ResizeObserver;n.ResizeObserver===null&&(r=!1);const i=mr({createEl:!r,reportTouchActivity:!1},n);super(e,i),this.ResizeObserver=n.ResizeObserver||me.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=YM(()=>{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 s=this.debouncedHandler_;let o=this.unloadListener_=function(){Ps(this,"resize",s),Ps(this,"unload",o),o=null};Ga(this.el_.contentWindow,"unload",o),Ga(this.el_.contentWindow,"resize",s)},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()}}Ge.registerComponent("ResizeManager",oie);const lie={trackingThreshold:20,liveTolerance:15};class uie extends Ge{constructor(e,n){const r=mr(lie,n,{createEl:!1});super(e,r),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=i=>this.handlePlay(i),this.handleFirstTimeupdate_=i=>this.handleFirstTimeupdate(i),this.handleSeeked_=i=>this.handleSeeked(i),this.seekToLiveEdge_=i=>this.seekToLiveEdge(i),this.reset_(),this.on(this.player_,"durationchange",i=>this.handleDurationchange(i)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const n=Number(me.performance.now().toFixed(4)),r=this.lastTime_===-1?0:(n-this.lastTime_)/1e3;this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+r;const i=this.liveCurrentTime(),s=this.player_.currentTime();let o=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-s)>this.options_.liveTolerance;(!this.timeupdateSeen_||i===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,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_,Do),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(),n=[];let r=e?e.length:0;for(;r--;)n.push(e.end(r));return n.length?n.sort()[n.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),n=[];let r=e?e.length:0;for(;r--;)n.push(e.start(r));return n.length?n.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()}}Ge.registerComponent("LiveTracker",uie);class cie extends Ge{constructor(e,n){super(e,n),this.on("statechanged",r=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:nn("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Ao()}`}),description:nn("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Ao()}`})},nn("div",{className:"vjs-title-bar"},{},AM(this.els))}updateDom_(){const e=this.player_.tech_,n=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(i=>{const s=this.state[i],o=this.els[i],u=r[i];H2(o),s&&xf(o,s),n&&(n.removeAttribute(u),s&&n.setAttribute(u,o.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,n=e&&e.el_;n&&(n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}Ge.registerComponent("TitleBar",cie);const die={initialDisplay:4e3,position:[],takeFocus:!1};class fie extends Is{constructor(e,n){n=mr(die,n),super(e,n),this.controlText(n.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=nn("button",{},{type:"button",class:this.buildCSSClass()},nn("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()}}Ge.registerComponent("TransientButton",fie);const gC=t=>{const e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;const n=t.$$("source"),r=[];let i="";if(!n.length)return!1;for(let s=0;s<n.length;s++){const o=n[s].src;o&&r.indexOf(o)===-1&&r.push(o)}return r.length?(r.length===1&&(i=r[0]),t.triggerSourceset(i),!0):!1},hie=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(t){const e=ht.createElement(this.nodeName.toLowerCase());e.innerHTML=t;const n=ht.createDocumentFragment();for(;e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",me.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Bj=(t,e)=>{let n={};for(let r=0;r<t.length&&(n=Object.getOwnPropertyDescriptor(t[r],e),!(n&&n.set&&n.get));r++);return n.enumerable=!0,n.configurable=!0,n},pie=t=>Bj([t.el(),me.HTMLMediaElement.prototype,me.Element.prototype,hie],"innerHTML"),kR=function(t){const e=t.el();if(e.resetSourceWatch_)return;const n={},r=pie(t),i=s=>(...o)=>{const u=s.apply(e,o);return gC(t),u};["append","appendChild","insertAdjacentHTML"].forEach(s=>{e[s]&&(n[s]=e[s],e[s]=i(n[s]))}),Object.defineProperty(e,"innerHTML",mr(r,{set:i(r.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(n).forEach(s=>{e[s]=n[s]}),Object.defineProperty(e,"innerHTML",r)},t.one("sourceset",e.resetSourceWatch_)},mie=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?aj(me.Element.prototype.getAttribute.call(this,"src")):""},set(t){return me.Element.prototype.setAttribute.call(this,"src",t),t}}),gie=t=>Bj([t.el(),me.HTMLMediaElement.prototype,mie],"src"),vie=function(t){if(!t.featuresSourceset)return;const e=t.el();if(e.resetSourceset_)return;const n=gie(t),r=e.setAttribute,i=e.load;Object.defineProperty(e,"src",mr(n,{set:s=>{const o=n.set.call(e,s);return t.triggerSourceset(e.src),o}})),e.setAttribute=(s,o)=>{const u=r.call(e,s,o);return/src/i.test(s)&&t.triggerSourceset(e.src),u},e.load=()=>{const s=i.call(e);return gC(t)||(t.triggerSourceset(""),kR(t)),s},e.currentSrc?t.triggerSourceset(e.currentSrc):gC(t)||kR(t),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=i,e.setAttribute=r,Object.defineProperty(e,"src",n),e.resetSourceWatch_&&e.resetSourceWatch_()}};class Et extends fn{constructor(e,n){super(e,n);const r=e.source;let i=!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 s=this.el_.childNodes;let o=s.length;const u=[];for(;o--;){const d=s[o];d.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(d),this.remoteTextTracks().addTrack(d.track),this.textTracks().addTrack(d.track),!i&&!this.el_.hasAttribute("crossorigin")&&X2(d.src)&&(i=!0)):u.push(d))}for(let d=0;d<u.length;d++)this.el_.removeChild(u[d])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&i&&Cn.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_(),(Dy||F2)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Et.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){vie(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let n;const r=()=>{n=[];for(let s=0;s<e.length;s++){const o=e[s];o.kind==="metadata"&&n.push({track:o,storedMode:o.mode})}};r(),e.addEventListener("change",r),this.on("dispose",()=>e.removeEventListener("change",r));const i=()=>{for(let s=0;s<n.length;s++){const o=n[s];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",r),e.removeEventListener("change",i),e.addEventListener("change",i)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",r),e.addEventListener("change",r),e.removeEventListener("change",i)})}overrideNative_(e,n){if(n!==this[`featuresNative${e}Tracks`])return;const r=e.toLowerCase();this[`${r}TracksListeners_`]&&Object.keys(this[`${r}TracksListeners_`]).forEach(i=>{this.el()[`${r}Tracks`].removeEventListener(i,this[`${r}TracksListeners_`][i])}),this[`featuresNative${e}Tracks`]=!n,this[`${r}TracksListeners_`]=null,this.proxyNativeTracksForType_(r)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const n=Co[e],r=this.el()[n.getterName],i=this[n.getterName]();if(!this[`featuresNative${n.capitalName}Tracks`]||!r||!r.addEventListener)return;const s={change:u=>{const d={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(d),e==="text"&&this[Vg.remoteText.getterName]().trigger(d)},addtrack(u){i.addTrack(u.track)},removetrack(u){i.removeTrack(u.track)}},o=function(){const u=[];for(let d=0;d<i.length;d++){let f=!1;for(let m=0;m<r.length;m++)if(r[m]===i[d]){f=!0;break}f||u.push(i[d])}for(;u.length;)i.removeTrack(u.shift())};this[n.getterName+"Listeners_"]=s,Object.keys(s).forEach(u=>{const d=s[u];r.addEventListener(u,d),this.on("dispose",f=>r.removeEventListener(u,d))}),this.on("loadstart",o),this.on("dispose",u=>this.off("loadstart",o))}proxyNativeTracks_(){Co.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),Et.disposeMediaElement(e),e=r}else{e=ht.createElement("video");const r=this.options_.tag&&rf(this.options_.tag),i=mr({},r);(!Dy||this.options_.nativeControlsForTouch!==!0)&&delete i.controls,jM(e,Object.assign(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Ug(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const n=["loop","muted","playsinline","autoplay"];for(let r=0;r<n.length;r++){const i=n[r],s=this.options_[i];typeof s<"u"&&(s?Ug(e,i,i):$2(e,i),e[i]=s)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let r=!1;const i=function(){r=!0};this.on("loadstart",i);const s=function(){r||this.trigger("loadstart")};this.on("loadedmetadata",s),this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",s),r||this.trigger("loadstart")});return}const n=["loadstart"];n.push("loadedmetadata"),e.readyState>=2&&n.push("loadeddata"),e.readyState>=3&&n.push("canplay"),e.readyState>=4&&n.push("canplaythrough"),this.ready(function(){n.forEach(function(r){this.trigger(r)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&U2?this.el_.fastSeek(e):this.el_.currentTime=e}catch(n){Cn(n,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&El&&Fu&&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)},n=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",n),this.on("dispose",()=>{this.off("webkitbeginfullscreen",n),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ru(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}},0);else try{e.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}}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,n){if(!e)return Cn.error("Invalid source URL."),!1;const r={src:e};n&&(r.type=n);const i=nn("source",{},r);return this.el_.appendChild(i),!0}removeSourceElement(e){if(!e)return Cn.error("Source URL is required to remove the source element."),!1;const n=this.el_.querySelectorAll("source");for(const r of n)if(r.src===e)return this.el_.removeChild(r),!0;return Cn.warn(`No matching source element found with src: ${e}`),!1}reset(){Et.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):super.addTextTrack(e,n,r)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const n=ht.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e.default&&(n.default=e.default),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n}addRemoteTextTrack(e,n){const r=super.addRemoteTextTrack(e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const n=this.$$("track");let r=n.length;for(;r--;)(e===n[r]||e===n[r].track)&&this.el().removeChild(n[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),me.performance&&(e.creationTime=me.performance.now()),e}}j2(Et,"TEST_VID",function(){if(!f0())return;const t=ht.createElement("video"),e=ht.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t});Et.isSupported=function(){try{Et.TEST_VID.volume=.5}catch{return!1}return!!(Et.TEST_VID&&Et.TEST_VID.canPlayType)};Et.canPlayType=function(t){return Et.TEST_VID.canPlayType(t)};Et.canPlaySource=function(t,e){return Et.canPlayType(t.type)};Et.canControlVolume=function(){try{const t=Et.TEST_VID.volume;Et.TEST_VID.volume=t/2+.1;const e=t!==Et.TEST_VID.volume;return e&&Rs?(me.setTimeout(()=>{Et&&Et.prototype&&(Et.prototype.featuresVolumeControl=t!==Et.TEST_VID.volume)}),!1):e}catch{return!1}};Et.canMuteVolume=function(){try{const t=Et.TEST_VID.muted;return Et.TEST_VID.muted=!t,Et.TEST_VID.muted?Ug(Et.TEST_VID,"muted","muted"):$2(Et.TEST_VID,"muted","muted"),t!==Et.TEST_VID.muted}catch{return!1}};Et.canControlPlaybackRate=function(){if(El&&Fu&&L2<58)return!1;try{const t=Et.TEST_VID.playbackRate;return Et.TEST_VID.playbackRate=t/2+.1,t!==Et.TEST_VID.playbackRate}catch{return!1}};Et.canOverrideAttributes=function(){try{const t=()=>{};Object.defineProperty(ht.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(ht.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(ht.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(ht.createElement("audio"),"innerHTML",{get:t,set:t})}catch{return!1}return!0};Et.supportsNativeTextTracks=function(){return U2||Rs&&Fu};Et.supportsNativeVideoTracks=function(){return!!(Et.TEST_VID&&Et.TEST_VID.videoTracks)};Et.supportsNativeAudioTracks=function(){return!!(Et.TEST_VID&&Et.TEST_VID.audioTracks)};Et.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([t,e]){j2(Et.prototype,t,()=>Et[e](),!0)});Et.prototype.featuresVolumeControl=Et.canControlVolume();Et.prototype.movingMediaElementInDOM=!Rs;Et.prototype.featuresFullscreenResize=!0;Et.prototype.featuresProgressEvents=!0;Et.prototype.featuresTimeupdateEvents=!0;Et.prototype.featuresVideoFrameCallback=!!(Et.TEST_VID&&Et.TEST_VID.requestVideoFrameCallback);Et.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load()}catch{}}()}};Et.resetMediaElement=function(t){if(!t)return;const e=t.querySelectorAll("source");let n=e.length;for(;n--;)t.removeChild(e[n]);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Et.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Et.prototype["set"+ri(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(t){Et.prototype[t]=function(){return this.el_[t]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){Et.prototype["set"+ri(t)]=function(e){this.el_[t]=e}});["pause","load","play"].forEach(function(t){Et.prototype[t]=function(){return this.el_[t]()}});fn.withSourceHandlers(Et);Et.nativeSourceHandler={};Et.nativeSourceHandler.canPlayType=function(t){try{return Et.TEST_VID.canPlayType(t)}catch{return""}};Et.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Et.nativeSourceHandler.canPlayType(t.type);if(t.src){const n=CD(t.src);return Et.nativeSourceHandler.canPlayType(`video/${n}`)}return""};Et.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)};Et.nativeSourceHandler.dispose=function(){};Et.registerSourceHandler(Et.nativeSourceHandler);fn.registerTech("Html5",Et);const Fj=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],sw={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},vC=["tiny","xsmall","small","medium","large","xlarge","huge"],R1={};vC.forEach(t=>{const e=t.charAt(0)==="x"?`x-${t.substring(1)}`:t;R1[t]=`vjs-layout-${e}`});const yie={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};let $r=class sg extends Ge{constructor(e,n,r){if(e.id=e.id||n.id||`vjs_video_${Ao()}`,n=Object.assign(sg.getTagSettings(e),n),n.initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language){const o=e.closest("[lang]");o&&(n.language=o.getAttribute("lang"))}if(super(null,n,r),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=wM(this.id_),this.fsApi_=l_,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&&rf(e),this.language(this.options_.language),n.languages){const o={};Object.getOwnPropertyNames(n.languages).forEach(function(u){o[u.toLowerCase()]=n.languages[u]}),this.languages_=o}else this.languages_=sg.prototype.options_.languages;this.resetCache_(),this.poster_=n.poster||"",this.controls_=!!n.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),n.plugins&&Object.keys(n.plugins).forEach(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),xD(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Ga(ht,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const i=mr(this.options_);if(n.plugins&&Object.keys(n.plugins).forEach(o=>{this[o](n.plugins[o])}),n.debug&&this.debug(!0),this.options_.playerOptions=i,this.middleware_=[],this.playbackRates(n.playbackRates),n.experimentalSvgIcons){const u=new me.DOMParser().parseFromString(zre,"image/svg+xml");if(u.querySelector("parsererror"))Cn.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const f=u.documentElement;f.style.display="none",this.el_.appendChild(f),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"),n.spatialNavigation&&n.spatialNavigation.enabled&&(this.spatialNavigation=new $re(this),this.addClass("vjs-spatial-navigation-enabled")),Dy&&this.addClass("vjs-touch-enabled"),Rs||this.addClass("vjs-workinghover"),sg.players[this.id_]=this;const s=aC.split(".")[0];this.addClass(`vjs-v${s}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),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"),Ps(ht,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ps(ht,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),sg.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),Lre(this),Zs.names.forEach(e=>{const n=Zs[e],r=this[n.getterName]();r&&r.off&&r.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,n,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const i=this.tag.tagName.toLowerCase()==="video-js";r?n=this.el_=e.parentNode:i||(n=this.el_=super.createEl("div"));const s=rf(e);if(i){for(n=this.el_=e,e=this.tag=ht.createElement("video");n.children.length;)e.appendChild(n.firstChild);fy(n,"video-js")||np(n,"video-js"),n.appendChild(e),r=this.playerElIngest_=n,Object.keys(n).forEach(d=>{try{e[d]=n[d]}catch{}})}e.setAttribute("tabindex","-1"),s.tabindex="-1",Fu&&B2&&(e.setAttribute("role","application"),s.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(d){i&&d==="class"||n.setAttribute(d,s[d]),i&&e.setAttribute(d,s[d])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(d=>IM[d]).map(d=>"vjs-device-"+d.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),me.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=WM("vjs-styles-dimensions");const d=hf(".vjs-styles-defaults"),f=hf("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.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 u=e.getElementsByTagName("a");for(let d=0;d<u.length;d++){const f=u.item(d);np(f,"vjs-hidden"),f.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(n,e),lC(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=n,n}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){Cn.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,n){const r=e+"_";if(n===void 0)return this[r]||0;if(n===""||n==="auto"){this[r]=void 0,this.updateStyleEl_();return}const i=parseFloat(n);if(isNaN(i)){Cn.error(`Improper value "${n}" supplied for for ${e}`);return}this[r]=i,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Uc(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),mre(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(me.VIDEOJS_NO_DYNAMIC_STYLE===!0){const u=typeof this.width_=="number"?this.width_:this.options_.width,d=typeof this.height_=="number"?this.height_:this.options_.height,f=this.tech_&&this.tech_.el();f&&(u>=0&&(f.width=u),d>=0&&(f.height=d));return}let e,n,r,i;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?r=this.aspectRatio_:this.videoWidth()>0?r=this.videoWidth()+":"+this.videoHeight():r="16:9";const s=r.split(":"),o=s[1]/s[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?n=this.height_:n=e*o,/^[^a-zA-Z]/.test(this.id())?i="dimensions-"+this.id():i=this.id()+"-dimensions",this.addClass(i),XM(this.styleEl_,`
      .${i} {
        width: ${e}px;
        height: ${n}px;
      }

      .${i}.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: ${o*100}%;
      }
    `)}loadTech_(e,n){this.tech_&&this.unloadTech_();const r=ri(e),i=e.charAt(0).toLowerCase()+e.slice(1);r!=="Html5"&&this.tag&&(fn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;let s=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(s=!1);const o={source:n,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${i}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Zs.names.forEach(d=>{const f=Zs[d];o[f.getterName]=this[f.privateName]}),Object.assign(o,this.options_[r]),Object.assign(o,this.options_[i]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),n&&n.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const u=fn.getTech(e);if(!u)throw new Error(`No Tech named '${r}' exists! '${r}' should be registered using videojs.registerTech()'`);this.tech_=new u(o),this.tech_.ready(Er(this,this.handleTechReady_),!0),pC.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Fj.forEach(d=>{this.on(this.tech_,d,f=>this[`handleTech${ri(d)}_`](f))}),Object.keys(sw).forEach(d=>{this.on(this.tech_,d,f=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${sw[d]}_`].bind(this),event:f});return}this[`handleTech${sw[d]}_`](f)})}),this.on(this.tech_,"loadstart",d=>this.handleTechLoadStart_(d)),this.on(this.tech_,"sourceset",d=>this.handleTechSourceset_(d)),this.on(this.tech_,"waiting",d=>this.handleTechWaiting_(d)),this.on(this.tech_,"ended",d=>this.handleTechEnded_(d)),this.on(this.tech_,"seeking",d=>this.handleTechSeeking_(d)),this.on(this.tech_,"play",d=>this.handleTechPlay_(d)),this.on(this.tech_,"pause",d=>this.handleTechPause_(d)),this.on(this.tech_,"durationchange",d=>this.handleTechDurationChange_(d)),this.on(this.tech_,"fullscreenchange",(d,f)=>this.handleTechFullscreenChange_(d,f)),this.on(this.tech_,"fullscreenerror",(d,f)=>this.handleTechFullscreenError_(d,f)),this.on(this.tech_,"enterpictureinpicture",d=>this.handleTechEnterPictureInPicture_(d)),this.on(this.tech_,"leavepictureinpicture",d=>this.handleTechLeavePictureInPicture_(d)),this.on(this.tech_,"error",d=>this.handleTechError_(d)),this.on(this.tech_,"posterchange",d=>this.handleTechPosterChange_(d)),this.on(this.tech_,"textdata",d=>this.handleTechTextData_(d)),this.on(this.tech_,"ratechange",d=>this.handleTechRateChange_(d)),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)&&lC(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Zs.names.forEach(e=>{const n=Zs[e];this[n.privateName]=this[n.getterName]()}),this.textTracksJson_=pC.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&&Cn.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":aC}}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 n=()=>{const i=this.muted();this.muted(!0);const s=()=>{this.muted(i)};this.playTerminatedQueue_.push(s);const o=this.play();if(py(o))return o.catch(u=>{throw s(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${u||""}`)})};let r;if(e==="any"&&!this.muted()?(r=this.play(),py(r)&&(r=r.catch(n))):e==="muted"&&!this.muted()?r=n():r=this.play(),!!py(r))return r.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let n=e,r="";typeof n!="string"&&(n=e.src,r=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],n&&!r&&(r=Ure(this,n)),this.cache_.source=mr({},e,{src:n,type:r});const i=this.cache_.sources.filter(d=>d.src&&d.src===n),s=[],o=this.$$("source"),u=[];for(let d=0;d<o.length;d++){const f=rf(o[d]);s.push(f),f.src&&f.src===n&&u.push(f.src)}u.length&&!i.length?this.cache_.sources=s:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=n}handleTechSourceset_(e){if(!this.changingSrc_){let n=s=>this.updateSourceCaches_(s);const r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=()=>{}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],s=>{if(s.type==="sourceset")return;const o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}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(),n=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",n))};this.on("timeupdate",n)}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()?Ru(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()&&!ht.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 n=e.target.player;if(n&&n!==this)return;const r=this.el();let i=ht[this.fsApi_.fullscreenElement]===r;!i&&r.matches&&(i=r.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}handleTechFullscreenChange_(e,n){n&&(n.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(n.isFullscreen))}handleTechFullscreenError_(e,n){this.trigger("fullscreenerror",n)}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,n){this.ready(function(){if(e in Mre)return Ore(this.middleware_,this.tech_,e,n);if(e in pR)return hR(this.middleware_,this.tech_,e,n);try{this.tech_&&this.tech_[e](n)}catch(r){throw Cn(r),r}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in Nre)return Ire(this.middleware_,this.tech_,e);if(e in pR)return hR(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(n){throw this.tech_[e]===void 0?(Cn(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,n),n):n.name==="TypeError"?(Cn(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,n),this.tech_.isReady_=!1,n):(Cn(n),n)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Ru){this.playCallbacks_.push(e);const n=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),r=!!(U2||Rs);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!n&&r&&this.load();return}const i=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),i===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(n){n()})}runPlayCallbacks_(e){const n=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],n.forEach(function(r){r(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Sl(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=Sl(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Sl(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 rj(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),n=this.duration();let r=e.end(e.length-1);return r>n&&(r=n),r}volume(e){let n;if(e!==void 0){n=Math.max(0,Math.min(1,e)),this.cache_.volume=n,this.techCall_("setVolume",n),n>0&&this.lastVolume_(n);return}return n=parseFloat(this.techGet_("volume")),isNaN(n)?1:n}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 n=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==n&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const n=this;return new Promise((r,i)=>{function s(){n.off("fullscreenerror",u),n.off("fullscreenchange",o)}function o(){s(),r()}function u(f,m){s(),i(m)}n.one("fullscreenchange",o),n.one("fullscreenerror",u);const d=n.requestFullscreenHelper_(e);d&&(d.then(s,s),d.then(r,i))})}requestFullscreenHelper_(e){let n;if(this.fsApi_.prefixed||(n=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(n=e)),this.fsApi_.requestFullscreen){const r=this.el_[this.fsApi_.requestFullscreen](n);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((n,r)=>{function i(){e.off("fullscreenerror",o),e.off("fullscreenchange",s)}function s(){i(),n()}function o(d,f){i(),r(f)}e.one("fullscreenchange",s),e.one("fullscreenerror",o);const u=e.exitFullscreenHelper_();u&&(u.then(i,i),u.then(n,r))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=ht[this.fsApi_.exitFullscreen]();return e&&Ru(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=ht.documentElement.style.overflow,Ga(ht,"keydown",this.boundFullWindowOnEscKey_),ht.documentElement.style.overflow="hidden",np(ht.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,Ps(ht,"keydown",this.boundFullWindowOnEscKey_),ht.documentElement.style.overflow=this.docOrigOverflow,z2(ht.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&&me.documentPictureInPicture){const e=ht.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(nn("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),me.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(n=>(HM(n),this.el_.parentNode.insertBefore(e,this.el_),n.document.body.appendChild(this.el_),n.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:n}),n.addEventListener("pagehide",r=>{const i=r.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),n))}return"pictureInPictureEnabled"in ht&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(me.documentPictureInPicture&&me.documentPictureInPicture.window)return me.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in ht)return ht.exitPictureInPicture()}handleKeyDown(e){const{userActions:n}=this.options_;!n||!n.hotkeys||(i=>{const s=i.tagName.toLowerCase();if(i.isContentEditable)return!0;const o=["button","checkbox","hidden","radio","reset","submit"];return s==="input"?o.indexOf(i.type)===-1:["textarea"].indexOf(s)!==-1})(this.el_.ownerDocument.activeElement)||(typeof n.hotkeys=="function"?n.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const n=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:r=o=>e.key.toLowerCase()==="f",muteKey:i=o=>e.key.toLowerCase()==="m",playPauseKey:s=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=n;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const o=Ge.getComponent("FullscreenToggle");ht[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else i.call(this,e)?(e.preventDefault(),e.stopPropagation(),Ge.getComponent("MuteToggle").prototype.handleClick.call(this,e)):s.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Ge.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let n;for(let r=0,i=this.options_.techOrder;r<i.length;r++){const s=i[r];let o=fn.getTech(s);if(o||(o=Ge.getComponent(s)),!o){Cn.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(n=o.canPlayType(e),n))return n}return""}selectSource(e){const n=this.options_.techOrder.map(u=>[u,fn.getTech(u)]).filter(([u,d])=>d?d.isSupported():(Cn.error(`The "${u}" tech is undefined. Skipped browser support check for that tech.`),!1)),r=function(u,d,f){let m;return u.some(y=>d.some(x=>{if(m=f(y,x),m)return!0})),m};let i;const s=u=>(d,f)=>u(f,d),o=([u,d],f)=>{if(d.canPlaySource(f,this.options_[u.toLowerCase()]))return{source:f,tech:u}};return this.options_.sourceOrder?i=r(e,n,s(o)):i=r(n,e,o),i||!1}handleSrc_(e,n){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const r=uj(e);if(!r.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,n||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Rre(this,r[0],(i,s)=>{if(this.middleware_=s,n||(this.cache_.sources=r),this.updateSourceCaches_(i),this.src_(i)){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}Pre(s,this.tech_)}),r.length>1){const i=()=>{this.error(null),this.handleSrc_(r.slice(1),!0)},s=()=>{this.off("error",i)};this.one("error",i),this.one("playing",s),this.resetRetryOnError_=()=>{this.off("error",i),this.off("playing",s)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const n=this.selectSource([e]);return n?JM(n.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_(n.tech,n.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,n){return this.tech_?this.tech_.addSourceElement(e,n):!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();Ru(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}),Uc(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:n,progressControl:r,remainingTimeDisplay:i}=this.controlBar||{},{seekBar:s}=r||{};e&&e.updateContent(),n&&n.updateContent(),i&&i.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),n=[];return Object.keys(e).length!==0&&n.push(e),this.cache_.sources||n}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 n;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),n=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,n=typeof n>"u"?this.options_.autoplay:n,this.tech_&&this.techCall_("setAutoplay",n)}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(ff("beforeerror").forEach(n=>{const r=n(this,e);if(!(Bu(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 n=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),this.one("loadstart",function(){this.off(["click","touchstart"],n)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Jr(e),this.addClass("vjs-error"),Cn.error(`(CODE:${this.error_.code} ${Jr.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),ff("error").forEach(n=>n(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(n){n.stopPropagation(),n.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,n,r;const i=Er(this,this.reportUserActivity),s=function(y){(y.screenX!==n||y.screenY!==r)&&(n=y.screenX,r=y.screenY,i())},o=function(){i(),this.clearInterval(e),e=this.setInterval(i,250)},u=function(y){i(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",s),this.on("mouseup",u),this.on("mouseleave",u);const d=this.getChild("controlBar");d&&!Rs&&!El&&(d.on("mouseenter",function(y){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),d.on("mouseleave",function(y){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",i),this.on("keyup",i);let f;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(f);const y=this.options_.inactivityTimeout;y<=0||(f=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},y))};this.setInterval(m,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(),n=this.getChild("ControlBar"),r=n&&n.currentHeight();e.forEach(i=>{i!==n&&i.el_&&!i.hasClass("vjs-hidden")&&(i.hide(),this.audioOnlyCache_.hiddenChildren.push(i))}),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 n=[];return this.isInPictureInPicture()&&n.push(this.exitPictureInPicture()),this.isFullscreen()&&n.push(this.exitFullscreen()),this.audioPosterMode()&&n.push(this.audioPosterMode(!1)),Promise.all(n).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,n,r){if(this.tech_)return this.tech_.addTextTrack(e,n,r)}addRemoteTextTrack(e,n){if(this.tech_)return this.tech_.addRemoteTextTrack(e,n)}removeRemoteTextTrack(e={}){let{track:n}=e;if(n||(n=e),this.tech_)return this.tech_.removeRemoteTextTrack(n)}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(),Uc(this)&&this.trigger("languagechange"))}languages(){return mr(sg.prototype.options_.languages,this.languages_)}toJSON(){const e=mr(this.options_),n=e.tracks;e.tracks=[];for(let r=0;r<n.length;r++){let i=n[r];i=mr(i),i.player=void 0,e.tracks[r]=i}return e}createModal(e,n){n=n||{},n.content=e||"";const r=new m0(this,n);return this.addChild(r),r.on("dispose",()=>{this.removeChild(r)}),r.open(),r}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),n=this.currentWidth();for(let r=0;r<vC.length;r++){const i=vC[r],s=this.breakpoints_[i];if(n<=s){if(e===i)return;e&&this.removeClass(R1[e]),this.addClass(R1[i]),this.breakpoint_=i;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({},yie,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const n=this.responsive_;if(e!==n)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 R1[this.breakpoint_]||""}loadMedia(e,n){if(!e||typeof e!="object")return;const r=this.crossOrigin();this.reset(),this.cache_.media=mr(e);const{artist:i,artwork:s,description:o,poster:u,src:d,textTracks:f,title:m}=this.cache_.media;!s&&u&&(this.cache_.media.artwork=[{src:u,type:y_(u)}]),r&&this.crossOrigin(r),d&&this.src(d),u&&this.poster(u),Array.isArray(f)&&f.forEach(y=>this.addRemoteTextTrack(y,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||i||""}),this.ready(n)}getMedia(){if(!this.cache_.media){const e=this.poster(),n=this.currentSources(),r=Array.prototype.map.call(this.remoteTextTracks(),s=>({kind:s.kind,label:s.label,language:s.language,src:s.src})),i={src:n,textTracks:r};return e&&(i.poster=e,i.artwork=[{src:i.poster,type:y_(i.poster)}]),i}return mr(this.cache_.media)}static getTagSettings(e){const n={sources:[],tracks:[]},r=rf(e),i=r["data-setup"];if(fy(e,"vjs-fill")&&(r.fill=!0),fy(e,"vjs-fluid")&&(r.fluid=!0),i!==null)try{Object.assign(r,JSON.parse(i||"{}"))}catch(s){Cn.error("data-setup",s)}if(Object.assign(n,r),e.hasChildNodes()){const s=e.childNodes;for(let o=0,u=s.length;o<u;o++){const d=s[o],f=d.nodeName.toLowerCase();f==="source"?n.sources.push(rf(d)):f==="track"&&n.tracks.push(rf(d))}}return n}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(n=>typeof n=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}};$r.prototype.videoTracks=()=>{};$r.prototype.audioTracks=()=>{};$r.prototype.textTracks=()=>{};$r.prototype.remoteTextTracks=()=>{};$r.prototype.remoteTextTrackEls=()=>{};Zs.names.forEach(function(t){const e=Zs[t];$r.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});$r.prototype.crossorigin=$r.prototype.crossOrigin;$r.players={};const Kv=me.navigator;$r.prototype.options_={techOrder:fn.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Kv&&(Kv.languages&&Kv.languages[0]||Kv.userLanguage||Kv.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};Fj.forEach(function(t){$r.prototype[`handleTech${ri(t)}_`]=function(){return this.trigger(t)}});Ge.registerComponent("Player",$r);const b_="plugin",yg="activePlugins_",og={},x_=t=>og.hasOwnProperty(t),P1=t=>x_(t)?og[t]:void 0,Uj=(t,e)=>{t[yg]=t[yg]||{},t[yg][e]=!0},__=(t,e,n)=>{const r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},bie=function(t,e){const n=function(){__(this,{name:t,plugin:e,instance:null},!0);const r=e.apply(this,arguments);return Uj(this,t),__(this,{name:t,plugin:e,instance:r}),r};return Object.keys(e).forEach(function(r){n[r]=e[r]}),n},RR=(t,e)=>(e.prototype.name=t,function(...n){__(this,{name:t,plugin:e,instance:null},!0);const r=new e(this,...n);return this[t]=()=>r,__(this,r.getEventHash()),r});class Sa{constructor(e){if(this.constructor===Sa)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),xD(this),delete this.trigger,ZM(this,this.constructor.defaultState),Uj(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,n={}){return p0(this.eventBusEl_,e,this.getEventHash(n))}handleStateChanged(e){}dispose(){const{name:e,player:n}=this;this.trigger("dispose"),this.off(),n.off("dispose",this.dispose),n[yg][e]=!1,this.player=this.state=null,n[e]=RR(e,og[e])}static isBasic(e){const n=typeof e=="string"?P1(e):e;return typeof n=="function"&&!Sa.prototype.isPrototypeOf(n.prototype)}static registerPlugin(e,n){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(x_(e))Cn.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if($r.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof n!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof n}.`);return og[e]=n,e!==b_&&(Sa.isBasic(n)?$r.prototype[e]=bie(e,n):$r.prototype[e]=RR(e,n)),n}static deregisterPlugin(e){if(e===b_)throw new Error("Cannot de-register base plugin.");x_(e)&&(delete og[e],delete $r.prototype[e])}static getPlugins(e=Object.keys(og)){let n;return e.forEach(r=>{const i=P1(r);i&&(n=n||{},n[r]=i)}),n}static getPluginVersion(e){const n=P1(e);return n&&n.VERSION||""}}Sa.getPlugin=P1;Sa.BASE_PLUGIN_NAME=b_;Sa.registerPlugin(b_,Sa);$r.prototype.usingPlugin=function(t){return!!this[yg]&&this[yg][t]===!0};$r.prototype.hasPlugin=function(t){return!!x_(t)};function xie(t,e){let n=!1;return function(...r){return n||Cn.warn(t),n=!0,e.apply(this,r)}}function Ol(t,e,n,r){return xie(`${e} is deprecated and will be removed in ${t}.0; please use ${n} instead.`,r)}var _ie={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 zj=t=>t.indexOf("#")===0?t.slice(1):t;function Re(t,e,n){let r=Re.getPlayer(t);if(r)return e&&Cn.warn(`Player "${t}" is already initialised. Options will not be applied.`),n&&r.ready(n),r;const i=typeof t=="string"?hf("#"+zj(t)):t;if(!h0(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");const o=("getRootNode"in i?i.getRootNode()instanceof me.ShadowRoot:!1)?i.getRootNode():i.ownerDocument.body;(!i.ownerDocument.defaultView||!o.contains(i))&&Cn.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player")?i.parentNode:i).cloneNode(!0)),ff("beforesetup").forEach(d=>{const f=d(i,mr(e));if(!Bu(f)||Array.isArray(f)){Cn.error("please return an object in beforesetup hooks");return}e=mr(e,f)});const u=Ge.getComponent("Player");return r=new u(i,e,n),ff("setup").forEach(d=>d(r)),r}Re.hooks_=jc;Re.hooks=ff;Re.hook=tre;Re.hookOnce=nre;Re.removeHook=TM;if(me.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&f0()){let t=hf(".vjs-styles-defaults");if(!t){t=WM("vjs-styles-defaults");const e=hf("head");e&&e.insertBefore(t,e.firstChild),XM(t,`
      .video-js {
        width: 300px;
        height: 150px;
      }

      .vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 56.25%
      }
    `)}}cC(1,Re);Re.VERSION=aC;Re.options=$r.prototype.options_;Re.getPlayers=()=>$r.players;Re.getPlayer=t=>{const e=$r.players;let n;if(typeof t=="string"){const r=zj(t),i=e[r];if(i)return i;n=hf("#"+r)}else n=t;if(h0(n)){const{player:r,playerId:i}=n;if(r||e[i])return r||e[i]}};Re.getAllPlayers=()=>Object.keys($r.players).map(t=>$r.players[t]).filter(Boolean);Re.players=$r.players;Re.getComponent=Ge.getComponent;Re.registerComponent=(t,e)=>(fn.isTech(e)&&Cn.warn(`The ${t} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),Ge.registerComponent.call(Ge,t,e));Re.getTech=fn.getTech;Re.registerTech=fn.registerTech;Re.use=kre;Object.defineProperty(Re,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(Re.middleware,"TERMINATOR",{value:v_,writeable:!1,enumerable:!0});Re.browser=IM;Re.obj=sre;Re.mergeOptions=Ol(9,"videojs.mergeOptions","videojs.obj.merge",mr);Re.defineLazyProperty=Ol(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",j2);Re.bind=Ol(9,"videojs.bind","native Function.prototype.bind",Er);Re.registerPlugin=Sa.registerPlugin;Re.deregisterPlugin=Sa.deregisterPlugin;Re.plugin=(t,e)=>(Cn.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Sa.registerPlugin(t,e));Re.getPlugins=Sa.getPlugins;Re.getPlugin=Sa.getPlugin;Re.getPluginVersion=Sa.getPluginVersion;Re.addLanguage=function(t,e){return t=(""+t).toLowerCase(),Re.options.languages=mr(Re.options.languages,{[t]:e}),Re.options.languages[t]};Re.log=Cn;Re.createLogger=wM;Re.time=xre;Re.createTimeRange=Ol(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Sl);Re.createTimeRanges=Ol(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Sl);Re.formatTime=Ol(9,"videojs.formatTime","videojs.time.formatTime",cp);Re.setFormatTime=Ol(9,"videojs.setFormatTime","videojs.time.setFormatTime",tj);Re.resetFormatTime=Ol(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",nj);Re.parseUrl=Ol(9,"videojs.parseUrl","videojs.url.parseUrl",wD);Re.isCrossOrigin=Ol(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",X2);Re.EventTarget=Wa;Re.any=bD;Re.on=Ga;Re.one=G2;Re.off=Ps;Re.trigger=p0;Re.xhr=lM;Re.TrackList=dp;Re.TextTrack=nb;Re.TextTrackList=SD;Re.AudioTrack=oj;Re.AudioTrackList=ij;Re.VideoTrack=lj;Re.VideoTrackList=sj;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(t=>{Re[t]=function(){return Cn.warn(`videojs.${t}() is deprecated; use videojs.dom.${t}() instead`),qM[t].apply(null,arguments)}});Re.computedStyle=Ol(9,"videojs.computedStyle","videojs.dom.computedStyle",$g);Re.dom=qM;Re.fn=pre;Re.num=Kre;Re.str=yre;Re.url=Are;Re.Error=_ie;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class Sie{constructor(e){let n=this;return n.id=e.id,n.label=n.id,n.width=e.width,n.height=e.height,n.bitrate=e.bandwidth,n.frameRate=e.frameRate,n.enabled_=e.enabled,Object.defineProperty(n,"enabled",{get(){return n.enabled_()},set(r){n.enabled_(r)}}),n}}class S_ extends Re.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 n=this.getQualityLevelById(e.id);if(n)return n;const r=this.levels_.length;return n=new Sie(e),""+r in this||Object.defineProperty(this,r,{get(){return this.levels_[r]}}),this.levels_.push(n),this.trigger({qualityLevel:n,type:"addqualitylevel"}),n}removeQualityLevel(e){let n=null;for(let r=0,i=this.length;r<i;r++)if(this[r]===e){n=this.levels_.splice(r,1)[0],this.selectedIndex_===r?this.selectedIndex_=-1:this.selectedIndex_>r&&this.selectedIndex_--;break}return n&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),n}getQualityLevelById(e){for(let n=0,r=this.length;n<r;n++){const i=this[n];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}S_.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const t in S_.prototype.allowedEvents_)S_.prototype["on"+t]=null;var $j="4.1.0";const Tie=function(t,e){const n=t.qualityLevels,r=new S_,i=function(){r.dispose(),t.qualityLevels=n,t.off("dispose",i)};return t.on("dispose",i),t.qualityLevels=()=>r,t.qualityLevels.VERSION=$j,r},Vj=function(t){return Tie(this,Re.obj.merge({},t))};Re.registerPlugin("qualityLevels",Vj);Vj.VERSION=$j;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const ma=I2,T_=(t,e)=>e&&e.responseURL&&t!==e.responseURL?e.responseURL:t,Oo=t=>Re.log.debug?Re.log.debug.bind(Re,"VHS:",`${t} >`):function(){};function tr(...t){const e=Re.obj||Re;return(e.merge||e.mergeOptions).apply(e,t)}function qi(...t){const e=Re.time||Re;return(e.createTimeRanges||e.createTimeRanges).apply(e,t)}function wie(t){if(t.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges: 
`;for(let n=0;n<t.length;n++){const r=t.start(n),i=t.end(n);e+=`${r} --> ${i}. Duration (${i-r})
`}return e}const Pu=1/30,Iu=Pu*3,Hj=function(t,e){const n=[];let r;if(t&&t.length)for(r=0;r<t.length;r++)e(t.start(r),t.end(r))&&n.push([t.start(r),t.end(r)]);return qi(n)},lg=function(t,e){return Hj(t,function(n,r){return n-Iu<=e&&r+Iu>=e})},d1=function(t,e){return Hj(t,function(n){return n-Pu>=e})},Cie=function(t){if(t.length<2)return qi();const e=[];for(let n=1;n<t.length;n++){const r=t.end(n-1),i=t.start(n);e.push([r,i])}return qi(e)},Eie=function(t,e){let n=null,r=null,i=0;const s=[],o=[];if(!t||!t.length||!e||!e.length)return qi();let u=t.length;for(;u--;)s.push({time:t.start(u),type:"start"}),s.push({time:t.end(u),type:"end"});for(u=e.length;u--;)s.push({time:e.start(u),type:"start"}),s.push({time:e.end(u),type:"end"});for(s.sort(function(d,f){return d.time-f.time}),u=0;u<s.length;u++)s[u].type==="start"?(i++,i===2&&(n=s[u].time)):s[u].type==="end"&&(i--,i===1&&(r=s[u].time)),n!==null&&r!==null&&(o.push([n,r]),n=null,r=null);return qi(o)},qj=t=>{const e=[];if(!t||!t.length)return"";for(let n=0;n<t.length;n++)e.push(t.start(n)+" => "+t.end(n));return e.join(", ")},Aie=function(t,e,n=1){return((t.length?t.end(t.length-1):0)-e)/n},Yh=t=>{const e=[];for(let n=0;n<t.length;n++)e.push({start:t.start(n),end:t.end(n)});return e},Die=function(t,e){if(t===e)return!1;if(!t&&e||!e&&t||t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(t.start(n)!==e.start(n)||t.end(n)!==e.end(n))return!0;return!1},aw=function(t){if(!(!t||!t.length||!t.end))return t.end(t.length-1)},zD=function(t,e){let n=0;if(!t||!t.length)return n;for(let r=0;r<t.length;r++){const i=t.start(r),s=t.end(r);if(!(e>s)){if(e>i&&e<=s){n+=s-e;continue}n+=s-i}}return n},$D=(t,e)=>{if(!e.preload)return e.duration;let n=0;return(e.parts||[]).forEach(function(r){n+=r.duration}),(e.preloadHints||[]).forEach(function(r){r.type==="PART"&&(n+=t.partTargetDuration)}),n},yC=t=>(t.segments||[]).reduce((e,n,r)=>(n.parts?n.parts.forEach(function(i,s){e.push({duration:i.duration,segmentIndex:r,partIndex:s,part:i,segment:n})}):e.push({duration:n.duration,segmentIndex:r,partIndex:null,segment:n,part:null}),e),[]),Gj=t=>{const e=t.segments&&t.segments.length&&t.segments[t.segments.length-1];return e&&e.parts||[]},Wj=({preloadSegment:t})=>{if(!t)return;const{parts:e,preloadHints:n}=t;let r=(n||[]).reduce((i,s)=>i+(s.type==="PART"?1:0),0);return r+=e&&e.length?e.length:0,r},Xj=(t,e)=>{if(e.endList)return 0;if(t&&t.suggestedPresentationDelay)return t.suggestedPresentationDelay;const n=Gj(e).length>0;return n&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:n&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},kie=function(t,e){let n=0,r=e-t.mediaSequence,i=t.segments[r];if(i){if(typeof i.start<"u")return{result:i.start,precise:!0};if(typeof i.end<"u")return{result:i.end-i.duration,precise:!0}}for(;r--;){if(i=t.segments[r],typeof i.end<"u")return{result:n+i.end,precise:!0};if(n+=$D(t,i),typeof i.start<"u")return{result:n+i.start,precise:!0}}return{result:n,precise:!1}},Rie=function(t,e){let n=0,r,i=e-t.mediaSequence;for(;i<t.segments.length;i++){if(r=t.segments[i],typeof r.start<"u")return{result:r.start-n,precise:!0};if(n+=$D(t,r),typeof r.end<"u")return{result:r.end-n,precise:!0}}return{result:-1,precise:!1}},Yj=function(t,e,n){if(typeof e>"u"&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence)return 0;const r=kie(t,e);if(r.precise)return r.result;const i=Rie(t,e);return i.precise?i.result:r.result+n},Kj=function(t,e,n){if(!t)return 0;if(typeof n!="number"&&(n=0),typeof e>"u"){if(t.totalDuration)return t.totalDuration;if(!t.endList)return me.Infinity}return Yj(t,e,n)},my=function({defaultDuration:t,durationList:e,startIndex:n,endIndex:r}){let i=0;if(n>r&&([n,r]=[r,n]),n<0){for(let s=n;s<Math.min(0,r);s++)i+=t;n=0}for(let s=n;s<r;s++)i+=e[s].duration;return i},Qj=function(t,e,n,r){if(!t||!t.segments)return null;if(t.endList)return Kj(t);if(e===null)return null;e=e||0;let i=Yj(t,t.mediaSequence+t.segments.length,e);return n&&(r=typeof r=="number"?r:Xj(null,t),i-=r),Math.max(0,i)},Pie=function(t,e,n){const i=e||0;let s=Qj(t,e,!0,n);return s===null?qi():(s<i&&(s=i),qi(i,s))},Iie=function({playlist:t,currentTime:e,startingSegmentIndex:n,startingPartIndex:r,startTime:i,exactManifestTimings:s}){let o=e-i;const u=yC(t);let d=0;for(let f=0;f<u.length;f++){const m=u[f];if(n===m.segmentIndex&&!(typeof r=="number"&&typeof m.partIndex=="number"&&r!==m.partIndex)){d=f;break}}if(o<0){if(d>0)for(let f=d-1;f>=0;f--){const m=u[f];if(o+=m.duration,s){if(o<0)continue}else if(o+Pu<=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:i-my({defaultDuration:t.targetDuration,durationList:u,startIndex:d,endIndex:f})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:e}}if(d<0){for(let f=d;f<0;f++)if(o-=t.targetDuration,o<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:e};d=0}for(let f=d;f<u.length;f++){const m=u[f];o-=m.duration;const y=m.duration>Pu,x=o===0,b=y&&o+Pu>=0;if(!((x||b)&&f!==u.length-1)){if(s){if(o>0)continue}else if(o-Pu>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:i+my({defaultDuration:t.targetDuration,durationList:u,startIndex:d,endIndex:f})}}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:e}},Zj=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},VD=function(t){return t.excludeUntil&&t.excludeUntil===1/0},Z2=function(t){const e=Zj(t);return!t.disabled&&!e},Oie=function(t){return t.disabled},Nie=function(t){for(let e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},Jj=function(t,e){return e.attributes&&e.attributes[t]},Mie=function(t,e,n,r=0){return Jj("BANDWIDTH",n)?(t*n.attributes.BANDWIDTH-r*8)/e:NaN},bC=(t,e)=>{if(t.playlists.length===1)return!0;const n=e.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(r=>Z2(r)?(r.attributes.BANDWIDTH||0)<n:!1).length===0},HD=(t,e)=>!t&&!e||!t&&e||t&&!e?!1:!!(t===e||t.id&&e.id&&t.id===e.id||t.resolvedUri&&e.resolvedUri&&t.resolvedUri===e.resolvedUri||t.uri&&e.uri&&t.uri===e.uri),PR=function(t,e){const n=t&&t.mediaGroups&&t.mediaGroups.AUDIO||{};let r=!1;for(const i in n){for(const s in n[i])if(r=e(n[i][s]),r)break;if(r)break}return!!r},ab=t=>{if(!t||!t.playlists||!t.playlists.length)return PR(t,n=>n.playlists&&n.playlists.length||n.uri);for(let e=0;e<t.playlists.length;e++){const n=t.playlists[e],r=n.attributes&&n.attributes.CODECS;if(!(r&&r.split(",").every(s=>dM(s))||PR(t,s=>HD(n,s))))return!1}return!0};var ga={liveEdgeDelay:Xj,duration:Kj,seekable:Pie,getMediaInfoForTime:Iie,isEnabled:Z2,isDisabled:Oie,isExcluded:Zj,isIncompatible:VD,playlistEnd:Qj,isAes:Nie,hasAttribute:Jj,estimateSegmentRequestTime:Mie,isLowestEnabledRendition:bC,isAudioOnly:ab,playlistMatch:HD,segmentDurationWithParts:$D};const{log:e6}=Re,bg=(t,e)=>`${t}-${e}`,t6=(t,e,n)=>`placeholder-uri-${t}-${e}-${n}`,jie=({onwarn:t,oninfo:e,manifestString:n,customTagParsers:r=[],customTagMappers:i=[],llhls:s})=>{const o=new Tte;t&&o.on("warn",t),e&&o.on("info",e),r.forEach(f=>o.addParser(f)),i.forEach(f=>o.addTagMapper(f)),o.push(n),o.end();const u=o.manifest;if(s||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(f){u.hasOwnProperty(f)&&delete u[f]}),u.segments&&u.segments.forEach(function(f){["parts","preloadHints"].forEach(function(m){f.hasOwnProperty(m)&&delete f[m]})})),!u.targetDuration){let f=10;u.segments&&u.segments.length&&(f=u.segments.reduce((m,y)=>Math.max(m,y.duration),0)),t&&t({message:`manifest has no targetDuration defaulting to ${f}`}),u.targetDuration=f}const d=Gj(u);if(d.length&&!u.partTargetDuration){const f=d.reduce((m,y)=>Math.max(m,y.duration),0);t&&(t({message:`manifest has no partTargetDuration defaulting to ${f}`}),e6.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.")),u.partTargetDuration=f}return u},y0=(t,e)=>{t.mediaGroups&&["AUDIO","SUBTITLES"].forEach(n=>{if(t.mediaGroups[n])for(const r in t.mediaGroups[n])for(const i in t.mediaGroups[n][r]){const s=t.mediaGroups[n][r][i];e(s,n,r,i)}})},n6=({playlist:t,uri:e,id:n})=>{t.id=n,t.playlistErrors_=0,e&&(t.uri=e),t.attributes=t.attributes||{}},Lie=t=>{let e=t.playlists.length;for(;e--;){const n=t.playlists[e];n6({playlist:n,id:bg(e,n.uri)}),n.resolvedUri=ma(t.uri,n.uri),t.playlists[n.id]=n,t.playlists[n.uri]=n,n.attributes.BANDWIDTH||e6.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Bie=t=>{y0(t,e=>{e.uri&&(e.resolvedUri=ma(t.uri,e.uri))})},Fie=(t,e)=>{const n=bg(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:me.location.href,resolvedUri:me.location.href,playlists:[{uri:e,id:n,resolvedUri:e,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[e]=r.playlists[0],r},r6=(t,e,n=t6)=>{t.uri=e;for(let i=0;i<t.playlists.length;i++)if(!t.playlists[i].uri){const s=`placeholder-uri-${i}`;t.playlists[i].uri=s}const r=ab(t);y0(t,(i,s,o,u)=>{if(!i.playlists||!i.playlists.length){if(r&&s==="AUDIO"&&!i.uri)for(let d=0;d<t.playlists.length;d++){const f=t.playlists[d];if(f.attributes&&f.attributes.AUDIO&&f.attributes.AUDIO===o)return}i.playlists=[Xr({},i)]}i.playlists.forEach(function(d,f){const m=n(s,o,u,d),y=bg(f,m);d.uri?d.resolvedUri=d.resolvedUri||ma(t.uri,d.uri):(d.uri=f===0?m:y,d.resolvedUri=d.uri),d.id=d.id||y,d.attributes=d.attributes||{},t.playlists[d.id]=d,t.playlists[d.uri]=d})}),Lie(t),Bie(t)};class IR{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[n]=e;n.programDateTime!==void 0&&(this.offset_=n.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[n]=e,r=n.startDate.getTime();this.trimProcessedDateRanges_(r),this.pendingDateRanges_=e.reduce((i,s)=>(i.set(s.id,s),i),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},n=[];this.pendingDateRanges_.forEach((r,i)=>{if(!this.processedDateRanges_.has(i)&&(r.startTime=r.startDate.getTime()/1e3-this.offset_,r.processDateRange=()=>this.processDateRange(r),n.push(r),!!r.class))if(e[r.class]){const s=e[r.class].push(r);r.classListIndex=s-1}else e[r.class]=[r],r.classListIndex=0});for(const r of n){const i=e[r.class]||[];r.endDate?r.endTime=r.endDate.getTime()/1e3-this.offset_:r.endOnNext&&i[r.classListIndex+1]?r.endTime=i[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 n}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((r,i)=>{r.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const i6=22,sp=({requestType:t,request:e,error:n,parseFailure:r})=>{const i=e.status<200||e.status>299,s=e.status>=400&&e.status<=499,o={uri:e.uri,requestType:t},u=i&&!s||r;if(n&&s)o.error=Xr({},n),o.errorType=Re.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=Re.Error.NetworkRequestAborted;else if(e.timedout)o.erroType=Re.Error.NetworkRequestTimeout;else if(u){const d=r?Re.Error.NetworkBodyParserFailed:Re.Error.NetworkBadStatus;o.errorType=d,o.status=e.status,o.headers=e.headers}return o},Uie=Oo("CodecUtils"),s6=function(t){const e=t.attributes||{};if(e.CODECS)return Au(e.CODECS)},a6=(t,e)=>{const n=e.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&n.AUDIO&&t.mediaGroups.AUDIO[n.AUDIO]},zie=(t,e)=>{if(!a6(t,e))return!0;const n=e.attributes||{},r=t.mediaGroups.AUDIO[n.AUDIO];for(const i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1},Py=function(t){const e={};return t.forEach(({mediaType:n,type:r,details:i})=>{e[n]=e[n]||[],e[n].push(cM(`${r}${i}`))}),Object.keys(e).forEach(function(n){if(e[n].length>1){Uie(`multiple ${n} codecs found as attributes: ${e[n].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[n]=null;return}e[n]=e[n][0]}),e},OR=function(t){let e=0;return t.audio&&e++,t.video&&e++,e},gy=function(t,e){const n=e.attributes||{},r=Py(s6(e)||[]);if(a6(t,e)&&!r.audio&&!zie(t,e)){const i=Py(Cte(t,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},{EventTarget:$ie}=Re,Vie=(t,e)=>{if(e.endList||!e.serverControl)return t;const n={};if(e.serverControl.canBlockReload){const{preloadSegment:r}=e;let i=e.mediaSequence+e.segments.length;if(r){const s=r.parts||[],o=Wj(e)-1;o>-1&&o!==s.length-1&&(n._HLS_part=o),(o>-1||s.length)&&i--}n._HLS_msn=i}if(e.serverControl&&e.serverControl.canSkipUntil&&(n._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){const r=new me.URL(t);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(i){n.hasOwnProperty(i)&&r.searchParams.set(i,n[i])}),t=r.toString()}return t},Hie=(t,e)=>{if(!t)return e;const n=tr(t,e);if(t.preloadHints&&!e.preloadHints&&delete n.preloadHints,t.parts&&!e.parts)delete n.parts;else if(t.parts&&e.parts)for(let r=0;r<e.parts.length;r++)t.parts&&t.parts[r]&&(n.parts[r]=tr(t.parts[r],e.parts[r]));return!t.skipped&&e.skipped&&(n.skipped=!1),t.preload&&!e.preload&&(n.preload=!1),n},qie=(t,e,n)=>{const r=t.slice(),i=e.slice();n=n||0;const s=[];let o;for(let u=0;u<i.length;u++){const d=r[u+n],f=i[u];d?(o=d.map||o,s.push(Hie(d,f))):(o&&!f.map&&(f.map=o),s.push(f))}return s},o6=(t,e)=>{!t.resolvedUri&&t.uri&&(t.resolvedUri=ma(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=ma(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=ma(e,t.map.uri)),t.map&&t.map.key&&!t.map.key.resolvedUri&&(t.map.key.resolvedUri=ma(e,t.map.key.uri)),t.parts&&t.parts.length&&t.parts.forEach(n=>{n.resolvedUri||(n.resolvedUri=ma(e,n.uri))}),t.preloadHints&&t.preloadHints.length&&t.preloadHints.forEach(n=>{n.resolvedUri||(n.resolvedUri=ma(e,n.uri))})},l6=function(t){const e=t.segments||[],n=t.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints){for(let r=0;r<n.preloadHints.length;r++)if(n.preloadHints[r].type==="MAP")return e}n.duration=t.targetDuration,n.preload=!0,e.push(n)}return e},u6=(t,e)=>t===e||t.segments&&e.segments&&t.segments.length===e.segments.length&&t.endList===e.endList&&t.mediaSequence===e.mediaSequence&&t.preloadSegment===e.preloadSegment,xC=(t,e,n=u6)=>{const r=tr(t,{}),i=r.playlists[e.id];if(!i||n(i,e))return null;e.segments=l6(e);const s=tr(i,e);if(s.preloadSegment&&!e.preloadSegment&&delete s.preloadSegment,i.segments){if(e.skip){e.segments=e.segments||[];for(let o=0;o<e.skip.skippedSegments;o++)e.segments.unshift({skipped:!0})}s.segments=qie(i.segments,e.segments,e.mediaSequence-i.mediaSequence)}s.segments.forEach(o=>{o6(o,s.resolvedUri)});for(let o=0;o<r.playlists.length;o++)r.playlists[o].id===e.id&&(r.playlists[o]=s);return r.playlists[e.id]=s,r.playlists[e.uri]=s,y0(t,(o,u,d,f)=>{if(o.playlists)for(let m=0;m<o.playlists.length;m++)e.id===o.playlists[m].id&&(o.playlists[m]=s)}),r},_C=(t,e)=>{const n=t.segments||[],r=n[n.length-1],i=r&&r.parts&&r.parts[r.parts.length-1],s=i&&i.duration||r&&r.duration;return e&&s?s*1e3:(t.partTargetDuration||t.targetDuration||10)*500},NR=(t,e,n)=>{if(!t)return;const r=[];return t.forEach(i=>{if(!i.attributes)return;const{BANDWIDTH:s,RESOLUTION:o,CODECS:u}=i.attributes;r.push({id:i.id,bandwidth:s,resolution:o,codecs:u})}),{type:e,isLive:n,renditions:r}};class ug extends $ie{constructor(e,n,r={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Oo("PlaylistLoader");const{withCredentials:i=!1}=r;this.src=e,this.vhs_=n,this.withCredentials=i,this.addDateRangesToTextTrack_=r.addDateRangesToTextTrack;const s=n.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new IR,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 n=this.dateRangesStorage_.getDateRangesToProcess();!n.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(n)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let n=ma(this.main.uri,e.uri);this.llhls&&(n=Vie(n,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials,requestType:"hls-playlist"},(r,i)=>{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,n,r){const{uri:i,id:s}=n;this.request=null,r&&(this.state=r),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${i}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:sp({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:n}){try{const r=jie({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${e}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${e}: ${i}`),manifestString:n,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:Re.Error.StreamingHlsPlaylistParserError,error:r}}}excludeAudioOnlyVariants(e){const n=r=>{const i=r.attributes||{},{width:s,height:o}=i.RESOLUTION||{};if(s&&o)return!0;const u=s6(r)||[];return!!Py(u).video};e.some(n)&&e.forEach(r=>{n(r)||(r.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:n,url:r,id:i}){this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:r}};this.trigger({type:"playlistparsestart",metadata:s});const o=n||this.parseManifest_({url:r,manifestString:e});o.lastRequest=Date.now(),n6({playlist:o,uri:r,id:i});const u=xC(this.main,o);this.targetDuration=o.partTargetDuration||o.targetDuration,this.pendingMedia_=null,u?(this.main=u,this.media_=this.main.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(_C(this.media(),!!u)),s.parsedPlaylist=NR(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),me.clearTimeout(this.mediaUpdateTimeout),me.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new IR,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,n){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(me.clearTimeout(this.finalRenditionTimeout),n){const u=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=me.setTimeout(this.media.bind(this,e,!1),u);return}const r=this.state,i=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.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,i&&(this.trigger("mediachanging"),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(_C(e,!0)),!i)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 o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(u,d)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=T_(e.resolvedUri,d),u)return this.playlistRequestError(this.request,e,r);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:d.responseText,url:e.uri,id:e.id}),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(me.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&&(me.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const n=this.media();if(e){const r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=me.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},r);return}if(!this.started){this.start();return}n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(me.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=me.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=me.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"},(n,r)=>{if(!this.request)return;if(this.request=null,n)return this.error={status:r.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:r.responseText,code:2,metadata:sp({requestType:r.requestType,request:r,error:n})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=T_(this.src,r),this.trigger({type:"playlistparsestart",metadata:e});const i=this.parseManifest_({manifestString:r.responseText,url:this.src});e.parsedPlaylist=NR(i.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(i)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,r6(this.main,this.srcUri()),e.playlists.forEach(r=>{r.segments=l6(r),r.segments.forEach(i=>{o6(i,r.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const n=this.srcUri()||me.location.href;this.main=Fie(e,n),this.haveMetadata({playlistObject:e,url:n,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,n){const r=this.main,i=e.ID;let s=r.playlists.length;for(;s--;){const o=r.playlists[s];if(o.attributes["PATHWAY-ID"]===i){const u=o.resolvedUri,d=o.id;if(n){const f=this.createCloneURI_(o.resolvedUri,e),m=bg(i,f),y=this.createCloneAttributes_(i,o.attributes),x=this.createClonePlaylist_(o,m,e,y);r.playlists[s]=x,r.playlists[m]=x,r.playlists[f]=x}else r.playlists.splice(s,1);delete r.playlists[d],delete r.playlists[u]}}this.updateOrDeleteCloneMedia(e,n)}updateOrDeleteCloneMedia(e,n){const r=this.main,i=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!r.mediaGroups[s]||!r.mediaGroups[s][i])){for(const o in r.mediaGroups[s])if(o===i){for(const u in r.mediaGroups[s][o])r.mediaGroups[s][o][u].playlists.forEach((f,m)=>{const y=r.playlists[f.id],x=y.id,b=y.resolvedUri;delete r.playlists[x],delete r.playlists[b]});delete r.mediaGroups[s][o]}}}),n&&this.createClonedMediaGroups_(e)}addClonePathway(e,n={}){const r=this.main,i=r.playlists.length,s=this.createCloneURI_(n.resolvedUri,e),o=bg(e.ID,s),u=this.createCloneAttributes_(e.ID,n.attributes),d=this.createClonePlaylist_(n,o,e,u);r.playlists[i]=d,r.playlists[o]=d,r.playlists[s]=d,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const n=e.ID,r=e["BASE-ID"],i=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!i.mediaGroups[s]||i.mediaGroups[s][n]))for(const o in i.mediaGroups[s]){if(o===r)i.mediaGroups[s][n]={};else continue;for(const u in i.mediaGroups[s][o]){const d=i.mediaGroups[s][o][u];i.mediaGroups[s][n][u]=Xr({},d);const f=i.mediaGroups[s][n][u],m=this.createCloneURI_(d.resolvedUri,e);f.resolvedUri=m,f.uri=m,f.playlists=[],d.playlists.forEach((y,x)=>{const b=i.playlists[y.id],w=t6(s,n,u),S=bg(n,w);if(b&&!i.playlists[S]){const D=this.createClonePlaylist_(b,S,e),k=D.resolvedUri;i.playlists[S]=D,i.playlists[k]=D}f.playlists[x]=this.createClonePlaylist_(y,S,e)})}}})}createClonePlaylist_(e,n,r,i){const s=this.createCloneURI_(e.resolvedUri,r),o={resolvedUri:s,uri:s,id:n};return e.segments&&(o.segments=[]),i&&(o.attributes=i),tr(e,o)}createCloneURI_(e,n){const r=new URL(e);r.hostname=n["URI-REPLACEMENT"].HOST;const i=n["URI-REPLACEMENT"].PARAMS;for(const s of Object.keys(i))r.searchParams.set(s,i[s]);return r.href}createCloneAttributes_(e,n){const r={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(i=>{n[i]&&(r[i]=e)}),r}getKeyIdSet(e){if(e.contentProtection){const n=new Set;for(const r in e.contentProtection){const i=e.contentProtection[r].attributes.keyId;i&&n.add(i.toLowerCase())}return n}}}const SC=function(t,e,n,r){const i=t.responseType==="arraybuffer"?t.response:t.responseText;!e&&i&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=i.byteLength||i.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),n.headers&&(t.responseHeaders=n.headers),e&&e.code==="ETIMEDOUT"&&(t.timedout=!0),!e&&!t.aborted&&n.statusCode!==200&&n.statusCode!==206&&n.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(t&&(i||t.responseText)))),r(e,t)},Gie=(t,e)=>{if(!t||!t.size)return;let n=e;return t.forEach(r=>{n=r(n)}),n},Wie=(t,e,n,r)=>{!t||!t.size||t.forEach(i=>{i(e,n,r)})},c6=function(){const t=function e(n,r){n=tr({timeout:45e3},n);const i=e.beforeRequest||Re.Vhs.xhr.beforeRequest,s=e._requestCallbackSet||Re.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||Re.Vhs.xhr._responseCallbackSet;i&&typeof i=="function"&&(Re.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(i));const u=Re.Vhs.xhr.original===!0?Re.xhr:Re.Vhs.xhr,d=Gie(s,n);s.delete(i);const f=u(d||n,function(y,x){return Wie(o,f,y,x),SC(f,y,x,r)}),m=f.abort;return f.abort=function(){return f.aborted=!0,m.apply(f,arguments)},f.uri=n.uri,f.requestType=n.requestType,f.requestTime=Date.now(),f};return t.original=!0,t},Xie=function(t){let e;const n=t.offset;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=me.BigInt(t.offset)+me.BigInt(t.length)-me.BigInt(1):e=t.offset+t.length-1,"bytes="+n+"-"+e},TC=function(t){const e={};return t.byterange&&(e.Range=Xie(t.byterange)),e},Yie=function(t,e){return t.start(e)+"-"+t.end(e)},Kie=function(t,e){const n=t.toString(16);return"00".substring(0,2-n.length)+n+(e%2?" ":"")},Qie=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},d6=function(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];hM(r)?e[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[n]=r}),e},w_=function(t){const e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},f6=function(t){return t.resolvedUri},h6=t=>{const e=Array.prototype.slice.call(t),n=16;let r="",i,s;for(let o=0;o<e.length/n;o++)i=e.slice(o*n,o*n+n).map(Kie).join(""),s=e.slice(o*n,o*n+n).map(Qie).join(""),r+=i+" "+s+`
`;return r},Zie=({bytes:t})=>h6(t),Jie=t=>{let e="",n;for(n=0;n<t.length;n++)e+=Yie(t,n)+" ";return e};var ese=Object.freeze({__proto__:null,createTransferableMessage:d6,initSegmentId:w_,segmentKeyId:f6,hexDump:h6,tagDump:Zie,textRanges:Jie});const p6=.25,tse=(t,e)=>{if(!e.dateTimeObject)return null;const n=e.videoTimingInfo.transmuxerPrependedSeconds,i=e.videoTimingInfo.transmuxedPresentationStart+n,s=t-i;return new Date(e.dateTimeObject.getTime()+s*1e3)},nse=t=>t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds,rse=(t,e)=>{let n;try{n=new Date(t)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let r=e.segments[0];if(n<new Date(r.dateTimeObject))return null;for(let d=0;d<e.segments.length-1;d++){r=e.segments[d];const f=new Date(e.segments[d+1].dateTimeObject);if(n<f)break}const i=e.segments[e.segments.length-1],s=i.dateTimeObject,o=i.videoTimingInfo?nse(i.videoTimingInfo):i.duration+i.duration*p6,u=new Date(s.getTime()+o*1e3);return n>u?null:(n>new Date(s)&&(r=i),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:ga.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},ise=(t,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let n=0,r;for(let s=0;s<e.segments.length&&(r=e.segments[s],n=r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:n+r.duration,!(t<=n));s++);const i=e.segments[e.segments.length-1];if(i.videoTimingInfo&&i.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>n){if(t>n+i.duration*p6)return null;r=i}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:n-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}},sse=(t,e)=>{let n,r;try{n=new Date(t),r=new Date(e)}catch{}const i=n.getTime();return(r.getTime()-i)/1e3},ase=t=>{if(!t.segments||t.segments.length===0)return!1;for(let e=0;e<t.segments.length;e++)if(!t.segments[e].dateTimeObject)return!1;return!0},ose=({playlist:t,time:e=void 0,callback:n})=>{if(!n)throw new Error("getProgramTime: callback must be provided");if(!t||e===void 0)return n({message:"getProgramTime: playlist and time must be provided"});const r=ise(e,t);if(!r)return n({message:"valid programTime was not found"});if(r.type==="estimate")return n({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const i={mediaSeconds:e},s=tse(e,r.segment);return s&&(i.programDateTime=s.toISOString()),n(null,i)},m6=({programTime:t,playlist:e,retryCount:n=2,seekTo:r,pauseAfterSeek:i=!0,tech:s,callback:o})=>{if(!o)throw new Error("seekToProgramTime: callback must be provided");if(typeof t>"u"||!e||!r)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!s.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!ase(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const u=rse(t,e);if(!u)return o({message:`${t} was not found in the stream`});const d=u.segment,f=sse(d.dateTimeObject,t);if(u.type==="estimate"){if(n===0)return o({message:`${t} is not buffered yet. Try again`});r(u.estimatedStart+f),s.one("seeked",()=>{m6({programTime:t,playlist:e,retryCount:n-1,seekTo:r,pauseAfterSeek:i,tech:s,callback:o})});return}const m=d.start+f,y=()=>o(null,s.currentTime());s.one("seeked",y),i&&s.pause(),r(m)},ow=(t,e)=>{if(t.readyState===4)return e()},lse=(t,e,n,r)=>{let i=[],s,o=!1;const u=function(y,x,b,w){return x.abort(),o=!0,n(y,x,b,w)},d=function(y,x){if(o)return;if(y)return y.metadata=sp({requestType:r,request:x,error:y}),u(y,x,"",i);const b=x.responseText.substring(i&&i.byteLength||0,x.responseText.length);if(i=Mte(i,pM(b,!0)),s=s||ay(i),i.length<10||s&&i.length<s+2)return ow(x,()=>u(y,x,"",i));const w=pD(i);return w==="ts"&&i.length<188?ow(x,()=>u(y,x,"",i)):!w&&i.length<376?ow(x,()=>u(y,x,"",i)):u(null,x,w,i)},m=e({uri:t,beforeSend(y){y.overrideMimeType("text/plain; charset=x-user-defined"),y.addEventListener("progress",function({total:x,loaded:b}){return SC(y,null,{statusCode:y.status},d)})}},function(y,x){return SC(m,y,x,d)});return m},{EventTarget:use}=Re,MR=function(t,e){if(!u6(t,e)||t.sidx&&e.sidx&&(t.sidx.offset!==e.sidx.offset||t.sidx.length!==e.sidx.length))return!1;if(!t.sidx&&e.sidx||t.sidx&&!e.sidx||t.segments&&!e.segments||!t.segments&&e.segments)return!1;if(!t.segments&&!e.segments)return!0;for(let n=0;n<t.segments.length;n++){const r=t.segments[n],i=e.segments[n];if(r.uri!==i.uri)return!1;if(!r.byterange&&!i.byterange)continue;const s=r.byterange,o=i.byterange;if(s&&!o||!s&&o||s.offset!==o.offset||s.length!==o.length)return!1}return!0},cse=(t,e,n,r)=>{const i=r.attributes.NAME||n;return`placeholder-uri-${t}-${e}-${i}`},dse=({mainXml:t,srcUrl:e,clientOffset:n,sidxMapping:r,previousManifest:i})=>{const s=One(t,{manifestUri:e,clientOffset:n,sidxMapping:r,previousManifest:i});return r6(s,e,cse),s},fse=(t,e)=>{y0(t,(n,r,i,s)=>{(!e.mediaGroups[r][i]||!(s in e.mediaGroups[r][i]))&&delete t.mediaGroups[r][i][s]})},hse=(t,e,n)=>{let r=!0,i=tr(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let s=0;s<e.playlists.length;s++){const o=e.playlists[s];if(o.sidx){const d=N2(o.sidx);n&&n[d]&&n[d].sidx&&dD(o,n[d].sidx,o.sidx.resolvedUri)}const u=xC(i,o,MR);u&&(i=u,r=!1)}return y0(e,(s,o,u,d)=>{if(s.playlists&&s.playlists.length){const f=s.playlists[0].id,m=xC(i,s.playlists[0],MR);m&&(i=m,d in i.mediaGroups[o][u]||(i.mediaGroups[o][u][d]=s),i.mediaGroups[o][u][d].playlists[0]=i.playlists[f],r=!1)}}),fse(i,e),e.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(r=!1),r?null:i},pse=(t,e)=>(!t.map&&!e.map||!!(t.map&&e.map&&t.map.byterange.offset===e.map.byterange.offset&&t.map.byterange.length===e.map.byterange.length))&&t.uri===e.uri&&t.byterange.offset===e.byterange.offset&&t.byterange.length===e.byterange.length,jR=(t,e)=>{const n={};for(const r in t){const s=t[r].sidx;if(s){const o=N2(s);if(!e[o])break;const u=e[o].sidxInfo;pse(u,s)&&(n[o]=e[o])}}return n},mse=(t,e)=>{let r=jR(t.playlists,e);return y0(t,(i,s,o,u)=>{if(i.playlists&&i.playlists.length){const d=i.playlists;r=tr(r,jR(d,e))}}),r};class wC extends use{constructor(e,n,r={},i){super(),this.isPaused_=!0,this.mainPlaylistLoader_=i||this,i||(this.isMain_=!0);const{withCredentials:s=!1}=r;if(this.vhs_=n,this.withCredentials=s,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_=Oo("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,n,r){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:n.status,message:"DASH request error at URL: "+n.uri,response:n.response,code:2,metadata:e.metadata},r&&(this.state=r),this.trigger("error"),!0}addSidxSegments_(e,n,r){const i=e.sidx&&N2(e.sidx);if(!e.sidx||!i||this.mainPlaylistLoader_.sidxMapping_[i]){me.clearTimeout(this.mediaRequest_),this.mediaRequest_=me.setTimeout(()=>r(!1),0);return}const s=T_(e.sidx.resolvedUri),o=(d,f)=>{if(this.requestErrored_(d,f,n))return;const m=this.mainPlaylistLoader_.sidxMapping_,{requestType:y}=f;let x;try{x=Bne(Ht(f.response).subarray(8))}catch(b){b.metadata=sp({requestType:y,request:f,parseFailure:!0}),this.requestErrored_(b,f,n);return}return m[i]={sidxInfo:e.sidx,sidx:x},dD(e,x,e.sidx.resolvedUri),r(!0)},u="dash-sidx";this.request=lse(s,this.vhs_.xhr,(d,f,m,y)=>{if(d)return o(d,f);if(!m||m!=="mp4"){const w=m||"unknown";return o({status:f.status,message:`Unsupported ${w} container type for sidx segment at URL: ${s}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},f)}const{offset:x,length:b}=e.sidx.byterange;if(y.length>=b+x)return o(d,{response:y.subarray(x,x+b),status:f.status,uri:f.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:TC({byterange:e.sidx.byterange})},o)},u)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},me.clearTimeout(this.minimumUpdatePeriodTimeout_),me.clearTimeout(this.mediaRequest_),me.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 n=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,n,i=>{this.haveMetadata({startingState:n,playlist:e})}))}haveMetadata({startingState:e,playlist:n}){this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,me.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(n.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(),me.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(me.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,me.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const n=this.media();if(e){const r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=me.setTimeout(()=>this.load(),r);return}if(!this.started){this.start();return}n&&!n.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){me.clearTimeout(this.mediaRequest_),this.mediaRequest_=me.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,n)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const n={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:n}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(r,i)=>{if(r){const{requestType:o}=i;r.metadata=sp({requestType:o,request:i,error:r})}if(this.requestErrored_(r,i)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:n});const s=i.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=T_(this.mainPlaylistLoader_.srcUrl,i),s){this.handleMain_(),this.syncClientServerClock_(()=>e(i,s));return}return e(i,s)})}syncClientServerClock_(e){const n=Nne(this.mainPlaylistLoader_.mainXml_);if(n===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(n.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=n.value-Date.now(),e();this.request=this.vhs_.xhr({uri:ma(this.mainPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(r,i)=>{if(!this.request)return;if(r){const{requestType:o}=i;return this.error.metadata=sp({requestType:o,request:i,error:r}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let s;n.method==="HEAD"?!i.responseHeaders||!i.responseHeaders.date?s=this.mainLoaded_:s=Date.parse(i.responseHeaders.date):s=Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){me.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,n={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:n});let r;try{r=dse({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(s){this.error=s,this.error.metadata={errorType:Re.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}e&&(r=hse(e,r,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=r||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||r&&r.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(r),r){const{duration:s,endList:o}=r,u=[];r.playlists.forEach(f=>{u.push({id:f.id,bandwidth:f.attributes.BANDWIDTH,resolution:f.attributes.RESOLUTION,codecs:f.attributes.CODECS})});const d={duration:s,isLive:!o,renditions:u};n.parsedManifest=d,this.trigger({type:"manifestparsecomplete",metadata:n})}return!!r}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(me.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let n=e.main&&e.main.minimumUpdatePeriod;if(n===0&&(e.media()?n=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof n!="number"||n<=0){n<0&&this.logger_(`found invalid minimumUpdatePeriod of ${n}, not setting a timeout`);return}this.createMUPTimeout_(n)}createMUPTimeout_(e){const n=this.mainPlaylistLoader_;n.minimumUpdatePeriodTimeout_=me.setTimeout(()=>{n.minimumUpdatePeriodTimeout_=null,n.trigger("minimumUpdatePeriod"),n.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,n)=>{n&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=mse(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 n=this.mainPlaylistLoader_.main.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const i=()=>{this.media().endList||(this.mediaUpdateTimeout=me.setTimeout(()=>{this.trigger("mediaupdatetimeout"),i()},_C(this.media(),!!r)))};i()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const n=this.mainPlaylistLoader_.main.eventStream.map(r=>({cueTime:r.start,frames:[{data:r.messageData}]}));this.addMetadataToTextTrack("EventStream",n,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const n=new Set;for(const r in e.contentProtection){const i=e.contentProtection[r].attributes["cenc:default_KID"];i&&n.add(i.replace(/-/g,"").toLowerCase())}return n}}}var zi={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 gse=t=>{const e=new Uint8Array(new ArrayBuffer(t.length));for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e.buffer},g6=function(t){return t.on=t.addEventListener,t.off=t.removeEventListener,t},vse=function(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch{const n=new BlobBuilder;return n.append(t),URL.createObjectURL(n.getBlob())}},v6=function(t){return function(){const e=vse(t),n=g6(new Worker(e));n.objURL=e;const r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(e),r.call(this)},n}},y6=function(t){return`var browserWorkerPolyFill = ${g6.toString()};
browserWorkerPolyFill(self);
`+t},b6=function(t){return t.toString().replace(/^function.+?{/,"").slice(0,-1)},yse=y6(b6(function(){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var T={};this.on=function(_,I){T[_]||(T[_]=[]),T[_]=T[_].concat(I)},this.off=function(_,I){var P;return T[_]?(P=T[_].indexOf(I),T[_]=T[_].slice(),T[_].splice(P,1),P>-1):!1},this.trigger=function(_){var I,P,j,U;if(I=T[_],!!I)if(arguments.length===2)for(j=I.length,P=0;P<j;++P)I[P].call(this,arguments[1]);else{for(U=[],P=arguments.length,P=1;P<arguments.length;++P)U.push(arguments[P]);for(j=I.length,P=0;P<j;++P)I[P].apply(this,U)}},this.dispose=function(){T={}}}};e.prototype.pipe=function(T){return this.on("data",function(_){T.push(_)}),this.on("done",function(_){T.flush(_)}),this.on("partialdone",function(_){T.partialFlush(_)}),this.on("endedtimeline",function(_){T.endTimeline(_)}),this.on("reset",function(_){T.reset(_)}),T},e.prototype.push=function(T){this.trigger("data",T)},e.prototype.flush=function(T){this.trigger("done",T)},e.prototype.partialFlush=function(T){this.trigger("partialdone",T)},e.prototype.endTimeline=function(T){this.trigger("endedtimeline",T)},e.prototype.reset=function(T){this.trigger("reset",T)};var n=e,r=Math.pow(2,32),i=function(T){var _=new DataView(T.buffer,T.byteOffset,T.byteLength),I;return _.getBigUint64?(I=_.getBigUint64(0),I<Number.MAX_SAFE_INTEGER?Number(I):I):_.getUint32(0)*r+_.getUint32(4)},s={getUint64:i,MAX_UINT32:r},o=s.MAX_UINT32,u,d,f,m,y,x,b,w,S,D,k,O,N,F,M,V,$,q,B,z,ee,Y,Q,oe,ue,H,te,Z,ie,G,X,fe,be,we,pe,Ce;(function(){var T;if(Q={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(T in Q)Q.hasOwnProperty(T)&&(Q[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);oe=new Uint8Array([105,115,111,109]),H=new Uint8Array([97,118,99,49]),ue=new Uint8Array([0,0,0,1]),te=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]),Z=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]),ie={video:te,audio:Z},fe=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),X=new Uint8Array([0,0,0,0,0,0,0,0]),be=new Uint8Array([0,0,0,0,0,0,0,0]),we=be,pe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ce=be,G=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),u=function(T){var _=[],I=0,P,j,U;for(P=1;P<arguments.length;P++)_.push(arguments[P]);for(P=_.length;P--;)I+=_[P].byteLength;for(j=new Uint8Array(I+8),U=new DataView(j.buffer,j.byteOffset,j.byteLength),U.setUint32(0,j.byteLength),j.set(T,4),P=0,I=8;P<_.length;P++)j.set(_[P],I),I+=_[P].byteLength;return j},d=function(){return u(Q.dinf,u(Q.dref,fe))},f=function(T){return u(Q.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,T.audioobjecttype<<3|T.samplingfrequencyindex>>>1,T.samplingfrequencyindex<<7|T.channelcount<<3,6,1,2]))},m=function(){return u(Q.ftyp,oe,ue,oe,H)},V=function(T){return u(Q.hdlr,ie[T])},y=function(T){return u(Q.mdat,T)},M=function(T){var _=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,T.duration>>>24&255,T.duration>>>16&255,T.duration>>>8&255,T.duration&255,85,196,0,0]);return T.samplerate&&(_[12]=T.samplerate>>>24&255,_[13]=T.samplerate>>>16&255,_[14]=T.samplerate>>>8&255,_[15]=T.samplerate&255),u(Q.mdhd,_)},F=function(T){return u(Q.mdia,M(T),V(T.type),b(T))},x=function(T){return u(Q.mfhd,new Uint8Array([0,0,0,0,(T&4278190080)>>24,(T&16711680)>>16,(T&65280)>>8,T&255]))},b=function(T){return u(Q.minf,T.type==="video"?u(Q.vmhd,G):u(Q.smhd,X),d(),q(T))},w=function(T,_){for(var I=[],P=_.length;P--;)I[P]=z(_[P]);return u.apply(null,[Q.moof,x(T)].concat(I))},S=function(T){for(var _=T.length,I=[];_--;)I[_]=O(T[_]);return u.apply(null,[Q.moov,k(4294967295)].concat(I).concat(D(T)))},D=function(T){for(var _=T.length,I=[];_--;)I[_]=ee(T[_]);return u.apply(null,[Q.mvex].concat(I))},k=function(T){var _=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(T&4278190080)>>24,(T&16711680)>>16,(T&65280)>>8,T&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 u(Q.mvhd,_)},$=function(T){var _=T.samples||[],I=new Uint8Array(4+_.length),P,j;for(j=0;j<_.length;j++)P=_[j].flags,I[j+4]=P.dependsOn<<4|P.isDependedOn<<2|P.hasRedundancy;return u(Q.sdtp,I)},q=function(T){return u(Q.stbl,B(T),u(Q.stts,Ce),u(Q.stsc,we),u(Q.stsz,pe),u(Q.stco,be))},function(){var T,_;B=function(I){return u(Q.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),I.type==="video"?T(I):_(I))},T=function(I){var P=I.sps||[],j=I.pps||[],U=[],ae=[],le,de;for(le=0;le<P.length;le++)U.push((P[le].byteLength&65280)>>>8),U.push(P[le].byteLength&255),U=U.concat(Array.prototype.slice.call(P[le]));for(le=0;le<j.length;le++)ae.push((j[le].byteLength&65280)>>>8),ae.push(j[le].byteLength&255),ae=ae.concat(Array.prototype.slice.call(j[le]));if(de=[Q.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,(I.width&65280)>>8,I.width&255,(I.height&65280)>>8,I.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]),u(Q.avcC,new Uint8Array([1,I.profileIdc,I.profileCompatibility,I.levelIdc,255].concat([P.length],U,[j.length],ae))),u(Q.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],I.sarRatio){var ce=I.sarRatio[0],Se=I.sarRatio[1];de.push(u(Q.pasp,new Uint8Array([(ce&4278190080)>>24,(ce&16711680)>>16,(ce&65280)>>8,ce&255,(Se&4278190080)>>24,(Se&16711680)>>16,(Se&65280)>>8,Se&255])))}return u.apply(null,de)},_=function(I){return u(Q.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(I.channelcount&65280)>>8,I.channelcount&255,(I.samplesize&65280)>>8,I.samplesize&255,0,0,0,0,(I.samplerate&65280)>>8,I.samplerate&255,0,0]),f(I))}}(),N=function(T){var _=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,0,(T.duration&4278190080)>>24,(T.duration&16711680)>>16,(T.duration&65280)>>8,T.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,(T.width&65280)>>8,T.width&255,0,0,(T.height&65280)>>8,T.height&255,0,0]);return u(Q.tkhd,_)},z=function(T){var _,I,P,j,U,ae,le;return _=u(Q.tfhd,new Uint8Array([0,0,0,58,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),ae=Math.floor(T.baseMediaDecodeTime/o),le=Math.floor(T.baseMediaDecodeTime%o),I=u(Q.tfdt,new Uint8Array([1,0,0,0,ae>>>24&255,ae>>>16&255,ae>>>8&255,ae&255,le>>>24&255,le>>>16&255,le>>>8&255,le&255])),U=92,T.type==="audio"?(P=Y(T,U),u(Q.traf,_,I,P)):(j=$(T),P=Y(T,j.length+U),u(Q.traf,_,I,P,j))},O=function(T){return T.duration=T.duration||4294967295,u(Q.trak,N(T),F(T))},ee=function(T){var _=new Uint8Array([0,0,0,0,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return T.type!=="video"&&(_[_.length-1]=0),u(Q.trex,_)},function(){var T,_,I;I=function(P,j){var U=0,ae=0,le=0,de=0;return P.length&&(P[0].duration!==void 0&&(U=1),P[0].size!==void 0&&(ae=2),P[0].flags!==void 0&&(le=4),P[0].compositionTimeOffset!==void 0&&(de=8)),[0,0,U|ae|le|de,1,(P.length&4278190080)>>>24,(P.length&16711680)>>>16,(P.length&65280)>>>8,P.length&255,(j&4278190080)>>>24,(j&16711680)>>>16,(j&65280)>>>8,j&255]},_=function(P,j){var U,ae,le,de,ce,Se;for(de=P.samples||[],j+=20+16*de.length,le=I(de,j),ae=new Uint8Array(le.length+de.length*16),ae.set(le),U=le.length,Se=0;Se<de.length;Se++)ce=de[Se],ae[U++]=(ce.duration&4278190080)>>>24,ae[U++]=(ce.duration&16711680)>>>16,ae[U++]=(ce.duration&65280)>>>8,ae[U++]=ce.duration&255,ae[U++]=(ce.size&4278190080)>>>24,ae[U++]=(ce.size&16711680)>>>16,ae[U++]=(ce.size&65280)>>>8,ae[U++]=ce.size&255,ae[U++]=ce.flags.isLeading<<2|ce.flags.dependsOn,ae[U++]=ce.flags.isDependedOn<<6|ce.flags.hasRedundancy<<4|ce.flags.paddingValue<<1|ce.flags.isNonSyncSample,ae[U++]=ce.flags.degradationPriority&61440,ae[U++]=ce.flags.degradationPriority&15,ae[U++]=(ce.compositionTimeOffset&4278190080)>>>24,ae[U++]=(ce.compositionTimeOffset&16711680)>>>16,ae[U++]=(ce.compositionTimeOffset&65280)>>>8,ae[U++]=ce.compositionTimeOffset&255;return u(Q.trun,ae)},T=function(P,j){var U,ae,le,de,ce,Se;for(de=P.samples||[],j+=20+8*de.length,le=I(de,j),U=new Uint8Array(le.length+de.length*8),U.set(le),ae=le.length,Se=0;Se<de.length;Se++)ce=de[Se],U[ae++]=(ce.duration&4278190080)>>>24,U[ae++]=(ce.duration&16711680)>>>16,U[ae++]=(ce.duration&65280)>>>8,U[ae++]=ce.duration&255,U[ae++]=(ce.size&4278190080)>>>24,U[ae++]=(ce.size&16711680)>>>16,U[ae++]=(ce.size&65280)>>>8,U[ae++]=ce.size&255;return u(Q.trun,U)},Y=function(P,j){return P.type==="audio"?T(P,j):_(P,j)}}();var Ke={ftyp:m,mdat:y,moof:w,moov:S,initSegment:function(T){var _=m(),I=S(T),P;return P=new Uint8Array(_.byteLength+I.byteLength),P.set(_),P.set(I,_.byteLength),P}},Me=function(T){var _,I,P=[],j=[];for(j.byteLength=0,j.nalCount=0,j.duration=0,P.byteLength=0,_=0;_<T.length;_++)I=T[_],I.nalUnitType==="access_unit_delimiter_rbsp"?(P.length&&(P.duration=I.dts-P.dts,j.byteLength+=P.byteLength,j.nalCount+=P.length,j.duration+=P.duration,j.push(P)),P=[I],P.byteLength=I.data.byteLength,P.pts=I.pts,P.dts=I.dts):(I.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(P.keyFrame=!0),P.duration=I.dts-P.dts,P.byteLength+=I.data.byteLength,P.push(I));return j.length&&(!P.duration||P.duration<=0)&&(P.duration=j[j.length-1].duration),j.byteLength+=P.byteLength,j.nalCount+=P.length,j.duration+=P.duration,j.push(P),j},lt=function(T){var _,I,P=[],j=[];for(P.byteLength=0,P.nalCount=0,P.duration=0,P.pts=T[0].pts,P.dts=T[0].dts,j.byteLength=0,j.nalCount=0,j.duration=0,j.pts=T[0].pts,j.dts=T[0].dts,_=0;_<T.length;_++)I=T[_],I.keyFrame?(P.length&&(j.push(P),j.byteLength+=P.byteLength,j.nalCount+=P.nalCount,j.duration+=P.duration),P=[I],P.nalCount=I.length,P.byteLength=I.byteLength,P.pts=I.pts,P.dts=I.dts,P.duration=I.duration):(P.duration+=I.duration,P.nalCount+=I.length,P.byteLength+=I.byteLength,P.push(I));return j.length&&P.duration<=0&&(P.duration=j[j.length-1].duration),j.byteLength+=P.byteLength,j.nalCount+=P.nalCount,j.duration+=P.duration,j.push(P),j},bt=function(T){var _;return!T[0][0].keyFrame&&T.length>1&&(_=T.shift(),T.byteLength-=_.byteLength,T.nalCount-=_.nalCount,T[0][0].dts=_.dts,T[0][0].pts=_.pts,T[0][0].duration+=_.duration),T},mt=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},_t=function(T,_){var I=mt();return I.dataOffset=_,I.compositionTimeOffset=T.pts-T.dts,I.duration=T.duration,I.size=4*T.length,I.size+=T.byteLength,T.keyFrame&&(I.flags.dependsOn=2,I.flags.isNonSyncSample=0),I},Qt=function(T,_){var I,P,j,U,ae,le=_||0,de=[];for(I=0;I<T.length;I++)for(U=T[I],P=0;P<U.length;P++)ae=U[P],j=_t(ae,le),le+=j.size,de.push(j);return de},xt=function(T){var _,I,P,j,U,ae,le=0,de=T.byteLength,ce=T.nalCount,Se=de+4*ce,ze=new Uint8Array(Se),gt=new DataView(ze.buffer);for(_=0;_<T.length;_++)for(j=T[_],I=0;I<j.length;I++)for(U=j[I],P=0;P<U.length;P++)ae=U[P],gt.setUint32(le,ae.data.byteLength),le+=4,ze.set(ae.data,le),le+=ae.data.byteLength;return ze},wt=function(T,_){var I,P=_||0,j=[];return I=_t(T,P),j.push(I),j},Ot=function(T){var _,I,P=0,j=T.byteLength,U=T.length,ae=j+4*U,le=new Uint8Array(ae),de=new DataView(le.buffer);for(_=0;_<T.length;_++)I=T[_],de.setUint32(P,I.data.byteLength),P+=4,le.set(I.data,P),P+=I.data.byteLength;return le},qe={groupNalsIntoFrames:Me,groupFramesIntoGops:lt,extendFirstKeyFrame:bt,generateSampleTable:Qt,concatenateNalData:xt,generateSampleTableForFrame:wt,concatenateNalDataForFrame:Ot},Le=[33,16,5,32,164,27],He=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Xe=function(T){for(var _=[];T--;)_.push(0);return _},he=function(T){return Object.keys(T).reduce(function(_,I){return _[I]=new Uint8Array(T[I].reduce(function(P,j){return P.concat(j)},[])),_},{})},Ae,rt=function(){if(!Ae){var T={96e3:[Le,[227,64],Xe(154),[56]],88200:[Le,[231],Xe(170),[56]],64e3:[Le,[248,192],Xe(240),[56]],48e3:[Le,[255,192],Xe(268),[55,148,128],Xe(54),[112]],44100:[Le,[255,192],Xe(268),[55,163,128],Xe(84),[112]],32e3:[Le,[255,192],Xe(268),[55,234],Xe(226),[112]],24e3:[Le,[255,192],Xe(268),[55,255,128],Xe(268),[111,112],Xe(126),[224]],16e3:[Le,[255,192],Xe(268),[55,255,128],Xe(268),[111,255],Xe(269),[223,108],Xe(195),[1,192]],12e3:[He,Xe(268),[3,127,248],Xe(268),[6,255,240],Xe(268),[13,255,224],Xe(268),[27,253,128],Xe(259),[56]],11025:[He,Xe(268),[3,127,248],Xe(268),[6,255,240],Xe(268),[13,255,224],Xe(268),[27,255,192],Xe(268),[55,175,128],Xe(108),[112]],8e3:[He,Xe(268),[3,121,16],Xe(47),[7]]};Ae=he(T)}return Ae},$e=9e4,Ze,qt,jt,un,Pt,an,rr;Ze=function(T){return T*$e},qt=function(T,_){return T*_},jt=function(T){return T/$e},un=function(T,_){return T/_},Pt=function(T,_){return Ze(un(T,_))},an=function(T,_){return qt(jt(T),_)},rr=function(T,_,I){return jt(I?T:T-_)};var on={ONE_SECOND_IN_TS:$e,secondsToVideoTs:Ze,secondsToAudioTs:qt,videoTsToSeconds:jt,audioTsToSeconds:un,audioTsToVideoTs:Pt,videoTsToAudioTs:an,metadataTsToSeconds:rr},oi=rt,Hr=on,kn=function(T){var _,I,P=0;for(_=0;_<T.length;_++)I=T[_],P+=I.data.byteLength;return P},qr=function(T,_,I,P){var j,U=0,ae=0,le=0,de=0,ce,Se,ze;if(_.length&&(j=Hr.audioTsToVideoTs(T.baseMediaDecodeTime,T.samplerate),U=Math.ceil(Hr.ONE_SECOND_IN_TS/(T.samplerate/1024)),I&&P&&(ae=j-Math.max(I,P),le=Math.floor(ae/U),de=le*U),!(le<1||de>Hr.ONE_SECOND_IN_TS/2))){for(ce=oi()[T.samplerate],ce||(ce=_[0].data),Se=0;Se<le;Se++)ze=_[0],_.splice(0,0,{data:ce,dts:ze.dts-U,pts:ze.pts-U});return T.baseMediaDecodeTime-=Math.floor(Hr.videoTsToAudioTs(de,T.samplerate)),de}},xr=function(T,_,I){return _.minSegmentDts>=I?T:(_.minSegmentDts=1/0,T.filter(function(P){return P.dts>=I?(_.minSegmentDts=Math.min(_.minSegmentDts,P.dts),_.minSegmentPts=_.minSegmentDts,!0):!1}))},Ka=function(T){var _,I,P=[];for(_=0;_<T.length;_++)I=T[_],P.push({size:I.data.byteLength,duration:1024});return P},Os=function(T){var _,I,P=0,j=new Uint8Array(kn(T));for(_=0;_<T.length;_++)I=T[_],j.set(I.data,P),P+=I.data.byteLength;return j},us={prefixWithSilence:qr,trimAdtsFramesByEarliestDts:xr,generateSampleTable:Ka,concatenateFrameData:Os},cs=on.ONE_SECOND_IN_TS,J=function(T,_){typeof _.pts=="number"&&(T.timelineStartInfo.pts===void 0&&(T.timelineStartInfo.pts=_.pts),T.minSegmentPts===void 0?T.minSegmentPts=_.pts:T.minSegmentPts=Math.min(T.minSegmentPts,_.pts),T.maxSegmentPts===void 0?T.maxSegmentPts=_.pts:T.maxSegmentPts=Math.max(T.maxSegmentPts,_.pts)),typeof _.dts=="number"&&(T.timelineStartInfo.dts===void 0&&(T.timelineStartInfo.dts=_.dts),T.minSegmentDts===void 0?T.minSegmentDts=_.dts:T.minSegmentDts=Math.min(T.minSegmentDts,_.dts),T.maxSegmentDts===void 0?T.maxSegmentDts=_.dts:T.maxSegmentDts=Math.max(T.maxSegmentDts,_.dts))},re=function(T){delete T.minSegmentDts,delete T.maxSegmentDts,delete T.minSegmentPts,delete T.maxSegmentPts},ye=function(T,_){var I,P,j=T.minSegmentDts;return _||(j-=T.timelineStartInfo.dts),I=T.timelineStartInfo.baseMediaDecodeTime,I+=j,I=Math.max(0,I),T.type==="audio"&&(P=T.samplerate/cs,I*=P,I=Math.floor(I)),I},Be={clearDtsInfo:re,calculateTrackBaseMediaDecodeTime:ye,collectDtsInfo:J},ft=4,Nt=128,Zt=function(T){for(var _=0,I={payloadType:-1,payloadSize:0},P=0,j=0;_<T.byteLength&&T[_]!==Nt;){for(;T[_]===255;)P+=255,_++;for(P+=T[_++];T[_]===255;)j+=255,_++;if(j+=T[_++],!I.payload&&P===ft){var U=String.fromCharCode(T[_+3],T[_+4],T[_+5],T[_+6]);if(U==="GA94"){I.payloadType=P,I.payloadSize=j,I.payload=T.subarray(_,_+j);break}else I.payload=void 0}_+=j,P=0,j=0}return I},cr=function(T){return T.payload[0]!==181||(T.payload[1]<<8|T.payload[2])!==49||String.fromCharCode(T.payload[3],T.payload[4],T.payload[5],T.payload[6])!=="GA94"||T.payload[7]!==3?null:T.payload.subarray(8,T.payload.length-1)},ir=function(T,_){var I=[],P,j,U,ae;if(!(_[0]&64))return I;for(j=_[0]&31,P=0;P<j;P++)U=P*3,ae={type:_[U+2]&3,pts:T},_[U+2]&4&&(ae.ccData=_[U+3]<<8|_[U+4],I.push(ae));return I},En=function(T){for(var _=T.byteLength,I=[],P=1,j,U;P<_-2;)T[P]===0&&T[P+1]===0&&T[P+2]===3?(I.push(P+2),P+=2):P++;if(I.length===0)return T;j=_-I.length,U=new Uint8Array(j);var ae=0;for(P=0;P<j;ae++,P++)ae===I[0]&&(ae++,I.shift()),U[P]=T[ae];return U},On={parseSei:Zt,parseUserData:cr,parseCaptionPackets:ir,discardEmulationPreventionBytes:En,USER_DATA_REGISTERED_ITU_T_T35:ft},dr=n,Gr=On,ct=function(T){T=T||{},ct.prototype.init.call(this),this.parse708captions_=typeof T.parse708captions=="boolean"?T.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Fn(0,0),new Fn(0,1),new Fn(1,0),new Fn(1,1)],this.parse708captions_&&(this.cc708Stream_=new At({captionServices:T.captionServices})),this.reset(),this.ccStreams_.forEach(function(_){_.on("data",this.trigger.bind(this,"data")),_.on("partialdone",this.trigger.bind(this,"partialdone")),_.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")))};ct.prototype=new dr,ct.prototype.push=function(T){var _,I,P;if(T.nalUnitType==="sei_rbsp"&&(_=Gr.parseSei(T.escapedRBSP),!!_.payload&&_.payloadType===Gr.USER_DATA_REGISTERED_ITU_T_T35&&(I=Gr.parseUserData(_),!!I))){if(T.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(T.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}P=Gr.parseCaptionPackets(T.pts,I),this.captionPackets_=this.captionPackets_.concat(P),this.latestDts_!==T.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=T.dts}},ct.prototype.flushCCStreams=function(T){this.ccStreams_.forEach(function(_){return T==="flush"?_.flush():_.partialFlush()},this)},ct.prototype.flushStream=function(T){if(!this.captionPackets_.length){this.flushCCStreams(T);return}this.captionPackets_.forEach(function(_,I){_.presortIndex=I}),this.captionPackets_.sort(function(_,I){return _.pts===I.pts?_.presortIndex-I.presortIndex:_.pts-I.pts}),this.captionPackets_.forEach(function(_){_.type<2?this.dispatchCea608Packet(_):this.dispatchCea708Packet(_)},this),this.captionPackets_.length=0,this.flushCCStreams(T)},ct.prototype.flush=function(){return this.flushStream("flush")},ct.prototype.partialFlush=function(){return this.flushStream("partialFlush")},ct.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(T){T.reset()})},ct.prototype.dispatchCea608Packet=function(T){this.setsTextOrXDSActive(T)?this.activeCea608Channel_[T.type]=null:this.setsChannel1Active(T)?this.activeCea608Channel_[T.type]=0:this.setsChannel2Active(T)&&(this.activeCea608Channel_[T.type]=1),this.activeCea608Channel_[T.type]!==null&&this.ccStreams_[(T.type<<1)+this.activeCea608Channel_[T.type]].push(T)},ct.prototype.setsChannel1Active=function(T){return(T.ccData&30720)===4096},ct.prototype.setsChannel2Active=function(T){return(T.ccData&30720)===6144},ct.prototype.setsTextOrXDSActive=function(T){return(T.ccData&28928)===256||(T.ccData&30974)===4138||(T.ccData&30974)===6186},ct.prototype.dispatchCea708Packet=function(T){this.parse708captions_&&this.cc708Stream_.push(T)};var sn={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},cn=function(T){var _=sn[T]||T;return T&4096&&T===_?"":String.fromCharCode(_)},Zn=function(T){return 32<=T&&T<=127||160<=T&&T<=255},_n=function(T){this.windowNum=T,this.reset()};_n.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},_n.prototype.getText=function(){return this.rows.join(`
`)},_n.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},_n.prototype.newLine=function(T){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(T),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},_n.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},_n.prototype.addText=function(T){this.rows[this.rowIdx]+=T},_n.prototype.backspace=function(){if(!this.isEmpty()){var T=this.rows[this.rowIdx];this.rows[this.rowIdx]=T.substr(0,T.length-1)}};var _r=function(T,_,I){this.serviceNum=T,this.text="",this.currentWindow=new _n(-1),this.windows=[],this.stream=I,typeof _=="string"&&this.createTextDecoder(_)};_r.prototype.init=function(T,_){this.startPts=T;for(var I=0;I<8;I++)this.windows[I]=new _n(I),typeof _=="function"&&(this.windows[I].beforeRowOverflow=_)},_r.prototype.setCurrentWindow=function(T){this.currentWindow=this.windows[T]},_r.prototype.createTextDecoder=function(T){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(T)}catch(_){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+T+" encoding. "+_})}};var At=function(T){T=T||{},At.prototype.init.call(this);var _=this,I=T.captionServices||{},P={},j;Object.keys(I).forEach(U=>{j=I[U],/^SERVICE/.test(U)&&(P[U]=j.encoding)}),this.serviceEncodings=P,this.current708Packet=null,this.services={},this.push=function(U){U.type===3?(_.new708Packet(),_.add708Bytes(U)):(_.current708Packet===null&&_.new708Packet(),_.add708Bytes(U))}};At.prototype=new dr,At.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},At.prototype.add708Bytes=function(T){var _=T.ccData,I=_>>>8,P=_&255;this.current708Packet.ptsVals.push(T.pts),this.current708Packet.data.push(I),this.current708Packet.data.push(P)},At.prototype.push708Packet=function(){var T=this.current708Packet,_=T.data,I=null,P=null,j=0,U=_[j++];for(T.seq=U>>6,T.sizeCode=U&63;j<_.length;j++)U=_[j++],I=U>>5,P=U&31,I===7&&P>0&&(U=_[j++],I=U),this.pushServiceBlock(I,j,P),P>0&&(j+=P-1)},At.prototype.pushServiceBlock=function(T,_,I){var P,j=_,U=this.current708Packet.data,ae=this.services[T];for(ae||(ae=this.initService(T,j));j<_+I&&j<U.length;j++)P=U[j],Zn(P)?j=this.handleText(j,ae):P===24?j=this.multiByteCharacter(j,ae):P===16?j=this.extendedCommands(j,ae):128<=P&&P<=135?j=this.setCurrentWindow(j,ae):152<=P&&P<=159?j=this.defineWindow(j,ae):P===136?j=this.clearWindows(j,ae):P===140?j=this.deleteWindows(j,ae):P===137?j=this.displayWindows(j,ae):P===138?j=this.hideWindows(j,ae):P===139?j=this.toggleWindows(j,ae):P===151?j=this.setWindowAttributes(j,ae):P===144?j=this.setPenAttributes(j,ae):P===145?j=this.setPenColor(j,ae):P===146?j=this.setPenLocation(j,ae):P===143?ae=this.reset(j,ae):P===8?ae.currentWindow.backspace():P===12?ae.currentWindow.clearText():P===13?ae.currentWindow.pendingNewLine=!0:P===14?ae.currentWindow.clearText():P===141&&j++},At.prototype.extendedCommands=function(T,_){var I=this.current708Packet.data,P=I[++T];return Zn(P)&&(T=this.handleText(T,_,{isExtended:!0})),T},At.prototype.getPts=function(T){return this.current708Packet.ptsVals[Math.floor(T/2)]},At.prototype.initService=function(T,_){var P="SERVICE"+T,I=this,P,j;return P in this.serviceEncodings&&(j=this.serviceEncodings[P]),this.services[T]=new _r(T,j,I),this.services[T].init(this.getPts(_),function(U){I.flushDisplayed(U,I.services[T])}),this.services[T]},At.prototype.handleText=function(T,_,I){var P=I&&I.isExtended,j=I&&I.isMultiByte,U=this.current708Packet.data,ae=P?4096:0,le=U[T],de=U[T+1],ce=_.currentWindow,Se,ze;function gt(Ye){return Ye.map(Lt=>("0"+(Lt&255).toString(16)).slice(-2)).join("")}if(j?(ze=[le,de],T++):ze=[le],_.textDecoder_&&!P)Se=_.textDecoder_.decode(new Uint8Array(ze));else if(j){const Ye=gt(ze);Se=String.fromCharCode(parseInt(Ye,16))}else Se=cn(ae|le);return ce.pendingNewLine&&!ce.isEmpty()&&ce.newLine(this.getPts(T)),ce.pendingNewLine=!1,ce.addText(Se),T},At.prototype.multiByteCharacter=function(T,_){var I=this.current708Packet.data,P=I[T+1],j=I[T+2];return Zn(P)&&Zn(j)&&(T=this.handleText(++T,_,{isMultiByte:!0})),T},At.prototype.setCurrentWindow=function(T,_){var I=this.current708Packet.data,P=I[T],j=P&7;return _.setCurrentWindow(j),T},At.prototype.defineWindow=function(T,_){var I=this.current708Packet.data,P=I[T],j=P&7;_.setCurrentWindow(j);var U=_.currentWindow;return P=I[++T],U.visible=(P&32)>>5,U.rowLock=(P&16)>>4,U.columnLock=(P&8)>>3,U.priority=P&7,P=I[++T],U.relativePositioning=(P&128)>>7,U.anchorVertical=P&127,P=I[++T],U.anchorHorizontal=P,P=I[++T],U.anchorPoint=(P&240)>>4,U.rowCount=P&15,P=I[++T],U.columnCount=P&63,P=I[++T],U.windowStyle=(P&56)>>3,U.penStyle=P&7,U.virtualRowCount=U.rowCount+1,T},At.prototype.setWindowAttributes=function(T,_){var I=this.current708Packet.data,P=I[T],j=_.currentWindow.winAttr;return P=I[++T],j.fillOpacity=(P&192)>>6,j.fillRed=(P&48)>>4,j.fillGreen=(P&12)>>2,j.fillBlue=P&3,P=I[++T],j.borderType=(P&192)>>6,j.borderRed=(P&48)>>4,j.borderGreen=(P&12)>>2,j.borderBlue=P&3,P=I[++T],j.borderType+=(P&128)>>5,j.wordWrap=(P&64)>>6,j.printDirection=(P&48)>>4,j.scrollDirection=(P&12)>>2,j.justify=P&3,P=I[++T],j.effectSpeed=(P&240)>>4,j.effectDirection=(P&12)>>2,j.displayEffect=P&3,T},At.prototype.flushDisplayed=function(T,_){for(var I=[],P=0;P<8;P++)_.windows[P].visible&&!_.windows[P].isEmpty()&&I.push(_.windows[P].getText());_.endPts=T,_.text=I.join(`

`),this.pushCaption(_),_.startPts=T},At.prototype.pushCaption=function(T){T.text!==""&&(this.trigger("data",{startPts:T.startPts,endPts:T.endPts,text:T.text,stream:"cc708_"+T.serviceNum}),T.text="",T.startPts=T.endPts)},At.prototype.displayWindows=function(T,_){var I=this.current708Packet.data,P=I[++T],j=this.getPts(T);this.flushDisplayed(j,_);for(var U=0;U<8;U++)P&1<<U&&(_.windows[U].visible=1);return T},At.prototype.hideWindows=function(T,_){var I=this.current708Packet.data,P=I[++T],j=this.getPts(T);this.flushDisplayed(j,_);for(var U=0;U<8;U++)P&1<<U&&(_.windows[U].visible=0);return T},At.prototype.toggleWindows=function(T,_){var I=this.current708Packet.data,P=I[++T],j=this.getPts(T);this.flushDisplayed(j,_);for(var U=0;U<8;U++)P&1<<U&&(_.windows[U].visible^=1);return T},At.prototype.clearWindows=function(T,_){var I=this.current708Packet.data,P=I[++T],j=this.getPts(T);this.flushDisplayed(j,_);for(var U=0;U<8;U++)P&1<<U&&_.windows[U].clearText();return T},At.prototype.deleteWindows=function(T,_){var I=this.current708Packet.data,P=I[++T],j=this.getPts(T);this.flushDisplayed(j,_);for(var U=0;U<8;U++)P&1<<U&&_.windows[U].reset();return T},At.prototype.setPenAttributes=function(T,_){var I=this.current708Packet.data,P=I[T],j=_.currentWindow.penAttr;return P=I[++T],j.textTag=(P&240)>>4,j.offset=(P&12)>>2,j.penSize=P&3,P=I[++T],j.italics=(P&128)>>7,j.underline=(P&64)>>6,j.edgeType=(P&56)>>3,j.fontStyle=P&7,T},At.prototype.setPenColor=function(T,_){var I=this.current708Packet.data,P=I[T],j=_.currentWindow.penColor;return P=I[++T],j.fgOpacity=(P&192)>>6,j.fgRed=(P&48)>>4,j.fgGreen=(P&12)>>2,j.fgBlue=P&3,P=I[++T],j.bgOpacity=(P&192)>>6,j.bgRed=(P&48)>>4,j.bgGreen=(P&12)>>2,j.bgBlue=P&3,P=I[++T],j.edgeRed=(P&48)>>4,j.edgeGreen=(P&12)>>2,j.edgeBlue=P&3,T},At.prototype.setPenLocation=function(T,_){var I=this.current708Packet.data,P=I[T],j=_.currentWindow.penLoc;return _.currentWindow.pendingNewLine=!0,P=I[++T],j.row=P&15,P=I[++T],j.column=P&63,T},At.prototype.reset=function(T,_){var I=this.getPts(T);return this.flushDisplayed(I,_),this.initService(_.serviceNum,T)};var Wi={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},Ns=function(T){return T===null?"":(T=Wi[T]||T,String.fromCharCode(T))},Dr=14,Tp=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Qa=function(){for(var T=[],_=Dr+1;_--;)T.push({text:"",indent:0,offset:0});return T},Fn=function(T,_){Fn.prototype.init.call(this),this.field_=T||0,this.dataChannel_=_||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(I){var P,j,U,ae,le;if(P=I.ccData&32639,P===this.lastControlCode_){this.lastControlCode_=null;return}if((P&61440)===4096?this.lastControlCode_=P:P!==this.PADDING_&&(this.lastControlCode_=null),U=P>>>8,ae=P&255,P!==this.PADDING_)if(P===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(P===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(I.pts),this.flushDisplayed(I.pts),j=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=j,this.startPts_=I.pts;else if(P===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(I.pts);else if(P===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(I.pts);else if(P===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(I.pts);else if(P===this.CARRIAGE_RETURN_)this.clearFormatting(I.pts),this.flushDisplayed(I.pts),this.shiftRowsUp_(),this.startPts_=I.pts;else if(P===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(P===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(I.pts),this.displayed_=Qa();else if(P===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Qa();else if(P===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(I.pts),this.displayed_=Qa()),this.mode_="paintOn",this.startPts_=I.pts;else if(this.isSpecialCharacter(U,ae))U=(U&3)<<8,le=Ns(U|ae),this[this.mode_](I.pts,le),this.column_++;else if(this.isExtCharacter(U,ae))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),U=(U&3)<<8,le=Ns(U|ae),this[this.mode_](I.pts,le),this.column_++;else if(this.isMidRowCode(U,ae))this.clearFormatting(I.pts),this[this.mode_](I.pts," "),this.column_++,(ae&14)===14&&this.addFormatting(I.pts,["i"]),(ae&1)===1&&this.addFormatting(I.pts,["u"]);else if(this.isOffsetControlCode(U,ae)){const ce=ae&3;this.nonDisplayed_[this.row_].offset=ce,this.column_+=ce}else if(this.isPAC(U,ae)){var de=Tp.indexOf(P&7968);if(this.mode_==="rollUp"&&(de-this.rollUpRows_+1<0&&(de=this.rollUpRows_-1),this.setRollUp(I.pts,de)),de!==this.row_&&de>=0&&de<=14&&(this.clearFormatting(I.pts),this.row_=de),ae&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(I.pts,["u"]),(P&16)===16){const ce=(P&14)>>1;this.column_=ce*4,this.nonDisplayed_[this.row_].indent+=ce}this.isColorPAC(ae)&&(ae&14)===14&&this.addFormatting(I.pts,["i"])}else this.isNormalChar(U)&&(ae===0&&(ae=null),le=Ns(U),le+=Ns(ae),this[this.mode_](I.pts,le),this.column_+=le.length)}};Fn.prototype=new dr,Fn.prototype.flushDisplayed=function(T){const _=P=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+P+"."})},I=[];this.displayed_.forEach((P,j)=>{if(P&&P.text&&P.text.length){try{P.text=P.text.trim()}catch{_(j)}P.text.length&&I.push({text:P.text,line:j+1,position:10+Math.min(70,P.indent*10)+P.offset*2.5})}else P==null&&_(j)}),I.length&&this.trigger("data",{startPts:this.startPts_,endPts:T,content:I,stream:this.name_})},Fn.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Qa(),this.nonDisplayed_=Qa(),this.lastControlCode_=null,this.column_=0,this.row_=Dr,this.rollUpRows_=2,this.formatting_=[]},Fn.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},Fn.prototype.isSpecialCharacter=function(T,_){return T===this.EXT_&&_>=48&&_<=63},Fn.prototype.isExtCharacter=function(T,_){return(T===this.EXT_+1||T===this.EXT_+2)&&_>=32&&_<=63},Fn.prototype.isMidRowCode=function(T,_){return T===this.EXT_&&_>=32&&_<=47},Fn.prototype.isOffsetControlCode=function(T,_){return T===this.OFFSET_&&_>=33&&_<=35},Fn.prototype.isPAC=function(T,_){return T>=this.BASE_&&T<this.BASE_+8&&_>=64&&_<=127},Fn.prototype.isColorPAC=function(T){return T>=64&&T<=79||T>=96&&T<=127},Fn.prototype.isNormalChar=function(T){return T>=32&&T<=127},Fn.prototype.setRollUp=function(T,_){if(this.mode_!=="rollUp"&&(this.row_=Dr,this.mode_="rollUp",this.flushDisplayed(T),this.nonDisplayed_=Qa(),this.displayed_=Qa()),_!==void 0&&_!==this.row_)for(var I=0;I<this.rollUpRows_;I++)this.displayed_[_-I]=this.displayed_[this.row_-I],this.displayed_[this.row_-I]={text:"",indent:0,offset:0};_===void 0&&(_=this.row_),this.topRow_=_-this.rollUpRows_+1},Fn.prototype.addFormatting=function(T,_){this.formatting_=this.formatting_.concat(_);var I=_.reduce(function(P,j){return P+"<"+j+">"},"");this[this.mode_](T,I)},Fn.prototype.clearFormatting=function(T){if(this.formatting_.length){var _=this.formatting_.reverse().reduce(function(I,P){return I+"</"+P+">"},"");this.formatting_=[],this[this.mode_](T,_)}},Fn.prototype.popOn=function(T,_){var I=this.nonDisplayed_[this.row_].text;I+=_,this.nonDisplayed_[this.row_].text=I},Fn.prototype.rollUp=function(T,_){var I=this.displayed_[this.row_].text;I+=_,this.displayed_[this.row_].text=I},Fn.prototype.shiftRowsUp_=function(){var T;for(T=0;T<this.topRow_;T++)this.displayed_[T]={text:"",indent:0,offset:0};for(T=this.row_+1;T<Dr+1;T++)this.displayed_[T]={text:"",indent:0,offset:0};for(T=this.topRow_;T<this.row_;T++)this.displayed_[T]=this.displayed_[T+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Fn.prototype.paintOn=function(T,_){var I=this.displayed_[this.row_].text;I+=_,this.displayed_[this.row_].text=I};var No={CaptionStream:ct,Cea608Stream:Fn,Cea708Stream:At},Mo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},wp=n,qu=8589934592,b0=4294967296,Gu="shared",Nl=function(T,_){var I=1;for(T>_&&(I=-1);Math.abs(_-T)>b0;)T+=I*qu;return T},ds=function(T){var _,I;ds.prototype.init.call(this),this.type_=T||Gu,this.push=function(P){if(P.type==="metadata"){this.trigger("data",P);return}this.type_!==Gu&&P.type!==this.type_||(I===void 0&&(I=P.dts),P.dts=Nl(P.dts,I),P.pts=Nl(P.pts,I),_=P.dts,this.trigger("data",P))},this.flush=function(){I=_,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){I=void 0,_=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ds.prototype=new wp;var Wu={TimestampRolloverStream:ds,handleRollover:Nl},_f=(T,_,I)=>{if(!T)return-1;for(var P=I;P<T.length;P++)if(T[P]===_)return P;return-1},Ml={typedArrayIndexOf:_f},jl=Ml.typedArrayIndexOf,Ll={Utf8:3},Cp=function(T,_,I){var P,j="";for(P=_;P<I;P++)j+="%"+("00"+T[P].toString(16)).slice(-2);return j},jo=function(T,_,I){return decodeURIComponent(Cp(T,_,I))},li=function(T,_,I){return unescape(Cp(T,_,I))},Lo=function(T){return T[0]<<21|T[1]<<14|T[2]<<7|T[3]},Bo={APIC:function(T){var _=1,I,P,j="-->";T.data[0]===Ll.Utf8&&(I=jl(T.data,0,_),!(I<0)&&(T.mimeType=li(T.data,_,I),_=I+1,T.pictureType=T.data[_],_++,P=jl(T.data,0,_),!(P<0)&&(T.description=jo(T.data,_,P),_=P+1,T.mimeType===j?T.url=li(T.data,_,T.data.length):T.pictureData=T.data.subarray(_,T.data.length))))},"T*":function(T){T.data[0]===Ll.Utf8&&(T.value=jo(T.data,1,T.data.length).replace(/\0*$/,""),T.values=T.value.split("\0"))},TXXX:function(T){var _;T.data[0]===Ll.Utf8&&(_=jl(T.data,0,1),_!==-1&&(T.description=jo(T.data,1,_),T.value=jo(T.data,_+1,T.data.length).replace(/\0*$/,""),T.data=T.value))},"W*":function(T){T.url=li(T.data,0,T.data.length).replace(/\0.*$/,"")},WXXX:function(T){var _;T.data[0]===Ll.Utf8&&(_=jl(T.data,0,1),_!==-1&&(T.description=jo(T.data,1,_),T.url=li(T.data,_+1,T.data.length).replace(/\0.*$/,"")))},PRIV:function(T){var _;for(_=0;_<T.data.length;_++)if(T.data[_]===0){T.owner=li(T.data,0,_);break}T.privateData=T.data.subarray(_+1),T.data=T.privateData}},Zc=function(T){var _,I,P=10,j=0,U=[];if(!(T.length<10||T[0]!==73||T[1]!==68||T[2]!==51)){j=Lo(T.subarray(6,10)),j+=10;var ae=T[5]&64;ae&&(P+=4,P+=Lo(T.subarray(10,14)),j-=Lo(T.subarray(16,20)));do{if(_=Lo(T.subarray(P+4,P+8)),_<1)break;I=String.fromCharCode(T[P],T[P+1],T[P+2],T[P+3]);var le={id:I,data:T.subarray(P+10,P+_+10)};le.key=le.id,Bo[le.id]?Bo[le.id](le):le.id[0]==="T"?Bo["T*"](le):le.id[0]==="W"&&Bo["W*"](le),U.push(le),P+=10,P+=_}while(P<j);return U}},Jc={parseId3Frames:Zc,parseSyncSafeInteger:Lo,frameParsers:Bo},Fo=n,Ep=Mo,Wr=Jc,Uo;Uo=function(T){var _={descriptor:T&&T.descriptor},I=0,P=[],j=0,U;if(Uo.prototype.init.call(this),this.dispatchType=Ep.METADATA_STREAM_TYPE.toString(16),_.descriptor)for(U=0;U<_.descriptor.length;U++)this.dispatchType+=("00"+_.descriptor[U].toString(16)).slice(-2);this.push=function(ae){var le,de,ce,Se,ze,gt;if(ae.type==="timed-metadata"){if(ae.dataAlignmentIndicator&&(j=0,P.length=0),P.length===0&&(ae.data.length<10||ae.data[0]!==73||ae.data[1]!==68||ae.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(P.push(ae),j+=ae.data.byteLength,P.length===1&&(I=Wr.parseSyncSafeInteger(ae.data.subarray(6,10)),I+=10),!(j<I)){for(le={data:new Uint8Array(I),frames:[],pts:P[0].pts,dts:P[0].dts},ze=0;ze<I;)le.data.set(P[0].data.subarray(0,I-ze),ze),ze+=P[0].data.byteLength,j-=P[0].data.byteLength,P.shift();de=10,le.data[5]&64&&(de+=4,de+=Wr.parseSyncSafeInteger(le.data.subarray(10,14)),I-=Wr.parseSyncSafeInteger(le.data.subarray(16,20)));do{if(ce=Wr.parseSyncSafeInteger(le.data.subarray(de+4,de+8)),ce<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(gt=String.fromCharCode(le.data[de],le.data[de+1],le.data[de+2],le.data[de+3]),Se={id:gt,data:le.data.subarray(de+10,de+ce+10)},Se.key=Se.id,Wr.frameParsers[Se.id]?Wr.frameParsers[Se.id](Se):Se.id[0]==="T"?Wr.frameParsers["T*"](Se):Se.id[0]==="W"&&Wr.frameParsers["W*"](Se),Se.owner==="com.apple.streaming.transportStreamTimestamp"){var Ye=Se.data,Lt=(Ye[3]&1)<<30|Ye[4]<<22|Ye[5]<<14|Ye[6]<<6|Ye[7]>>>2;Lt*=4,Lt+=Ye[7]&3,Se.timeStamp=Lt,le.pts===void 0&&le.dts===void 0&&(le.pts=Se.timeStamp,le.dts=Se.timeStamp),this.trigger("timestamp",Se)}le.frames.push(Se),de+=10,de+=ce}while(de<I);this.trigger("data",le)}}}},Uo.prototype=new Fo;var Sf=Uo,zo=n,Za=No,Xi=Mo,ed=Wu.TimestampRolloverStream,Ms,ta,Bl,Ja=188,Xu=71;Ms=function(){var T=new Uint8Array(Ja),_=0;Ms.prototype.init.call(this),this.push=function(I){var P=0,j=Ja,U;for(_?(U=new Uint8Array(I.byteLength+_),U.set(T.subarray(0,_)),U.set(I,_),_=0):U=I;j<U.byteLength;){if(U[P]===Xu&&U[j]===Xu){this.trigger("data",U.subarray(P,j)),P+=Ja,j+=Ja;continue}P++,j++}P<U.byteLength&&(T.set(U.subarray(P),0),_=U.byteLength-P)},this.flush=function(){_===Ja&&T[0]===Xu&&(this.trigger("data",T),_=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){_=0,this.trigger("reset")}},Ms.prototype=new zo,ta=function(){var T,_,I,P;ta.prototype.init.call(this),P=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,T=function(j,U){var ae=0;U.payloadUnitStartIndicator&&(ae+=j[ae]+1),U.type==="pat"?_(j.subarray(ae),U):I(j.subarray(ae),U)},_=function(j,U){U.section_number=j[7],U.last_section_number=j[8],P.pmtPid=(j[10]&31)<<8|j[11],U.pmtPid=P.pmtPid},I=function(j,U){var ae,le,de,ce;if(j[5]&1){for(P.programMapTable={video:null,audio:null,"timed-metadata":{}},ae=(j[1]&15)<<8|j[2],le=3+ae-4,de=(j[10]&15)<<8|j[11],ce=12+de;ce<le;){var Se=j[ce],ze=(j[ce+1]&31)<<8|j[ce+2];Se===Xi.H264_STREAM_TYPE&&P.programMapTable.video===null?P.programMapTable.video=ze:Se===Xi.ADTS_STREAM_TYPE&&P.programMapTable.audio===null?P.programMapTable.audio=ze:Se===Xi.METADATA_STREAM_TYPE&&(P.programMapTable["timed-metadata"][ze]=Se),ce+=((j[ce+3]&15)<<8|j[ce+4])+5}U.programMapTable=P.programMapTable}},this.push=function(j){var U={},ae=4;if(U.payloadUnitStartIndicator=!!(j[1]&64),U.pid=j[1]&31,U.pid<<=8,U.pid|=j[2],(j[3]&48)>>>4>1&&(ae+=j[ae]+1),U.pid===0)U.type="pat",T(j.subarray(ae),U),this.trigger("data",U);else if(U.pid===this.pmtPid)for(U.type="pmt",T(j.subarray(ae),U),this.trigger("data",U);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([j,ae,U]):this.processPes_(j,ae,U)},this.processPes_=function(j,U,ae){ae.pid===this.programMapTable.video?ae.streamType=Xi.H264_STREAM_TYPE:ae.pid===this.programMapTable.audio?ae.streamType=Xi.ADTS_STREAM_TYPE:ae.streamType=this.programMapTable["timed-metadata"][ae.pid],ae.type="pes",ae.data=j.subarray(U),this.trigger("data",ae)}},ta.prototype=new zo,ta.STREAM_TYPES={h264:27,adts:15},Bl=function(){var T=this,_=!1,I={data:[],size:0},P={data:[],size:0},j={data:[],size:0},U,ae=function(de,ce){var Se;const ze=de[0]<<16|de[1]<<8|de[2];ce.data=new Uint8Array,ze===1&&(ce.packetLength=6+(de[4]<<8|de[5]),ce.dataAlignmentIndicator=(de[6]&4)!==0,Se=de[7],Se&192&&(ce.pts=(de[9]&14)<<27|(de[10]&255)<<20|(de[11]&254)<<12|(de[12]&255)<<5|(de[13]&254)>>>3,ce.pts*=4,ce.pts+=(de[13]&6)>>>1,ce.dts=ce.pts,Se&64&&(ce.dts=(de[14]&14)<<27|(de[15]&255)<<20|(de[16]&254)<<12|(de[17]&255)<<5|(de[18]&254)>>>3,ce.dts*=4,ce.dts+=(de[18]&6)>>>1)),ce.data=de.subarray(9+de[8]))},le=function(de,ce,Se){var ze=new Uint8Array(de.size),gt={type:ce},Ye=0,Lt=0,Ct=!1,jr;if(!(!de.data.length||de.size<9)){for(gt.trackId=de.data[0].pid,Ye=0;Ye<de.data.length;Ye++)jr=de.data[Ye],ze.set(jr.data,Lt),Lt+=jr.data.byteLength;ae(ze,gt),Ct=ce==="video"||gt.packetLength<=de.size,(Se||Ct)&&(de.size=0,de.data.length=0),Ct&&T.trigger("data",gt)}};Bl.prototype.init.call(this),this.push=function(de){({pat:function(){},pes:function(){var ce,Se;switch(de.streamType){case Xi.H264_STREAM_TYPE:ce=I,Se="video";break;case Xi.ADTS_STREAM_TYPE:ce=P,Se="audio";break;case Xi.METADATA_STREAM_TYPE:ce=j,Se="timed-metadata";break;default:return}de.payloadUnitStartIndicator&&le(ce,Se,!0),ce.data.push(de),ce.size+=de.data.byteLength},pmt:function(){var ce={type:"metadata",tracks:[]};U=de.programMapTable,U.video!==null&&ce.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+U.video,codec:"avc",type:"video"}),U.audio!==null&&ce.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+U.audio,codec:"adts",type:"audio"}),_=!0,T.trigger("data",ce)}})[de.type]()},this.reset=function(){I.size=0,I.data.length=0,P.size=0,P.data.length=0,this.trigger("reset")},this.flushStreams_=function(){le(I,"video"),le(P,"audio"),le(j,"timed-metadata")},this.flush=function(){if(!_&&U){var de={type:"metadata",tracks:[]};U.video!==null&&de.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+U.video,codec:"avc",type:"video"}),U.audio!==null&&de.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+U.audio,codec:"adts",type:"audio"}),T.trigger("data",de)}_=!1,this.flushStreams_(),this.trigger("done")}},Bl.prototype=new zo;var Tf={PAT_PID:0,MP2T_PACKET_LENGTH:Ja,TransportPacketStream:Ms,TransportParseStream:ta,ElementaryStream:Bl,TimestampRolloverStream:ed,CaptionStream:Za.CaptionStream,Cea608Stream:Za.Cea608Stream,Cea708Stream:Za.Cea708Stream,MetadataStream:Sf};for(var td in Xi)Xi.hasOwnProperty(td)&&(Tf[td]=Xi[td]);var Yu=Tf,nd=n,wf=on.ONE_SECOND_IN_TS,Aa,$o=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Aa=function(T){var _,I=0;Aa.prototype.init.call(this),this.skipWarn_=function(P,j){this.trigger("log",{level:"warn",message:`adts skiping bytes ${P} to ${j} in frame ${I} outside syncword`})},this.push=function(P){var j=0,U,ae,le,de,ce;if(T||(I=0),P.type==="audio"){_&&_.length?(le=_,_=new Uint8Array(le.byteLength+P.data.byteLength),_.set(le),_.set(P.data,le.byteLength)):_=P.data;for(var Se;j+7<_.length;){if(_[j]!==255||(_[j+1]&246)!==240){typeof Se!="number"&&(Se=j),j++;continue}if(typeof Se=="number"&&(this.skipWarn_(Se,j),Se=null),ae=(~_[j+1]&1)*2,U=(_[j+3]&3)<<11|_[j+4]<<3|(_[j+5]&224)>>5,de=((_[j+6]&3)+1)*1024,ce=de*wf/$o[(_[j+2]&60)>>>2],_.byteLength-j<U)break;this.trigger("data",{pts:P.pts+I*ce,dts:P.dts+I*ce,sampleCount:de,audioobjecttype:(_[j+2]>>>6&3)+1,channelcount:(_[j+2]&1)<<2|(_[j+3]&192)>>>6,samplerate:$o[(_[j+2]&60)>>>2],samplingfrequencyindex:(_[j+2]&60)>>>2,samplesize:16,data:_.subarray(j+7+ae,j+U)}),I++,j+=U}typeof Se=="number"&&(this.skipWarn_(Se,j),Se=null),_=_.subarray(j)}},this.flush=function(){I=0,this.trigger("done")},this.reset=function(){_=void 0,this.trigger("reset")},this.endTimeline=function(){_=void 0,this.trigger("endedtimeline")}},Aa.prototype=new nd;var Cf=Aa,rd;rd=function(T){var _=T.byteLength,I=0,P=0;this.length=function(){return 8*_},this.bitsAvailable=function(){return 8*_+P},this.loadWord=function(){var j=T.byteLength-_,U=new Uint8Array(4),ae=Math.min(4,_);if(ae===0)throw new Error("no bytes available");U.set(T.subarray(j,j+ae)),I=new DataView(U.buffer).getUint32(0),P=ae*8,_-=ae},this.skipBits=function(j){var U;P>j?(I<<=j,P-=j):(j-=P,U=Math.floor(j/8),j-=U*8,_-=U,this.loadWord(),I<<=j,P-=j)},this.readBits=function(j){var U=Math.min(P,j),ae=I>>>32-U;return P-=U,P>0?I<<=U:_>0&&this.loadWord(),U=j-U,U>0?ae<<U|this.readBits(U):ae},this.skipLeadingZeros=function(){var j;for(j=0;j<P;++j)if((I&2147483648>>>j)!==0)return I<<=j,P-=j,j;return this.loadWord(),j+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var j=this.skipLeadingZeros();return this.readBits(j+1)-1},this.readExpGolomb=function(){var j=this.readUnsignedExpGolomb();return 1&j?1+j>>>1:-1*(j>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Ap=rd,Fl=n,Da=Ap,eo,to,ka;to=function(){var T=0,_,I;to.prototype.init.call(this),this.push=function(P){var j;I?(j=new Uint8Array(I.byteLength+P.data.byteLength),j.set(I),j.set(P.data,I.byteLength),I=j):I=P.data;for(var U=I.byteLength;T<U-3;T++)if(I[T+2]===1){_=T+5;break}for(;_<U;)switch(I[_]){case 0:if(I[_-1]!==0){_+=2;break}else if(I[_-2]!==0){_++;break}T+3!==_-2&&this.trigger("data",I.subarray(T+3,_-2));do _++;while(I[_]!==1&&_<U);T=_-2,_+=3;break;case 1:if(I[_-1]!==0||I[_-2]!==0){_+=3;break}this.trigger("data",I.subarray(T+3,_-2)),T=_-2,_+=3;break;default:_+=3;break}I=I.subarray(T),_-=T,T=0},this.reset=function(){I=null,T=0,this.trigger("reset")},this.flush=function(){I&&I.byteLength>3&&this.trigger("data",I.subarray(T+3)),I=null,T=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},to.prototype=new Fl,ka={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},eo=function(){var T=new to,_,I,P,j,U,ae,le;eo.prototype.init.call(this),_=this,this.push=function(de){de.type==="video"&&(I=de.trackId,P=de.pts,j=de.dts,T.push(de))},T.on("data",function(de){var ce={trackId:I,pts:P,dts:j,data:de,nalUnitTypeCode:de[0]&31};switch(ce.nalUnitTypeCode){case 5:ce.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:ce.nalUnitType="sei_rbsp",ce.escapedRBSP=U(de.subarray(1));break;case 7:ce.nalUnitType="seq_parameter_set_rbsp",ce.escapedRBSP=U(de.subarray(1)),ce.config=ae(ce.escapedRBSP);break;case 8:ce.nalUnitType="pic_parameter_set_rbsp";break;case 9:ce.nalUnitType="access_unit_delimiter_rbsp";break}_.trigger("data",ce)}),T.on("done",function(){_.trigger("done")}),T.on("partialdone",function(){_.trigger("partialdone")}),T.on("reset",function(){_.trigger("reset")}),T.on("endedtimeline",function(){_.trigger("endedtimeline")}),this.flush=function(){T.flush()},this.partialFlush=function(){T.partialFlush()},this.reset=function(){T.reset()},this.endTimeline=function(){T.endTimeline()},le=function(de,ce){var Se=8,ze=8,gt,Ye;for(gt=0;gt<de;gt++)ze!==0&&(Ye=ce.readExpGolomb(),ze=(Se+Ye+256)%256),Se=ze===0?Se:ze},U=function(de){for(var ce=de.byteLength,Se=[],ze=1,gt,Ye;ze<ce-2;)de[ze]===0&&de[ze+1]===0&&de[ze+2]===3?(Se.push(ze+2),ze+=2):ze++;if(Se.length===0)return de;gt=ce-Se.length,Ye=new Uint8Array(gt);var Lt=0;for(ze=0;ze<gt;Lt++,ze++)Lt===Se[0]&&(Lt++,Se.shift()),Ye[ze]=de[Lt];return Ye},ae=function(de){var ce=0,Se=0,ze=0,gt=0,Ye,Lt,Ct,jr,ui,vs,tl,oa,ti,pc,mc,or=[1,1],nu,ci;if(Ye=new Da(de),Lt=Ye.readUnsignedByte(),jr=Ye.readUnsignedByte(),Ct=Ye.readUnsignedByte(),Ye.skipUnsignedExpGolomb(),ka[Lt]&&(ui=Ye.readUnsignedExpGolomb(),ui===3&&Ye.skipBits(1),Ye.skipUnsignedExpGolomb(),Ye.skipUnsignedExpGolomb(),Ye.skipBits(1),Ye.readBoolean()))for(mc=ui!==3?8:12,ci=0;ci<mc;ci++)Ye.readBoolean()&&(ci<6?le(16,Ye):le(64,Ye));if(Ye.skipUnsignedExpGolomb(),vs=Ye.readUnsignedExpGolomb(),vs===0)Ye.readUnsignedExpGolomb();else if(vs===1)for(Ye.skipBits(1),Ye.skipExpGolomb(),Ye.skipExpGolomb(),tl=Ye.readUnsignedExpGolomb(),ci=0;ci<tl;ci++)Ye.skipExpGolomb();if(Ye.skipUnsignedExpGolomb(),Ye.skipBits(1),oa=Ye.readUnsignedExpGolomb(),ti=Ye.readUnsignedExpGolomb(),pc=Ye.readBits(1),pc===0&&Ye.skipBits(1),Ye.skipBits(1),Ye.readBoolean()&&(ce=Ye.readUnsignedExpGolomb(),Se=Ye.readUnsignedExpGolomb(),ze=Ye.readUnsignedExpGolomb(),gt=Ye.readUnsignedExpGolomb()),Ye.readBoolean()&&Ye.readBoolean()){switch(nu=Ye.readUnsignedByte(),nu){case 1:or=[1,1];break;case 2:or=[12,11];break;case 3:or=[10,11];break;case 4:or=[16,11];break;case 5:or=[40,33];break;case 6:or=[24,11];break;case 7:or=[20,11];break;case 8:or=[32,11];break;case 9:or=[80,33];break;case 10:or=[18,11];break;case 11:or=[15,11];break;case 12:or=[64,33];break;case 13:or=[160,99];break;case 14:or=[4,3];break;case 15:or=[3,2];break;case 16:or=[2,1];break;case 255:{or=[Ye.readUnsignedByte()<<8|Ye.readUnsignedByte(),Ye.readUnsignedByte()<<8|Ye.readUnsignedByte()];break}}or&&or[0]/or[1]}return{profileIdc:Lt,levelIdc:Ct,profileCompatibility:jr,width:(oa+1)*16-ce*2-Se*2,height:(2-pc)*(ti+1)*16-ze*2-gt*2,sarRatio:or}}},eo.prototype=new Fl;var Ef={H264Stream:eo},id=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Af=function(T,_){var I=T[_+6]<<21|T[_+7]<<14|T[_+8]<<7|T[_+9],P=T[_+5],j=(P&16)>>4;return I=I>=0?I:0,j?I+20:I+10},zn=function(T,_){return T.length-_<10||T[_]!==73||T[_+1]!==68||T[_+2]!==51?_:(_+=Af(T,_),zn(T,_))},$n=function(T){var _=zn(T,0);return T.length>=_+2&&(T[_]&255)===255&&(T[_+1]&240)===240&&(T[_+1]&22)===16},Df=function(T){return T[0]<<21|T[1]<<14|T[2]<<7|T[3]},Ri=function(T,_,I){var P,j="";for(P=_;P<I;P++)j+="%"+("00"+T[P].toString(16)).slice(-2);return j},Vo=function(T,_,I){return unescape(Ri(T,_,I))},sd=function(T,_){var I=(T[_+5]&224)>>5,P=T[_+4]<<3,j=T[_+3]&6144;return j|P|I},Ku=function(T,_){return T[_]===73&&T[_+1]===68&&T[_+2]===51?"timed-metadata":T[_]&!0&&(T[_+1]&240)===240?"audio":null},x0=function(T){for(var _=0;_+5<T.length;){if(T[_]!==255||(T[_+1]&246)!==240){_++;continue}return id[(T[_+2]&60)>>>2]}return null},ad=function(T){var _,I,P,j;_=10,T[5]&64&&(_+=4,_+=Df(T.subarray(10,14)));do{if(I=Df(T.subarray(_+4,_+8)),I<1)return null;if(j=String.fromCharCode(T[_],T[_+1],T[_+2],T[_+3]),j==="PRIV"){P=T.subarray(_+10,_+I+10);for(var U=0;U<P.byteLength;U++)if(P[U]===0){var ae=Vo(P,0,U);if(ae==="com.apple.streaming.transportStreamTimestamp"){var le=P.subarray(U+1),de=(le[3]&1)<<30|le[4]<<22|le[5]<<14|le[6]<<6|le[7]>>>2;return de*=4,de+=le[7]&3,de}break}}_+=10,_+=I}while(_<T.byteLength);return null},Qu={isLikelyAacData:$n,parseId3TagSize:Af,parseAdtsSize:sd,parseType:Ku,parseSampleRate:x0,parseAacTimestamp:ad},kr=n,Ho=Qu,js;js=function(){var T=new Uint8Array,_=0;js.prototype.init.call(this),this.setTimestamp=function(I){_=I},this.push=function(I){var P=0,j=0,U,ae,le,de;for(T.length?(de=T.length,T=new Uint8Array(I.byteLength+de),T.set(T.subarray(0,de)),T.set(I,de)):T=I;T.length-j>=3;){if(T[j]===73&&T[j+1]===68&&T[j+2]===51){if(T.length-j<10||(P=Ho.parseId3TagSize(T,j),j+P>T.length))break;ae={type:"timed-metadata",data:T.subarray(j,j+P)},this.trigger("data",ae),j+=P;continue}else if((T[j]&255)===255&&(T[j+1]&240)===240){if(T.length-j<7||(P=Ho.parseAdtsSize(T,j),j+P>T.length))break;le={type:"audio",data:T.subarray(j,j+P),pts:_,dts:_},this.trigger("data",le),j+=P;continue}j++}U=T.length-j,U>0?T=T.subarray(j):T=new Uint8Array},this.reset=function(){T=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){T=new Uint8Array,this.trigger("endedtimeline")}},js.prototype=new kr;var Dp=js,kf=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],fs=kf,od=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],kp=od,Zu=n,Ul=Ke,zl=qe,Ju=us,fr=Be,Ra=Yu,wi=on,Rp=Cf,Pp=Ef.H264Stream,na=Dp,ld=Qu.isLikelyAacData,Rf=on.ONE_SECOND_IN_TS,sr=fs,ra=kp,$l,ec,Vl,qo,_0=function(T,_){_.stream=T,this.trigger("log",_)},Ip=function(T,_){for(var I=Object.keys(_),P=0;P<I.length;P++){var j=I[P];j==="headOfPipeline"||!_[j].on||_[j].on("log",_0.bind(T,j))}},Pf=function(T,_){var I;if(T.length!==_.length)return!1;for(I=0;I<T.length;I++)if(T[I]!==_[I])return!1;return!0},tc=function(T,_,I,P,j,U){var ae=I-_,le=P-_,de=j-I;return{start:{dts:T,pts:T+ae},end:{dts:T+le,pts:T+de},prependedContentDuration:U,baseMediaDecodeTime:T}};ec=function(T,_){var I=[],P,j=0,U=0,ae=1/0;_=_||{},P=_.firstSequenceNumber||0,ec.prototype.init.call(this),this.push=function(le){fr.collectDtsInfo(T,le),T&&sr.forEach(function(de){T[de]=le[de]}),I.push(le)},this.setEarliestDts=function(le){j=le},this.setVideoBaseMediaDecodeTime=function(le){ae=le},this.setAudioAppendStart=function(le){U=le},this.flush=function(){var le,de,ce,Se,ze,gt,Ye;if(I.length===0){this.trigger("done","AudioSegmentStream");return}le=Ju.trimAdtsFramesByEarliestDts(I,T,j),T.baseMediaDecodeTime=fr.calculateTrackBaseMediaDecodeTime(T,_.keepOriginalTimestamps),Ye=Ju.prefixWithSilence(T,le,U,ae),T.samples=Ju.generateSampleTable(le),ce=Ul.mdat(Ju.concatenateFrameData(le)),I=[],de=Ul.moof(P,[T]),Se=new Uint8Array(de.byteLength+ce.byteLength),P++,Se.set(de),Se.set(ce,de.byteLength),fr.clearDtsInfo(T),ze=Math.ceil(Rf*1024/T.samplerate),le.length&&(gt=le.length*ze,this.trigger("segmentTimingInfo",tc(wi.audioTsToVideoTs(T.baseMediaDecodeTime,T.samplerate),le[0].dts,le[0].pts,le[0].dts+gt,le[0].pts+gt,Ye||0)),this.trigger("timingInfo",{start:le[0].pts,end:le[0].pts+gt})),this.trigger("data",{track:T,boxes:Se}),this.trigger("done","AudioSegmentStream")},this.reset=function(){fr.clearDtsInfo(T),I=[],this.trigger("reset")}},ec.prototype=new Zu,$l=function(T,_){var I,P=[],j=[],U,ae;_=_||{},I=_.firstSequenceNumber||0,$l.prototype.init.call(this),delete T.minPTS,this.gopCache_=[],this.push=function(le){fr.collectDtsInfo(T,le),le.nalUnitType==="seq_parameter_set_rbsp"&&!U&&(U=le.config,T.sps=[le.data],ra.forEach(function(de){T[de]=U[de]},this)),le.nalUnitType==="pic_parameter_set_rbsp"&&!ae&&(ae=le.data,T.pps=[le.data]),P.push(le)},this.flush=function(){for(var le,de,ce,Se,ze,gt,Ye=0,Lt,Ct;P.length&&P[0].nalUnitType!=="access_unit_delimiter_rbsp";)P.shift();if(P.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(le=zl.groupNalsIntoFrames(P),ce=zl.groupFramesIntoGops(le),ce[0][0].keyFrame||(de=this.getGopForFusion_(P[0],T),de?(Ye=de.duration,ce.unshift(de),ce.byteLength+=de.byteLength,ce.nalCount+=de.nalCount,ce.pts=de.pts,ce.dts=de.dts,ce.duration+=de.duration):ce=zl.extendFirstKeyFrame(ce)),j.length){var jr;if(_.alignGopsAtEnd?jr=this.alignGopsAtEnd_(ce):jr=this.alignGopsAtStart_(ce),!jr){this.gopCache_.unshift({gop:ce.pop(),pps:T.pps,sps:T.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),P=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}fr.clearDtsInfo(T),ce=jr}fr.collectDtsInfo(T,ce),T.samples=zl.generateSampleTable(ce),ze=Ul.mdat(zl.concatenateNalData(ce)),T.baseMediaDecodeTime=fr.calculateTrackBaseMediaDecodeTime(T,_.keepOriginalTimestamps),this.trigger("processedGopsInfo",ce.map(function(ui){return{pts:ui.pts,dts:ui.dts,byteLength:ui.byteLength}})),Lt=ce[0],Ct=ce[ce.length-1],this.trigger("segmentTimingInfo",tc(T.baseMediaDecodeTime,Lt.dts,Lt.pts,Ct.dts+Ct.duration,Ct.pts+Ct.duration,Ye)),this.trigger("timingInfo",{start:ce[0].pts,end:ce[ce.length-1].pts+ce[ce.length-1].duration}),this.gopCache_.unshift({gop:ce.pop(),pps:T.pps,sps:T.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),P=[],this.trigger("baseMediaDecodeTime",T.baseMediaDecodeTime),this.trigger("timelineStartInfo",T.timelineStartInfo),Se=Ul.moof(I,[T]),gt=new Uint8Array(Se.byteLength+ze.byteLength),I++,gt.set(Se),gt.set(ze,Se.byteLength),this.trigger("data",{track:T,boxes:gt}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),P=[],this.gopCache_.length=0,j.length=0,this.trigger("reset")},this.resetStream_=function(){fr.clearDtsInfo(T),U=void 0,ae=void 0},this.getGopForFusion_=function(le){var de=45e3,ce=1/0,Se,ze,gt,Ye,Lt;for(Lt=0;Lt<this.gopCache_.length;Lt++)Ye=this.gopCache_[Lt],gt=Ye.gop,!(!(T.pps&&Pf(T.pps[0],Ye.pps[0]))||!(T.sps&&Pf(T.sps[0],Ye.sps[0])))&&(gt.dts<T.timelineStartInfo.dts||(Se=le.dts-gt.dts-gt.duration,Se>=-1e4&&Se<=de&&(!ze||ce>Se)&&(ze=Ye,ce=Se)));return ze?ze.gop:null},this.alignGopsAtStart_=function(le){var de,ce,Se,ze,gt,Ye,Lt,Ct;for(gt=le.byteLength,Ye=le.nalCount,Lt=le.duration,de=ce=0;de<j.length&&ce<le.length&&(Se=j[de],ze=le[ce],Se.pts!==ze.pts);){if(ze.pts>Se.pts){de++;continue}ce++,gt-=ze.byteLength,Ye-=ze.nalCount,Lt-=ze.duration}return ce===0?le:ce===le.length?null:(Ct=le.slice(ce),Ct.byteLength=gt,Ct.duration=Lt,Ct.nalCount=Ye,Ct.pts=Ct[0].pts,Ct.dts=Ct[0].dts,Ct)},this.alignGopsAtEnd_=function(le){var de,ce,Se,ze,gt,Ye;for(de=j.length-1,ce=le.length-1,gt=null,Ye=!1;de>=0&&ce>=0;){if(Se=j[de],ze=le[ce],Se.pts===ze.pts){Ye=!0;break}if(Se.pts>ze.pts){de--;continue}de===j.length-1&&(gt=ce),ce--}if(!Ye&&gt===null)return null;var Lt;if(Ye?Lt=ce:Lt=gt,Lt===0)return le;var Ct=le.slice(Lt),jr=Ct.reduce(function(ui,vs){return ui.byteLength+=vs.byteLength,ui.duration+=vs.duration,ui.nalCount+=vs.nalCount,ui},{byteLength:0,duration:0,nalCount:0});return Ct.byteLength=jr.byteLength,Ct.duration=jr.duration,Ct.nalCount=jr.nalCount,Ct.pts=Ct[0].pts,Ct.dts=Ct[0].dts,Ct},this.alignGopsWith=function(le){j=le}},$l.prototype=new Zu,qo=function(T,_){this.numberOfTracks=0,this.metadataStream=_,T=T||{},typeof T.remux<"u"?this.remuxTracks=!!T.remux:this.remuxTracks=!0,typeof T.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=T.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,qo.prototype.init.call(this),this.push=function(I){if(I.content||I.text)return this.pendingCaptions.push(I);if(I.frames)return this.pendingMetadata.push(I);this.pendingTracks.push(I.track),this.pendingBytes+=I.boxes.byteLength,I.track.type==="video"&&(this.videoTrack=I.track,this.pendingBoxes.push(I.boxes)),I.track.type==="audio"&&(this.audioTrack=I.track,this.pendingBoxes.unshift(I.boxes))}},qo.prototype=new Zu,qo.prototype.flush=function(T){var _=0,I={captions:[],captionStreams:{},metadata:[],info:{}},P,j,U,ae=0,le;if(this.pendingTracks.length<this.numberOfTracks){if(T!=="VideoSegmentStream"&&T!=="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?(ae=this.videoTrack.timelineStartInfo.pts,ra.forEach(function(de){I.info[de]=this.videoTrack[de]},this)):this.audioTrack&&(ae=this.audioTrack.timelineStartInfo.pts,sr.forEach(function(de){I.info[de]=this.audioTrack[de]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?I.type=this.pendingTracks[0].type:I.type="combined",this.emittedTracks+=this.pendingTracks.length,U=Ul.initSegment(this.pendingTracks),I.initSegment=new Uint8Array(U.byteLength),I.initSegment.set(U),I.data=new Uint8Array(this.pendingBytes),le=0;le<this.pendingBoxes.length;le++)I.data.set(this.pendingBoxes[le],_),_+=this.pendingBoxes[le].byteLength;for(le=0;le<this.pendingCaptions.length;le++)P=this.pendingCaptions[le],P.startTime=wi.metadataTsToSeconds(P.startPts,ae,this.keepOriginalTimestamps),P.endTime=wi.metadataTsToSeconds(P.endPts,ae,this.keepOriginalTimestamps),I.captionStreams[P.stream]=!0,I.captions.push(P);for(le=0;le<this.pendingMetadata.length;le++)j=this.pendingMetadata[le],j.cueTime=wi.metadataTsToSeconds(j.pts,ae,this.keepOriginalTimestamps),I.metadata.push(j);for(I.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",I),le=0;le<I.captions.length;le++)P=I.captions[le],this.trigger("caption",P);for(le=0;le<I.metadata.length;le++)j=I.metadata[le],this.trigger("id3Frame",j)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},qo.prototype.setRemux=function(T){this.remuxTracks=T},Vl=function(T){var _=this,I=!0,P,j;Vl.prototype.init.call(this),T=T||{},this.baseMediaDecodeTime=T.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var U={};this.transmuxPipeline_=U,U.type="aac",U.metadataStream=new Ra.MetadataStream,U.aacStream=new na,U.audioTimestampRolloverStream=new Ra.TimestampRolloverStream("audio"),U.timedMetadataTimestampRolloverStream=new Ra.TimestampRolloverStream("timed-metadata"),U.adtsStream=new Rp,U.coalesceStream=new qo(T,U.metadataStream),U.headOfPipeline=U.aacStream,U.aacStream.pipe(U.audioTimestampRolloverStream).pipe(U.adtsStream),U.aacStream.pipe(U.timedMetadataTimestampRolloverStream).pipe(U.metadataStream).pipe(U.coalesceStream),U.metadataStream.on("timestamp",function(ae){U.aacStream.setTimestamp(ae.timeStamp)}),U.aacStream.on("data",function(ae){ae.type!=="timed-metadata"&&ae.type!=="audio"||U.audioSegmentStream||(j=j||{timelineStartInfo:{baseMediaDecodeTime:_.baseMediaDecodeTime},codec:"adts",type:"audio"},U.coalesceStream.numberOfTracks++,U.audioSegmentStream=new ec(j,T),U.audioSegmentStream.on("log",_.getLogTrigger_("audioSegmentStream")),U.audioSegmentStream.on("timingInfo",_.trigger.bind(_,"audioTimingInfo")),U.adtsStream.pipe(U.audioSegmentStream).pipe(U.coalesceStream),_.trigger("trackinfo",{hasAudio:!!j,hasVideo:!!P}))}),U.coalesceStream.on("data",this.trigger.bind(this,"data")),U.coalesceStream.on("done",this.trigger.bind(this,"done")),Ip(this,U)},this.setupTsPipeline=function(){var U={};this.transmuxPipeline_=U,U.type="ts",U.metadataStream=new Ra.MetadataStream,U.packetStream=new Ra.TransportPacketStream,U.parseStream=new Ra.TransportParseStream,U.elementaryStream=new Ra.ElementaryStream,U.timestampRolloverStream=new Ra.TimestampRolloverStream,U.adtsStream=new Rp,U.h264Stream=new Pp,U.captionStream=new Ra.CaptionStream(T),U.coalesceStream=new qo(T,U.metadataStream),U.headOfPipeline=U.packetStream,U.packetStream.pipe(U.parseStream).pipe(U.elementaryStream).pipe(U.timestampRolloverStream),U.timestampRolloverStream.pipe(U.h264Stream),U.timestampRolloverStream.pipe(U.adtsStream),U.timestampRolloverStream.pipe(U.metadataStream).pipe(U.coalesceStream),U.h264Stream.pipe(U.captionStream).pipe(U.coalesceStream),U.elementaryStream.on("data",function(ae){var le;if(ae.type==="metadata"){for(le=ae.tracks.length;le--;)!P&&ae.tracks[le].type==="video"?(P=ae.tracks[le],P.timelineStartInfo.baseMediaDecodeTime=_.baseMediaDecodeTime):!j&&ae.tracks[le].type==="audio"&&(j=ae.tracks[le],j.timelineStartInfo.baseMediaDecodeTime=_.baseMediaDecodeTime);P&&!U.videoSegmentStream&&(U.coalesceStream.numberOfTracks++,U.videoSegmentStream=new $l(P,T),U.videoSegmentStream.on("log",_.getLogTrigger_("videoSegmentStream")),U.videoSegmentStream.on("timelineStartInfo",function(de){j&&!T.keepOriginalTimestamps&&(j.timelineStartInfo=de,U.audioSegmentStream.setEarliestDts(de.dts-_.baseMediaDecodeTime))}),U.videoSegmentStream.on("processedGopsInfo",_.trigger.bind(_,"gopInfo")),U.videoSegmentStream.on("segmentTimingInfo",_.trigger.bind(_,"videoSegmentTimingInfo")),U.videoSegmentStream.on("baseMediaDecodeTime",function(de){j&&U.audioSegmentStream.setVideoBaseMediaDecodeTime(de)}),U.videoSegmentStream.on("timingInfo",_.trigger.bind(_,"videoTimingInfo")),U.h264Stream.pipe(U.videoSegmentStream).pipe(U.coalesceStream)),j&&!U.audioSegmentStream&&(U.coalesceStream.numberOfTracks++,U.audioSegmentStream=new ec(j,T),U.audioSegmentStream.on("log",_.getLogTrigger_("audioSegmentStream")),U.audioSegmentStream.on("timingInfo",_.trigger.bind(_,"audioTimingInfo")),U.audioSegmentStream.on("segmentTimingInfo",_.trigger.bind(_,"audioSegmentTimingInfo")),U.adtsStream.pipe(U.audioSegmentStream).pipe(U.coalesceStream)),_.trigger("trackinfo",{hasAudio:!!j,hasVideo:!!P})}}),U.coalesceStream.on("data",this.trigger.bind(this,"data")),U.coalesceStream.on("id3Frame",function(ae){ae.dispatchType=U.metadataStream.dispatchType,_.trigger("id3Frame",ae)}),U.coalesceStream.on("caption",this.trigger.bind(this,"caption")),U.coalesceStream.on("done",this.trigger.bind(this,"done")),Ip(this,U)},this.setBaseMediaDecodeTime=function(U){var ae=this.transmuxPipeline_;T.keepOriginalTimestamps||(this.baseMediaDecodeTime=U),j&&(j.timelineStartInfo.dts=void 0,j.timelineStartInfo.pts=void 0,fr.clearDtsInfo(j),ae.audioTimestampRolloverStream&&ae.audioTimestampRolloverStream.discontinuity()),P&&(ae.videoSegmentStream&&(ae.videoSegmentStream.gopCache_=[]),P.timelineStartInfo.dts=void 0,P.timelineStartInfo.pts=void 0,fr.clearDtsInfo(P),ae.captionStream.reset()),ae.timestampRolloverStream&&ae.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(U){j&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(U)},this.setRemux=function(U){var ae=this.transmuxPipeline_;T.remux=U,ae&&ae.coalesceStream&&ae.coalesceStream.setRemux(U)},this.alignGopsWith=function(U){P&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(U)},this.getLogTrigger_=function(U){var ae=this;return function(le){le.stream=U,ae.trigger("log",le)}},this.push=function(U){if(I){var ae=ld(U);ae&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!ae&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),I=!1}this.transmuxPipeline_.headOfPipeline.push(U)},this.flush=function(){I=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Vl.prototype=new Zu;var Hl={Transmuxer:Vl},If=function(T){return T>>>0},ql=function(T){return("00"+T.toString(16)).slice(-2)},nc={toUnsigned:If,toHexString:ql},ud=function(T){var _="";return _+=String.fromCharCode(T[0]),_+=String.fromCharCode(T[1]),_+=String.fromCharCode(T[2]),_+=String.fromCharCode(T[3]),_},rc=ud,Of=nc.toUnsigned,Op=rc,ic=function(T,_){var I=[],P,j,U,ae,le;if(!_.length)return null;for(P=0;P<T.byteLength;)j=Of(T[P]<<24|T[P+1]<<16|T[P+2]<<8|T[P+3]),U=Op(T.subarray(P+4,P+8)),ae=j>1?P+j:T.byteLength,U===_[0]&&(_.length===1?I.push(T.subarray(P+8,ae)):(le=ic(T.subarray(P+8,ae),_.slice(1)),le.length&&(I=I.concat(le)))),P=ae;return I},ia=ic,S0=nc.toUnsigned,Np=s.getUint64,Yi=function(T){var _={version:T[0],flags:new Uint8Array(T.subarray(1,4))};return _.version===1?_.baseMediaDecodeTime=Np(T.subarray(4)):_.baseMediaDecodeTime=S0(T[4]<<24|T[5]<<16|T[6]<<8|T[7]),_},Gl=Yi,Wl=function(T){var _=new DataView(T.buffer,T.byteOffset,T.byteLength),I={version:T[0],flags:new Uint8Array(T.subarray(1,4)),trackId:_.getUint32(4)},P=I.flags[2]&1,j=I.flags[2]&2,U=I.flags[2]&8,ae=I.flags[2]&16,le=I.flags[2]&32,de=I.flags[0]&65536,ce=I.flags[0]&131072,Se;return Se=8,P&&(Se+=4,I.baseDataOffset=_.getUint32(12),Se+=4),j&&(I.sampleDescriptionIndex=_.getUint32(Se),Se+=4),U&&(I.defaultSampleDuration=_.getUint32(Se),Se+=4),ae&&(I.defaultSampleSize=_.getUint32(Se),Se+=4),le&&(I.defaultSampleFlags=_.getUint32(Se)),de&&(I.durationIsEmpty=!0),!P&&ce&&(I.baseDataOffsetIsMoof=!0),I},Go=Wl,Xl=function(T){return{isLeading:(T[0]&12)>>>2,dependsOn:T[0]&3,isDependedOn:(T[1]&192)>>>6,hasRedundancy:(T[1]&48)>>>4,paddingValue:(T[1]&14)>>>1,isNonSyncSample:T[1]&1,degradationPriority:T[2]<<8|T[3]}},T0=Xl,sc=T0,Mp=function(T){var _={version:T[0],flags:new Uint8Array(T.subarray(1,4)),samples:[]},I=new DataView(T.buffer,T.byteOffset,T.byteLength),P=_.flags[2]&1,j=_.flags[2]&4,U=_.flags[1]&1,ae=_.flags[1]&2,le=_.flags[1]&4,de=_.flags[1]&8,ce=I.getUint32(4),Se=8,ze;for(P&&(_.dataOffset=I.getInt32(Se),Se+=4),j&&ce&&(ze={flags:sc(T.subarray(Se,Se+4))},Se+=4,U&&(ze.duration=I.getUint32(Se),Se+=4),ae&&(ze.size=I.getUint32(Se),Se+=4),de&&(_.version===1?ze.compositionTimeOffset=I.getInt32(Se):ze.compositionTimeOffset=I.getUint32(Se),Se+=4),_.samples.push(ze),ce--);ce--;)ze={},U&&(ze.duration=I.getUint32(Se),Se+=4),ae&&(ze.size=I.getUint32(Se),Se+=4),le&&(ze.flags=sc(T.subarray(Se,Se+4)),Se+=4),de&&(_.version===1?ze.compositionTimeOffset=I.getInt32(Se):ze.compositionTimeOffset=I.getUint32(Se),Se+=4),_.samples.push(ze);return _},Nf=Mp,cd={tfdt:Gl,trun:Nf},Pa={parseTfdt:cd.tfdt,parseTrun:cd.trun},jp=function(T){for(var _=0,I=String.fromCharCode(T[_]),P="";I!=="\0";)P+=I,_++,I=String.fromCharCode(T[_]);return P+=I,P},Lp={uint8ToCString:jp},Wo=Lp.uint8ToCString,Bp=s.getUint64,no=function(T){var _=4,I=T[0],P,j,U,ae,le,de,ce,Se;if(I===0){P=Wo(T.subarray(_)),_+=P.length,j=Wo(T.subarray(_)),_+=j.length;var ze=new DataView(T.buffer);U=ze.getUint32(_),_+=4,le=ze.getUint32(_),_+=4,de=ze.getUint32(_),_+=4,ce=ze.getUint32(_),_+=4}else if(I===1){var ze=new DataView(T.buffer);U=ze.getUint32(_),_+=4,ae=Bp(T.subarray(_)),_+=8,de=ze.getUint32(_),_+=4,ce=ze.getUint32(_),_+=4,P=Wo(T.subarray(_)),_+=P.length,j=Wo(T.subarray(_)),_+=j.length}Se=new Uint8Array(T.subarray(_,T.byteLength));var gt={scheme_id_uri:P,value:j,timescale:U||1,presentation_time:ae,presentation_time_delta:le,event_duration:de,id:ce,message_data:Se};return w0(I,gt)?gt:void 0},dd=function(T,_,I,P){return T||T===0?T/_:P+I/_},w0=function(T,_){var I=_.scheme_id_uri!=="\0",P=T===0&&Fp(_.presentation_time_delta)&&I,j=T===1&&Fp(_.presentation_time)&&I;return!(T>1)&&P||j},Fp=function(T){return T!==void 0||T!==null},Ki={parseEmsgBox:no,scaleTime:dd},Pi;typeof window<"u"?Pi=window:typeof t<"u"?Pi=t:typeof self<"u"?Pi=self:Pi={};var Qi=Pi,Yl=nc.toUnsigned,Kl=nc.toHexString,Sr=ia,ro=rc,Mf=Ki,Ql=Go,io=Nf,Te=Gl,We=s.getUint64,Ue,yt,zt,An,Rr,Sn,ac,fd=Qi,Zi=Jc.parseId3Frames;Ue=function(T){var _={},I=Sr(T,["moov","trak"]);return I.reduce(function(P,j){var U,ae,le,de,ce;return U=Sr(j,["tkhd"])[0],!U||(ae=U[0],le=ae===0?12:20,de=Yl(U[le]<<24|U[le+1]<<16|U[le+2]<<8|U[le+3]),ce=Sr(j,["mdia","mdhd"])[0],!ce)?null:(ae=ce[0],le=ae===0?12:20,P[de]=Yl(ce[le]<<24|ce[le+1]<<16|ce[le+2]<<8|ce[le+3]),P)},_)},yt=function(T,_){var I;I=Sr(_,["moof","traf"]);var P=I.reduce(function(j,U){var ae=Sr(U,["tfhd"])[0],le=Yl(ae[4]<<24|ae[5]<<16|ae[6]<<8|ae[7]),de=T[le]||9e4,ce=Sr(U,["tfdt"])[0],Se=new DataView(ce.buffer,ce.byteOffset,ce.byteLength),ze;ce[0]===1?ze=We(ce.subarray(4,12)):ze=Se.getUint32(4);let gt;return typeof ze=="bigint"?gt=ze/fd.BigInt(de):typeof ze=="number"&&!isNaN(ze)&&(gt=ze/de),gt<Number.MAX_SAFE_INTEGER&&(gt=Number(gt)),gt<j&&(j=gt),j},1/0);return typeof P=="bigint"||isFinite(P)?P:0},zt=function(T,_){var I=Sr(_,["moof","traf"]),P=0,j=0,U;if(I&&I.length){var ae=Sr(I[0],["tfhd"])[0],le=Sr(I[0],["trun"])[0],de=Sr(I[0],["tfdt"])[0];if(ae){var ce=Ql(ae);U=ce.trackId}if(de){var Se=Te(de);P=Se.baseMediaDecodeTime}if(le){var ze=io(le);ze.samples&&ze.samples.length&&(j=ze.samples[0].compositionTimeOffset||0)}}var gt=T[U]||9e4;typeof P=="bigint"&&(j=fd.BigInt(j),gt=fd.BigInt(gt));var Ye=(P+j)/gt;return typeof Ye=="bigint"&&Ye<Number.MAX_SAFE_INTEGER&&(Ye=Number(Ye)),Ye},An=function(T){var _=Sr(T,["moov","trak"]),I=[];return _.forEach(function(P){var j=Sr(P,["mdia","hdlr"]),U=Sr(P,["tkhd"]);j.forEach(function(ae,le){var de=ro(ae.subarray(8,12)),ce=U[le],Se,ze,gt;de==="vide"&&(Se=new DataView(ce.buffer,ce.byteOffset,ce.byteLength),ze=Se.getUint8(0),gt=ze===0?Se.getUint32(12):Se.getUint32(20),I.push(gt))})}),I},Sn=function(T){var _=T[0],I=_===0?12:20;return Yl(T[I]<<24|T[I+1]<<16|T[I+2]<<8|T[I+3])},Rr=function(T){var _=Sr(T,["moov","trak"]),I=[];return _.forEach(function(P){var j={},U=Sr(P,["tkhd"])[0],ae,le;U&&(ae=new DataView(U.buffer,U.byteOffset,U.byteLength),le=ae.getUint8(0),j.id=le===0?ae.getUint32(12):ae.getUint32(20));var de=Sr(P,["mdia","hdlr"])[0];if(de){var ce=ro(de.subarray(8,12));ce==="vide"?j.type="video":ce==="soun"?j.type="audio":j.type=ce}var Se=Sr(P,["mdia","minf","stbl","stsd"])[0];if(Se){var ze=Se.subarray(8);j.codec=ro(ze.subarray(4,8));var gt=Sr(ze,[j.codec])[0],Ye,Lt;gt&&(/^[asm]vc[1-9]$/i.test(j.codec)?(Ye=gt.subarray(78),Lt=ro(Ye.subarray(4,8)),Lt==="avcC"&&Ye.length>11?(j.codec+=".",j.codec+=Kl(Ye[9]),j.codec+=Kl(Ye[10]),j.codec+=Kl(Ye[11])):j.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(j.codec)?(Ye=gt.subarray(28),Lt=ro(Ye.subarray(4,8)),Lt==="esds"&&Ye.length>20&&Ye[19]!==0?(j.codec+="."+Kl(Ye[19]),j.codec+="."+Kl(Ye[20]>>>2&63).replace(/^0/,"")):j.codec="mp4a.40.2"):j.codec=j.codec.toLowerCase())}var Ct=Sr(P,["mdia","mdhd"])[0];Ct&&(j.timescale=Sn(Ct)),I.push(j)}),I},ac=function(T,_=0){var I=Sr(T,["emsg"]);return I.map(P=>{var j=Mf.parseEmsgBox(new Uint8Array(P)),U=Zi(j.message_data);return{cueTime:Mf.scaleTime(j.presentation_time,j.timescale,j.presentation_time_delta,_),duration:Mf.scaleTime(j.event_duration,j.timescale),frames:U}})};var so={findBox:Sr,parseType:ro,timescale:Ue,startTime:yt,compositionStartTime:zt,videoTrackIds:An,tracks:Rr,getTimescaleFromMediaHeader:Sn,getEmsgID3:ac};const{parseTrun:C0}=Pa,{findBox:Xo}=so;var Zl=Qi,oc=function(T){var _=Xo(T,["moof","traf"]),I=Xo(T,["mdat"]),P=[];return I.forEach(function(j,U){var ae=_[U];P.push({mdat:j,traf:ae})}),P},Mn=function(T,_,I){var P=_,j=I.defaultSampleDuration||0,U=I.defaultSampleSize||0,ae=I.trackId,le=[];return T.forEach(function(de){var ce=C0(de),Se=ce.samples;Se.forEach(function(ze){ze.duration===void 0&&(ze.duration=j),ze.size===void 0&&(ze.size=U),ze.trackId=ae,ze.dts=P,ze.compositionTimeOffset===void 0&&(ze.compositionTimeOffset=0),typeof P=="bigint"?(ze.pts=P+Zl.BigInt(ze.compositionTimeOffset),P+=Zl.BigInt(ze.duration)):(ze.pts=P+ze.compositionTimeOffset,P+=ze.duration)}),le=le.concat(Se)}),le},hs={getMdatTrafPairs:oc,parseSamples:Mn},jf=On.discardEmulationPreventionBytes,Ci=No.CaptionStream,Ii=ia,Jl=Gl,Lf=Go,{getMdatTrafPairs:Yo,parseSamples:Ls}=hs,eu=function(T,_){for(var I=T,P=0;P<_.length;P++){var j=_[P];if(I<j.size)return j;I-=j.size}return null},Ko=function(T,_,I){var P=new DataView(T.buffer,T.byteOffset,T.byteLength),j={logs:[],seiNals:[]},U,ae,le,de;for(ae=0;ae+4<T.length;ae+=le)if(le=P.getUint32(ae),ae+=4,!(le<=0))switch(T[ae]&31){case 6:var ce=T.subarray(ae+1,ae+1+le),Se=eu(ae,_);if(U={nalUnitType:"sei_rbsp",size:le,data:ce,escapedRBSP:jf(ce),trackId:I},Se)U.pts=Se.pts,U.dts=Se.dts,de=Se;else if(de)U.pts=de.pts,U.dts=de.dts;else{j.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+ae+" for trackId "+I+". See mux.js#223."});break}j.seiNals.push(U);break}return j},lc=function(T,_){var I={},P=Yo(T);return P.forEach(function(j){var U=j.mdat,ae=j.traf,le=Ii(ae,["tfhd"]),de=Lf(le[0]),ce=de.trackId,Se=Ii(ae,["tfdt"]),ze=Se.length>0?Jl(Se[0]).baseMediaDecodeTime:0,gt=Ii(ae,["trun"]),Ye,Lt;_===ce&&gt.length>0&&(Ye=Ls(gt,ze,de),Lt=Ko(U,Ye,ce),I[ce]||(I[ce]={seiNals:[],logs:[]}),I[ce].seiNals=I[ce].seiNals.concat(Lt.seiNals),I[ce].logs=I[ce].logs.concat(Lt.logs))}),I},uc=function(T,_,I){var P;if(_===null)return null;P=lc(T,_);var j=P[_]||{};return{seiNals:j.seiNals,logs:j.logs,timescale:I}},Qo=function(){var T=!1,_,I,P,j,U,ae;this.isInitialized=function(){return T},this.init=function(le){_=new Ci,T=!0,ae=le?le.isPartial:!1,_.on("data",function(de){de.startTime=de.startPts/j,de.endTime=de.endPts/j,U.captions.push(de),U.captionStreams[de.stream]=!0}),_.on("log",function(de){U.logs.push(de)})},this.isNewInit=function(le,de){return le&&le.length===0||de&&typeof de=="object"&&Object.keys(de).length===0?!1:P!==le[0]||j!==de[P]},this.parse=function(le,de,ce){var Se;if(this.isInitialized()){if(!de||!ce)return null;if(this.isNewInit(de,ce))P=de[0],j=ce[P];else if(P===null||!j)return I.push(le),null}else return null;for(;I.length>0;){var ze=I.shift();this.parse(ze,de,ce)}return Se=uc(le,P,j),Se&&Se.logs&&(U.logs=U.logs.concat(Se.logs)),Se===null||!Se.seiNals?U.logs.length?{logs:U.logs,captions:[],captionStreams:[]}:null:(this.pushNals(Se.seiNals),this.flushStream(),U)},this.pushNals=function(le){if(!this.isInitialized()||!le||le.length===0)return null;le.forEach(function(de){_.push(de)})},this.flushStream=function(){if(!this.isInitialized())return null;ae?_.partialFlush():_.flush()},this.clearParsedCaptions=function(){U.captions=[],U.captionStreams={},U.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;_.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){I=[],P=null,j=null,U?this.clearParsedCaptions():U={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},hd=Qo;const{parseTfdt:Oi}=Pa,Ni=ia,{getTimescaleFromMediaHeader:Ei}=so,{parseSamples:cc,getMdatTrafPairs:pd}=hs;var md=function(){let T=9e4;this.init=function(_){const I=Ni(_,["moov","trak","mdia","mdhd"])[0];I&&(T=Ei(I))},this.parseSegment=function(_){const I=[],P=pd(_);let j=0;return P.forEach(function(U){const ae=U.mdat,le=U.traf,de=Ni(le,["tfdt"])[0],ce=Ni(le,["tfhd"])[0],Se=Ni(le,["trun"]);if(de&&(j=Oi(de).baseMediaDecodeTime),Se.length&&ce){const ze=cc(Se,j,ce);let gt=0;ze.forEach(function(Ye){const Lt="utf-8",Ct=new TextDecoder(Lt),jr=ae.slice(gt,gt+Ye.size);if(Ni(jr,["vtte"])[0]){gt+=Ye.size;return}Ni(jr,["vttc"]).forEach(function(tl){const oa=Ni(tl,["payl"])[0],ti=Ni(tl,["sttg"])[0],pc=Ye.pts/T,mc=(Ye.pts+Ye.duration)/T;let or,nu;if(oa)try{or=Ct.decode(oa)}catch(ci){console.error(ci)}if(ti)try{nu=Ct.decode(ti)}catch(ci){console.error(ci)}Ye.duration&&or&&I.push({cueText:or,start:pc,end:mc,settings:nu})}),gt+=Ye.size})}}),I}},ao=Mo,sa=function(T){var _=T[1]&31;return _<<=8,_|=T[2],_},Bs=function(T){return!!(T[1]&64)},Zo=function(T){var _=0;return(T[3]&48)>>>4>1&&(_+=T[4]+1),_},dc=function(T,_){var I=sa(T);return I===0?"pat":I===_?"pmt":_?"pes":null},ps=function(T){var _=Bs(T),I=4+Zo(T);return _&&(I+=T[I]+1),(T[I+10]&31)<<8|T[I+11]},ms=function(T){var _={},I=Bs(T),P=4+Zo(T);if(I&&(P+=T[P]+1),!!(T[P+5]&1)){var j,U,ae;j=(T[P+1]&15)<<8|T[P+2],U=3+j-4,ae=(T[P+10]&15)<<8|T[P+11];for(var le=12+ae;le<U;){var de=P+le;_[(T[de+1]&31)<<8|T[de+2]]=T[de],le+=((T[de+3]&15)<<8|T[de+4])+5}return _}},ar=function(T,_){var I=sa(T),P=_[I];switch(P){case ao.H264_STREAM_TYPE:return"video";case ao.ADTS_STREAM_TYPE:return"audio";case ao.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},hr=function(T){var _=Bs(T);if(!_)return null;var I=4+Zo(T);if(I>=T.byteLength)return null;var P=null,j;return j=T[I+7],j&192&&(P={},P.pts=(T[I+9]&14)<<27|(T[I+10]&255)<<20|(T[I+11]&254)<<12|(T[I+12]&255)<<5|(T[I+13]&254)>>>3,P.pts*=4,P.pts+=(T[I+13]&6)>>>1,P.dts=P.pts,j&64&&(P.dts=(T[I+14]&14)<<27|(T[I+15]&255)<<20|(T[I+16]&254)<<12|(T[I+17]&255)<<5|(T[I+18]&254)>>>3,P.dts*=4,P.dts+=(T[I+18]&6)>>>1)),P},Fs=function(T){switch(T){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}},Jo=function(T){for(var _=4+Zo(T),I=T.subarray(_),P=0,j=0,U=!1,ae;j<I.byteLength-3;j++)if(I[j+2]===1){P=j+5;break}for(;P<I.byteLength;)switch(I[P]){case 0:if(I[P-1]!==0){P+=2;break}else if(I[P-2]!==0){P++;break}j+3!==P-2&&(ae=Fs(I[j+3]&31),ae==="slice_layer_without_partitioning_rbsp_idr"&&(U=!0));do P++;while(I[P]!==1&&P<I.length);j=P-2,P+=3;break;case 1:if(I[P-1]!==0||I[P-2]!==0){P+=3;break}ae=Fs(I[j+3]&31),ae==="slice_layer_without_partitioning_rbsp_idr"&&(U=!0),j=P-2,P+=3;break;default:P+=3;break}return I=I.subarray(j),P-=j,j=0,I&&I.byteLength>3&&(ae=Fs(I[j+3]&31),ae==="slice_layer_without_partitioning_rbsp_idr"&&(U=!0)),U},Bf={parseType:dc,parsePat:ps,parsePmt:ms,parsePayloadUnitStartIndicator:Bs,parsePesType:ar,parsePesTime:hr,videoPacketContainsKeyFrame:Jo},gd=Mo,aa=Wu.handleRollover,Yt={};Yt.ts=Bf,Yt.aac=Qu;var Un=on.ONE_SECOND_IN_TS,$t=188,Mr=71,Mi=function(T,_){for(var I=0,P=$t,j,U;P<T.byteLength;){if(T[I]===Mr&&T[P]===Mr){switch(j=T.subarray(I,P),U=Yt.ts.parseType(j,_.pid),U){case"pat":_.pid=Yt.ts.parsePat(j);break;case"pmt":var ae=Yt.ts.parsePmt(j);_.table=_.table||{},Object.keys(ae).forEach(function(le){_.table[le]=ae[le]});break}I+=$t,P+=$t;continue}I++,P++}},el=function(T,_,I){for(var P=0,j=$t,U,ae,le,de,ce,Se=!1;j<=T.byteLength;){if(T[P]===Mr&&(T[j]===Mr||j===T.byteLength)){switch(U=T.subarray(P,j),ae=Yt.ts.parseType(U,_.pid),ae){case"pes":le=Yt.ts.parsePesType(U,_.table),de=Yt.ts.parsePayloadUnitStartIndicator(U),le==="audio"&&de&&(ce=Yt.ts.parsePesTime(U),ce&&(ce.type="audio",I.audio.push(ce),Se=!0));break}if(Se)break;P+=$t,j+=$t;continue}P++,j++}for(j=T.byteLength,P=j-$t,Se=!1;P>=0;){if(T[P]===Mr&&(T[j]===Mr||j===T.byteLength)){switch(U=T.subarray(P,j),ae=Yt.ts.parseType(U,_.pid),ae){case"pes":le=Yt.ts.parsePesType(U,_.table),de=Yt.ts.parsePayloadUnitStartIndicator(U),le==="audio"&&de&&(ce=Yt.ts.parsePesTime(U),ce&&(ce.type="audio",I.audio.push(ce),Se=!0));break}if(Se)break;P-=$t,j-=$t;continue}P--,j--}},gs=function(T,_,I){for(var P=0,j=$t,U,ae,le,de,ce,Se,ze,gt,Ye=!1,Lt={data:[],size:0};j<T.byteLength;){if(T[P]===Mr&&T[j]===Mr){switch(U=T.subarray(P,j),ae=Yt.ts.parseType(U,_.pid),ae){case"pes":if(le=Yt.ts.parsePesType(U,_.table),de=Yt.ts.parsePayloadUnitStartIndicator(U),le==="video"&&(de&&!Ye&&(ce=Yt.ts.parsePesTime(U),ce&&(ce.type="video",I.video.push(ce),Ye=!0)),!I.firstKeyFrame)){if(de&&Lt.size!==0){for(Se=new Uint8Array(Lt.size),ze=0;Lt.data.length;)gt=Lt.data.shift(),Se.set(gt,ze),ze+=gt.byteLength;if(Yt.ts.videoPacketContainsKeyFrame(Se)){var Ct=Yt.ts.parsePesTime(Se);Ct?(I.firstKeyFrame=Ct,I.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Lt.size=0}Lt.data.push(U),Lt.size+=U.byteLength}break}if(Ye&&I.firstKeyFrame)break;P+=$t,j+=$t;continue}P++,j++}for(j=T.byteLength,P=j-$t,Ye=!1;P>=0;){if(T[P]===Mr&&T[j]===Mr){switch(U=T.subarray(P,j),ae=Yt.ts.parseType(U,_.pid),ae){case"pes":le=Yt.ts.parsePesType(U,_.table),de=Yt.ts.parsePayloadUnitStartIndicator(U),le==="video"&&de&&(ce=Yt.ts.parsePesTime(U),ce&&(ce.type="video",I.video.push(ce),Ye=!0));break}if(Ye)break;P-=$t,j-=$t;continue}P--,j--}},Up=function(T,_){if(T.audio&&T.audio.length){var I=_;(typeof I>"u"||isNaN(I))&&(I=T.audio[0].dts),T.audio.forEach(function(U){U.dts=aa(U.dts,I),U.pts=aa(U.pts,I),U.dtsTime=U.dts/Un,U.ptsTime=U.pts/Un})}if(T.video&&T.video.length){var P=_;if((typeof P>"u"||isNaN(P))&&(P=T.video[0].dts),T.video.forEach(function(U){U.dts=aa(U.dts,P),U.pts=aa(U.pts,P),U.dtsTime=U.dts/Un,U.ptsTime=U.pts/Un}),T.firstKeyFrame){var j=T.firstKeyFrame;j.dts=aa(j.dts,P),j.pts=aa(j.pts,P),j.dtsTime=j.dts/Un,j.ptsTime=j.pts/Un}}},zp=function(T){for(var _=!1,I=0,P=null,j=null,U=0,ae=0,le;T.length-ae>=3;){var de=Yt.aac.parseType(T,ae);switch(de){case"timed-metadata":if(T.length-ae<10){_=!0;break}if(U=Yt.aac.parseId3TagSize(T,ae),U>T.length){_=!0;break}j===null&&(le=T.subarray(ae,ae+U),j=Yt.aac.parseAacTimestamp(le)),ae+=U;break;case"audio":if(T.length-ae<7){_=!0;break}if(U=Yt.aac.parseAdtsSize(T,ae),U>T.length){_=!0;break}P===null&&(le=T.subarray(ae,ae+U),P=Yt.aac.parseSampleRate(le)),I++,ae+=U;break;default:ae++;break}if(_)return null}if(P===null||j===null)return null;var ce=Un/P,Se={audio:[{type:"audio",dts:j,pts:j},{type:"audio",dts:j+I*1024*ce,pts:j+I*1024*ce}]};return Se},fc=function(T){var _={pid:null,table:null},I={};Mi(T,_);for(var P in _.table)if(_.table.hasOwnProperty(P)){var j=_.table[P];switch(j){case gd.H264_STREAM_TYPE:I.video=[],gs(T,_,I),I.video.length===0&&delete I.video;break;case gd.ADTS_STREAM_TYPE:I.audio=[],el(T,_,I),I.audio.length===0&&delete I.audio;break}}return I},hc=function(T,_){var I=Yt.aac.isLikelyAacData(T),P;return I?P=zp(T):P=fc(T),!P||!P.audio&&!P.video?null:(Up(P,_),P)},$p={inspect:hc,parseAudioPes_:el};const oo=function(T,_){_.on("data",function(I){const P=I.initSegment;I.initSegment={data:P.buffer,byteOffset:P.byteOffset,byteLength:P.byteLength};const j=I.data;I.data=j.buffer,T.postMessage({action:"data",segment:I,byteOffset:j.byteOffset,byteLength:j.byteLength},[I.data])}),_.on("done",function(I){T.postMessage({action:"done"})}),_.on("gopInfo",function(I){T.postMessage({action:"gopInfo",gopInfo:I})}),_.on("videoSegmentTimingInfo",function(I){const P={start:{decode:on.videoTsToSeconds(I.start.dts),presentation:on.videoTsToSeconds(I.start.pts)},end:{decode:on.videoTsToSeconds(I.end.dts),presentation:on.videoTsToSeconds(I.end.pts)},baseMediaDecodeTime:on.videoTsToSeconds(I.baseMediaDecodeTime)};I.prependedContentDuration&&(P.prependedContentDuration=on.videoTsToSeconds(I.prependedContentDuration)),T.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:P})}),_.on("audioSegmentTimingInfo",function(I){const P={start:{decode:on.videoTsToSeconds(I.start.dts),presentation:on.videoTsToSeconds(I.start.pts)},end:{decode:on.videoTsToSeconds(I.end.dts),presentation:on.videoTsToSeconds(I.end.pts)},baseMediaDecodeTime:on.videoTsToSeconds(I.baseMediaDecodeTime)};I.prependedContentDuration&&(P.prependedContentDuration=on.videoTsToSeconds(I.prependedContentDuration)),T.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:P})}),_.on("id3Frame",function(I){T.postMessage({action:"id3Frame",id3Frame:I})}),_.on("caption",function(I){T.postMessage({action:"caption",caption:I})}),_.on("trackinfo",function(I){T.postMessage({action:"trackinfo",trackInfo:I})}),_.on("audioTimingInfo",function(I){T.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:on.videoTsToSeconds(I.start),end:on.videoTsToSeconds(I.end)}})}),_.on("videoTimingInfo",function(I){T.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:on.videoTsToSeconds(I.start),end:on.videoTsToSeconds(I.end)}})}),_.on("log",function(I){T.postMessage({action:"log",log:I})})};class lo{constructor(_,I){this.options=I||{},this.self=_,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Hl.Transmuxer(this.options),oo(this.self,this.transmuxer)}pushMp4Captions(_){this.captionParser||(this.captionParser=new hd,this.captionParser.init());const I=new Uint8Array(_.data,_.byteOffset,_.byteLength),P=this.captionParser.parse(I,_.trackIds,_.timescales);this.self.postMessage({action:"mp4Captions",captions:P&&P.captions||[],logs:P&&P.logs||[],data:I.buffer},[I.buffer])}initMp4WebVttParser(_){this.webVttParser||(this.webVttParser=new md);const I=new Uint8Array(_.data,_.byteOffset,_.byteLength);this.webVttParser.init(I)}getMp4WebVttText(_){this.webVttParser||(this.webVttParser=new md);const I=new Uint8Array(_.data,_.byteOffset,_.byteLength),P=this.webVttParser.parseSegment(I);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:P||[],data:I.buffer},[I.buffer])}probeMp4StartTime({timescales:_,data:I}){const P=so.startTime(_,I);this.self.postMessage({action:"probeMp4StartTime",startTime:P,data:I},[I.buffer])}probeMp4Tracks({data:_}){const I=so.tracks(_);this.self.postMessage({action:"probeMp4Tracks",tracks:I,data:_},[_.buffer])}probeEmsgID3({data:_,offset:I}){const P=so.getEmsgID3(_,I);this.self.postMessage({action:"probeEmsgID3",id3Frames:P,emsgData:_},[_.buffer])}probeTs({data:_,baseStartTime:I}){const P=typeof I=="number"&&!isNaN(I)?I*on.ONE_SECOND_IN_TS:void 0,j=$p.inspect(_,P);let U=null;j&&(U={hasVideo:j.video&&j.video.length===2||!1,hasAudio:j.audio&&j.audio.length===2||!1},U.hasVideo&&(U.videoStart=j.video[0].ptsTime),U.hasAudio&&(U.audioStart=j.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:U,data:_},[_.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(_){const I=new Uint8Array(_.data,_.byteOffset,_.byteLength);this.transmuxer.push(I)}reset(){this.transmuxer.reset()}setTimestampOffset(_){const I=_.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(on.secondsToVideoTs(I)))}setAudioAppendStart(_){this.transmuxer.setAudioAppendStart(Math.ceil(on.secondsToVideoTs(_.appendStart)))}setRemux(_){this.transmuxer.setRemux(_.remux)}flush(_){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(_){this.transmuxer.alignGopsWith(_.gopsToAlignWith.slice())}}self.onmessage=function(T){if(T.data.action==="init"&&T.data.options){this.messageHandlers=new lo(self,T.data.options);return}this.messageHandlers||(this.messageHandlers=new lo(self)),T.data&&T.data.action&&T.data.action!=="init"&&this.messageHandlers[T.data.action]&&this.messageHandlers[T.data.action](T.data)}}));var bse=v6(yse);const xse=(t,e,n)=>{const{type:r,initSegment:i,captions:s,captionStreams:o,metadata:u,videoFrameDtsTime:d,videoFramePtsTime:f}=t.data.segment;e.buffer.push({captions:s,captionStreams:o,metadata:u});const m=t.data.segment.boxes||{data:t.data.segment.data},y={type:r,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(i.data,i.byteOffset,i.byteLength)};typeof d<"u"&&(y.videoFrameDtsTime=d),typeof f<"u"&&(y.videoFramePtsTime=f),n(y)},_se=({transmuxedData:t,callback:e})=>{t.buffer=[],e(t)},Sse=(t,e)=>{e.gopInfo=t.data.gopInfo},x6=t=>{const{transmuxer:e,bytes:n,audioAppendStart:r,gopsToAlignWith:i,remux:s,onData:o,onTrackInfo:u,onAudioTimingInfo:d,onVideoTimingInfo:f,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:y,onId3:x,onCaptions:b,onDone:w,onEndedTimeline:S,onTransmuxerLog:D,isEndOfTimeline:k,segment:O,triggerSegmentEventFn:N}=t,F={buffer:[]};let M=k;const V=q=>{e.currentTransmux===t&&(q.data.action==="data"&&xse(q,F,o),q.data.action==="trackinfo"&&u(q.data.trackInfo),q.data.action==="gopInfo"&&Sse(q,F),q.data.action==="audioTimingInfo"&&d(q.data.audioTimingInfo),q.data.action==="videoTimingInfo"&&f(q.data.videoTimingInfo),q.data.action==="videoSegmentTimingInfo"&&m(q.data.videoSegmentTimingInfo),q.data.action==="audioSegmentTimingInfo"&&y(q.data.audioSegmentTimingInfo),q.data.action==="id3Frame"&&x([q.data.id3Frame],q.data.id3Frame.dispatchType),q.data.action==="caption"&&b(q.data.caption),q.data.action==="endedtimeline"&&(M=!1,S()),q.data.action==="log"&&D(q.data.log),q.data.type==="transmuxed"&&(M||(e.onmessage=null,_se({transmuxedData:F,callback:w}),_6(e))))},$=()=>{const q={message:"Received an error message from the transmuxer worker",metadata:{errorType:Re.Error.StreamingFailedToTransmuxSegment,segmentInfo:Hh({segment:O})}};w(null,q)};if(e.onmessage=V,e.onerror=$,r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),typeof s<"u"&&e.postMessage({action:"setRemux",remux:s}),n.byteLength){const q=n instanceof ArrayBuffer?n:n.buffer,B=n instanceof ArrayBuffer?0:n.byteOffset;N({type:"segmenttransmuxingstart",segment:O}),e.postMessage({action:"push",data:q,byteOffset:B,byteLength:n.byteLength},[q])}k&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},_6=t=>{t.currentTransmux=null,t.transmuxQueue.length&&(t.currentTransmux=t.transmuxQueue.shift(),typeof t.currentTransmux=="function"?t.currentTransmux():x6(t.currentTransmux))},LR=(t,e)=>{t.postMessage({action:e}),_6(t)},S6=(t,e)=>{if(!e.currentTransmux){e.currentTransmux=t,LR(e,t);return}e.transmuxQueue.push(LR.bind(null,e,t))},Tse=t=>{S6("reset",t)},wse=t=>{S6("endTimeline",t)},T6=t=>{if(!t.transmuxer.currentTransmux){t.transmuxer.currentTransmux=t,x6(t);return}t.transmuxer.transmuxQueue.push(t)},Cse=t=>{const e=new bse;e.currentTransmux=null,e.transmuxQueue=[];const n=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,n.call(e)),e.postMessage({action:"init",options:t}),e};var lw={reset:Tse,endTimeline:wse,transmux:T6,createTransmuxer:Cse};const xg=function(t){const e=t.transmuxer,n=t.endAction||t.action,r=t.callback,i=Xr({},t,{endAction:null,transmuxer:null,callback:null}),s=o=>{o.data.action===n&&(e.removeEventListener("message",s),o.data.data&&(o.data.data=new Uint8Array(o.data.data,t.byteOffset||0,t.byteLength||o.data.data.byteLength),t.data&&(t.data=o.data.data)),r(o.data))};if(e.addEventListener("message",s),t.data){const o=t.data instanceof ArrayBuffer;i.byteOffset=o?0:t.data.byteOffset,i.byteLength=t.data.byteLength;const u=[o?t.data:t.data.buffer];e.postMessage(i,u)}else e.postMessage(i)},Ou={FAILURE:2,TIMEOUT:-101,ABORTED:-102},w6="wvtt",CC=t=>{t.forEach(e=>{e.abort()})},Ese=t=>({bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}),Ase=t=>{const e=t.target,r={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return r.bytesReceived=t.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},qD=(t,e)=>{const{requestType:n}=e,r=sp({requestType:n,request:e,error:t});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Ou.TIMEOUT,xhr:e,metadata:r}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Ou.ABORTED,xhr:e,metadata:r}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Ou.FAILURE,xhr:e,metadata:r}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Ou.FAILURE,xhr:e,metadata:r}:null},BR=(t,e,n,r)=>(i,s)=>{const o=s.response,u=qD(i,s);if(u)return n(u,t);if(o.byteLength!==16)return n({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Ou.FAILURE,xhr:s},t);const d=new DataView(o),f=new Uint32Array([d.getUint32(0),d.getUint32(4),d.getUint32(8),d.getUint32(12)]);for(let y=0;y<e.length;y++)e[y].bytes=f;const m={uri:s.uri};return r({type:"segmentkeyloadcomplete",segment:t,keyInfo:m}),n(null,t)},Dse=(t,e)=>{e===w6&&t.transmuxer.postMessage({action:"initMp4WebVttParser",data:t.map.bytes})},kse=(t,e,n)=>{e===w6&&xg({action:"getMp4WebVttText",data:t.bytes,transmuxer:t.transmuxer,callback:({data:r,mp4VttCues:i})=>{t.bytes=r,n(null,t,{mp4VttCues:i})}})},C6=(t,e)=>{const n=pD(t.map.bytes);if(n!=="mp4"){const r=t.map.resolvedUri||t.map.uri,i=n||"unknown";return e({internal:!0,message:`Found unsupported ${i} container for initialization segment at URL: ${r}`,code:Ou.FAILURE,metadata:{mediaType:i}})}xg({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:({tracks:r,data:i})=>(t.map.bytes=i,r.forEach(function(s){t.map.tracks=t.map.tracks||{},!t.map.tracks[s.type]&&(t.map.tracks[s.type]=s,typeof s.id=="number"&&s.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[s.id]=s.timescale),s.type==="text"&&Dse(t,s.codec))}),e(null))})},Rse=({segment:t,finishProcessingFn:e,triggerSegmentEventFn:n})=>(r,i)=>{const s=qD(r,i);if(s)return e(s,t);const o=new Uint8Array(i.response);if(n({type:"segmentloaded",segment:t}),t.map.key)return t.map.encryptedBytes=o,e(null,t);t.map.bytes=o,C6(t,function(u){if(u)return u.xhr=i,u.status=i.status,e(u,t);e(null,t)})},Pse=({segment:t,finishProcessingFn:e,responseType:n,triggerSegmentEventFn:r})=>(i,s)=>{const o=qD(i,s);if(o)return e(o,t);r({type:"segmentloaded",segment:t});const u=n==="arraybuffer"||!s.responseText?s.response:gse(s.responseText.substring(t.lastReachedChar||0));return t.stats=Ese(s),t.key?t.encryptedBytes=new Uint8Array(u):t.bytes=new Uint8Array(u),e(null,t)},Ise=({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})=>{const w=t.map&&t.map.tracks||{},S=!!(w.audio&&w.video);let D=r.bind(null,t,"audio","start");const k=r.bind(null,t,"audio","end");let O=r.bind(null,t,"video","start");const N=r.bind(null,t,"video","end"),F=()=>T6({bytes:e,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:S,onData:M=>{M.type=M.type==="combined"?"video":M.type,m(t,M)},onTrackInfo:M=>{n&&(S&&(M.isMuxed=!0),n(t,M))},onAudioTimingInfo:M=>{D&&typeof M.start<"u"&&(D(M.start),D=null),k&&typeof M.end<"u"&&k(M.end)},onVideoTimingInfo:M=>{O&&typeof M.start<"u"&&(O(M.start),O=null),N&&typeof M.end<"u"&&N(M.end)},onVideoSegmentTimingInfo:M=>{const V={pts:{start:M.start.presentation,end:M.end.presentation},dts:{start:M.start.decode,end:M.end.decode}};b({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:V}),i(M)},onAudioSegmentTimingInfo:M=>{const V={pts:{start:M.start.pts,end:M.end.pts},dts:{start:M.start.dts,end:M.end.dts}};b({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:V}),s(M)},onId3:(M,V)=>{o(t,M,V)},onCaptions:M=>{u(t,[M])},isEndOfTimeline:d,onEndedTimeline:()=>{f()},onTransmuxerLog:x,onDone:(M,V)=>{y&&(M.type=M.type==="combined"?"video":M.type,b({type:"segmenttransmuxingcomplete",segment:t}),y(V,t,M))},segment:t,triggerSegmentEventFn:b});xg({action:"probeTs",transmuxer:t.transmuxer,data:e,baseStartTime:t.baseStartTime,callback:M=>{t.bytes=e=M.data;const V=M.result;V&&(n(t,{hasAudio:V.hasAudio,hasVideo:V.hasVideo,isMuxed:S}),n=null),F()}})},E6=({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})=>{let w=new Uint8Array(e);if(Jne(w)){t.isFmp4=!0;const{tracks:S}=t.map;if(S.text&&(!S.audio||!S.video)){m(t,{data:w,type:"text"}),kse(t,S.text.codec,y);return}const k={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&S.audio.codec!=="enca"&&(k.audioCodec=S.audio.codec),S.video&&S.video.codec&&S.video.codec!=="encv"&&(k.videoCodec=S.video.codec),S.video&&S.audio&&(k.isMuxed=!0),n(t,k);const O=(N,F)=>{m(t,{data:w,type:k.hasAudio&&!k.isMuxed?"audio":"video"}),F&&F.length&&o(t,F),N&&N.length&&u(t,N),y(null,t,{})};xg({action:"probeMp4StartTime",timescales:t.map.timescales,data:w,transmuxer:t.transmuxer,callback:({data:N,startTime:F})=>{e=N.buffer,t.bytes=w=N,k.hasAudio&&!k.isMuxed&&r(t,"audio","start",F),k.hasVideo&&r(t,"video","start",F),xg({action:"probeEmsgID3",data:w,transmuxer:t.transmuxer,offset:F,callback:({emsgData:M,id3Frames:V})=>{if(e=M.buffer,t.bytes=w=M,!S.video||!M.byteLength||!t.transmuxer){O(void 0,V);return}xg({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:w,timescales:t.map.timescales,trackIds:[S.video.id],callback:$=>{e=$.data.buffer,t.bytes=w=$.data,$.logs.forEach(function(q){x(tr(q,{stream:"mp4CaptionParser"}))}),O($.captions,V)}})}})}});return}if(!t.transmuxer){y(null,t,{});return}if(typeof t.container>"u"&&(t.container=pD(w)),t.container!=="ts"&&t.container!=="aac"){n(t,{hasAudio:!1,hasVideo:!1}),y(null,t,{});return}Ise({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})},A6=function({id:t,key:e,encryptedBytes:n,decryptionWorker:r,segment:i,doneFn:s},o){const u=f=>{if(f.data.source===t){r.removeEventListener("message",u);const m=f.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};r.onerror=()=>{const f="An error occurred in the decryption worker",m=Hh({segment:i}),y={message:f,metadata:{error:new Error(f),errorType:Re.Error.StreamingFailedToDecryptSegment,segmentInfo:m,keyInfo:{uri:i.key.resolvedUri||i.map.key.resolvedUri}}};s(y,i)},r.addEventListener("message",u);let d;e.bytes.slice?d=e.bytes.slice():d=new Uint32Array(Array.prototype.slice.call(e.bytes)),r.postMessage(d6({source:t,encrypted:n,key:d,iv:e.iv}),[n.buffer,d.buffer])},Ose=({decryptionWorker:t,segment:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})=>{b({type:"segmentdecryptionstart"}),A6({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:t,segment:e,doneFn:y},w=>{e.bytes=w,b({type:"segmentdecryptioncomplete",segment:e}),E6({segment:e,bytes:e.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})})},Nse=({activeXhrs:t,decryptionWorker:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})=>{let w=0,S=!1;return(D,k)=>{if(!S){if(D)return S=!0,CC(t),y(D,k);if(w+=1,w===t.length){const O=function(){if(k.encryptedBytes)return Ose({decryptionWorker:e,segment:k,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b});E6({segment:k,bytes:k.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:b})};if(k.endOfAllRequests=Date.now(),k.map&&k.map.encryptedBytes&&!k.map.bytes)return b({type:"segmentdecryptionstart",segment:k}),A6({decryptionWorker:e,id:k.requestId+"-init",encryptedBytes:k.map.encryptedBytes,key:k.map.key,segment:k,doneFn:y},N=>{k.map.bytes=N,b({type:"segmentdecryptioncomplete",segment:k}),C6(k,F=>{if(F)return CC(t),y(F,k);O()})});O()}}}},Mse=({loadendState:t,abortFn:e})=>n=>{n.target.aborted&&e&&!t.calledAbortFn&&(e(),t.calledAbortFn=!0)},jse=({segment:t,progressFn:e,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m})=>y=>{if(!y.target.aborted)return t.stats=tr(t.stats,Ase(y)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(y,t)},Lse=({xhr:t,xhrOptions:e,decryptionWorker:n,segment:r,abortFn:i,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:m,captionsFn:y,isEndOfTimeline:x,endedTimelineFn:b,dataFn:w,doneFn:S,onTransmuxerLog:D,triggerSegmentEventFn:k})=>{const O=[],N=Nse({activeXhrs:O,decryptionWorker:n,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:m,captionsFn:y,isEndOfTimeline:x,endedTimelineFn:b,dataFn:w,doneFn:S,onTransmuxerLog:D,triggerSegmentEventFn:k});if(r.key&&!r.key.bytes){const q=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&q.push(r.map.key);const B=tr(e,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),z=BR(r,q,N,k),ee={uri:r.key.resolvedUri};k({type:"segmentkeyloadstart",segment:r,keyInfo:ee});const Y=t(B,z);O.push(Y)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const Y=tr(e,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Q=BR(r,[r.map.key],N,k),oe={uri:r.map.key.resolvedUri};k({type:"segmentkeyloadstart",segment:r,keyInfo:oe});const ue=t(Y,Q);O.push(ue)}const B=tr(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:TC(r.map),requestType:"segment-media-initialization"}),z=Rse({segment:r,finishProcessingFn:N,triggerSegmentEventFn:k});k({type:"segmentloadstart",segment:r});const ee=t(B,z);O.push(ee)}const F=tr(e,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:TC(r),requestType:"segment"}),M=Pse({segment:r,finishProcessingFn:N,responseType:F.responseType,triggerSegmentEventFn:k});k({type:"segmentloadstart",segment:r});const V=t(F,M);V.addEventListener("progress",jse({segment:r,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:m,captionsFn:y,isEndOfTimeline:x,endedTimelineFn:b,dataFn:w})),O.push(V);const $={};return O.forEach(q=>{q.addEventListener("loadend",Mse({loadendState:$,abortFn:i}))}),()=>CC(O)},f1=Oo("PlaylistSelector"),FR=function(t){if(!t||!t.playlist)return;const e=t.playlist;return JSON.stringify({id:e.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:e.attributes&&e.attributes.CODECS||""})},_g=function(t,e){if(!t)return"";const n=me.getComputedStyle(t);return n?n[e]:""},Sg=function(t,e){const n=t.slice();t.sort(function(r,i){const s=e(r,i);return s===0?n.indexOf(r)-n.indexOf(i):s})},GD=function(t,e){let n,r;return t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||me.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||me.Number.MAX_VALUE,n-r},Bse=function(t,e){let n,r;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||me.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||me.Number.MAX_VALUE,n===r&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:n-r};let D6=function(t){const{main:e,bandwidth:n,playerWidth:r,playerHeight:i,playerObjectFit:s,limitRenditionByPlayerDimensions:o,playlistController:u}=t;if(!e)return;const d={bandwidth:n,width:r,height:i,limitRenditionByPlayerDimensions:o};let f=e.playlists;ga.isAudioOnly(e)&&(f=u.getAudioTrackPlaylists_(),d.audioOnly=!0);let m=f.map($=>{let q;const B=$.attributes&&$.attributes.RESOLUTION&&$.attributes.RESOLUTION.width,z=$.attributes&&$.attributes.RESOLUTION&&$.attributes.RESOLUTION.height;return q=$.attributes&&$.attributes.BANDWIDTH,q=q||me.Number.MAX_VALUE,{bandwidth:q,width:B,height:z,playlist:$}});Sg(m,($,q)=>$.bandwidth-q.bandwidth),m=m.filter($=>!ga.isIncompatible($.playlist));let y=m.filter($=>ga.isEnabled($.playlist));y.length||(y=m.filter($=>!ga.isDisabled($.playlist)));const x=y.filter($=>$.bandwidth*zi.BANDWIDTH_VARIANCE<n);let b=x[x.length-1];const w=x.filter($=>$.bandwidth===b.bandwidth)[0];if(o===!1){const $=w||y[0]||m[0];if($&&$.playlist){let q="sortedPlaylistReps";return w&&(q="bandwidthBestRep"),y[0]&&(q="enabledPlaylistReps"),f1(`choosing ${FR($)} using ${q} with options`,d),$.playlist}return f1("could not choose a playlist with options",d),null}const S=x.filter($=>$.width&&$.height);Sg(S,($,q)=>$.width-q.width);const D=S.filter($=>$.width===r&&$.height===i);b=D[D.length-1];const k=D.filter($=>$.bandwidth===b.bandwidth)[0];let O,N,F;k||(O=S.filter($=>s==="cover"?$.width>r&&$.height>i:$.width>r||$.height>i),N=O.filter($=>$.width===O[0].width&&$.height===O[0].height),b=N[N.length-1],F=N.filter($=>$.bandwidth===b.bandwidth)[0]);let M;if(u.leastPixelDiffSelector){const $=S.map(q=>(q.pixelDiff=Math.abs(q.width-r)+Math.abs(q.height-i),q));Sg($,(q,B)=>q.pixelDiff===B.pixelDiff?B.bandwidth-q.bandwidth:q.pixelDiff-B.pixelDiff),M=$[0]}const V=M||F||k||w||y[0]||m[0];if(V&&V.playlist){let $="sortedPlaylistReps";return M?$="leastPixelDiffRep":F?$="resolutionPlusOneRep":k?$="resolutionBestRep":w?$="bandwidthBestRep":y[0]&&($="enabledPlaylistReps"),f1(`choosing ${FR(V)} using ${$} with options`,d),V.playlist}return f1("could not choose a playlist with options",d),null};const UR=function(){let t=this.useDevicePixelRatio&&me.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(t=this.customPixelRatio),D6({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(_g(this.tech_.el(),"width"),10)*t,playerHeight:parseInt(_g(this.tech_.el(),"height"),10)*t,playerObjectFit:this.usePlayerObjectFit?_g(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},Fse=function(t){let e=-1,n=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let r=this.useDevicePixelRatio&&me.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),e<0&&(e=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(e=t*this.systemBandwidth+(1-t)*e,n=this.systemBandwidth),D6({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(_g(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(_g(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?_g(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},Use=function(t){const{main:e,currentTime:n,bandwidth:r,duration:i,segmentDuration:s,timeUntilRebuffer:o,currentTimeline:u,syncController:d}=t,f=e.playlists.filter(w=>!ga.isIncompatible(w));let m=f.filter(ga.isEnabled);m.length||(m=f.filter(w=>!ga.isDisabled(w)));const x=m.filter(ga.hasAttribute.bind(null,"BANDWIDTH")).map(w=>{const D=d.getSyncPoint(w,i,u,n)?1:2,O=ga.estimateSegmentRequestTime(s,r,w)*D-o;return{playlist:w,rebufferingImpact:O}}),b=x.filter(w=>w.rebufferingImpact<=0);return Sg(b,(w,S)=>GD(S.playlist,w.playlist)),b.length?b[0]:(Sg(x,(w,S)=>w.rebufferingImpact-S.rebufferingImpact),x[0]||null)},zse=function(){const t=this.playlists.main.playlists.filter(ga.isEnabled);return Sg(t,(n,r)=>GD(n,r)),t.filter(n=>!!gy(this.playlists.main,n).video)[0]||null},$se=t=>{let e=0,n;return t.bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach(r=>{n.set(r,e),e+=r.byteLength})),n};function k6(t){try{return new URL(t).pathname.split("/").slice(-2).join("/")}catch{return""}}const Vse=function(t,e,n){if(!t[n]){e.trigger({type:"usage",name:"vhs-608"});let r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);const i=e.textTracks().getTrackById(r);if(i)t[n]=i;else{const s=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=n,u=n,d=!1;const f=s[r];f&&(o=f.label,u=f.language,d=f.default),t[n]=e.addRemoteTextTrack({kind:"captions",id:r,default:d,label:o,language:u},!1).track}}},Hse=function({inbandTextTracks:t,captionArray:e,timestampOffset:n}){if(!e)return;const r=me.WebKitDataCue||me.VTTCue;e.forEach(i=>{const s=i.stream;i.content?i.content.forEach(o=>{const u=new r(i.startTime+n,i.endTime+n,o.text);u.line=o.line,u.align="left",u.position=o.position,u.positionAlign="line-left",t[s].addCue(u)}):t[s].addCue(new r(i.startTime+n,i.endTime+n,i.text))})},qse=function(t){Object.defineProperties(t.frame,{id:{get(){return Re.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get(){return Re.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get(){return Re.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})},Gse=({inbandTextTracks:t,metadataArray:e,timestampOffset:n,videoDuration:r})=>{if(!e)return;const i=me.WebKitDataCue||me.VTTCue,s=t.metadataTrack_;if(!s||(e.forEach(m=>{const y=m.cueTime+n;typeof y!="number"||me.isNaN(y)||y<0||!(y<1/0)||!m.frames||!m.frames.length||m.frames.forEach(x=>{const b=new i(y,y,x.value||x.url||x.data||"");b.frame=x,b.value=x,qse(b),s.addCue(b)})}),!s.cues||!s.cues.length))return;const o=s.cues,u=[];for(let m=0;m<o.length;m++)o[m]&&u.push(o[m]);const d=u.reduce((m,y)=>{const x=m[y.startTime]||[];return x.push(y),m[y.startTime]=x,m},{}),f=Object.keys(d).sort((m,y)=>Number(m)-Number(y));f.forEach((m,y)=>{const x=d[m],b=isFinite(r)?r:m,w=Number(f[y+1])||b;x.forEach(S=>{S.endTime=w})})},Wse={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"},Xse=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Yse=({inbandTextTracks:t,dateRanges:e})=>{const n=t.metadataTrack_;if(!n)return;const r=me.WebKitDataCue||me.VTTCue;e.forEach(i=>{for(const s of Object.keys(i)){if(Xse.has(s))continue;const o=new r(i.startTime,i.endTime,"");o.id=i.id,o.type="com.apple.quicktime.HLS",o.value={key:Wse[s],data:i[s]},(s==="scte35Out"||s==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),n.addCue(o)}i.processDateRange()})},zR=(t,e,n)=>{t.metadataTrack_||(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Re.browser.IS_ANY_SAFARI||(t.metadataTrack_.inBandMetadataTrackDispatchType=e))},ly=function(t,e,n){let r,i;if(n&&n.cues)for(r=n.cues.length;r--;)i=n.cues[r],i.startTime>=t&&i.endTime<=e&&n.removeCue(i)},Kse=function(t){const e=t.cues;if(!e)return;const n={};for(let r=e.length-1;r>=0;r--){const i=e[r],s=`${i.startTime}-${i.endTime}-${i.text}`;n[s]?t.removeCue(i):n[s]=i}},Qse=(t,e,n)=>{if(typeof e>"u"||e===null||!t.length)return[];const r=Math.ceil((e-n+3)*Xh.ONE_SECOND_IN_TS);let i;for(i=0;i<t.length&&!(t[i].pts>r);i++);return t.slice(i)},Zse=(t,e,n)=>{if(!e.length)return t;if(n)return e.slice();const r=e[0].pts;let i=0;for(i;i<t.length&&!(t[i].pts>=r);i++);return t.slice(0,i).concat(e)},Jse=(t,e,n,r)=>{const i=Math.ceil((e-r)*Xh.ONE_SECOND_IN_TS),s=Math.ceil((n-r)*Xh.ONE_SECOND_IN_TS),o=t.slice();let u=t.length;for(;u--&&!(t[u].pts<=s););if(u===-1)return o;let d=u+1;for(;d--&&!(t[d].pts<=i););return d=Math.max(d,0),o.splice(d,u-d+1),o},eae=function(t,e){if(!t&&!e||!t&&e||t&&!e)return!1;if(t===e)return!0;const n=Object.keys(t).sort(),r=Object.keys(e).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(s!==r[i]||t[s]!==e[s])return!1}return!0},tae=function(t,e,n){e=e||[];const r=[];let i=0;for(let s=0;s<e.length;s++){const o=e[s];if(t===o.timeline&&(r.push(s),i+=o.duration,i>n))return s}return r.length===0?0:r[r.length-1]},Qv=1,nae=500,$R=t=>typeof t=="number"&&isFinite(t),h1=1/60,rae=(t,e,n)=>t!=="main"||!e||!n?null:!n.hasAudio&&!n.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,iae=(t,e,n)=>{let r=e-zi.BACK_BUFFER_LENGTH;t.length&&(r=Math.max(r,t.start(0)));const i=e-n;return Math.min(i,r)},tg=t=>{const{startOfSegment:e,duration:n,segment:r,part:i,playlist:{mediaSequence:s,id:o,segments:u=[]},mediaIndex:d,partIndex:f,timeline:m}=t,y=u.length-1;let x="mediaIndex/partIndex increment";t.getMediaInfoForTime?x=`getMediaInfoForTime (${t.getMediaInfoForTime})`:t.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),t.independent&&(x+=` with independent ${t.independent}`);const b=typeof f=="number",w=t.segment.uri?"segment":"pre-segment",S=b?Wj({preloadSegment:r})-1:0;return`${w} [${s+d}/${s+y}]`+(b?` part [${f}/${S}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(b?` part start/end [${i.start} => ${i.end}]`:"")+` startOfSegment [${e}] duration [${n}] timeline [${m}] selected by [${x}] playlist [${o}]`},VR=t=>`${t}TimingInfo`,sae=({segmentTimeline:t,currentTimeline:e,startOfSegment:n,buffered:r,overrideCheck:i})=>!i&&t===e?null:t<e?n:r.length?r.end(r.length-1):n,EC=({timelineChangeController:t,currentTimeline:e,segmentTimeline:n,loaderType:r,audioDisabled:i})=>{if(e===n)return!1;if(r==="audio"){const s=t.lastTimelineChange({type:"main"});return!s||s.to!==n}if(r==="main"&&i){const s=t.pendingTimelineChange({type:"audio"});return!(s&&s.to===n)}return!1},aae=t=>{if(!t)return!1;const e=t.pendingTimelineChange({type:"audio"}),n=t.pendingTimelineChange({type:"main"}),r=e&&n,i=r&&e.to!==n.to;return!!(r&&e.from!==-1&&n.from!==-1&&i)},oae=t=>{const e=t.timelineChangeController_.pendingTimelineChange({type:"audio"}),n=t.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&n&&e.to<n.to},Yd=t=>{const e=t.pendingSegment_;if(!e)return;if(EC({timelineChangeController:t.timelineChangeController_,currentTimeline:t.currentTimeline_,segmentTimeline:e.timeline,loaderType:t.loaderType_,audioDisabled:t.audioDisabled_})&&aae(t.timelineChangeController_)){if(oae(t)){t.timelineChangeController_.trigger("audioTimelineBehind");return}t.timelineChangeController_.trigger("fixBadTimelineChange")}},lae=t=>{let e=0;return["video","audio"].forEach(function(n){const r=t[`${n}TimingInfo`];if(!r)return;const{start:i,end:s}=r;let o;typeof i=="bigint"||typeof s=="bigint"?o=me.BigInt(s)-me.BigInt(i):typeof i=="number"&&typeof s=="number"&&(o=s-i),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},HR=({segmentDuration:t,maxDuration:e})=>t?Math.round(t)>e+Pu:!1,uae=(t,e)=>{if(e!=="hls")return null;const n=lae({audioTimingInfo:t.audioTimingInfo,videoTimingInfo:t.videoTimingInfo});if(!n)return null;const r=t.playlist.targetDuration,i=HR({segmentDuration:n,maxDuration:r*2}),s=HR({segmentDuration:n,maxDuration:r}),o=`Segment with index ${t.mediaIndex} from playlist ${t.playlist.id} has a duration of ${n} when the reported duration is ${t.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return i||s?{severity:i?"warn":"info",message:o}:null},Hh=({type:t,segment:e})=>{if(!e)return;const n=!!(e.key||e.map&&e.map.ke),r=!!(e.map&&!e.map.bytes),i=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:t||e.type,uri:e.resolvedUri||e.uri,start:i,duration:e.duration,isEncrypted:n,isMediaInitialization:r}};class AC extends Re.EventTarget{constructor(e,n={}){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_=Oo(`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_():Yd(this)}),this.sourceUpdater_.on("codecschange",r=>{this.trigger(Xr({type:"codecschange"},r))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Yd(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",r=>{this.trigger(Xr({type:"timelinechange"},r)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Yd(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Yd(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return lw.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_&&me.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,me.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_&&lw.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return qi();if(this.loaderType_==="main"){const{hasAudio:n,hasVideo:r,isMuxed:i}=e;if(r&&n&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(r)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,n=!1){if(!e)return null;const r=w_(e);let i=this.initSegments_[r];return n&&!i&&e.bytes&&(this.initSegments_[r]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e}segmentKey(e,n=!1){if(!e)return null;const r=f6(e);let i=this.keyCache_[r];this.cacheEncryptionKeys_&&n&&!i&&e.bytes&&(this.keyCache_[r]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});const s={resolvedUri:(i||e).resolvedUri};return i&&(s.bytes=i.bytes),s}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,n={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const r=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=n,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(r&&(r.id?s=r.id:r.uri&&(s=r.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${aw(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 o=e.mediaSequence-r.mediaSequence;if(this.logger_(`live window shift [${o}]`),this.mediaIndex!==null)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const u=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!u.parts||!u.parts.length||!u.parts[this.partIndex])){const d=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=d}}i&&(i.mediaIndex-=o,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,e)}pause(){this.checkBufferTimeout_&&(me.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_&&lw.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,n,r=()=>{},i=!1){if(n===1/0&&(n=this.duration_()),n<=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 s=1;const o=()=>{s--,s===0&&r()};(i||!this.audioDisabled_)&&(s++,this.sourceUpdater_.removeAudio(e,n,o)),(i||this.loaderType_==="main")&&(this.gopBuffer_=Jse(this.gopBuffer_,e,n,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,n,o));for(const u in this.inbandTextTracks_)ly(e,n,this.inbandTextTracks_[u]);ly(e,n,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&me.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=me.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&me.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=me.setTimeout(this.monitorBufferTick_.bind(this),nae)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const n={segmentInfo:Hh({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:n}),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,n=this.playlist_,r=this.partIndex){if(!n||!this.mediaSource_)return!1;const i=typeof e=="number"&&n.segments[e],s=e+1===n.segments.length,o=!i||!i.parts||r+1===i.parts.length;return n.endList&&this.mediaSource_.readyState==="open"&&s&&o}chooseNextRequest_(){const e=this.buffered_(),n=aw(e)||0,r=zD(e,this.currentTime_()),i=!this.hasPlayed_()&&r>=1,s=r>=this.goalBufferLength_(),o=this.playlist_.segments;if(!o.length||i||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const u={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(u.isSyncRequest)u.mediaIndex=tae(this.currentTimeline_,o,n),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${u.mediaIndex}`);else if(this.mediaIndex!==null){const x=o[this.mediaIndex],b=typeof this.partIndex=="number"?this.partIndex:-1;u.startOfSegment=x.end?x.end:n,x.parts&&x.parts[b+1]?(u.mediaIndex=this.mediaIndex,u.partIndex=b+1):u.mediaIndex=this.mediaIndex+1}else{let x,b,w;const S=this.fetchAtBuffer_?n:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${S}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${n}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const D=this.getSyncInfoFromMediaSequenceSync_(S);if(!D){const k="No sync info found while using media sequence sync";return this.error({message:k,metadata:{errorType:Re.Error.StreamingFailedToSelectNextSegment,error:new Error(k)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${D.start} --> ${D.end})`),x=D.segmentIndex,b=D.partIndex,w=D.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const D=ga.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:S,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});x=D.segmentIndex,b=D.partIndex,w=D.startTime}u.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${S}`:`currentTime ${S}`,u.mediaIndex=x,u.startOfSegment=w,u.partIndex=b,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${u.mediaIndex} `)}const d=o[u.mediaIndex];let f=d&&typeof u.partIndex=="number"&&d.parts&&d.parts[u.partIndex];if(!d||typeof u.partIndex=="number"&&!f)return null;typeof u.partIndex!="number"&&d.parts&&(u.partIndex=0,f=d.parts[0]);const m=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!r&&f&&!m&&!f.independent)if(u.partIndex===0){const x=o[u.mediaIndex-1],b=x.parts&&x.parts.length&&x.parts[x.parts.length-1];b&&b.independent&&(u.mediaIndex-=1,u.partIndex=x.parts.length-1,u.independent="previous segment")}else d.parts[u.partIndex-1].independent&&(u.partIndex-=1,u.independent="previous part");const y=this.mediaSource_&&this.mediaSource_.readyState==="ended";return u.mediaIndex>=o.length-1&&y&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,u.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(u))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const n=Math.max(e,this.mediaSequenceSync_.start);e!==n&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${n}`);const r=this.mediaSequenceSync_.getSyncInfoForTime(n);if(!r)return null;if(!r.isAppended)return r;const i=this.mediaSequenceSync_.getSyncInfoForTime(r.end);return i?(i.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),i):null}generateSegmentInfo_(e){const{independent:n,playlist:r,mediaIndex:i,startOfSegment:s,isSyncRequest:o,partIndex:u,forceTimestampOffset:d,getMediaInfoForTime:f}=e,m=r.segments[i],y=typeof u=="number"&&m.parts[u],x={requestId:"segment-loader-"+Math.random(),uri:y&&y.resolvedUri||m.resolvedUri,mediaIndex:i,partIndex:y?u:null,isSyncRequest:o,startOfSegment:s,playlist:r,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:m.timeline,duration:y&&y.duration||m.duration,segment:m,part:y,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:f,independent:n},b=typeof d<"u"?d:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:m.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:b});const w=aw(this.sourceUpdater_.audioBuffered());return typeof w=="number"&&(x.audioAppendStart=w-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=Qse(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x}timestampOffsetForSegment_(e){return sae(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const n=this.currentTime_(),r=e.bandwidth,i=this.pendingSegment_.duration,s=ga.estimateSegmentRequestTime(i,r,this.playlist_,e.bytesReceived),o=Aie(this.buffered_(),n,this.vhs_.tech_.playbackRate())-1;if(s<=o)return;const u=Use({main:this.vhs_.playlists.main,currentTime:n,bandwidth:r,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!u)return;const f=s-o-u.rebufferingImpact;let m=.5;o<=Pu&&(m=1),!(!u.playlist||u.playlist.uri===this.playlist_.uri||f<m)&&(this.bandwidth=u.playlist.attributes.BANDWIDTH*zi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${tg(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,n){this.earlyAbortWhenNeeded_(n.stats),!this.checkForAbort_(n.requestId)&&this.trigger("progress")}handleTrackInfo_(e,n){const{hasAudio:r,hasVideo:i}=n,s={segmentInfo:Hh({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:r,hasVideo:i}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(n)||(n=n||{},eae(this.currentMediaInfo_,n)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=n,this.currentMediaInfo_=n,this.logger_("trackinfo update",n),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=n,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Yd(this))))}handleTimingInfo_(e,n,r,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_,o=VR(n);s[o]=s[o]||{},s[o][r]=i,this.logger_(`timinginfo: ${n} - ${r} - ${i}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Yd(this)}handleCaptions_(e,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(n.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,n));return}const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};n.forEach(o=>{s[o.stream]=s[o.stream]||{startTime:1/0,captions:[],endTime:0};const u=s[o.stream];u.startTime=Math.min(u.startTime,o.startTime+i),u.endTime=Math.max(u.endTime,o.endTime+i),u.captions.push(o)}),Object.keys(s).forEach(o=>{const{startTime:u,endTime:d,captions:f}=s[o],m=this.inbandTextTracks_;this.logger_(`adding cues from ${u} -> ${d} for ${o}`),Vse(m,this.vhs_.tech_,o),ly(u,d,m[o]),Hse({captionArray:f,inbandTextTracks:m,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,n,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,n,r));return}this.addMetadataToTextTrack(r,n,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(n=>n())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(n=>n())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!EC({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_,n=this.getCurrentMediaInfo_();if(!e||!n)return!1;const{hasAudio:r,hasVideo:i,isMuxed:s}=n;return!(i&&!e.videoTimingInfo||r&&!this.audioDisabled_&&!s&&!e.audioTimingInfo||EC({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){Yd(this),this.callQueue_.push(this.handleData_.bind(this,e,n));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[VR(n.type)].start;else{const i=this.getCurrentMediaInfo_(),s=this.loaderType_==="main"&&i&&i.hasVideo;let o;s&&(o=r.videoTimingInfo.start),r.timingInfo.start=this.trueSegmentStart_({currentStart:r.timingInfo.start,playlist:r.playlist,mediaIndex:r.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:o,videoTimingInfo:r.videoTimingInfo,audioTimingInfo:r.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(r,n.type),this.updateSourceBufferTimestampOffset_(r),r.isSyncRequest){this.updateTimingInfoEnd_(r),this.syncController_.saveSegmentTimingInfo({segmentInfo:r,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=this.chooseNextRequest_();if(i.mediaIndex!==r.mediaIndex||i.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,n)}}updateAppendInitSegmentStatus(e,n){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[n]!==e.playlist&&(this.appendInitSegment_[n]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:n,map:r,playlist:i}){if(r){const s=w_(r);if(this.activeInitSegmentId_===s)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=s}return n&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=i,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,n):null}handleQuotaExceededError_({segmentInfo:e,type:n,bytes:r},i){const s=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Yh(s).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Yh(o).join(", "));const u=s.length?s.start(0):0,d=s.length?s.end(s.length-1):0,f=o.length?o.start(0):0,m=o.length?o.end(o.length-1):0;if(d-u<=Qv&&m-f<=Qv){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${r.byteLength}, audio buffer: ${Yh(s).join(", ")}, video buffer: ${Yh(o).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:n,bytes:r}));const x=this.currentTime_()-Qv;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${x}`),this.remove(0,x,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Qv}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=me.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Qv*1e3)},!0)}handleAppendError_({segmentInfo:e,type:n,bytes:r},i){if(i){if(i.code===i6){this.handleQuotaExceededError_({segmentInfo:e,type:n,bytes:r});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",i),this.error({message:`${n} append of ${r.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:Re.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i,bytes:s}){if(!s){const u=[i];let d=i.byteLength;r&&(u.unshift(r),d+=r.byteLength),s=$se({bytes:d,segments:u})}const o={segmentInfo:Hh({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:o}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:n,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:n,bytes:s}))}handleSegmentTimingInfo_(e,n,r){if(!this.pendingSegment_||n!==this.pendingSegment_.requestId)return;const i=this.pendingSegment_.segment,s=`${e}TimingInfo`;i[s]||(i[s]={}),i[s].transmuxerPrependedSeconds=r.prependedContentDuration||0,i[s].transmuxedPresentationStart=r.start.presentation,i[s].transmuxedDecodeStart=r.start.decode,i[s].transmuxedPresentationEnd=r.end.presentation,i[s].transmuxedDecodeEnd=r.end.decode,i[s].baseMediaDecodeTime=r.baseMediaDecodeTime}appendData_(e,n){const{type:r,data:i}=n;if(!i||!i.byteLength||r==="audio"&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:r,initSegment:n.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:r,initSegment:s,data:i})}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_()){Yd(this),this.loadQueue_.push(()=>{const n=Xr({},e,{forceTimestampOffset:!0});Xr(e,this.generateSegmentInfo_(n)),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 n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=this.mediaIndex!==null,s=e.timeline!==this.currentTimeline_&&e.timeline>0,o=r||i&&s;this.logger_(`Requesting
${k6(e.uri)}
${tg(e)}`),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Lse({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:u,level:d,stream:f})=>{this.logger_(`${tg(e)} logged from transmuxer stream ${f} as a ${d}: ${u}`)},triggerSegmentEventFn:({type:u,segment:d,keyInfo:f,trackInfo:m,timingInfo:y})=>{const b={segmentInfo:Hh({segment:d})};f&&(b.keyInfo=f),m&&(b.trackInfo=m),y&&(b.timingInfo=y),this.trigger({type:u,metadata:b})}})}trimBackBuffer_(e){const n=iae(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);n>0&&this.remove(0,n)}createSimplifiedSegmentObj_(e){const n=e.segment,r=e.part,i=e.segment.key||e.segment.map&&e.segment.map.key,s=e.segment.map&&!e.segment.map.bytes,o={resolvedUri:r?r.resolvedUri:n.resolvedUri,byterange:r?r.byterange:n.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:i,isMediaInitialization:s},u=e.playlist.segments[e.mediaIndex-1];if(u&&u.timeline===n.timeline&&(u.videoTimingInfo?o.baseStartTime=u.videoTimingInfo.transmuxedDecodeEnd:u.audioTimingInfo&&(o.baseStartTime=u.audioTimingInfo.transmuxedDecodeEnd)),n.key){const d=n.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(n.key),o.key.iv=d}return n.map&&(o.map=this.initSegmentForMap(n.map)),o}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,n){if(this.pendingSegment_.byteLength=n.bytesReceived,e<h1){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${h1}`);return}const r={bandwidthInfo:{from:this.bandwidth,to:n.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:r}),this.bandwidth=n.bandwidth,this.roundTrip=n.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,n,r){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,n,r));return}if(this.saveTransferStats_(n.stats),!this.pendingSegment_||n.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ou.ABORTED)return;if(this.pause(),e.code===Ou.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,n.stats),i.endOfAllRequests=n.endOfAllRequests,r.gopInfo&&(this.gopBuffer_=Zse(this.gopBuffer_,r.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}setTimeMapping_(e){const n=this.syncController_.mappingForTimeline(e);n!==null&&(this.timeMapping_=n)}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:n,mediaIndex:r,firstVideoFrameTimeForData:i,currentVideoTimestampOffset:s,useVideoTimingInfo:o,videoTimingInfo:u,audioTimingInfo:d}){if(typeof e<"u")return e;if(!o)return d.start;const f=n.segments[r-1];return r===0||!f||typeof f.start>"u"||f.end!==i+s?i:u.start}waitForAppendsToComplete_(e){const n=this.getCurrentMediaInfo_(e);if(!n){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:i,isMuxed:s}=n,o=this.loaderType_==="main"&&i,u=!this.audioDisabled_&&r&&!s;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}o&&e.waitingOnAppends++,u&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),u&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const n=rae(this.loaderType_,this.getCurrentMediaInfo_(),e);return n?(this.error({message:n,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 n=!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),n=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),n=!0),n&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:n,timingInfo:r}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:n&&typeof n.transmuxedDecodeStart=="number"?n.transmuxedDecodeStart:r.start:r.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const n=this.getMediaInfo_(),i=this.loaderType_==="main"&&n&&n.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end=typeof i.end=="number"?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const d={segmentInfo:Hh({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:d})}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 n=uae(e,this.sourceType_);if(n&&(n.severity==="warn"?Re.log.warn(n.message):this.logger_(n.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 ${tg(e)}`);return}this.logger_(`Appended ${tg(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,i=e.part,s=r.end&&this.currentTime_()-r.end>e.playlist.targetDuration*3,o=i&&i.end&&this.currentTime_()-i.end>e.playlist.partTargetDuration*3;if(s||o){this.logger_(`bad ${s?"segment":"part"} ${tg(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<h1){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${h1}`);return}const n=this.throughput.rate,r=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/r*8*1e3);this.throughput.rate+=(i-n)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const n=e.segment,r=n.start,i=n.end;if(!$R(r)||!$R(i))return;ly(r,i,this.segmentMetadataTrack_);const s=me.WebKitDataCue||me.VTTCue,o={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.dateTimeString,programDateTime:n.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:i},u=JSON.stringify(o),d=new s(r,i,u);d.value=o,this.segmentMetadataTrack_.addCue(d)}}function Lc(){}const R6=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase())},cae=["video","audio"],DC=(t,e)=>{const n=e[`${t}Buffer`];return n&&n.updating||e.queuePending[t]},dae=(t,e)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.type==="mediaSource")return null;if(r.type===t)return n}return null},Tg=(t,e)=>{if(e.queue.length===0)return;let n=0,r=e.queue[n];if(r.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),r.action(e),r.doneFn&&r.doneFn(),Tg("audio",e),Tg("video",e));return}if(t!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||DC(t,e))){if(r.type!==t){if(n=dae(t,e.queue),n===null)return;r=e.queue[n]}if(e.queue.splice(n,1),e.queuePending[t]=r,r.action(t,e),!r.doneFn){e.queuePending[t]=null,Tg(t,e);return}}},P6=(t,e)=>{const n=e[`${t}Buffer`],r=R6(t);n&&(n.removeEventListener("updateend",e[`on${r}UpdateEnd_`]),n.removeEventListener("error",e[`on${r}Error_`]),e.codecs[t]=null,e[`${t}Buffer`]=null)},Du=(t,e)=>t&&e&&Array.prototype.indexOf.call(t.sourceBuffers,e)!==-1,Ua={appendBuffer:(t,e,n)=>(r,i)=>{const s=i[`${r}Buffer`];if(Du(i.mediaSource,s)){i.logger_(`Appending segment ${e.mediaIndex}'s ${t.length} bytes to ${r}Buffer`);try{s.appendBuffer(t)}catch(o){i.logger_(`Error with code ${o.code} `+(o.code===i6?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${r}Buffer`),i.queuePending[r]=null,n(o)}}},remove:(t,e)=>(n,r)=>{const i=r[`${n}Buffer`];if(Du(r.mediaSource,i)){r.logger_(`Removing ${t} to ${e} from ${n}Buffer`);try{i.remove(t,e)}catch{r.logger_(`Remove ${t} to ${e} from ${n}Buffer failed`)}}},timestampOffset:t=>(e,n)=>{const r=n[`${e}Buffer`];Du(n.mediaSource,r)&&(n.logger_(`Setting ${e}timestampOffset to ${t}`),r.timestampOffset=t)},callback:t=>(e,n)=>{t()},endOfStream:t=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${t||""})`);try{e.mediaSource.endOfStream(t)}catch(n){Re.log.warn("Failed to call media source endOfStream",n)}}},duration:t=>e=>{e.logger_(`Setting mediaSource duration to ${t}`);try{e.mediaSource.duration=t}catch(n){Re.log.warn("Failed to set media source duration",n)}},abort:()=>(t,e)=>{if(e.mediaSource.readyState!=="open")return;const n=e[`${t}Buffer`];if(Du(e.mediaSource,n)){e.logger_(`calling abort on ${t}Buffer`);try{n.abort()}catch(r){Re.log.warn(`Failed to abort on ${t}Buffer`,r)}}},addSourceBuffer:(t,e)=>n=>{const r=R6(t),i=Mg(e);n.logger_(`Adding ${t}Buffer with codec ${e} to mediaSource`);const s=n.mediaSource.addSourceBuffer(i);s.addEventListener("updateend",n[`on${r}UpdateEnd_`]),s.addEventListener("error",n[`on${r}Error_`]),n.codecs[t]=e,n[`${t}Buffer`]=s},removeSourceBuffer:t=>e=>{const n=e[`${t}Buffer`];if(P6(t,e),!!Du(e.mediaSource,n)){e.logger_(`Removing ${t}Buffer with codec ${e.codecs[t]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(n)}catch(r){Re.log.warn(`Failed to removeSourceBuffer ${t}Buffer`,r)}}},changeType:t=>(e,n)=>{const r=n[`${e}Buffer`],i=Mg(t);if(!Du(n.mediaSource,r))return;const s=t.substring(0,t.indexOf(".")),o=n.codecs[e];if(o.substring(0,o.indexOf("."))===s)return;const d={codecsChangeInfo:{from:o,to:t}};n.trigger({type:"codecschange",metadata:d}),n.logger_(`changing ${e}Buffer codec from ${o} to ${t}`);try{r.changeType(i),n.codecs[e]=t}catch(f){d.errorType=Re.Error.StreamingCodecsChangeError,d.error=f,f.metadata=d,n.error_=f,n.trigger("error"),Re.log.warn(`Failed to changeType on ${e}Buffer`,f)}}},za=({type:t,sourceUpdater:e,action:n,doneFn:r,name:i})=>{e.queue.push({type:t,action:n,doneFn:r,name:i}),Tg(t,e)},qR=(t,e)=>n=>{const r=e[`${t}Buffered`](),i=wie(r);if(e.logger_(`received "updateend" event for ${t} Source Buffer: `,i),e.queuePending[t]){const s=e.queuePending[t].doneFn;e.queuePending[t]=null,s&&s(e[`${t}Error_`])}Tg(t,e)};class I6 extends Re.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Tg("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Oo("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=qR("video",this),this.onAudioUpdateEnd_=qR("audio",this),this.onVideoError_=n=>{this.videoError_=n},this.onAudioError_=n=>{this.audioError_=n},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,n){za({type:"mediaSource",sourceUpdater:this,action:Ua.addSourceBuffer(e,n),name:"addSourceBuffer"})}abort(e){za({type:e,sourceUpdater:this,action:Ua.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){Re.log.error("removeSourceBuffer is not supported!");return}za({type:"mediaSource",sourceUpdater:this,action:Ua.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!Re.browser.IS_FIREFOX&&me.MediaSource&&me.MediaSource.prototype&&typeof me.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return me.SourceBuffer&&me.SourceBuffer.prototype&&typeof me.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,n){if(!this.canChangeType()){Re.log.error("changeType is not supported!");return}za({type:e,sourceUpdater:this,action:Ua.changeType(n),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(n=>{const r=e[n];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(n,r);this.canChangeType()&&this.changeType(n,r)})}appendBuffer(e,n){const{segmentInfo:r,type:i,bytes:s}=e;if(this.processedAppend_=!0,i==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,n]),this.logger_(`delayed audio append of ${s.length} until video append`);return}const o=n;if(za({type:i,sourceUpdater:this,action:Ua.appendBuffer(s,r||{mediaIndex:-1},o),doneFn:n,name:"appendBuffer"}),i==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const u=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${u.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,u.forEach(d=>{this.appendBuffer.apply(this,d)})}}audioBuffered(){return Du(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:qi()}videoBuffered(){return Du(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:qi()}buffered(){const e=Du(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,n=Du(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return n&&!e?this.audioBuffered():e&&!n?this.videoBuffered():Eie(this.audioBuffered(),this.videoBuffered())}setDuration(e,n=Lc){za({type:"mediaSource",sourceUpdater:this,action:Ua.duration(e),name:"duration",doneFn:n})}endOfStream(e=null,n=Lc){typeof e!="string"&&(e=void 0),za({type:"mediaSource",sourceUpdater:this,action:Ua.endOfStream(e),name:"endOfStream",doneFn:n})}removeAudio(e,n,r=Lc){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){r();return}za({type:"audio",sourceUpdater:this,action:Ua.remove(e,n),doneFn:r,name:"remove"})}removeVideo(e,n,r=Lc){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){r();return}za({type:"video",sourceUpdater:this,action:Ua.remove(e,n),doneFn:r,name:"remove"})}updating(){return!!(DC("audio",this)||DC("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(za({type:"audio",sourceUpdater:this,action:Ua.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(za({type:"video",sourceUpdater:this,action:Ua.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&za({type:"audio",sourceUpdater:this,action:Ua.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&za({type:"video",sourceUpdater:this,action:Ua.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),cae.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>P6(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const GR=t=>decodeURIComponent(escape(String.fromCharCode.apply(null,t))),fae=t=>{const e=new Uint8Array(t);return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")},WR=new Uint8Array(`

`.split("").map(t=>t.charCodeAt(0)));class hae extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class pae extends AC{constructor(e,n={}){super(e,n),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 qi();const e=this.subtitlesTrack_.cues,n=e[0].startTime,r=e[e.length-1].startTime;return qi([[n,r]])}initSegmentForMap(e,n=!1){if(!e)return null;const r=w_(e);let i=this.initSegments_[r];if(n&&!i&&e.bytes){const s=WR.byteLength+e.bytes.byteLength,o=new Uint8Array(s);o.set(e.bytes),o.set(WR,e.bytes.byteLength),this.initSegments_[r]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return i||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,n){ly(e,n,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const n=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",n),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,n,r){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(n.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Ou.TIMEOUT&&this.handleTimeout_(),e.code===Ou.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const i=this.pendingSegment_,s=r.mp4VttCues&&r.mp4VttCues.length;s&&(i.mp4VttCues=r.mp4VttCues),this.saveBandwidthRelatedStats_(i.duration,n.stats),n.key&&this.segmentKey(n.key,!0),this.state="APPENDING",this.trigger("appending");const o=i.segment;if(o.map&&(o.map.bytes=n.map.bytes),i.bytes=n.bytes,typeof me.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,n,r),()=>this.stopForError({message:"Error loading vtt.js"}));return}o.requested=!0;try{this.parseVTTCues_(i)}catch(u){this.stopForError({message:u.message,metadata:{errorType:Re.Error.StreamingVttParserError,error:u}});return}if(s||this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach(u=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new me.VTTCue(u.startTime,u.endTime,u.text):u)}),Kse(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,n){const r=e&&e.type==="vtt",i=n&&n.type==="text";r&&i&&super.handleData_(e,n)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const n=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(r=>{const i=r.start+n,s=r.end+n,o=new me.VTTCue(i,s,r.cueText);r.settings&&r.settings.split(" ").forEach(u=>{const d=u.split(":"),f=d[0],m=d[1];o[f]=isNaN(m)?m:Number(m)}),e.cues.push(o)})}parseVTTCues_(e){let n,r=!1;if(typeof me.WebVTT!="function")throw new hae;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof me.TextDecoder=="function"?n=new me.TextDecoder("utf8"):(n=me.WebVTT.StringDecoder(),r=!0);const i=new me.WebVTT.Parser(me,me.vttjs,n);if(i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=o=>{e.timestampmap=o},i.onparsingerror=o=>{Re.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;r&&(o=GR(o)),i.parse(o)}let s=e.bytes;r&&(s=GR(s)),i.parse(s),i.flush()}updateTimeMapping_(e,n,r){const i=e.segment;if(!n)return;if(!e.cues.length){i.empty=!0;return}const{MPEGTS:s,LOCAL:o}=e.timestampmap,d=s/Xh.ONE_SECOND_IN_TS-o+n.mapping;if(e.cues.forEach(f=>{const m=f.endTime-f.startTime,y=this.handleRollover_(f.startTime+d,n.time);f.startTime=Math.max(y,0),f.endTime=Math.max(y+m,0)}),!r.syncInfo){const f=e.cues[0].startTime,m=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(f,m-i.duration)}}}handleRollover_(e,n){if(n===null)return e;let r=e*Xh.ONE_SECOND_IN_TS;const i=n*Xh.ONE_SECOND_IN_TS;let s;for(i<r?s=-8589934592:s=8589934592;Math.abs(r-i)>4294967296;)r+=s;return r/Xh.ONE_SECOND_IN_TS}}const mae=function(t,e){const n=t.cues;for(let r=0;r<n.length;r++){const i=n[r];if(e>=i.adStartTime&&e<=i.adEndTime)return i}return null},gae=function(t,e,n=0){if(!t.segments)return;let r=n,i;for(let s=0;s<t.segments.length;s++){const o=t.segments[s];if(i||(i=mae(e,r+o.duration/2)),i){if("cueIn"in o){i.endTime=r,i.adEndTime=r,r+=o.duration,i=null;continue}if(r<i.endTime){r+=o.duration;continue}i.endTime+=o.duration}else if("cueOut"in o&&(i=new me.VTTCue(r,r+o.duration,o.cueOut),i.adStartTime=r,i.adEndTime=r+parseFloat(o.cueOut),e.addCue(i)),"cueOutCont"in o){const[u,d]=o.cueOutCont.split("/").map(parseFloat);i=new me.VTTCue(r,r+o.duration,""),i.adStartTime=r-u,i.adEndTime=i.adStartTime+d,e.addCue(i)}r+=o.duration}};class XR{constructor({start:e,end:n,segmentIndex:r,partIndex:i=null,appended:s=!1}){this.start_=e,this.end_=n,this.segmentIndex_=r,this.partIndex_=i,this.appended_=s}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 vae{constructor(e,n=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=n}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 O6{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,n){const{mediaSequence:r,segments:i}=e;if(this.isReliable_=this.isReliablePlaylist_(r,i),!!this.isReliable_)return this.updateStorage_(i,r,this.calculateBaseTime_(r,i,n))}getSyncInfoForTime(e){for(const{segmentSyncInfo:n,partsSyncInfo:r}of this.storage_.values())if(r.length){for(const i of r)if(i.isInRange(e))return i}else if(n.isInRange(e))return n;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,n,r){const i=new Map;let s=`
`,o=r,u=n;this.start_=o,e.forEach((d,f)=>{const m=this.storage_.get(u),y=o,x=y+d.duration,b=!!(m&&m.segmentSyncInfo&&m.segmentSyncInfo.isAppended),w=new XR({start:y,end:x,appended:b,segmentIndex:f});d.syncInfo=w;let S=o;const D=(d.parts||[]).map((k,O)=>{const N=S,F=S+k.duration,M=!!(m&&m.partsSyncInfo&&m.partsSyncInfo[O]&&m.partsSyncInfo[O].isAppended),V=new XR({start:N,end:F,appended:M,segmentIndex:f,partIndex:O});return S=F,s+=`Media Sequence: ${u}.${O} | Range: ${N} --> ${F} | Appended: ${M}
`,k.syncInfo=V,V});i.set(u,new vae(w,D)),s+=`${k6(d.resolvedUri)} | Media Sequence: ${u} | Range: ${y} --> ${x} | Appended: ${b}
`,u++,o=x}),this.end_=o,this.storage_=i,this.diagnostics_=s}calculateBaseTime_(e,n,r){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(e<i){const s=i-e;let o=this.storage_.get(i).segmentSyncInfo.start;for(let u=0;u<s;u++){const d=n[u];o-=d.duration}return o}return r}isReliablePlaylist_(e,n){return e!=null&&Array.isArray(n)&&n.length}}class YR extends O6{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,n,r){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(e);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,n,r)}}const yae=86400,uw=[{name:"VOD",run:(t,e,n,r,i)=>n!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(t,e,n,r,i,s)=>{const o=t.getMediaSequenceSync(s);if(!o||!o.isReliable)return null;const u=o.getSyncInfoForTime(i);return u?{time:u.start,partIndex:u.partIndex,segmentIndex:u.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,e,n,r,i)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let s=null,o=null;const u=yC(e);i=i||0;for(let d=0;d<u.length;d++){const f=e.endList||i===0?d:u.length-(d+1),m=u[f],y=m.segment,x=t.timelineToDatetimeMappings[y.timeline];if(!x||!y.dateTimeObject)continue;let w=y.dateTimeObject.getTime()/1e3+x;if(y.parts&&typeof m.partIndex=="number")for(let D=0;D<m.partIndex;D++)w+=y.parts[D].duration;const S=Math.abs(i-w);if(o!==null&&(S===0||o<S))break;o=S,s={time:w,segmentIndex:m.segmentIndex,partIndex:m.partIndex}}return s}},{name:"Segment",run:(t,e,n,r,i)=>{let s=null,o=null;i=i||0;const u=yC(e);for(let d=0;d<u.length;d++){const f=e.endList||i===0?d:u.length-(d+1),m=u[f],y=m.segment,x=m.part&&m.part.start||y&&y.start;if(y.timeline===r&&typeof x<"u"){const b=Math.abs(i-x);if(o!==null&&o<b)break;(!s||o===null||o>=b)&&(o=b,s={time:x,segmentIndex:m.segmentIndex,partIndex:m.partIndex})}}return s}},{name:"Discontinuity",run:(t,e,n,r,i)=>{let s=null;if(i=i||0,e.discontinuityStarts&&e.discontinuityStarts.length){let o=null;for(let u=0;u<e.discontinuityStarts.length;u++){const d=e.discontinuityStarts[u],f=e.discontinuitySequence+u+1,m=t.discontinuities[f];if(m){const y=Math.abs(i-m.time);if(o!==null&&o<y)break;(!s||o===null||o>=y)&&(o=y,s={time:m.time,segmentIndex:d,partIndex:null})}}}return s}},{name:"Playlist",run:(t,e,n,r,i)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class bae extends Re.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const n=new O6,r=new YR(n),i=new YR(n);this.mediaSequenceStorage_={main:n,audio:r,vtt:i},this.logger_=Oo("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,n,r,i,s){if(n!==1/0)return uw.find(({name:d})=>d==="VOD").run(this,e,n);const o=this.runStrategies_(e,n,r,i,s);if(!o.length)return null;for(const u of o){const{syncPoint:d,strategy:f}=u,{segmentIndex:m,time:y}=d;if(m<0)continue;const x=e.segments[m],b=y,w=b+x.duration;if(this.logger_(`Strategy: ${f}. Current time: ${i}. selected segment: ${m}. Time: [${b} -> ${w}]}`),i>=b&&i<w)return this.logger_("Found sync point with exact match: ",d),d}return this.selectSyncPoint_(o,{key:"time",value:i})}getExpiredTime(e,n){if(!e||!e.segments)return null;const r=this.runStrategies_(e,n,e.discontinuitySequence,0);if(!r.length)return null;const i=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+my({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(e,n,r,i,s){const o=[];for(let u=0;u<uw.length;u++){const d=uw[u],f=d.run(this,e,n,r,i,s);f&&(f.strategy=d.name,o.push({strategy:d.name,syncPoint:f}))}return o}selectSyncPoint_(e,n){let r=e[0].syncPoint,i=Math.abs(e[0].syncPoint[n.key]-n.value),s=e[0].strategy;for(let o=1;o<e.length;o++){const u=Math.abs(e[o].syncPoint[n.key]-n.value);u<i&&(i=u,r=e[o].syncPoint,s=e[o].strategy)}return this.logger_(`syncPoint for [${n.key}: ${n.value}] chosen with strategy [${s}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,n){const r=n.mediaSequence-e.mediaSequence;if(r>yae){Re.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let i=r-1;i>=0;i--){const s=e.segments[i];if(s&&typeof s.start<"u"){n.syncInfo={mediaSequence:e.mediaSequence+i,time:s.start},this.logger_(`playlist refresh sync: [time:${n.syncInfo.time}, mediaSequence: ${n.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const n=e.segments[0],r=n.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[n.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:n}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,n),i=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:i.start}));const s=i.dateTimeObject;i.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[i.timeline]=-(s.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,n,r){const i=e.segment,s=e.part;let o=this.timelines[e.timeline],u,d;if(typeof e.timestampOffset=="number")o={time:e.startOfSegment,mapping:e.startOfSegment-n.start},r&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),u=e.startOfSegment,d=n.end+o.mapping;else if(o)u=n.start+o.mapping,d=n.end+o.mapping;else return!1;return s&&(s.start=u,s.end=d),(!i.start||u<i.start)&&(i.start=u),i.end=d,!0}saveDiscontinuitySyncInfo_(e){const n=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(n.discontinuityStarts&&n.discontinuityStarts.length)for(let i=0;i<n.discontinuityStarts.length;i++){const s=n.discontinuityStarts[i],o=n.discontinuitySequence+i+1,u=s-e.mediaIndex,d=Math.abs(u);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>d){let f;u<0?f=r.start-my({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex,endIndex:s}):f=r.end+my({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[o]={time:f,accuracy:d}}}}dispose(){this.trigger("dispose"),this.off()}}class xae extends Re.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:n,to:r}){return typeof n=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:n,to:r}){if(typeof n=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:n,to:r},delete this.pendingTimelineChanges_[e];const i={timelineChangeInfo:{from:n,to:r}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const _ae=y6(b6(function(){var t=function(){function S(){this.listeners={}}var D=S.prototype;return D.on=function(O,N){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push(N)},D.off=function(O,N){if(!this.listeners[O])return!1;var F=this.listeners[O].indexOf(N);return this.listeners[O]=this.listeners[O].slice(0),this.listeners[O].splice(F,1),F>-1},D.trigger=function(O){var N=this.listeners[O];if(N)if(arguments.length===2)for(var F=N.length,M=0;M<F;++M)N[M].call(this,arguments[1]);else for(var V=Array.prototype.slice.call(arguments,1),$=N.length,q=0;q<$;++q)N[q].apply(this,V)},D.dispose=function(){this.listeners={}},D.pipe=function(O){this.on("data",function(N){O.push(N)})},S}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(S){return S.subarray(0,S.byteLength-S[S.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const n=function(){const S=[[[],[],[],[],[]],[[],[],[],[],[]]],D=S[0],k=S[1],O=D[4],N=k[4];let F,M,V;const $=[],q=[];let B,z,ee,Y,Q,oe;for(F=0;F<256;F++)q[($[F]=F<<1^(F>>7)*283)^F]=F;for(M=V=0;!O[M];M^=B||1,V=q[V]||1)for(Y=V^V<<1^V<<2^V<<3^V<<4,Y=Y>>8^Y&255^99,O[M]=Y,N[Y]=M,ee=$[z=$[B=$[M]]],oe=ee*16843009^z*65537^B*257^M*16843008,Q=$[Y]*257^Y*16843008,F=0;F<4;F++)D[F][M]=Q=Q<<24^Q>>>8,k[F][Y]=oe=oe<<24^oe>>>8;for(F=0;F<5;F++)D[F]=D[F].slice(0),k[F]=k[F].slice(0);return S};let r=null;class i{constructor(D){r||(r=n()),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 k,O,N;const F=this._tables[0][4],M=this._tables[1],V=D.length;let $=1;if(V!==4&&V!==6&&V!==8)throw new Error("Invalid aes key size");const q=D.slice(0),B=[];for(this._key=[q,B],k=V;k<4*V+28;k++)N=q[k-1],(k%V===0||V===8&&k%V===4)&&(N=F[N>>>24]<<24^F[N>>16&255]<<16^F[N>>8&255]<<8^F[N&255],k%V===0&&(N=N<<8^N>>>24^$<<24,$=$<<1^($>>7)*283)),q[k]=q[k-V]^N;for(O=0;k;O++,k--)N=q[O&3?k:k-4],k<=4||O<4?B[O]=N:B[O]=M[0][F[N>>>24]]^M[1][F[N>>16&255]]^M[2][F[N>>8&255]]^M[3][F[N&255]]}decrypt(D,k,O,N,F,M){const V=this._key[1];let $=D^V[0],q=N^V[1],B=O^V[2],z=k^V[3],ee,Y,Q;const oe=V.length/4-2;let ue,H=4;const te=this._tables[1],Z=te[0],ie=te[1],G=te[2],X=te[3],fe=te[4];for(ue=0;ue<oe;ue++)ee=Z[$>>>24]^ie[q>>16&255]^G[B>>8&255]^X[z&255]^V[H],Y=Z[q>>>24]^ie[B>>16&255]^G[z>>8&255]^X[$&255]^V[H+1],Q=Z[B>>>24]^ie[z>>16&255]^G[$>>8&255]^X[q&255]^V[H+2],z=Z[z>>>24]^ie[$>>16&255]^G[q>>8&255]^X[B&255]^V[H+3],H+=4,$=ee,q=Y,B=Q;for(ue=0;ue<4;ue++)F[(3&-ue)+M]=fe[$>>>24]<<24^fe[q>>16&255]<<16^fe[B>>8&255]<<8^fe[z&255]^V[H++],ee=$,$=q,q=B,B=z,z=ee}}class s extends t{constructor(){super(t),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(D){this.jobs.push(D),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(S){return S<<24|(S&65280)<<8|(S&16711680)>>8|S>>>24},u=function(S,D,k){const O=new Int32Array(S.buffer,S.byteOffset,S.byteLength>>2),N=new i(Array.prototype.slice.call(D)),F=new Uint8Array(S.byteLength),M=new Int32Array(F.buffer);let V,$,q,B,z,ee,Y,Q,oe;for(V=k[0],$=k[1],q=k[2],B=k[3],oe=0;oe<O.length;oe+=4)z=o(O[oe]),ee=o(O[oe+1]),Y=o(O[oe+2]),Q=o(O[oe+3]),N.decrypt(z,ee,Y,Q,M,oe),M[oe]=o(M[oe]^V),M[oe+1]=o(M[oe+1]^$),M[oe+2]=o(M[oe+2]^q),M[oe+3]=o(M[oe+3]^B),V=z,$=ee,q=Y,B=Q;return F};class d{constructor(D,k,O,N){const F=d.STEP,M=new Int32Array(D.buffer),V=new Uint8Array(D.byteLength);let $=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(M.subarray($,$+F),k,O,V)),$=F;$<M.length;$+=F)O=new Uint32Array([o(M[$-4]),o(M[$-3]),o(M[$-2]),o(M[$-1])]),this.asyncStream_.push(this.decryptChunk_(M.subarray($,$+F),k,O,V));this.asyncStream_.push(function(){N(null,e(V))})}static get STEP(){return 32e3}decryptChunk_(D,k,O,N){return function(){const F=u(D,k,O);N.set(F,D.byteOffset)}}}var f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m;typeof window<"u"?m=window:typeof f<"u"?m=f:typeof self<"u"?m=self:m={};var y=m,x=function(D){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(D):D&&D.buffer instanceof ArrayBuffer},b=y.BigInt||Number;b("0x1"),b("0x100"),b("0x10000"),b("0x1000000"),b("0x100000000"),b("0x10000000000"),b("0x1000000000000"),b("0x100000000000000"),b("0x10000000000000000"),function(){var S=new Uint16Array([65484]),D=new Uint8Array(S.buffer,S.byteOffset,S.byteLength);return D[0]===255?"big":D[0]===204?"little":"unknown"}();const w=function(S){const D={};return Object.keys(S).forEach(k=>{const O=S[k];x(O)?D[k]={bytes:O.buffer,byteOffset:O.byteOffset,byteLength:O.byteLength}:D[k]=O}),D};self.onmessage=function(S){const D=S.data,k=new Uint8Array(D.encrypted.bytes,D.encrypted.byteOffset,D.encrypted.byteLength),O=new Uint32Array(D.key.bytes,D.key.byteOffset,D.key.byteLength/4),N=new Uint32Array(D.iv.bytes,D.iv.byteOffset,D.iv.byteLength/4);new d(k,O,N,function(F,M){self.postMessage(w({source:D.source,decrypted:M}),[M.buffer])})}}));var Sae=v6(_ae);const Tae=t=>{let e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},N6=(t,e)=>{t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},kC=(t,e)=>{e.activePlaylistLoader=t,t.load()},wae=(t,e)=>()=>{const{segmentLoaders:{[t]:n,main:r},mediaTypes:{[t]:i}}=e,s=i.activeTrack(),o=i.getActiveGroup(),u=i.activePlaylistLoader,d=i.lastGroup_;if(!(o&&d&&o.id===d.id)&&(i.lastGroup_=o,i.lastTrack_=s,N6(n,i),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){u&&r.resetEverything();return}n.resyncLoader(),kC(o.playlistLoader,i)}},Cae=(t,e)=>()=>{const{segmentLoaders:{[t]:n},mediaTypes:{[t]:r}}=e;r.lastGroup_=null,n.abort(),n.pause()},Eae=(t,e)=>()=>{const{mainPlaylistLoader:n,segmentLoaders:{[t]:r,main:i},mediaTypes:{[t]:s}}=e,o=s.activeTrack(),u=s.getActiveGroup(),d=s.activePlaylistLoader,f=s.lastTrack_;if(!(f&&o&&f.id===o.id)&&(s.lastGroup_=u,s.lastTrack_=o,N6(r,s),!!u)){if(u.isMainPlaylist){if(!o||!f||o.id===f.id)return;const m=e.vhs.playlistController_,y=m.selectPlaylist();if(m.media()===y)return;s.logger_(`track change. Switching main audio from ${f.id} to ${o.id}`),n.pause(),i.resetEverything(),m.fastQualityChange_(y);return}if(t==="AUDIO"){if(!u.playlistLoader){i.setAudio(!0),i.resetEverything();return}r.setAudio(!0),i.setAudio(!1)}if(d===u.playlistLoader){kC(u.playlistLoader,s);return}r.track&&r.track(o),r.resetEverything(),kC(u.playlistLoader,s)}},C_={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:n},excludePlaylist:r}=e,i=n.activeTrack(),s=n.activeGroup(),o=(s.filter(d=>d.default)[0]||s[0]).id,u=n.tracks[o];if(i===u){r({error:{message:"Problem encountered loading the default audio track."}});return}Re.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const d in n.tracks)n.tracks[d].enabled=n.tracks[d]===u;n.onTrackChanged()},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:n}}=e;Re.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}},KR={AUDIO:(t,e,n)=>{if(!e)return;const{tech:r,requestOptions:i,segmentLoaders:{[t]:s}}=n;e.on("loadedmetadata",()=>{const o=e.media();s.playlist(o,i),(!r.paused()||o.endList&&r.preload()!=="none")&&s.load()}),e.on("loadedplaylist",()=>{s.playlist(e.media(),i),r.paused()||s.load()}),e.on("error",C_[t](t,n))},SUBTITLES:(t,e,n)=>{const{tech:r,requestOptions:i,segmentLoaders:{[t]:s},mediaTypes:{[t]:o}}=n;e.on("loadedmetadata",()=>{const u=e.media();s.playlist(u,i),s.track(o.activeTrack()),(!r.paused()||u.endList&&r.preload()!=="none")&&s.load()}),e.on("loadedplaylist",()=>{s.playlist(e.media(),i),r.paused()||s.load()}),e.on("error",C_[t](t,n))}},Aae={AUDIO:(t,e)=>{const{vhs:n,sourceType:r,segmentLoaders:{[t]:i},requestOptions:s,main:{mediaGroups:o},mediaTypes:{[t]:{groups:u,tracks:d,logger_:f}},mainPlaylistLoader:m}=e,y=ab(m.main);(!o[t]||Object.keys(o[t]).length===0)&&(o[t]={main:{default:{default:!0}}},y&&(o[t].main.default.playlists=m.main.playlists));for(const x in o[t]){u[x]||(u[x]=[]);for(const b in o[t][x]){let w=o[t][x][b],S;if(y?(f(`AUDIO group '${x}' label '${b}' is a main playlist`),w.isMainPlaylist=!0,S=null):r==="vhs-json"&&w.playlists?S=new ug(w.playlists[0],n,s):w.resolvedUri?S=new ug(w.resolvedUri,n,s):w.playlists&&r==="dash"?S=new wC(w.playlists[0],n,s,m):S=null,w=tr({id:b,playlistLoader:S},w),KR[t](t,w.playlistLoader,e),u[x].push(w),typeof d[b]>"u"){const D=new Re.AudioTrack({id:b,kind:Tae(w),enabled:!1,language:w.language,default:w.default,label:b});d[b]=D}}}i.on("error",C_[t](t,e))},SUBTITLES:(t,e)=>{const{tech:n,vhs:r,sourceType:i,segmentLoaders:{[t]:s},requestOptions:o,main:{mediaGroups:u},mediaTypes:{[t]:{groups:d,tracks:f}},mainPlaylistLoader:m}=e;for(const y in u[t]){d[y]||(d[y]=[]);for(const x in u[t][y]){if(!r.options_.useForcedSubtitles&&u[t][y][x].forced)continue;let b=u[t][y][x],w;if(i==="hls")w=new ug(b.resolvedUri,r,o);else if(i==="dash"){if(!b.playlists.filter(D=>D.excludeUntil!==1/0).length)return;w=new wC(b.playlists[0],r,o,m)}else i==="vhs-json"&&(w=new ug(b.playlists?b.playlists[0]:b.resolvedUri,r,o));if(b=tr({id:x,playlistLoader:w},b),KR[t](t,b.playlistLoader,e),d[y].push(b),typeof f[x]>"u"){const S=n.addRemoteTextTrack({id:x,kind:"subtitles",default:b.default&&b.autoselect,language:b.language,label:x},!1).track;f[x]=S}}}s.on("error",C_[t](t,e))},"CLOSED-CAPTIONS":(t,e)=>{const{tech:n,main:{mediaGroups:r},mediaTypes:{[t]:{groups:i,tracks:s}}}=e;for(const o in r[t]){i[o]||(i[o]=[]);for(const u in r[t][o]){const d=r[t][o][u];if(!/^(?:CC|SERVICE)/.test(d.instreamId))continue;const f=n.options_.vhs&&n.options_.vhs.captionServices||{};let m={label:u,language:d.language,instreamId:d.instreamId,default:d.default&&d.autoselect};if(f[m.instreamId]&&(m=tr(m,f[m.instreamId])),m.default===void 0&&delete m.default,i[o].push(tr({id:u},d)),typeof s[u]>"u"){const y=n.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;s[u]=y}}}}},M6=(t,e)=>{for(let n=0;n<t.length;n++)if(HD(e,t[n])||t[n].playlists&&M6(t[n].playlists,e))return!0;return!1},Dae=(t,e)=>n=>{const{mainPlaylistLoader:r,mediaTypes:{[t]:{groups:i}}}=e,s=r.media();if(!s)return null;let o=null;s.attributes[t]&&(o=i[s.attributes[t]]);const u=Object.keys(i);if(!o)if(t==="AUDIO"&&u.length>1&&ab(e.main))for(let d=0;d<u.length;d++){const f=i[u[d]];if(M6(f,s)){o=f;break}}else i.main?o=i.main:u.length===1&&(o=i[u[0]]);return typeof n>"u"?o:n===null||!o?null:o.filter(d=>d.id===n.id)[0]||null},kae={AUDIO:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].enabled)return n[r];return null},SUBTITLES:(t,e)=>()=>{const{mediaTypes:{[t]:{tracks:n}}}=e;for(const r in n)if(n[r].mode==="showing"||n[r].mode==="hidden")return n[r];return null}},Rae=(t,{mediaTypes:e})=>()=>{const n=e[t].activeTrack();return n?e[t].activeGroup(n):null},Pae=t=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(f=>{Aae[f](f,t)});const{mediaTypes:e,mainPlaylistLoader:n,tech:r,vhs:i,segmentLoaders:{["AUDIO"]:s,main:o}}=t;["AUDIO","SUBTITLES"].forEach(f=>{e[f].activeGroup=Dae(f,t),e[f].activeTrack=kae[f](f,t),e[f].onGroupChanged=wae(f,t),e[f].onGroupChanging=Cae(f,t),e[f].onTrackChanged=Eae(f,t),e[f].getActiveGroup=Rae(f,t)});const u=e.AUDIO.activeGroup();if(u){const f=(u.filter(y=>y.default)[0]||u[0]).id;e.AUDIO.tracks[f].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.setAudio(!0)}n.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(f=>e[f].onGroupChanged())}),n.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(f=>e[f].onGroupChanging())});const d=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",d),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),i.on("dispose",()=>{r.audioTracks().removeEventListener("change",d),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const f in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[f])},Iae=()=>{const t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Lc,activeTrack:Lc,getActiveGroup:Lc,onGroupChanged:Lc,onTrackChanged:Lc,lastTrack_:null,logger_:Oo(`MediaGroups[${e}]`)}}),t};class QR{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_=ma(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(n=>[n.ID,n])))}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 Oae extends Re.EventTarget{constructor(e,n){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new QR,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_=Oo("Content Steering"),this.xhr_=e,this.getBandwidth_=n}assignTagProperties(e,n){this.manifestType_=n.serverUri?"HLS":"DASH";const r=n.serverUri||n.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=ma(e,r),this.defaultPathway=n.pathwayId||n.defaultServiceLocation,this.queryBeforeStart=n.queryBeforeStart,this.proxyServerUrl_=n.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const n=this.steeringManifest.reloadUri;if(!n)return;const r=e?n:this.getRequestURI(n);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(s,o)=>{if(s){if(o.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(o.status===429){const f=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${f} seconds.`),this.startTTLTimeout_(parseInt(f,10));return}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let u;try{u=JSON.parse(this.request_.responseText)}catch(f){const m={errorType:Re.Error.StreamingContentSteeringParserError,error:f};this.trigger({type:"error",metadata:m})}this.assignSteeringProperties_(u);const d={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:d}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const n=new me.URL(e),r=new me.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(n.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const n=JSON.parse(me.atob(e));this.assignSteeringProperties_(n)}setSteeringParams_(e){const n=new me.URL(e),r=this.getPathway(),i=this.getBandwidth_();if(r){const s=`_${this.manifestType_}_pathway`;n.searchParams.set(s,r)}if(i){const s=`_${this.manifestType_}_throughput`;n.searchParams.set(s,i)}return n.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=(i=>{for(const s of i)if(this.availablePathways_.has(s))return s;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 n=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!n(i))return i}const r=this.setSteeringParams_(e);return n(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const n=e*1e3;this.ttlTimeout_=me.setTimeout(()=>{this.requestSteeringManifest()},n)}clearTTLTimeout_(){me.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 QR}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,n){return!n&&this.steeringManifest.reloadUri||n&&(ma(e,n.serverURL)!==this.steeringManifest.reloadUri||n.defaultServiceLocation!==this.defaultPathway||n.queryBeforeStart!==this.queryBeforeStart||n.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const Nae=(t,e)=>{let n=null;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{t.apply(null,r)},e)}},Mae=10;let Kd;const jae=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Lae=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},Bae=function({currentPlaylist:t,buffered:e,currentTime:n,nextPlaylist:r,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:o,bufferBasedABR:u,log:d}){if(!r)return Re.log.warn("We received no playlist to switch to. Please check your stream."),!1;const f=`allowing switch ${t&&t.id||"null"} -> ${r.id}`;if(!t)return d(`${f} as current playlist is not set`),!0;if(r.id===t.id)return!1;const m=!!lg(e,n).length;if(!t.endList)return!m&&typeof t.partTargetDuration=="number"?(d(`not ${f} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(d(`${f} as current playlist is live`),!0);const y=zD(e,n),x=u?zi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:zi.MAX_BUFFER_LOW_WATER_LINE;if(o<x)return d(`${f} as duration < max low water line (${o} < ${x})`),!0;const b=r.attributes.BANDWIDTH,w=t.attributes.BANDWIDTH;if(b<w&&(!u||y<s)){let S=`${f} as next bandwidth < current bandwidth (${b} < ${w})`;return u&&(S+=` and forwardBuffer < bufferHighWaterLine (${y} < ${s})`),d(S),!0}if((!u||b>w)&&y>=i){let S=`${f} as forwardBuffer >= bufferLowWaterLine (${y} >= ${i})`;return u&&(S+=` and next bandwidth > current bandwidth (${b} > ${w})`),d(S),!0}return d(`not ${f} as no switching criteria met`),!1};class Fae extends Re.EventTarget{constructor(e){super(),this.fastQualityChange_=Nae(this.fastQualityChange_.bind(this),100);const{src:n,withCredentials:r,tech:i,bandwidth:s,externVhs:o,useCueTags:u,playlistExclusionDuration:d,enableLowInitialPlaylist:f,sourceType:m,cacheEncryptionKeys:y,bufferBasedABR:x,leastPixelDiffSelector:b,captionServices:w,experimentalUseMMS:S}=e;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:D}=e;(D===null||typeof D>"u")&&(D=1/0),Kd=o,this.bufferBasedABR=!!x,this.leastPixelDiffSelector=!!b,this.withCredentials=r,this.tech_=i,this.vhs_=i.vhs,this.player_=e.player_,this.sourceType_=m,this.useCueTags_=u,this.playlistExclusionDuration=d,this.maxPlaylistRetries=D,this.enableLowInitialPlaylist=f,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:D,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Iae(),S&&me.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new me.ManagedMediaSource,this.usingManagedMediaSource_=!0,Re.log("Using ManagedMediaSource")):me.MediaSource&&(this.mediaSource=new me.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_=qi(),this.hasPlayed_=!1,this.syncController_=new bae(e),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Sae,this.sourceUpdater_=new I6(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new xae,this.keyStatusMap_=new Map;const k={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:w,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:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:y,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new wC(n,this.vhs_,tr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new ug(n,this.vhs_,tr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new AC(tr(k,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new AC(tr(k,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new pae(tr(k,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((F,M)=>{function V(){i.off("vttjserror",$),F()}function $(){i.off("vttjsloaded",V),M()}i.one("vttjsloaded",V),i.one("vttjserror",$),i.addWebVttScript_()})}),e);const O=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new Oae(this.vhs_.xhr,O),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),jae.forEach(F=>{this[F+"_"]=Lae.bind(this,F)}),this.logger_=Oo("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 N=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(N,()=>{const F=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-F,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),n=this.audioAppendsToLoadedData_();return e===-1||n===-1?-1:e+n}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const n=this.selectPlaylist();n&&this.shouldSwitchToMedia_(n)&&this.switchMedia_(n,e)}switchMedia_(e,n,r){const i=this.media(),s=i&&(i.id||i.uri),o=e&&(e.id||e.uri);if(s&&s!==o){this.logger_(`switch media ${s} -> ${o} from ${n}`);const u={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:n};this.trigger({type:"renditionselected",metadata:u}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${n}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const n=this.mediaTypes_[e],r=n?n.activeGroup():null,i=this.contentSteeringController_.getPathway();if(r&&i){const o=(r.length?r[0].playlists:r.playlists).filter(u=>u.attributes.serviceLocation===i);o.length&&this.mediaTypes_[e].activePlaylistLoader.media(o[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=me.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(me.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),n=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return n;const r=e.mediaGroups.AUDIO,i=Object.keys(r);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const u=r.main||i.length&&r[i[0]];for(const d in u)if(u[d].default){s={label:d};break}}if(!s)return n;const o=[];for(const u in r)if(r[u][s.label]){const d=r[u][s.label];if(d.playlists&&d.playlists.length)o.push.apply(o,d.playlists);else if(d.uri)o.push(d);else if(e.playlists.length)for(let f=0;f<e.playlists.length;f++){const m=e.playlists[f];m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===u&&o.push(m)}}return o.length?o:n}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;bC(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,n.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.mainSegmentLoader_.load()),Pae({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(),n),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 n=this.mainPlaylistLoader_.media();if(!n){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;n=this.initialMedia_}this.handleUpdatedMediaPlaylist(n)}),this.mainPlaylistLoader_.on("error",()=>{const n=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const n=this.mainPlaylistLoader_.media(),r=n.targetDuration*1.5*1e3;bC(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(n,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const n=this.mainPlaylistLoader_.media();if(n.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(n)&&(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(n=>{this.mainPlaylistLoader_.on(n,r=>{this.player_.trigger(Xr({},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,n){const r=e.mediaGroups||{};let i=!0;const s=Object.keys(r.AUDIO);for(const o in r.AUDIO)for(const u in r.AUDIO[o])r.AUDIO[o][u].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Kd.Playlist.isAes(n)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(r.AUDIO[s[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 n=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),i=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),o=this.tech_.buffered();return Bae({buffered:o,currentTime:r,currentPlaylist:n,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:s,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 i=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),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:Mae}))});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,i=>{this.player_.trigger(Xr({},i))}),this.audioSegmentLoader_.on(r,i=>{this.player_.trigger(Xr({},i))}),this.subtitleSegmentLoader_.on(r,i=>{this.player_.trigger(Xr({},i))})})}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 n=this.seekable();if(!n.length)return!1;const r=n.end(0);let i=r;if(e.start){const s=e.start.timeOffset;s<0?i=Math.max(r+s,n.start(0)):i=Math.min(r,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}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,n=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const n=this.duration();e[e.length-1].endTime=isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const n=this.mainSegmentLoader_.getCurrentMediaInfo_();!n||n.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 i=Kd.Playlist.playlistEnd(e,r),s=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return i-s<=Iu;const u=o.end(o.length-1);return u-s<=Iu&&i-u<=Iu}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||n.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=n,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,s=i.filter(Z2),o=s.length===1&&s[0]===e;if(i.length===1&&r!==1/0)return Re.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const w=this.pathwayAttribute_(e),S=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(w),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(w)},S);return}let b=!1;i.forEach(w=>{if(w===e)return;const S=w.excludeUntil;typeof S<"u"&&S!==1/0&&(b=!0,delete w.excludeUntil)}),b&&(Re.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let u;e.playlistErrors_>this.maxPlaylistRetries?u=1/0:u=Date.now()+r*1e3,e.excludeUntil=u,n.reason&&(e.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const d=this.selectPlaylist();if(!d){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const f=n.internal?this.logger_:Re.log.warn,m=n.message?" "+n.message:"";f(`${n.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${m} Switching to playlist ${d.id}.`),d.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),d.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const y=d.targetDuration/2*1e3||5*1e3,x=typeof d.lastRequest=="number"&&Date.now()-d.lastRequest<=y;return this.switchMedia_(d,"exclude",o||x)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,n){const r=[],i=e==="all";(i||e==="main")&&r.push(this.mainPlaylistLoader_);const s=[];(i||e==="audio")&&s.push("AUDIO"),(i||e==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(o=>{const u=this.mediaTypes_[o]&&this.mediaTypes_[o].activePlaylistLoader;u&&r.push(u)}),["main","audio","subtitle"].forEach(o=>{const u=this[`${o}SegmentLoader_`];u&&(e===o||e==="all")&&r.push(u)}),r.forEach(o=>n.forEach(u=>{typeof o[u]=="function"&&o[u]()}))}setCurrentTime(e){const n=lg(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(n&&n.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:Kd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,n){const r=e.media();if(!r)return null;const i=this.syncController_.getMediaSequenceSync(n);if(i&&i.isReliable){const u=i.start,d=i.end;if(!isFinite(u)||!isFinite(d))return null;const f=Kd.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r),m=Math.max(u,d-f);return qi([[u,m]])}const s=this.syncController_.getExpiredTime(r,this.duration());if(s===null)return null;const o=Kd.Playlist.seekable(r,s,Kd.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r));return o.length?o:null}computeFinalSeekable_(e,n){if(!n)return e;const r=e.start(0),i=e.end(0),s=n.start(0),o=n.end(0);return s>i||r>o?e:qi([[Math.max(r,s),Math.min(i,o)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let n;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!n))return;const r=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,n),!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 [${qj(this.seekable_)}]`);const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),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 i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const n=this.tech_.buffered();let r=Kd.Playlist.duration(this.mainPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.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 n=this.mediaTypes_[e].groups;for(const r in n)n[r].forEach(i=>{i.playlistLoader&&i.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,n=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!n||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=gy(this.main(),n),i={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=r.video||e.main.videoCodec||Ate),e.main.isMuxed&&(i.video+=`,${r.audio||e.main.audioCodec||U4}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||s)&&(i.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||U4,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:n,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(f,m)=>f?dy(m,this.usingManagedMediaSource_):VT(m),u={};let d;if(["video","audio"].forEach(function(f){if(i.hasOwnProperty(f)&&!o(e[f].isFmp4,i[f])){const m=e[f].isFmp4?"browser":"muxer";u[m]=u[m]||[],u[m].push(i[f]),f==="audio"&&(d=m)}}),s&&d&&n.attributes.AUDIO){const f=n.attributes.AUDIO;this.main().playlists.forEach(m=>{(m.attributes&&m.attributes.AUDIO)===f&&m!==n&&(m.excludeUntil=1/0)}),this.logger_(`excluding audio group ${f} as ${d} does not support codec(s): "${i.audio}"`)}if(Object.keys(u).length){const f=Object.keys(u).reduce((m,y)=>(m&&(m+=", "),m+=`${y} does not support codec(s): "${u[y].join(",")}"`,m),"")+".";this.excludePlaylist({playlistToExclude:n,error:{internal:!0,message:f},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const f=[];if(["video","audio"].forEach(m=>{const y=(Au(this.sourceUpdater_.codecs[m]||"")[0]||{}).type,x=(Au(i[m]||"")[0]||{}).type;y&&x&&y.toLowerCase()!==x.toLowerCase()&&f.push(`"${this.sourceUpdater_.codecs[m]}" -> "${i[m]}"`)}),f.length){this.excludePlaylist({playlistToExclude:n,error:{message:`Codec switching not supported: ${f.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const n=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(n)}excludeUnsupportedVariants_(){const e=this.main().playlists,n=[];Object.keys(e).forEach(r=>{const i=e[r];if(n.indexOf(i.id)!==-1)return;n.push(i.id);const s=gy(this.main,i),o=[];s.audio&&!VT(s.audio)&&!dy(s.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${s.audio}`),s.video&&!VT(s.video)&&!dy(s.video,this.usingManagedMediaSource_)&&o.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&o.push(`text codec ${s.text}`),o.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const n=[],r=this.main().playlists,i=Py(Au(e)),s=OR(i),o=i.video&&Au(i.video)[0]||null,u=i.audio&&Au(i.audio)[0]||null;Object.keys(r).forEach(d=>{const f=r[d];if(n.indexOf(f.id)!==-1||f.excludeUntil===1/0)return;n.push(f.id);const m=[],y=gy(this.mainPlaylistLoader_.main,f),x=OR(y);if(!(!y.audio&&!y.video)){if(x!==s&&m.push(`codec count "${x}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const b=y.video&&Au(y.video)[0]||null,w=y.audio&&Au(y.audio)[0]||null;b&&o&&b.type.toLowerCase()!==o.type.toLowerCase()&&m.push(`video codec "${b.type}" !== "${o.type}"`),w&&u&&w.type.toLowerCase()!==u.type.toLowerCase()&&m.push(`audio codec "${w.type}" !== "${u.type}"`)}m.length&&(f.excludeUntil=1/0,this.logger_(`excluding ${f.id}: ${m.join(" && ")}`))}})}updateAdCues_(e){let n=0;const r=this.seekable();r.length&&(n=r.start(0)),gae(e,this.cueTagsTrack_,n)}goalBufferLength(){const e=this.tech_.currentTime(),n=zi.GOAL_BUFFER_LENGTH,r=zi.GOAL_BUFFER_LENGTH_RATE,i=Math.max(n,zi.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+e*r,i)}bufferLowWaterLine(){const e=this.tech_.currentTime(),n=zi.BUFFER_LOW_WATER_LINE,r=zi.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(n,zi.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(n,zi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+e*r,this.bufferBasedABR?s:i)}bufferHighWaterLine(){return zi.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){zR(this.inbandTextTracks_,"com.apple.streaming",this.tech_),Yse({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,n,r){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();zR(this.inbandTextTracks_,e,this.tech_),Gse({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:i,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const n of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(n));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(n=>{this.contentSteeringController_.on(n,r=>{this.trigger(Xr({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const n=this.main();(this.contentSteeringController_.didDASHTagChange(n.uri,n.contentSteering)||(()=>{const s=this.contentSteeringController_.getAvailablePathways(),o=[];for(const u of n.playlists){const d=u.attributes.serviceLocation;if(d&&(o.push(d),!s.has(d)))return!0}return!!(!o.length&&s.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,i=new Set;let s=!1;Object.keys(r).forEach(o=>{const u=r[o],d=this.pathwayAttribute_(u),f=d&&e!==d;u.excludeUntil===1/0&&u.lastExcludeReason_==="content-steering"&&!f&&(delete u.excludeUntil,delete u.lastExcludeReason_,s=!0);const y=!u.excludeUntil&&u.excludeUntil!==1/0;!i.has(u.id)&&f&&y&&(i.add(u.id),u.excludeUntil=1/0,u.lastExcludeReason_="content-steering",this.logger_(`excluding ${u.id} for ${u.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(o=>{const u=this.mediaTypes_[o];if(u.activePlaylistLoader){const d=u.activePlaylistLoader.media_;d&&d.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const n=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||i&&i.size){for(const[o,u]of r.entries())i.get(o)||(this.mainPlaylistLoader_.updateOrDeleteClone(u),this.contentSteeringController_.excludePathway(o));for(const[o,u]of i.entries()){const d=r.get(o);if(!d){n.filter(m=>m.attributes["PATHWAY-ID"]===u["BASE-ID"]).forEach(m=>{this.mainPlaylistLoader_.addClonePathway(u,m)}),this.contentSteeringController_.addAvailablePathway(o);continue}this.equalPathwayClones_(d,u)||(this.mainPlaylistLoader_.updateOrDeleteClone(u,!0),this.contentSteeringController_.addAvailablePathway(o))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,n){if(e["BASE-ID"]!==n["BASE-ID"]||e.ID!==n.ID||e["URI-REPLACEMENT"].HOST!==n["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,i=n["URI-REPLACEMENT"].PARAMS;for(const s in r)if(r[s]!==i[s])return!1;for(const s in i)if(r[s]!==i[s])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 n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=this.mainPlaylistLoader_.getKeyIdSet(r);!i||!i.size||i.forEach(s=>{const o="usable",u=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===o,d=r.lastExcludeReason_===n&&r.excludeUntil===1/0;u?u&&d&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${s} is ${o}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==n&&(r.excludeUntil=1/0,r.lastExcludeReason_=n,this.logger_(`excluding playlist ${r.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${o}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const i=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,s=r.excludeUntil===1/0&&r.lastExcludeReason_===n;i&&s&&(delete r.excludeUntil,Re.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${n} key IDs`))})}addKeyStatus_(e,n){const s=(typeof e=="string"?e:fae(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${n}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,n)}updatePlaylistByKeyStatus(e,n){this.addKeyStatus_(e,n),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 Uae=(t,e,n)=>r=>{const i=t.main.playlists[e],s=VD(i),o=Z2(i);if(typeof r>"u")return o;r?delete i.disabled:i.disabled=!0;const u={renditionInfo:{id:e,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return r!==o&&!s&&(r?(n(i),t.trigger({type:"renditionenabled",metadata:u})):t.trigger({type:"renditiondisabled",metadata:u})),r};class zae{constructor(e,n,r){const{playlistController_:i}=e,s=i.fastQualityChange_.bind(i);if(n.attributes){const o=n.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=n.attributes.BANDWIDTH,this.frameRate=n.attributes["FRAME-RATE"]}this.codecs=gy(i.main(),n),this.playlist=n,this.id=r,this.enabled=Uae(e.playlists,n.id,s)}}const $ae=function(t){t.representations=()=>{const e=t.playlistController_.main(),n=ab(e)?t.playlistController_.getAudioTrackPlaylists_():e.playlists;return n?n.filter(r=>!VD(r)).map((r,i)=>new zae(t,r,r.id)):[]}},ZR=["seeking","seeked","pause","playing","error"];class Vae extends Re.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_=Oo("PlaybackWatcher"),this.logger_("initialize");const n=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),o=this.playlistController_,u=["main","subtitle","audio"],d={};u.forEach(m=>{d[m]={reset:()=>this.resetSegmentDownloads_(m),updateend:()=>this.checkSegmentDownloads_(m)},o[`${m}SegmentLoader_`].on("appendsdone",d[m].updateend),o[`${m}SegmentLoader_`].on("playlistupdate",d[m].reset),this.tech_.on(["seeked","seeking"],d[m].reset)});const f=m=>{["main","audio"].forEach(y=>{o[`${y}SegmentLoader_`][m]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),f("off"))},this.clearSeekingAppendCheck_=()=>f("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),f("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(ZR,s),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(ZR,s),this.tech_.off("canplay",r),this.tech_.off("play",n),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),u.forEach(m=>{o[`${m}SegmentLoader_`].off("appendsdone",d[m].updateend),o[`${m}SegmentLoader_`].off("playlistupdate",d[m].reset),this.tech_.off(["seeked","seeking"],d[m].reset)}),this.checkCurrentTimeTimeout_&&me.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&me.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=me.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const n=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_`]=n.buffered_()}checkSegmentDownloads_(e){const n=this.playlistController_,r=n[`${e}SegmentLoader_`],i=r.buffered_(),s=Die(this[`${e}Buffered_`],i);if(this[`${e}Buffered_`]=i,s){const o={bufferedRanges:i};n.trigger({type:"bufferedrangeschanged",metadata:o}),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:Yh(i)}),!(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"&&n.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(),n=this.tech_.buffered();if(this.lastRecordedTime===e&&(!n.length||e+Iu>=n.end(n.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(qi([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 n=this.seekable(),r=this.tech_.currentTime(),i=this.afterSeekableWindow_(n,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(i&&(s=n.end(n.length-1)),this.beforeSeekableWindow_(n,r)){const w=n.start(0);s=w+(w===n.end(0)?0:Iu)}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${qj(n)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;const o=this.playlistController_.sourceUpdater_,u=this.tech_.buffered(),d=o.audioBuffer?o.audioBuffered():null,f=o.videoBuffer?o.videoBuffered():null,m=this.media(),y=m.partTargetDuration?m.partTargetDuration:(m.targetDuration-Pu)*2,x=[d,f];for(let w=0;w<x.length;w++){if(!x[w])continue;if(zD(x[w],r)<y)return!1}const b=d1(u,r);return b.length===0?!1:(s=b.start(0)+Iu,this.logger_(`Buffered region starts (${b.start(0)})  just beyond seek point (${r}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),n=this.tech_.buffered(),r=lg(n,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(),n=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,n)){const u=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${n}. Seeking to live point (seekable end) ${u}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(u),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:n}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=d1(i,n);return o.length>0?(this.logger_(`Stopped at ${n} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(n),!0):!1}afterSeekableWindow_(e,n,r,i=!1){if(!e.length)return!1;let s=e.end(e.length-1)+Iu;const o=!r.endList,u=typeof r.partTargetDuration=="number";return o&&(u||i)&&(s=e.end(e.length-1)+r.targetDuration*3),n>s}beforeSeekableWindow_(e,n){return!!(e.length&&e.start(0)>0&&n<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:n,currentTime:r}){if(!e)return;let i;if(e.length&&n.length){const s=lg(e,r-3),o=lg(e,r),u=lg(n,r);u.length&&!o.length&&s.length&&(i={start:s.end(0),end:u.end(0)})}else d1(e,r).length||(i=this.gapFromVideoUnderflow_(e,r));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const n=this.tech_.buffered(),r=this.tech_.currentTime(),i=d1(n,r);if(this.resetTimeUpdate_(),i.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+Pu);const s={gapInfo:{from:r,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,n){const r=Cie(e);for(let i=0;i<r.length;i++){const s=r.start(i),o=r.end(i);if(n-s<4&&n-s>2)return{start:s,end:o}}return null}}const Hae={errorInterval:30,getSource(t){const n=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return t(n)}},j6=function(t,e){let n=0,r=0;const i=tr(Hae,e);t.ready(()=>{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const s=function(){r&&t.currentTime(r)},o=function(m){m!=null&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(m),t.trigger({type:"usage",name:"vhs-error-reload"}),t.play())},u=function(){if(Date.now()-n<i.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){Re.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),i.getSource.call(t,o)},d=function(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",d)},f=function(m){d(),j6(t,m)};t.on("error",u),t.on("dispose",d),t.reloadSourceOnError=f},qae=function(t){j6(this,t)};var L6="3.17.0",Gae="7.1.0",Wae="1.3.1",Xae="7.2.0",Yae="4.0.2";const Kr={PlaylistLoader:ug,Playlist:ga,utils:ese,STANDARD_PLAYLIST_SELECTOR:UR,INITIAL_PLAYLIST_SELECTOR:zse,lastBandwidthSelector:UR,movingAverageBandwidthSelector:Fse,comparePlaylistBandwidth:GD,comparePlaylistResolution:Bse,xhr:c6()};Object.keys(zi).forEach(t=>{Object.defineProperty(Kr,t,{get(){return Re.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),zi[t]},set(e){if(Re.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){Re.log.warn(`value of Vhs.${t} must be greater than or equal to 0`);return}zi[t]=e}})});const B6="videojs-vhs",F6=function(t,e){const n=e.media();let r=-1;for(let i=0;i<t.length;i++)if(t[i].id===n.id){r=i;break}t.selectedIndex_=r,t.trigger({selectedIndex:r,type:"change"})},Kae=function(t,e){e.representations().forEach(n=>{t.addQualityLevel(n)}),F6(t,e.playlists)};Kr.canPlaySource=function(){return Re.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Qae=(t,e,n)=>{if(!t)return t;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=Py(Au(e.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);const i=Mg(r.video),s=Mg(r.audio),o={};for(const u in t)o[u]={},s&&(o[u].audioContentType=s),i&&(o[u].videoContentType=i),e.contentProtection&&e.contentProtection[u]&&e.contentProtection[u].pssh&&(o[u].pssh=e.contentProtection[u].pssh),typeof t[u]=="string"&&(o[u].url=t[u]);return tr(t,o)},Zae=(t,e)=>t.reduce((n,r)=>{if(!r.contentProtection)return n;const i=e.reduce((s,o)=>{const u=r.contentProtection[o];return u&&u.pssh&&(s[o]={pssh:u.pssh}),s},{});return Object.keys(i).length&&n.push(i),n},[]),Jae=({player:t,sourceKeySystems:e,audioMedia:n,mainPlaylists:r})=>{if(!t.eme.initializeMediaKeys)return Promise.resolve();const i=n?r.concat([n]):r,s=Zae(i,Object.keys(e)),o=[],u=[];return s.forEach(d=>{u.push(new Promise((f,m)=>{t.tech_.one("keysessioncreated",f)})),o.push(new Promise((f,m)=>{t.eme.initializeMediaKeys({keySystems:d},y=>{if(y){m(y);return}f()})}))}),Promise.race([Promise.all(o),Promise.race(u)])},eoe=({player:t,sourceKeySystems:e,media:n,audioMedia:r})=>{const i=Qae(e,n,r);return i?(t.currentSource().keySystems=i,i&&!t.eme?(Re.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},U6=()=>{if(!me.localStorage)return null;const t=me.localStorage.getItem(B6);if(!t)return null;try{return JSON.parse(t)}catch{return null}},toe=t=>{if(!me.localStorage)return!1;let e=U6();e=e?tr(e,t):t;try{me.localStorage.setItem(B6,JSON.stringify(e))}catch{return!1}return e},noe=t=>t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t,z6=(t,e)=>{t._requestCallbackSet||(t._requestCallbackSet=new Set),t._requestCallbackSet.add(e)},$6=(t,e)=>{t._responseCallbackSet||(t._responseCallbackSet=new Set),t._responseCallbackSet.add(e)},V6=(t,e)=>{t._requestCallbackSet&&(t._requestCallbackSet.delete(e),t._requestCallbackSet.size||delete t._requestCallbackSet)},H6=(t,e)=>{t._responseCallbackSet&&(t._responseCallbackSet.delete(e),t._responseCallbackSet.size||delete t._responseCallbackSet)};Kr.supportsNativeHls=function(){if(!ht||!ht.createElement)return!1;const t=ht.createElement("video");return Re.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(n){return/maybe|probably/i.test(t.canPlayType(n))}):!1}();Kr.supportsNativeDash=function(){return!ht||!ht.createElement||!Re.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ht.createElement("video").canPlayType("application/dash+xml"))}();Kr.supportsTypeNatively=t=>t==="hls"?Kr.supportsNativeHls:t==="dash"?Kr.supportsNativeDash:!1;Kr.isSupported=function(){return Re.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Kr.xhr.onRequest=function(t){z6(Kr.xhr,t)};Kr.xhr.onResponse=function(t){$6(Kr.xhr,t)};Kr.xhr.offRequest=function(t){V6(Kr.xhr,t)};Kr.xhr.offResponse=function(t){H6(Kr.xhr,t)};const roe=Re.getComponent("Component");class q6 extends roe{constructor(e,n,r){if(super(n,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=Oo("VhsHandler"),n.options_&&n.options_.playerId){const i=Re.getPlayer(n.options_.playerId);this.player_=i}if(this.tech_=n,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ht,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const s=ht.fullscreenElement||ht.webkitFullscreenElement||ht.mozFullScreenElement||ht.msFullscreenElement;s&&s.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_=tr(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=U6();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=zi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===zi.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 n=this.options_.customPixelRatio;typeof n=="number"&&n>=0&&(this.customPixelRatio=n)}setOptions(e={}){this.setOptions_(e)}src(e,n){if(!e)return;this.setOptions_(),this.options_.src=noe(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Kr,this.options_.sourceType=fM(n),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s)},this.options_.player_=this.player_,this.playlistController_=new Fae(this.options_);const r=tr({liveRangeSafeTimeDelta:Iu},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Vae(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const s=Re.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),s.error(o)});const i=this.options_.bufferBasedABR?Kr.movingAverageBandwidthSelector(.55):Kr.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=Kr.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(s){this.playlistController_.selectPlaylist=s.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth;const o=me.navigator.connection||me.navigator.mozConnection||me.navigator.webkitConnection,u=1e7;if(this.options_.useNetworkInformationApi&&o){const d=o.downlink*1e3*1e3;d>=u&&s>=u?s=Math.max(s,d):s=d}return s},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const s=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(s+o))},set(){Re.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:()=>Yh(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:()=>Yh(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&&toe({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{$ae(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_=me.URL.createObjectURL(this.playlistController_.mediaSource),(Re.browser.IS_ANY_SAFARI||Re.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"),Jae({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(n=>{this.logger_("error while creating EME key session",n),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,n=eoe({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_),!n){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=Re.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Kae(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{F6(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":L6,"mux.js":Gae,"mpd-parser":Wae,"m3u8-parser":Xae,"aes-decrypter":Yae}}version(){return this.constructor.version()}canChangeType(){return I6.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_&&me.URL.revokeObjectURL&&(me.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,n){return ose({playlist:this.playlistController_.media(),time:e,callback:n})}seekToProgramTime(e,n,r=!0,i=2){return m6({programTime:e,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:n})}setupXhrHooks_(){this.xhr.onRequest=e=>{z6(this.xhr,e)},this.xhr.onResponse=e=>{$6(this.xhr,e)},this.xhr.offRequest=e=>{V6(this.xhr,e)},this.xhr.offResponse=e=>{H6(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],n=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,i=>{this.player_.trigger(Xr({},i))})}),n.forEach(r=>{this.playbackWatcher_.on(r,i=>{this.player_.trigger(Xr({},i))})})}}const E_={name:"videojs-http-streaming",VERSION:L6,canHandleSource(t,e={}){const n=tr(Re.options,e);return!n.vhs.experimentalUseMMS&&!dy("avc1.4d400d,mp4a.40.2",!1)?!1:E_.canPlayType(t.type,n)},handleSource(t,e,n={}){const r=tr(Re.options,n);return e.vhs=new q6(t,e,r),e.vhs.xhr=c6(),e.vhs.setupXhrHooks_(),e.vhs.src(t.src,t.type),e.vhs},canPlayType(t,e){const n=fM(t);if(!n)return"";const r=E_.getOverrideNative(e);return!Kr.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative(t={}){const{vhs:e={}}=t,n=!(Re.browser.IS_ANY_SAFARI||Re.browser.IS_IOS),{overrideNative:r=n}=e;return r}},ioe=()=>dy("avc1.4d400d,mp4a.40.2",!0);ioe()&&Re.getTech("Html5").registerSourceHandler(E_,0);Re.VhsHandler=q6;Re.VhsSourceHandler=E_;Re.Vhs=Kr;Re.use||Re.registerComponent("Vhs",Kr);Re.options.vhs=Re.options.vhs||{};(!Re.getPlugin||!Re.getPlugin("reloadSourceOnError"))&&Re.registerPlugin("reloadSourceOnError",qae);const soe=Re.getComponent("MenuButton"),aoe=Re.getComponent("Menu"),ooe=Re.getComponent("Component"),loe=Re.dom;function uoe(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}class coe extends soe{hideThreshold_;items;constructor(e){super(e),this.options_.title=e.localize("Quality"),this.name_="QualityButton",this.hideThreshold_=0,this.items=[]}createItems(){return[]}createMenu(){const e=new aoe(this.player_,{menuButton:this});if(e.addClass("hls-quality-button"),this.options_.title){const n=loe.createEl("li",{className:"vjs-menu-title",innerHTML:uoe(this.options_.title),tabIndex:-1}),r=new ooe(this.player_,{});r.el_=n,this.hideThreshold_+=1,e.addItem(r)}if(this.items=this.createItems(),this.items)for(let n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e}}const doe=Re.getComponent("MenuItem");class foe extends doe{item;qualityButton;selector;constructor(e,n,r,i){super(e,{label:n.label,selectable:!0,selected:n.selected||!1}),this.item=n,this.qualityButton=r,this.selector=i}handleClick(){for(let e=0;e<this.qualityButton.items.length;++e)this.qualityButton.items[e].selected(!1);this.selector.setQuality(this.item.value),this.selected(!0)}}class hoe{player;config;_qualityButton;_menuButton;_currentQuality;constructor(e,n){this.player=e,this.config=n,this._qualityButton=new coe(e),this._menuButton=this._qualityButton,this.addQualityButton(),this.bindPlayerEvents()}bindPlayerEvents(){this.player.qualityLevels&&this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))}addQualityButton(){const e=this.player.controlBar.children().length-2,n=this.player.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.config.placementIndex||e);if(n.addClass("vjs-quality-selector"),this.config.displayCurrentQuality)this.setButtonInnerText(this.player.localize("Auto"));else{const r=` ${this.config.vjsIconClass||"vjs-icon-hd"}`,i=n.$(".vjs-icon-placeholder");i&&(i.className+=r)}n.removeClass("vjs-hidden")}setButtonInnerText(e){const n=this._qualityButton.$(".vjs-icon-placeholder");n&&(n.innerHTML=e)}getQualityMenuItem(e){const n=this.player;return new foe(n,e,this._qualityButton,this)}onAddQualityLevel(){if(!this.player.qualityLevels)return;const n=this.player.qualityLevels().levels_||[],r=[];for(let i=0;i<n.length;++i){const{width:s,height:o}=n[i],u=s>o?o:s;if(u&&!r.filter(d=>d.item&&d.item.value===u).length){const d=this.getQualityMenuItem({label:`${u}p`,value:u});r.push(d)}}r.sort((i,s)=>i.item.value-s.item.value),r.push(this.getQualityMenuItem({label:this.player.localize("Auto"),value:-1,selected:!0})),this._qualityButton&&(this._qualityButton.createItems=function(){return r},this._menuButton.update())}setQuality(e){if(!this.player.qualityLevels)return;const n=this.player.qualityLevels();this._currentQuality=e,this.config.displayCurrentQuality&&this.setButtonInnerText(e===-1?this.player.localize("Auto"):`${e}p`);for(let r=0;r<n.levels_.length;++r){const{width:i,height:s}=n.levels_[r],o=i>s?s:i;n.levels_[r].enabled=o===e||e===-1}this._menuButton.unpressButton()}getCurrentQuality(){return this._currentQuality||-1}}const poe=t=>(A.useEffect(()=>{const e=document.createElement("video");e.id="player",e.classList.add("video-js","vjs-default-skin","vjs-fill","vjs-big-play-centered","full-card","card"),document.getElementById("videodiv")?.appendChild(e);const n=t.media.mediaType==="video"?t.media:null,r={};if(r.liveui=!0,r.controls=!0,r.qualityLevels=!0,r.userActions={hotkeys:function(d){if(d.which===32&&(this.paused()?this.play():this.pause()),d.which===37){const f=this.currentTime()||0;this.currentTime(Math.max(0,f-15))}if(d.which===39){const f=this.currentTime()||0,m=this.liveTracker&&this.liveTracker.isLive()?this.liveTracker.seekableEnd():this.duration()||0;this.currentTime(Math.min(f+15,m))}d.which===70&&(this.isFullscreen()===!0?this.isFullWindow?this.exitFullWindow():this.exitFullscreen():this.requestFullscreen(!1))}},r.sources=[{src:os+"media/"+t.uuid+"/"+t.media.id,type:t.media.mime}],r.poster=os+"thumbnail/"+t.uuid+"/"+t.media.id,t.media.mediaType==="audio"&&(r.audioPosterMode=!0),n?.isVideoWithChapters){r.tracks||(r.tracks=[]);const d={kind:"chapters",src:os+"media/"+t.uuid+"/"+t.media.id+"/chapters.vtt",default:!0};r.tracks.push(d)}const i={uuid:t.uuid,id:t.media.id},s=(d,f,m)=>{i[d]!==f&&(i[d]=f,m||t.sendJsonMessage({action:"player_status",data:i}))},u=Re(e,r,()=>{const d=()=>{s("mute",u.muted()?"1":"0",!0),s("volume",((u.volume()||0)*100).toFixed(0),!1)};if(u.on(["play","playing"],()=>{s("playback","PLAYING",!1)}),u.on("pause",()=>{s("playback","PAUSED",!1)}),u.on(["dispose","abort","ended","error","beforeunload"],()=>{s("playback","STOPPED",!1)}),u.on("timeupdate",()=>{s("position",(u.currentTime()||0).toFixed(0),!1)}),u.on("volumechange",()=>{d()}),n?.resumePosition&&(u.on("loadedmetadata",()=>{u.currentTime(n.resumePosition)}),u.one("canplaythrough",()=>{u.currentTime(n.resumePosition)})),d(),t.media.isDownload){const f=u.getChild("ControlBar");if(f){const m=f.children().findIndex(b=>b.hasClass("vjs-remaining-time"))+1,x=f.addChild("button",{controlText:"Download",className:"vjs-menu-button",clickHandler:()=>{window.open(os+"download/"+t.uuid+"/"+t.media.id,"_blank")}},m).el().getElementsByClassName("vjs-icon-placeholder").item(0);x&&(x.className="vjs-icon-placeholder vjs-icon-file-download")}}if(t.media.surroundMedias.next!==void 0){const f=t.media.surroundMedias.next,m=u.getChild("ControlBar");if(m){const y=m.children().findIndex(w=>w.hasClass("vjs-remaining-time"))+1,b=m.addChild("button",{controlText:f.name,className:"vjs-menu-button",clickHandler:()=>{t.askPlayId(f.id)}},y).el().getElementsByClassName("vjs-icon-placeholder").item(0);b&&(b.className="vjs-icon-placeholder vjs-icon-next-item")}t.media.autoContinue&&u.on("ended",()=>{t.askPlayId(f.id)})}if(t.media.surroundMedias.prev!==void 0){const f=t.media.surroundMedias.prev,m=u.getChild("ControlBar");if(m){const y=m.children().findIndex(w=>w.hasClass("vjs-remaining-time"))+1,b=m.addChild("button",{controlText:f.name,className:"vjs-menu-button",clickHandler:()=>{t.askPlayId(f.id)}},y).el().getElementsByClassName("vjs-icon-placeholder").item(0);b&&(b.className="vjs-icon-placeholder vjs-icon-previous-item")}}if(t.media.mime==="application/x-mpegURL")try{new hoe(u,{})}catch(f){Re.log(f)}});return()=>{u.isDisposed()||u.dispose()}},[t]),c.jsx("div",{id:"videodiv"}));function RC(t,e,n,r){if(t&&t.icon)switch(t.icon){case"audio":return c.jsx(HY,{size:n});case"back":return e.dir==="rtl"?c.jsx(KW,{size:n}):c.jsx(XW,{size:n});case"badge-3d":return c.jsx(rX,{size:n});case"badge-4k":return c.jsx(sX,{size:n});case"badge-hd":return c.jsx(oX,{size:n});case"badge-sd":return c.jsx(uX,{size:n});case"brand-youtube":return c.jsx(mX,{size:n});case"calendar":return c.jsx(vX,{size:n});case"device-tv":return c.jsx(kX,{size:n});case"disc":return c.jsx(LX,{size:n});case"eye":return c.jsx(KX,{size:n});case"folder":return c.jsx(Og,{size:n});case"heart":return c.jsx(pY,{size:n});case"info-square":return c.jsx(_Y,{size:n});case"image":return c.jsx(ZY,{size:n});case"loader-2":return c.jsx(IY,{size:n});case"movie":return c.jsx(lN,{size:n});case"settings":return c.jsx(pg,{size:n});case"shuffle":return c.jsx(eX,{size:n});case"video":return c.jsx(oQ,{size:n});case"world-www":return c.jsx(hQ,{size:n});default:return c.jsx(SK,{size:n})}else return r?A.createElement(r,{size:n}):void 0}function moe({i18n:t,session:e,player:n,media:r,onMediaCardKeyDown:i}){const s=A.useRef(0),o=e.playerDirectPlay&&r.goal==="show"?()=>{n.askReqId(r.id,"show")}:void 0,u=()=>n.askReqId(r.id,r.goal?r.goal==="show"&&e.playerDirectPlay?"play":r.goal:"browse"),d=()=>{if(o===void 0){u();return}s.current++,s.current>1&&(s.current=0,o()),setTimeout(()=>{s.current===1&&u(),s.current=0},650)},f=({i18n:m,player:y,media:x})=>{const b=RC(x,m,185);if(b)return c.jsx(by,{children:b});const w=x.updateId?"?update="+x.updateId:"";return c.jsx(vp,{src:os+"thumbnail/"+y.uuid+"/"+x.id+w,alt:x.name,maw:"auto",fit:"contain",h:"100%"})};return c.jsxs(Ti,{component:"button",className:"thumbnail-container color-bright-hover",shadow:"sm",padding:"lg",radius:"md",ta:"center",onClick:d,onKeyDown:i,withBorder:!0,children:[c.jsx(Ti.Section,{h:185,children:c.jsx(f,{i18n:t,player:n,media:r})}),c.jsx(Ti.Section,{h:30,px:5,pt:5,children:c.jsx(by,{children:c.jsx(et,{size:"sm",truncate:!0,children:t.getLocalizedName(r.name)})})})]})}function cf({i18n:t,session:e,player:n,mediaArray:r,title:i,fixed:s}){const{dir:o}=Xa(),u=A.useRef(null);function d(z,ee){return z>0?z-1:ee}function f(z,ee){return z<ee?z+1:0}function m(z,ee,Y){const Q=z-Y;if(Q<0){const oe=z%Y,ue=Math.floor(ee/Y),H=Y*ue+oe;return H>ee?ee:H}return Q}function y(z,ee,Y){const Q=z+Y;return Q>ee?z%Y:Q}function x(z){if(z.length===0)return 0;const ee=z[0].getBoundingClientRect().top;return z.findLastIndex(Q=>Q.getBoundingClientRect().top==ee)+1}function b(z){z.focus(),z.scrollIntoView({block:"center",inline:"center"})}function w(){return Array.from(u.current?.querySelectorAll(".thumbnail-container")||[]).filter(z=>!z.disabled)}function S(z,ee){z.stopPropagation(),z.preventDefault();const Y=w();if(Y.length<2)return;const Q=Y.findIndex(te=>z.currentTarget===te),H=ee===(o==="rtl")?f(Q,Y.length-1):d(Q,Y.length-1);b(Y[H])}function D(z){S(z,!0)}function k(z){S(z,!1)}function O(z,ee){z.stopPropagation(),z.preventDefault();const Y=w();if(Y.length<2)return;const Q=x(Y);if(Q<2)return;const oe=Y.findIndex(H=>z.currentTarget===H),ue=ee?y(oe,Y.length-1,Q):m(oe,Y.length-1,Q);b(Y[ue])}function N(z){O(z,!0)}function F(z){O(z,!1)}function M(z,ee){z.stopPropagation(),z.preventDefault();const Y=w();Y.length<2||b(ee?Y[0]:Y[Y.length-1])}function V(z){switch(z.key){case"ArrowRight":{k(z);break}case"ArrowLeft":{D(z);break}case"ArrowUp":{F(z);break}case"ArrowDown":{N(z);break}case"Home":{M(z,!0);break}case"End":{M(z,!1);break}}}const $=({i18n:z,player:ee,mediaArray:Y})=>Y?.map(Q=>c.jsx(moe,{i18n:z,session:e,player:ee,media:Q,onMediaCardKeyDown:V},Q.id)),q=s?{height:"240px",overflowY:"hidden"}:{},B=s?"media-grid front-page-grid":"media-grid";return r&&r.length?i?c.jsxs(c.Fragment,{children:[c.jsx(Es,{mb:"md",size:"h4",fw:400,children:t.get(i)}),c.jsx("div",{ref:u,className:B,style:q,children:c.jsx($,{i18n:t,player:n,mediaArray:r})})]}):c.jsx("div",{ref:u,className:B,children:c.jsx($,{i18n:t,player:n,mediaArray:r})}):void 0}function goe({i18n:t,session:e,player:n,data:r}){return e.playerNavbar?void 0:r.mediaLibraryFolders&&r.mediaLibraryFolders.length>0?c.jsxs(c.Fragment,{children:[c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.mediaLibraryFolders,title:"MediaLibrary"}),c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.folders,title:"YourFolders"})]}):c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.folders})}function voe({i18n:t,session:e,player:n,data:r}){return r.mediasSelections?c.jsxs(c.Fragment,{children:[c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.mediasSelections.recentlyAdded,title:"RecentlyAddedVideos",fixed:!0}),c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.mediasSelections.inProgress,title:"InProgressVideos",fixed:!0}),c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.mediasSelections.recentlyPlayed,title:"RecentlyPlayedVideos",fixed:!0}),c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.mediasSelections.mostPlayed,title:"MostPlayedVideos",fixed:!0})]}):void 0}function yoe({i18n:t,player:e,data:n}){const r=()=>n.folders.map(s=>c.jsx(at,{onClick:()=>e.askBrowseId(s.id),color:"gray",variant:"subtle",size:"compact-md",leftSection:RC(s,t,20,Og),children:t.getLocalizedName(s.name)},s.id)),i=()=>n.mediaLibraryFolders?.map(s=>c.jsx(at,{onClick:()=>e.askBrowseId(s.id),color:"gray",variant:"subtle",size:"compact-md",leftSection:RC(s,t,20,Og),children:t.getLocalizedName(s.name)},s.id));return n.mediaLibraryFolders&&n.mediaLibraryFolders.length>0?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:t.get("MediaLibrary")}),c.jsx(i,{}),c.jsx("div",{children:t.get("YourFolders")}),c.jsx(r,{})]}):c.jsx(r,{})}function boe({i18n:t,player:e,media:n,metadata:r,children:i}){const s=c.jsx("svg",{"aria-hidden":"true",width:"1.5em",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",color:"#e0ac00",children:c.jsx("path",{fill:"currentColor",d:"M350.5 288.7c0 5.4 1.6 14.4-6.2 14.4-1.6 0-3-.8-3.8-2.4-2.2-5.1-1.1-44.1-1.1-44.7 0-3.8-1.1-12.7 4.9-12.7 7.3 0 6.2 7.3 6.2 12.7v32.7zM265 229.9c0-9.7 1.6-16-10.3-16v83.7c12.2.3 10.3-8.7 10.3-18.4v-49.3zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM21.3 228.8c-.1.1-.2.3-.3.4h.3v-.4zM97 192H64v127.8h33V192zm113.3 0h-43.1l-7.6 59.9c-2.7-20-5.4-40.1-8.7-59.9h-42.8v127.8h29v-84.5l12.2 84.5h20.6l11.6-86.4v86.4h28.7V192zm86.3 45.3c0-8.1.3-16.8-1.4-24.4-4.3-22.5-31.4-20.9-49-20.9h-24.6v127.8c86.1.1 75 6 75-82.5zm85.9 17.3c0-17.3-.8-30.1-22.2-30.1-8.9 0-14.9 2.7-20.9 9.2V192h-31.7v127.8h29.8l1.9-8.1c5.7 6.8 11.9 9.8 20.9 9.8 19.8 0 22.2-15.2 22.2-30.9v-36z"})}),o=c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5em",viewBox:"0 0 185.04 133.4",children:[c.jsx("defs",{children:c.jsxs("linearGradient",{id:"linear-gradient",y1:"66.7",x2:"185.04",y2:"66.7",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0",stopColor:"#90cea1"}),c.jsx("stop",{offset:"0.56",stopColor:"#3cbec9"}),c.jsx("stop",{offset:"1",stopColor:"#00b3e5"})]})}),c.jsx("path",{xmlns:"http://www.w3.org/2000/svg",fill:"url(#linear-gradient)",d:"M51.06,66.7h0A17.67,17.67,0,0,1,68.73,49h-.1A17.67,17.67,0,0,1,86.3,66.7h0A17.67,17.67,0,0,1,68.63,84.37h.1A17.67,17.67,0,0,1,51.06,66.7Zm82.67-31.33h32.9A17.67,17.67,0,0,0,184.3,17.7h0A17.67,17.67,0,0,0,166.63,0h-32.9A17.67,17.67,0,0,0,116.06,17.7h0A17.67,17.67,0,0,0,133.73,35.37Zm-113,98h63.9A17.67,17.67,0,0,0,102.3,115.7h0A17.67,17.67,0,0,0,84.63,98H20.73A17.67,17.67,0,0,0,3.06,115.7h0A17.67,17.67,0,0,0,20.73,133.37Zm83.92-49h6.25L125.5,49h-8.35l-8.9,23.2h-.1L99.4,49H90.5Zm32.45,0h7.8V49h-7.8Zm22.2,0h24.95V77.2H167.1V70h15.35V62.8H167.1V56.2h16.25V49h-24ZM10.1,35.4h7.8V6.9H28V0H0V6.9H10.1ZM39,35.4h7.8V20.1H61.9V35.4h7.8V0H61.9V13.2H46.75V0H39Zm41.25,0h25V28.2H88V21h15.35V13.8H88V7.2h16.25V0h-24Zm-79,49H9V57.25h.1l9,27.15H24l9.3-27.15h.1V84.4h7.8V49H29.45l-8.2,23.1h-.1L13,49H1.2Zm112.09,49H126a24.59,24.59,0,0,0,7.56-1.15,19.52,19.52,0,0,0,6.35-3.37,16.37,16.37,0,0,0,4.37-5.5A16.91,16.91,0,0,0,146,115.8a18.5,18.5,0,0,0-1.68-8.25,15.1,15.1,0,0,0-4.52-5.53A18.55,18.55,0,0,0,133.07,99,33.54,33.54,0,0,0,125,98H113.29Zm7.81-28.2h4.6a17.43,17.43,0,0,1,4.67.62,11.68,11.68,0,0,1,3.88,1.88,9,9,0,0,1,2.62,3.18,9.87,9.87,0,0,1,1,4.52,11.92,11.92,0,0,1-1,5.08,8.69,8.69,0,0,1-2.67,3.34,10.87,10.87,0,0,1-4,1.83,21.57,21.57,0,0,1-5,.55H121.1Zm36.14,28.2h14.5a23.11,23.11,0,0,0,4.73-.5,13.38,13.38,0,0,0,4.27-1.65,9.42,9.42,0,0,0,3.1-3,8.52,8.52,0,0,0,1.2-4.68,9.16,9.16,0,0,0-.55-3.2,7.79,7.79,0,0,0-1.57-2.62,8.38,8.38,0,0,0-2.45-1.85,10,10,0,0,0-3.18-1v-.1a9.28,9.28,0,0,0,4.43-2.82,7.42,7.42,0,0,0,1.67-5,8.34,8.34,0,0,0-1.15-4.65,7.88,7.88,0,0,0-3-2.73,12.9,12.9,0,0,0-4.17-1.3,34.42,34.42,0,0,0-4.63-.32h-13.2Zm7.8-28.8h5.3a10.79,10.79,0,0,1,1.85.17,5.77,5.77,0,0,1,1.7.58,3.33,3.33,0,0,1,1.23,1.13,3.22,3.22,0,0,1,.47,1.82,3.63,3.63,0,0,1-.42,1.8,3.34,3.34,0,0,1-1.13,1.2,4.78,4.78,0,0,1-1.57.65,8.16,8.16,0,0,1-1.78.2H165Zm0,14.15h5.9a15.12,15.12,0,0,1,2.05.15,7.83,7.83,0,0,1,2,.55,4,4,0,0,1,1.58,1.17,3.13,3.13,0,0,1,.62,2,3.71,3.71,0,0,1-.47,1.95,4,4,0,0,1-1.23,1.3,4.78,4.78,0,0,1-1.67.7,8.91,8.91,0,0,1-1.83.2h-7Z"})]});function u(k,O){let N,F,M,V;if(k&&k.imdbID&&(M=c.jsx("a",{href:"https://www.imdb.com/title/"+k.imdbID,rel:"noopener noreferrer",target:"_blank",children:s})),k&&k.mediaType&&(k.mediaType==="movie"&&k.tmdbID?V=c.jsx("a",{href:"https://www.themoviedb.org/movie/"+k.tmdbID,rel:"noopener noreferrer",target:"_blank",children:o}):k.mediaType==="tv"&&k.tmdbID?V=c.jsx("a",{href:"https://www.themoviedb.org/tv/"+k.tmdbID,rel:"noopener noreferrer",target:"_blank",children:o}):k.mediaType==="tv_season"&&k.tmdbTvID&&k.tvSeason?V=c.jsx("a",{href:"https://www.themoviedb.org/tv/"+k.tmdbTvID+"/season/"+k.tvSeason,rel:"noopener noreferrer",target:"_blank",children:o}):k.mediaType==="tv_episode"&&k.tmdbTvID&&k.tvSeason&&k.tvEpisode&&(V=c.jsx("a",{href:"https://www.themoviedb.org/tv/"+k.tmdbTvID+"/season/"+k.tvSeason+"/episode/"+k.tvEpisode,rel:"noopener noreferrer",target:"_blank",children:o}))),k&&k.images&&k.images.length>0&&k.imageBaseURL){const $=t.language.substring(0,2),q=k.images[0];if(q&&q.logos&&q.logos.length>0){let B=q.logos.filter(z=>z.iso_639_1===$);if(B.length===0&&(B=q.logos.filter(z=>!z.iso_639_1)),B.length===0&&(B=q.logos.filter(z=>z.iso_639_1==="en")),B.length>0){const z=B.reduce((ee,Y)=>Y.vote_average>ee.vote_average?Y:ee);N=c.jsxs(ut,{pb:"xs",children:[c.jsx("img",{src:k.imageBaseURL+"w500"+z.file_path,style:{maxHeight:"150px",maxWidth:"calc(100% - 61px)"},alt:k.originalTitle}),c.jsxs(tn,{gap:0,children:[M,V]})]})}}if(q&&q.posters&&q.posters.length>0){let B=q.posters.filter(z=>z.iso_639_1===$);if(B.length===0&&(B=q.posters.filter(z=>!z.iso_639_1)),B.length===0&&(B=q.posters.filter(z=>z.iso_639_1==="en")),B.length>0){const z=B.reduce((ee,Y)=>Y.vote_average>ee.vote_average?Y:ee);F=c.jsx("img",{style:{maxHeight:"100%",maxWidth:"100%"},src:k.imageBaseURL+"w500"+z.file_path,alt:"Poster"})}}}if(!N){const $=k?.title||k?.originalTitle||t.getLocalizedName(O?.name);$&&(N=c.jsxs(ut,{pb:"xs",children:[c.jsx(et,{pb:"xs",children:$}),c.jsxs(tn,{gap:0,children:[M,V]})]}))}if(!F&&k&&k.poster&&(F=c.jsx("img",{style:{maxHeight:"100%",maxWidth:"100%"},src:k.poster,alt:"poster"})),!F&&O&&O.id){const $=O.updateId?"?update="+O.updateId:"";F=c.jsx("img",{style:{maxHeight:"100%",maxWidth:"100%"},src:os+"thumbnail/"+e.uuid+"/"+O.id+$,alt:"thumbnail"})}return{logo:N,poster:F}}const d=u(r,n),f=({i18n:k,title:O,mediaString:N})=>{if(N)return c.jsxs(ut,{mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsxs(et,{fw:700,children:[k.get(O),":"," "]}),c.jsx(et,{children:N})]})},m=({i18n:k,player:O,title:N,mediaList:F})=>{if(F&&F.length>0)return c.jsxs(ut,{gap:"xs",mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsxs(et,{fw:700,children:[k.get(N),":"," "]}),F.map(M=>c.jsx(Pg,{className:M.id?"fake-button-default-hover":"fake-button-default",onClick:()=>{M.id&&O.askBrowseId(M.id)},children:k.getLocalizedName(M.name)},N+M.name+M.id?.toString()))]})},y=({i18n:k,player:O,title:N,media:F})=>F&&F.name?c.jsx(m,{i18n:k,player:O,title:N,mediaList:[F]}):void 0;function x({i18n:k,player:O,mediaList:N}){return N&&N.length>0?c.jsxs(ut,{gap:"xs",mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsxs(et,{fw:700,children:[k.get("Country"),":"," "]}),N.map(F=>c.jsx(XA,{countryCode:F.name,style:{fontSize:"1.5em",cursor:"pointer"},onClick:()=>{F.id&&O.askBrowseId(F.id)}},F.id))]}):void 0}const b=({title:k,language:O})=>{if(k)return c.jsxs(ut,{mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsx(TY,{}),c.jsx(et,{fs:"italic",children:k+(O?" ("+O+")":"")})]})},w=({mediaString:k})=>{if(k)return c.jsxs(ut,{mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsx(QK,{}),c.jsx(et,{fs:"italic",children:k})]})},S=({rating:k})=>{if(k)return c.jsxs(ut,{mt:"sm",style:{color:"var(--mantine-color-bright)"},children:[c.jsxs(et,{fw:700,children:[t.get("Rating"),":"," "]}),c.jsx(Ft,{label:k,children:c.jsx(_A,{value:k/2,fractions:4,readOnly:!0})})]})},D=({ratingsList:k,rating:O})=>k&&k.length>0?c.jsxs(c.Fragment,{children:[c.jsx(ut,{mt:"sm",style:{color:"var(--mantine-color-bright)"},children:c.jsxs(et,{fw:700,children:[t.get("Ratings"),":"," "]})}),c.jsx(Ks,{withPadding:!0,children:k.map(N=>c.jsxs(Ks.Item,{children:[N.source,":"," ",N.value]}))})]}):c.jsx(S,{rating:O});return c.jsx(qn,{mb:"md",children:c.jsx(qn.Col,{span:12,children:c.jsxs(qn,{columns:20,justify:"center",children:[c.jsx(qn.Col,{span:{base:0,xs:6},children:d.poster}),c.jsx(qn.Col,{span:{base:20,xs:12},children:c.jsxs(Ti,{shadow:"sm",p:"lg",radius:"md",bg:"transparentBg",children:[d.logo,i,c.jsx(w,{mediaString:r.tagline}),c.jsx(b,{title:r.originalTitle,language:r.originalLanguage}),c.jsx(m,{i18n:t,player:e,title:"Actors",mediaList:r.actors}),c.jsx(f,{i18n:t,title:"Awards",mediaString:r.awards}),c.jsx(x,{i18n:t,player:e,mediaList:r.countries}),c.jsx(m,{i18n:t,player:e,title:"Director",mediaList:r.directors}),c.jsx(m,{i18n:t,player:e,title:"Genres",mediaList:r.genres}),c.jsx(f,{i18n:t,title:"Plot",mediaString:r.overview}),c.jsx(y,{i18n:t,player:e,title:"Rated",media:r.rated}),c.jsx(D,{ratingsList:r.ratings,rating:r.rating}),c.jsx(f,{i18n:t,title:"YearStarted",mediaString:r.startYear}),c.jsx(f,{i18n:t,title:"TotalSeasons",mediaString:r.totalSeasons?r.totalSeasons.toString():void 0})]})})]})})})}function xoe({i18n:t,player:e,media:n,children:r}){const i=n.updateId?"?update="+n.updateId:"";return c.jsx(qn,{mb:"md",children:c.jsx(qn.Col,{span:12,children:c.jsxs(qn,{columns:20,justify:"center",children:[c.jsx(qn.Col,{span:{base:0,xs:6},children:c.jsx(vp,{style:{maxHeight:500},radius:"md",fit:"contain",src:os+"thumbnail/"+e.uuid+"/"+n.id+i})}),c.jsx(qn.Col,{span:{base:20,xs:12},children:c.jsxs(Ti,{shadow:"sm",p:"lg",radius:"md",bg:"transparentBg",children:[c.jsx(et,{pb:"xs",children:t.getLocalizedName(n.name)}),r]})})]})})})}function _oe({i18n:t,setShowVideoMetadataEdit:e}){return c.jsx(kt.Item,{leftSection:c.jsx(GY,{}),onClick:()=>e(!0),children:t.get("Edit")})}function JR({i18n:t,player:e,fullyplayed:n,videoMetadataEditable:r,refreshPage:i,setLoading:s,setShowVideoMetadataEdit:o}){const u=(d,f)=>{s(!0),Rt.post(os+"setFullyPlayed",{uuid:e.uuid,id:d,fullyPlayed:f},{headers:{Player:e.uuid}}).then(function(){i()}).catch(function(m){!m.response&&m.request?t.showServerUnreachable():Wn({id:"player-fully-played",title:t.get("Error"),message:"Your request was not handled by the server."})}).then(function(){s(!1)})};return c.jsxs(kt,{shadow:"md",width:200,children:[c.jsx(kt.Target,{children:c.jsx(at,{variant:"default",size:"compact-md",children:c.jsx($A,{size:14})})}),c.jsxs(kt.Dropdown,{children:[n===!1&&c.jsx(kt.Item,{color:"blue",leftSection:c.jsx(EK,{}),onClick:()=>u(e.reqId,!0),children:t.get("MarkContentsFullyPlayed")}),n===!0&&c.jsx(kt.Item,{color:"green",leftSection:c.jsx(wK,{}),onClick:()=>u(e.reqId,!1),children:t.get("MarkContentsUnplayed")}),r&&c.jsx(_oe,{i18n:t,setShowVideoMetadataEdit:o})]})]})}function va({value:t,title:e}){return typeof t=="number"&&c.jsxs(ut,{children:[c.jsx(et,{size:"xs",fw:500,c:"dimmed",children:e}),c.jsx(et,{size:"xs",children:t})]})}function ap({i18n:t,value:e,title:n}){return typeof e=="boolean"&&c.jsxs(ut,{children:[c.jsx(et,{size:"xs",fw:500,c:"dimmed",children:n}),c.jsx(et,{size:"xs",children:e?t.get("Yes"):t.get("No")})]})}function Hn({value:t,title:e}){return t&&c.jsxs(ut,{children:[c.jsx(et,{size:"xs",fw:500,c:"dimmed",children:e}),c.jsx(et,{size:"xs",children:t})]})}function Soe({i18n:t,audioTrack:e}){const[n,{toggle:r}]=pp(!1),i=({i18n:s,audioTrack:o})=>s.get("AudioStream")+" #"+o.id;return e&&c.jsxs(Ee,{children:[c.jsx(ut,{children:c.jsx(at,{variant:"default",size:"compact-xs",onClick:r,children:c.jsx(i,{i18n:t,audioTrack:e})})}),c.jsxs(gp,{in:n,children:[c.jsx(ap,{i18n:t,value:e.default,title:t.get("Default")}),c.jsx(ap,{i18n:t,value:e.forced,title:t.get("Forced")}),c.jsx(Hn,{value:e.title,title:t.get("Title")}),c.jsx(Hn,{value:e.lang,title:t.get("Language")}),c.jsx(va,{value:e.stream,title:"File Stream"}),c.jsx(Hn,{value:e.codec,title:"Codec"}),c.jsx(va,{value:e.bitrate,title:"BitRate"}),c.jsx(va,{value:e.bitdepth,title:"BitDepth"}),c.jsx(va,{value:e.channel,title:"Number Of Channels"}),c.jsx(va,{value:e.samplerate,title:"SampleRate"}),c.jsx(Hn,{value:e.muxing,title:"Muxing"})]})]})}function Toe({i18n:t,subtitles:e}){const[n,{toggle:r}]=pp(!1),i=({i18n:s,subtitles:o})=>o.embedded?s.get("Subtitles")+" #"+o.id:s.get("Subtitles")+" #"+o.externalFile;return e&&c.jsxs(Ee,{children:[c.jsx(ut,{children:c.jsx(at,{variant:"default",size:"compact-xs",onClick:r,children:c.jsx(i,{i18n:t,subtitles:e})})}),c.jsxs(gp,{in:n,children:[c.jsx(ap,{i18n:t,value:e.embedded,title:t.get("Embedded")}),c.jsx(ap,{i18n:t,value:e.default,title:t.get("Default")}),c.jsx(ap,{i18n:t,value:e.forced,title:t.get("Forced")}),c.jsx(Hn,{value:e.title,title:t.get("Title")}),c.jsx(Hn,{value:e.lang,title:t.get("Language")}),c.jsx(va,{value:e.stream,title:"File Stream"}),c.jsx(Hn,{value:e.type,title:"Type"}),c.jsx(Hn,{value:e.externalFile,title:"External File"}),c.jsx(Hn,{value:e.subsCharacterSet,title:"Character Set"}),c.jsx(Hn,{value:e.convertedFile,title:"Converted File"})]})]})}function woe({i18n:t,videoTrack:e}){const[n,{toggle:r}]=pp(!1),i=({i18n:s,videoTrack:o})=>s.get("VideoStream")+" #"+o.id;return e&&c.jsxs(Ee,{children:[c.jsx(ut,{children:c.jsx(at,{variant:"default",size:"compact-xs",onClick:r,children:c.jsx(i,{i18n:t,videoTrack:e})})}),c.jsxs(gp,{in:n,children:[c.jsx(Hn,{value:e.title,title:t.get("Title")}),c.jsx(Hn,{value:e.lang,title:t.get("Language")}),c.jsx(ap,{i18n:t,value:e.default,title:t.get("Default")}),c.jsx(ap,{i18n:t,value:e.forced,title:t.get("Forced")}),c.jsx(Hn,{value:e.resolution,title:"Resolution"}),c.jsx(Hn,{value:e.duration,title:"Duration"}),c.jsx(Hn,{value:e.codec,title:t.get("Codec")}),c.jsx(Hn,{value:e.formatProfile,title:"Format Profile"}),c.jsx(Hn,{value:e.formatLevel,title:"Format Level"}),c.jsx(Hn,{value:e.formatTier,title:"Format Tier"}),c.jsx(va,{value:e.stream,title:"File Stream"}),c.jsx(va,{value:e.bitDepth,title:"Bit Depth"}),c.jsx(Hn,{value:e.displayaspectratio,title:"Display Aspect ratio"}),c.jsx(va,{value:e.pixelaspectratio,title:"Pixel Aspect ratio"}),c.jsx(Hn,{value:e.scantype,title:"Scan type"}),c.jsx(Hn,{value:e.scanOrder,title:"Scan order"}),c.jsx(va,{value:e.framerate,title:"Framerate"}),c.jsx(Hn,{value:e.framerateMode,title:"Framerate mode"}),c.jsx(Hn,{value:e.framerateModeRaw,title:"Framerate mode raw"}),c.jsx(Hn,{value:e.muxingMode,title:"Muxing mode"}),c.jsx(Hn,{value:e.matrixCoefficients,title:"Matrix Coefficients"}),c.jsx(va,{value:e.referenceFrameCount,title:"Reference Frame Count"}),c.jsx(Hn,{value:e.hdrFormat,title:"HDR Format"}),c.jsx(Hn,{value:e.hdrFormatRenderer,title:"HDR Format (renderer)"}),c.jsx(Hn,{value:e.hdrFormatCompatibility,title:"HDR Compatibility Format"}),c.jsx(Hn,{value:e.hdrFormatCompatibilityRenderer,title:"HDR Compatibility Format (renderer)"})]})]})}function e5({i18n:t,image:e,title:n}){const[r,{toggle:i}]=pp(!1);return e&&c.jsxs(Ee,{children:[c.jsx(ut,{children:c.jsx(at,{variant:"default",size:"compact-xs",onClick:i,children:n})}),c.jsxs(gp,{in:r,children:[c.jsx(Hn,{value:e.format,title:t.get("Format")}),c.jsx(Hn,{value:e.resolution,title:t.get("Resolution")}),c.jsx(va,{value:e.size,title:t.get("Size")}),c.jsx(va,{value:e.bitDepth,title:"BitDepth"})]})]})}function Coe({i18n:t,mediaInfo:e}){return e&&c.jsxs(tn,{children:[c.jsx(Hn,{value:e.container,title:t.get("Format")}),e.videotracks&&e.videotracks.map((n,r)=>c.jsx(woe,{i18n:t,videoTrack:n},r)),e.audiotracks&&e.audiotracks.map((n,r)=>c.jsx(Soe,{i18n:t,audioTrack:n},r)),e.subtitlestracks&&e.subtitlestracks.map((n,r)=>c.jsx(Toe,{i18n:t,subtitles:n},r)),c.jsx(e5,{i18n:t,image:e.image,title:t.get("Image")}),c.jsx(e5,{i18n:t,image:e.thumbnail,title:t.get("Thumbnail")})]})}function Eoe({i18n:t,uuid:e,id:n}){const[r,i]=A.useState(!0),[s,o]=A.useState(!1),[u,d]=A.useState(null),f=()=>{i(!0),Rt.post(os+"getMediaInfo",{uuid:e,id:n}).then(function(y){d(y.data),o(!0)}).catch(function(y){!y.response&&y.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:"Your edit data was not received from the server."})}).then(function(){i(!1)})},m=()=>{if(u&&u.mediaInfo&&u.mediaInfo.mediaType)switch(u.mediaInfo.mediaType){case"video":return c.jsxs(ut,{children:[c.jsx(lN,{}),t.get("MediaInfo")]});case"audio":return c.jsxs(ut,{children:[c.jsx(AX,{}),t.get("MediaInfo")]})}return t.get("MediaInfo")};return A.useEffect(()=>{s&&f()},[s]),c.jsxs(c.Fragment,{children:[c.jsxs(Qn,{opened:s,onClose:()=>o(!1),title:m(),scrollAreaComponent:Ar.Autosize,size:"lg",children:[c.jsx(Hn,{value:u?.filename,title:t.get("File")}),c.jsx(va,{value:u?.size,title:t.get("Size")}),c.jsx(Coe,{i18n:t,mediaInfo:u?.mediaInfo}),c.jsx(at,{fullWidth:!0,mt:"md",loading:r,size:"compact-md",onClick:()=>{o(!1)},children:t.get("Close")})]}),c.jsx(at,{variant:"default",size:"compact-md",onClick:()=>{o(!0)},children:c.jsx(eY,{size:14})})]})}function t5({i18n:t,uuid:e,id:n,start:r,started:i,callback:s}){const[o,u]=A.useState(!0),[d,f]=A.useState(!1),[m,y]=A.useState([]),[x,b]=A.useState(null),w=ea(),S=()=>{u(!0),Rt.post(os+"edit",{uuid:e,id:n}).then(function(M){b(M.data),w.setValues(M.data),f(!0)}).catch(function(M){!M.response&&M.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:"Your edit data was not received from the server."})}).then(function(){u(!1)})},D=(M,V,$)=>{u(!0),Rt.post(os+"findMetadata",{uuid:e,id:n,media_type:M,search:V,year:$,lang:t.language}).then(function(q){y(q.data)}).catch(function(q){!q.response&&q.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:"Your search data was not received from the server."})}).then(function(){u(!1)})},k=M=>{u(!0),Rt.post(os+"setMetadata",{uuid:e,id:n,media_type:x?.media_type,tmdb_id:M}).then(function(){f(!1),s()}).catch(function(V){!V.response&&V.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:"Your data sent was not received from the server."})}).then(function(){u(!1)})},O=M=>{D(M.media_type,M.search,M.year)},N=({i18n:M,tmdbResult:V,editData:$})=>{const q=V.selected?M.get("SelectedMedia"):$?.media_type=="tv_episode"?M.get("UpdateEpisode"):$?.media_type=="tv"?M.get("UpdateTvSeries"):M.get("UpdateMovie");return c.jsxs(Ti,{shadow:"sm",padding:"lg",radius:"md",withBorder:!0,children:[c.jsxs(H1,{mih:150,gap:"md",justify:"flex-start",align:"flex-start",direction:"row",wrap:"nowrap",children:[c.jsx(vp,{radius:"md",h:150,w:"auto",fit:"contain",src:V.poster}),c.jsxs(H1,{justify:"flex-start",align:"flex-start",direction:"column",wrap:"wrap",children:[c.jsxs(ut,{gap:"0",children:[c.jsx(et,{size:"md",children:V.title}),V.year&&c.jsx(Pg,{variant:"default",mx:"sm",children:V.year.substring(0,4)})]}),V.title!==V.original_title&&c.jsxs(ut,{gap:"0",children:[c.jsx(et,{size:"sm",fs:"italic",children:V.original_title}),V.original_language&&c.jsx(Pg,{variant:"default",mx:"sm",size:"sm",fs:"italic",children:V.original_language})]}),c.jsx(CA,{maxHeight:120,showLabel:"...",hideLabel:"↥",children:c.jsx(et,{size:"sm",c:"dimmed",children:V.overview})})]})]}),c.jsx(at,{fullWidth:!0,mt:"md",radius:"md",loading:o,size:"compact-md",color:V.selected?"teal":void 0,onClick:()=>k(V.id),children:q})]})},F=({i18n:M,editResults:V,editData:$})=>V&&V.length>0?c.jsxs(tn,{children:[c.jsx(ks,{size:"md",my:"xs",label:"↧",labelPosition:"center",fz:"md",c:"var(--mantine-color-text)"}),V.map(q=>c.jsx(N,{i18n:M,tmdbResult:q,editData:$},q.id))]}):void 0;return A.useEffect(()=>{r&&(S(),i())},[r]),c.jsxs(Qn,{opened:d,onClose:()=>f(!1),title:t.get("EditMetadata"),scrollAreaComponent:Ar.Autosize,size:"lg",children:[c.jsxs("form",{onSubmit:w.onSubmit(O),children:[x?.folder&&c.jsxs(ut,{children:[c.jsx(et,{size:"xs",fw:500,c:"dimmed",children:t.get("Folder")}),c.jsx(et,{size:"xs",children:x.folder})]}),x?.filename&&c.jsxs(ut,{children:[c.jsx(et,{size:"xs",fw:500,c:"dimmed",children:t.get("File")}),c.jsx(et,{size:"xs",children:x.filename})]}),c.jsx(pn,{required:!0,label:t.get("Search"),name:"search",...w.getInputProps("search")}),c.jsx(ss,{label:t.get("Year"),...w.getInputProps("year")}),c.jsx(at,{fullWidth:!0,mt:"md",type:"submit",leftSection:c.jsx(HA,{size:18}),loading:o,size:"compact-md",children:t.get("Search")})]}),c.jsx(F,{i18n:t,editResults:m,editData:x})]})}function n5({i18n:t,player:e,data:n,refreshPage:r,setLoading:i}){const[s,o]=A.useState(!1),u=n.goal==="show"?n.medias[0]:void 0,d=u&&u.mediaType==="video"?u:void 0,f=n.goal==="browse"&&n.metadata?.isEditable||d&&d.metadata?.isEditable,m=u&&u.fullyplayed!=null?u.fullyplayed:n.fullyplayed,y=u&&u.hasMediaInfo,x=m!=null,b=f||x;return u?c.jsxs(at.Group,{children:[c.jsx(at,{variant:"default",size:"compact-md",leftSection:c.jsx(Zh,{size:14}),onClick:()=>e.askPlayId(n.medias[0].id),children:t.get("Play")}),y&&c.jsx(Eoe,{i18n:t,uuid:e.uuid,id:e.reqId}),f&&c.jsx(t5,{i18n:t,uuid:e.uuid,id:e.reqId,start:s,started:()=>o(!1),callback:()=>r()}),b&&c.jsx(JR,{i18n:t,player:e,fullyplayed:m,videoMetadataEditable:f,refreshPage:r,setLoading:i,setShowVideoMetadataEdit:o}),n.useWebControl&&c.jsx(Ft,{withinPortal:!0,label:t.get("PlayOnAnotherRenderer"),children:c.jsx(at,{variant:"default",disabled:!0,size:"compact-md",onClick:()=>{},children:c.jsx(iN,{size:14})})}),c.jsx(Ft,{withinPortal:!0,label:t.get("AddToPlaylist"),children:c.jsx(at,{variant:"default",disabled:!0,size:"compact-md",onClick:()=>{},children:c.jsx(gK,{size:14})})}),u.isDownload&&c.jsx(Ft,{withinPortal:!0,label:t.get("Download"),children:c.jsx(at,{variant:"default",size:"compact-md",onClick:()=>window.open(os+"download/"+e.uuid+"/"+n.medias[0].id,"_blank"),children:c.jsx(UX,{size:14})})})]}):b?c.jsxs(at.Group,{children:[f&&c.jsx(t5,{i18n:t,uuid:e.uuid,id:e.reqId,start:s,started:()=>o(!1),callback:()=>r()}),c.jsx(JR,{i18n:t,player:e,fullyplayed:m,videoMetadataEditable:f,refreshPage:r,setLoading:i,setShowVideoMetadataEdit:o})]}):void 0}function r5({i18n:t,player:e,data:n,refreshPage:r,setLoading:i}){const s=n.goal==="show"?n.medias[0]:n.breadcrumbs[n.breadcrumbs.length-1],o=n.goal==="show"?s.metadata:n.metadata;return o?c.jsx(boe,{i18n:t,player:e,media:s,metadata:o,children:c.jsx(n5,{i18n:t,player:e,data:n,refreshPage:r,setLoading:i})}):n.goal==="show"?c.jsx(xoe,{i18n:t,player:e,media:s,children:c.jsx(n5,{i18n:t,player:e,data:n,refreshPage:r,setLoading:i})}):void 0}const ng=({i18n:t,session:e,player:n})=>{const[r,i]=A.useState({goal:"",folders:[],breadcrumbs:[],medias:[],useWebControl:!1}),[s,o]=A.useState(!1),{req:u,id:d}=GG();A.useEffect(()=>{e.subscribeTo("Player"),e.startPlayerSse()},[]),A.useEffect(()=>{if(m()){const k=r.breadcrumbs[r.breadcrumbs.length-1],O=t.getLocalizedName(k.name);e.setDocumentTitle(O)}else e.setDocumentTitle("")},[r.breadcrumbs]);const f=()=>{n.uuid&&n.reqType&&(o(!0),Rt.post(os+n.reqType,{uuid:n.uuid,id:n.reqId,lang:t.language},{headers:{Player:n.uuid}}).then(function(k){i(k.data);const O=k.data,N=O.goal==="show"?O.medias[0]:O.breadcrumbs[k.data.breadcrumbs.length-1];D(k.data.goal==="show"?N.metadata:O.metadata),window.scrollTo(0,0);const F="/player/"+n.reqType+"/"+n.reqId;F!==history.state&&window.history.pushState(F,"",F)}).catch(function(k){!k.response&&k.request?t.showServerUnreachable():Wn({id:"player-data-loading",title:t.get("Error"),message:"Your browse data was not received from the server."})}).then(function(){o(!1)}))},m=()=>r.breadcrumbs.length>1,y=()=>m()?c.jsx(Hi,{mb:"xs",shadow:"xs",p:"sm",bg:"transparentBg",children:c.jsx(ut,{children:c.jsx(X_,{separatorMargin:0,styles:{root:{flexWrap:"wrap"}},children:r.breadcrumbs.map(k=>k.id?c.jsx(at,{style:k.id?{fontWeight:400}:{cursor:"default"},onClick:k.id?()=>n.askBrowseId(k.id):void 0,color:"gray",variant:"subtle",size:"compact-md",children:k.name==="root"?c.jsx(VA,{}):t.getLocalizedName(k.name)},k.id):c.jsx(x,{breadcrumb:k},-1))})})}):void 0,x=({breadcrumb:k})=>c.jsx(at,{style:{cursor:"default"},color:"gray",variant:"subtle",size:"compact-md",children:t.getLocalizedName(k.name)}),b=({player:k,media:O})=>c.jsx(Hi,{children:c.jsx(poe,{media:O,uuid:k.uuid,askPlayId:k.askPlayId,sendJsonMessage:e.sendJsonMessage})}),w=({player:k,media:O})=>(O.delay&&O.surroundMedias.next&&setTimeout(()=>{O.surroundMedias.next&&k.askPlayId(O.surroundMedias.next.id)},O.delay),c.jsx(Hi,{children:c.jsx(vp,{radius:"md",src:os+"image/"+k.uuid+"/"+O.id,alt:O.name})})),S=({player:k,data:O})=>{if(O.medias.length===1)switch(O.medias[0].mediaType){case"video":return c.jsx(b,{media:O.medias[0],player:k});case"audio":return c.jsx(b,{media:O.medias[0],player:k});case"image":return c.jsx(w,{media:O.medias[0],player:k})}};function D(k){let O="";if(k&&k.images&&k.images.length>0){const N=t.language.substring(0,2),F=k.images[0];if(F&&F.backdrops&&F.backdrops.length>0){let M=F.backdrops.filter(V=>!V.iso_639_1);if(M.length===0&&(M=F.backdrops.filter(V=>V.iso_639_1===N)),M.length===0&&(M=F.backdrops.filter(V=>V.iso_639_1==="en")),M.length>0){const V=Math.floor(Math.random()*M.length);O=k.imageBaseURL+"original"+M[V].file_path;const $=document.createElement("img");$.crossorigin="",$.id="backgroundPreload",$.onload=function(){document.body.style.backgroundImage="url("+O+")";const q=document.getElementsByClassName("mantine-AppShell-main")[0];q.style.backgroundColor="unset";const B=document.getElementsByClassName("bodyBackgroundImageScreen");if(B&&B[0]){const z=B[0];z.style.backgroundColor="rgba(20, 21, 23, 0)"}},setTimeout(function(){$.src=O;const q=document.getElementsByClassName("backgroundPreloadContainer")[0];q.innerHTML=$})}}}else{const N=document.getElementsByClassName("bodyBackgroundImageScreen");if(N&&N[0]){const F=N[0];F.style.backgroundColor="rgba(20, 21, 23, 0.99)"}setTimeout(()=>{document.body.style.backgroundImage="none"},500)}}return A.useEffect(()=>{d&&u&&n.askReqId(d,u)},[u,d]),A.useEffect(()=>{f()},[n.uuid,n.reqType,n.reqId,t.language]),A.useEffect(()=>{e.setNavbarValue(e.playerNavbar?c.jsx(yoe,{data:r,i18n:t,player:n}):void 0)},[r,t.get,e.playerNavbar]),!e.authenticate||e.havePermission(dn.web_player_browse)?c.jsxs(Ee,{children:[c.jsx(t0,{visible:s,overlayProps:{fixed:!0},loaderProps:{style:{position:"fixed"}}}),c.jsx(y,{}),c.jsx(Ar,{children:r.goal==="play"?c.jsx(Hi,{children:c.jsx(S,{player:n,data:r})}):r.goal==="show"?c.jsx(r5,{i18n:t,player:n,data:r,refreshPage:f,setLoading:o}):c.jsxs("span",{children:[c.jsx(voe,{i18n:t,session:e,player:n,data:r}),c.jsx(r5,{i18n:t,player:n,data:r,refreshPage:f,setLoading:o}),c.jsx(goe,{i18n:t,session:e,player:n,data:r}),c.jsx(cf,{i18n:t,session:e,player:n,mediaArray:r.medias})]})}),c.jsx("div",{className:"backgroundPreloadContainer",children:c.jsx("img",{id:"backgroundPreload",alt:"",crossOrigin:""})})]}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})};function Aoe({i18n:t,form:e,defaultConfiguration:n,selectionSettings:r,advancedSettings:i,setAdvancedSettings:s}){const o=()=>t.languages.map(u=>({value:u.id,label:u.name+(u.name!==u.defaultname?" ("+u.defaultname+")":"")+(u.id.startsWith("en-")?"":" ("+u.coverage+"%)")}));return c.jsxs(Tt,{children:[c.jsxs(Tt.Item,{value:"Application",children:[c.jsx(Tt.Control,{children:t.get("Application")}),c.jsxs(Tt.Panel,{children:[c.jsx(pt,{label:t.get("ShowAdvancedSettings"),checked:i,onChange:u=>s(u.currentTarget.checked)}),c.jsx(Cr,{label:t.get("Language"),data:o(),...e.getInputProps("language")}),c.jsxs(tn,{align:"flex-start",mt:"sm",children:[c.jsx(pt,{label:t.get("EnableSplashScreen"),...e.getInputProps("show_splash_screen",{type:"checkbox"})}),c.jsx(pt,{label:t.get("CheckAutomaticallyForUpdates"),...e.getInputProps("auto_update",{type:"checkbox"})})]})]})]}),c.jsxs(Tt.Item,{value:"GUI",children:[c.jsx(Tt.Control,{children:t.get("GraphicalUserInterface")}),c.jsxs(Tt.Panel,{children:[c.jsx(pt,{label:t.get("LaunchGuiBrowserStartup"),...e.getInputProps("web_gui_on_start",{type:"checkbox"})}),i&&c.jsx(ss,{placeholder:n.web_gui_port?.toString(),label:t.get("ForcePortGuiServer"),hideControls:!0,...e.getInputProps("web_gui_port")}),c.jsxs(tn,{align:"flex-start",mt:"sm",children:[c.jsx(pt,{label:t.get("UseAuthenticationService"),...e.getInputProps("authentication_enabled",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("EnablingAuthenticateLocalhost")),...mn,children:c.jsx(pt,{disabled:!e.values.authentication_enabled,label:t.get("AuthenticateLocalhostAdmin"),...e.getInputProps("authenticate_localhost_as_admin",{type:"checkbox"})})}),c.jsx(pt,{disabled:!e.values.authentication_enabled,label:t.get("ShowUserChoice"),...e.getInputProps("web_gui_show_users",{type:"checkbox"})}),c.jsx(pt,{disabled:!e.values.authentication_enabled||!e.values.web_gui_show_users,label:t.get("AllowEmptyPinLogin"),...e.getInputProps("web_gui_allow_empty_pin",{type:"checkbox"})})]})]})]}),i&&c.jsxs(Tt.Item,{value:"Services",children:[c.jsx(Tt.Control,{children:t.get("Services")}),c.jsxs(Tt.Panel,{children:[c.jsxs(ut,{children:[c.jsx(pn,{label:t.get("ServerName"),placeholder:n.server_name?.toString(),name:"server_name",style:{flex:1},...e.getInputProps("server_name")}),c.jsx(Ft,{label:In(t.get("WhenEnabledUmsProfileName")),...mn,children:c.jsx(pt,{mt:"xl",label:t.get("AppendProfileName"),...e.getInputProps("append_profile_name",{type:"checkbox"})})})]}),c.jsx(ks,{mt:"md",label:c.jsx(et,{fz:"md",c:"var(--mantine-color-text)",children:t.get("MediaServer")})}),c.jsx(ss,{placeholder:n.port?.toString(),label:t.get("ForcePortServer"),hideControls:!0,...e.getInputProps("port")}),c.jsxs(tn,{mt:"sm",children:[c.jsx(pt,{label:t.get("UPnPDlnaService"),...e.getInputProps("upnp_enable",{type:"checkbox"})}),i&&c.jsx(Cr,{size:"xs",label:t.get("LogLevelColon"),data:t.getValueLabelData(r?.upnpLoglevels),...e.getInputProps("upnp_log_level")}),i&&c.jsx(pt,{label:t.get("JUPnPDIDLLite"),...e.getInputProps("upnp_jupnp_didl",{type:"checkbox"})}),c.jsx(pt,{label:t.get("MDNSChromecastService"),...e.getInputProps("chromecast_extension",{type:"checkbox"})})]}),c.jsx(ks,{mt:"md",label:c.jsx(et,{fz:"md",c:"var(--mantine-color-text)",children:t.get("WebPlayer")})}),c.jsx(pt,{label:t.get("EnableWebPlayer"),...e.getInputProps("web_player_enable",{type:"checkbox"})}),c.jsxs(tn,{align:"flex-start",className:e.values.web_player_enable?"":"hidden",children:[c.jsx(ss,{placeholder:n.web_player_port?.toString(),label:t.get("ForcePortPlayerServer"),hideControls:!0,...e.getInputProps("web_player_port")}),c.jsx(et,{c:"orange",span:!0,size:"sm",className:e.values.authentication_enabled?"hidden":"",children:t.get("AuthenticationServiceDisabled")}),c.jsx(pt,{className:e.values.authentication_enabled?"":"hidden",disabled:!e.values.web_player_enable||!e.values.authentication_enabled,label:t.get("UseAuthenticationService"),...e.getInputProps("web_player_auth",{type:"checkbox"})}),c.jsxs(tn,{align:"flex-start",className:!e.values.authentication_enabled||!e.values.web_player_auth?"hidden":"",children:[c.jsx(pt,{hidden:!0,disabled:!e.values.web_player_auth||!e.values.authentication_enabled,label:t.get("ShowUserChoice"),...e.getInputProps("web_player_show_users",{type:"checkbox"})}),c.jsx(pt,{disabled:!e.values.web_player_show_users||!e.values.web_player_auth||!e.values.authentication_enabled,label:t.get("AllowEmptyPinLogin"),...e.getInputProps("web_player_allow_empty_pin",{type:"checkbox"})})]}),c.jsxs(tn,{align:"flex-start",className:e.values.authentication_enabled&&e.values.web_player_auth?"hidden":"",children:[c.jsx(et,{size:"sm",children:t.get("UnauthenticatedAccessRights")}),c.jsx(pt,{disabled:!e.values.web_player_enable||e.values.web_player_auth===!0&&e.values.authentication_enabled===!0,label:t.get("AllowMediaDownload"),...e.getInputProps("web_player_download",{type:"checkbox"})}),c.jsx(pt,{disabled:!e.values.web_player_enable||e.values.web_player_auth===!0&&e.values.authentication_enabled===!0,label:t.get("CanControlOtherDevices"),...e.getInputProps("web_player_controls",{type:"checkbox"})})]})]})]})]}),i&&c.jsxs(Tt.Item,{value:"NetworkSettingsAdvanced",children:[c.jsx(Tt.Control,{children:t.get("NetworkSettingsAdvanced")}),c.jsxs(Tt.Panel,{children:[c.jsx(Cr,{label:t.get("ForceNetworkingInterface"),data:t.getValueLabelData(r?.networkInterfaces),...e.getInputProps("network_interface")}),c.jsx(pn,{mt:"xs",label:t.get("ForceIpServer"),...e.getInputProps("hostname")}),c.jsxs(ut,{children:[c.jsx(ss,{label:t.get("MaximumBandwidthMbs"),disabled:e.values.automatic_maximum_bitrate==!0,style:{flex:1},placeholder:t.get("Mbs"),hideControls:!0,...e.getInputProps("maximum_bitrate")}),c.jsx(Ft,{label:In(t.get("ItSetsOptimalBandwidth")),...mn,children:c.jsx(pt,{mt:"xl",label:t.get("UseAutomaticMaximumBandwidth"),...e.getInputProps("automatic_maximum_bitrate",{type:"checkbox"})})})]})]})]}),c.jsxs(Tt.Item,{value:"ExternalOutgoingTraffic",children:[c.jsx(Tt.Control,{children:t.get("ExternalOutgoingTraffic")}),c.jsx(Tt.Panel,{children:c.jsxs(tn,{children:[i&&c.jsx(Ft,{label:In(t.get("ThisControlsWhetherUmsTry")),...mn,children:c.jsx(pt,{label:t.get("EnableExternalNetwork"),...e.getInputProps("external_network",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("UsesInformationApiAllowBrowsing")),...mn,children:c.jsx(pt,{label:t.get("UseInfoFromOurApi"),...e.getInputProps("use_api_info",{type:"checkbox"})})}),c.jsx(pt,{label:t.get("UseInfoFromTMDB"),...e.getInputProps("use_tmdb_info",{type:"checkbox"})}),c.jsx(pn,{disabled:!e.values.use_tmdb_info,mt:"xs",label:t.get("TMDBApiKey"),description:c.jsx(jy,{href:"https://www.themoviedb.org/settings/api",target:"_blank",c:"dimmed",size:"xs",style:{lineHeight:1},children:t.get("ToRegisterTmdbApiKey")}),...e.getInputProps("tmdb_api_key")})]})})]})]})}function Doe({path:t,separator:e,setCurrentPath:n}){return c.jsx(at,{onClick:()=>n(t.value),variant:"default",size:"compact-md",children:t.label+e})}function koe({i18n:t,path:e,setSelectedDirectory:n}){return c.jsx(Ft,{label:t.get("Select"),color:"blue",multiline:!0,withArrow:!0,children:c.jsx(at,{onClick:()=>n(e.value),variant:"outline",size:"compact-md",rightSection:c.jsx(aY,{}),children:e.label})})}function Roe({i18n:t,parents:e,separator:n,setCurrentPath:r,setSelectedDirectory:i}){return c.jsxs(ut,{gap:"0",children:[c.jsx(at,{onClick:()=>r("roots"),variant:"default",size:"compact-md",me:"xs",children:c.jsx(PX,{})}),e.map((s,o,{length:u})=>u-1===o?c.jsx(koe,{i18n:t,path:s,setSelectedDirectory:i},o):c.jsx(Doe,{path:s,separator:n,setCurrentPath:r},o))]})}function Poe({i18n:t,path:e,opened:n,onClose:r,setSelectedDirectory:i}){const[s,o]=A.useState([]),[u,d]=A.useState([]),[f,m]=A.useState("/"),[y,x]=A.useState(!0);A.useEffect(()=>{n&&b(e)},[n,e]);const b=w=>{x(!0),Rt.post(Kw+"directories",{path:w||""}).then(function(S){const D=S.data;m(D.separator),o(D.children),d(D.parents.reverse())}).catch(function(S){!S.response&&S.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:t.get("SubdirectoriesNotReceived"),message2:t.getReportLink()})}).then(function(){x(!1)})};return c.jsx(Qn,{opened:n,onClose:()=>r(),title:c.jsxs(ut,{children:[c.jsx(aN,{}),t.get("SelectedDirectory")]}),scrollAreaComponent:Ar.Autosize,size:"lg",children:c.jsxs(Ee,{mx:"auto",children:[c.jsx(t0,{visible:y}),c.jsx(Hi,{shadow:"md",p:"xs",withBorder:!0,children:c.jsx(Roe,{i18n:t,separator:f,parents:u,setCurrentPath:b,setSelectedDirectory:i})}),c.jsx(tn,{gap:"xs",align:"flex-start",justify:"flex-start",mt:"sm",children:s.map(w=>c.jsx(at,{leftSection:c.jsx(Og,{size:18}),variant:"subtle",onClick:()=>b(w.value),size:"compact-md",children:w.label},w.value))})]})})}function fp({i18n:t,tooltipText:e,path:n,callback:r,label:i,disabled:s,size:o,placeholder:u,withAsterisk:d}){const[f,m]=A.useState(!1),y=N=>{N&&r(N),m(!1)},x=!s&&n,b=()=>x&&c.jsx(Ee,{c:"red",pt:"4",style:{cursor:"pointer"},onClick:()=>r(""),children:c.jsx(cY,{size:18})}),w=()=>!s&&!n,S=()=>w()&&c.jsxs(ut,{gap:"0",style:{cursor:"pointer"},onClick:()=>{D()},children:[c.jsx(aN,{size:18}),c.jsx(et,{children:"..."})]}),D=()=>{s||m(!0)},k=()=>c.jsx(pn,{size:o,label:i,disabled:s,styles:{input:{cursor:"pointer"}},style:{flex:1},value:n,placeholder:u,withAsterisk:d,leftSection:c.jsx(S,{}),leftSectionWidth:w()?40:10,rightSection:c.jsx(b,{}),rightSectionWidth:x?30:10,onClick:()=>{D()},readOnly:!0}),O=()=>e?c.jsx(Ft,{label:e,style:{width:350},color:"blue",multiline:!0,withArrow:!0,children:c.jsx(k,{})}):c.jsx(k,{});return c.jsxs(ut,{children:[c.jsx(Poe,{i18n:t,path:n,opened:f,onClose:()=>m(!1),setSelectedDirectory:y}),c.jsx(O,{})]})}function Ioe({i18n:t,canModify:e,form:n,defaultConfiguration:r,selectionSettings:i}){const s=async()=>{await uf("Server.ResetCache")};return c.jsxs(Tt,{children:[c.jsxs(Tt.Item,{value:"NavigationGeneralSettings",children:[c.jsx(Tt.Control,{children:t.get("GeneralSettings")}),c.jsxs(Tt.Panel,{children:[c.jsx(ut,{justify:"space-between",children:e&&c.jsx(Ft,{label:t.get("TheProgramWillCloseNoFiles"),...mn,children:c.jsx(at,{size:"xs",onClick:()=>s(),children:t.get("ResetCache")})})}),c.jsxs(tn,{align:"flex-start",mt:"xs",children:[c.jsx(Ft,{label:In(t.get("WhenEnabledPartiallyWatchVideo")),...mn,children:c.jsx(pt,{label:t.get("EnableVideoResuming"),...n.getInputProps("resume",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("ThisMakesBrowsingSlower")),...mn,children:c.jsx(pt,{label:t.get("HideEmptyFolders"),...n.getInputProps("hide_empty_folders",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("TreatMultipleSymbolicLinks")),...mn,children:c.jsx(pt,{label:t.get("UseTargetFileSymbolicLinks"),...n.getInputProps("use_symlinks_target_file",{type:"checkbox"})})}),c.jsx(pt,{label:t.get("BrowseCompressedArchives"),...n.getInputProps("enable_archive_browsing",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("IfNumberItemsFolderExceeds")),...mn,children:c.jsx(ss,{label:t.get("MinimumItemLimitBeforeAZ"),...n.getInputProps("atz_limit")})})]}),c.jsx(Cr,{label:t.get("FullyPlayedAction"),data:t.getValueLabelData(i?.fullyPlayedActions),...n.getInputProps("fully_played_action")}),(n.values.fully_played_action==="3"||n.values.fully_played_action==="5")&&c.jsx(fp,{i18n:t,label:t.get("DestinationFolder"),path:n.getInputProps("fully_played_output_directory").value,callback:o=>n.setFieldValue("fully_played_output_directory",o)})]})]}),c.jsxs(Tt.Item,{value:"NavigationThumbnails",children:[c.jsx(Tt.Control,{children:t.get("Thumbnails")}),c.jsxs(Tt.Panel,{children:[c.jsx(pt,{label:t.get("GenerateThumbnails"),...n.getInputProps("generate_thumbnails",{type:"checkbox"})}),c.jsx(ss,{label:t.get("ThumbnailSeekingPosition"),disabled:!n.values.generate_thumbnails,placeholder:r.thumbnail_seek_position?.toString(),hideControls:!0,...n.getInputProps("thumbnail_seek_position")}),c.jsx(fp,{i18n:t,path:n.getInputProps("alternate_thumb_folder").value,callback:o=>n.setFieldValue("alternate_thumb_folder",o),label:t.get("AlternateVideoCoverArtFolder")}),c.jsx(Cr,{label:t.get("AudioThumbnailsImport"),data:t.getValueLabelData(i?.audioCoverSuppliers),...n.getInputProps("audio_thumbnails_method")})]})]}),c.jsxs(Tt.Item,{value:"NavigationFileSortingNaming",children:[c.jsx(Tt.Control,{children:t.get("FileSortingNaming")}),c.jsx(Tt.Panel,{children:c.jsxs(tn,{align:"flex-start",children:[c.jsx(Cr,{label:t.get("FileOrder"),data:t.getValueLabelData(i?.sortMethods),...n.getInputProps("sort_method")}),c.jsx(pt,{label:t.get("IgnoreArticlesATheSorting"),...n.getInputProps("ignore_the_word_a_and_the",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("IfEnabledFilesWillAppear")),...mn,children:c.jsx(pt,{label:t.get("PrettifyFilenames"),...n.getInputProps("prettify_filenames",{type:"checkbox"})})}),c.jsx(pt,{label:t.get("HideFileExtensions"),disabled:n.values.prettify_filenames===!0,...n.getInputProps("hide_extensions",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("AddsInformationAboutSelectedSubtitles")),...mn,children:c.jsx(Cr,{label:t.get("AddSubtitlesInformationVideoNames"),data:t.getValueLabelData(i?.subtitlesInfoLevels),...n.getInputProps("subs_info_level")})}),c.jsx(Ft,{label:In(t.get("IfEnabledEngineNameDisplayed")),...mn,children:c.jsx(pt,{label:t.get("AddEnginesNamesAfterFilenames"),checked:!n.values.hide_enginenames,onChange:o=>{n.setFieldValue("hide_enginenames",!o.currentTarget.checked)}})})]})})]}),c.jsxs(Tt.Item,{value:"NavigationVirtualFoldersFiles",children:[c.jsx(Tt.Control,{children:t.get("VirtualFoldersFiles")}),c.jsx(Tt.Panel,{children:c.jsxs(tn,{children:[c.jsx(Ft,{label:In(t.get("MediaLibraryFolderWillAvailable")),...mn,children:c.jsx(pt,{label:t.get("ShowMediaLibraryFolder"),...n.getInputProps("show_media_library_folder",{type:"checkbox"})})}),c.jsx(pt,{label:t.get("ShowRecentlyPlayedFolder"),...n.getInputProps("show_recently_played_folder",{type:"checkbox"})}),c.jsx(pt,{label:t.get("ShowServerSettingsFolder"),...n.getInputProps("show_server_settings_folder",{type:"checkbox"})}),c.jsx(pt,{label:t.get("ShowTranscodeFolder"),...n.getInputProps("show_transcode_folder",{type:"checkbox"})}),c.jsxs(ut,{children:[c.jsx(pt,{disabled:!n.values.show_transcode_folder,label:t.get("ChaptersSupportInTranscodeFolder"),...n.getInputProps("chapter_support",{type:"checkbox"})}),c.jsx(ss,{disabled:!n.values.show_transcode_folder||!n.values.chapter_support,placeholder:r.chapter_interval?.toString(),hideControls:!0,...n.getInputProps("chapter_interval")})]})]})})]})]})}function Ooe({i18n:t,form:e,selectionSettings:n}){return c.jsx(Tt,{children:c.jsxs(Tt.Item,{value:"Renderers",children:[c.jsx(Tt.Control,{children:t.get("Renderers")}),c.jsx(Tt.Panel,{children:c.jsxs(tn,{children:[c.jsx(lp,{data:t.getValueLabelData(n?.allRendererNames),label:t.get("EnabledRenderers"),...e.getInputProps("selected_renderers")}),c.jsx(Cr,{style:{flex:1},label:t.get("DefaultRendererWhenAutoFails"),data:t.getValueLabelData(n?.enabledRendererNames),...e.getInputProps("renderer_default"),searchable:!0}),c.jsx(Ft,{label:In(t.get("DisablesAutomaticDetection")),...mn,children:c.jsx(pt,{label:t.get("ForceDefaultRenderer"),...e.getInputProps("renderer_force_default",{type:"checkbox"})})})]})})]})})}function G6(t,e,n){return t=t.slice(),t.splice(n<0?t.length+n:n,0,t.splice(e,1)[0]),t}function p1(t){const e=window.getComputedStyle(t);return Math.max(parseInt(e["margin-top"],10),parseInt(e["margin-bottom"],10))+t.getBoundingClientRect().height}function Noe(t){return t.touches&&t.touches.length||t.changedTouches&&t.changedTouches.length}function vl(t,e=0,n=0){if(t){if(e===null||n===null){t.style.removeProperty("transform");return}t.style.transform=`translate(${n}px, ${e}px)`}}function Zv(t,e,n){t&&(t.style.transition=`transform ${e}ms${n?` ${n}`:""}`)}function Moe(t,e){let n=0,r=t.length-1,i;for(;n<=r;){if(i=Math.floor((r+n)/2),!t[i+1]||t[i]<=e&&t[i+1]>=e)return i;t[i]<e&&t[i+1]<e?n=i+1:r=i-1}return-1}const m1=t=>{let e=[],n=null;const r=(...i)=>{e=i,!n&&(n=requestAnimationFrame(()=>{n=null,t(...e)}))};return r.cancel=()=>{n&&cancelAnimationFrame(n)},r};function i5(t,e){const n=["input","textarea","select","option","optgroup","video","audio","button","a"],r=["button","link","checkbox","radio","switch","tab"];if(!t||!e)return!1;for(;t!==e;){if(t.getAttribute("data-movable-handle"))return!1;if(n.includes(t.tagName.toLowerCase()))return!0;const i=t.getAttribute("role");if(i&&r.includes(i.toLowerCase())||t.tagName.toLowerCase()==="label"&&t.hasAttribute("for"))return!0;t.tagName&&(t=t.parentElement)}return!1}const Qd=200,Zd=10,Jd=10;class W6 extends A.Component{listRef=A.createRef();ghostRef=A.createRef();topOffsets=[];itemTranslateOffsets=[];initialYOffset=0;lastScroll=0;lastYOffset=0;lastListYOffset=0;dropTimeout;needle=-1;afterIndex=-2;state={itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,liveText:"",scrollingSpeed:0,scrollWindow:!1};schdOnMouseMove;schdOnTouchMove;schdOnEnd;constructor(e){super(e),this.schdOnMouseMove=m1(this.onMouseMove),this.schdOnTouchMove=m1(this.onTouchMove),this.schdOnEnd=m1(this.onEnd)}componentDidMount(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}componentDidUpdate(e,n){n.scrollingSpeed!==this.state.scrollingSpeed&&n.scrollingSpeed===0&&this.doScrolling()}componentWillUnmount(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}doScrolling=()=>{const{scrollingSpeed:e,scrollWindow:n}=this.state,r=this.listRef.current;window.requestAnimationFrame(()=>{n?window.scrollTo(window.pageXOffset,window.pageYOffset+e*1.5):r.scrollTop+=e,e!==0&&this.doScrolling()})};getChildren=()=>this.listRef&&this.listRef.current?Array.from(this.listRef.current.children):(console.warn("No items found in the List container. Did you forget to pass & spread the `props` param in renderList?"),[]);static defaultProps={transitionDuration:300,lockVertically:!1,removableByMove:!1,voiceover:{item:e=>`You are currently at a draggable item at position ${e}. Press space bar to lift.`,lifted:e=>`You have lifted item at position ${e}. Press j to move down, k to move up, space bar to drop and escape to cancel.`,moved:(e,n)=>`You have moved the lifted item ${n?"up":"down"} to position ${e}. Press j to move down, k to move up, space bar to drop and escape to cancel.`,dropped:(e,n)=>`You have dropped the item. It has moved from position ${e} to ${n}.`,canceled:e=>`You have cancelled the movement. The item has returned to its starting position of ${e}.`}};calculateOffsets=()=>{this.topOffsets=this.getChildren().map(e=>e.getBoundingClientRect().top),this.itemTranslateOffsets=this.getChildren().map(e=>p1(e))};getTargetIndex=e=>this.getChildren().findIndex(n=>n===e.target||n.contains(e.target));onMouseOrTouchStart=e=>{this.dropTimeout&&this.state.itemDragged>-1&&(window.clearTimeout(this.dropTimeout),this.finishDrop());const n=Noe(e);if(!n&&e.button!==0)return;const r=this.getTargetIndex(e);if(r===-1||this.props.disabled||this.props.values[r]&&this.props.values[r].disabled){this.state.selectedItem!==-1&&(this.setState({selectedItem:-1}),this.finishDrop());return}const i=this.getChildren()[r],s=i.querySelector("[data-movable-handle]");if(!(s&&!s.contains(e.target))&&!i5(e.target,i)){if(e.preventDefault(),this.props.beforeDrag&&this.props.beforeDrag({elements:this.getChildren(),index:r}),n){const o={passive:!1};i.style.touchAction="none",document.addEventListener("touchend",this.schdOnEnd,o),document.addEventListener("touchmove",this.schdOnTouchMove,o),document.addEventListener("touchcancel",this.schdOnEnd,o)}else{document.addEventListener("mousemove",this.schdOnMouseMove),document.addEventListener("mouseup",this.schdOnEnd);const o=this.getChildren()[this.state.itemDragged];o&&o.style&&(o.style.touchAction="")}this.onStart(i,n?e.touches[0].clientX:e.clientX,n?e.touches[0].clientY:e.clientY,r)}};getYOffset=()=>{const e=this.listRef.current?this.listRef.current.scrollTop:0;return window.pageYOffset+e};onStart=(e,n,r,i)=>{this.state.selectedItem>-1&&(this.setState({selectedItem:-1}),this.needle=-1);const s=e.getBoundingClientRect(),o=window.getComputedStyle(e);this.calculateOffsets(),this.initialYOffset=this.getYOffset(),this.lastYOffset=window.pageYOffset,this.lastListYOffset=this.listRef.current.scrollTop,this.setState({itemDragged:i,targetX:s.left-parseInt(o["margin-left"],10),targetY:s.top-parseInt(o["margin-top"],10),targetHeight:s.height,targetWidth:s.width,initialX:n,initialY:r})};onMouseMove=e=>{e.cancelable&&e.preventDefault(),this.onMove(e.clientX,e.clientY)};onTouchMove=e=>{e.cancelable&&e.preventDefault(),this.onMove(e.touches[0].clientX,e.touches[0].clientY)};onWheel=e=>{this.state.itemDragged<0||(this.lastScroll=this.listRef.current.scrollTop+=e.deltaY,this.moveOtherItems())};onMove=(e,n)=>{if(this.state.itemDragged===-1)return null;vl(this.ghostRef.current,n-this.state.initialY,this.props.lockVertically?0:e-this.state.initialX),this.autoScrolling(n,n-this.state.initialY),this.moveOtherItems()};moveOtherItems=()=>{const e=this.ghostRef.current.getBoundingClientRect(),n=e.top+e.height/2,r=p1(this.getChildren()[this.state.itemDragged]),i=this.getYOffset();this.initialYOffset!==i&&(this.topOffsets=this.topOffsets.map(s=>s-(i-this.initialYOffset)),this.initialYOffset=i),this.isDraggedItemOutOfBounds()&&this.props.removableByMove?this.afterIndex=this.topOffsets.length+1:this.afterIndex=Moe(this.topOffsets,n),this.animateItems(this.afterIndex===-1?0:this.afterIndex,this.state.itemDragged,r)};autoScrolling=(e,n)=>{const{top:r,bottom:i,height:s}=this.listRef.current.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight;if(i>o&&o-e<Qd&&n>Jd)this.setState({scrollingSpeed:Math.min(Math.round((Qd-(o-e))/Zd),Math.round((n-Jd)/Zd)),scrollWindow:!0});else if(r<0&&e<Qd&&n<-Jd)this.setState({scrollingSpeed:Math.max(Math.round((Qd-e)/-Zd),Math.round((n+Jd)/Zd)),scrollWindow:!0});else if(this.state.scrollWindow&&this.state.scrollingSpeed!==0&&this.setState({scrollingSpeed:0,scrollWindow:!1}),s+20<this.listRef.current.scrollHeight){let u=0;e-r<Qd&&n<-Jd?u=Math.max(Math.round((Qd-(e-r))/-Zd),Math.round((n+Jd)/Zd)):i-e<Qd&&n>Jd&&(u=Math.min(Math.round((Qd-(i-e))/Zd),Math.round((n-Jd)/Zd))),this.state.scrollingSpeed!==u&&this.setState({scrollingSpeed:u})}};animateItems=(e,n,r,i=!1)=>{this.getChildren().forEach((s,o)=>{if(Zv(s,this.props.transitionDuration),n===o&&i){if(n===e)return vl(s,null);vl(s,n<e?this.itemTranslateOffsets.slice(n+1,e+1).reduce((u,d)=>u+d,0):this.itemTranslateOffsets.slice(e,n).reduce((u,d)=>u+d,0)*-1)}else n<e&&o>n&&o<=e?vl(s,-r):o<n&&n>e&&o>=e?vl(s,r):vl(s,null)})};isDraggedItemOutOfBounds=()=>{const e=this.getChildren()[this.state.itemDragged].getBoundingClientRect(),n=this.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-n.left)>n.width?(this.state.itemDraggedOutOfBounds===-1&&this.setState({itemDraggedOutOfBounds:this.state.itemDragged}),!0):(this.state.itemDraggedOutOfBounds>-1&&this.setState({itemDraggedOutOfBounds:-1}),!1)};onEnd=e=>{e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchup",this.schdOnEnd),document.removeEventListener("touchcancel",this.schdOnEnd);const n=this.props.removableByMove&&this.isDraggedItemOutOfBounds();!n&&this.props.transitionDuration>0&&this.afterIndex!==-2&&m1(()=>{Zv(this.ghostRef.current,this.props.transitionDuration,"cubic-bezier(.2,1,.1,1)"),this.afterIndex<1&&this.state.itemDragged===0?vl(this.ghostRef.current,0,0):vl(this.ghostRef.current,-(window.pageYOffset-this.lastYOffset)+-(this.listRef.current.scrollTop-this.lastListYOffset)+(this.state.itemDragged<this.afterIndex?this.itemTranslateOffsets.slice(this.state.itemDragged+1,this.afterIndex+1).reduce((r,i)=>r+i,0):this.itemTranslateOffsets.slice(this.afterIndex<0?0:this.afterIndex,this.state.itemDragged).reduce((r,i)=>r+i,0)*-1),0)})(),this.dropTimeout=window.setTimeout(this.finishDrop,n||this.afterIndex===-2?0:this.props.transitionDuration)};finishDrop=()=>{const e=this.props.removableByMove&&this.isDraggedItemOutOfBounds(),n=this.state.itemDragged,r=this.afterIndex>-2&&n!==this.afterIndex,i=r?e?-1:Math.max(this.afterIndex,0):n;(e||r)&&this.props.onChange({oldIndex:n,newIndex:i,targetRect:this.ghostRef.current.getBoundingClientRect()}),this.props.afterDrag&&this.props.afterDrag({elements:this.getChildren(),oldIndex:n,newIndex:i}),this.getChildren().forEach(s=>{Zv(s,0),vl(s,null),s.style.touchAction=""}),this.setState({itemDragged:-1,scrollingSpeed:0}),this.afterIndex=-2,this.lastScroll>0&&(this.listRef.current.scrollTop=this.lastScroll,this.lastScroll=0)};onKeyDown=e=>{const n=this.state.selectedItem,r=this.getTargetIndex(e);if(!i5(e.target,e.currentTarget)&&r!==-1){if(e.key===" "&&(e.preventDefault(),n===r?(n!==this.needle&&(this.getChildren().forEach(i=>{Zv(i,0),vl(i,null)}),this.props.onChange({oldIndex:n,newIndex:this.needle,targetRect:this.getChildren()[this.needle].getBoundingClientRect()}),this.getChildren()[this.needle].focus()),this.setState({selectedItem:-1,liveText:this.props.voiceover.dropped(n+1,this.needle+1)}),this.needle=-1):(this.setState({selectedItem:r,liveText:this.props.voiceover.lifted(r+1)}),this.needle=r,this.calculateOffsets())),(e.key==="ArrowDown"||e.key==="j")&&n>-1&&this.needle<this.props.values.length-1){e.preventDefault();const i=p1(this.getChildren()[n]);this.needle++,this.animateItems(this.needle,n,i,!0),this.setState({liveText:this.props.voiceover.moved(this.needle+1,!1)})}if((e.key==="ArrowUp"||e.key==="k")&&n>-1&&this.needle>0){e.preventDefault();const i=p1(this.getChildren()[n]);this.needle--,this.animateItems(this.needle,n,i,!0),this.setState({liveText:this.props.voiceover.moved(this.needle+1,!0)})}e.key==="Escape"&&n>-1&&(this.getChildren().forEach(i=>{Zv(i,0),vl(i,null)}),this.setState({selectedItem:-1,liveText:this.props.voiceover.canceled(n+1)}),this.needle=-1),(e.key==="Tab"||e.key==="Enter")&&n>-1&&e.preventDefault()}};render(){const e={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},n={...e,top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,position:"fixed",marginTop:0};return A.createElement(A.Fragment,null,this.props.renderList({children:this.props.values.map((r,i)=>{const s=i===this.state.itemDragged,o=i===this.state.selectedItem,u=!!(this.props.disabled||this.props.values[i]&&typeof this.props.values[i]=="object"&&this.props.values[i].disabled),d={key:i,tabIndex:u?-1:0,"aria-roledescription":this.props.voiceover.item(i+1),onKeyDown:this.onKeyDown,style:{...e,visibility:s?"hidden":void 0,zIndex:o?5e3:0}};return this.props.renderItem({value:r,props:d,index:i,isDragged:!1,isSelected:o,isOutOfBounds:!1,isDisabled:u})}),isDragged:this.state.itemDragged>-1,props:{ref:this.listRef}}),this.state.itemDragged>-1&&Oy.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:n,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isDisabled:!1,isOutOfBounds:this.state.itemDraggedOutOfBounds>-1}),this.props.container||document.body),A.createElement("div",{"aria-live":"assertive",role:"log","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0px",padding:"0px",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"}},this.state.liveText))}}function joe({i18n:t,canModify:e,form:n,defaultConfiguration:r,selectionSettings:i,advancedSettings:s}){const[o,u]=A.useState("common"),[d,f]=A.useState("rgba(255, 255, 255, 255)"),[m,y]=A.useState(!1),[x,b]=A.useState(!1),w=i?i.transcodingEngines:{},S=X=>n.getInputProps("engines_priority").value!==void 0?n.getInputProps("engines_priority").value.filter(fe=>w[fe]&&w[fe].purpose===X):[],D=X=>Array.isArray(X)&&X.every(fe=>typeof fe=="string"),k=(X,fe,be)=>{if(D(n.getInputProps("engines_priority").value)){const we=n.getInputProps("engines_priority").value,pe=we.indexOf(S(X)[fe]),Ce=pe-fe+be;n.setFieldValue("engines_priority",G6(we,pe,Ce))}},O=(X,fe)=>{const be=D(n.getInputProps("engines").value)?n.getInputProps("engines").value:[n.getInputProps("engines").value],we=be.includes(X);if(fe&&!we){const pe=be.concat(X);n.setFieldValue("engines",pe)}else if(!fe&&we){const pe=be.filter(function(Ce){return Ce!==X});n.setFieldValue("engines",pe)}},N=D(n.getInputProps("engines").value)?n.getInputProps("engines").value:[n.getInputProps("engines").value],F=({engine:X})=>{if(X.isAvailable){if(N.includes(X.id))return c.jsx(Ft,{label:In(t.get("TranscodingEngineXEnabled")?.replace("%s",X.name)),...mn,children:c.jsx(Ee,{style:{cursor:"copy"},onClick:fe=>{e&&O(X.id,!1),fe.stopPropagation()},children:c.jsx(Zh,{strokeWidth:2,color:"green",size:14})})})}else return c.jsx(Ft,{label:In(t.get("ThereIsProblemTranscodingEngineX")?.replace("%s",X.name)),...mn,children:c.jsx(Ee,{children:c.jsx(Ig,{color:"orange",strokeWidth:3,size:14})})});return c.jsx(Ft,{label:In(t.get("TranscodingEngineXDisabled")?.replace("%s",X.name)),...mn,children:c.jsx(Ee,{style:{cursor:"copy"},onClick:fe=>{e&&O(X.id,!0),fe.stopPropagation()},children:c.jsx(dX,{color:"red",size:14})})})},M=({purpose:X})=>{const fe=S(X);return fe.length>1?c.jsx(W6,{lockVertically:!0,values:S(X),onChange:({oldIndex:be,newIndex:we})=>{e&&k(X,be,we)},renderList:({children:be,props:we})=>c.jsx(tn,{justify:"flex-start",align:"flex-start",gap:"xs",...we,children:be}),renderItem:({value:be,props:we,isDragged:pe,isSelected:Ce})=>{const Ke=w[be];return we.key=void 0,A.createElement(at,{...we,key:Ke.id,color:"gray",size:"compact-xs",variant:pe||Ce?"outline":"subtle",leftSection:c.jsxs(c.Fragment,{children:[c.jsx(Ee,{c:"gray",me:5,"data-movable-handle":!0,style:{cursor:pe?"grabbing":"grab"},children:fe.indexOf(be)===0?c.jsx(tN,{size:14}):fe.indexOf(be)===fe.length-1?c.jsx(nN,{size:14}):c.jsx(rN,{size:14})}),c.jsx(F,{engine:Ke})]}),onClick:()=>u(Ke.id)},Ke.name)}}):c.jsx(tn,{justify:"flex-start",align:"flex-start",gap:"xs",children:fe.map(be=>{const we=w[be];return c.jsx(at,{variant:"subtle",color:"gray",size:"compact-xs",leftSection:c.jsx(F,{engine:we}),onClick:()=>u(we.id),children:we.name},we.id)})})},V=()=>i?.transcodingEnginesPurposes.map((X,fe)=>c.jsxs(Tt.Item,{value:"Transcoding"+fe.toString(),children:[c.jsx(Tt.Control,{children:t.getString(X)}),c.jsx(Tt.Panel,{children:c.jsx(M,{purpose:fe})})]},"Transcoding"+fe.toString()));function $(X){if(X==null)return"#00000000";const fe=X.indexOf(",")>-1?",":" ",be=X.substring(5).split(")")[0].split(fe);let we="#";for(let pe=0;pe<be.length;pe++){const Ce=pe<3?parseInt(be[pe]).toString(16):Math.round(parseFloat(be[pe])*255).toString(16);Ce.length<2&&(we=we+"0"),we=we+Ce}return we}function q(X){const fe=parseInt(X.slice(1,3),16),be=parseInt(X.slice(3,5),16),we=parseInt(X.slice(5,7),16),pe=parseFloat((parseInt(X.slice(7,9),16)/255).toFixed(2));return"rgba("+fe.toString()+", "+be.toString()+", "+we.toString()+", "+pe.toString()+")"}const B=()=>c.jsxs(c.Fragment,{children:[c.jsx(Es,{mt:"sm",order:5,children:t.get("CommonTranscodeSettings")}),c.jsxs(tn,{gap:"xs",children:[c.jsx(Ft,{label:In(t.get("WhenEnabledDoNotTrancode")),...mn,children:c.jsx(pt,{disabled:!e,size:"xs",mt:"xs",label:t.get("DisableAllTranscoding"),...n.getInputProps("disable_transcoding",{type:"checkbox"})})}),c.jsx(pn,{disabled:!e||n.values.disable_transcoding===!0,label:t.get("SkipTranscodingFollowingExtensions"),size:"xs",style:{flex:1},...n.getInputProps("disable_transcode_for_extensions")}),c.jsx(pn,{disabled:!e||n.values.disable_transcoding===!0,size:"xs",label:t.get("ForceTranscodingFollowingExtensions"),style:{flex:1},...n.getInputProps("force_transcode_for_extensions")}),c.jsx(pn,{label:t.get("MaximumTranscodeBufferSize"),name:"maximum_video_buffer_size",style:{flex:1},size:"xs",disabled:!e,...n.getInputProps("maximum_video_buffer_size")}),c.jsx(ss,{label:t.get("CpuThreadsToUse")?.replace("%d",String(r.number_of_cpu_cores)),size:"xs",max:r.number_of_cpu_cores?Number(r.number_of_cpu_cores):1,min:1,disabled:!e,...n.getInputProps("number_of_cpu_cores")}),c.jsxs(Kt,{defaultValue:"TranscodingVideoSettings",children:[c.jsxs(Kt.List,{children:[c.jsx(Kt.Tab,{value:"TranscodingVideoSettings",children:t.get("VideoSettings")}),c.jsx(Kt.Tab,{value:"TranscodingAudioSettings",children:t.get("AudioSettings")}),c.jsx(Kt.Tab,{value:"TranscodingSubtitlesSettings",children:t.get("SubtitlesSettings")})]}),c.jsx(Kt.Panel,{value:"TranscodingVideoSettings",children:c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{mt:"xs",disabled:!e,size:"xs",label:t.get("EnableGpuAcceleration"),...n.getInputProps("gpu_acceleration",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("WhenEnabledMuxesDvd")),...mn,children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("LosslessDvdVideoPlayback"),...n.getInputProps("mencoder_remux_mpeg2",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("AutomaticWiredOrWireless")),...mn,children:c.jsx(pn,{label:t.get("TranscodingQualityMpeg2"),size:"xs",style:{flex:1},disabled:!e||n.values.automatic_maximum_bitrate===!0,...n.getInputProps("mpeg2_main_settings")})}),c.jsx(Ft,{label:In(t.get("AutomaticSettingServeBestQuality")),...mn,children:c.jsx(pn,{label:t.get("TranscodingQualityH264"),size:"xs",style:{flex:1},disabled:!e||n.values.automatic_maximum_bitrate===!0,...n.getInputProps("x264_constant_rate_factor")})})]})}),c.jsx(Kt.Panel,{value:"TranscodingAudioSettings",children:c.jsxs(tn,{gap:"xs",children:[c.jsx(Cr,{disabled:!e,label:t.get("MaximumNumberAudioChannelsOutput"),data:[{value:"6",label:t.get("6Channels51")},{value:"2",label:t.get("2ChannelsStereo")}],size:"xs",...n.getInputProps("audio_channels")}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseLpcmForAudio"),...n.getInputProps("audio_use_pcm",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("KeepAc3Tracks"),...n.getInputProps("audio_remux_ac3",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("KeepDtsTracks"),...n.getInputProps("audio_embed_dts_in_pcm",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EncodedAudioPassthrough"),...n.getInputProps("encoded_audio_passthrough",{type:"checkbox"})}),c.jsx(pn,{disabled:!e,label:t.get("Ac3ReencodingAudioBitrate"),style:{flex:1},size:"xs",...n.getInputProps("audio_bitrate")}),c.jsx(pn,{disabled:!e,label:t.get("AudioLanguagePriority"),style:{flex:1},size:"xs",...n.getInputProps("audio_languages")})]})}),c.jsx(Kt.Panel,{value:"TranscodingSubtitlesSettings",children:c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{mt:"xs",disabled:!e,size:"xs",label:t.get("DisableSubtitles"),...n.getInputProps("disable_subtitles",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("YouCanRearrangeOrderSubtitles")),...mn,children:c.jsx(pn,{disabled:!e,label:t.get("SubtitlesLanguagePriority"),style:{flex:1},size:"xs",...n.getInputProps("subtitles_languages")})}),c.jsx(pn,{disabled:!e,label:t.get("ForcedLanguage"),style:{flex:1},size:"xs",...n.getInputProps("forced_subtitle_language")}),c.jsx(pn,{disabled:!e,label:t.get("ForcedTags"),style:{flex:1},size:"xs",...n.getInputProps("forced_subtitle_tags")}),c.jsx(Ft,{label:In(t.get("AnExplanationDefaultValueAudio")),...mn,children:c.jsx(pn,{disabled:!e,label:t.get("AudioSubtitlesLanguagePriority"),style:{flex:1},size:"xs",...n.getInputProps("audio_subtitles_languages")})}),c.jsx(fp,{i18n:t,disabled:!e,size:"xs",path:n.getInputProps("alternate_subtitles_folder").value,callback:X=>n.setFieldValue("alternate_subtitles_folder",X),label:t.get("AlternateSubtitlesFolder")}),c.jsx(Cr,{disabled:!e,size:"xs",label:t.get("NonUnicodeSubtitleEncoding"),data:t.getValueLabelData(i?.subtitlesCodepages),...n.getInputProps("subtitles_codepage")}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("FribidiMode"),...n.getInputProps("mencoder_subfribidi",{type:"checkbox"})}),c.jsx(fp,{i18n:t,disabled:!e,size:"xs",tooltipText:t.get("ToUseFontMustBeRegistered"),path:n.getInputProps("subtitles_font").value,callback:X=>n.setFieldValue("subtitles_font",X),label:t.get("SpecifyTruetypeFont")}),c.jsx(et,{size:"xs",children:t.get("StyledSubtitles")}),c.jsxs(qn,{children:[c.jsx(qn.Col,{span:3,children:c.jsx(pn,{disabled:!e,label:t.get("FontScale"),style:{flex:1},size:"xs",...n.getInputProps("subtitles_ass_scale")})}),c.jsx(qn.Col,{span:3,children:c.jsx(ss,{label:t.get("FontOutline"),size:"xs",disabled:!e,...n.getInputProps("mencoder_noass_outline")})}),c.jsx(qn.Col,{span:3,children:c.jsx(ss,{label:t.get("FontShadow"),size:"xs",disabled:!e,...n.getInputProps("subtitles_ass_shadow")})}),c.jsx(qn.Col,{span:3,children:c.jsx(ss,{label:t.get("MarginPx"),size:"xs",disabled:!e,...n.getInputProps("subtitles_ass_margin")})})]}),c.jsx(Ft,{label:In(t.get("IfEnabledExternalSubtitlesPrioritized")),...mn,children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("AutomaticallyLoadSrtSubtitles"),...n.getInputProps("autoload_external_subtitles",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("IfEnabledExternalSubtitlesAlways")),...mn,children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("ForceExternalSubtitles"),...n.getInputProps("force_external_subtitles",{type:"checkbox"})})}),c.jsx(Ft,{label:In(t.get("IfEnabledWontModifySubtitlesStyling")),...mn,children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseEmbeddedStyle"),...n.getInputProps("use_embedded_subtitles_style",{type:"checkbox"})})}),c.jsx(Qn,{size:"sm",title:t.get("Color"),opened:m,onClose:()=>y(!1),children:c.jsxs(tn,{align:"center",children:[c.jsx(eA,{format:"rgba",swatches:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"],color:d,onChange:f}),c.jsx(at,{size:"xs",onClick:()=>{e&&n.setFieldValue("subtitles_color",$(d)),y(!1)},children:t.get("Confirm")})]})}),c.jsxs(ut,{children:[c.jsx(pn,{disabled:!e,label:t.get("Color"),style:{flex:1},size:"xs",...n.getInputProps("subtitles_color")}),c.jsx(Uy,{radius:5,size:30,color:n.getInputProps("subtitles_color").value,style:{cursor:"pointer",marginTop:"25px"},onClick:()=>{e&&(f(q(n.getInputProps("subtitles_color").value)),y(!0))}})]}),c.jsx(Cr,{disabled:!e,size:"xs",label:t.get("3dSubtitlesDepth"),data:i?.subtitlesDepth,...n.getInputProps("3d_subtitles_depth"),value:String(n.values["3d_subtitles_depth"]),onChange:X=>{n.setFieldValue("3d_subtitles_depth",X)}})]})})]})]})]}),z=()=>c.jsxs(c.Fragment,{children:[c.jsx(Es,{mt:"sm",order:5,children:t.get("CommonTranscodeSettings")}),c.jsx(tn,{gap:"xs",children:c.jsx(pt,{size:"xs",label:t.get("DisableSubtitles"),...n.getInputProps("disable_subtitles",{type:"checkbox"})})})]}),ee=()=>{const X=w[o];if(!X.isAvailable)return c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:X.name}),c.jsxs(tn,{gap:"xs",children:[c.jsxs(et,{size:"xs",children:[c.jsx(Ig,{color:"orange",strokeWidth:3,size:14})," ",t.get("ThisEngineNotLoaded")]}),c.jsx(et,{size:"xs",children:t.getFormat(X.statusText)})]})]})},Y=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsxs(tn,{justify:"flex-start",align:"flex-start",gap:"xs",children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableExperimentalCodecs"),...n.getInputProps("vlc_use_experimental_codecs",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("AvSyncAlternativeMethod"),...n.getInputProps("vlc_audio_sync_enabled",{type:"checkbox"})})]})]})},Q=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsx(tn,{gap:"xs",children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("AutomaticAudioResampling"),...n.getInputProps("audio_resample",{type:"checkbox"})})})]})},oe=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("ForceFpsParsedFfmpeg"),...n.getInputProps("tsmuxer_forcefps",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("MuxAllAudioTracks"),...n.getInputProps("tsmuxer_mux_all_audiotracks",{type:"checkbox"})})]})]})},ue=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsx(Es,{mb:"sm",order:6,children:t.get("GeneralSettings")}),c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableMultithreading"),...n.getInputProps("mencoder_mt",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("SkipLoopFilterDeblocking"),...n.getInputProps("mencoder_skip_loop_filter",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("AvSyncAlternativeMethod"),...n.getInputProps("mencoder_nooutofsync",{type:"checkbox"})}),c.jsxs(qn,{children:[c.jsx(qn.Col,{span:4,children:c.jsx(pt,{disabled:!e,size:"xs",label:t.get("ChangeVideoResolution"),...n.getInputProps("mencoder_scaler",{type:"checkbox"})})}),c.jsx(qn.Col,{span:4,children:c.jsx(pn,{disabled:!e||!n.values.mencoder_scaler,label:t.get("Width"),style:{flex:1},size:"xs",...n.getInputProps("mencoder_scalex")})}),c.jsx(qn.Col,{span:4,children:c.jsx(pn,{disabled:!e||!n.values.mencoder_scaler,label:t.get("Height"),size:"xs",...n.getInputProps("mencoder_scaley")})})]}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("ForceFramerateParsedFfmpeg"),...n.getInputProps("mencoder_forcefps",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("DeinterlaceFilter"),...n.getInputProps("mencoder_yadif",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("RemuxVideosTsmuxer"),...n.getInputProps("mencoder_mux_compatible",{type:"checkbox"})}),c.jsx(pn,{disabled:!e,label:t.get("CustomOptionsVf"),name:"mencoder_custom_options",size:"xs",...n.getInputProps("mencoder_custom_options")}),c.jsxs(Qn,{size:"xl",opened:x,onClose:()=>b(!1),title:t.get("EditCodecSpecificParameters"),children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseApplicationDefaults"),...n.getInputProps("mencoder_intelligent_sync",{type:"checkbox"})}),c.jsx(yl,{block:!0,children:t.get("MencoderConfigScript.1.HereYouCanInputSpecific")+t.get("MencoderConfigScript.2.WarningThisShouldNot")+t.get("MencoderConfigScript.3.SyntaxIsJavaCondition")+t.get("MencoderConfigScript.4.AuthorizedVariables")+t.get("MencoderConfigScript.5.SpecialOptions")+t.get("MencoderConfigScript.6.Noass")+t.get("MencoderConfigScript.7.Nosync")+t.get("MencoderConfigScript.8.Quality")+t.get("MencoderConfigScript.9.Nomux")+t.get("MencoderConfigScript.10.YouCanPut")+t.get("MencoderConfigScript.11.ToRemoveJudder")+t.get("MencoderConfigScript.12.ToRemux")}),c.jsx(aA,{disabled:!e,label:t.get("CustomParameters"),name:"mencoder_codec_specific_script",size:"xs",...n.getInputProps("mencoder_codec_specific_script")})]}),c.jsx(ut,{justify:"center",children:c.jsx(at,{variant:"subtle",size:"compact-md",onClick:()=>b(!0),children:t.get("CodecSpecificParametersAdvanced")})}),c.jsxs(qn,{children:[c.jsx(qn.Col,{span:6,children:c.jsx(et,{size:"xs",style:{marginTop:"14px"},children:t.get("AddBordersOverscanCompensation")})}),c.jsx(qn.Col,{span:3,children:c.jsx(pn,{disabled:!e,label:t.get("Height")+"(%)",style:{flex:1},size:"xs",...n.getInputProps("mencoder_overscan_compensation_height")})}),c.jsx(qn.Col,{span:3,children:c.jsx(pn,{disabled:!e,label:t.get("Width")+"(%)",size:"xs",...n.getInputProps("mencoder_overscan_compensation_width")})})]})]}),c.jsx(Es,{my:"sm",order:6,children:t.get("SubtitlesSettings")}),c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseAssSubtitlesStyling"),...n.getInputProps("mencoder_ass",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("FonconfigEmbeddedFonts"),...n.getInputProps("mencoder_fontconfig",{type:"checkbox"})})]})]})},H=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableMultithreading"),...n.getInputProps("ffmpeg_avisynth_multithreading",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableTrueMotion"),...n.getInputProps("ffmpeg_avisynth_interframe",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableGpuUseTrueMotion"),...n.getInputProps("ffmpeg_avisynth_interframegpu",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableAvisynthVariableFramerate"),...n.getInputProps("ffmpeg_avisynth_convertfps",{type:"checkbox"})}),c.jsx(pt,{mt:"xs",disabled:!e,size:"xs",label:t.get("UseFFMS2InsteadOfDirectShowSource"),...n.getInputProps("ffmpeg_avisynth_use_ffms2",{type:"checkbox"})}),c.jsxs(Kt,{defaultValue:"2Dto3DConversionSettings",children:[c.jsx(Kt.List,{children:c.jsx(Kt.Tab,{value:"2Dto3DConversionSettings",children:t.get("2Dto3DConversionSettings")})}),c.jsx(Kt.Panel,{value:"2Dto3DConversionSettings",children:c.jsxs(tn,{gap:"xs",children:[c.jsx(pt,{mt:"xs",disabled:!e,size:"xs",label:t.get("Enable2Dto3DVideoConversion"),...n.getInputProps("ffmpeg_avisynth_2d_to_3d_conversion",{type:"checkbox"})}),c.jsx(Cr,{disabled:!e,label:t.get("ConversionAlgorithm"),data:[{value:"1",label:t.get("PulfrichBase")},{value:"2",label:t.get("PulfrichandLighting")}],size:"xs",...n.getInputProps("ffmpeg_avisynth_conversion_algorithm_index_2d_to_3d")}),c.jsx(Ft,{label:In(t.get("SelectOrEnterFrameStretchFactorInPercent")),...mn,children:c.jsx(ss,{label:t.get("FrameStretchFactor"),size:"xs",max:20,min:0,disabled:!e,...n.getInputProps("ffmpeg_avisynth_frame_stretch_factor_2d_to_3d")})}),c.jsx(Ft,{label:In(t.get("SelectOrEnterLightingDepthOffsetFactor")),...mn,children:c.jsx(ss,{label:t.get("LightingDepthOffsetFactor"),size:"xs",max:20,min:1,disabled:!e,...n.getInputProps("ffmpeg_avisynth_light_offset_factor_2d_to_3d")})}),c.jsx(Cr,{disabled:!e,label:t.get("3DOutputFormat"),data:[{value:"1",label:t.get("SBSFullSideBySide")},{value:"2",label:t.get("TBOUFullTopBottom")},{value:"3",label:t.get("HSBSHalfSideBySide")},{value:"4",label:t.get("HTBHOUHalfTopBottom")},{value:"5",label:t.get("HSBSUpscaledHalfSideBySide")},{value:"6",label:t.get("HTBHOUUpscaledHalfTopBottom")}],size:"xs",...n.getInputProps("ffmpeg_avisynth_output_format_index_3d")}),c.jsx(pt,{mt:"xs",disabled:!e,size:"xs",label:t.get("ResizeVideoIfWidthLargerThan"),...n.getInputProps("ffmpeg_avisynth_horizontal_resize",{type:"checkbox"})}),c.jsx(Ft,{label:In(t.get("SelectOrEnterTheMaximumWidthOfTheInputVideo")),...mn,children:c.jsx(Cr,{disabled:!e,label:"",data:[{value:"7680",label:"7680"},{value:"3840",label:"3840"},{value:"1920",label:"1920"},{value:"1280",label:"1280"},{value:"852",label:"852"},{value:"768",label:"768"},{value:"720",label:"720"},{value:"704",label:"704"},{value:"640",label:"640"},{value:"544",label:"544"},{value:"480",label:"480"},{value:"352",label:"352"},{value:"120",label:"120"}],size:"xs",...n.getInputProps("ffmpeg_avisynth_horizontal_resize_resolution")})})]})})]})]})]})},te=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsxs(tn,{gap:"xs",children:[c.jsx(Cr,{disabled:!e,size:"xs",label:t.get("LogLevelColon"),data:i?.ffmpegLoglevels,...n.getInputProps("ffmpeg_logging_level")}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("EnableMultithreading"),...n.getInputProps("ffmpeg_multithreading",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("RemuxVideosTsmuxer"),...n.getInputProps("ffmpeg_mux_tsmuxer_compatible",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseFontSettings"),...n.getInputProps("ffmpeg_fontconfig",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("DeferMencoderTranscodingProblematic"),...n.getInputProps("ffmpeg_mencoder_problematic_subtitles",{type:"checkbox"})}),c.jsx(pt,{disabled:!e,size:"xs",label:t.get("UseSoxHigherQualityAudio"),...n.getInputProps("ffmpeg_sox",{type:"checkbox"})}),c.jsx(ss,{disabled:!e,label:t.get("GpuDecodingThreadCount"),size:"xs",max:16,min:0,...n.getInputProps("ffmpeg_gpu_decoding_acceleration_thread_number")}),c.jsx(Ft,{label:In(t.get("NvidiaAndAmdEncoders")),...mn,children:c.jsx(Cr,{disabled:!e,size:"xs",label:t.get("AVCH264GPUEncodingAccelerationMethod"),data:i?.gpuEncodingH264AccelerationMethods,...n.getInputProps("ffmpeg_gpu_encoding_H264_acceleration_method")})}),c.jsx(Ft,{label:In(t.get("NvidiaAndAmdEncoders")),...mn,children:c.jsx(Cr,{disabled:!e,size:"xs",label:t.get("HEVCH265GPUEncodingAccelerationMethod"),data:i?.gpuEncodingH265AccelerationMethods,...n.getInputProps("ffmpeg_gpu_encoding_H265_acceleration_method")})})]})]})},Z=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsx(et,{size:"xs",children:t.get("NoSettingsForNow")})]})},ie=()=>{const X=ee();return X||c.jsxs(c.Fragment,{children:[c.jsx(Es,{my:"sm",order:5,children:w[o].name}),c.jsx(et,{size:"xs",children:"This engine is not known yet."})]})},G=()=>{switch(o){case"common":return c.jsx(B,{});case"DCRaw":return c.jsx(Z,{});case"FFmpegAudio":return c.jsx(Q,{});case"FFmpegVideo":return c.jsx(te,{});case"AviSynthFFmpeg":return c.jsx(H,{});case"FFmpegHlsVideo":return c.jsx(Z,{});case"FFmpegWebVideo":return c.jsx(Z,{});case"MEncoderVideo":return c.jsx(ue,{});case"MEncoderWebVideo":return c.jsx(Z,{});case"tsMuxeRAudio":return c.jsx(Z,{});case"tsMuxeRVideo":return c.jsx(oe,{});case"VLCAudioStreaming":return c.jsx(Z,{});case"VLCVideo":return c.jsx(Y,{});case"VLCWebVideo":return c.jsx(Y,{});case"VLCVideoStreaming":return c.jsx(Z,{});case"youtubeDl":return c.jsx(Z,{});default:return c.jsx(ie,{})}};return s?c.jsxs(qn,{children:[c.jsx(qn.Col,{span:5,children:c.jsxs(Ee,{p:"xs",children:[c.jsx(gA,{variant:"subtle",color:"gray",label:t.get("CommonTranscodeSettings"),onClick:()=>u("common")}),c.jsx(Tt,{children:c.jsx(V,{})}),c.jsx(et,{size:"xs",children:t.get("EnginesAreInDescending")+" "+t.get("OrderTheHighestIsFirst")})]})}),c.jsx(qn.Col,{span:7,children:c.jsx(G,{})})]}):c.jsx(z,{})}function WD({i18n:t,session:e}){const[n,r]=So({key:"show-advanced-settings",defaultValue:!1}),[i,s]=A.useState(!0),[o,u]=A.useState({}),[d,f]=A.useState({}),[m,y]=A.useState(),x=e.havePermission(dn.settings_modify),b=x||e.havePermission(dn.settings_view),w=ea({enhanceGetInputProps:D=>D.form.initialized?x?{}:{disabled:!0}:{disabled:!0}});A.useEffect(()=>{e.subscribeTo("ServerSettings"),e.stopPlayerSse(),e.setDocumentI18nTitle("ServerSettings"),e.setNavbarManage(WD.name)},[]),A.useEffect(()=>{if(e.serverConfiguration===null)return;const D=Yr.merge({},d,e.serverConfiguration);e.setServerConfiguration(null),f(D),w.setValues(D)},[d,e.serverConfiguration,e.setServerConfiguration]),A.useEffect(()=>{b&&Rt.get(Kw).then(function(D){const k=D.data;y(k.selectionSettings),u(k.userSettingsDefaults);const O=Yr.merge({},k.userSettingsDefaults,k.userSettings);f(O),w.initialize(O)}).catch(function(D){!D.response&&D.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:t.get("ConfigurationNotReceived"),message2:t.getReportLink()})}).then(function(){s(!1)})},[b]);const S=async D=>{s(!0),ZA({id:"settings-save",title:t.get("Save"),message:t.get("SavingConfiguration")});const k={};for(const O in D)Yr.isEqual(d[O],D[O])||(k[O]=D[O]!==void 0&&D[O]!==null?D[O]:null);Yr.isEmpty(k)?sJ({id:"settings-save",title:t.get("Saved"),message:t.get("ConfigurationHasNoChanges")}):await Rt.post(Kw,k).then(function(){f(D),s(!1),eD({id:"settings-save",title:t.get("Saved"),message:t.get("ConfigurationSaved"),icon:c.jsx(sN,{size:"1rem"})})}).catch(function(O){!O.response&&O.request?(Lu("settings-save"),t.showServerUnreachable()):tD({id:"settings-save",title:t.get("Error"),message:t.get("ConfigurationNotSaved"),message2:t.getReportLink()})}),s(!1)};return b?c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsxs("form",{onSubmit:w.onSubmit(S),children:[w.initialized&&c.jsxs(Kt,{defaultValue:"GeneralSettings",children:[c.jsxs(Kt.List,{children:[c.jsx(Kt.Tab,{value:"GeneralSettings",children:t.get("GeneralSettings")}),n&&c.jsx(Kt.Tab,{value:"RenderersSettings",children:t.get("RenderersSettings")}),n&&c.jsx(Kt.Tab,{value:"NavigationSettings",children:t.get("NavigationSettings")}),c.jsx(Kt.Tab,{value:"TranscodingSettings",children:t.get("TranscodingSettings")})]}),c.jsx(Kt.Panel,{value:"GeneralSettings",children:c.jsx(Aoe,{i18n:t,form:w,defaultConfiguration:o,selectionSettings:m,advancedSettings:n,setAdvancedSettings:r})}),n&&c.jsx(Kt.Panel,{value:"RenderersSettings",children:c.jsx(Ooe,{i18n:t,form:w,selectionSettings:m})}),n&&c.jsx(Kt.Panel,{value:"NavigationSettings",children:c.jsx(Ioe,{i18n:t,canModify:x,form:w,defaultConfiguration:o,selectionSettings:m})}),c.jsx(Kt.Panel,{value:"TranscodingSettings",children:c.jsx(joe,{i18n:t,canModify:x,form:w,defaultConfiguration:o,selectionSettings:m,advancedSettings:n})})]}),x&&c.jsx(ut,{justify:"flex-end",mt:"md",children:c.jsx(at,{type:"submit",loading:i,children:t.get("Save")})})]})}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})}const X6=async t=>(await Rt.post(J1+"web-content-name",{source:t})).data.name;function Loe({i18n:t,childs:e,canModify:n,setSharedContentChild:r}){return e?.map((i,s)=>c.jsx(fp,{i18n:t,disabled:!n,size:"xs",path:i.file,callback:o=>r(o,s)}))}function Boe({i18n:t,canModify:e,opened:n,setOpened:r,form:i,save:s,configuration:o}){const u={index:i.values.index,type:i.values.type,groups:i.values.groups,name:i.values.name,parent:i.values.parent,source:i.values.source,childs:i.values.childs},d=u.index<0,f=[{value:"Folder",label:t.get("Folder")},{value:"VirtualFolder",label:t.get("VirtualFolders")},{value:"FeedAudio",label:t.get("Podcast")},{value:"FeedImage",label:t.get("ImageFeed")},{value:"FeedVideo",label:t.get("VideoFeed")},{value:"StreamAudio",label:t.get("AudioStream")},{value:"StreamVideo",label:t.get("VideoStream")}];o.show_itunes_library&&f.push({value:"iTunes",label:t.get("ItunesLibrary")}),o.show_iphoto_library&&f.push({value:"iPhoto",label:t.get("IphotoLibrary")}),o.show_aperture_library&&f.push({value:"Aperture",label:t.get("ApertureLibrary")});const m=x=>Array.from(x.reduce(function(b,w){return w.file&&!b.has(w.file)&&b.set(w.file,w),b},new Map).values()),y=(x,b)=>{const w=Yr.cloneDeep(u.childs);b<0&&x?w.push({type:"Folder",file:x,monitored:!0,metadata:!0,active:!0}):w[b].file=x;const S=m(w);i.setFieldValue("childs",S)};return u.type&&c.jsxs(Qn,{scrollAreaComponent:Ar.Autosize,opened:n,onClose:()=>r(!1),title:t.get("SharedContent"),lockScroll:!1,children:[c.jsx(Cr,{disabled:!e||!d,label:t.get("Type"),data:f,maxDropdownHeight:120,...i.getInputProps("type")}),u.type!=="Folder"&&u.type!=="iTunes"&&c.jsx(pn,{disabled:!e||u.type.startsWith("Feed"),label:t.get("Name"),placeholder:u.type.startsWith("Feed")?t.get("NamesSetAutomaticallyFeeds"):"",name:"contentName",style:{flex:1},...i.getInputProps("name")}),u.type!=="Folder"&&u.type!=="iTunes"&&c.jsx(pn,{disabled:!e,label:t.get("Path"),placeholder:u.type!=="VirtualFolder"?"Web":"",name:"contentPath",style:{flex:1},...i.getInputProps("contentPath")}),u.type==="Folder"||u.type==="iTunes"?c.jsx(fp,{i18n:t,disabled:!e,label:t.get("Folder"),size:"xs",path:u.source,callback:x=>i.setFieldValue("source",x),placeholder:u.type==="iTunes"?t.get("AutoDetect"):void 0,withAsterisk:u.type==="Folder"}):u.type!=="VirtualFolder"&&c.jsx(pn,{disabled:!e,label:t.get("SourceURLColon"),name:"contentSource",style:{flex:1},...i.getInputProps("source")}),u.type==="VirtualFolder"&&c.jsxs(tn,{gap:"3",children:[c.jsx("label",{children:t.get("SharedFolders")}),c.jsx(Loe,{i18n:t,childs:u.childs,canModify:e,setSharedContentChild:y}),c.jsx(fp,{i18n:t,disabled:!e,size:"xs",path:"",placeholder:t.get("AddFolder"),callback:x=>y(x,-1)})]}),c.jsx(lp,{leftSection:c.jsx(dN,{}),disabled:!e,data:XN(o.groups),label:t.get("AuthorizedGroups"),placeholder:u.groups.length>0?void 0:t.get("NoGroupRestrictions"),maxDropdownHeight:120,hidePickedOptions:!0,...i.getInputProps("groups")}),c.jsx(ut,{justify:"flex-end",mt:"sm",children:c.jsx(at,{variant:"outline",onClick:()=>{e?s():r(!1)},children:e?d?t.get("Add"):t.get("Apply"):t.get("Close")})})]})}function Foe({isDragged:t,isSelected:e,isFirst:n,isLast:r}){return c.jsx(br,{"data-movable-handle":!0,size:24,style:{cursor:t?"grabbing":"grab"},variant:t||e?"outline":"subtle",children:n?c.jsx(tN,{}):r?c.jsx(nN,{}):c.jsx(rN,{})})}function Va({children:t,color:e}){return c.jsx(Hi,{flex:"flex-start",bg:e,radius:"sm",px:"4",py:"1",children:c.jsx(et,{size:"xs",c:"white",truncate:"end",children:t})})}function J2({i18n:t,value:e,groups:n}){return e.groups&&e.groups.length>0?c.jsx(ut,{gap:5,children:e.groups.map(r=>{const i=NJ(r,n);return c.jsx(Va,{color:i?"red":"grape",children:i||t.get("NonExistentGroup")+" "+r},"groupname"+r)})}):void 0}function Uoe({i18n:t,value:e,groups:n}){const r=e.parent?e.parent.split("/"):[],s=(o=>{switch(o){case"FeedAudio":return t.get("Podcast");case"FeedImage":return t.get("ImageFeed");case"FeedVideo":return t.get("VideoFeed")}})(e.type);return c.jsxs(tn,{gap:5,children:[c.jsx(et,{children:s}),c.jsxs(ut,{gap:5,children:[r.map((o,u)=>c.jsx(Va,{color:"teal",children:o},u)),e.name?c.jsx(Va,{color:"teal",children:e.name}):c.jsx(Va,{color:"red",children:t.get("FeedNameNotFound")})]}),c.jsx(Va,{color:"blue",children:e.uri}),c.jsx(J2,{i18n:t,value:e,groups:n})]})}function zoe({i18n:t,value:e,groups:n}){const r=i=>i?.split("\\").pop()?.split("/").pop();return c.jsxs(tn,{gap:5,children:[c.jsx(et,{children:t.get("Folder")}),c.jsx(Va,{color:"teal",children:r(e.file)}),c.jsx(Va,{color:"blue",children:e.file}),c.jsx(J2,{i18n:t,value:e,groups:n})]})}function $oe({i18n:t,value:e,groups:n}){const i=(o=>{switch(o){case"StreamAudio":return t.get("AudioStream");case"StreamVideo":return t.get("VideoStream")}})(e.type),s=e.parent?e.parent.split("/"):[];return c.jsxs(tn,{gap:5,children:[c.jsx(et,{children:i}),c.jsxs(ut,{gap:5,children:[s.map((o,u)=>c.jsx(Va,{color:"teal",children:o},u)),c.jsx(Va,{color:"teal",children:e.name})]}),c.jsx(Va,{color:"blue",children:e.uri}),c.jsx(J2,{i18n:t,value:e,groups:n})]})}function Voe({i18n:t,value:e,groups:n}){const r=e.childs?e.childs.filter(s=>s.type==="Folder"):[],i=e.parent?e.parent.split("/"):[];return c.jsxs(tn,{gap:5,children:[c.jsx(et,{children:t.get("VirtualFolders")}),c.jsxs(ut,{gap:5,children:[i.map((s,o)=>c.jsx(Va,{color:"teal",children:s},o)),c.jsx(Va,{color:"teal",children:e.name})]}),r.map((s,o)=>c.jsx(Va,{color:"blue",children:s.file},o)),c.jsx(J2,{i18n:t,value:e,groups:n})]})}function Hoe({i18n:t,value:e,groups:n}){switch(e.type){case"FeedAudio":case"FeedImage":case"FeedVideo":return c.jsx(Uoe,{i18n:t,value:e,groups:n});case"StreamAudio":case"StreamVideo":return c.jsx($oe,{i18n:t,value:e,groups:n});case"Folder":return c.jsx(zoe,{i18n:t,value:e,groups:n});case"VirtualFolder":return c.jsx(Voe,{i18n:t,value:e,groups:n});case"iTunes":return t.get("ItunesLibrary");case"iPhoto":return t.get("IphotoLibrary");case"Aperture":return t.get("ApertureLibrary")}return t.get("Unknown")}function qoe({i18n:t,value:e,sharedContents:n,setSharedContents:r,canModify:i}){const[s,o]=A.useState(!1),u=async d=>{o(!0);try{const f=Yr.cloneDeep(n),m=n.indexOf(d),y=await X6(d.uri);y?(f[m].name=y,r(f)):JA({title:t.get("Information"),message:t.get("FeedNameNotFound")})}catch(f){console.error(f),Wn({title:t.get("Error"),message:t.get("DataNotReceived")})}o(!1)};return c.jsxs(c.Fragment,{children:[c.jsx(kt.Divider,{}),c.jsx(kt.Item,{color:"blue",leftSection:c.jsx(gQ,{}),disabled:!i||!e.uri||s,onClick:()=>u(e),children:t.get("UpdateFeedName")})]})}function Goe({i18n:t,value:e,sharedContents:n,setSharedContents:r,canModify:i}){const[s,o]=A.useState(!1),u=f=>{const m=Yr.cloneDeep(n),y=n.indexOf(f);m[y].monitored=!m[y].monitored,r(m)},d=async(f,m)=>{o(!0);try{await Rt.post(J1+"mark-directory",{directory:f,isPlayed:m}),e_({message:t.get("Saved")})}catch{Wn({title:t.get("Error"),message:t.get("ConfigurationNotSaved"),message2:t.getReportLink()})}o(!1)};return c.jsxs(c.Fragment,{children:[c.jsx(kt.Divider,{}),c.jsx(kt.Item,{color:e.monitored?"green":"red",leftSection:e.monitored?c.jsx(GW,{}):c.jsx(HW,{}),disabled:!i,onClick:()=>u(e),children:t.get("MonitorPlayedStatusFiles")}),c.jsx(kt.Item,{color:"blue",leftSection:c.jsx(GX,{}),disabled:!i||!e.file||s,onClick:()=>d(e.file,!0),children:t.get("MarkContentsFullyPlayed")}),c.jsx(kt.Item,{color:"green",leftSection:c.jsx(XX,{}),disabled:!i||!e.file||s,onClick:()=>d(e.file,!1),children:t.get("MarkContentsUnplayed")})]})}function Woe({i18n:t,value:e,sharedContents:n,setSharedContents:r,canModify:i,openEditModal:s}){const o=f=>{const m=Yr.cloneDeep(n),y=n.indexOf(f);m[y].active=!m[y].active,r(m)},u=f=>{const m=Yr.cloneDeep(n),y=n.indexOf(f);m.splice(y,1),r(m)},d=f=>{const m=n.indexOf(f);s(m)};return c.jsxs(ut,{justify:"flex-end",children:[c.jsx(br,{variant:"subtle",size:30,color:e.active?"blue":"orange",disabled:!i,visibleFrom:"sm",onClick:()=>o(e),children:e.active?c.jsx($w,{size:16}):c.jsx($k,{size:16})}),c.jsxs(kt,{zIndex:5e3,children:[c.jsx(kt.Target,{children:c.jsx(br,{variant:"default",size:30,children:c.jsx(FY,{size:16})})}),c.jsxs(kt.Dropdown,{children:[c.jsx(kt.Item,{color:"green",leftSection:c.jsx($A,{}),disabled:!i,onClick:()=>d(e),children:t.get("Edit")}),c.jsx(kt.Item,{color:e.active?"blue":"orange",leftSection:e.active?c.jsx($w,{}):c.jsx($k,{}),disabled:!i,hiddenFrom:"sm",onClick:()=>o(e),children:e.active?t.get("Disable"):t.get("Enable")}),e.type=="Folder"?c.jsx(Goe,{i18n:t,value:e,sharedContents:n,setSharedContents:r,canModify:i}):["FeedAudio","FeedImage","FeedVideo"].includes(e.type)&&c.jsx(qoe,{i18n:t,value:e,sharedContents:n,setSharedContents:r,canModify:i}),c.jsx(kt.Divider,{}),c.jsx(kt.Item,{color:"red",leftSection:c.jsx(WK,{}),disabled:!i,onClick:()=>u(e),children:t.get("Delete")})]})]})]})}function s5({i18n:t,value:e,sharedContents:n,setSharedContents:r,openEditModal:i,groups:s,canModify:o,usekey:u,isDragged:d,isSelected:f,isFirst:m,isLast:y,props:x}){return A.createElement(Ti,{py:"xs",shadow:"sm",withBorder:!0,...x,key:u},c.jsxs(ut,{justify:"space-between",children:[c.jsxs(ut,{justify:"flex-start",children:[o&&u!==void 0&&c.jsx(Foe,{isDragged:d,isSelected:f,isFirst:m,isLast:y}),c.jsx(Hoe,{i18n:t,value:e,groups:s})]}),c.jsx(ut,{justify:"flex-end",children:c.jsx(Woe,{i18n:t,value:e,sharedContents:n,setSharedContents:r,openEditModal:i,canModify:o})})]}))}function Xoe({i18n:t,sharedContents:e,setSharedContents:n,openEditModal:r,groups:i,canModify:s}){const o=(u,d)=>{let f=Yr.cloneDeep(e);f=G6(f,u,d),n(f)};return s&&e.length>1?c.jsx(W6,{lockVertically:!0,values:e,onChange:({oldIndex:u,newIndex:d})=>{s&&o(u,d)},renderList:({children:u,props:d})=>c.jsx(tn,{gap:"xs",...d,children:u}),renderItem:({value:u,props:d,isDragged:f,isSelected:m})=>{d.style=d.style?{...d.style,zIndex:m?5e3:"auto"}:{};const y="shared"+d.key?.toString();d.key=void 0;const x=e.indexOf(u)===0,b=e.indexOf(u)===e.length-1;return c.jsx(s5,{i18n:t,value:u,sharedContents:e,setSharedContents:n,openEditModal:r,groups:i,canModify:s,usekey:y,isDragged:f,isSelected:m,isFirst:x,isLast:b,props:d})}}):c.jsx(tn,{gap:"xs",children:e.map((u,d)=>c.jsx(s5,{i18n:t,value:u,sharedContents:e,setSharedContents:n,openEditModal:r,groups:i,canModify:s},d))})}function Yoe({i18n:t,openEditModal:e}){return c.jsx(at,{leftSection:c.jsx(yK,{}),variant:"outline",onClick:()=>{e(-1)},children:t.get("AddNewSharedContent")})}function Koe({i18n:t,scan:e,sharedContents:n,canModify:r}){const[i,s]=A.useState(!1),o=n.find(f=>f.type.startsWith("Folder")),u=async()=>{s(!0);try{await uf("Server.ScanAllSharedFolders")}catch(f){console.error(f)}s(!1)},d=async()=>{s(!0);try{await uf("Server.ScanAllSharedFoldersCancel")}catch(f){console.error(f)}s(!1)};return o?c.jsxs(at,{disabled:!r||i,leftSection:c.jsx(HA,{}),variant:"outline",color:e?"red":"blue",onClick:()=>e?d():u(),children:[t.get(e?"CancelScanningSharedFolders":"ScanAllSharedFolders"),e&&c.jsx(NY,{})]}):void 0}function Qoe({i18n:t,canModify:e,scan:n,configuration:r,sharedContents:i,setSharedContents:s}){const[o,u]=A.useState(!1),d=ea(),f=x=>{const b=x>-1?i.at(x):null,w=!b,S=!w&&b.type==="Folder",D=!w&&b.type==="ITunes",k=!w&&b.type==="VirtualFolder",O=!w&&(b.type.endsWith("Feed")||b.type.endsWith("Stream")),N=w?"Folder":b.type,F=w||!b.groups?[]:b.groups.map(String),M=w||S||D?"":b.name,V=w||S||D?"":b.parent,$=O?b.uri:S?b.file:D?b.path:"",q=k&&b.childs?b.childs:[];d.setValues({index:x,type:N,groups:F,name:M,parent:V,source:$,childs:q})},m=x=>{f(x),u(!0)},y=async()=>{const x=Yr.cloneDeep(i),b={index:d.values.index,type:d.values.type,groups:d.values.groups,name:d.values.name,parent:d.values.parent,source:d.values.source,childs:d.values.childs},w=b.groups.map(Number);switch(b.type){case"Folder":b.index<0?x.push({type:b.type,active:!0,groups:w,file:b.source,monitored:!0,metadata:!0}):(x[b.index].groups=w,x[b.index].file=b.source);break;case"VirtualFolder":b.index<0?x.push({type:b.type,active:!0,groups:w,parent:b.parent,name:b.name,childs:b.childs,addToMediaLibrary:!0}):(x[b.index].groups=w,x[b.index].parent=b.parent,x[b.index].name=b.name,x[b.index].childs=b.childs);break;case"FeedAudio":case"FeedImage":case"FeedVideo":b.name=await X6(b.source),b.index<0?x.push({type:b.type,active:!0,groups:w,parent:b.parent,name:b.name,uri:b.source}):(x[b.index].groups=w,x[b.index].parent=b.parent,x[b.index].name=b.name,x[b.index].uri=b.source);break;case"StreamAudio":case"StreamVideo":b.index<0?x.push({type:b.type,active:!0,groups:w,parent:b.parent,name:b.name,uri:b.source}):(x[b.index].groups=w,x[b.index].parent=b.parent,x[b.index].name=b.name,x[b.index].uri=b.source);break;case"iTunes":b.index<0?x.push({type:b.type,active:!0,groups:w,path:b.source}):(x[b.index].groups=w,x[b.index].path=b.source);break;case"iPhoto":case"Aperture":b.index<0?x.push({type:b.type,active:!0,groups:w}):x[b.index].groups=w;break}s(x),u(!1),f(-1)};return A.useEffect(()=>{u(!1),f(-1)},[i]),A.useEffect(()=>{const x=Yr.merge([],r.shared_content);s(x)},[r]),c.jsxs(c.Fragment,{children:[c.jsxs(ut,{mb:"md",children:[c.jsx(Yoe,{i18n:t,openEditModal:m}),c.jsx(Koe,{i18n:t,scan:n,sharedContents:i,canModify:e})]}),c.jsx(Boe,{i18n:t,canModify:e,opened:o,setOpened:u,form:d,configuration:r,save:y}),c.jsx(Xoe,{i18n:t,sharedContents:i,setSharedContents:s,openEditModal:m,groups:r.groups,canModify:e})]})}function XD({i18n:t,session:e}){const[n,r]=A.useState(!0),[i,s]=A.useState(),[o,u]=A.useState(),[d,f]=A.useState(!1),m=e.havePermission(dn.settings_modify),y=m||e.havePermission(dn.settings_view);A.useEffect(()=>{e.subscribeTo("SharedContent"),e.stopPlayerSse(),e.setDocumentI18nTitle("SharedContent"),e.setNavbarManage(XD.name)},[]),A.useEffect(()=>{if(e.serverConfiguration===null)return;const b=Yr.cloneDeep(i);e.serverConfiguration.shared_content&&b!==void 0&&(b.shared_content=[]);const w=Yr.merge({},b,e.serverConfiguration);e.setServerConfiguration(null),s(w),u(w.shared_content)},[i,e.serverConfiguration]),A.useEffect(()=>{y&&Rt.get(J1).then(function(b){const w=b.data;s(w),u(w.shared_content)}).catch(function(b){!b.response&&b.request?t.showServerUnreachable():Wn({id:"data-loading",title:t.get("Error"),message:t.get("ConfigurationNotReceived"),message2:t.getReportLink()})}).then(function(){r(!1)})},[y]),A.useEffect(()=>{f(!Yr.isEqual(i?.shared_content,o))},[i,o]);const x=async()=>{r(!0);try{const b={};Yr.isEqual(i?.shared_content,o)||(b.shared_content=o),Yr.isEmpty(b)?e_({title:t.get("Saved"),message:t.get("ConfigurationHasNoChanges")}):(await Rt.post(J1,b),r(!1),e_({title:t.get("Saved"),message:t.get("ConfigurationSaved")}))}catch{Wn({title:t.get("Error"),message:t.get("ConfigurationNotSaved"),message2:t.getReportLink()})}r(!1)};return y?c.jsxs(Ee,{style:{maxWidth:1024},mx:"auto",children:[c.jsx(et,{size:"lg",mb:"md",children:t.get("SharedContent")}),o&&i&&c.jsx(Qoe,{i18n:t,canModify:m,scan:e.mediaScan,sharedContents:o,setSharedContents:u,configuration:i}),m&&d&&c.jsx(Ee,{h:50,children:c.jsx(SE,{withinPortal:!1,position:{bottom:20,right:20},children:c.jsx(at,{loading:n,onClick:()=>x(),children:t.get("Save")})})})]}):c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:c.jsx(et,{c:"red",children:t.get("YouDontHaveAccessArea")})})}function Zoe({i18n:t,session:e,from:n}){const r=u0();return c.jsxs(c.Fragment,{children:[!e.player&&e.havePermission(dn.settings_view)&&c.jsx(at,{color:"gray",variant:n===oD.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx(VA,{size:14}),onClick:()=>{r("/"),e.setNavbarOpened(!1)},children:t.get("Home")}),!e.player&&e.havePermission(dn.settings_view)&&c.jsx(at,{color:"gray",variant:n===XD.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx($w,{size:14}),onClick:()=>{r("/shared"),e.setNavbarOpened(!1)},children:t.get("SharedContent")}),!e.player&&e.havePermission(dn.server_restart|dn.computer_shutdown|dn.settings_modify)&&c.jsx(at,{color:"gray",variant:n===aD.name||n===lD.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx(JK,{size:14}),onClick:()=>{r("/actions"),e.setNavbarOpened(!1)},children:t.get("Tools")}),!e.player&&e.havePermission(dn.settings_view)&&c.jsx(at,{color:"gray",variant:n===WD.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx(pg,{size:14}),onClick:()=>{r("/settings"),e.setNavbarOpened(!1)},children:t.get("ServerSettings")}),!e.player&&c.jsx(at,{color:"gray",variant:n===sD.name?void 0:"subtle",size:"compact-md",leftSection:e.havePermission(dn.users_manage)?c.jsx(dN,{size:14}):c.jsx(xp,{size:14}),onClick:()=>{r("/accounts"),e.setNavbarOpened(!1)},children:e.havePermission(dn.users_manage)?t.get("ManageAccounts"):t.get("MyAccount")}),c.jsx(at,{color:"gray",variant:n===a_.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx(wX,{size:14}),onClick:()=>{r("/customize"),e.setNavbarOpened(!1)},children:t.get("Customize")}),c.jsx(at,{color:"gray",variant:n===t_.name?void 0:"subtle",size:"compact-md",leftSection:c.jsx(bY,{size:14}),onClick:()=>{r("/about"),e.setNavbarOpened(!1)},children:t.get("About")})]})}function Joe({i18n:t,session:e}){const n=({children:r})=>c.jsx(ya.Navbar,{p:"xs",bg:{xs:"default",sm:"transparentBg"},children:c.jsx(ya.Section,{grow:!0,my:"md",component:Ar,children:c.jsx(tn,{gap:0,children:r})})});return e.navbarManage?c.jsx(n,{children:c.jsx(Zoe,{i18n:t,session:e,from:e.navbarManage})}):e.navbarValue?c.jsx(n,{children:e.navbarValue}):void 0}function ele({session:t}){return t.statusLine?c.jsx(et,{children:t.statusLine}):void 0}function tle({i18n:t,session:e}){const n=u0();return e.account&&e.account.user&&!e.isLogout?e.authenticate?e.canSwitchUser||!e.isDefaultUser?c.jsxs(kt,{children:[c.jsx(kt.Target,{children:c.jsxs(ut,{gap:"xs",style:{cursor:"pointer"},children:[c.jsx(et,{truncate:"end",children:e.isDefaultUser?t.get("Localhost"):e.account.user.displayName}),e.isDefaultUser?c.jsx(_l,{variant:"outline",size:30,radius:"sm",children:c.jsx(zw,{size:16})}):c.jsx(_l,{variant:"outline",size:30,radius:"sm",src:e.account.user.avatar!==""?e.account.user.avatar:null,children:e.account.user.avatar===""&&c.jsx(xp,{size:16})})]})}),c.jsxs(kt.Dropdown,{children:[e.canSwitchUser&&c.jsx(kt.Item,{color:"blue",leftSection:c.jsx(PK,{size:14}),onClick:()=>{e.logout(!0),n("/")},children:t.get("SwitchUser")}),!e.isDefaultUser&&c.jsx(kt.Item,{color:"red",leftSection:c.jsx(LY,{size:14}),onClick:()=>{e.logout(!1),n("/")},children:t.get("LogOut")})]})]}):c.jsxs(ut,{gap:"xs",style:{cursor:"default"},children:[c.jsx(et,{truncate:"end",children:t.get("Localhost")}),c.jsx(_l,{variant:"outline",size:30,radius:"sm",children:c.jsx(zw,{size:16})})]}):c.jsxs(ut,{gap:"xs",style:{cursor:"default"},children:[c.jsx(et,{children:t.get("Anonymous")}),c.jsx(_l,{variant:"outline",size:30,radius:"sm",children:c.jsx(qK,{size:16})})]}):void 0}var cw={},$a={},dw={},a5;function Hu(){return a5||(a5=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isEventSourceSupported=t.isReactNative=t.ReadyState=t.DEFAULT_HEARTBEAT=t.UNPARSABLE_JSON_OBJECT=t.DEFAULT_RECONNECT_INTERVAL_MS=t.DEFAULT_RECONNECT_LIMIT=t.SOCKET_IO_PING_CODE=t.SOCKET_IO_PATH=t.SOCKET_IO_PING_INTERVAL=t.DEFAULT_EVENT_SOURCE_OPTIONS=t.EMPTY_EVENT_HANDLERS=t.DEFAULT_OPTIONS=void 0;var e=1,n=1e3*e;t.DEFAULT_OPTIONS={},t.EMPTY_EVENT_HANDLERS={},t.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:t.EMPTY_EVENT_HANDLERS},t.SOCKET_IO_PING_INTERVAL=25*n,t.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",t.SOCKET_IO_PING_CODE="2",t.DEFAULT_RECONNECT_LIMIT=20,t.DEFAULT_RECONNECT_INTERVAL_MS=5e3,t.UNPARSABLE_JSON_OBJECT={},t.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3};var r;(function(s){s[s.UNINSTANTIATED=-1]="UNINSTANTIATED",s[s.CONNECTING=0]="CONNECTING",s[s.OPEN=1]="OPEN",s[s.CLOSING=2]="CLOSING",s[s.CLOSED=3]="CLOSED"})(r||(t.ReadyState=r={}));var i=function(){try{return"EventSource"in globalThis}catch{return!1}};t.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",t.isEventSourceSupported=!t.isReactNative&&i()}(dw)),dw}var Jv={},fw={},o5;function YD(){return o5||(o5=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resetWebSockets=t.sharedWebSockets=void 0,t.sharedWebSockets={};var e=function(n){if(n&&t.sharedWebSockets.hasOwnProperty(n))delete t.sharedWebSockets[n];else for(var r in t.sharedWebSockets)t.sharedWebSockets.hasOwnProperty(r)&&delete t.sharedWebSockets[r]};t.resetWebSockets=e}(fw)),fw}var Oh={},Ic={},l5;function KD(){if(l5)return Ic;l5=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.setUpSocketIOPing=Ic.appendQueryParams=Ic.parseSocketIOUrl=void 0;var t=Hu(),e=function(i){if(i){var s=/^https|wss/.test(i),o=i.replace(/^(https?|wss?)(:\/\/)?/,""),u=o.replace(/\/$/,""),d=s?"wss":"ws";return"".concat(d,"://").concat(u).concat(t.SOCKET_IO_PATH)}else if(i===""){var s=/^https/.test(window.location.protocol),d=s?"wss":"ws",f=window.location.port?":".concat(window.location.port):"";return"".concat(d,"://").concat(window.location.hostname).concat(f).concat(t.SOCKET_IO_PATH)}return i};Ic.parseSocketIOUrl=e;var n=function(i,s){s===void 0&&(s={});var o=/\?([\w]+=[\w]+)/,u=o.test(i),d="".concat(Object.entries(s).reduce(function(f,m){var y=m[0],x=m[1];return f+"".concat(y,"=").concat(x,"&")},"").slice(0,-1));return"".concat(i).concat(u?"&":"?").concat(d)};Ic.appendQueryParams=n;var r=function(i,s){s===void 0&&(s=t.SOCKET_IO_PING_INTERVAL);var o=function(){return i(t.SOCKET_IO_PING_CODE)};return window.setInterval(o,s)};return Ic.setUpSocketIOPing=r,Ic}var g1={},u5;function Y6(){if(u5)return g1;u5=1,Object.defineProperty(g1,"__esModule",{value:!0}),g1.heartbeat=n;var t=Hu();function e(r){return Array.isArray(r)?r.reduce(function(i,s){return i.current>s.current?i:s}).current:r.current}function n(r,i,s){var o=s||{},u=o.interval,d=u===void 0?t.DEFAULT_HEARTBEAT.interval:u,f=o.timeout,m=f===void 0?t.DEFAULT_HEARTBEAT.timeout:f,y=o.message,x=y===void 0?t.DEFAULT_HEARTBEAT.message:y,b=Math.max(100,d/10),w=Date.now(),S=setInterval(function(){var D=Date.now(),k=e(i);if(k+m<=D)console.warn("Heartbeat timed out, closing connection, last message received ".concat(D-k,"ms ago, last ping sent ").concat(D-w,"ms ago")),r.close();else if(k+d<=D&&w+d<=D)try{typeof x=="function"?r.send(x()):r.send(x),w=D}catch(O){console.error("Heartbeat failed, closing connection",O instanceof Error?O.message:O),r.close()}},b);return r.addEventListener("close",function(){clearInterval(S)}),function(){}}return g1}var ey={},hw={},c5;function QD(){return c5||(c5=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resetSubscribers=t.removeSubscriber=t.addSubscriber=t.hasSubscribers=t.getSubscribers=void 0;var e={},n=[],r=function(d){return(0,t.hasSubscribers)(d)?Array.from(e[d]):n};t.getSubscribers=r;var i=function(d){var f;return((f=e[d])===null||f===void 0?void 0:f.size)>0};t.hasSubscribers=i;var s=function(d,f){e[d]=e[d]||new Set,e[d].add(f)};t.addSubscriber=s;var o=function(d,f){e[d].delete(f)};t.removeSubscriber=o;var u=function(d){if(d&&e.hasOwnProperty(d))delete e[d];else for(var f in e)e.hasOwnProperty(f)&&delete e[f]};t.resetSubscribers=u}(hw)),hw}var d5;function ZD(){if(d5)return ey;d5=1,Object.defineProperty(ey,"__esModule",{value:!0}),ey.assertIsWebSocket=n,ey.resetGlobalState=r;var t=YD(),e=QD();function n(i,s){if(!s&&!(i instanceof WebSocket))throw new Error("")}function r(i){(0,e.resetSubscribers)(i),(0,t.resetWebSockets)(i)}return ey}var f5;function nle(){if(f5)return Oh;f5=1;var t=Oh&&Oh.__assign||function(){return t=Object.assign||function(m){for(var y,x=1,b=arguments.length;x<b;x++){y=arguments[x];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(m[w]=y[w])}return m},t.apply(this,arguments)};Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.attachListeners=void 0;var e=KD(),n=Y6(),r=Hu(),i=ZD(),s=function(m,y,x,b){m.onmessage=function(w){var S;y.current.onMessage&&y.current.onMessage(w),typeof b?.current=="number"&&(b.current=Date.now()),!(typeof y.current.filter=="function"&&y.current.filter(w)!==!0)&&(y.current.heartbeat&&typeof y.current.heartbeat!="boolean"&&((S=y.current.heartbeat)===null||S===void 0?void 0:S.returnMessage)===w.data||x(w))}},o=function(m,y,x,b,w){m.onopen=function(S){if(y.current.onOpen&&y.current.onOpen(S),b.current=0,x(r.ReadyState.OPEN),y.current.heartbeat&&m instanceof WebSocket){var D=typeof y.current.heartbeat=="boolean"?void 0:y.current.heartbeat;w.current=Date.now(),(0,n.heartbeat)(m,w,D)}}},u=function(m,y,x,b,w){if(r.isEventSourceSupported&&m instanceof EventSource)return function(){};(0,i.assertIsWebSocket)(m,y.current.skipAssert);var S;return m.onclose=function(D){var k;if(y.current.onClose&&y.current.onClose(D),x(r.ReadyState.CLOSED),y.current.shouldReconnect&&y.current.shouldReconnect(D)){var O=(k=y.current.reconnectAttempts)!==null&&k!==void 0?k:r.DEFAULT_RECONNECT_LIMIT;if(w.current<O){var N=typeof y.current.reconnectInterval=="function"?y.current.reconnectInterval(w.current):y.current.reconnectInterval;S=window.setTimeout(function(){w.current++,b()},N??r.DEFAULT_RECONNECT_INTERVAL_MS)}else y.current.onReconnectStop&&y.current.onReconnectStop(O),console.warn("Max reconnect attempts of ".concat(O," exceeded"))}},function(){return S&&window.clearTimeout(S)}},d=function(m,y,x,b,w){var S;return m.onerror=function(D){var k;if(y.current.onError&&y.current.onError(D),r.isEventSourceSupported&&m instanceof EventSource&&(y.current.onClose&&y.current.onClose(t(t({},D),{code:1006,reason:"An error occurred with the EventSource: ".concat(D),wasClean:!1})),x(r.ReadyState.CLOSED),m.close()),y.current.retryOnError)if(w.current<((k=y.current.reconnectAttempts)!==null&&k!==void 0?k:r.DEFAULT_RECONNECT_LIMIT)){var O=typeof y.current.reconnectInterval=="function"?y.current.reconnectInterval(w.current):y.current.reconnectInterval;S=window.setTimeout(function(){w.current++,b()},O??r.DEFAULT_RECONNECT_INTERVAL_MS)}else y.current.onReconnectStop&&y.current.onReconnectStop(y.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(y.current.reconnectAttempts," exceeded"))},function(){return S&&window.clearTimeout(S)}},f=function(m,y,x,b,w,S,D){var k=y.setLastMessage,O=y.setReadyState,N,F,M;return x.current.fromSocketIO&&(N=(0,e.setUpSocketIOPing)(D)),s(m,x,k,S),o(m,x,O,w,S),F=u(m,x,O,b,w),M=d(m,x,O,b,w),function(){O(r.ReadyState.CLOSING),F(),M(),m.close(),N&&clearInterval(N)}};return Oh.attachListeners=f,Oh}var Nh={},h5;function rle(){if(h5)return Nh;h5=1;var t=Nh&&Nh.__assign||function(){return t=Object.assign||function(y){for(var x,b=1,w=arguments.length;b<w;b++){x=arguments[b];for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(y[S]=x[S])}return y},t.apply(this,arguments)};Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.attachSharedListeners=void 0;var e=YD(),n=Hu(),r=QD(),i=KD(),s=Y6(),o=function(y,x,b){y.onmessage=function(w){(0,r.getSubscribers)(x).forEach(function(S){var D;S.optionsRef.current.onMessage&&S.optionsRef.current.onMessage(w),typeof((D=S?.lastMessageTime)===null||D===void 0?void 0:D.current)=="number"&&(S.lastMessageTime.current=Date.now()),!(typeof S.optionsRef.current.filter=="function"&&S.optionsRef.current.filter(w)!==!0)&&(b&&typeof b!="boolean"&&b?.returnMessage===w.data||S.setLastMessage(w))})}},u=function(y,x,b){y.onopen=function(w){var S=(0,r.getSubscribers)(x);S.forEach(function(D){D.reconnectCount.current=0,D.optionsRef.current.onOpen&&D.optionsRef.current.onOpen(w),D.setReadyState(n.ReadyState.OPEN),b&&y instanceof WebSocket&&(D.lastMessageTime.current=Date.now())}),b&&y instanceof WebSocket&&(0,s.heartbeat)(y,S.map(function(D){return D.lastMessageTime}),typeof b=="boolean"?void 0:b)}},d=function(y,x){y instanceof WebSocket&&(y.onclose=function(b){(0,r.getSubscribers)(x).forEach(function(w){w.optionsRef.current.onClose&&w.optionsRef.current.onClose(b),w.setReadyState(n.ReadyState.CLOSED)}),delete e.sharedWebSockets[x],(0,r.getSubscribers)(x).forEach(function(w){var S;if(w.optionsRef.current.shouldReconnect&&w.optionsRef.current.shouldReconnect(b)){var D=(S=w.optionsRef.current.reconnectAttempts)!==null&&S!==void 0?S:n.DEFAULT_RECONNECT_LIMIT;if(w.reconnectCount.current<D){var k=typeof w.optionsRef.current.reconnectInterval=="function"?w.optionsRef.current.reconnectInterval(w.reconnectCount.current):w.optionsRef.current.reconnectInterval;setTimeout(function(){w.reconnectCount.current++,w.reconnect.current()},k??n.DEFAULT_RECONNECT_INTERVAL_MS)}else w.optionsRef.current.onReconnectStop&&w.optionsRef.current.onReconnectStop(w.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(D," exceeded"))}})})},f=function(y,x){y.onerror=function(b){(0,r.getSubscribers)(x).forEach(function(w){w.optionsRef.current.onError&&w.optionsRef.current.onError(b),n.isEventSourceSupported&&y instanceof EventSource&&(w.optionsRef.current.onClose&&w.optionsRef.current.onClose(t(t({},b),{code:1006,reason:"An error occurred with the EventSource: ".concat(b),wasClean:!1})),w.setReadyState(n.ReadyState.CLOSED))}),n.isEventSourceSupported&&y instanceof EventSource&&y.close()}},m=function(y,x,b,w){var S;return b.current.fromSocketIO&&(S=(0,i.setUpSocketIOPing)(w)),o(y,x,b.current.heartbeat),d(y,x),u(y,x,b.current.heartbeat),f(y,x),function(){S&&clearInterval(S)}};return Nh.attachSharedListeners=m,Nh}var p5;function ile(){if(p5)return Jv;p5=1,Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.createOrJoinSocket=void 0;var t=YD(),e=Hu(),n=nle(),r=rle(),i=QD(),s=function(u,d,f,m,y){return function(){if((0,i.removeSubscriber)(u,d),!(0,i.hasSubscribers)(u)){try{var x=t.sharedWebSockets[u];x instanceof WebSocket&&(x.onclose=function(b){f.current.onClose&&f.current.onClose(b),m(e.ReadyState.CLOSED)}),x.close()}catch{}y&&y(),delete t.sharedWebSockets[u]}}},o=function(u,d,f,m,y,x,b,w,S){if(!e.isEventSourceSupported&&m.current.eventSourceOptions)throw e.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(m.current.share){var D=null;t.sharedWebSockets[d]===void 0?(t.sharedWebSockets[d]=m.current.eventSourceOptions?new EventSource(d,m.current.eventSourceOptions):new WebSocket(d,m.current.protocols),u.current=t.sharedWebSockets[d],f(e.ReadyState.CONNECTING),D=(0,r.attachSharedListeners)(t.sharedWebSockets[d],d,m,S)):(u.current=t.sharedWebSockets[d],f(t.sharedWebSockets[d].readyState));var k={setLastMessage:y,setReadyState:f,optionsRef:m,reconnectCount:b,lastMessageTime:w,reconnect:x};return(0,i.addSubscriber)(d,k),s(d,k,m,f,D)}else{if(u.current=m.current.eventSourceOptions?new EventSource(d,m.current.eventSourceOptions):new WebSocket(d,m.current.protocols),f(e.ReadyState.CONNECTING),!u.current)throw new Error("WebSocket failed to be created");return(0,n.attachListeners)(u.current,{setLastMessage:y,setReadyState:f},m,x.current,b,w,S)}};return Jv.createOrJoinSocket=o,Jv}var Oc={},m5;function sle(){return m5||(m5=1,function(t){var e=Oc&&Oc.__awaiter||function(d,f,m,y){function x(b){return b instanceof m?b:new m(function(w){w(b)})}return new(m||(m=Promise))(function(b,w){function S(O){try{k(y.next(O))}catch(N){w(N)}}function D(O){try{k(y.throw(O))}catch(N){w(N)}}function k(O){O.done?b(O.value):x(O.value).then(S,D)}k((y=y.apply(d,f||[])).next())})},n=Oc&&Oc.__generator||function(d,f){var m={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},y,x,b,w=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return w.next=S(0),w.throw=S(1),w.return=S(2),typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function S(k){return function(O){return D([k,O])}}function D(k){if(y)throw new TypeError("Generator is already executing.");for(;w&&(w=0,k[0]&&(m=0)),m;)try{if(y=1,x&&(b=k[0]&2?x.return:k[0]?x.throw||((b=x.return)&&b.call(x),0):x.next)&&!(b=b.call(x,k[1])).done)return b;switch(x=0,b&&(k=[k[0]&2,b.value]),k[0]){case 0:case 1:b=k;break;case 4:return m.label++,{value:k[1],done:!1};case 5:m.label++,x=k[1],k=[0];continue;case 7:k=m.ops.pop(),m.trys.pop();continue;default:if(b=m.trys,!(b=b.length>0&&b[b.length-1])&&(k[0]===6||k[0]===2)){m=0;continue}if(k[0]===3&&(!b||k[1]>b[0]&&k[1]<b[3])){m.label=k[1];break}if(k[0]===6&&m.label<b[1]){m.label=b[1],b=k;break}if(b&&m.label<b[2]){m.label=b[2],m.ops.push(k);break}b[2]&&m.ops.pop(),m.trys.pop();continue}k=f.call(d,m)}catch(O){k=[6,O],x=0}finally{y=b=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}},r=Oc&&Oc.__spreadArray||function(d,f,m){if(m||arguments.length===2)for(var y=0,x=f.length,b;y<x;y++)(b||!(y in f))&&(b||(b=Array.prototype.slice.call(f,0,y)),b[y]=f[y]);return d.concat(b||Array.prototype.slice.call(f))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=void 0;var i=KD(),s=Hu(),o=function(d){return new Promise(function(f){return window.setTimeout(f,d)})},u=function(d,f){for(var m=[],y=2;y<arguments.length;y++)m[y-2]=arguments[y];return e(void 0,r([d,f],m,!0),void 0,function(x,b,w){var S,D,k,O,N,F,M,V;return w===void 0&&(w=0),n(this,function($){switch($.label){case 0:if(typeof x!="function")return[3,10];$.label=1;case 1:return $.trys.push([1,3,,9]),[4,x()];case 2:return S=$.sent(),[3,9];case 3:return $.sent(),b.current.retryOnError?(D=(F=b.current.reconnectAttempts)!==null&&F!==void 0?F:s.DEFAULT_RECONNECT_LIMIT,w<D?(k=typeof b.current.reconnectInterval=="function"?b.current.reconnectInterval(w):b.current.reconnectInterval,[4,o(k??s.DEFAULT_RECONNECT_INTERVAL_MS)]):[3,5]):[3,7];case 4:return $.sent(),[2,(0,t.getUrl)(x,b,w+1)];case 5:return(V=(M=b.current).onReconnectStop)===null||V===void 0||V.call(M,w),[2,null];case 6:return[3,8];case 7:return[2,null];case 8:return[3,9];case 9:return[3,11];case 10:S=x,$.label=11;case 11:return O=b.current.fromSocketIO?(0,i.parseSocketIOUrl)(S):S,N=b.current.queryParams?(0,i.appendQueryParams)(O,b.current.queryParams):O,[2,N]}})})};t.getUrl=u}(Oc)),Oc}var pw={},g5;function ale(){return g5||(g5=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.websocketWrapper=void 0;var e=function(n,r){return new Proxy(n,{get:function(i,s){var o=i[s];return s==="reconnect"?r:typeof o=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):o},set:function(i,s,o){return/^on/.test(s)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(i[s]=o,!0)}})};t.websocketWrapper=e,t.default=t.websocketWrapper}(pw)),pw}var v5;function JD(){if(v5)return $a;v5=1;var t=$a&&$a.__assign||function(){return t=Object.assign||function(x){for(var b,w=1,S=arguments.length;w<S;w++){b=arguments[w];for(var D in b)Object.prototype.hasOwnProperty.call(b,D)&&(x[D]=b[D])}return x},t.apply(this,arguments)},e=$a&&$a.__awaiter||function(x,b,w,S){function D(k){return k instanceof w?k:new w(function(O){O(k)})}return new(w||(w=Promise))(function(k,O){function N(V){try{M(S.next(V))}catch($){O($)}}function F(V){try{M(S.throw(V))}catch($){O($)}}function M(V){V.done?k(V.value):D(V.value).then(N,F)}M((S=S.apply(x,b||[])).next())})},n=$a&&$a.__generator||function(x,b){var w={label:0,sent:function(){if(k[0]&1)throw k[1];return k[1]},trys:[],ops:[]},S,D,k,O=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return O.next=N(0),O.throw=N(1),O.return=N(2),typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function N(M){return function(V){return F([M,V])}}function F(M){if(S)throw new TypeError("Generator is already executing.");for(;O&&(O=0,M[0]&&(w=0)),w;)try{if(S=1,D&&(k=M[0]&2?D.return:M[0]?D.throw||((k=D.return)&&k.call(D),0):D.next)&&!(k=k.call(D,M[1])).done)return k;switch(D=0,k&&(M=[M[0]&2,k.value]),M[0]){case 0:case 1:k=M;break;case 4:return w.label++,{value:M[1],done:!1};case 5:w.label++,D=M[1],M=[0];continue;case 7:M=w.ops.pop(),w.trys.pop();continue;default:if(k=w.trys,!(k=k.length>0&&k[k.length-1])&&(M[0]===6||M[0]===2)){w=0;continue}if(M[0]===3&&(!k||M[1]>k[0]&&M[1]<k[3])){w.label=M[1];break}if(M[0]===6&&w.label<k[1]){w.label=k[1],k=M;break}if(k&&w.label<k[2]){w.label=k[2],w.ops.push(M);break}k[2]&&w.ops.pop(),w.trys.pop();continue}M=b.call(x,w)}catch(V){M=[6,V],D=0}finally{S=k=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}},r=$a&&$a.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty($a,"__esModule",{value:!0}),$a.useWebSocket=void 0;var i=Hg(),s=PC(),o=Hu(),u=ile(),d=sle(),f=r(ale()),m=ZD(),y=function(x,b,w){b===void 0&&(b=o.DEFAULT_OPTIONS),w===void 0&&(w=!0);var S=(0,i.useState)(null),D=S[0],k=S[1],O=(0,i.useState)({}),N=O[0],F=O[1],M=(0,i.useMemo)(function(){if(!b.disableJson&&D)try{return JSON.parse(D.data)}catch{return o.UNPARSABLE_JSON_OBJECT}return null},[D,b.disableJson]),V=(0,i.useRef)(null),$=(0,i.useRef)(null),q=(0,i.useRef)(function(){}),B=(0,i.useRef)(0),z=(0,i.useRef)(Date.now()),ee=(0,i.useRef)([]),Y=(0,i.useRef)(null),Q=(0,i.useRef)(b);Q.current=b;var oe=V.current&&N[V.current]!==void 0?N[V.current]:x!==null&&w===!0?o.ReadyState.CONNECTING:o.ReadyState.UNINSTANTIATED,ue=b.queryParams?JSON.stringify(b.queryParams):null,H=(0,i.useCallback)(function(ie,G){var X;if(G===void 0&&(G=!0),o.isEventSourceSupported&&$.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}((X=$.current)===null||X===void 0?void 0:X.readyState)===o.ReadyState.OPEN?((0,m.assertIsWebSocket)($.current,Q.current.skipAssert),$.current.send(ie)):G&&ee.current.push(ie)},[]),te=(0,i.useCallback)(function(ie,G){G===void 0&&(G=!0),H(JSON.stringify(ie),G)},[H]),Z=(0,i.useCallback)(function(){return Q.current.share!==!0||o.isEventSourceSupported&&$.current instanceof EventSource?$.current:(Y.current===null&&$.current&&((0,m.assertIsWebSocket)($.current,Q.current.skipAssert),Y.current=(0,f.default)($.current,q)),Y.current)},[]);return(0,i.useEffect)(function(){if(x!==null&&w===!0){var ie,G=!1,X=!0,fe=function(){return e(void 0,void 0,void 0,function(){var be,we,pe;return n(this,function(Ce){switch(Ce.label){case 0:return be=V,[4,(0,d.getUrl)(x,Q)];case 1:return be.current=Ce.sent(),V.current===null?(console.error("Failed to get a valid URL. WebSocket connection aborted."),V.current="ABORTED",(0,s.flushSync)(function(){return F(function(Ke){return t(t({},Ke),{ABORTED:o.ReadyState.CLOSED})})}),[2]):(we=function(Ke){G||(0,s.flushSync)(function(){return k(Ke)})},pe=function(Ke){G||(0,s.flushSync)(function(){return F(function(Me){var lt;return t(t({},Me),V.current&&(lt={},lt[V.current]=Ke,lt))})})},X&&(ie=(0,u.createOrJoinSocket)($,V.current,pe,Q,we,q,B,z,H)),[2])}})})};return q.current=function(){G||(Y.current&&(Y.current=null),ie?.(),fe())},fe(),function(){G=!0,X=!1,Y.current&&(Y.current=null),ie?.(),k(null)}}else(x===null||w===!1)&&(B.current=0,F(function(be){var we;return t(t({},be),V.current&&(we={},we[V.current]=o.ReadyState.CLOSED,we))}))},[x,w,ue,H]),(0,i.useEffect)(function(){oe===o.ReadyState.OPEN&&ee.current.splice(0).forEach(function(ie){H(ie)})},[oe]),{sendMessage:H,sendJsonMessage:te,lastMessage:D,lastJsonMessage:M,readyState:oe,getWebSocket:Z}};return $a.useWebSocket=y,$a}var Mh={},y5;function ole(){if(y5)return Mh;y5=1;var t=Mh&&Mh.__assign||function(){return t=Object.assign||function(u){for(var d,f=1,m=arguments.length;f<m;f++){d=arguments[f];for(var y in d)Object.prototype.hasOwnProperty.call(d,y)&&(u[y]=d[y])}return u},t.apply(this,arguments)};Object.defineProperty(Mh,"__esModule",{value:!0}),Mh.useSocketIO=void 0;var e=Hg(),n=JD(),r=Hu(),i={type:"empty",payload:null},s=function(u){if(!u||!u.data)return i;var d=u.data.match(/\[.*]/);if(!d)return i;var f=JSON.parse(d);return!Array.isArray(f)||!f[1]?i:{type:f[0],payload:f[1]}},o=function(u,d,f){d===void 0&&(d=r.DEFAULT_OPTIONS),f===void 0&&(f=!0);var m=(0,e.useMemo)(function(){return t(t({},d),{fromSocketIO:!0})},[]),y=(0,n.useWebSocket)(u,m,f),x=y.sendMessage,b=y.sendJsonMessage,w=y.lastMessage,S=y.readyState,D=y.getWebSocket,k=(0,e.useMemo)(function(){return s(w)},[w]);return{sendMessage:x,sendJsonMessage:b,lastMessage:k,lastJsonMessage:k,readyState:S,getWebSocket:D}};return Mh.useSocketIO=o,Mh}var Nc={},b5;function lle(){if(b5)return Nc;b5=1;var t=Nc&&Nc.__assign||function(){return t=Object.assign||function(o){for(var u,d=1,f=arguments.length;d<f;d++){u=arguments[d];for(var m in u)Object.prototype.hasOwnProperty.call(u,m)&&(o[m]=u[m])}return o},t.apply(this,arguments)},e=Nc&&Nc.__rest||function(o,u){var d={};for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&u.indexOf(f)<0&&(d[f]=o[f]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,f=Object.getOwnPropertySymbols(o);m<f.length;m++)u.indexOf(f[m])<0&&Object.prototype.propertyIsEnumerable.call(o,f[m])&&(d[f[m]]=o[f[m]]);return d};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.useEventSource=void 0;var n=Hg(),r=JD(),i=Hu(),s=function(o,u,d){u===void 0&&(u=i.DEFAULT_EVENT_SOURCE_OPTIONS);var f=u.withCredentials,m=u.events,y=e(u,["withCredentials","events"]);d===void 0&&(d=!0);var x=t(t({},y),{eventSourceOptions:{withCredentials:f}}),b=(0,n.useRef)(i.EMPTY_EVENT_HANDLERS);m&&(b.current=m);var w=(0,r.useWebSocket)(o,x,d),S=w.lastMessage,D=w.readyState,k=w.getWebSocket;return(0,n.useEffect)(function(){S?.type&&Object.entries(b.current).forEach(function(O){var N=O[0],F=O[1];N===S.type&&F(S)})},[S]),{lastEvent:S,readyState:D,getEventSource:k}};return Nc.useEventSource=s,Nc}var x5;function ule(){return x5||(x5=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resetGlobalState=t.useEventSource=t.ReadyState=t.useSocketIO=t.default=void 0;var e=JD();Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.useWebSocket}});var n=ole();Object.defineProperty(t,"useSocketIO",{enumerable:!0,get:function(){return n.useSocketIO}});var r=Hu();Object.defineProperty(t,"ReadyState",{enumerable:!0,get:function(){return r.ReadyState}});var i=lle();Object.defineProperty(t,"useEventSource",{enumerable:!0,get:function(){return i.useEventSource}});var s=ZD();Object.defineProperty(t,"resetGlobalState",{enumerable:!0,get:function(){return s.resetGlobalState}})}(cw)),cw}var cle=ule();const dle=ko(cle),fle=({i18n:t,session:e,player:n})=>{const{lastJsonMessage:r,readyState:i,sendJsonMessage:s}=dle(tJ,{heartbeat:!0,share:!0,shouldReconnect:()=>!0,reconnectAttempts:Number.MAX_SAFE_INTEGER}),o=u=>{OA({id:u.id?u.id:"sse-notification",color:u.color,title:u.title,message:u.message?t.getString(u.message):"",autoClose:u.autoClose!==void 0?u.autoClose:!0})};A.useEffect(()=>{console.log("WebSocket connection state changed "+i),t.setServerReadyState(i),i==1&&(e.setSendJsonMessage(s),s({action:"token",data:e.token}),s({action:"subscribe",data:e.subscribe}),s({action:"uuid",data:e.uuid}))},[t.setServerReadyState,i]),A.useEffect(()=>{if(r==null)return;const u=r;if(u.action!==void 0)switch(u.action){case"log_line":e.addLogLine(u.data);break;case"notify":o(u.data);break;case"refresh_session":e.refresh();break;case"renderer_add":case"renderer_delete":case"renderer_update":e.addRendererAction(r);break;case"player":n.onRemoteAction(u.data);break;case"set_configuration_changed":if(u.data){const d=u.data;e.setServerConfiguration(d)}break;case"set_media_scan_status":e.setMediaScan(u.data);break;case"set_reloadable":e.setReloadable(u.data);break;case"set_status_line":e.setStatusLine(u.data);break;case"update_accounts":e.setUpdateAccounts(!0);break;case"update_memory":e.setMemory(u.data);break}},[r]),A.useEffect(()=>{s({action:"subscribe",data:e.subscribe})},[e.subscribe]),A.useEffect(()=>{s({action:"token",data:e.token})},[e.token]),A.useEffect(()=>{s({action:"uuid",data:e.uuid})},[e.uuid])};function hle({i18n:t}){return c.jsx(br,{variant:"default","aria-label":t.get("OpensTheKnowledgeBase"),onClick:()=>window.open("https://support.universalmediaserver.com","_blank"),size:"input-xs",children:c.jsx(gY,{size:16})})}function ple({i18n:t,session:e,player:n}){const{dir:r}=Xa(),[i]=So({key:"mantine-navbar-width-sm",defaultValue:250}),[s]=So({key:"mantine-navbar-width-md",defaultValue:300}),[o]=So({key:"mantine-navbar-width-lg",defaultValue:400});return c.jsxs("div",{dir:r,className:"bodyBackgroundImageScreen",children:[c.jsx(fle,{i18n:t,session:e,player:n}),c.jsxs(ya,{padding:"md",navbar:e.hasNavbar?{width:{sm:i,md:s,lg:o},breakpoint:"sm",collapsed:{mobile:!e.navbarOpened,desktop:!1}}:void 0,header:{height:60},footer:e.statusLine?{height:30}:void 0,bg:"transparentBg",children:[c.jsx(Joe,{i18n:t,session:e}),c.jsx(ya.Header,{p:"xs",bg:"transparentBg",children:c.jsxs(ut,{grow:!0,preventGrowOverflow:!1,gap:"xs",children:[c.jsxs(ut,{justify:"flex-start",gap:"xs",children:[e.hasNavbar&&c.jsx(GE,{hiddenFrom:"sm",opened:e.navbarOpened,onClick:()=>e.setNavbarOpened(!e.navbarOpened),size:"sm"}),c.jsx(Jee,{i18n:t,session:e}),c.jsx(Fee,{i18n:t}),c.jsx(qee,{i18n:t}),c.jsx(hle,{i18n:t})]}),c.jsx(ut,{justify:"flex-end",children:c.jsx(tle,{i18n:t,session:e})})]})}),c.jsx(ya.Main,{children:e.initialized&&e.player?!e.authenticate||e.account&&!e.isLogout?c.jsxs(Bk,{children:[c.jsx(Ui,{path:"about",element:c.jsx(t_,{i18n:t,session:e})}),c.jsx(Ui,{path:"customize",element:c.jsx(a_,{i18n:t,session:e})}),c.jsx(Ui,{path:"player",element:c.jsx(ng,{i18n:t,session:e,player:n})}),c.jsx(Ui,{path:"player/:req/:id",element:c.jsx(ng,{i18n:t,session:e,player:n})}),c.jsx(Ui,{index:!0,element:c.jsx(ng,{i18n:t,session:e,player:n})})]}):c.jsx(T4,{i18n:t,session:e}):e.account&&!e.isLogout?c.jsxs(Bk,{children:[c.jsx(Ui,{path:"about",element:c.jsx(t_,{i18n:t,session:e})}),c.jsx(Ui,{path:"accounts",element:c.jsx(sD,{i18n:t,session:e})}),c.jsx(Ui,{path:"actions",element:c.jsx(aD,{i18n:t,session:e})}),c.jsx(Ui,{path:"customize",element:c.jsx(a_,{i18n:t,session:e})}),c.jsx(Ui,{path:"logs",element:c.jsx(lD,{i18n:t,session:e})}),c.jsx(Ui,{path:"player",element:c.jsx(ng,{i18n:t,session:e,player:n})}),c.jsx(Ui,{path:"player/:req/:id",element:c.jsx(ng,{i18n:t,session:e,player:n})}),c.jsx(Ui,{path:"settings",element:c.jsx(WD,{i18n:t,session:e})}),c.jsx(Ui,{path:"shared",element:c.jsx(XD,{i18n:t,session:e})}),e.havePermission(dn.settings_view)?c.jsx(Ui,{index:!0,element:c.jsx(oD,{i18n:t,session:e})}):c.jsx(Ui,{index:!0,element:c.jsx(ng,{i18n:t,session:e,player:n})}),c.jsx(Ui,{path:"/*",element:c.jsx(aW,{replace:!0,to:"/"})})]}):e.initialized?c.jsx(T4,{i18n:t,session:e}):c.jsx(by,{children:c.jsx(Ee,{style:{maxWidth:1024},mx:"auto",children:t.serverReadyState===0?c.jsxs(ut,{style:{marginTop:"150px"},children:[c.jsx(ju,{type:"dots"}),c.jsx(BK,{size:"4rem"}),c.jsx(ju,{type:"dots"})]}):t.serverReadyState===3?c.jsx(ut,{style:{marginTop:"150px"},children:c.jsx(cN,{size:"4rem"})}):c.jsx(ju,{size:"xl",type:"dots",style:{marginTop:"150px"}})})})}),c.jsx(ya.Footer,{children:c.jsx(ele,{session:e})})]})]})}const K6=A.createContext({get:t=>t,getString:t=>t,getFormat:t=>t.length?t[0]:"",getValueLabelData:t=>t,getLocalizedName:t=>t||"",language:"en-US",dir:"ltr",languages:[],setLanguage:t=>{},getReportLink:()=>{},showServerUnreachable:()=>{},languageLoaded:!1,serverConnected:!1,serverReadyState:-1,setServerReadyState:t=>{}}),Q6=A.createContext({uuid:"",reqId:"0",reqType:"browse",askReqId:(t,e)=>{},askBrowseId:t=>{},askPlayId:t=>{},askShowId:t=>{},onRemoteAction:t=>{}}),Z6=A.createContext({initialized:!1,noAdminFound:!1,account:void 0,authenticate:!1,player:!1,users:void 0,localUsers:[],isDefaultUser:!1,canSwitchUser:!1,havePermission:t=>!1,refresh:()=>{},token:"",setToken:t=>{},login:async(t,e)=>{},loginPin:async(t,e)=>{},logout:async t=>{},isLogout:!1,resetLogout:()=>{},removeLocalUser:t=>{},lastUserId:0,subscribe:"",subscribeTo:t=>{},unsubscribe:()=>{},usePlayerSse:!1,startPlayerSse:()=>{},stopPlayerSse:()=>{},uuid:"",setUuid:t=>{},serverName:"Universal Media Server",setServerName:t=>{},setDocumentTitle:t=>{},setDocumentI18nTitle:t=>{},playerNavbar:!0,setPlayerNavbar:t=>{},playerDirectPlay:!1,setPlayerDirectPlay:t=>{},hasNavbar:!1,navbarOpened:!1,setNavbarOpened:t=>{},navbarValue:void 0,setNavbarValue:t=>{},navbarManage:"",setNavbarManage:t=>{},statusLine:"",setStatusLine:t=>{},serverConfiguration:null,setServerConfiguration:t=>{},addLogLine:t=>{},hasNewLogLine:!1,getNewLogLine:()=>{},addRendererAction:t=>{},hasRendererAction:!1,getRendererAction:()=>{},mediaScan:!1,setMediaScan:t=>{},reloadable:!1,setReloadable:t=>{},memory:{max:0,used:0,dbcache:0,buffer:0},setMemory:t=>{},updateAccounts:!1,setUpdateAccounts:t=>{},sendJsonMessage:(t,e)=>{},setSendJsonMessage:t=>{}}),mle=({children:t})=>{const{dir:e,setDirection:n}=Xa(),[r,i]=A.useState(!1),[s,o]=A.useState(!1),[u,d]=A.useState(-1),[f,m]=A.useState({AuthenticationError:"Authentication error",Error:"Error",LanguagesNotReceived:"Languages were not received from the server.",Warning:"Warning",UniversalMediaServerUnreachable:"Universal Media Server unreachable",YouHaveBeenLoggedOut:"You have been logged out from Universal Media Server."}),[y,x]=A.useState(),[b,w]=A.useState([]),[S,D]=So({key:"language",defaultValue:navigator.languages?navigator.languages[0]:navigator.language||"en-US"}),k=ee=>{i(!1),D(ee)},O=ee=>f[ee]?f[ee]:ee,N=ee=>ee&&ee.startsWith("i18n@")?O(ee.substring(5)):ee,F=ee=>{if(ee==null||ee.length<1)return"";let Y=N(ee[0]);for(let Q=1;Q<ee.length;Q++){const oe="%"+Q.toString()+"$s";Y.includes(oe)?Y=Y.replace(oe,N(ee[Q])):Y.includes("%s")&&(Y=Y.replace("%s",N(ee[Q])))}return Y},M=ee=>ee?.map(Y=>({value:Y.value,label:N(Y.label)})),V=ee=>{const Y=ee?ee.split("|"):[""];return Y.length>1?F(Y):N(Y[0])},$=async(ee,Y)=>{Rt.get(n4,{params:{language:ee,version:Y},responseType:"json"}).then(function(Q){Q.data&&(Lu("languages-error"),i(!0),w(Q.data.languages),m(Q.data.i18n),n(Q.data.isRtl?"rtl":"ltr"))}).catch(function(Q){!Q.response&&Q.request?z():Wn({id:"languages-error",title:f.Error,message:f.LanguagesNotReceived})})},q=ee=>{Rt.post(n4,{responseType:"json"}).then(function(Y){Y.data&&(Lu("languages-error"),x(Y.data.version),$(ee,Y.data.version))}).catch(function(Y){!Y.response&&Y.request?z():Wn({id:"languages-error",title:f.Error,message:f.LanguagesNotReceived})})},B=()=>c.jsx(jy,{fz:"xs",href:JZ,target:"_blank",children:O("ClickHereReportBug")}),z=()=>{o(!1),OA({id:"connection-lost",color:"orange",title:O("Warning"),message:O("UniversalMediaServerUnreachable"),icon:c.jsx(cN,{size:"1rem"}),autoClose:!1})};return A.useEffect(()=>{s&&(y?$(S,y):q(S))},[S,s]),A.useEffect(()=>{u===1?(console.log("WebSocket connected"),o(!0)):u===3&&(console.log("WebSocket disconnected"),o(!1))},[u]),c.jsx(K6.Provider,{value:{get:O,getString:N,getFormat:F,getValueLabelData:M,getLocalizedName:V,language:S||"en-US",dir:e,languages:b,setLanguage:k,getReportLink:B,showServerUnreachable:z,languageLoaded:r,serverConnected:s,serverReadyState:u,setServerReadyState:d},children:t})},gle=({children:t,i18n:e,session:n})=>{const[r,i]=A.useState("0"),[s,o]=A.useState("browse"),[u,d]=A.useState(!1),[f]=B5({key:"player",defaultValue:""}),m=(F,M)=>{o(""),i(F),o(M)},y=F=>{m(F,"play")},x=F=>{m(F,"browse")},b=F=>{m(F,"show")},w=F=>{try{Re.getPlayer("player")?.volume(F/100)}catch(M){console.log("volume",M)}},S=()=>{console.log("mute");try{Re.getPlayer("player")?.muted(!0)}catch(F){console.log("mute",F)}},D=()=>{try{Re.getPlayer("player")?.pause()}catch(F){console.log("pausePlayer",F)}},k=()=>{try{Re.getPlayer("player")?.pause()}catch(F){console.log("stop",F)}};async function O(){try{await Re.getPlayer("player")?.play()}catch{JA({title:e.get("RemoteControl"),message:e.get("RemotePlayOnlyAllowed")})}}const N=F=>{switch(F.request){case"setPlayId":F.arg0&&(o(""),i(F.arg0),o("play"));break;case"play":O();break;case"setvolume":if(F.arg0){const M=parseInt(F.arg0);w(M)}break;case"pause":D();break;case"mute":S();break;case"stop":k();break}};return A.useEffect(()=>{f||u||!n.initialized||!n.usePlayerSse||(d(!0),n.uuid?d(!1):Rt.get(os).then(function(F){F.data.uuid&&n.setUuid(F.data.uuid)}).catch(function(F){!F.response&&F.request?e.showServerUnreachable():Wn({id:"session-lost",title:e.get("Error"),message:e.get("YourPlayerSessionNotReceived")})}).then(function(){d(!1)}))},[n,n.usePlayerSse]),c.jsx(Q6.Provider,{value:{uuid:f,reqId:r,reqType:s,askReqId:m,askBrowseId:x,askPlayId:y,askShowId:b,onRemoteAction:N},children:t})};class uy extends Error{}uy.prototype.name="InvalidTokenError";function vle(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function yle(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return vle(e)}catch{return atob(e)}}function _5(t,e){if(typeof t!="string")throw new uy("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new uy(`Invalid token specified: missing part #${n+1}`);let i;try{i=yle(r)}catch(s){throw new uy(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new uy(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}const ble=({children:t,i18n:e})=>{const[n,r]=A.useState(!1),[i,s]=A.useState({noAdminFound:!1,authenticate:!0,player:!1}),[o,u]=A.useState(""),[d,f]=A.useState(!1),[m,y]=A.useState("Universal Media Server"),[x,b]=A.useState(""),[w,S]=A.useState(""),[D,k]=A.useState(!1),[O,N]=A.useState(!1),[F,M]=A.useState(void 0),[V,$]=A.useState(""),[q,B]=A.useState(""),[z,ee]=A.useState(!1),[Y,Q]=A.useState(!1),[oe,ue]=A.useState(0),[H,te]=A.useState(!1),[Z,ie]=A.useState([]),[G,X]=A.useState(!1),[fe,be]=A.useState(!1),[we,pe]=A.useState({max:0,used:0,dbcache:0,buffer:0}),[Ce,Ke]=A.useState(!1),[Me,lt]=A.useState(null),[bt,mt]=A.useState(!1),[_t]=A.useState([]),[Qt,xt]=A.useState(!1),[wt]=A.useState([]),Ot=A.useRef(void 0),[qe,Le]=So({key:"player-navbar",defaultValue:!0}),[He,Xe]=So({key:"player-direct-play",defaultValue:!1}),[he,Ae,rt]=So({key:"user",defaultValue:"",getInitialValueInEffect:!1}),[$e,Ze,qt]=So({key:"local-users",defaultValue:[]}),[jt,un,Pt]=B5({key:"player",defaultValue:""});F7(()=>Nt(),3e4,{autoInvoke:!0});const an=()=>{e.languageLoaded&&Rt.get($h+"session").then(function(ct){Lu("connection-lost"),s({...ct.data}),y(ct.data.serverName?ct.data.serverName:"Universal Media Server"),r(!0)}).catch(function(ct){!ct.response&&ct.request?e.showServerUnreachable():Wn({id:"session_error",title:e.get("Error"),message:e.get("SessionNotReceived")})})},rr=ct=>{u(ct)},on=()=>{u("")},oi=()=>{f(!0)},Hr=()=>{f(!1)},kn=ct=>{V&&$(""),M(ct)},qr=ct=>{F&&M(void 0),$(ct)},xr=ct=>{S(""),b(ct)},Ka=ct=>typeof i.account<"u"&&IJ(i.account,ct),Os=ct=>{if(ct&&ct.id&&ct.id!=2147483647){const sn=Yr.cloneDeep($e).filter(cn=>cn.id!=ct.id);sn.push({id:ct.id,displayName:ct.displayName,token:he,avatar:ct.avatar}),Ze(sn)}},us=ct=>{const sn=Yr.cloneDeep($e).filter(cn=>cn.id!=ct);Ze(sn)},cs=()=>{const ct=[];i.authenticate&&(i.users?i.users.map(sn=>{const cn=Yr.cloneDeep(sn),Zn=$e.find(_n=>sn.id==_n.id);Zn&&ft(Zn.token)&&(cn.login="token",cn.token=Zn.token),ct.push(cn)}):(i.account?.user.id===2147483647&&ct.push({id:2147483647,username:"",displayName:"",login:"localhost"}),ct.push({id:0,username:"",displayName:"",login:"pass"}),$e.map(sn=>{sn&&ft(sn.token)&&ct.push({id:sn.id,username:"",displayName:sn.displayName,avatar:sn.avatar,login:"token",token:sn.token})}))),ie(ct)},J=async(ct,sn)=>{await Rt.post($h+"login",{username:ct,password:sn}).then(function(cn){cn.data.token&&(Ae(cn.data.token),Lu("pwd-error"),Be())}).catch(function(cn){!cn.response&&cn.request?e.showServerUnreachable():Wn({id:"pwd-error",title:e.get("Error"),message:e.get("ErrorLoggingIn")})})},re=async(ct,sn)=>{await Rt.post($h+"loginpin",{id:ct,pin:sn}).then(function(cn){cn.data.token&&(Ae(cn.data.token),Lu("pwd-error"),Be())}).catch(function(cn){!cn.response&&cn.request?e.showServerUnreachable():Wn({id:"pwd-error",title:e.get("Error"),message:e.get("ErrorLoggingIn")})})},ye=async ct=>{const sn=i.account?.user.id;if(sn!==void 0&&(ct||us(sn),ue(sn)),jt){try{await Rt.post(os+"logout",{uuid:jt})}catch{}Pt()}rt(),Q(!0)},Be=()=>{Q(!1),an()},ft=ct=>{if(!ct)return!1;const sn=Math.floor(new Date().getTime()/1e3)+300;try{const cn=_5(ct);return cn.exp&&cn.exp>sn}catch{return!1}},Nt=()=>{const ct=[],sn=Math.floor(new Date().getTime()/1e3)+300;$e.map(cn=>{const Zn=cn.token,_n=_5(Zn);_n.exp&&(_n.exp<sn?Rt.post($h+"refresh",{token:Zn}).then(function(_r){_r.data.token&&(cn.token=_r.data.token,ct.push(cn),he==Zn&&Ae(Zn))}).catch(function(_r){!_r.response&&_r.request?e.showServerUnreachable():_r.response?.status==403?cn.token="":Wn({id:"session_error",title:e.get("Error"),message:e.get("SessionNotReceived")})}):ct.push(cn))}),Yr.isEqual($e,ct)||Ze(ct)},Zt=ct=>{wt.push(ct),wt.length>20&&wt.slice(0,wt.length-20),xt(!0)},cr=()=>{if(wt.length>0){const ct=wt.shift();return xt(_t.length>0),ct}},ir=ct=>{_t.push(ct),_t.length>20&&_t.slice(0,_t.length-20),mt(!0)},En=()=>{if(_t.length>0){const ct=_t.shift();return mt(_t.length>0),ct}},On=ct=>{ct!=null&&(ct.server_name!==void 0&&y(ct.server_name),(ct.authentication_enabled!==void 0||ct.authenticate_localhost_as_admin!==void 0||ct.web_gui_show_users!==void 0||ct.web_gui_allow_empty_pin!==void 0)&&an()),lt(ct)},dr=ct=>{Ot.current=ct},Gr=(ct,sn)=>{Ot.current!=null&&Ot.current(ct,sn)};return A.useEffect(()=>{cs()},[$e]),A.useEffect(()=>{!i.authenticate&&i.account&&i.account.user&&(qt(),rt()),Os(i.account?.user),ee(i.account?.user.id===2147483647),te(i.authenticate&&(!i.users||i.users.length>1)),cs()},[i]),A.useEffect(()=>{Rt.defaults.headers.common.Authorization=he?"Bearer "+he:void 0,an()},[he]),A.useEffect(()=>{N(!!(V||F))},[V,F]),A.useEffect(()=>{w&&b(e.get(w))},[e.get,w]),A.useEffect(()=>{x?document.title=m+" - "+x:document.title=m},[m,x]),A.useEffect(()=>{n||!e.languageLoaded||(ft(he)?Rt.defaults.headers.common.Authorization=he?"Bearer "+he:void 0:rt(),an())},[n,e.languageLoaded]),A.useEffect(()=>{e.serverConnected&&an()},[e.serverConnected]),A.useEffect(()=>{e.languageLoaded&&(Rt.interceptors.response.use(function(ct){return ct},function(ct){return ct?.response?.status===401&&ct?.config?.url!==$h+"login"&&(Wn({id:"authentication_error",title:e.get("AuthenticationError"),message:e.get("YouHaveBeenLoggedOut")}),an()),!ct.response&&ct.request&&e.showServerUnreachable(),Promise.reject(ct)}),an())},[e.languageLoaded,e.language]),c.jsx(Z6.Provider,{value:{initialized:n,authenticate:i.authenticate,noAdminFound:i.noAdminFound,account:i.account,player:i.player,users:Z,isDefaultUser:z,canSwitchUser:H,havePermission:Ka,refresh:an,token:he,setToken:Ae,login:J,loginPin:re,logout:ye,isLogout:Y,resetLogout:Be,removeLocalUser:us,lastUserId:oe,subscribe:o,subscribeTo:rr,unsubscribe:on,usePlayerSse:d,stopPlayerSse:Hr,startPlayerSse:oi,uuid:jt,setUuid:un,serverName:m,setServerName:y,setDocumentTitle:xr,setDocumentI18nTitle:S,playerNavbar:qe,setPlayerNavbar:Le,playerDirectPlay:He,setPlayerDirectPlay:Xe,hasNavbar:O,navbarOpened:D,setNavbarOpened:k,navbarValue:F,setNavbarValue:kn,navbarManage:V,setNavbarManage:qr,statusLine:q,setStatusLine:B,serverConfiguration:Me,setServerConfiguration:On,addLogLine:Zt,hasNewLogLine:Qt,getNewLogLine:cr,addRendererAction:ir,hasRendererAction:bt,getRendererAction:En,mediaScan:G,setMediaScan:X,reloadable:fe,setReloadable:be,memory:we,setMemory:pe,updateAccounts:Ce,setUpdateAccounts:Ke,sendJsonMessage:Gr,setSendJsonMessage:dr},children:t})};function xle(){return c.jsx(mle,{children:c.jsx(K6.Consumer,{children:t=>c.jsx(ble,{i18n:t,children:c.jsx(Z6.Consumer,{children:e=>c.jsx(gle,{i18n:t,session:e,children:c.jsx(Q6.Consumer,{children:n=>c.jsx(ple,{i18n:t,session:e,player:n})})})})})})})}function _le(){const[t]=So({key:"mantine-scrollbar-size",defaultValue:10});return c.jsxs(g9,{children:[c.jsx(X8,{defaultColorScheme:"auto",localStorageKey:"mantine-color-scheme"}),c.jsxs(W5,{theme:{colors:{darkTransparent:["rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)","rgba(31, 32, 35, 0.6)"],lightTransparent:["rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)","rgba(255, 255, 255, 0.6)"],transparentBg:w8({name:"transparentBg",dark:"darkTransparent",light:"lightTransparent"})},components:{ScrollArea:Ar.extend({defaultProps:{scrollbarSize:t,offsetScrollbars:!0}}),ScrollAreaAutosize:U_.extend({defaultProps:{scrollbarSize:t,offsetScrollbars:!0}}),Select:Cr.extend({defaultProps:{scrollAreaProps:{scrollbarSize:t,offsetScrollbars:!0}}}),MultiSelect:lp.extend({defaultProps:{scrollAreaProps:{scrollbarSize:t,offsetScrollbars:!0}}})}},defaultColorScheme:"auto",children:[c.jsx(Qc,{autoClose:3e3}),c.jsx(RW,{children:c.jsx(xle,{})})]})]})}OL.createRoot(document.getElementById("root")).render(c.jsx(Or.StrictMode,{children:c.jsx(_le,{})}));
//# sourceMappingURL=index-90515821.js.map
