var Purs_EntryPoints_Livestream_Livestream=(()=>{var ZZ=Object.create;var aR=Object.defineProperty;var eee=Object.getOwnPropertyDescriptor;var nee=Object.getOwnPropertyNames;var aee=Object.getPrototypeOf,tee=Object.prototype.hasOwnProperty;var H2=e=>aR(e,"__esModule",{value:!0});var ree=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ge=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),J2=(e,n)=>{H2(e);for(var a in n)aR(e,a,{get:n[a],enumerable:!0})},oee=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of nee(n))!tee.call(e,t)&&t!=="default"&&aR(e,t,{get:()=>n[t],enumerable:!(a=eee(n,t))||a.enumerable});return e},$u=e=>oee(H2(aR(e!=null?ZZ(aee(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Dy={};J2(Dy,{Children:()=>h_,Component:()=>D_,Fragment:()=>IS,PureComponent:()=>pre,Suspense:()=>dre,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>vre,cloneElement:()=>Xm,createContext:()=>ES,createElement:()=>pt,createRef:()=>hy,default:()=>Fa,forwardRef:()=>Ci,isValidElement:()=>TS,lazy:()=>fre,memo:()=>_re,useCallback:()=>Zm,useContext:()=>mre,useEffect:()=>Ot,useImperativeHandle:()=>Ls,useLayoutEffect:()=>eh,useMemo:()=>nh,useReducer:()=>hre,useRef:()=>st,useState:()=>Wl,version:()=>Dre});var Fa,vre,h_,Xm,D_,ES,pt,hy,Ci,IS,TS,fre,_re,pre,dre,Zm,mre,Ot,Ls,eh,nh,hre,st,Wl,Dre,$a=ree(()=>{Fa=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:vre,Children:h_,cloneElement:Xm,Component:D_,createContext:ES,createElement:pt,createRef:hy,forwardRef:Ci,Fragment:IS,isValidElement:TS,lazy:fre,memo:_re,PureComponent:pre,Suspense:dre,useCallback:Zm,useContext:mre,useEffect:Ot,useImperativeHandle:Ls,useLayoutEffect:eh,useMemo:nh,useReducer:hre,useRef:st,useState:Wl,version:Dre}=window.React});var CS=Ge((tan,HN)=>{"use strict";var BN=Object.getOwnPropertySymbols,xre=Object.prototype.hasOwnProperty,Pre=Object.prototype.propertyIsEnumerable;function jre(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Nre(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var n={},a=0;a<10;a++)n["_"+String.fromCharCode(a)]=a;var t=Object.getOwnPropertyNames(n).map(function(u){return n[u]});if(t.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(u){r[u]=u}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}HN.exports=Nre()?Object.assign:function(e,n){for(var a,t=jre(e),r,u=1;u{"use strict";var FS=CS(),hp=60103,JN=60106;Rt.Fragment=60107;Rt.StrictMode=60108;Rt.Profiler=60114;var qN=60109,WN=60110,$N=60112;Rt.Suspense=60113;var zN=60115,VN=60116;typeof Symbol=="function"&&Symbol.for&&(fl=Symbol.for,hp=fl("react.element"),JN=fl("react.portal"),Rt.Fragment=fl("react.fragment"),Rt.StrictMode=fl("react.strict_mode"),Rt.Profiler=fl("react.profiler"),qN=fl("react.provider"),WN=fl("react.context"),$N=fl("react.forward_ref"),Rt.Suspense=fl("react.suspense"),zN=fl("react.memo"),VN=fl("react.lazy"));var fl,QN=typeof Symbol=="function"&&Symbol.iterator;function Ore(e){return e===null||typeof e!="object"?null:(e=QN&&e[QN]||e["@@iterator"],typeof e=="function"?e:null)}function rh(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";o3.exports=r3()});var F3=Ge(gp=>{"use strict";var $l=CS(),Ps=u3();function yr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;aih;ih++)$o[ih]=ih+1;var $o,ih;$o[15]=0;var Wre=/^[: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]*$/,_3=Object.prototype.hasOwnProperty,p3={},d3={};function m3(e){return _3.call(d3,e)?!0:_3.call(p3,e)?!1:Wre.test(e)?d3[e]=!0:(p3[e]=!0,!1)}function $re(e,n,a,t){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return t?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zre(e,n,a,t){if(n===null||typeof n=="undefined"||$re(e,n,a,t))return!0;if(t)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ju(e,n,a,t,r,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=t,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var zo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zo[e]=new ju(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];zo[n]=new ju(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zo[e]=new ju(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zo[e]=new ju(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){zo[e]=new ju(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zo[e]=new ju(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zo[e]=new ju(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zo[e]=new ju(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zo[e]=new ju(e,5,!1,e.toLowerCase(),null,!1,!1)});var JS=/[\-:]([a-z])/g;function qS(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!1,!1)});zo.xlinkHref=new ju("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!0,!0)});var Vre=/["'&<>]/;function y_(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Vre.exec(e);if(n){var a="",t,r=0;for(t=n.index;tSy))throw Error(yr(301));if(e===Lc)if(Ty=!0,e={action:a,next:null},Hv===null&&(Hv=new Map),a=Hv.get(n),a===void 0)Hv.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function $S(){}var w_=null,Zre={readContext:function(e){var n=w_.threadID;return uh(e,n),e[n]},useContext:function(e){b_();var n=w_.threadID;return uh(e,n),e[n]},useMemo:b3,useReducer:y3,useRef:function(e){Lc=b_(),ir=WS();var n=ir.memoizedState;return n===null?(e={current:e},ir.memoizedState=e):n},useState:function(e){return y3(R3,e)},useLayoutEffect:function(){},useCallback:function(e,n){return b3(function(){return e},n)},useImperativeHandle:$S,useEffect:$S,useDebugValue:$S,useDeferredValue:function(e){return b_(),e},useTransition:function(){return b_(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(w_.identifierPrefix||"")+"R:"+(w_.uniqueID++).toString(36)},useMutableSource:function(e,n){return b_(),n(e._source)}},w3={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function E3(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var I3={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},eoe=$l({menuitem:!0},I3),ch={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},noe=["Webkit","ms","Moz","O"];Object.keys(ch).forEach(function(e){noe.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ch[n]=ch[e]})});var aoe=/([A-Z])/g,toe=/^ms-/,Jv=Ps.Children.toArray,zS=Jre.ReactCurrentDispatcher,roe={listing:!0,pre:!0,textarea:!0},ooe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T3={},VS={};function uoe(e){if(e==null)return e;var n="";return Ps.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var ioe=Object.prototype.hasOwnProperty,loe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function S3(e,n){if(e===void 0)throw Error(yr(152,oh(n)||"Component"))}function coe(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,m=qre(l,n,a,s),p=[],g=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(ne,ue){g=!0,p=[ue]},enqueueSetState:function(ne,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,m,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=$l({},s.state,b))}}else if(Lc={},s=l(i.props,m,E),s=D3(l,i.props,s,m),s==null||s.render==null){e=s,S3(e,l);return}if(s.props=i.props,s.context=m,s.updater=E,E=s.state,E===void 0&&(s.state=E=null),typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")if(typeof s.componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.UNSAFE_componentWillMount(),p.length){E=p;var I=g;if(p=null,g=!1,I&&E.length===1)s.state=E[0];else{b=I?E[0]:s.state;var L=!0;for(I=I?1:0;I=l))throw Error(yr(304));var s=new Uint16Array(l);for(s.set(i),$o=s,$o[0]=u+1,i=u;i=s.children.length){var m=s.footer;if(m!==""&&(this.previousWasTextNode=!1),this.stack.pop(),s.type==="select")this.currentSelectValue=null;else if(s.type!=null&&s.type.type!=null&&s.type.type.$$typeof===wy)this.popProvider(s.type);else if(s.type===Ey){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var g=s.fallbackFrame;if(!g)throw Error(yr(303));this.stack.push(g),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=m}else{var E=s.children[s.childIndex++],b="";try{b+=this.render(E,s.context,s.domNamespace)}catch(I){throw I!=null&&typeof I.then=="function"?Error(yr(294)):I}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{zS.current=r,w_=t,g3()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?y_(r):this.previousWasTextNode?""+y_(r):(this.previousWasTextNode=!0,y_(r));if(t=coe(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!Ps.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===PS?yr(257):yr(258,r.toString()));return a=Jv(a),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}var u=a.type;if(typeof u=="string")return this.renderDOM(a,t,r);switch(u){case v3:case s3:case jS:case NS:case kS:case by:return a=Jv(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case Ey:throw Error(yr(294));case c3:throw Error(yr(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case US:Lc={};var i=u.render(a.props,a.ref);return i=D3(u.render,a.props,i,a.ref),i=Jv(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case BS:return a=[Ps.createElement(u.type,$l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case wy:return u=Jv(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case OS:u=a.type,i=a.props;var l=this.threadID;return uh(u,l),u=Jv(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case l3:throw Error(yr(338));case HS:return u=a.type,i=u._init,u=i(u._payload),a=[Ps.createElement(u,$l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(yr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===w3.html&&E3(u),!T3.hasOwnProperty(u)){if(!ooe.test(u))throw Error(yr(65,u));T3[u]=!0}var i=a.props;if(u==="input")i=$l({type:void 0},i,{defaultChecked:void 0,defaultValue:void 0,value:i.value!=null?i.value:i.defaultValue,checked:i.checked!=null?i.checked:i.defaultChecked});else if(u==="textarea"){var l=i.value;if(l==null){l=i.defaultValue;var s=i.children;if(s!=null){if(l!=null)throw Error(yr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(yr(93));s=s[0]}l=""+s}l==null&&(l="")}i=$l({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=$l({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var m=uoe(i.children);if(s!=null){var p=i.value!=null?i.value+"":m;if(l=!1,Array.isArray(s)){for(var g=0;g":(ue+=">",l="");e:{if(s=i.dangerouslySetInnerHTML,s!=null){if(s.__html!=null){s=s.__html;break e}}else if(s=i.children,typeof s=="string"||typeof s=="number"){s=y_(s);break e}s=null}return s!=null?(i=[],roe.hasOwnProperty(u)&&s.charAt(0)===` `&&(ue+=` `),ue+=s):i=Jv(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?E3(a):r==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":r,this.stack.push({domNamespace:r,type:u,children:i,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,ue},e}();gp.renderToNodeStream=function(){throw Error(yr(207))};gp.renderToStaticMarkup=function(e,n){e=new C3(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};gp.renderToStaticNodeStream=function(){throw Error(yr(208))};gp.renderToString=function(e,n){e=new C3(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};gp.version="17.0.2"});var M3=Ge((ian,G3)=>{"use strict";G3.exports=F3()});var Q7=Ge((zb,kF)=>{(function(n,a){typeof zb=="object"&&typeof kF=="object"?kF.exports=a():typeof define=="function"&&define.amd?define([],a):typeof zb=="object"?zb.Pusher=a():n.Pusher=a()})(window,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="",a(a.s=2)}([function(e,n,a){"use strict";var t=this&&this.__extends||function(){var b=function(I,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var $ in z)z.hasOwnProperty($)&&(N[$]=z[$])},b(I,L)};return function(I,L){b(I,L);function N(){this.constructor=I}I.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(I){I===void 0&&(I="="),this._paddingCharacter=I}return b.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},b.prototype.encode=function(I){for(var L="",N=0;N>>3*6&63),L+=this._encodeByte(z>>>2*6&63),L+=this._encodeByte(z>>>1*6&63),L+=this._encodeByte(z>>>0*6&63)}var $=I.length-N;if($>0){var z=I[N]<<16|($===2?I[N+1]<<8:0);L+=this._encodeByte(z>>>3*6&63),L+=this._encodeByte(z>>>2*6&63),$===2?L+=this._encodeByte(z>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},b.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},b.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),N=I.length-L,z=new Uint8Array(this.maxDecodedLength(N)),$=0,ne=0,ue=0,Z=0,Y=0,X=0,ve=0;ne>>4,z[$++]=Y<<4|X>>>2,z[$++]=X<<6|ve,ue|=Z&r,ue|=Y&r,ue|=X&r,ue|=ve&r;if(ne>>4,ue|=Z&r,ue|=Y&r),ne>>2,ue|=X&r),ne>>8&0-65-26+97,L+=51-I>>>8&26-97-52+48,L+=61-I>>>8&52-48-62+43,L+=62-I>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(I){var L=r;return L+=(42-I&I-44)>>>8&-r+I-43+62,L+=(46-I&I-48)>>>8&-r+I-47+63,L+=(47-I&I-58)>>>8&-r+I-48+52,L+=(64-I&I-91)>>>8&-r+I-65+0,L+=(96-I&I-123)>>>8&-r+I-97+26,L},b.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var N=I.length-1;N>=0&&I[N]===this._paddingCharacter;N--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var m=function(b){t(I,b);function I(){return b!==null&&b.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var N=L;return N+=65,N+=25-L>>>8&0-65-26+97,N+=51-L>>>8&26-97-52+48,N+=61-L>>>8&52-48-62+45,N+=62-L>>>8&62-45-63+95,String.fromCharCode(N)},I.prototype._decodeChar=function(L){var N=r;return N+=(44-L&L-46)>>>8&-r+L-45+62,N+=(94-L&L-96)>>>8&-r+L-95+63,N+=(47-L&L-58)>>>8&-r+L-48+52,N+=(64-L&L-91)>>>8&-r+L-65+0,N+=(96-L&L-123)>>>8&-r+L-97+26,N},I}(u);n.URLSafeCoder=m;var p=new m;function g(b){return p.encode(b)}n.encodeURLSafe=g;function E(b){return p.decode(b)}n.decodeURLSafe=E,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",r="utf8: invalid source encoding";function u(s){for(var m=new Uint8Array(i(s)),p=0,g=0;g>6,m[p++]=128|E&63):E<55296?(m[p++]=224|E>>12,m[p++]=128|E>>6&63,m[p++]=128|E&63):(g++,E=(E&1023)<<10,E|=s.charCodeAt(g)&1023,E+=65536,m[p++]=240|E>>18,m[p++]=128|E>>12&63,m[p++]=128|E>>6&63,m[p++]=128|E&63)}return m}n.encode=u;function i(s){for(var m=0,p=0;p=s.length-1)throw new Error(t);p++,m+=4}else throw new Error(t)}return m}n.encodedLength=i;function l(s){for(var m=[],p=0;p=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);g=(g&31)<<6|b&63,E=128}else if(g<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],I=s[++p];if((b&192)!=128||(I&192)!=128)throw new Error(r);g=(g&15)<<12|(b&63)<<6|I&63,E=2048}else if(g<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],I=s[++p],L=s[++p];if((b&192)!=128||(I&192)!=128||(L&192)!=128)throw new Error(r);g=(g&15)<<18|(b&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(g=55296&&g<=57343)throw new Error(r);if(g>=65536){if(g>1114111)throw new Error(r);g-=65536,m.push(String.fromCharCode(55296|g>>10)),g=56320|g&1023}}m.push(String.fromCharCode(g))}return m.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function h(d,R){this.lastId=0,this.prefix=d,this.name=R}return h.prototype.create=function(d){this.lastId++;var R=this.lastId,M=this.prefix+R,A=this.name+"["+R+"]",Q=!1,we=function(){Q||(d.apply(null,arguments),Q=!0)};return this[R]=we,{number:R,id:M,name:A,callback:we}},h.prototype.remove=function(d){delete this[d.number]},h}(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function h(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return h.prototype.load=function(d,R,M){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(M);else{A.loading[d]=[M];var Q=Xa.createScriptRequest(A.getPath(d,R)),we=A.receivers.create(function(pn){if(A.receivers.remove(we),A.loading[d]){var da=A.loading[d];delete A.loading[d];for(var wt=function(Po){Po||Q.cleanup()},or=0;or>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},$=function(h){return h.replace(/[^\x00-\x7F]/g,z)},ne=function(h){var d=[0,2,1][h.length%3],R=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),M=[b.charAt(R>>>18),b.charAt(R>>>12&63),d>=2?"=":b.charAt(R>>>6&63),d>=1?"=":b.charAt(R&63)];return M.join("")},ue=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,ne)},Z=function(){function h(d,R,M,A){var Q=this;this.clear=R,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},M)}return h.prototype.isRunning=function(){return this.timer!==null},h.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},h}(),Y=Z,X=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}();function ve(h){window.clearTimeout(h)}function xe(h){window.clearInterval(h)}var ke=function(h){X(d,h);function d(R,M){return h.call(this,setTimeout,ve,R,function(A){return M(),null})||this}return d}(Y),rn=function(h){X(d,h);function d(R,M){return h.call(this,setInterval,xe,R,function(A){return M(),A})||this}return d}(Y),wn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(h){return new ke(0,h)},method:function(h){for(var d=[],R=1;R0)for(var A=0;A=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}},se=ss,Ll=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),xl=function(h){Ll(d,h);function d(R,M){var A=h.call(this)||this;return A.id=R,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(R){return this.transport.send(R)},d.prototype.send_event=function(R,M,A){var Q={event:R,data:M};return A&&(Q.channel=A),vn.debug("Event sent",Q),this.send(se.encodeMessage(Q))},d.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},d.prototype.close=function(){this.transport.close()},d.prototype.bindListeners=function(){var R=this,M={message:function(Q){var we;try{we=se.decodeMessage(Q)}catch(pn){R.emit("error",{type:"MessageParseError",error:pn,data:Q.data})}if(we!==void 0){switch(vn.debug("Event recd",we),we.event){case"pusher:error":R.emit("error",{type:"PusherError",data:we.data});break;case"pusher:ping":R.emit("ping");break;case"pusher:pong":R.emit("pong");break}R.emit("message",we)}},activity:function(){R.emit("activity")},error:function(Q){R.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&R.handleCloseEvent(Q),R.transport=null,R.emit("closed")}},A=function(){zn(M,function(Q,we){R.transport.unbind(we,Q)})};zn(M,function(Q,we){R.transport.bind(we,Q)})},d.prototype.handleCloseEvent=function(R){var M=se.getCloseAction(R),A=se.getCloseError(R);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},d}(_a),vs=xl,Pl=function(){function h(d,R){this.transport=d,this.callback=R,this.bindListeners()}return h.prototype.close=function(){this.unbindListeners(),this.transport.close()},h.prototype.bindListeners=function(){var d=this;this.onMessage=function(R){d.unbindListeners();var M;try{M=se.processHandshake(R)}catch(A){d.finish("error",{error:A}),d.transport.close();return}M.action==="connected"?d.finish("connected",{connection:new vs(M.id,d.transport),activityTimeout:M.activityTimeout}):(d.finish(M.action,{error:M.error}),d.transport.close())},this.onClosed=function(R){d.unbindListeners();var M=se.getCloseAction(R)||"backoff",A=se.getCloseError(R);d.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},h.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},h.prototype.finish=function(d,R){this.callback(mn({transport:this.transport,action:d},R))},h}(),Qi=Pl,Jd=function(){function h(d,R){this.channel=d;var M=R.authTransport;if(typeof Xa.getAuthorizers()[M]=="undefined")throw"'"+M+"' is not a recognized auth transport";this.type=M,this.options=R,this.authOptions=R.auth||{}}return h.prototype.composeQuery=function(d){var R="socket_id="+encodeURIComponent(d)+"&channel_name="+encodeURIComponent(this.channel.name);for(var M in this.authOptions.params)R+="&"+encodeURIComponent(M)+"="+encodeURIComponent(this.authOptions.params[M]);return R},h.prototype.authorize=function(d,R){h.authorizers=h.authorizers||Xa.getAuthorizers(),h.authorizers[this.type].call(this,Xa,d,R)},h}(),Pf=Jd,R0=function(){function h(d,R){this.timeline=d,this.options=R||{}}return h.prototype.send=function(d,R){this.timeline.isEmpty()||this.timeline.send(Xa.TimelineTransport.getAgent(this,d),R)},h}(),y0=R0,Ki=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ru=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),fs=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),b0=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),qd=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),w0=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),wg=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),cv=function(h){Ki(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),yI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),bI=function(h){yI(d,h);function d(R,M){var A=h.call(this,function(Q,we){vn.debug("No callbacks on "+R+" for "+Q)})||this;return A.name=R,A.pusher=M,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return d.prototype.authorize=function(R,M){return M(!1,{auth:""})},d.prototype.trigger=function(R,M){if(R.indexOf("client-")!==0)throw new Ru("Event '"+R+"' does not start with 'client-'");if(!this.subscribed){var A=Da.buildLogSuffix("triggeringClientEvents");vn.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(R,M,this.name)},d.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(R);else if(M.indexOf("pusher_internal:")!==0){var Q={};this.emit(M,A,Q)}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",R.data)},d.prototype.subscribe=function(){var R=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(M,A){M?(vn.error(A),R.emit("pusher:subscription_error",A)):(A=A,R.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:R.name}))}))},d.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},d.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},d.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},d}(_a),Eg=bI,wI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),EI=function(h){wI(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.authorize=function(R,M){var A=Yi.createAuthorizer(this,this.pusher.config);return A.authorize(R,M)},d}(Eg),Wd=EI,Ig=function(){function h(){this.reset()}return h.prototype.get=function(d){return Object.prototype.hasOwnProperty.call(this.members,d)?{id:d,info:this.members[d]}:null},h.prototype.each=function(d){var R=this;zn(this.members,function(M,A){d(R.get(A))})},h.prototype.setMyID=function(d){this.myID=d},h.prototype.onSubscription=function(d){this.members=d.presence.hash,this.count=d.presence.count,this.me=this.get(this.myID)},h.prototype.addMember=function(d){return this.get(d.user_id)===null&&this.count++,this.members[d.user_id]=d.user_info,this.get(d.user_id)},h.prototype.removeMember=function(d){var R=this.get(d.user_id);return R&&(delete this.members[d.user_id],this.count--),R},h.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},h}(),II=Ig,TI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Tg=function(h){TI(d,h);function d(R,M){var A=h.call(this,R,M)||this;return A.members=new II,A}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(!Q){if(we=we,we.channel_data===void 0){var pn=Da.buildLogSuffix("authenticationEndpoint");vn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+pn)),M("Invalid auth response");return}var da=JSON.parse(we.channel_data);A.members.setMyID(da.user_id)}M(Q,we)})},d.prototype.handleEvent=function(R){var M=R.event;if(M.indexOf("pusher_internal:")===0)this.handleInternalEvent(R);else{var A=R.data,Q={};R.user_id&&(Q.user_id=R.user_id),this.emit(M,A,Q)}},d.prototype.handleInternalEvent=function(R){var M=R.event,A=R.data;switch(M){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(R);break;case"pusher_internal:member_added":var Q=this.members.addMember(A);this.emit("pusher:member_added",Q);break;case"pusher_internal:member_removed":var we=this.members.removeMember(A);we&&this.emit("pusher:member_removed",we);break}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(R.data),this.emit("pusher:subscription_succeeded",this.members))},d.prototype.disconnect=function(){this.members.reset(),h.prototype.disconnect.call(this)},d}(Wd),SI=Tg,Sg=a(1),$d=a(0),CI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),FI=function(h){CI(d,h);function d(R,M,A){var Q=h.call(this,R,M)||this;return Q.key=null,Q.nacl=A,Q}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(Q){M(!0,we);return}var pn=we.shared_secret;if(!pn){var da="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,da);return}A.key=Object($d.decode)(pn),delete we.shared_secret,M(!1,we)})},d.prototype.trigger=function(R,M){throw new w0("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){h.prototype.handleEvent.call(this,R);return}this.handleEncryptedEvent(M,A)},d.prototype.handleEncryptedEvent=function(R,M){var A=this;if(!this.key){vn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){vn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Q=Object($d.decode)(M.ciphertext);if(Q.length0&&this.emit("connecting_in",Math.round(R/1e3)),this.retryTimer=new ke(R||0,function(){M.disconnectInternally(),M.connect()})},d.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},d.prototype.setUnavailableTimer=function(){var R=this;this.unavailableTimer=new ke(this.options.unavailableTimeout,function(){R.updateState("unavailable")})},d.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},d.prototype.sendActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ke(this.options.pongTimeout,function(){R.timeline.error({pong_timed_out:R.options.pongTimeout}),R.retryIn(0)})},d.prototype.resetActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ke(this.activityTimeout,function(){R.sendActivityCheck()}))},d.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},d.prototype.buildConnectionCallbacks=function(R){var M=this;return mn({},R,{message:function(A){M.resetActivityCheck(),M.emit("message",A)},ping:function(){M.send_event("pusher:pong",{})},activity:function(){M.resetActivityCheck()},error:function(A){M.emit("error",{type:"WebSocketError",error:A})},closed:function(){M.abandonConnection(),M.shouldRetry()&&M.retryIn(1e3)}})},d.prototype.buildHandshakeCallbacks=function(R){var M=this;return mn({},R,{connected:function(A){M.activityTimeout=Math.min(M.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),M.clearUnavailableTimer(),M.setConnection(A.connection),M.socket_id=M.connection.id,M.updateState("connected",{socket_id:M.socket_id})}})},d.prototype.buildErrorCallbacks=function(){var R=this,M=function(A){return function(Q){Q.error&&R.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:M(function(){R.usingTLS=!0,R.updateStrategy(),R.retryIn(0)}),refused:M(function(){R.disconnect()}),backoff:M(function(){R.retryIn(1e3)}),retry:M(function(){R.retryIn(0)})}},d.prototype.setConnection=function(R){this.connection=R;for(var M in this.connectionCallbacks)this.connection.bind(M,this.connectionCallbacks[M]);this.resetActivityCheck()},d.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var R in this.connectionCallbacks)this.connection.unbind(R,this.connectionCallbacks[R]);var M=this.connection;return this.connection=null,M}},d.prototype.updateState=function(R,M){var A=this.state;if(this.state=R,A!==R){var Q=R;Q==="connected"&&(Q+=" with new socket ID "+M.socket_id),vn.debug("State changed",A+" -> "+Q),this.timeline.info({state:R,params:M}),this.emit("state_change",{previous:A,current:R}),this.emit(R,M)}},d.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},d}(_a),Cg=AI,LI=function(){function h(){this.channels={}}return h.prototype.add=function(d,R){return this.channels[d]||(this.channels[d]=Fg(d,R)),this.channels[d]},h.prototype.all=function(){return ja(this.channels)},h.prototype.find=function(d){return this.channels[d]},h.prototype.remove=function(d){var R=this.channels[d];return delete this.channels[d],R},h.prototype.disconnect=function(){zn(this.channels,function(d){d.disconnect()})},h}(),xI=LI;function Fg(h,d){if(h.indexOf("private-encrypted-")===0){if(d.config.nacl)return Yi.createEncryptedChannel(h,d,d.config.nacl);var R="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=Da.buildLogSuffix("encryptedChannelSupport");throw new w0(R+". "+M)}else return h.indexOf("private-")===0?Yi.createPrivateChannel(h,d):h.indexOf("presence-")===0?Yi.createPresenceChannel(h,d):Yi.createChannel(h,d)}var PI={createChannels:function(){return new xI},createConnectionManager:function(h,d){return new Cg(h,d)},createChannel:function(h,d){return new Eg(h,d)},createPrivateChannel:function(h,d){return new Wd(h,d)},createPresenceChannel:function(h,d){return new SI(h,d)},createEncryptedChannel:function(h,d,R){return new GI(h,d,R)},createTimelineSender:function(h,d){return new y0(h,d)},createAuthorizer:function(h,d){return d.authorizer?d.authorizer(h,d):new Pf(h,d)},createHandshake:function(h,d){return new Qi(h,d)},createAssistantToTheTransportManager:function(h,d,R){return new vc(h,d,R)}},Yi=PI,jI=function(){function h(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return h.prototype.getAssistant=function(d){return Yi.createAssistantToTheTransportManager(this,d,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},h.prototype.isAlive=function(){return this.livesLeft>0},h.prototype.reportDeath=function(){this.livesLeft-=1},h}(),Gg=jI,NI=function(){function h(d,R){this.strategies=d,this.loop=Boolean(R.loop),this.failFast=Boolean(R.failFast),this.timeout=R.timeout,this.timeoutLimit=R.timeoutLimit}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){var M=this,A=this.strategies,Q=0,we=this.timeout,pn=null,da=function(wt,or){or?R(null,or):(Q=Q+1,M.loop&&(Q=Q%A.length),Q0&&(Q=new ke(M.timeout,function(){we.abort(),A(!0)})),we=d.connect(R,function(pn,da){pn&&Q&&Q.isRunning()&&!M.failFast||(Q&&Q.ensureAborted(),A(pn,da))}),{abort:function(){Q&&Q.ensureAborted(),we.abort()},forceMinPriority:function(pn){we.forceMinPriority(pn)}}},h}(),_s=NI,OI=function(){function h(d){this.strategies=d}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){return UI(this.strategies,d,function(M,A){return function(Q,we){if(A[M].error=Q,Q){Mg(A)&&R(!0);return}Ma(A,function(pn){pn.forceMinPriority(we.transport.priority)}),R(null,we)}})},h}(),zd=OI;function UI(h,d,R){var M=sa(h,function(A,Q,we,pn){return A.connect(d,R(Q,pn))});return{abort:function(){Ma(M,Vd)},forceMinPriority:function(A){Ma(M,function(Q){Q.forceMinPriority(A)})}}}function Mg(h){return Dn(h,function(d){return Boolean(d.error)})}function Vd(h){!h.error&&!h.aborted&&(h.abort(),h.aborted=!0)}var kI=function(){function h(d,R,M){this.strategy=d,this.transports=R,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.usingTLS,A=Ag(M),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=dn.now()){var we=this.transports[A.transport];we&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new _s([we],{timeout:A.latency*2+1e3,failFast:!0})))}var pn=dn.now(),da=Q.pop().connect(d,function wt(or,Po){or?(Lg(M),Q.length>0?(pn=dn.now(),da=Q.pop().connect(d,wt)):R(or)):(HI(M,Po.transport.name,dn.now()-pn),R(null,Po))});return{abort:function(){da.abort()},forceMinPriority:function(wt){d=wt,da&&da.forceMinPriority(wt)}}},h}(),BI=kI;function Qd(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function Ag(h){var d=Xa.getLocalStorage();if(d)try{var R=d[Qd(h)];if(R)return JSON.parse(R)}catch{Lg(h)}return null}function HI(h,d,R){var M=Xa.getLocalStorage();if(M)try{M[Qd(h)]=Aa({timestamp:dn.now(),transport:d,latency:R})}catch{}}function Lg(h){var d=Xa.getLocalStorage();if(d)try{delete d[Qd(h)]}catch{}}var JI=function(){function h(d,R){var M=R.delay;this.strategy=d,this.options={delay:M}}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy,A,Q=new ke(this.options.delay,function(){A=M.connect(d,R)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(we){d=we,A&&A.forceMinPriority(we)}}},h}(),E0=JI,xg=function(){function h(d,R,M){this.test=d,this.trueBranch=R,this.falseBranch=M}return h.prototype.isSupported=function(){var d=this.test()?this.trueBranch:this.falseBranch;return d.isSupported()},h.prototype.connect=function(d,R){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(d,R)},h}(),jf=xg,qI=function(){function h(d){this.strategy=d}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy.connect(d,function(A,Q){Q&&M.abort(),R(A,Q)});return M},h}(),WI=qI;function jl(h){return function(){return h.isSupported()}}var Pg=function(h,d,R){var M={};function A(Nr,Zg,eR,RT,nR){var w=R(h,Nr,Zg,eR,RT,nR);return M[Nr]=w,w}var Q=Object.assign({},d,{hostNonTLS:h.wsHost+":"+h.wsPort,hostTLS:h.wsHost+":"+h.wssPort,httpPath:h.wsPath}),we=Object.assign({},Q,{useTLS:!0}),pn=Object.assign({},d,{hostNonTLS:h.httpHost+":"+h.httpPort,hostTLS:h.httpHost+":"+h.httpsPort,httpPath:h.httpPath}),da={loop:!0,timeout:15e3,timeoutLimit:6e4},wt=new Gg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),or=new Gg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Po=A("ws","ws",3,Q,wt),hi=A("wss","ws",3,we,wt),mT=A("sockjs","sockjs",1,pn),$g=A("xhr_streaming","xhr_streaming",1,pn,or),zg=A("xdr_streaming","xdr_streaming",1,pn,or),Vg=A("xhr_polling","xhr_polling",1,pn),hT=A("xdr_polling","xdr_polling",1,pn),Qg=new _s([Po],da),DT=new _s([hi],da),gT=new _s([mT],da),Kg=new _s([new jf(jl($g),$g,zg)],da),Yg=new _s([new jf(jl(Vg),Vg,hT)],da),Xg=new _s([new jf(jl(Kg),new zd([Kg,new E0(Yg,{delay:4e3})]),Yg)],da),nm=new jf(jl(Xg),Xg,gT),am;return d.useTLS?am=new zd([Qg,new E0(nm,{delay:2e3})]):am=new zd([Qg,new E0(DT,{delay:2e3}),new E0(nm,{delay:5e3})]),new BI(new WI(new jf(jl(Po),am,nm)),M,{ttl:18e5,timeline:d.timeline,useTLS:d.useTLS})},$I=Pg,zI=function(){var h=this;h.timeline.info(h.buildTimelineMessage({transport:h.name+(h.options.useTLS?"s":"")})),h.hooks.isInitialized()?h.changeState("initialized"):h.hooks.file?(h.changeState("initializing"),p.load(h.hooks.file,{useTLS:h.options.useTLS},function(d,R){h.hooks.isInitialized()?(h.changeState("initialized"),R(!0)):(d&&h.onError(d),h.onClose(),R(!1))})):h.onClose()},jg={getRequest:function(h){var d=new window.XDomainRequest;return d.ontimeout=function(){h.emit("error",new fs),h.close()},d.onerror=function(R){h.emit("error",R),h.close()},d.onprogress=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText)},d.onload=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText),h.emit("finished",200),h.close()},d},abortRequest:function(h){h.ontimeout=h.onerror=h.onprogress=h.onload=null,h.abort()}},VI=jg,Ng=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),QI=256*1024,Og=function(h){Ng(d,h);function d(R,M,A){var Q=h.call(this)||this;return Q.hooks=R,Q.method=M,Q.url=A,Q}return d.prototype.start=function(R){var M=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){M.close()},Xa.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(R)},d.prototype.close=function(){this.unloader&&(Xa.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},d.prototype.onChunk=function(R,M){for(;;){var A=this.advanceBuffer(M);if(A)this.emit("chunk",{status:R,data:A});else break}this.isBufferTooLong(M)&&this.emit("buffer_too_long")},d.prototype.advanceBuffer=function(R){var M=R.slice(this.position),A=M.indexOf(` `);return A!==-1?(this.position+=A+1,M.slice(0,A)):null},d.prototype.isBufferTooLong=function(R){return this.position===R.length&&R.length>QI},d}(_a),Ug=Og,Nf;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(Nf||(Nf={}));var Xi=Nf,KI=1,kg=function(){function h(d,R){this.hooks=d,this.session=qu(1e3)+"/"+Nl(8),this.location=YI(R),this.readyState=Xi.CONNECTING,this.openStream()}return h.prototype.send=function(d){return this.sendRaw(JSON.stringify([d]))},h.prototype.ping=function(){this.hooks.sendHeartbeat(this)},h.prototype.close=function(d,R){this.onClose(d,R,!0)},h.prototype.sendRaw=function(d){if(this.readyState===Xi.OPEN)try{return Xa.createSocketRequest("POST",Kd(XI(this.location,this.session))).start(d),!0}catch{return!1}else return!1},h.prototype.reconnect=function(){this.closeStream(),this.openStream()},h.prototype.onClose=function(d,R,M){this.closeStream(),this.readyState=Xi.CLOSED,this.onclose&&this.onclose({code:d,reason:R,wasClean:M})},h.prototype.onChunk=function(d){if(d.status===200){this.readyState===Xi.OPEN&&this.onActivity();var R,M=d.data.slice(0,1);switch(M){case"o":R=JSON.parse(d.data.slice(1)||"{}"),this.onOpen(R);break;case"a":R=JSON.parse(d.data.slice(1)||"[]");for(var A=0;A0&&h.onChunk(R.status,R.responseText);break;case 4:R.responseText&&R.responseText.length>0&&h.onChunk(R.status,R.responseText),h.emit("finished",R.status),h.close();break}},R},abortRequest:function(h){h.onreadystatechange=null,h.abort()}},Ya=Hg,ps={createStreamingSocket:function(h){return this.createSocket(nT,h)},createPollingSocket:function(h){return this.createSocket(tT,h)},createSocket:function(h,d){return new ZI(h,d)},createXHR:function(h,d){return this.createRequest(Ya,h,d)},createRequest:function(h,d,R){return new Ug(h,d,R)}},Yd=ps;Yd.createXDR=function(h,d){return this.createRequest(VI,h,d)};var rT=Yd,oT={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:m,getDefaultStrategy:$I,Transports:xo,transportConnectionInitializer:zI,HTTPFactory:rT,TimelineTransport:ie,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(h){var d=this;window.Pusher=h;var R=function(){d.onDocumentBody(h.ready)};window.JSON?R():p.load("json2",{},R)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:J,jsonp:O}},onDocumentBody:function(h){var d=this;document.body?h():setTimeout(function(){d.onDocumentBody(h)},0)},createJSONPRequest:function(h,d){return new W(h,d)},createScriptRequest:function(h){return new x(h)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var h=this.getXHRAPI();return new h},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return mi},createWebSocket:function(h){var d=this.getWebSocketAPI();return new d(h)},createSocketRequest:function(h,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var h=this.getXHRAPI();return Boolean(h)&&new h().withCredentials!==void 0},isXDRSupported:function(h){var d=h?"https:":"http:",R=this.getProtocol();return Boolean(window.XDomainRequest)&&R===d},addUnloadListener:function(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener:function(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)}},Xa=oT,I0;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(I0||(I0={}));var T0=I0,uT=function(){function h(d,R,M){this.key=d,this.session=R,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return h.prototype.log=function(d,R){d<=this.options.level&&(this.events.push(mn({},R,{timestamp:dn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},h.prototype.error=function(d){this.log(T0.ERROR,d)},h.prototype.info=function(d){this.log(T0.INFO,d)},h.prototype.debug=function(d){this.log(T0.DEBUG,d)},h.prototype.isEmpty=function(){return this.events.length===0},h.prototype.send=function(d,R){var M=this,A=mn({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],d(A,function(Q,we){Q||M.sent++,R&&R(Q,we)}),!0},h.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},h}(),Jg=uT,Xd=function(){function h(d,R,M,A){this.name=d,this.priority=R,this.transport=M,this.options=A||{}}return h.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},h.prototype.connect=function(d,R){var M=this;if(this.isSupported()){if(this.priority{"use strict";var Hhe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";x5.exports=Hhe});var U5=Ge((rSa,O5)=>{"use strict";var Jhe=P5();function j5(){}function N5(){}N5.resetWarningCache=j5;O5.exports=function(){function e(t,r,u,i,l,s){if(s!==Jhe){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}e.isRequired=e;function n(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:N5,resetWarningCache:j5};return a.PropTypes=a,a}});var B5=Ge((iSa,k5)=>{k5.exports=U5()();var oSa,uSa});var dG=Ge(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var H5=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],vw=H5.join(","),J5=typeof Element=="undefined",H_=J5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_G=!J5&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},q5=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(vw));return a&&H_.call(n,vw)&&r.unshift(n),r=r.filter(t),r},W5=function e(n,a,t){for(var r=[],u=Array.from(n);u.length;){var i=u.shift();if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,m=e(s,!0,t);t.flatten?r.push.apply(r,m):r.push({scope:i,candidates:m})}else{var p=H_.call(i,vw);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var g=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(g&&E){var b=e(g===!0?i.children:g.children,!0,t);t.flatten?r.push.apply(r,b):r.push({scope:i,candidates:b})}else u.unshift.apply(u,i.children)}}return r},$5=function(n,a){return n.tabIndex<0&&(a||/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||n.isContentEditable)&&isNaN(parseInt(n.getAttribute("tabindex"),10))?0:n.tabIndex},qhe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},z5=function(n){return n.tagName==="INPUT"},Whe=function(n){return z5(n)&&n.type==="hidden"},$he=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},zhe=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(H_.call(i,"details:not([open]) *"))return!0;var l=_G(n).host,s=(l==null?void 0:l.ownerDocument.contains(l))||n.ownerDocument.contains(n);if(!t||t==="full"){if(typeof r=="function"){for(var m=n;n;){var p=n.parentElement,g=_G(n);if(p&&!p.shadowRoot&&r(p)===!0)return V5(n);n.assignedSlot?n=n.assignedSlot:!p&&g!==n.ownerDocument?n=g.host:n=p}n=m}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return V5(n);return!1},Xhe=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var a=n.parentElement;a;){if(a.tagName==="FIELDSET"&&a.disabled){for(var t=0;t=0)},eDe=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=$5(l,i),m=i?e(r.candidates):l;s===0?i?a.push.apply(a,m):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:m})}),t.sort(qhe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},nDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=W5([n],a.includeContainer,{filter:pG.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:Zhe}):t=q5(n,a.includeContainer,pG.bind(null,a)),eDe(t)},aDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=W5([n],a.includeContainer,{filter:fw.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=q5(n,a.includeContainer,fw.bind(null,a)),t},tDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return H_.call(n,vw)===!1?!1:pG(a,n)},rDe=H5.concat("iframe").join(","),oDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return H_.call(n,rDe)===!1?!1:fw(a,n)};Wp.focusable=aDe;Wp.isFocusable=oDe;Wp.isTabbable=tDe;Wp.tabbable=nDe});var e9=Ge(mG=>{"use strict";Object.defineProperty(mG,"__esModule",{value:!0});var Qs=dG();function Q5(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function K5(e){for(var n=1;n0){var t=e[e.length-1];t!==a&&t.pause()}var r=e.indexOf(a);r===-1||e.splice(r,1),e.push(a)},deactivateTrap:function(a){var t=e.indexOf(a);t!==-1&&e.splice(t,1),e.length>0&&e[e.length-1].unpause()}}}(),iDe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},lDe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},cDe=function(n){return n.key==="Tab"||n.keyCode===9},X5=function(n){return setTimeout(n,0)},Z5=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},qh=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?ve-1:0),ke=1;ke=0)Y=t.activeElement;else{var X=u.tabbableGroups[0],ve=X&&X.firstTabbableNode;Y=ve||m("fallbackFocus")}if(!Y)throw new Error("Your focus-trap needs to have at least one focusable element");return Y},g=function(){if(u.containerGroups=u.containers.map(function(Y){var X=Qs.tabbable(Y,r.tabbableOptions),ve=Qs.focusable(Y,r.tabbableOptions);return{container:Y,tabbableNodes:X,focusableNodes:ve,firstTabbableNode:X.length>0?X[0]:null,lastTabbableNode:X.length>0?X[X.length-1]:null,nextTabbableNode:function(ke){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,wn=ve.findIndex(function(dn){return dn===ke});if(!(wn<0))return rn?ve.slice(wn+1).find(function(dn){return Qs.isTabbable(dn,r.tabbableOptions)}):ve.slice(0,wn).reverse().find(function(dn){return Qs.isTabbable(dn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Y){return Y.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},E=function Z(Y){if(Y!==!1&&Y!==t.activeElement){if(!Y||!Y.focus){Z(p());return}Y.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Y,iDe(Y)&&Y.select()}},b=function(Y){var X=m("setReturnFocus",Y);return X||(X===!1?!1:Y)},I=function(Y){var X=_w(Y);if(!(s(X)>=0)){if(qh(r.clickOutsideDeactivates,Y)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Qs.isFocusable(X,r.tabbableOptions)});return}qh(r.allowOutsideClick,Y)||Y.preventDefault()}},L=function(Y){var X=_w(Y),ve=s(X)>=0;ve||X instanceof Document?ve&&(u.mostRecentlyFocusedNode=X):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},N=function(Y){var X=_w(Y);g();var ve=null;if(u.tabbableGroups.length>0){var xe=s(X),ke=xe>=0?u.containerGroups[xe]:void 0;if(xe<0)Y.shiftKey?ve=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:ve=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var rn=Z5(u.tabbableGroups,function(zn){var Wn=zn.firstTabbableNode;return X===Wn});if(rn<0&&(ke.container===X||Qs.isFocusable(X,r.tabbableOptions)&&!Qs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X,!1))&&(rn=xe),rn>=0){var wn=rn===0?u.tabbableGroups.length-1:rn-1,dn=u.tabbableGroups[wn];ve=dn.lastTabbableNode}}else{var mn=Z5(u.tabbableGroups,function(zn){var Wn=zn.lastTabbableNode;return X===Wn});if(mn<0&&(ke.container===X||Qs.isFocusable(X,r.tabbableOptions)&&!Qs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X))&&(mn=xe),mn>=0){var yn=mn===u.tabbableGroups.length-1?0:mn+1,Kn=u.tabbableGroups[yn];ve=Kn.firstTabbableNode}}}else ve=m("fallbackFocus");ve&&(Y.preventDefault(),E(ve))},z=function(Y){if(lDe(Y)&&qh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(cDe(Y)){N(Y);return}},$=function(Y){var X=_w(Y);s(X)>=0||qh(r.clickOutsideDeactivates,Y)||qh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},ne=function(){if(!!u.active)return Y5.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?X5(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",I,{capture:!0,passive:!1}),t.addEventListener("touchstart",I,{capture:!0,passive:!1}),t.addEventListener("click",$,{capture:!0,passive:!1}),t.addEventListener("keydown",z,{capture:!0,passive:!1}),i},ue=function(){if(!!u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchstart",I,!0),t.removeEventListener("click",$,!0),t.removeEventListener("keydown",z,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Y){if(u.active)return this;var X=l(Y,"onActivate"),ve=l(Y,"onPostActivate"),xe=l(Y,"checkCanFocusTrap");xe||g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,X&&X();var ke=function(){xe&&g(),ne(),ve&&ve()};return xe?(xe(u.containers.concat()).then(ke,ke),this):(ke(),this)},deactivate:function(Y){if(!u.active)return this;var X=K5({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,Y5.deactivateTrap(i);var ve=l(X,"onDeactivate"),xe=l(X,"onPostDeactivate"),ke=l(X,"checkCanReturnFocus"),rn=l(X,"returnFocus","returnFocusOnDeactivate");ve&&ve();var wn=function(){X5(function(){rn&&E(b(u.nodeFocusedBeforeActivation)),xe&&xe()})};return rn&&ke?(ke(b(u.nodeFocusedBeforeActivation)).then(wn,wn),this):(wn(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,ue(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,g(),ne(),this)},updateContainerElements:function(Y){var X=[].concat(Y).filter(Boolean);return u.containers=X.map(function(ve){return typeof ve=="string"?t.querySelector(ve):ve}),u.active&&g(),this}},i.updateContainerElements(n),i};mG.createFocusTrap=sDe});var t9=Ge((sSa,a9)=>{"use strict";function hG(e){return hG=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hG(e)}function vDe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n9(e,n){for(var a=0;a1?p-1:0),E=1;E element.");var i=function(m){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(m):u.ref&&(u.ref.current=m)),r.focusTrapElements=p||[m]},l=dw.cloneElement(u,{ref:i});return l}return null}}]),a}(dw.Component),$h=typeof Element=="undefined"?Function:Element;gG.propTypes={active:Pa.bool,paused:Pa.bool,focusTrapOptions:Pa.shape({document:Pa.object,onActivate:Pa.func,onPostActivate:Pa.func,checkCanFocusTrap:Pa.func,onDeactivate:Pa.func,onPostDeactivate:Pa.func,checkCanReturnFocus:Pa.func,initialFocus:Pa.oneOfType([Pa.instanceOf($h),Pa.string,Pa.bool,Pa.func]),fallbackFocus:Pa.oneOfType([Pa.instanceOf($h),Pa.string,Pa.func]),escapeDeactivates:Pa.oneOfType([Pa.bool,Pa.func]),clickOutsideDeactivates:Pa.oneOfType([Pa.bool,Pa.func]),returnFocusOnDeactivate:Pa.bool,setReturnFocus:Pa.oneOfType([Pa.instanceOf($h),Pa.string,Pa.bool,Pa.func]),allowOutsideClick:Pa.oneOfType([Pa.bool,Pa.func]),preventScroll:Pa.bool,tabbableOptions:Pa.shape({displayCheck:Pa.oneOf(["full","non-zero-area","none"]),getShadowRoot:Pa.oneOfType([Pa.bool,Pa.func])})}),containerElements:Pa.arrayOf(Pa.instanceOf($h)),children:Pa.oneOfType([Pa.element,Pa.instanceOf($h)])};gG.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:gDe};a9.exports=gG});var ak=Ge(qt=>{"use strict";var Go=typeof Symbol=="function"&&Symbol.for,QG=Go?Symbol.for("react.element"):60103,KG=Go?Symbol.for("react.portal"):60106,Sw=Go?Symbol.for("react.fragment"):60107,Cw=Go?Symbol.for("react.strict_mode"):60108,Fw=Go?Symbol.for("react.profiler"):60114,Gw=Go?Symbol.for("react.provider"):60109,Mw=Go?Symbol.for("react.context"):60110,YG=Go?Symbol.for("react.async_mode"):60111,Aw=Go?Symbol.for("react.concurrent_mode"):60111,Lw=Go?Symbol.for("react.forward_ref"):60112,xw=Go?Symbol.for("react.suspense"):60113,Uge=Go?Symbol.for("react.suspense_list"):60120,Pw=Go?Symbol.for("react.memo"):60115,jw=Go?Symbol.for("react.lazy"):60116,kge=Go?Symbol.for("react.block"):60121,Bge=Go?Symbol.for("react.fundamental"):60117,Hge=Go?Symbol.for("react.responder"):60118,Jge=Go?Symbol.for("react.scope"):60119;function ki(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case QG:switch(e=e.type,e){case YG:case Aw:case Sw:case Fw:case Cw:case xw:return e;default:switch(e=e&&e.$$typeof,e){case Mw:case Lw:case jw:case Pw:case Gw:return e;default:return n}}case KG:return n}}}function nk(e){return ki(e)===Aw}qt.AsyncMode=YG;qt.ConcurrentMode=Aw;qt.ContextConsumer=Mw;qt.ContextProvider=Gw;qt.Element=QG;qt.ForwardRef=Lw;qt.Fragment=Sw;qt.Lazy=jw;qt.Memo=Pw;qt.Portal=KG;qt.Profiler=Fw;qt.StrictMode=Cw;qt.Suspense=xw;qt.isAsyncMode=function(e){return nk(e)||ki(e)===YG};qt.isConcurrentMode=nk;qt.isContextConsumer=function(e){return ki(e)===Mw};qt.isContextProvider=function(e){return ki(e)===Gw};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===QG};qt.isForwardRef=function(e){return ki(e)===Lw};qt.isFragment=function(e){return ki(e)===Sw};qt.isLazy=function(e){return ki(e)===jw};qt.isMemo=function(e){return ki(e)===Pw};qt.isPortal=function(e){return ki(e)===KG};qt.isProfiler=function(e){return ki(e)===Fw};qt.isStrictMode=function(e){return ki(e)===Cw};qt.isSuspense=function(e){return ki(e)===xw};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Sw||e===Aw||e===Fw||e===Cw||e===xw||e===Uge||typeof e=="object"&&e!==null&&(e.$$typeof===jw||e.$$typeof===Pw||e.$$typeof===Gw||e.$$typeof===Mw||e.$$typeof===Lw||e.$$typeof===Bge||e.$$typeof===Hge||e.$$typeof===Jge||e.$$typeof===kge)};qt.typeOf=ki});var rk=Ge((eJa,tk)=>{"use strict";tk.exports=ak()});var V_=Ge((pJa,Uw)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function FRe(){this.__data__=[],this.size=0}Zk.exports=FRe});var DM=Ge((rWa,nB)=>{function GRe(e,n){return e===n||e!==e&&n!==n}nB.exports=GRe});var rD=Ge((oWa,aB)=>{var MRe=DM();function ARe(e,n){for(var a=e.length;a--;)if(MRe(e[a][0],n))return a;return-1}aB.exports=ARe});var rB=Ge((uWa,tB)=>{var LRe=rD(),xRe=Array.prototype,PRe=xRe.splice;function jRe(e){var n=this.__data__,a=LRe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():PRe.call(n,a,1),--this.size,!0}tB.exports=jRe});var uB=Ge((iWa,oB)=>{var NRe=rD();function ORe(e){var n=this.__data__,a=NRe(n,e);return a<0?void 0:n[a][1]}oB.exports=ORe});var lB=Ge((lWa,iB)=>{var URe=rD();function kRe(e){return URe(this.__data__,e)>-1}iB.exports=kRe});var sB=Ge((cWa,cB)=>{var BRe=rD();function HRe(e,n){var a=this.__data__,t=BRe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}cB.exports=HRe});var oD=Ge((sWa,vB)=>{var JRe=eB(),qRe=rB(),WRe=uB(),$Re=lB(),zRe=sB();function ed(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var VRe=oD();function QRe(){this.__data__=new VRe,this.size=0}fB.exports=QRe});var dB=Ge((fWa,pB)=>{function KRe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}pB.exports=KRe});var hB=Ge((_Wa,mB)=>{function YRe(e){return this.__data__.get(e)}mB.exports=YRe});var gB=Ge((pWa,DB)=>{function XRe(e){return this.__data__.has(e)}DB.exports=XRe});var gM=Ge((dWa,RB)=>{var ZRe=typeof global=="object"&&global&&global.Object===Object&&global;RB.exports=ZRe});var es=Ge((mWa,yB)=>{var eye=gM(),nye=typeof self=="object"&&self&&self.Object===Object&&self,aye=eye||nye||Function("return this")();yB.exports=aye});var u1=Ge((hWa,bB)=>{var tye=es(),rye=tye.Symbol;bB.exports=rye});var TB=Ge((DWa,IB)=>{var wB=u1(),EB=Object.prototype,oye=EB.hasOwnProperty,uye=EB.toString,uD=wB?wB.toStringTag:void 0;function iye(e){var n=oye.call(e,uD),a=e[uD];try{e[uD]=void 0;var t=!0}catch{}var r=uye.call(e);return t&&(n?e[uD]=a:delete e[uD]),r}IB.exports=iye});var CB=Ge((gWa,SB)=>{var lye=Object.prototype,cye=lye.toString;function sye(e){return cye.call(e)}SB.exports=sye});var iD=Ge((RWa,MB)=>{var FB=u1(),vye=TB(),fye=CB(),_ye="[object Null]",pye="[object Undefined]",GB=FB?FB.toStringTag:void 0;function dye(e){return e==null?e===void 0?pye:_ye:GB&&GB in Object(e)?vye(e):fye(e)}MB.exports=dye});var RM=Ge((yWa,AB)=>{function mye(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}AB.exports=mye});var yM=Ge((bWa,LB)=>{var hye=iD(),Dye=RM(),gye="[object AsyncFunction]",Rye="[object Function]",yye="[object GeneratorFunction]",bye="[object Proxy]";function wye(e){if(!Dye(e))return!1;var n=hye(e);return n==Rye||n==yye||n==gye||n==bye}LB.exports=wye});var PB=Ge((wWa,xB)=>{var Eye=es(),Iye=Eye["__core-js_shared__"];xB.exports=Iye});var OB=Ge((EWa,NB)=>{var bM=PB(),jB=function(){var e=/[^.]+$/.exec(bM&&bM.keys&&bM.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Tye(e){return!!jB&&jB in e}NB.exports=Tye});var wM=Ge((IWa,UB)=>{var Sye=Function.prototype,Cye=Sye.toString;function Fye(e){if(e!=null){try{return Cye.call(e)}catch{}try{return e+""}catch{}}return""}UB.exports=Fye});var BB=Ge((TWa,kB)=>{var Gye=yM(),Mye=OB(),Aye=RM(),Lye=wM(),xye=/[\\^$.*+?()[\]{}|]/g,Pye=/^\[object .+?Constructor\]$/,jye=Function.prototype,Nye=Object.prototype,Oye=jye.toString,Uye=Nye.hasOwnProperty,kye=RegExp("^"+Oye.call(Uye).replace(xye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bye(e){if(!Aye(e)||Mye(e))return!1;var n=Gye(e)?kye:Pye;return n.test(Lye(e))}kB.exports=Bye});var JB=Ge((SWa,HB)=>{function Hye(e,n){return e==null?void 0:e[n]}HB.exports=Hye});var K_=Ge((CWa,qB)=>{var Jye=BB(),qye=JB();function Wye(e,n){var a=qye(e,n);return Jye(a)?a:void 0}qB.exports=Wye});var i1=Ge((FWa,WB)=>{var $ye=K_(),zye=es(),Vye=$ye(zye,"Map");WB.exports=Vye});var lD=Ge((GWa,$B)=>{var Qye=K_(),Kye=Qye(Object,"create");$B.exports=Kye});var QB=Ge((MWa,VB)=>{var zB=lD();function Yye(){this.__data__=zB?zB(null):{},this.size=0}VB.exports=Yye});var YB=Ge((AWa,KB)=>{function Xye(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}KB.exports=Xye});var ZB=Ge((LWa,XB)=>{var Zye=lD(),ebe="__lodash_hash_undefined__",nbe=Object.prototype,abe=nbe.hasOwnProperty;function tbe(e){var n=this.__data__;if(Zye){var a=n[e];return a===ebe?void 0:a}return abe.call(n,e)?n[e]:void 0}XB.exports=tbe});var nH=Ge((xWa,eH)=>{var rbe=lD(),obe=Object.prototype,ube=obe.hasOwnProperty;function ibe(e){var n=this.__data__;return rbe?n[e]!==void 0:ube.call(n,e)}eH.exports=ibe});var tH=Ge((PWa,aH)=>{var lbe=lD(),cbe="__lodash_hash_undefined__";function sbe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=lbe&&n===void 0?cbe:n,this}aH.exports=sbe});var oH=Ge((jWa,rH)=>{var vbe=QB(),fbe=YB(),_be=ZB(),pbe=nH(),dbe=tH();function nd(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var uH=oH(),mbe=oD(),hbe=i1();function Dbe(){this.size=0,this.__data__={hash:new uH,map:new(hbe||mbe),string:new uH}}iH.exports=Dbe});var sH=Ge((OWa,cH)=>{function gbe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}cH.exports=gbe});var cD=Ge((UWa,vH)=>{var Rbe=sH();function ybe(e,n){var a=e.__data__;return Rbe(n)?a[typeof n=="string"?"string":"hash"]:a.map}vH.exports=ybe});var _H=Ge((kWa,fH)=>{var bbe=cD();function wbe(e){var n=bbe(this,e).delete(e);return this.size-=n?1:0,n}fH.exports=wbe});var dH=Ge((BWa,pH)=>{var Ebe=cD();function Ibe(e){return Ebe(this,e).get(e)}pH.exports=Ibe});var hH=Ge((HWa,mH)=>{var Tbe=cD();function Sbe(e){return Tbe(this,e).has(e)}mH.exports=Sbe});var gH=Ge((JWa,DH)=>{var Cbe=cD();function Fbe(e,n){var a=Cbe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}DH.exports=Fbe});var EM=Ge((qWa,RH)=>{var Gbe=lH(),Mbe=_H(),Abe=dH(),Lbe=hH(),xbe=gH();function ad(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var Pbe=oD(),jbe=i1(),Nbe=EM(),Obe=200;function Ube(e,n){var a=this.__data__;if(a instanceof Pbe){var t=a.__data__;if(!jbe||t.length{var kbe=oD(),Bbe=_B(),Hbe=dB(),Jbe=hB(),qbe=gB(),Wbe=bH();function td(e){var n=this.__data__=new kbe(e);this.size=n.size}td.prototype.clear=Bbe;td.prototype.delete=Hbe;td.prototype.get=Jbe;td.prototype.has=qbe;td.prototype.set=Wbe;wH.exports=td});var TH=Ge((zWa,IH)=>{var $be="__lodash_hash_undefined__";function zbe(e){return this.__data__.set(e,$be),this}IH.exports=zbe});var CH=Ge((VWa,SH)=>{function Vbe(e){return this.__data__.has(e)}SH.exports=Vbe});var GH=Ge((QWa,FH)=>{var Qbe=EM(),Kbe=TH(),Ybe=CH();function l1(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new Qbe;++n{function Xbe(e,n){for(var a=-1,t=e==null?0:e.length;++a{function Zbe(e,n){return e.has(n)}LH.exports=Zbe});var IM=Ge((XWa,PH)=>{var ewe=GH(),nwe=AH(),awe=xH(),twe=1,rwe=2;function owe(e,n,a,t,r,u){var i=a&twe,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var m=u.get(e),p=u.get(n);if(m&&p)return m==n&&p==e;var g=-1,E=!0,b=a&rwe?new ewe:void 0;for(u.set(e,n),u.set(n,e);++g{var uwe=es(),iwe=uwe.Uint8Array;jH.exports=iwe});var UH=Ge((e$a,OH)=>{function lwe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}OH.exports=lwe});var BH=Ge((n$a,kH)=>{function cwe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}kH.exports=cwe});var $H=Ge((a$a,WH)=>{var HH=u1(),JH=NH(),swe=DM(),vwe=IM(),fwe=UH(),_we=BH(),pwe=1,dwe=2,mwe="[object Boolean]",hwe="[object Date]",Dwe="[object Error]",gwe="[object Map]",Rwe="[object Number]",ywe="[object RegExp]",bwe="[object Set]",wwe="[object String]",Ewe="[object Symbol]",Iwe="[object ArrayBuffer]",Twe="[object DataView]",qH=HH?HH.prototype:void 0,TM=qH?qH.valueOf:void 0;function Swe(e,n,a,t,r,u,i){switch(a){case Twe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Iwe:return!(e.byteLength!=n.byteLength||!u(new JH(e),new JH(n)));case mwe:case hwe:case Rwe:return swe(+e,+n);case Dwe:return e.name==n.name&&e.message==n.message;case ywe:case wwe:return e==n+"";case gwe:var l=fwe;case bwe:var s=t&pwe;if(l||(l=_we),e.size!=n.size&&!s)return!1;var m=i.get(e);if(m)return m==n;t|=dwe,i.set(e,n);var p=vwe(l(e),l(n),t,r,u,i);return i.delete(e),p;case Ewe:if(TM)return TM.call(e)==TM.call(n)}return!1}WH.exports=Swe});var VH=Ge((t$a,zH)=>{function Cwe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var Fwe=Array.isArray;QH.exports=Fwe});var YH=Ge((o$a,KH)=>{var Gwe=VH(),Mwe=c1();function Awe(e,n,a){var t=n(e);return Mwe(e)?t:Gwe(t,a(e))}KH.exports=Awe});var ZH=Ge((u$a,XH)=>{function Lwe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function xwe(){return[]}eJ.exports=xwe});var rJ=Ge((l$a,tJ)=>{var Pwe=ZH(),jwe=nJ(),Nwe=Object.prototype,Owe=Nwe.propertyIsEnumerable,aJ=Object.getOwnPropertySymbols,Uwe=aJ?function(e){return e==null?[]:(e=Object(e),Pwe(aJ(e),function(n){return Owe.call(e,n)}))}:jwe;tJ.exports=Uwe});var uJ=Ge((c$a,oJ)=>{function kwe(e,n){for(var a=-1,t=Array(e);++a{function Bwe(e){return e!=null&&typeof e=="object"}iJ.exports=Bwe});var cJ=Ge((v$a,lJ)=>{var Hwe=iD(),Jwe=sD(),qwe="[object Arguments]";function Wwe(e){return Jwe(e)&&Hwe(e)==qwe}lJ.exports=Wwe});var _J=Ge((f$a,fJ)=>{var sJ=cJ(),$we=sD(),vJ=Object.prototype,zwe=vJ.hasOwnProperty,Vwe=vJ.propertyIsEnumerable,Qwe=sJ(function(){return arguments}())?sJ:function(e){return $we(e)&&zwe.call(e,"callee")&&!Vwe.call(e,"callee")};fJ.exports=Qwe});var dJ=Ge((_$a,pJ)=>{function Kwe(){return!1}pJ.exports=Kwe});var SM=Ge((vD,rd)=>{var Ywe=es(),Xwe=dJ(),mJ=typeof vD=="object"&&vD&&!vD.nodeType&&vD,hJ=mJ&&typeof rd=="object"&&rd&&!rd.nodeType&&rd,Zwe=hJ&&hJ.exports===mJ,DJ=Zwe?Ywe.Buffer:void 0,e1e=DJ?DJ.isBuffer:void 0,n1e=e1e||Xwe;rd.exports=n1e});var RJ=Ge((p$a,gJ)=>{var a1e=9007199254740991,t1e=/^(?:0|[1-9]\d*)$/;function r1e(e,n){var a=typeof e;return n=n==null?a1e:n,!!n&&(a=="number"||a!="symbol"&&t1e.test(e))&&e>-1&&e%1==0&&e{var o1e=9007199254740991;function u1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=o1e}yJ.exports=u1e});var wJ=Ge((m$a,bJ)=>{var i1e=iD(),l1e=CM(),c1e=sD(),s1e="[object Arguments]",v1e="[object Array]",f1e="[object Boolean]",_1e="[object Date]",p1e="[object Error]",d1e="[object Function]",m1e="[object Map]",h1e="[object Number]",D1e="[object Object]",g1e="[object RegExp]",R1e="[object Set]",y1e="[object String]",b1e="[object WeakMap]",w1e="[object ArrayBuffer]",E1e="[object DataView]",I1e="[object Float32Array]",T1e="[object Float64Array]",S1e="[object Int8Array]",C1e="[object Int16Array]",F1e="[object Int32Array]",G1e="[object Uint8Array]",M1e="[object Uint8ClampedArray]",A1e="[object Uint16Array]",L1e="[object Uint32Array]",dr={};dr[I1e]=dr[T1e]=dr[S1e]=dr[C1e]=dr[F1e]=dr[G1e]=dr[M1e]=dr[A1e]=dr[L1e]=!0;dr[s1e]=dr[v1e]=dr[w1e]=dr[f1e]=dr[E1e]=dr[_1e]=dr[p1e]=dr[d1e]=dr[m1e]=dr[h1e]=dr[D1e]=dr[g1e]=dr[R1e]=dr[y1e]=dr[b1e]=!1;function x1e(e){return c1e(e)&&l1e(e.length)&&!!dr[i1e(e)]}bJ.exports=x1e});var IJ=Ge((h$a,EJ)=>{function P1e(e){return function(n){return e(n)}}EJ.exports=P1e});var SJ=Ge((_D,od)=>{var j1e=gM(),TJ=typeof _D=="object"&&_D&&!_D.nodeType&&_D,fD=TJ&&typeof od=="object"&&od&&!od.nodeType&&od,N1e=fD&&fD.exports===TJ,FM=N1e&&j1e.process,O1e=function(){try{var e=fD&&fD.require&&fD.require("util").types;return e||FM&&FM.binding&&FM.binding("util")}catch{}}();od.exports=O1e});var GM=Ge((D$a,GJ)=>{var U1e=wJ(),k1e=IJ(),CJ=SJ(),FJ=CJ&&CJ.isTypedArray,B1e=FJ?k1e(FJ):U1e;GJ.exports=B1e});var AJ=Ge((g$a,MJ)=>{var H1e=uJ(),J1e=_J(),q1e=c1(),W1e=SM(),$1e=RJ(),z1e=GM(),V1e=Object.prototype,Q1e=V1e.hasOwnProperty;function K1e(e,n){var a=q1e(e),t=!a&&J1e(e),r=!a&&!t&&W1e(e),u=!a&&!t&&!r&&z1e(e),i=a||t||r||u,l=i?H1e(e.length,String):[],s=l.length;for(var m in e)(n||Q1e.call(e,m))&&!(i&&(m=="length"||r&&(m=="offset"||m=="parent")||u&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||$1e(m,s)))&&l.push(m);return l}MJ.exports=K1e});var xJ=Ge((R$a,LJ)=>{var Y1e=Object.prototype;function X1e(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||Y1e;return e===a}LJ.exports=X1e});var jJ=Ge((y$a,PJ)=>{function Z1e(e,n){return function(a){return e(n(a))}}PJ.exports=Z1e});var OJ=Ge((b$a,NJ)=>{var eEe=jJ(),nEe=eEe(Object.keys,Object);NJ.exports=nEe});var kJ=Ge((w$a,UJ)=>{var aEe=xJ(),tEe=OJ(),rEe=Object.prototype,oEe=rEe.hasOwnProperty;function uEe(e){if(!aEe(e))return tEe(e);var n=[];for(var a in Object(e))oEe.call(e,a)&&a!="constructor"&&n.push(a);return n}UJ.exports=uEe});var HJ=Ge((E$a,BJ)=>{var iEe=yM(),lEe=CM();function cEe(e){return e!=null&&lEe(e.length)&&!iEe(e)}BJ.exports=cEe});var qJ=Ge((I$a,JJ)=>{var sEe=AJ(),vEe=kJ(),fEe=HJ();function _Ee(e){return fEe(e)?sEe(e):vEe(e)}JJ.exports=_Ee});var $J=Ge((T$a,WJ)=>{var pEe=YH(),dEe=rJ(),mEe=qJ();function hEe(e){return pEe(e,mEe,dEe)}WJ.exports=hEe});var QJ=Ge((S$a,VJ)=>{var zJ=$J(),DEe=1,gEe=Object.prototype,REe=gEe.hasOwnProperty;function yEe(e,n,a,t,r,u){var i=a&DEe,l=zJ(e),s=l.length,m=zJ(n),p=m.length;if(s!=p&&!i)return!1;for(var g=s;g--;){var E=l[g];if(!(i?E in n:REe.call(n,E)))return!1}var b=u.get(e),I=u.get(n);if(b&&I)return b==n&&I==e;var L=!0;u.set(e,n),u.set(n,e);for(var N=i;++g{var bEe=K_(),wEe=es(),EEe=bEe(wEe,"DataView");KJ.exports=EEe});var ZJ=Ge((F$a,XJ)=>{var IEe=K_(),TEe=es(),SEe=IEe(TEe,"Promise");XJ.exports=SEe});var nq=Ge((G$a,eq)=>{var CEe=K_(),FEe=es(),GEe=CEe(FEe,"Set");eq.exports=GEe});var tq=Ge((M$a,aq)=>{var MEe=K_(),AEe=es(),LEe=MEe(AEe,"WeakMap");aq.exports=LEe});var vq=Ge((A$a,sq)=>{var MM=YJ(),AM=i1(),LM=ZJ(),xM=nq(),PM=tq(),rq=iD(),ud=wM(),oq="[object Map]",xEe="[object Object]",uq="[object Promise]",iq="[object Set]",lq="[object WeakMap]",cq="[object DataView]",PEe=ud(MM),jEe=ud(AM),NEe=ud(LM),OEe=ud(xM),UEe=ud(PM),Y_=rq;(MM&&Y_(new MM(new ArrayBuffer(1)))!=cq||AM&&Y_(new AM)!=oq||LM&&Y_(LM.resolve())!=uq||xM&&Y_(new xM)!=iq||PM&&Y_(new PM)!=lq)&&(Y_=function(e){var n=rq(e),a=n==xEe?e.constructor:void 0,t=a?ud(a):"";if(t)switch(t){case PEe:return cq;case jEe:return oq;case NEe:return uq;case OEe:return iq;case UEe:return lq}return n});sq.exports=Y_});var gq=Ge((L$a,Dq)=>{var jM=EH(),kEe=IM(),BEe=$H(),HEe=QJ(),fq=vq(),_q=c1(),pq=SM(),JEe=GM(),qEe=1,dq="[object Arguments]",mq="[object Array]",s1="[object Object]",WEe=Object.prototype,hq=WEe.hasOwnProperty;function $Ee(e,n,a,t,r,u){var i=_q(e),l=_q(n),s=i?mq:fq(e),m=l?mq:fq(n);s=s==dq?s1:s,m=m==dq?s1:m;var p=s==s1,g=m==s1,E=s==m;if(E&&pq(e)){if(!pq(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new jM),i||JEe(e)?kEe(e,n,a,t,r,u):BEe(e,n,s,a,t,r,u);if(!(a&qEe)){var b=p&&hq.call(e,"__wrapped__"),I=g&&hq.call(n,"__wrapped__");if(b||I){var L=b?e.value():e,N=I?n.value():n;return u||(u=new jM),r(L,N,a,t,u)}}return E?(u||(u=new jM),HEe(e,n,a,t,r,u)):!1}Dq.exports=$Ee});var wq=Ge((x$a,bq)=>{var zEe=gq(),Rq=sD();function yq(e,n,a,t,r){return e===n?!0:e==null||n==null||!Rq(e)&&!Rq(n)?e!==e&&n!==n:zEe(e,n,a,t,yq,r)}bq.exports=yq});var Iq=Ge((P$a,Eq)=>{var VEe=wq();function QEe(e,n){return VEe(e,n)}Eq.exports=QEe});var cW=Ge((QVa,wIe)=>{wIe.exports=`.rc-tooltip.rc-tooltip-zoom-appear, .rc-tooltip.rc-tooltip-zoom-enter { opacity: 0; } .rc-tooltip.rc-tooltip-zoom-enter, .rc-tooltip.rc-tooltip-zoom-leave { display: block; } .rc-tooltip-zoom-enter, .rc-tooltip-zoom-appear { opacity: 0; animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28); animation-play-state: paused; } .rc-tooltip-zoom-leave { animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05); animation-play-state: paused; } .rc-tooltip-zoom-enter.rc-tooltip-zoom-enter-active, .rc-tooltip-zoom-appear.rc-tooltip-zoom-appear-active { animation-name: rcToolTipZoomIn; animation-play-state: running; } .rc-tooltip-zoom-leave.rc-tooltip-zoom-leave-active { animation-name: rcToolTipZoomOut; animation-play-state: running; } @keyframes rcToolTipZoomIn { 0% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } 100% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } } @keyframes rcToolTipZoomOut { 0% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } 100% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } } .rc-tooltip { position: absolute; z-index: 1070; display: block; visibility: visible; line-height: 1.5; font-size: 12px; background-color: rgba(0, 0, 0, 0.05); padding: 1px; opacity: 0.9; } .rc-tooltip-hidden { display: none; } .rc-tooltip-inner { padding: 8px 10px; color: #333333; text-align: left; text-decoration: none; background-color: #ffffff; border-radius: 3px; min-height: 34px; border: 1px solid #b1b1b1; } .rc-tooltip-arrow, .rc-tooltip-arrow-inner { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .rc-tooltip-placement-top .rc-tooltip-arrow, .rc-tooltip-placement-topLeft .rc-tooltip-arrow, .rc-tooltip-placement-topRight .rc-tooltip-arrow { bottom: -5px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #b1b1b1; } .rc-tooltip-placement-top .rc-tooltip-arrow-inner, .rc-tooltip-placement-topLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-topRight .rc-tooltip-arrow-inner { bottom: 1px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #ffffff; } .rc-tooltip-placement-top .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-topLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-topRight .rc-tooltip-arrow { right: 15%; } .rc-tooltip-placement-right .rc-tooltip-arrow, .rc-tooltip-placement-rightTop .rc-tooltip-arrow, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { left: -5px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #b1b1b1; } .rc-tooltip-placement-right .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow-inner { left: 1px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #ffffff; } .rc-tooltip-placement-right .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-rightTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-left .rc-tooltip-arrow, .rc-tooltip-placement-leftTop .rc-tooltip-arrow, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { right: -5px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #b1b1b1; } .rc-tooltip-placement-left .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow-inner { right: 1px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #ffffff; } .rc-tooltip-placement-left .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-leftTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-bottom .rc-tooltip-arrow, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { top: -5px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #b1b1b1; } .rc-tooltip-placement-bottom .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow-inner { top: 1px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #ffffff; } .rc-tooltip-placement-bottom .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { right: 15%; } `});var FK=Ge((ng,FL)=>{typeof window!="undefined"&&function(n,a){typeof ng=="object"&&typeof FL=="object"?FL.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ng=="object"?ng.Hls=a():n.Hls=a()}(ng,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="/dist/",a(a.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(e,n,a){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(r=!1));function i(p,g,E){this.fn=p,this.context=g,this.once=E||!1}function l(p,g,E,b,I){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,b||p,I),N=r?r+g:g;return p._events[N]?p._events[N].fn?p._events[N]=[p._events[N],L]:p._events[N].push(L):(p._events[N]=L,p._eventsCount++),p}function s(p,g){--p._eventsCount==0?p._events=new u:delete p._events[g]}function m(){this._events=new u,this._eventsCount=0}m.prototype.eventNames=function(){var g=[],E,b;if(this._eventsCount===0)return g;for(b in E=this._events)t.call(E,b)&&g.push(r?b.slice(1):b);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(E)):g},m.prototype.listeners=function(g){var E=r?r+g:g,b=this._events[E];if(!b)return[];if(b.fn)return[b.fn];for(var I=0,L=b.length,N=new Array(L);I0},!1)}function p(g,E){for(var b={main:[E]},I={main:[]},L={main:{}};m(b);)for(var N=Object.keys(b),z=0;z>>8^ja&255^99,ne[Kn]=ja,ue[ja]=Kn;var Ma=yn[Kn],sa=yn[Ma],At=yn[sa],qe=yn[ja]*257^ja*16843008;Y[Kn]=qe<<24|qe>>>8,X[Kn]=qe<<16|qe>>>16,ve[Kn]=qe<<8|qe>>>24,xe[Kn]=qe,qe=At*16843009^sa*65537^Ma*257^Kn*16843008,rn[ja]=qe<<24|qe>>>8,wn[ja]=qe<<16|qe>>>16,dn[ja]=qe<<8|qe>>>24,mn[ja]=qe,Kn?(Kn=Ma^yn[yn[yn[At^Ma]]],zn^=yn[yn[zn]]):Kn=zn=1}},z.expandKey=function(ne){for(var ue=this.uint8ArrayToUint32Array_(ne),Z=!0,Y=0;Y>>6)+1,j=(K[O+2]&60)>>>2,j>Ee.length-1){J.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+j});return}return V=(K[O+2]&1)<<2,V|=(K[O+3]&192)>>>6,l.logger.log("manifest codec:"+S+",ADTS data:type:"+x+",sampleingIndex:"+j+"["+Ee[j]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?j>=6?(x=5,le=new Array(4),W=j-3):(x=2,le=new Array(2),W=j):ie.indexOf("android")!==-1?(x=2,le=new Array(2),W=j):(x=5,le=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&j>=6?W=j-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(j>=6&&V===1||/vivaldi/i.test(ie))||!S&&V===1)&&(x=2,le=new Array(2)),W=j)),le[0]=x<<3,le[0]|=(j&14)>>1,le[1]|=(j&1)<<7,le[1]|=V<<3,x===5&&(le[1]|=(W&14)>>1,le[2]=(W&1)<<7,le[2]|=2<<2,le[3]=0),{config:le,samplerate:Ee[j],channelCount:V,codec:"mp4a.40."+x,manifestCodec:ge}}function p(J,K){return J[K]===255&&(J[K+1]&246)==240}function g(J,K){return J[K+1]&1?7:9}function E(J,K){return(J[K+3]&3)<<11|J[K+4]<<3|(J[K+5]&224)>>>5}function b(J,K){return!!(K+10&&K+j+W<=le)return V=O+S*x,{headerLength:j,frameLength:W,stamp:V}}function $(J,K,O,S,x){var j=N(J.samplerate),W=z(K,O,S,x,j);if(W){var V=W.stamp,le=W.headerLength,ie=W.frameLength,ge={unit:K.subarray(O+le,O+le+ie),pts:V,dts:V};return J.samples.push(ge),{sample:ge,length:ie+le}}}var ne=a("./src/demux/id3.js"),ue=function(){function J(O,S,x){this.observer=O,this.config=x,this.remuxer=S}var K=J.prototype;return K.resetInitSegment=function(S,x,j,W){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:x,duration:W,inputTimeScale:9e4}},K.resetTimeStamp=function(){},J.probe=function(S){if(!S)return!1;for(var x=ne.default.getID3Data(S,0)||[],j=x.length,W=S.length;jO.length)){var W=this.parseHeader(O,S);if(W&&S+W.frameLength<=O.length){var V=W.samplesPerFrame*9e4/W.sampleRate,le=x+j*V,ie={unit:O.subarray(S,S+W.frameLength),pts:le,dts:le};return K.config=[],K.channelCount=W.channelCount,K.samplerate=W.sampleRate,K.samples.push(ie),{sample:ie,length:W.frameLength}}}},parseHeader:function(K,O){var S=K[O+1]>>3&3,x=K[O+1]>>1&3,j=K[O+2]>>4&15,W=K[O+2]>>2&3,V=K[O+2]>>1&1;if(S!==1&&j!==0&&j!==15&&W!==3){var le=S===3?3-x:x===3?3:4,ie=X.BitratesMap[le*14+j-1]*1e3,ge=S===3?0:S===2?1:2,Ee=X.SamplingRateMap[ge*3+W],Ce=K[O+3]>>6==3?1:2,Ae=X.SamplesCoefficients[S][x],un=X.BytesInSlot[x],hn=Ae*8*un,Pe=parseInt(Ae*ie/Ee+V,10)*un;return{sampleRate:Ee,channelCount:Ce,frameLength:Pe,samplesPerFrame:hn}}},isHeaderPattern:function(K,O){return K[O]===255&&(K[O+1]&224)==224&&(K[O+1]&6)!=0},isHeader:function(K,O){return!!(O+1S?(this.word<<=S,this.bitsAvailable-=S):(S-=this.bitsAvailable,x=S>>3,S-=x>>3,this.bytesAvailable-=x,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},K.readBits=function(S){var x=Math.min(this.bitsAvailable,S),j=this.word>>>32-x;return S>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=x,this.bitsAvailable>0?this.word<<=x:this.bytesAvailable>0&&this.loadWord(),x=S-x,x>0&&this.bitsAvailable?j<>>S)!=0)return this.word<<=S,this.bitsAvailable-=S,S;return this.loadWord(),S+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var S=this.skipLZ();return this.readBits(S+1)-1},K.readEG=function(){var S=this.readUEG();return 1&S?1+S>>>1:-1*(S>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(S){var x=8,j=8,W,V;for(W=0;W=S.length){j();return}if(!(S[x].unit.length<32)){var W=this.decrypter.isSync();if(this.decryptAacSample(S,x,j,W),!W)return}}},K.getAvcEncryptedData=function(S){for(var x=Math.floor((S.length-48)/160)*16+16,j=new Int8Array(x),W=0,V=32;V<=S.length-16;V+=160,W+=16)j.set(S.subarray(V,V+16),W);return j},K.getAvcDecryptedUnit=function(S,x){x=new Uint8Array(x);for(var j=0,W=32;W<=S.length-16;W+=160,j+=16)S.set(x.subarray(j,j+16),W);return S},K.decryptAvcSample=function(S,x,j,W,V,le){var ie=this.discardEPB(V.data),ge=this.getAvcEncryptedData(ie),Ee=this;this.decryptBuffer(ge.buffer,function(Ce){V.data=Ee.getAvcDecryptedUnit(ie,Ce),le||Ee.decryptAvcSamples(S,x,j+1,W)})},K.decryptAvcSamples=function(S,x,j,W){for(;;x++,j=0){if(x>=S.length){W();return}for(var V=S[x].units;!(j>=V.length);j++){var le=V[j];if(!(le.length<=48||le.type!==1&&le.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(S,x,j,W,le,ie),!ie)return}}}},J}(),wn=rn,dn={video:1,audio:2,id3:3,text:4},mn=function(){function J(O,S,x,j){this.observer=O,this.config=x,this.typeSupported=j,this.remuxer=S,this.sampleAes=null}var K=J.prototype;return K.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new wn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},J.probe=function(S){var x=J._syncOffset(S);return x<0?!1:(x&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},J._syncOffset=function(S){for(var x=Math.min(1e3,S.length-3*188),j=0;j>4,Ee>1){if(Ce=V+5+S[V+4],Ce===V+188)continue}else Ce=V+4;switch(ge){case _a:ie&&(mt&&(Ae=mr(mt))&&Pr(Ae,!1),mt={data:[],size:0}),mt&&(mt.data.push(S.subarray(Ce,V+188)),mt.size+=V+188-Ce);break;case ot:ie&&(Na&&(Ae=mr(Na))&&(En.isAAC?go(Ae):Ir(Ae)),Na={data:[],size:0}),Na&&(Na.data.push(S.subarray(Ce,V+188)),Na.size+=V+188-Ce);break;case Ut:ie&&($t&&(Ae=mr($t))&&eu(Ae),$t={data:[],size:0}),$t&&($t.data.push(S.subarray(Ce,V+188)),$t.size+=V+188-Ce);break;case 0:ie&&(Ce+=S[Ce]+1),ya=this._pmtId=Ka(S,Ce);break;case ya:ie&&(Ce+=S[Ce]+1);var sr=Ct(S,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);_a=sr.avc,_a>0&&(Pe.pid=_a),ot=sr.audio,ot>0&&(En.pid=ot,En.isAAC=sr.isAAC),Ut=sr.id3,Ut>0&&(Vn.pid=Ut),un&&!hn&&(l.logger.log("reparse from beginning"),un=!1,V=jr-188),hn=this.pmtParsed=!0;break;case 17:case 8191:break;default:un=!0;break}}else this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});mt&&(Ae=mr(mt))?(Pr(Ae,!0),Pe.pesData=null):Pe.pesData=mt,Na&&(Ae=mr(Na))?(En.isAAC?go(Ae):Ir(Ae),En.pesData=null):(Na&&Na.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),En.pesData=Na),$t&&(Ae=mr($t))?(eu(Ae),Vn.pesData=null):Vn.pesData=$t,this.sampleAes==null?this.remuxer.remux(En,Pe,Vn,this._txtTrack,x,j,W):this.decryptAndRemux(En,Pe,Vn,this._txtTrack,x,j,W)},K.decryptAndRemux=function(S,x,j,W,V,le,ie){if(S.samples&&S.isAAC){var ge=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){ge.decryptAndRemuxAvc(S,x,j,W,V,le,ie)})}else this.decryptAndRemuxAvc(S,x,j,W,V,le,ie)},K.decryptAndRemuxAvc=function(S,x,j,W,V,le,ie){if(x.samples){var ge=this;this.sampleAes.decryptAvcSamples(x.samples,0,0,function(){ge.remuxer.remux(S,x,j,W,V,le,ie)})}else this.remuxer.remux(S,x,j,W,V,le,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(S,x){return(S[x+10]&31)<<8|S[x+11]},K._parsePMT=function(S,x,j,W){var V,le,ie,ge,Ee={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(S[x+1]&15)<<8|S[x+2],le=x+3+V-4,ie=(S[x+10]&15)<<8|S[x+11],x+=12+ie;x1;){var hn=new Uint8Array(un[0].length+un[1].length);hn.set(un[0]),hn.set(un[1],un[0].length),un[0]=hn,un.splice(1,1)}if(j=un[0],V=(j[0]<<16)+(j[1]<<8)+j[2],V===1){if(le=(j[4]<<8)+j[5],le&&le>S.size-6||(W=j[7],W&192&&(Ee=(j[9]&14)*536870912+(j[10]&255)*4194304+(j[11]&254)*16384+(j[12]&255)*128+(j[13]&254)/2,Ee>4294967295&&(Ee-=8589934592),W&64?(Ce=(j[14]&14)*536870912+(j[15]&255)*4194304+(j[16]&254)*16384+(j[17]&255)*128+(j[18]&254)/2,Ce>4294967295&&(Ce-=8589934592),Ee-Ce>60*9e4&&(l.logger.warn(Math.round((Ee-Ce)/9e4)+"s delta between PTS and DTS, align them"),Ee=Ce)):Ce=Ee),ie=j[8],Ae=ie+9,S.size<=Ae))return null;S.size-=Ae,ge=new Uint8Array(S.size);for(var Pe=0,En=un.length;PeVn){Ae-=Vn;continue}else j=j.subarray(Ae),Vn-=Ae,Ae=0;ge.set(j,x),x+=Vn}return le&&(le-=ie+3),{data:ge,pts:Ee,dts:Ce,len:le}}else return null},K.pushAccesUnit=function(S,x){if(S.units.length&&S.frame){var j=x.samples,W=j.length;if(isNaN(S.pts))if(W){var V=j[W-1];S.pts=V.pts,S.dts=V.dts}else{x.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||x.sps&&(W||this.contiguous)?(S.id=W,j.push(S)):x.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},K._parseAVCPES=function(S,x){var j=this,W=this._avcTrack,V=this._parseAVCNALu(S.data),le=!1,ie,ge=this.avcSample,Ee,Ce=!1,Ae,un=this.pushAccesUnit.bind(this),hn=function(En,Vn,_a,ot){return{key:En,pts:Vn,dts:_a,units:[],debug:ot}};S.data=null,ge&&V.length&&!W.audFound&&(un(ge,W),ge=this.avcSample=hn(!1,S.pts,S.dts,"")),V.forEach(function(Pe){switch(Pe.type){case 1:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="NDR "),ge.frame=!0;var En=Pe.data;if(Ce&&En.length>4){var Vn=new ke(En).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(ge.key=!0)}break;case 5:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="IDR "),ge.key=!0,ge.frame=!0;break;case 6:Ee=!0,le&&ge&&(ge.debug+="SEI "),ie=new ke(j.discardEPB(Pe.data)),ie.readUByte();for(var _a=0,ot=0,Ut=!1,ya=0;!Ut&&ie.bytesAvailable>1;){_a=0;do ya=ie.readUByte(),_a+=ya;while(ya===255);ot=0;do ya=ie.readUByte(),ot+=ya;while(ya===255);if(_a===4&&ie.bytesAvailable!==0){Ut=!0;var mt=ie.readUByte();if(mt===181){var Na=ie.readUShort();if(Na===49){var $t=ie.readUInt();if($t===1195456820){var Ka=ie.readUByte();if(Ka===3){var Ct=ie.readUByte(),mr=ie.readUByte(),Pr=31&Ct,go=[Ct,mr];for(Ae=0;Ae16){var Ir=[];for(Ae=0;Ae<16;Ae++)Ir.push(ie.readUByte().toString(16)),(Ae===3||Ae===5||Ae===7||Ae===9)&&Ir.push("-");var eu=ot-16,jr=new Uint8Array(eu);for(Ae=0;Ae0){if(x.pts>=S[j-1].pts)S.push(x);else for(var W=j-1;W>=0;W--)if(x.pts=0)Ce={data:S.subarray(un,x-ie-1),type:hn},Ee.push(Ce);else{var Pe=this._getLastNalUnit();if(Pe&&(ge&&x<=4-ge&&Pe.state&&(Pe.data=Pe.data.subarray(0,Pe.data.byteLength-ge)),V=x-ie-1,V>0)){var En=new Uint8Array(Pe.data.byteLength+V);En.set(Pe.data,0),En.set(S.subarray(0,V),Pe.data.byteLength),Pe.data=En}}x=0&&ie>=0&&(Ce={data:S.subarray(un,j),type:hn,state:ie},Ee.push(Ce)),Ee.length===0){var Vn=this._getLastNalUnit();if(Vn){var _a=new Uint8Array(Vn.data.byteLength+S.byteLength);_a.set(Vn.data,0),_a.set(S,Vn.data.byteLength),Vn.data=_a}}return le.naluState=ie,Ee},K.discardEPB=function(S){for(var x=S.byteLength,j=[],W=1,V,le;W1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-W)/90)),W=Vn)}for(;Ce>24&255,V[1]=x>>16&255,V[2]=x>>8&255,V[3]=x&255,V.set(O,4),j=0,x=8;j>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,85,196,0,0]))},J.mdia=function(O){return J.box(J.types.mdia,J.mdhd(O.timescale,O.duration),J.hdlr(O.type),J.minf(O))},J.mfhd=function(O){return J.box(J.types.mfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255]))},J.minf=function(O){return O.type==="audio"?J.box(J.types.minf,J.box(J.types.smhd,J.SMHD),J.DINF,J.stbl(O)):J.box(J.types.minf,J.box(J.types.vmhd,J.VMHD),J.DINF,J.stbl(O))},J.moof=function(O,S,x){return J.box(J.types.moof,J.mfhd(O),J.traf(x,S))},J.moov=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trak(O[S]);return J.box.apply(null,[J.types.moov,J.mvhd(O[0].timescale,O[0].duration)].concat(x).concat(J.mvex(O)))},J.mvex=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trex(O[S]);return J.box.apply(null,[J.types.mvex].concat(x))},J.mvhd=function(O,S){S*=O;var x=Math.floor(S/(Ma+1)),j=Math.floor(S%(Ma+1)),W=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,O>>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&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 J.box(J.types.mvhd,W)},J.sdtp=function(O){var S=O.samples||[],x=new Uint8Array(4+S.length),j,W;for(W=0;W>>8&255),S.push(V&255),S=S.concat(Array.prototype.slice.call(W));for(j=0;j>>8&255),x.push(V&255),x=x.concat(Array.prototype.slice.call(W));var le=J.box(J.types.avcC,new Uint8Array([1,S[3],S[4],S[5],252|3,224|O.sps.length].concat(S).concat([O.pps.length]).concat(x))),ie=O.width,ge=O.height,Ee=O.pixelRatio[0],Ce=O.pixelRatio[1];return J.box(J.types.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,ie>>8&255,ie&255,ge>>8&255,ge&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),le,J.box(J.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),J.box(J.types.pasp,new Uint8Array([Ee>>24,Ee>>16&255,Ee>>8&255,Ee&255,Ce>>24,Ce>>16&255,Ce>>8&255,Ce&255])))},J.esds=function(O){var S=O.config.length;return new Uint8Array([0,0,0,0,3,23+S,0,1,0,4,15+S,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([S]).concat(O.config).concat([6,1,2]))},J.mp4a=function(O){var S=O.samplerate;return J.box(J.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]),J.box(J.types.esds,J.esds(O)))},J.mp3=function(O){var S=O.samplerate;return J.box(J.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]))},J.stsd=function(O){return O.type==="audio"?!O.isAAC&&O.codec==="mp3"?J.box(J.types.stsd,J.STSD,J.mp3(O)):J.box(J.types.stsd,J.STSD,J.mp4a(O)):J.box(J.types.stsd,J.STSD,J.avc1(O))},J.tkhd=function(O){var S=O.id,x=O.duration*O.timescale,j=O.width,W=O.height,V=Math.floor(x/(Ma+1)),le=Math.floor(x%(Ma+1));return J.box(J.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,S>>24&255,S>>16&255,S>>8&255,S&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,le>>24,le>>16&255,le>>8&255,le&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,j>>8&255,j&255,0,0,W>>8&255,W&255,0,0]))},J.traf=function(O,S){var x=J.sdtp(O),j=O.id,W=Math.floor(S/(Ma+1)),V=Math.floor(S%(Ma+1));return J.box(J.types.traf,J.box(J.types.tfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255])),J.box(J.types.tfdt,new Uint8Array([1,0,0,0,W>>24,W>>16&255,W>>8&255,W&255,V>>24,V>>16&255,V>>8&255,V&255])),J.trun(O,x.length+16+20+8+16+8+8),x)},J.trak=function(O){return O.duration=O.duration||4294967295,J.box(J.types.trak,J.tkhd(O),J.mdia(O))},J.trex=function(O){var S=O.id;return J.box(J.types.trex,new Uint8Array([0,0,0,0,S>>24,S>>16&255,S>>8&255,S&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},J.trun=function(O,S){var x=O.samples||[],j=x.length,W=12+16*j,V=new Uint8Array(W),le,ie,ge,Ee,Ce,Ae;for(S+=8+W,V.set([0,0,15,1,j>>>24&255,j>>>16&255,j>>>8&255,j&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255],0),le=0;le>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255,Ce.isLeading<<2|Ce.dependsOn,Ce.isDependedOn<<6|Ce.hasRedundancy<<4|Ce.paddingValue<<1|Ce.isNonSync,Ce.degradPrio&240<<8,Ce.degradPrio&15,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255],12+16*le);return J.box(J.types.trun,V)},J.initSegment=function(O){J.types||J.init();var S=J.moov(O),x;return x=new Uint8Array(J.FTYP.byteLength+S.byteLength),x.set(J.FTYP),x.set(S,J.FTYP.byteLength),x},J}(),At=sa,qe=9e4;function pa(J,K,O,S){return O===void 0&&(O=1),S===void 0&&(S=!1),Qa(J,K,1/O)}function Qa(J,K,O,S){O===void 0&&(O=1),S===void 0&&(S=!1);var x=J*K*O;return S?Math.round(x):x}function Tn(J,K){return K===void 0&&(K=!1),Qa(J,1e3,1/qe,K)}function Dn(J,K){return K===void 0&&(K=1),Qa(J,qe,1/K)}var We=Dn(10),ea=Dn(.2),va=function(){function J(O,S,x,j){this.observer=O,this.config=S,this.typeSupported=x;var W=navigator.userAgent;this.isSafari=j&&j.indexOf("Apple")>-1&&W&&!W.match("CriOS"),this.ISGenerated=!1}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(S,x,j,W,V,le,ie){if(this.ISGenerated||this.generateIS(S,x,V),this.ISGenerated){var ge=S.samples.length,Ee=x.samples.length,Ce=V,Ae=V;if(ge&&Ee){var un=(S.samples[0].pts-x.samples[0].pts)/x.inputTimeScale;Ce+=Math.max(0,un),Ae+=Math.max(0,-un)}if(ge){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,x,V));var hn=this.remuxAudio(S,Ce,le,ie);if(Ee){var Pe;hn&&(Pe=hn.endPTS-hn.startPTS),x.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,x,V)),this.remuxVideo(x,Ae,le,Pe,ie)}}else if(Ee){var En=this.remuxVideo(x,Ae,le,0,ie);En&&S.codec&&this.remuxEmptyAudio(S,Ce,le,En)}}j.samples.length&&this.remuxID3(j,V),W.samples.length&&this.remuxText(W,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(S,x,j){var W=this.observer,V=S.samples,le=x.samples,ie=this.typeSupported,ge="audio/mp4",Ee={},Ce={tracks:Ee},Ae=this._initPTS===void 0,un,hn;if(Ae&&(un=hn=1/0),S.config&&V.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ie.mpeg?(ge="audio/mpeg",S.codec=""):ie.mp3&&(S.codec="mp3")),Ee.audio={container:ge,codec:S.codec,initSegment:!S.isAAC&&ie.mpeg?new Uint8Array:At.initSegment([S]),metadata:{channelCount:S.channelCount}},Ae&&(un=hn=V[0].pts-S.inputTimeScale*j)),x.sps&&x.pps&&le.length){var Pe=x.inputTimeScale;x.timescale=Pe,Ee.video={container:"video/mp4",codec:x.codec,initSegment:At.initSegment([x]),metadata:{width:x.width,height:x.height}},Ae&&(un=Math.min(un,le[0].pts-Pe*j),hn=Math.min(hn,le[0].dts-Pe*j),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:un}))}Object.keys(Ee).length?(W.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Ce),this.ISGenerated=!0,Ae&&(this._initPTS=un,this._initDTS=hn)):W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(S,x,j,W,V){var le=8,ie,ge,Ee,Ce,Ae,un,hn,Pe=S.timescale,En=S.samples,Vn=[],_a=En.length,ot=this._PTSNormalize,Ut=this._initPTS,ya=this.nextAvcDts,mt=this.isSafari;if(_a!==0){mt&&(j|=En.length&&ya&&(V&&Math.abs(x-ya/Pe)<.1||Math.abs(En[0].pts-ya-Ut)1?l.logger.log("AVC: "+Tn(Ct,!0)+" ms hole between fragments detected,filling it"):Ct<-1&&l.logger.log("AVC: "+Tn(-Ct,!0)+" ms overlapping between fragments detected"),Ae=ya,En[0].dts=Ae,Ce=Math.max(Ce-Ct,ya),En[0].pts=Ce,l.logger.log("Video: PTS/DTS adjusted: "+Tn(Ce,!0)+"/"+Tn(Ae,!0)+", delta: "+Tn(Ct,!0)+" ms")),Ka=En[En.length-1],hn=Math.max(Ka.dts,0),un=Math.max(Ka.pts,0,hn),mt&&(ie=Math.round((hn-Ae)/(En.length-1)));for(var mr=0,Pr=0,go=0;go<_a;go++){for(var Ir=En[go],eu=Ir.units,jr=eu.length,sr=0,Qr=0;Qr0?xo-1:xo].dts;if(vs.stretchShortVideoTrack){var Qi=vs.maxBufferHole,Jd=Math.floor(Qi*Pe),Pf=(W?Ce+W*Pe:this.nextAudioPts)-Kr.pts;Pf>Jd?(ie=Pf-Pl,ie<0&&(ie=Pl),l.logger.log("It is approximately "+Tn(Pf,!1)+" ms to the next segment; using duration "+Tn(ie,!1)+" ms for the last video frame.")):ie=Pl}else ie=Pl}Vi=Math.round(Kr.pts-Kr.dts)}Vn.push({size:mi,duration:ie,cts:Vi,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:Kr.key?2:1,isNonSync:Kr.key?0:1}})}this.nextAvcDts=hn+ie;var R0=S.dropped;if(S.nbNalu=0,S.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var y0=Vn[0].flags;y0.dependsOn=2,y0.isNonSync=0}S.samples=Vn,Ee=At.moof(S.sequenceNumber++,Ae,S),S.samples=[];var Ki={data1:Ee,data2:ge,startPTS:Ce/Pe,endPTS:(un+ie)/Pe,startDTS:Ae/Pe,endDTS:this.nextAvcDts/Pe,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:R0};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Ki),Ki}},K.remuxAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.timescale,ie=V/le,ge=S.isAAC?1024:1152,Ee=ge*ie,Ce=this._PTSNormalize,Ae=this._initPTS,un=!S.isAAC&&this.typeSupported.mpeg,hn,Pe,En,Vn,_a,ot,Ut=un?0:8,ya=S.samples,mt=[],Na=this.nextAudioPts;if(j|=ya.length&&Na&&(W&&Math.abs(x-Na/V)<.1||Math.abs(ya[0].pts-Na-Ae)<20*Ee),ya.forEach(function(Qi){Qi.pts=Qi.dts=Ce(Qi.pts-Ae,x*V)}),ya=ya.filter(function(Qi){return Qi.pts>=0}),ya.length!==0){if(j||(W?Na=x*V:Na=ya[0].pts),S.isAAC)for(var $t=this.config.maxAudioFramesDrift,Ka=0,Ct=Na;Ka=$t*Ee&&Pr.1*Ee,mr.pts=mr.dts=Ct,Ct+=Ee,Ka++}for(var sr=ya.length,Qr=0;sr--;)Qr+=ya[sr].unit.byteLength;for(var Du=0,gu=ya.length;Du0&&mi0&&(Pe=ja.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),Pe||(Pe=Kr.subarray()),Qr+=Vi*Pe.length);else if(mi<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Tn(Na,!0)+" ms / "+Tn(Ju,!0)+" ms / "+Tn(-mi,!0)+" ms"),Qr-=Kr.byteLength;continue}Ju=Na}if(_a=Ju,Qr>0){Qr+=Ut;try{En=new Uint8Array(Qr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Qr,reason:"fail allocating audio mdat "+Qr});return}if(!un){var vc=new DataView(En.buffer);vc.setUint32(0,Qr),En.set(At.types.mdat,4)}}else return;for(var ss=0;ss=2&&(Ll=mt[sr-2].duration,hn.duration=Ll),sr){this.nextAudioPts=Na=ot+ie*Ll,S.samples=mt,un?Vn=new Uint8Array:Vn=At.moof(S.sequenceNumber++,_a/ie,S),S.samples=[];var xl=_a/V,vs=Na/V,Pl={data1:Vn,data2:En,startPTS:xl,endPTS:vs,startDTS:xl,endDTS:vs,type:"audio",hasAudio:!0,hasVideo:!1,nb:sr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Pl),Pl}return null}},K.remuxEmptyAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.samplerate?S.samplerate:V,ie=V/le,ge=this.nextAudioPts,Ee=(ge!==void 0?ge:W.startDTS*V)+this._initDTS,Ce=W.endDTS*V+this._initDTS,Ae=1024,un=ie*Ae,hn=Math.ceil((Ce-Ee)/un),Pe=ja.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!Pe){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var En=[],Vn=0;Vn4294967296;)S+=j;return S},J}(),Aa=va,dt=function(){function J(O){this.observer=O}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(S,x,j,W,V,le,ie,ge){var Ee=this.observer,Ce="";S&&(Ce+="audio"),x&&(Ce+="video"),Ee.trigger(t.default.FRAG_PARSING_DATA,{data1:ge,startPTS:V,startDTS:V,type:Ce,hasAudio:!!S,hasVideo:!!x,nb:1,dropped:0}),Ee.trigger(t.default.FRAG_PARSED)},J}(),vn=dt,oa=Object(s.getSelfScope)(),St;try{St=oa.performance.now.bind(oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),St=oa.Date.now}var Da=function(){function J(O,S,x,j){this.observer=O,this.typeSupported=S,this.config=x,this.vendor=j}var K=J.prototype;return K.destroy=function(){var S=this.demuxer;S&&S.destroy()},K.push=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this;if(S.byteLength>0&&x!=null&&x.key!=null&&x.method==="AES-128"){var Pe=this.decrypter;Pe==null&&(Pe=this.decrypter=new u.default(this.observer,this.config));var En=St();Pe.decrypt(S,x.key.buffer,x.iv.buffer,function(Vn){var _a=St();hn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:En,tdecrypt:_a}}),hn.pushDecrypted(new Uint8Array(Vn),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)})}else this.pushDecrypted(new Uint8Array(S),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)},K.pushDecrypted=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this.demuxer;if(!hn||(ie||ge)&&!this.probe(S)){for(var Pe=this.observer,En=this.typeSupported,Vn=this.config,_a=[{demux:yn,remux:Aa},{demux:Y.default,remux:vn},{demux:Z,remux:Aa},{demux:zn,remux:Aa}],ot=0,Ut=_a.length;ot1?L-1:0),z=1;z1?L-1:0),z=1;z0)return p.subarray(E,E+b)},s._readSize=function(p,g){var E=0;return E=(p[g]&127)<<21,E|=(p[g+1]&127)<<14,E|=(p[g+2]&127)<<7,E|=p[g+3]&127,E},s.getTimeStamp=function(p){for(var g=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ne+=String.fromCharCode(N);break;case 12:case 13:z=p[ue++],ne+=String.fromCharCode((N&31)<<6|z&63);break;case 14:z=p[ue++],$=p[ue++],ne+=String.fromCharCode((N&15)<<12|(z&63)<<6|($&63)<<0);break;default:}}return ne},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(u=new s.TextDecoder("utf-8")),u}var l=r._utf8ArrayToStr;n.default=r},"./src/demux/mp4demuxer.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),r=a("./src/events.js"),u=Math.pow(2,32)-1,i=function(){function l(m,p){this.observer=m,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,g,E,b){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);g==null&&(g="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:g+","+E,initSegment:b?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:g,initSegment:b?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else g&&(this.audioCodec=g),E&&(this.videoCodec=E)},l.probe=function(p){return l.findBox({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},l.bin2str=function(p){return String.fromCharCode.apply(null,p)},l.readUint16=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<8|p[g+1];return E<0?65536+E:E},l.readUint32=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3];return E<0?4294967296+E:E},l.writeUint32=function(p,g,E){p.data&&(g+=p.start,p=p.data),p[g]=E>>24,p[g+1]=E>>16&255,p[g+2]=E>>8&255,p[g+3]=E&255},l.findBox=function(p,g){var E=[],b,I,L,N,z,$,ne;if(p.data?($=p.start,N=p.end,p=p.data):($=0,N=p.byteLength),!g.length)return null;for(b=$;b1?b+I:N,L===g[0]&&(g.length===1?E.push({data:p,start:b+8,end:ne}):(z=l.findBox({data:p,start:b+8,end:ne},g.slice(1)),z.length&&(E=E.concat(z)))),b=ne;return E},l.parseSegmentIndex=function(p){var g=l.findBox(p,["moov"])[0],E=g?g.end:null,b=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var N=I.data[0];b=N===0?8:16;var z=l.readUint32(I,b);b+=4;var $=0,ne=0;N===0?b+=8:b+=16,b+=2;var ue=I.end+ne,Z=l.readUint16(I,b);b+=2;for(var Y=0;Y>>31;if(ke===1){console.warn("SIDX has hierarchical references (not supported)");return}var rn=l.readUint32(I,X);X+=4,L.push({referenceSize:xe,subsegmentDuration:rn,info:{duration:rn/z,start:ue,end:ue+xe-1}}),ue+=xe,X+=4,b=X}return{earliestPresentationTime:$,timescale:z,version:N,referencesCount:Z,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var g=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(b){var I=l.findBox(b,["tkhd"])[0];if(I){var L=I.data[I.start],N=L===0?12:20,z=l.readUint32(I,N),$=l.findBox(b,["mdia","mdhd"])[0];if($){L=$.data[$.start],N=L===0?12:20;var ne=l.readUint32($,N),ue=l.findBox(b,["mdia","hdlr"])[0];if(ue){var Z=l.bin2str(ue.data.subarray(ue.start+8,ue.start+12)),Y={soun:"audio",vide:"video"}[Z];if(Y){var X=l.findBox(b,["mdia","minf","stbl","stsd"]);if(X.length){X=X[0];var ve=l.bin2str(X.data.subarray(X.start+12,X.start+16));t.logger.log("MP4Demuxer:"+Y+":"+ve+" found")}g[z]={timescale:ne,type:Y},g[Y]={timescale:ne,id:z}}}}}}),g},l.getStartDTS=function(p,g){var E,b,I;return E=l.findBox(g,["moof","traf"]),b=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(N){var z,$,ne;return z=l.readUint32(N,4),$=p[z].timescale||9e4,ne=l.findBox(L,["tfdt"]).map(function(ue){var Z,Y;return Z=ue.data[ue.start],Y=l.readUint32(ue,4),Z===1&&(Y*=Math.pow(2,32),Y+=l.readUint32(ue,8)),Y})[0],ne/$})})),I=Math.min.apply(null,b),isFinite(I)?I:0},l.offsetStartDTS=function(p,g,E){l.findBox(g,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(I){var L=l.readUint32(I,4),N=p[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function(z){var $=z.data[z.start],ne=l.readUint32(z,4);if($===0)l.writeUint32(z,4,ne-E*N);else{ne*=Math.pow(2,32),ne+=l.readUint32(z,8),ne-=E*N,ne=Math.max(ne,0);var ue=Math.floor(ne/(u+1)),Z=Math.floor(ne%(u+1));l.writeUint32(z,4,ue),l.writeUint32(z,8,Z)}})})})},s.append=function(p,g,E,b){var I=this.initData;I||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),I=this.initData);var L,N=this.initPTS;if(N===void 0){var z=l.getStartDTS(I,p);this.initPTS=N=z-g,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:N})}l.offsetStartDTS(I,p,N),L=l.getStartDTS(I,p),this.remuxer.remux(I.audio,I.video,null,null,L,E,b,p)},s.destroy=function(){},l}();n.default=i},"./src/errors.ts":function(e,n,a){"use strict";a.r(n),a.d(n,"ErrorTypes",function(){return t}),a.d(n,"ErrorDetails",function(){return r});var t;(function(u){u.NETWORK_ERROR="networkError",u.MEDIA_ERROR="mediaError",u.KEY_SYSTEM_ERROR="keySystemError",u.MUX_ERROR="muxError",u.OTHER_ERROR="otherError"})(t||(t={}));var r;(function(u){u.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",u.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",u.KEY_SYSTEM_NO_SESSION="keySystemNoSession",u.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",u.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",u.MANIFEST_LOAD_ERROR="manifestLoadError",u.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",u.MANIFEST_PARSING_ERROR="manifestParsingError",u.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",u.LEVEL_LOAD_ERROR="levelLoadError",u.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",u.LEVEL_SWITCH_ERROR="levelSwitchError",u.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",u.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",u.FRAG_LOAD_ERROR="fragLoadError",u.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",u.FRAG_DECRYPT_ERROR="fragDecryptError",u.FRAG_PARSING_ERROR="fragParsingError",u.REMUX_ALLOC_ERROR="remuxAllocError",u.KEY_LOAD_ERROR="keyLoadError",u.KEY_LOAD_TIMEOUT="keyLoadTimeOut",u.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",u.BUFFER_APPEND_ERROR="bufferAppendError",u.BUFFER_APPENDING_ERROR="bufferAppendingError",u.BUFFER_STALLED_ERROR="bufferStalledError",u.BUFFER_FULL_ERROR="bufferFullError",u.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",u.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",u.INTERNAL_EXCEPTION="internalException"})(r||(r={}))},"./src/events.js":function(e,n,a){"use strict";a.r(n);var t={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"};n.default=t},"./src/hls.ts":function(e,n,a){"use strict";a.r(n);var t={};a.r(t),a.d(t,"newCue",function(){return XI});var r=a("./node_modules/url-toolkit/src/url-toolkit.js"),u=a("./src/errors.ts"),i=a("./src/polyfills/number-isFinite.js"),l=a("./src/events.js"),s=a("./src/utils/logger.js"),m={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},p=function(){function w(f){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=f,this.onEvent=this.onEvent.bind(this);for(var v=arguments.length,o=new Array(v>1?v-1:0),c=1;c>8*(15-c)&255;return o},D.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new z(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},ne(w,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(v){this._url=v}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Object(i.isFiniteNumber)(this.programDateTime))return null;var v=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){return!!(this.decryptdata&&this.decryptdata.uri!==null&&this.decryptdata.key===null)}}]),w}();function Y(w,D){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:o},D.hexadecimalInteger=function(v){if(this[v]){var o=(this[v]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var c=new Uint8Array(o.length/2),_=0;_Number.MAX_SAFE_INTEGER?1/0:o},D.decimalFloatingPoint=function(v){return parseFloat(this[v])},D.enumeratedString=function(v){return this[v]},D.decimalResolution=function(v){var o=xe.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},w.parseAttrList=function(v){var o,c={};for(ke.lastIndex=0;(o=ke.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},w}(),wn=rn,dn={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function mn(w,D){var f=dn[D];return!!f&&f[w.slice(0,4)]===!0}function yn(w,D){return MediaSource.isTypeSupported((D||"video")+'/mp4;codecs="'+w+'"')}var Kn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,zn=/#EXT-X-MEDIA:(.*)/g,Wn=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),ja=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,Ma=/\.(mp4|m4s|m4v|m4a)$/i,sa=function(){function w(){}return w.findGroup=function(f,v){for(var o=0;o2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},w.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var o=[];Kn.lastIndex=0;function c(P,B){["video","audio"].forEach(function(k){var ae=P.filter(function($e){return mn($e,k)});if(ae.length){var be=ae.filter(function($e){return $e.lastIndexOf("avc1",0)===0||$e.lastIndexOf("mp4a",0)===0});B[k+"Codec"]=be.length>0?be[0]:ae[0],P=P.filter(function($e){return ae.indexOf($e)===-1})}}),B.unknownCodecs=P}for(var _;(_=Kn.exec(f))!=null;){var y={},C=y.attrs=new wn(_[1]);y.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(y.width=F.width,y.height=F.height),y.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),y.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),y),y.videoCodec&&y.videoCodec.indexOf("avc1")!==-1&&(y.videoCodec=w.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(zn.lastIndex=0;(_=zn.exec(f))!==null;){var F=new wn(_[1]);if(F.TYPE===o){var P={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:o,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(P.url=w.resolve(F.URI,v)),c.length){var B=w.findGroup(c,P.groupId);P.audioCodec=B?B.codec:c[0].codec}y.push(P)}}return y},w.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new ve(v),P=0,B=null,k=new Z,ae,be,$e,fn=null;for(Wn.lastIndex=0;(ae=Wn.exec(f))!==null;){var fa=ae[1];if(fa){k.duration=parseFloat(fa);var Xn=(" "+ae[2]).slice(1);k.title=Xn||null,k.tagList.push(Xn?["INF",fa,Xn]:["INF",fa])}else if(ae[3]){if(Object(i.isFiniteNumber)(k.duration)){var ua=y++;k.type=c,k.start=C,$e&&(k.levelkey=$e),k.sn=ua,k.level=o,k.cc=P,k.urlId=_,k.baseurl=v,k.relurl=(" "+ae[3]).slice(1),qe(k,B),F.fragments.push(k),B=k,C+=k.duration,k=new Z}}else if(ae[4]){var Ra=(" "+ae[4]).slice(1);B?k.setByteRange(Ra,B):k.setByteRange(Ra)}else if(ae[5])k.rawProgramDateTime=(" "+ae[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),fn===null&&(fn=F.fragments.length);else{if(ae=ae[0].match(ja),!ae){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(be=1;be=0&&($e.method=ft,$e.key=null,$e.iv=Oa));break}case"START":{var jo=new wn(Ja),C0=jo.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(C0)&&(F.startTimeOffset=C0);break}case"MAP":{var F0=new wn(Ja);k.relurl=F0.URI,F0.BYTERANGE&&k.setByteRange(F0.BYTERANGE),k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,k=new Z,k.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ae);break}}}return k=B,k&&!k.relurl&&(F.fragments.pop(),C-=k.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=y-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=P,!F.initSegment&&F.fragments.length&&F.fragments.every(function(yT){return Ma.test(yT.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),k=new Z,k.relurl=F.fragments[0].relurl,k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,F.needSidxRanges=!0),fn&&At(F.fragments,fn),F},w}();function At(w,D){for(var f=w[D],v=D-1;v>=0;v--){var o=w[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function qe(w,D){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):D&&D.programDateTime&&(w.programDateTime=D.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function pa(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Qa=window,Tn=Qa.performance,Dn=function(w){pa(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,o.loaders={},o}D.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},D.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return b.AUDIO;case E.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},D.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=D.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,y=c.loader,C=_||y,F=new C(c);return o.loader=F,this.loaders[o.type]=F,F},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.destroyInternalLoaders(),w.prototype.destroy.call(this)},f.onManifestLoading=function(o){this.load({url:o.url,type:E.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(o){this.load({url:o.url,type:E.LEVEL,level:o.level,id:o.id,responseType:"text"})},f.onAudioTrackLoading=function(o){this.load({url:o.url,type:E.AUDIO_TRACK,level:null,id:o.id,responseType:"text"})},f.onSubtitleTrackLoading=function(o){this.load({url:o.url,type:E.SUBTITLE_TRACK,level:null,id:o.id,responseType:"text"})},f.load=function(o){var c=this.hls.config;s.logger.debug("Loading playlist of type "+o.type+", level: "+o.level+", id: "+o.id);var _=this.getInternalLoader(o);if(_){var y=_.context;if(y&&y.url===o.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+o.type),_.abort()}var C,F,P,B;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,P=c.manifestLoadingRetryDelay,B=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,B=0,P=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,P=c.levelLoadingRetryDelay,B=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var k={timeout:F,maxRetry:C,retryDelay:P,maxRetryDelay:B},ae={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+o.url),_.load(o,k,ae),!0},f.loadsuccess=function(o,c,_,y){if(y===void 0&&(y=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,y);return}if(this.resetInternalLoader(_.type),typeof o.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=o.data;if(c.tload=Tn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",y);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,y):this._handleMasterPlaylist(o,c,_,y)},f.loaderror=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,o)},f.loadtimeout=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(o,c,_,y){var C=this.hls,F=o.data,P=D.getResponseUrl(o,_),B=sa.parseMasterPlaylist(F,P);if(!B.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var k=B.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ae=sa.parseMasterPlaylistMedia(F,P,"AUDIO",k),be=sa.parseMasterPlaylistMedia(F,P,"SUBTITLES");if(ae.length){var $e=!1;ae.forEach(function(fn){fn.url||($e=!0)}),$e===!1&&B[0].audioCodec&&!B[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),ae.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:B,audioTracks:ae,subtitles:be,url:P,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,P=_.level,B=_.type,k=D.getResponseUrl(o,_),ae=Object(i.isFiniteNumber)(F)?F:0,be=Object(i.isFiniteNumber)(P)?P:ae,$e=D.mapContextToLevelType(_),fn=sa.parseLevelPlaylist(o.data,k,be,$e,ae);if(fn.tload=c.tload,B===E.MANIFEST){var fa={url:k,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:k,stats:c,networkDetails:y})}if(c.tparsed=Tn.now(),fn.needSidxRanges){var Xn=fn.initSegment.url;this.load({url:Xn,isSidxRequest:!0,type:B,level:P,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,this._handlePlaylistLoaded(o,c,_,y)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=I.default.parseSegmentIndex(new Uint8Array(o.data));if(!!_){var y=_.references,C=c.levelDetails;y.forEach(function(F,P){var B=F.info;if(!!C){var k=C.fragments[P];k.byteRange.length===0&&k.setByteRange(String(1+B.end-B.start)+"@"+String(B.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,y){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:y})},f._handleNetworkError=function(o,c,_,y){_===void 0&&(_=!1),y===void 0&&(y=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,P=this.getInternalLoader(o);switch(o.type){case E.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case E.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case E.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}P&&(P.abort(),this.resetInternalLoader(o.type));var B={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:P,context:o,networkDetails:c};y&&(B.response=y),this.hls.trigger(l.default.ERROR,B)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,P=_.id,B=_.levelDetails;if(!B||!B.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var k=D.canHaveQualityLevels(_.type);if(k)this.hls.trigger(l.default.LEVEL_LOADED,{details:B,level:F||0,id:P||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break}},D}(g),We=Dn;function ea(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var va=function(w){ea(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=D.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,y=this.loaders,C=this.hls.config,F=C.fLoader,P=C.loader;c.loaded=0;var B=y[_];B&&(s.logger.warn("abort previous fragment loader for type: "+_),B.abort()),B=y[_]=c.loader=C.fLoader?new F(C):new P(C);var k,ae,be;k={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var $e=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)($e)&&Object(i.isFiniteNumber)(fn)&&(k.rangeStart=$e,k.rangeEnd=fn),ae={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},be={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},B.load(k,ae,be)},f.loadsuccess=function(o,c,_,y){y===void 0&&(y=null);var C=o.data,F=_.frag;F.loader=void 0,this.loaders[F.type]=void 0,this.hls.trigger(l.default.FRAG_LOADED,{payload:C,frag:F,stats:c,networkDetails:y})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c.frag,response:o,networkDetails:_})},f.loadtimeout=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c.frag,networkDetails:_})},f.loadprogress=function(o,c,_,y){y===void 0&&(y=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:y})},D}(g),Aa=va;function dt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var vn=function(w){dt(D,w);function D(v){var o;return o=w.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=D.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onKeyLoading=function(o){var c=o.frag,_=c.type,y=this.loaders[_];if(!c.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var C=c.decryptdata.uri;if(C!==this.decrypturl||this.decryptkey===null){var F=this.hls.config;if(y&&(s.logger.warn("abort previous key loader for type:"+_),y.abort()),!C){s.logger.warn("key uri is falsy");return}c.loader=this.loaders[_]=new F.loader(F),this.decrypturl=C,this.decryptkey=null;var P={url:C,frag:c,responseType:"arraybuffer"},B={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},k={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(P,B,k)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var y=_.frag;if(!y.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=y.decryptdata.key=new Uint8Array(o.data),y.loader=void 0,delete this.loaders[y.type],this.hls.trigger(l.default.KEY_LOADED,{frag:y})},f.loaderror=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:_,response:o})},f.loadtimeout=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:_})},D}(g),oa=vn;function St(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},it=function(w){St(D,w);function D(v){var o;return o=w.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,o.bufferPadding=.2,o.fragments=Object.create(null),o.timeRanges=Object.create(null),o.config=v.config,o}var f=D.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,g.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,y=Object.keys(_).filter(function(F){var P=_[F];if(P.body.type!==c||!P.buffered)return!1;var B=P.body;return B.startPTS<=o&&o<=B.endPTS});if(y.length===0)return null;var C=y.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,y,C;Object.keys(this.fragments).forEach(function(F){var P=_.fragments[F];if(P.buffered===!0){var B=P.range[o];if(B){y=B.time;for(var k=0;k=C&&c<=F){y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))}),P=!0;else if(c<=C)break;return{time:y,partial:P}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,P=0;return Object.keys(this.fragments).forEach(function(B){var k=c.fragments[B];c.isPartial(k)&&(y=k.body.startPTS-c.bufferPadding,C=k.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),P<=_&&(F=k.body,P=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=Da.PARTIAL:y=Da.OK:y=Da.APPENDING),y},f.isPartial=function(o){return o.buffered===!0&&(o.range.video!==void 0&&o.range.video.partial===!0||o.range.audio!==void 0&&o.range.audio.partial===!0)},f.isTimeBuffered=function(o,c,_){for(var y,C,F=0;F<_.length;F++){if(y=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=y&&c<=C)return!0;if(c<=y)return!1}return!1},f.onFragLoaded=function(o){var c=o.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(o){var c=this;this.timeRanges=o.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var y=c.timeRanges[_];c.detectEvictedFragments(_,y)})},f.onFragBuffered=function(o){this.detectPartialFragments(o.frag)},f.hasFragment=function(o){var c=this.getFragmentKey(o);return this.fragments[c]!==void 0},f.removeFragment=function(o){var c=this.getFragmentKey(o);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},D}(g),J={search:function(D,f){for(var v=0,o=D.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=D[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},K=J,O=function(){function w(){}return w.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},w.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],y;for(y=0;yC&&(c[y-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,P,B=v,k=v,ae=0;ae=be&&v<$e)B=be,k=$e,F=k-v;else if(v+o1?c-1:0),y=1;yD?(v.duration=c-v.start,v.duration<0&&s.logger.warn("negative duration computed for frag "+v.sn+",level "+v.level+", there should be some duration drift between playlist and fragment!")):(o.duration=v.start-c,o.duration<0&&s.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):f>D?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Pe(w,D,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(D.startPTS)){var y=Math.abs(D.startPTS-f);Object(i.isFiniteNumber)(D.deltaPTS)?D.deltaPTS=Math.max(y,D.deltaPTS):D.deltaPTS=y,_=Math.max(f,D.startPTS),f=Math.min(f,D.startPTS),v=Math.max(v,D.endPTS),o=Math.min(o,D.startDTS),c=Math.max(c,D.endDTS)}var C=f-D.start;D.start=D.startPTS=f,D.maxStartPTS=_,D.endPTS=v,D.startDTS=o,D.endDTS=c,D.duration=v-f;var F=D.sn;if(!w||Fw.endSN)return 0;var P,B,k;for(P=F-w.startSN,B=w.fragments,B[P]=D,k=P;k>0;k--)hn(B,k,k-1);for(k=P;kv.length))for(var c=0;cD?-1:0})}function Ka(w,D,f){var v=!1;return D&&D.details&&f&&(f.endCC>f.startCC||w&&w.cc=(o||0))return null;f=f||0;for(var c=0;cw&&f.start?-1:0}function Qr(w,D,f){var v=Math.min(D,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>w}var Du=250,gu=2,xo=.1,Kr=.05,Ju=function(){function w(f,v,o,c){this.config=f,this.media=v,this.fragmentTracker=o,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var D=w.prototype;return D.poll=function(v){var o=this.config,c=this.media,_=this.stalled,y=c.currentTime,C=c.seeking,F=this.seeking&&!C,P=!this.seeking&&C;if(this.seeking=C,y!==v){if(this.moved=!0,_!==null){if(this.stallReported){var B=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((P||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var k=O.bufferInfo(c,y,0),ae=k.len>0,be=k.nextStart||0;if(!(!ae&&!be)){if(C){var $e=k.len>gu,fn=!be||be-y>gu;if($e||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(be,k.start||0)-y;if(fa>0&&fa<=gu){this._trySkipBufferHole(null);return}}var Xn=self.performance.now();if(_===null){this.stalled=Xn;return}var ua=Xn-_;!C&&ua>=Du&&this._reportStall(k.len);var Ra=O.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ra,ua)}}},D._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var P=this._trySkipBufferHole(F);if(P)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},D._reportStall=function(v){var o=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},D._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,y=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var P=_.buffered.start(F);if(y+o.maxBufferHole>=C&&y1?c-1:0),y=1;y1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},D}(g);function ss(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var se={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},Ll=function(w){ss(D,w);function D(){return w.apply(this,arguments)||this}var f=D.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var o=this.fragCurrent;o&&(o.loader&&o.loader.abort(),this.fragmentTracker.removeFragment(o)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=se.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,y=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=y.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=O.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===se.FRAG_LOADING){var P=this.fragCurrent;if(F.len===0&&P){var B=o.maxFragLookUpTolerance,k=P.start-B,ae=P.start+P.duration+B;Cae?(P.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),P.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=se.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===se.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=se.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=se.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(o,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return o+Math.max(0,c.totalduration-_)},D}(vc);function xl(w,D){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=se.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=se.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case se.BUFFER_FLUSHING:this.fragLoadError=0;break;case se.IDLE:this._doTickIdle();break;case se.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var c=window.performance.now(),_=this.retryDate;(!_||c>=_||this.media&&this.media.seeking)&&(s.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.ERROR:case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var o=this.hls,c=o.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var y;this.loadedmetadata?y=_.currentTime:y=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(!!F){var P=F.bitrate,B;P?B=Math.max(8*c.maxBufferSize/P,c.maxBufferLength):B=c.maxBufferLength,B=Math.min(B,c.maxMaxBufferLength);var k=O.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),ae=k.len;if(!(ae>=B)){s.logger.trace("buffer length of "+ae.toFixed(3)+" is below max of "+B.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var be=F.details;if(!be||be.live&&this.levelLastLoaded!==C){this.state=se.WAITING_LEVEL;return}if(this._streamEnded(k,be)){var $e={};this.altAudio&&($e.type="video"),this.hls.trigger(l.default.BUFFER_EOS,$e),this.state=se.ENDED;return}this._fetchPayloadOrEos(y,k,be)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,P=F.length;if(P!==0){var B=F[0].start,k=F[P-1].start+F[P-1].duration,ae=c.end,be;if(_.initSegment&&!_.initSegment.data)be=_.initSegment;else if(_.live){var $e=this.config.initialLiveManifestSize;if(P<$e){s.logger.warn("Can not start playback of a level, reason: not enough fragments "+P+" < "+$e);return}if(be=this._ensureFragmentAtLivePoint(_,ae,B,k,y,F,P),be===null)return}else ae$e&&$e>k.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+$e.toFixed(3)),k.currentTime=$e),this.nextLoadPosition=$e}if(o.PTSKnown&&c>y&&k&&k.readyState)return null;if(this.startFragRequested&&!o.PTSKnown){if(C)if(o.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),ae=eu(F,C.endProgramDateTime,B.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var fa=F[fn-o.startSN];C.cc===fa.cc&&(ae=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ae.sn))}ae||(ae=K.search(F,function(Xn){return C.cc-Xn.cc}),ae&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ae.sn))}ae||(ae=F[Math.min(P-1,Math.round(P/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ae.sn))}return ae},f._findFragment=function(o,c,_,y,C,F,P){var B=this.hls.config,k;if(CF-B.maxFragLookUpTolerance?0:B.maxFragLookUpTolerance;k=jr(c,y,C,ae)}else k=y[_-1];if(k){var be=k.sn-P.startSN,$e=c&&k.level===c.level,fn=y[be-1],fa=y[be+1];if(c&&k.sn===c.sn)if($e&&!k.backtracked)if(k.snB.maxBufferHole&&c.dropped&&be?(k=fn,s.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(k=fa,s.logger.log("Re-loading fragment with SN: "+k.sn))}else k=null;else k.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+k.sn+". Loading fragment "+fa.sn),k=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),k.dropped=0,fn?(k=fn,k.backtracked=!0):be&&(k=null)))}return k},f._loadKey=function(o){this.state=se.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:o})},f._loadFragment=function(o){var c=this.fragmentTracker.getState(o);this.fragCurrent=o,o.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(o.sn)&&!o.bitrateTest&&(this.nextLoadPosition=o.start+o.duration),o.backtracked||c===Da.NOT_LOADED||c===Da.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Ae(this.hls,"main")),this.state=se.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,b.MAIN)},f.followingBufferedFrag=function(o){return o?this.getBufferedFrag(o.endPTS+.5):null},f._checkFragmentChanged=function(){var o,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),O.isBuffered(_,c)?o=this.getBufferedFrag(c):O.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var y=o;if(y!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:y});var C=y.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=y}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var o=this.media,c;o?(c=o.paused,o.pause()):c=!0,this.previouslyPaused=c}var _=this.fragCurrent;_&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var o=this.media;o&&o.buffered.length&&(this.immediateSwitch=!1,O.isBuffered(o,o.currentTime)&&(o.currentTime-=1e-4),this.previouslyPaused||o.play())},f.nextLevelSwitch=function(){var o=this.media;if(o&&o.readyState){var c,_,y;if(_=this.getBufferedFrag(o.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),o.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],P=this.fragLastKbps;P&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*P)+1:c=0}if(y=this.getBufferedFrag(o.currentTime+c),y&&(y=this.followingBufferedFrag(y),y)){var B=this.fragCurrent;B&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=se.BUFFER_FLUSHING;var _={startOffset:o,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("seeked",this.onvseeked),c.addEventListener("ended",this.onvended);var _=this.config;this.levels&&_.autoStartLoad&&this.hls.startLoad(_.startPosition),this.gapController=new Ju(_,c,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var c=this.levels;c&&c.forEach(function(_){_.details&&_.details.fragments.forEach(function(y){y.backtracked=void 0})}),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("seeked",this.onvseeked),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var o=this.media,c=o?o.currentTime:void 0;Object(i.isFiniteNumber)(c)&&s.logger.log("media seeked to "+c.toFixed(3)),this.tick()},f.onManifestLoading=function(){s.logger.log("trigger BUFFER_RESET"),this.hls.trigger(l.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(o){var c=!1,_=!1,y;o.levels.forEach(function(F){y=F.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(c=!0),y.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=c&&_,this.audioCodecSwitch&&s.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=o.altAudio,this.levels=o.levels,this.startFragRequested=!1;var C=this.config;(C.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(C.startPosition)},f.onLevelLoaded=function(o){var c=o.details,_=o.level,y=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,P=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var B=C.details;B&&c.fragments.length>0?(En(B,c),P=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(P,B),c.PTSKnown&&Object(i.isFiniteNumber)(P)?s.logger.log("live playlist sliding:"+P.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Pr(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Pr(this.fragPrevious,y,c))}else c.PTSKnown=!1;if(C.details=c,this.levelLastLoaded=_,this.hls.trigger(l.default.LEVEL_UPDATED,{details:c,level:_}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var k=c.startTimeOffset;Object(i.isFiniteNumber)(k)?(k<0&&(s.logger.log("negative start time offset "+k+", count from end of last fragment"),k=P+F+k),s.logger.log("start time offset found in playlist, adjust startPosition to "+k),this.startPosition=k):c.live?(this.startPosition=this.computeLivePosition(P,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_LEVEL&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,y=this.levels,C=this.media,F=o.frag;if(this.state===se.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var P=o.stats,B=y[c.level],k=B.details;if(this.bitrateTest=!1,this.stats=P,s.logger.log("Loaded "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=se.IDLE,this.startFragRequested=!1,P.tparsed=P.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=se.IDLE,P.tparsed=P.tbuffered=window.performance.now(),k.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level+", cc "+c.cc),this.state=se.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var ae=!(C&&C.seeking)&&(k.PTSKnown||!k.live),be=k.initSegment?k.initSegment.data:[],$e=this._getAudioCodec(B),fn=this.demuxer=this.demuxer||new Ae(this.hls,"main");fn.push(o.payload,be,$e,B.videoCodec,c,k.totalduration,ae)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C,F;if(y.audio&&this.altAudio&&delete y.audio,F=y.audio,F){var P=this.levels[this.level].audioCodec,B=navigator.userAgent.toLowerCase();P&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),P.indexOf("mp4a.40.5")!==-1?P="mp4a.40.2":P="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(P="mp4a.40.5"),B.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(P="mp4a.40.2",s.logger.log("Android: force audio codec to "+P)),F.levelCodec=P,F.id=o.id}F=y.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,y);for(C in y){F=y[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var k=F.initSegment;k&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:k,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="main"&&y.sn===_.sn&&y.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===se.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),o.hasAudio===!0&&F.addElementaryStream(ue.AUDIO),o.hasVideo===!0&&F.addElementaryStream(ue.VIDEO),s.logger.log("Parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb+",dropped:"+(o.dropped||0)),o.type==="video")if(F.dropped=o.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var P=C.details;if(P&&F.sn===P.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=o.startPTS,this.state=se.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var B=Pe(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),k=this.hls;k.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:B,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ae){ae&&ae.length&&c.state===se.PARSING&&(c.appended=!0,c.pendingBuffering=!0,k.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:ae,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(o){var c=!!o.url,_=o.id;if(!c){if(this.mediaBuffer!==this.media){s.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),y.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=se.IDLE}var C=this.hls;C.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:_}),this.altAudio=!1}},f.onAudioTrackSwitched=function(o){var c=o.id,_=!!this.hls.audioTracks[c].url;if(_){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,y,C=!1;for(var F in c){var P=c[F];P.id==="main"?(y=F,_=P,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(o){if(o.parent==="main"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+mt.toString(c.buffered)),this.fragPrevious=o;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:o,id:"main"}),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&O.isBuffered(this.media,this.media.currentTime)&&O.isBuffered(this.media,this.media.currentTime+.5);switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:if(!o.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var y=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+y+" ms"),this.retryDate=window.performance.now()+y,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==se.ERROR&&(o.fatal?(this.state=se.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===se.WAITING_LEVEL&&(this.state=se.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===se.PARSING||this.state===se.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=se.IDLE):(s.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}},f._reduceMaxBufferLength=function(o){var c=this.config;return c.maxMaxBufferLength>=o?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var o=this.media;if(!(!o||o.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:o,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=se.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var o=this.mediaBuffer?this.mediaBuffer:this.media;o&&this.fragmentTracker.detectEvictedFragments(ue.VIDEO,o.buffered),this.state=se.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var o=this.media,c=o.currentTime,_=o.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),o.currentTime=_)},f._getAudioCodec=function(o){var c=this.config.defaultAudioCodec||o.audioCodec;return this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5")),c},vs(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("main stream-controller: "+c+"->"+o),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:o})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var o=this.media;if(o){var c=this.getBufferedFrag(o.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var o=this.media;return o?this.followingBufferedFrag(this.getBufferedFrag(o.currentTime)):null}},{key:"nextLevel",get:function(){var o=this.nextBufferedFrag;return o?o.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(o){this._liveSyncPosition=o}}]),D}(Ll),Pf=Jd;function R0(w,D){for(var f=0;f0){y=c[0].bitrate,c.sort(function(ae,be){return ae.bitrate-be.bitrate}),this._levels=c;for(var k=0;k=0&&o1&&B.loadError0){var c=this.currentLevelIndex,_=o.urlId,y=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:y,level:c,id:_})}}},y0(D,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(o){var c=this._levels;c&&(o=Math.min(o,c.length-1),(this.currentLevelIndex!==o||!c[o].details)&&this.setLevelInternal(o))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(o){this.manualLevelIndex=o,this._startLevel===void 0&&(this._startLevel=o),o!==-1&&(this.level=o)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(o){this._firstLevel=o}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var o=this.hls.config.startLevel;return o!==void 0?o:this._firstLevel}else return this._startLevel},set:function(o){this._startLevel=o}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(o){this.level=o,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=o)}}]),D}(g),w0=a("./src/demux/id3.js");function wg(w,D){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=w,D.dispatchEvent(f)}function cv(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function yI(w,D){if(Dw[w.length-1].endTime)return w[w.length-1];for(var f=0,v=w.length-1;f<=v;){var o=Math.floor((v+f)/2);if(Dw[o].endTime)f=o+1;else return w[o]}return w[f].endTime-DB&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),B=P+.25);for(var k=0;k=this.minWeight_},D.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},D.destroy=function(){},w}(),TI=II;function Tg(w,D){for(var f=0;f500*_.duration/B){var k=o.levels,ae=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/P),be=k[_.level],$e=be.realBitrate?Math.max(be.realBitrate,be.bitrate):be.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*$e/8)),fa=c.currentTime,Xn=(fn-F.loaded)/ae,ua=(O.bufferInfo(c,fa,o.config.maxBufferHole).end-fa)/B;if(ua<2*_.duration/B&&Xn>ua){var Ra,Ja;for(Ja=_.level-1;Ja>C;Ja--){var Wu=k[Ja].realBitrate?Math.max(k[Ja].realBitrate,k[Ja].bitrate):k[Ja].bitrate,nu=_.duration*Wu/(8*.8*ae);if(nu=y;ae--){var be=k[ae];if(!!be){var $e=be.details,fn=$e?$e.totalduration/$e.fragments.length:c,fa=$e?$e.live:!1,Xn=void 0;ae<=o?Xn=P*_:Xn=B*_;var ua=k[ae].realBitrate?Math.max(k[ae].realBitrate,k[ae].bitrate):k[ae].bitrate,Ra=ua*fn/Xn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ae+"/"+Math.round(Xn)+"/"+ua+"/"+fn+"/"+F+"/"+Ra),Xn>ua&&(!Ra||fa&&!this.bitrateTestDelay||Ra=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=B?Math.min(B,y.maxStarvationDelay):y.maxStarvationDelay,Xn=y.abrBandWidthFactor,ua=y.abrBandWidthUpFactor;if($e===0){var Ra=this.bitrateTestDelay;if(Ra){var Ja=B?Math.min(B,y.maxLoadingDelay):y.maxLoadingDelay;fa=Ja-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Xn=ua=1}}return fn=this._findBestLevel(P,B,be,C,c,$e+fa,Xn,ua,_),Math.max(fn,0)}}]),D}(g),MI=GI;function AI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Cg=W(),LI=function(w){AI(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_RESET,l.default.BUFFER_APPENDING,l.default.BUFFER_CODECS,l.default.BUFFER_EOS,l.default.BUFFER_FLUSHING,l.default.LEVEL_PTS_UPDATED,l.default.LEVEL_UPDATED)||this,o._msDuration=null,o._levelDuration=null,o._levelTargetDuration=10,o._live=null,o._objectUrl=null,o._needsFlush=!1,o._needsEos=!1,o.config=void 0,o.audioTimestampOffset=void 0,o.bufferCodecEventsExpected=0,o._bufferCodecEventsTotal=0,o.media=null,o.mediaSource=null,o.segments=[],o.parent=void 0,o.appending=!1,o.appended=0,o.appendError=0,o.flushBufferCounter=0,o.tracks={},o.pendingTracks={},o.sourceBuffer={},o.flushRange=[],o._onMediaSourceOpen=function(){s.logger.log("media source opened"),o.hls.trigger(l.default.MEDIA_ATTACHED,{media:o.media});var c=o.mediaSource;c&&c.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},o._onMediaSourceClose=function(){s.logger.log("media source closed")},o._onMediaSourceEnded=function(){s.logger.log("media source ended")},o._onSBUpdateEnd=function(){if(o.audioTimestampOffset&&o.sourceBuffer.audio){var c=o.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+c.timestampOffset+" to "+o.audioTimestampOffset),c.timestampOffset=o.audioTimestampOffset,delete o.audioTimestampOffset}o._needsFlush&&o.doFlush(),o._needsEos&&o.checkEos(),o.appending=!1;var _=o.parent,y=o.segments.reduce(function(k,ae){return ae.parent===_?k+1:k},0),C={},F=o.sourceBuffer;for(var P in F){var B=F[P];if(!B)throw Error("handling source buffer update end error: source buffer for "+P+" uninitilized and unable to update buffered TimeRanges.");C[P]=B.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:y,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),y===0&&o.flushLiveBackBuffer()},o._onSBUpdateError=function(c){s.logger.error("sourceBuffer error:",c),o.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},o.config=v.config,o}var f=D.prototype;return f.destroy=function(){g.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var y=this.sourceBuffer.audio;if(!y)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(y.timestampOffset-o.start);if(C>.1){var F=y.updating;try{y.abort()}catch(P){s.logger.warn("can not abort audio buffer: "+P)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+y.timestampOffset+" to "+o.start),y.timestampOffset=o.start)}}},f.onManifestParsed=function(o){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o){var c=this.media=o.media;if(c&&Cg){var _=this.mediaSource=new Cg;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),c.src=window.URL.createObjectURL(_),this._objectUrl=c.src}},f.onMediaDetaching=function(){s.logger.log("media source detaching");var o=this.mediaSource;if(o){if(o.readyState==="open")try{o.endOfStream()}catch(c){s.logger.warn("onMediaDetaching:"+c.message+" while calling endOfStream")}o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(l.default.MEDIA_DETACHED)},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,c=this.pendingTracks,_=Object.keys(c).length;(_&&!o||_===2)&&(this.createSourceBuffers(c),this.pendingTracks={},this.doAppending())},f.onBufferReset=function(){var o=this.sourceBuffer;for(var c in o){var _=o[c];try{_&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(_),_.removeEventListener("updateend",this._onSBUpdateEnd),_.removeEventListener("error",this._onSBUpdateError))}catch{}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},f.onBufferCodecs=function(o){var c=this;Object.keys(this.sourceBuffer).length||(Object.keys(o).forEach(function(_){c.pendingTracks[_]=o[_]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},f.createSourceBuffers=function(o){var c=this.sourceBuffer,_=this.mediaSource;if(!_)throw Error("createSourceBuffers called when mediaSource was null");for(var y in o)if(!c[y]){var C=o[y];if(!C)throw Error("source buffer exists for track "+y+", however track does not");var F=C.levelCodec||C.codec,P=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+P+")");try{var B=c[y]=_.addSourceBuffer(P);B.addEventListener("updateend",this._onSBUpdateEnd),B.addEventListener("error",this._onSBUpdateError),this.tracks[y]={buffer:B,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(k){s.logger.error("error while trying to add sourceBuffer:"+k.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:k,mimeType:P})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:this.tracks})},f.onBufferAppending=function(o){this._needsFlush||(this.segments?this.segments.push(o):this.segments=[o],this.doAppending())},f.onBufferEos=function(o){for(var c in this.sourceBuffer)if(!o.type||o.type===c){var _=this.sourceBuffer[c];_&&!_.ended&&(_.ended=!0,s.logger.log(c+" sourceBuffer now EOS"))}this.checkEos()},f.checkEos=function(){var o=this.sourceBuffer,c=this.mediaSource;if(!c||c.readyState!=="open"){this._needsEos=!1;return}for(var _ in o){var y=o[_];if(!!y){if(!y.ended)return;if(y.updating){this._needsEos=!0;return}}}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{c.endOfStream()}catch{s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},f.onBufferFlushing=function(o){o.type?this.flushRange.push({start:o.startOffset,end:o.endOffset,type:o.type}):(this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"video"}),this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},f.flushLiveBackBuffer=function(){if(!!this._live){var o=this.config.liveBackBufferLength;if(!(!isFinite(o)||o<0)){if(!this.media){s.logger.error("flushLiveBackBuffer called without attaching media");return}for(var c=this.media.currentTime,_=this.sourceBuffer,y=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=y.length-1;F>=0;F--){var P=y[F],B=_[P];if(B){var k=B.buffered;k.length>0&&C>k.start(0)&&this.removeBufferRange(P,B,0,C)&&this.hls.trigger(l.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C})}}}}},f.onLevelUpdated=function(o){var c=o.details;c.fragments.length>0&&(this._levelDuration=c.totalduration+c.fragments[0].start,this._levelTargetDuration=c.averagetargetduration||c.targetduration||10,this._live=c.live,this.updateMediaElementDuration())},f.updateMediaElementDuration=function(){var o=this.config,c;if(!(this._levelDuration===null||!this.media||!this.mediaSource||!this.sourceBuffer||this.media.readyState===0||this.mediaSource.readyState!=="open")){for(var _ in this.sourceBuffer){var y=this.sourceBuffer[_];if(y&&y.updating===!0)return}c=this.media.duration,this._msDuration===null&&(this._msDuration=this.mediaSource.duration),this._live===!0&&o.liveDurationInfinity===!0?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>c||!Object(i.isFiniteNumber)(c))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},f.doFlush=function(){for(;this.flushRange.length;){var o=this.flushRange[0];if(this.flushBuffer(o.start,o.end,o.type))this.flushRange.shift(),this.flushBufferCounter=0;else{this._needsFlush=!0;return}}if(this.flushRange.length===0){this._needsFlush=!1;var c=0,_=this.sourceBuffer;try{for(var y in _){var C=_[y];C&&(c+=C.buffered.length)}}catch{s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=c,this.hls.trigger(l.default.BUFFER_FLUSHED)}},f.doAppending=function(){var o=this.config,c=this.hls,_=this.segments,y=this.sourceBuffer;if(!!Object.keys(y).length){if(!this.media||this.media.error){this.segments=[],s.logger.error("trying to append although a media error occured, flush segment and abort");return}if(!this.appending){var C=_.shift();if(!!C)try{var F=y[C.type];if(!F){this._onSBUpdateEnd();return}if(F.updating){_.unshift(C);return}F.ended=!1,this.parent=C.parent,F.appendBuffer(C.data),this.appendError=0,this.appended++,this.appending=!0}catch(B){s.logger.error("error while trying to append buffer:"+B.message),_.unshift(C);var P={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};B.code===22?(this.segments=[],P.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,P.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],P.fatal=!0)),c.trigger(l.default.ERROR,P)}}}},f.flushBuffer=function(o,c,_){var y=this.sourceBuffer;if(!Object.keys(y).length)return!0;var C="null";if(this.media&&(C=this.media.currentTime.toFixed(3)),s.logger.log("flushBuffer,pos/start/end: "+C+"/"+o+"/"+c),this.flushBufferCounter>=this.appended)return s.logger.warn("abort flushing too many retries"),!0;var F=y[_];if(F){if(F.ended=!1,F.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(_,F,o,c))return this.flushBufferCounter++,!1}return s.logger.log("buffer flushed"),!0},f.removeBufferRange=function(o,c,_,y){try{for(var C=0;C.5){var ae="null";return this.media&&(ae=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+B+","+k+"], of ["+F+","+P+"], pos:"+ae),c.remove(B,k),!0}}}catch(be){s.logger.warn("removeBufferRange failed",be)}return!1},D}(g),xI=LI;function Fg(w,D){for(var f=0;fthis.autoLevelCapping&&c.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},f.getMaxLevel=function(o){var c=this;if(!this.levels)return-1;var _=this.levels.filter(function(y,C){return D.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return D.getMaxLevelByMediaSize(_,this.mediaWidth,this.mediaHeight)},f.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},f.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},D.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},D.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var y=function(k,ae){return ae?k.width!==ae.width||k.height!==ae.height:!0},C=o.length-1,F=0;F=c||P.height>=_)&&y(P,o[F+1])){C=F;break}}return C},PI(D,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=D.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=D.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),D}(g),Gg=jI;function NI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var _s=window,OI=_s.performance,zd=function(w){NI(D,w);function D(v){return w.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=D.prototype;return f.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},f.onMediaAttaching=function(o){var c=this.hls.config;if(c.capLevelOnFPSDrop){var _=this.video=o.media instanceof window.HTMLVideoElement?o.media:null;typeof _.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,c,_){var y=OI.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,P=c-this.lastDecodedFrames,B=1e3*F/C,k=this.hls;if(k.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:P,totalDroppedFrames:_}),B>0&&F>k.config.fpsDroppedMonitoringThreshold*P){var ae=k.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+ae),ae>0&&(k.autoLevelCapping===-1||k.autoLevelCapping>=ae)&&(ae=ae-1,k.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:ae,droppedLevel:k.currentLevel}),k.autoLevelCapping=ae,k.streamController.nextLevelSwitch())}}this.lastTime=y,this.lastDroppedFrames=_,this.lastDecodedFrames=c}},f.checkFPSInterval=function(){var o=this.video;if(o)if(this.isVideoPlaybackQualityAvailable){var c=o.getVideoPlaybackQuality();this.checkFPS(o,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},D}(g),UI=zd,Mg=window,Vd=Mg.performance,kI=Mg.XMLHttpRequest,BI=function(){function w(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var D=w.prototype;return D.destroy=function(){this.abort(),this.loader=null},D.abort=function(){var v=this.loader;v&&v.readyState!==4&&(this.stats.aborted=!0,v.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},D.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:Vd.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},D.loadInternal=function(){var v,o=this.context;v=this.loader=new kI;var c=this.stats;c.tfirst=0,c.loaded=0;var _=this.xhrSetup;try{if(_)try{_(v,o.url)}catch{v.open("GET",o.url,!0),_(v,o.url)}v.readyState||v.open("GET",o.url,!0)}catch(y){this.callbacks.onError({code:v.status,text:y.message},o,v);return}o.rangeEnd&&v.setRequestHeader("Range","bytes="+o.rangeStart+"-"+(o.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=o.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),v.send()},D.readystatechange=function(v){var o=v.currentTarget,c=o.readyState,_=this.stats,y=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Vd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Vd.now());var P,B;y.responseType==="arraybuffer"?(P=o.response,B=P.byteLength):(P=o.responseText,B=P.length),_.loaded=_.total=B;var k={url:o.responseURL,data:P};this.callbacks.onSuccess(k,_,y,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+y.url),this.callbacks.onError({code:F,text:o.statusText},y,o)):(s.logger.warn(F+" while loading "+y.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,C.maxRetryDelay),_.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),C.timeout)},D.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},D.loadprogress=function(v){var o=v.currentTarget,c=this.stats;c.loaded=v.loaded,v.lengthComputable&&(c.total=v.total);var _=this.callbacks.onProgress;_&&_(c,this.context,null,o)},w}(),Qd=BI;function Ag(w,D){for(var f=0;f=this.tracks.length){s.logger.warn("Invalid audio track id:",o.id);return}if(s.logger.log("audioTrack "+o.id+" loaded"),this.tracks[o.id].details=o.details,o.details.live&&!this.hasInterval()){var c=o.details.targetduration*1e3;this.setInterval(c)}!o.details.live&&this.hasInterval()&&this.clearInterval()},f.onAudioTrackSwitched=function(o){var c=this.tracks[o.id].groupId;c&&this.audioGroupId!==c&&(this.audioGroupId=c)},f.onLevelLoaded=function(o){this._selectAudioGroup(o.level)},f.onError=function(o){o.type===u.ErrorTypes.NETWORK_ERROR&&(o.fatal&&this.clearInterval(),o.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",o.context.id),this._handleLoadError()))},f._setAudioTrack=function(o){if(this._trackId===o&&this.tracks[this._trackId].details){s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");return}if(o<0||o>=this.tracks.length){s.logger.warn("Invalid id passed to audio-track controller");return}var c=this.tracks[o];s.logger.log("Now switching to audio-track index "+o),this.clearInterval(),this._trackId=o;var _=c.url,y=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:y,url:_}),this._loadTrackDetailsIfNeeded(c)},f.doTick=function(){this._updateTrack(this._trackId)},f._selectAudioGroup=function(o){var c=this.hls.levels[o];if(!(!c||!c.audioGroupIds)){var _=c.audioGroupIds[c.urlId];this.audioGroupId!==_&&(this.audioGroupId=_,this._selectInitialAudioTrack())}},f._selectInitialAudioTrack=function(){var o=this,c=this.tracks;if(!!c.length){var _=this.tracks[this._trackId],y=null;if(_&&(y=_.name),this._selectDefaultTrack){var C=c.filter(function(B){return B.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,P=function(){c.forEach(function(k){F||(!o.audioGroupId||k.groupId===o.audioGroupId)&&(!y||y===k.name)&&(o._setAudioTrack(k.id),F=!0)})};P(),F||(y=null,P()),F||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},f._needsTrackLoading=function(o){var c=o.details,_=o.url;return!c||c.live?!!_:!1},f._loadTrackDetailsIfNeeded=function(o){if(this._needsTrackLoading(o)){var c=o.url,_=o.id;s.logger.log("loading audio-track playlist for id: "+_),this.hls.trigger(l.default.AUDIO_TRACK_LOADING,{url:c,id:_})}},f._updateTrack=function(o){if(!(o<0||o>=this.tracks.length)){this.clearInterval(),this._trackId=o,s.logger.log("trying to update audio-track "+o);var c=this.tracks[o];this._loadTrackDetailsIfNeeded(c)}},f._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var o=this._trackId,c=this.tracks[o],_=c.name,y=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+y+'"');for(var F=o,P=0;P0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=se.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=se.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=se.STOPPED},f.doTick=function(){var o,c,_,y=this.hls,C=y.config;switch(this.state){case se.ERROR:case se.PAUSED:case se.BUFFER_FLUSHING:break;case se.STARTING:this.state=se.WAITING_TRACK,this.loadedmetadata=!1;break;case se.IDLE:var F=this.tracks;if(!F||!this.media&&(this.startFragRequested||!C.startFragPrefetch))break;if(this.loadedmetadata)o=this.media.currentTime;else if(o=this.nextLoadPosition,o===void 0)break;var P=this.mediaBuffer?this.mediaBuffer:this.media,B=this.videoBuffer?this.videoBuffer:this.media,k=O.bufferInfo(P,o,C.maxBufferHole),ae=O.bufferInfo(B,o,C.maxBufferHole),be=k.len,$e=k.end,fn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Xn=Math.max(fa,ae.len),ua=this.audioSwitch,Ra=this.trackId;if((benu||k.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=nu+.05;else return}if(_.initSegment&&!_.initSegment.data)ft=_.initSegment;else if($e<=nu){if(ft=Ja[0],this.videoTrackCC!==null&&ft.cc!==this.videoTrackCC&&(ft=$t(Ja,this.videoTrackCC)),_.live&&ft.loadIdx&&ft.loadIdx===this.fragLoadIdx){var ht=k.nextStart?k.nextStart:nu;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ht+.05)),this.media.currentTime=ht+.05;return}}else{var Oa,jo=C.maxFragLookUpTolerance,C0=fn?Ja[fn.sn-Ja[0].sn+1]:void 0,F0=function(tm){var B2=Math.min(jo,tm.duration);return tm.start+tm.duration-B2<=$e?1:tm.start-B2>$e&&tm.start?-1:0};$eZi-jo&&(jo=0),C0&&!F0(C0)?Oa=C0:Oa=K.search(Ja,F0)):Oa=Ja[Wu-1],Oa&&(ft=Oa,nu=Oa.start,fn&&ft.level===fn.level&&ft.sn===fn.sn&&(ft.sn<_.endSN?(ft=Ja[ft.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+ft.sn)):ft=null))}ft&&(ft.encrypted?(s.logger.log("Loading key for "+ft.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=se.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:ft})):(s.logger.log("Loading "+ft.sn+", cc: "+ft.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+$e.toFixed(3)),this.fragCurrent=ft,(ua||this.fragmentTracker.getState(ft)===Da.NOT_LOADED)&&(ft.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(ft.sn)&&(this.nextLoadPosition=ft.start+ft.duration),y.trigger(l.default.FRAG_LOADING,{frag:ft}),this.state=se.FRAG_LOADING)))}break;case se.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var yT=jl.now(),O2=this.retryDate;P=this.media;var XZ=P&&P.seeking;(!O2||yT>=O2||XZ)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.WAITING_INIT_PTS:var bT=this.videoTrackCC;if(this.initPTS[bT]===void 0)break;var U2=this.waitingFragment;if(U2){var k2=U2.frag.cc;bT!==k2?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+k2+") does not match video track CC ("+bT+")"),this.waitingFragment=null,this.state=se.IDLE)):(this.state=se.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=se.IDLE;break;case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("ended",this.onvended);var _=this.config;this.tracks&&_.autoStartLoad&&this.startLoad(_.startPosition)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(o){s.logger.log("audio tracks updated"),this.tracks=o.audioTracks},f.onAudioTrackSwitching=function(o){var c=!!o.url;this.trackId=o.id,this.fragCurrent=null,this.state=se.PAUSED,this.waitingFragment=null,c?this.setInterval(Pg):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=se.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,y=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var P=y.details;P&&c.fragments.length>0?(En(P,c),F=c.fragments[0].start,c.PTSKnown?s.logger.log("live audio playlist sliding:"+F.toFixed(3)):s.logger.log("live audio playlist - outdated PTS, unknown sliding")):(c.PTSKnown=!1,s.logger.log("live audio playlist - first load, unknown sliding"))}else c.PTSKnown=!1;if(y.details=c,!this.startFragRequested){if(this.startPosition===-1){var B=c.startTimeOffset;Object(i.isFiniteNumber)(B)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+B),this.startPosition=B):c.live?(this.startPosition=this.computeLivePosition(F,c),s.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_TRACK&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===se.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var y=this.tracks[this.trackId],C=y.details,F=C.totalduration,P=c.level,B=c.sn,k=c.cc,ae=this.config.defaultAudioCodec||y.audioCodec||"mp4a.40.2",be=this.stats=o.stats;if(B==="initSegment")this.state=se.IDLE,be.tparsed=be.tbuffered=jl.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:be,frag:c,id:"audio"}),this.tick();else{this.state=se.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Ae(this.hls,"audio"));var $e=this.initPTS[k],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||$e!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P);var fa=!1;this.demuxer.push(o.payload,fn,ae,null,c,F,fa,$e)}else s.logger.log("unknown video PTS for continuity counter "+k+", waiting for video PTS before demuxing audio frag "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P),this.waitingFragment=o,this.state=se.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C;if(y.video&&delete y.video,C=y.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,y),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var P={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[P]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,P))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&y.sn===_.sn&&y.level===_.level&&this.state===se.PARSING){var C=this.trackId,F=this.tracks[C],P=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(ue.AUDIO),s.logger.log("parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb),Pe(F.details,_,o.startPTS,o.endPTS);var B=this.audioSwitch,k=this.media,ae=!1;if(B)if(k&&k.readyState){var be=k.currentTime;s.logger.log("switching audio track : currentTime:"+be),be>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=se.BUFFER_FLUSHING,P.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ae=!0,this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var $e=this.pendingData;if(!$e){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),P.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(fn){fn&&fn.length&&$e.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ae&&$e.length&&($e.forEach(function(fn){c.state===se.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,fn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=jl.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(o){var c=o.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onBufferAppended=function(o){if(o.parent==="audio"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=jl.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var y=this.mediaBuffer?this.mediaBuffer:this.media;y&&s.logger.log("audio buffered : "+mt.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag;if(!(c&&c.type!=="audio"))switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=o.frag;if(_&&_.type!=="audio")break;if(!o.fatal){var y=this.fragLoadError;y?y++:y=1;var C=this.config;if(y<=C.fragLoadingMaxRetry){this.fragLoadError=y;var F=Math.min(Math.pow(2,y-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=jl.now()+F,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR}break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==se.ERROR&&(this.state=o.fatal?se.ERROR:se.IDLE,s.logger.warn("AudioStreamController: "+o.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===se.PARSING||this.state===se.PARSED)){var P=this.mediaBuffer,B=this.media.currentTime,k=P&&O.isBuffered(P,B)&&O.isBuffered(P,B+.5);if(k){var ae=this.config;ae.maxMaxBufferLength>=ae.maxBufferLength&&(ae.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+ae.maxMaxBufferLength+"s")),this.state=se.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=se.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var o=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){o.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=se.PARSED):(this.state=se.IDLE,this.fragPrevious=null,this.tick())},jf(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("audio stream:"+c+"->"+o)}},get:function(){return this._state}}]),D}(Ll),zI=$I,jg=function(){if(typeof window!="undefined"&&window.VTTCue)return window.VTTCue;var w="auto",D={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(y){if(typeof y!="string")return!1;var C=D[y.toLowerCase()];return C?y.toLowerCase():!1}function o(y){if(typeof y!="string")return!1;var C=f[y.toLowerCase()];return C?y.toLowerCase():!1}function c(y){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");Wu=Oa,this.hasBeenReset=!0}})),Object.defineProperty(P,"positionAlign",c({},B,{get:function(){return nu},set:function(Oa){var jo=o(Oa);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");nu=jo,this.hasBeenReset=!0}})),Object.defineProperty(P,"size",c({},B,{get:function(){return Zi},set:function(Oa){if(Oa<0||Oa>100)throw new Error("Size must be between 0 and 100.");Zi=Oa,this.hasBeenReset=!0}})),Object.defineProperty(P,"align",c({},B,{get:function(){return ft},set:function(Oa){var jo=o(Oa);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");ft=jo,this.hasBeenReset=!0}})),P.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_}(),VI=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function Ng(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new VI,this.regionList=[]}function QI(w){function D(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=w.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?D(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?D(f[1],f[2],0,f[4]):D(0,f[1],f[2],f[4]):null}function Og(){this.values=Object.create(null)}Og.prototype={set:function(D,f){!this.get(D)&&f!==""&&(this.values[D]=f)},get:function(D,f,v){return v?this.has(D)?this.values[D]:f[v]:this.has(D)?this.values[D]:f},has:function(D){return D in this.values},alt:function(D,f,v){for(var o=0;o=0&&f<=100)?(this.set(D,f),!0):!1}};function Ug(w,D,f,v){var o=v?w.split(v):[w];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var y=_[0],C=_[1];D(y,C)}}}var Nf=new jg(0,0,0),Xi=Nf.align==="middle"?"middle":"center";function KI(w,D,f){var v=w;function o(){var y=QI(w);if(y===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),y}function c(y,C){var F=new Og;Ug(y,function(k,ae){switch(k){case"region":for(var be=f.length-1;be>=0;be--)if(f[be].id===ae){F.set(k,f[be].region);break}break;case"vertical":F.alt(k,ae,["rl","lr"]);break;case"line":var $e=ae.split(","),fn=$e[0];F.integer(k,fn),F.percent(k,fn)&&F.set("snapToLines",!1),F.alt(k,fn,["auto"]),$e.length===2&&F.alt("lineAlign",$e[1],["start",Xi,"end"]);break;case"position":$e=ae.split(","),F.percent(k,$e[0]),$e.length===2&&F.alt("positionAlign",$e[1],["start",Xi,"end","line-left","line-right","auto"]);break;case"size":F.percent(k,ae);break;case"align":F.alt(k,ae,["start",Xi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var P=F.get("line","auto");P==="auto"&&Nf.line===-1&&(P=-1),C.line=P,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Xi);var B=F.get("position","auto");B==="auto"&&Nf.position===50&&(B=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=B}function _(){w=w.replace(/^\s+/,"")}if(_(),D.startTime=o(),_(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);w=w.substr(3),_(),D.endTime=o(),_(),c(w,D)}function kg(w){return w.replace(//gi,` `)}Ng.prototype={parse:function(D){var f=this;D&&(f.buffer+=f.decoder.decode(D,{stream:!0}));function v(){var F=f.buffer,P=0;for(F=kg(F);P")===-1){f.cue.id=c;continue}case"CUE":try{KI(c,f.cue,f.regionList)}catch{f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var C=c.indexOf("-->")!==-1;if(!c||C&&(y=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+=` `),f.cue.text+=c;continue;case"BADCUE":c||(f.state="ID");continue}}}catch{f.state==="CUETEXT"&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state=f.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var D=this;try{if(D.buffer+=D.decoder.decode(),(D.cue||D.state==="HEADER")&&(D.buffer+=` `,D.parse()),D.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return D.onflush&&D.onflush(),this}};var YI=Ng;function XI(w,D,f,v){for(var o,c,_,y,C,F=window.VTTCue||TextTrackCue,P=0;P=16?y--:y++,navigator.userAgent.match(/Firefox\//)?c.line=P+1:c.line=P>7?P-2:P+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(y/32))),w.addCue(c)}}var Kd={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Bg=function(D){var f=D;return Kd.hasOwnProperty(D)&&(f=Kd[D]),String.fromCharCode(f)},qu=15,Nl=100,ZI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},eT={17:2,18:4,21:6,22:8,23:10,19:13,20:15},nT={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},aT={25:2,26:4,29:6,30:8,31:10,27:13,28:15},tT=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Hg;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(Hg||(Hg={}));var Ya={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(D){this.time=D},log:function(D,f){var v=this.verboseFilter[D];this.verboseLevel>=v}},ps=function(D){for(var f=[],v=0;vNl&&(Ya.log("ERROR","Too large cursor position "+this.pos),this.pos=Nl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=Bg(v);if(this.pos>=Nl){Ya.log("ERROR","Cannot insert "+v.toString(16)+" ("+o+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(o,this.currPenState),this.moveCursor(1)},D.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},D.getTextAndFormat=function(){return this.rows},w}(),I0=function(){function w(f,v){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new Xa,this.nonDisplayedMemory=new Xa,this.lastOutputScreen=new Xa,this.currRollUpRow=this.displayedMemory.rows[qu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var D=w.prototype;return D.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[qu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},D.getHandler=function(){return this.outputFilter},D.setHandler=function(v){this.outputFilter=v},D.setPAC=function(v){this.writeScreen.setPAC(v)},D.setBkgData=function(v){this.writeScreen.setBkgData(v)},D.setMode=function(v){v!==this.mode&&(this.mode=v,Ya.log("INFO","MODE="+v),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},D.insertChars=function(v){for(var o=0;o=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}Ya.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Ya.time;o!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=o:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,o,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:o),this.lastOutputScreen.copy(this.displayedMemory))},D.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),T0=function(){function w(f,v,o){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=f||1,this.outputs=[v,o],this.channels=[new I0(1,v),new I0(2,o)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var D=w.prototype;return D.getHandler=function(v){return this.channels[v].getHandler()},D.setHandler=function(v,o){this.channels[v].setHandler(o)},D.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Ya.setTime(v);for(var F=0;F ("+ps([_,y])+")");if(c=this.parseCmd(_,y),c||(c=this.parseMidrow(_,y)),c||(c=this.parsePAC(_,y)),c||(c=this.parseBackgroundAttributes(_,y)),!c&&(C=this.parseChars(_,y),C))if(this.currChNr&&this.currChNr>=0){var P=this.channels[this.currChNr-1];P.insertChars(C)}else Ya.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ya.log("WARNING","Couldn't parse cleaned data "+ps([_,y])+" orig: "+ps([o[F],o[F+1]])))}},D.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,y=(v===23||v===31)&&o>=33&&o<=35;if(!(_||y))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ya.log("DEBUG","Repeated command ("+ps([v,o])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?o===32?C.ccRCL():o===33?C.ccBS():o===34?C.ccAOF():o===35?C.ccAON():o===36?C.ccDER():o===37?C.ccRU(2):o===38?C.ccRU(3):o===39?C.ccRU(4):o===40?C.ccFON():o===41?C.ccRDC():o===42?C.ccTR():o===43?C.ccRTD():o===44?C.ccEDM():o===45?C.ccCR():o===46?C.ccENM():o===47&&C.ccEOC():C.ccTO(o-32),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.parseMidrow=function(v,o){var c=null;if((v===17||v===25)&&o>=32&&o<=47){if(v===17?c=1:c=2,c!==this.currChNr)return Ya.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Ya.log("DEBUG","MIDROW ("+ps([v,o])+")"),!0}return!1},D.parsePAC=function(v,o){var c=null,_=null,y=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(y||C))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,o>=64&&o<=95?_=c===1?ZI[v]:nT[v]:_=c===1?eT[v]:aT[v];var F=this.interpretPAC(_,o),P=this.channels[c-1];return P.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.interpretPAC=function(v,o){var c=o,_={color:null,italics:!1,indent:null,underline:!1,row:v};return o>95?c=o-96:c=o-64,_.underline=(c&1)==1,c<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((c-16)/2)*4,_},D.parseChars=function(v,o){var c=null,_=null,y=null;if(v>=25?(c=2,y=v-8):(c=1,y=v),y>=17&&y<=19){var C=o;y===17?C=o+80:y===18?C=o+112:C=o+144,Ya.log("INFO","Special char '"+Bg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=ps(_);Ya.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},D.parseBackgroundAttributes=function(v,o){var c,_,y,C,F=(v===16||v===24)&&o>=32&&o<=47,P=(v===23||v===31)&&o>=45&&o<=47;return F||P?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=tT[_],o%2==1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),y=v<24?1:2,C=this.channels[y-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},D.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},w}(),Xd=function(D,f,v){return D.substr(v||0,f.length)===f},iT=function(D){var f=parseInt(D.substr(-3)),v=parseInt(D.substr(-6,2)),o=parseInt(D.substr(-9,2)),c=D.length>9?parseInt(D.substr(0,D.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(o)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+D);return f+=1e3*v,f+=60*1e3*o,f+=60*60*1e3*c,f},S0=function(D){for(var f=5381,v=D.length;v;)f=f*33^D.charCodeAt(--v);return(f>>>0).toString()},lT=function(D,f,v){var o=D[f],c=D[o.prevCC];if(!c||!c.new&&o.new){D.ccOffset=D.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)D.ccOffset+=o.start-c.start,o.new=!1,o=c,c=D[o.prevCC];D.presentationOffset=v},cT={parse:function(D,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(w0.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(y,` `).split(` `),F="00:00.000",P=0,B=0,k=0,ae=[],be,$e=!0,fn=!1,fa=new YI;fa.oncue=function(Xn){var ua=v[o],Ra=v.ccOffset;ua&&ua.new&&(B!==void 0?Ra=v.ccOffset=ua.start:lT(v,o,k)),k&&(Ra=k-v.presentationOffset),fn&&(Xn.startTime+=Ra-B,Xn.endTime+=Ra-B),Xn.id=S0(Xn.startTime.toString())+S0(Xn.endTime.toString())+S0(Xn.text),Xn.text=decodeURIComponent(encodeURIComponent(Xn.text)),Xn.endTime>0&&ae.push(Xn)},fa.onparsingerror=function(Xn){be=Xn},fa.onflush=function(){if(be&&_){_(be);return}c(ae)},C.forEach(function(Xn){if($e)if(Xd(Xn,"X-TIMESTAMP-MAP=")){$e=!1,fn=!0,Xn.substr(16).split(",").forEach(function(ua){Xd(ua,"LOCAL:")?F=ua.substr(6):Xd(ua,"MPEGTS:")&&(P=parseInt(ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),P-=f,B=iT(F)/1e3,k=P/9e4}catch(ua){fn=!1,be=ua}return}else Xn===""&&($e=!1);fa.parse(Xn+` `)}),fa.flush()}},sT=cT;function qg(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function vT(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fT=function(w){vT(D,w);function D(v){var o;if(o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_USERDATA,l.default.FRAG_DECRYPTED,l.default.MANIFEST_LOADING,l.default.MANIFEST_LOADED,l.default.FRAG_LOADED,l.default.INIT_PTS_FOUND)||this,o.media=null,o.config=void 0,o.enabled=!0,o.Cues=void 0,o.textTracks=[],o.tracks=[],o.initPTS=[],o.unparsedVttFrags=[],o.cueRanges=[],o.captionsTracks={},o.captionsProperties=void 0,o.cea608Parser=void 0,o.lastSn=-1,o.prevCC=-1,o.vttCCs=null,o.hls=v,o.config=v.config,o.Cues=v.config.cueHandler,o.captionsProperties={textTrack1:{label:o.config.captionsTextTrack1Label,languageCode:o.config.captionsTextTrack1LanguageCode},textTrack2:{label:o.config.captionsTextTrack2Label,languageCode:o.config.captionsTextTrack2LanguageCode}},o.config.enableCEA708Captions){var c=new Jg(qg(o),"textTrack1"),_=new Jg(qg(o),"textTrack2");o.cea608Parser=new uT(0,c,_)}return o}var f=D.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,P=C.length;P--;){var B=C[P],k=_T(B[0],B[1],c,_);if(k>=0&&(B[0]=Math.min(B[0],c),B[1]=Math.max(B[1],_),F=!0,k/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,y)},f.onInitPtsFound=function(o){var c=this,_=o.frag,y=o.id,C=o.initPTS,F=this.unparsedVttFrags;y==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(P){c.onFragLoaded(P)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!P||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),y.live){var B=Ut(P.details,y,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+B+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},B)}else this._clearReloadTimer()},f.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},f.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},f._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},f._loadCurrentTrack=function(){var o=this.trackId,c=this.tracks,_=this.hls,y=c[o];o<0||!y||y.details&&!y.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:y.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,y=this.trackId;if(!!c){var C=d(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(B){B.mode="disabled"});else{var F=C[y];F&&(F.mode="disabled")}var P=C[o];P&&(P.mode=_?"showing":"hidden")}},f._setSubtitleTrackInternal=function(o){var c=this.hls,_=this.tracks;!Object(i.isFiniteNumber)(o)||o<-1||o>=_.length||(this.trackId=o,s.logger.log("Switching to subtitle track "+o),c.trigger(l.default.SUBTITLE_TRACK_SWITCH,{id:o}),this._loadCurrentTrack())},f._onTextTracksChanged=function(){if(!!this.media){for(var o=-1,c=d(this.media.textTracks),_=0;_=y[P].start&&F<=y[P].end){C=y[P];break}var B=c.start+c.duration;C?C.end=B:(C={start:F,end:B},y.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=se.IDLE},f.onMediaDetaching=function(){var o=this;!this.media||(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(c){o.tracksBuffered[c.id]=[]}),this.media=null,this.state=se.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=se.IDLE)},f.onSubtitleTracksUpdated=function(o){var c=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=o.subtitleTracks,this.tracks.forEach(function(_){c.tracksBuffered[_.id]=[]})},f.onSubtitleTrackSwitch=function(o){if(this.currentTrackId=o.id,!this.tracks||!this.tracks.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.tracks[this.currentTrackId];c&&c.details&&this.setInterval(da)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,y=this.currentTrackId,C=this.tracks,F=C[y];c>=C.length||c!==y||!F||(_.live&&Vn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(da))},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,y=o.frag,C=this.hls;if(this.state===se.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=pn.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(P){var B=pn.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:P,stats:{tstart:F,tdecrypt:B}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=se.IDLE;return}switch(this.state){case se.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,y=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,P=o.maxFragLookUpTolerance,B=Math.min(o.maxBufferLength,o.maxMaxBufferLength),k=O.bufferedInfo(this._getBuffered(),y.currentTime,F),ae=k.end,be=k.len,$e=C[c].details,fn=$e.fragments,fa=fn.length,Xn=fn[fa-1].start+fn[fa-1].duration;if(be>B)return;var ua,Ra=this.fragPrevious;aezg){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=zg-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){switch(o.mediaKeySystemDomain){case or.WIDEVINE:return c}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},f._requestLicense=function(o,c){s.logger.log("Requesting content license for key-system");var _=this._mediaKeysList[0];if(!_){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var y=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(y,o,c);s.logger.log("Sending license request to URL: "+y);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(P){s.logger.error("Failure requesting DRM license: "+P),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(o){if(!!this._emeEnabled){var c=o.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)}},f.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},f.onManifestParsed=function(o){if(!!this._emeEnabled){var c=o.levels.map(function(y){return y.audioCodec}),_=o.levels.map(function(y){return y.videoCodec});this._attemptKeySystemAccess(or.WIDEVINE,c,_)}},mT(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(g),DT=Qg;function gT(w){for(var D=1;Dc)return y}return 0}},{key:"maxAutoLevel",get:function(){var o=this.levels,c=this.autoLevelCapping,_;return c===-1&&o&&o.length?_=o.length-1:_=c,_}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(o){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,o)}},{key:"audioTracks",get:function(){var o=this.audioTrackController;return o?o.audioTracks:[]}},{key:"audioTrack",get:function(){var o=this.audioTrackController;return o?o.audioTrack:-1},set:function(o){var c=this.audioTrackController;c&&(c.audioTrack=o)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTrack:-1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleTrack=o)}},{key:"subtitleDisplay",get:function(){var o=this.subtitleTrackController;return o?o.subtitleDisplay:!1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=o)}}]),D}(ie);nR.defaultConfig=void 0},"./src/polyfills/number-isFinite.js":function(e,n,a){"use strict";a.r(n),a.d(n,"isFiniteNumber",function(){return t});var t=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)}},"./src/utils/get-self-scope.js":function(e,n,a){"use strict";a.r(n),a.d(n,"getSelfScope",function(){return t});function t(){return typeof window=="undefined"?self:window}},"./src/utils/logger.js":function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return g}),a.d(n,"logger",function(){return E});var t=a("./src/utils/get-self-scope.js");function r(){}var u={trace:r,debug:r,log:r,warn:r,info:r,error:r},i=u;function l(b,I){return I="["+b+"] > "+I,I}var s=Object(t.getSelfScope)();function m(b){var I=s.console[b];return I?function(){for(var L=arguments.length,N=new Array(L),z=0;z1?I-1:0),N=1;N{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.Direction=void 0;var kMe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(kMe=ag.Direction||(ag.Direction={}))});var ML=Ge(Ga=>{"use strict";var tg=Ga&&Ga.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(m&&mt)return t;if(e=a)throw new RangeError("min (".concat(n,") is equal/bigger than max (").concat(a,")"));if(ea)throw new RangeError("value (".concat(e,") is bigger than max (").concat(a,")"))}Ga.checkBoundaries=$Me;function zMe(e,n,a){return ea?a:e}Ga.checkValuesAgainstBoundaries=zMe;function VMe(e){if(!(e.length<2)&&!e.slice(1).every(function(n,a){return e[a]<=n}))throw new RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))}Ga.checkInitialOverlap=VMe;function QMe(e){var n=window.getComputedStyle(e);return{top:parseInt(n["margin-top"],10),bottom:parseInt(n["margin-bottom"],10),left:parseInt(n["margin-left"],10),right:parseInt(n["margin-right"],10)}}Ga.getMargin=QMe;function KMe(e){var n=window.getComputedStyle(e);return{top:parseInt(n["padding-top"],10)+parseInt(n["border-top-width"],10),bottom:parseInt(n["padding-bottom"],10)+parseInt(n["border-bottom-width"],10),left:parseInt(n["padding-left"],10)+parseInt(n["border-left-width"],10),right:parseInt(n["padding-right"],10)+parseInt(n["border-right-width"],10)}}Ga.getPaddingAndBorder=KMe;function YMe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return LK(r,t*n[u].x,n[u].y)})}Ga.translateThumbs=YMe;function XMe(e,n,a,t){for(var r=0,u=PK(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},rAe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(m){return m});var l=[],s=function(m){var p=xK(a[m],t[m],r,u,i),g=n[m].x;n.forEach(function(E,b){var I=E.x,L=xK(a[b],t[b],r,u,i);m!==b&&(g>=I&&g<=I+L||g+p>=I&&g+p<=I+L)&&(l.includes(b)||(l.push(m),l.push(b),l=tg(tg([],l,!0),[m,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},oAe=function(e,n,a,t,r,u){t===void 0&&(t=.1),r===void 0&&(r=" - "),u===void 0&&(u=function(b){return b});var i=(0,Ga.getStepDecimals)(t),l=(0,GL.useState)({}),s=l[0],m=l[1],p=(0,GL.useState)(u(n[a].toFixed(i))),g=p[0],E=p[1];return(0,GL.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var I={},L=e.getOffsets(),N=rAe(a,L,b,n,r,i,u),z=u(n[a].toFixed(i));if(N.length){var $=N.reduce(function(X,ve,xe,ke){return X.length?tg(tg([],X,!0),[L[ke[xe]].x],!1):[L[ke[xe]].x]},[]);if(Math.min.apply(Math,$)===L[a].x){var ne=[];N.forEach(function(X){ne.push(n[X].toFixed(i))}),z=Array.from(new Set(ne.sort(function(X,ve){return parseFloat(X)-parseFloat(ve)}))).map(u).join(r);var ue=Math.min.apply(Math,$),Z=Math.max.apply(Math,$),Y=b[N[$.indexOf(Z)]].getBoundingClientRect().width;I.left="".concat(Math.abs(ue-(Z+Y))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(z),m(I)}},[e,n]),[g,s]};Ga.useThumbOverlap=oAe;function PK(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return AK(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var NK=Ge(qi=>{"use strict";var uAe=qi&&qi.__extends||function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(t[u]=r[u])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}}(),iAe=qi&&qi.__createBinding||(Object.create?function(e,n,a,t){t===void 0&&(t=a);var r=Object.getOwnPropertyDescriptor(n,a);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(e,t,r)}:function(e,n,a,t){t===void 0&&(t=a),e[t]=n[a]}),lAe=qi&&qi.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),cAe=qi&&qi.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var a in e)a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)&&iAe(n,e,a);return lAe(n,e),n},jK=qi&&qi.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.clientX,r.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,bt.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var u;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var u=(0,bt.isTouchEvent)(r);if(!(!u&&r.button!==0)){var i=t.getTargetIndex(r);i!==-1&&(u?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:i,thumbZIndexes:t.state.thumbZIndexes.map(function(l,s){return s===i?Math.max.apply(Math,t.state.thumbZIndexes):l<=t.state.thumbZIndexes[i]?l:l-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var u=t.props,i=u.values,l=u.onChange,s=u.step,m=u.rtl,p=u.direction,g=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=m||p===mo.Direction.Left||p===mo.Direction.Down?-1:1;E!==-1&&(sAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]+b*(r.key==="PageUp"?s*10:s),E)))):vAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){g&&t.fireOnFinalChange()}):g&&t.fireOnFinalChange())},t.onKeyUp=function(r){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(r,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,m=t.props,p=m.direction,g=m.min,E=m.max,b=m.onChange,I=m.values,L=m.step,N=m.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var z=t.trackRef.current;if(!z)return null;var $=z.getBoundingClientRect(),ne=(0,bt.isVertical)(p)?$.height:$.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],Z=u-s[1],Y=0;switch(p){case mo.Direction.Right:case mo.Direction.Left:Y=ue/ne*(E-g);break;case mo.Direction.Down:case mo.Direction.Up:Y=Z/ne*(E-g);break;default:(0,bt.assertUnreachable)(p)}if(N&&(Y*=-1),Math.abs(Y)>=L/2){for(var X=0;XE?Y=E-I[X]:ve=L/2&&b((0,bt.replaceAt)(I,l,t.normalizeValue(ke,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,m=i.step,p=i.allowOverlap,g=i.values;return(0,bt.normalizeValue)(r,u,l,s,m,p,g)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,u=r.onFinalChange,i=r.values;u&&u(i)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var u=0;u-1?"grabbing":this.props.draggableTrack?(0,bt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?bt.voidFn:this.onMouseDownTrack,onTouchStart:E?bt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:jK(jK([],N.map(function(z,$,ne){return l({props:{style:a.props.direction===mo.Direction.Left||a.props.direction===mo.Direction.Right?{position:"absolute",left:"".concat(z[0],"px"),marginTop:"".concat(z[1],"px")}:{position:"absolute",top:"".concat(z[0],"px"),marginLeft:"".concat(z[1],"px")},key:"mark".concat($),ref:a.markRefs[$]},index:$})}),!0),s.map(function(z,$){var ne=a.state.draggedThumbIndex===$;return u({index:$,value:z,isDragged:ne,props:{style:{position:"absolute",zIndex:L[$],cursor:E?"inherit":ne?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:E?void 0:0,"aria-valuemax":g?p:s[$+1]||p,"aria-valuemin":g?m:s[$-1]||m,"aria-valuenow":z,draggable:!1,ref:a.thumbRefs[$],role:"slider",onKeyDown:E?bt.voidFn:a.onKeyDown,onKeyUp:E?bt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:mo.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(AE.Component);qi.default=fAe});var OK=Ge(hu=>{"use strict";var _Ae=hu&&hu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});hu.checkValuesAgainstBoundaries=hu.relativeValue=hu.useThumbOverlap=hu.Direction=hu.getTrackBackground=hu.Range=void 0;var pAe=_Ae(NK());hu.Range=pAe.default;var LE=ML();Object.defineProperty(hu,"getTrackBackground",{enumerable:!0,get:function(){return LE.getTrackBackground}});Object.defineProperty(hu,"useThumbOverlap",{enumerable:!0,get:function(){return LE.useThumbOverlap}});Object.defineProperty(hu,"relativeValue",{enumerable:!0,get:function(){return LE.relativeValue}});Object.defineProperty(hu,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return LE.checkValuesAgainstBoundaries}});var dAe=ME();Object.defineProperty(hu,"Direction",{enumerable:!0,get:function(){return dAe.Direction}})});var PPe={};J2(PPe,{boot:()=>xPe});var q2=function(e){return function(n){for(var a=e.length,t=n.length,r=new Array(a*t),u=0,i=0;i=a.length?n:e(a[t])};var Y2=function(e,n,a,t){for(var r=0,u=t.length;r=t.length)return n;var r=t.slice();return r.splice(a,1),e(r)};var L0=function(e){return e.slice().reverse()};var Z2=function(e,n){return n.filter(e)};var ex=function(){function e(n,a,t,r,u,i){var l,s,m,p,g,E,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Gt={show:Mx};var Ax=function(e){return e.showRecordFields},Dv=function(){return function(){return function(e){var n=Ax(e);return{show:function(a){return"{"+(n(Wa.value)(a)+"}")}}}}};var Hf={show:Fx},an={show:Cx},sm={show:Gx},j0={show:function(e){if(e)return"true";if(!e)return"false";throw new Error("Failed pattern match at Data.Show (line 29, column 1 - line 31, column 23): "+[e.constructor.name])}},te=function(e){return e.show};var gv=function(e){var n=Ft(e);return function(a){var t=Ax(a);return function(r){var u=te(r);return{showRecordFields:function(i){return function(l){var s=t(Wa.value)(l),m=n(Wa.value),p=No(m)(l);return" "+(m+(": "+(u(p)+(","+s))))}}}}}},Rv=function(e){var n=Ft(e);return function(a){var t=te(a);return{showRecordFields:function(r){return function(u){var i=n(Wa.value),l=No(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Re=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ce=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Oe=function(){function e(){}return e.value=new e,e}(),vm=function(e){return e};var N0=function(e){return e.to};var O0=function(e){return e.from};var Dee=ln(_n),G=function(){function e(){}return e.value=new e,e}(),T=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Lx=function(e){var n=Ye(e);return{append:function(a){return function(t){if(a instanceof G)return t;if(t instanceof G)return a;if(a instanceof T&&t instanceof T)return new T(n(a.value0)(t.value0));throw new Error("Failed pattern match at Data.Maybe (line 182, column 1 - line 185, column 43): "+[a.constructor.name,t.constructor.name])}}}};var In=function(e){return function(n){return function(a){if(a instanceof G)return e;if(a instanceof T)return n(a.value0);throw new Error("Failed pattern match at Data.Maybe (line 237, column 1 - line 237, column 51): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},Mt=In(!0)(cn(!1)),Pt=In(!1)(cn(!0));var oe={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},gee=U(oe);var Ue=function(e){return In(e)(Dee)},Et=function(){return function(e){if(e instanceof T)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var nr=function(e){var n=De(e);return{eq:function(a){return function(t){return a instanceof G&&t instanceof G?!0:a instanceof T&&t instanceof T?n(a.value0)(t.value0):!1}}}},bu=function(e){var n=He(e),a=nr(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return Ne.value;if(t instanceof G)return me.value;if(r instanceof G)return pe.value;if(t instanceof T&&r instanceof T)return n(t.value0)(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 0, column 0 - line 0, column 0): "+[t.constructor.name,r.constructor.name])}},Eq0:function(){return a}}};var Dr={apply:function(e){return function(n){if(e instanceof T)return gee(e.value0)(n);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return oe}};var Ve={bind:function(e){return function(n){if(e instanceof T)return n(e.value0);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return Dr}};var la=function(){return{pure:T.create,Apply0:function(){return Dr}}}();var oo={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return oe}},Ree=function(){return{empty:G.value,Alt0:function(){return oo}}}(),uo={Applicative0:function(){return la},Plus1:function(){return Ree}};var Ie=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Te=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var gc=function(e){return In(new Ie(e))(Te.create)};var ur={map:function(e){return function(n){if(n instanceof Ie)return new Ie(n.value0);if(n instanceof Te)return new Te(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},bee=U(ur);var jt=function(e){return function(n){return function(a){if(a instanceof Ie)return e(a.value0);if(a instanceof Te)return n(a.value0);throw new Error("Failed pattern match at Data.Either (line 208, column 1 - line 208, column 64): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},yv=function(){return jt(cn(G.value))(T.create)}();var fm={apply:function(e){return function(n){if(e instanceof Ie)return new Ie(e.value0);if(e instanceof Te)return bee(e.value0)(n);throw new Error("Failed pattern match at Data.Either (line 70, column 1 - line 72, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return ur}};var tu={bind:jt(function(e){return function(n){return new Ie(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return fm}};var Rc=function(){return{pure:Te.create,Apply0:function(){return fm}}}(),_R={Applicative0:function(){return Rc},Bind1:function(){return tu}};var Ri=function(e){return e};var yc={map:function(e){return function(n){return e(n)}}};var xx={apply:function(e){return function(n){return e(n)}},Functor0:function(){return yc}},wee={bind:function(e){return function(n){return n(e)}},Apply0:function(){return xx}},_m={pure:Ri,Apply0:function(){return xx}},ar={Applicative0:function(){return _m},Bind1:function(){return wee}};var Px=function(e){return Math.min(Math.abs(e),2147483647)},jx=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},Nx=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var ST={Ring0:function(){return mc}};var Yr=function(e){return e.mod};var vr={degree:Px,div:jx,mod:Nx,CommutativeRing0:function(){return ST}},Ur=function(e){return e.div};var It={mempty:"",Semigroup0:function(){return kf}};var Va=function(e){return e.mempty};var Ox=function(e){return function(){return e}},Ux=function(e){return function(n){return function(){return n(e())()}}};var CT=function(e){return function(n){return function(){for(var a=0,t=e.length;a>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},vP=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=0;u":e===void 0?"":e instanceof Date?e.toString():typeof Blob!="undefined"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var zne=Ht(Be),kP=Bl(Iv),Vne=Dt(Be);var W0=function(e){return e.foldrWithIndex};var Sm=function(e){return e.foldlWithIndex};var Qne=function(e){var n=W0(e);return function(a){var t=Ye(a.Semigroup0()),r=Va(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},Cm={foldrWithIndex:function(e){return function(n){var a=zne(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=kP(sn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=Vne(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=kP(sn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return Qne(Cm)(e)},Foldable0:function(){return Be}};var BP=function(e){var n=Sm(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof G?a(r)(i):u}}};return n(t)(G.value)}};var HP=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Tt=function(e){return e},JP=function(e){return function(n){return function(a){var t;a<11?t="[0-"+(a-1).toString()+"]":a===11?t="[0-9a]":t="[0-9a-"+String.fromCharCode(86+a)+"]";var r=new RegExp("^[\\+\\-]?"+t+"+$","i");return function(u){if(r.test(u)){var i=parseInt(u,a);return(i|0)===i?e(i):n}else return n}}}};var CR=isFinite;var FR=Math.abs;var $0=Math.floor,QT=Math.log;var GR=function(e){return function(n){return Math.pow(e,n)}};var i_=Math.round;var qP=2.302585092994046;var WP=kt(cm),$P=nt(cm);var nae=function(){return JP(T.create)(G.value)}(),wc=nae(10),Is=function(){return HP(T.create)(G.value)}(),zP=function(e){if(!CR(e))return 0;if(e>=Tt(WP))return WP;if(e<=Tt($P))return $P;if(je)return Ue(0)(Is(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},MR=function(e){return zP(i_(e))};var Eo=function(e){return zP($0(e))};function AR(e){return Object.prototype.toString.call(e).slice(8,-1)}function l_(e){return e===null}function c_(e){return e===void 0}var LR=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function VP(e){return e.stack||e.toString()}function Iu(e){return new Error(e)}function z0(e){return e.message}function xR(e){return function(){throw e}}var KP=function(e){return xR(Iu(e))};var YP={show:VP};var Rr=function(e){return e.throwError};var Nt=function(e){return e.catchError};var Fv=function(e){var n=Nt(e),a=e.MonadThrow0().Monad0(),t=U(a.Bind1().Apply0().Functor0()),r=q(a.Applicative0());return function(u){return n(t(Te.create)(u))(function(i){return r(Ie.create(i))})}};var Sr={liftEffect:ln(_n),Monad0:function(){return bc}},gn=function(e){return e.liftEffect};var aae=U(ur);var YT=function(e){return e};var NR=function(e){return e};var OR=function(e){return function(n){return e(n)}},Gm=function(e){var n=U(e);return{map:function(a){return OR(n(aae(a)))}}};var ZP=function(e){return{Applicative0:function(){return al(e)},Bind1:function(){return Ec(e)}}},Ec=function(e){var n=ee(e.Bind1()),a=q(e.Applicative0());return{bind:function(t){return function(r){return n(t)(jt(function(u){return a(Ie.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return UR(e)}}},UR=function(e){var n=Gm(e.Bind1().Apply0().Functor0());return{apply:Qu(ZP(e)),Functor0:function(){return n}}},al=function(e){return{pure:function(){var n=q(e.Applicative0());return function(a){return YT(n(Te.create(a)))}}(),Apply0:function(){return UR(e)}}};var XT=function(e){var n=ZP(e);return{throwError:function(){var a=q(e.Applicative0());return function(t){return YT(a(Ie.create(t)))}}(),Monad0:function(){return n}}};var kR=function(e){var n=Ye(e);return function(a){var t=a.Bind1(),r=ee(t),u=q(a.Applicative0()),i=Gm(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(m){if(m instanceof Te)return u(new Te(m.value0));if(m instanceof Ie)return r(s)(function(p){if(p instanceof Te)return u(new Te(p.value0));if(p instanceof Ie)return u(new Ie(n(m.value0)(p.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 87, column 9 - line 89, column 49): "+[p.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 83, column 5 - line 89, column 49): "+[m.constructor.name])})}},Functor0:function(){return i}}}};var ei=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var BR=function(e){var n=ru(e);return function(a){return new ei(a,n)}};var ZT=function(e){var n=U(e);return{map:function(a){return function(t){return new ei(a(t.value0),n(a)(t.value1))}}}};var eS=function(e){var n=Tr(e),a=Dt(e),t=Ht(e);return{foldMap:function(r){var u=Ye(r.Semigroup0()),i=n(r);return function(l){return function(s){return u(l(s.value0))(i(l)(s.value1))}}},foldl:function(r){return function(u){return function(i){return a(r)(r(u)(i.value0))(i.value1)}}},foldr:function(r){return function(u){return function(i){return r(i.value0)(t(r)(u)(i.value1))}}}}};var Vt=function(){function e(){}return e.value=new e,e}(),et=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),HR=function(e){return e},vae=function(e){return new et(e.value0,e.value1)};var fae=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof et&&m.value1 instanceof et&&m.value1.value1 instanceof et){r=new et(m,s),t=m.value1.value1.value1;return}var p=function(E){return E instanceof et&&E.value1 instanceof et&&E.value1.value1 instanceof Vt?new et(e(E.value0),new et(e(E.value1.value0),Vt.value)):E instanceof et&&E.value1 instanceof Vt?new et(e(E.value0),Vt.value):Vt.value},g=function(E){return function(b){var I=E,L=!1,N;function z($,ne){if($ instanceof et&&$.value0 instanceof et&&$.value0.value1 instanceof et&&$.value0.value1.value1 instanceof et){I=$.value1,b=new et(e($.value0.value0),new et(e($.value0.value1.value0),new et(e($.value0.value1.value1.value0),ne)));return}return L=!0,ne}for(;!L;)N=z(I,b);return N}};return u=!0,g(s)(p(m))}for(;!u;)i=l(r,t);return i}};return n(Vt.value)},nS={map:fae};var aS=ZT(nS),Hr={foldr:function(e){return function(n){var a=function(){var r=function(u){return function(i){var l=u,s=!1,m;function p(g,E){if(E instanceof Vt)return s=!0,g;if(E instanceof et){l=new et(E.value0,g),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[g.constructor.name,E.constructor.name])}for(;!s;)m=p(l,i);return m}};return r(Vt.value)}(),t=Dt(Hr)(qa(e))(n);return function(r){return t(a(r))}}},foldl:function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof Vt)return u=!0,s;if(m instanceof et){r=e(s)(m.value0),t=m.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[m.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=Ye(e.Semigroup0()),a=Va(e);return function(t){return Dt(Hr)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var _ae=Ht(Hr);var Lm=eS(Hr);var JR={append:function(e){return function(n){return _ae(et.create)(n)(e)}}},tj=Ye(JR);var qR={append:function(e){return function(n){return new ei(e.value0,tj(e.value1)(vae(n)))}}};var rj={alt:tj,Functor0:function(){return nS}},tS=function(){return{empty:Vt.value,Alt0:function(){return rj}}}();var yae=ut($x);var ij=function(e){return new et(e,Vt.value)};var rS=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Vt)return r=!0,l;if(s instanceof et){t=new et(s.value0,l),a=s.value1;return}throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[l.constructor.name,s.constructor.name])}for(;!r;)u=i(t,a);return u}};return e(Vt.value)}();var oS=function(e){var n=ee(e.Monad0().Bind1()),a=Uo(e);return function(t){var r=t.Plus1().Alt0(),u=ia(r),i=U(r.Functor0()),l=q(t.Applicative0());return function(s){var m=function(p){return n(u(i(tr.create)(s))(l(new zt(de))))(function(g){return l(yae(function(E){return new et(E,p)})(function(E){return rS(p)})(g))})};return a(m)(Vt.value)}}};var qo=function(e){return Ht(e)(et.create)(Vt.value)};var lj=function(e){return e()};var cj=function(e){throw new Error(e)};var sj=function(){return cj};var bae=sj(),wae=lj,Ic=function(e){return wae(function(){return bae(e)})};var $R=function(){var e=BR(tS);return function(n){return HR(e(n))}}();var _j=function(e){return e.value0};var K0=function(e){return e.join("")},Pm=function(e){return e.split("")},Tu=function(e){return e},pj=function(e){return function(n){return function(a){return function(t){return a>=0&&a=0&&e=0&&e<100&&l.setUTCFullYear(e),l.getTime()};function Gj(e,n){var a=sS(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=sS(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function Mj(e){return function(n){return function(a){return function(t){var r=sS(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond),u=new Date(r+a);return isNaN(u.getTime())?n:e({year:u.getUTCFullYear(),month:u.getUTCMonth()+1,day:u.getUTCDate(),hour:u.getUTCHours(),minute:u.getUTCMinutes(),second:u.getUTCSeconds(),millisecond:u.getUTCMilliseconds()})}}}}var Aj=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function Lj(e,n,a,t){var r=Aj(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function xj(e,n,a){return Aj(e,n-1,a).getUTCDay()}function Pv(e){return e.charCodeAt(0)}function Pj(e){return String.fromCharCode(e)}var Jr=function(e){var n=q(e.Applicative0()),a=ru(e.Plus1());return function(t){if(t)return n(de);if(!t)return a;throw new Error("Failed pattern match at Control.Alternative (line 48, column 1 - line 48, column 54): "+[t.constructor.name])}};var jj=nt(hv),Nj=kt(hv);var aa=function(e){return e.toEnum};var Hn=function(e){return e.fromEnum},vS=function(e){var n=aa(e),a=Hn(e),t=nt(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof T)return l.value0;if(l instanceof G){var s=i=Pv(jj)&&e<=Pv(Nj)?new T(Pj(e)):G.value},Jae={succ:__(fS)(Pv),pred:p_(fS)(Pv),Ord0:function(){return vR}};var d_=function(){return{cardinality:Pv(Nj)-Pv(jj)|0,toEnum:fS,fromEnum:Pv,Bounded0:function(){return hv},Enum1:function(){return Jae}}}();var YR=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},Oj=te(an);var Ei=function(){function e(){}return e.value=new e,e}(),rl=function(){function e(){}return e.value=new e,e}(),ol=function(){function e(){}return e.value=new e,e}(),ul=function(){function e(){}return e.value=new e,e}(),il=function(){function e(){}return e.value=new e,e}(),ll=function(){function e(){}return e.value=new e,e}(),ql=function(){function e(){}return e.value=new e,e}(),iu=function(){function e(){}return e.value=new e,e}(),Su=function(){function e(){}return e.value=new e,e}(),lu=function(){function e(){}return e.value=new e,e}(),Cu=function(){function e(){}return e.value=new e,e}(),Fu=function(){function e(){}return e.value=new e,e}(),cu=function(){function e(){}return e.value=new e,e}(),su=function(){function e(){}return e.value=new e,e}(),Gu=function(){function e(){}return e.value=new e,e}(),Mu=function(){function e(){}return e.value=new e,e}(),Au=function(){function e(){}return e.value=new e,e}(),Lu=function(){function e(){}return e.value=new e,e}(),ti=function(){function e(){}return e.value=new e,e}();var Uj={show:function(e){return"(Year "+(Oj(e)+")")}},kj={show:function(e){if(e instanceof Ei)return"Monday";if(e instanceof rl)return"Tuesday";if(e instanceof ol)return"Wednesday";if(e instanceof ul)return"Thursday";if(e instanceof il)return"Friday";if(e instanceof ll)return"Saturday";if(e instanceof ql)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},XR={show:function(e){if(e instanceof iu)return"January";if(e instanceof Su)return"February";if(e instanceof lu)return"March";if(e instanceof Cu)return"April";if(e instanceof Fu)return"May";if(e instanceof cu)return"June";if(e instanceof su)return"July";if(e instanceof Gu)return"August";if(e instanceof Mu)return"September";if(e instanceof Au)return"October";if(e instanceof Lu)return"November";if(e instanceof ti)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},Bj={show:function(e){return"(Day "+(Oj(e)+")")}},ZR=na,ey=na,Hj=ct,qae={eq:function(e){return function(n){return e instanceof Ei&&n instanceof Ei||e instanceof rl&&n instanceof rl||e instanceof ol&&n instanceof ol||e instanceof ul&&n instanceof ul||e instanceof il&&n instanceof il||e instanceof ll&&n instanceof ll||e instanceof ql&&n instanceof ql}}},Jj={compare:function(e){return function(n){if(e instanceof Ei&&n instanceof Ei)return Ne.value;if(e instanceof Ei)return me.value;if(n instanceof Ei)return pe.value;if(e instanceof rl&&n instanceof rl)return Ne.value;if(e instanceof rl)return me.value;if(n instanceof rl)return pe.value;if(e instanceof ol&&n instanceof ol)return Ne.value;if(e instanceof ol)return me.value;if(n instanceof ol)return pe.value;if(e instanceof ul&&n instanceof ul)return Ne.value;if(e instanceof ul)return me.value;if(n instanceof ul)return pe.value;if(e instanceof il&&n instanceof il)return Ne.value;if(e instanceof il)return me.value;if(n instanceof il)return pe.value;if(e instanceof ll&&n instanceof ll)return Ne.value;if(e instanceof ll)return me.value;if(n instanceof ll)return pe.value;if(e instanceof ql&&n instanceof ql)return Ne.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return qae}},_S={eq:function(e){return function(n){return e instanceof iu&&n instanceof iu||e instanceof Su&&n instanceof Su||e instanceof lu&&n instanceof lu||e instanceof Cu&&n instanceof Cu||e instanceof Fu&&n instanceof Fu||e instanceof cu&&n instanceof cu||e instanceof su&&n instanceof su||e instanceof Gu&&n instanceof Gu||e instanceof Mu&&n instanceof Mu||e instanceof Au&&n instanceof Au||e instanceof Lu&&n instanceof Lu||e instanceof ti&&n instanceof ti}}},tp={compare:function(e){return function(n){if(e instanceof iu&&n instanceof iu)return Ne.value;if(e instanceof iu)return me.value;if(n instanceof iu)return pe.value;if(e instanceof Su&&n instanceof Su)return Ne.value;if(e instanceof Su)return me.value;if(n instanceof Su)return pe.value;if(e instanceof lu&&n instanceof lu)return Ne.value;if(e instanceof lu)return me.value;if(n instanceof lu)return pe.value;if(e instanceof Cu&&n instanceof Cu)return Ne.value;if(e instanceof Cu)return me.value;if(n instanceof Cu)return pe.value;if(e instanceof Fu&&n instanceof Fu)return Ne.value;if(e instanceof Fu)return me.value;if(n instanceof Fu)return pe.value;if(e instanceof cu&&n instanceof cu)return Ne.value;if(e instanceof cu)return me.value;if(n instanceof cu)return pe.value;if(e instanceof su&&n instanceof su)return Ne.value;if(e instanceof su)return me.value;if(n instanceof su)return pe.value;if(e instanceof Gu&&n instanceof Gu)return Ne.value;if(e instanceof Gu)return me.value;if(n instanceof Gu)return pe.value;if(e instanceof Mu&&n instanceof Mu)return Ne.value;if(e instanceof Mu)return me.value;if(n instanceof Mu)return pe.value;if(e instanceof Au&&n instanceof Au)return Ne.value;if(e instanceof Au)return me.value;if(n instanceof Au)return pe.value;if(e instanceof Lu&&n instanceof Lu)return Ne.value;if(e instanceof Lu)return me.value;if(n instanceof Lu)return pe.value;if(e instanceof ti&&n instanceof ti)return Ne.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return _S}},qj=ct,ny=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return ZR}}}(),Wae=function(){return{bottom:Ei.value,top:ql.value,Ord0:function(){return Jj}}}(),ay=function(){return{bottom:iu.value,top:ti.value,Ord0:function(){return tp}}}(),qr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 35, column 1 - line 40, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return ny},Enum1:function(){return $ae(0)}},$ae=YR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=aa(qr),n=Hn(qr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(qr),n=Hn(qr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ZR}}});var jv={cardinality:7,toEnum:function(e){return e===1?new T(Ei.value):e===2?new T(rl.value):e===3?new T(ol.value):e===4?new T(ul.value):e===5?new T(il.value):e===6?new T(ll.value):e===7?new T(ql.value):G.value},fromEnum:function(e){if(e instanceof Ei)return 1;if(e instanceof rl)return 2;if(e instanceof ol)return 3;if(e instanceof ul)return 4;if(e instanceof il)return 5;if(e instanceof ll)return 6;if(e instanceof ql)return 7;throw new Error("Failed pattern match at Data.Date.Component (line 175, column 14 - line 182, column 16): "+[e.constructor.name])},Bounded0:function(){return Wae},Enum1:function(){return zae(0)}},zae=YR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=aa(jv),n=Hn(jv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(jv),n=Hn(jv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return Jj}}});var pr={cardinality:12,toEnum:function(e){return e===1?new T(iu.value):e===2?new T(Su.value):e===3?new T(lu.value):e===4?new T(Cu.value):e===5?new T(Fu.value):e===6?new T(cu.value):e===7?new T(su.value):e===8?new T(Gu.value):e===9?new T(Mu.value):e===10?new T(Au.value):e===11?new T(Lu.value):e===12?new T(ti.value):G.value},fromEnum:function(e){if(e instanceof iu)return 1;if(e instanceof Su)return 2;if(e instanceof lu)return 3;if(e instanceof Cu)return 4;if(e instanceof Fu)return 5;if(e instanceof cu)return 6;if(e instanceof su)return 7;if(e instanceof Gu)return 8;if(e instanceof Mu)return 9;if(e instanceof Au)return 10;if(e instanceof Lu)return 11;if(e instanceof ti)return 12;throw new Error("Failed pattern match at Data.Date.Component (line 87, column 14 - line 99, column 19): "+[e.constructor.name])},Bounded0:function(){return ay},Enum1:function(){return Vae(0)}},Vae=YR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return tp}}});var Jm={bottom:1,top:31,Ord0:function(){return ey}},xu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Jm},Enum1:function(){return Qae(0)}},Qae=YR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ey}}});var rp=gR()();var Wj=ln(_n),ty=function(e){return e},$j=function(e){return e},op=function(e){return e};var zj=function(e){return e},up=function(e){return e.toDuration};var Vj={append:function(e){return function(n){return e+n}}};var ry={append:function(e){return function(n){return e+n}}};var Qj=hc;var Kj=hc;var oy=function(e){return e.fromDuration};var Gs={fromDuration:rp(ty)(function(e){return e*1e3}),toDuration:rp(op)(function(e){return e/1e3})},Nv={fromDuration:rp($j)(function(e){return e*6e4}),toDuration:rp(op)(function(e){return e/6e4})},ip={fromDuration:Wj,toDuration:Wj};var pS={fromDuration:rp(zj)(function(e){return e*864e5}),toDuration:rp(op)(function(e){return e/864e5})};var Zj=Hn(pr),dS=Et(),eN=aa(jv),Yae=te(Uj),Xae=te(XR),Zae=te(Bj);var ete=De(Hj),nte=De(_S),ate=De(qj),tte=He(ZR),rte=He(tp),ote=He(ey);var ute=aa(pr);var uy=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),ri=function(e){return e.value0},qm=function(e){var n=xj(e.value0,Zj(e.value1),e.value2),a=n===0;return dS(eN(a?7:n))},nN={show:function(e){return"(Date "+(Yae(e.value0)+(" "+(Xae(e.value1)+(" "+(Zae(e.value2)+")")))))}},oi=function(e){return e.value1};var iy={eq:function(e){return function(n){return ete(e.value0)(n.value0)&&nte(e.value1)(n.value1)&&ate(e.value2)(n.value2)}}},ite=De(iy),mS={compare:function(e){return function(n){var a=tte(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=rte(e.value1)(n.value1);return t instanceof me?me.value:t instanceof pe?pe.value:ote(e.value2)(n.value2)}},Eq0:function(){return iy}};var Fc=function(e){return e.value2},Ov=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new uy(r,dS(ute(u)),i)}}};return Lj(t,e,Zj(n),a)}}},ly=function(e){return function(n){return function(a){var t=new uy(e,n,a),r=ite(Ov(e)(n)(a))(t);return r?new T(t):G.value}}},hS=function(){return{bottom:new uy(nt(ny),nt(ay),nt(Jm)),top:new uy(kt(ny),kt(ay),kt(Jm)),Ord0:function(){return mS}}}();var cy=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},sy=te(an);var aN={show:function(e){return"(Second "+(sy(e)+")")}},tN={show:function(e){return"(Minute "+(sy(e)+")")}},rN={show:function(e){return"(Millisecond "+(sy(e)+")")}},oN={show:function(e){return"(Hour "+(sy(e)+")")}},vy=na,fy=na,_y=na,py=na,uN=ct,iN=ct,lN=ct,cN=ct,Wm={bottom:0,top:59,Ord0:function(){return vy}},$m={bottom:0,top:59,Ord0:function(){return fy}},zm={bottom:0,top:999,Ord0:function(){return _y}},Vm={bottom:0,top:23,Ord0:function(){return py}},Ii={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Wm},Enum1:function(){return lte(0)}},lte=cy("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return vy}}});var Ti={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return $m},Enum1:function(){return cte(0)}},cte=cy("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return fy}}});var Pu={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return zm},Enum1:function(){return ste(0)}},ste=cy("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return _y}}});var Si={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Vm},Enum1:function(){return vte(0)}},vte=cy("enumHour","Data.Time.Component",function(){return{succ:function(){var e=aa(Si),n=Hn(Si);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Si),n=Hn(Si);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return py}}});var pte=te(oN),dte=te(tN),mte=te(aN),hte=te(rN);var Dte=De(cN),gte=De(iN),Rte=De(uN),yte=De(lN),bte=He(py),wte=He(fy),Ete=He(vy),Ite=He(_y);var Gc=function(){function e(n,a,t,r){this.value0=n,this.value1=a,this.value2=t,this.value3=r}return e.create=function(n){return function(a){return function(t){return function(r){return new e(n,a,t,r)}}}},e}(),sN={show:function(e){return"(Time "+(pte(e.value0)+(" "+(dte(e.value1)+(" "+(mte(e.value2)+(" "+(hte(e.value3)+")")))))))}};var Ms=function(e){return e.value2},As=function(e){return e.value1},cl=function(e){return e.value3};var Mc=function(e){return e.value0};var DS={eq:function(e){return function(n){return Dte(e.value0)(n.value0)&>e(e.value1)(n.value1)&&Rte(e.value2)(n.value2)&&yte(e.value3)(n.value3)}}},gS={compare:function(e){return function(n){var a=bte(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=wte(e.value1)(n.value1);if(t instanceof me)return me.value;if(t instanceof pe)return pe.value;var r=Ete(e.value2)(n.value2);return r instanceof me?me.value:r instanceof pe?pe.value:Ite(e.value3)(n.value3)}},Eq0:function(){return DS}};var lp=function(){return{bottom:new Gc(nt(Vm),nt($m),nt(Wm),nt(zm)),top:new Gc(kt(Vm),kt($m),kt(Wm),kt(zm)),Ord0:function(){return gS}}}();var Tte=Hn(qr),Ste=Hn(pr),Cte=Hn(xu),Fte=Hn(Si),Gte=Hn(Ti),Mte=Hn(Ii),Ate=Hn(Pu),Lte=te(nN),xte=te(sN),Pte=De(iy),jte=De(DS),Nte=He(mS),Ote=He(gS),Ute=ee(Ve),cp=Jn(Dr),RS=U(oe),kte=Vu(Ve),Bte=aa(qr),Hte=aa(pr),Jte=aa(xu),qte=aa(Si),Wte=aa(Ti),$te=aa(Ii),zte=aa(Pu),sl=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),yS=function(e){return{year:Tte(ri(e.value0)),month:Ste(oi(e.value0)),day:Cte(Fc(e.value0)),hour:Fte(Mc(e.value1)),minute:Gte(As(e.value1)),second:Mte(Ms(e.value1)),millisecond:Ate(cl(e.value1))}},dy=function(e){return e.value1},vN={show:function(e){return"(DateTime "+(Lte(e.value0)+(" "+(xte(e.value1)+")")))}};var Vte={eq:function(e){return function(n){return Pte(e.value0)(n.value0)&&jte(e.value1)(n.value1)}}},ui={compare:function(e){return function(n){var a=Nte(e.value0)(n.value0);return a instanceof me?me.value:a instanceof pe?pe.value:Ote(e.value1)(n.value1)}},Eq0:function(){return Vte}},ii=function(e){var n=up(e);return function(a){return function(t){return n(Gj(yS(a),yS(t)))}}},Uv=function(e){return e.value0},sp=function(){return{bottom:new sl(nt(hS),nt(lp)),top:new sl(kt(hS),kt(lp)),Ord0:function(){return ui}}}(),Ac=function(e){var n=oy(e);return function(a){return function(t){return Ute(Mj(T.create)(G.value)(n(a))(yS(t)))(function(r){return cp(RS(sl.create)(kte(cp(cp(RS(ly)(Bte(r.year)))(Hte(r.month)))(Jte(r.day)))))(cp(cp(cp(RS(Gc.create)(qte(r.hour)))(Wte(r.minute)))($te(r.second)))(zte(r.millisecond)))})}}};var vu=function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",m="Sequential",p="Map",g="Apply",E="Alt",b="Cons",I="Resume",L="Release",N="Finalizer",z="Finalized",$="Forked",ne="Fiber",ue="Thunk";function Z(qe,pa,Qa,Tn){this.tag=qe,this._1=pa,this._2=Qa,this._3=Tn}function Y(qe){var pa=function(Qa,Tn,Dn){return new Z(qe,Qa,Tn,Dn)};return pa.tag=qe,pa}function X(qe){return new Z(n,void 0)}function ve(qe){try{qe()}catch(pa){setTimeout(function(){throw pa},0)}}function xe(qe,pa,Qa){try{return pa(Qa())}catch(Tn){return qe(Tn)}}function ke(qe,pa,Qa){try{return pa(Qa)()}catch(Tn){return Qa(qe(Tn))(),X}}var rn=function(){var qe=1024,pa=0,Qa=0,Tn=new Array(qe),Dn=!1;function We(){var ea;for(Dn=!0;pa!==0;)pa--,ea=Tn[Qa],Tn[Qa]=void 0,Qa=(Qa+1)%qe,ea();Dn=!1}return{isDraining:function(){return Dn},enqueue:function(ea){var va,Aa;pa===qe&&(Aa=Dn,We(),Dn=Aa),Tn[(Qa+pa)%qe]=ea,pa++,Dn||We()}}}();function wn(qe){var pa={},Qa=0,Tn=0;return{register:function(Dn){var We=Qa++;Dn.onComplete({rethrow:!0,handler:function(ea){return function(){Tn--,delete pa[We]}}})(),pa[We]=Dn,Tn++},isEmpty:function(){return Tn===0},killAll:function(Dn,We){return function(){if(Tn===0)return We();var ea=0,va={};function Aa(vn){va[vn]=pa[vn].kill(Dn,function(oa){return function(){delete va[vn],ea--,qe.isLeft(oa)&&qe.fromLeft(oa)&&setTimeout(function(){throw qe.fromLeft(oa)},0),ea===0&&We()}})()}for(var dt in pa)pa.hasOwnProperty(dt)&&(ea++,Aa(dt));return pa={},Qa=0,Tn=0,function(vn){return new Z(r,function(){for(var oa in va)va.hasOwnProperty(oa)&&va[oa]()})}}}}}var dn=0,mn=1,yn=2,Kn=3,zn=4,Wn=5,ja=6;function Ma(qe,pa,Qa){var Tn=0,Dn=dn,We=Qa,ea=null,va=null,Aa=null,dt=null,vn=null,oa=0,St=0,Da=null,it=!0;function J(x){for(var j,W,V;;)switch(j=null,W=null,V=null,Dn){case yn:Dn=mn;try{We=Aa(We),dt===null?Aa=null:(Aa=dt._1,dt=dt._2)}catch(ie){Dn=Wn,ea=qe.left(ie),We=null}break;case Kn:qe.isLeft(We)?(Dn=Wn,ea=We,We=null):Aa===null?Dn=Wn:(Dn=yn,We=qe.fromRight(We));break;case mn:switch(We.tag){case i:Aa&&(dt=new Z(b,Aa,dt)),Aa=We._2,Dn=mn,We=We._1;break;case n:Aa===null?(Dn=Wn,We=qe.right(We._1)):(Dn=yn,We=We._1);break;case r:Dn=Kn,We=xe(qe.left,qe.right,We._1);break;case u:Dn=zn,We=ke(qe.left,We._1,function(ie){return function(){Tn===x&&(Tn++,rn.enqueue(function(){Tn===x+1&&(Dn=Kn,We=ie,J(Tn))}))}});return;case a:Dn=Wn,ea=qe.left(We._1),We=null;break;case t:Aa===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Aa,dt),vn,va),va),Aa=null,dt=null,Dn=mn,We=We._1;break;case l:oa++,Aa===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Aa,dt),vn,va),va),Aa=null,dt=null,Dn=mn,We=We._1;break;case s:Dn=Kn,j=Ma(qe,pa,We._2),pa&&pa.register(j),We._1&&j.run(),We=qe.right(j);break;case m:Dn=mn,We=At(qe,pa,We._1);break}break;case Wn:if(Aa=null,dt=null,vn===null)Dn=ja,We=va||ea||We;else switch(j=vn._3,V=vn._1,vn=vn._2,V.tag){case t:va&&va!==j&&oa===0?Dn=Wn:ea&&(Dn=mn,We=V._2(qe.fromLeft(ea)),ea=null);break;case I:va&&va!==j&&oa===0||ea?Dn=Wn:(Aa=V._1,dt=V._2,Dn=yn,We=qe.fromRight(We));break;case l:oa--,ea===null&&(W=qe.fromRight(We),vn=new Z(b,new Z(L,V._2,W),vn,j),(va===j||oa>0)&&(Dn=mn,We=V._3(W)));break;case L:vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,va&&va!==j&&oa===0?We=V._1.killed(qe.fromLeft(va))(V._2):ea?We=V._1.failed(qe.fromLeft(ea))(V._2):We=V._1.completed(qe.fromRight(We))(V._2),ea=null,oa++;break;case N:oa++,vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,We=V._1;break;case z:oa--,Dn=Wn,We=V._1,ea=V._2;break}break;case ja:for(var le in Da)Da.hasOwnProperty(le)&&(it=it&&Da[le].rethrow,ve(Da[le].handler(We)));Da=null,va&&ea?setTimeout(function(){throw qe.fromLeft(ea)},0):qe.isLeft(We)&&it&&setTimeout(function(){if(it)throw qe.fromLeft(We)},0);return;case dn:Dn=mn;break;case zn:return}}function K(x){return function(){if(Dn===ja)return it=it&&x.rethrow,x.handler(We)(),function(){};var j=St++;return Da=Da||{},Da[j]=x,function(){Da!==null&&delete Da[j]}}}function O(x,j){return function(){if(Dn===ja)return j(qe.right(void 0))(),function(){};var W=K({rethrow:!1,handler:function(){return j(qe.right(void 0))}})();switch(Dn){case dn:va=qe.left(x),Dn=ja,We=va,J(Tn);break;case zn:va===null&&(va=qe.left(x)),oa===0&&(Dn===zn&&(vn=new Z(b,new Z(N,We(x)),vn,va)),Dn=Wn,We=null,ea=null,J(++Tn));break;default:va===null&&(va=qe.left(x)),oa===0&&(Dn=Wn,We=null,ea=null)}return W}}function S(x){return function(){var j=K({rethrow:!1,handler:x})();return Dn===dn&&J(Tn),j}}return{kill:O,join:S,onComplete:K,isSuspended:function(){return Dn===dn},run:function(){Dn===dn&&(rn.isDraining()?J(Tn):rn.enqueue(function(){J(Tn)}))}}}function sa(qe,pa,Qa,Tn){var Dn=0,We={},ea=0,va={},Aa=new Error("[ParAff] Early exit"),dt=null,vn=e;function oa(K,O,S){var x=O,j=null,W=null,V=0,le={},ie,ge;e:for(;;)switch(ie=null,x.tag){case $:if(x._3===e&&(ie=We[x._1],le[V++]=ie.kill(K,function(Ee){return function(){V--,V===0&&S(Ee)()}})),j===null)break e;x=j._2,W===null?j=null:(j=W._1,W=W._2);break;case p:x=x._2;break;case g:case E:j&&(W=new Z(b,j,W)),j=x,x=x._1;break}if(V===0)S(qe.right(void 0))();else for(ge=0,ie=V;ge()=>e.props.def;function xN(e){class n extends Fa.Component{constructor(t){super(t);t.init&&t.init(this)()}render(){return this.props.render(this)()}componentDidMount(){this.props.componentDidMount(this)()}componentWillUnmount(){this.props.componentWillUnmount(this)()}}return n.displayName=e?"Elmish_"+e:"ElmishRoot",n}var gy=typeof module=="undefined"?void 0:module.require,bnn=function(){try{return gy===void 0?void 0:gy("util")}catch{return}}();var wnn=function(){var e;if(typeof performance!="undefined")e=performance;else if(gy)try{e=gy("perf_hooks").performance}catch{}return function(){return(e||Date).now()}}();var PN=(e,n)=>n[e],jN=(e,n,a)=>a[e]=n;var g_=function(n){return function(a){return n(a)()}};var mp=function(n){return function(a){return function(){return n(a)}}},Bv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},R_=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var Lre=_e(Bn),th=function(){function e(){}return e.value=new e,e}(),UN=function(){return function(e){var n=Ft(e);return function(a){return R_(jN)(n(Wa.value))}}},SS=function(e){var n=gt(e);return function(a){var t=Ft(a);return function(r){return function(u){return Lre(function(){return PN(t(Wa.value),u)})(n)}}}};$a();var Fi=window.ReactDOM,{createPortal:kN,findDOMNode:Znn,flushSync:ean,unstable_batchedUpdates:nan}=window.ReactDOM;var QS=$u(M3());function A3(e){return e.state&&e.state.s}function L3(e,n,a){return e.setState({s:n},a)}function x3(e,n){return e.state={s:n}}var P3=Fi.render,j3=Fi.hydrate,KS=QS.default&&QS.default.renderToString||(e=>""),soe=Fi.unmountComponentAtNode,N3=Fa.Fragment;function O3(e,n,a){return Fa.createElement.apply(null,[e,voe(e,n)].concat(a))}function voe(e,n){if(typeof e!="string"||n._data==null)return n;var a={_data:void 0};for(var t in n._data){var r=n._data[t];a["data-"+t]=r}return Object.assign({},n,a)}function U3(e){return n=>e===n}var Cy=function(e){return function(n){return function(a){var t=fe(a);if(e instanceof G&&t instanceof G)return de;if(e instanceof T&&t instanceof G)return de;if(e instanceof T&&t instanceof T){if(U3(e.value0)(t.value0))return de;if(je)return n(new T(t.value0))()}return n(t)()}}};var re={asReactChildren:function(e){return[e]}},Qe={asReactChildren:function(e){return[e]}},ye={asReactChildren:ln(_n)};var Xe=Je,YS=R_(L3),k3=Bv(P3),B3=Bv(j3),H3=mp(A3),ta=!1;var J3=Bv(x3),sh=function(e){return e.asReactChildren},Gi=function(){return function(e){var n=sh(e);return function(a){return function(t){return function(r){return O3(a,t,n(r))}}}}},q3=Gi()(ye),xc=function(){return function(e){return function(n){return q3(e)(n)([])}}},Fe=q3(N3)({});var XS=U(Bn),foe=q(_t),W3=function(e){return{initialize:function(n){return J3(n)(e.initialState)},getState:function(n){return function(){var t=XS(fe)(H3(n))();return Ue(e.initialState)(t)}},setState:YS}},$3=function(){var e=function(n){return function(a){return{initialize:function(t){return Wf(new T(a.initialState))(n)},getState:function(t){return XS(Ue(a.initialState))(qf(n))},setState:function(t){return function(r){return function(u){return function(){return Wf(new T(r))(n)(),YS(t)(r)(foe(de))(),u()}}}}}}};return XS(e)(U0(G.value))}();var V3=_e(ze),Q3=Ye(Lt);var _oe=q(_t),K3=UN(),Y3={reflectSymbol:function(){return"__unmounted"}},poe=K3(Y3),X3={reflectSymbol:function(){return"__subscriptions"}},doe=K3(X3),Fy=_e(Bn),moe=SS(Sa)(Y3),Z3=U(Bn),hoe=SS(xa(Cj))(X3),Doe=nn(Ke),goe=Ta(fr),Roe=RR(_t)(Be),yoe=Doe(ra),e4=gn(Sr),boe=x0(bc),woe=Ye(vv(GT(uR))),ZS=function(e){return e},qv=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),Eoe={map:function(e){return function(n){return new qv(e(n.value0),n.value1)}}},Gr=function(e){return{bimap:function(n){return function(a){return function(t){return new qv(a(t.value0),V3(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},n4={apply:function(e){return function(n){return new qv(e.value0(n.value0),Q3(e.value1)(n.value1))}},Functor0:function(){return Eoe}},qn={bind:function(e){return function(n){var a=n(e.value0);return new qv(a.value0,Q3(e.value1)(a.value1))}},Apply0:function(){return n4}},Rn={pure:function(e){return new qv(e,[])},Apply0:function(){return n4}};var a4=function(e){var n=ee(e);return function(a){var t=gn(a);return function(r){return function(u){return new qv(r,V3(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var E_=function(e){return new qv(de,[e])},Za=function(e){return E_(cn(e))},Wv=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return E_(function(r){return n(t)(function(u){return a(In(_oe(de))(r.dispatch)(u))})})}},wa=function(e){var n=a4(e.Monad0().Bind1())(e);return function(a){return n(de)([a])}},t4=function(e){return function(n){var a=poe(th.value),t=doe(th.value),r=function(b){return function(I){return function(L){return function(){var z=Fy(ah(b))(function($){return $.init})();return n({initialState:z.value0}).setState(b)(I)(L)()}}}},u=function(){var b=Z3(Ue(!1)),I=moe(th.value);return function(L){return b(I(L))}}(),i=function(){var b=Z3(Ue([])),I=hoe(th.value);return function(L){return b(I(L))}}(),l=function(b){return function(){return goe(Roe)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=Fy(ah(b))(function(N){return N.init})();return n({initialState:L.value0}).getState(b)()}},m=function(b){return function(I){return function(){var N=i(b)();return t(lo(_p(I))(N))(b)()}}},p=function(b){return function(I){var L=function(N){return _p(yoe(Qt(0))(function(){return N({dispatch:function(){var z=g(I);return function($){return e4(z($))}}(),onStop:m(I)})}))};return CT(b)(L)}},g=function(b){return function(I){return boe(u(b))(function(){var N=s(b)(),z=Fy(ah(b))(function(ne){return ne.update})(),$=z(N)(I);return r(b)($.value0)(p($.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),N=Fy(ah(b))(function(z){return z.view})();return N(L)(g(b))}};return function(b){return LN(e,{def:b,init:n({initialState:b.init.value0}).initialize,render:E,componentDidMount:p(b.init.value1),componentWillUnmount:woe(a(!0))(l)})}}},eC=function(e){return function(){var a=e4($3)();return AN(function(t){return t4(t)(a)(e)})}},js=function(e){return function(n){return MN(e,function(a){var t=t4(a)(W3);return function(r){return t(n(r))}})}};var r4=q(_t),o4=ou(),Gy=function(e){return{handleMaybe:function(n){return function(a){return g_(function(){var t=In(r4(de))(n);return function(r){return t(o4(a(r)))}}())}}}},$v=function(e){return{handleMaybe:function(n){return function(a){return function(t){return In(r4(de))(n)(o4(a))()}}}}},li={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},My={handleEffect:function(e){return g_(e)}},Nu={handleEffect:function(e){return g_(cn(e))}},ma={handle:function(e){return function(n){return function(a){return e(n)()}}}},Mi=function(e){return e.handleMaybe},Zr=function(e){return e.handleEffect},Yn=function(e){return e.handle};function Ay(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var r in e)({}).hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}var zl=function(){return function(){return function(e){return function(n){return Ay(e,n)}}}};var Ly=function(e){var n=Ft(e);return function(){return function(){return function(a){return function(t){return oR(n(a))(t)}}}}};var nC=xc(),aC=Gi(),u4=zl()();var Rp=Je,i4=function(e){return function(n){return nC(Rp(e))(n)}},tC=function(e){var n=aC(e);return function(a){return function(t){return n(Rp(a))(t)}}},Vl=function(e){var n=aC(e);return function(a){return function(t){return function(r){return n(Rp(a))(u4(r)({className:t}))}}}},vh=function(e){return function(n){return function(a){return nC(Rp(e))(u4(a)({className:n}))}}},l4=function(e){return function(n){return nC(Rp(e))({className:n})}},$r=function(e){return function(n){var a=aC(n);return function(t){return function(r){return a(Rp(e))({className:t})(r)}}}};var vt=Je;var yp=function(e){var n=Vl(e);return function(){return function(){return n("video")}}},xy=function(e){return $r("video")(e)};var Py=function(e){return $r("ul")(e)};var Ns=function(e){return $r("tr")(e)};var zv=function(e){return $r("thead")(e)};var Vv=function(e){return $r("th")(e)};var bp=function(){return function(){return vh("textarea")}};var jy=function(e){var n=Vl(e);return function(){return function(){return n("td")}}},Ql=function(e){return $r("td")(e)};var Qv=function(e){return $r("tbody")(e)};var Kv=function(e){return $r("table")(e)};var Io=function(e){return $r("strong")(e)},wp=function(e){var n=Vl(e);return function(){return function(){return n("span")}}},za=function(e){return $r("span")(e)},Ny=function(){return function(){return vh("source")}};var Oy=function(e){var n=Vl(e);return function(){return function(){return n("select")}}};var Ep=function(e){var n=Vl(e);return function(){return function(){return n("p")}}},Kt=function(e){return $r("p")(e)};var Uy=function(e){var n=Vl(e);return function(){return function(){return n("option")}}};var ky=function(e){return $r("li")(e)};var Yv=function(e){return $r("label")(e)};var eo=function(){return function(){return vh("input")}};var _l=function(){return function(){return vh("img")}};var rt=function(e){return $r("i")(e)};var Kl=l4("hr");var Ip=function(e){return $r("h6")(e)};var pl=function(e){return $r("h4")(e)},By=function(e){var n=Vl(e);return function(){return function(){return n("h3")}}},no=function(e){return $r("h3")(e)},Pc=function(e){var n=Vl(e);return function(){return function(){return n("h2")}}},Yt=function(e){return $r("h2")(e)};var Xv=function(e){return $r("h1")(e)},Zv=function(e){var n=Vl(e);return function(){return function(){return n("form")}}};var Xt=function(e){var n=Vl(e);return function(){return function(){return n("div")}}},Se=function(e){return $r("div")(e)};var c4=vp(Qm);var Ioe=q(_t);var rC={map:function(e){return function(n){return c4(c4(e))(n)}}},s4=_e(rC),v4=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return E_(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},fu=function(e){var n=v4(e);return function(a){return function(t){return n(s4(t)(a))}}};var f4=function(e){return function(n){return e(In(Ioe(de))(n))}},Tp=function(e){var n=v4(e);return function(a){return function(t){return n(f4(s4(t)(a)))}}};var Gn=function(){return{"genericTop'":Oe.value}}();var oC=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":oC(e)}};var An=function(){return{"genericBottom'":Oe.value}}();var fh=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":fh(e)}};var xn=function(e){return{"genericBottom'":new Re(fh(e))}},_4=function(e){var n=N0(e);return function(a){return n(fh(a))}};var ef=U(oe),Hy=ba();var uC=function(e){return e["genericToEnum'"]};var Jy=function(e){return e["genericSucc'"]},iC=function(e){var n=N0(e),a=O0(e);return function(t){var r=ef(n),u=Jy(t);return function(i){return r(u(a(i)))}}},lC=function(e){return e["genericPred'"]};var cC=function(e){return e["genericFromEnum'"]};var Pn=function(e){var n=lC(e),a=Jy(e);return function(t){var r=oC(t);return function(u){var i=lC(u),l=Jy(u);return function(s){var m=fh(s);return{"genericPred'":function(p){if(p instanceof Re)return ef(Re.create)(n(p.value0));if(p instanceof ce){var g=i(p.value0);if(g instanceof G)return new T(new Re(r));if(g instanceof T)return new T(new ce(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[g.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[p.constructor.name])},"genericSucc'":function(p){if(p instanceof Re){var g=a(p.value0);if(g instanceof G)return new T(new ce(m));if(g instanceof T)return new T(new Re(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[g.constructor.name])}if(p instanceof ce)return ef(ce.create)(l(p.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[p.constructor.name])}}}}}};var jn={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},Nn=function(e){var n=lC(e),a=Jy(e);return{"genericPred'":function(t){return ef(vm)(n(t))},"genericSucc'":function(t){return ef(vm)(a(t))}}};var sC=function(e){return e["genericCardinality'"]};var On=function(e){var n=sC(e),a=uC(e),t=cC(e);return function(r){var u=uC(r),i=cC(r);return{"genericCardinality'":Hy(n)+Hy(sC(r))|0,"genericToEnum'":function(l){var s=function(m){if(l>=0&&lt.value0;return r?a.value0:t.value0}()|0,(1+a.value1|0)+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 708, column 5 - line 712, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 700, column 32 - line 712, column 68): "+[a.constructor.name])};var Wy=function(e){return function(n){return new Vo(1,1,e,n,dl.value,dl.value)}},E4=function(){var e=function(t){if(t instanceof dl)return 0;if(t instanceof Vo)return t.value0;throw new Error("Failed pattern match at Data.Map.Internal (line 757, column 12 - line 759, column 26): "+[t.constructor.name])},n=function(t,r,u,i,l,s,m){return s instanceof Vo&&s.value0>e(m)?ml(s.value2,s.value3,ml(t,r,u,s.value4),ml(i,l,s.value5,m)):ml(i,l,ml(t,r,u,s),m)},a=function(t,r,u,i,l,s,m){return s instanceof Vo&&e(l)<=s.value0?ml(s.value2,s.value3,ml(u,i,l,s.value4),ml(t,r,s.value5,m)):ml(u,i,l,ml(t,r,s,m))};return function(t,r,u,i){if(u instanceof dl)return i instanceof dl?Wy(t)(r):i instanceof Vo&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):ml(t,r,u,i);if(u instanceof Vo){if(i instanceof Vo){if(i.value0>(u.value0+1|0))return n(t,r,u,i.value2,i.value3,i.value4,i.value5);if(u.value0>(i.value0+1|0))return a(t,r,u.value2,u.value3,u.value4,u.value5,i)}return i instanceof dl&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):ml(t,r,u,i)}throw new Error("Failed pattern match at Data.Map.Internal (line 717, column 40 - line 738, column 34): "+[u.constructor.name])}}();var jc=function(e){var n=He(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof dl)return u=!0,G.value;if(s instanceof Vo){var m=n(a)(s.value2);if(m instanceof me){r=s.value4;return}if(m instanceof pe){r=s.value5;return}if(m instanceof Ne)return u=!0,new T(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[m.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 8 - line 286, column 22): "+[s.constructor.name])}for(;!u;)i=l(r);return i};return t}};var ph=function(e){var n=He(e);return function(a){return function(t){var r=function(u){if(u instanceof dl)return Wy(a)(t);if(u instanceof Vo){var i=n(a)(u.value2);if(i instanceof me)return E4(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof pe)return E4(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof Ne)return new Vo(u.value0,u.value1,a,t,u.value4,u.value5);throw new Error("Failed pattern match at Data.Map.Internal (line 471, column 7 - line 474, column 35): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 468, column 8 - line 474, column 35): "+[u.constructor.name])};return r}}};var Ai=function(){return dl.value}(),_u=function(e){var n=ph(e);return function(a){return Dt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(Ai)}};var oue=typeof Array.from=="function",S4=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",uue=typeof String.prototype.fromCodePoint=="function",iue=typeof String.prototype.codePointAt=="function",C4=function(e){return iue?function(n){return n.codePointAt(0)}:e},F4=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){var i=u.length;if(r<0||r>=i)return a;if(S4)for(var l=u[Symbol.iterator](),s=r;;--s){var m=l.next();if(m.done)return a;if(s===0)return n(t(m.value))}return e(r)(u)}}}}}};var G4=function(e){return uue?String.fromCodePoint:e},M4=function(e){return function(n){return S4?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=Dh(Ts(1)(e)),r=j4(t);return r?P4(n)(t):n}return n},mC=C4(hue),I_=A4(mue)(mC),To=function(e){return Or(I_(e))};var $y=function(e){return function(n){return x4(function(a){return To(Y0(a)(n))})(zR(e)(n))}},hC=function(){var e=vS(d_)(nt(hv))(kt(hv));return function(n){return Tu(e(n))}}(),Due=function(e){if(e<=65535)return hC(e);var n=fue(e-65536|0)(1024)+55296|0,a=_ue(e-65536|0)(1024)+56320|0;return hC(n)+hC(a)};var Cp=G4(Due),O4=function(e){return function(n){if(e<1)return"";var a=nf(n);return a instanceof T?Cp(a.value0.head)+O4(e-1|0)(a.value0.tail):n}},ci=M4(O4);var zy={eq:function(e){return function(n){return e===n}}},Vy={compare:function(e){return function(n){return pue(e)(n)}},Eq0:function(){return zy}},af=function(e){return function(n){return Tc(Jl(ci(e)(n)))(n)}};var gue=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=nf(l);if(s instanceof T){var m=i===0;if(m)return t=!0,new T(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,G.value}for(;!t;)r=u(a,n);return r}},Fp=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(mC(n)):F4(gue)(T.create)(G.value)(mC)(e)(n)}},Rue={bottom:0,top:1114111,Ord0:function(){return Vy}},Oc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if(je)return G.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[e.constructor.name])},Bounded0:function(){return Rue},Enum1:function(){return yue(0)}}}(),yue=sue("enumCodePoint","Data.String.CodePoints",function(){return{succ:__(aa(Oc))(Hn(Oc)),pred:p_(aa(Oc))(Hn(Oc)),Ord0:function(){return Vy}}});var Lue=ba();var $4={show:Lue};var z4=he;var xue=Cs(Be),Pue=_e(ze),jue=a_(vC),Sn=function(e){return function(n){var a=xue(Pue(n)(function(t){return new sn(e(t),t)}));return function(t){return Cc(t)(a)}}},V4=function(e){var n=iC(e),a=_4(e);return function(t){var r=n(t);return function(u){return function(i){return jue(function(l){return new sn(l,r(l))})(a(i))}}}},Cn=function(e){var n=V4(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Os(u(i))}}}};var Nue={info:"info",warning:"warn",error:"error"},Li=e=>n=>a=>t=>{let r=Nue[e];if(typeof console!="undefined"&&console[r]&&console[r](n,a),typeof window!="undefined"){let u=new Error(n);typeof window.Sentry!="undefined"&&window.Sentry.captureException(u,{extra:a})}return t()},Q4=(e,n)=>(n.__sentryFingerprint=e,n);var K4=function(e){return bi(Q4)(e)};var Dl="error";var Yy={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Te)return a.value0;if(a instanceof Ie)return Li(Dl)("Failed to parse "+e.diagnosticName)({error:a.value0,value:n})(function(t){return e.default});throw new Error("Failed pattern match at Utils.Parse (line 49, column 5 - line 57, column 24): "+[a.constructor.name])}}},Zn=function(e){return e.parseOrPanic},Oue=Zn(Yy),ka=function(e){var n=Zn(e);return function(a){var t=U(a);return function(r){return n({parse:function(u){return t(T.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},Uue=ka(Yy)(ur),tf=function(e){var n=xv(e);return function(a){return Uue({parse:n,diagnosticName:a})}},Ze={parseOrPanic:function(e){return Oue({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=In(new Ie(""))(Te.create);return function(a){return n(e.parse(a))}}()})}};var Y4=Nn(jn),X4=Ln(An),Z4=kn(Un),ks=function(){function e(){}return e.value=new e,e}(),Bs=function(){function e(){}return e.value=new e,e}(),kue={to:function(e){if(e instanceof Re)return ks.value;if(e instanceof ce)return Bs.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof ks)return new Re(Oe.value);if(e instanceof Bs)return new ce(Oe.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var Bue=function(e){if(e instanceof ks)return"school";if(e instanceof Bs)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},Xy=function(){return Zn(Ze)({parse:Sn(Bue)(Cn(kue)(Pn(Y4)(Mn(Gn))(Y4)(X4))(On(Z4)(Z4))(xn(X4))),default:ks.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var e8=Nn(jn),n8=Pn(e8)(Mn(Gn)),a8=Ln(An),t8=xn(a8),r8=kn(Un),o8=On(r8),Hue=ia(oo),Yl=function(){function e(){}return e.value=new e,e}(),rf=function(){function e(){}return e.value=new e,e}(),Hs=function(){function e(){}return e.value=new e,e}(),Jue={to:function(e){if(e instanceof Re)return Yl.value;if(e instanceof ce&&e.value0 instanceof Re)return rf.value;if(e instanceof ce&&e.value0 instanceof ce)return Hs.value;throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])},from:function(e){if(e instanceof Yl)return new Re(Oe.value);if(e instanceof rf)return new ce(new Re(Oe.value));if(e instanceof Hs)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var que=function(e){if(e instanceof Yl)return"pending";if(e instanceof rf)return"connected";if(e instanceof Hs)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},gC=function(){var e=Sn(que)(Cn(Jue)(n8(n8(e8)(a8))(t8))(o8(o8(r8)))(t8)),n=function(a){return a==="cold"?new T(Hs.value):G.value};return Zn(Ze)({parse:function(a){return Hue(e(a))(n(a))},default:Yl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var Wue=H0(It),u8=te(an),$ue=gr(Be)(It),zue=za(re);var i8=function(e){return{initiator:Xy(e.initiator),status:gC(e.status),introMessage:Ue("")(fe(e.introMessage))}},l8=25,RC=function(e){return To(e)>=l8},c8=function(e){var n=To(e),a=n>0,t=Wue(" ")([function(){return a?u8(n)+" characters":""}(),$ue(["(",u8(l8),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=RC(e);return u?"text-success":""}();return zue(r)(t)};var Zy=function(){function e(){}return e.value=new e,e}(),s8=function(){function e(){}return e.value=new e,e}();var v8=function(){var e=Zn(Ze)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(s8.value):n instanceof T&&n.value0==="free"?new T(Zy.value):n instanceof T&&n.value0==="churned"?new T(Zy.value):n instanceof G?new T(Zy.value):G.value},default:Zy.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(fe(n))}}();var f8=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:fe(e.imageUrl),partnerStatus:v8(e.partnerStatus)}};var Vue=ee(Ve),yC=La(),gh=tt(he),_8=H({reflectSymbol:function(){return"id"}}),Que=nn(Ke)(Ve),Kue=Jr(uo),Yue=U(oe);var Xue=function(){function e(){}return e.value=new e,e}(),Zue=function(){function e(){}return e.value=new e,e}(),eie=function(){function e(){}return e.value=new e,e}(),bC=function(){function e(){}return e.value=new e,e}(),nie=function(){function e(){}return e.value=new e,e}(),eb=function(){function e(){}return e.value=new e,e}(),Rh=function(){function e(){}return e.value=new e,e}(),wC=function(){function e(){}return e.value=new e,e}(),EC=function(){function e(){}return e.value=new e,e}();var p8={show:ba()};var aie=he,tie=tf(yC(H({reflectSymbol:function(){return"avatarUrl"}})(gh)(H({reflectSymbol:function(){return"bio"}})(gh)(H({reflectSymbol:function(){return"connection"}})(tt(yC(H({reflectSymbol:function(){return"initiator"}})(he)(H({reflectSymbol:function(){return"introMessage"}})(gh)(H({reflectSymbol:function(){return"status"}})(he)(tn))))))(H({reflectSymbol:function(){return"firstName"}})(he)(_8(aie)(H({reflectSymbol:function(){return"lastName"}})(he)(H({reflectSymbol:function(){return"school"}})(yC(H({reflectSymbol:function(){return"allowedToContact"}})(Sa)(_8(z4)(H({reflectSymbol:function(){return"imageUrl"}})(gh)(H({reflectSymbol:function(){return"name"}})(he)(H({reflectSymbol:function(){return"partnerStatus"}})(gh)(tn)))))))(H({reflectSymbol:function(){return"title"}})(he)(H({reflectSymbol:function(){return"type"}})(he)(H({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(on)(tn))))))))))));var d8=function(e){if(e instanceof Xue)return"sheet-view";if(e instanceof Zue)return"school-details";if(e instanceof eie)return"network-gallery";if(e instanceof bC)return"livestream-details";if(e instanceof nie)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},m8=function(e){return Vue(tie("SemUser")(e))(function(n){return Que(Kue(n.type==="Sem::User"))(function(){return new T({school:f8(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:fe(n.avatarUrl),title:n.title,bio:fe(n.bio),connection:Yue(i8)(fe(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Uc=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},kc=function(e){return e()};var I8=function(){function e(){}return e.value=new e,e}(),T8=function(){function e(){}return e.value=new e,e}(),S8=function(){function e(){}return e.value=new e,e}();var yie=function(e){if(e instanceof I8)return"disabled";if(e instanceof T8)return"free-consultation";if(e instanceof S8)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 27, column 13 - line 30, column 40): "+[e.constructor.name])};var bie=function(){return[I8.value,T8.value,S8.value]}(),C8=ka(Ze)(oe)({parse:Sn(yie)(bie),diagnosticName:"InquiryMode"});var wie=function(e,n,a,t,r,u,i){var l=new Date(Date.UTC(e,n,a,t,r,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l};function F8(e,n,a,t,r,u,i){return wie(e,n-1,a,t,r,u,i).getTime()}function G8(e){return function(n){var a=new Date(n);return e(a.getUTCFullYear())(a.getUTCMonth()+1)(a.getUTCDate())(a.getUTCHours())(a.getUTCMinutes())(a.getUTCSeconds())(a.getUTCMilliseconds())}}var Eie=Et(),Iie=aa(pr);var Tie=Hn(pr);var M8=function(e){return e},tb=function(){var e=function(n){return function(a){return function(t){return function(r){return function(u){return function(i){return function(l){return new sl(Ov(n)(Eie(Iie(a)))(t),new Gc(r,u,i,l))}}}}}}};return G8(e)}();var A8=function(e){return F8(ri(e.value0),Tie(oi(e.value0)),Fc(e.value0),Mc(e.value1),As(e.value1),Ms(e.value1),cl(e.value1))};var L8=function(e){var n=Ye(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,m;function p(g,E,b){if(b<1)return s=!0,g;i=n(g)(E),l=E,u=b-1|0}for(;!s;)m=p(i,l,u);return m}}};return a(Va(e))};var Sie=ba();var T_=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),yh=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var x8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),P8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GC=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var Gp={defer:function(e){var n=Uc(e);return function(a,t,r,u,i){var l=kc(n);return l(a,t,r,u,i)}}};var Bc={map:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return n(a,t,r,u,function(s,m){return t(function(p){return i(s,e(m))})})})}}}};var Hc={apply:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,m){return t(function(p){return n(s,t,r,u,function(g,E){return t(function(b){return i(g,m(E))})})})})})}}},Functor0:function(){return Bc}};var Jc={bind:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,m){return t(function(p){var g=n(m);return g(s,t,r,u,i)})})})}}},Apply0:function(){return Hc}},Cie=Ta(Jc);var gl={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Hc}};var Fie={Applicative0:function(){return gl},Bind1:function(){return Jc}};var j8={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return Fie}},Gie=Rr(j8);var S_={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new T_(a.value0,a.value1,!1),t,r,function(s,m){return t(function(p){return s.value2?u(s,m):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Bc}},Mie=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var Aie=function(e){var n=e.Monad0(),a=U(n.Bind1().Apply0().Functor0()),t=q(n.Applicative0()),r=Uo(e);return function(u){return function(i){var l=function(s){var m=!1,p;function g(E){var b=E(de);if(b instanceof x8){s=b.value0;return}if(b instanceof P8)return m=!0,a(tr.create)(b.value0);if(b instanceof GC)return m=!0,t(new zt(new sn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!m;)p=g(s);return p};return r(l)(function(s){return i(u,x8.create,P8.create,function(m,p){return new GC(m,new Ie(p))},function(m,p){return new GC(m,new Te(p))})})}}};var N8=Mie(function(e){return new sn(e.value1,e)}),MC=function(e){return e.value1},AC=function(e){return e.value0};var Lie={index:0,line:1,column:1},O8=function(e){var n=U(e.Monad0().Bind1().Apply0().Functor0()),a=Aie(e);return function(t){return function(r){var u=new T_(t,Lie,!1);return n(kr)(a(u)(r))}}},xie=O8(pm),U8=function(e){var n=xie(e);return function(a){return Sie(n(a))}};var Pie=function(e){return function(n){return Gie(new yh(e,n))}},Mp=function(e){return Cie(Pie(e))(N8)};var k8={empty:Mp("No alternative"),Alt0:function(){return S_}},C_={Applicative0:function(){return gl},Plus1:function(){return k8}};var qie=ia(S_);var Wie=q(gl);var $ie=U(Bc);var qc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new T_(i.value0,i.value1,n.value2),l)},u)}};var rb=function(e){return function(n){return qie(n)(Wie(e))}},F_=function(e){return rb(G.value)($ie(T.create)(e))};var q8=Hn(Oc),Vie=Yr(vr);var Qie=te(Gt);var W8=function(e){return function(n){return function(a){var t=q8(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=Fp(0)(a);return r instanceof T&&q8(r.value0)===10?{index:e.index+1|0,line:e.line,column:e.column}:{index:e.index+1|0,line:e.line+1|0,column:1}}return t===9?{index:e.index+1|0,line:e.line,column:(e.column+8|0)-Vie(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},Kie=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,m,p){var g=nf(m);if(g instanceof G)return u=!0,s;if(g instanceof T){var E=function(){if(hl(g.value0.tail))return W8(s)(g.value0.head)(p);if(je)return W8(s)(g.value0.head)(g.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=g.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[g.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var xC=bR(function(e){return function(n){return function(a){return function(t){return function(r){var u=hl(e.value0);return u?r(new T_(e.value0,e.value1,!0),de):t(e,new yh("Expected EOF",e.value1))}}}}}),$8=function(e){return bR(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Ie)return r(n,new yh(i.value0,n.value1));if(i instanceof Te)return u(new T_(i.value0.remainder,Kie(n.value1)(i.value0.consumed)(i.value0.remainder),!hl(i.value0.consumed)),i.value0.value);throw new Error("Failed pattern match at Parsing.String (line 286, column 7 - line 290, column 121): "+[i.constructor.name])}}}}})};var Wc=function(e){return $8(function(n){var a=ni(e)(n);return a instanceof T?new Te({value:e,consumed:e,remainder:a.value0}):new Ie("Expected "+Qie(e))})};var z8=te(an),Xie=Bt(ko),Zie=M0(Hc);var ele=function(e){return"(line "+(z8(e.line)+(", col "+(z8(e.column)+")")))},nle=function(e){return AC(e)+(" "+ele(MC(e)))},PC=function(e){return function(n){return Xie(nle)(U8(n)(Zie(e)(xC)))}};var lb=aa(d_);var Ko=te(an);var ple=Tr(Hr),dle=ple(It);var mle=fR(na)(mc);var jC=Hn(qr),hle=te(XR),Dle=Hn(pr),Z8=Hn(xu),gle=ba(),Rle=Hn(jv),eO=te(kj),NC=Hn(Si),yle=Yr(vr),nO=Hn(Ti),aO=Hn(Ii),OC=Hn(Pu),tO=Ur(vr);var Ap=function(){function e(){}return e.value=new e,e}(),rO=function(){function e(){}return e.value=new e,e}(),ble=function(){function e(){}return e.value=new e,e}(),Xl=function(){function e(){}return e.value=new e,e}(),UC=function(){function e(){}return e.value=new e,e}(),oO=function(){function e(){}return e.value=new e,e}(),uO=function(){function e(){}return e.value=new e,e}(),Zl=function(){function e(){}return e.value=new e,e}(),wle=function(){function e(){}return e.value=new e,e}(),Ele=function(){function e(){}return e.value=new e,e}(),ec=function(){function e(){}return e.value=new e,e}(),Ile=function(){function e(){}return e.value=new e,e}(),cb=function(){function e(){}return e.value=new e,e}(),nc=function(){function e(){}return e.value=new e,e}(),ac=function(){function e(){}return e.value=new e,e}(),Tle=function(){function e(){}return e.value=new e,e}(),xi=function(){function e(){}return e.value=new e,e}(),Sle=function(){function e(){}return e.value=new e,e}(),sb=function(){function e(){}return e.value=new e,e}(),Cle=function(){function e(){}return e.value=new e,e}(),Fle=function(){function e(){}return e.value=new e,e}(),Gle=function(){function e(){}return e.value=new e,e}(),yt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Mle=function(e){if(e instanceof iu)return"Jan";if(e instanceof Su)return"Feb";if(e instanceof lu)return"Mar";if(e instanceof Cu)return"Apr";if(e instanceof Fu)return"May";if(e instanceof cu)return"Jun";if(e instanceof su)return"Jul";if(e instanceof Gu)return"Aug";if(e instanceof Mu)return"Sep";if(e instanceof Au)return"Oct";if(e instanceof Lu)return"Nov";if(e instanceof ti)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var lf=function(e){if(e<0)return"-"+lf(-e|0);if(e<10)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},iO=function(e){if(e<0)return"-"+iO(-e|0);if(e<10)return"000"+Ko(e);if(e<100)return"00"+Ko(e);if(e<1e3)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},lO=function(e){if(e<0)return"-"+lO(-e|0);if(e<10)return"00"+Ko(e);if(e<100)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var Ale=function(e){var n=Ko(mle(e)),a=To(n);return a===1?"0"+n:a===2?n:af(a-2|0)(n)};var Lle=function(e){var n=e===0;return n?12:e},xle=function(e){return function(n){if(n instanceof Ap)return iO(jC(ri(e.value0)));if(n instanceof rO)return Ale(jC(ri(e.value0)));if(n instanceof ble)return Ko(jC(ri(e.value0)));if(n instanceof Xl)return hle(oi(e.value0));if(n instanceof UC)return Mle(oi(e.value0));if(n instanceof oO)return lf(Dle(oi(e.value0)));if(n instanceof uO)return lf(Z8(Fc(e.value0)));if(n instanceof Zl)return Ko(Z8(Fc(e.value0)));if(n instanceof wle)return Ko(Eo(function(t){return t/1e3}(gle(M8(A8(e))))));if(n instanceof Ele)return Ko(Rle(qm(e.value0)));if(n instanceof ec)return eO(qm(e.value0));if(n instanceof Ile)return ci(3)(eO(qm(e.value0)));if(n instanceof cb)return lf(NC(Mc(e.value1)));if(n instanceof nc)return lf(Lle(yle(NC(Mc(e.value1)))(12)));if(n instanceof ac){var a=NC(Mc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof Tle)return Ko(nO(As(e.value1)));if(n instanceof xi)return lf(nO(As(e.value1)));if(n instanceof Sle)return Ko(aO(Ms(e.value1)));if(n instanceof sb)return lf(aO(Ms(e.value1)));if(n instanceof Cle)return lO(OC(cl(e.value1)));if(n instanceof Fle)return Ko(function(t){return tO(t)(100)}(OC(cl(e.value1))));if(n instanceof Gle)return lf(function(t){return tO(t)(10)}(OC(cl(e.value1))));if(n instanceof yt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},Yo=function(e){return function(n){return dle(xle(n))(e)}};var awn=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function vb(e){return Math.round(e).toString()}var Lp=ee(Jc);var Ple=q(gl),jle=q0(C_)(Gp);var Nle=WT(C_)(Gp),fb=L8(It),Ole=n_(gl)(bm),Ule=U(oe);var cO=Ol(na),kle=Ur(vr),Ble=te(an),Hle=_e(ur),Jle=te(Hf),qle=ln(_n);var Wle=Lp(F_(qc(Wc("+"))))(function(e){return Lp(jle(Wc("0")))(function(n){return Lp(F_(qc(Wc(",0"))))(function(a){return Lp(F_(qc(Wc("."))))(function(t){return Lp(Ole(t)(function(r){return qc(Nle(Wc("0")))}))(function(r){return Lp(F_(qc(Wc("a"))))(function(u){return Ple({sign:Pt(e),before:Or(n),comma:Pt(a),after:Ue(0)(Ule(Or)(r)),abbreviations:Pt(u)})})})})})})}),$le=PC(Wle);var sO=function(e){return function(n){var a=FR(n),t=function(){if(a>0)return cO(Eo(QT(a)/qP))(0);if(je)return 0;throw new Error("Failed pattern match at Data.Formatter.Number (line 100, column 5 - line 102, column 22): "+[])}();if(e.abbreviations){var r=kle(t)(3),u=function(){var z=r<1;return z?n:n/GR(1e3)(Tt(r))}(),i=function(){if(r===0)return"";if(r===1)return"K";if(r===2)return"M";if(r===3)return"G";if(r===4)return"T";if(r===5)return"P";if(r===6)return"E";if(r===7)return"Z";if(r===8)return"Y";if(je)return"10e+"+Ble(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return sO({comma:e.comma,before:e.before,after:e.after,sign:e.sign,abbreviations:!1})(u)+i}var l=(e.before-t|0)-1|0,s=GR(10)(Tt(cO(0)(e.after))),m=i_(a*s)/s,p=$0(m),g=m-p,E=i_(g*s),b=function(){var z=vb(E),$=To(z),ne=fb("0")(e.after-$|0);return ne+z}(),I=function(){var z=e.after<1;return z?"":"."+(function(){var $=E===0;return $?fb("0")(e.after):""}()+function(){var $=E>0;return $?b:""}())}(),L=function(z){return function($){return function(ne){var ue=z,Z=$,Y=!1,X;function ve(xe,ke,rn){var wn=t_(rn);if(wn instanceof G)return Y=!0,K0(xe);if(wn instanceof T&&ke<3){ue=lo(wn.value0.head)(xe),Z=ke+1|0,ne=wn.value0.tail;return}ue=lo(",")(xe),Z=0,ne=rn}for(;!Y;)X=ve(ue,Z,ne);return X}}},N=function(){return e.comma?L([])(0)(L0(Pm(fb("0")(l)+vb(p)))):fb("0")(l)+vb(p)}();return function(){var z=n<0;if(z)return"-";var $=n>0&&e.sign;return $?"+":""}()+(N+I)}},zle=function(e){return function(n){return Hle($le(e))(qa(sO)(n))}},G_=function(e){return function(n){return jt(cn(Jle(n)))(qle)(zle(e)(n))}};var Qle=Je;var vO=function(e){return c_(e)};var Rl=function(e){var n=vO(e);return n?G.value:new T(Qle(e))};var Ba=function(e){return function(n){var a=vO(e);return a?n:e}};var co=function(){return Je};var bh=te(an),Kle=Hn(qr),Yle=Hn(pr),Xle=co(),Zle=ou(),ece=ii(Nv),kC=Ur(vr),nce=qo(Be);var ace=function(e){return function(n){if(n.minutes<=0)return e.justNow;if(n.minutes<=1)return"a minute"+e.suffix;if(n.minutes<=45)return bh(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return bh(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return bh(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return bh(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if(je)return bh(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 158, column 1 - line 158, column 81): "+[e.constructor.name,n.constructor.name])}},_b=function(e){return ace({suffix:" "+e,justNow:"just now"})},fO=function(){return function(e){var n=function(m){return(Kle(ri(Uv(m)))*12|0)+Yle(oi(Uv(m)))|0},a=Xle(e),t=Ba(a.format)(_b("ago")),r=MR(Zle(ece(a.to)(a.from))),u=kC(r+30|0)(60),i=kC(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=kC(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var _O=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var BC=G_("0,0");var pO=function(e){return BC(Tt(e))},Pi=function(e){return function(n){return function(a){return pO(e)+(" "+_O(e)(n)(a))}}};var dO=function(){return Yo(nce([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),xi.value,new yt(" "),ac.value]))}();$a();var mO=Fa.Fragment,HC=()=>document.visibilityState=="visible",hO=(e,n)=>document.elementFromPoint(e,n);var DO=function(e){var n=tC(e);return function(){return function(){return n("button")}}},gO=function(){return function(){return i4("br")}};var RO=function(e){var n=tC(e);return function(){return function(){return n("a")}}};function yO(e){return function(n){return function(){return n.getElementById(e)}}}var tce=U(Bn),pb=function(e){var n=tce(fe),a=yO(e);return function(t){return n(a(t))}};var db=function(e){return function(n){return function(){return n[e]}}},rce=db("children"),oce=db("firstElementChild"),uce=db("lastElementChild"),ice=db("childElementCount");var pu=function(){return window};function bO(e,n,a,t){if(typeof window!="undefined"){var r=window[a];if(r!=null&&t instanceof r)return n(t)}for(var u=t;u!=null;){var i=Object.getPrototypeOf(u),l=i.constructor.name;if(l===a)return n(t);if(l==="Object")return e;u=i}return e}var Fn=function(e){return function(n){return bO(G.value,T.create,e,n)}};var wO=Je;var mb=Je;var EO=Je;function IO(e,n,a){var t=Object.prototype.toString.call(a);return t.indexOf("[object HTML")===0&&t.indexOf("Element]")===t.length-8?n(a):e}var JC=Je;var TO=function(e){return IO(G.value,T.create,e)};function qC(e){return function(){return e.seeking}}function wh(e){return function(){return e.currentTime}}function WC(e){return function(){return e.volume}}function $C(e){return function(n){return function(){n.volume=e}}}function zC(e){return function(){return e.muted}}function M_(e){return function(n){return function(){n.muted=e}}}var SO=Fn("HTMLMediaElement");var CO=Fn("HTMLMediaElement");function VC(e){return function(){return e.hash}}function QC(e){return function(n){return function(){n.hash=e}}}function KC(e){return function(){return e.platform}}function cf(e){return function(){return e.document}}function YC(e){return function(){return e.navigator}}function Eh(e){return function(){return e.location}}var FO=Je;var Dce=U(ze);var gce=gO()(),Rce=n_(_t)(bm),GO=ee(fr),MO=_e(Bn),yce=ee(Ve);var eF=Xe("\xA0");var ha=qa(In(ta));var AO=function(e){return function(n){if(e)return ta;if(je)return n(de);throw new Error("Failed pattern match at Utils.HTML (line 113, column 1 - line 113, column 65): "+[e.constructor.name,n.constructor.name])}},nF=function(e){return function(n){return AO(e)(cn(n))}};var aF=function(e){return function(n){if(e)return n(de);if(je)return ta;throw new Error("Failed pattern match at Utils.HTML (line 100, column 1 - line 100, column 61): "+[e.constructor.name,n.constructor.name])}},ga=function(e){return function(n){return aF(e)(cn(n))}};var bce=Gi()(ye)(mO),wce=function(e){return function(n){return bce({key:e.key})(Em(gce({}))(Dce(Xe)(Qo(` `)(n))))}},xp=wce({key:""}),Db=function(e){return Rce(CO(e.target))(wh)};var LO=function(e){return function(){return hO(e.x,e.y)}},xO=function(e){return GO(MO(GO(pu)(cf))(mb))(pb(e))},gb=function(e){return MO(xO(e))(function(n){return yce(n)(TO)})};var Ih=on;var PO=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},tF=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),jO=()=>new Date,NO=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var A_=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();function rF(){return Date.now()}var Sce=U(Bn);var si=Sce(tb)(rF);var UO={liftAff:ln(_n),MonadEffect0:function(){return Le}};var WBn=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,g){this.queue=p,this.value=g,this.next=null,this.prev=null}function a(p){this.draining=!1,this.error=null,this.value=p,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function r(p){try{p()}catch(g){setTimeout(function(){throw g},0)}}function u(p,g){var E=new n(p,g);switch(p.size){case 0:p.head=E;break;case 1:E.prev=p.head,p.head.next=E,p.last=E;break;default:E.prev=p.last,p.last.next=E,p.last=E}return p.size++,E}function i(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.last,p.head.next=null,p.last=null;break;default:g=p.last,p.last=g.prev,p.last.next=null}return g.prev=null,g.queue=null,p.size--,g.value}function l(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:g=p.head,p.head=g.next,p.head.prev=null}return g.next=null,g.queue=null,p.size--,g.value}function s(p){if(p.queue!==null){if(p.queue.last===p){i(p.queue);return}if(p.queue.head===p){l(p.queue);return}p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),p.queue.size--,p.queue=null,p.value=null,p.next=null,p.prev=null}}function m(p,g){if(!g.draining){var E=g.puts,b=g.takes,I=g.reads,L,N,z,$,ne;for(g.draining=!0;;){if(L=null,N=null,z=null,$=g.value,ne=I.size,g.error!==null){for($=p.left(g.error);L=l(E);)r(L.cb($));for(;N=l(I);)r(N($));for(;z=l(b);)r(z($));break}if($===t&&(L=l(E))&&(g.value=$=L.value),$!==t){for(z=l(b);ne--&&(N=l(I));)r(N(p.right($)));z!==null&&(g.value=t,r(z(p.right($))))}if(L!==null&&r(L.cb(p.right(void 0))),g.value===t&&E.size===0||g.value!==t&&b.size===0)break}g.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=m,a}();var Th=function(e){return m_(qf(e))},Sh=function(e){return m_(U0(e))};var Nce=q(_t),sf=ee(Ve),Oce=aa(qr),Uce=aa(pr),kce=aa(xu),Bce=aa(Si),Hce=aa(Ti),Jce=aa(Ii),qce=aa(Pu),Wce=q(la),HO=Ta(fr),$ce=_e(oe);var zce=function(){return Sh(G.value)}();var JO=function(e){return sf(Oce(e.year))(function(n){return sf(Uce(e.month+1|0))(function(a){return sf(kce(e.day))(function(t){return sf(Bce(e.hour))(function(r){return sf(Hce(e.minute))(function(u){return sf(Jce(e.second))(function(i){return sf(qce(e.millisecond))(function(l){return Wce(new sl(Ov(n)(a)(t),new Gc(r,u,i,l)))})})})})})})})},qO=function(e){var n=KP("Failed to obtain current time. This should never happen.");return In(n)(Nce)(JO(tF(e)))},vf=HO(qO)(jO),Rb=function(e){var n=Th(zce);if(n instanceof T)return n.value0;if(n instanceof G)return m_(HO(qO)(NO));throw new Error("Failed pattern match at Utils.DateTime (line 63, column 3 - line 65, column 76): "+[n.constructor.name])},du=function(e){return sf($ce(PO({just:T.create,nothing:G.value})(e))(tF))(JO)};var oF=q(la),Vce=U(oe),WO=ee(Ve);var $O=Nn(jn),zO=Pn($O)(Mn(Gn)),VO=Ln(An),QO=xn(VO),KO=kn(Un),YO=On(KO);var uF=function(){function e(){}return e.value=new e,e}(),iF=function(){function e(){}return e.value=new e,e}(),lF=function(){function e(){}return e.value=new e,e}();var Qce={to:function(e){if(e instanceof Re)return uF.value;if(e instanceof ce&&e.value0 instanceof Re)return iF.value;if(e instanceof ce&&e.value0 instanceof ce)return lF.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof uF)return new Re(Oe.value);if(e instanceof iF)return new ce(new Re(Oe.value));if(e instanceof lF)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Kce=function(e){if(e instanceof uF)return"stuffed";if(e instanceof iF)return"satisfied";if(e instanceof lF)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 233, column 27 - line 236, column 35): "+[e.constructor.name])};var Yce=ka(Ze)(oe)({parse:Sn(Kce)(Cn(Qce)(zO(zO($O)(VO))(QO))(YO(YO(KO)))(QO)),diagnosticName:"ClientAppetite"}),XO=function(e){return WO(In(oF(G.value))(function(){var n=Vce(oF);return function(a){return n(Yce(a))}}())(fe(e.clientAppetite)))(function(n){return WO(C8(e.inquiryMode))(function(a){return oF({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:fe(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:fe(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var ZO=ee(Ve),Pp=La(),cF=tt(he),eU=H({reflectSymbol:function(){return"description"}})(he),yb=H({reflectSymbol:function(){return"id"}})(on),sF=H({reflectSymbol:function(){return"name"}})(he),nU=Pp(yb(sF(H({reflectSymbol:function(){return"slug"}})(he)(tn)))),aU=xa(nU),Xce=tf(Pp(H({reflectSymbol:function(){return"advisingConfig"}})(tt(Pp(H({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(tt(Sa))(H({reflectSymbol:function(){return"clientAppetite"}})(cF)(H({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(tt(on))(H({reflectSymbol:function(){return"inquiryMode"}})(he)(H({reflectSymbol:function(){return"packages"}})(xa(Pp(H({reflectSymbol:function(){return"activeForSale"}})(Sa)(eU(yb(sF(H({reflectSymbol:function(){return"numMinutes"}})(on)(H({reflectSymbol:function(){return"packageCategories"}})(aU)(H({reflectSymbol:function(){return"refundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"totalPriceCents"}})(Ih)(tn)))))))))))(H({reflectSymbol:function(){return"pricePerHourCents"}})(Ih)(H({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(on)(H({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"themes"}})(xa(Pp(H({reflectSymbol:function(){return"active"}})(Sa)(H({reflectSymbol:function(){return"category"}})(nU)(eU(H({reflectSymbol:function(){return"durationMinutes"}})(on)(yb(H({reflectSymbol:function(){return"priceCents"}})(Ih)(H({reflectSymbol:function(){return"title"}})(he)(tn))))))))))(tn))))))))))))(H({reflectSymbol:function(){return"entity"}})(Pp(H({reflectSymbol:function(){return"bio"}})(he)(yb(H({reflectSymbol:function(){return"imageUrl"}})(cF)(sF(H({reflectSymbol:function(){return"organizationId"}})(on)(H({reflectSymbol:function(){return"organizationName"}})(he)(H({reflectSymbol:function(){return"shortEducation"}})(cF)(H({reflectSymbol:function(){return"tags"}})(aU)(tn))))))))))(tn)))),vF=q(la),fF=U(oe),Ch=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Zce=function(e){return ZO(Xce("ServiceProviderPresenter")(e))(function(n){return ZO(In(vF(G.value))(function(){var a=fF(vF);return function(t){return a(XO(t))}}())(fe(n.advisingConfig)))(function(a){return vF({entity:n.entity,advisingConfig:a})})})},tU=ka(Ze)(oe)({parse:function(e){return e.type==="Sem::User"?fF(Ch.create)(m8(e.presenter)):e.type==="ServiceProviders::Individual"?fF(Fh.create)(Zce(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var rU=Nn(jn),oU=Pn(rU)(Mn(Gn)),uU=Ln(An),iU=xn(uU),lU=kn(Un),cU=On(lU),Js=function(){function e(){}return e.value=new e,e}(),$c=function(){function e(){}return e.value=new e,e}(),qs=function(){function e(){}return e.value=new e,e}(),ese={to:function(e){if(e instanceof Re)return Js.value;if(e instanceof ce&&e.value0 instanceof Re)return $c.value;if(e instanceof ce&&e.value0 instanceof ce)return qs.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof Js)return new Re(Oe.value);if(e instanceof $c)return new ce(new Re(Oe.value));if(e instanceof qs)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},sU={eq:function(e){return function(n){return e instanceof Js&&n instanceof Js||e instanceof $c&&n instanceof $c||e instanceof qs&&n instanceof qs}}},bb=function(e){if(e instanceof Js)return"ready";if(e instanceof $c)return"live";if(e instanceof qs)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var Gh=function(){return Zn(Ze)({parse:Sn(bb)(Cn(ese)(oU(oU(rU)(uU))(iU))(cU(cU(lU)))(iU)),default:Js.value,diagnosticName:"livestream poll status"})}(),_F=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}};var vU=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:fe(e.undergrad.college),major:fe(e.undergrad.major),year:fe(e.undergrad.year)},gradCollege:fe(e.gradCollege),workExperience:fe(e.workExperience),admissionsStory:fe(e.admissionsStory),pictureUrl:fe(e.pictureUrl),allStreamsUrl:fe(e.allStreamsUrl)}};var nse=He(na),ase=ai(),fU=_e(oe),_U=Nn(jn),pU=Pn(_U)(Mn(Gn)),dU=Ln(An),mU=xn(dU),hU=kn(Un),DU=On(hU),gU=Zn(Ze),RU=ys(),yU=Ta(Ve),tse=_e(ze),rse=U(oe),ose=ee(Ve),Ou=function(){function e(){}return e.value=new e,e}(),ao=function(){function e(){}return e.value=new e,e}(),Mr=function(){function e(){}return e.value=new e,e}();var tc=an,use=te(tc);var ise={to:function(e){if(e instanceof Re)return Ou.value;if(e instanceof ce&&e.value0 instanceof Re)return ao.value;if(e instanceof ce&&e.value0 instanceof ce)return Mr.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Ou)return new Re(Oe.value);if(e instanceof ao)return new ce(new Re(Oe.value));if(e instanceof Mr)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},ff={eq:function(e){return function(n){return e instanceof Ou&&n instanceof Ou||e instanceof ao&&n instanceof ao||e instanceof Mr&&n instanceof Mr}}},Mh={eq:function(e){return function(n){return e===n}}},bU={compare:function(e){return function(n){return nse(e)(n)}},Eq0:function(){return Mh}};var _f=function(e){return ase({livestream_conference_id:use(e.id),livestream_conference_presenter_name:Ue("")(fU(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:Ue("")(e.partnerType)})},wU=function(){var e=function(n){if(n instanceof Ou)return"waiting_room";if(n instanceof ao)return"on_air";if(n instanceof Mr)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Sn(e)(Cn(ise)(pU(pU(_U)(dU))(mU))(DU(DU(hU)))(mU))}(),EU=function(){return gU({parse:wU,default:Ou.value,diagnosticName:"livestream status"})}(),lse=gU({parse:du,default:nt(sp),diagnosticName:"livestream scheduled start time"}),Ah=function(e){return{uid:e.uid,title:e.title,description:e.description,url:e.url,imageUrl:e.imageUrl,duration:e.duration,tailTime:e.tailTime,stats:e.stats,isPrivate:e.isPrivate,legacyRecording:e.legacyRecording,collegeFair:e.collegeFair,id:e.id,school:fU(fe(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:RU(n.id),slug:RU(n.slug)}}),scheduledStartTime:lse(e.scheduledStartTime),onAirTime:yU(du)(fe(e.onAirTime)),streamStatus:EU(e.streamStatus),watchUrl:fe(e.watchUrl),streamingStartTime:yU(du)(fe(e.streamingStartTime)),polls:tse(e.polls)(function(n){return{poll:_F(n.poll),status:Gh(n.status)}}),presenter:rse(vU)(fe(e.presenter)),partnerType:fe(e.partnerType),guestPresenter:ose(fe(e.guestPresenter))(tU),zoomJoinUrl:fe(e.zoomJoinUrl),zoomStartUrl:fe(e.zoomStartUrl)}};var IU=Nn(jn),TU=Ln(An),SU=kn(Un),ji=function(){function e(){}return e.value=new e,e}(),jp=function(){function e(){}return e.value=new e,e}(),cse={to:function(e){if(e instanceof Re)return ji.value;if(e instanceof ce)return jp.value;throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof ji)return new Re(Oe.value);if(e instanceof jp)return new ce(Oe.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},wb={eq:function(e){return function(n){return e instanceof ji&&n instanceof ji||e instanceof jp&&n instanceof jp}}};var Lh=function(e){if(e instanceof jp)return"anonymous-all-schools";if(e instanceof ji)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},Eb=function(){return Zn(Ze)({parse:Sn(Lh)(Cn(cse)(Pn(IU)(Mn(Gn))(IU)(TU))(On(SU)(SU))(xn(TU))),diagnosticName:"Profile.PublishScope",default:jp.value})}();var yl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),El=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var pF=function(e){return{id:e.id,title:e.title,requireAnonymousUserFirstName:e.requireAnonymousUserFirstName,requireAnonymousUserLastName:e.requireAnonymousUserLastName,requireAnonymousUserEmail:e.requireAnonymousUserEmail,requireReferredUserFirstName:e.requireReferredUserFirstName,requireReferredUserLastName:e.requireReferredUserLastName,description:fe(e.description)}},L_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:du(e.time)}},CU=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:fe(e.fullName),publishScope:Eb(e.publishScope)}},dF=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}},Ni="overlay-visibility-test";var FU=Nn(jn),Ib=Pn(FU)(Mn(Gn)),GU=Ln(An),Tb=xn(GU),MU=kn(Un),Sb=On(MU),Ws=function(){function e(){}return e.value=new e,e}(),pf=function(){function e(){}return e.value=new e,e}(),x_=function(){function e(){}return e.value=new e,e}(),df=function(){function e(){}return e.value=new e,e}(),mf=function(){function e(){}return e.value=new e,e}(),sse={to:function(e){if(e instanceof Re)return Ws.value;if(e instanceof ce&&e.value0 instanceof Re)return pf.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return x_.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return df.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce)return mf.value;throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Ws)return new Re(Oe.value);if(e instanceof pf)return new ce(new Re(Oe.value));if(e instanceof x_)return new ce(new ce(new Re(Oe.value)));if(e instanceof df)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof mf)return new ce(new ce(new ce(new ce(Oe.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},AU=function(e){if(e instanceof Ws)return"love-this";if(e instanceof pf)return"helpful";if(e instanceof x_)return"not-helpful";if(e instanceof df)return"writing-down";if(e instanceof mf)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},LU=function(e){return{authorTag:e.authorTag,kind:AU(e.kind)}},vse=function(){return Zn(Ze)({parse:Sn(AU)(Cn(sse)(Ib(Ib(Ib(Ib(FU)(GU))(Tb))(Tb))(Tb))(Sb(Sb(Sb(Sb(MU)))))(Tb)),default:Ws.value,diagnosticName:"Livestream Reaction Kind"})}(),xU=function(e){return{authorTag:e.authorTag,kind:vse(e.kind)}};var PU=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function jU(e,n){let a=typeof CV!="undefined"&&CV.apiEndpoint||typeof global!="undefined"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function NU(e,n,a,t,r){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(r.url,l);if(l.open(r.method||"GET",s,!0,r.username,r.password),r.headers)try{for(var m=0,p;(p=r.headers[m])!=null;m++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var g=function(E){return function(){u(new Error(E))}};return l.onerror=g(a),l.ontimeout=g(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(E){return E.length>0}).map(function(E){var b=E.indexOf(":");return t(E.substring(0,b))(E.substring(b+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,b,I){try{l.abort()}catch(L){return b(L)}return I()}}}var Cb="application/json",OU="application/x-www-form-urlencoded";var UU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qU=function(e){return e instanceof mF?new T(OU):e instanceof Fb?new T(Cb):G.value};var WU=function(){return Fb.create}();var $U=ba();var Gb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Np=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),zU=function(e){if(e instanceof Gb||e instanceof Mb)return $U(e.value0);if(e instanceof Np)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var hF=function(e){if(e instanceof Gb)return"Accept";if(e instanceof Mb)return"Content-Type";if(e instanceof Np)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var VU=ln(_n),DF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ab=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Lb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QU=function(e){if(e instanceof DF)return"arraybuffer";if(e instanceof gF)return"blob";if(e instanceof RF)return"document";if(e instanceof Ab||e instanceof Lb)return"text";if(e instanceof xb)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},KU=function(e){return e instanceof Ab?new T(Cb):G.value},YU=function(){return new Lb(VU)}();var XU=function(){return new xb(VU)}();var ZU=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var _se=ba();var Op=function(e){return _se(NR(e))};function e7(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var Pb=function(e){return e7(Ie.create,Te.create,e)};function n7(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function a7(e,n,a){try{return n(n7(encodeURIComponent(a)))}catch(t){return e(t)}}function t7(e,n,a){try{return n(n7(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var jb=function(){return wv(a7)(cn(G.value))(T.create)}();var Nb=function(){return wv(t7)(cn(G.value))(T.create)}();var dse=Jn(Dr),r7=U(oe),mse=io(Yu)(la);var hse=function(e){return e};var o7=function(){var e=function(t){if(t.value1 instanceof G)return Nb(t.value0);if(t.value1 instanceof T)return dse(r7(function(r){return function(u){return r+("="+u)}})(Nb(t.value0)))(Nb(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=r7(hr("&")),a=mse(e);return function(t){return n(a(hse(t)))}}();var bF=function(){function e(){}return e.value=new e,e}(),P_=function(){function e(){}return e.value=new e,e}(),wF=function(){function e(){}return e.value=new e,e}(),j_=function(){function e(){}return e.value=new e,e}(),Ob=function(){function e(){}return e.value=new e,e}(),xh=function(){function e(){}return e.value=new e,e}(),EF=function(){function e(){}return e.value=new e,e}(),IF=function(){function e(){}return e.value=new e,e}(),TF=function(){function e(){}return e.value=new e,e}(),SF=function(){function e(){}return e.value=new e,e}(),CF=function(){function e(){}return e.value=new e,e}(),FF=function(){function e(){}return e.value=new e,e}(),GF=function(){function e(){}return e.value=new e,e}(),MF=function(){function e(){}return e.value=new e,e}(),AF=function(){function e(){}return e.value=new e,e}(),Ub=function(){function e(){}return e.value=new e,e}();var Dse=function(e){return e},gse={show:function(e){if(e instanceof bF)return"OPTIONS";if(e instanceof P_)return"GET";if(e instanceof wF)return"HEAD";if(e instanceof j_)return"POST";if(e instanceof Ob)return"PUT";if(e instanceof xh)return"DELETE";if(e instanceof EF)return"TRACE";if(e instanceof IF)return"CONNECT";if(e instanceof TF)return"PROPFIND";if(e instanceof SF)return"PROPPATCH";if(e instanceof CF)return"MKCOL";if(e instanceof FF)return"COPY";if(e instanceof GF)return"MOVE";if(e instanceof MF)return"LOCK";if(e instanceof AF)return"UNLOCK";if(e instanceof Ub)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var u7=jt(te(gse))(Dse);var i7={eq:function(e){return function(n){return e instanceof bF&&n instanceof bF||e instanceof P_&&n instanceof P_||e instanceof wF&&n instanceof wF||e instanceof j_&&n instanceof j_||e instanceof Ob&&n instanceof Ob||e instanceof xh&&n instanceof xh||e instanceof EF&&n instanceof EF||e instanceof IF&&n instanceof IF||e instanceof TF&&n instanceof TF||e instanceof SF&&n instanceof SF||e instanceof CF&&n instanceof CF||e instanceof FF&&n instanceof FF||e instanceof GF&&n instanceof GF||e instanceof MF&&n instanceof MF||e instanceof AF&&n instanceof AF||e instanceof Ub&&n instanceof Ub}}};var l7=function(e){return kv(function(n){return function(){var t=e(function(r){return n(Ie.create(r))()},function(r){return n(Te.create(r))()});return function(r){return kv(function(u){return function(){return t(r,function(l){return u(Ie.create(l))()},function(l){return u(Te.create(l))()}),wS}})}}})};var LF=q(al(ar)),Rse=X0(ar),N_=Ss(ar),c7=ia(kR(qR)(ar)),yse=ds(Ec(ar)),kb=U(oe),bse=wu(Be)(at),wse=De(xt),Ese=Ta(Ve),Ise=U(ze),Tse=_e(Ca),Sse=Fv(Wr),Cse=q(Qn);var Bb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Hb=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),Jb=function(){function e(){}return e.value=new e,e}(),qb=function(){function e(){}return e.value=new e,e}(),Wb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),s7=function(e){return function(n){var a=function(p){return p===""?LF(d4):jt(function(g){return Rse(Om.create(g))})(LF)(Pb(p))},t=function(){if(n.responseFormat instanceof DF)return N_("ArrayBuffer");if(n.responseFormat instanceof gF)return N_("Blob");if(n.responseFormat instanceof RF)return function(p){return c7(N_("Document")(p))(c7(N_("XMLDocument")(p))(N_("HTMLDocument")(p)))};if(n.responseFormat instanceof Ab)return yse(function(p){return n.responseFormat.value0(a(p))})(N_("String"));if(n.responseFormat instanceof Lb)return N_("String");if(n.responseFormat instanceof xb)return cn(n.responseFormat.value0(LF(de)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])}(),r=function(p){if(p instanceof UU)return new Te(p.value0(Fr));if(p instanceof kU)return new Te(Fr(p.value0));if(p instanceof BU)return new Te(Fr(p.value0));if(p instanceof HU)return new Te(Fr(p.value0));if(p instanceof JU)return new Te(Fr(p.value0));if(p instanceof mF)return gc("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(kb(Fr)(o7(p.value0)));if(p instanceof Fb)return new Te(Fr(qy(p.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[p.constructor.name])},u=function(p){return function(g){return p instanceof T&&!bse(sv(wse)(hF)(p.value0))(g)?r_(g)(p.value0):g}},i=function(p){return u(kb(Mb.create)(Ese(qU)(p)))(u(kb(Gb.create)(KU(n.responseFormat)))(n.headers))},l=function(p){return{method:u7(n.method),url:n.url,headers:Ise(function(g){return{field:hF(g),value:zU(g)}})(i(n.content)),content:p,responseType:QU(n.responseFormat),username:Ia(n.username),password:Ia(n.password),withCredentials:n.withCredentials,timeout:Ue(0)(kb(function(g){return g})(n.timeout))}},s=function(p){return Tse(Sse(l7(NU(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",ZU.create,l(p)))))(function(g){if(g instanceof Te){var E=Op(t(g.value0.body));if(E instanceof Ie)return new Ie(new Hb(_j(E.value0),g.value0));if(E instanceof Te)return new Te({headers:g.value0.headers,status:g.value0.status,statusText:g.value0.statusText,body:E.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[E.constructor.name])}if(g instanceof Ie)return new Ie(function(){var b=z0(g.value0),I=b==="AffjaxTimeoutErrorMessageIdent";if(I)return Jb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?qb.value:new Wb(g.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[g.constructor.name])})};if(n.content instanceof G)return s(Ia(G.value));if(n.content instanceof T){var m=r(n.content.value0);if(m instanceof Te)return s(Ia(new T(m.value0)));if(m instanceof Ie)return Cse(new Ie(new Bb(m.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[m.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Up=function(){return{method:new Ie(P_.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:XU,timeout:G.value}}();var v7={eq:function(e){return function(n){return e===n}}};var xF={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var f7=s7(xF);function L7(e){return Buffer.from(e).toString("base64")}function x7(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var OF=typeof btoa=="function";function P7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Kc||!Kc.key)return Kc||console.error("Pusher config is missing in global context"),new pve;let t={auth:{headers:{"X-CSRF-Token":Kc.authToken}},authEndpoint:Kc.authPath,cluster:Kc.cluster};return Kc.dev&&Object.assign(t,{wsHost:Kc.dev.wsHost,wsPort:Kc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new K7.default(Kc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),Y7=e=>{let n=fve().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),_ve()}};function pve(){typeof document!="undefined"&&(document.mockPusher=this),this.localObject={},this.channels=[],this.disconnect=function(){document.mockPusher=null},this.subscribe=function(e){let n=this.channels.find(t=>t.name===e);if(n)return n;let a=new dve(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function dve(e){this.name=e,this.handlers={},this.triggered=[],this.disconnect=()=>{},this.bind=function(n,a){this.handlers[n]=a},this.unbind=function(n,a){this.handlers[n]===a&&(this.handlers[n]=null)},this.trigger=function(n,a){this.triggered.push({eventName:n,eventData:a})}}var Vb=function(e){return e};var Dve=function(e){return e},Z7=function(e){var n=He(e),a=Dve(e.Eq0());return{compare:function(t){return function(r){return Rx(n(t)(r))}},Eq0:function(){return a}}};var Qb=function(e){return function(){console.error(e)}};var i6=function(e){var n=gn(e);return function(a){return n(Qb(a))}};var Gve=q(_t),l6=ee(fr),Mve=U(Bn),Ave=i6(Sr),BF=function(e){var n=function(t){var r=e(t);return KS(r.view(r.init.value0)(cn(Gve(de))))},a=function(t){return function(r){return function(u){return function(){var l=l6(l6(pu)(function(){var m=Mve(mb);return function(p){return m(cf(p))}}()))(pb(r))();if(l instanceof G)return Ave("Element #"+(r+" not found"))();if(l instanceof T){var s=eC(e(u))();return t(s)(l.value0)()}throw new Error("Failed pattern match at Elmish.Boot (line 117, column 11 - line 122, column 21): "+[l.constructor.name])}}}};return{mount:a(k3),renderToString:n,hydrate:a(B3)}};var Nh="";function s6(e){var n=e.split(` `);return n.reduce(function(a,t){var r=Pve(t)||Nve(t)||kve(t)||qve(t)||Hve(t);return r&&a.push(r),a},[])}var Lve=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xve=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Pve(e){var n=Lve.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=xve.exec(n[2]);return t&&r!=null&&(n[2]=r[1],n[3]=r[2],n[4]=r[3]),{file:a?null:n[2],methodName:n[1]||Nh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var jve=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Nve(e){var n=jve.exec(e);return n?{file:n[2],methodName:n[1]||Nh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var Ove=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Uve=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function kve(e){var n=Ove.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=Uve.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||Nh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Bve=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Hve(e){var n=Bve.exec(e);return n?{file:n[3],methodName:n[1]||Nh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var Jve=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function qve(e){var n=Jve.exec(e);return n?{file:n[2],methodName:n[1]||Nh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function v6({skipFrames:e,prefix:n}){let a=new Error().stack,r=s6(a)[e],u=f6(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=f6(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var f6=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var Wve=q(Rn),$ve=ln(_n),Kb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zve={map:function(e){return function(n){return new Kb(function(a){return n.value0(function(t){return a(e(t))})})}}},Vve=U(zve);var _6=function(e){return ZS(v6(e))},$s=function(e){return new Kb(function(n){return n(e)})},U_=function(e){return function(n){return new Kb(function(a){return js(e)(n)(a)})}},p6=function(e){return function(n){return js(e)(function(a){return{init:Wve(de),update:cn(ms),view:cn(cn(n.value0($ve)))}})(de)}},d6=function(e){var n=_6({skipFrames:3,prefix:"WithHook"});return function(a){return p6(n)(Vve(a)(e))}};var Jp=function(e){var n=_6({skipFrames:3,prefix:"HooksComponent"});return p6(n)(e)},Yc=function(){return function(e){return function(n){return new Kb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},Qve=Yc(),k_=function(e){return function(){return Qve}};$a();var m6=class extends Fa.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},h6=m6;var Kve=Et();var D6=function(e){return"ref:"+Ft(e)(Wa.value)},g6=function(e){var n=D6(e);return function(a){return Kve(Cc(n)(a))}},R6=function(e){var n=D6(e);return function(a){return KR(n)(a)}};var Yve=Gi(),y6=nn(Ke)(qn),b6=q(Rn),Xve=Mi(Gy(vl)),w6={reflectSymbol:function(){return"deps"}},Zve=g6(w6),efe=R6(w6),nfe=ln(_n);var afe=function(e){var n=Yve(e);return function(){return function(){return n(h6)}}},tfe=afe(Qe)()(),rfe=function(e){var n=yo(e);return function(a){return function(t){return function(r){return function(u){return U_(a)(function(i){return t({init:y6(Za(u(r)))(function(){return b6(r)}),update:function(l){return function(s){return y6(Za(u(s)))(function(){return b6(s)})}},view:function(l){return function(s){return tfe({componentDidUpdate:Xve(s)(function(m){var p=n(Zve(m))(r);return p?new T(r):G.value}),deps:efe(r)})(i(de))}}})})}}}}};var qp=function(e){var n=rfe(e);return function(a){return function(t){return n("UseEffectPrime")(nfe)(a)(t)}}};var E6=q(Rn),ofe=ln(_n);var ufe=function(e){return function(n){return function(a){return U_(e)(function(t){return n({init:E6(a),update:function(r){return function(u){return E6(u)}},view:Kf(t)})})}}},Il=function(e){return ufe("UseState")(ofe)(e)};var HF=function(){return Yc()(Il(G.value))(function(e){return $s(new sn(e.value0,Cy(e.value0)(e.value1)))})}();var I6=nn(Ke)(qn),ife=fu(Le),lfe=ln(_n),T6=q(Rn),Oh=function(e){return function(n){return U_("UseSubscription")(function(a){return{init:I6(ife(lfe)(e))(function(){return T6(de)}),update:function(t){return function(r){return I6(Za(n(r)))(function(){return T6(de)})}},view:function(t){return function(r){return a(de)}}}})}};var Yb=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var JF=nl(Xr(at)),vfe=ln(_n),ffe=_l()(),Xb=function(e){var n=ni(e);return function(a){return Pt(n(a))}},M6=function(e){if(JF(Xb("http://"))(JF(Xb("https://"))(JF(Xb("//"))(Xb("blob:"))))(e))return e;if(je)return Yb+Ue(e)(ni("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},vi=function(){return function(){return function(e){return function(n){var a=function(r){return vfe},t=a(n)(ep("src")(M6(n.src))(n));return ffe(e)(t)}}}};var L6=q(Rn),_fe=Zn(Yy),pfe=ee(tu);var dfe={init:L6(de),update:function(e){return function(n){return L6(de)}},view:function(e){return function(n){return ta}}},qF=function(e){var n=xv(e);return function(a){return BF(_fe({parse:function(t){return pfe(n(t))(function(r){return In(new Ie("Component construction failed"))(Te.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:dfe}))}};var Me=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bn=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Sfe=JSON.stringify;var Ffe=gr(Be)(It),Gfe=Bo(_t)(Ku),Mfe=_e(rC);var Afe={show:function(e){return e}},Lfe=te(Afe);var nw=he;var xfe=function(e){var n=tf(e);return function(a){return function(t){return function(r){var u=Ffe(["Pusher event ",t," over channel ",Lfe(a)]),i=function(l){return Gfe(n(u)(l))(r)()};return function(){return Y7({channel:a,event:t,handler:i})}}}}},Oi=function(e){var n=xfe(e);return function(a){var t=a.Monad0(),r=ee(t.Bind1()),u=gn(a),i=q(t.Applicative0());return function(l){return function(s){return function(m){return r(u(n(l)(s)(m)))(function(p){return i(u(p))})}}}}},Pfe=Oi(f_),aw=function(e){var n=Pfe(e);return function(a){return function(t){return Mfe(n(a)(t))(cn(de))}}};var X6=Qc(zc),Uu=rc(X6),Ar=ee(ra),kh=rc(Qc(X6)),Z6=q(Qn),jfe=_e(oe),Bh=La(),e5=H({reflectSymbol:function(){return"pollId"}})(on),Nfe=H({reflectSymbol:function(){return"status"}})(he)(tn),Ofe=gt(xa(Bh(e5(Nfe)))),n5=U(ze),a5=U(Ca),Ufe=H({reflectSymbol:function(){return"id"}}),kfe=Ufe(on),t5=Bh(H({reflectSymbol:function(){return"author"}})(Bh(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(kfe(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))),Bfe=Hp(t5);var Hfe=tt(he);var Jfe=Hp(xa(Bh(e5(H({reflectSymbol:function(){return"responses"}})(Bh(H({reflectSymbol:function(){return"answered"}})(on)(H({reflectSymbol:function(){return"optionCounts"}})(xa(on))(H({reflectSymbol:function(){return"seen"}})(on)(H({reflectSymbol:function(){return"skipped"}})(on)(tn))))))(tn))))),qfe=Hp(Hfe),Wfe=Hp(xa(t5));var QF=kh("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Ar(e({id:n.id,status:bb(a)}))(Vc(function(t){return Z6(Ue([])(jfe(Ofe(t))(n5(function(r){return{pollId:r.pollId,status:Gh(r.status)}}))))}))}}});var KF=kh("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Ar(e({id:n.id,options:a}))(lr)}}}),r5=Uu("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Ar(e({conference_id:n}))(lr)}}),o5=Uu("livestreams_conferences_status_complete_path")(function(e){return function(n){return Ar(e({conference_id:n}))(lr)}}),u5=Uu("livestreams_cta_save_referral_path")(function(e){return function(n){return Ar(e(n))(lr)}}),i5=Uu("livestreams_polls_report_shown_path")(function(e){return function(n){return Ar(e({id:n.id}))(lr)}}),l5=kh("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Ar(e({stream_id:n,visible:a.visible}))(lr)}}}),c5=kh("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Ar(e({conference_id:n,current_time_minutes:a}))(lr)}}}),s5=Uu("livestreams_questions_visibility_path")(function(e){return function(n){return Ar(e({question_id:n.questionId,is_public:n.isPublic}))(lr)}}),v5=Uu("livestreams_questions_post_path")(function(e){return function(n){return Ar(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Vc(function(a){return a5(L_)(Bfe("Livestream question")(a))}))}}),f5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),_5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),p5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),d5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(lr)}}),tw=Uu("livestreams_register_path")(function(e){return function(n){return Ar(e({from_conference_id:Ia(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(lr)}});var m5=kh("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Ar(e({conference_id:n,reaction:LU(a)}))(lr)}}}),h5=Uu("livestreams_polls_responses_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(Jfe("livestream poll responses")))}}),D5=Uu("livestreams_conferences_download_url_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(function(a){return a5(fe)(qfe("Livestream download URL")(a))}))}}),rw=rc(zc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Ar(e({}))(lr)});var g5=Uu("livestreams_conferences_ban_user_path")(function(e){return function(n){return Ar(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(lr)}}),ow=Uu("livestreams_questions_all_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(function(a){return Ar(Wfe("Livestream questions")(a))(function(t){return Z6(n5(L_)(t))})}))}});var XF=function(){function e(){}return e.value=new e,e}(),ZF=function(){function e(){}return e.value=new e,e}(),eG=function(){function e(){}return e.value=new e,e}(),nG=function(){function e(){}return e.value=new e,e}(),aG=function(){function e(){}return e.value=new e,e}(),tG=function(){function e(){}return e.value=new e,e}(),rG=function(){function e(){}return e.value=new e,e}(),oG=function(){function e(){}return e.value=new e,e}(),uG=function(){function e(){}return e.value=new e,e}(),iG=function(){function e(){}return e.value=new e,e}(),lG=function(){function e(){}return e.value=new e,e}(),cG=function(){function e(){}return e.value=new e,e}(),sG=function(){function e(){}return e.value=new e,e}(),vG=function(){function e(){}return e.value=new e,e}(),Jt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fG=function(){function e(){}return e.value=new e,e}();var iw=function(e){if(e instanceof Jt&&e.value0 instanceof XF)return"architecture";if(e instanceof Jt&&e.value0 instanceof eG)return"chemistry";if(e instanceof Jt&&e.value0 instanceof ZF)return"business";if(e instanceof Jt&&e.value0 instanceof nG)return"computer-science";if(e instanceof Jt&&e.value0 instanceof aG)return"criminal-justice-and-corrections";if(e instanceof Jt&&e.value0 instanceof tG)return"economics";if(e instanceof Jt&&e.value0 instanceof rG)return"engineering";if(e instanceof Jt&&e.value0 instanceof oG)return"english";if(e instanceof Jt&&e.value0 instanceof uG)return"film";if(e instanceof Jt&&e.value0 instanceof iG)return"finance";if(e instanceof Jt&&e.value0 instanceof lG)return"history";if(e instanceof Jt&&e.value0 instanceof cG)return"political-science";if(e instanceof Jt&&e.value0 instanceof sG)return"pre-med";if(e instanceof Jt&&e.value0 instanceof vG)return"psychology";if(e instanceof fG)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var lw=function(){function e(){}return e.value=new e,e}(),Kfe=function(){function e(){}return e.value=new e,e}(),Yfe=function(){function e(){}return e.value=new e,e}();var R5=function(e){if(e instanceof lw)return G.value;if(e instanceof Yfe)return new T("open");if(e instanceof Kfe)return new T("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var E5=Et();var sw=function(e){return function(n){var a=function(){var u=Sc("?")(n);return u?"&":"?"}(),t=E5(jb(e.value)),r=E5(jb(e.key));return n+(a+(r+("="+t)))}};var b_e=function(){function e(){}return e.value=new e,e}(),w_e=function(){function e(){}return e.value=new e,e}(),E_e=function(){function e(){}return e.value=new e,e}(),I_e=function(){function e(){}return e.value=new e,e}(),T_e=function(){function e(){}return e.value=new e,e}(),S_e=function(){function e(){}return e.value=new e,e}(),C_e=function(){function e(){}return e.value=new e,e}(),F_e=function(){function e(){}return e.value=new e,e}(),G_e=function(){function e(){}return e.value=new e,e}(),M_e=function(){function e(){}return e.value=new e,e}(),A_e=function(){function e(){}return e.value=new e,e}(),L_e=function(){function e(){}return e.value=new e,e}(),x_e=function(){function e(){}return e.value=new e,e}(),P_e=function(){function e(){}return e.value=new e,e}(),j_e=function(){function e(){}return e.value=new e,e}(),N_e=function(){function e(){}return e.value=new e,e}(),O_e=function(){function e(){}return e.value=new e,e}(),U_e=function(){function e(){}return e.value=new e,e}(),k_e=function(){function e(){}return e.value=new e,e}(),B_e=function(){function e(){}return e.value=new e,e}(),H_e=function(){function e(){}return e.value=new e,e}(),J_e=function(){function e(){}return e.value=new e,e}(),q_e=function(){function e(){}return e.value=new e,e}(),W_e=function(){function e(){}return e.value=new e,e}(),$_e=function(){function e(){}return e.value=new e,e}(),z_e=function(){function e(){}return e.value=new e,e}(),V_e=function(){function e(){}return e.value=new e,e}(),Q_e=function(){function e(){}return e.value=new e,e}(),K_e=function(){function e(){}return e.value=new e,e}(),Y_e=function(){function e(){}return e.value=new e,e}(),X_e=function(){function e(){}return e.value=new e,e}(),Z_e=function(){function e(){}return e.value=new e,e}(),e0e=function(){function e(){}return e.value=new e,e}(),n0e=function(){function e(){}return e.value=new e,e}(),a0e=function(){function e(){}return e.value=new e,e}(),t0e=function(){function e(){}return e.value=new e,e}(),r0e=function(){function e(){}return e.value=new e,e}(),o0e=function(){function e(){}return e.value=new e,e}(),u0e=function(){function e(){}return e.value=new e,e}(),i0e=function(){function e(){}return e.value=new e,e}(),l0e=function(){function e(){}return e.value=new e,e}(),c0e=function(){function e(){}return e.value=new e,e}(),s0e=function(){function e(){}return e.value=new e,e}(),v0e=function(){function e(){}return e.value=new e,e}(),f0e=function(){function e(){}return e.value=new e,e}(),_0e=function(){function e(){}return e.value=new e,e}(),p0e=function(){function e(){}return e.value=new e,e}(),d0e=function(){function e(){}return e.value=new e,e}(),m0e=function(){function e(){}return e.value=new e,e}(),h0e=function(){function e(){}return e.value=new e,e}(),D0e=function(){function e(){}return e.value=new e,e}(),g0e=function(){function e(){}return e.value=new e,e}(),R0e=function(){function e(){}return e.value=new e,e}(),y0e=function(){function e(){}return e.value=new e,e}(),b0e=function(){function e(){}return e.value=new e,e}(),w0e=function(){function e(){}return e.value=new e,e}();var ca=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ku=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var I5=function(e){if(e instanceof ca&&e.value0 instanceof b_e)return"AcceptanceRate";if(e instanceof ca&&e.value0 instanceof w_e)return"AcceptanceRateMen";if(e instanceof ca&&e.value0 instanceof E_e)return"AcceptanceRateWomen";if(e instanceof ca&&e.value0 instanceof I_e)return"Address";if(e instanceof ca&&e.value0 instanceof T_e)return"AdmissionChances";if(e instanceof ca&&e.value0 instanceof S_e)return"AdmissionDifficulty";if(e instanceof ca&&e.value0 instanceof C_e)return"AdmissionsNotificationDate";if(e instanceof ca&&e.value0 instanceof F_e)return"AdmissionsWebsite";if(e instanceof ca&&e.value0 instanceof G_e)return"AppDeadlineIsRolling";if(e instanceof ca&&e.value0 instanceof M_e)return"ApplicationEffort";if(e instanceof ca&&e.value0 instanceof A_e)return"ApplicationRound";if(e instanceof ca&&e.value0 instanceof L_e)return"BasketballConference";if(e instanceof ca&&e.value0 instanceof x_e)return"CampusSetting";if(e instanceof ca&&e.value0 instanceof P_e)return"City";if(e instanceof ca&&e.value0 instanceof j_e)return"ClassRank";if(e instanceof ca&&e.value0 instanceof N_e)return"CoEdSingleSex";if(e instanceof ca&&e.value0 instanceof O_e)return"CollegeType";if(e instanceof ca&&e.value0 instanceof U_e)return"CommuterCollege";if(e instanceof ca&&e.value0 instanceof k_e)return"Diversity";if(e instanceof ca&&e.value0 instanceof B_e)return"DropoutRate";if(e instanceof ca&&e.value0 instanceof J_e)return"FinancialAidWebsite";if(e instanceof ca&&e.value0 instanceof q_e)return"FirstYearEnrollment";if(e instanceof ca&&e.value0 instanceof W_e)return"FootballConference";if(e instanceof ca&&e.value0 instanceof $_e)return"FourYearGraduationRate";if(e instanceof ca&&e.value0 instanceof z_e)return"HasDivisionOneBasketball";if(e instanceof ca&&e.value0 instanceof V_e)return"HasDivisionOneFootball";if(e instanceof ca&&e.value0 instanceof Q_e)return"HasMedicalSchool";if(e instanceof ca&&e.value0 instanceof K_e)return"HasStudyAbroad";if(e instanceof ca&&e.value0 instanceof Y_e)return"HBCU";if(e instanceof ca&&e.value0 instanceof X_e)return"InListStatus";if(e instanceof ca&&e.value0 instanceof Z_e)return"MainWebsite";if(e instanceof ca&&e.value0 instanceof H_e)return"Majors";if(e instanceof ca&&e.value0 instanceof e0e)return"Name";if(e instanceof ca&&e.value0 instanceof n0e)return"NetCostEstimate";if(e instanceof ca&&e.value0 instanceof a0e)return"Notes";if(e instanceof ca&&e.value0 instanceof t0e)return"PercentInternationalStudents";if(e instanceof ca&&e.value0 instanceof r0e)return"Phone";if(e instanceof ca&&e.value0 instanceof o0e)return"Photo";if(e instanceof ca&&e.value0 instanceof u0e)return"Prestige";if(e instanceof ca&&e.value0 instanceof i0e)return"ProgramLength";if(e instanceof ca&&e.value0 instanceof l0e)return"PublicPrivate";if(e instanceof ca&&e.value0 instanceof c0e)return"RecommendationLetters";if(e instanceof ca&&e.value0 instanceof s0e)return"Region";if(e instanceof ca&&e.value0 instanceof v0e)return"ReligiousAffiliation";if(e instanceof ca&&e.value0 instanceof f0e)return"SatActDeadline";if(e instanceof ca&&e.value0 instanceof _0e)return"SatActTestPolicy";if(e instanceof ca&&e.value0 instanceof p0e)return"SatSubjectTestDeadline";if(e instanceof ca&&e.value0 instanceof d0e)return"SixYearGraduationRate";if(e instanceof ca&&e.value0 instanceof m0e)return"State";if(e instanceof ca&&e.value0 instanceof h0e)return"StudentFacultyRatio";if(e instanceof ca&&e.value0 instanceof D0e)return"SubmissionDeadline";if(e instanceof ca&&e.value0 instanceof g0e)return"TOEFLPolicy";if(e instanceof ca&&e.value0 instanceof R0e)return"TotalUndergrads";if(e instanceof ca&&e.value0 instanceof y0e)return"TuitionInState";if(e instanceof ca&&e.value0 instanceof b0e)return"TuitionOutOfState";if(e instanceof ca&&e.value0 instanceof w0e)return"YieldRate";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof XF)return"RankingArchitecture";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof ZF)return"RankingBusiness";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof eG)return"RankingChemistry";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof nG)return"RankingComputerScience";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof aG)return"RankingCriminalJusticeAndCorrections";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof tG)return"RankingEconomics";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof rG)return"RankingEngineering";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof oG)return"RankingEnglish";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof uG)return"RankingFilm";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof iG)return"RankingFinance";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof lG)return"RankingHistory";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof cG)return"RankingPoliticalScience";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof sG)return"RankingPreMed";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof vG)return"RankingPsychology";if(e instanceof ku&&e.value0 instanceof fG)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var E0e=rr(Xr(at)),I0e=function(e){return e},en=Fr(Zu),T0e=function(e){return E0e(l_)(e)},T5=function(e){var n=T0e(e);return n?e:""},Zt=function(e){return I0e(Fr(e))};var S5=zl()(),$n=function(e){var n=DO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(S5(r)({className:a,"aria-label":t}))(u)}}}}}}},C5=function(e){var n=$n(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},cr=function(e){var n=RO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(S5(r)({className:a,"aria-label":t}))(u)}}}}}}};var che=function(){function e(){}return e.value=new e,e}(),she=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vhe=function(){function e(){}return e.value=new e,e}();var F5=function(e){if(e instanceof che)return"filters";if(e instanceof she)return"filter:"+I5(e.value0);if(e instanceof vhe)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 34, column 26 - line 37, column 39): "+[e.constructor.name])};function G5(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var fhe=ai();var zs=function(e){var n=gn(e);return function(a){return function(t){return n(function(){return G5(a,t)})}}},Vs=function(e){var n=zs(e);return function(){return function(a){return function(t){return n(a)(fhe(t))}}}};var Hh=function(){function e(){}return e.value=new e,e}(),hf=function(){function e(){}return e.value=new e,e}(),Jh=function(){function e(){}return e.value=new e,e}(),Bhe=function(){function e(){}return e.value=new e,e}(),L5=function(e){if(e instanceof Hh)return"modal-sm";if(e instanceof hf)return"";if(e instanceof Jh)return"modal-lg";if(e instanceof Bhe)return"modal-xl";throw new Error("Failed pattern match at Bootstrap.Modal.Size (line 14, column 13 - line 18, column 27): "+[e.constructor.name])};var r9=$u(t9()),o9=r9.default;var bDe=Gi(),u9=function(e){var n=bDe(e);return function(){return function(){return n(o9)}}};function RG(e){return function(){return function(n){return e(n)()}}}function yG(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function bG(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var i9="message";var l9="hashchange";var c9="popstate";var s9="keyup",v9="keydown";var f9="mouseup";var _9="mousemove";var p9=gn(Le),d9=U(Bn),wDe=Ta(fr),zh=function(){var e=function(t){return function(r){return function(u){return p9(function(){var l=r(),s=RG(function(m){return u(m)})();return yG(t)(s)(!1)(l)(),p9(bG(t)(s)(!1)(l))})}}},n=function(t){return e(t)(d9(FO)(pu))},a=function(t){return e(t)(d9(EO)(wDe(cf)(pu)))};return{hashchange:n(l9),mousemove:n(_9),mouseup:n(f9),popstate:n(c9),resize:n("resize"),message:n(i9),keydown:a(v9),keyup:a(s9),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var mw=function(){return Je};var hw=Se(Qe),wG=co(),EDe=u9(Qe)()(),EG=Xt(Qe)()(),IDe=Xt(ye)()(),TDe=Se(ye),SDe=$n(re)()(),CDe=Zr(Nu),FDe=er(Qn),GDe=gn(Le),m9=mw(),oc=function(){return function(e){var n=hw("modal-backdrop fade show")(ta),a=wG(e),t=a.id+"-description",r=Rl(a.footer),u=Rl(a.header),i=a.id+"-label",l={style:Ba(a.dialogStyle)(vt({})),role:"dialog","aria-modal":"true","aria-labelledby":function(){if(u instanceof T)return i;if(u instanceof G)return"";throw new Error("Failed pattern match at Bootstrap.Modal (line 72, column 11 - line 74, column 26): "+[u.constructor.name])}(),"aria-describedby":t},s=Ba(a.size)(hf.value),m=hr(" ")([function(){var g=Ba(a.scrollable)(!0);return g?"modal-dialog-scrollable":""}(),function(){var g=Ba(a.centered)(!0);return g?"modal-dialog-centered":""}(),L5(s),Ba(a.dialogClass)("")]),p=EDe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(hw("modal fade show d-block")(EG("modal-dialog "+m)(l)(IDe("modal-content "+Ba(a.contentClass)(""))({style:Ba(a.contentStyle)(vt({}))})([ha(u)(EG("modal-header "+Ba(a.headerClass)(""))({id:i})),EG("modal-body "+Ba(a.bodyClass)(""))({id:t})(a.body),ha(r)(hw("modal-footer "+Ba(a.footerClass)("")))]))));return Fe([p,n])}},IG=oc(),uc=function(){return function(e){var n=wG(e),a=TDe("d-flex w-100 justify-content-between align-items-center")([hw("mr-4")(Ba(n.title)(ta)),SDe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Ba(n.dismissButtonClass)("text-body"))(Zt("Close"))({type:"button",onClick:CDe(n.onDismiss)})("")]),t=function(r){return FDe(r.key==="Escape")(GDe(n.onDismiss))};return d6(Oh(zh.keyup)(t))(function(r){var u=Ba(n.bodyScrollable)(!1);return IG(u?function(){var i=wG(m9(n));return{body:i.body,bodyClass:i.bodyClass,centered:i.centered,contentClass:i.contentClass,contentStyle:i.contentStyle,dialogClass:i.dialogClass,dialogStyle:i.dialogStyle,footer:i.footer,footerClass:i.footerClass,headerClass:i.headerClass,id:i.id,scrollable:i.scrollable,size:i.size,header:a}}():m9({bodyClass:n.bodyClass,bodyScrollable:n.bodyScrollable,centered:n.centered,contentClass:n.contentClass,contentStyle:n.contentStyle,dialogClass:n.dialogClass,dialogStyle:n.dialogStyle,dismissButtonClass:n.dismissButtonClass,footer:n.footer,footerClass:n.footerClass,headerClass:n.headerClass,id:n.id,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Fe([a,n.body])}))})}},$p=function(e){var n=sh(e);return function(a){return function(t){return function(r){return IG({id:t.id,bodyClass:a,body:Fe(n(r))})}}}};var MDe=co(),ADe=ln(_n),LDe=Zv(ye)()(),xDe=$n(Qe)()(),PDe=eo()();var Dw="login",TG=function(){return function(e){var n=MDe(e),a=function(){var u=Ba(n.auth0ActiveTab)(Dw);return u}(),t=Ue({path:"",token:""})($b("login_path")),r=function(u){return function(i){return In(ADe)(function(l){return sw(function(s){return{key:u,value:s}}(l))})(Rl(i))}};return LDe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(sw({key:"screen_hint",value:a})(t.path))),target:function(){var u=Ba(n.openInNewTab)(!1);return u?"_blank":""}()})([xDe(Ba(n.className)("btn btn-primary px-4"))(en)({type:"submit",disabled:Ba(n.disabled)(!1)})(Ba(n.content)(Xe(Ba(n.text)("Log in")))),PDe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var J_=function(e){return function(n){return function(){return n[e]}}},jDe=J_("URL"),NDe=J_("documentURI"),ODe=J_("origin"),UDe=J_("compatMode"),kDe=J_("characterSet"),BDe=J_("contentType");var HDe=J_("documentElement");var gw=function(e){return function(n){return n[e]}},qDe=gw("namespaceURI"),WDe=gw("prefix"),$De=gw("localName"),zDe=gw("tagName");function SG(e){return function(){return e.id}}function CG(e){return function(){return e.classList}}function FG(e){return function(){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}}var GG=Je;var D9=Fn("Element");var ic=function(e){return function(n){return function(){return n[e]}}};var QDe=ic("baseURI"),KDe=ic("ownerDocument"),g9=ic("parentNode"),YDe=ic("parentElement");var XDe=ic("childNodes"),ZDe=ic("firstChild"),ege=ic("lastChild"),nge=ic("previousSibling"),age=ic("nextSibling"),tge=ic("nodeValue");var rge=ic("textContent");function MG(e){return function(n){return function(){return e.isEqualNode(n)}}}var ige=U(Bn);var R9=function(){var e=ige(fe);return function(n){return e(g9(n))}}();var W_=function(){function e(){}return e.value=new e,e}(),y9=function(){function e(){}return e.value=new e,e}(),b9=function(){function e(){}return e.value=new e,e}(),Vh=function(){function e(){}return e.value=new e,e}(),w9=function(){function e(){}return e.value=new e,e}(),E9=function(){function e(){}return e.value=new e,e}(),I9=function(){function e(){}return e.value=new e,e}();var Rw=function(e){if(e instanceof W_)return G.value;if(e instanceof y9)return new T("for-you");if(e instanceof b9)return new T("chancing");if(e instanceof Vh)return new T("finances");if(e instanceof w9)return new T("majors");if(e instanceof E9)return new T("admission-requirements");if(e instanceof I9)return new T("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 84, column 14 - line 91, column 39): "+[e.constructor.name])};var AG=_e(oe);var LG=H0(It),vge=ba(),fge=Di(oe),xG=function(e){return"/schools/"+e.slug},PG="/schools/hub";var T9=function(e){return function(n){var a=AG(R5(n.whatificator))(function(l){return"simulator="+l}),t=AG(n.mobileOverlay)(function(l){return"overlay="+F5(l)}),r=hr("&")(Jo([t,a])),u=AG(n.focusedSchool)(function(l){return LG("/")(Jo([new T(vge(l.slug)),Rw(l.tab)]))}),i=function(){return e.knownSeoState instanceof T&&n.seoView?LG("/")(Jo([new T(xG({slug:e.knownSeoState.value0.slug})),u])):LG("/")(Jo([new T(PG),new T(In(e.basePath)(iw)(n.ranking)),fge(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var S9="/profile";var pge=ba();var jG=function(e){return function(n){return hr("/")(Jo([new T("/schools"),new T(pge(n)),Rw(e)]))}},C9=S9,F9="/livestreams/upcoming";var dge=function(e){return T9({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:lw.value})};var yw=function(e){return function(n){return dge(new T({tab:e,slug:n}))}};var G9=function(){function e(){}return e.value=new e,e}(),M9=function(){function e(){}return e.value=new e,e}(),bw=function(){function e(){}return e.value=new e,e}(),ww=function(){function e(){}return e.value=new e,e}(),A9=function(){function e(){}return e.value=new e,e}(),L9=function(){function e(){}return e.value=new e,e}(),x9=function(){function e(){}return e.value=new e,e}(),P9=function(e){if(e instanceof G9)return"avatar-xxs";if(e instanceof M9)return"avatar-xs";if(e instanceof bw)return"avatar-sm";if(e instanceof ww)return"";if(e instanceof A9)return"avatar-lg";if(e instanceof L9)return"avatar-xl";if(e instanceof x9)return"avatar-xxl";throw new Error("Failed pattern match at Dashkit.Avatar.Size (line 16, column 13 - line 23, column 34): "+[e.constructor.name])};var j9={show:ba()};var mge=Number.MAX_SAFE_INTEGER;var OG=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if(je)return e.first+(" "+e.last);throw new Error("Failed pattern match at Profile.Types.Name (line 11, column 1 - line 11, column 27): "+[e.constructor.name])};var Mge=De(wb);var O9={show:function(e){return e}};var U9=function(e){return Mge(e.publishScope)(ji.value)};var zp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var WG=te(j9);var Age=te(p8),k9=te($4),Lge=te(O9);var xge="/messages";var Pge=function(e){return function(n){return e+("/"+function(){if(n instanceof zp)return"admission-officer/"+Age(n.value0);if(n instanceof UG)return"school/"+k9(n.value0);if(n instanceof kG)return"student/"+Lge(n.value0);if(n instanceof BG)return"high-school/"+WG(n.value0);if(n instanceof HG)return"service-provider/"+WG(n.value0);if(n instanceof JG)return"parent/"+WG(n.value0);if(n instanceof qG)return"recruiter/"+k9(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},$G=Pge(xge);var jge=rc(Qc(zc)),Nge=ee(ra),B9=_e(oe),H9=ba(),Oge=lt(Ca);var J9=jge("network_connections_invite_school_path")(function(e){return function(n){return Nge(e({school_id:n.schoolId,message:Ia(n.introMessage),sem_user_id:Ia(B9(n.semUserId)(H9)),livestream_id:Ia(B9(n.livestreamId)(H9))}))(lr)}}),q9=function(e){return function(n){return Oge(J9({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var W9=function(e){return function(n){return function(a){return J9({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};$a();function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;Z9+=1;var a=Z9;function t(r){if(r===0)ek(a),e();else{var u=Y9(function(){t(r-1)});VG.set(a,u)}}return t(n),a}Ui.cancel=function(e){var n=VG.get(e);return ek(n),X9(n)};function z_(e,n){return e?e.contains(n):!1}function Kh(e){return e instanceof HTMLElement?e:Fi.findDOMNode(e)}var ok=$u(rk());$a();function XG(e,n){typeof e=="function"?e(n):wr(e)==="object"&&e&&"current"in e&&(e.current=n)}function Nw(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=Array(n);a1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Ui(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Ot(function(){return function(){n()}},[]),[a,n]};$a();var Vge=Xc()?eh:Ot,Jw=Vge;var yk=[Tl,Ks,Rf,Hw],rM=!1,bk=!0;function qw(e){return e===Rf||e===Hw}var wk=function(e,n){var a=Ys(tM),t=Wt(a,2),r=t[0],u=t[1],i=Rk(),l=Wt(i,2),s=l[0],m=l[1];function p(){u(Tl,!0)}return Jw(function(){if(r!==tM&&r!==Hw){var g=yk.indexOf(r),E=yk[g+1],b=n(r);b===rM?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),Ot(function(){return function(){m()}},[]),[p,r]};$a();$a();var Ek=function(e){var n=st(),a=st(e);a.current=e;var t=Zm(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(nM,t),i.removeEventListener(eM,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(nM,t),i.addEventListener(eM,t),n.current=i)}return Ot(function(){return function(){r(n.current)}},[]),[u,r]};function oM(e,n,a,t){var r=t.motionEnter,u=r===void 0?!0:r,i=t.motionAppear,l=i===void 0?!0:i,s=t.motionLeave,m=s===void 0?!0:s,p=t.motionDeadline,g=t.motionLeaveImmediately,E=t.onAppearPrepare,b=t.onEnterPrepare,I=t.onLeavePrepare,L=t.onAppearStart,N=t.onEnterStart,z=t.onLeaveStart,$=t.onAppearActive,ne=t.onEnterActive,ue=t.onLeaveActive,Z=t.onAppearEnd,Y=t.onEnterEnd,X=t.onLeaveEnd,ve=t.onVisibleChanged,xe=Ys(),ke=Wt(xe,2),rn=ke[0],wn=ke[1],dn=Ys(gf),mn=Wt(dn,2),yn=mn[0],Kn=mn[1],zn=Ys(null),Wn=Wt(zn,2),ja=Wn[0],Ma=Wn[1],sa=st(!1),At=st(null);function qe(){return a()}var pa=st(!1);function Qa(it){var J=qe();if(!(it&&!it.deadline&&it.target!==J)){var K=pa.current,O;yn===Yh&&K?O=Z==null?void 0:Z(J,it):yn===Xh&&K?O=Y==null?void 0:Y(J,it):yn===Zh&&K&&(O=X==null?void 0:X(J,it)),yn!==gf&&K&&O!==!1&&(Kn(gf,!0),Ma(null,!0))}}var Tn=Ek(Qa),Dn=Wt(Tn,1),We=Dn[0],ea=nh(function(){var it,J,K;switch(yn){case Yh:return it={},Bu(it,Tl,E),Bu(it,Ks,L),Bu(it,Rf,$),it;case Xh:return J={},Bu(J,Tl,b),Bu(J,Ks,N),Bu(J,Rf,ne),J;case Zh:return K={},Bu(K,Tl,I),Bu(K,Ks,z),Bu(K,Rf,ue),K;default:return{}}},[yn]),va=wk(yn,function(it){if(it===Tl){var J=ea[Tl];return J?J(qe()):rM}if(vn in ea){var K;Ma(((K=ea[vn])===null||K===void 0?void 0:K.call(ea,qe(),null))||null)}return vn===Rf&&(We(qe()),p>0&&(clearTimeout(At.current),At.current=setTimeout(function(){Qa({deadline:!0})},p))),bk}),Aa=Wt(va,2),dt=Aa[0],vn=Aa[1],oa=qw(vn);pa.current=oa,Jw(function(){wn(n);var it=sa.current;if(sa.current=!0,!!e){var J;!it&&n&&l&&(J=Yh),it&&n&&u&&(J=Xh),(it&&!n&&m||!it&&g&&!n&&m)&&(J=Zh),J&&(Kn(J),dt())}},[n]),Ot(function(){(yn===Yh&&!l||yn===Xh&&!u||yn===Zh&&!m)&&Kn(gf)},[l,u,m]),Ot(function(){return function(){sa.current=!1,clearTimeout(At.current)}},[]);var St=st(!1);Ot(function(){rn&&(St.current=!0),rn!==void 0&&yn===gf&&((St.current||rn)&&(ve==null||ve(rn)),St.current=!0)},[rn,yn]);var Da=ja;return ea[Tl]&&vn===Ks&&(Da=Ea({transition:"none"},Da)),[yn,vn,Da,rn!=null?rn:n]}$a();var Qge=function(e){Kp(a,e);var n=Yp(a);function a(){return Vp(this,a),n.apply(this,arguments)}return Qp(a,[{key:"render",value:function(){return this.props.children}}]),a}(D_),Ik=Qge;function Kge(e){var n=e;wr(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=Ci(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,m=s===void 0?!0:s,p=r.forceRender,g=r.children,E=r.motionName,b=r.leavedClassName,I=r.eventProps,L=a(r),N=st(),z=st();function $(){try{return N.current instanceof HTMLElement?N.current:Kh(z.current)}catch{return null}}var ne=oM(L,l,$,r),ue=Wt(ne,4),Z=ue[0],Y=ue[1],X=ue[2],ve=ue[3],xe=st(ve);ve&&(xe.current=!0);var ke=Zm(function(zn){N.current=zn,XG(u,zn)},[u]),rn,wn=Ea(Ea({},I),{},{visible:l});if(!g)rn=null;else if(Z===gf||!a(r))ve?rn=g(Ea({},wn),ke):!m&&xe.current?rn=g(Ea(Ea({},wn),{},{className:b}),ke):p?rn=g(Ea(Ea({},wn),{},{style:{display:"none"}}),ke):rn=null;else{var dn,mn;Y===Tl?mn="prepare":qw(Y)?mn="active":Y===Ks&&(mn="start"),rn=g(Ea(Ea({},wn),{},{className:(0,Tk.default)(aM(E,Z),(dn={},Bu(dn,aM(E,"".concat(Z,"-").concat(mn)),mn),Bu(dn,E,typeof E=="string"),dn)),style:X}),ke)}if(TS(rn)&&Ow(rn)){var yn=rn,Kn=yn.ref;Kn||(rn=Xm(rn,{ref:ke}))}return pt(Ik,{ref:z},rn)});return t.displayName="CSSMotion",t}var Ww=Kge(Bw);$a();var $w="add",zw="keep",Vw="remove",Qw="removed";function Yge(e){var n;return e&&wr(e)==="object"&&"key"in e?n=e:n={key:e},Ea(Ea({},n),{},{key:String(n.key)})}function Kw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Yge)}function Sk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],t=0,r=n.length,u=Kw(e),i=Kw(n);u.forEach(function(m){for(var p=!1,g=t;g1});return s.forEach(function(m){a=a.filter(function(p){var g=p.key,E=p.status;return g!==m||E!==Vw}),a.forEach(function(p){p.key===m&&(p.status=zw)})}),a}var Xge=["component","children","onVisibleChanged","onAllRemoved"],Zge=["status"],eRe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function nRe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ww,a=function(t){Kp(u,t);var r=Yp(u);function u(){var i;Vp(this,u);for(var l=arguments.length,s=new Array(l),m=0;m=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function IRe(e,n,a,t){var r=Ha.clone(e),u={width:n.width,height:n.height};return t.adjustX&&r.left=a.left&&r.left+u.width>a.right&&(u.width-=r.left+u.width-a.right),t.adjustX&&r.left+u.width>a.right&&(r.left=Math.max(a.right-u.width,a.left)),t.adjustY&&r.top=a.top&&r.top+u.height>a.bottom&&(u.height-=r.top+u.height-a.bottom),t.adjustY&&r.top+u.height>a.bottom&&(r.top=Math.max(a.bottom-u.height,a.top)),Ha.mix(r,u)}function hM(e){var n,a,t;if(!Ha.isWindow(e)&&e.nodeType!==9)n=Ha.offset(e),a=Ha.outerWidth(e),t=Ha.outerHeight(e);else{var r=Ha.getWindow(e);n={left:Ha.getWindowScrollLeft(r),top:Ha.getWindowScrollTop(r)},a=Ha.viewportWidth(r),t=Ha.viewportHeight(r)}return n.width=a,n.height=t,n}function $k(e,n){var a=n.charAt(0),t=n.charAt(1),r=e.width,u=e.height,i=e.left,l=e.top;return a==="c"?l+=u/2:a==="b"&&(l+=u),t==="c"?i+=r/2:t==="r"&&(i+=r),{left:i,top:l}}function a1(e,n,a,t,r){var u=$k(n,a[1]),i=$k(e,a[0]),l=[i.left-u.left,i.top-u.top];return{left:Math.round(e.left-l[0]+t[0]-r[0]),top:Math.round(e.top-l[1]+t[1]-r[1])}}function zk(e,n,a){return e.lefta.right}function Vk(e,n,a){return e.topa.bottom}function TRe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function o1(e,n,a){var t=a.target||n,r=hM(t),u=!CRe(t,a.overflow&&a.overflow.alwaysByViewport);return Yk(e,r,a,u)}o1.__getOffsetParent=dM;o1.__getVisibleRectForElement=mM;function Xk(e,n,a){var t,r,u=Ha.getDocument(e),i=u.defaultView||u.parentWindow,l=Ha.getWindowScrollLeft(i),s=Ha.getWindowScrollTop(i),m=Ha.viewportWidth(i),p=Ha.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var g={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+m&&r>=0&&r<=s+p,b=[a.points[0],"cc"];return Yk(e,g,Mk(Mk({},a),{},{points:b}),E)}var jq=$u(Iq());var Tq=function(){if(typeof Map!="undefined")return Map;function e(n,a){var t=-1;return n.some(function(r,u){return r[0]===a?(t=u,!0):!1}),t}return function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var t=e(this.__entries__,a),r=this.__entries__[t];return r&&r[1]},n.prototype.set=function(a,t){var r=e(this.__entries__,a);~r?this.__entries__[r][1]=t:this.__entries__.push([a,t])},n.prototype.delete=function(a){var t=this.__entries__,r=e(t,a);~r&&t.splice(r,1)},n.prototype.has=function(a){return!!~e(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,t){t===void 0&&(t=null);for(var r=0,u=this.__entries__;r0},e.prototype.connect_=function(){!NM||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),nIe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!NM||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(n){var a=n.propertyName,t=a===void 0?"":a,r=eIe.some(function(u){return!!~t.indexOf(u)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Sq=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),Gq=typeof WeakMap!="undefined"?new WeakMap:new Tq,Mq=function(){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=aIe.getInstance(),t=new fIe(n,a,this);Gq.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Mq.prototype[e]=function(){var n;return(n=Gq.get(this))[e].apply(n,arguments)}});var _Ie=function(){return typeof v1.ResizeObserver!="undefined"?v1.ResizeObserver:Mq}(),Aq=_Ie;function Lq(e,n){return e===n?!0:!e||!n?!1:"pageX"in n&&"pageY"in n?e.pageX===n.pageX&&e.pageY===n.pageY:"clientX"in n&&"clientY"in n?e.clientX===n.clientX&&e.clientY===n.clientY:!1}function xq(e,n){e!==document.activeElement&&z_(n,e)&&typeof e.focus=="function"&&e.focus()}function OM(e,n){var a=null,t=null;function r(i){var l=Wt(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var m=s.getBoundingClientRect(),p=m.width,g=m.height,E=Math.floor(p),b=Math.floor(g);(a!==E||t!==b)&&Promise.resolve().then(function(){n({width:E,height:b})}),a=E,t=b}}var u=new Aq(r);return e&&u.observe(e),function(){u.disconnect()}}$a();var Pq=function(e,n){var a=Fa.useRef(!1),t=Fa.useRef(null);function r(){window.clearTimeout(t.current)}function u(i){if(r(),!a.current||i===!0){if(e()===!1)return;a.current=!0,t.current=window.setTimeout(function(){a.current=!1},n)}else t.current=window.setTimeout(function(){a.current=!1,u()},n)}return[u,function(){a.current=!1,r()}]};function Nq(e){return typeof e!="function"?null:e()}function Oq(e){return wr(e)!=="object"||!e?null:e}var pIe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,m=n.monitorBufferTime,p=m===void 0?0:m,g=Fa.useRef({}),E=Fa.useRef(),b=Fa.Children.only(t),I=Fa.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=Pq(function(){var Y=I.current,X=Y.disabled,ve=Y.target,xe=Y.align,ke=Y.onAlign;if(!X&&ve){var rn=E.current,wn,dn=Nq(ve),mn=Oq(ve);g.current.element=dn,g.current.point=mn,g.current.align=xe;var yn=document,Kn=yn.activeElement;return dn&&Fk(dn)?wn=o1(rn,dn,xe):mn&&(wn=Xk(rn,mn,xe)),xq(Kn,rn),ke&&wn&&ke(rn,wn),!0}return!1},p),N=Wt(L,2),z=N[0],$=N[1],ne=Fa.useRef({cancel:function(){}}),ue=Fa.useRef({cancel:function(){}});Fa.useEffect(function(){var Y=Nq(u),X=Oq(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=OM(E.current,z)),(g.current.element!==Y||!Lq(g.current.point,X)||!(0,jq.default)(g.current.align,i))&&(z(),ne.current.element!==Y&&(ne.current.cancel(),ne.current.element=Y,ne.current.cancel=OM(Y,z)))}),Fa.useEffect(function(){r?$():z()},[r]);var Z=Fa.useRef(null);return Fa.useEffect(function(){s?Z.current||(Z.current=Df(window,"resize",z)):Z.current&&(Z.current.remove(),Z.current=null)},[s]),Fa.useEffect(function(){return function(){ne.current.cancel(),ue.current.cancel(),Z.current&&Z.current.remove(),$()}},[]),Fa.useImperativeHandle(a,function(){return{forceAlign:function(){return z(!0)}}}),Fa.isValidElement(b)&&(b=Fa.cloneElement(b,{ref:Nw(b.ref,E)})),b},Uq=Fa.forwardRef(pIe);Uq.displayName="Align";var kq=Uq;var Bq=kq;$a();var dIe=Xc()?eh:Ot,UM=dIe;var Qq=$u(V_());function p1(e,n){this.v=e,this.k=n}function Mo(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Mo=function(i,l,s,m){function p(g,E){Mo(i,g,function(b){return this._invoke(g,E,b)})}l?r?r(i,l,{value:s,enumerable:!m,configurable:!m,writable:!m}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Mo(e,n,a,t)}function pD(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(b,I,L,N){var z=I&&I.prototype instanceof l?I:l,$=Object.create(z.prototype);return Mo($,"_invoke",function(ne,ue,Z){var Y,X,ve,xe=0,ke=Z||[],rn=!1,wn={p:0,n:0,v:e,a:dn,f:dn.bind(e,4),d:function(yn,Kn){return Y=yn,X=0,ve=e,wn.n=Kn,i}};function dn(mn,yn){for(X=mn,ve=yn,n=0;!rn&&xe&&!Kn&&n3?(Kn=ja===yn)&&(ve=zn[(X=zn[4])?5:(X=3,3)],zn[4]=zn[5]=e):zn[0]<=Wn&&((Kn=mn<2&&Wnyn||yn>ja)&&(zn[4]=mn,zn[5]=yn,wn.n=ja,X=0))}if(Kn||mn>1)return i;throw rn=!0,yn}return function(mn,yn,Kn){if(xe>1)throw TypeError("Generator is already running");for(rn&&yn===1&&dn(yn,Kn),X=yn,ve=Kn;(n=X<2?e:ve)||!rn;){Y||(X?X<3?(X>1&&(wn.n=-1),dn(X,ve)):wn.n=ve:wn.v=ve);try{if(xe=2,Y){if(X||(mn="next"),n=Y[mn]){if(!(n=n.call(Y,ve)))throw TypeError("iterator result is not an object");if(!n.done)return n;ve=n.value,X<2&&(X=0)}else X===1&&(n=Y.return)&&n.call(Y),X<2&&(ve=TypeError("The iterator does not provide a '"+mn+"' method"),X=1);Y=e}else if((n=(rn=wn.n<0)?ve:ne.call(ue,wn))!==i)break}catch(zn){Y=e,X=1,ve=zn}finally{xe=1}}return{value:n,done:rn}}}(b,L,N),!0),$}var i={};function l(){}function s(){}function m(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(Mo(n={},t,function(){return this}),n),g=m.prototype=l.prototype=Object.create(p);function E(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,m):(b.__proto__=m,Mo(b,r,"GeneratorFunction")),b.prototype=Object.create(g),b}return s.prototype=m,Mo(g,"constructor",m),Mo(m,"constructor",s),s.displayName="GeneratorFunction",Mo(m,r,"GeneratorFunction"),Mo(g),Mo(g,r,"Generator"),Mo(g,t,function(){return this}),Mo(g,"toString",function(){return"[object Generator]"}),(pD=function(){return{w:u,m:E}})()}function ld(e,n){function a(r,u,i,l){try{var s=e[r](u),m=s.value;return m instanceof p1?n.resolve(m.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(m).then(function(p){s.value=p,i(s)},function(p){return a("throw",p,i,l)})}catch(p){l(p)}}var t;this.next||(Mo(ld.prototype),Mo(ld.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Mo(this,"_invoke",function(r,u,i){function l(){return new n(function(s,m){a(r,i,s,m)})}return t=t?t.then(l,l):l()},!0)}function d1(e,n,a,t,r){return new ld(pD().w(e,n,a,t),r||Promise)}function Hq(e,n,a,t,r){var u=d1(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function Jq(e){var n=Object(e),a=[];for(var t in n)a.unshift(t);return function r(){for(;a.length;)if((t=a.pop())in n)return r.value=t,r.done=!1,r;return r.done=!0,r}}function kM(e){if(e!=null){var n=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(n)return n.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}throw new TypeError(wr(e)+" is not iterable")}function dD(){"use strict";var e=pD(),n=e.m(dD),a=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function t(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===a||(l.displayName||l.name)==="GeneratorFunction")}var r={throw:1,return:2,break:3,continue:3};function u(i){var l,s;return function(m){l||(l={stop:function(){return s(m.a,2)},catch:function(){return m.v},abrupt:function(g,E){return s(m.a,r[g],E)},delegateYield:function(g,E,b){return l.resultName=E,s(m.d,kM(g),b)},finish:function(g){return s(m.f,g)}},s=function(g,E,b){m.p=l.prev,m.n=l.next;try{return g(E,b)}finally{l.next=m.n}}),l.resultName&&(l[l.resultName]=m.v,l.resultName=void 0),l.sent=m.v,l.next=m.n;try{return i.call(this,l)}finally{m.p=l.prev,m.n=l.next}}}return(dD=function(){return{wrap:function(s,m,p,g){return e.w(u(s),m,p,g&&g.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,m){return new p1(s,m)},AsyncIterator:ld,async:function(s,m,p,g,E){return(t(m)?d1:Hq)(u(s),m,p,g,E)},keys:Jq,values:kM}})()}function qq(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(m){return void a(m)}l.done?n(s):Promise.resolve(s).then(t,r)}function Wq(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){qq(u,t,r,i,l,"next",s)}function l(s){qq(u,t,r,i,l,"throw",s)}i(void 0)})}}$a();var $q=["measure","alignPre","align",null,"motion"],zq=function(e,n){var a=Ys(null),t=Wt(a,2),r=t[0],u=t[1],i=st();function l(p){u(p,!0)}function s(){Ui.cancel(i.current)}function m(p){s(),i.current=Ui(function(){l(function(g){switch(r){case"align":return"motion";case"motion":return"stable";default:}return g}),p==null||p()})}return Ot(function(){l("measure")},[e]),Ot(function(){switch(r){case"measure":n();break;default:}r&&(i.current=Ui(Wq(dD().mark(function p(){var g,E;return dD().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:g=$q.indexOf(r),E=$q[g+1],E&&g!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Ot(function(){return function(){s()}},[]),[r,m]};$a();var Vq=function(e){var n=Wl({width:0,height:0}),a=Wt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=nh(function(){var l={};if(e){var s=t.width,m=t.height;e.indexOf("height")!==-1&&m?l.height=m:e.indexOf("minHeight")!==-1&&m&&(l.minHeight=m),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var Kq=Ci(function(e,n){var a=e.visible,t=e.prefixCls,r=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,m=e.destroyPopupOnHide,p=e.forceRender,g=e.align,E=e.point,b=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,N=e.onMouseEnter,z=e.onMouseLeave,$=e.onMouseDown,ne=e.onTouchStart,ue=e.onClick,Z=st(),Y=st(),X=Wl(),ve=Wt(X,2),xe=ve[0],ke=ve[1],rn=Vq(s),wn=Wt(rn,2),dn=wn[0],mn=wn[1];function yn(){s&&mn(b())}var Kn=zq(a,yn),zn=Wt(Kn,2),Wn=zn[0],ja=zn[1],Ma=Wl(0),sa=Wt(Ma,2),At=sa[0],qe=sa[1],pa=st();UM(function(){Wn==="alignPre"&&qe(0)},[Wn]);function Qa(){return E||b}function Tn(){var vn;(vn=Z.current)===null||vn===void 0||vn.forceAlign()}function Dn(vn,oa){var St=I(oa);xe!==St&&ke(St),qe(function(Da){return Da+1}),Wn==="align"&&(L==null||L(vn,oa))}UM(function(){Wn==="align"&&(At<2?Tn():ja(function(){var vn;(vn=pa.current)===null||vn===void 0||vn.call(pa)}))},[At]);var We=Ea({},Yw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var oa=We[vn];We[vn]=function(St,Da){return ja(),oa==null?void 0:oa(St,Da)}});function ea(){return new Promise(function(vn){pa.current=vn})}Ot(function(){!We.motionName&&Wn==="motion"&&ja()},[We.motionName,Wn]),Ls(n,function(){return{forceAlign:Tn,getElement:function(){return Y.current}}});var va=Ea(Ea({},dn),{},{zIndex:l,opacity:Wn==="motion"||Wn==="stable"||!a?void 0:0,pointerEvents:!a&&Wn!=="stable"?"none":void 0},u),Aa=!0;(g==null?void 0:g.points)&&(Wn==="align"||Wn==="stable")&&(Aa=!1);var dt=i;return h_.count(i)>1&&(dt=pt("div",{className:"".concat(t,"-content")},i)),pt(Xp,Xo({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},We,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:m,forceRender:p}),function(vn,oa){var St=vn.className,Da=vn.style,it=(0,Qq.default)(t,r,xe,St);return pt(Bq,{target:Qa(),key:"popup",ref:Z,monitorWindowResize:!0,disabled:Aa,align:g,onAlign:Dn},pt("div",{ref:oa,className:it,onMouseEnter:N,onMouseLeave:z,onMouseDownCapture:$,onTouchStartCapture:ne,onClick:ue,style:Ea(Ea({},Da),va)},dt))})});Kq.displayName="PopupInner";var Yq=Kq;$a();var Xq=$u(V_()),Zq=Ci(function(e,n){var a=e.prefixCls,t=e.visible,r=e.zIndex,u=e.children,i=e.mobile;i=i===void 0?{}:i;var l=i.popupClassName,s=i.popupStyle,m=i.popupMotion,p=m===void 0?{}:m,g=i.popupRender,E=e.onClick,b=st();Ls(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var I=Ea({zIndex:r},s),L=u;return h_.count(u)>1&&(L=pt("div",{className:"".concat(a,"-content")},u)),g&&(L=g(L)),pt(Xp,Xo({visible:t,ref:b,removeOnLeave:!0},p),function(N,z){var $=N.className,ne=N.style,ue=(0,Xq.default)(a,l,$);return pt("div",{ref:z,className:ue,onClick:E,style:Ea(Ea({},ne),I)},L)})});Zq.displayName="MobilePopupInner";var eW=Zq;var mIe=["visible","mobile"],nW=Ci(function(e,n){var a=e.visible,t=e.mobile,r=$_(e,mIe),u=Wl(a),i=Wt(u,2),l=i[0],s=i[1],m=Wl(!1),p=Wt(m,2),g=p[0],E=p[1],b=Ea(Ea({},r),{},{visible:l});Ot(function(){s(a),a&&t&&E(_k())},[a,t]);var I=g?pt(eW,Xo({},b,{mobile:t,ref:n})):pt(Yq,Xo({},b,{ref:n}));return pt("div",null,pt(uM,b),I)});nW.displayName="Popup";var aW=nW;$a();var hIe=ES(null),BM=hIe;function HM(){}function DIe(){return""}function gIe(e){return e?e.ownerDocument:window.document}var RIe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function yIe(e){var n=function(a){Kp(r,a);var t=Yp(r);function r(u){var i;Vp(this,r),i=t.call(this,u),i.popupRef=hy(),i.triggerRef=hy(),i.portalContainer=void 0,i.attachId=void 0,i.clickOutsideHandler=void 0,i.touchOutsideHandler=void 0,i.contextMenuOutsideHandler1=void 0,i.contextMenuOutsideHandler2=void 0,i.mouseDownTimeout=void 0,i.focusTime=void 0,i.preClickTime=void 0,i.preTouchTime=void 0,i.delayTimer=void 0,i.hasPopupMouseDown=void 0,i.onMouseEnter=function(s){var m=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,m,m?null:s)},i.onMouseMove=function(s){i.fireEvents("onMouseMove",s),i.setPoint(s)},i.onMouseLeave=function(s){i.fireEvents("onMouseLeave",s),i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onPopupMouseEnter=function(){i.clearDelayTimer()},i.onPopupMouseLeave=function(s){var m;s.relatedTarget&&!s.relatedTarget.setTimeout&&z_((m=i.popupRef.current)===null||m===void 0?void 0:m.getElement(),s.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(s){i.fireEvents("onFocus",s),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(s){i.fireEvents("onMouseDown",s),i.preClickTime=Date.now()},i.onTouchStart=function(s){i.fireEvents("onTouchStart",s),i.preTouchTime=Date.now()},i.onBlur=function(s){i.fireEvents("onBlur",s),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(s){s.preventDefault(),i.fireEvents("onContextMenu",s),i.setPopupVisible(!0,s)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(s){if(i.fireEvents("onClick",s),i.focusTime){var m;if(i.preClickTime&&i.preTouchTime?m=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?m=i.preClickTime:i.preTouchTime&&(m=i.preTouchTime),Math.abs(m-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&s&&s.preventDefault&&s.preventDefault();var p=!i.state.popupVisible;(i.isClickToHide()&&!p||p&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,s)},i.onPopupMouseDown=function(){if(i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout(function(){i.hasPopupMouseDown=!1},0),i.context){var s;(s=i.context).onPopupMouseDown.apply(s,arguments)}},i.onDocumentClick=function(s){if(!(i.props.mask&&!i.props.maskClosable)){var m=s.target,p=i.getRootDomNode(),g=i.getPopupDomNode();(!z_(p,m)||i.isContextMenuOnly())&&!z_(g,m)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var m=Kh(i.triggerRef.current);if(m)return m}catch{}return Fi.findDOMNode(Iw(i))},i.getPopupClassNameFromAlign=function(s){var m=[],p=i.props,g=p.popupPlacement,E=p.builtinPlacements,b=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return g&&E&&m.push(lk(E,b,s,I)),L&&m.push(L(s)),m.join(" ")},i.getComponent=function(){var s=i.props,m=s.prefixCls,p=s.destroyPopupOnHide,g=s.popupClassName,E=s.onPopupAlign,b=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,N=s.popupStyle,z=s.mask,$=s.maskAnimation,ne=s.maskTransitionName,ue=s.maskMotion,Z=s.zIndex,Y=s.popup,X=s.stretch,ve=s.alignPoint,xe=s.mobile,ke=s.forceRender,rn=s.onPopupClick,wn=i.state,dn=wn.popupVisible,mn=wn.point,yn=i.getPopupAlign(),Kn={};return i.isMouseEnterToShow()&&(Kn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Kn.onMouseLeave=i.onPopupMouseLeave),Kn.onMouseDown=i.onPopupMouseDown,Kn.onTouchStart=i.onPopupMouseDown,pt(aW,Xo({prefixCls:m,destroyPopupOnHide:p,visible:dn,point:ve&&mn,className:g,align:yn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},Kn,{stretch:X,getRootDomNode:i.getRootDomNode,style:N,mask:z,zIndex:Z,transitionName:L,maskAnimation:$,maskTransitionName:ne,maskMotion:ue,ref:i.popupRef,motion:b,mobile:xe,forceRender:ke,onClick:rn}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){Ui.cancel(i.attachId);var m=i.props,p=m.getPopupContainer,g=m.getDocument,E=i.getRootDomNode(),b;p?(E||p.length===0)&&(b=p(E)):b=g(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Ui(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,m=s(i.getRootDomNode()).createElement("div");m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.width="100%",i.portalContainer=m}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var m=i.props.alignPoint;!m||!s||i.setState({point:{pageX:s.pageX,pageY:s.pageY}})},i.handlePortalUpdate=function(){i.state.prevPopupVisible!==i.state.popupVisible&&i.props.afterPopupVisibleChange(i.state.popupVisible)},i.triggerContextValue={onPopupMouseDown:i.onPopupMouseDown};var l;return"popupVisible"in u?l=!!u.popupVisible:l=!!u.defaultPopupVisible,i.state={prevPopupVisible:l,popupVisible:l},RIe.forEach(function(s){i["fire".concat(s)]=function(m){i.fireEvents(s,m)}}),i}return Qp(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var i=this.props,l=this.state;if(l.popupVisible){var s;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(s=i.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Df(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Df(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Df(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Df(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ui.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var i;return((i=this.popupRef.current)===null||i===void 0?void 0:i.getElement())||null}},{key:"getPopupAlign",value:function(){var i=this.props,l=i.popupPlacement,s=i.popupAlign,m=i.builtinPlacements;return l&&m?ik(m,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,m=this.state.popupVisible;this.clearDelayTimer(),m!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:m}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var m=this,p=l*1e3;if(this.clearDelayTimer(),p){var g=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){m.setPopupVisible(i,g),m.clearDelayTimer()},p)}else this.setPopupVisible(i,s)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(i){var l=this.props.children.props,s=this.props;return l[i]&&s[i]?this["fire".concat(i)]:l[i]||s[i]}},{key:"isClickToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var i=this.props.action;return i==="contextMenu"||i.length===1&&i[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("contextMenu")!==-1||s.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("hover")!==-1||s.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("hover")!==-1||s.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("focus")!==-1||s.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("focus")!==-1||s.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var i;(i=this.popupRef.current)===null||i===void 0||i.forceAlign()}}},{key:"fireEvents",value:function(i,l){var s=this.props.children.props[i];s&&s(l);var m=this.props[i];m&&m(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,m=l.forceRender,p=l.alignPoint,g=l.className,E=l.autoDestroy,b=h_.only(s),I={key:"trigger"};this.isContextMenuToShow()?I.onContextMenu=this.onContextMenu:I.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(I.onClick=this.onClick,I.onMouseDown=this.onMouseDown,I.onTouchStart=this.onTouchStart):(I.onClick=this.createTwoChains("onClick"),I.onMouseDown=this.createTwoChains("onMouseDown"),I.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(I.onMouseEnter=this.onMouseEnter,p&&(I.onMouseMove=this.onMouseMove)):I.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?I.onMouseLeave=this.onMouseLeave:I.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(I.onFocus=this.onFocus,I.onBlur=this.onBlur):(I.onFocus=this.createTwoChains("onFocus"),I.onBlur=this.createTwoChains("onBlur"));var L=(0,tW.default)(b&&b.props&&b.props.className,g);L&&(I.className=L);var N=Ea({},I);Ow(b)&&(N.ref=Nw(this.triggerRef,b.ref));var z=Xm(b,N),$;return(i||this.popupRef.current||m)&&($=pt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&($=null),pt(BM.Provider,{value:this.triggerContextValue},z,$)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,m={};return s!==void 0&&l.popupVisible!==s&&(m.popupVisible=s,m.prevPopupVisible=l.popupVisible),m}}]),r}(D_);return n.contextType=BM,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:DIe,getDocument:gIe,onPopupVisibleChange:HM,afterPopupVisibleChange:HM,onPopupAlign:HM,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},n}var rW=yIe(uk);var Sl={adjustX:1,adjustY:1},Cl=[0,0],oW={left:{points:["cr","cl"],overflow:Sl,offset:[-4,0],targetOffset:Cl},right:{points:["cl","cr"],overflow:Sl,offset:[4,0],targetOffset:Cl},top:{points:["bc","tc"],overflow:Sl,offset:[0,-4],targetOffset:Cl},bottom:{points:["tc","bc"],overflow:Sl,offset:[0,4],targetOffset:Cl},topLeft:{points:["bl","tl"],overflow:Sl,offset:[0,-4],targetOffset:Cl},leftTop:{points:["tr","tl"],overflow:Sl,offset:[-4,0],targetOffset:Cl},topRight:{points:["br","tr"],overflow:Sl,offset:[0,-4],targetOffset:Cl},rightTop:{points:["tl","tr"],overflow:Sl,offset:[4,0],targetOffset:Cl},bottomRight:{points:["tr","br"],overflow:Sl,offset:[0,4],targetOffset:Cl},rightBottom:{points:["bl","br"],overflow:Sl,offset:[4,0],targetOffset:Cl},bottomLeft:{points:["tl","bl"],overflow:Sl,offset:[0,4],targetOffset:Cl},leftBottom:{points:["br","bl"],overflow:Sl,offset:[-4,0],targetOffset:Cl}};$a();var uW=$u(V_());function m1(e){var n=e.showArrow,a=e.arrowContent,t=e.children,r=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return pt("div",{className:(0,uW.default)("".concat(r,"-content"),l),style:s},n!==!1&&pt("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),pt("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var bIe=function(n,a){var t=n.overlayClassName,r=n.trigger,u=r===void 0?["hover"]:r,i=n.mouseEnterDelay,l=i===void 0?0:i,s=n.mouseLeaveDelay,m=s===void 0?.1:s,p=n.overlayStyle,g=n.prefixCls,E=g===void 0?"rc-tooltip":g,b=n.children,I=n.onVisibleChange,L=n.afterVisibleChange,N=n.transitionName,z=n.animation,$=n.motion,ne=n.placement,ue=ne===void 0?"right":ne,Z=n.align,Y=Z===void 0?{}:Z,X=n.destroyTooltipOnHide,ve=X===void 0?!1:X,xe=n.defaultVisible,ke=n.getTooltipContainer,rn=n.overlayInnerStyle,wn=n.arrowContent,dn=n.overlay,mn=n.id,yn=n.showArrow,Kn=$_(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),zn=st(null);Ls(a,function(){return zn.current});var Wn=Ea({},Kn);"visible"in n&&(Wn.popupVisible=n.visible);var ja=function(){return pt(m1,{showArrow:yn,arrowContent:wn,key:"content",prefixCls:E,id:mn,overlayInnerStyle:rn},dn)},Ma=!1,sa=!1;if(typeof ve=="boolean")Ma=ve;else if(ve&&wr(ve)==="object"){var At=ve.keepParent;Ma=At===!0,sa=At===!1}return pt(rW,Xo({popupClassName:t,prefixCls:E,popup:ja,action:u,builtinPlacements:oW,popupPlacement:ue,ref:zn,popupAlign:Y,getPopupContainer:ke,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:N,popupAnimation:z,popupMotion:$,defaultPopupVisible:xe,destroyPopupOnHide:Ma,autoDestroy:sa,mouseLeaveDelay:m,popupStyle:p,mouseEnterDelay:l},Wn),b)},iW=Ci(bIe);var lW=iW;var sW=e=>Fa.createElement(lW,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?()=>document.querySelector(e.tooltipContainerSelector)||document.body:void 0}));if(typeof window!="undefined"&&typeof global=="undefined")try{Promise.resolve().then(()=>$u(cW())).then(e=>{let n=e.default,a=document.createElement("style");a.type="text/css",a.appendChild(document.createTextNode(n)),document.head.appendChild(a)})}catch(e){window.Sentry&&window.Sentry.captureException(e)}var IIe=Gi();var vW="click";var h1="top",cd=function(e){var n=IIe(e);return function(){return function(){return n(sW)}}};var fW="right";var _W=e=>()=>e.preventDefault&&e.preventDefault();var JM=function(){return _W};var TIe=La();var qM=ee(Ve),WM=gt(TIe(H({reflectSymbol:function(){return"value"}})(he)(tn))),$M=q(la);var D1=function(e){return Ue("")(qM(WM(Fr(e.target)))(function(n){return $M(n.value)}))},zM=function(e){return Ue("")(qM(WM(Fr(e.target)))(function(n){return $M(n.value)}))},Xs=function(e){return Ue("")(qM(WM(Fr(e.target)))(function(n){return $M(n.value)}))};var pW="/network/connections";var dW=15;var SIe=cd(Qe)()(),CIe=za(ye),FIe=function(){return"You\u2019ve hit the "+(te(an)(dW)+`-connection limit, designed to encourage you to focus on building meaningful connections that lead to impactful opportunities. Remove an existing connection to make space for a new one that aligns with your goals. `)}(),GIe=Io(Qe)("text-decoration-underline")(cr(re)()()("text-dark")(en)({href:pW})("Manage my connections")),mW=function(e){return function(n){return SIe({placement:e,trigger:vW,overlay:CIe("")([Xe(FIe),GIe]),overlayStyle:vt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var hW=ee(Ve),sd=function(e){var n=hW(e.guestPresenter)(function(a){if(a instanceof Ch)return new T(a.value0);if(a instanceof Fh)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return hW(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var MIe=function(){function e(){}return e.value=new e,e}(),AIe=function(){function e(){}return e.value=new e,e}(),VM=function(){function e(){}return e.value=new e,e}(),LIe=function(){function e(){}return e.value=new e,e}(),xIe=function(){function e(){}return e.value=new e,e}(),PIe=function(){function e(){}return e.value=new e,e}(),DW=function(e){if(e instanceof MIe)return"account_settings_page";if(e instanceof AIe)return"preference_survey";if(e instanceof VM)return"livestream_registration";if(e instanceof LIe)return"chancing_wizard_network_step";if(e instanceof xIe)return"main_profile_page";if(e instanceof PIe)return"autopilot_acceptance_page";throw new Error("Failed pattern match at Profile.PublishContext (line 15, column 13 - line 21, column 57): "+[e.constructor.name])};var UIe=Qc(zc),QM=rc(UIe),KM=ee(ra);var kIe=co(),gW=_e(oe);var RW=QM("profile_visibility_path")(function(e){return function(n){return KM(e({visibility:{publish_scope:Lh(n)}}))(lr)}}),yW=function(){return QM("profile_network_settings_path")(function(e){return function(n){return function(a){return KM(e({network_settings:{publish_scope:Lh(a.publishScope),publish_context:DW(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Ia(gW(Rl(a.livestreamConference))(function(t){return{school_name:Ia(gW(sd(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(lr)}(kIe(n))}})},bW=QM("profile_name_path")(function(e){return function(n){return KM(e({name:n}))(lr)}});var BIe=uc(),HIe=no(re),JIe=Yt(re),YM=Kt(re),XM=pl(re),yf=Se(ye),vd=$n(re)()(),ZM=Zr(Nu),qIe=nn(Ke),eA=Yn(ma),X_=Se(Qe),wW=vi()(),WIe=Xv(re),$Ie=gr(Be)(It),EW=eo()(),nA=Yn(li),zIe=bp()(),IW=Se(re),VIe=Py(ye),aA=ky(re),QIe=za(re),KIe=cd(Qe)()(),YIe=Kt(ye),XIe=cr(re)()(),ZIe=rt(re),Z_=q(Rn),TW=qIe(qn),eTe=mw(),mD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),SW=function(){function e(){}return e.value=new e,e}(),CW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hD=function(){function e(){}return e.value=new e,e}(),tA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AW=function(e){return function(n){var a=function(m){return BIe({id:"invite-school-modal",body:m,title:HIe("my-0")(function(){return e.stage instanceof eb?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new bn(hD.value)),size:Jh.value})},t=d8(e.context),r=Fe([JIe("mt-3")("Review your message before you send it"),YM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),XM("mt-4")("Your message"),xp(e.message),yf("d-flex mt-4 justify-content-start")([vd("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(en)({onClick:ZM(function(){return n(new bn(new tA({introMessage:e.message})))(),n(new Me(new mD(EC.value)))()})})("Send"),vd("btn btn-lg btn-outline-primary ml-3 text-nowrap")(en)({onClick:eA(n)(new Me(new mD(Rh.value)))})("No, I need to edit something")])]),u=Fe([yf("text-center")([X_("")(wW("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),WIe("mt-4")("Connection request sent!"),YM("mx-md-4")($Ie(["You\u2019ve successfully demonstrated your interest to ",e.schoolName,". ","This counselor isn\u2019t part of the platform yet but we\u2019ve forwarded your message to them. ","You\u2019ll get an email notification when they respond."])),vd("btn btn-lg btn-outline-secondary mt-4")(en)({onClick:eA(n)(new bn(hD.value))})("Close")])]),i=vd("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(en)({onClick:eA(n)(new bn(hD.value))})("Cancel"),l=function(){var m=RC(e.message)&&function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!hl(e.firstName)&&!hl(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 241, column 15 - line 245, column 88): "+[e.profile.fullName.constructor.name])}(),p=function(){if(e.vineBelowConnectionLimit instanceof T&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof T&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof G)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 234, column 13 - line 237, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Fe([ga(Mt(e.profile.fullName))(Fe([XM("mt-md-4")("Your preferred name"),yf("form-row mx-1")([EW("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:nA(n)(function(g){return Me.create(GW.create(Xs(g)))}),placeholder:"First name"}),EW("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:nA(n)(function(g){return Me.create(MW.create(Xs(g)))}),placeholder:"Last name"})])])),XM("mt-md-4")("Your message"),zIe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:nA(n)(function(g){return Me.create(FW.create(D1(g)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),X_("mt-2")(c8(e.message)),IW("mt-3 mt-md-4 small")("The ideal connection message should include:"),VIe("small")([aA("")("Your name, where you\u2019re from, and a bit about who you are"),aA("")("What you\u2019re interested in studying along with one or two insightful questions"),aA("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),yf("d-flex mt-4 justify-content-start")([mW(h1)(X_("")(vd("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(en)({onClick:ZM(function(){return function(){if(e.profile.fullName instanceof T)return de;if(e.profile.fullName instanceof G)return n(new Me(new CW({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 217, column 23 - line 221, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Me(new mD(wC.value)))()}),disabled:!m||p,style:vt({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=yf("mx-md-7")([X_("border border-success rounded p-4 my-4")(yf("row align-items-center")([X_("col-12 col-md-auto text-center text-md-left")(wW("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),X_("col text-center text-md-left")(QIe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),yf("d-flex flex-nowrap align-items-center")([IW("mr-4")("Publish your profile to join the CollegeVine Network"),KIe({placement:fW,overlay:YIe("")([Xe(` Your profile includes academics, extracurriculars, major interest, demographics and financial aid intent. By agreeing to publish, you will also be adding select preferences survey answers to `),XIe("")(en)({href:C9})("your profile"),Xe(".")]),overlayStyle:vt({width:"15rem"})})(ZIe("cursor-default text-secondary fe fe-info large")(""))]),YM("text-secondary small d-none d-md-block mt-4")("Joining the CollegeVine Network won\u2019t result in spam from colleges you don\u2019t want to hear from."),yf("d-flex mt-4 justify-content-start justify-content-md-center")([vd("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(en)({onClick:ZM(function(){return n(new Me(SW.value))(),n(new Me(new mD(Rh.value)))()})})("Publish profile"),i])]);return X_("t--network-sem-user-modal")(function(){if(e.stage instanceof eb)return a(s);if(e.stage instanceof Rh)return a(l);if(e.stage instanceof wC)return a(r);if(e.stage instanceof EC)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 96, column 5 - line 100, column 38): "+[e.stage.constructor.name])}())}},LW=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof mD)return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,vineBelowConnectionLimit:e.vineBelowConnectionLimit,stage:n.value0.value0});if(n.value0 instanceof SW)return TW(Za(RW(ji.value)))(function(){return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{fullName:e.profile.fullName,publishScope:ji.value}})});if(n.value0 instanceof CW)return TW(Za(bW(n.value0.value0)))(function(){return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{publishScope:e.profile.publishScope,fullName:new T(OG(n.value0.value0))}})});if(n.value0 instanceof FW)return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,message:n.value0.value0});if(n.value0 instanceof GW)return Z_({context:e.context,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,firstName:n.value0.value0});if(n.value0 instanceof MW)return Z_({context:e.context,firstName:e.firstName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,lastName:n.value0.value0});throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 75, column 31 - line 89, column 39): "+[n.value0.constructor.name])}if(n instanceof bn)return Z_(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 74, column 1 - line 74, column 55): "+[e.constructor.name,n.constructor.name])}},nTe=function(e){var n=U9(e);return n?Rh.value:eb.value},xW=function(e){return{firstName:"",lastName:"",message:"",profile:eTe(e.profile),stage:nTe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var g1=De(nr(xt)),aTe=co(),tTe=Se(Qe),rTe=vi()(),rA=za(re),oA=Xt(Qe)()(),oTe=rt(re),uTe=Yc(),iTe=k_(Ke)(),lTe=gn(Le),cTe=$n(ye)()(),sTe=Zr(My),vTe=JM(),fTe=Ta(fr),fd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PW=function(){function e(){}return e.value=new e,e}(),_Te=function(){function e(){}return e.value=new e,e}(),pTe={eq:function(e){return function(n){return e instanceof fd&&n instanceof fd?e.value0.url===n.value0.url:e instanceof DD&&n instanceof DD?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&g1(e.value0.textColorClass)(n.value0.textColorClass):e instanceof uA&&n instanceof uA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof iA&&n instanceof iA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},dTe=qp(pTe),jW=function(){return function(e){var n=aTe(e),a=function(){var r=Ba(n.shape)(PW.value);if(r instanceof PW)return"rounded-circle";if(r instanceof _Te)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 130, column 9 - line 132, column 37): "+[r.constructor.name])}(),t=function(r){return tTe("avatar "+(P9(Ba(n.size)(ww.value))+(" "+Ba(n.className)(""))))(function(){if(r instanceof fd)return rTe("avatar-img img-fluid "+(a+(" "+Ba(n.borderClassName)(""))))({src:r.value0.url,alt:T5(Ba(n.ariaLabel)(en))});if(r instanceof DD)return rA("avatar-title font-weight-bold fw-bold "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+(Ue("")(r.value0.textColorClass)+(" "+Ba(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof uA)return oA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)(en)})(oTe(r.value0.iconClass)(""));if(r instanceof iA)return oA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)(en)})(rA("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 87, column 11 - line 127, column 48): "+[r.constructor.name])}())};return Jp(uTe(Il(n.source))(function(r){return iTe(dTe(n.source)(function(u){return lTe(r.value1(u))}))(function(){return $s(Fe([t(r.value0),function(){return r.value0 instanceof fd?ha(Rl(n.hideAvatar))(function(u){return oA("hq-only-menu-item")({style:vt({marginTop:"-50px",marginLeft:"200px"})})(cTe("btn btn-sm btn-warning mb-4 t--hide-avatar")(en)({onClick:sTe(function(i){return function(){return vTe(i)(),fTe(r.value1)(u)()}})})([rA("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Hide")]))}):ta}()]))})}))}};var mTe=jW();var NW=function(e){return function(n){return mTe({source:function(){if(e.avatarUrl instanceof T)return new fd({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new DD({initials:e.initials,backgroundColorClass:G.value,textColorClass:G.value});throw new Error("Failed pattern match at Sem.Utils (line 16, column 15 - line 24, column 14): "+[e.avatarUrl.constructor.name])}(),size:n})}};var lA=U(oe),hTe=Ye(Lx(kf));var OW=function(e){var n=function(a){return Ue("")(lA(Tu)(Nm(0)(a)))};return Nc(function(){var a=Qo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":Ue("?")(hTe(lA(n)(o_(a)))(lA(n)(J0(a))))}())},UW=function(e){return mh(e.firstName+(" "+e.lastName))};var cA=no(re),DTe=cr(re)()(),gTe=cr(ye)()(),kW=rt(re),RTe=$n(ye)()(),yTe=Mi($v(vl)),bTe=_e(oe),wTe=ee(Ve),sA=Se(re),R1=Se(ye),BW=Se(Qe),ETe=Ip(re),HW=zl()(),ITe=pl(re),TTe=Kt(re),_d=q(Rn),JW=nn(Ke),STe=JW(qn),CTe=wa(Le),FTe=JW(ra),GTe=q(Qn),MTe=ut(Gr(Ca)),qW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$W=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zW=function(){var e=function(a){return function(t){return function(r){var u=cA("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=cA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,DTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(en)({href:$G(new zp(t.semUser.id))})("View Message")],s=UW(t.semUser),m=OW(s),p=cA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),g=[p,gTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(en)({href:$G(new zp(t.semUser.id))})([kW("fe fe-message-square mr-2 large")(""),Xe("Send a message to "+t.semUser.firstName)])],E=function(L){return RTe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(en)({onClick:yTe(r)(bTe(wTe(a.currentUser)(function(N){return N.profile}))(WW.create)),disabled:L.isDisabled})([kW("fe fe-message-square mr-2 large")(""),Xe("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),sA("mt-4 text-secondary small")("Invitation pending")];return R1("t--livestream-details-guest-presenter-sem-user mb-4")([ha(a.currentUser)(function(L){return ga(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(BW("card")(R1("card-body")(function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof rf)return g;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof Bs||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof Bs)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof ks)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof ks||t.semUser.connection instanceof G)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])}())))}),ETe("text-uppercase text-secondary")("Your guest presenter"),R1("row align-items-center mt-4")([BW("col-auto")(NW(HW(t.semUser)({initials:m}))(bw.value)),R1("col")([ITe("mb-1")(s),sA("text-secondary small")(t.semUser.school.name),sA("text-secondary small")(t.semUser.title)]),ha(t.semUser.bio)(function(L){return TTe("mt-4 mb-2 ml-2")(L)})]),ha(t.modal)(function(L){return AW(L.value0)(function(N){return r(gD.create(N))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof gD&&r.value0 instanceof bn){if(r.value0.value0 instanceof hD)return _d({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof tA)return STe(CTe(FTe(W9(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return GTe(new $W({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return _d(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 55 - line 55, column 19): "+[r.value0.value0.constructor.name])}if(t.modal instanceof T&&r instanceof gD&&r.value0 instanceof Me)return MTe(gD.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new qW(u))}})(LW(t.modal.value0.value0)(new Me(r.value0.value0)));if(r instanceof gD&&r.value0 instanceof Me)return _d(t);if(r instanceof WW)return _d({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new qW(xW({schoolName:a.semUser.school.name,context:bC.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof $W)return _d({currentUser:t.currentUser,modal:t.modal,vineBelowConnectionLimit:t.vineBelowConnectionLimit,semUser:{avatarUrl:t.semUser.avatarUrl,bio:t.semUser.bio,firstName:t.semUser.firstName,id:t.semUser.id,lastName:t.semUser.lastName,school:t.semUser.school,title:t.semUser.title,unreadMessageCountFromSemUser:t.semUser.unreadMessageCountFromSemUser,connection:new T({initiator:Bs.value,introMessage:r.value0.introMessage,status:Yl.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 47, column 5 - line 47, column 67): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return js("Livestream Guest Presenter SEM user")(function(a){return{init:_d(HW(a)({modal:G.value})),view:e(a),update:n(a)}})}();var ATe=za(ye),LTe=rt(re),RD=Se(ye),VW=Ip(re),xTe=U(ze),vA=Se(Qe),PTe=_l()(),jTe=no(re),QW=function(e){return function(n){var a=function(i){return ATe("badge badge-light bg-light text-dark mr-3")([LTe("fe fe-tag mr-2")(""),Xe(i.name)])},t=function(i){return function(l){return RD("mb-3")([VW("text-secondary text-uppercase mb-2")(i),l])}},r=RD("mt-4")([ha(fe(n.entity.shortEducation))(function(i){return t("Education")(Xe(i))}),t("Bio")(xp(n.entity.bio)),nF(Xu(n.entity.tags))(t("Specialties")(Fe(xTe(a)(n.entity.tags))))]),u=RD("row")([ha(fe(n.entity.imageUrl))(function(i){return vA("p-0 m-0")(vA("col-auto my-auto")(vA("avatar avatar-md")(PTe("avatar-img rounded-circle")({src:i}))))}),RD("col-auto my-auto")([VW("text-uppercase text-secondary mb-2")("Advisor"),jTe("m-0")(n.entity.name)])]);return RD("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var yD=function(e){return function(n){return function(a){return function(t){if(n instanceof Ch)return zW({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Fh)return QW(e)(n.value0);throw new Error("Failed pattern match at Livestream.GuestPresenter.GuestPresenter (line 16, column 1 - line 16, column 78): "+[e.constructor.name,n.constructor.name,a.constructor.name,t.constructor.name])}}}};var NTe=cr(ye)()(),OTe=rt(re),pd=Se(re),Bi=Se(Qe),Hi=Se(ye),KW=no(re),YW=_l()(),XW=_e(ze),UTe=za(re),ZW=_e(oe),kTe=Kt(ye),e$=Io(re),n$=cr(re)()(),BTe=te(an),bD=U(oe),HTe=Ep(ye)()(),JTe=te(tc),wD=function(e){var n=function(a){return function(t){return NTe("mr-3")(en)({href:t,target:"_blank"})([Xe(a),OTe("fe fe-external-link ml-1")("")])}};return Fe([pd("text-uppercase text-muted small mb-2")("School information"),Bi("card shadow-none")(Hi("card-body")([KW("mb-1")(e.name),pd("text-uppercase small text-secondary")(e.cityState),Hi("mt-3 d-none d-md-block")([n("Stats")(yw(W_.value)(e.slug)),n("Cost")(yw(Vh.value)(e.slug)),n("Map")(yw(W_.value)(e.slug))]),Hi("mt-3 d-md-none")([n("Stats")(jG(W_.value)(e.slug)),n("Cost")(jG(Vh.value)(e.slug))])]))])},qTe=function(e){var n=function(i){return YW("avatar-img rounded-circle")({src:i})},a=hr(" ")(XW(Qo(" ")(e.fullName))(ci(1))),t=UTe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return Ue("")(ZW(i)(function(l){return" '"+l}))},u=function(i){return function(l){return kTe("")([e$("")(i+": "),Xe(l)])}};return Fe([pd("text-uppercase text-muted small mb-2")("Your host"),Hi("row align-items-center mb-4 pr-4")([Bi("col-auto")(Bi("avatar")(In(t)(n)(e.pictureUrl))),Bi("col")(Hi("row align-items-center justify-content-between")([pd("col-12 col-md-auto x-large")(e.fullName),Bi("col-12 col-md-auto")(ha(e.allStreamsUrl)(function(i){return n$("t--host-streams")(en)({href:i})("See all "+(BTe(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Fe(Jo([bD(u("Undergrad College"))(ZW(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),bD(u("Major"))(e.undergrad.major),bD(u("Graduate College"))(e.gradCollege),bD(u("Work Experience"))(e.workExperience),bD(u("My Admissions Story"))(e.admissionsStory)]))])},WTe=function(e){return Fe([pd("text-uppercase text-muted small mb-2")("Description"),Hi("")([Bi("col-6 col-md-4 float-right")(YW("img-fluid rounded")({src:e.imageUrl})),Hi("")(XW(Qo(` `)(e.description))(function(n){return HTe("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},$Te=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+JTe(e.conference.id));return Bi("card mt-3")(Bi("card-body py-3")(Hi("row align-items-center")([Bi("col-12 col-md-auto mb-3 mb-md-0")(pd("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Hi("col-12 col-md mb-3 mb-md-0")([Xe("This livestream was part of the "),e$("")("\u{1F3AA} Student panel college fair"),Xe(". Recordings for all 100+ Q&A panels are available.")]),Bi("col-12 col-md-auto")(n$("btn btn-sm btn-outline-primary px-3")(en)({href:n})("See all recordings"))])))},y1=function(e){var n=function(){if(e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof T||e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof G||e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof T)return"col-12 col-md-6";if(e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof G)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 52, column 16 - line 56, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Fe([ga(e.conference.collegeFair)($Te(e)),Bi("card")(Hi("card-body")([KW("text-center mb-4")("About this livestream"),Hi("row")([Hi(n)([ha(e.conference.school)(function(a){return Bi("d-md-none")(wD(a))}),WTe(e.conference)]),Hi(n)([ha(e.conference.guestPresenter)(function(a){return yD(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ha(e.conference.school)(function(a){return Bi("d-none d-md-block")(wD(a))}),ha(e.conference.presenter)(qTe)])])]))])};var a$=nn(Ke),zTe=a$(qn),VTe=wa(Le),QTe=Nt(Wr),t$=q(Qn),b1=q(Rn),KTe=a$(ra),w1=q(la),r$=Se(re),E1=pl(re),I1=Kv(ye),T1=zv(ye),bf=Ns(ye),Fl=Vv(re),S1=Qv(ye),C1=_e(ze),wf=Ql(re),F1=Ql(Qe),G1=$n(re)()(),M1=Yn(ma),YTe=gi(Ua),XTe=U(ze),ZTe=Ye(vv(vv(sR))),eSe=gi(ui),nSe=gi(bU),aSe=te(tc),tSe=Yt(re),rSe=Se(ye),A1=function(){function e(){}return e.value=new e,e}(),o$=function(){function e(){}return e.value=new e,e}(),ED=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),u$=function(){function e(){}return e.value=new e,e}(),i$=function(){function e(){}return e.value=new e,e}(),l$=function(e){return function(n){return function(a){var t=function(u){return zTe(VTe(QTe(u)(function(i){return t$(i$.value)})))(function(){return b1({ctas:n.ctas,stage:o$.value,error:G.value})})},r=function(u){if(u instanceof yl)return d5({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof bl)return _5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof wl)return p5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof El)return f5({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 224, column 15 - line 232, column 83): "+[u.constructor.name])};if(a instanceof ED)return t(KTe(r(a.value0))(function(){return t$(u$.value)}));if(a instanceof u$)return b1({ctas:n.ctas,error:n.error,stage:A1.value});if(a instanceof i$)return b1({ctas:n.ctas,stage:A1.value,error:new T("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 207, column 24 - line 217, column 92): "+[a.constructor.name])}}},c$=function(e){return b1({stage:A1.value,error:G.value,ctas:e})},oSe=function(){return Yo(qo(Be)([Xl.value,new yt(" "),Zl.value,new yt(", "),nc.value,new yt(":"),xi.value,new yt(" "),ac.value]))}(),s$=function(e){return function(n){if(e.ctas.length===0)return ta;var a=function(L){return L instanceof El?w1(L.value0):G.value},t=function(L){return L instanceof bl?w1(L.value0):G.value},r=function(L){return L instanceof wl?w1(L.value0):G.value},u=function(L){return L instanceof yl?w1(L.value0):G.value},i=function(){if(e.stage instanceof A1)return ta;if(e.stage instanceof o$)return r$("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Opening...");throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 186, column 24 - line 191, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?ta:Fe([E1("")("Referrals"),I1("table table-sm mb-0")([T1("")([bf("")([Fl("")("Title"),Fl("")("Actions")])]),S1("")(C1(L)(function(N){return bf("t--cta t--cta-referral")([wf("pt-3")(N.title),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ED(new El(N)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?ta:Fe([E1("")("General"),I1("table table-sm mb-0")([T1("")([bf("")([Fl("")("Title"),Fl("")("URL"),Fl("")("Link Text"),Fl("")("Actions")])]),S1("")(C1(Tv(YTe(function(N){return N.title}))(L))(function(N){return bf("t--cta t--cta-general")([wf("pt-3")(function(){var z=Pt(N.autoDisplayMinutesFromStart);return z?"\u23F0 ":""}()+N.title),wf("pt-3")(N.url),wf("pt-3")(N.buttonText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ED(new bl(N)))})("Launch CTA"))])}))])])},m=function(L){return L.length===0?ta:Fe([E1("")("Featured Service Providers"),I1("table table-sm mb-0")([T1("")([bf("")([Fl("")("Advisors"),Fl("")("Link Text"),Fl("")("Actions")])]),S1("")(C1(L)(function(N){return bf("t--cta t--cta-featured-sp")([wf("pt-3")(hr(", ")(XTe(function(z){return z.name})(N.providers))),wf("pt-3")(N.linkText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ED(new wl(N)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?ta:Fe([E1("")("Upcoming events"),I1("table table-sm mb-0")([T1("")([bf("")([Fl("")("Livestream"),Fl("")("Date & Time"),Fl("")("Actions")])]),S1("")(C1(Tv(ZTe(eSe(function(N){return N.startTime}))(nSe(function(N){return N.conferenceId})))(L))(function(N){return bf("t--cta t--cta-stream-"+aSe(N.conferenceId))([wf("pt-3")(N.title),wf("pt-3")(oSe(N.startTime)+(" "+A_)),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ED(new yl(N)))})("Launch CTA"))])}))])])},g=Br(a)(e.ctas),E=Br(t)(e.ctas),b=Br(r)(e.ctas),I=Br(u)(e.ctas);return Fe([tSe("")("Calls to action"),rSe("t--ctas position-relative")([ha(e.error)(function(L){return r$("alert alert-danger")(L)}),p(I),s(E),m(b),l(g),i])])}};var v$=rc(Qc(zc)),f$=ee(ra),uSe=UF(he),dd=function(){function e(){}return e.value=new e,e}(),ID=function(){function e(){}return e.value=new e,e}(),TD=function(){function e(){}return e.value=new e,e}(),_$={eq:function(e){return function(n){return e instanceof dd&&n instanceof dd||e instanceof ID&&n instanceof ID||e instanceof TD&&n instanceof TD}}},p$=v$("profile_validate_username_path")(function(e){return function(n){return f$(e({username:n}))(Vc(function(a){return uSe("username validation result")(a)(function(t){return t==="available"?new T(dd.value):t==="taken"?new T(ID.value):t==="invalid"?new T(TD.value):G.value})}))}}),d$=v$("profile_set_username_path")(function(e){return function(n){return f$(e({username:n}))(lr)}});var iSe=De(nr(Ds()(dc(dc(hs)()({reflectSymbol:function(){return"username"}})(xt))()({reflectSymbol:function(){return"result"}})(_$)))),fA=Se(ye),m$=Se(Qe),lSe=Kt(re),cSe=vi()(),SD=Se(re),sSe=eo()(),vSe=Yn(li),h$=$n(re)()(),fSe=Yn(ma),_Se=Mi($v(vl)),_A=nn(Ke)(qn),pSe=er(Rn),pA=wa(Le),dSe=Di(Ca),e0=q(Rn),mSe=U(Ca),hSe=ee(ra),DSe=Fv(Wr),D$=q(Qn),g$=function(){function e(){}return e.value=new e,e}(),R$=function(){function e(){}return e.value=new e,e}(),y$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),b$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),w$=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),E$=function(){function e(){}return e.value=new e,e}(),I$=function(){function e(){}return e.value=new e,e}(),dA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mA=function(){function e(){}return e.value=new e,e}(),T$=function(e){return function(n){var a=e.username!==""&&Mt(e.updating)&&iSe(e.validated)(new T({username:e.username,result:dd.value}));return Fe([fA("row")([m$("col col-md-6")(lSe("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),m$("col-6 d-none d-md-block")(cSe("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),SD("")("Your username:"),fA("input-group")([sSe("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:vSe(n)(function(t){return Me.create(y$.create(Xs(t)))})})]),fA("d-flex mt-3")([h$("btn btn-light mr-3")(en)({onClick:fSe(n)(new bn(mA.value))})("Cancel"),h$("btn btn-primary t--submit-username")(en)({type:"button",disabled:!a,onClick:_Se(n)(function(){return a?new T(new Me(E$.value)):G.value}())})("Save")]),ha(e.validated)(function(t){if(t.result instanceof dd)return ta;if(t.result instanceof ID)return SD("small text-danger")("Sorry, this username is already taken");if(t.result instanceof TD)return SD("small text-danger")("Usernames can only contain letters, numbers, or these symbols: _ - . with no spaces");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 73, column 37 - line 79, column 121): "+[t.result.constructor.name])}),ha(e.updating)(function(t){if(t instanceof g$)return SD("text-success")("Updating your username...");if(t instanceof R$)return SD("small text-danger")("There was an error saving your username. Please try again.");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 80, column 30 - line 84, column 95): "+[t.constructor.name])})])}},S$=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof y$)return _A(pSe(n.value0.value0!=="")(pA(dSe(Qt(100))(new Me(new b$(n.value0.value0))))))(function(){return e0({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof b$){if(n.value0.value0===e.username)return _A(pA(mSe(function(){var a=w$.create(n.value0.value0);return function(t){return Me.create(a(t))}}())(p$(n.value0.value0))))(function(){return e0({username:e.username,validated:G.value,updating:G.value})});if(je)return e0(e)}if(n.value0 instanceof w$)return e0({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof E$)return _A(pA(hSe(DSe(d$(e.username)))(function(a){if(a instanceof Te)return D$(new bn(new dA(e.username)));if(a instanceof Ie)return D$(new Me(I$.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return e0({username:e.username,validated:G.value,updating:new T(g$.value)})});if(n.value0 instanceof I$)return e0({username:e.username,validated:e.validated,updating:new T(R$.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 93, column 31 - line 120, column 48): "+[n.value0.constructor.name])}if(n instanceof bn)return e0(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 92, column 1 - line 92, column 55): "+[e.constructor.name,n.constructor.name])}},C$=function(e){return{username:e,validated:G.value,updating:G.value}};var gSe=co(),RSe=cd(Qe)()(),ySe=za(ye),bSe=rt(re),wSe=function(e){var n=sh(e);return function(){return function(a){return function(t){var r=gSe(a);return RSe({placement:h1,overlay:Fe(n(t)),overlayStyle:Ba(r.overlayStyle)(vt({width:"15rem"}))})(ySe("d-inline-flex align-items-center text-secondary "+r.className)([bSe("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),Xe(r.anchorText)]))}}}},L1=function(e){var n=wSe(e)();return function(a){return n({className:a,anchorText:""})}};var F$=Nn(jn),CD=Pn(F$)(Mn(Gn)),G$=Ln(An),FD=xn(G$),M$=kn(Un),GD=On(M$),ESe=U(oe),md=function(){function e(){}return e.value=new e,e}(),hd=function(){function e(){}return e.value=new e,e}(),Dd=function(){function e(){}return e.value=new e,e}(),gd=function(){function e(){}return e.value=new e,e}(),Rd=function(){function e(){}return e.value=new e,e}(),n0=function(){function e(){}return e.value=new e,e}(),ISe={to:function(e){if(e instanceof Re)return md.value;if(e instanceof ce&&e.value0 instanceof Re)return hd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return Dd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return gd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof Re)return Rd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof ce)return n0.value;throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof md)return new Re(Oe.value);if(e instanceof hd)return new ce(new Re(Oe.value));if(e instanceof Dd)return new ce(new ce(new Re(Oe.value)));if(e instanceof gd)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof Rd)return new ce(new ce(new ce(new ce(new Re(Oe.value)))));if(e instanceof n0)return new ce(new ce(new ce(new ce(new ce(Oe.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},A$=Cn(ISe)(CD(CD(CD(CD(CD(F$)(G$))(FD))(FD))(FD))(FD))(GD(GD(GD(GD(GD(M$))))))(FD);var TSe={eq:function(e){return function(n){return e instanceof md&&n instanceof md||e instanceof hd&&n instanceof hd||e instanceof Dd&&n instanceof Dd||e instanceof gd&&n instanceof gd||e instanceof Rd&&n instanceof Rd||e instanceof n0&&n instanceof n0}}},x1=function(e){if(e instanceof md)return"student";if(e instanceof hd)return"transfer_student";if(e instanceof Dd)return"counselor";if(e instanceof gd)return"iec";if(e instanceof Rd)return"parent";if(e instanceof n0)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},L$=function(){var e=Sn(x1)(A$);return Zn(Ze)({parse:function(n){return n==="unknown"?new T(G.value):ESe(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})}(),x$=function(e){if(e instanceof md)return"Student";if(e instanceof hd)return"Transfer Student";if(e instanceof Dd)return"High School Counselor";if(e instanceof gd)return"Independent Educational Counselor (IEC)";if(e instanceof Rd)return"Parent";if(e instanceof n0)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},P$=function(){return Cv(TSe)(n0.value)(A$)}();function j$(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var SSe=q(_t),CSe=Sh(!1);var P1=function(e){if(Th(CSe))return SSe(de);if(je)return j$;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var hA=U(ur);var DA=ee(tu),FSe=q(Rc),GSe=Uo(Wx);var N$=function(e){return e},O$=function(e){return function(n){return hA(function(a){return a.result})(e({substring:n,position:0}))}};var ns={map:function(e){return function(n){var a=hA(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},a0=function(e){return function(n){return new Ie({pos:n.position,error:e})}},t0={apply:function(e){return function(n){return function(a){return DA(e(a))(function(t){return DA(n(t.suffix))(function(r){return FSe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return ns}};var Zs={bind:function(e){return function(n){return function(a){return DA(e(a))(function(t){return N$(n(t.result))(t.suffix)})}}},Apply0:function(){return t0}};var ev={pure:function(e){return function(n){return new Te({result:e,suffix:n})}},Apply0:function(){return t0}};var MSe={Applicative0:function(){return ev},Bind1:function(){return Zs}},U$={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof tr)return new tr({state:t.result.value0,str:t.suffix});if(t.result instanceof zt)return new zt({result:t.result.value0,suffix:t.suffix});throw new Error("Failed pattern match at StringParser.Parser (line 87, column 5 - line 87, column 68): "+[t.constructor.name])};return function(t){return GSe(function(r){return hA(a)(N$(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return MSe}};var r0={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Ie){if(a.position===t.value0.pos)return n(a);if(je)return new Ie({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return ns}},ASe={empty:a0("No alternative"),Alt0:function(){return r0}},k$={Applicative0:function(){return ev},Plus1:function(){return ASe}};var B$=ia(r0),gA=ee(Zs),RA=q(ev),LSe=U(ns);var xSe=Ro(t0),PSe=Jn(t0);var yA=function(e){return function(n){return B$(e)(a0(n))}},bA=function(e){return function(n){var a=e(n);return a instanceof Ie?new Ie({pos:n.position,error:a.value0.error}):a}},as=function(e){return B$(gA(e)(function(n){return RA(de)}))(RA(de))};var H$=function(e){return function(n){return new ei(e,n)}};var jSe=function(e){return function(n){var a=e(n);if(a instanceof Te){var t=n.position65535;return t?e(n):$$(a.value0)}if(a instanceof G)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})}(),Ef=function(e){return bA(W$(kSe)(function(n){var a=e(n);return a?$$(n):a0("Character "+(z$(n)+" did not satisfy predicate"))}))},Ji=function(e){return yA(Ef(function(n){return n===e}))("Could not match character "+z$(e))};var BSe=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},HSe=Et(),wA=U(ns),JSe=gr(Lm)(It),qSe=U(aS),Ao=nn(Ke)(Zs),mu=lt(ns),nv=q(ev),fi=ia(r0);var yd=Ro(t0),If=ee(Zs),Q$=gr(Hr)(It);var Lr=function(e){return HSe(lb(e))},EA=function(e){return wA(function(){var n=qSe(Tu);return function(a){return JSe(n(a))}}())(J$(Ef(e)))},K$=function(e){return Ao(mu(e))(function(){return Ao(mu(j1(e)))(function(){return nv(de)})})},j1=function(e){return fi(K$(e))(nv(de))},Y$=function(e){return Ao(mu(Ef(e)))(function(){return Ao(mu(j1(Ef(e))))(function(){return nv(de)})})},WSe=Ji(Lr(0));var X$=Ji(` `),Z$=function(e){return e===" "||e===" "},$Se=Ef(Z$),IA=Y$(Z$),zSe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},ts=function(e){return function(n){return function(a){return a>=e&&a<=n}}},VSe=ts(Lr(33))(Lr(126)),QSe=Ef(VSe),TA=function(e){return function(n){return Sc(Tu(n))(e)}},N1=function(e){return ts(Lr(1))(Lr(8))(e)||ts(Lr(14))(Lr(31))(e)||TA("\v\f\x7F")(e)},KSe=function(e){return ts(Lr(33))(Lr(39))(e)||ts(Lr(42))(Lr(91))(e)||ts(Lr(93))(Lr(126))(e)||N1(e)},YSe=function(e){return ts(Lr(33))(Lr(90))(e)||ts(Lr(94))(Lr(126))(e)||N1(e)},XSe=Ef(N1),ZSe=function(e){return TA(Tu(Lr(33)))(e)||ts(Lr(35))(Lr(91))(e)||ts(Lr(93))(Lr(126))(e)||N1(e)};var ez=Ji("\r"),nz=mu(yd(ez)(X$)),bd=function(){var e=K$(yd(nz)(IA)),n=yd(IA)(as(yd(nz)(IA)));return fi(n)(e)}(),az=function(){var e=Ao(mu(Ji("\\")))(function(){return fi(QSe)(fi($Se)(fi(X$)(fi(ez)(fi(XSe)(WSe)))))});return If(e)(function(n){return nv("\\"+Tu(n))})}(),eCe=fi(EA(ZSe))(az),nCe=function(){var e=Ao(mu(Ji('"')))(function(){return If(o0(yd(as(bd))(eCe)))(function(n){return Ao(mu(as(bd)))(function(){return Ao(mu(Ji('"')))(function(){return nv(n)})})})});return wA(function(n){return'"'+(Q$(n)+'"')})(e)}(),tz=BSe("comment","Text.Email.Parser",function(){return Ao(mu(Ji("(")))(function(){return Ao(j1(fi(Y$(KSe))(fi(mu(az))(fi(tz(155))(bd)))))(function(){return Ao(mu(Ji(")")))(function(){return nv(de)})})})}),aCe=tz(152),O1=j1(fi(aCe)(bd)),tCe=Ao(as(O1))(function(){return Ao(mu(Ji("[")))(function(){return If(o0(yd(as(bd))(EA(YSe))))(function(e){return Ao(as(bd))(function(){return Ao(mu(Ji("]")))(function(){return Ao(as(O1))(function(){return nv("["+(Q$(e)+"]"))})})})})})}),rCe=function(){var e=function(n){return zSe(n)||TA("!#$%&'*+/=?^_`{|}~-")(n)};return EA(e)}(),rz=function(){var e=Ao(mu(as(O1)))(function(){return If(fi(rCe)(nCe))(function(a){return Ao(mu(as(O1)))(function(){return nv(a)})})}),n=q$(e)(Ji("."));return wA(Ul(Lm)(It)("."))(n)}(),oCe=fi(rz)(tCe),uCe=rz,SA=If(uCe)(function(e){return If(Ji("@"))(function(){return If(oCe)(function(n){return If(V$)(function(){return nv({localPart:e,domainPart:n})})})})});var lCe=function(e){return O$(SA)(e)},cCe=function(){var e=Bt(ko)(te(Dv()()(gv({reflectSymbol:function(){return"error"}})(Rv({reflectSymbol:function(){return"pos"}})(an))(Gt))));return function(n){return e(lCe(n))}}(),MD=function(e){var n=cCe(e);if(n instanceof Ie)return!1;if(n instanceof Te)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var CA=Io(re),U1=eo()(),sCe=Yn(li),oz=Oy(ye)()(),uz=_e(oe),iz=Mi(Gy(vl)),lz=U(oe),k1=Uy(re)()(),cz=_e(ze),AD=Se(ye),vCe=TG(),FA=te(an),fCe=yR(Be)(at),_Ce=Zv(ye)()(),u0=Se(Qe),sz=$n(re)()(),pCe=Yn(ma),dCe=Zr(Nu),mCe=te(tc),LD=q(Rn),vz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_z=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wd=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(g){return function(E){return function(b){return function(I){return function(L){return Fe([CA("")(g),U1("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:sCe(t)(function(N){return I(Xs(N))})})])}}}}}},u=[CA("")("I'm a..."),oz("form-control")({name:"livestream_public_registration_form[i_am_a]",value:Ue("")(uz(a.persona)(x1)),onChange:iz(t)(function(p){return lz(dz.create)(L$(zM(p)))})})([ga(Mt(a.persona))(k1("")({value:""})("Select one...")),Fe(cz(P$)(function(p){return k1("")({value:x1(p)})(x$(p))}))])],i=AD("d-flex align-items-center")([Xe("Already have an account? "),vCe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:Dw,openInNewTab:!1})]),l=[CA("")("Graduation year"),oz("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:Ue("")(uz(a.gradYear)(FA)),onChange:iz(t)(function(p){return lz(pz.create)(wc(zM(p)))})})([ga(Mt(a.gradYear))(k1("")({value:""})("Select one...")),Fe(cz(n.allowedGradYears)(function(p){return k1("")({value:FA(p)})(FA(p))}))])],s=Ue({path:"",token:""})($b("livestreams_register_path")),m=fCe([MD(a.email),a.firstName!=="",a.lastName!=="",Pt(a.gradYear),Pt(a.persona)]);return Fe([i,_Ce("")({action:s.path,method:"POST"})([u0("row")(u0("col")(r("email")("Email")("Your email")(a.email)(vz.create)({autoFocus:e.autoFocus}))),u0("row mt-3")(u0("col")(r("first_name")("First name")("Your first name")(a.firstName)(fz.create)({autoFocus:!1}))),u0("row mt-3")(u0("col")(r("last_name")("Last name")("Your last name")(a.lastName)(_z.create)({autoFocus:!1}))),AD("row mt-3")([AD("col-6")(l),AD("col-6")(u)]),u0("row mt-3")(AD("col-12")([sz("btn btn-primary w-100 mt-3 t--register")(en)({type:"submit",disabled:!m,onClick:pCe(P1)(de)})("Register"),ha(e.cancelButton)(function(p){return sz("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(en)({type:"button",onClick:dCe(p.click)})(p.text)})])),U1("")({type:"hidden",name:"authenticity_token",value:s.token}),U1("")({type:"hidden",name:"register_for_conference_id",value:mCe(n.conference.id)}),U1("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},Ed=function(e){return function(n){if(n instanceof vz)return LD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof fz)return LD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof _z)return LD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof pz)return LD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof dz)return LD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new T(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 172, column 16 - line 182, column 36): "+[n.constructor.name])}},Id=function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}}();var mz=Se(ye),hCe=L1(re),DCe=cr(re)()(),Td=function(e){return Fe([mz("")([Xe(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),hCe("")(` The only information we may share with colleges when you attend their events includes your name, email, graduation year, and whether you\u2019re a student, parent, or school counselor. `)]),mz("")([Xe(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),DCe("")(Zt("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),Xe(".")])])};var GA={eq:function(e){return function(n){return e===n}}};var av=nn(Ke)(qn),gCe=fu(Le),hz=La(),RCe=Oi(hz(H({reflectSymbol:function(){return"author"}})(hz(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(H({reflectSymbol:function(){return"id"}})(on)(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))))(Le),Sd=wa(Le),B1=q(Qn),xr=q(Rn),MA=uc(),yCe=Kt(ye),AA=za(re),LA=Io(re),bCe=rt(re),i0=Se(ye),Cd=Se(Qe),H1=$n(re)()(),Fd=Yn(ma),xD=Se(re),Dz=Yt(re),gz=_e(ze),wCe=Xt(ye)()(),ECe=za(ye),Rz=ee(Ve),ICe=bp()(),TCe=Yn(li),SCe=Mi($v(vl)),CCe=Yv(ye),FCe=eo()(),GCe=L1(re),MCe=De(nr(xt)),ACe=_e(oe),yz=Ho(Z7(bu(ui))),LCe=yo(GA),bz=U(Ca),xCe=Ye(Lt),PCe=kl(Be)(GA),wz=ut(Gr(Ca)),Ez=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Iz=function(){function e(){}return e.value=new e,e}(),Tz=function(){function e(){}return e.value=new e,e}(),l0=function(){function e(){}return e.value=new e,e}(),J1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),q1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),W1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Sz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Cz=function(){function e(){}return e.value=new e,e}(),xA=function(){function e(){}return e.value=new e,e}(),PA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fz=function(){function e(){}return e.value=new e,e}(),Gz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jA=function(){function e(){}return e.value=new e,e}(),$1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),z1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mz=function(){function e(){}return e.value=new e,e}(),Gd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PD=function(){function e(){}return e.value=new e,e}();var Az=function(e){return av(gCe(function(n){return Me.create(PA.create(L_(n)))})(RCe(e.pusher.dataChannel)("question")))(function(){return av(Sd(B1(new Me(Fz.value))))(function(){return xr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:l0.value})})})},Lz=function(e){if(e.user instanceof G)return new T(new Me(jA.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new Me(Mz.value));if(e.user instanceof T&&e.user.value0.username instanceof T)return G.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 363, column 3 - line 369, column 14): "+[e.user.constructor.name])},jCe=function(){return Yo(qo(Be)([nc.value,new yt(":"),xi.value,new yt(" "),ac.value]))}(),xz=function(e){return function(n){return function(a){var t=function(s){return a(Me.create(s))},r=function(s){return MA({id:"question-modal",onDismiss:t(PD.value),body:Fe([yCe("")([AA("")("By: "),LA("")("@"+s.author.username)]),bCe("")(s.text),Kl(""),i0("row align-items-center mb-3")([Cd("col-4")(H1("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())(en)({onClick:Fd(t)(new z1(Iz.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),xD("col")(function(){return s.isPublic?"This question will no longer be visible to the public, but HQ people will still see it.":"This question will become visible to the audience, even anonymous users."}())]),i0("row align-items-center")([Cd("col-4")(H1("btn w-100 btn-danger")(en)({onClick:Fd(t)(new z1(Tz.value))})("Ban this user")),i0("col")([Xe("This user will not be able to ask any more questions "),LA("")("in this livestream. "),AA("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Fe([H1("btn btn-outline-primary px-4")(en)({onClick:Fd(t)(PD.value)})("Never mind, close this dialog")])})},u=function(s){return MA({id:"questions-registration-form-modal",onDismiss:t(PD.value),title:Dz("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Fe([wd({cancelButton:G.value,autoFocus:!0})(e)(s)(function(m){return t($1.create(m))}),Cd("small mt-3")(Td(e))])})},i=function(s){return MA({id:"questions-username-modal",onDismiss:t(PD.value),title:Dz("")("Please select a user name"),body:T$(s)(function(m){return t(Gd.create(m))}),bodyClass:"t--username-modal"})},l=function(s){var m=function(g){return function(E){return function(b){return Fe([xD("ml-2 badge badge-"+E)(g),ha(b)(function(I){return xD("ml-2 text-secondary")(jCe(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?m("CollegeVine")("success")(s.time):s.isPublic?m("Question")("warning")(G.value):ta};return Fe([Cd("position-relative h-100")(Cd("d-flex flex-column position-absolute-fullsize")(i0("d-flex flex-column flex-grow-1 min-height-0")([i0("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(gz(n.questions)(function(s){return wCe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:Fd(t)(new z1(new Ez(s)))})([ECe("small d-inline-flex align-items-center")([LA("")("@"+s.author.username),l(s),Xe(":")]),AA("ml-1")(s.text)])})),i0("")([ha(Rz(e.user)(function(s){return s.username}))(function(s){return xD("small text-secondary mt-2")("@"+s)}),ICe("form-control t--question-text")({onChange:TCe(t)(function(s){return Sz.create(D1(s))}),onClick:SCe(a)(Lz(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ga(e.isPrivilegedUser)(Cd("form-check my-2")(CCe("form-check-label d-flex align-items-center t--broadcast-checkbox")([FCe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:Fd(t)(Cz.value)}),xD("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Send to all viewers")]))),i0("d-flex justify-content-end align-items-center")([GCe("large mr-2")(` Questions you ask will only be visible to you and the host unless they select it to read to the audience, at which point it will appear with a yellow \u201CQuestion\u201D tag for all viewers to see. `),H1("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(en)({onClick:Fd(t)(xA.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof l0)return ta;if(n.modal instanceof q1)return u(n.modal.value0);if(n.modal instanceof J1)return r(n.modal.value0);if(n.modal instanceof W1)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 140, column 5 - line 144, column 41): "+[n.modal.constructor.name])}()])}}},NCe=function(e){return function(n){return MCe(ACe(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},Pz=function(e){return function(n){return function(a){if(a instanceof bn)return xr(n);if(a instanceof Me){if(a.value0 instanceof Sz){var t=Lz(e);if(t instanceof T)return av(Sd(B1(t.value0)))(function(){return xr(n)});if(t instanceof G)return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 250, column 5 - line 255, column 46): "+[t.constructor.name])}if(a.value0 instanceof Cz)return xr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof xA)return av(Sd(B1(new Me(jA.value))))(function(){return xr(n)});if(a.value0 instanceof PA)return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:yz(function(l){return Vb(function(s){return s.time}(l))})(wo(NCe(e))(lo(a.value0.value0)(wo(function(){var l=LCe(a.value0.value0.id);return function(s){return l(function(m){return m.id}(s))}}())(n.questions))))});if(a.value0 instanceof Fz)return av(Sd(bz(function(l){return Me.create(Gz.create(l))})(ow(e.conference.id))))(function(){return xr(n)});if(a.value0 instanceof Gz){var u=gz(a.value0.value0)(function(l){return l.id});return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:yz(function(l){return Vb(function(s){return s.time}(l))})(xCe(a.value0.value0)(wo(function(l){return PCe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof jA)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(Id)});var i=function(l){if(a.value0 instanceof $1)return xr(n);if(a.value0 instanceof Mz)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(C$(Ue("")(Rz(e.user)(function(m){return m.username}))))});if(a.value0 instanceof Gd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof dA)return av(Sd(B1(new bn(a.value0.value0.value0.value0))))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})});if(a.value0 instanceof Gd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof mA)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value});var s=function(m){if(a.value0 instanceof Gd&&je)return xr(n);if(a.value0 instanceof PD)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value});if(a.value0 instanceof z1){if(e.isPrivilegedUser){if(a.value0.value0 instanceof Ez)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new J1(a.value0.value0.value0)});var p=function(g){var E=function(b){return xr(n)};return a.value0.value0 instanceof Tz&&n.modal instanceof J1?av(Za(g5({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})}):E(!0)};return a.value0.value0 instanceof Iz&&n.modal instanceof J1?av(Za(s5({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})}):p(!0)}if(je)return xr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof Gd&&n.modal instanceof W1?wz(function(m){return Me.create(Gd.create(m))})(function(m){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(m)}})(S$(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof $1&&n.modal instanceof q1?wz(function(l){return Me.create($1.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(l)}})(Ed(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof xA&&e.user instanceof T?av(Sd(bz(function(r){return Me.create(PA.create(r))})(v5({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return xr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var V1,OCe=new Uint8Array(16);function NA(){if(!V1&&(V1=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!V1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V1(OCe)}var jz=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function UCe(e){return typeof e=="string"&&jz.test(e)}var OA=UCe;var Zo=[];for(Q1=0;Q1<256;++Q1)Zo.push((Q1+256).toString(16).substr(1));var Q1;function kCe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(Zo[e[n+0]]+Zo[e[n+1]]+Zo[e[n+2]]+Zo[e[n+3]]+"-"+Zo[e[n+4]]+Zo[e[n+5]]+"-"+Zo[e[n+6]]+Zo[e[n+7]]+"-"+Zo[e[n+8]]+Zo[e[n+9]]+"-"+Zo[e[n+10]]+Zo[e[n+11]]+Zo[e[n+12]]+Zo[e[n+13]]+Zo[e[n+14]]+Zo[e[n+15]]).toLowerCase();if(!OA(a))throw TypeError("Stringified UUID is invalid");return a}var Nz=kCe;function BCe(e,n,a){e=e||{};var t=e.random||(e.rng||NA)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){a=a||0;for(var r=0;r<16;++r)n[a+r]=t[r];return n}return Nz(t)}var UA=BCe;var Oz=UA;var HCe=function(e){return e},kA=function(e){return e};var BA=ee(fr)(Oz)(function(){var e=q(_t);return function(n){return e(HCe(n))}}());var Md=wa(Le),Uz=nn(Ke),JCe=Uz(ra),qCe=Ye(ry),WCe=U(Ca),jD=gn(Le),$Ce=rt(re),zCe=vi()(),kz=Xt(Qe)()(),Bz=lm(ui),VCe=Yr(vr),QCe=Hn(Pu),KCe=te(vN),Hz=te(Hf),YCe=U(ze),rs=Uz(qn),XCe=fu(Le),ZCe=Oi(La()(H({reflectSymbol:function(){return"authorTag"}})(he)(H({reflectSymbol:function(){return"kind"}})(he)(tn))))(Le),K1=U(Bn),Tf=q(Rn),Jz=nt(sp),qz=im(ui),eFe=q(Qn),HA=Ac(ip),nFe=Se(ye),aFe=_e(ze),tFe=$n(ye)()(),rFe=Yn(ma),oFe=za(re),Y1=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),ND=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),Wz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qA=function(e){return Md(JCe(Qt(qCe(e)(10)))(function(){return WCe(JA.create)(jD(si))}))},$z=50,zz=function(e){var n=function(r){return $Ce("text-white fe fe-"+r)("")},a=function(){if(e instanceof Ws)return n("heart");if(e instanceof pf)return n("thumbs-up");if(e instanceof x_)return n("thumbs-down");if(e instanceof df)return n("file-text");if(e instanceof mf)return zCe("")({src:"/img/icons/smile-white.svg",style:vt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 152, column 12 - line 157, column 108): "+[e.constructor.name])}(),t=function(){if(e instanceof Ws)return"#F0747B";if(e instanceof pf)return"#008CFD";if(e instanceof x_)return"#6E84A3";if(e instanceof df)return"#18A668";if(e instanceof mf)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 159, column 23 - line 164, column 34): "+[e.constructor.name])}();return kz("d-flex justify-content-center align-items-center rounded-circle")({style:vt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},Vz=6,Qz=function(){return Vz*1e3}(),Kz=function(e){return function(n){var a=function(t){if(Bz(t.removeAt)(e.currentTime))return ta;var r=Tt(VCe(QCe(cl(dy(t.startDecayAt))))(10)),u=function(){var p=r<=3;if(p)return"linear";var g=r<=7;return g?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=Bz(t.startDecayAt)(e.currentTime),m=Vz+(r-5)/10;return kz("position-absolute mb-4 mt-2")({key:KCe(t.startDecayAt),style:vt({right:Hz(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:Hz(m)+"s",transitionTimingFunction:u})})(zz(t.reaction.kind))};return Fe(YCe(a)(e.reactions))}},Yz=function(e){return rs(XCe(function(n){return new ND(xU(n),G.value)})(ZCe(e.pusher.dataChannel)("reaction")))(function(){return rs(Md(jD(K1(function(n){return Wz.create(kA(n))})(BA))))(function(){return rs(Md(jD(K1(JA.create)(si))))(function(){return Tf({authorTag:"",currentTime:Jz,coolDownUntil:Jz,reactions:[]})})})})},Xz=800,Zz=function(e){return function(n){return function(a){if(a instanceof Y1&&a.value1 instanceof G)return rs(Md(jD(K1(function(){var t=Y1.create(a.value0);return function(r){return t(T.create(r))}}())(si))))(function(){return Tf(n)});if(a instanceof Y1&&a.value1 instanceof T){if(qz(n.coolDownUntil)(a.value1.value0))return rs(Md(eFe(new ND({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return Tf(n)});if(je)return rs(Za(m5(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return rs(qA(Xz))(function(){return Tf({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:Ue(a.value1.value0)(HA(Xz)(a.value1.value0))})})})}if(a instanceof ND&&a.value1 instanceof G)return rs(Md(jD(K1(function(){var t=ND.create(a.value0);return function(r){return t(T.create(r))}}())(si))))(function(){return Tf(n)});if(a instanceof ND&&a.value1 instanceof T)return rs(qA($z))(function(){return rs(qA(Qz))(function(){var t={reaction:a.value0,startDecayAt:Ue(a.value1.value0)(HA($z)(a.value1.value0)),removeAt:Ue(a.value1.value0)(HA(Qz)(a.value1.value0))};return Tf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:r_(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof Wz)return Tf({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof JA)return Tf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:wo(function(t){return qz(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 170, column 22 - line 213, column 8): "+[a.constructor.name])}}},eV=function(e){return function(n){var a=function(t){if(t instanceof Ws)return"love this";if(t instanceof pf)return"helpful";if(t instanceof x_)return"not helpful";if(t instanceof df)return"taking notes";if(t instanceof mf)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 138, column 13 - line 143, column 30): "+[t.constructor.name])};return nFe("d-flex justify-content-end my-2")(aFe([Ws.value,mf.value,pf.value,df.value])(function(t){return tFe("btn bg-light d-flex align-items-center p-0 ml-3")(Zt(a(t)))({onClick:rFe(n)(new Y1(t,G.value)),style:vt({borderRadius:"1em"})})([zz(t),oFe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var nV=nn(Ke),uFe=ee(ra),WA=gn(Le),X1=q(Qn),Z1=Kt(re),eE=te(an),OD=nV(qn),UD=wa(Le),Gl=q(Rn),aV=Nt(Wr),tV=Ro(Ym),rV=U(Ca),iFe=Bo(Rn)(Ku),lFe=ii(Gs),oV=Se(re),cFe=oc(),sFe=Yt(re),uV=$n(re)()(),$A=Yn(ma),iV=Se(Qe),vFe=$n(ye)()(),fFe=rt(re),_Fe=Se(ye),lV=function(){function e(){}return e.value=new e,e}(),cV=function(){function e(){}return e.value=new e,e}(),sV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vV=function(){function e(){}return e.value=new e,e}(),fV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_V=function(){function e(){}return e.value=new e,e}(),pV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dV=function(){function e(){}return e.value=new e,e}(),mV=function(){function e(){}return e.value=new e,e}(),VA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nE=function(){function e(){}return e.value=new e,e}(),hV=nV(ra)(Qt(1e3))(function(){return uFe(WA(si))(function(e){return X1(new VA(e))})}),pFe=function(e){return{header:"Go on-air?",body:Fe([Z1("")("Are you sure you want to go on-air?"),Z1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(eE(e.videoLagSeconds)+` seconds if you confirm. If you're presenting with Zoom, make sure you've gone "live" on Zoom as well. `))]),confirmText:"Confirm, go on-air!",cancelText:"Cancel",confirmMsg:vV.value}},DV=function(e){return function(n){return function(a){return function(t){return OD(UD(hV))(function(){return Gl({confirmation:n.confirmation,network:lV.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},gV=function(e){return function(n){return function(a){if(a instanceof vV)return OD(UD(aV(tV(r5(e.conference.id))(rV(fV.create)(WA(si))))(function(l){return X1(new QA("Error opening the stream. Please try again."))})))(function(){return Gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:cV.value})});if(a instanceof fV)return DV(e)(n)(a.value0)(ao.value);if(a instanceof _V)return OD(UD(aV(tV(o5(e.conference.id))(rV(pV.create)(WA(si))))(function(l){return X1(new QA("Error closing the stream. Please try again."))})))(function(){return Gl(n)});if(a instanceof pV)return DV(e)(n)(a.value0)(Mr.value);if(a instanceof zA)return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof dV)return OD(iFe(n.confirmation)(function(l){return UD(X1(l.confirmMsg))}))(function(){return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof mV)return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof QA)return Gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new sV(a.value0)});var t=function(l){if(a instanceof VA||a instanceof nE)return Gl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 181, column 1 - line 181, column 76): "+[a.constructor.name])};if(a instanceof VA){if(n.transition instanceof T){var r=lFe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Eo(r)|0,i=u>0;return i?OD(UD(hV))(function(){return Gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):Gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},RV=function(e){return Gl({streamStatus:e.streamStatus,transition:G.value,network:lV.value,confirmation:G.value})},dFe=function(){return{header:"End the stream?",body:Fe([Z1("")("Are you sure you want to end the stream?"),Z1("mb-0 font-weight-bold fw-bold")("You won't be able to restart it again!")]),confirmText:"Yes, end it",cancelText:"No, keep streaming",confirmMsg:_V.value}}(),yV=function(e){return function(n){return function(a){var t=function(){return n.network instanceof cV?oV("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):ta}(),r=function(m){return cFe({id:"stream-controls-confirmation-modal",header:sFe("my-0")(m.header),bodyClass:"p-5",body:m.body,footerClass:"p-4",footer:Fe([uV("btn btn-primary px-4")(en)({onClick:$A(a)(dV.value)})(m.confirmText),uV("btn btn-outline-primary px-4")(en)({onClick:$A(a)(mV.value)})(m.cancelText)])})},u=function(m){return function(p){return function(g){return function(E){return function(b){return iV("col-auto pr-0")(vFe("btn btn-"+(m+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(en)({onClick:$A(a)(b)})([fFe("fe mr-2 fe-"+p)(""),Xe(g)]))}}}}},i=function(){if(n.streamStatus instanceof Ou)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new zA(pFe(e)));var m=function(p){if(n.streamStatus instanceof ao)return Fe([u("lg")("radio")("ON AIR")("success")(nE.value),u("sm")("x-circle")("End stream")("outline-danger")(new zA(dFe))]);if(n.streamStatus instanceof Mr)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(nE.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof ao&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(nE.value):m(!0)}(),l=function(m){return oV("alert small m-0 flex-grow-1 alert-"+m)},s=function(){if(n.network instanceof sV)return l("danger")(n.network.value0);if(n.streamStatus instanceof Ou)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var m=function(p){if(n.streamStatus instanceof ao)return l("light")(` We're live. The audience should see your video with a `+(eE(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var g=function(E){if(n.streamStatus instanceof Mr)return l("light")("The stream has ended. The audience does not see any video right now.");throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof Mr&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(eE(n.transition.value0.secondsLeft)+" seconds.")):g(!0)};return n.streamStatus instanceof ao&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(eE(n.transition.value0.secondsLeft)+" seconds...")):m(!0)}();return _Fe("position-relative row align-items-center t--stream-controls")([i,iV("col")(s),t,ha(n.confirmation)(r)])}}};var mFe=Ac(Nv),bV=ii(Nv),wV=fO(),hFe=uc(),DFe=Yt(re),gFe=Se(re),EV=Kt(re),RFe=$n(re)()(),yFe=Yn(ma),IV=wa(Le),TV=nn(Ke),SV=U(Ca),FV=gn(Le),GV=TV(qn),bFe=uu(Be)(ct),KA=q(Rn),YA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XA=function(){function e(){}return e.value=new e,e}(),wFe=[30,15,5,0],MV=function(e){return Ue(e.conference.scheduledStartTime)(mFe(Tt(e.conference.duration))(e.conference.scheduledStartTime))},AV=function(e){return function(n){return function(a){if(!n.modal)return ta;if(n.now instanceof G)return ta;if(n.now instanceof T){var t=MV(e),r=bV(t)(n.now.value0),u=function(){if(r<1)return" ended "+wV({from:t,to:n.now.value0,format:_b("ago")});if(je)return" ends "+wV({from:n.now.value0,to:t,format:_b("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 69, column 7 - line 71, column 105): "+[])}();return hFe({id:"stream-end-warning-modal",onDismiss:a(XA.value),body:Fe([DFe("mb-0")("Host-only warning"),gFe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),EV("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),EV("")(` You have `+(Pi(e.conference.tailTime)("extra minute")("extra minutes")+` after scheduled stream end, in case you absolutely cannot wrap up before then. After that the video streaming will be terminated. `)),RFe("btn btn-primary px-4")(en)({onClick:yFe(a)(XA.value)})("Got it")])})}throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 44, column 1 - line 44, column 71): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},EFe=IV(TV(ra)(Qt(60100))(function(){return SV(YA.create)(FV(vf))})),LV=function(e){return function(n){return function(a){if(a instanceof YA)return GV(EFe)(function(){var t=bV(MV(e))(a.value0),r=bFe(Eo(t))(wFe);return KA({now:new T(a.value0),modal:n.modal||r})});if(a instanceof XA)return KA({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 74, column 22 - line 85, column 33): "+[a.constructor.name])}}},xV=function(){return GV(IV(SV(YA.create)(FV(vf))))(function(){return KA({modal:!1,now:G.value})})}();var PV=nn(Ke),IFe=PV(ra),jV=q(Qn),TFe=PV(qn),SFe=wa(Le),CFe=Nt(Wr),aE=q(Rn),FFe=De(Mh),NV=qo(Be),ZA=Se(ye),tE=rt(re),GFe=$n(re)()(),OV=Yn(ma),MFe=cr(re)()(),AFe=$n(Qe)()(),LFe=oc(),UV=Se(Qe),xFe=Io(re),PFe=Pc(re)()(),jFe=za(re),kV=function(){function e(){}return e.value=new e,e}(),BV=function(){function e(){}return e.value=new e,e}(),eL=function(){function e(){}return e.value=new e,e}(),HV=function(){function e(){}return e.value=new e,e}(),JV=function(){function e(){}return e.value=new e,e}(),qV=function(){function e(){}return e.value=new e,e}(),WV=function(){function e(){}return e.value=new e,e}(),NFe=function(){function e(){}return e.value=new e,e}(),$V=function(e){return function(n){return function(a){var t=IFe(tw({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return jV(new Me(qV.value))});if(a instanceof JV)return TFe(SFe(CFe(t)(function(r){return jV(new Me(WV.value))})))(function(){return aE({cta:n.cta,stage:BV.value})});if(a instanceof qV)return aE({cta:n.cta,stage:HV.value});if(a instanceof WV)return aE({cta:n.cta,stage:eL.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 136, column 24 - line 146, column 44): "+[a.constructor.name])}}},zV=function(e){return function(n){return FFe(e.cta.conferenceId)(n.conferenceId)}},VV=function(e){return aE({cta:e,stage:kV.value})},OFe=function(){return Yo(NV([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),xi.value,new yt(" "),ac.value]))}(),UFe=function(){return Yo(NV([ec.value]))}(),QV=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof eL?ZA("text-danger small mt-2")([tE("fe fe-x-circle mr-2")(""),Xe("Something went wrong. Please try again.")]):ta}(),r=function(m){return a(Me.create(m))},u=function(){if(e.user instanceof T)return GFe("btn btn-primary px-4 t--register-one-click")(Zt("Register for this livestream"))({onClick:OV(r)(JV.value)})("Register (one-click)");if(e.user instanceof G)return MFe("btn btn-primary px-4 t--register-new-tab")(Zt("Register for this livestream"))({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 87, column 22 - line 97, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof kV||n.stage instanceof eL)return u;if(n.stage instanceof BV)return ZA("text-secondary")([tE("fe fe-refresh-cw mr-2")(""),Xe("Hold on tight...")]);if(n.stage instanceof HV)return ZA("text-success")([tE("fe fe-check-circle mr-2")(""),Xe("You\u2019ve registered \u2013\xA0see you "+(UFe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 71, column 36 - line 85, column 10): "+[n.stage.constructor.name])}(),l=function(m){return a(bn.create(m))},s=AFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:OV(l)(NFe.value)})(tE("fe fe-x")(""));return LFe({id:"livestream-event-cta-modal",body:Fe([UV("row justify-content-end mt-n3")(s),xFe("")("Join us for our upcoming livestream:"),PFe("mt-3")({id:Ni})(n.cta.title),jFe("small")(OFe(n.cta.startTime)+(" "+A_)),UV("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:Hh.value})}}};var kFe=oc(),rE=Se(ye),BFe=By(re)()(),oE=Se(Qe),HFe=$n(Qe)()(),KV=Yn(ma),JFe=rt(re),qFe=_e(ze),WFe=_l()(),$Fe=no(re),zFe=Kt(re),VFe=cr(re)()(),QFe=nn(Ke),KFe=QFe(qn),YFe=wa(Le),XFe=gn(Le),ZFe=Vs(Sr)(),eGe=te(an),YV=q(Rn),nGe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XV=function(){function e(){}return e.value=new e,e}(),ZV=function(e){return function(n){var a=function(){var i=Or(e.cta.providers);return i===1?hf.value:i===2?hf.value:Jh.value}(),t=function(i){return n(Me.create(i))},r=function(i){return n(bn.create(i))},u=function(){var i=Or(e.cta.providers);return i===1?"col-12":i===2?"col-12 col-md-6 mb-3 mb-md-0":"col-12 col-md-4 mb-3 mb-md-0"}();return kFe({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Fe([rE("row no-gutters g-0 mb-4")([rE("col text-center")([BFe("mb-2")({id:Ni})("The admissions process is hard - advisors are here to help!"),Xe("Schedule a free consultation to get your questions answered")]),oE("col-auto text-right")(HFe("btn btn-link p-0 m-0 text-white")(Zt("Close"))({onClick:KV(r)(XV.value)})(JFe("fe fe-x")("")))]),rE("row text-center")(qFe(e.cta.providers)(function(i){return rE(u)([oE("row mb-3")(oE("col-auto mx-auto")(oE("avatar avatar-xl")(WFe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),$Fe("mb-2")(i.name),zFe("mb-3")(i.location),VFe("btn btn-primary btn-sm px-3 py-1")(en)({target:"_blank",href:i.linkUrl,onClick:KV(t)(new nGe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},eQ=function(e){return function(n){return KFe(YFe(XFe(function(){return ZFe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:eGe(e.cta.id),livestream_cta_url:n.value0})(),new bn(XV.value)})))(function(){return YV(e)})}},nQ=function(e){return function(n){return e.cta.id===n.id}},aQ=function(e){return YV({cta:e})};var aGe=cr(re)()(),tQ=Yn(ma),tGe=$n(Qe)()(),rGe=rt(re),oGe=oc(),rQ=Se(Qe),uGe=Pc(re)()(),iGe=nn(Ke),lGe=iGe(qn),cGe=wa(Le),sGe=gn(Le),vGe=Vs(Sr)(),fGe=te(an),oQ=q(Rn),_Ge=function(){function e(){}return e.value=new e,e}(),uQ=function(){function e(){}return e.value=new e,e}(),iQ=function(e){return function(n){var a=function(i){return n(Me.create(i))},t=aGe("btn btn-primary px-4 t--register-new-tab")(en)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:tQ(a)(_Ge.value)})(e.cta.buttonText),r=function(i){return n(bn.create(i))},u=tGe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:tQ(r)(uQ.value)})(rGe("fe fe-x")(""));return oGe({id:"general-cta-modal",body:Fe([rQ("row justify-content-end mt-n3")(u),uGe("mt-3")({id:Ni})(e.cta.title),rQ("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:Hh.value})}},lQ=function(e){return function(n){return lGe(cGe(sGe(function(){return vGe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:fGe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new bn(uQ.value)})))(function(){return oQ(e)})}},cQ=function(e){return function(n){return e.cta.id===n.id}},sQ=function(e){return oQ({cta:e})};var nL=nn(Ke),_i=nL(Ve),pi=Jr(uo),Ad=q(la),vQ=rr(Xr(at)),kD=ia(oo),tv=q(Rn),pGe=nL(qn),dGe=wa(Le),mGe=nL(ra),hGe=q(Qn),aL=Se(ye),DGe=Yv(re),gGe=eo()(),RGe=Yn(li),yGe=$n(Qe)()(),fQ=Yn(ma),bGe=rt(re),wGe=oc(),tL=Se(Qe),EGe=Pc(re)()(),IGe=Kt(re),TGe=$n(re)()(),_Q=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gQ=function(){function e(){}return e.value=new e,e}(),RQ=function(){function e(){}return e.value=new e,e}(),yQ=function(e){return function(n){return e.cta.id===n.id}},bQ=function(e){return function(n){var a=_i(pi(n.cta.requireReferredUserLastName))(function(){return _i(pi(n.referredUserLastName===""))(function(){return Ad("Please enter the other person\u2019s last name")})}),t=_i(pi(n.cta.requireReferredUserFirstName))(function(){return _i(pi(n.referredUserFirstName===""))(function(){return Ad("Please enter the other person\u2019s first name")})}),r=_i(pi(vQ(MD)(n.referredUserEmail)))(function(){return Ad("Please enter a valid email address")}),u=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserLastName))(function(){return _i(pi(n.anonymousUserLastName===""))(function(){return Ad("Please enter your last name")})})}),i=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserFirstName))(function(){return _i(pi(n.anonymousUserFirstName===""))(function(){return Ad("Please enter your first name")})})}),l=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserEmail))(function(){return _i(pi(vQ(MD)(n.anonymousUserEmail)))(function(){return Ad("Please enter a valid email address")})})});return kD(i)(kD(u)(kD(l)(kD(t)(kD(a)(r)))))}},wQ=function(e){return function(n){return function(a){if(a instanceof _Q)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserFirstName:a.value0});if(a instanceof pQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserLastName:a.value0});if(a instanceof dQ)return tv({anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserEmail:a.value0});if(a instanceof mQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserFirstName:a.value0});if(a instanceof hQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,validationActive:n.validationActive,referredUserLastName:a.value0});if(a instanceof DQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserEmail:a.value0});if(a instanceof gQ){var t=Mt(bQ(e)(n));return t?pGe(dGe(mGe(u5({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return hGe(new bn(RQ.value))})))(function(){return tv(n)}):tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:!0})}throw new Error("Failed pattern match at Livestream.Ctas.Display.Referral (line 142, column 24 - line 171, column 45): "+[a.constructor.name])}}},EQ=function(e){return function(n){return function(a){var t=bQ(e)(n),r=function(E){return function(b){return function(I){return function(L){return function(N){return aL(E)([DGe("mb-2")(I),gGe("form-control "+b)({type:"text",value:L,onChange:RGe(a)(function(z){return Me.create(N(Xs(z)))})})])}}}}},u=ga(Mt(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(dQ.create)),i=ga(Mt(e.user))(Fe([ga(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(_Q.create)),ga(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(pQ.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(DQ.create),s=Fe([ga(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(mQ.create)),ga(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(hQ.create))]),m=function(E){return a(Me.create(E))},p=function(E){return a(bn.create(E))},g=yGe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(Zt("Close"))({onClick:fQ(p)(RQ.value)})(bGe("fe fe-x")(""));return wGe({id:"referral-cta-modal",body:Fe([tL("row justify-content-end mt-n3")(g),EGe("mt-3")({id:Ni})(n.cta.title),ha(n.cta.description)(IGe("")),aL("row")([i,u,s,l]),aL("row")([tL("col-auto my-auto")(TGe("btn btn-primary t--save")(en)({onClick:fQ(m)(gQ.value)})("Save")),tL("col my-auto text-danger")(ga(n.validationActive)(ha(t)(Xe)))])]),bodyClass:"t--cta-active",size:hf.value})}}},IQ=function(e){return tv({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var SGe=wa(Le),CGe=q(Qn),Sf=ut(Gr(Ca)),uE=nn(Ke)(qn),BD=q(Rn),HD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FGe=function(){function e(){}return e.value=new e,e}(),TQ=function(e){return function(n){return function(a){var t=function(r){return a(Me.create(r))};if(n instanceof HD)return QV(e)(n.value0)(function(r){return t(iE.create(r))});if(n instanceof JD)return ZV(n.value0)(function(r){return t(lE.create(r))});if(n instanceof qD)return iQ(n.value0)(function(r){return t(cE.create(r))});if(n instanceof WD)return EQ(e)(n.value0)(function(r){return t(sE.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},SQ=function(e){return function(n){return function(a){var t=SGe(CGe(new bn(FGe.value)));if(n instanceof HD&&a instanceof iE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(iE.create(r))})(HD.create)($V(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return BD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 73, column 5 - line 78, column 19): "+[a.value0.constructor.name])}if(n instanceof JD&&a instanceof lE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(lE.create(r))})(JD.create)(eQ(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return BD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 81, column 5 - line 87, column 19): "+[a.value0.constructor.name])}if(n instanceof qD&&a instanceof cE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(cE.create(r))})(qD.create)(lQ(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return BD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 90, column 5 - line 95, column 19): "+[a.value0.constructor.name])}if(n instanceof WD&&a instanceof sE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(sE.create(r))})(WD.create)(wQ(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return BD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return BD(n)}}},CQ=function(e){return function(n){return e instanceof HD&&n instanceof yl?zV(e.value0)(n.value0):e instanceof qD&&n instanceof bl?cQ(e.value0)(n.value0):e instanceof JD&&n instanceof wl?nQ(e.value0)(n.value0):e instanceof WD&&n instanceof El?yQ(e.value0)(n.value0):!1}},FQ=function(e){if(e instanceof yl)return Sf(function(n){return Me.create(iE.create(n))})(HD.create)(VV(e.value0));if(e instanceof wl)return Sf(function(n){return Me.create(lE.create(n))})(JD.create)(aQ(e.value0));if(e instanceof bl)return Sf(function(n){return Me.create(cE.create(n))})(qD.create)(sQ(e.value0));if(e instanceof El)return Sf(function(n){return Me.create(sE.create(n))})(WD.create)(IQ(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var GQ=Yt(re),vE=Se(ye),GGe=Io(re),MGe=Pc(re)()(),MQ=Bl(Iv),AGe=Yv(ye),LGe=eo()(),rL=uu(Be)(ct),oL=Yn(ma),AQ=$n(re)()(),xGe=$p(Qe),PGe=gn(Le),jGe=zs(Sr),NGe=ai(),OGe=te(an),c0=q(Rn),UGe=Cv(ct),s0=nn(Ke)(qn),kGe=Nt(Wr),uL=q(Qn),BGe=Bo(Qn)(Be),HGe=er(Qn),LQ=wa(Le),JGe=ut(Gr(Ca)),Ld=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lL=function(){function e(){}return e.value=new e,e}(),xQ=function(){function e(){}return e.value=new e,e}(),cL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PQ=function(e){return function(n){return function(a){var t=Fe([GQ("text-center")("The host just asked a poll question!"),GQ("text-center")("To participate in live polls, please introduce yourself:"),wd({cancelButton:new T({text:"Not now",click:a(new Ld({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(cL.create(i))}),vE("small mt-3")([Td(e),vE("mt-2")([Xe("After submitting, you\u2019ll be able to answer all "),GGe("")("future"),Xe(" poll questions in this stream!")])])]),r=Fe([MGe("font-weight-bold fw-bold")({id:Ni})(n.poll.question),vE("d-flex flex-column ml-4")(MQ(function(i){return function(l){return AGe("form-check-label mb-2")([LGe("form-check-input mt-2 t--option")({checked:rL(i)(n.selected),onChange:oL(a)(new iL(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Xe(l)])}})(n.poll.options)),vE("d-flex justify-content-start mt-6")([AQ("btn btn-primary px-4 mr-3 t--submit")(en)({onClick:oL(a)(lL.value),disabled:Xu(n.selected)})("Submit answer"),AQ("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(en)({onClick:oL(a)(xQ.value)})("Do it later")])]),u=function(){if(e.user instanceof T)return"t--poll-active";if(e.user instanceof G)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 18 - line 57, column 45): "+[e.user.constructor.name])}();return xGe(u)({id:"livestream-poll-display-modal"})(function(){if(e.user instanceof T)return r;if(e.user instanceof G)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])}())}}},jQ=function(e){return function(n){return function(a){var t=function(r){return PGe(jGe("Livestream: Poll Response")(Fs(_f(e.conference))(NGe({livestream_poll_id:OGe(n.poll.id),livestream_poll_question:n.poll.question,livestream_poll_skipped:function(){return r.skipped?"true":""}(),livestream_poll_multiselect:function(){return n.poll.multiSelect?"true":"false"}(),livestream_poll_response:r.option}))))};if(a instanceof Ld)return c0(n);if(a instanceof iL&&n.poll.multiSelect)return c0({poll:n.poll,registration:n.registration,selected:function(){var r=rL(a.value0)(n.selected);return r?UGe(a.value0)(n.selected):lo(a.value0)(n.selected)}()});if(a instanceof iL)return c0({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof lL&&Xu(n.selected))return c0(n);if(a instanceof lL)return s0(Za(kGe(KF(n.poll)(n.selected))(function(r){return Li(Dl)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return uL(de)})})))(function(){return s0(Za(BGe(MQ(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return HGe(rL(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return s0(LQ(uL(new Ld({keepShowingPolls:!0}))))(function(){return c0(n)})})});if(a instanceof xQ)return s0(Za(KF(n.poll)([])))(function(){return s0(Za(t({skipped:!0,option:""})))(function(){return s0(LQ(uL(new Ld({keepShowingPolls:!0}))))(function(){return c0(n)})})});if(a instanceof cL)return JGe(cL.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(Ed(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 109, column 24 - line 156, column 55): "+[a.constructor.name])}}},NQ=function(e){return s0(Za(i5(e)))(function(){return c0({poll:e,selected:[],registration:Id})})};var OQ=nn(Ke),qGe=OQ(ra),WGe=ee(ra),UQ=gn(Le),$Ge=Bo(Qn)(Ku),zGe=zs(Sr),kQ=ai(),VGe=te(j0),QGe=te(tc),fE=te(an),Ml=q(Rn),BQ=Gr(Ca),HQ=ut(BQ),JQ=ee(qn),qQ=Bt(BQ),Cf=OQ(qn),KGe=De(ct),Ff=q(la),$D=Tp(Le),zD=U(oe),YGe=U(zu),VD=ws(Be),sL=La(),WQ=Oi(sL(H({reflectSymbol:function(){return"poll_id"}})(on)(tn)))(Le),XGe=fu(Le),ZGe=De(nr(Mh)),eMe=Oi(sL(H({reflectSymbol:function(){return"conference_id"}})(on)(tn)))(Le),vL=De(nr(ct)),fL=Oi(sL(H({reflectSymbol:function(){return"id"}})(on)(tn)))(Le),QD=function(){function e(){}return e.value=new e,e}(),xd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Pd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_E=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_L=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$Q=function(e){return function(n){return function(a){if(n.stage instanceof QD)return ta;if(n.stage instanceof xd)return PQ(e)(n.stage.value0)(function(t){return a(Pd.create(t))});if(n.stage instanceof KD)return TQ(e)(n.stage.value0)(function(t){return a(_E.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},nMe=function(e){return function(n){return e instanceof KD?CQ(e.value0)(n):!1}},aMe=function(){return function(e){return function(n){return function(a){return qGe(Qt(100))(function(){return WGe(UQ(gb(Ni)))(function(t){return $Ge(t)(function(r){return UQ(function(){var i=FG(JC(r))(),l=LO({x:i.left+1,y:i.top+1})(),s=SG(JC(l))();return zGe(n)(Fs(kQ(a))(Fs(_f(e.conference))(kQ({livestream_popup_visible:VGe(s===Ni)}))))()})})})})}}}},zQ=aMe(),tMe=function(e){var n=function(){return zQ(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof yl)return a({livestream_cta_target_conference_id:QGe(t.value0.conferenceId)});if(t instanceof wl)return a({livestream_cta_id:fE(t.value0.id)});if(t instanceof bl)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof El)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 150, column 29 - line 167, column 8): "+[t.constructor.name])}},VQ=function(e){return function(n){return function(a){if(a instanceof Pd&&a.value0 instanceof Ld)return Ml({stage:QD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof Pd)return Ml(n);if(a instanceof _E){if(a.value0 instanceof bn)return Ml({showPolls:n.showPolls,stage:QD.value});var u=function(s){return Ml(n)};return a.value0 instanceof Me&&n.stage instanceof KD?HQ(_E.create)(function(s){return{showPolls:n.showPolls,stage:new KD(s)}})(SQ(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof pE&&n.showPolls)return JQ(qQ(Pd.create)(NQ(a.value0)))(function(p){return Cf(Za(zQ(e)("Livestream: Poll Popup Shown")({livestream_poll_id:fE(a.value0.id)})))(function(){return Ml({showPolls:n.showPolls,stage:new xd(p)})})});if(a instanceof pE)return Ml(n);var s=function(p){if(a instanceof _L||a instanceof jd&&nMe(n.stage)(a.value0))return Ml(n);if(a instanceof jd)return Cf(Za(tMe(e)(a.value0)))(function(){return JQ(qQ(_E.create)(FQ(a.value0)))(function(g){return Ml({showPolls:n.showPolls,stage:new KD(g)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof _L){if(n.stage instanceof xd){var m=n.stage.value0.poll.id===a.value0.pollId;return m?Ml({showPolls:n.showPolls,stage:QD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof pE){if(n.stage instanceof xd){var i=n.stage.value0.poll.id===a.value0.id;return i?Ml(n):u(!0)}return u(!0)}return u(!0)};return a instanceof Pd&&n.stage instanceof xd?HQ(Pd.create)(function(r){return{showPolls:n.showPolls,stage:new xd(r)}})(jQ(e)(n.stage.value0)(a.value0)):t(!0)}}},QQ=function(e){var n=function(u){return u instanceof El?Ff(u.value0.id):G.value},a=function(u){return u instanceof wl?Ff(u.value0.id):G.value},t=function(u){return u instanceof bl?Ff(u.value0.id):G.value},r=function(u){return u instanceof yl?Ff(u.value0.conferenceId):G.value};return Cf($D(function(u){return zD(YGe(pE.create)(function(i){return i.poll}))(VD(function(){var i=KGe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(WQ(e.pusher.dataChannel)("show-poll")))(function(){return Cf(XGe(function(u){return new _L({pollId:u.poll_id})})(WQ(e.pusher.dataChannel)("hide-poll")))(function(){return Cf($D(function(u){return zD(jd.create)(VD(function(){var i=ZGe(Ff(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(eMe(e.pusher.dataChannel)("show-event-cta")))(function(){return Cf($D(function(u){return zD(jd.create)(VD(function(){var i=vL(Ff(u.id));return function(l){return i(t(l))}}())(e.ctas))})(fL(e.pusher.dataChannel)("show-general-cta")))(function(){return Cf($D(function(u){return zD(jd.create)(VD(function(){var i=vL(Ff(u.id));return function(l){return i(a(l))}}())(e.ctas))})(fL(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return Cf($D(function(u){return zD(jd.create)(VD(function(){var i=vL(Ff(u.id));return function(l){return i(n(l))}}())(e.ctas))})(fL(e.pusher.dataChannel)("show-referral-cta")))(function(){return Ml({stage:QD.value,showPolls:!0})})})})})})})};var rMe=uc(),pL=Se(ye),oMe=Yt(Qe),uMe=za(ye),iMe=rt(re),KQ=vi()(),YQ=Yt(re),lMe=Kt(re),dE=$n(re)()(),cMe=Zr(Nu),sMe=nn(Ke),dL=Yn(ma),XQ=sMe(qn),vMe=yW(),mL=q(Rn),ZQ=ee(Ve),fMe=mv(Kj),_Me=ii(pS),pMe=De(wb),dMe=De(pc),mMe=zl()(),eK=function(){function e(){}return e.value=new e,e}(),hL=function(){function e(){}return e.value=new e,e}(),nK=function(){function e(){}return e.value=new e,e}(),DL=function(){function e(){}return e.value=new e,e}(),gL=function(){function e(){}return e.value=new e,e}(),mE=function(e){return function(n){return rMe({id:"network-settings-modal",onDismiss:n(new bn(gL.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof eK)return pL("text-center")([ga(e.confirmConferenceRegistration)(oMe("mb-4")(uMe("badge badge-soft-primary bg-primary-soft")([iMe("fe fe-check mr-1")(""),Xe("You\u2019re registered!")]))),KQ("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),YQ("")("Connect with colleges when you attend or register for their livestreams?"),lMe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),pL("mx-md-6 mt-4")([dE("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(en)({onClick:cMe(function(){return n(new Me(nK.value))(),n(new Me(DL.value))()})})("Yes, always connect"),dE("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(en)({onClick:dL(n)(new Me(DL.value))})("Only connect with "+e.school.name),dE("btn btn-link mt-3")(en)({onClick:dL(n)(new bn(gL.value))})("Close")])]);if(e.modalView instanceof hL)return pL("text-center")([KQ("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),YQ("")("Connection request sent!"),dE("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(en)({onClick:dL(n)(new bn(gL.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 75, column 13 - line 108, column 12): "+[e.modalView.constructor.name])}()})}},hE=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof nK)return XQ(Za(vMe({publishScope:ji.value,publishContext:VM.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return mL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:hL.value})});if(n.value0 instanceof DL)return XQ(Za(q9(e.school.id)(e.conference.id)))(function(){return mL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:hL.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 52, column 31 - line 64, column 44): "+[n.value0.constructor.name])}if(n instanceof bn)return mL(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 1 - line 51, column 55): "+[e.constructor.name,n.constructor.name])}},DE=function(e){return function(n){var a=Ue(!1)(ZQ(e.dismissedNetworkSettingsModalAt)(function(r){return new T(fMe(_Me(Rb(de))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,pMe(r.publishScope)(ji.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return Ue(!1)(ZQ(e.profile)(function(r){return new T(zT(dMe(!0))(t(r)))}))}},gE=function(e){return mMe(e)({modalView:eK.value})};var YD=function(){function e(){}return e.value=new e,e}(),Nd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RE=function(){function e(){}return e.value=new e,e}();var aK=nn(Ke),tK=aK(qn),RL=wa(Le),hMe=aK(ra),yL=q(Qn),yE=q(Rn),rK=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof YD&&t instanceof XD?tK(RL(hMe(Qt(a.delay))(function(){return yL(e(RE.value))})))(function(){return yE(n({delay:a.delay,throttleState:new Nd(t.value0)}))}):a.throttleState instanceof Nd&&t instanceof XD?yE(n({delay:a.delay,throttleState:new Nd(t.value0)})):a.throttleState instanceof Nd&&t instanceof RE?tK(RL(yL(a.throttleState.value0)))(function(){return yE(n({delay:a.delay,throttleState:YD.value}))}):yE(n(a))}}}},oK=function(e){return function(n){return RL(yL(e(new XD(n))))}},uK=function(e){return{throttleState:YD.value,delay:e}};var bE=Se(re),wE=Se(ye),DMe=Yt(re),rv=te(an),gMe=Ur(vr),iK=Se(Qe),RMe=Xt(re)()(),yMe=Io(re),bMe=za(re),wMe=Ns(Qe),EMe=jy(ye)()(),lK=jc(na),EE=$n(re)()(),bL=Yn(ma),cK=uu(Be)(ct),sK=Ns(ye),IE=Ql(re),IMe=Ql(Qe),TMe=Ql(ye),SMe=Kv(ye),CMe=zv(ye),Od=Vv(re),FMe=Qv(ye),TE=_e(ze),GMe=Ho(na),ZD=nn(Ke)(qn),wL=wa(Le),MMe=Nt(Wr),vK=q(Qn),Gf=q(Rn),EL=U(Ca),AMe=De(sU),fK=_u(na)(Be),LMe=Ye(Lt),xMe=Im(na),PMe=Cv(ct),jMe=fu(Le),NMe=aw(Le),SE=function(){function e(){}return e.value=new e,e}(),_K=function(){function e(){}return e.value=new e,e}(),pK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mK=function(){function e(){}return e.value=new e,e}(),hK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DK=function(){function e(){}return e.value=new e,e}(),TL=function(){function e(){}return e.value=new e,e}(),gK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),SL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RK=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return ta;var t=function(){if(n.stage instanceof SE)return ta;if(n.stage instanceof _K)return bE("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching...");throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 179, column 24 - line 184, column 25): "+[n.stage.constructor.name])}(),r=wE("d-flex flex-nowrap align-items-baseline")([DMe("")("Polls"),bE("text-muted ml-3 small")("Polls will be shown to viewers "+(rv(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(m){return function(p){var g=function(E){return function(b){var I=function(){if(m===0)return"0%";if(je)return rv(gMe(100*b|0)(m))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): "+[])}();return wE("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([bE("col-7 d-flex justify-content-end")(E),iK("col-4")(iK("progress")(RMe("progress-bar")({style:vt({width:I})})(""))),wE("col-1")([yMe("")(rv(b)),bMe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return wMe("t--poll-responses-"+rv(s.id))(EMe("py-0")({colSpan:6})(IR(g)(s.options)(p.optionCounts)))}}},i=function(s){var m=Ue(s.status)(lK(s.poll.id)(n.statuses)),p=EE("btn btn-white btn-sm px-4 t--open")(en)({onClick:bL(a)(new pK(s.poll))})("Launch poll");if(m instanceof Js)return p;if(m instanceof $c)return Fe([EE("btn btn-success btn-sm px-4 mr-3")(en)({disabled:!0})("Poll LIVE"),EE("btn btn-danger btn-sm px-4 t--close")(en)({onClick:bL(a)(new dK(s.poll))})("Close poll")]);if(m instanceof qs)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[m.constructor.name])},l=function(s){var m=cK(s.poll.id)(n.expandedResponses),p=lK(s.poll.id)(n.responses),g=In(0)(function(I){return I.answered})(p),E=In(0)(function(I){return I.seen})(p),b=In(0)(function(I){return I.skipped})(p);return Fe([sK("t--poll t--poll-"+rv(s.poll.id))([IE("pt-3")(function(){var I=Pt(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""}()+s.poll.question),IMe("text-nowrap")(i(s)),IE("t--shown")(rv(E)),TMe("t--answers")([Xe(rv(g)),EE("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return m?"up":"down t--expand-responses"}()))(Zt(function(){return m?"Collapse responses":"Expand responses"}()))({onClick:bL(a)(new hK(s.poll.id))})("")]),IE("t--skipped")(rv(b)),IE("t--pending")(rv((E-g|0)-b|0))]),ga(m)(ha(p)(u(s.poll)(g)))])};return Fe([r,wE("t--polls position-relative")([ha(n.error)(function(s){return bE("alert alert-danger")(s)}),SMe("table table-sm mb-0")([CMe("")([sK("")([Od("")("Question"),Od("")("Actions"),Od("")("# saw poll"),Od("")("# answered"),Od("")("# skipped"),Od("")("# not responded")])]),FMe("")(TE(GMe(function(s){return-function(m){return m.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},yK=function(e){return function(n){var a=function(t){return ZD(wL(MMe(t)(function(r){return vK(mK.value)})))(function(){return Gf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:_K.value,error:G.value})})};return function(t){if(t instanceof pK)return a(EL(IL.create)(QF(t.value0)($c.value)));if(t instanceof dK)return a(EL(IL.create)(QF(t.value0)(qs.value)));if(t instanceof IL){var r=TE(wo(function(){var u=AMe($c.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return Gf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:fK(TE(t.value0)(function(u){return new sn(u.pollId,u.status)})),expandedResponses:LMe(n.expandedResponses)(xMe(r)),stage:SE.value})}if(t instanceof mK)return Gf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:SE.value,error:new T("That didn't work for some reason, try again")});if(t instanceof hK)return Gf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=cK(t.value0)(n.expandedResponses);return u?PMe(t.value0)(n.expandedResponses):lo(t.value0)(n.expandedResponses)}()});if(t instanceof DK)return ZD(oK(SL.create)(TL.value))(function(){return Gf(n)});if(t instanceof TL)return ZD(wL(EL(gK.create)(h5(e.conference.id))))(function(){return Gf(n)});if(t instanceof gK)return Gf({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:fK(TE(t.value0)(function(u){return new sn(u.pollId,u.responses)}))});if(t instanceof SL)return rK(SL.create)(function(u){return{error:n.error,expandedResponses:n.expandedResponses,responses:n.responses,stage:n.stage,statuses:n.statuses,responseThrottle:u}})(n.responseThrottle)(t.value0);throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 196, column 22 - line 242, column 98): "+[t.constructor.name])}}},bK=function(e){return ZD(jMe(cn(DK.value))(NMe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return ZD(wL(vK(TL.value)))(function(){return Gf({statuses:Ai,responses:Ai,expandedResponses:[],responseThrottle:uK(500),stage:SE.value,error:G.value})})})};var wK=vi()(),EK=Se(ye),IK=Yt(re),TK=no(re),SK=wK("img-fluid mb-6")({src:"/img/cv-logo-lilac-on-dark.svg",style:vt({width:"5em"})}),CE=function(e){return EK(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},eg=function(e){return CE("")([IK("text-center")(e)])},CL=CE("t--splashscreen-intro")([Se(Qe)("text-center mt-7")(TK("")("The recording will load in a moment.")),SK]),FE=CE("px-4 px-md-6 t--splashscreen-intro")([wK("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),CK=CE("t--splashscreen-complete")([EK("text-center mt-7")([TK("")("The event is now over."),IK("")("Thank you for attending!"),pl(re)("")("A recording will be available to watch shortly.")]),SK]);var GE=e=>e.play();var Mf=$u(FK());$a();var GK=e=>{let[n,a]=Fa.useState(),[t,r]=Fa.useState(),u=Fa.useRef();return u.current=e,Ot(()=>{if(!t)return Mf.default.isSupported()?a(OMe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},OMe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new Mf.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(Mf.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case Mf.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(Mf.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(Mf.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(Mf.default.Events.INIT_PTS_FOUND,(r,u)=>a.current.onInitialPts&&a.current.onInitialPts({initPTS:u.initPTS})),hls.attachMedia(t),hls):(a.current.onCriticalFail&&a.current.onCriticalFail("Couldn't find element #"+n),null)};var UMe=xc();var MK=function(){return function(){return UMe(GK)}};$a();var lc={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var rg=$u(OK()),UK=4,mAe=({trackColor:e,background:n})=>({props:a,children:t})=>Fa.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${UK}px`,borderRadius:`${UK*2}px`,background:n||e})}),...t),hAe=({horizontal:e})=>({props:n,isDragged:a})=>Fa.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Fa.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?lc.SECONDARY:lc.WHITE,stroke:lc.SECONDARY}),Fa.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Fa.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),kK=e=>Fa.createElement("div",{"aria-label":e.ariaLabel},Fa.createElement(rg.Range,{step:e.step,min:e.min,max:e.max,values:[e.value],onChange:([n])=>e.onChange(n),onFinalChange:([n])=>e.onFinalChange&&e.onFinalChange(n),renderTrack:mAe({trackColor:e.trackColor||lc.GRAY_300,background:e.fillBefore?(0,rg.getTrackBackground)({values:[e.value],colors:[lc.PRIMARY,lc.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:hAe({horizontal:!0})}));var DAe=xc(),BK={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return np}};var HK=function(e){return function(){return function(){return DAe(kK)}}};var gAe=Xt(Qe)()(),RAe=HK(BK)()(),yAe=Yn(li),bAe=$n(Qe)()(),wAe=Yn(ma),JK=Se(ye),EAe=za(re),xE=wa(Le),AL=q(Qn),qK=nn(Ke),IAe=nt(sp),os=q(Rn),TAe=Wv(Le),LL=gn(Le),SAe=U(oe),CAe=Ac(ip),FAe=qK(ra),Af=qK(qn),GAe=er(Rn),MAe=ee(ra),AAe=Dc(ui),LAe=er(_t),xL=function(){function e(){}return e.value=new e,e}(),PL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$K=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zK=function(){function e(){}return e.value=new e,e}(),xAe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),VK=function(e){return function(n){if(e.videoState instanceof G)return ta;if(e.videoState instanceof T){var a=gAe("")({style:vt({minWidth:"6rem",width:"6rem"})})(RAe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:yAe(n)(function(i){return Me.create(PL.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if(je)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=bAe("btn large px-3 py-1 mr-3 text-white fe "+t)(Zt("Mute the video"))({onClick:wAe(n)(new Me(xL.value))})(ta),u=JK("d-flex align-items-center text-white px-3")([Xe("LIVE"),EAe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return JK("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([ga(e.config.liveIndicator)(u),ga(e.config.mute)(r),ga(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 95, column 1 - line 95, column 50): "+[e.constructor.name,n.constructor.name])}},QK=function(e){return Me.create(jL.create(e))},KK=function(e){return xE(AL(new bn(new xAe(function(n){return function(){return e(n)(),new Me(new jL(n))}}))))},PE=function(){return new Me(new NL(!0))}(),YK=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:IAe}},XK=2e3,ZK=function(e){return function(n){if(n instanceof bn)return os(e);if(n instanceof Me){var a=TAe(LL(function(){var i=si();return SAe(function(l){return Me.create($K.create(l))})(CAe(XK)(i))})),t=FAe(Qt(XK))(function(){return AL(new Me(zK.value))}),r=function(u){if(n.value0 instanceof xL)return os(e);var i=function(l){if(n.value0 instanceof PL)return os(e);if(n.value0 instanceof jL)return Af(xE(LL(function(){var m=zC(n.value0.value0)(),p=WC(n.value0.value0)();return new Me(new WK({muted:m,volume:p}))})))(function(){return os(e)});if(n.value0 instanceof WK)return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof NL)return Af(GAe(n.value0.value0)(a))(function(){return Af(xE(t))(function(){return os({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof $K)return os({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof zK)return Af(xE(MAe(LL(si))(function(s){var m=AAe(s)(e.visibilityExpiration);return m?AL(new Me(new NL(!1))):t})))(function(){return os(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof PL&&e.videoState instanceof T?Af(a)(function(){return Af(KK(function(l){return function(){return LAe(n.value0.value0>0)(M_(!1)(l))(),$C(n.value0.value0)(l)()}}))(function(){return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof xL&&e.videoState instanceof T?Af(a)(function(){return Af(KK(M_(!e.videoState.value0.muted)))(function(){return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):r(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[e.constructor.name,n.constructor.name])}},eY=function(e){if(e instanceof T)return!1;if(e instanceof G)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var nY=e=>n=>a=>()=>e.then(a,n),aY=e=>e instanceof Error,tY=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var PAe=q(al(ar)),jAe=X0(ar),NAe=ln(_n),rY=ia(kR(qR)(ar)),OAe=Ss(ar),UAe=U(Gm(yc)),kAe=km(ar),BAe=tR(Bn),HAe=Va(GN);var JAe=function(e){var n=function(a){if(aY(a))return PAe(a);if(je)return jAe(new Om(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return jt(function(a){return Iu("Promise failed: "+tY(e))})(NAe)(Op(rY(n(e))(rY(OAe("Error")(e))(UAe(Iu)(kAe(e))))))},jE=function(e){return kv(function(n){return BAe(HAe)(nY(e)(function(a){return n(Ie.create(JAe(a)))()})(function(a){return n(Te.create(a))()}))})};var qAe=ee(Ve),WAe=Se(Qe),OL=Zr(My),og=ee(fr),UL=bs(_t)(Ku),f0=Yn(ma),oY=yp(re)()(),$Ae=MK()(),zAe=q(_t),uY=Yn(li),iY=Xt(Qe)()(),VAe=$n(ye)()(),QAe=rt(re),KAe=Se(ye),lY=nn(Ke),YAe=Vs(Le)(),XAe=wu(Be)(at),ZAe=De(nr(ct)),Ud=lY(ra),eLe=fc(Qn),nLe=Rr(dp),ho=q(Qn),cY=gn(Le),sY=Nt(Wr),vY=rm(ra),to=q(Rn),Do=lY(qn),Hu=wa(Le),fY=U(Ca),_Y=Wv(Le),pY=U(Bn),aLe=ut(Gr(Ca)),tLe=U(oe),rLe=_e(oe),dY=Ye(Vj),mY=function(){function e(){}return e.value=new e,e}(),hY=function(){function e(){}return e.value=new e,e}(),ug=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DY=function(){function e(){}return e.value=new e,e}(),kd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gY=function(){function e(){}return e.value=new e,e}(),RY=function(){function e(){}return e.value=new e,e}(),yY=function(){function e(){}return e.value=new e,e}(),kL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BL=function(){function e(){}return e.value=new e,e}(),NE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bY=function(){function e(){}return e.value=new e,e}(),HL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JL=function(){function e(){}return e.value=new e,e}(),wY=function(){function e(){}return e.value=new e,e}(),EY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_0=function(){function e(){}return e.value=new e,e}(),us=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ig=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WL=function(e){var n=e.Monad0(),a=ee(n.Bind1()),t=gn(e),r=q(n.Applicative0());return function(u){return function(i){return function(l){return a(t(gb(u.videoId)))(function(s){return In(r(i.whenNotFound))(l)(qAe(s)(SO))})}}}},IY=WL(Sr),$L=WL(Le),TY=function(e){var n=WL(e);return function(a){return n(a)({whenNotFound:de})}},oLe=TY(Sr),uLe=TY(Le),BE=function(e){return function(n){return function(a){var t=function(){var I=WAe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof DY)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof gY)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof ug)return I(e.introScreen);if(n.stage instanceof kd)return ta;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 243, column 20 - line 254, column 16): "+[n.stage.constructor.name])}(),r=function(){return n.stage instanceof ug?n.stage.value0.reset:!1}(),u=OL(function(I){return og(Db(I))(UL(function(L){return a(new Me(new qL({time:L})))}))}),i=OL(function(I){return og(Db(I))(UL(function(L){return a(new Me(new kE({playing:!0,time:L})))}))}),l=function(I){return a(bn.create(I))},s=OL(function(I){return og(Db(I))(UL(function(L){return l(new HL(L))}))}),m=f0(l)(bY.value),p=Fe([oY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s})(""),ga(!r)($Ae({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(RY.value),onError:function(I,L){return de},onCriticalFail:uY(l)(function(I){var L=I==="networkError";return L?BL.value:new NE("HLS player crashed")}),onReady:l(new OE({autoPlay:e.autoPlay})),onInitialPts:uY(l)(function(I){return new EY(I.initPTS)})}))]),g=function(){return n.stage instanceof kd&&n.stage.value0.unmuteOverlay?iY("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:vt({pointerEvents:"none"})})(VAe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(en)({onClick:f0(l)(wY.value),style:vt({pointerEvents:"all"})})([Xe("click for sound"),QAe("fe fe-volume-2 ml-2")("")])):ta}(),E=function(I){return iY("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:f0(l)(new us(PE)),onMouseDown:f0(l)(new us(PE)),onTouchStart:f0(l)(new us(PE))})(VK(I)(function(L){return l(us.create(L))}))},b=oY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),playsInline:!0,onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:f0(l)(new OE({autoPlay:e.autoPlay})),onError:f0(l)(BL.value),src:function(){return r?"":e.watchUrl}()})("");return KAe("position-relative w-100")([function(){if(n.support instanceof mY)return p;if(n.support instanceof hY)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 164, column 7 - line 166, column 40): "+[n.support.constructor.name])}(),ha(n.customControls)(E),ga(n.allowSound)(g),t])}}},iLe=function(e){var n=gn(e.MonadEffect0());return function(a){return n(function(){return oLe(a)(M_(!1))(),JL.value})}},lLe=iLe(UO),zL=function(e){return YAe("Livestream: Error")({livestream_error_message:e})},SY=function(e){return IY(e)({whenNotFound:!1})(qC)},cLe=function(e){return gn(e)(function(){var a=og(og(pu)(YC))(KC)();return XAe(function(t){return ZAe($y(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},CY=cLe(Le),sLe=function(e){var n=function(t){return Ud(eLe(e.allowSound)(nLe(Iu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return Ud(jE(GE(t)))(function(){return ho(new UE({unmuteOverlay:!1}))})})},a=function(t){return Ud(cY(M_(!0)(t)))(function(){return Ud(jE(GE(t)))(function(){return ho(new UE({unmuteOverlay:!0}))})})};return $L(e)({whenNotFound:new NE("