var Purs_EntryPoints_Livestream_Livestream=(()=>{var TX=Object.create;var Pg=Object.defineProperty;var SX=Object.getOwnPropertyDescriptor;var CX=Object.getOwnPropertyNames;var FX=Object.getPrototypeOf,GX=Object.prototype.hasOwnProperty;var p2=e=>Pg(e,"__esModule",{value:!0});var MX=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ae=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),d2=(e,n)=>{p2(e);for(var a in n)Pg(e,a,{get:n[a],enumerable:!0})},AX=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of CX(n))!GX.call(e,t)&&t!=="default"&&Pg(e,t,{get:()=>n[t],enumerable:!(a=SX(n,t))||a.enumerable});return e},uu=e=>AX(p2(Pg(e!=null?TX(FX(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var $R={};d2($R,{Children:()=>Qf,Component:()=>Kf,Fragment:()=>VT,Suspense:()=>qae,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Bae,cloneElement:()=>xm,createContext:()=>zT,createElement:()=>ft,createRef:()=>JR,default:()=>Ha,forwardRef:()=>wi,isValidElement:()=>QT,lazy:()=>Hae,useCallback:()=>Nm,useContext:()=>Wae,useEffect:()=>Mt,useImperativeHandle:()=>ps,useLayoutEffect:()=>jm,useMemo:()=>Om,useReducer:()=>Jae,useRef:()=>ct,useState:()=>Ll,version:()=>$ae});var Ha,Bae,Qf,xm,Kf,zT,ft,JR,wi,VT,QT,Hae,qae,Nm,Wae,Mt,ps,jm,Om,Jae,ct,Ll,$ae,qa=MX(()=>{Ha=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bae,Children:Qf,cloneElement:xm,Component:Kf,createContext:zT,createElement:ft,createRef:JR,forwardRef:wi,Fragment:VT,isValidElement:QT,lazy:Hae,Suspense:qae,useCallback:Nm,useContext:Wae,useEffect:Mt,useImperativeHandle:ps,useLayoutEffect:jm,useMemo:Om,useReducer:Jae,useRef:ct,useState:Ll,version:$ae}=window.React});var KT=Ae((OZe,vN)=>{"use strict";var sN=Object.getOwnPropertySymbols,zae=Object.prototype.hasOwnProperty,Vae=Object.prototype.propertyIsEnumerable;function Qae(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Kae(){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}}vN.exports=Kae()?Object.assign:function(e,n){for(var a,t=Qae(e),r,u=1;u{"use strict";var YT=KT(),ep=60103,fN=60106;ht.Fragment=60107;ht.StrictMode=60108;ht.Profiler=60114;var _N=60109,pN=60110,dN=60112;ht.Suspense=60113;var mN=60115,hN=60116;typeof Symbol=="function"&&Symbol.for&&(al=Symbol.for,ep=al("react.element"),fN=al("react.portal"),ht.Fragment=al("react.fragment"),ht.StrictMode=al("react.strict_mode"),ht.Profiler=al("react.profiler"),_N=al("react.provider"),pN=al("react.context"),dN=al("react.forward_ref"),ht.Suspense=al("react.suspense"),mN=al("react.memo"),hN=al("react.lazy"));var al,DN=typeof Symbol=="function"&&Symbol.iterator;function Yae(e){return e===null||typeof e!="object"?null:(e=DN&&e[DN]||e["@@iterator"],typeof e=="function"?e:null)}function km(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";CN.exports=SN()});var YN=Ae(ap=>{"use strict";var Pl=KT(),ms=tS();function pr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;aqm;qm++)Ao[qm]=qm+1;var Ao,qm;Ao[15]=0;var rte=/^[: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]*$/,xN=Object.prototype.hasOwnProperty,NN={},jN={};function ON(e){return xN.call(jN,e)?!0:xN.call(NN,e)?!1:rte.test(e)?jN[e]=!0:(NN[e]=!0,!1)}function ote(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 ute(e,n,a,t){if(n===null||typeof n=="undefined"||ote(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 yu(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 Lo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Lo[e]=new yu(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Lo[n]=new yu(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Lo[e]=new yu(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Lo[e]=new yu(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){Lo[e]=new yu(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Lo[e]=new yu(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Lo[e]=new yu(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Lo[e]=new yu(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Lo[e]=new yu(e,5,!1,e.toLowerCase(),null,!1,!1)});var fS=/[\-:]([a-z])/g;function _S(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(fS,_S);Lo[n]=new yu(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(fS,_S);Lo[n]=new yu(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(fS,_S);Lo[n]=new yu(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Lo[e]=new yu(e,1,!1,e.toLowerCase(),null,!1,!1)});Lo.xlinkHref=new yu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Lo[e]=new yu(e,1,!1,e.toLowerCase(),null,!0,!0)});var ite=/["'&<>]/;function Yf(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=ite.exec(e);if(n){var a="",t,r=0;for(t=n.index;tny))throw Error(pr(301));if(e===Dc)if(ey=!0,e={action:a,next:null},yv===null&&(yv=new Map),a=yv.get(n),a===void 0)yv.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function dS(){}var Zf=null,fte={readContext:function(e){var n=Zf.threadID;return Hm(e,n),e[n]},useContext:function(e){Xf();var n=Zf.threadID;return Hm(e,n),e[n]},useMemo:WN,useReducer:qN,useRef:function(e){Dc=Xf(),nr=pS();var n=nr.memoizedState;return n===null?(e={current:e},nr.memoizedState=e):n},useState:function(e){return qN(HN,e)},useLayoutEffect:function(){},useCallback:function(e,n){return WN(function(){return e},n)},useImperativeHandle:dS,useEffect:dS,useDebugValue:dS,useDeferredValue:function(e){return Xf(),e},useTransition:function(){return Xf(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(Zf.identifierPrefix||"")+"R:"+(Zf.uniqueID++).toString(36)},useMutableSource:function(e,n){return Xf(),n(e._source)}},JN={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function $N(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 zN={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},_te=Pl({menuitem:!0},zN),Jm={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},pte=["Webkit","ms","Moz","O"];Object.keys(Jm).forEach(function(e){pte.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Jm[n]=Jm[e]})});var dte=/([A-Z])/g,mte=/^ms-/,bv=ms.Children.toArray,mS=ate.ReactCurrentDispatcher,hte={listing:!0,pre:!0,textarea:!0},Dte=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,VN={},hS={};function gte(e){if(e==null)return e;var n="";return ms.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var Rte=Object.prototype.hasOwnProperty,yte={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function QN(e,n){if(e===void 0)throw Error(pr(152,Bm(n)||"Component"))}function bte(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,h=tte(l,n,a,s),p=[],y=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(ee,ue){y=!0,p=[ue]},enqueueSetState:function(ee,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,h,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=Pl({},s.state,b))}}else if(Dc={},s=l(i.props,h,E),s=kN(l,i.props,s,h),s==null||s.render==null){e=s,QN(e,l);return}if(s.props=i.props,s.context=h,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 T=y;if(p=null,y=!1,T&&E.length===1)s.state=E[0];else{b=T?E[0]:s.state;var L=!0;for(T=T?1:0;T=l))throw Error(pr(304));var s=new Uint16Array(l);for(s.set(i),Ao=s,Ao[0]=u+1,i=u;i=s.children.length){var h=s.footer;if(h!==""&&(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===YR)this.popProvider(s.type);else if(s.type===XR){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var y=s.fallbackFrame;if(!y)throw Error(pr(303));this.stack.push(y),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=h}else{var E=s.children[s.childIndex++],b="";try{b+=this.render(E,s.context,s.domNamespace)}catch(T){throw T!=null&&typeof T.then=="function"?Error(pr(294)):T}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{mS.current=r,Zf=t,BN()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?Yf(r):this.previousWasTextNode?""+Yf(r):(this.previousWasTextNode=!0,Yf(r));if(t=bte(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!ms.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===rS?pr(257):pr(258,r.toString()));return a=bv(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 LN:case AN:case oS:case uS:case cS:case KR:return a=bv(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case XR:throw Error(pr(294));case MN:throw Error(pr(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case lS:Dc={};var i=u.render(a.props,a.ref);return i=kN(u.render,a.props,i,a.ref),i=bv(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case sS:return a=[ms.createElement(u.type,Pl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case YR:return u=bv(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case iS:u=a.type,i=a.props;var l=this.threadID;return Hm(u,l),u=bv(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case GN:throw Error(pr(338));case vS:return u=a.type,i=u._init,u=i(u._payload),a=[ms.createElement(u,Pl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(pr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===JN.html&&$N(u),!VN.hasOwnProperty(u)){if(!Dte.test(u))throw Error(pr(65,u));VN[u]=!0}var i=a.props;if(u==="input")i=Pl({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(pr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(pr(93));s=s[0]}l=""+s}l==null&&(l="")}i=Pl({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Pl({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var h=gte(i.children);if(s!=null){var p=i.value!=null?i.value+"":h;if(l=!1,Array.isArray(s)){for(var y=0;y":(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=Yf(s);break e}s=null}return s!=null?(i=[],hte.hasOwnProperty(u)&&s.charAt(0)===` `&&(ue+=` `),ue+=s):i=bv(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?$N(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}();ap.renderToNodeStream=function(){throw Error(pr(207))};ap.renderToStaticMarkup=function(e,n){e=new KN(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};ap.renderToStaticNodeStream=function(){throw Error(pr(208))};ap.renderToString=function(e,n){e=new KN(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};ap.version="17.0.2"});var ZN=Ae((HZe,XN)=>{"use strict";XN.exports=YN()});var V7=Ae((db,lF)=>{(function(n,a){typeof db=="object"&&typeof lF=="object"?lF.exports=a():typeof define=="function"&&define.amd?define([],a):typeof db=="object"?db.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(T,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,$){O.__proto__=$}||function(O,$){for(var z in $)$.hasOwnProperty(z)&&(O[z]=$[z])},b(T,L)};return function(T,L){b(T,L);function O(){this.constructor=T}T.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(T){T===void 0&&(T="="),this._paddingCharacter=T}return b.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},b.prototype.encode=function(T){for(var L="",O=0;O>>3*6&63),L+=this._encodeByte($>>>2*6&63),L+=this._encodeByte($>>>1*6&63),L+=this._encodeByte($>>>0*6&63)}var z=T.length-O;if(z>0){var $=T[O]<<16|(z===2?T[O+1]<<8:0);L+=this._encodeByte($>>>3*6&63),L+=this._encodeByte($>>>2*6&63),z===2?L+=this._encodeByte($>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},b.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},b.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(T),O=T.length-L,$=new Uint8Array(this.maxDecodedLength(O)),z=0,ee=0,ue=0,X=0,Y=0,te=0,he=0;ee>>4,$[z++]=Y<<4|te>>>2,$[z++]=te<<6|he,ue|=X&r,ue|=Y&r,ue|=te&r,ue|=he&r;if(ee>>4,ue|=X&r,ue|=Y&r),ee>>2,ue|=te&r),ee>>8&0-65-26+97,L+=51-T>>>8&26-97-52+48,L+=61-T>>>8&52-48-62+43,L+=62-T>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(T){var L=r;return L+=(42-T&T-44)>>>8&-r+T-43+62,L+=(46-T&T-48)>>>8&-r+T-47+63,L+=(47-T&T-58)>>>8&-r+T-48+52,L+=(64-T&T-91)>>>8&-r+T-65+0,L+=(96-T&T-123)>>>8&-r+T-97+26,L},b.prototype._getPaddingLength=function(T){var L=0;if(this._paddingCharacter){for(var O=T.length-1;O>=0&&T[O]===this._paddingCharacter;O--)L++;if(T.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 h=function(b){t(T,b);function T(){return b!==null&&b.apply(this,arguments)||this}return T.prototype._encodeByte=function(L){var O=L;return O+=65,O+=25-L>>>8&0-65-26+97,O+=51-L>>>8&26-97-52+48,O+=61-L>>>8&52-48-62+45,O+=62-L>>>8&62-45-63+95,String.fromCharCode(O)},T.prototype._decodeChar=function(L){var O=r;return O+=(44-L&L-46)>>>8&-r+L-45+62,O+=(94-L&L-96)>>>8&-r+L-95+63,O+=(47-L&L-58)>>>8&-r+L-48+52,O+=(64-L&L-91)>>>8&-r+L-65+0,O+=(96-L&L-123)>>>8&-r+L-97+26,O},T}(u);n.URLSafeCoder=h;var p=new h;function y(b){return p.encode(b)}n.encodeURLSafe=y;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 h=new Uint8Array(i(s)),p=0,y=0;y>6,h[p++]=128|E&63):E<55296?(h[p++]=224|E>>12,h[p++]=128|E>>6&63,h[p++]=128|E&63):(y++,E=(E&1023)<<10,E|=s.charCodeAt(y)&1023,E+=65536,h[p++]=240|E>>18,h[p++]=128|E>>12&63,h[p++]=128|E>>6&63,h[p++]=128|E&63)}return h}n.encode=u;function i(s){for(var h=0,p=0;p=s.length-1)throw new Error(t);p++,h+=4}else throw new Error(t)}return h}n.encodedLength=i;function l(s){for(var h=[],p=0;p=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);y=(y&31)<<6|b&63,E=128}else if(y<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],T=s[++p];if((b&192)!=128||(T&192)!=128)throw new Error(r);y=(y&15)<<12|(b&63)<<6|T&63,E=2048}else if(y<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],T=s[++p],L=s[++p];if((b&192)!=128||(T&192)!=128||(L&192)!=128)throw new Error(r);y=(y&15)<<18|(b&63)<<12|(T&63)<<6|L&63,E=65536}else throw new Error(r);if(y=55296&&y<=57343)throw new Error(r);if(y>=65536){if(y>1114111)throw new Error(r);y-=65536,h.push(String.fromCharCode(55296|y>>10)),y=56320|y&1023}}h.push(String.fromCharCode(y))}return h.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 m(d,g){this.lastId=0,this.prefix=d,this.name=g}return m.prototype.create=function(d){this.lastId++;var g=this.lastId,G=this.prefix+g,A=this.name+"["+g+"]",Q=!1,Te=function(){Q||(d.apply(null,arguments),Q=!0)};return this[g]=Te,{number:g,id:G,name:A,callback:Te}},m.prototype.remove=function(d){delete this[d.number]},m}(),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 m(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return m.prototype.load=function(d,g,G){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(G);else{A.loading[d]=[G];var Q=za.createScriptRequest(A.getPath(d,g)),Te=A.receivers.create(function(_n){if(A.receivers.remove(Te),A.loading[d]){var ha=A.loading[d];delete A.loading[d];for(var Rt=function(Io){Io||Q.cleanup()},Xt=0;Xt>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},z=function(m){return m.replace(/[^\x00-\x7F]/g,$)},ee=function(m){var d=[0,2,1][m.length%3],g=m.charCodeAt(0)<<16|(m.length>1?m.charCodeAt(1):0)<<8|(m.length>2?m.charCodeAt(2):0),G=[b.charAt(g>>>18),b.charAt(g>>>12&63),d>=2?"=":b.charAt(g>>>6&63),d>=1?"=":b.charAt(g&63)];return G.join("")},ue=window.btoa||function(m){return m.replace(/[\s\S]{1,3}/g,ee)},X=function(){function m(d,g,G,A){var Q=this;this.clear=g,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},G)}return m.prototype.isRunning=function(){return this.timer!==null},m.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},m}(),Y=X,te=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}();function he(m){window.clearTimeout(m)}function Be(m){window.clearInterval(m)}var ce=function(m){te(d,m);function d(g,G){return m.call(this,setTimeout,he,g,function(A){return G(),null})||this}return d}(Y),le=function(m){te(d,m);function d(g,G){return m.call(this,setInterval,Be,g,function(A){return G(),A})||this}return d}(Y),Fe={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(m){return new ce(0,m)},method:function(m){for(var d=[],g=1;g0)for(var A=0;A=1002&&m.code<=1004?"backoff":null:m.code===4e3?"tls_only":m.code<4100?"refused":m.code<4200?"backoff":m.code<4300?"retry":"refused"},getCloseError:function(m){return m.code!==1e3&&m.code!==1001?{type:"PusherError",data:{code:m.code,message:m.reason||m.message}}:null}},fe=zc,bl=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),wl=function(m){bl(d,m);function d(g,G){var A=m.call(this)||this;return A.id=g,A.transport=G,A.activityTimeout=G.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(g){return this.transport.send(g)},d.prototype.send_event=function(g,G,A){var Q={event:g,data:G};return A&&(Q.channel=A),vn.debug("Event sent",Q),this.send(fe.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 g=this,G={message:function(Q){var Te;try{Te=fe.decodeMessage(Q)}catch(_n){g.emit("error",{type:"MessageParseError",error:_n,data:Q.data})}if(Te!==void 0){switch(vn.debug("Event recd",Te),Te.event){case"pusher:error":g.emit("error",{type:"PusherError",data:Te.data});break;case"pusher:ping":g.emit("ping");break;case"pusher:pong":g.emit("pong");break}g.emit("message",Te)}},activity:function(){g.emit("activity")},error:function(Q){g.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&g.handleCloseEvent(Q),g.transport=null,g.emit("closed")}},A=function(){Kn(G,function(Q,Te){g.transport.unbind(Te,Q)})};Kn(G,function(Q,Te){g.transport.bind(Te,Q)})},d.prototype.handleCloseEvent=function(g){var G=fe.getCloseAction(g),A=fe.getCloseError(g);A&&this.emit("error",A),G&&this.emit(G,{action:G,error:A})},d}(pa),Vc=wl,El=function(){function m(d,g){this.transport=d,this.callback=g,this.bindListeners()}return m.prototype.close=function(){this.unbindListeners(),this.transport.close()},m.prototype.bindListeners=function(){var d=this;this.onMessage=function(g){d.unbindListeners();var G;try{G=fe.processHandshake(g)}catch(A){d.finish("error",{error:A}),d.transport.close();return}G.action==="connected"?d.finish("connected",{connection:new Vc(G.id,d.transport),activityTimeout:G.activityTimeout}):(d.finish(G.action,{error:G.error}),d.transport.close())},this.onClosed=function(g){d.unbindListeners();var G=fe.getCloseAction(g)||"backoff",A=fe.getCloseError(g);d.finish(G,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},m.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},m.prototype.finish=function(d,g){this.callback(je({transport:this.transport,action:d},g))},m}(),Oi=El,Id=function(){function m(d,g){this.channel=d;var G=g.authTransport;if(typeof za.getAuthorizers()[G]=="undefined")throw"'"+G+"' is not a recognized auth transport";this.type=G,this.options=g,this.authOptions=g.auth||{}}return m.prototype.composeQuery=function(d){var g="socket_id="+encodeURIComponent(d)+"&channel_name="+encodeURIComponent(this.channel.name);for(var G in this.authOptions.params)g+="&"+encodeURIComponent(G)+"="+encodeURIComponent(this.authOptions.params[G]);return g},m.prototype.authorize=function(d,g){m.authorizers=m.authorizers||za.getAuthorizers(),m.authorizers[this.type].call(this,za,d,g)},m}(),_f=Id,t0=function(){function m(d,g){this.timeline=d,this.options=g||{}}return m.prototype.send=function(d,g){this.timeline.isEmpty()||this.timeline.send(za.TimelineTransport.getAgent(this,d),g)},m}(),r0=t0,Ui=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),ou=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),Qc=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),o0=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),Td=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),u0=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),ng=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),Ks=function(m){Ui(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),OE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),UE=function(m){OE(d,m);function d(g,G){var A=m.call(this,function(Q,Te){vn.debug("No callbacks on "+g+" for "+Q)})||this;return A.name=g,A.pusher=G,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return d.prototype.authorize=function(g,G){return G(!1,{auth:""})},d.prototype.trigger=function(g,G){if(g.indexOf("client-")!==0)throw new ou("Event '"+g+"' 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(g,G,this.name)},d.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},d.prototype.handleEvent=function(g){var G=g.event,A=g.data;if(G==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(g);else if(G.indexOf("pusher_internal:")!==0){var Q={};this.emit(G,A,Q)}},d.prototype.handleSubscriptionSucceededEvent=function(g){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",g.data)},d.prototype.subscribe=function(){var g=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(G,A){G?(vn.error(A),g.emit("pusher:subscription_error",A)):(A=A,g.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:g.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}(pa),ag=UE,kE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),BE=function(m){kE(d,m);function d(){return m!==null&&m.apply(this,arguments)||this}return d.prototype.authorize=function(g,G){var A=ki.createAuthorizer(this,this.pusher.config);return A.authorize(g,G)},d}(ag),Sd=BE,tg=function(){function m(){this.reset()}return m.prototype.get=function(d){return Object.prototype.hasOwnProperty.call(this.members,d)?{id:d,info:this.members[d]}:null},m.prototype.each=function(d){var g=this;Kn(this.members,function(G,A){d(g.get(A))})},m.prototype.setMyID=function(d){this.myID=d},m.prototype.onSubscription=function(d){this.members=d.presence.hash,this.count=d.presence.count,this.me=this.get(this.myID)},m.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)},m.prototype.removeMember=function(d){var g=this.get(d.user_id);return g&&(delete this.members[d.user_id],this.count--),g},m.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},m}(),HE=tg,qE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),rg=function(m){qE(d,m);function d(g,G){var A=m.call(this,g,G)||this;return A.members=new HE,A}return d.prototype.authorize=function(g,G){var A=this;m.prototype.authorize.call(this,g,function(Q,Te){if(!Q){if(Te=Te,Te.channel_data===void 0){var _n=Da.buildLogSuffix("authenticationEndpoint");vn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+_n)),G("Invalid auth response");return}var ha=JSON.parse(Te.channel_data);A.members.setMyID(ha.user_id)}G(Q,Te)})},d.prototype.handleEvent=function(g){var G=g.event;if(G.indexOf("pusher_internal:")===0)this.handleInternalEvent(g);else{var A=g.data,Q={};g.user_id&&(Q.user_id=g.user_id),this.emit(G,A,Q)}},d.prototype.handleInternalEvent=function(g){var G=g.event,A=g.data;switch(G){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(g);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 Te=this.members.removeMember(A);Te&&this.emit("pusher:member_removed",Te);break}},d.prototype.handleSubscriptionSucceededEvent=function(g){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(g.data),this.emit("pusher:subscription_succeeded",this.members))},d.prototype.disconnect=function(){this.members.reset(),m.prototype.disconnect.call(this)},d}(Sd),WE=rg,og=a(1),Cd=a(0),JE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),$E=function(m){JE(d,m);function d(g,G,A){var Q=m.call(this,g,G)||this;return Q.key=null,Q.nacl=A,Q}return d.prototype.authorize=function(g,G){var A=this;m.prototype.authorize.call(this,g,function(Q,Te){if(Q){G(!0,Te);return}var _n=Te.shared_secret;if(!_n){var ha="No shared_secret key in auth payload for encrypted channel: "+A.name;G(!0,ha);return}A.key=Object(Cd.decode)(_n),delete Te.shared_secret,G(!1,Te)})},d.prototype.trigger=function(g,G){throw new u0("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(g){var G=g.event,A=g.data;if(G.indexOf("pusher_internal:")===0||G.indexOf("pusher:")===0){m.prototype.handleEvent.call(this,g);return}this.handleEncryptedEvent(G,A)},d.prototype.handleEncryptedEvent=function(g,G){var A=this;if(!this.key){vn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!G.ciphertext||!G.nonce){vn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+G);return}var Q=Object(Cd.decode)(G.ciphertext);if(Q.length0&&this.emit("connecting_in",Math.round(g/1e3)),this.retryTimer=new ce(g||0,function(){G.disconnectInternally(),G.connect()})},d.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},d.prototype.setUnavailableTimer=function(){var g=this;this.unavailableTimer=new ce(this.options.unavailableTimeout,function(){g.updateState("unavailable")})},d.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},d.prototype.sendActivityCheck=function(){var g=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ce(this.options.pongTimeout,function(){g.timeline.error({pong_timed_out:g.options.pongTimeout}),g.retryIn(0)})},d.prototype.resetActivityCheck=function(){var g=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ce(this.activityTimeout,function(){g.sendActivityCheck()}))},d.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},d.prototype.buildConnectionCallbacks=function(g){var G=this;return je({},g,{message:function(A){G.resetActivityCheck(),G.emit("message",A)},ping:function(){G.send_event("pusher:pong",{})},activity:function(){G.resetActivityCheck()},error:function(A){G.emit("error",{type:"WebSocketError",error:A})},closed:function(){G.abandonConnection(),G.shouldRetry()&&G.retryIn(1e3)}})},d.prototype.buildHandshakeCallbacks=function(g){var G=this;return je({},g,{connected:function(A){G.activityTimeout=Math.min(G.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),G.clearUnavailableTimer(),G.setConnection(A.connection),G.socket_id=G.connection.id,G.updateState("connected",{socket_id:G.socket_id})}})},d.prototype.buildErrorCallbacks=function(){var g=this,G=function(A){return function(Q){Q.error&&g.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:G(function(){g.usingTLS=!0,g.updateStrategy(),g.retryIn(0)}),refused:G(function(){g.disconnect()}),backoff:G(function(){g.retryIn(1e3)}),retry:G(function(){g.retryIn(0)})}},d.prototype.setConnection=function(g){this.connection=g;for(var G in this.connectionCallbacks)this.connection.bind(G,this.connectionCallbacks[G]);this.resetActivityCheck()},d.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var g in this.connectionCallbacks)this.connection.unbind(g,this.connectionCallbacks[g]);var G=this.connection;return this.connection=null,G}},d.prototype.updateState=function(g,G){var A=this.state;if(this.state=g,A!==g){var Q=g;Q==="connected"&&(Q+=" with new socket ID "+G.socket_id),vn.debug("State changed",A+" -> "+Q),this.timeline.info({state:g,params:G}),this.emit("state_change",{previous:A,current:g}),this.emit(g,G)}},d.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},d}(pa),ug=QE,KE=function(){function m(){this.channels={}}return m.prototype.add=function(d,g){return this.channels[d]||(this.channels[d]=ig(d,g)),this.channels[d]},m.prototype.all=function(){return Wn(this.channels)},m.prototype.find=function(d){return this.channels[d]},m.prototype.remove=function(d){var g=this.channels[d];return delete this.channels[d],g},m.prototype.disconnect=function(){Kn(this.channels,function(d){d.disconnect()})},m}(),YE=KE;function ig(m,d){if(m.indexOf("private-encrypted-")===0){if(d.config.nacl)return ki.createEncryptedChannel(m,d,d.config.nacl);var g="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",G=Da.buildLogSuffix("encryptedChannelSupport");throw new u0(g+". "+G)}else return m.indexOf("private-")===0?ki.createPrivateChannel(m,d):m.indexOf("presence-")===0?ki.createPresenceChannel(m,d):ki.createChannel(m,d)}var XE={createChannels:function(){return new YE},createConnectionManager:function(m,d){return new ug(m,d)},createChannel:function(m,d){return new ag(m,d)},createPrivateChannel:function(m,d){return new Sd(m,d)},createPresenceChannel:function(m,d){return new WE(m,d)},createEncryptedChannel:function(m,d,g){return new zE(m,d,g)},createTimelineSender:function(m,d){return new r0(m,d)},createAuthorizer:function(m,d){return d.authorizer?d.authorizer(m,d):new _f(m,d)},createHandshake:function(m,d){return new Oi(m,d)},createAssistantToTheTransportManager:function(m,d,g){return new Zl(m,d,g)}},ki=XE,ZE=function(){function m(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return m.prototype.getAssistant=function(d){return ki.createAssistantToTheTransportManager(this,d,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},m.prototype.isAlive=function(){return this.livesLeft>0},m.prototype.reportDeath=function(){this.livesLeft-=1},m}(),lg=ZE,eI=function(){function m(d,g){this.strategies=d,this.loop=Boolean(g.loop),this.failFast=Boolean(g.failFast),this.timeout=g.timeout,this.timeoutLimit=g.timeoutLimit}return m.prototype.isSupported=function(){return Sn(this.strategies,Ie.method("isSupported"))},m.prototype.connect=function(d,g){var G=this,A=this.strategies,Q=0,Te=this.timeout,_n=null,ha=function(Rt,Xt){Xt?g(null,Xt):(Q=Q+1,G.loop&&(Q=Q%A.length),Q0&&(Q=new ce(G.timeout,function(){Te.abort(),A(!0)})),Te=d.connect(g,function(_n,ha){_n&&Q&&Q.isRunning()&&!G.failFast||(Q&&Q.ensureAborted(),A(_n,ha))}),{abort:function(){Q&&Q.ensureAborted(),Te.abort()},forceMinPriority:function(_n){Te.forceMinPriority(_n)}}},m}(),Kc=eI,nI=function(){function m(d){this.strategies=d}return m.prototype.isSupported=function(){return Sn(this.strategies,Ie.method("isSupported"))},m.prototype.connect=function(d,g){return aI(this.strategies,d,function(G,A){return function(Q,Te){if(A[G].error=Q,Q){cg(A)&&g(!0);return}Qn(A,function(_n){_n.forceMinPriority(Te.transport.priority)}),g(null,Te)}})},m}(),Fd=nI;function aI(m,d,g){var G=Jn(m,function(A,Q,Te,_n){return A.connect(d,g(Q,_n))});return{abort:function(){Qn(G,Gd)},forceMinPriority:function(A){Qn(G,function(Q){Q.forceMinPriority(A)})}}}function cg(m){return gn(m,function(d){return Boolean(d.error)})}function Gd(m){!m.error&&!m.aborted&&(m.abort(),m.aborted=!0)}var tI=function(){function m(d,g,G){this.strategy=d,this.transports=g,this.ttl=G.ttl||1800*1e3,this.usingTLS=G.useTLS,this.timeline=G.timeline}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.usingTLS,A=sg(G),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=Ie.now()){var Te=this.transports[A.transport];Te&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new Kc([Te],{timeout:A.latency*2+1e3,failFast:!0})))}var _n=Ie.now(),ha=Q.pop().connect(d,function Rt(Xt,Io){Xt?(vg(G),Q.length>0?(_n=Ie.now(),ha=Q.pop().connect(d,Rt)):g(Xt)):(oI(G,Io.transport.name,Ie.now()-_n),g(null,Io))});return{abort:function(){ha.abort()},forceMinPriority:function(Rt){d=Rt,ha&&ha.forceMinPriority(Rt)}}},m}(),rI=tI;function Md(m){return"pusherTransport"+(m?"TLS":"NonTLS")}function sg(m){var d=za.getLocalStorage();if(d)try{var g=d[Md(m)];if(g)return JSON.parse(g)}catch{vg(m)}return null}function oI(m,d,g){var G=za.getLocalStorage();if(G)try{G[Md(m)]=La({timestamp:Ie.now(),transport:d,latency:g})}catch{}}function vg(m){var d=za.getLocalStorage();if(d)try{delete d[Md(m)]}catch{}}var uI=function(){function m(d,g){var G=g.delay;this.strategy=d,this.options={delay:G}}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.strategy,A,Q=new ce(this.options.delay,function(){A=G.connect(d,g)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(Te){d=Te,A&&A.forceMinPriority(Te)}}},m}(),i0=uI,fg=function(){function m(d,g,G){this.test=d,this.trueBranch=g,this.falseBranch=G}return m.prototype.isSupported=function(){var d=this.test()?this.trueBranch:this.falseBranch;return d.isSupported()},m.prototype.connect=function(d,g){var G=this.test()?this.trueBranch:this.falseBranch;return G.connect(d,g)},m}(),pf=fg,iI=function(){function m(d){this.strategy=d}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.strategy.connect(d,function(A,Q){Q&&G.abort(),g(A,Q)});return G},m}(),lI=iI;function Il(m){return function(){return m.isSupported()}}var _g=function(m,d,g){var G={};function A(Ar,Mg,Ag,jI,Lg){var w=g(m,Ar,Mg,Ag,jI,Lg);return G[Ar]=w,w}var Q=Object.assign({},d,{hostNonTLS:m.wsHost+":"+m.wsPort,hostTLS:m.wsHost+":"+m.wssPort,httpPath:m.wsPath}),Te=Object.assign({},Q,{useTLS:!0}),_n=Object.assign({},d,{hostNonTLS:m.httpHost+":"+m.httpPort,hostTLS:m.httpHost+":"+m.httpsPort,httpPath:m.httpPath}),ha={loop:!0,timeout:15e3,timeoutLimit:6e4},Rt=new lg({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),Xt=new lg({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),Io=A("ws","ws",3,Q,Rt),fi=A("wss","ws",3,Te,Rt),LI=A("sockjs","sockjs",1,_n),Eg=A("xhr_streaming","xhr_streaming",1,_n,Xt),Ig=A("xdr_streaming","xdr_streaming",1,_n,Xt),Tg=A("xhr_polling","xhr_polling",1,_n),PI=A("xdr_polling","xdr_polling",1,_n),Sg=new Kc([Io],ha),xI=new Kc([fi],ha),NI=new Kc([LI],ha),Cg=new Kc([new pf(Il(Eg),Eg,Ig)],ha),Fg=new Kc([new pf(Il(Tg),Tg,PI)],ha),Gg=new Kc([new pf(Il(Cg),new Fd([Cg,new i0(Fg,{delay:4e3})]),Fg)],ha),jd=new pf(Il(Gg),Gg,NI),Od;return d.useTLS?Od=new Fd([Sg,new i0(jd,{delay:2e3})]):Od=new Fd([Sg,new i0(xI,{delay:2e3}),new i0(jd,{delay:5e3})]),new rI(new lI(new pf(Il(Io),Od,jd)),G,{ttl:18e5,timeline:d.timeline,useTLS:d.useTLS})},cI=_g,sI=function(){var m=this;m.timeline.info(m.buildTimelineMessage({transport:m.name+(m.options.useTLS?"s":"")})),m.hooks.isInitialized()?m.changeState("initialized"):m.hooks.file?(m.changeState("initializing"),p.load(m.hooks.file,{useTLS:m.options.useTLS},function(d,g){m.hooks.isInitialized()?(m.changeState("initialized"),g(!0)):(d&&m.onError(d),m.onClose(),g(!1))})):m.onClose()},pg={getRequest:function(m){var d=new window.XDomainRequest;return d.ontimeout=function(){m.emit("error",new Qc),m.close()},d.onerror=function(g){m.emit("error",g),m.close()},d.onprogress=function(){d.responseText&&d.responseText.length>0&&m.onChunk(200,d.responseText)},d.onload=function(){d.responseText&&d.responseText.length>0&&m.onChunk(200,d.responseText),m.emit("finished",200),m.close()},d},abortRequest:function(m){m.ontimeout=m.onerror=m.onprogress=m.onload=null,m.abort()}},vI=pg,dg=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),fI=256*1024,mg=function(m){dg(d,m);function d(g,G,A){var Q=m.call(this)||this;return Q.hooks=g,Q.method=G,Q.url=A,Q}return d.prototype.start=function(g){var G=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){G.close()},za.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(g)},d.prototype.close=function(){this.unloader&&(za.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},d.prototype.onChunk=function(g,G){for(;;){var A=this.advanceBuffer(G);if(A)this.emit("chunk",{status:g,data:A});else break}this.isBufferTooLong(G)&&this.emit("buffer_too_long")},d.prototype.advanceBuffer=function(g){var G=g.slice(this.position),A=G.indexOf(` `);return A!==-1?(this.position+=A+1,G.slice(0,A)):null},d.prototype.isBufferTooLong=function(g){return this.position===g.length&&g.length>fI},d}(pa),hg=mg,df;(function(m){m[m.CONNECTING=0]="CONNECTING",m[m.OPEN=1]="OPEN",m[m.CLOSED=3]="CLOSED"})(df||(df={}));var Bi=df,_I=1,Dg=function(){function m(d,g){this.hooks=d,this.session=Au(1e3)+"/"+Tl(8),this.location=pI(g),this.readyState=Bi.CONNECTING,this.openStream()}return m.prototype.send=function(d){return this.sendRaw(JSON.stringify([d]))},m.prototype.ping=function(){this.hooks.sendHeartbeat(this)},m.prototype.close=function(d,g){this.onClose(d,g,!0)},m.prototype.sendRaw=function(d){if(this.readyState===Bi.OPEN)try{return za.createSocketRequest("POST",Ad(dI(this.location,this.session))).start(d),!0}catch{return!1}else return!1},m.prototype.reconnect=function(){this.closeStream(),this.openStream()},m.prototype.onClose=function(d,g,G){this.closeStream(),this.readyState=Bi.CLOSED,this.onclose&&this.onclose({code:d,reason:g,wasClean:G})},m.prototype.onChunk=function(d){if(d.status===200){this.readyState===Bi.OPEN&&this.onActivity();var g,G=d.data.slice(0,1);switch(G){case"o":g=JSON.parse(d.data.slice(1)||"{}"),this.onOpen(g);break;case"a":g=JSON.parse(d.data.slice(1)||"[]");for(var A=0;A0&&m.onChunk(g.status,g.responseText);break;case 4:g.responseText&&g.responseText.length>0&&m.onChunk(g.status,g.responseText),m.emit("finished",g.status),m.close();break}},g},abortRequest:function(m){m.onreadystatechange=null,m.abort()}},$a=Rg,Yc={createStreamingSocket:function(m){return this.createSocket(DI,m)},createPollingSocket:function(m){return this.createSocket(RI,m)},createSocket:function(m,d){return new mI(m,d)},createXHR:function(m,d){return this.createRequest($a,m,d)},createRequest:function(m,d,g){return new hg(m,d,g)}},Ld=Yc;Ld.createXDR=function(m,d){return this.createRequest(vI,m,d)};var yI=Ld,bI={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:h,getDefaultStrategy:cI,Transports:Eo,transportConnectionInitializer:sI,HTTPFactory:yI,TimelineTransport:ie,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(m){var d=this;window.Pusher=m;var g=function(){d.onDocumentBody(m.ready)};window.JSON?g():p.load("json2",{},g)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:q,jsonp:j}},onDocumentBody:function(m){var d=this;document.body?m():setTimeout(function(){d.onDocumentBody(m)},0)},createJSONPRequest:function(m,d){return new J(m,d)},createScriptRequest:function(m){return new P(m)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var m=this.getXHRAPI();return new m},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return vi},createWebSocket:function(m){var d=this.getWebSocketAPI();return new d(m)},createSocketRequest:function(m,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(m,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(m,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var m=this.getXHRAPI();return Boolean(m)&&new m().withCredentials!==void 0},isXDRSupported:function(m){var d=m?"https:":"http:",g=this.getProtocol();return Boolean(window.XDomainRequest)&&g===d},addUnloadListener:function(m){window.addEventListener!==void 0?window.addEventListener("unload",m,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",m)},removeUnloadListener:function(m){window.addEventListener!==void 0?window.removeEventListener("unload",m,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",m)}},za=bI,l0;(function(m){m[m.ERROR=3]="ERROR",m[m.INFO=6]="INFO",m[m.DEBUG=7]="DEBUG"})(l0||(l0={}));var c0=l0,wI=function(){function m(d,g,G){this.key=d,this.session=g,this.events=[],this.options=G||{},this.sent=0,this.uniqueID=0}return m.prototype.log=function(d,g){d<=this.options.level&&(this.events.push(je({},g,{timestamp:Ie.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},m.prototype.error=function(d){this.log(c0.ERROR,d)},m.prototype.info=function(d){this.log(c0.INFO,d)},m.prototype.debug=function(d){this.log(c0.DEBUG,d)},m.prototype.isEmpty=function(){return this.events.length===0},m.prototype.send=function(d,g){var G=this,A=je({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,Te){Q||G.sent++,g&&g(Q,Te)}),!0},m.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},m}(),yg=wI,Pd=function(){function m(d,g,G,A){this.name=d,this.priority=g,this.transport=G,this.options=A||{}}return m.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},m.prototype.connect=function(d,g){var G=this;if(this.isSupported()){if(this.priority{"use strict";var Mve="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";GU.exports=Mve});var xU=Ae((bfa,PU)=>{"use strict";var Ave=MU();function AU(){}function LU(){}LU.resetWarningCache=AU;PU.exports=function(){function e(t,r,u,i,l,s){if(s!==Ave){var h=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 h.name="Invariant Violation",h}}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:LU,resetWarningCache:AU};return a.PropTypes=a,a}});var jU=Ae((Ifa,NU)=>{NU.exports=xU()();var wfa,Efa});var GF=Ae(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var OU=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Ib=OU.join(","),UU=typeof Element=="undefined",y_=UU?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,CF=!UU&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},kU=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(Ib));return a&&y_.call(n,Ib)&&r.unshift(n),r=r.filter(t),r},BU=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,h=e(s,!0,t);t.flatten?r.push.apply(r,h):r.push({scope:i,candidates:h})}else{var p=y_.call(i,Ib);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var y=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(y&&E){var b=e(y===!0?i.children:y.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},HU=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},Lve=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},qU=function(n){return n.tagName==="INPUT"},Pve=function(n){return qU(n)&&n.type==="hidden"},xve=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},Nve=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(y_.call(i,"details:not([open]) *"))return!0;var l=CF(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 h=n;n;){var p=n.parentElement,y=CF(n);if(p&&!p.shadowRoot&&r(p)===!0)return WU(n);n.assignedSlot?n=n.assignedSlot:!p&&y!==n.ownerDocument?n=y.host:n=p}n=h}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return WU(n);return!1},Bve=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)},qve=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=HU(l,i),h=i?e(r.candidates):l;s===0?i?a.push.apply(a,h):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:h})}),t.sort(Lve).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},Wve=function(n,a){a=a||{};var t;return a.getShadowRoot?t=BU([n],a.includeContainer,{filter:FF.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:Hve}):t=kU(n,a.includeContainer,FF.bind(null,a)),qve(t)},Jve=function(n,a){a=a||{};var t;return a.getShadowRoot?t=BU([n],a.includeContainer,{filter:Tb.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=kU(n,a.includeContainer,Tb.bind(null,a)),t},$ve=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return y_.call(n,Ib)===!1?!1:FF(a,n)},zve=OU.concat("iframe").join(","),Vve=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return y_.call(n,zve)===!1?!1:Tb(a,n)};Fp.focusable=Jve;Fp.isFocusable=Vve;Fp.isTabbable=$ve;Fp.tabbable=Wve});var KU=Ae(MF=>{"use strict";Object.defineProperty(MF,"__esModule",{value:!0});var Ls=GF();function JU(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 $U(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()}}}(),Kve=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},Yve=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},Xve=function(n){return n.key==="Tab"||n.keyCode===9},VU=function(n){return setTimeout(n,0)},QU=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},mh=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?he-1:0),ce=1;ce=0)Y=t.activeElement;else{var te=u.tabbableGroups[0],he=te&&te.firstTabbableNode;Y=he||h("fallbackFocus")}if(!Y)throw new Error("Your focus-trap needs to have at least one focusable element");return Y},y=function(){if(u.containerGroups=u.containers.map(function(Y){var te=Ls.tabbable(Y,r.tabbableOptions),he=Ls.focusable(Y,r.tabbableOptions);return{container:Y,tabbableNodes:te,focusableNodes:he,firstTabbableNode:te.length>0?te[0]:null,lastTabbableNode:te.length>0?te[te.length-1]:null,nextTabbableNode:function(ce){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Fe=he.findIndex(function(Ie){return Ie===ce});if(!(Fe<0))return le?he.slice(Fe+1).find(function(Ie){return Ls.isTabbable(Ie,r.tabbableOptions)}):he.slice(0,Fe).reverse().find(function(Ie){return Ls.isTabbable(Ie,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Y){return Y.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!h("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 X(Y){if(Y!==!1&&Y!==t.activeElement){if(!Y||!Y.focus){X(p());return}Y.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Y,Kve(Y)&&Y.select()}},b=function(Y){var te=h("setReturnFocus",Y);return te||(te===!1?!1:Y)},T=function(Y){var te=Sb(Y);if(!(s(te)>=0)){if(mh(r.clickOutsideDeactivates,Y)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Ls.isFocusable(te,r.tabbableOptions)});return}mh(r.allowOutsideClick,Y)||Y.preventDefault()}},L=function(Y){var te=Sb(Y),he=s(te)>=0;he||te instanceof Document?he&&(u.mostRecentlyFocusedNode=te):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},O=function(Y){var te=Sb(Y);y();var he=null;if(u.tabbableGroups.length>0){var Be=s(te),ce=Be>=0?u.containerGroups[Be]:void 0;if(Be<0)Y.shiftKey?he=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:he=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var le=QU(u.tabbableGroups,function(Kn){var In=Kn.firstTabbableNode;return te===In});if(le<0&&(ce.container===te||Ls.isFocusable(te,r.tabbableOptions)&&!Ls.isTabbable(te,r.tabbableOptions)&&!ce.nextTabbableNode(te,!1))&&(le=Be),le>=0){var Fe=le===0?u.tabbableGroups.length-1:le-1,Ie=u.tabbableGroups[Fe];he=Ie.lastTabbableNode}}else{var je=QU(u.tabbableGroups,function(Kn){var In=Kn.lastTabbableNode;return te===In});if(je<0&&(ce.container===te||Ls.isFocusable(te,r.tabbableOptions)&&!Ls.isTabbable(te,r.tabbableOptions)&&!ce.nextTabbableNode(te))&&(je=Be),je>=0){var Ze=je===u.tabbableGroups.length-1?0:je+1,Tn=u.tabbableGroups[Ze];he=Tn.firstTabbableNode}}}else he=h("fallbackFocus");he&&(Y.preventDefault(),E(he))},$=function(Y){if(Yve(Y)&&mh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(Xve(Y)){O(Y);return}},z=function(Y){var te=Sb(Y);s(te)>=0||mh(r.clickOutsideDeactivates,Y)||mh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},ee=function(){if(!!u.active)return zU.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?VU(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",T,{capture:!0,passive:!1}),t.addEventListener("touchstart",T,{capture:!0,passive:!1}),t.addEventListener("click",z,{capture:!0,passive:!1}),t.addEventListener("keydown",$,{capture:!0,passive:!1}),i},ue=function(){if(!!u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",T,!0),t.removeEventListener("touchstart",T,!0),t.removeEventListener("click",z,!0),t.removeEventListener("keydown",$,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Y){if(u.active)return this;var te=l(Y,"onActivate"),he=l(Y,"onPostActivate"),Be=l(Y,"checkCanFocusTrap");Be||y(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,te&&te();var ce=function(){Be&&y(),ee(),he&&he()};return Be?(Be(u.containers.concat()).then(ce,ce),this):(ce(),this)},deactivate:function(Y){if(!u.active)return this;var te=$U({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,zU.deactivateTrap(i);var he=l(te,"onDeactivate"),Be=l(te,"onPostDeactivate"),ce=l(te,"checkCanReturnFocus"),le=l(te,"returnFocus","returnFocusOnDeactivate");he&&he();var Fe=function(){VU(function(){le&&E(b(u.nodeFocusedBeforeActivation)),Be&&Be()})};return le&&ce?(ce(b(u.nodeFocusedBeforeActivation)).then(Fe,Fe),this):(Fe(),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,y(),ee(),this)},updateContainerElements:function(Y){var te=[].concat(Y).filter(Boolean);return u.containers=te.map(function(he){return typeof he=="string"?t.querySelector(he):he}),u.active&&y(),this}},i.updateContainerElements(n),i};MF.createFocusTrap=Zve});var ZU=Ae((Cfa,XU)=>{"use strict";function AF(e){return AF=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},AF(e)}function efe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function YU(e,n){for(var a=0;a1?p-1:0),E=1;E element.");var i=function(h){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(h):u.ref&&(u.ref.current=h)),r.focusTrapElements=p||[h]},l=Fb.cloneElement(u,{ref:i});return l}return null}}]),a}(Fb.Component),Dh=typeof Element=="undefined"?Function:Element;PF.propTypes={active:xa.bool,paused:xa.bool,focusTrapOptions:xa.shape({document:xa.object,onActivate:xa.func,onPostActivate:xa.func,checkCanFocusTrap:xa.func,onDeactivate:xa.func,onPostDeactivate:xa.func,checkCanReturnFocus:xa.func,initialFocus:xa.oneOfType([xa.instanceOf(Dh),xa.string,xa.bool,xa.func]),fallbackFocus:xa.oneOfType([xa.instanceOf(Dh),xa.string,xa.func]),escapeDeactivates:xa.oneOfType([xa.bool,xa.func]),clickOutsideDeactivates:xa.oneOfType([xa.bool,xa.func]),returnFocusOnDeactivate:xa.bool,setReturnFocus:xa.oneOfType([xa.instanceOf(Dh),xa.string,xa.bool,xa.func]),allowOutsideClick:xa.oneOfType([xa.bool,xa.func]),preventScroll:xa.bool,tabbableOptions:xa.shape({displayCheck:xa.oneOf(["full","non-zero-area","none"]),getShadowRoot:xa.oneOfType([xa.bool,xa.func])})}),containerElements:xa.arrayOf(xa.instanceOf(Dh)),children:xa.oneOfType([xa.element,xa.instanceOf(Dh)])};PF.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:lfe};XU.exports=PF});var l5=Ae(Ht=>{"use strict";var Ro=typeof Symbol=="function"&&Symbol.for,_G=Ro?Symbol.for("react.element"):60103,pG=Ro?Symbol.for("react.portal"):60106,Bb=Ro?Symbol.for("react.fragment"):60107,Hb=Ro?Symbol.for("react.strict_mode"):60108,qb=Ro?Symbol.for("react.profiler"):60114,Wb=Ro?Symbol.for("react.provider"):60109,Jb=Ro?Symbol.for("react.context"):60110,dG=Ro?Symbol.for("react.async_mode"):60111,$b=Ro?Symbol.for("react.concurrent_mode"):60111,zb=Ro?Symbol.for("react.forward_ref"):60112,Vb=Ro?Symbol.for("react.suspense"):60113,Ume=Ro?Symbol.for("react.suspense_list"):60120,Qb=Ro?Symbol.for("react.memo"):60115,Kb=Ro?Symbol.for("react.lazy"):60116,kme=Ro?Symbol.for("react.block"):60121,Bme=Ro?Symbol.for("react.fundamental"):60117,Hme=Ro?Symbol.for("react.responder"):60118,qme=Ro?Symbol.for("react.scope"):60119;function Mi(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case _G:switch(e=e.type,e){case dG:case $b:case Bb:case qb:case Hb:case Vb:return e;default:switch(e=e&&e.$$typeof,e){case Jb:case zb:case Kb:case Qb:case Wb:return e;default:return n}}case pG:return n}}}function i5(e){return Mi(e)===$b}Ht.AsyncMode=dG;Ht.ConcurrentMode=$b;Ht.ContextConsumer=Jb;Ht.ContextProvider=Wb;Ht.Element=_G;Ht.ForwardRef=zb;Ht.Fragment=Bb;Ht.Lazy=Kb;Ht.Memo=Qb;Ht.Portal=pG;Ht.Profiler=qb;Ht.StrictMode=Hb;Ht.Suspense=Vb;Ht.isAsyncMode=function(e){return i5(e)||Mi(e)===dG};Ht.isConcurrentMode=i5;Ht.isContextConsumer=function(e){return Mi(e)===Jb};Ht.isContextProvider=function(e){return Mi(e)===Wb};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_G};Ht.isForwardRef=function(e){return Mi(e)===zb};Ht.isFragment=function(e){return Mi(e)===Bb};Ht.isLazy=function(e){return Mi(e)===Kb};Ht.isMemo=function(e){return Mi(e)===Qb};Ht.isPortal=function(e){return Mi(e)===pG};Ht.isProfiler=function(e){return Mi(e)===qb};Ht.isStrictMode=function(e){return Mi(e)===Hb};Ht.isSuspense=function(e){return Mi(e)===Vb};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Bb||e===$b||e===qb||e===Hb||e===Vb||e===Ume||typeof e=="object"&&e!==null&&(e.$$typeof===Kb||e.$$typeof===Qb||e.$$typeof===Wb||e.$$typeof===Jb||e.$$typeof===zb||e.$$typeof===Bme||e.$$typeof===Hme||e.$$typeof===qme||e.$$typeof===kme)};Ht.typeOf=Mi});var s5=Ae((OPa,c5)=>{"use strict";c5.exports=l5()});var M_=Ae((XPa,Zb)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function Fhe(){this.__data__=[],this.size=0}n9.exports=Fhe});var UG=Ae((Hxa,t9)=>{function Ghe(e,n){return e===n||e!==e&&n!==n}t9.exports=Ghe});var Ph=Ae((qxa,r9)=>{var Mhe=UG();function Ahe(e,n){for(var a=e.length;a--;)if(Mhe(e[a][0],n))return a;return-1}r9.exports=Ahe});var u9=Ae((Wxa,o9)=>{var Lhe=Ph(),Phe=Array.prototype,xhe=Phe.splice;function Nhe(e){var n=this.__data__,a=Lhe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():xhe.call(n,a,1),--this.size,!0}o9.exports=Nhe});var l9=Ae((Jxa,i9)=>{var jhe=Ph();function Ohe(e){var n=this.__data__,a=jhe(n,e);return a<0?void 0:n[a][1]}i9.exports=Ohe});var s9=Ae(($xa,c9)=>{var Uhe=Ph();function khe(e){return Uhe(this.__data__,e)>-1}c9.exports=khe});var f9=Ae((zxa,v9)=>{var Bhe=Ph();function Hhe(e,n){var a=this.__data__,t=Bhe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}v9.exports=Hhe});var xh=Ae((Vxa,_9)=>{var qhe=a9(),Whe=u9(),Jhe=l9(),$he=s9(),zhe=f9();function jp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var Vhe=xh();function Qhe(){this.__data__=new Vhe,this.size=0}p9.exports=Qhe});var h9=Ae((Kxa,m9)=>{function Khe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}m9.exports=Khe});var g9=Ae((Yxa,D9)=>{function Yhe(e){return this.__data__.get(e)}D9.exports=Yhe});var y9=Ae((Xxa,R9)=>{function Xhe(e){return this.__data__.has(e)}R9.exports=Xhe});var kG=Ae((Zxa,b9)=>{var Zhe=typeof global=="object"&&global&&global.Object===Object&&global;b9.exports=Zhe});var Nc=Ae((eNa,w9)=>{var eDe=kG(),nDe=typeof self=="object"&&self&&self.Object===Object&&self,aDe=eDe||nDe||Function("return this")();w9.exports=aDe});var yw=Ae((nNa,E9)=>{var tDe=Nc(),rDe=tDe.Symbol;E9.exports=rDe});var C9=Ae((aNa,S9)=>{var I9=yw(),T9=Object.prototype,oDe=T9.hasOwnProperty,uDe=T9.toString,Nh=I9?I9.toStringTag:void 0;function iDe(e){var n=oDe.call(e,Nh),a=e[Nh];try{e[Nh]=void 0;var t=!0}catch{}var r=uDe.call(e);return t&&(n?e[Nh]=a:delete e[Nh]),r}S9.exports=iDe});var G9=Ae((tNa,F9)=>{var lDe=Object.prototype,cDe=lDe.toString;function sDe(e){return cDe.call(e)}F9.exports=sDe});var jh=Ae((rNa,L9)=>{var M9=yw(),vDe=C9(),fDe=G9(),_De="[object Null]",pDe="[object Undefined]",A9=M9?M9.toStringTag:void 0;function dDe(e){return e==null?e===void 0?pDe:_De:A9&&A9 in Object(e)?vDe(e):fDe(e)}L9.exports=dDe});var BG=Ae((oNa,P9)=>{function mDe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}P9.exports=mDe});var HG=Ae((uNa,x9)=>{var hDe=jh(),DDe=BG(),gDe="[object AsyncFunction]",RDe="[object Function]",yDe="[object GeneratorFunction]",bDe="[object Proxy]";function wDe(e){if(!DDe(e))return!1;var n=hDe(e);return n==RDe||n==yDe||n==gDe||n==bDe}x9.exports=wDe});var j9=Ae((iNa,N9)=>{var EDe=Nc(),IDe=EDe["__core-js_shared__"];N9.exports=IDe});var k9=Ae((lNa,U9)=>{var qG=j9(),O9=function(){var e=/[^.]+$/.exec(qG&&qG.keys&&qG.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function TDe(e){return!!O9&&O9 in e}U9.exports=TDe});var WG=Ae((cNa,B9)=>{var SDe=Function.prototype,CDe=SDe.toString;function FDe(e){if(e!=null){try{return CDe.call(e)}catch{}try{return e+""}catch{}}return""}B9.exports=FDe});var q9=Ae((sNa,H9)=>{var GDe=HG(),MDe=k9(),ADe=BG(),LDe=WG(),PDe=/[\\^$.*+?()[\]{}|]/g,xDe=/^\[object .+?Constructor\]$/,NDe=Function.prototype,jDe=Object.prototype,ODe=NDe.toString,UDe=jDe.hasOwnProperty,kDe=RegExp("^"+ODe.call(UDe).replace(PDe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BDe(e){if(!ADe(e)||MDe(e))return!1;var n=GDe(e)?kDe:xDe;return n.test(LDe(e))}H9.exports=BDe});var J9=Ae((vNa,W9)=>{function HDe(e,n){return e==null?void 0:e[n]}W9.exports=HDe});var L_=Ae((fNa,$9)=>{var qDe=q9(),WDe=J9();function JDe(e,n){var a=WDe(e,n);return qDe(a)?a:void 0}$9.exports=JDe});var bw=Ae((_Na,z9)=>{var $De=L_(),zDe=Nc(),VDe=$De(zDe,"Map");z9.exports=VDe});var Oh=Ae((pNa,V9)=>{var QDe=L_(),KDe=QDe(Object,"create");V9.exports=KDe});var Y9=Ae((dNa,K9)=>{var Q9=Oh();function YDe(){this.__data__=Q9?Q9(null):{},this.size=0}K9.exports=YDe});var Z9=Ae((mNa,X9)=>{function XDe(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}X9.exports=XDe});var nk=Ae((hNa,ek)=>{var ZDe=Oh(),ege="__lodash_hash_undefined__",nge=Object.prototype,age=nge.hasOwnProperty;function tge(e){var n=this.__data__;if(ZDe){var a=n[e];return a===ege?void 0:a}return age.call(n,e)?n[e]:void 0}ek.exports=tge});var tk=Ae((DNa,ak)=>{var rge=Oh(),oge=Object.prototype,uge=oge.hasOwnProperty;function ige(e){var n=this.__data__;return rge?n[e]!==void 0:uge.call(n,e)}ak.exports=ige});var ok=Ae((gNa,rk)=>{var lge=Oh(),cge="__lodash_hash_undefined__";function sge(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=lge&&n===void 0?cge:n,this}rk.exports=sge});var ik=Ae((RNa,uk)=>{var vge=Y9(),fge=Z9(),_ge=nk(),pge=tk(),dge=ok();function Op(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var lk=ik(),mge=xh(),hge=bw();function Dge(){this.size=0,this.__data__={hash:new lk,map:new(hge||mge),string:new lk}}ck.exports=Dge});var fk=Ae((bNa,vk)=>{function gge(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}vk.exports=gge});var Uh=Ae((wNa,_k)=>{var Rge=fk();function yge(e,n){var a=e.__data__;return Rge(n)?a[typeof n=="string"?"string":"hash"]:a.map}_k.exports=yge});var dk=Ae((ENa,pk)=>{var bge=Uh();function wge(e){var n=bge(this,e).delete(e);return this.size-=n?1:0,n}pk.exports=wge});var hk=Ae((INa,mk)=>{var Ege=Uh();function Ige(e){return Ege(this,e).get(e)}mk.exports=Ige});var gk=Ae((TNa,Dk)=>{var Tge=Uh();function Sge(e){return Tge(this,e).has(e)}Dk.exports=Sge});var yk=Ae((SNa,Rk)=>{var Cge=Uh();function Fge(e,n){var a=Cge(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}Rk.exports=Fge});var JG=Ae((CNa,bk)=>{var Gge=sk(),Mge=dk(),Age=hk(),Lge=gk(),Pge=yk();function Up(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var xge=xh(),Nge=bw(),jge=JG(),Oge=200;function Uge(e,n){var a=this.__data__;if(a instanceof xge){var t=a.__data__;if(!Nge||t.length{var kge=xh(),Bge=d9(),Hge=h9(),qge=g9(),Wge=y9(),Jge=Ek();function kp(e){var n=this.__data__=new kge(e);this.size=n.size}kp.prototype.clear=Bge;kp.prototype.delete=Hge;kp.prototype.get=qge;kp.prototype.has=Wge;kp.prototype.set=Jge;Ik.exports=kp});var Ck=Ae((MNa,Sk)=>{var $ge="__lodash_hash_undefined__";function zge(e){return this.__data__.set(e,$ge),this}Sk.exports=zge});var Gk=Ae((ANa,Fk)=>{function Vge(e){return this.__data__.has(e)}Fk.exports=Vge});var Ak=Ae((LNa,Mk)=>{var Qge=JG(),Kge=Ck(),Yge=Gk();function ww(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new Qge;++n{function Xge(e,n){for(var a=-1,t=e==null?0:e.length;++a{function Zge(e,n){return e.has(n)}xk.exports=Zge});var $G=Ae((NNa,jk)=>{var eRe=Ak(),nRe=Pk(),aRe=Nk(),tRe=1,rRe=2;function oRe(e,n,a,t,r,u){var i=a&tRe,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var h=u.get(e),p=u.get(n);if(h&&p)return h==n&&p==e;var y=-1,E=!0,b=a&rRe?new eRe:void 0;for(u.set(e,n),u.set(n,e);++y{var uRe=Nc(),iRe=uRe.Uint8Array;Ok.exports=iRe});var Bk=Ae((ONa,kk)=>{function lRe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}kk.exports=lRe});var qk=Ae((UNa,Hk)=>{function cRe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}Hk.exports=cRe});var Vk=Ae((kNa,zk)=>{var Wk=yw(),Jk=Uk(),sRe=UG(),vRe=$G(),fRe=Bk(),_Re=qk(),pRe=1,dRe=2,mRe="[object Boolean]",hRe="[object Date]",DRe="[object Error]",gRe="[object Map]",RRe="[object Number]",yRe="[object RegExp]",bRe="[object Set]",wRe="[object String]",ERe="[object Symbol]",IRe="[object ArrayBuffer]",TRe="[object DataView]",$k=Wk?Wk.prototype:void 0,zG=$k?$k.valueOf:void 0;function SRe(e,n,a,t,r,u,i){switch(a){case TRe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case IRe:return!(e.byteLength!=n.byteLength||!u(new Jk(e),new Jk(n)));case mRe:case hRe:case RRe:return sRe(+e,+n);case DRe:return e.name==n.name&&e.message==n.message;case yRe:case wRe:return e==n+"";case gRe:var l=fRe;case bRe:var s=t&pRe;if(l||(l=_Re),e.size!=n.size&&!s)return!1;var h=i.get(e);if(h)return h==n;t|=dRe,i.set(e,n);var p=vRe(l(e),l(n),t,r,u,i);return i.delete(e),p;case ERe:if(zG)return zG.call(e)==zG.call(n)}return!1}zk.exports=SRe});var Kk=Ae((BNa,Qk)=>{function CRe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var FRe=Array.isArray;Yk.exports=FRe});var Zk=Ae((qNa,Xk)=>{var GRe=Kk(),MRe=Ew();function ARe(e,n,a){var t=n(e);return MRe(e)?t:GRe(t,a(e))}Xk.exports=ARe});var nB=Ae((WNa,eB)=>{function LRe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function PRe(){return[]}aB.exports=PRe});var uB=Ae(($Na,oB)=>{var xRe=nB(),NRe=tB(),jRe=Object.prototype,ORe=jRe.propertyIsEnumerable,rB=Object.getOwnPropertySymbols,URe=rB?function(e){return e==null?[]:(e=Object(e),xRe(rB(e),function(n){return ORe.call(e,n)}))}:NRe;oB.exports=URe});var lB=Ae((zNa,iB)=>{function kRe(e,n){for(var a=-1,t=Array(e);++a{function BRe(e){return e!=null&&typeof e=="object"}cB.exports=BRe});var vB=Ae((QNa,sB)=>{var HRe=jh(),qRe=kh(),WRe="[object Arguments]";function JRe(e){return qRe(e)&&HRe(e)==WRe}sB.exports=JRe});var dB=Ae((KNa,pB)=>{var fB=vB(),$Re=kh(),_B=Object.prototype,zRe=_B.hasOwnProperty,VRe=_B.propertyIsEnumerable,QRe=fB(function(){return arguments}())?fB:function(e){return $Re(e)&&zRe.call(e,"callee")&&!VRe.call(e,"callee")};pB.exports=QRe});var hB=Ae((YNa,mB)=>{function KRe(){return!1}mB.exports=KRe});var VG=Ae((Bh,Bp)=>{var YRe=Nc(),XRe=hB(),DB=typeof Bh=="object"&&Bh&&!Bh.nodeType&&Bh,gB=DB&&typeof Bp=="object"&&Bp&&!Bp.nodeType&&Bp,ZRe=gB&&gB.exports===DB,RB=ZRe?YRe.Buffer:void 0,eye=RB?RB.isBuffer:void 0,nye=eye||XRe;Bp.exports=nye});var bB=Ae((XNa,yB)=>{var aye=9007199254740991,tye=/^(?:0|[1-9]\d*)$/;function rye(e,n){var a=typeof e;return n=n==null?aye:n,!!n&&(a=="number"||a!="symbol"&&tye.test(e))&&e>-1&&e%1==0&&e{var oye=9007199254740991;function uye(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oye}wB.exports=uye});var IB=Ae((eja,EB)=>{var iye=jh(),lye=QG(),cye=kh(),sye="[object Arguments]",vye="[object Array]",fye="[object Boolean]",_ye="[object Date]",pye="[object Error]",dye="[object Function]",mye="[object Map]",hye="[object Number]",Dye="[object Object]",gye="[object RegExp]",Rye="[object Set]",yye="[object String]",bye="[object WeakMap]",wye="[object ArrayBuffer]",Eye="[object DataView]",Iye="[object Float32Array]",Tye="[object Float64Array]",Sye="[object Int8Array]",Cye="[object Int16Array]",Fye="[object Int32Array]",Gye="[object Uint8Array]",Mye="[object Uint8ClampedArray]",Aye="[object Uint16Array]",Lye="[object Uint32Array]",ir={};ir[Iye]=ir[Tye]=ir[Sye]=ir[Cye]=ir[Fye]=ir[Gye]=ir[Mye]=ir[Aye]=ir[Lye]=!0;ir[sye]=ir[vye]=ir[wye]=ir[fye]=ir[Eye]=ir[_ye]=ir[pye]=ir[dye]=ir[mye]=ir[hye]=ir[Dye]=ir[gye]=ir[Rye]=ir[yye]=ir[bye]=!1;function Pye(e){return cye(e)&&lye(e.length)&&!!ir[iye(e)]}EB.exports=Pye});var SB=Ae((nja,TB)=>{function xye(e){return function(n){return e(n)}}TB.exports=xye});var FB=Ae((qh,Hp)=>{var Nye=kG(),CB=typeof qh=="object"&&qh&&!qh.nodeType&&qh,Hh=CB&&typeof Hp=="object"&&Hp&&!Hp.nodeType&&Hp,jye=Hh&&Hh.exports===CB,KG=jye&&Nye.process,Oye=function(){try{var e=Hh&&Hh.require&&Hh.require("util").types;return e||KG&&KG.binding&&KG.binding("util")}catch{}}();Hp.exports=Oye});var YG=Ae((aja,AB)=>{var Uye=IB(),kye=SB(),GB=FB(),MB=GB&&GB.isTypedArray,Bye=MB?kye(MB):Uye;AB.exports=Bye});var PB=Ae((tja,LB)=>{var Hye=lB(),qye=dB(),Wye=Ew(),Jye=VG(),$ye=bB(),zye=YG(),Vye=Object.prototype,Qye=Vye.hasOwnProperty;function Kye(e,n){var a=Wye(e),t=!a&&qye(e),r=!a&&!t&&Jye(e),u=!a&&!t&&!r&&zye(e),i=a||t||r||u,l=i?Hye(e.length,String):[],s=l.length;for(var h in e)(n||Qye.call(e,h))&&!(i&&(h=="length"||r&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||$ye(h,s)))&&l.push(h);return l}LB.exports=Kye});var NB=Ae((rja,xB)=>{var Yye=Object.prototype;function Xye(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||Yye;return e===a}xB.exports=Xye});var OB=Ae((oja,jB)=>{function Zye(e,n){return function(a){return e(n(a))}}jB.exports=Zye});var kB=Ae((uja,UB)=>{var ebe=OB(),nbe=ebe(Object.keys,Object);UB.exports=nbe});var HB=Ae((ija,BB)=>{var abe=NB(),tbe=kB(),rbe=Object.prototype,obe=rbe.hasOwnProperty;function ube(e){if(!abe(e))return tbe(e);var n=[];for(var a in Object(e))obe.call(e,a)&&a!="constructor"&&n.push(a);return n}BB.exports=ube});var WB=Ae((lja,qB)=>{var ibe=HG(),lbe=QG();function cbe(e){return e!=null&&lbe(e.length)&&!ibe(e)}qB.exports=cbe});var $B=Ae((cja,JB)=>{var sbe=PB(),vbe=HB(),fbe=WB();function _be(e){return fbe(e)?sbe(e):vbe(e)}JB.exports=_be});var VB=Ae((sja,zB)=>{var pbe=Zk(),dbe=uB(),mbe=$B();function hbe(e){return pbe(e,mbe,dbe)}zB.exports=hbe});var YB=Ae((vja,KB)=>{var QB=VB(),Dbe=1,gbe=Object.prototype,Rbe=gbe.hasOwnProperty;function ybe(e,n,a,t,r,u){var i=a&Dbe,l=QB(e),s=l.length,h=QB(n),p=h.length;if(s!=p&&!i)return!1;for(var y=s;y--;){var E=l[y];if(!(i?E in n:Rbe.call(n,E)))return!1}var b=u.get(e),T=u.get(n);if(b&&T)return b==n&&T==e;var L=!0;u.set(e,n),u.set(n,e);for(var O=i;++y{var bbe=L_(),wbe=Nc(),Ebe=bbe(wbe,"DataView");XB.exports=Ebe});var nH=Ae((_ja,eH)=>{var Ibe=L_(),Tbe=Nc(),Sbe=Ibe(Tbe,"Promise");eH.exports=Sbe});var tH=Ae((pja,aH)=>{var Cbe=L_(),Fbe=Nc(),Gbe=Cbe(Fbe,"Set");aH.exports=Gbe});var oH=Ae((dja,rH)=>{var Mbe=L_(),Abe=Nc(),Lbe=Mbe(Abe,"WeakMap");rH.exports=Lbe});var _H=Ae((mja,fH)=>{var XG=ZB(),ZG=bw(),eM=nH(),nM=tH(),aM=oH(),uH=jh(),qp=WG(),iH="[object Map]",Pbe="[object Object]",lH="[object Promise]",cH="[object Set]",sH="[object WeakMap]",vH="[object DataView]",xbe=qp(XG),Nbe=qp(ZG),jbe=qp(eM),Obe=qp(nM),Ube=qp(aM),P_=uH;(XG&&P_(new XG(new ArrayBuffer(1)))!=vH||ZG&&P_(new ZG)!=iH||eM&&P_(eM.resolve())!=lH||nM&&P_(new nM)!=cH||aM&&P_(new aM)!=sH)&&(P_=function(e){var n=uH(e),a=n==Pbe?e.constructor:void 0,t=a?qp(a):"";if(t)switch(t){case xbe:return vH;case Nbe:return iH;case jbe:return lH;case Obe:return cH;case Ube:return sH}return n});fH.exports=P_});var yH=Ae((hja,RH)=>{var tM=Tk(),kbe=$G(),Bbe=Vk(),Hbe=YB(),pH=_H(),dH=Ew(),mH=VG(),qbe=YG(),Wbe=1,hH="[object Arguments]",DH="[object Array]",Iw="[object Object]",Jbe=Object.prototype,gH=Jbe.hasOwnProperty;function $be(e,n,a,t,r,u){var i=dH(e),l=dH(n),s=i?DH:pH(e),h=l?DH:pH(n);s=s==hH?Iw:s,h=h==hH?Iw:h;var p=s==Iw,y=h==Iw,E=s==h;if(E&&mH(e)){if(!mH(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new tM),i||qbe(e)?kbe(e,n,a,t,r,u):Bbe(e,n,s,a,t,r,u);if(!(a&Wbe)){var b=p&&gH.call(e,"__wrapped__"),T=y&&gH.call(n,"__wrapped__");if(b||T){var L=b?e.value():e,O=T?n.value():n;return u||(u=new tM),r(L,O,a,t,u)}}return E?(u||(u=new tM),Hbe(e,n,a,t,r,u)):!1}RH.exports=$be});var IH=Ae((Dja,EH)=>{var zbe=yH(),bH=kh();function wH(e,n,a,t,r){return e===n?!0:e==null||n==null||!bH(e)&&!bH(n)?e!==e&&n!==n:zbe(e,n,a,t,wH,r)}EH.exports=wH});var SH=Ae((gja,TH)=>{var Vbe=IH();function Qbe(e,n){return Vbe(e,n)}TH.exports=Qbe});var lq=Ae((f8a,wwe)=>{wwe.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 JV=Ae((AD,eL)=>{typeof window!="undefined"&&function(n,a){typeof AD=="object"&&typeof eL=="object"?eL.exports=a():typeof define=="function"&&define.amd?define([],a):typeof AD=="object"?AD.Hls=a():n.Hls=a()}(AD,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,y,E){this.fn=p,this.context=y,this.once=E||!1}function l(p,y,E,b,T){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,b||p,T),O=r?r+y:y;return p._events[O]?p._events[O].fn?p._events[O]=[p._events[O],L]:p._events[O].push(L):(p._events[O]=L,p._eventsCount++),p}function s(p,y){--p._eventsCount==0?p._events=new u:delete p._events[y]}function h(){this._events=new u,this._eventsCount=0}h.prototype.eventNames=function(){var y=[],E,b;if(this._eventsCount===0)return y;for(b in E=this._events)t.call(E,b)&&y.push(r?b.slice(1):b);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(E)):y},h.prototype.listeners=function(y){var E=r?r+y:y,b=this._events[E];if(!b)return[];if(b.fn)return[b.fn];for(var T=0,L=b.length,O=new Array(L);T0},!1)}function p(y,E){for(var b={main:[E]},T={main:[]},L={main:{}};h(b);)for(var O=Object.keys(b),$=0;$>>8^Wn&255^99,ee[Tn]=Wn,ue[Wn]=Tn;var Qn=Ze[Tn],Jn=Ze[Qn],_t=Ze[Jn],He=Ze[Wn]*257^Wn*16843008;Y[Tn]=He<<24|He>>>8,te[Tn]=He<<16|He>>>16,he[Tn]=He<<8|He>>>24,Be[Tn]=He,He=_t*16843009^Jn*65537^Qn*257^Tn*16843008,le[Wn]=He<<24|He>>>8,Fe[Wn]=He<<16|He>>>16,Ie[Wn]=He<<8|He>>>24,je[Wn]=He,Tn?(Tn=Qn^Ze[Ze[Ze[_t^Qn]]],Kn^=Ze[Ze[Kn]]):Tn=Kn=1}},$.expandKey=function(ee){for(var ue=this.uint8ArrayToUint32Array_(ee),X=!0,Y=0;Y>>6)+1,N=(K[j+2]&60)>>>2,N>Se.length-1){q.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+N});return}return V=(K[j+2]&1)<<2,V|=(K[j+3]&192)>>>6,l.logger.log("manifest codec:"+I+",ADTS data:type:"+P+",sampleingIndex:"+N+"["+Se[N]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?N>=6?(P=5,se=new Array(4),J=N-3):(P=2,se=new Array(2),J=N):ie.indexOf("android")!==-1?(P=2,se=new Array(2),J=N):(P=5,se=new Array(4),I&&(I.indexOf("mp4a.40.29")!==-1||I.indexOf("mp4a.40.5")!==-1)||!I&&N>=6?J=N-3:((I&&I.indexOf("mp4a.40.2")!==-1&&(N>=6&&V===1||/vivaldi/i.test(ie))||!I&&V===1)&&(P=2,se=new Array(2)),J=N)),se[0]=P<<3,se[0]|=(N&14)>>1,se[1]|=(N&1)<<7,se[1]|=V<<3,P===5&&(se[1]|=(J&14)>>1,se[2]=(J&1)<<7,se[2]|=2<<2,se[3]=0),{config:se,samplerate:Se[N],channelCount:V,codec:"mp4a.40."+P,manifestCodec:ge}}function p(q,K){return q[K]===255&&(q[K+1]&246)==240}function y(q,K){return q[K+1]&1?7:9}function E(q,K){return(q[K+3]&3)<<11|q[K+4]<<3|(q[K+5]&224)>>>5}function b(q,K){return!!(K+10&&K+N+J<=se)return V=j+I*P,{headerLength:N,frameLength:J,stamp:V}}function z(q,K,j,I,P){var N=O(q.samplerate),J=$(K,j,I,P,N);if(J){var V=J.stamp,se=J.headerLength,ie=J.frameLength,ge={unit:K.subarray(j+se,j+se+ie),pts:V,dts:V};return q.samples.push(ge),{sample:ge,length:ie+se}}}var ee=a("./src/demux/id3.js"),ue=function(){function q(j,I,P){this.observer=j,this.config=P,this.remuxer=I}var K=q.prototype;return K.resetInitSegment=function(I,P,N,J){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:P,duration:J,inputTimeScale:9e4}},K.resetTimeStamp=function(){},q.probe=function(I){if(!I)return!1;for(var P=ee.default.getID3Data(I,0)||[],N=P.length,J=I.length;Nj.length)){var J=this.parseHeader(j,I);if(J&&I+J.frameLength<=j.length){var V=J.samplesPerFrame*9e4/J.sampleRate,se=P+N*V,ie={unit:j.subarray(I,I+J.frameLength),pts:se,dts:se};return K.config=[],K.channelCount=J.channelCount,K.samplerate=J.sampleRate,K.samples.push(ie),{sample:ie,length:J.frameLength}}}},parseHeader:function(K,j){var I=K[j+1]>>3&3,P=K[j+1]>>1&3,N=K[j+2]>>4&15,J=K[j+2]>>2&3,V=K[j+2]>>1&1;if(I!==1&&N!==0&&N!==15&&J!==3){var se=I===3?3-P:P===3?3:4,ie=te.BitratesMap[se*14+N-1]*1e3,ge=I===3?0:I===2?1:2,Se=te.SamplingRateMap[ge*3+J],Me=K[j+3]>>6==3?1:2,Le=te.SamplesCoefficients[I][P],sn=te.BytesInSlot[P],mn=Le*8*sn,Ue=parseInt(Le*ie/Se+V,10)*sn;return{sampleRate:Se,channelCount:Me,frameLength:Ue,samplesPerFrame:mn}}},isHeaderPattern:function(K,j){return K[j]===255&&(K[j+1]&224)==224&&(K[j+1]&6)!=0},isHeader:function(K,j){return!!(j+1I?(this.word<<=I,this.bitsAvailable-=I):(I-=this.bitsAvailable,P=I>>3,I-=P>>3,this.bytesAvailable-=P,this.loadWord(),this.word<<=I,this.bitsAvailable-=I)},K.readBits=function(I){var P=Math.min(this.bitsAvailable,I),N=this.word>>>32-P;return I>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=P,this.bitsAvailable>0?this.word<<=P:this.bytesAvailable>0&&this.loadWord(),P=I-P,P>0&&this.bitsAvailable?N<>>I)!=0)return this.word<<=I,this.bitsAvailable-=I,I;return this.loadWord(),I+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var I=this.skipLZ();return this.readBits(I+1)-1},K.readEG=function(){var I=this.readUEG();return 1&I?1+I>>>1:-1*(I>>>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(I){var P=8,N=8,J,V;for(J=0;J=I.length){N();return}if(!(I[P].unit.length<32)){var J=this.decrypter.isSync();if(this.decryptAacSample(I,P,N,J),!J)return}}},K.getAvcEncryptedData=function(I){for(var P=Math.floor((I.length-48)/160)*16+16,N=new Int8Array(P),J=0,V=32;V<=I.length-16;V+=160,J+=16)N.set(I.subarray(V,V+16),J);return N},K.getAvcDecryptedUnit=function(I,P){P=new Uint8Array(P);for(var N=0,J=32;J<=I.length-16;J+=160,N+=16)I.set(P.subarray(N,N+16),J);return I},K.decryptAvcSample=function(I,P,N,J,V,se){var ie=this.discardEPB(V.data),ge=this.getAvcEncryptedData(ie),Se=this;this.decryptBuffer(ge.buffer,function(Me){V.data=Se.getAvcDecryptedUnit(ie,Me),se||Se.decryptAvcSamples(I,P,N+1,J)})},K.decryptAvcSamples=function(I,P,N,J){for(;;P++,N=0){if(P>=I.length){J();return}for(var V=I[P].units;!(N>=V.length);N++){var se=V[N];if(!(se.length<=48||se.type!==1&&se.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(I,P,N,J,se,ie),!ie)return}}}},q}(),Fe=le,Ie={video:1,audio:2,id3:3,text:4},je=function(){function q(j,I,P,N){this.observer=j,this.config=P,this.typeSupported=N,this.remuxer=I,this.sampleAes=null}var K=q.prototype;return K.setDecryptData=function(I){I!=null&&I.key!=null&&I.method==="SAMPLE-AES"?this.sampleAes=new Fe(this.observer,this.config,I,this.discardEPB):this.sampleAes=null},q.probe=function(I){var P=q._syncOffset(I);return P<0?!1:(P&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+P+", junk ahead ?"),!0)},q._syncOffset=function(I){for(var P=Math.min(1e3,I.length-3*188),N=0;N>4,Se>1){if(Me=V+5+I[V+4],Me===V+188)continue}else Me=V+4;switch(ge){case pa:ie&&(dt&&(Le=lr(dt))&&Gr(Le,!1),dt={data:[],size:0}),dt&&(dt.data.push(I.subarray(Me,V+188)),dt.size+=V+188-Me);break;case nt:ie&&(Na&&(Le=lr(Na))&&(bn.isAAC?lo(Le):hr(Le)),Na={data:[],size:0}),Na&&(Na.data.push(I.subarray(Me,V+188)),Na.size+=V+188-Me);break;case xt:ie&&(qt&&(Le=lr(qt))&&Uo(Le),qt={data:[],size:0}),qt&&(qt.data.push(I.subarray(Me,V+188)),qt.size+=V+188-Me);break;case 0:ie&&(Me+=I[Me]+1),ya=this._pmtId=Ja(I,Me);break;case ya:ie&&(Me+=I[Me]+1);var tr=Tt(I,Me,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);pa=tr.avc,pa>0&&(Ue.pid=pa),nt=tr.audio,nt>0&&(bn.pid=nt,bn.isAAC=tr.isAAC),xt=tr.id3,xt>0&&(Vn.pid=xt),sn&&!mn&&(l.logger.log("reparse from beginning"),sn=!1,V=Mr-188),mn=this.pmtParsed=!0;break;case 17:case 8191:break;default:sn=!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"});dt&&(Le=lr(dt))?(Gr(Le,!0),Ue.pesData=null):Ue.pesData=dt,Na&&(Le=lr(Na))?(bn.isAAC?lo(Le):hr(Le),bn.pesData=null):(Na&&Na.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),bn.pesData=Na),qt&&(Le=lr(qt))?(Uo(Le),Vn.pesData=null):Vn.pesData=qt,this.sampleAes==null?this.remuxer.remux(bn,Ue,Vn,this._txtTrack,P,N,J):this.decryptAndRemux(bn,Ue,Vn,this._txtTrack,P,N,J)},K.decryptAndRemux=function(I,P,N,J,V,se,ie){if(I.samples&&I.isAAC){var ge=this;this.sampleAes.decryptAacSamples(I.samples,0,function(){ge.decryptAndRemuxAvc(I,P,N,J,V,se,ie)})}else this.decryptAndRemuxAvc(I,P,N,J,V,se,ie)},K.decryptAndRemuxAvc=function(I,P,N,J,V,se,ie){if(P.samples){var ge=this;this.sampleAes.decryptAvcSamples(P.samples,0,0,function(){ge.remuxer.remux(I,P,N,J,V,se,ie)})}else this.remuxer.remux(I,P,N,J,V,se,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(I,P){return(I[P+10]&31)<<8|I[P+11]},K._parsePMT=function(I,P,N,J){var V,se,ie,ge,Se={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(I[P+1]&15)<<8|I[P+2],se=P+3+V-4,ie=(I[P+10]&15)<<8|I[P+11],P+=12+ie;P1;){var mn=new Uint8Array(sn[0].length+sn[1].length);mn.set(sn[0]),mn.set(sn[1],sn[0].length),sn[0]=mn,sn.splice(1,1)}if(N=sn[0],V=(N[0]<<16)+(N[1]<<8)+N[2],V===1){if(se=(N[4]<<8)+N[5],se&&se>I.size-6||(J=N[7],J&192&&(Se=(N[9]&14)*536870912+(N[10]&255)*4194304+(N[11]&254)*16384+(N[12]&255)*128+(N[13]&254)/2,Se>4294967295&&(Se-=8589934592),J&64?(Me=(N[14]&14)*536870912+(N[15]&255)*4194304+(N[16]&254)*16384+(N[17]&255)*128+(N[18]&254)/2,Me>4294967295&&(Me-=8589934592),Se-Me>60*9e4&&(l.logger.warn(Math.round((Se-Me)/9e4)+"s delta between PTS and DTS, align them"),Se=Me)):Me=Se),ie=N[8],Le=ie+9,I.size<=Le))return null;I.size-=Le,ge=new Uint8Array(I.size);for(var Ue=0,bn=sn.length;UeVn){Le-=Vn;continue}else N=N.subarray(Le),Vn-=Le,Le=0;ge.set(N,P),P+=Vn}return se&&(se-=ie+3),{data:ge,pts:Se,dts:Me,len:se}}else return null},K.pushAccesUnit=function(I,P){if(I.units.length&&I.frame){var N=P.samples,J=N.length;if(isNaN(I.pts))if(J){var V=N[J-1];I.pts=V.pts,I.dts=V.dts}else{P.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||I.key===!0||P.sps&&(J||this.contiguous)?(I.id=J,N.push(I)):P.dropped++}I.debug.length&&l.logger.log(I.pts+"/"+I.dts+":"+I.debug)},K._parseAVCPES=function(I,P){var N=this,J=this._avcTrack,V=this._parseAVCNALu(I.data),se=!1,ie,ge=this.avcSample,Se,Me=!1,Le,sn=this.pushAccesUnit.bind(this),mn=function(bn,Vn,pa,nt){return{key:bn,pts:Vn,dts:pa,units:[],debug:nt}};I.data=null,ge&&V.length&&!J.audFound&&(sn(ge,J),ge=this.avcSample=mn(!1,I.pts,I.dts,"")),V.forEach(function(Ue){switch(Ue.type){case 1:Se=!0,ge||(ge=N.avcSample=mn(!0,I.pts,I.dts,"")),se&&(ge.debug+="NDR "),ge.frame=!0;var bn=Ue.data;if(Me&&bn.length>4){var Vn=new ce(bn).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(ge.key=!0)}break;case 5:Se=!0,ge||(ge=N.avcSample=mn(!0,I.pts,I.dts,"")),se&&(ge.debug+="IDR "),ge.key=!0,ge.frame=!0;break;case 6:Se=!0,se&&ge&&(ge.debug+="SEI "),ie=new ce(N.discardEPB(Ue.data)),ie.readUByte();for(var pa=0,nt=0,xt=!1,ya=0;!xt&&ie.bytesAvailable>1;){pa=0;do ya=ie.readUByte(),pa+=ya;while(ya===255);nt=0;do ya=ie.readUByte(),nt+=ya;while(ya===255);if(pa===4&&ie.bytesAvailable!==0){xt=!0;var dt=ie.readUByte();if(dt===181){var Na=ie.readUShort();if(Na===49){var qt=ie.readUInt();if(qt===1195456820){var Ja=ie.readUByte();if(Ja===3){var Tt=ie.readUByte(),lr=ie.readUByte(),Gr=31&Tt,lo=[Tt,lr];for(Le=0;Le16){var hr=[];for(Le=0;Le<16;Le++)hr.push(ie.readUByte().toString(16)),(Le===3||Le===5||Le===7||Le===9)&&hr.push("-");var Uo=nt-16,Mr=new Uint8Array(Uo);for(Le=0;Le0){if(P.pts>=I[N-1].pts)I.push(P);else for(var J=N-1;J>=0;J--)if(P.pts=0)Me={data:I.subarray(sn,P-ie-1),type:mn},Se.push(Me);else{var Ue=this._getLastNalUnit();if(Ue&&(ge&&P<=4-ge&&Ue.state&&(Ue.data=Ue.data.subarray(0,Ue.data.byteLength-ge)),V=P-ie-1,V>0)){var bn=new Uint8Array(Ue.data.byteLength+V);bn.set(Ue.data,0),bn.set(I.subarray(0,V),Ue.data.byteLength),Ue.data=bn}}P=0&&ie>=0&&(Me={data:I.subarray(sn,N),type:mn,state:ie},Se.push(Me)),Se.length===0){var Vn=this._getLastNalUnit();if(Vn){var pa=new Uint8Array(Vn.data.byteLength+I.byteLength);pa.set(Vn.data,0),pa.set(I,Vn.data.byteLength),Vn.data=pa}}return se.naluState=ie,Se},K.discardEPB=function(I){for(var P=I.byteLength,N=[],J=1,V,se;J1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-J)/90)),J=Vn)}for(;Me>24&255,V[1]=P>>16&255,V[2]=P>>8&255,V[3]=P&255,V.set(j,4),N=0,P=8;N>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&255,85,196,0,0]))},q.mdia=function(j){return q.box(q.types.mdia,q.mdhd(j.timescale,j.duration),q.hdlr(j.type),q.minf(j))},q.mfhd=function(j){return q.box(q.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},q.minf=function(j){return j.type==="audio"?q.box(q.types.minf,q.box(q.types.smhd,q.SMHD),q.DINF,q.stbl(j)):q.box(q.types.minf,q.box(q.types.vmhd,q.VMHD),q.DINF,q.stbl(j))},q.moof=function(j,I,P){return q.box(q.types.moof,q.mfhd(j),q.traf(P,I))},q.moov=function(j){for(var I=j.length,P=[];I--;)P[I]=q.trak(j[I]);return q.box.apply(null,[q.types.moov,q.mvhd(j[0].timescale,j[0].duration)].concat(P).concat(q.mvex(j)))},q.mvex=function(j){for(var I=j.length,P=[];I--;)P[I]=q.trex(j[I]);return q.box.apply(null,[q.types.mvex].concat(P))},q.mvhd=function(j,I){I*=j;var P=Math.floor(I/(Qn+1)),N=Math.floor(I%(Qn+1)),J=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&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 q.box(q.types.mvhd,J)},q.sdtp=function(j){var I=j.samples||[],P=new Uint8Array(4+I.length),N,J;for(J=0;J>>8&255),I.push(V&255),I=I.concat(Array.prototype.slice.call(J));for(N=0;N>>8&255),P.push(V&255),P=P.concat(Array.prototype.slice.call(J));var se=q.box(q.types.avcC,new Uint8Array([1,I[3],I[4],I[5],252|3,224|j.sps.length].concat(I).concat([j.pps.length]).concat(P))),ie=j.width,ge=j.height,Se=j.pixelRatio[0],Me=j.pixelRatio[1];return q.box(q.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]),se,q.box(q.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),q.box(q.types.pasp,new Uint8Array([Se>>24,Se>>16&255,Se>>8&255,Se&255,Me>>24,Me>>16&255,Me>>8&255,Me&255])))},q.esds=function(j){var I=j.config.length;return new Uint8Array([0,0,0,0,3,23+I,0,1,0,4,15+I,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([I]).concat(j.config).concat([6,1,2]))},q.mp4a=function(j){var I=j.samplerate;return q.box(q.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]),q.box(q.types.esds,q.esds(j)))},q.mp3=function(j){var I=j.samplerate;return q.box(q.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]))},q.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?q.box(q.types.stsd,q.STSD,q.mp3(j)):q.box(q.types.stsd,q.STSD,q.mp4a(j)):q.box(q.types.stsd,q.STSD,q.avc1(j))},q.tkhd=function(j){var I=j.id,P=j.duration*j.timescale,N=j.width,J=j.height,V=Math.floor(P/(Qn+1)),se=Math.floor(P%(Qn+1));return q.box(q.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,I>>24&255,I>>16&255,I>>8&255,I&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,se>>24,se>>16&255,se>>8&255,se&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,N>>8&255,N&255,0,0,J>>8&255,J&255,0,0]))},q.traf=function(j,I){var P=q.sdtp(j),N=j.id,J=Math.floor(I/(Qn+1)),V=Math.floor(I%(Qn+1));return q.box(q.types.traf,q.box(q.types.tfhd,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255])),q.box(q.types.tfdt,new Uint8Array([1,0,0,0,J>>24,J>>16&255,J>>8&255,J&255,V>>24,V>>16&255,V>>8&255,V&255])),q.trun(j,P.length+16+20+8+16+8+8),P)},q.trak=function(j){return j.duration=j.duration||4294967295,q.box(q.types.trak,q.tkhd(j),q.mdia(j))},q.trex=function(j){var I=j.id;return q.box(q.types.trex,new Uint8Array([0,0,0,0,I>>24,I>>16&255,I>>8&255,I&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},q.trun=function(j,I){var P=j.samples||[],N=P.length,J=12+16*N,V=new Uint8Array(J),se,ie,ge,Se,Me,Le;for(I+=8+J,V.set([0,0,15,1,N>>>24&255,N>>>16&255,N>>>8&255,N&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255],0),se=0;se>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Se>>>24&255,Se>>>16&255,Se>>>8&255,Se&255,Me.isLeading<<2|Me.dependsOn,Me.isDependedOn<<6|Me.hasRedundancy<<4|Me.paddingValue<<1|Me.isNonSync,Me.degradPrio&240<<8,Me.degradPrio&15,Le>>>24&255,Le>>>16&255,Le>>>8&255,Le&255],12+16*se);return q.box(q.types.trun,V)},q.initSegment=function(j){q.types||q.init();var I=q.moov(j),P;return P=new Uint8Array(q.FTYP.byteLength+I.byteLength),P.set(q.FTYP),P.set(I,q.FTYP.byteLength),P},q}(),_t=Jn,He=9e4;function ua(q,K,j,I){return j===void 0&&(j=1),I===void 0&&(I=!1),Ta(q,K,1/j)}function Ta(q,K,j,I){j===void 0&&(j=1),I===void 0&&(I=!1);var P=q*K*j;return I?Math.round(P):P}function Sn(q,K){return K===void 0&&(K=!1),Ta(q,1e3,1/He,K)}function gn(q,K){return K===void 0&&(K=1),Ta(q,He,1/K)}var Qe=gn(10),ea=gn(.2),fa=function(){function q(j,I,P,N){this.observer=j,this.config=I,this.typeSupported=P;var J=navigator.userAgent;this.isSafari=N&&N.indexOf("Apple")>-1&&J&&!J.match("CriOS"),this.ISGenerated=!1}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(I){this._initPTS=this._initDTS=I},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(I,P,N,J,V,se,ie){if(this.ISGenerated||this.generateIS(I,P,V),this.ISGenerated){var ge=I.samples.length,Se=P.samples.length,Me=V,Le=V;if(ge&&Se){var sn=(I.samples[0].pts-P.samples[0].pts)/P.inputTimeScale;Me+=Math.max(0,sn),Le+=Math.max(0,-sn)}if(ge){I.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(I,P,V));var mn=this.remuxAudio(I,Me,se,ie);if(Se){var Ue;mn&&(Ue=mn.endPTS-mn.startPTS),P.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(I,P,V)),this.remuxVideo(P,Le,se,Ue,ie)}}else if(Se){var bn=this.remuxVideo(P,Le,se,0,ie);bn&&I.codec&&this.remuxEmptyAudio(I,Me,se,bn)}}N.samples.length&&this.remuxID3(N,V),J.samples.length&&this.remuxText(J,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(I,P,N){var J=this.observer,V=I.samples,se=P.samples,ie=this.typeSupported,ge="audio/mp4",Se={},Me={tracks:Se},Le=this._initPTS===void 0,sn,mn;if(Le&&(sn=mn=1/0),I.config&&V.length&&(I.timescale=I.samplerate,l.logger.log("audio sampling rate : "+I.samplerate),I.isAAC||(ie.mpeg?(ge="audio/mpeg",I.codec=""):ie.mp3&&(I.codec="mp3")),Se.audio={container:ge,codec:I.codec,initSegment:!I.isAAC&&ie.mpeg?new Uint8Array:_t.initSegment([I]),metadata:{channelCount:I.channelCount}},Le&&(sn=mn=V[0].pts-I.inputTimeScale*N)),P.sps&&P.pps&&se.length){var Ue=P.inputTimeScale;P.timescale=Ue,Se.video={container:"video/mp4",codec:P.codec,initSegment:_t.initSegment([P]),metadata:{width:P.width,height:P.height}},Le&&(sn=Math.min(sn,se[0].pts-Ue*N),mn=Math.min(mn,se[0].dts-Ue*N),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:sn}))}Object.keys(Se).length?(J.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Me),this.ISGenerated=!0,Le&&(this._initPTS=sn,this._initDTS=mn)):J.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(I,P,N,J,V){var se=8,ie,ge,Se,Me,Le,sn,mn,Ue=I.timescale,bn=I.samples,Vn=[],pa=bn.length,nt=this._PTSNormalize,xt=this._initPTS,ya=this.nextAvcDts,dt=this.isSafari;if(pa!==0){dt&&(N|=bn.length&&ya&&(V&&Math.abs(P-ya/Ue)<.1||Math.abs(bn[0].pts-ya-xt)1?l.logger.log("AVC: "+Sn(Tt,!0)+" ms hole between fragments detected,filling it"):Tt<-1&&l.logger.log("AVC: "+Sn(-Tt,!0)+" ms overlapping between fragments detected"),Le=ya,bn[0].dts=Le,Me=Math.max(Me-Tt,ya),bn[0].pts=Me,l.logger.log("Video: PTS/DTS adjusted: "+Sn(Me,!0)+"/"+Sn(Le,!0)+", delta: "+Sn(Tt,!0)+" ms")),Ja=bn[bn.length-1],mn=Math.max(Ja.dts,0),sn=Math.max(Ja.pts,0,mn),dt&&(ie=Math.round((mn-Le)/(bn.length-1)));for(var lr=0,Gr=0,lo=0;lo0?Eo-1:Eo].dts;if(Vc.stretchShortVideoTrack){var Oi=Vc.maxBufferHole,Id=Math.floor(Oi*Ue),_f=(J?Me+J*Ue:this.nextAudioPts)-qr.pts;_f>Id?(ie=_f-El,ie<0&&(ie=El),l.logger.log("It is approximately "+Sn(_f,!1)+" ms to the next segment; using duration "+Sn(ie,!1)+" ms for the last video frame.")):ie=El}else ie=El}ji=Math.round(qr.pts-qr.dts)}Vn.push({size:vi,duration:ie,cts:ji,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:qr.key?2:1,isNonSync:qr.key?0:1}})}this.nextAvcDts=mn+ie;var t0=I.dropped;if(I.nbNalu=0,I.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r0=Vn[0].flags;r0.dependsOn=2,r0.isNonSync=0}I.samples=Vn,Se=_t.moof(I.sequenceNumber++,Le,I),I.samples=[];var Ui={data1:Se,data2:ge,startPTS:Me/Ue,endPTS:(sn+ie)/Ue,startDTS:Le/Ue,endDTS:this.nextAvcDts/Ue,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:t0};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Ui),Ui}},K.remuxAudio=function(I,P,N,J){var V=I.inputTimeScale,se=I.timescale,ie=V/se,ge=I.isAAC?1024:1152,Se=ge*ie,Me=this._PTSNormalize,Le=this._initPTS,sn=!I.isAAC&&this.typeSupported.mpeg,mn,Ue,bn,Vn,pa,nt,xt=sn?0:8,ya=I.samples,dt=[],Na=this.nextAudioPts;if(N|=ya.length&&Na&&(J&&Math.abs(P-Na/V)<.1||Math.abs(ya[0].pts-Na-Le)<20*Se),ya.forEach(function(Oi){Oi.pts=Oi.dts=Me(Oi.pts-Le,P*V)}),ya=ya.filter(function(Oi){return Oi.pts>=0}),ya.length!==0){if(N||(J?Na=P*V:Na=ya[0].pts),I.isAAC)for(var qt=this.config.maxAudioFramesDrift,Ja=0,Tt=Na;Ja=qt*Se&&Gr.1*Se,lr.pts=lr.dts=Tt,Tt+=Se,Ja++}for(var tr=ya.length,Hr=0;tr--;)Hr+=ya[tr].unit.byteLength;for(var tu=0,ru=ya.length;tu0&&vi0&&(Ue=Wn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount),Ue||(Ue=qr.subarray()),Hr+=ji*Ue.length);else if(vi<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Sn(Na,!0)+" ms / "+Sn(Mu,!0)+" ms / "+Sn(-vi,!0)+" ms"),Hr-=qr.byteLength;continue}Mu=Na}if(pa=Mu,Hr>0){Hr+=xt;try{bn=new Uint8Array(Hr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Hr,reason:"fail allocating audio mdat "+Hr});return}if(!sn){var Zl=new DataView(bn.buffer);Zl.setUint32(0,Hr),bn.set(_t.types.mdat,4)}}else return;for(var zc=0;zc=2&&(bl=dt[tr-2].duration,mn.duration=bl),tr){this.nextAudioPts=Na=nt+ie*bl,I.samples=dt,sn?Vn=new Uint8Array:Vn=_t.moof(I.sequenceNumber++,pa/ie,I),I.samples=[];var wl=pa/V,Vc=Na/V,El={data1:Vn,data2:bn,startPTS:wl,endPTS:Vc,startDTS:wl,endDTS:Vc,type:"audio",hasAudio:!0,hasVideo:!1,nb:tr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,El),El}return null}},K.remuxEmptyAudio=function(I,P,N,J){var V=I.inputTimeScale,se=I.samplerate?I.samplerate:V,ie=V/se,ge=this.nextAudioPts,Se=(ge!==void 0?ge:J.startDTS*V)+this._initDTS,Me=J.endDTS*V+this._initDTS,Le=1024,sn=ie*Le,mn=Math.ceil((Me-Se)/sn),Ue=Wn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount);if(l.logger.warn("remux empty Audio"),!Ue){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var bn=[],Vn=0;Vn4294967296;)I+=N;return I},q}(),La=fa,pt=function(){function q(j){this.observer=j}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(I,P,N,J,V,se,ie,ge){var Se=this.observer,Me="";I&&(Me+="audio"),P&&(Me+="video"),Se.trigger(t.default.FRAG_PARSING_DATA,{data1:ge,startPTS:V,startDTS:V,type:Me,hasAudio:!!I,hasVideo:!!P,nb:1,dropped:0}),Se.trigger(t.default.FRAG_PARSED)},q}(),vn=pt,ia=Object(s.getSelfScope)(),It;try{It=ia.performance.now.bind(ia.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),It=ia.Date.now}var Da=function(){function q(j,I,P,N){this.observer=j,this.typeSupported=I,this.config=P,this.vendor=N}var K=q.prototype;return K.destroy=function(){var I=this.demuxer;I&&I.destroy()},K.push=function(I,P,N,J,V,se,ie,ge,Se,Me,Le,sn){var mn=this;if(I.byteLength>0&&P!=null&&P.key!=null&&P.method==="AES-128"){var Ue=this.decrypter;Ue==null&&(Ue=this.decrypter=new u.default(this.observer,this.config));var bn=It();Ue.decrypt(I,P.key.buffer,P.iv.buffer,function(Vn){var pa=It();mn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:bn,tdecrypt:pa}}),mn.pushDecrypted(new Uint8Array(Vn),P,new Uint8Array(N),J,V,se,ie,ge,Se,Me,Le,sn)})}else this.pushDecrypted(new Uint8Array(I),P,new Uint8Array(N),J,V,se,ie,ge,Se,Me,Le,sn)},K.pushDecrypted=function(I,P,N,J,V,se,ie,ge,Se,Me,Le,sn){var mn=this.demuxer;if(!mn||(ie||ge)&&!this.probe(I)){for(var Ue=this.observer,bn=this.typeSupported,Vn=this.config,pa=[{demux:Ze,remux:La},{demux:Y.default,remux:vn},{demux:X,remux:La},{demux:Kn,remux:La}],nt=0,xt=pa.length;nt1?L-1:0),$=1;$1?L-1:0),$=1;$0)return p.subarray(E,E+b)},s._readSize=function(p,y){var E=0;return E=(p[y]&127)<<21,E|=(p[y+1]&127)<<14,E|=(p[y+2]&127)<<7,E|=p[y+3]&127,E},s.getTimeStamp=function(p){for(var y=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ee+=String.fromCharCode(O);break;case 12:case 13:$=p[ue++],ee+=String.fromCharCode((O&31)<<6|$&63);break;case 14:$=p[ue++],z=p[ue++],ee+=String.fromCharCode((O&15)<<12|($&63)<<6|(z&63)<<0);break;default:}}return ee},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(h,p){this.observer=h,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,y,E,b){if(p&&p.byteLength){var T=this.initData=l.parseInitSegment(p);y==null&&(y="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};T.audio&&T.video?L.audiovideo={container:"video/mp4",codec:y+","+E,initSegment:b?p:null}:(T.audio&&(L.audio={container:"audio/mp4",codec:y,initSegment:b?p:null}),T.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else y&&(this.audioCodec=y),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,y){p.data&&(y+=p.start,p=p.data);var E=p[y]<<8|p[y+1];return E<0?65536+E:E},l.readUint32=function(p,y){p.data&&(y+=p.start,p=p.data);var E=p[y]<<24|p[y+1]<<16|p[y+2]<<8|p[y+3];return E<0?4294967296+E:E},l.writeUint32=function(p,y,E){p.data&&(y+=p.start,p=p.data),p[y]=E>>24,p[y+1]=E>>16&255,p[y+2]=E>>8&255,p[y+3]=E&255},l.findBox=function(p,y){var E=[],b,T,L,O,$,z,ee;if(p.data?(z=p.start,O=p.end,p=p.data):(z=0,O=p.byteLength),!y.length)return null;for(b=z;b1?b+T:O,L===y[0]&&(y.length===1?E.push({data:p,start:b+8,end:ee}):($=l.findBox({data:p,start:b+8,end:ee},y.slice(1)),$.length&&(E=E.concat($)))),b=ee;return E},l.parseSegmentIndex=function(p){var y=l.findBox(p,["moov"])[0],E=y?y.end:null,b=0,T=l.findBox(p,["sidx"]),L;if(!T||!T[0])return null;L=[],T=T[0];var O=T.data[0];b=O===0?8:16;var $=l.readUint32(T,b);b+=4;var z=0,ee=0;O===0?b+=8:b+=16,b+=2;var ue=T.end+ee,X=l.readUint16(T,b);b+=2;for(var Y=0;Y>>31;if(ce===1){console.warn("SIDX has hierarchical references (not supported)");return}var le=l.readUint32(T,te);te+=4,L.push({referenceSize:Be,subsegmentDuration:le,info:{duration:le/$,start:ue,end:ue+Be-1}}),ue+=Be,te+=4,b=te}return{earliestPresentationTime:z,timescale:$,version:O,referencesCount:X,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var y=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(b){var T=l.findBox(b,["tkhd"])[0];if(T){var L=T.data[T.start],O=L===0?12:20,$=l.readUint32(T,O),z=l.findBox(b,["mdia","mdhd"])[0];if(z){L=z.data[z.start],O=L===0?12:20;var ee=l.readUint32(z,O),ue=l.findBox(b,["mdia","hdlr"])[0];if(ue){var X=l.bin2str(ue.data.subarray(ue.start+8,ue.start+12)),Y={soun:"audio",vide:"video"}[X];if(Y){var te=l.findBox(b,["mdia","minf","stbl","stsd"]);if(te.length){te=te[0];var he=l.bin2str(te.data.subarray(te.start+12,te.start+16));t.logger.log("MP4Demuxer:"+Y+":"+he+" found")}y[$]={timescale:ee,type:Y},y[Y]={timescale:ee,id:$}}}}}}),y},l.getStartDTS=function(p,y){var E,b,T;return E=l.findBox(y,["moof","traf"]),b=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(O){var $,z,ee;return $=l.readUint32(O,4),z=p[$].timescale||9e4,ee=l.findBox(L,["tfdt"]).map(function(ue){var X,Y;return X=ue.data[ue.start],Y=l.readUint32(ue,4),X===1&&(Y*=Math.pow(2,32),Y+=l.readUint32(ue,8)),Y})[0],ee/z})})),T=Math.min.apply(null,b),isFinite(T)?T:0},l.offsetStartDTS=function(p,y,E){l.findBox(y,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(T){var L=l.readUint32(T,4),O=p[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function($){var z=$.data[$.start],ee=l.readUint32($,4);if(z===0)l.writeUint32($,4,ee-E*O);else{ee*=Math.pow(2,32),ee+=l.readUint32($,8),ee-=E*O,ee=Math.max(ee,0);var ue=Math.floor(ee/(u+1)),X=Math.floor(ee%(u+1));l.writeUint32($,4,ue),l.writeUint32($,8,X)}})})})},s.append=function(p,y,E,b){var T=this.initData;T||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),T=this.initData);var L,O=this.initPTS;if(O===void 0){var $=l.getStartDTS(T,p);this.initPTS=O=$-y,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:O})}l.offsetStartDTS(T,p,O),L=l.getStartDTS(T,p),this.remuxer.remux(T.audio,T.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 dI});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"),h={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 $(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},ee(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=Be.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(ce.lastIndex=0;(o=ce.exec(v))!==null;){var _=o[2],R='"';_.indexOf(R)===0&&_.lastIndexOf(R)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},w}(),Fe=le,Ie={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 je(w,D){var f=Ie[D];return!!f&&f[w.slice(0,4)]===!0}function Ze(w,D){return MediaSource.isTypeSupported((D||"video")+'/mp4;codecs="'+w+'"')}var Tn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Kn=/#EXT-X-MEDIA:(.*)/g,In=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Wn=/(?:(?:#(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?/,Qn=/\.(mp4|m4s|m4v|m4a)$/i,Jn=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=[];Tn.lastIndex=0;function c(x,H){["video","audio"].forEach(function(k){var ae=x.filter(function(Ke){return je(Ke,k)});if(ae.length){var we=ae.filter(function(Ke){return Ke.lastIndexOf("avc1",0)===0||Ke.lastIndexOf("mp4a",0)===0});H[k+"Codec"]=we.length>0?we[0]:ae[0],x=x.filter(function(Ke){return ae.indexOf(Ke)===-1})}}),H.unknownCodecs=x}for(var _;(_=Tn.exec(f))!=null;){var R={},C=R.attrs=new Fe(_[1]);R.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(R.width=F.width,R.height=F.height),R.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),R.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),R),R.videoCodec&&R.videoCodec.indexOf("avc1")!==-1&&(R.videoCodec=w.convertAVC1ToAVCOTI(R.videoCodec)),o.push(R)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,R=[],C=0;for(Kn.lastIndex=0;(_=Kn.exec(f))!==null;){var F=new Fe(_[1]);if(F.TYPE===o){var x={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&&(x.url=w.resolve(F.URI,v)),c.length){var H=w.findGroup(c,x.groupId);x.audioCodec=H?H.codec:c[0].codec}R.push(x)}}return R},w.parseLevelPlaylist=function(f,v,o,c,_){var R=0,C=0,F=new he(v),x=0,H=null,k=new X,ae,we,Ke,fn=null;for(In.lastIndex=0;(ae=In.exec(f))!==null;){var _a=ae[1];if(_a){k.duration=parseFloat(_a);var Zn=(" "+ae[2]).slice(1);k.title=Zn||null,k.tagList.push(Zn?["INF",_a,Zn]:["INF",_a])}else if(ae[3]){if(Object(i.isFiniteNumber)(k.duration)){var la=R++;k.type=c,k.start=C,Ke&&(k.levelkey=Ke),k.sn=la,k.level=o,k.cc=x,k.urlId=_,k.baseurl=v,k.relurl=(" "+ae[3]).slice(1),He(k,H),F.fragments.push(k),H=k,C+=k.duration,k=new X}}else if(ae[4]){var Ra=(" "+ae[4]).slice(1);H?k.setByteRange(Ra,H):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(Wn),!ae){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(we=1;we=0&&(Ke.method=st,Ke.key=null,Ke.iv=ja));break}case"START":{var To=new Fe(ka),v0=To.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(v0)&&(F.startTimeOffset=v0);break}case"MAP":{var f0=new Fe(ka);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 X,k.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ae);break}}}return k=H,k&&!k.relurl&&(F.fragments.pop(),C-=k.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=R-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=x,!F.initSegment&&F.fragments.length&&F.fragments.every(function(OI){return Qn.test(OI.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),k=new X,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&&_t(F.fragments,fn),F},w}();function _t(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 He(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 ua(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Ta=window,Sn=Ta.performance,gn=function(w){ua(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,R=c.loader,C=_||R,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 R=_.context;if(R&&R.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,x,H;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,x=c.manifestLoadingRetryDelay,H=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,H=0,x=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,x=c.levelLoadingRetryDelay,H=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var k={timeout:F,maxRetry:C,retryDelay:x,maxRetryDelay:H},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,_,R){if(R===void 0&&(R=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,R);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=Sn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",R);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,R):this._handleMasterPlaylist(o,c,_,R)},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,_,R){var C=this.hls,F=o.data,x=D.getResponseUrl(o,_),H=Jn.parseMasterPlaylist(F,x);if(!H.length){this._handleManifestParsingError(o,_,"no level found in manifest",R);return}var k=H.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ae=Jn.parseMasterPlaylistMedia(F,x,"AUDIO",k),we=Jn.parseMasterPlaylistMedia(F,x,"SUBTITLES");if(ae.length){var Ke=!1;ae.forEach(function(fn){fn.url||(Ke=!0)}),Ke===!1&&H[0].audioCodec&&!H[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:H,audioTracks:ae,subtitles:we,url:x,stats:c,networkDetails:R})},f._handleTrackOrLevelPlaylist=function(o,c,_,R){var C=this.hls,F=_.id,x=_.level,H=_.type,k=D.getResponseUrl(o,_),ae=Object(i.isFiniteNumber)(F)?F:0,we=Object(i.isFiniteNumber)(x)?x:ae,Ke=D.mapContextToLevelType(_),fn=Jn.parseLevelPlaylist(o.data,k,we,Ke,ae);if(fn.tload=c.tload,H===E.MANIFEST){var _a={url:k,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[_a],audioTracks:[],url:k,stats:c,networkDetails:R})}if(c.tparsed=Sn.now(),fn.needSidxRanges){var Zn=fn.initSegment.url;this.load({url:Zn,isSidxRequest:!0,type:H,level:x,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,this._handlePlaylistLoaded(o,c,_,R)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=T.default.parseSegmentIndex(new Uint8Array(o.data));if(!!_){var R=_.references,C=c.levelDetails;R.forEach(function(F,x){var H=F.info;if(!!C){var k=C.fragments[x];k.byteRange.length===0&&k.setByteRange(String(1+H.end-H.start)+"@"+String(H.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,R){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:R})},f._handleNetworkError=function(o,c,_,R){_===void 0&&(_=!1),R===void 0&&(R=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,x=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}x&&(x.abort(),this.resetInternalLoader(o.type));var H={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:x,context:o,networkDetails:c};R&&(H.response=R),this.hls.trigger(l.default.ERROR,H)},f._handlePlaylistLoaded=function(o,c,_,R){var C=_.type,F=_.level,x=_.id,H=_.levelDetails;if(!H||!H.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",R);return}var k=D.canHaveQualityLevels(_.type);if(k)this.hls.trigger(l.default.LEVEL_LOADED,{details:H,level:F||0,id:x||0,stats:c,networkDetails:R});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:H,id:x,stats:c,networkDetails:R});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:H,id:x,stats:c,networkDetails:R});break}},D}(y),Qe=gn;function ea(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fa=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,R=this.loaders,C=this.hls.config,F=C.fLoader,x=C.loader;c.loaded=0;var H=R[_];H&&(s.logger.warn("abort previous fragment loader for type: "+_),H.abort()),H=R[_]=c.loader=C.fLoader?new F(C):new x(C);var k,ae,we;k={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var Ke=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)(Ke)&&Object(i.isFiniteNumber)(fn)&&(k.rangeStart=Ke,k.rangeEnd=fn),ae={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},we={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},H.load(k,ae,we)},f.loadsuccess=function(o,c,_,R){R===void 0&&(R=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:R})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var R=c.frag,C=R.loader;C&&C.abort(),this.loaders[R.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 R=c.frag,C=R.loader;C&&C.abort(),this.loaders[R.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,_,R){R===void 0&&(R=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:R})},D}(y),La=fa;function pt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var vn=function(w){pt(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,R=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(R&&(s.logger.warn("abort previous key loader for type:"+_),R.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 x={url:C,frag:c,responseType:"arraybuffer"},H={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(x,H,k)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var R=_.frag;if(!R.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=R.decryptdata.key=new Uint8Array(o.data),R.loader=void 0,delete this.loaders[R.type],this.hls.trigger(l.default.KEY_LOADED,{frag:R})},f.loaderror=function(o,c){var _=c.frag,R=_.loader;R&&R.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,R=_.loader;R&&R.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}(y),ia=vn;function It(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"},ut=function(w){It(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,y.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,R=Object.keys(_).filter(function(F){var x=_[F];if(x.body.type!==c||!x.buffered)return!1;var H=x.body;return H.startPTS<=o&&o<=H.endPTS});if(R.length===0)return null;var C=R.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,R,C;Object.keys(this.fragments).forEach(function(F){var x=_.fragments[F];if(x.buffered===!0){var H=x.range[o];if(H){R=H.time;for(var k=0;k=C&&c<=F){R.push({startPTS:Math.max(o,_.start(H)),endPTS:Math.min(c,_.end(H))});break}else if(oC)R.push({startPTS:Math.max(o,_.start(H)),endPTS:Math.min(c,_.end(H))}),x=!0;else if(c<=C)break;return{time:R,partial:x}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,R,C,F=null,x=0;return Object.keys(this.fragments).forEach(function(H){var k=c.fragments[H];c.isPartial(k)&&(R=k.body.startPTS-c.bufferPadding,C=k.body.endPTS+c.bufferPadding,o>=R&&o<=C&&(_=Math.min(o-R,C-o),x<=_&&(F=k.body,x=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],R=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?R=Da.PARTIAL:R=Da.OK:R=Da.APPENDING),R},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 R,C,F=0;F<_.length;F++){if(R=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=R&&c<=C)return!0;if(c<=R)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 R=c.timeRanges[_];c.detectEvictedFragments(_,R)})},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}(y),q={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 R=f(_);if(R>0)v=c+1;else if(R<0)o=c-1;else return _}return null}},K=q,j=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,_=[],R;for(R=0;RC&&(c[R-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,x,H=v,k=v,ae=0;ae=we&&v1?c-1:0),R=1;RD?(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 Ue(w,D,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(D.startPTS)){var R=Math.abs(D.startPTS-f);Object(i.isFiniteNumber)(D.deltaPTS)?D.deltaPTS=Math.max(R,D.deltaPTS):D.deltaPTS=R,_=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 x,H,k;for(x=F-w.startSN,H=w.fragments,H[x]=D,k=x;k>0;k--)mn(H,k,k-1);for(k=x;kv.length))for(var c=0;cD?-1:0})}function Ja(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 Hr(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 tu=250,ru=2,Eo=.1,qr=.05,Mu=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,R=c.currentTime,C=c.seeking,F=this.seeking&&!C,x=!this.seeking&&C;if(this.seeking=C,R!==v){if(this.moved=!0,_!==null){if(this.stallReported){var H=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+R+", after "+Math.round(H)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var k=j.bufferInfo(c,R,0),ae=k.len>0,we=k.nextStart||0;if(!(!ae&&!we)){if(C){var Ke=k.len>ru,fn=!we||we-R>ru;if(Ke||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var _a=Math.max(we,k.start||0)-R;if(_a>0&&_a<=ru){this._trySkipBufferHole(null);return}}var Zn=self.performance.now();if(_===null){this.stalled=Zn;return}var la=Zn-_;!C&&la>=tu&&this._reportStall(k.len);var Ra=j.bufferInfo(c,R,o.maxBufferHole);this._tryFixBufferStall(Ra,la)}}},D._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,R=this.media,C=R.currentTime,F=_.getPartialFragment(C);if(F){var x=this._trySkipBufferHole(F);if(x)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,R=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var x=_.buffered.start(F);if(R+o.maxBufferHole>=C&&R1?c-1:0),R=1;R1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},D}(y);function zc(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fe={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"},bl=function(w){zc(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=fe.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,R=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=R.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,R=this.state,C=c?c.currentTime:null,F=j.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),R===fe.FRAG_LOADING){var x=this.fragCurrent;if(F.len===0&&x){var H=o.maxFragLookUpTolerance,k=x.start-H,ae=x.start+x.duration+H;Cae?(x.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),x.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=fe.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else R===fe.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=fe.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=fe.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}(Zl);function wl(w,D){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=fe.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=fe.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case fe.BUFFER_FLUSHING:this.fragLoadError=0;break;case fe.IDLE:this._doTickIdle();break;case fe.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=fe.IDLE);break;case fe.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=fe.IDLE);break;case fe.ERROR:case fe.STOPPED:case fe.FRAG_LOADING:case fe.PARSING:case fe.PARSED:case fe.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 R;this.loadedmetadata?R=_.currentTime:R=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(!!F){var x=F.bitrate,H;x?H=Math.max(8*c.maxBufferSize/x,c.maxBufferLength):H=c.maxBufferLength,H=Math.min(H,c.maxMaxBufferLength);var k=j.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,R,c.maxBufferHole),ae=k.len;if(!(ae>=H)){s.logger.trace("buffer length of "+ae.toFixed(3)+" is below max of "+H.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var we=F.details;if(!we||we.live&&this.levelLastLoaded!==C){this.state=fe.WAITING_LEVEL;return}if(this._streamEnded(k,we)){var Ke={};this.altAudio&&(Ke.type="video"),this.hls.trigger(l.default.BUFFER_EOS,Ke),this.state=fe.ENDED;return}this._fetchPayloadOrEos(R,k,we)}}}},f._fetchPayloadOrEos=function(o,c,_){var R=this.fragPrevious,C=this.level,F=_.fragments,x=F.length;if(x!==0){var H=F[0].start,k=F[x-1].start+F[x-1].duration,ae=c.end,we;if(_.initSegment&&!_.initSegment.data)we=_.initSegment;else if(_.live){var Ke=this.config.initialLiveManifestSize;if(xKe&&Ke>k.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+Ke.toFixed(3)),k.currentTime=Ke),this.nextLoadPosition=Ke}if(o.PTSKnown&&c>R&&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=Uo(F,C.endProgramDateTime,H.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var _a=F[fn-o.startSN];C.cc===_a.cc&&(ae=_a,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ae.sn))}ae||(ae=K.search(F,function(Zn){return C.cc-Zn.cc}),ae&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ae.sn))}ae||(ae=F[Math.min(x-1,Math.round(x/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ae.sn))}return ae},f._findFragment=function(o,c,_,R,C,F,x){var H=this.hls.config,k;if(CF-H.maxFragLookUpTolerance?0:H.maxFragLookUpTolerance;k=Mr(c,R,C,ae)}else k=R[_-1];if(k){var we=k.sn-x.startSN,Ke=c&&k.level===c.level,fn=R[we-1],_a=R[we+1];if(c&&k.sn===c.sn)if(Ke&&!k.backtracked)if(k.snH.maxBufferHole&&c.dropped&&we?(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=_a,s.logger.log("Re-loading fragment with SN: "+k.sn))}else k=null;else k.backtracked&&(_a&&_a.backtracked?(s.logger.warn("Already backtracked from fragment "+_a.sn+", will not backtrack to fragment "+k.sn+". Loading fragment "+_a.sn),k=_a):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),k.dropped=0,fn?(k=fn,k.backtracked=!0):we&&(k=null)))}return k},f._loadKey=function(o){this.state=fe.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 Le(this.hls,"main")),this.state=fe.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),j.isBuffered(_,c)?o=this.getBufferedFrag(c):j.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var R=o;if(R!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:R});var C=R.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=R}}},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,j.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,_,R;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],x=this.fragLastKbps;x&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*x)+1:c=0}if(R=this.getBufferedFrag(o.currentTime+c),R&&(R=this.followingBufferedFrag(R),R)){var H=this.fragCurrent;H&&H.loader&&H.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(R.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=fe.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 Mu(_,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(R){R.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,R;o.levels.forEach(function(F){R=F.audioCodec,R&&(R.indexOf("mp4a.40.2")!==-1&&(c=!0),R.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,R=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,x=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var H=C.details;H&&c.fragments.length>0?(bn(H,c),x=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(x,H),c.PTSKnown&&Object(i.isFiniteNumber)(x)?s.logger.log("live playlist sliding:"+x.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Gr(this.fragPrevious,R,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Gr(this.fragPrevious,R,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=x+F+k),s.logger.log("start time offset found in playlist, adjust startPosition to "+k),this.startPosition=k):c.live?(this.startPosition=this.computeLivePosition(x,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===fe.WAITING_LEVEL&&(this.state=fe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,R=this.levels,C=this.media,F=o.frag;if(this.state===fe.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var x=o.stats,H=R[c.level],k=H.details;if(this.bitrateTest=!1,this.stats=x,s.logger.log("Loaded "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=fe.IDLE,this.startFragRequested=!1,x.tparsed=x.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:x,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=fe.IDLE,x.tparsed=x.tbuffered=window.performance.now(),k.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:x,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=fe.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),we=k.initSegment?k.initSegment.data:[],Ke=this._getAudioCodec(H),fn=this.demuxer=this.demuxer||new Le(this.hls,"main");fn.push(o.payload,we,Ke,H.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===fe.PARSING){var R=o.tracks,C,F;if(R.audio&&this.altAudio&&delete R.audio,F=R.audio,F){var x=this.levels[this.level].audioCodec,H=navigator.userAgent.toLowerCase();x&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&H.indexOf("firefox")===-1&&(x="mp4a.40.5"),H.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(x="mp4a.40.2",s.logger.log("Android: force audio codec to "+x)),F.levelCodec=x,F.id=o.id}F=R.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,R);for(C in R){F=R[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,R=o.frag;if(_&&o.id==="main"&&R.sn===_.sn&&R.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===fe.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 x=C.details;if(x&&F.sn===x.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=fe.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var H=Ue(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:H,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ae){ae&&ae.length&&c.state===fe.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===fe.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=fe.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 R=this.fragCurrent;R.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),R.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=fe.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 R=this.videoBuffer;R&&this.mediaBuffer!==R&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=R)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,R,C=!1;for(var F in c){var x=c[F];x.id==="main"?(R=F,_=x,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+R+".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===fe.PARSING||c===fe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===fe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+dt.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=fe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&j.isBuffered(this.media,this.media.currentTime)&&j.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 R=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+R+" ms"),this.retryDate=window.performance.now()+R,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=fe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=fe.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==fe.ERROR&&(o.fatal?(this.state=fe.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===fe.WAITING_LEVEL&&(this.state=fe.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===fe.PARSING||this.state===fe.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=fe.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=fe.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=fe.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},Vc(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}(bl),_f=Id;function t0(w,D){for(var f=0;f0){R=c[0].bitrate,c.sort(function(ae,we){return ae.bitrate-we.bitrate}),this._levels=c;for(var k=0;k=0&&o1&&H.loadError0){var c=this.currentLevelIndex,_=o.urlId,R=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:R,level:c,id:_})}}},r0(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}(y),u0=a("./src/demux/id3.js");function ng(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 Ks(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function OE(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-DH&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),H=x+.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}(),qE=HE;function rg(w,D){for(var f=0;f500*_.duration/H){var k=o.levels,ae=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/x),we=k[_.level],Ke=we.realBitrate?Math.max(we.realBitrate,we.bitrate):we.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*Ke/8)),_a=c.currentTime,Zn=(fn-F.loaded)/ae,la=(j.bufferInfo(c,_a,o.config.maxBufferHole).end-_a)/H;if(la<2*_.duration/H&&Zn>la){var Ra,ka;for(ka=_.level-1;ka>C;ka--){var Lu=k[ka].realBitrate?Math.max(k[ka].realBitrate,k[ka].bitrate):k[ka].bitrate,ko=_.duration*Lu/(8*.8*ae);if(ko=R;ae--){var we=k[ae];if(!!we){var Ke=we.details,fn=Ke?Ke.totalduration/Ke.fragments.length:c,_a=Ke?Ke.live:!1,Zn=void 0;ae<=o?Zn=x*_:Zn=H*_;var la=k[ae].realBitrate?Math.max(k[ae].realBitrate,k[ae].bitrate):k[ae].bitrate,Ra=la*fn/Zn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ae+"/"+Math.round(Zn)+"/"+la+"/"+fn+"/"+F+"/"+Ra),Zn>la&&(!Ra||_a&&!this.bitrateTestDelay||Ra=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var _a=H?Math.min(H,R.maxStarvationDelay):R.maxStarvationDelay,Zn=R.abrBandWidthFactor,la=R.abrBandWidthUpFactor;if(Ke===0){var Ra=this.bitrateTestDelay;if(Ra){var ka=H?Math.min(H,R.maxLoadingDelay):R.maxLoadingDelay;_a=ka-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*_a)+" ms"),Zn=la=1}}return fn=this._findBestLevel(x,H,we,C,c,Ke+_a,Zn,la,_),Math.max(fn,0)}}]),D}(y),VE=zE;function QE(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var ug=J(),KE=function(w){QE(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,R=o.segments.reduce(function(k,ae){return ae.parent===_?k+1:k},0),C={},F=o.sourceBuffer;for(var x in F){var H=F[x];if(!H)throw Error("handling source buffer update end error: source buffer for "+x+" uninitilized and unable to update buffered TimeRanges.");C[x]=H.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:R,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),R===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(){y.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var R=this.sourceBuffer.audio;if(!R)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(R.timestampOffset-o.start);if(C>.1){var F=R.updating;try{R.abort()}catch(x){s.logger.warn("can not abort audio buffer: "+x)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+R.timestampOffset+" to "+o.start),R.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&&ug){var _=this.mediaSource=new ug;_.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 R in o)if(!c[R]){var C=o[R];if(!C)throw Error("source buffer exists for track "+R+", however track does not");var F=C.levelCodec||C.codec,x=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+x+")");try{var H=c[R]=_.addSourceBuffer(x);H.addEventListener("updateend",this._onSBUpdateEnd),H.addEventListener("error",this._onSBUpdateError),this.tracks[R]={buffer:H,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:x})}}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 R=o[_];if(!!R){if(!R.ended)return;if(R.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,R=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=R.length-1;F>=0;F--){var x=R[F],H=_[x];if(H){var k=H.buffered;k.length>0&&C>k.start(0)&&this.removeBufferRange(x,H,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 R=this.sourceBuffer[_];if(R&&R.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 R in _){var C=_[R];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,R=this.sourceBuffer;if(!!Object.keys(R).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=R[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(H){s.logger.error("error while trying to append buffer:"+H.message),_.unshift(C);var x={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};H.code===22?(this.segments=[],x.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,x.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],x.fatal=!0)),c.trigger(l.default.ERROR,x)}}}},f.flushBuffer=function(o,c,_){var R=this.sourceBuffer;if(!Object.keys(R).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=R[_];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,_,R){try{for(var C=0;C.5){var ae="null";return this.media&&(ae=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+H+","+k+"], of ["+F+","+x+"], pos:"+ae),c.remove(H,k),!0}}}catch(we){s.logger.warn("removeBufferRange failed",we)}return!1},D}(y),YE=KE;function ig(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(R,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 R=function(k,ae){return ae?k.width!==ae.width||k.height!==ae.height:!0},C=o.length-1,F=0;F=c||x.height>=_)&&R(x,o[F+1])){C=F;break}}return C},XE(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}(y),lg=ZE;function eI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Kc=window,nI=Kc.performance,Fd=function(w){eI(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 R=nI.now();if(c){if(this.lastTime){var C=R-this.lastTime,F=_-this.lastDroppedFrames,x=c-this.lastDecodedFrames,H=1e3*F/C,k=this.hls;if(k.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:x,totalDroppedFrames:_}),H>0&&F>k.config.fpsDroppedMonitoringThreshold*x){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=R,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}(y),aI=Fd,cg=window,Gd=cg.performance,tI=cg.XMLHttpRequest,rI=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:Gd.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},D.loadInternal=function(){var v,o=this.context;v=this.loader=new tI;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(R){this.callbacks.onError({code:v.status,text:R.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,R=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Gd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Gd.now());var x,H;R.responseType==="arraybuffer"?(x=o.response,H=x.byteLength):(x=o.responseText,H=x.length),_.loaded=_.total=H;var k={url:o.responseURL,data:x};this.callbacks.onSuccess(k,_,R,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+R.url),this.callbacks.onError({code:F,text:o.statusText},R,o)):(s.logger.warn(F+" while loading "+R.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}(),Md=rI;function sg(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,R=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:R,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],R=null;if(_&&(R=_.name),this._selectDefaultTrack){var C=c.filter(function(H){return H.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,x=function(){c.forEach(function(k){F||(!o.audioGroupId||k.groupId===o.audioGroupId)&&(!R||R===k.name)&&(o._setAudioTrack(k.id),F=!0)})};x(),F||(R=null,x()),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,R=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+R+'"');for(var F=o,x=0;x0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=fe.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=fe.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=fe.STOPPED},f.doTick=function(){var o,c,_,R=this.hls,C=R.config;switch(this.state){case fe.ERROR:case fe.PAUSED:case fe.BUFFER_FLUSHING:break;case fe.STARTING:this.state=fe.WAITING_TRACK,this.loadedmetadata=!1;break;case fe.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 x=this.mediaBuffer?this.mediaBuffer:this.media,H=this.videoBuffer?this.videoBuffer:this.media,k=j.bufferInfo(x,o,C.maxBufferHole),ae=j.bufferInfo(H,o,C.maxBufferHole),we=k.len,Ke=k.end,fn=this.fragPrevious,_a=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Zn=Math.max(_a,ae.len),la=this.audioSwitch,Ra=this.trackId;if((weko||k.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=ko+.05;else return}if(_.initSegment&&!_.initSegment.data)st=_.initSegment;else if(Ke<=ko){if(st=ka[0],this.videoTrackCC!==null&&st.cc!==this.videoTrackCC&&(st=qt(ka,this.videoTrackCC)),_.live&&st.loadIdx&&st.loadIdx===this.fragLoadIdx){var mt=k.nextStart?k.nextStart:ko;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(mt+.05)),this.media.currentTime=mt+.05;return}}else{var ja,To=C.maxFragLookUpTolerance,v0=fn?ka[fn.sn-ka[0].sn+1]:void 0,f0=function(Ud){var _2=Math.min(To,Ud.duration);return Ud.start+Ud.duration-_2<=Ke?1:Ud.start-_2>Ke&&Ud.start?-1:0};KeHi-To&&(To=0),v0&&!f0(v0)?ja=v0:ja=K.search(ka,f0)):ja=ka[Lu-1],ja&&(st=ja,ko=ja.start,fn&&st.level===fn.level&&st.sn===fn.sn&&(st.sn<_.endSN?(st=ka[st.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+st.sn)):st=null))}st&&(st.encrypted?(s.logger.log("Loading key for "+st.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=fe.KEY_LOADING,R.trigger(l.default.KEY_LOADING,{frag:st})):(s.logger.log("Loading "+st.sn+", cc: "+st.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+Ke.toFixed(3)),this.fragCurrent=st,(la||this.fragmentTracker.getState(st)===Da.NOT_LOADED)&&(st.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(st.sn)&&(this.nextLoadPosition=st.start+st.duration),R.trigger(l.default.FRAG_LOADING,{frag:st}),this.state=fe.FRAG_LOADING)))}break;case fe.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=fe.IDLE);break;case fe.FRAG_LOADING_WAITING_RETRY:var OI=Il.now(),s2=this.retryDate;x=this.media;var IX=x&&x.seeking;(!s2||OI>=s2||IX)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=fe.IDLE);break;case fe.WAITING_INIT_PTS:var UI=this.videoTrackCC;if(this.initPTS[UI]===void 0)break;var v2=this.waitingFragment;if(v2){var f2=v2.frag.cc;UI!==f2?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+f2+") does not match video track CC ("+UI+")"),this.waitingFragment=null,this.state=fe.IDLE)):(this.state=fe.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=fe.IDLE;break;case fe.STOPPED:case fe.FRAG_LOADING:case fe.PARSING:case fe.PARSED:case fe.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=fe.PAUSED,this.waitingFragment=null,c?this.setInterval(_g):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=fe.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,R=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var x=R.details;x&&c.fragments.length>0?(bn(x,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(R.details=c,!this.startFragRequested){if(this.startPosition===-1){var H=c.startTimeOffset;Object(i.isFiniteNumber)(H)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+H),this.startPosition=H):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===fe.WAITING_TRACK&&(this.state=fe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===fe.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var R=this.tracks[this.trackId],C=R.details,F=C.totalduration,x=c.level,H=c.sn,k=c.cc,ae=this.config.defaultAudioCodec||R.audioCodec||"mp4a.40.2",we=this.stats=o.stats;if(H==="initSegment")this.state=fe.IDLE,we.tparsed=we.tbuffered=Il.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:we,frag:c,id:"audio"}),this.tick();else{this.state=fe.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Le(this.hls,"audio"));var Ke=this.initPTS[k],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||Ke!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+H+" of ["+C.startSN+" ,"+C.endSN+"],track "+x);var _a=!1;this.demuxer.push(o.payload,fn,ae,null,c,F,_a,Ke)}else s.logger.log("unknown video PTS for continuity counter "+k+", waiting for video PTS before demuxing audio frag "+H+" of ["+C.startSN+" ,"+C.endSN+"],track "+x),this.waitingFragment=o,this.state=fe.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===fe.PARSING){var R=o.tracks,C;if(R.video&&delete R.video,C=R.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,R),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var x={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[x]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,x))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,R=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&R.sn===_.sn&&R.level===_.level&&this.state===fe.PARSING){var C=this.trackId,F=this.tracks[C],x=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),Ue(F.details,_,o.startPTS,o.endPTS);var H=this.audioSwitch,k=this.media,ae=!1;if(H)if(k&&k.readyState){var we=k.currentTime;s.logger.log("switching audio track : currentTime:"+we),we>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=fe.BUFFER_FLUSHING,x.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ae=!0,this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var Ke=this.pendingData;if(!Ke){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),x.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&&Ke.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ae&&Ke.length&&(Ke.forEach(function(fn){c.state===fe.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===fe.PARSING&&(this.stats.tparsed=Il.now(),this.state=fe.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===fe.PARSING||c===fe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===fe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=Il.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var R=this.mediaBuffer?this.mediaBuffer:this.media;R&&s.logger.log("audio buffered : "+dt.toString(R.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=fe.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 R=this.fragLoadError;R?R++:R=1;var C=this.config;if(R<=C.fragLoadingMaxRetry){this.fragLoadError=R;var F=Math.min(Math.pow(2,R-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=Il.now()+F,this.state=fe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=fe.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!==fe.ERROR&&(this.state=o.fatal?fe.ERROR:fe.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===fe.PARSING||this.state===fe.PARSED)){var x=this.mediaBuffer,H=this.media.currentTime,k=x&&j.isBuffered(x,H)&&j.isBuffered(x,H+.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=fe.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=fe.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=fe.PARSED):(this.state=fe.IDLE,this.fragPrevious=null,this.tick())},pf(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}(bl),sI=cI,pg=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(R){if(typeof R!="string")return!1;var C=D[R.toLowerCase()];return C?R.toLowerCase():!1}function o(R){if(typeof R!="string")return!1;var C=f[R.toLowerCase()];return C?R.toLowerCase():!1}function c(R){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");Lu=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"positionAlign",c({},H,{get:function(){return ko},set:function(ja){var To=o(ja);if(!To)throw new SyntaxError("An invalid or illegal string was specified.");ko=To,this.hasBeenReset=!0}})),Object.defineProperty(x,"size",c({},H,{get:function(){return Hi},set:function(ja){if(ja<0||ja>100)throw new Error("Size must be between 0 and 100.");Hi=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"align",c({},H,{get:function(){return st},set:function(ja){var To=o(ja);if(!To)throw new SyntaxError("An invalid or illegal string was specified.");st=To,this.hasBeenReset=!0}})),x.displayState=void 0}return _.prototype.getCueAsHTML=function(){var R=window.WebVTT;return R.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 dg(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new vI,this.regionList=[]}function fI(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 mg(){this.values=Object.create(null)}mg.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 hg(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 R=_[0],C=_[1];D(R,C)}}}var df=new pg(0,0,0),Bi=df.align==="middle"?"middle":"center";function _I(w,D,f){var v=w;function o(){var R=fI(w);if(R===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),R}function c(R,C){var F=new mg;hg(R,function(k,ae){switch(k){case"region":for(var we=f.length-1;we>=0;we--)if(f[we].id===ae){F.set(k,f[we].region);break}break;case"vertical":F.alt(k,ae,["rl","lr"]);break;case"line":var Ke=ae.split(","),fn=Ke[0];F.integer(k,fn),F.percent(k,fn)&&F.set("snapToLines",!1),F.alt(k,fn,["auto"]),Ke.length===2&&F.alt("lineAlign",Ke[1],["start",Bi,"end"]);break;case"position":Ke=ae.split(","),F.percent(k,Ke[0]),Ke.length===2&&F.alt("positionAlign",Ke[1],["start",Bi,"end","line-left","line-right","auto"]);break;case"size":F.percent(k,ae);break;case"align":F.alt(k,ae,["start",Bi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var x=F.get("line","auto");x==="auto"&&df.line===-1&&(x=-1),C.line=x,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Bi);var H=F.get("position","auto");H==="auto"&&df.position===50&&(H=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=H}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 Dg(w){return w.replace(//gi,` `)}dg.prototype={parse:function(D){var f=this;D&&(f.buffer+=f.decoder.decode(D,{stream:!0}));function v(){var F=f.buffer,x=0;for(F=Dg(F);x")===-1){f.cue.id=c;continue}case"CUE":try{_I(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&&(R=!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 pI=dg;function dI(w,D,f,v){for(var o,c,_,R,C,F=window.VTTCue||TextTrackCue,x=0;x=16?R--:R++,navigator.userAgent.match(/Firefox\//)?c.line=x+1:c.line=x>7?x-2:x+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(R/32))),w.addCue(c)}}var Ad={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},gg=function(D){var f=D;return Ad.hasOwnProperty(D)&&(f=Ad[D]),String.fromCharCode(f)},Au=15,Tl=100,mI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},hI={17:2,18:4,21:6,22:8,23:10,19:13,20:15},DI={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},gI={25:2,26:4,29:6,30:8,31:10,27:13,28:15},RI=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Rg;(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"})(Rg||(Rg={}));var $a={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}},Yc=function(D){for(var f=[],v=0;vTl&&($a.log("ERROR","Too large cursor position "+this.pos),this.pos=Tl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=gg(v);if(this.pos>=Tl){$a.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}(),l0=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 za,this.nonDisplayedMemory=new za,this.lastOutputScreen=new za,this.currRollUpRow=this.displayedMemory.rows[Au-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[Au-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,$a.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]}$a.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=$a.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}(),c0=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 l0(1,v),new l0(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,_,R,C=!1;this.lastTime=v,$a.setTime(v);for(var F=0;F ("+Yc([_,R])+")");if(c=this.parseCmd(_,R),c||(c=this.parseMidrow(_,R)),c||(c=this.parsePAC(_,R)),c||(c=this.parseBackgroundAttributes(_,R)),!c&&(C=this.parseChars(_,R),C))if(this.currChNr&&this.currChNr>=0){var x=this.channels[this.currChNr-1];x.insertChars(C)}else $a.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,$a.log("WARNING","Couldn't parse cleaned data "+Yc([_,R])+" orig: "+Yc([o[F],o[F+1]])))}},D.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,R=(v===23||v===31)&&o>=33&&o<=35;if(!(_||R))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,$a.log("DEBUG","Repeated command ("+Yc([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 $a.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),$a.log("DEBUG","MIDROW ("+Yc([v,o])+")"),!0}return!1},D.parsePAC=function(v,o){var c=null,_=null,R=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(R||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?mI[v]:DI[v]:_=c===1?hI[v]:gI[v];var F=this.interpretPAC(_,o),x=this.channels[c-1];return x.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,R=null;if(v>=25?(c=2,R=v-8):(c=1,R=v),R>=17&&R<=19){var C=o;R===17?C=o+80:R===18?C=o+112:C=o+144,$a.log("INFO","Special char '"+gg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=Yc(_);$a.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},D.parseBackgroundAttributes=function(v,o){var c,_,R,C,F=(v===16||v===24)&&o>=32&&o<=47,x=(v===23||v===31)&&o>=45&&o<=47;return F||x?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=RI[_],o%2==1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),R=v<24?1:2,C=this.channels[R-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}(),Pd=function(D,f,v){return D.substr(v||0,f.length)===f},EI=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()},II=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},TI={parse:function(D,f,v,o,c,_){var R=/\r\n|\n\r|\n|\r/g,C=Object(u0.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(R,` `).split(` `),F="00:00.000",x=0,H=0,k=0,ae=[],we,Ke=!0,fn=!1,_a=new pI;_a.oncue=function(Zn){var la=v[o],Ra=v.ccOffset;la&&la.new&&(H!==void 0?Ra=v.ccOffset=la.start:II(v,o,k)),k&&(Ra=k-v.presentationOffset),fn&&(Zn.startTime+=Ra-H,Zn.endTime+=Ra-H),Zn.id=s0(Zn.startTime.toString())+s0(Zn.endTime.toString())+s0(Zn.text),Zn.text=decodeURIComponent(encodeURIComponent(Zn.text)),Zn.endTime>0&&ae.push(Zn)},_a.onparsingerror=function(Zn){we=Zn},_a.onflush=function(){if(we&&_){_(we);return}c(ae)},C.forEach(function(Zn){if(Ke)if(Pd(Zn,"X-TIMESTAMP-MAP=")){Ke=!1,fn=!0,Zn.substr(16).split(",").forEach(function(la){Pd(la,"LOCAL:")?F=la.substr(6):Pd(la,"MPEGTS:")&&(x=parseInt(la.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),x-=f,H=EI(F)/1e3,k=x/9e4}catch(la){fn=!1,we=la}return}else Zn===""&&(Ke=!1);_a.parse(Zn+` `)}),_a.flush()}},SI=TI;function bg(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function CI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var FI=function(w){CI(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 yg(bg(o),"textTrack1"),_=new yg(bg(o),"textTrack2");o.cea608Parser=new wI(0,c,_)}return o}var f=D.prototype;return f.addCues=function(o,c,_,R){for(var C=this.cueRanges,F=!1,x=C.length;x--;){var H=C[x],k=GI(H[0],H[1],c,_);if(k>=0&&(H[0]=Math.min(H[0],c),H[1]=Math.max(H[1],_),F=!0,k/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,R)},f.onInitPtsFound=function(o){var c=this,_=o.frag,R=o.id,C=o.initPTS,F=this.unparsedVttFrags;R==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(x){c.onFragLoaded(x)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!x||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),R.live){var H=xt(x.details,R,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+H+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},H)}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,R=c[o];o<0||!R||R.details&&!R.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:R.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,R=this.trackId;if(!!c){var C=d(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(H){H.mode="disabled"});else{var F=C[R];F&&(F.mode="disabled")}var x=C[o];x&&(x.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;_=R[x].start&&F<=R[x].end){C=R[x];break}var H=c.start+c.duration;C?C.end=H:(C={start:F,end:H},R.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=fe.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=fe.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=fe.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(ha)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,R=this.currentTrackId,C=this.tracks,F=C[R];c>=C.length||c!==R||!F||(_.live&&Vn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(ha))},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,R=o.frag,C=this.hls;if(this.state===fe.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=_n.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(x){var H=_n.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:R,payload:x,stats:{tstart:F,tdecrypt:H}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=fe.IDLE;return}switch(this.state){case fe.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,R=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,x=o.maxFragLookUpTolerance,H=Math.min(o.maxBufferLength,o.maxMaxBufferLength),k=j.bufferedInfo(this._getBuffered(),R.currentTime,F),ae=k.end,we=k.len,Ke=C[c].details,fn=Ke.fragments,_a=fn.length,Zn=fn[_a-1].start+fn[_a-1].duration;if(we>H)return;var la,Ra=this.fragPrevious;aeIg){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=Ig-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,R)}break}},f._generateLicenseRequestChallenge=function(o,c){switch(o.mediaKeySystemDomain){case Xt.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 R=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(R,o,c);s.logger.log("Sending license request to URL: "+R);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(x){s.logger.error("Failure requesting DRM license: "+x),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(R){return R.audioCodec}),_=o.levels.map(function(R){return R.videoCodec});this._attemptKeySystemAccess(Xt.WIDEVINE,c,_)}},LI(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(y),xI=Sg;function NI(w){for(var D=1;Dc)return R}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);Lg.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 y}),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,T){return T="["+b+"] > "+T,T}var s=Object(t.getSelfScope)();function h(b){var T=s.console[b];return T?function(){for(var L=arguments.length,O=new Array(L),$=0;$1?T-1:0),O=1;O{"use strict";Object.defineProperty(LD,"__esModule",{value:!0});LD.Direction=void 0;var sFe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(sFe=LD.Direction||(LD.Direction={}))});var aL=Ae(Aa=>{"use strict";var PD=Aa&&Aa.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(h&&ht)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,")"))}Aa.checkBoundaries=mFe;function hFe(e,n,a){return ea?a:e}Aa.checkValuesAgainstBoundaries=hFe;function DFe(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}"))}Aa.checkInitialOverlap=DFe;function gFe(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)}}Aa.getMargin=gFe;function RFe(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)}}Aa.getPaddingAndBorder=RFe;function yFe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return QV(r,t*n[u].x,n[u].y)})}Aa.translateThumbs=yFe;function bFe(e,n,a,t){for(var r=0,u=YV(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},CFe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(h){return h});var l=[],s=function(h){var p=KV(a[h],t[h],r,u,i),y=n[h].x;n.forEach(function(E,b){var T=E.x,L=KV(a[b],t[b],r,u,i);h!==b&&(y>=T&&y<=T+L||y+p>=T&&y+p<=T+L)&&(l.includes(b)||(l.push(h),l.push(b),l=PD(PD([],l,!0),[h,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},FFe=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,Aa.getStepDecimals)(t),l=(0,nL.useState)({}),s=l[0],h=l[1],p=(0,nL.useState)(u(n[a].toFixed(i))),y=p[0],E=p[1];return(0,nL.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var T={},L=e.getOffsets(),O=CFe(a,L,b,n,r,i,u),$=u(n[a].toFixed(i));if(O.length){var z=O.reduce(function(te,he,Be,ce){return te.length?PD(PD([],te,!0),[L[ce[Be]].x],!1):[L[ce[Be]].x]},[]);if(Math.min.apply(Math,z)===L[a].x){var ee=[];O.forEach(function(te){ee.push(n[te].toFixed(i))}),$=Array.from(new Set(ee.sort(function(te,he){return parseFloat(te)-parseFloat(he)}))).map(u).join(r);var ue=Math.min.apply(Math,z),X=Math.max.apply(Math,z),Y=b[O[z.indexOf(X)]].getBoundingClientRect().width;T.left="".concat(Math.abs(ue-(X+Y))/2,"px"),T.transform="translate(-50%, 0)"}else T.visibility="hidden"}E($),h(T)}},[e,n]),[y,s]};Aa.useThumbOverlap=FFe;function YV(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return VV(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var ZV=Ae(Li=>{"use strict";var GFe=Li&&Li.__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)}}(),MFe=Li&&Li.__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]}),AFe=Li&&Li.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),LFe=Li&&Li.__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)&&MFe(n,e,a);return AFe(n,e),n},XV=Li&&Li.__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,gt.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,gt.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,gt.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,gt.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,h=u.rtl,p=u.direction,y=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=h||p===oo.Direction.Left||p===oo.Direction.Down?-1:1;E!==-1&&(PFe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,gt.replaceAt)(i,E,t.normalizeValue(i[E]+b*(r.key==="PageUp"?s*10:s),E)))):xFe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,gt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){y&&t.fireOnFinalChange()}):y&&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,h=t.props,p=h.direction,y=h.min,E=h.max,b=h.onChange,T=h.values,L=h.step,O=h.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var $=t.trackRef.current;if(!$)return null;var z=$.getBoundingClientRect(),ee=(0,gt.isVertical)(p)?z.height:z.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],X=u-s[1],Y=0;switch(p){case oo.Direction.Right:case oo.Direction.Left:Y=ue/ee*(E-y);break;case oo.Direction.Down:case oo.Direction.Up:Y=X/ee*(E-y);break;default:(0,gt.assertUnreachable)(p)}if(O&&(Y*=-1),Math.abs(Y)>=L/2){for(var te=0;teE?Y=E-T[te]:he=L/2&&b((0,gt.replaceAt)(T,l,t.normalizeValue(ce,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,h=i.step,p=i.allowOverlap,y=i.values;return(0,gt.normalizeValue)(r,u,l,s,h,p,y)},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,gt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?gt.voidFn:this.onMouseDownTrack,onTouchStart:E?gt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:XV(XV([],O.map(function($,z,ee){return l({props:{style:a.props.direction===oo.Direction.Left||a.props.direction===oo.Direction.Right?{position:"absolute",left:"".concat($[0],"px"),marginTop:"".concat($[1],"px")}:{position:"absolute",top:"".concat($[0],"px"),marginLeft:"".concat($[1],"px")},key:"mark".concat(z),ref:a.markRefs[z]},index:z})}),!0),s.map(function($,z){var ee=a.state.draggedThumbIndex===z;return u({index:z,value:$,isDragged:ee,props:{style:{position:"absolute",zIndex:L[z],cursor:E?"inherit":ee?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:z,tabIndex:E?void 0:0,"aria-valuemax":y?p:s[z+1]||p,"aria-valuemin":y?h:s[z-1]||h,"aria-valuenow":$,draggable:!1,ref:a.thumbRefs[z],role:"slider",onKeyDown:E?gt.voidFn:a.onKeyDown,onKeyUp:E?gt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:oo.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(Q1.Component);Li.default=NFe});var eQ=Ae(au=>{"use strict";var jFe=au&&au.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(au,"__esModule",{value:!0});au.checkValuesAgainstBoundaries=au.relativeValue=au.useThumbOverlap=au.Direction=au.getTrackBackground=au.Range=void 0;var OFe=jFe(ZV());au.Range=OFe.default;var K1=aL();Object.defineProperty(au,"getTrackBackground",{enumerable:!0,get:function(){return K1.getTrackBackground}});Object.defineProperty(au,"useThumbOverlap",{enumerable:!0,get:function(){return K1.useThumbOverlap}});Object.defineProperty(au,"relativeValue",{enumerable:!0,get:function(){return K1.relativeValue}});Object.defineProperty(au,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return K1.checkValuesAgainstBoundaries}});var UFe=V1();Object.defineProperty(au,"Direction",{enumerable:!0,get:function(){return UFe.Direction}})});var I2e={};d2(I2e,{boot:()=>E2e});var m2=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 w2=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 qd=function(e){return e.slice().reverse()};var I2=function(e,n){return n.filter(e)};var T2=function(){function e(n,a,t,r,u,i){var l,s,h,p,y,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,h=l,p=u;s0?(t[p++]=E,++h):(t[p++]=y,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Wt={show:oP};var uP=function(e){return e.showRecordFields},Rf=function(){return function(){return function(e){var n=uP(e);return{show:function(a){return"{"+(n(at.value)(a)+"}")}}}}};var yf={show:tP},an={show:aP},Qd={show:rP},D0={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])}},re=function(e){return e.show};var bf=function(e){var n=rr(e);return function(a){var t=uP(a);return function(r){var u=re(r);return{showRecordFields:function(i){return function(l){var s=t(at.value)(l),h=n(at.value),p=xu(h)(l);return" "+(h+(": "+(u(p)+(","+s))))}}}}}},wf=function(e){var n=rr(e);return function(a){var t=re(a);return{showRecordFields:function(r){return function(u){var i=n(at.value),l=xu(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var be=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ve=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var ke=function(){function e(){}return e.value=new e,e}(),Kd=function(e){return e};var g0=function(e){return e.to};var R0=function(e){return e.from};var JX=pn(dn),M=function(){function e(){}return e.value=new e,e}(),S=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var iP=function(e){var n=on(e);return{append:function(a){return function(t){if(a instanceof M)return t;if(t instanceof M)return a;if(a instanceof S&&t instanceof S)return new S(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 wn=function(e){return function(n){return function(a){if(a instanceof M)return e;if(a instanceof S)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])}}},Ct=wn(!0)(hn(!1)),jt=wn(!1)(hn(!0));var oe={map:function(e){return function(n){return n instanceof S?new S(e(n.value0)):M.value}}},$X=U(oe);var ze=function(e){return wn(e)(JX)},bt=function(){return function(e){if(e instanceof S)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var Vt=function(e){var n=Ee(e);return{eq:function(a){return function(t){return a instanceof M&&t instanceof M?!0:a instanceof S&&t instanceof S?n(a.value0)(t.value0):!1}}}},iu=function(e){var n=nn(e),a=Vt(e.Eq0());return{compare:function(t){return function(r){if(t instanceof M&&r instanceof M)return qe.value;if(t instanceof M)return Re.value;if(r instanceof M)return me.value;if(t instanceof S&&r instanceof S)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 fr={apply:function(e){return function(n){if(e instanceof S)return $X(e.value0)(n);if(e instanceof M)return M.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 rn={bind:function(e){return function(n){if(e instanceof S)return n(e.value0);if(e instanceof M)return M.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 fr}};var ra=function(){return{pure:S.create,Apply0:function(){return fr}}}();var Kr={alt:function(e){return function(n){return e instanceof M?n:e}},Functor0:function(){return oe}},zX=function(){return{empty:M.value,Alt0:function(){return Kr}}}(),Wr={Applicative0:function(){return ra},Plus1:function(){return zX}};var Pe=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}();var b0=function(e){return wn(new Pe(e))(Oe.create)};var Dr={map:function(e){return function(n){if(n instanceof Pe)return new Pe(n.value0);if(n instanceof Oe)return new Oe(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},VX=U(Dr);var Jt=function(e){return function(n){return function(a){if(a instanceof Pe)return e(a.value0);if(a instanceof Oe)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])}}},Ef=function(){return Jt(hn(M.value))(S.create)}();var Yd={apply:function(e){return function(n){if(e instanceof Pe)return new Pe(e.value0);if(e instanceof Oe)return VX(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 Dr}};var Nu={bind:Jt(function(e){return function(n){return new Pe(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return Yd}};var ov=function(){return{pure:Oe.create,Apply0:function(){return Yd}}}(),Jg={Applicative0:function(){return ov},Bind1:function(){return Nu}};var di=function(e){return e};var ns={map:function(e){return function(n){return e(n)}}};var lP={apply:function(e){return function(n){return e(n)}},Functor0:function(){return ns}},QX={bind:function(e){return function(n){return n(e)}},Apply0:function(){return lP}},cP={pure:di,Apply0:function(){return lP}},sr={Applicative0:function(){return cP},Bind1:function(){return QX}};var sP=function(e){return Math.min(Math.abs(e),2147483647)},vP=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},fP=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var WI={Ring0:function(){return nc}};var So=function(e){return e.mod};var or={degree:sP,div:vP,mod:fP,CommutativeRing0:function(){return WI}},vo=function(e){return e.div};var wt={mempty:"",Semigroup0:function(){return Df}};var Za=function(e){return e.mempty};var pP=function(e){return function(){return e}},dP=function(e){return function(n){return function(){return n(e())()}}};var JI=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,h=l,p=u;s0?(t[p++]=E,++h):(t[p++]=y,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},BP=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 gee=Zt(We),d3=ic(sv),Ree=Ft(We);var sm=function(e){return e.foldrWithIndex};var vm=function(e){return e.foldlWithIndex};var yee=function(e){var n=sm(e);return function(a){var t=on(a.Semigroup0()),r=Za(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},fm={foldrWithIndex:function(e){return function(n){var a=gee(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=d3(Dn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=Ree(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=d3(Dn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return yee(fm)(e)},Foldable0:function(){return We}};var m3=function(e){var n=vm(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof M?a(r)(i):u}}};return n(t)(M.value)}};var h3=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Gt=function(e){return e},D3=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 nR=isFinite;var aR=Math.abs;var x0=Math.floor,DT=Math.log;var tR=function(e){return function(n){return Math.pow(e,n)}};var Pf=Math.round;var g3=2.302585092994046;var R3=zt(Vd),y3=ot(Vd);var See=function(){return D3(S.create)(M.value)}(),cc=See(10),xf=function(){return h3(S.create)(M.value)}(),b3=function(e){if(!nR(e))return 0;if(e>=Gt(R3))return R3;if(e<=Gt(y3))return y3;if($e)return ze(0)(xf(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},rR=function(e){return b3(Pf(e))};var _o=function(e){return b3(x0(e))};function oR(e){return Object.prototype.toString.call(e).slice(8,-1)}function _m(e){return e===null}function Nf(e){return e===void 0}var uR=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function w3(e){return e.stack||e.toString()}function pu(e){return new Error(e)}function N0(e){return e.message}function iR(e){return function(){throw e}}var I3=function(e){return iR(pu(e))};var T3={show:w3};var Nr=function(e){return e.throwError};var Ot=function(e){return e.catchError};var jf=function(e){var n=Ot(e),a=e.MonadThrow0().Monad0(),t=U(a.Bind1().Apply0().Functor0()),r=W(a.Applicative0());return function(u){return n(t(Oe.create)(u))(function(i){return r(Pe.create(i))})}};var Rr={liftEffect:pn(dn),Monad0:function(){return tc}},yn=function(e){return e.liftEffect};var Cee=U(Dr);var RT=function(e){return e};var sR=function(e){return e};var vR=function(e){return function(n){return e(n)}},fR=function(e){var n=U(e);return{map:function(a){return vR(n(Cee(a)))}}};var C3=function(e){return{Applicative0:function(){return os(e)},Bind1:function(){return Uf(e)}}},Uf=function(e){var n=ne(e.Bind1()),a=W(e.Applicative0());return{bind:function(t){return function(r){return n(t)(Jt(function(u){return a(Pe.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return yT(e)}}},yT=function(e){var n=fR(e.Bind1().Apply0().Functor0());return{apply:qi(C3(e)),Functor0:function(){return n}}},os=function(e){return{pure:function(){var n=W(e.Applicative0());return function(a){return RT(n(Oe.create(a)))}}(),Apply0:function(){return yT(e)}}};var F3=function(e){var n=C3(e);return{throwError:function(){var a=W(e.Applicative0());return function(t){return RT(a(Pe.create(t)))}}(),Monad0:function(){return n}}};var _R=function(e){var n=on(e);return function(a){var t=a.Bind1(),r=ne(t),u=W(a.Applicative0()),i=fR(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(h){if(h instanceof Oe)return u(new Oe(h.value0));if(h instanceof Pe)return r(s)(function(p){if(p instanceof Oe)return u(new Oe(p.value0));if(p instanceof Pe)return u(new Pe(n(h.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): "+[h.constructor.name])})}},Functor0:function(){return i}}}};var Hu=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 mR=function(e){var n=lu(e);return function(a){return new Hu(a,n)}};var bT=function(e){var n=U(e);return{map:function(a){return function(t){return new Hu(a(t.value0),n(a)(t.value1))}}}};var wT=function(e){var n=xr(e),a=Ft(e),t=Zt(e);return{foldMap:function(r){var u=on(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 Yt=function(){function e(){}return e.value=new e,e}(),rt=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},jee=function(e){return new rt(e.value0,e.value1)};var Oee=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,h){if(h instanceof rt&&h.value1 instanceof rt&&h.value1.value1 instanceof rt){r=new rt(h,s),t=h.value1.value1.value1;return}var p=function(E){return E instanceof rt&&E.value1 instanceof rt&&E.value1.value1 instanceof Yt?new rt(e(E.value0),new rt(e(E.value1.value0),Yt.value)):E instanceof rt&&E.value1 instanceof Yt?new rt(e(E.value0),Yt.value):Yt.value},y=function(E){return function(b){var T=E,L=!1,O;function $(z,ee){if(z instanceof rt&&z.value0 instanceof rt&&z.value0.value1 instanceof rt&&z.value0.value1.value1 instanceof rt){T=z.value1,b=new rt(e(z.value0.value0),new rt(e(z.value0.value1.value0),new rt(e(z.value0.value1.value1.value0),ee)));return}return L=!0,ee}for(;!L;)O=$(T,b);return O}};return u=!0,y(s)(p(h))}for(;!u;)i=l(r,t);return i}};return n(Yt.value)},L3={map:Oee};var ET=bT(L3),Go={foldr:function(e){return function(n){var a=function(){var r=function(u){return function(i){var l=u,s=!1,h;function p(y,E){if(E instanceof Yt)return s=!0,y;if(E instanceof rt){l=new rt(E.value0,y),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[y.constructor.name,E.constructor.name])}for(;!s;)h=p(l,i);return h}};return r(Yt.value)}(),t=Ft(Go)(Ya(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,h){if(h instanceof Yt)return u=!0,s;if(h instanceof rt){r=e(s)(h.value0),t=h.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[h.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=on(e.Semigroup0()),a=Za(e);return function(t){return Ft(Go)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var Uee=Zt(Go);var DR=wT(Go);var IT={append:function(e){return function(n){return Uee(rt.create)(n)(e)}}},P3=on(IT);var gR={append:function(e){return function(n){return new Hu(e.value0,P3(e.value1)(jee(n)))}}};var kee={alt:P3,Functor0:function(){return L3}},x3=function(){return{empty:Yt.value,Alt0:function(){return kee}}}();var Vee=lt(bP);var U3=function(e){return new rt(e,Yt.value)};var TT=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Yt)return r=!0,l;if(s instanceof rt){t=new rt(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(Yt.value)}();var ST=function(e){var n=ne(e.Monad0().Bind1()),a=Co(e);return function(t){var r=t.Plus1().Alt0(),u=ma(r),i=U(r.Functor0()),l=W(t.Applicative0());return function(s){var h=function(p){return n(u(i(Kt.create)(s))(l(new $t(ye))))(function(y){return l(Vee(function(E){return new rt(E,p)})(function(E){return TT(p)})(y))})};return a(h)(Yt.value)}}};var Vo=function(e){return Zt(e)(rt.create)(Yt.value)};var k3=function(e){return e()};var B3=function(e){throw new Error(e)};var H3=function(){return B3};var Qee=H3(),Kee=k3,sc=function(e){return Kee(function(){return Qee(e)})};var yR=function(){var e=mR(x3);return function(n){return hR(e(n))}}();var W3=function(e){return e.value0};var U0=function(e){return e.join("")},dm=function(e){return e.split("")},qu=function(e){return e},J3=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 ix(e,n){var a=MT(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=MT(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function lx(e){return function(n){return function(a){return function(t){var r=MT(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 cx=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function sx(e,n,a,t){var r=cx(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function vx(e,n,a){return cx(e,n-1,a).getUTCDay()}function mv(e){return e.charCodeAt(0)}function fx(e){return String.fromCharCode(e)}var br=function(e){var n=W(e.Applicative0()),a=lu(e.Plus1());return function(t){if(t)return n(ye);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 _x=ot(rv),px=zt(rv);var oa=function(e){return e.toEnum};var $n=function(e){return e.fromEnum},AT=function(e){var n=oa(e),a=$n(e),t=ot(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof S)return l.value0;if(l instanceof M){var s=i=mv(_x)&&e<=mv(px)?new S(fx(e)):M.value},hne={succ:Jf(LT)(mv),pred:$f(LT)(mv),Ord0:function(){return Wg}};var zf=function(){return{cardinality:mv(px)-mv(_x)|0,toEnum:LT,fromEnum:mv,Bounded0:function(){return rv},Enum1:function(){return hne}}}();var TR=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}},dx=re(an);var Di=function(){function e(){}return e.value=new e,e}(),Qi=function(){function e(){}return e.value=new e,e}(),Ki=function(){function e(){}return e.value=new e,e}(),Yi=function(){function e(){}return e.value=new e,e}(),Xi=function(){function e(){}return e.value=new e,e}(),Zi=function(){function e(){}return e.value=new e,e}(),Al=function(){function e(){}return e.value=new e,e}(),du=function(){function e(){}return e.value=new e,e}(),Ju=function(){function e(){}return e.value=new e,e}(),mu=function(){function e(){}return e.value=new e,e}(),$u=function(){function e(){}return e.value=new e,e}(),zu=function(){function e(){}return e.value=new e,e}(),hu=function(){function e(){}return e.value=new e,e}(),Du=function(){function e(){}return e.value=new e,e}(),Vu=function(){function e(){}return e.value=new e,e}(),Qu=function(){function e(){}return e.value=new e,e}(),Ku=function(){function e(){}return e.value=new e,e}(),Yu=function(){function e(){}return e.value=new e,e}(),gi=function(){function e(){}return e.value=new e,e}();var mx={show:function(e){return"(Year "+(dx(e)+")")}},hx={show:function(e){if(e instanceof Di)return"Monday";if(e instanceof Qi)return"Tuesday";if(e instanceof Ki)return"Wednesday";if(e instanceof Yi)return"Thursday";if(e instanceof Xi)return"Friday";if(e instanceof Zi)return"Saturday";if(e instanceof Al)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},SR={show:function(e){if(e instanceof du)return"January";if(e instanceof Ju)return"February";if(e instanceof mu)return"March";if(e instanceof $u)return"April";if(e instanceof zu)return"May";if(e instanceof hu)return"June";if(e instanceof Du)return"July";if(e instanceof Vu)return"August";if(e instanceof Qu)return"September";if(e instanceof Ku)return"October";if(e instanceof Yu)return"November";if(e instanceof gi)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},Dx={show:function(e){return"(Day "+(dx(e)+")")}},CR=na,FR=na,gx=tt,Dne={eq:function(e){return function(n){return e instanceof Di&&n instanceof Di||e instanceof Qi&&n instanceof Qi||e instanceof Ki&&n instanceof Ki||e instanceof Yi&&n instanceof Yi||e instanceof Xi&&n instanceof Xi||e instanceof Zi&&n instanceof Zi||e instanceof Al&&n instanceof Al}}},Rx={compare:function(e){return function(n){if(e instanceof Di&&n instanceof Di)return qe.value;if(e instanceof Di)return Re.value;if(n instanceof Di)return me.value;if(e instanceof Qi&&n instanceof Qi)return qe.value;if(e instanceof Qi)return Re.value;if(n instanceof Qi)return me.value;if(e instanceof Ki&&n instanceof Ki)return qe.value;if(e instanceof Ki)return Re.value;if(n instanceof Ki)return me.value;if(e instanceof Yi&&n instanceof Yi)return qe.value;if(e instanceof Yi)return Re.value;if(n instanceof Yi)return me.value;if(e instanceof Xi&&n instanceof Xi)return qe.value;if(e instanceof Xi)return Re.value;if(n instanceof Xi)return me.value;if(e instanceof Zi&&n instanceof Zi)return qe.value;if(e instanceof Zi)return Re.value;if(n instanceof Zi)return me.value;if(e instanceof Al&&n instanceof Al)return qe.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 Dne}},PT={eq:function(e){return function(n){return e instanceof du&&n instanceof du||e instanceof Ju&&n instanceof Ju||e instanceof mu&&n instanceof mu||e instanceof $u&&n instanceof $u||e instanceof zu&&n instanceof zu||e instanceof hu&&n instanceof hu||e instanceof Du&&n instanceof Du||e instanceof Vu&&n instanceof Vu||e instanceof Qu&&n instanceof Qu||e instanceof Ku&&n instanceof Ku||e instanceof Yu&&n instanceof Yu||e instanceof gi&&n instanceof gi}}},W0={compare:function(e){return function(n){if(e instanceof du&&n instanceof du)return qe.value;if(e instanceof du)return Re.value;if(n instanceof du)return me.value;if(e instanceof Ju&&n instanceof Ju)return qe.value;if(e instanceof Ju)return Re.value;if(n instanceof Ju)return me.value;if(e instanceof mu&&n instanceof mu)return qe.value;if(e instanceof mu)return Re.value;if(n instanceof mu)return me.value;if(e instanceof $u&&n instanceof $u)return qe.value;if(e instanceof $u)return Re.value;if(n instanceof $u)return me.value;if(e instanceof zu&&n instanceof zu)return qe.value;if(e instanceof zu)return Re.value;if(n instanceof zu)return me.value;if(e instanceof hu&&n instanceof hu)return qe.value;if(e instanceof hu)return Re.value;if(n instanceof hu)return me.value;if(e instanceof Du&&n instanceof Du)return qe.value;if(e instanceof Du)return Re.value;if(n instanceof Du)return me.value;if(e instanceof Vu&&n instanceof Vu)return qe.value;if(e instanceof Vu)return Re.value;if(n instanceof Vu)return me.value;if(e instanceof Qu&&n instanceof Qu)return qe.value;if(e instanceof Qu)return Re.value;if(n instanceof Qu)return me.value;if(e instanceof Ku&&n instanceof Ku)return qe.value;if(e instanceof Ku)return Re.value;if(n instanceof Ku)return me.value;if(e instanceof Yu&&n instanceof Yu)return qe.value;if(e instanceof Yu)return Re.value;if(n instanceof Yu)return me.value;if(e instanceof gi&&n instanceof gi)return qe.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 PT}},yx=tt,GR=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return CR}}}(),gne=function(){return{bottom:Di.value,top:Al.value,Ord0:function(){return Rx}}}(),MR=function(){return{bottom:du.value,top:gi.value,Ord0:function(){return W0}}}(),Or={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new S(e);if($e)return M.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 GR},Enum1:function(){return Rne(0)}},Rne=TR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=oa(Or),n=$n(Or);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(Or),n=$n(Or);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return CR}}});var hv={cardinality:7,toEnum:function(e){return e===1?new S(Di.value):e===2?new S(Qi.value):e===3?new S(Ki.value):e===4?new S(Yi.value):e===5?new S(Xi.value):e===6?new S(Zi.value):e===7?new S(Al.value):M.value},fromEnum:function(e){if(e instanceof Di)return 1;if(e instanceof Qi)return 2;if(e instanceof Ki)return 3;if(e instanceof Yi)return 4;if(e instanceof Xi)return 5;if(e instanceof Zi)return 6;if(e instanceof Al)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 gne},Enum1:function(){return yne(0)}},yne=TR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=oa(hv),n=$n(hv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(hv),n=$n(hv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return Rx}}});var ur={cardinality:12,toEnum:function(e){return e===1?new S(du.value):e===2?new S(Ju.value):e===3?new S(mu.value):e===4?new S($u.value):e===5?new S(zu.value):e===6?new S(hu.value):e===7?new S(Du.value):e===8?new S(Vu.value):e===9?new S(Qu.value):e===10?new S(Ku.value):e===11?new S(Yu.value):e===12?new S(gi.value):M.value},fromEnum:function(e){if(e instanceof du)return 1;if(e instanceof Ju)return 2;if(e instanceof mu)return 3;if(e instanceof $u)return 4;if(e instanceof zu)return 5;if(e instanceof hu)return 6;if(e instanceof Du)return 7;if(e instanceof Vu)return 8;if(e instanceof Qu)return 9;if(e instanceof Ku)return 10;if(e instanceof Yu)return 11;if(e instanceof gi)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 MR},Enum1:function(){return bne(0)}},bne=TR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=oa(ur),n=$n(ur);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(ur),n=$n(ur);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return W0}}});var Em={bottom:1,top:31,Ord0:function(){return FR}},gu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new S(e);if($e)return M.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 Em},Enum1:function(){return wne(0)}},wne=TR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=oa(gu),n=$n(gu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(gu),n=$n(gu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return FR}}});var J0=aT()();var bx=pn(dn),xT=function(e){return e},Ene=function(e){return e},Im=function(e){return e};var Ine=function(e){return e},$0=function(e){return e.toDuration};var wx={append:function(e){return function(n){return e+n}}};var AR={append:function(e){return function(n){return e+n}}};var Ex=Zc;var Ix=Zc;var LR=function(e){return e.fromDuration};var ss={fromDuration:J0(xT)(function(e){return e*1e3}),toDuration:J0(Im)(function(e){return e/1e3})},Dv={fromDuration:J0(Ene)(function(e){return e*6e4}),toDuration:J0(Im)(function(e){return e/6e4})},z0={fromDuration:bx,toDuration:bx};var NT={fromDuration:J0(Ine)(function(e){return e*864e5}),toDuration:J0(Im)(function(e){return e/864e5})};var Cx=$n(ur),jT=bt(),Fx=oa(hv),Sne=re(mx),Cne=re(SR),Fne=re(Dx);var Gne=Ee(gx),Mne=Ee(PT),Ane=Ee(yx),Lne=nn(CR),Pne=nn(W0),xne=nn(FR);var Nne=oa(ur);var PR=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}(),Xu=function(e){return e.value0},Tm=function(e){var n=vx(e.value0,Cx(e.value1),e.value2),a=n===0;return jT(Fx(a?7:n))},Gx={show:function(e){return"(Date "+(Sne(e.value0)+(" "+(Cne(e.value1)+(" "+(Fne(e.value2)+")")))))}},Zu=function(e){return e.value1};var xR={eq:function(e){return function(n){return Gne(e.value0)(n.value0)&&Mne(e.value1)(n.value1)&&Ane(e.value2)(n.value2)}}},jne=Ee(xR),OT={compare:function(e){return function(n){var a=Lne(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof me)return me.value;var t=Pne(e.value1)(n.value1);return t instanceof Re?Re.value:t instanceof me?me.value:xne(e.value2)(n.value2)}},Eq0:function(){return xR}};var _c=function(e){return e.value2},gv=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new PR(r,jT(Nne(u)),i)}}};return sx(t,e,Cx(n),a)}}},NR=function(e){return function(n){return function(a){var t=new PR(e,n,a),r=jne(gv(e)(n)(a))(t);return r?new S(t):M.value}}},UT=function(){return{bottom:new PR(ot(GR),ot(MR),ot(Em)),top:new PR(zt(GR),zt(MR),zt(Em)),Ord0:function(){return OT}}}();var jR=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}},OR=re(an);var Mx={show:function(e){return"(Second "+(OR(e)+")")}},Ax={show:function(e){return"(Minute "+(OR(e)+")")}},Lx={show:function(e){return"(Millisecond "+(OR(e)+")")}},Px={show:function(e){return"(Hour "+(OR(e)+")")}},UR=na,kR=na,BR=na,HR=na,xx=tt,Nx=tt,jx=tt,Ox=tt,Sm={bottom:0,top:59,Ord0:function(){return UR}},Cm={bottom:0,top:59,Ord0:function(){return kR}},Fm={bottom:0,top:999,Ord0:function(){return BR}},Gm={bottom:0,top:23,Ord0:function(){return HR}},Ri={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if($e)return M.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 Sm},Enum1:function(){return One(0)}},One=jR("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=oa(Ri),n=$n(Ri);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(Ri),n=$n(Ri);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return UR}}});var yi={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if($e)return M.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 Cm},Enum1:function(){return Une(0)}},Une=jR("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=oa(yi),n=$n(yi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(yi),n=$n(yi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return kR}}});var Ru={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new S(e);if($e)return M.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 Fm},Enum1:function(){return kne(0)}},kne=jR("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=oa(Ru),n=$n(Ru);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(Ru),n=$n(Ru);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return BR}}});var bi={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new S(e);if($e)return M.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 Gm},Enum1:function(){return Bne(0)}},Bne=jR("enumHour","Data.Time.Component",function(){return{succ:function(){var e=oa(bi),n=$n(bi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(bi),n=$n(bi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return HR}}});var Wne=re(Px),Jne=re(Ax),$ne=re(Mx),zne=re(Lx);var Vne=Ee(Ox),Qne=Ee(Nx),Kne=Ee(xx),Yne=Ee(jx),Xne=nn(HR),Zne=nn(kR),eae=nn(UR),nae=nn(BR);var pc=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}(),Ux={show:function(e){return"(Time "+(Wne(e.value0)+(" "+(Jne(e.value1)+(" "+($ne(e.value2)+(" "+(zne(e.value3)+")")))))))}};var vs=function(e){return e.value2},fs=function(e){return e.value1},el=function(e){return e.value3};var dc=function(e){return e.value0};var kT={eq:function(e){return function(n){return Vne(e.value0)(n.value0)&&Qne(e.value1)(n.value1)&&Kne(e.value2)(n.value2)&&Yne(e.value3)(n.value3)}}},BT={compare:function(e){return function(n){var a=Xne(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof me)return me.value;var t=Zne(e.value1)(n.value1);if(t instanceof Re)return Re.value;if(t instanceof me)return me.value;var r=eae(e.value2)(n.value2);return r instanceof Re?Re.value:r instanceof me?me.value:nae(e.value3)(n.value3)}},Eq0:function(){return kT}};var Mm=function(){return{bottom:new pc(ot(Gm),ot(Cm),ot(Sm),ot(Fm)),top:new pc(zt(Gm),zt(Cm),zt(Sm),zt(Fm)),Ord0:function(){return BT}}}();var aae=$n(Or),tae=$n(ur),rae=$n(gu),oae=$n(bi),uae=$n(yi),iae=$n(Ri),lae=$n(Ru),cae=re(Gx),sae=re(Ux),vae=Ee(xR),fae=Ee(kT),_ae=nn(OT),pae=nn(BT),dae=ne(rn),V0=Yn(fr),HT=U(oe),mae=Sl(rn),hae=oa(Or),Dae=oa(ur),gae=oa(gu),Rae=oa(bi),yae=oa(yi),bae=oa(Ri),wae=oa(Ru),mc=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}(),qT=function(e){return{year:aae(Xu(e.value0)),month:tae(Zu(e.value0)),day:rae(_c(e.value0)),hour:oae(dc(e.value1)),minute:uae(fs(e.value1)),second:iae(vs(e.value1)),millisecond:lae(el(e.value1))}},WT=function(e){return e.value1},kx={show:function(e){return"(DateTime "+(cae(e.value0)+(" "+(sae(e.value1)+")")))}};var Eae={eq:function(e){return function(n){return vae(e.value0)(n.value0)&&fae(e.value1)(n.value1)}}},ei={compare:function(e){return function(n){var a=_ae(e.value0)(n.value0);return a instanceof Re?Re.value:a instanceof me?me.value:pae(e.value1)(n.value1)}},Eq0:function(){return Eae}},ni=function(e){var n=$0(e);return function(a){return function(t){return n(ix(qT(a),qT(t)))}}},Vf=function(e){return e.value0},Q0=function(){return{bottom:new mc(ot(UT),ot(Mm)),top:new mc(zt(UT),zt(Mm)),Ord0:function(){return ei}}}(),hc=function(e){var n=LR(e);return function(a){return function(t){return dae(lx(S.create)(M.value)(n(a))(qT(t)))(function(r){return V0(HT(mc.create)(mae(V0(V0(HT(NR)(hae(r.year)))(Dae(r.month)))(gae(r.day)))))(V0(V0(V0(HT(pc.create)(Rae(r.hour)))(yae(r.minute)))(bae(r.second)))(wae(r.millisecond)))})}}};var Qo=function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",h="Sequential",p="Map",y="Apply",E="Alt",b="Cons",T="Resume",L="Release",O="Finalizer",$="Finalized",z="Forked",ee="Fiber",ue="Thunk";function X(He,ua,Ta,Sn){this.tag=He,this._1=ua,this._2=Ta,this._3=Sn}function Y(He){var ua=function(Ta,Sn,gn){return new X(He,Ta,Sn,gn)};return ua.tag=He,ua}function te(He){return new X(n,void 0)}function he(He){try{He()}catch(ua){setTimeout(function(){throw ua},0)}}function Be(He,ua,Ta){try{return ua(Ta())}catch(Sn){return He(Sn)}}function ce(He,ua,Ta){try{return ua(Ta)()}catch(Sn){return Ta(He(Sn))(),te}}var le=function(){var He=1024,ua=0,Ta=0,Sn=new Array(He),gn=!1;function Qe(){var ea;for(gn=!0;ua!==0;)ua--,ea=Sn[Ta],Sn[Ta]=void 0,Ta=(Ta+1)%He,ea();gn=!1}return{isDraining:function(){return gn},enqueue:function(ea){var fa,La;ua===He&&(La=gn,Qe(),gn=La),Sn[(Ta+ua)%He]=ea,ua++,gn||Qe()}}}();function Fe(He){var ua={},Ta=0,Sn=0;return{register:function(gn){var Qe=Ta++;gn.onComplete({rethrow:!0,handler:function(ea){return function(){Sn--,delete ua[Qe]}}})(),ua[Qe]=gn,Sn++},isEmpty:function(){return Sn===0},killAll:function(gn,Qe){return function(){if(Sn===0)return Qe();var ea=0,fa={};function La(vn){fa[vn]=ua[vn].kill(gn,function(ia){return function(){delete fa[vn],ea--,He.isLeft(ia)&&He.fromLeft(ia)&&setTimeout(function(){throw He.fromLeft(ia)},0),ea===0&&Qe()}})()}for(var pt in ua)ua.hasOwnProperty(pt)&&(ea++,La(pt));return ua={},Ta=0,Sn=0,function(vn){return new X(r,function(){for(var ia in fa)fa.hasOwnProperty(ia)&&fa[ia]()})}}}}}var Ie=0,je=1,Ze=2,Tn=3,Kn=4,In=5,Wn=6;function Qn(He,ua,Ta){var Sn=0,gn=Ie,Qe=Ta,ea=null,fa=null,La=null,pt=null,vn=null,ia=0,It=0,Da=null,ut=!0;function q(P){for(var N,J,V;;)switch(N=null,J=null,V=null,gn){case Ze:gn=je;try{Qe=La(Qe),pt===null?La=null:(La=pt._1,pt=pt._2)}catch(ie){gn=In,ea=He.left(ie),Qe=null}break;case Tn:He.isLeft(Qe)?(gn=In,ea=Qe,Qe=null):La===null?gn=In:(gn=Ze,Qe=He.fromRight(Qe));break;case je:switch(Qe.tag){case i:La&&(pt=new X(b,La,pt)),La=Qe._2,gn=je,Qe=Qe._1;break;case n:La===null?(gn=In,Qe=He.right(Qe._1)):(gn=Ze,Qe=Qe._1);break;case r:gn=Tn,Qe=Be(He.left,He.right,Qe._1);break;case u:gn=Kn,Qe=ce(He.left,Qe._1,function(ie){return function(){Sn===P&&(Sn++,le.enqueue(function(){Sn===P+1&&(gn=Tn,Qe=ie,q(Sn))}))}});return;case a:gn=In,ea=He.left(Qe._1),Qe=null;break;case t:La===null?vn=new X(b,Qe,vn,fa):vn=new X(b,Qe,new X(b,new X(T,La,pt),vn,fa),fa),La=null,pt=null,gn=je,Qe=Qe._1;break;case l:ia++,La===null?vn=new X(b,Qe,vn,fa):vn=new X(b,Qe,new X(b,new X(T,La,pt),vn,fa),fa),La=null,pt=null,gn=je,Qe=Qe._1;break;case s:gn=Tn,N=Qn(He,ua,Qe._2),ua&&ua.register(N),Qe._1&&N.run(),Qe=He.right(N);break;case h:gn=je,Qe=_t(He,ua,Qe._1);break}break;case In:if(La=null,pt=null,vn===null)gn=Wn,Qe=fa||ea||Qe;else switch(N=vn._3,V=vn._1,vn=vn._2,V.tag){case t:fa&&fa!==N&&ia===0?gn=In:ea&&(gn=je,Qe=V._2(He.fromLeft(ea)),ea=null);break;case T:fa&&fa!==N&&ia===0||ea?gn=In:(La=V._1,pt=V._2,gn=Ze,Qe=He.fromRight(Qe));break;case l:ia--,ea===null&&(J=He.fromRight(Qe),vn=new X(b,new X(L,V._2,J),vn,N),(fa===N||ia>0)&&(gn=je,Qe=V._3(J)));break;case L:vn=new X(b,new X($,Qe,ea),vn,fa),gn=je,fa&&fa!==N&&ia===0?Qe=V._1.killed(He.fromLeft(fa))(V._2):ea?Qe=V._1.failed(He.fromLeft(ea))(V._2):Qe=V._1.completed(He.fromRight(Qe))(V._2),ea=null,ia++;break;case O:ia++,vn=new X(b,new X($,Qe,ea),vn,fa),gn=je,Qe=V._1;break;case $:ia--,gn=In,Qe=V._1,ea=V._2;break}break;case Wn:for(var se in Da)Da.hasOwnProperty(se)&&(ut=ut&&Da[se].rethrow,he(Da[se].handler(Qe)));Da=null,fa&&ea?setTimeout(function(){throw He.fromLeft(ea)},0):He.isLeft(Qe)&&ut&&setTimeout(function(){if(ut)throw He.fromLeft(Qe)},0);return;case Ie:gn=je;break;case Kn:return}}function K(P){return function(){if(gn===Wn)return ut=ut&&P.rethrow,P.handler(Qe)(),function(){};var N=It++;return Da=Da||{},Da[N]=P,function(){Da!==null&&delete Da[N]}}}function j(P,N){return function(){if(gn===Wn)return N(He.right(void 0))(),function(){};var J=K({rethrow:!1,handler:function(){return N(He.right(void 0))}})();switch(gn){case Ie:fa=He.left(P),gn=Wn,Qe=fa,q(Sn);break;case Kn:fa===null&&(fa=He.left(P)),ia===0&&(gn===Kn&&(vn=new X(b,new X(O,Qe(P)),vn,fa)),gn=In,Qe=null,ea=null,q(++Sn));break;default:fa===null&&(fa=He.left(P)),ia===0&&(gn=In,Qe=null,ea=null)}return J}}function I(P){return function(){var N=K({rethrow:!1,handler:P})();return gn===Ie&&q(Sn),N}}return{kill:j,join:I,onComplete:K,isSuspended:function(){return gn===Ie},run:function(){gn===Ie&&(le.isDraining()?q(Sn):le.enqueue(function(){q(Sn)}))}}}function Jn(He,ua,Ta,Sn){var gn=0,Qe={},ea=0,fa={},La=new Error("[ParAff] Early exit"),pt=null,vn=e;function ia(K,j,I){var P=j,N=null,J=null,V=0,se={},ie,ge;e:for(;;)switch(ie=null,P.tag){case z:if(P._3===e&&(ie=Qe[P._1],se[V++]=ie.kill(K,function(Se){return function(){V--,V===0&&I(Se)()}})),N===null)break e;P=N._2,J===null?N=null:(N=J._1,J=J._2);break;case p:P=P._2;break;case y:case E:N&&(J=new X(b,N,J)),N=P,P=P._1;break}if(V===0)I(He.right(void 0))();else for(ge=0,ie=V;ge()=>e.props.def;function lN(e){class n extends Ha.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 zR=typeof module=="undefined"?void 0:module.require,yZe=function(){try{return zR===void 0?void 0:zR("util")}catch{return}}();var bZe=function(){var e;if(typeof performance!="undefined")e=performance;else if(zR)try{e=zR("perf_hooks").performance}catch{}return function(){return(e||Date).now()}}();qa();var Ei=window.ReactDOM,{createPortal:cN,findDOMNode:xZe,flushSync:NZe}=window.ReactDOM;var DS=uu(ZN());function ej(e){return e.state&&e.state.s}function nj(e,n,a){return e.setState({s:n},a)}function aj(e,n){return e.state={s:n}}var tj=Ei.render,rj=Ei.hydrate,gS=DS.default&&DS.default.renderToString||(e=>""),wte=Ei.unmountComponentAtNode;function oj(e,n,a){return Ha.createElement.apply(null,[e,Ete(e,n)].concat(a))}function Ete(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)}var uj=(e,n)=>n[e],ij=(e,n,a)=>a[e]=n;var e_=function(n){return function(a){return n(a)()}};var tp=function(n){return function(a){return function(){return n(a)}}},wv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},rp=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};function sj(e){return n=>e===n}var RS=function(e){return function(n){return function(a){var t=_e(a);if(e instanceof M&&t instanceof M)return ye;if(e instanceof S&&t instanceof M)return ye;if(e instanceof S&&t instanceof S){if(sj(e.value0)(t.value0))return ye;if($e)return n(new S(t.value0))()}return n(t)()}}};var Ute=pe(Hn);var Z={asReactChildren:function(e){return[e]}},Ve={asReactChildren:function(e){return[e]}},De={asReactChildren:pn(dn)};var yS=rp(nj),vj=function(){return rp(ij)},fj=wv(tj),_j=wv(rj),pj=tp(ej),bS=function(e){var n=Et(e);return function(a){return function(t){return Ute(function(){return uj(a,t)})(n)}}},dj=wv(aj),$m=function(e){return e.asReactChildren},xl=function(){return function(e){var n=$m(e);return function(a){return function(t){return function(r){return oj(a,t,n(r))}}}}},kte=xl()(De),Ev=function(){return function(e){return function(n){return kte(e)(n)([])}}};var wS=U(Hn),Bte=W(vt),mj=function(e){return{initialize:function(n){return dj(n)(e.initialState)},getState:function(n){return function(){var t=wS(_e)(pj(n))();return ze(e.initialState)(t)}},setState:yS}},hj=function(){var e=function(n){return function(a){return{initialize:function(t){return as(new S(a.initialState))(n)},getState:function(t){return wS(ze(a.initialState))(rc(n))},setState:function(t){return function(r){return function(u){return function(){return as(new S(r))(n)(),yS(t)(r)(Bte(ye))(),u()}}}}}}};return wS(e)(ts(M.value))}();var Dj=pe(Ye),gj=on(yt);var qte=W(vt),Rj=vj(),ay=pe(Hn),Wte=bS(Ea),yj=U(Hn),Jte=bS(Ca(ox)),$te=un(en),zte=Ba(Qt),Vte=oT(vt)(We),Qte=$te(ca),bj=yn(Rr),Kte=Ug(tc),Yte=on(Xs(zI(jg))),wj=function(e){return e},n_=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}(),Xte={map:function(e){return function(n){return new n_(e(n.value0),n.value1)}}},wr=function(e){return{bimap:function(n){return function(a){return function(t){return new n_(a(t.value0),Dj(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},Ej={apply:function(e){return function(n){return new n_(e.value0(n.value0),gj(e.value1)(n.value1))}},Functor0:function(){return Xte}},zn={bind:function(e){return function(n){var a=n(e.value0);return new n_(a.value0,gj(e.value1)(a.value1))}},Apply0:function(){return Ej}},Rn={pure:function(e){return new n_(e,[])},Apply0:function(){return Ej}};var Zte=function(e){var n=ne(e);return function(a){var t=yn(a);return function(r){return function(u){return new n_(r,Dj(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var zm=function(e){return new n_(ye,[e])},Qa=function(e){return zm(hn(e))},op=function(e){var n=ne(e.Monad0().Bind1()),a=yn(e);return function(t){return zm(function(r){return n(t)(function(u){return a(wn(qte(ye))(r.dispatch)(u))})})}},Ma=function(e){var n=Zte(e.Monad0().Bind1())(e);return function(a){return n(ye)([a])}},Ij=function(e){return function(n){var a=Rj("__unmounted"),t=Rj("__subscriptions"),r=function(b){return function(T){return function(L){return function(){var $=ay(Um(b))(function(z){return z.init})();return n({initialState:$.value0}).setState(b)(T)(L)()}}}},u=function(){var b=yj(ze(!1)),T=Wte("__unmounted");return function(L){return b(T(L))}}(),i=function(){var b=yj(ze([])),T=Jte("__subscriptions");return function(L){return b(T(L))}}(),l=function(b){return function(){return zte(Vte)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=ay(Um(b))(function(O){return O.init})();return n({initialState:L.value0}).getState(b)()}},h=function(b){return function(T){return function(){var O=i(b)();return t($o(Y0(T))(O))(b)()}}},p=function(b){return function(T){var L=function(O){return Y0(Qte(er(0))(function(){return O({dispatch:function(){var $=y(T);return function(z){return bj($(z))}}(),onStop:h(T)})}))};return JI(b)(L)}},y=function(b){return function(T){return Kte(u(b))(function(){var O=s(b)(),$=ay(Um(b))(function(ee){return ee.update})(),z=$(O)(T);return r(b)(z.value0)(p(z.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),O=ay(Um(b))(function($){return $.view})();return O(L)(y(b))}};return function(b){return iN(e,{def:b,init:n({initialState:b.init.value0}).initialize,render:E,componentDidMount:p(b.init.value1),componentWillUnmount:Yte(a(!0))(l)})}}},Tj=function(e){return function(){var a=bj(hj)();return uN(function(t){return Ij(t)(a)(e)})}},Iv=function(e){return function(n){return oN(e,function(a){var t=Ij(a)(mj);return function(r){return t(n(r))}})}};var Sj=W(vt),Cj=cu(),ty=function(e){return{handleMaybe:function(n){return function(a){return e_(function(){var t=wn(Sj(ye))(n);return function(r){return t(Cj(a(r)))}}())}}}},Tv=function(e){return{handleMaybe:function(n){return function(a){return function(t){return wn(Sj(ye))(n)(Cj(a))()}}}}},ai={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},ry={handleEffect:function(e){return e_(e)}},bu={handleEffect:function(e){return e_(hn(e))}},ga={handle:function(e){return function(n){return function(a){return e(n)()}}}},tl=function(e){return e.handleMaybe},Jr=function(e){return e.handleEffect},aa=function(e){return e.handle};function oy(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 Nl=function(){return function(){return function(e){return function(n){return oy(e,n)}}}};var uy=function(e){var n=rr(e);return function(){return function(){return function(a){return function(t){return BI(n(a))(t)}}}}};var ES=Ev(),IS=xl(),Fj=Nl()();var up=Je,Gj=function(e){return function(n){return ES(up(e))(n)}},TS=function(e){var n=IS(e);return function(a){return function(t){return n(up(a))(t)}}},Ii=function(e){var n=IS(e);return function(a){return function(t){return function(r){return n(up(a))(Fj(r)({className:t}))}}}},Vm=function(e){return function(n){return function(a){return ES(up(e))(Fj(a)({className:n}))}}},Mj=function(e){return function(n){return ES(up(e))({className:n})}},Er=function(e){return function(n){var a=IS(n);return function(t){return function(r){return a(up(e))({className:t})(r)}}}};var et=Je;var ip=function(e){var n=Ii(e);return function(){return function(){return n("video")}}},iy=function(e){return Er("video")(e)};var ly=function(e){return Er("ul")(e)};var hs=function(e){return Er("tr")(e)};var Sv=function(e){return Er("thead")(e)};var Cv=function(e){return Er("th")(e)};var lp=function(){return function(){return Vm("textarea")}};var cy=function(e){var n=Ii(e);return function(){return function(){return n("td")}}},jl=function(e){return Er("td")(e)};var Fv=function(e){return Er("tbody")(e)};var Gv=function(e){return Er("table")(e)};var po=function(e){return Er("strong")(e)},cp=function(e){var n=Ii(e);return function(){return function(){return n("span")}}},Pa=function(e){return Er("span")(e)},sy=function(){return function(){return Vm("source")}};var vy=function(e){var n=Ii(e);return function(){return function(){return n("select")}}};var sp=function(e){var n=Ii(e);return function(){return function(){return n("p")}}},Ut=function(e){return Er("p")(e)};var fy=function(e){var n=Ii(e);return function(){return function(){return n("option")}}};var _y=function(e){return Er("li")(e)};var Mv=function(e){return Er("label")(e)};var $r=function(){return function(){return Vm("input")}};var ti=function(){return function(){return Vm("img")}};var Ka=function(e){return Er("i")(e)};var Ol=Mj("hr");var a_=function(e){return Er("h6")(e)};var Ko=function(e){return Er("h4")(e)},py=function(e){var n=Ii(e);return function(){return function(){return n("h3")}}},Ir=function(e){return Er("h3")(e)},gc=function(e){var n=Ii(e);return function(){return function(){return n("h2")}}},At=function(e){return Er("h2")(e)};var Rc=function(e){return Er("h1")(e)},Av=function(e){var n=Ii(e);return function(){return function(){return n("form")}}};var Lt=function(e){var n=Ii(e);return function(){return function(){return n("div")}}},Ce=function(e){return Er("div")(e)};var sa=function(e){var n=Ii(e);return function(){return function(){return n("button")}}},SS=function(e){return Er("button")(e)};var kt=function(e){var n=Ii(e);return function(){return function(){return n("a")}}};var Aj=uu(tS()),Lj=Aj.Fragment;var Xe=Je,Ge=xl()(De)(Lj)({}),qn=!1;var Pj=Lm(Am);var ere=W(vt);var CS={map:function(e){return function(n){return Pj(Pj(e))(n)}}},xj=pe(CS),Nj=function(e){var n=ne(e.Monad0().Bind1()),a=yn(e);return function(t){return zm(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},ri=function(e){var n=Nj(e);return function(a){return function(t){return n(xj(t)(a))}}};var jj=function(e){return function(n){return e(wn(ere(ye))(n))}},dy=function(e){var n=Nj(e);return function(a){return function(t){return n(jj(xj(t)(a)))}}};var Gn=function(){return{"genericTop'":ke.value}}();var FS=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":FS(e)}};var An=function(){return{"genericBottom'":ke.value}}();var Qm=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":Qm(e)}};var Pn=function(e){return{"genericBottom'":new be(Qm(e))}},Oj=function(e){var n=g0(e);return function(a){return n(Qm(a))}};var Lv=U(oe),my=ba();var GS=function(e){return e["genericToEnum'"]};var hy=function(e){return e["genericSucc'"]},MS=function(e){var n=g0(e),a=R0(e);return function(t){var r=Lv(n),u=hy(t);return function(i){return r(u(a(i)))}}},AS=function(e){return e["genericPred'"]};var LS=function(e){return e["genericFromEnum'"]};var xn=function(e){var n=AS(e),a=hy(e);return function(t){var r=FS(t);return function(u){var i=AS(u),l=hy(u);return function(s){var h=Qm(s);return{"genericPred'":function(p){if(p instanceof be)return Lv(be.create)(n(p.value0));if(p instanceof ve){var y=i(p.value0);if(y instanceof M)return new S(new be(r));if(y instanceof S)return new S(new ve(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[y.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 be){var y=a(p.value0);if(y instanceof M)return new S(new ve(h));if(y instanceof S)return new S(new be(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[y.constructor.name])}if(p instanceof ve)return Lv(ve.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 Nn={"genericPred'":function(e){return M.value},"genericSucc'":function(e){return M.value}},jn=function(e){var n=AS(e),a=hy(e);return{"genericPred'":function(t){return Lv(Kd)(n(t))},"genericSucc'":function(t){return Lv(Kd)(a(t))}}};var PS=function(e){return e["genericCardinality'"]};var On=function(e){var n=PS(e),a=GS(e),t=LS(e);return function(r){var u=GS(r),i=LS(r);return{"genericCardinality'":my(n)+my(PS(r))|0,"genericToEnum'":function(l){var s=function(h){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 OS=function(e){return function(n){return new Po(1,1,e,n,rl.value,rl.value)}},qj=function(){var e=function(t){if(t instanceof rl)return 0;if(t instanceof Po)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,h){return s instanceof Po&&s.value0>e(h)?ol(s.value2,s.value3,ol(t,r,u,s.value4),ol(i,l,s.value5,h)):ol(i,l,ol(t,r,u,s),h)},a=function(t,r,u,i,l,s,h){return s instanceof Po&&e(l)<=s.value0?ol(s.value2,s.value3,ol(u,i,l,s.value4),ol(t,r,s.value5,h)):ol(u,i,l,ol(t,r,s,h))};return function(t,r,u,i){if(u instanceof rl)return i instanceof rl?OS(t)(r):i instanceof Po&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):ol(t,r,u,i);if(u instanceof Po){if(i instanceof Po){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 rl&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):ol(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 Ds=function(e){var n=nn(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof rl)return u=!0,M.value;if(s instanceof Po){var h=n(a)(s.value2);if(h instanceof Re){r=s.value4;return}if(h instanceof me){r=s.value5;return}if(h instanceof qe)return u=!0,new S(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[h.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 Wj=function(e){var n=nn(e);return function(a){return function(t){var r=function(u){if(u instanceof rl)return OS(a)(t);if(u instanceof Po){var i=n(a)(u.value2);if(i instanceof Re)return qj(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof me)return qj(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof qe)return new Po(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 gs=function(){return rl.value}(),ul=function(e){var n=Wj(e);return function(a){return Ft(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(gs)}};var pre=typeof Array.from=="function",zj=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",dre=typeof String.prototype.fromCodePoint=="function",mre=typeof String.prototype.codePointAt=="function",Vj=function(e){return mre?function(n){return n.codePointAt(0)}:e},Qj=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(zj)for(var l=u[Symbol.iterator](),s=r;;--s){var h=l.next();if(h.done)return a;if(s===0)return n(t(h.value))}return e(r)(u)}}}}}};var Kj=function(e){return dre?String.fromCodePoint:e},Yj=function(e){return function(n){return zj?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=Ym(us(1)(e)),r=a4(t);return r?n4(n)(t):n}return n},kS=Vj(Sre),Ry=Xj(Tre)(kS),Xo=function(e){return so(Ry(e))};var r4=function(e){return function(n){return e4(function(a){return Xo(kf(a)(n))})(wR(e)(n))}},BS=function(){var e=AT(zf)(ot(rv))(zt(rv));return function(n){return qu(e(n))}}(),Cre=function(e){if(e<=65535)return BS(e);var n=bre(e-65536|0)(1024)+55296|0,a=wre(e-65536|0)(1024)+56320|0;return BS(n)+BS(a)};var HS=Kj(Cre),o4=function(e){return function(n){if(e<1)return"";var a=r_(n);return a instanceof S?HS(a.value0.head)+o4(e-1|0)(a.value0.tail):n}},il=Yj(o4);var yy={eq:function(e){return function(n){return e===n}}},by={compare:function(e){return function(n){return Ere(e)(n)}},Eq0:function(){return yy}},fp=function(e){return function(n){return vc(Gl(il(e)(n)))(n)}};var Fre=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=r_(l);if(s instanceof S){var h=i===0;if(h)return t=!0,new S(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,M.value}for(;!t;)r=u(a,n);return r}},qS=function(e){return function(n){return e<0?M.value:e===0&&n===""?M.value:e===0?new S(kS(n)):Qj(Fre)(S.create)(M.value)(kS)(e)(n)}},Gre={bottom:0,top:1114111,Ord0:function(){return by}},yc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new S(e);if($e)return M.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 Gre},Enum1:function(){return Mre(0)}}}(),Mre=Rre("enumCodePoint","Data.String.CodePoints",function(){return{succ:Jf(oa(yc))($n(yc)),pred:$f(oa(yc))($n(yc)),Ord0:function(){return by}}});var qre=ba();var f4={show:qre};var _4=de;var Wre=pv(We),Jre=pe(Ye),$re=Gf(xS),Cn=function(e){return function(n){var a=Wre(Jre(n)(function(t){return new Dn(e(t),t)}));return function(t){return fc(t)(a)}}},zre=function(e){var n=MS(e),a=Oj(e);return function(t){var r=n(t);return function(u){return function(i){return $re(function(l){return new Dn(l,r(l))})(a(i))}}}},Bn=function(e){var n=zre(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return vp(u(i))}}}};var Vre={info:"info",warning:"warn",error:"error"},kl=e=>n=>a=>t=>{let r=Vre[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()},p4=(e,n)=>(n.__sentryFingerprint=e,n);var d4=function(e){return zi(p4)(e)};var bc="error";var Ey={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Oe)return a.value0;if(a instanceof Pe)return kl(bc)("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])}}},ta=function(e){return e.parseOrPanic},Qre=ta(Ey),Oa=function(e){var n=ta(e);return function(a){var t=U(a);return function(r){return n({parse:function(u){return t(S.create)(r.parse(u))},default:M.value,diagnosticName:r.diagnosticName})}}},Kre=Oa(Ey)(Dr),Rs=function(e){var n=Wf(e);return function(a){return Kre({parse:n,diagnosticName:a})}},tn={parseOrPanic:function(e){return Qre({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=wn(new Pe(""))(Oe.create);return function(a){return n(e.parse(a))}}()})}};var m4=jn(Nn),h4=Ln(An),D4=kn(Un),ys=function(){function e(){}return e.value=new e,e}(),bs=function(){function e(){}return e.value=new e,e}(),Yre={to:function(e){if(e instanceof be)return ys.value;if(e instanceof ve)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 ys)return new be(ke.value);if(e instanceof bs)return new ve(ke.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var Xre=function(e){if(e instanceof ys)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])},Iy=function(){return ta(tn)({parse:Cn(Xre)(Bn(Yre)(xn(m4)(Mn(Gn))(m4)(h4))(On(D4)(D4))(Pn(h4))),default:ys.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var g4=jn(Nn),R4=xn(g4)(Mn(Gn)),y4=Ln(An),b4=Pn(y4),w4=kn(Un),E4=On(w4),Zre=ma(Kr),Bl=function(){function e(){}return e.value=new e,e}(),xv=function(){function e(){}return e.value=new e,e}(),ws=function(){function e(){}return e.value=new e,e}(),eoe={to:function(e){if(e instanceof be)return Bl.value;if(e instanceof ve&&e.value0 instanceof be)return xv.value;if(e instanceof ve&&e.value0 instanceof ve)return ws.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 Bl)return new be(ke.value);if(e instanceof xv)return new ve(new be(ke.value));if(e instanceof ws)return new ve(new ve(ke.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var noe=function(e){if(e instanceof Bl)return"pending";if(e instanceof xv)return"connected";if(e instanceof ws)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},JS=function(){var e=Cn(noe)(Bn(eoe)(R4(R4(g4)(y4))(b4))(E4(E4(w4)))(b4)),n=function(a){return a==="cold"?new S(ws.value):M.value};return ta(tn)({parse:function(a){return Zre(e(a))(n(a))},default:Bl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var aoe=su(We)(wt),I4=re(an),toe=gr(We)(wt),roe=Pa(Z);var T4=function(e){return{initiator:Iy(e.initiator),status:JS(e.status),introMessage:ze("")(_e(e.introMessage))}},S4=25,$S=function(e){return Xo(e)>=S4},C4=function(e){var n=Xo(e),a=n>0,t=aoe(" ")([function(){return a?I4(n)+" characters":""}(),toe(["(",I4(S4),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=$S(e);return u?"text-success":""}();return roe(r)(t)};var Ty=function(){function e(){}return e.value=new e,e}(),F4=function(){function e(){}return e.value=new e,e}();var G4=function(){var e=ta(tn)({parse:function(n){return n instanceof S&&n.value0==="paid"?new S(F4.value):n instanceof S&&n.value0==="free"?new S(Ty.value):n instanceof S&&n.value0==="churned"?new S(Ty.value):n instanceof M?new S(Ty.value):M.value},default:Ty.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(_e(n))}}();var M4=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:_e(e.imageUrl),partnerStatus:G4(e.partnerStatus)}};var ooe=ne(rn),zS=Sa(),Xm=Va(de),A4=B({reflectSymbol:function(){return"id"}}),uoe=un(en)(rn),ioe=br(Wr),loe=U(oe);var coe=function(){function e(){}return e.value=new e,e}(),soe=function(){function e(){}return e.value=new e,e}(),voe=function(){function e(){}return e.value=new e,e}(),VS=function(){function e(){}return e.value=new e,e}(),foe=function(){function e(){}return e.value=new e,e}(),Sy=function(){function e(){}return e.value=new e,e}(),Zm=function(){function e(){}return e.value=new e,e}(),QS=function(){function e(){}return e.value=new e,e}(),KS=function(){function e(){}return e.value=new e,e}();var L4={show:ba()};var _oe=de,poe=Rs(zS(B({reflectSymbol:function(){return"avatarUrl"}})(Xm)(B({reflectSymbol:function(){return"bio"}})(Xm)(B({reflectSymbol:function(){return"connection"}})(Va(zS(B({reflectSymbol:function(){return"initiator"}})(de)(B({reflectSymbol:function(){return"introMessage"}})(Xm)(B({reflectSymbol:function(){return"status"}})(de)(ln))))))(B({reflectSymbol:function(){return"firstName"}})(de)(A4(_oe)(B({reflectSymbol:function(){return"lastName"}})(de)(B({reflectSymbol:function(){return"school"}})(zS(B({reflectSymbol:function(){return"allowedToContact"}})(Ea)(A4(_4)(B({reflectSymbol:function(){return"imageUrl"}})(Xm)(B({reflectSymbol:function(){return"name"}})(de)(B({reflectSymbol:function(){return"partnerStatus"}})(Xm)(ln)))))))(B({reflectSymbol:function(){return"title"}})(de)(B({reflectSymbol:function(){return"type"}})(de)(B({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(cn)(ln))))))))))));var P4=function(e){if(e instanceof coe)return"sheet-view";if(e instanceof soe)return"school-details";if(e instanceof voe)return"network-gallery";if(e instanceof VS)return"livestream-details";if(e instanceof foe)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},x4=function(e){return ooe(poe("SemUser")(e))(function(n){return uoe(ioe(n.type==="Sem::User"))(function(){return new S({school:M4(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:_e(n.avatarUrl),title:n.title,bio:_e(n.bio),connection:loe(T4)(_e(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Es=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Is=function(e){return e()};var W4=function(){function e(){}return e.value=new e,e}(),J4=function(){function e(){}return e.value=new e,e}(),$4=function(){function e(){}return e.value=new e,e}();var Goe=function(e){if(e instanceof W4)return"disabled";if(e instanceof J4)return"free-consultation";if(e instanceof $4)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 Moe=function(){return[W4.value,J4.value,$4.value]}(),z4=Oa(tn)(oe)({parse:Cn(Goe)(Moe),diagnosticName:"InquiryMode"});var Aoe=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 V4(e,n,a,t,r,u,i){return Aoe(e,n-1,a,t,r,u,i).getTime()}function Q4(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 Loe=bt(),Poe=oa(ur);var xoe=$n(ur);var K4=function(e){return e},Gy=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 mc(gv(n)(Loe(Poe(a)))(t),new pc(r,u,i,l))}}}}}}};return Q4(e)}();var Y4=function(e){return V4(Xu(e.value0),xoe(Zu(e.value0)),_c(e.value0),dc(e.value1),fs(e.value1),vs(e.value1),el(e.value1))};var X4=function(e){var n=on(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,h;function p(y,E,b){if(b<1)return s=!0,y;i=n(y)(E),l=E,u=b-1|0}for(;!s;)h=p(i,l,u);return h}}};return a(Za(e))};var Noe=ba();var o_=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}(),eh=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 Z4=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),e8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nC=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 pp={defer:function(e){var n=Es(e);return function(a,t,r,u,i){var l=Is(n);return l(a,t,r,u,i)}}};var wc={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,h){return t(function(p){return i(s,e(h))})})})}}}};var Ec={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,h){return t(function(p){return n(s,t,r,u,function(y,E){return t(function(b){return i(y,h(E))})})})})})}}},Functor0:function(){return wc}};var Ic={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,h){return t(function(p){var y=n(h);return y(s,t,r,u,i)})})})}}},Apply0:function(){return Ec}},joe=Ba(Ic);var ll={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Ec}};var Ooe={Applicative0:function(){return ll},Bind1:function(){return Ic}};var n8={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return Ooe}},Uoe=Nr(n8);var u_={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new o_(a.value0,a.value1,!1),t,r,function(s,h){return t(function(p){return s.value2?u(s,h):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return wc}},koe=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var Boe=function(e){var n=e.Monad0(),a=U(n.Bind1().Apply0().Functor0()),t=W(n.Applicative0()),r=Co(e);return function(u){return function(i){var l=function(s){var h=!1,p;function y(E){var b=E(ye);if(b instanceof Z4){s=b.value0;return}if(b instanceof e8)return h=!0,a(Kt.create)(b.value0);if(b instanceof nC)return h=!0,t(new $t(new Dn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!h;)p=y(s);return p};return r(l)(function(s){return i(u,Z4.create,e8.create,function(h,p){return new nC(h,new Pe(p))},function(h,p){return new nC(h,new Oe(p))})})}}};var a8=koe(function(e){return new Dn(e.value1,e)}),aC=function(e){return e.value1},tC=function(e){return e.value0};var Hoe={index:0,line:1,column:1},t8=function(e){var n=U(e.Monad0().Bind1().Apply0().Functor0()),a=Boe(e);return function(t){return function(r){var u=new o_(t,Hoe,!1);return n(Fo)(a(u)(r))}}},qoe=t8(Xd),r8=function(e){var n=qoe(e);return function(a){return Noe(n(a))}};var Woe=function(e){return function(n){return Uoe(new eh(e,n))}},dp=function(e){return joe(Woe(e))(a8)};var o8={empty:dp("No alternative"),Alt0:function(){return u_}},i_={Applicative0:function(){return ll},Plus1:function(){return o8}};var Zoe=ma(u_);var eue=W(ll);var nue=U(wc);var Tc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new o_(i.value0,i.value1,n.value2),l)},u)}};var My=function(e){return function(n){return Zoe(n)(eue(e))}},l_=function(e){return My(M.value)(nue(S.create)(e))};var i8=function(e){return function(n){return function(a){return function(t){try{return n(new RegExp(a,t))}catch(r){return e(r.message)}}}}};var nh=function(e){return function(n){return function(a){return a.replace(e,n)}}};var oC={append:function(e){return function(n){return{global:e.global||n.global,ignoreCase:e.ignoreCase||n.ignoreCase,multiline:e.multiline||n.multiline,dotAll:e.dotAll||n.dotAll,sticky:e.sticky||n.sticky,unicode:e.unicode||n.unicode}}}};var Ay={global:!1,ignoreCase:!0,multiline:!1,dotAll:!1,sticky:!1,unicode:!1},mp={global:!0,ignoreCase:!1,multiline:!1,dotAll:!1,sticky:!1,unicode:!1};var aue=function(e){return function(){return e.global?"g":""}()+(function(){return e.ignoreCase?"i":""}()+(function(){return e.multiline?"m":""}()+(function(){return e.dotAll?"s":""}()+(function(){return e.sticky?"y":""}()+function(){return e.unicode?"u":""}()))))},Ts=function(e){return function(n){return i8(Pe.create)(Oe.create)(e)(aue(n))}};var v8=$n(yc),rue=So(or);var oue=re(Wt);var f8=function(e){return function(n){return function(a){var t=v8(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=qS(0)(a);return r instanceof S&&v8(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)-rue(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},uue=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,h,p){var y=r_(h);if(y instanceof M)return u=!0,s;if(y instanceof S){var E=function(){if(Ul(y.value0.tail))return f8(s)(y.value0.head)(p);if($e)return f8(s)(y.value0.head)(y.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=y.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[y.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var iC=Kg(function(e){return function(n){return function(a){return function(t){return function(r){var u=Ul(e.value0);return u?r(new o_(e.value0,e.value1,!0),ye):t(e,new eh("Expected EOF",e.value1))}}}}}),_8=function(e){return Kg(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Pe)return r(n,new eh(i.value0,n.value1));if(i instanceof Oe)return u(new o_(i.value0.remainder,uue(n.value1)(i.value0.consumed)(i.value0.remainder),!Ul(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 Sc=function(e){return _8(function(n){var a=hi(e)(n);return a instanceof S?new Oe({value:e,consumed:e,remainder:a.value0}):new Pe("Expected "+oue(e))})};var p8=re(an),lue=_r(ju),cue=p0(Ec);var sue=function(e){return"(line "+(p8(e.line)+(", col "+(p8(e.column)+")")))},vue=function(e){return tC(e)+(" "+sue(aC(e)))},lC=function(e){return function(n){return lue(vue)(r8(n)(cue(e)(iC)))}};var Ly=oa(zf);var xo=re(an);var wue=xr(Go),Eue=wue(wt);var Iue=qI(na)(nc);var cC=$n(Or),Tue=re(SR),Sue=$n(ur),g8=$n(gu),Cue=ba(),Fue=$n(hv),R8=re(hx),sC=$n(bi),Gue=So(or),y8=$n(yi),b8=$n(Ri),vC=$n(Ru),w8=vo(or);var hp=function(){function e(){}return e.value=new e,e}(),E8=function(){function e(){}return e.value=new e,e}(),Mue=function(){function e(){}return e.value=new e,e}(),Hl=function(){function e(){}return e.value=new e,e}(),fC=function(){function e(){}return e.value=new e,e}(),I8=function(){function e(){}return e.value=new e,e}(),T8=function(){function e(){}return e.value=new e,e}(),ql=function(){function e(){}return e.value=new e,e}(),Aue=function(){function e(){}return e.value=new e,e}(),Lue=function(){function e(){}return e.value=new e,e}(),Wl=function(){function e(){}return e.value=new e,e}(),Pue=function(){function e(){}return e.value=new e,e}(),_C=function(){function e(){}return e.value=new e,e}(),Jl=function(){function e(){}return e.value=new e,e}(),$l=function(){function e(){}return e.value=new e,e}(),xue=function(){function e(){}return e.value=new e,e}(),Ti=function(){function e(){}return e.value=new e,e}(),Nue=function(){function e(){}return e.value=new e,e}(),pC=function(){function e(){}return e.value=new e,e}(),jue=function(){function e(){}return e.value=new e,e}(),Oue=function(){function e(){}return e.value=new e,e}(),Uue=function(){function e(){}return e.value=new e,e}(),Dt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var kue=function(e){if(e instanceof du)return"Jan";if(e instanceof Ju)return"Feb";if(e instanceof mu)return"Mar";if(e instanceof $u)return"Apr";if(e instanceof zu)return"May";if(e instanceof hu)return"Jun";if(e instanceof Du)return"Jul";if(e instanceof Vu)return"Aug";if(e instanceof Qu)return"Sep";if(e instanceof Ku)return"Oct";if(e instanceof Yu)return"Nov";if(e instanceof gi)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var jv=function(e){if(e<0)return"-"+jv(-e|0);if(e<10)return"0"+xo(e);if($e)return xo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},S8=function(e){if(e<0)return"-"+S8(-e|0);if(e<10)return"000"+xo(e);if(e<100)return"00"+xo(e);if(e<1e3)return"0"+xo(e);if($e)return xo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},C8=function(e){if(e<0)return"-"+C8(-e|0);if(e<10)return"00"+xo(e);if(e<100)return"0"+xo(e);if($e)return xo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var Bue=function(e){var n=xo(Iue(e)),a=Xo(n);return a===1?"0"+n:a===2?n:fp(a-2|0)(n)};var Hue=function(e){var n=e===0;return n?12:e},que=function(e){return function(n){if(n instanceof hp)return S8(cC(Xu(e.value0)));if(n instanceof E8)return Bue(cC(Xu(e.value0)));if(n instanceof Mue)return xo(cC(Xu(e.value0)));if(n instanceof Hl)return Tue(Zu(e.value0));if(n instanceof fC)return kue(Zu(e.value0));if(n instanceof I8)return jv(Sue(Zu(e.value0)));if(n instanceof T8)return jv(g8(_c(e.value0)));if(n instanceof ql)return xo(g8(_c(e.value0)));if(n instanceof Aue)return xo(_o(function(t){return t/1e3}(Cue(K4(Y4(e))))));if(n instanceof Lue)return xo(Fue(Tm(e.value0)));if(n instanceof Wl)return R8(Tm(e.value0));if(n instanceof Pue)return il(3)(R8(Tm(e.value0)));if(n instanceof _C)return jv(sC(dc(e.value1)));if(n instanceof Jl)return jv(Hue(Gue(sC(dc(e.value1)))(12)));if(n instanceof $l){var a=sC(dc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof xue)return xo(y8(fs(e.value1)));if(n instanceof Ti)return jv(y8(fs(e.value1)));if(n instanceof Nue)return xo(b8(vs(e.value1)));if(n instanceof pC)return jv(b8(vs(e.value1)));if(n instanceof jue)return C8(vC(el(e.value1)));if(n instanceof Oue)return xo(function(t){return w8(t)(100)}(vC(el(e.value1))));if(n instanceof Uue)return jv(function(t){return w8(t)(10)}(vC(el(e.value1))));if(n instanceof Dt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},No=function(e){return function(n){return Eue(que(n))(e)}};function Py(e){return Math.round(e).toString()}var Dp=ne(Ic);var Wue=W(ll),Jue=P0(i_)(pp);var $ue=dT(i_)(pp),xy=X4(wt),zue=M0(ll)(um),Vue=U(oe);var F8=es(na),Que=vo(or),Kue=re(an),Yue=pe(Dr),Xue=re(yf),Zue=pn(dn);var eie=Dp(l_(Tc(Sc("+"))))(function(e){return Dp(Jue(Sc("0")))(function(n){return Dp(l_(Tc(Sc(",0"))))(function(a){return Dp(l_(Tc(Sc("."))))(function(t){return Dp(zue(t)(function(r){return Tc($ue(Sc("0")))}))(function(r){return Dp(l_(Tc(Sc("a"))))(function(u){return Wue({sign:jt(e),before:so(n),comma:jt(a),after:ze(0)(Vue(so)(r)),abbreviations:jt(u)})})})})})})}),nie=lC(eie);var G8=function(e){return function(n){var a=aR(n),t=function(){if(a>0)return F8(_o(DT(a)/g3))(0);if($e)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=Que(t)(3),u=function(){var $=r<1;return $?n:n/tR(1e3)(Gt(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($e)return"10e+"+Kue(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return G8({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=tR(10)(Gt(F8(0)(e.after))),h=Pf(a*s)/s,p=x0(h),y=h-p,E=Pf(y*s),b=function(){var $=Py(E),z=Xo($),ee=xy("0")(e.after-z|0);return ee+$}(),T=function(){var $=e.after<1;return $?"":"."+(function(){var z=E===0;return z?xy("0")(e.after):""}()+function(){var z=E>0;return z?b:""}())}(),L=function($){return function(z){return function(ee){var ue=$,X=z,Y=!1,te;function he(Be,ce,le){var Fe=im(le);if(Fe instanceof M)return Y=!0,U0(Be);if(Fe instanceof S&&ce<3){ue=$o(Fe.value0.head)(Be),X=ce+1|0,ee=Fe.value0.tail;return}ue=$o(",")(Be),X=0,ee=le}for(;!Y;)te=he(ue,X,ee);return te}}},O=function(){return e.comma?L([])(0)(qd(dm(xy("0")(l)+Py(p)))):xy("0")(l)+Py(p)}();return function(){var $=n<0;if($)return"-";var z=n>0&&e.sign;return z?"+":""}()+(O+T)}},aie=function(e){return function(n){return Yue(nie(e))(Ya(G8)(n))}},c_=function(e){return function(n){return Jt(hn(Xue(n)))(Zue)(aie(e)(n))}};var rie=Je;var M8=function(e){return Nf(e)};var cl=function(e){var n=M8(e);return n?M.value:new S(rie(e))};var Wa=function(e){return function(n){var a=M8(e);return a?n:e}};var Xr=function(){return Je};var ah=re(an),oie=$n(Or),uie=$n(ur),iie=Xr(),lie=cu(),cie=ni(Dv),dC=vo(or),sie=Vo(We);var vie=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 ah(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return ah(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return ah(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return ah(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if($e)return ah(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 150, column 1 - line 150, column 81): "+[e.constructor.name,n.constructor.name])}},Ny=function(e){return vie({suffix:" "+e,justNow:"just now"})},A8=function(){return function(e){var n=function(h){return(oie(Xu(Vf(h)))*12|0)+uie(Zu(Vf(h)))|0},a=iie(e),t=Wa(a.format)(Ny("ago")),r=rR(lie(cie(a.to)(a.from))),u=dC(r+30|0)(60),i=dC(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=dC(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var fie=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}},sl=function(e){return function(n){return function(a){return c_("0,0")(Gt(e))+(" "+fie(e)(n)(a))}}};var L8=c_("0,0");var P8=function(){return No(sie([Wl.value,new Dt(", "),Hl.value,new Dt(" "),ql.value,new Dt(" at "),Jl.value,new Dt(":"),Ti.value,new Dt(" "),$l.value]))}();var mC=()=>document.visibilityState=="visible",x8=(e,n)=>document.elementFromPoint(e,n);var N8=function(e){var n=TS(e);return function(){return function(){return n("button")}}},j8=function(){return function(){return Gj("br")}};var O8=function(e){var n=TS(e);return function(){return function(){return n("a")}}};function U8(e){return function(n){return function(){return n.getElementById(e)}}}var _ie=U(Hn),jy=function(e){var n=_ie(_e),a=U8(e);return function(t){return n(a(t))}};var Oy=function(e){return function(n){return function(){return n[e]}}},pie=Oy("children"),die=Oy("firstElementChild"),mie=Oy("lastElementChild"),hie=Oy("childElementCount");var jo=function(){return window};function k8(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 k8(M.value,S.create,e,n)}};var B8=Je;var Uy=Je;var H8=Je;function q8(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 hC=Je;var W8=function(e){return q8(M.value,S.create,e)};function DC(e){return function(){return e.seeking}}function th(e){return function(){return e.currentTime}}function gC(e){return function(){return e.volume}}function RC(e){return function(n){return function(){n.volume=e}}}function yC(e){return function(){return e.muted}}function s_(e){return function(n){return function(){n.muted=e}}}var J8=Fn("HTMLMediaElement");var $8=Fn("HTMLMediaElement");function bC(e){return function(){return e.hash}}function wC(e){return function(n){return function(){n.hash=e}}}function EC(e){return function(n){return function(){n.href=e}}}function IC(e){return function(){return e.platform}}function Ov(e){return function(){return e.document}}function TC(e){return function(){return e.navigator}}function gp(e){return function(){return e.location}}var z8=Je;var Cie=U(Ye);var Fie=j8()(),Gie=M0(vt)(um),V8=ne(Qt),Q8=pe(Hn),Mie=ne(rn);var K8=Xe("\xA0");var da=Ya(wn(qn));var Aie=function(e){return function(n){if(e)return qn;if($e)return n(ye);throw new Error("Failed pattern match at Utils.HTML (line 107, column 1 - line 107, column 65): "+[e.constructor.name,n.constructor.name])}},Y8=function(e){return function(n){return Aie(e)(hn(n))}};var X8=function(e){return function(n){if(e)return n(ye);if($e)return qn;throw new Error("Failed pattern match at Utils.HTML (line 94, column 1 - line 94, column 61): "+[e.constructor.name,n.constructor.name])}},Ia=function(e){return function(n){return X8(e)(hn(n))}};var rh=function(e){return Ge(pT(Fie({}))(Cie(Xe)(Yo(` `)(e))))},ky=function(e){return Gie($8(e.target))(th)};var Z8=function(e){return function(){return x8(e.x,e.y)}},eO=function(e){return V8(Q8(V8(jo)(Ov))(Uy))(jy(e))},By=function(e){return Q8(eO(e))(function(n){return Mie(n)(W8)})};var yp=cn;var nO=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},SC=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),aO=()=>new Date,tO=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var v_=(()=>{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 CC(){return Date.now()}var Nie=U(Hn);var oi=Nie(Gy)(CC);var rO={liftAff:pn(dn),MonadEffect0:function(){return Ne}};var fkn=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,y){this.queue=p,this.value=y,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(y){setTimeout(function(){throw y},0)}}function u(p,y){var E=new n(p,y);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 y;switch(p.size){case 0:return null;case 1:y=p.head,p.head=null;break;case 2:y=p.last,p.head.next=null,p.last=null;break;default:y=p.last,p.last=y.prev,p.last.next=null}return y.prev=null,y.queue=null,p.size--,y.value}function l(p){var y;switch(p.size){case 0:return null;case 1:y=p.head,p.head=null;break;case 2:y=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:y=p.head,p.head=y.next,p.head.prev=null}return y.next=null,y.queue=null,p.size--,y.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 h(p,y){if(!y.draining){var E=y.puts,b=y.takes,T=y.reads,L,O,$,z,ee;for(y.draining=!0;;){if(L=null,O=null,$=null,z=y.value,ee=T.size,y.error!==null){for(z=p.left(y.error);L=l(E);)r(L.cb(z));for(;O=l(T);)r(O(z));for(;$=l(b);)r($(z));break}if(z===t&&(L=l(E))&&(y.value=z=L.value),z!==t){for($=l(b);ee--&&(O=l(T));)r(O(p.right(z)));$!==null&&(y.value=t,r($(p.right(z))))}if(L!==null&&r(L.cb(p.right(void 0))),y.value===t&&E.size===0||y.value!==t&&b.size===0)break}y.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=h,a}();var Jie=ne(Qt);var uO=W(vt),Uv=ne(rn),$ie=oa(Or),zie=oa(ur),Vie=oa(gu),Qie=oa(bi),Kie=oa(yi),Yie=oa(Ri),Xie=oa(Ru),Zie=W(ra),iO=Ba(Qt),ele=pe(oe);var nle=function(){return _s(ts(M.value))}();var lO=function(e){return Uv($ie(e.year))(function(n){return Uv(zie(e.month+1|0))(function(a){return Uv(Vie(e.day))(function(t){return Uv(Qie(e.hour))(function(r){return Uv(Kie(e.minute))(function(u){return Uv(Yie(e.second))(function(i){return Uv(Xie(e.millisecond))(function(l){return Zie(new mc(gv(n)(a)(t),new pc(r,u,i,l)))})})})})})})})},cO=function(e){var n=I3("Failed to obtain current time. This should never happen.");return wn(n)(uO)(lO(SC(e)))},f_=iO(cO)(aO),GC=function(e){return _s(Jie(rc(nle))(wn(iO(cO)(tO))(uO)))},wu=function(e){return Uv(ele(nO({just:S.create,nothing:M.value})(e))(SC))(lO)};var MC=W(ra),rle=U(oe),sO=ne(rn);var vO=jn(Nn),fO=xn(vO)(Mn(Gn)),_O=Ln(An),pO=Pn(_O),dO=kn(Un),mO=On(dO);var AC=function(){function e(){}return e.value=new e,e}(),LC=function(){function e(){}return e.value=new e,e}(),PC=function(){function e(){}return e.value=new e,e}();var ole={to:function(e){if(e instanceof be)return AC.value;if(e instanceof ve&&e.value0 instanceof be)return LC.value;if(e instanceof ve&&e.value0 instanceof ve)return PC.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 AC)return new be(ke.value);if(e instanceof LC)return new ve(new be(ke.value));if(e instanceof PC)return new ve(new ve(ke.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var ule=function(e){if(e instanceof AC)return"stuffed";if(e instanceof LC)return"satisfied";if(e instanceof PC)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 ile=Oa(tn)(oe)({parse:Cn(ule)(Bn(ole)(fO(fO(vO)(_O))(pO))(mO(mO(dO)))(pO)),diagnosticName:"ClientAppetite"}),hO=function(e){return sO(wn(MC(M.value))(function(){var n=rle(MC);return function(a){return n(ile(a))}}())(_e(e.clientAppetite)))(function(n){return sO(z4(e.inquiryMode))(function(a){return MC({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:_e(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:_e(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var DO=ne(rn),bp=Sa(),xC=Va(de),gO=B({reflectSymbol:function(){return"description"}})(de),qy=B({reflectSymbol:function(){return"id"}})(cn),NC=B({reflectSymbol:function(){return"name"}})(de),RO=bp(qy(NC(B({reflectSymbol:function(){return"slug"}})(de)(ln)))),yO=Ca(RO),lle=Rs(bp(B({reflectSymbol:function(){return"advisingConfig"}})(Va(bp(B({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Va(Ea))(B({reflectSymbol:function(){return"clientAppetite"}})(xC)(B({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Va(cn))(B({reflectSymbol:function(){return"inquiryMode"}})(de)(B({reflectSymbol:function(){return"packages"}})(Ca(bp(B({reflectSymbol:function(){return"activeForSale"}})(Ea)(gO(qy(NC(B({reflectSymbol:function(){return"numMinutes"}})(cn)(B({reflectSymbol:function(){return"packageCategories"}})(yO)(B({reflectSymbol:function(){return"refundPeriodLengthDays"}})(cn)(B({reflectSymbol:function(){return"totalPriceCents"}})(yp)(ln)))))))))))(B({reflectSymbol:function(){return"pricePerHourCents"}})(yp)(B({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(cn)(B({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(cn)(B({reflectSymbol:function(){return"themes"}})(Ca(bp(B({reflectSymbol:function(){return"active"}})(Ea)(B({reflectSymbol:function(){return"category"}})(RO)(gO(B({reflectSymbol:function(){return"durationMinutes"}})(cn)(qy(B({reflectSymbol:function(){return"priceCents"}})(yp)(B({reflectSymbol:function(){return"title"}})(de)(ln))))))))))(ln))))))))))))(B({reflectSymbol:function(){return"entity"}})(bp(B({reflectSymbol:function(){return"bio"}})(de)(qy(B({reflectSymbol:function(){return"imageUrl"}})(xC)(NC(B({reflectSymbol:function(){return"organizationId"}})(cn)(B({reflectSymbol:function(){return"organizationName"}})(de)(B({reflectSymbol:function(){return"shortEducation"}})(xC)(B({reflectSymbol:function(){return"tags"}})(yO)(ln))))))))))(ln)))),jC=W(ra),OC=U(oe),__=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ss=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cle=function(e){return DO(lle("ServiceProviderPresenter")(e))(function(n){return DO(wn(jC(M.value))(function(){var a=OC(jC);return function(t){return a(hO(t))}}())(_e(n.advisingConfig)))(function(a){return jC({entity:n.entity,advisingConfig:a})})})},bO=Oa(tn)(oe)({parse:function(e){return e.type==="Sem::User"?OC(__.create)(x4(e.presenter)):e.type==="ServiceProviders::Individual"?OC(Ss.create)(cle(e.presenter)):M.value},diagnosticName:"Livestream Guest Presenter"});var wO=jn(Nn),EO=xn(wO)(Mn(Gn)),IO=Ln(An),TO=Pn(IO),SO=kn(Un),CO=On(SO),Cs=function(){function e(){}return e.value=new e,e}(),Cc=function(){function e(){}return e.value=new e,e}(),Fs=function(){function e(){}return e.value=new e,e}(),sle={to:function(e){if(e instanceof be)return Cs.value;if(e instanceof ve&&e.value0 instanceof be)return Cc.value;if(e instanceof ve&&e.value0 instanceof ve)return Fs.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 Cs)return new be(ke.value);if(e instanceof Cc)return new ve(new be(ke.value));if(e instanceof Fs)return new ve(new ve(ke.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},FO={eq:function(e){return function(n){return e instanceof Cs&&n instanceof Cs||e instanceof Cc&&n instanceof Cc||e instanceof Fs&&n instanceof Fs}}},Wy=function(e){if(e instanceof Cs)return"ready";if(e instanceof Cc)return"live";if(e instanceof Fs)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var oh=function(){return ta(tn)({parse:Cn(Wy)(Bn(sle)(EO(EO(wO)(IO))(TO))(CO(CO(SO)))(TO)),default:Cs.value,diagnosticName:"livestream poll status"})}(),UC=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}};var GO=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:_e(e.undergrad.college),major:_e(e.undergrad.major),year:_e(e.undergrad.year)},gradCollege:_e(e.gradCollege),workExperience:_e(e.workExperience),admissionsStory:_e(e.admissionsStory),pictureUrl:_e(e.pictureUrl),allStreamsUrl:_e(e.allStreamsUrl)}};var vle=nn(na),fle=Wu(),MO=pe(oe),AO=jn(Nn),LO=xn(AO)(Mn(Gn)),PO=Ln(An),xO=Pn(PO),NO=kn(Un),jO=On(NO),OO=ta(tn),UO=Sf(),kO=Ba(rn),_le=pe(Ye),ple=U(oe),dle=ne(rn),Eu=function(){function e(){}return e.value=new e,e}(),zr=function(){function e(){}return e.value=new e,e}(),Tr=function(){function e(){}return e.value=new e,e}();var ui=an,mle=re(ui);var hle={to:function(e){if(e instanceof be)return Eu.value;if(e instanceof ve&&e.value0 instanceof be)return zr.value;if(e instanceof ve&&e.value0 instanceof ve)return Tr.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 Eu)return new be(ke.value);if(e instanceof zr)return new ve(new be(ke.value));if(e instanceof Tr)return new ve(new ve(ke.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},kv={eq:function(e){return function(n){return e instanceof Eu&&n instanceof Eu||e instanceof zr&&n instanceof zr||e instanceof Tr&&n instanceof Tr}}},uh={eq:function(e){return function(n){return e===n}}},BO={compare:function(e){return function(n){return vle(e)(n)}},Eq0:function(){return uh}};var Bv=function(e){return fle({livestream_conference_id:mle(e.id),livestream_conference_presenter_name:ze("")(MO(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:ze("")(e.partnerType)})},HO=function(){var e=function(n){if(n instanceof Eu)return"waiting_room";if(n instanceof zr)return"on_air";if(n instanceof Tr)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Cn(e)(Bn(hle)(LO(LO(AO)(PO))(xO))(jO(jO(NO)))(xO))}(),qO=function(){return OO({parse:HO,default:Eu.value,diagnosticName:"livestream status"})}(),Dle=OO({parse:wu,default:ot(Q0),diagnosticName:"livestream scheduled start time"}),ih=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:MO(_e(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:UO(n.id),slug:UO(n.slug)}}),scheduledStartTime:Dle(e.scheduledStartTime),onAirTime:kO(wu)(_e(e.onAirTime)),streamStatus:qO(e.streamStatus),watchUrl:_e(e.watchUrl),streamingStartTime:kO(wu)(_e(e.streamingStartTime)),polls:_le(e.polls)(function(n){return{poll:UC(n.poll),status:oh(n.status)}}),presenter:ple(GO)(_e(e.presenter)),partnerType:_e(e.partnerType),guestPresenter:dle(_e(e.guestPresenter))(bO),zoomJoinUrl:_e(e.zoomJoinUrl),zoomStartUrl:_e(e.zoomStartUrl)}};var WO=jn(Nn),JO=Ln(An),$O=kn(Un),Si=function(){function e(){}return e.value=new e,e}(),wp=function(){function e(){}return e.value=new e,e}(),gle={to:function(e){if(e instanceof be)return Si.value;if(e instanceof ve)return wp.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 Si)return new be(ke.value);if(e instanceof wp)return new ve(ke.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},Jy={eq:function(e){return function(n){return e instanceof Si&&n instanceof Si||e instanceof wp&&n instanceof wp}}};var lh=function(e){if(e instanceof wp)return"anonymous-all-schools";if(e instanceof Si)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},$y=function(){return ta(tn)({parse:Cn(lh)(Bn(gle)(xn(WO)(Mn(Gn))(WO)(JO))(On($O)($O))(Pn(JO))),diagnosticName:"Profile.PublishScope",default:wp.value})}();var vl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fl=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}(),pl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var kC=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:_e(e.description)}},p_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:wu(e.time)}},zO=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:_e(e.fullName),publishScope:$y(e.publishScope)}},BC=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}},Ci="overlay-visibility-test";var VO=jn(Nn),zy=xn(VO)(Mn(Gn)),QO=Ln(An),Vy=Pn(QO),KO=kn(Un),Qy=On(KO),Gs=function(){function e(){}return e.value=new e,e}(),Hv=function(){function e(){}return e.value=new e,e}(),d_=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}(),Rle={to:function(e){if(e instanceof be)return Gs.value;if(e instanceof ve&&e.value0 instanceof be)return Hv.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof be)return d_.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof be)return qv.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve)return Wv.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 Gs)return new be(ke.value);if(e instanceof Hv)return new ve(new be(ke.value));if(e instanceof d_)return new ve(new ve(new be(ke.value)));if(e instanceof qv)return new ve(new ve(new ve(new be(ke.value))));if(e instanceof Wv)return new ve(new ve(new ve(new ve(ke.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},YO=function(e){if(e instanceof Gs)return"love-this";if(e instanceof Hv)return"helpful";if(e instanceof d_)return"not-helpful";if(e instanceof qv)return"writing-down";if(e instanceof Wv)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},XO=function(e){return{authorTag:e.authorTag,kind:YO(e.kind)}},yle=function(){return ta(tn)({parse:Cn(YO)(Bn(Rle)(zy(zy(zy(zy(VO)(QO))(Vy))(Vy))(Vy))(Qy(Qy(Qy(Qy(KO)))))(Vy)),default:Gs.value,diagnosticName:"Livestream Reaction Kind"})}(),ZO=function(e){return{authorTag:e.authorTag,kind:yle(e.kind)}};var e7=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function n7(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 a7(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 h=0,p;(p=r.headers[h])!=null;h++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var y=function(E){return function(){u(new Error(E))}};return l.onerror=y(a),l.ontimeout=y(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,T){try{l.abort()}catch(L){return b(L)}return T()}}}var Ky="application/json",t7="application/x-www-form-urlencoded";var r7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),o7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),u7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),i7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),l7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Yy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),c7=function(e){return e instanceof HC?new S(t7):e instanceof Yy?new S(Ky):M.value};var s7=function(){return Yy.create}();var v7=ba();var Xy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Zy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ep=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}(),f7=function(e){if(e instanceof Xy||e instanceof Zy)return v7(e.value0);if(e instanceof Ep)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var qC=function(e){if(e instanceof Xy)return"Accept";if(e instanceof Zy)return"Content-Type";if(e instanceof Ep)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var _7=pn(dn),WC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$C=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nb=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}(),p7=function(e){if(e instanceof WC)return"arraybuffer";if(e instanceof JC)return"blob";if(e instanceof $C)return"document";if(e instanceof eb||e instanceof nb)return"text";if(e instanceof ab)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},d7=function(e){return e instanceof eb?new S(Ky):M.value},m7=function(){return new nb(_7)}();var h7=function(){return new ab(_7)}();var D7=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 wle=ba();var ch=function(e){return wle(sR(e))};function g7(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var tb=function(e){return g7(Pe.create,Oe.create,e)};function R7(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function y7(e,n,a){try{return n(R7(encodeURIComponent(a)))}catch(t){return e(t)}}function b7(e,n,a){try{return n(R7(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var rb=function(){return cv(y7)(hn(M.value))(S.create)}();var ob=function(){return cv(b7)(hn(M.value))(S.create)}();var Ele=Yn(fr),w7=U(oe),Ile=fo(ku)(ra);var Tle=function(e){return e};var E7=function(){var e=function(t){if(t.value1 instanceof M)return ob(t.value0);if(t.value1 instanceof S)return Ele(w7(function(r){return function(u){return r+("="+u)}})(ob(t.value0)))(ob(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=w7(vr("&")),a=Ile(e);return function(t){return n(a(Tle(t)))}}();var zC=function(){function e(){}return e.value=new e,e}(),m_=function(){function e(){}return e.value=new e,e}(),VC=function(){function e(){}return e.value=new e,e}(),h_=function(){function e(){}return e.value=new e,e}(),ub=function(){function e(){}return e.value=new e,e}(),sh=function(){function e(){}return e.value=new e,e}(),QC=function(){function e(){}return e.value=new e,e}(),KC=function(){function e(){}return e.value=new e,e}(),YC=function(){function e(){}return e.value=new e,e}(),XC=function(){function e(){}return e.value=new e,e}(),ZC=function(){function e(){}return e.value=new e,e}(),eF=function(){function e(){}return e.value=new e,e}(),nF=function(){function e(){}return e.value=new e,e}(),aF=function(){function e(){}return e.value=new e,e}(),tF=function(){function e(){}return e.value=new e,e}(),ib=function(){function e(){}return e.value=new e,e}();var Sle=function(e){return e},Cle={show:function(e){if(e instanceof zC)return"OPTIONS";if(e instanceof m_)return"GET";if(e instanceof VC)return"HEAD";if(e instanceof h_)return"POST";if(e instanceof ub)return"PUT";if(e instanceof sh)return"DELETE";if(e instanceof QC)return"TRACE";if(e instanceof KC)return"CONNECT";if(e instanceof YC)return"PROPFIND";if(e instanceof XC)return"PROPPATCH";if(e instanceof ZC)return"MKCOL";if(e instanceof eF)return"COPY";if(e instanceof nF)return"MOVE";if(e instanceof aF)return"LOCK";if(e instanceof tF)return"UNLOCK";if(e instanceof ib)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var I7=Jt(re(Cle))(Sle);var T7={eq:function(e){return function(n){return e instanceof zC&&n instanceof zC||e instanceof m_&&n instanceof m_||e instanceof VC&&n instanceof VC||e instanceof h_&&n instanceof h_||e instanceof ub&&n instanceof ub||e instanceof sh&&n instanceof sh||e instanceof QC&&n instanceof QC||e instanceof KC&&n instanceof KC||e instanceof YC&&n instanceof YC||e instanceof XC&&n instanceof XC||e instanceof ZC&&n instanceof ZC||e instanceof eF&&n instanceof eF||e instanceof nF&&n instanceof nF||e instanceof aF&&n instanceof aF||e instanceof tF&&n instanceof tF||e instanceof ib&&n instanceof ib}}};var S7=function(e){return Rv(function(n){return function(){var t=e(function(r){return n(Pe.create(r))()},function(r){return n(Oe.create(r))()});return function(r){return Rv(function(u){return function(){return t(r,function(l){return u(Pe.create(l))()},function(l){return u(Oe.create(l))()}),$T}})}}})};var rF=W(os(sr)),Fle=B0(sr),D_=ls(sr),C7=ma(_R(gR)(sr)),Gle=mf(Uf(sr)),lb=U(oe),Mle=Uu(We)(it),Ale=Ee(Nt),Lle=Ba(rn),Ple=U(Ye),xle=pe(Ga),Nle=jf(Ur),jle=W(Xn);var cb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sb=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}(),vb=function(){function e(){}return e.value=new e,e}(),fb=function(){function e(){}return e.value=new e,e}(),_b=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),F7=function(e){return function(n){var a=function(p){return p===""?rF(kj):Jt(function(y){return Fle(Dm.create(y))})(rF)(tb(p))},t=function(){if(n.responseFormat instanceof WC)return D_("ArrayBuffer");if(n.responseFormat instanceof JC)return D_("Blob");if(n.responseFormat instanceof $C)return function(p){return C7(D_("Document")(p))(C7(D_("XMLDocument")(p))(D_("HTMLDocument")(p)))};if(n.responseFormat instanceof eb)return Gle(function(p){return n.responseFormat.value0(a(p))})(D_("String"));if(n.responseFormat instanceof nb)return D_("String");if(n.responseFormat instanceof ab)return hn(n.responseFormat.value0(rF(ye)));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 r7)return new Oe(p.value0(jr));if(p instanceof o7)return new Oe(jr(p.value0));if(p instanceof u7)return new Oe(jr(p.value0));if(p instanceof i7)return new Oe(jr(p.value0));if(p instanceof l7)return new Oe(jr(p.value0));if(p instanceof HC)return b0("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(lb(jr)(E7(p.value0)));if(p instanceof Yy)return new Oe(jr(Dy(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(y){return p instanceof S&&!Mle(_0(Ale)(qC)(p.value0))(y)?A0(y)(p.value0):y}},i=function(p){return u(lb(Zy.create)(Lle(c7)(p)))(u(lb(Xy.create)(d7(n.responseFormat)))(n.headers))},l=function(p){return{method:I7(n.method),url:n.url,headers:Ple(function(y){return{field:qC(y),value:f7(y)}})(i(n.content)),content:p,responseType:p7(n.responseFormat),username:Fa(n.username),password:Fa(n.password),withCredentials:n.withCredentials,timeout:ze(0)(lb(function(y){return y})(n.timeout))}},s=function(p){return xle(Nle(S7(a7(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",D7.create,l(p)))))(function(y){if(y instanceof Oe){var E=ch(t(y.value0.body));if(E instanceof Pe)return new Pe(new sb(W3(E.value0),y.value0));if(E instanceof Oe)return new Oe({headers:y.value0.headers,status:y.value0.status,statusText:y.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(y instanceof Pe)return new Pe(function(){var b=N0(y.value0),T=b==="AffjaxTimeoutErrorMessageIdent";if(T)return vb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?fb.value:new _b(y.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[y.constructor.name])})};if(n.content instanceof M)return s(Fa(M.value));if(n.content instanceof S){var h=r(n.content.value0);if(h instanceof Oe)return s(Fa(new S(h.value0)));if(h instanceof Pe)return jle(new Pe(new cb(h.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[h.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Ip=function(){return{method:new Pe(m_.value),url:"/",headers:[],content:M.value,username:M.value,password:M.value,withCredentials:!1,responseFormat:h7,timeout:M.value}}();var G7={eq:function(e){return function(n){return e===n}}};var oF={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var M7=F7(oF);function A7(e){return Buffer.from(e).toString("base64")}function L7(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var uF=typeof btoa=="function";function P7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Ac||!Ac.key)return Ac||console.error("Pusher config is missing in global context"),new ace;let t={auth:{headers:{"X-CSRF-Token":Ac.authToken}},authEndpoint:Ac.authPath,cluster:Ac.cluster};return Ac.dev&&Object.assign(t,{wsHost:Ac.dev.wsHost,wsPort:Ac.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new Q7.default(Ac.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e.disconnect(),e=null)}}})(),K7=e=>{let n=ece().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),nce()}};function ace(){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 tce(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function tce(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 rce=gr(We)(wt),oce=qo(vt)(Ou),uce=pe(CS);var ice={show:function(e){return e}},lce=re(ice),mb=de,cce=function(e){var n=Rs(e);return function(a){return function(t){return function(r){var u=rce(["Pusher event ",t," over channel ",lce(a)]),i=function(l){return oce(n(u)(l))(r)()};return function(){return K7({channel:a,event:t,handler:i})}}}}},Fi=function(e){var n=cce(e);return function(a){var t=a.Monad0(),r=ne(t.Bind1()),u=yn(a),i=W(t.Applicative0());return function(l){return function(s){return function(h){return r(u(n(l)(s)(h)))(function(p){return i(u(p))})}}}}},sce=Fi(qf),hb=function(e){var n=sce(e);return function(a){return function(t){return uce(n(a)(t))(hn(ye))}}};var Y7=Mc(Fc),Iu=zl(Y7),Sr=ne(ca),fh=zl(Mc(Y7)),X7=W(Xn),vce=pe(oe),_h=Sa(),Z7=B({reflectSymbol:function(){return"pollId"}})(cn),fce=B({reflectSymbol:function(){return"status"}})(de)(ln),_ce=Et(Ca(_h(Z7(fce)))),eU=U(Ye),nU=U(Ga),pce=B({reflectSymbol:function(){return"id"}}),dce=pce(cn),aU=_h(B({reflectSymbol:function(){return"author"}})(_h(B({reflectSymbol:function(){return"cvid"}})(de)(B({reflectSymbol:function(){return"username"}})(de)(ln))))(dce(B({reflectSymbol:function(){return"isFromHQ"}})(Ea)(B({reflectSymbol:function(){return"isPublic"}})(Ea)(B({reflectSymbol:function(){return"text"}})(de)(B({reflectSymbol:function(){return"time"}})(de)(ln))))))),mce=Sp(aU);var hce=Va(de);var Dce=Sp(Ca(_h(Z7(B({reflectSymbol:function(){return"responses"}})(_h(B({reflectSymbol:function(){return"answered"}})(cn)(B({reflectSymbol:function(){return"optionCounts"}})(Ca(cn))(B({reflectSymbol:function(){return"seen"}})(cn)(B({reflectSymbol:function(){return"skipped"}})(cn)(ln))))))(ln))))),gce=Sp(hce),Rce=Sp(Ca(aU));var cF=fh("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Sr(e({id:n.id,status:Wy(a)}))(Gc(function(t){return X7(ze([])(vce(_ce(t))(eU(function(r){return{pollId:r.pollId,status:oh(r.status)}}))))}))}}});var sF=fh("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Sr(e({id:n.id,options:a}))(ar)}}}),tU=Iu("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Sr(e({conference_id:n}))(ar)}}),rU=Iu("livestreams_conferences_status_complete_path")(function(e){return function(n){return Sr(e({conference_id:n}))(ar)}}),oU=Iu("livestreams_cta_save_referral_path")(function(e){return function(n){return Sr(e(n))(ar)}}),uU=Iu("livestreams_polls_report_shown_path")(function(e){return function(n){return Sr(e({id:n.id}))(ar)}}),iU=fh("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Sr(e({stream_id:n,visible:a.visible}))(ar)}}}),lU=fh("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Sr(e({conference_id:n,current_time_minutes:a}))(ar)}}}),cU=Iu("livestreams_questions_visibility_path")(function(e){return function(n){return Sr(e({question_id:n.questionId,is_public:n.isPublic}))(ar)}}),sU=Iu("livestreams_questions_post_path")(function(e){return function(n){return Sr(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Gc(function(a){return nU(p_)(mce("Livestream question")(a))}))}}),vU=Iu("livestreams_cta_open_path")(function(e){return function(n){return Sr(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ar)}}),fU=Iu("livestreams_cta_open_path")(function(e){return function(n){return Sr(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ar)}}),_U=Iu("livestreams_cta_open_path")(function(e){return function(n){return Sr(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ar)}}),pU=Iu("livestreams_cta_open_path")(function(e){return function(n){return Sr(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(ar)}}),Db=Iu("livestreams_register_path")(function(e){return function(n){return Sr(e({from_conference_id:Fa(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(ar)}});var dU=fh("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Sr(e({conference_id:n,reaction:XO(a)}))(ar)}}}),mU=Iu("livestreams_polls_responses_path")(function(e){return function(n){return Sr(e({conference_id:n}))(Gc(Dce("livestream poll responses")))}}),hU=Iu("livestreams_conferences_download_url_path")(function(e){return function(n){return Sr(e({conference_id:n}))(Gc(function(a){return nU(_e)(gce("Livestream download URL")(a))}))}}),gb=zl(Fc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Sr(e({}))(ar)});var DU=Iu("livestreams_conferences_ban_user_path")(function(e){return function(n){return Sr(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(ar)}}),Rb=Iu("livestreams_questions_all_path")(function(e){return function(n){return Sr(e({conference_id:n}))(Gc(function(a){return Sr(Rce("Livestream questions")(a))(function(t){return X7(eU(p_)(t))})}))}});var fF=function(){function e(){}return e.value=new e,e}(),_F=function(){function e(){}return e.value=new e,e}(),pF=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}(),hF=function(){function e(){}return e.value=new e,e}(),DF=function(){function e(){}return e.value=new e,e}(),gF=function(){function e(){}return e.value=new e,e}(),RF=function(){function e(){}return e.value=new e,e}(),yF=function(){function e(){}return e.value=new e,e}(),bF=function(){function e(){}return e.value=new e,e}(),wF=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}(),Bt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),TF=function(){function e(){}return e.value=new e,e}();var bb=function(e){if(e instanceof Bt&&e.value0 instanceof fF)return"architecture";if(e instanceof Bt&&e.value0 instanceof pF)return"chemistry";if(e instanceof Bt&&e.value0 instanceof _F)return"business";if(e instanceof Bt&&e.value0 instanceof dF)return"computer-science";if(e instanceof Bt&&e.value0 instanceof mF)return"criminal-justice-and-corrections";if(e instanceof Bt&&e.value0 instanceof hF)return"economics";if(e instanceof Bt&&e.value0 instanceof DF)return"engineering";if(e instanceof Bt&&e.value0 instanceof gF)return"english";if(e instanceof Bt&&e.value0 instanceof RF)return"film";if(e instanceof Bt&&e.value0 instanceof yF)return"finance";if(e instanceof Bt&&e.value0 instanceof bF)return"history";if(e instanceof Bt&&e.value0 instanceof wF)return"political-science";if(e instanceof Bt&&e.value0 instanceof EF)return"pre-med";if(e instanceof Bt&&e.value0 instanceof IF)return"psychology";if(e instanceof TF)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var wb=function(){function e(){}return e.value=new e,e}(),Ice=function(){function e(){}return e.value=new e,e}(),Tce=function(){function e(){}return e.value=new e,e}();var gU=function(e){if(e instanceof wb)return M.value;if(e instanceof Tce)return new S("open");if(e instanceof Ice)return new S("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var wU=bt();var R_=function(e){return function(n){var a=function(){var u=is("?")(n);return u?"&":"?"}(),t=wU(rb(e.value)),r=wU(rb(e.key));return n+(a+(r+("="+t)))}};var Kce=function(){function e(){}return e.value=new e,e}(),Yce=function(){function e(){}return e.value=new e,e}(),Xce=function(){function e(){}return e.value=new e,e}(),Zce=function(){function e(){}return e.value=new e,e}(),ese=function(){function e(){}return e.value=new e,e}(),nse=function(){function e(){}return e.value=new e,e}(),ase=function(){function e(){}return e.value=new e,e}(),tse=function(){function e(){}return e.value=new e,e}(),rse=function(){function e(){}return e.value=new e,e}(),ose=function(){function e(){}return e.value=new e,e}(),use=function(){function e(){}return e.value=new e,e}(),ise=function(){function e(){}return e.value=new e,e}(),lse=function(){function e(){}return e.value=new e,e}(),cse=function(){function e(){}return e.value=new e,e}(),sse=function(){function e(){}return e.value=new e,e}(),vse=function(){function e(){}return e.value=new e,e}(),fse=function(){function e(){}return e.value=new e,e}(),_se=function(){function e(){}return e.value=new e,e}(),pse=function(){function e(){}return e.value=new e,e}(),dse=function(){function e(){}return e.value=new e,e}(),mse=function(){function e(){}return e.value=new e,e}(),hse=function(){function e(){}return e.value=new e,e}(),Dse=function(){function e(){}return e.value=new e,e}(),gse=function(){function e(){}return e.value=new e,e}(),Rse=function(){function e(){}return e.value=new e,e}(),yse=function(){function e(){}return e.value=new e,e}(),bse=function(){function e(){}return e.value=new e,e}(),wse=function(){function e(){}return e.value=new e,e}(),Ese=function(){function e(){}return e.value=new e,e}(),Ise=function(){function e(){}return e.value=new e,e}(),Tse=function(){function e(){}return e.value=new e,e}(),Sse=function(){function e(){}return e.value=new e,e}(),Cse=function(){function e(){}return e.value=new e,e}(),Fse=function(){function e(){}return e.value=new e,e}(),Gse=function(){function e(){}return e.value=new e,e}(),Mse=function(){function e(){}return e.value=new e,e}(),Ase=function(){function e(){}return e.value=new e,e}(),Lse=function(){function e(){}return e.value=new e,e}(),Pse=function(){function e(){}return e.value=new e,e}(),xse=function(){function e(){}return e.value=new e,e}(),Nse=function(){function e(){}return e.value=new e,e}(),jse=function(){function e(){}return e.value=new e,e}(),Ose=function(){function e(){}return e.value=new e,e}(),Use=function(){function e(){}return e.value=new e,e}(),kse=function(){function e(){}return e.value=new e,e}(),Bse=function(){function e(){}return e.value=new e,e}(),Hse=function(){function e(){}return e.value=new e,e}(),qse=function(){function e(){}return e.value=new e,e}(),Wse=function(){function e(){}return e.value=new e,e}(),Jse=function(){function e(){}return e.value=new e,e}(),$se=function(){function e(){}return e.value=new e,e}(),zse=function(){function e(){}return e.value=new e,e}(),Vse=function(){function e(){}return e.value=new e,e}(),Qse=function(){function e(){}return e.value=new e,e}(),Kse=function(){function e(){}return e.value=new e,e}(),Yse=function(){function e(){}return e.value=new e,e}();var va=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Tu=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var EU=function(e){if(e instanceof va&&e.value0 instanceof Kce)return"AcceptanceRate";if(e instanceof va&&e.value0 instanceof Yce)return"AcceptanceRateMen";if(e instanceof va&&e.value0 instanceof Xce)return"AcceptanceRateWomen";if(e instanceof va&&e.value0 instanceof Zce)return"Address";if(e instanceof va&&e.value0 instanceof ese)return"AdmissionChances";if(e instanceof va&&e.value0 instanceof nse)return"AdmissionDifficulty";if(e instanceof va&&e.value0 instanceof ase)return"AdmissionsNotificationDate";if(e instanceof va&&e.value0 instanceof tse)return"AdmissionsWebsite";if(e instanceof va&&e.value0 instanceof rse)return"AppDeadlineIsRolling";if(e instanceof va&&e.value0 instanceof ose)return"ApplicationEffort";if(e instanceof va&&e.value0 instanceof use)return"ApplicationRound";if(e instanceof va&&e.value0 instanceof ise)return"BasketballConference";if(e instanceof va&&e.value0 instanceof lse)return"CampusSetting";if(e instanceof va&&e.value0 instanceof cse)return"City";if(e instanceof va&&e.value0 instanceof sse)return"ClassRank";if(e instanceof va&&e.value0 instanceof vse)return"CoEdSingleSex";if(e instanceof va&&e.value0 instanceof fse)return"CollegeType";if(e instanceof va&&e.value0 instanceof _se)return"CommuterCollege";if(e instanceof va&&e.value0 instanceof pse)return"Diversity";if(e instanceof va&&e.value0 instanceof dse)return"DropoutRate";if(e instanceof va&&e.value0 instanceof hse)return"FinancialAidWebsite";if(e instanceof va&&e.value0 instanceof Dse)return"FirstYearEnrollment";if(e instanceof va&&e.value0 instanceof gse)return"FootballConference";if(e instanceof va&&e.value0 instanceof Rse)return"FourYearGraduationRate";if(e instanceof va&&e.value0 instanceof yse)return"HasDivisionOneBasketball";if(e instanceof va&&e.value0 instanceof bse)return"HasDivisionOneFootball";if(e instanceof va&&e.value0 instanceof wse)return"HasMedicalSchool";if(e instanceof va&&e.value0 instanceof Ese)return"HasStudyAbroad";if(e instanceof va&&e.value0 instanceof Ise)return"HBCU";if(e instanceof va&&e.value0 instanceof Tse)return"InListStatus";if(e instanceof va&&e.value0 instanceof Sse)return"MainWebsite";if(e instanceof va&&e.value0 instanceof mse)return"Majors";if(e instanceof va&&e.value0 instanceof Cse)return"Name";if(e instanceof va&&e.value0 instanceof Fse)return"NetCostEstimate";if(e instanceof va&&e.value0 instanceof Gse)return"Notes";if(e instanceof va&&e.value0 instanceof Mse)return"PercentInternationalStudents";if(e instanceof va&&e.value0 instanceof Ase)return"Phone";if(e instanceof va&&e.value0 instanceof Lse)return"Photo";if(e instanceof va&&e.value0 instanceof Pse)return"Prestige";if(e instanceof va&&e.value0 instanceof xse)return"ProgramLength";if(e instanceof va&&e.value0 instanceof Nse)return"PublicPrivate";if(e instanceof va&&e.value0 instanceof jse)return"RecommendationLetters";if(e instanceof va&&e.value0 instanceof Ose)return"Region";if(e instanceof va&&e.value0 instanceof Use)return"ReligiousAffiliation";if(e instanceof va&&e.value0 instanceof kse)return"SatActDeadline";if(e instanceof va&&e.value0 instanceof Bse)return"SatActTestPolicy";if(e instanceof va&&e.value0 instanceof Hse)return"SatSubjectTestDeadline";if(e instanceof va&&e.value0 instanceof qse)return"SixYearGraduationRate";if(e instanceof va&&e.value0 instanceof Wse)return"State";if(e instanceof va&&e.value0 instanceof Jse)return"StudentFacultyRatio";if(e instanceof va&&e.value0 instanceof $se)return"SubmissionDeadline";if(e instanceof va&&e.value0 instanceof zse)return"TOEFLPolicy";if(e instanceof va&&e.value0 instanceof Vse)return"TotalUndergrads";if(e instanceof va&&e.value0 instanceof Qse)return"TuitionInState";if(e instanceof va&&e.value0 instanceof Kse)return"TuitionOutOfState";if(e instanceof va&&e.value0 instanceof Yse)return"YieldRate";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof fF)return"RankingArchitecture";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof _F)return"RankingBusiness";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof pF)return"RankingChemistry";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof dF)return"RankingComputerScience";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof mF)return"RankingCriminalJusticeAndCorrections";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof hF)return"RankingEconomics";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof DF)return"RankingEngineering";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof gF)return"RankingEnglish";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof RF)return"RankingFilm";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof yF)return"RankingFinance";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof bF)return"RankingHistory";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof wF)return"RankingPoliticalScience";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof EF)return"RankingPreMed";if(e instanceof Tu&&e.value0 instanceof Bt&&e.value0.value0 instanceof IF)return"RankingPsychology";if(e instanceof Tu&&e.value0 instanceof TF)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var Xse=function(){function e(){}return e.value=new e,e}(),Zse=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eve=function(){function e(){}return e.value=new e,e}();var IU=function(e){if(e instanceof Xse)return"filters";if(e instanceof Zse)return"filter:"+EU(e.value0);if(e instanceof eve)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 34, column 26 - line 37, column 39): "+[e.constructor.name])};function TU(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var nve=Wu();var Ms=function(e){var n=yn(e);return function(a){return function(t){return n(function(){return TU(a,t)})}}},As=function(e){var n=Ms(e);return function(){return function(a){return function(t){return n(a)(nve(t))}}}};var ph=function(){function e(){}return e.value=new e,e}(),Jv=function(){function e(){}return e.value=new e,e}(),dh=function(){function e(){}return e.value=new e,e}(),Gve=function(){function e(){}return e.value=new e,e}(),FU=function(e){if(e instanceof ph)return"modal-sm";if(e instanceof Jv)return"";if(e instanceof dh)return"modal-lg";if(e instanceof Gve)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 e6=uu(ZU()),n6=e6.default;var vfe=xl(),a6=function(e){var n=vfe(e);return function(){return function(){return n(n6)}}};var gh="";function t6(e){var n=e.split(` `);return n.reduce(function(a,t){var r=pfe(t)||mfe(t)||gfe(t)||wfe(t)||yfe(t);return r&&a.push(r),a},[])}var ffe=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_fe=/\((\S*)(?::(\d+))(?::(\d+))\)/;function pfe(e){var n=ffe.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=_fe.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]||gh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var dfe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function mfe(e){var n=dfe.exec(e);return n?{file:n[2],methodName:n[1]||gh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var hfe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Dfe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function gfe(e){var n=hfe.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=Dfe.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||gh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Rfe=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function yfe(e){var n=Rfe.exec(e);return n?{file:n[3],methodName:n[1]||gh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var bfe=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function wfe(e){var n=bfe.exec(e);return n?{file:n[2],methodName:n[1]||gh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function r6({skipFrames:e,prefix:n}){let a=new Error().stack,r=t6(a)[e],u=o6(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=o6(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var o6=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var Efe=W(Rn),Ife=pn(dn),Gb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Tfe={map:function(e){return function(n){return new Gb(function(a){return n.value0(function(t){return a(e(t))})})}}},Sfe=U(Tfe);var u6=function(e){return wj(r6(e))},b_=function(e){return new Gb(function(n){return n(e)})},Gp=function(e){return function(n){return new Gb(function(a){return Iv(e)(n)(a)})}},i6=function(e){return function(n){return Iv(e)(function(a){return{init:Efe(ye),update:hn(m0),view:hn(hn(n.value0(Ife)))}})(ye)}},l6=function(e){var n=u6({skipFrames:3,prefix:"WithHook"});return function(a){return i6(n)(Sfe(a)(e))}};var Mb=function(e){var n=u6({skipFrames:3,prefix:"HooksComponent"});return i6(n)(e)},$v=function(){return function(e){return function(n){return new Gb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},Cfe=$v(),Rh=function(e){return function(){return Cfe}};var c6=un(en)(zn),Ffe=ri(Ne),Gfe=pn(dn),s6=W(Rn),Ab=function(e){return function(n){return Gp("UseSubscription")(function(a){return{init:c6(Ffe(Gfe)(e))(function(){return s6(ye)}),update:function(t){return function(r){return c6(Qa(n(r)))(function(){return s6(ye)})}},view:function(t){return function(r){return a(ye)}}}})}};function xF(e){return function(){return function(n){return e(n)()}}}function NF(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function jF(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var v6="message";var f6="hashchange";var _6="popstate";var p6="keyup",d6="keydown";var m6="mouseup";var h6="mousemove";var D6=yn(Ne),g6=U(Hn),Mfe=Ba(Qt),yh=function(){var e=function(t){return function(r){return function(u){return D6(function(){var l=r(),s=xF(function(h){return u(h)})();return NF(t)(s)(!1)(l)(),D6(jF(t)(s)(!1)(l))})}}},n=function(t){return e(t)(g6(z8)(jo))},a=function(t){return e(t)(g6(H8)(Mfe(Ov)(jo)))};return{hashchange:n(f6),mousemove:n(h6),mouseup:n(m6),popstate:n(_6),resize:n("resize"),message:n(v6),keydown:a(d6),keyup:a(p6),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var R6=Nl()(),pde=function(e){return e},Ps=jr(Bu),Lc=function(e){var n=N8(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(R6(r)({className:a,"aria-label":t}))(u)}}}}}}};var bh=function(e){return pde(jr(e))},y6=function(e){var n=O8(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(R6(r)({className:a,"aria-label":t}))(u)}}}}}}};var Lb=function(){return Je};var Mp=Ce(Ve),OF=Xr(),dde=a6(Ve)()(),mde=Lt(Ve)()(),hde=Lt(De)()(),Dde=Ce(De),gde=Lc(Z)()(),Rde=Jr(bu),yde=cr(Xn),bde=yn(Ne),b6=Lb(),Vl=function(){return function(e){var n=Mp("modal-backdrop fade show")(qn),a=OF(e),t=cl(a.footer),r=cl(a.header),u=Wa(a.size)(Jv.value),i=vr(" ")([function(){var s=Wa(a.scrollable)(!0);return s?"modal-dialog-scrollable":""}(),function(){var s=Wa(a.centered)(!0);return s?"modal-dialog-centered":""}(),FU(u),Wa(a.dialogClass)("")]),l=dde({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(Mp("modal fade show d-block")(mde("modal-dialog "+i)({style:Wa(a.dialogStyle)(et({}))})(hde("modal-content "+Wa(a.contentClass)(""))({style:Wa(a.contentStyle)(et({}))})([da(r)(Mp("modal-header "+Wa(a.headerClass)(""))),Mp("modal-body "+Wa(a.bodyClass)(""))(a.body),da(t)(Mp("modal-footer "+Wa(a.footerClass)("")))]))));return Ge([l,n])}},UF=Vl(),Ql=function(){return function(e){var n=OF(e),a=Dde("d-flex w-100 justify-content-between align-items-center")([Mp("mr-4")(Wa(n.title)(qn)),gde("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Wa(n.dismissButtonClass)("text-body"))(bh("Close"))({type:"button",onClick:Rde(n.onDismiss)})("")]),t=function(r){return yde(r.key==="Escape")(bde(n.onDismiss))};return l6(Ab(yh.keyup)(t))(function(r){var u=Wa(n.bodyScrollable)(!1);return UF(u?function(){var i=OF(b6(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,scrollable:i.scrollable,size:i.size,header:a}}():b6({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,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Ge([a,n.body])}))})}},Ap=function(e){var n=$m(e);return function(a){return function(t){return UF({bodyClass:a,body:Ge(n(t))})}}};var w6=W(Rn),Ede=pn(dn);var Ide=function(e){return function(n){return function(a){return Gp(e)(function(t){return n({init:w6(a),update:function(r){return function(u){return w6(u)}},view:S0(t)})})}}},xs=function(e){return Ide("UseState")(Ede)(e)};var Tde=Xr(),Sde=pn(dn),Cde=Av(De)()(),Fde=sa(Ve)()(),Gde=$r()();var Pb="login",kF=function(){return function(e){var n=Tde(e),a=function(){var u=Wa(n.auth0ActiveTab)(Pb);return u}(),t=ze({path:"",token:""})(pb("login_path")),r=function(u){return function(i){return wn(Sde)(function(l){return R_(function(s){return{key:u,value:s}}(l))})(cl(i))}};return Cde("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(R_({key:"screen_hint",value:a})(t.path))),target:function(){var u=Wa(n.openInNewTab)(!1);return u?"_blank":""}()})([Fde(Wa(n.className)("btn btn-primary px-4"))({type:"submit",disabled:Wa(n.disabled)(!1)})(Wa(n.content)(Xe(Wa(n.text)("Log in")))),Gde("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var BF=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var HF=rs(Ho(it)),Mde=pn(dn),Ade=ti()(),xb=function(e){var n=hi(e);return function(a){return jt(n(a))}},Lde=function(e){if(HF(xb("http://"))(HF(xb("https://"))(HF(xb("//"))(xb("blob:"))))(e))return e;if($e)return BF+ze(e)(hi("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},Su=function(){return function(){return function(e){return function(n){var a=function(r){return Mde},t=a(n)(q0("src")(Lde(n.src))(n));return Ade(e)(t)}}}};var w_=function(e){return function(n){return function(){return n[e]}}},Pde=w_("URL"),xde=w_("documentURI"),Nde=w_("origin"),jde=w_("compatMode"),Ode=w_("characterSet"),Ude=w_("contentType");var kde=w_("documentElement");var Nb=function(e){return function(n){return n[e]}},Hde=Nb("namespaceURI"),qde=Nb("prefix"),Wde=Nb("localName"),Jde=Nb("tagName");function qF(e){return function(){return e.id}}function WF(e){return function(){return e.classList}}function JF(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 $F=Je;var I6=Fn("Element");var Kl=function(e){return function(n){return function(){return n[e]}}};var zde=Kl("baseURI"),Vde=Kl("ownerDocument"),T6=Kl("parentNode"),Qde=Kl("parentElement");var Kde=Kl("childNodes"),Yde=Kl("firstChild"),Xde=Kl("lastChild"),Zde=Kl("previousSibling"),eme=Kl("nextSibling"),nme=Kl("nodeValue");var ame=Kl("textContent");function zF(e){return function(n){return function(){return e.isEqualNode(n)}}}var ome=U(Hn);var S6=function(){var e=ome(_e);return function(n){return e(T6(n))}}();var ume=JSON.stringify;var I_=function(){function e(){}return e.value=new e,e}(),C6=function(){function e(){}return e.value=new e,e}(),F6=function(){function e(){}return e.value=new e,e}(),wh=function(){function e(){}return e.value=new e,e}(),G6=function(){function e(){}return e.value=new e,e}(),M6=function(){function e(){}return e.value=new e,e}(),A6=function(){function e(){}return e.value=new e,e}();var jb=function(e){if(e instanceof I_)return M.value;if(e instanceof C6)return new S("for-you");if(e instanceof F6)return new S("chancing");if(e instanceof wh)return new S("finances");if(e instanceof G6)return new S("majors");if(e instanceof M6)return new S("admission-requirements");if(e instanceof A6)return new S("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 84, column 14 - line 91, column 39): "+[e.constructor.name])};var L6=Ba(Qt);var P6=function(e){return L6(EC(e))(L6(gp)(jo))};var VF=pe(oe);var QF=su(We)(wt),sme=ba(),vme=_i(oe),KF=function(e){return"/schools/"+e.slug},YF="/schools/hub";var x6=function(e){return function(n){var a=VF(gU(n.whatificator))(function(l){return"simulator="+l}),t=VF(n.mobileOverlay)(function(l){return"overlay="+IU(l)}),r=vr("&")(zo([t,a])),u=VF(n.focusedSchool)(function(l){return QF("/")(zo([new S(sme(l.slug)),jb(l.tab)]))}),i=function(){return e.knownSeoState instanceof S&&n.seoView?QF("/")(zo([new S(KF({slug:e.knownSeoState.value0.slug})),u])):QF("/")(zo([new S(YF),new S(wn(e.basePath)(bb)(n.ranking)),vme(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var N6="/profile";var _me=ba();var XF=function(e){return function(n){return vr("/")(zo([new S("/schools"),new S(_me(n)),jb(e)]))}},j6=N6,O6="/livestreams/upcoming";var pme=function(e){return x6({basePath:"all",knownSeoState:M.value})({ranking:M.value,focusedSchool:e,mobileOverlay:M.value,seoView:!1,whatificator:wb.value})};var Ob=function(e){return function(n){return pme(new S({tab:e,slug:n}))}};var U6=function(){function e(){}return e.value=new e,e}(),k6=function(){function e(){}return e.value=new e,e}(),Ub=function(){function e(){}return e.value=new e,e}(),kb=function(){function e(){}return e.value=new e,e}(),B6=function(){function e(){}return e.value=new e,e}(),H6=function(){function e(){}return e.value=new e,e}(),q6=function(){function e(){}return e.value=new e,e}(),W6=function(e){if(e instanceof U6)return"avatar-xxs";if(e instanceof k6)return"avatar-xs";if(e instanceof Ub)return"avatar-sm";if(e instanceof kb)return"";if(e instanceof B6)return"avatar-lg";if(e instanceof H6)return"avatar-xl";if(e instanceof q6)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 J6={show:ba()};var dme=Number.MAX_SAFE_INTEGER;var eG=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if($e)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 Mme=Ee(Jy);var z6={show:function(e){return e}};var V6=function(e){return Mme(e.publishScope)(Si.value)};var Lp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),aG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oG=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}();var iG=re(J6);var Ame=re(L4),Q6=re(f4),Lme=re(z6);var Pme="/messages";var xme=function(e){return function(n){return e+("/"+function(){if(n instanceof Lp)return"admission-officer/"+Ame(n.value0);if(n instanceof nG)return"school/"+Q6(n.value0);if(n instanceof aG)return"student/"+Lme(n.value0);if(n instanceof tG)return"high-school/"+iG(n.value0);if(n instanceof rG)return"service-provider/"+iG(n.value0);if(n instanceof oG)return"parent/"+iG(n.value0);if(n instanceof uG)return"recruiter/"+Q6(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},lG=xme(Pme);var Nme=zl(Mc(Fc)),jme=ne(ca),K6=pe(oe),Y6=ba(),Ome=St(Ga);var X6=Nme("network_connections_invite_school_path")(function(e){return function(n){return jme(e({school_id:n.schoolId,message:Fa(n.introMessage),sem_user_id:Fa(K6(n.semUserId)(Y6)),livestream_id:Fa(K6(n.livestreamId)(Y6))}))(ar)}}),Z6=function(e){return function(n){return Ome(X6({schoolId:e,introMessage:M.value,semUserId:M.value,livestreamId:new S(n)}))}};var e5=function(e){return function(n){return function(a){return X6({schoolId:e,introMessage:new S(a.introMessage),semUserId:new S(n),livestreamId:M.value})}}};qa();function go(){return go=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(a[r]=e[r]);return a}function zv(e,n){if(e==null)return{};var a=cG(e,n),t,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(a[t]=e[t]))}return a}qa();qa();function T_(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a5(e,n){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:1;o5+=1;var a=o5;function t(r){if(r===0)u5(a),e();else{var u=t5(function(){t(r-1)});fG.set(a,u)}}return t(n),a}Gi.cancel=function(e){var n=fG.get(e);return u5(n),r5(n)};function G_(e,n){return e?e.contains(n):!1}function Th(e){return e instanceof HTMLElement?e:Ei.findDOMNode(e)}var v5=uu(s5());qa();function mG(e,n){typeof e=="function"?e(n):ro(e)==="object"&&e&&"current"in e&&(e.current=n)}function Yb(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=new Array(n);a1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Gi(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Mt(function(){return function(){n()}},[]),[a,n]};qa();var Vme=Pc()?jm:Mt,rw=Vme;var w5=[dl,Ns,Kv,tw],IG=!1,E5=!0;function ow(e){return e===Kv||e===tw}var I5=function(e,n){var a=js(EG),t=Pt(a,2),r=t[0],u=t[1],i=b5(),l=Pt(i,2),s=l[0],h=l[1];function p(){u(dl,!0)}return rw(function(){if(r!==EG&&r!==tw){var y=w5.indexOf(r),E=w5[y+1],b=n(r);b===IG?u(E,!0):s(function(T){function L(){T.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),Mt(function(){return function(){h()}},[]),[p,r]};qa();qa();var T5=function(e){var n=ct(),a=ct(e);a.current=e;var t=Nm(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(bG,t),i.removeEventListener(yG,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(bG,t),i.addEventListener(yG,t),n.current=i)}return Mt(function(){return function(){r(n.current)}},[]),[u,r]};function TG(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,h=s===void 0?!0:s,p=t.motionDeadline,y=t.motionLeaveImmediately,E=t.onAppearPrepare,b=t.onEnterPrepare,T=t.onLeavePrepare,L=t.onAppearStart,O=t.onEnterStart,$=t.onLeaveStart,z=t.onAppearActive,ee=t.onEnterActive,ue=t.onLeaveActive,X=t.onAppearEnd,Y=t.onEnterEnd,te=t.onLeaveEnd,he=t.onVisibleChanged,Be=js(),ce=Pt(Be,2),le=ce[0],Fe=ce[1],Ie=js(Qv),je=Pt(Ie,2),Ze=je[0],Tn=je[1],Kn=js(null),In=Pt(Kn,2),Wn=In[0],Qn=In[1],Jn=ct(!1),_t=ct(null);function He(){return a()}var ua=ct(!1);function Ta(ut){var q=He();if(!(ut&&!ut.deadline&&ut.target!==q)){var K=ua.current,j;Ze===Sh&&K?j=X==null?void 0:X(q,ut):Ze===Ch&&K?j=Y==null?void 0:Y(q,ut):Ze===Fh&&K&&(j=te==null?void 0:te(q,ut)),Ze!==Qv&&K&&j!==!1&&(Tn(Qv,!0),Qn(null,!0))}}var Sn=T5(Ta),gn=Pt(Sn,1),Qe=gn[0],ea=Om(function(){var ut,q,K;switch(Ze){case Sh:return ut={},Zo(ut,dl,E),Zo(ut,Ns,L),Zo(ut,Kv,z),ut;case Ch:return q={},Zo(q,dl,b),Zo(q,Ns,O),Zo(q,Kv,ee),q;case Fh:return K={},Zo(K,dl,T),Zo(K,Ns,$),Zo(K,Kv,ue),K;default:return{}}},[Ze]),fa=I5(Ze,function(ut){if(ut===dl){var q=ea[dl];return q?q(He()):IG}if(vn in ea){var K;Qn(((K=ea[vn])===null||K===void 0?void 0:K.call(ea,He(),null))||null)}return vn===Kv&&(Qe(He()),p>0&&(clearTimeout(_t.current),_t.current=setTimeout(function(){Ta({deadline:!0})},p))),E5}),La=Pt(fa,2),pt=La[0],vn=La[1],ia=ow(vn);ua.current=ia,rw(function(){Fe(n);var ut=Jn.current;if(Jn.current=!0,!!e){var q;!ut&&n&&l&&(q=Sh),ut&&n&&u&&(q=Ch),(ut&&!n&&h||!ut&&y&&!n&&h)&&(q=Fh),q&&(Tn(q),pt())}},[n]),Mt(function(){(Ze===Sh&&!l||Ze===Ch&&!u||Ze===Fh&&!h)&&Tn(Qv)},[l,u,h]),Mt(function(){return function(){Jn.current=!1,clearTimeout(_t.current)}},[]);var It=ct(!1);Mt(function(){le&&(It.current=!0),le!==void 0&&Ze===Qv&&((It.current||le)&&(he==null||he(le)),It.current=!0)},[le,Ze]);var Da=Wn;return ea[dl]&&vn===Ns&&(Da=wa({transition:"none"},Da)),[Ze,vn,Da,le!=null?le:n]}qa();var Qme=function(e){C_(a,e);var n=F_(a);function a(){return T_(this,a),n.apply(this,arguments)}return S_(a,[{key:"render",value:function(){return this.props.children}}]),a}(Kf),S5=Qme;function Kme(e){var n=e;ro(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=wi(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,h=s===void 0?!0:s,p=r.forceRender,y=r.children,E=r.motionName,b=r.leavedClassName,T=r.eventProps,L=a(r),O=ct(),$=ct();function z(){try{return O.current instanceof HTMLElement?O.current:Th($.current)}catch{return null}}var ee=TG(L,l,z,r),ue=Pt(ee,4),X=ue[0],Y=ue[1],te=ue[2],he=ue[3],Be=ct(he);he&&(Be.current=!0);var ce=Nm(function(Kn){O.current=Kn,mG(u,Kn)},[u]),le,Fe=wa(wa({},T),{},{visible:l});if(!y)le=null;else if(X===Qv||!a(r))he?le=y(wa({},Fe),ce):!h&&Be.current?le=y(wa(wa({},Fe),{},{className:b}),ce):p?le=y(wa(wa({},Fe),{},{style:{display:"none"}}),ce):le=null;else{var Ie,je;Y===dl?je="prepare":ow(Y)?je="active":Y===Ns&&(je="start"),le=y(wa(wa({},Fe),{},{className:(0,C5.default)(wG(E,X),(Ie={},Zo(Ie,wG(E,"".concat(X,"-").concat(je)),je),Zo(Ie,E,typeof E=="string"),Ie)),style:te}),ce)}if(QT(le)&&Xb(le)){var Ze=le,Tn=Ze.ref;Tn||(le=xm(le,{ref:ce}))}return ft(S5,{ref:$},le)});return t.displayName="CSSMotion",t}var uw=Kme(aw);qa();var iw="add",lw="keep",cw="remove",sw="removed";function Yme(e){var n;return e&&ro(e)==="object"&&"key"in e?n=e:n={key:e},wa(wa({},n),{},{key:String(n.key)})}function vw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Yme)}function F5(){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=vw(e),i=vw(n);u.forEach(function(h){for(var p=!1,y=t;y1});return s.forEach(function(h){a=a.filter(function(p){var y=p.key,E=p.status;return y!==h||E!==cw}),a.forEach(function(p){p.key===h&&(p.status=lw)})}),a}var Xme=["component","children","onVisibleChanged","onAllRemoved"],Zme=["status"],ehe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function nhe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:uw,a=function(t){C_(u,t);var r=F_(u);function u(){var i;T_(this,u);for(var l=arguments.length,s=new Array(l),h=0;h=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function Ihe(e,n,a,t){var r=Ua.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)),Ua.mix(r,u)}function OG(e){var n,a,t;if(!Ua.isWindow(e)&&e.nodeType!==9)n=Ua.offset(e),a=Ua.outerWidth(e),t=Ua.outerHeight(e);else{var r=Ua.getWindow(e);n={left:Ua.getWindowScrollLeft(r),top:Ua.getWindowScrollTop(r)},a=Ua.viewportWidth(r),t=Ua.viewportHeight(r)}return n.width=a,n.height=t,n}function V5(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 hw(e,n,a,t,r){var u=V5(n,a[1]),i=V5(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 Q5(e,n,a){return e.lefta.right}function K5(e,n,a){return e.topa.bottom}function The(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function Rw(e,n,a){var t=a.target||n,r=OG(t),u=!Che(t,a.overflow&&a.overflow.alwaysByViewport);return Z5(e,r,a,u)}Rw.__getOffsetParent=NG;Rw.__getVisibleRectForElement=jG;function e9(e,n,a){var t,r,u=Ua.getDocument(e),i=u.defaultView||u.parentWindow,l=Ua.getWindowScrollLeft(i),s=Ua.getWindowScrollTop(i),h=Ua.viewportWidth(i),p=Ua.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var y={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+h&&r>=0&&r<=s+p,b=[a.points[0],"cc"];return Z5(e,y,L5(L5({},a),{},{points:b}),E)}var OH=uu(SH());var CH=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(){!rM||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),nwe?(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(){!rM||!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=ewe.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}(),FH=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),AH=typeof WeakMap!="undefined"?new WeakMap:new CH,LH=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=awe.getInstance(),t=new fwe(n,a,this);AH.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){LH.prototype[e]=function(){var n;return(n=AH.get(this))[e].apply(n,arguments)}});var _we=function(){return typeof Tw.ResizeObserver!="undefined"?Tw.ResizeObserver:LH}(),PH=_we;function xH(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 NH(e,n){e!==document.activeElement&&G_(n,e)&&typeof e.focus=="function"&&e.focus()}function oM(e,n){var a=null,t=null;function r(i){var l=Pt(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var h=s.getBoundingClientRect(),p=h.width,y=h.height,E=Math.floor(p),b=Math.floor(y);(a!==E||t!==b)&&Promise.resolve().then(function(){n({width:E,height:b})}),a=E,t=b}}var u=new PH(r);return e&&u.observe(e),function(){u.disconnect()}}qa();var jH=function(e,n){var a=Ha.useRef(!1),t=Ha.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 UH(e){return typeof e!="function"?null:e()}function kH(e){return ro(e)!=="object"||!e?null:e}var pwe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,h=n.monitorBufferTime,p=h===void 0?0:h,y=Ha.useRef({}),E=Ha.useRef(),b=Ha.Children.only(t),T=Ha.useRef({});T.current.disabled=r,T.current.target=u,T.current.align=i,T.current.onAlign=l;var L=jH(function(){var Y=T.current,te=Y.disabled,he=Y.target,Be=Y.align,ce=Y.onAlign;if(!te&&he){var le=E.current,Fe,Ie=UH(he),je=kH(he);y.current.element=Ie,y.current.point=je,y.current.align=Be;var Ze=document,Tn=Ze.activeElement;return Ie&&M5(Ie)?Fe=Rw(le,Ie,Be):je&&(Fe=e9(le,je,Be)),NH(Tn,le),ce&&Fe&&ce(le,Fe),!0}return!1},p),O=Pt(L,2),$=O[0],z=O[1],ee=Ha.useRef({cancel:function(){}}),ue=Ha.useRef({cancel:function(){}});Ha.useEffect(function(){var Y=UH(u),te=kH(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=oM(E.current,$)),(y.current.element!==Y||!xH(y.current.point,te)||!(0,OH.default)(y.current.align,i))&&($(),ee.current.element!==Y&&(ee.current.cancel(),ee.current.element=Y,ee.current.cancel=oM(Y,$)))}),Ha.useEffect(function(){r?z():$()},[r]);var X=Ha.useRef(null);return Ha.useEffect(function(){s?X.current||(X.current=Vv(window,"resize",$)):X.current&&(X.current.remove(),X.current=null)},[s]),Ha.useEffect(function(){return function(){ee.current.cancel(),ue.current.cancel(),X.current&&X.current.remove(),z()}},[]),Ha.useImperativeHandle(a,function(){return{forceAlign:function(){return $(!0)}}}),Ha.isValidElement(b)&&(b=Ha.cloneElement(b,{ref:Yb(b.ref,E)})),b},BH=Ha.forwardRef(pwe);BH.displayName="Align";var HH=BH;var qH=HH;qa();var dwe=Pc()?jm:Mt,uM=dwe;var VH=uu(M_());function Wh(){"use strict";Wh=function(){return e};var e={},n=Object.prototype,a=n.hasOwnProperty,t=typeof Symbol=="function"?Symbol:{},r=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function l(ce,le,Fe){return Object.defineProperty(ce,le,{value:Fe,enumerable:!0,configurable:!0,writable:!0}),ce[le]}try{l({},"")}catch{l=function(Fe,Ie,je){return Fe[Ie]=je}}function s(ce,le,Fe,Ie){var je=le&&le.prototype instanceof y?le:y,Ze=Object.create(je.prototype),Tn=new te(Ie||[]);return Ze._invoke=function(Kn,In,Wn){var Qn="suspendedStart";return function(Jn,_t){if(Qn==="executing")throw new Error("Generator is already running");if(Qn==="completed"){if(Jn==="throw")throw _t;return Be()}for(Wn.method=Jn,Wn.arg=_t;;){var He=Wn.delegate;if(He){var ua=ue(He,Wn);if(ua){if(ua===p)continue;return ua}}if(Wn.method==="next")Wn.sent=Wn._sent=Wn.arg;else if(Wn.method==="throw"){if(Qn==="suspendedStart")throw Qn="completed",Wn.arg;Wn.dispatchException(Wn.arg)}else Wn.method==="return"&&Wn.abrupt("return",Wn.arg);Qn="executing";var Ta=h(Kn,In,Wn);if(Ta.type==="normal"){if(Qn=Wn.done?"completed":"suspendedYield",Ta.arg===p)continue;return{value:Ta.arg,done:Wn.done}}Ta.type==="throw"&&(Qn="completed",Wn.method="throw",Wn.arg=Ta.arg)}}}(ce,Fe,Tn),Ze}function h(ce,le,Fe){try{return{type:"normal",arg:ce.call(le,Fe)}}catch(Ie){return{type:"throw",arg:Ie}}}e.wrap=s;var p={};function y(){}function E(){}function b(){}var T={};l(T,r,function(){return this});var L=Object.getPrototypeOf,O=L&&L(L(he([])));O&&O!==n&&a.call(O,r)&&(T=O);var $=b.prototype=y.prototype=Object.create(T);function z(ce){["next","throw","return"].forEach(function(le){l(ce,le,function(Fe){return this._invoke(le,Fe)})})}function ee(ce,le){function Fe(je,Ze,Tn,Kn){var In=h(ce[je],ce,Ze);if(In.type!=="throw"){var Wn=In.arg,Qn=Wn.value;return Qn&&ro(Qn)=="object"&&a.call(Qn,"__await")?le.resolve(Qn.__await).then(function(Jn){Fe("next",Jn,Tn,Kn)},function(Jn){Fe("throw",Jn,Tn,Kn)}):le.resolve(Qn).then(function(Jn){Wn.value=Jn,Tn(Wn)},function(Jn){return Fe("throw",Jn,Tn,Kn)})}Kn(In.arg)}var Ie;this._invoke=function(je,Ze){function Tn(){return new le(function(Kn,In){Fe(je,Ze,Kn,In)})}return Ie=Ie?Ie.then(Tn,Tn):Tn()}}function ue(ce,le){var Fe=ce.iterator[le.method];if(Fe===void 0){if(le.delegate=null,le.method==="throw"){if(ce.iterator.return&&(le.method="return",le.arg=void 0,ue(ce,le),le.method==="throw"))return p;le.method="throw",le.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var Ie=h(Fe,ce.iterator,le.arg);if(Ie.type==="throw")return le.method="throw",le.arg=Ie.arg,le.delegate=null,p;var je=Ie.arg;return je?je.done?(le[ce.resultName]=je.value,le.next=ce.nextLoc,le.method!=="return"&&(le.method="next",le.arg=void 0),le.delegate=null,p):je:(le.method="throw",le.arg=new TypeError("iterator result is not an object"),le.delegate=null,p)}function X(ce){var le={tryLoc:ce[0]};1 in ce&&(le.catchLoc=ce[1]),2 in ce&&(le.finallyLoc=ce[2],le.afterLoc=ce[3]),this.tryEntries.push(le)}function Y(ce){var le=ce.completion||{};le.type="normal",delete le.arg,ce.completion=le}function te(ce){this.tryEntries=[{tryLoc:"root"}],ce.forEach(X,this),this.reset(!0)}function he(ce){if(ce){var le=ce[r];if(le)return le.call(ce);if(typeof ce.next=="function")return ce;if(!isNaN(ce.length)){var Fe=-1,Ie=function je(){for(;++Fe=0;--je){var Ze=this.tryEntries[je],Tn=Ze.completion;if(Ze.tryLoc==="root")return Ie("end");if(Ze.tryLoc<=this.prev){var Kn=a.call(Ze,"catchLoc"),In=a.call(Ze,"finallyLoc");if(Kn&&In){if(this.prev=0;--Ie){var je=this.tryEntries[Ie];if(je.tryLoc<=this.prev&&a.call(je,"finallyLoc")&&this.prev=0;--Fe){var Ie=this.tryEntries[Fe];if(Ie.finallyLoc===le)return this.complete(Ie.completion,Ie.afterLoc),Y(Ie),p}},catch:function(le){for(var Fe=this.tryEntries.length-1;Fe>=0;--Fe){var Ie=this.tryEntries[Fe];if(Ie.tryLoc===le){var je=Ie.completion;if(je.type==="throw"){var Ze=je.arg;Y(Ie)}return Ze}}throw new Error("illegal catch attempt")},delegateYield:function(le,Fe,Ie){return this.delegate={iterator:he(le),resultName:Fe,nextLoc:Ie},this.method==="next"&&(this.arg=void 0),p}},e}function WH(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(h){a(h);return}l.done?n(s):Promise.resolve(s).then(t,r)}function iM(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){WH(u,t,r,i,l,"next",s)}function l(s){WH(u,t,r,i,l,"throw",s)}i(void 0)})}}qa();var JH=["measure","alignPre","align",null,"motion"],$H=function(e,n){var a=js(null),t=Pt(a,2),r=t[0],u=t[1],i=ct();function l(p){u(p,!0)}function s(){Gi.cancel(i.current)}function h(p){s(),i.current=Gi(function(){l(function(y){switch(r){case"align":return"motion";case"motion":return"stable";default:}return y}),p==null||p()})}return Mt(function(){l("measure")},[e]),Mt(function(){switch(r){case"measure":n();break;default:}r&&(i.current=Gi(iM(Wh().mark(function p(){var y,E;return Wh().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:y=JH.indexOf(r),E=JH[y+1],E&&y!==-1&&l(E);case 3:case"end":return T.stop()}},p)}))))},[r]),Mt(function(){return function(){s()}},[]),[r,h]};qa();var zH=function(e){var n=Ll({width:0,height:0}),a=Pt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=Om(function(){var l={};if(e){var s=t.width,h=t.height;e.indexOf("height")!==-1&&h?l.height=h:e.indexOf("minHeight")!==-1&&h&&(l.minHeight=h),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var QH=wi(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,h=e.destroyPopupOnHide,p=e.forceRender,y=e.align,E=e.point,b=e.getRootDomNode,T=e.getClassNameFromAlign,L=e.onAlign,O=e.onMouseEnter,$=e.onMouseLeave,z=e.onMouseDown,ee=e.onTouchStart,ue=e.onClick,X=ct(),Y=ct(),te=Ll(),he=Pt(te,2),Be=he[0],ce=he[1],le=zH(s),Fe=Pt(le,2),Ie=Fe[0],je=Fe[1];function Ze(){s&&je(b())}var Tn=$H(a,Ze),Kn=Pt(Tn,2),In=Kn[0],Wn=Kn[1],Qn=Ll(0),Jn=Pt(Qn,2),_t=Jn[0],He=Jn[1],ua=ct();uM(function(){In==="alignPre"&&He(0)},[In]);function Ta(){return E||b}function Sn(){var vn;(vn=X.current)===null||vn===void 0||vn.forceAlign()}function gn(vn,ia){var It=T(ia);Be!==It&&ce(It),He(function(Da){return Da+1}),In==="align"&&(L==null||L(vn,ia))}uM(function(){In==="align"&&(_t<2?Sn():Wn(function(){var vn;(vn=ua.current)===null||vn===void 0||vn.call(ua)}))},[_t]);var Qe=wa({},fw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var ia=Qe[vn];Qe[vn]=function(It,Da){return Wn(),ia==null?void 0:ia(It,Da)}});function ea(){return new Promise(function(vn){ua.current=vn})}Mt(function(){!Qe.motionName&&In==="motion"&&Wn()},[Qe.motionName,In]),ps(n,function(){return{forceAlign:Sn,getElement:function(){return Y.current}}});var fa=wa(wa({},Ie),{},{zIndex:l,opacity:In==="motion"||In==="stable"||!a?void 0:0,pointerEvents:!a&&In!=="stable"?"none":void 0},u),La=!0;(y==null?void 0:y.points)&&(In==="align"||In==="stable")&&(La=!1);var pt=i;return Qf.count(i)>1&&(pt=ft("div",{className:"".concat(t,"-content")},i)),ft(xp,go({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},Qe,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:h,forceRender:p}),function(vn,ia){var It=vn.className,Da=vn.style,ut=(0,VH.default)(t,r,Be,It);return ft(qH,{target:Ta(),key:"popup",ref:X,monitorWindowResize:!0,disabled:La,align:y,onAlign:gn},ft("div",{ref:ia,className:ut,onMouseEnter:O,onMouseLeave:$,onMouseDownCapture:z,onTouchStartCapture:ee,onClick:ue,style:wa(wa({},Da),fa)},pt))})});QH.displayName="PopupInner";var KH=QH;qa();var YH=uu(M_()),XH=wi(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,h=i.popupMotion,p=h===void 0?{}:h,y=i.popupRender,E=e.onClick,b=ct();ps(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var T=wa({zIndex:r},s),L=u;return Qf.count(u)>1&&(L=ft("div",{className:"".concat(a,"-content")},u)),y&&(L=y(L)),ft(xp,go({visible:t,ref:b,removeOnLeave:!0},p),function(O,$){var z=O.className,ee=O.style,ue=(0,YH.default)(a,l,z);return ft("div",{ref:$,className:ue,onClick:E,style:wa(wa({},ee),T)},L)})});XH.displayName="MobilePopupInner";var ZH=XH;var mwe=["visible","mobile"],eq=wi(function(e,n){var a=e.visible,t=e.mobile,r=zv(e,mwe),u=Ll(a),i=Pt(u,2),l=i[0],s=i[1],h=Ll(!1),p=Pt(h,2),y=p[0],E=p[1],b=wa(wa({},r),{},{visible:l});Mt(function(){s(a),a&&t&&E(d5())},[a,t]);var T=y?ft(ZH,go({},b,{mobile:t,ref:n})):ft(KH,go({},b,{ref:n}));return ft("div",null,ft(SG,b),T)});eq.displayName="Popup";var nq=eq;qa();var hwe=zT(null),lM=hwe;function cM(){}function Dwe(){return""}function gwe(e){return e?e.ownerDocument:window.document}var Rwe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function ywe(e){var n=function(a){C_(r,a);var t=F_(r);function r(u){var i;T_(this,r),i=t.call(this,u),i.popupRef=JR(),i.triggerRef=JR(),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 h=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,h,h?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 h;s.relatedTarget&&!s.relatedTarget.setTimeout&&G_((h=i.popupRef.current)===null||h===void 0?void 0:h.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 h;if(i.preClickTime&&i.preTouchTime?h=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?h=i.preClickTime:i.preTouchTime&&(h=i.preTouchTime),Math.abs(h-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 h=s.target,p=i.getRootDomNode(),y=i.getPopupDomNode();(!G_(p,h)||i.isContextMenuOnly())&&!G_(y,h)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var h=Th(i.triggerRef.current);if(h)return h}catch{}return Ei.findDOMNode(Eh(i))},i.getPopupClassNameFromAlign=function(s){var h=[],p=i.props,y=p.popupPlacement,E=p.builtinPlacements,b=p.prefixCls,T=p.alignPoint,L=p.getPopupClassNameFromAlign;return y&&E&&h.push(p5(E,b,s,T)),L&&h.push(L(s)),h.join(" ")},i.getComponent=function(){var s=i.props,h=s.prefixCls,p=s.destroyPopupOnHide,y=s.popupClassName,E=s.onPopupAlign,b=s.popupMotion,T=s.popupAnimation,L=s.popupTransitionName,O=s.popupStyle,$=s.mask,z=s.maskAnimation,ee=s.maskTransitionName,ue=s.maskMotion,X=s.zIndex,Y=s.popup,te=s.stretch,he=s.alignPoint,Be=s.mobile,ce=s.forceRender,le=s.onPopupClick,Fe=i.state,Ie=Fe.popupVisible,je=Fe.point,Ze=i.getPopupAlign(),Tn={};return i.isMouseEnterToShow()&&(Tn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Tn.onMouseLeave=i.onPopupMouseLeave),Tn.onMouseDown=i.onPopupMouseDown,Tn.onTouchStart=i.onPopupMouseDown,ft(nq,go({prefixCls:h,destroyPopupOnHide:p,visible:Ie,point:he&&je,className:y,align:Ze,onAlign:E,animation:T,getClassNameFromAlign:i.getPopupClassNameFromAlign},Tn,{stretch:te,getRootDomNode:i.getRootDomNode,style:O,mask:$,zIndex:X,transitionName:L,maskAnimation:z,maskTransitionName:ee,maskMotion:ue,ref:i.popupRef,motion:b,mobile:Be,forceRender:ce,onClick:le}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){Gi.cancel(i.attachId);var h=i.props,p=h.getPopupContainer,y=h.getDocument,E=i.getRootDomNode(),b;p?(E||p.length===0)&&(b=p(E)):b=y(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Gi(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,h=s(i.getRootDomNode()).createElement("div");h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.width="100%",i.portalContainer=h}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var h=i.props.alignPoint;!h||!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},Rwe.forEach(function(s){i["fire".concat(s)]=function(h){i.fireEvents(s,h)}}),i}return S_(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=Vv(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Vv(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Vv(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Vv(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Gi.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,h=i.builtinPlacements;return l&&h?_5(h,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,h=this.state.popupVisible;this.clearDelayTimer(),h!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:h}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var h=this,p=l*1e3;if(this.clearDelayTimer(),p){var y=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){h.setPopupVisible(i,y),h.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 h=this.props[i];h&&h(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,h=l.forceRender,p=l.alignPoint,y=l.className,E=l.autoDestroy,b=Qf.only(s),T={key:"trigger"};this.isContextMenuToShow()?T.onContextMenu=this.onContextMenu:T.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(T.onClick=this.onClick,T.onMouseDown=this.onMouseDown,T.onTouchStart=this.onTouchStart):(T.onClick=this.createTwoChains("onClick"),T.onMouseDown=this.createTwoChains("onMouseDown"),T.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(T.onMouseEnter=this.onMouseEnter,p&&(T.onMouseMove=this.onMouseMove)):T.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?T.onMouseLeave=this.onMouseLeave:T.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(T.onFocus=this.onFocus,T.onBlur=this.onBlur):(T.onFocus=this.createTwoChains("onFocus"),T.onBlur=this.createTwoChains("onBlur"));var L=(0,aq.default)(b&&b.props&&b.props.className,y);L&&(T.className=L);var O=wa({},T);Xb(b)&&(O.ref=Yb(this.triggerRef,b.ref));var $=xm(b,O),z;return(i||this.popupRef.current||h)&&(z=ft(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&(z=null),ft(lM.Provider,{value:this.triggerContextValue},$,z)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,h={};return s!==void 0&&l.popupVisible!==s&&(h.popupVisible=s,h.prevPopupVisible=l.popupVisible),h}}]),r}(Kf);return n.contextType=lM,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Dwe,getDocument:gwe,onPopupVisibleChange:cM,afterPopupVisibleChange:cM,onPopupAlign:cM,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 tq=ywe(f5);var ml={adjustX:1,adjustY:1},hl=[0,0],rq={left:{points:["cr","cl"],overflow:ml,offset:[-4,0],targetOffset:hl},right:{points:["cl","cr"],overflow:ml,offset:[4,0],targetOffset:hl},top:{points:["bc","tc"],overflow:ml,offset:[0,-4],targetOffset:hl},bottom:{points:["tc","bc"],overflow:ml,offset:[0,4],targetOffset:hl},topLeft:{points:["bl","tl"],overflow:ml,offset:[0,-4],targetOffset:hl},leftTop:{points:["tr","tl"],overflow:ml,offset:[-4,0],targetOffset:hl},topRight:{points:["br","tr"],overflow:ml,offset:[0,-4],targetOffset:hl},rightTop:{points:["tl","tr"],overflow:ml,offset:[4,0],targetOffset:hl},bottomRight:{points:["tr","br"],overflow:ml,offset:[0,4],targetOffset:hl},rightBottom:{points:["bl","br"],overflow:ml,offset:[4,0],targetOffset:hl},bottomLeft:{points:["tl","bl"],overflow:ml,offset:[0,4],targetOffset:hl},leftBottom:{points:["br","bl"],overflow:ml,offset:[-4,0],targetOffset:hl}};qa();var oq=uu(M_());function Fw(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 ft("div",{className:(0,oq.default)("".concat(r,"-content"),l),style:s},n!==!1&&ft("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),ft("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var bwe=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,h=s===void 0?.1:s,p=n.overlayStyle,y=n.prefixCls,E=y===void 0?"rc-tooltip":y,b=n.children,T=n.onVisibleChange,L=n.afterVisibleChange,O=n.transitionName,$=n.animation,z=n.motion,ee=n.placement,ue=ee===void 0?"right":ee,X=n.align,Y=X===void 0?{}:X,te=n.destroyTooltipOnHide,he=te===void 0?!1:te,Be=n.defaultVisible,ce=n.getTooltipContainer,le=n.overlayInnerStyle,Fe=n.arrowContent,Ie=n.overlay,je=n.id,Ze=n.showArrow,Tn=zv(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),Kn=ct(null);ps(a,function(){return Kn.current});var In=wa({},Tn);"visible"in n&&(In.popupVisible=n.visible);var Wn=function(){return ft(Fw,{showArrow:Ze,arrowContent:Fe,key:"content",prefixCls:E,id:je,overlayInnerStyle:le},Ie)},Qn=!1,Jn=!1;if(typeof he=="boolean")Qn=he;else if(he&&ro(he)==="object"){var _t=he.keepParent;Qn=_t===!0,Jn=_t===!1}return ft(tq,go({popupClassName:t,prefixCls:E,popup:Wn,action:u,builtinPlacements:rq,popupPlacement:ue,ref:Kn,popupAlign:Y,getPopupContainer:ce,onPopupVisibleChange:T,afterPopupVisibleChange:L,popupTransitionName:O,popupAnimation:$,popupMotion:z,defaultPopupVisible:Be,destroyPopupOnHide:Qn,autoDestroy:Jn,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:l},In),b)},uq=wi(bwe);var iq=uq;var cq=e=>Ha.createElement(iq,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(()=>uu(lq())).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)}qa();var sq=class extends Ha.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},vq=sq;var Ewe=bt();var fq=function(e){return"ref:"+rr(e)(at.value)},_q=function(e){var n=fq(e);return function(a){return Ewe(fc(n)(a))}},pq=function(e){var n=fq(e);return function(a){return IR(n)(a)}};var Iwe=xl(),dq=un(en)(zn),mq=W(Rn),Twe=tl(ty(nl)),hq={reflectSymbol:function(){return"deps"}},Swe=_q(hq),Cwe=pq(hq),Fwe=pn(dn);var Gwe=function(e){var n=Iwe(e);return function(){return function(){return n(vq)}}},Mwe=Gwe(Ve)()(),Awe=function(e){var n=Bo(e);return function(a){return function(t){return function(r){return function(u){return Gp(a)(function(i){return t({init:dq(Qa(u(r)))(function(){return mq(r)}),update:function(l){return function(s){return dq(Qa(u(s)))(function(){return mq(s)})}},view:function(l){return function(s){return Mwe({componentDidUpdate:Twe(s)(function(h){var p=n(Swe(h))(r);return p?new S(r):M.value}),deps:Cwe(r)})(i(ye))}}})})}}}}};var Dq=function(e){var n=Awe(e);return function(a){return function(t){return n("UseEffectPrime")(Fwe)(a)(t)}}};var Pwe=xl();var gq="click";var Gw="top",Jp=function(e){var n=Pwe(e);return function(){return function(){return n(cq)}}};var Rq="right";var yq=e=>()=>e.preventDefault&&e.preventDefault();var sM=function(){return yq};var xwe=Sa();var vM=ne(rn),fM=Et(xwe(B({reflectSymbol:function(){return"value"}})(de)(ln))),_M=W(ra);var Mw=function(e){return ze("")(vM(fM(jr(e.target)))(function(n){return _M(n.value)}))},pM=function(e){return ze("")(vM(fM(jr(e.target)))(function(n){return _M(n.value)}))},Os=function(e){return ze("")(vM(fM(jr(e.target)))(function(n){return _M(n.value)}))};var bq="/network/connections";var wq=15;var Nwe=Jp(Ve)()(),jwe=Pa(De),Owe=function(){return"You\u2019ve hit the "+(re(an)(wq)+`-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. `)}(),Uwe=po(Ve)("text-decoration-underline")(kt(Z)()()("text-dark")({href:bq})("Manage my connections")),Eq=function(e){return function(n){return Nwe({placement:e,trigger:gq,overlay:jwe("")([Xe(Owe),Uwe]),overlayStyle:et({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var Iq=ne(rn),$p=function(e){var n=Iq(e.guestPresenter)(function(a){if(a instanceof __)return new S(a.value0);if(a instanceof Ss)return M.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return Iq(n)(function(a){return new S({name:a.school.name,id:a.school.id})})};var kwe=function(){function e(){}return e.value=new e,e}(),Bwe=function(){function e(){}return e.value=new e,e}(),dM=function(){function e(){}return e.value=new e,e}(),Hwe=function(){function e(){}return e.value=new e,e}(),qwe=function(){function e(){}return e.value=new e,e}(),Wwe=function(){function e(){}return e.value=new e,e}(),Tq=function(e){if(e instanceof kwe)return"account_settings_page";if(e instanceof Bwe)return"preference_survey";if(e instanceof dM)return"livestream_registration";if(e instanceof Hwe)return"chancing_wizard_network_step";if(e instanceof qwe)return"main_profile_page";if(e instanceof Wwe)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 Vwe=Mc(Fc),mM=zl(Vwe),hM=ne(ca);var Qwe=Xr(),Sq=pe(oe);var Cq=mM("profile_visibility_path")(function(e){return function(n){return hM(e({visibility:{publish_scope:lh(n)}}))(ar)}}),Fq=function(){return mM("profile_network_settings_path")(function(e){return function(n){return function(a){return hM(e({network_settings:{publish_scope:lh(a.publishScope),publish_context:Tq(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Fa(Sq(cl(a.livestreamConference))(function(t){return{school_name:Fa(Sq($p(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(ar)}(Qwe(n))}})},Gq=mM("profile_name_path")(function(e){return function(n){return hM(e({name:n}))(ar)}});var xe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),En=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Kwe=Ql(),Ywe=Ir(Z),Xwe=At(Z),DM=Ut(Z),gM=Ko(Z),Yv=Ce(De),zp=sa(Z)()(),RM=Jr(bu),Zwe=un(en),yM=aa(ga),x_=Ce(Ve),Mq=Su()(),e1e=Rc(Z),n1e=gr(We)(wt),Aq=$r()(),bM=aa(ai),a1e=lp()(),Lq=Ce(Z),t1e=ly(De),wM=_y(Z),r1e=Pa(Z),o1e=Jp(Ve)()(),u1e=Ut(De),i1e=kt(Z)()(),l1e=Ka(Z),N_=W(Rn),Pq=Zwe(zn),c1e=Lb(),Jh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xq=function(){function e(){}return e.value=new e,e}(),Nq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Oq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Uq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$h=function(){function e(){}return e.value=new e,e}(),EM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kq=function(e){return function(n){var a=function(h){return Kwe({body:h,title:Ywe("my-0")(function(){return e.stage instanceof Sy?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new En($h.value)),size:dh.value})},t=P4(e.context),r=Ge([Xwe("mt-3")("Review your message before you send it"),DM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),gM("mt-4")("Your message"),rh(e.message),Yv("d-flex mt-4 justify-content-start")([zp("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)({onClick:RM(function(){return n(new En(new EM({introMessage:e.message})))(),n(new xe(new Jh(KS.value)))()})})("Send"),zp("btn btn-lg btn-outline-primary ml-3 text-nowrap")({onClick:yM(n)(new xe(new Jh(Zm.value)))})("No, I need to edit something")])]),u=Ge([Yv("text-center")([x_("")(Mq("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),e1e("mt-4")("Connection request sent!"),DM("mx-md-4")(n1e(["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."])),zp("btn btn-lg btn-outline-secondary mt-4")({onClick:yM(n)(new En($h.value))})("Close")])]),i=zp("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)({onClick:yM(n)(new En($h.value))})("Cancel"),l=function(){var h=$S(e.message)&&function(){if(e.profile.fullName instanceof S)return!0;if(e.profile.fullName instanceof M)return!Ul(e.firstName)&&!Ul(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 238, column 15 - line 242, column 88): "+[e.profile.fullName.constructor.name])}(),p=function(){if(e.vineBelowConnectionLimit instanceof S&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof S&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof M)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 231, column 13 - line 234, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Ge([Ia(Ct(e.profile.fullName))(Ge([gM("mt-md-4")("Your preferred name"),Yv("form-row mx-1")([Aq("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:bM(n)(function(y){return xe.create(Oq.create(Os(y)))}),placeholder:"First name"}),Aq("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:bM(n)(function(y){return xe.create(Uq.create(Os(y)))}),placeholder:"Last name"})])])),gM("mt-md-4")("Your message"),a1e("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:bM(n)(function(y){return xe.create(jq.create(Mw(y)))}),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")(C4(e.message)),Lq("mt-3 mt-md-4 small")("The ideal connection message should include:"),t1e("small")([wM("")("Your name, where you\u2019re from, and a bit about who you are"),wM("")("What you\u2019re interested in studying along with one or two insightful questions"),wM("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),Yv("d-flex mt-4 justify-content-start")([Eq(Gw)(x_("")(zp("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)({onClick:RM(function(){return function(){if(e.profile.fullName instanceof S)return ye;if(e.profile.fullName instanceof M)return n(new xe(new Nq({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 214, column 23 - line 218, column 113): "+[e.profile.fullName.constructor.name])}(),n(new xe(new Jh(QS.value)))()}),disabled:!h||p,style:et({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=Yv("mx-md-7")([x_("border border-success rounded p-4 my-4")(Yv("row align-items-center")([x_("col-12 col-md-auto text-center text-md-left")(Mq("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),x_("col text-center text-md-left")(r1e("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),Yv("d-flex flex-nowrap align-items-center")([Lq("mr-4")("Publish your profile to join the CollegeVine Network"),o1e({placement:Rq,overlay:u1e("")([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 `),i1e("")({href:j6})("your profile"),Xe(".")]),overlayStyle:et({width:"15rem"})})(l1e("cursor-default text-secondary fe fe-info large")(""))]),DM("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."),Yv("d-flex mt-4 justify-content-start justify-content-md-center")([zp("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)({onClick:RM(function(){return n(new xe(xq.value))(),n(new xe(new Jh(Zm.value)))()})})("Publish profile"),i])]);return x_("t--network-sem-user-modal")(function(){if(e.stage instanceof Sy)return a(s);if(e.stage instanceof Zm)return a(l);if(e.stage instanceof QS)return a(r);if(e.stage instanceof KS)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])}())}},Bq=function(e){return function(n){if(n instanceof xe){if(n.value0 instanceof Jh)return N_({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 xq)return Pq(Qa(Cq(Si.value)))(function(){return N_({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:Si.value}})});if(n.value0 instanceof Nq)return Pq(Qa(Gq(n.value0.value0)))(function(){return N_({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 S(eG(n.value0.value0))}})});if(n.value0 instanceof jq)return N_({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 Oq)return N_({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 Uq)return N_({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 En)return N_(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])}},s1e=function(e){var n=V6(e);return n?Zm.value:Sy.value},Hq=function(e){return{firstName:"",lastName:"",message:"",profile:c1e(e.profile),stage:s1e(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var Aw=Ee(Vt(Nt)),v1e=Xr(),f1e=Ce(Ve),_1e=Su()(),IM=Pa(Z),TM=Lt(Ve)()(),p1e=Ka(Z),d1e=$v(),m1e=Rh(en)(),h1e=yn(Ne),D1e=Lc(De)()(),g1e=Jr(ry),R1e=sM(),y1e=Ba(Qt),Vp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),SM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qq=function(){function e(){}return e.value=new e,e}(),b1e=function(){function e(){}return e.value=new e,e}(),w1e={eq:function(e){return function(n){return e instanceof Vp&&n instanceof Vp?e.value0.url===n.value0.url:e instanceof zh&&n instanceof zh?Aw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&Aw(e.value0.textColorClass)(n.value0.textColorClass):e instanceof SM&&n instanceof SM?Aw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof CM&&n instanceof CM?Aw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},E1e=Dq(w1e),Wq=function(){return function(e){var n=v1e(e),a=function(){var r=Wa(n.shape)(qq.value);if(r instanceof qq)return"rounded-circle";if(r instanceof b1e)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 119, column 9 - line 121, column 37): "+[r.constructor.name])}(),t=function(r){return f1e("avatar "+(W6(Wa(n.size)(kb.value))+(" "+Wa(n.className)(""))))(function(){if(r instanceof Vp)return _1e("avatar-img img-fluid "+(a+(" "+Wa(n.borderClassName)(""))))({src:r.value0.url,alt:Wa(n.ariaLabel)("Avatar image")});if(r instanceof zh)return IM("avatar-title font-weight-bold fw-bold "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+(ze("")(r.value0.textColorClass)+(" "+Wa(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof SM)return TM("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Wa(n.borderClassName)(""))))))({"aria-label":Wa(n.ariaLabel)("Avatar icon")})(p1e(r.value0.iconClass)(""));if(r instanceof CM)return TM("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Wa(n.borderClassName)(""))))))({"aria-label":Wa(n.ariaLabel)("Avatar icon")})(IM("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 78, column 11 - line 116, column 46): "+[r.constructor.name])}())};return Mb(d1e(xs(n.source))(function(r){return m1e(E1e(n.source)(function(u){return h1e(r.value1(u))}))(function(){return b_(Ge([t(r.value0),function(){return r.value0 instanceof Vp?da(cl(n.hideAvatar))(function(u){return TM("hq-only-menu-item")({style:et({marginTop:"-50px",marginLeft:"200px"})})(D1e("btn btn-sm btn-warning mb-4 t--hide-avatar")(Ps)({onClick:g1e(function(i){return function(){return R1e(i)(),y1e(r.value1)(u)()}})})([IM("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Hide")]))}):qn}()]))})}))}};var I1e=Wq();var Jq=function(e){return function(n){return I1e({source:function(){if(e.avatarUrl instanceof S)return new Vp({url:e.avatarUrl.value0});if(e.avatarUrl instanceof M)return new zh({initials:e.initials,backgroundColorClass:M.value,textColorClass:M.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 FM=U(oe),T1e=on(iP(Df));var $q=function(e){var n=function(a){return ze("")(FM(qu)(hm(0)(a)))};return Pv(function(){var a=Yo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":ze("?")(T1e(FM(n)(L0(a)))(FM(n)(lm(a))))}())},zq=function(e){return e.firstName+(" "+e.lastName)};var GM=Ir(Z),S1e=kt(Z)()(),C1e=kt(De)()(),Vq=Ka(Z),F1e=sa(De)()(),G1e=tl(Tv(nl)),M1e=pe(oe),A1e=ne(rn),MM=Ce(Z),Lw=Ce(De),Qq=Ce(Ve),L1e=a_(Z),Kq=Nl()(),P1e=Ko(Z),x1e=Ut(Z),Qp=W(Rn),Yq=un(en),N1e=Yq(zn),j1e=Ma(Ne),O1e=Yq(ca),U1e=W(Xn),k1e=lt(wr(Ga)),Xq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Vh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Zq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nW=function(){var e=function(a){return function(t){return function(r){var u=GM("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=GM("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,S1e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")({href:lG(new Lp(t.semUser.id))})("View Message")],s=zq(t.semUser),h=$q(s),p=GM("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),y=[p,C1e("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")({href:lG(new Lp(t.semUser.id))})([Vq("fe fe-message-square mr-2 large")(""),Xe("Send a message to "+t.semUser.firstName)])],E=function(L){return F1e("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")({onClick:G1e(r)(M1e(A1e(a.currentUser)(function(O){return O.profile}))(Zq.create)),disabled:L.isDisabled})([Vq("fe fe-message-square mr-2 large")(""),Xe("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],T=[i,E({isDisabled:!0}),MM("mt-4 text-secondary small")("Invitation pending")];return Lw("t--livestream-details-guest-presenter-sem-user mb-4")([da(a.currentUser)(function(L){return Ia(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(Qq("card")(Lw("card-body")(function(){if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof xv)return y;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Bl&&t.semUser.connection.value0.initiator instanceof bs||t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof ws&&t.semUser.connection.value0.initiator instanceof bs)return T;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Bl&&t.semUser.connection.value0.initiator instanceof ys)return l;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof ws&&t.semUser.connection.value0.initiator instanceof ys||t.semUser.connection instanceof M)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])}())))}),L1e("text-uppercase text-secondary")("Your guest presenter"),Lw("row align-items-center mt-4")([Qq("col-auto")(Jq(Kq(t.semUser)({initials:h}))(Ub.value)),Lw("col")([P1e("mb-1")(s),MM("text-secondary small")(t.semUser.school.name),MM("text-secondary small")(t.semUser.title)]),da(t.semUser.bio)(function(L){return x1e("mt-4 mb-2 ml-2")(L)})]),da(t.modal)(function(L){return kq(L.value0)(function(O){return r(Vh.create(O))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof Vh&&r.value0 instanceof En){if(r.value0.value0 instanceof $h)return Qp({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:M.value});if(r.value0.value0 instanceof EM)return N1e(j1e(O1e(e5(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return U1e(new eW({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return Qp(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 S&&r instanceof Vh&&r.value0 instanceof xe)return k1e(Vh.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new Xq(u))}})(Bq(t.modal.value0.value0)(new xe(r.value0.value0)));if(r instanceof Vh&&r.value0 instanceof xe)return Qp(t);if(r instanceof Zq)return Qp({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new Xq(Hq({schoolName:a.semUser.school.name,context:VS.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof eW)return Qp({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 S({initiator:bs.value,introMessage:r.value0.introMessage,status:Bl.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 Iv("Livestream Guest Presenter SEM user")(function(a){return{init:Qp(Kq(a)({modal:M.value})),view:e(a),update:n(a)}})}();var Pw=function(){function e(){}return e.value=new e,e}(),aW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var B1e=bt(),H1e=on(oC),AM=function(e){var n=function(u){return B1e(Ef(u))},a=n(Ts("[^a-z0-9\\-_]+")(H1e(mp)(Ay))),t=n(Ts("^-|-$")(mp)),r=n(Ts("-{2,}")(mp));return nh(t)("")(nh(r)("-")(nh(a)("-")(t_(Km(e)))))};var J1e=U(Ye),$1e=pe(Ye),Qh=re(an),LM=ba(),z1e=on(yt),Kh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),V1e=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Q1e=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),K1e=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Yh=function(){function e(){}return e.value=new e,e}(),Y1e=function(){function e(){}return e.value=new e,e}();var oW=function(e){var n=function(t){return t.key+("="+t.value)},a=function(t){return t.length===0?"":"?"+vr("&")(t)};return a(J1e(n)(e))};var uW=function(e){return $1e(e)(function(n){if(n instanceof Kh)return{key:"utm_cv_source",value:n.value0};if(n instanceof V1e)return{key:"utm_source",value:n.value0};if(n instanceof Q1e)return{key:"utm_campaign",value:n.value0};if(n instanceof K1e)return{key:"utm_content",value:n.value0};throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 196, column 3 - line 204, column 36): "+[n.constructor.name])})};var xw=function(e){return function(n){return function(a){var t=function(){if(e instanceof Yh)return"i";if(e instanceof Y1e)return"o";throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 112, column 12 - line 114, column 24): "+[e.constructor.name])}();return"/experts/profile/"+(t+("/"+(Qh(n.id)+("-"+(AM(n.name)+oW(uW(a)))))))}}};var iW=function(e){return function(n){return function(a){var t=function(){if(n instanceof Pw)return[];if(n instanceof aW)return[{key:"theme",value:Qh(LM(n.value0))}];if(n instanceof tW)return[{key:"package",value:Qh(LM(n.value0))}];if(n instanceof rW)return[{key:"packageOffer",value:Qh(LM(n.value0))}];throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 146, column 5 - line 154, column 71): "+[n.constructor.name])}(),r=z1e(t)(uW(a));return"/experts/advising/book/"+(Qh(e.id)+("-"+(AM(e.name)+oW(r))))}}};var X1e=re(an),Z1e=ba(),eEe=Pa(De),PM=Ka(Z),Us=Ce(De),lW=a_(Z),nEe=U(Ye),aEe=kt(Ve)()(),Nw=Ce(Ve),tEe=ti()(),rEe=Ir(Z),cW=kt(De)()(),jw=kt(Z)()(),sW=function(e){return function(n){var a=new Kh("sp-guest-presenter-card-from-conference-"+X1e(Z1e(e))),t=function(p){return eEe("badge badge-light bg-light text-dark mr-3")([PM("fe fe-tag mr-2")(""),Xe(p.name)])},r=xw(Yh.value)(n.entity)([a]),u=function(p){return function(y){return Us("mb-3")([lW("text-secondary text-uppercase mb-2")(p),y])}},i=Us("mt-4")([da(_e(n.entity.shortEducation))(function(p){return u("Education")(Xe(p))}),u("Bio")(rh(n.entity.bio)),Y8(mi(n.entity.tags))(u("Specialties")(Ge(nEe(t)(n.entity.tags))))]),l=Us("row")([da(_e(n.entity.imageUrl))(function(p){return aEe("btn btn-link text-body p-0 m-0")({href:r,target:"_blank"})(Nw("col-auto my-auto")(Nw("avatar avatar-md")(tEe("avatar-img rounded-circle")({src:p}))))}),Us("col-auto my-auto")([lW("text-uppercase text-secondary mb-2")("Advisor"),rEe("m-0")(n.entity.name)]),Us("col text-center text-md-right my-auto")([Nw("d-none d-md-block")(cW("btn btn-sm btn-outline-primary t--open-message-modal")({href:r,target:"_blank"})([PM("fe fe-message-square mr-2")(""),Xe("Message")])),Nw("d-block d-md-none")(cW("btn btn-sm btn-outline-primary t--open-message-modal")({href:r,target:"_blank"})([PM("fe fe-message-square mr-2")(""),Xe("Message")]))])]),s=iW(n.entity)(Pw.value)([a]),h=da(n.advisingConfig)(function(p){return Us("mt-4")([Us("d-none d-md-block")([da(p.freeConsultationDurationMinutes)(function(y){return jw("btn btn-primary px-3 mr-3")({href:r,target:"_blank"})("Book a free consultation")}),jw("btn btn-outline-primary px-3 mr-3")({href:s,target:"_blank"})("Book a session")]),Us("d-block d-md-none text-center")([da(p.freeConsultationDurationMinutes)(function(y){return jw("btn btn-primary mr-3")({href:r,target:"_blank"})("Book a free consultation")}),jw("btn btn-outline-primary")({href:s,target:"_blank"})("Book a session")])])});return Us("mt-4 mt-md-0 t--service-provider-guest-presenter")([l,i,h])}};var Xh=function(e){return function(n){return function(a){return function(t){if(n instanceof __)return nW({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Ss)return sW(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 vW="/experts/essay-review";var oEe=kt(De)()(),uEe=Ka(Z),Kp=Ce(Z),Cu=Ce(Ve),eu=Ce(De),fW=Ir(Z),_W=ti()(),pW=pe(Ye),iEe=Pa(Z),dW=pe(oe),lEe=Ut(De),mW=po(Z),xM=kt(Z)()(),cEe=re(an),Zh=U(oe),sEe=sp(De)()(),vEe=re(ui),eD=function(e){var n=function(a){return function(t){return oEe("mr-3")({href:t,target:"_blank"})([Xe(a),uEe("fe fe-external-link ml-1")("")])}};return Ge([Kp("text-uppercase text-muted small mb-2")("School information"),Cu("card shadow-none")(eu("card-body")([fW("mb-1")(e.name),Kp("text-uppercase small text-secondary")(e.cityState),eu("mt-3 d-none d-md-block")([n("Stats")(Ob(I_.value)(e.slug)),n("Cost")(Ob(wh.value)(e.slug)),n("Map")(Ob(I_.value)(e.slug))]),eu("mt-3 d-md-none")([n("Stats")(XF(I_.value)(e.slug)),n("Cost")(XF(wh.value)(e.slug))])]))])},fEe=function(e){var n=function(i){return _W("avatar-img rounded-circle")({src:i})},a=vr(" ")(pW(Yo(" ")(e.fullName))(il(1))),t=iEe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return ze("")(dW(i)(function(l){return" '"+l}))},u=function(i){return function(l){return lEe("")([mW("")(i+": "),Xe(l)])}};return Ge([Kp("text-uppercase text-muted small mb-2")("Your host"),eu("row align-items-center mb-4 pr-4")([Cu("col-auto")(Cu("avatar")(wn(t)(n)(e.pictureUrl))),Cu("col")(eu("row align-items-center justify-content-between")([Kp("col-12 col-md-auto x-large")(e.fullName),Cu("col-12 col-md-auto")(da(e.allStreamsUrl)(function(i){return xM("t--host-streams")({href:i})("See all "+(cEe(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Ge(zo([Zh(u("Undergrad College"))(dW(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),Zh(u("Major"))(e.undergrad.major),Zh(u("Graduate College"))(e.gradCollege),Zh(u("Work Experience"))(e.workExperience),Zh(u("My Admissions Story"))(e.admissionsStory)]))])},_Ee=eu("rounded bg-tan mb-3 overflow-hidden")([eu("row")([Cu("col-12 col-md")(eu("m-4")([Ko(Z)("")("Get your essay reviewed by an expert"),Ut(Z)("small")(` CollegeVine\u2019s network of admissions experts have helped students write essays that stand out to admissions officers. Work with an expert today to craft the perfect essay. `),xM("btn btn-dark px-4")({href:R_({key:"utm_cv_source",value:"essay-livestream-cta"})(vW)})("Submit my essay for review")])),Cu("d-none d-md-block col-12 col-md-auto")(Su()()("h-100")({src:"/img/livestreams/mkt-239-livestreams-advisors-essays-cta.svg"}))])]),pEe=function(e){return Ge([Kp("text-uppercase text-muted small mb-2")("Description"),eu("")([Cu("col-6 col-md-4 float-right")(_W("img-fluid rounded")({src:e.imageUrl})),eu("")(pW(Yo(` `)(e.description))(function(n){return sEe("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},dEe=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+vEe(e.conference.id));return Cu("card mt-3")(Cu("card-body py-3")(eu("row align-items-center")([Cu("col-12 col-md-auto mb-3 mb-md-0")(Kp("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),eu("col-12 col-md mb-3 mb-md-0")([Xe("This livestream was part of the "),mW("")("\u{1F3AA} Student panel college fair"),Xe(". Recordings for all 100+ Q&A panels are available.")]),Cu("col-12 col-md-auto")(xM("btn btn-sm btn-outline-primary px-3")({href:n})("See all recordings"))])))},Ow=function(e){var n=function(){if(e.conference.presenter instanceof S&&e.conference.guestPresenter instanceof S||e.conference.presenter instanceof S&&e.conference.guestPresenter instanceof M||e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof S)return"col-12 col-md-6";if(e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof M)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 62, column 16 - line 66, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Ge([Ia(e.conference.collegeFair)(dEe(e)),function(){return e.featureFlags.mkt293LivestreamsEssayReviewCtaForAdvisorStreams&&e.conference.guestPresenter instanceof S&&e.conference.guestPresenter.value0 instanceof Ss?_Ee:qn}(),Cu("card")(eu("card-body")([fW("text-center mb-4")("About this livestream"),eu("row")([eu(n)([da(e.conference.school)(function(a){return Cu("d-md-none")(eD(a))}),pEe(e.conference)]),eu(n)([da(e.conference.guestPresenter)(function(a){return Xh(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),da(e.conference.school)(function(a){return Cu("d-none d-md-block")(eD(a))}),da(e.conference.presenter)(fEe)])])]))])};var hW=un(en),mEe=hW(zn),hEe=Ma(Ne),DEe=Ot(Ur),DW=W(Xn),Uw=W(Rn),gEe=hW(ca),kw=W(ra),gW=Ce(Z),Bw=Ko(Z),Hw=Gv(De),qw=Sv(De),Xv=hs(De),Dl=Cv(Z),Ww=Fv(De),Jw=pe(Ye),Zv=jl(Z),$w=jl(Ve),zw=sa(Z)()(),Vw=aa(ga),REe=$i(Xa),yEe=U(Ye),bEe=on(Xs(Xs(Bg))),wEe=$i(ei),EEe=$i(BO),IEe=re(ui),TEe=At(Z),SEe=Ce(De),Qw=function(){function e(){}return e.value=new e,e}(),RW=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}(),yW=function(){function e(){}return e.value=new e,e}(),bW=function(){function e(){}return e.value=new e,e}(),wW=function(e){return function(n){return function(a){var t=function(u){return mEe(hEe(DEe(u)(function(i){return DW(bW.value)})))(function(){return Uw({ctas:n.ctas,stage:RW.value,error:M.value})})},r=function(u){if(u instanceof vl)return pU({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof fl)return fU({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof _l)return _U({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof pl)return vU({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 221, column 15 - line 229, column 83): "+[u.constructor.name])};if(a instanceof nD)return t(gEe(r(a.value0))(function(){return DW(yW.value)}));if(a instanceof yW)return Uw({ctas:n.ctas,error:n.error,stage:Qw.value});if(a instanceof bW)return Uw({ctas:n.ctas,stage:Qw.value,error:new S("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 204, column 24 - line 214, column 92): "+[a.constructor.name])}}},EW=function(e){return Uw({stage:Qw.value,error:M.value,ctas:e})},CEe=function(){return No(Vo(We)([Hl.value,new Dt(" "),ql.value,new Dt(", "),Jl.value,new Dt(":"),Ti.value,new Dt(" "),$l.value]))}(),IW=function(e){return function(n){if(e.ctas.length===0)return qn;var a=function(L){return L instanceof pl?kw(L.value0):M.value},t=function(L){return L instanceof fl?kw(L.value0):M.value},r=function(L){return L instanceof _l?kw(L.value0):M.value},u=function(L){return L instanceof vl?kw(L.value0):M.value},i=function(){if(e.stage instanceof Qw)return qn;if(e.stage instanceof RW)return gW("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 183, column 24 - line 188, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?qn:Ge([Bw("")("Referrals"),Hw("table table-sm mb-0")([qw("")([Xv("")([Dl("")("Title"),Dl("")("Actions")])]),Ww("")(Jw(L)(function(O){return Xv("t--cta t--cta-referral")([Zv("pt-3")(O.title),$w("text-nowrap")(zw("btn btn-white btn-sm px-4 t--open")({onClick:Vw(n)(new nD(new pl(O)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?qn:Ge([Bw("")("General"),Hw("table table-sm mb-0")([qw("")([Xv("")([Dl("")("Title"),Dl("")("URL"),Dl("")("Link Text"),Dl("")("Actions")])]),Ww("")(Jw(Mf(REe(function(O){return O.title}))(L))(function(O){return Xv("t--cta t--cta-general")([Zv("pt-3")(function(){var $=jt(O.autoDisplayMinutesFromStart);return $?"\u23F0 ":""}()+O.title),Zv("pt-3")(O.url),Zv("pt-3")(O.buttonText),$w("text-nowrap")(zw("btn btn-white btn-sm px-4 t--open")({onClick:Vw(n)(new nD(new fl(O)))})("Launch CTA"))])}))])])},h=function(L){return L.length===0?qn:Ge([Bw("")("Featured Service Providers"),Hw("table table-sm mb-0")([qw("")([Xv("")([Dl("")("Advisors"),Dl("")("Link Text"),Dl("")("Actions")])]),Ww("")(Jw(L)(function(O){return Xv("t--cta t--cta-featured-sp")([Zv("pt-3")(vr(", ")(yEe(function($){return $.name})(O.providers))),Zv("pt-3")(O.linkText),$w("text-nowrap")(zw("btn btn-white btn-sm px-4 t--open")({onClick:Vw(n)(new nD(new _l(O)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?qn:Ge([Bw("")("Upcoming events"),Hw("table table-sm mb-0")([qw("")([Xv("")([Dl("")("Livestream"),Dl("")("Date & Time"),Dl("")("Actions")])]),Ww("")(Jw(Mf(bEe(wEe(function(O){return O.startTime}))(EEe(function(O){return O.conferenceId})))(L))(function(O){return Xv("t--cta t--cta-stream-"+IEe(O.conferenceId))([Zv("pt-3")(O.title),Zv("pt-3")(CEe(O.startTime)+(" "+v_)),$w("text-nowrap")(zw("btn btn-white btn-sm px-4 t--open")({onClick:Vw(n)(new nD(new vl(O)))})("Launch CTA"))])}))])])},y=Yr(a)(e.ctas),E=Yr(t)(e.ctas),b=Yr(r)(e.ctas),T=Yr(u)(e.ctas);return Ge([TEe("")("Calls to action"),SEe("t--ctas position-relative")([da(e.error)(function(L){return gW("alert alert-danger")(L)}),p(T),s(E),h(b),l(y),i])])}};var TW=zl(Mc(Fc)),SW=ne(ca),FEe=iF(de),Yp=function(){function e(){}return e.value=new e,e}(),aD=function(){function e(){}return e.value=new e,e}(),tD=function(){function e(){}return e.value=new e,e}(),CW={eq:function(e){return function(n){return e instanceof Yp&&n instanceof Yp||e instanceof aD&&n instanceof aD||e instanceof tD&&n instanceof tD}}},FW=TW("profile_validate_username_path")(function(e){return function(n){return SW(e({username:n}))(Gc(function(a){return FEe("username validation result")(a)(function(t){return t==="available"?new S(Yp.value):t==="taken"?new S(aD.value):t==="invalid"?new S(tD.value):M.value})}))}}),GW=TW("profile_set_username_path")(function(e){return function(n){return SW(e({username:n}))(ar)}});var GEe=Ee(Vt(Fl()(Wi(Wi(Cl)()({reflectSymbol:function(){return"username"}})(Nt))()({reflectSymbol:function(){return"result"}})(CW)))),NM=Ce(De),MW=Ce(Ve),MEe=Ut(Z),AEe=Su()(),rD=Ce(Z),LEe=$r()(),PEe=aa(ai),AW=Lc(Z)()(),xEe=aa(ga),NEe=tl(Tv(nl)),jM=un(en)(zn),jEe=cr(Rn),OM=Ma(Ne),OEe=_i(Ga),j_=W(Rn),UEe=U(Ga),kEe=ne(ca),BEe=jf(Ur),LW=W(Xn),PW=function(){function e(){}return e.value=new e,e}(),xW=function(){function e(){}return e.value=new e,e}(),NW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OW=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}(),UW=function(){function e(){}return e.value=new e,e}(),kW=function(){function e(){}return e.value=new e,e}(),UM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kM=function(){function e(){}return e.value=new e,e}(),BW=function(e){return function(n){var a=e.username!==""&&Ct(e.updating)&&GEe(e.validated)(new S({username:e.username,result:Yp.value}));return Ge([NM("row")([MW("col col-md-6")(MEe("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),MW("col-6 d-none d-md-block")(AEe("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),rD("")("Your username:"),NM("input-group")([LEe("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:PEe(n)(function(t){return xe.create(NW.create(Os(t)))})})]),NM("d-flex mt-3")([AW("btn btn-light mr-3")(Ps)({onClick:xEe(n)(new En(kM.value))})("Cancel"),AW("btn btn-primary t--submit-username")(Ps)({type:"button",disabled:!a,onClick:NEe(n)(function(){return a?new S(new xe(UW.value)):M.value}())})("Save")]),da(e.validated)(function(t){if(t.result instanceof Yp)return qn;if(t.result instanceof aD)return rD("small text-danger")("Sorry, this username is already taken");if(t.result instanceof tD)return rD("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])}),da(e.updating)(function(t){if(t instanceof PW)return rD("text-success")("Updating your username...");if(t instanceof xW)return rD("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])})])}},HW=function(e){return function(n){if(n instanceof xe){if(n.value0 instanceof NW)return jM(jEe(n.value0.value0!=="")(OM(OEe(er(100))(new xe(new jW(n.value0.value0))))))(function(){return j_({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof jW){if(n.value0.value0===e.username)return jM(OM(UEe(function(){var a=OW.create(n.value0.value0);return function(t){return xe.create(a(t))}}())(FW(n.value0.value0))))(function(){return j_({username:e.username,validated:M.value,updating:M.value})});if($e)return j_(e)}if(n.value0 instanceof OW)return j_({updating:e.updating,username:e.username,validated:new S({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof UW)return jM(OM(kEe(BEe(GW(e.username)))(function(a){if(a instanceof Oe)return LW(new En(new UM(e.username)));if(a instanceof Pe)return LW(new xe(kW.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return j_({username:e.username,validated:M.value,updating:new S(PW.value)})});if(n.value0 instanceof kW)return j_({username:e.username,validated:e.validated,updating:new S(xW.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 En)return j_(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])}},qW=function(e){return{username:e,validated:M.value,updating:M.value}};var HEe=Xr(),qEe=Jp(Ve)()(),WEe=Pa(De),JEe=Ka(Z),$Ee=function(e){var n=$m(e);return function(){return function(a){return function(t){var r=HEe(a);return qEe({placement:Gw,overlay:Ge(n(t)),overlayStyle:Wa(r.overlayStyle)(et({width:"15rem"}))})(WEe("d-inline-flex align-items-center text-secondary "+r.className)([JEe("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),Xe(r.anchorText)]))}}}},Kw=function(e){var n=$Ee(e)();return function(a){return n({className:a,anchorText:""})}};var BM=function(e){return e};var zEe=function(e){return e},WW=function(e){var n=nn(e),a=zEe(e.Eq0());return{compare:function(t){return function(r){return z2(n(t)(r))}},Eq0:function(){return a}}};var JW=jn(Nn),oD=xn(JW)(Mn(Gn)),$W=Ln(An),uD=Pn($W),zW=kn(Un),iD=On(zW),VEe=U(oe),Xp=function(){function e(){}return e.value=new e,e}(),Zp=function(){function e(){}return e.value=new e,e}(),ed=function(){function e(){}return e.value=new e,e}(),nd=function(){function e(){}return e.value=new e,e}(),ad=function(){function e(){}return e.value=new e,e}(),O_=function(){function e(){}return e.value=new e,e}(),QEe={to:function(e){if(e instanceof be)return Xp.value;if(e instanceof ve&&e.value0 instanceof be)return Zp.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof be)return ed.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof be)return nd.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve&&e.value0.value0.value0.value0 instanceof be)return ad.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve&&e.value0.value0.value0.value0 instanceof ve)return O_.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 Xp)return new be(ke.value);if(e instanceof Zp)return new ve(new be(ke.value));if(e instanceof ed)return new ve(new ve(new be(ke.value)));if(e instanceof nd)return new ve(new ve(new ve(new be(ke.value))));if(e instanceof ad)return new ve(new ve(new ve(new ve(new be(ke.value)))));if(e instanceof O_)return new ve(new ve(new ve(new ve(new ve(ke.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},VW=Bn(QEe)(oD(oD(oD(oD(oD(JW)($W))(uD))(uD))(uD))(uD))(iD(iD(iD(iD(iD(zW))))))(uD);var KEe={eq:function(e){return function(n){return e instanceof Xp&&n instanceof Xp||e instanceof Zp&&n instanceof Zp||e instanceof ed&&n instanceof ed||e instanceof nd&&n instanceof nd||e instanceof ad&&n instanceof ad||e instanceof O_&&n instanceof O_}}},Yw=function(e){if(e instanceof Xp)return"student";if(e instanceof Zp)return"transfer_student";if(e instanceof ed)return"counselor";if(e instanceof nd)return"iec";if(e instanceof ad)return"parent";if(e instanceof O_)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},QW=function(){var e=Cn(Yw)(VW);return ta(tn)({parse:function(n){return n==="unknown"?new S(M.value):VEe(S.create)(e(n))},default:M.value,diagnosticName:"User Persona"})}(),KW=function(e){if(e instanceof Xp)return"Student";if(e instanceof Zp)return"Transfer Student";if(e instanceof ed)return"High School Counselor";if(e instanceof nd)return"Independent Educational Counselor (IEC)";if(e instanceof ad)return"Parent";if(e instanceof O_)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},YW=function(){return Lf(KEe)(O_.value)(VW)}();function XW(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var YEe=W(vt),XEe=_s(ts(!1));var Xw=function(e){if(_s(rc(XEe)))return YEe(ye);if($e)return XW;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 16, column 1 - line 16, column 53): "+[e.constructor.name])};var HM=U(Dr);var qM=ne(Nu),ZEe=W(ov),eIe=Co(yP);var ZW=function(e){return e},eJ=function(e){return function(n){return HM(function(a){return a.result})(e({substring:n,position:0}))}};var jc={map:function(e){return function(n){var a=HM(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},U_=function(e){return function(n){return new Pe({pos:n.position,error:e})}},k_={apply:function(e){return function(n){return function(a){return qM(e(a))(function(t){return qM(n(t.suffix))(function(r){return ZEe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return jc}};var ks={bind:function(e){return function(n){return function(a){return qM(e(a))(function(t){return ZW(n(t.result))(t.suffix)})}}},Apply0:function(){return k_}};var Bs={pure:function(e){return function(n){return new Oe({result:e,suffix:n})}},Apply0:function(){return k_}};var nIe={Applicative0:function(){return Bs},Bind1:function(){return ks}},nJ={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof Kt)return new Kt({state:t.result.value0,str:t.suffix});if(t.result instanceof $t)return new $t({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 eIe(function(r){return HM(a)(ZW(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return nIe}};var B_={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Pe){if(a.position===t.value0.pos)return n(a);if($e)return new Pe({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return jc}},aIe={empty:U_("No alternative"),Alt0:function(){return B_}},aJ={Applicative0:function(){return Bs},Plus1:function(){return aIe}};var tJ=ma(B_),WM=ne(ks),JM=W(Bs),tIe=U(jc);var rIe=co(k_),oIe=Yn(k_);var $M=function(e){return function(n){return tJ(e)(U_(n))}},zM=function(e){return function(n){var a=e(n);return a instanceof Pe?new Pe({pos:n.position,error:a.value0.error}):a}},Oc=function(e){return tJ(WM(e)(function(n){return JM(ye)}))(JM(ye))};var rJ=function(e){return function(n){return new Hu(e,n)}};var uIe=function(e){return function(n){var a=e(n);if(a instanceof Oe){var t=n.position65535;return t?e(n):lJ(a.value0)}if(a instanceof M)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 zM(iJ(sIe)(function(n){var a=e(n);return a?lJ(n):U_("Character "+(cJ(n)+" did not satisfy predicate"))}))},Ai=function(e){return $M(ef(function(n){return n===e}))("Could not match character "+cJ(e))};var vIe=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}},fIe=bt(),VM=U(jc),_Ie=gr(DR)(wt),pIe=U(ET),yo=un(en)(ks),nu=St(jc),Hs=W(Bs),ii=ma(B_);var td=co(k_),nf=ne(ks),vJ=gr(Go)(wt);var Cr=function(e){return fIe(Ly(e))},QM=function(e){return VM(function(){var n=pIe(qu);return function(a){return _Ie(n(a))}}())(oJ(ef(e)))},fJ=function(e){return yo(nu(e))(function(){return yo(nu(Zw(e)))(function(){return Hs(ye)})})},Zw=function(e){return ii(fJ(e))(Hs(ye))},_J=function(e){return yo(nu(ef(e)))(function(){return yo(nu(Zw(ef(e))))(function(){return Hs(ye)})})},dIe=Ai(Cr(0));var pJ=Ai(` `),dJ=function(e){return e===" "||e===" "},mIe=ef(dJ),KM=_J(dJ),hIe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},Uc=function(e){return function(n){return function(a){return a>=e&&a<=n}}},DIe=Uc(Cr(33))(Cr(126)),gIe=ef(DIe),YM=function(e){return function(n){return is(qu(n))(e)}},e1=function(e){return Uc(Cr(1))(Cr(8))(e)||Uc(Cr(14))(Cr(31))(e)||YM("\v\f\x7F")(e)},RIe=function(e){return Uc(Cr(33))(Cr(39))(e)||Uc(Cr(42))(Cr(91))(e)||Uc(Cr(93))(Cr(126))(e)||e1(e)},yIe=function(e){return Uc(Cr(33))(Cr(90))(e)||Uc(Cr(94))(Cr(126))(e)||e1(e)},bIe=ef(e1),wIe=function(e){return YM(qu(Cr(33)))(e)||Uc(Cr(35))(Cr(91))(e)||Uc(Cr(93))(Cr(126))(e)||e1(e)};var mJ=Ai("\r"),hJ=nu(td(mJ)(pJ)),rd=function(){var e=fJ(td(hJ)(KM)),n=td(KM)(Oc(td(hJ)(KM)));return ii(n)(e)}(),DJ=function(){var e=yo(nu(Ai("\\")))(function(){return ii(gIe)(ii(mIe)(ii(pJ)(ii(mJ)(ii(bIe)(dIe)))))});return nf(e)(function(n){return Hs("\\"+qu(n))})}(),EIe=ii(QM(wIe))(DJ),IIe=function(){var e=yo(nu(Ai('"')))(function(){return nf(H_(td(Oc(rd))(EIe)))(function(n){return yo(nu(Oc(rd)))(function(){return yo(nu(Ai('"')))(function(){return Hs(n)})})})});return VM(function(n){return'"'+(vJ(n)+'"')})(e)}(),gJ=vIe("comment","Text.Email.Parser",function(){return yo(nu(Ai("(")))(function(){return yo(Zw(ii(_J(RIe))(ii(nu(DJ))(ii(gJ(155))(rd)))))(function(){return yo(nu(Ai(")")))(function(){return Hs(ye)})})})}),TIe=gJ(152),n1=Zw(ii(TIe)(rd)),SIe=yo(Oc(n1))(function(){return yo(nu(Ai("[")))(function(){return nf(H_(td(Oc(rd))(QM(yIe))))(function(e){return yo(Oc(rd))(function(){return yo(nu(Ai("]")))(function(){return yo(Oc(n1))(function(){return Hs("["+(vJ(e)+"]"))})})})})})}),CIe=function(){var e=function(n){return hIe(n)||YM("!#$%&'*+/=?^_`{|}~-")(n)};return QM(e)}(),RJ=function(){var e=yo(nu(Oc(n1)))(function(){return nf(ii(CIe)(IIe))(function(a){return yo(nu(Oc(n1)))(function(){return Hs(a)})})}),n=uJ(e)(Ai("."));return VM(su(DR)(wt)("."))(n)}(),FIe=ii(RJ)(SIe),GIe=RJ,XM=nf(GIe)(function(e){return nf(Ai("@"))(function(){return nf(FIe)(function(n){return nf(sJ)(function(){return Hs({localPart:e,domainPart:n})})})})});var AIe=function(e){return eJ(XM)(e)},LIe=function(){var e=_r(ju)(re(Rf()()(bf({reflectSymbol:function(){return"error"}})(wf({reflectSymbol:function(){return"pos"}})(an))(Wt))));return function(n){return e(AIe(n))}}(),lD=function(e){var n=LIe(e);if(n instanceof Pe)return!1;if(n instanceof Oe)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var ZM=po(Z),a1=$r()(),PIe=aa(ai),yJ=vy(De)()(),bJ=pe(oe),wJ=tl(ty(nl)),EJ=U(oe),t1=fy(Z)()(),IJ=pe(Ye),cD=Ce(De),xIe=kF(),eA=re(an),NIe=uT(We)(it),jIe=Av(De)()(),q_=Ce(Ve),TJ=sa(Z)()(),OIe=aa(ga),UIe=Jr(bu),kIe=re(ui),sD=W(Rn),SJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),od=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(y){return function(E){return function(b){return function(T){return function(L){return Ge([ZM("")(y),a1("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:PIe(t)(function(O){return T(Os(O))})})])}}}}}},u=[ZM("")("I'm a..."),yJ("form-control")({name:"livestream_public_registration_form[i_am_a]",value:ze("")(bJ(a.persona)(Yw)),onChange:wJ(t)(function(p){return EJ(MJ.create)(QW(pM(p)))})})([Ia(Ct(a.persona))(t1("")({value:""})("Select one...")),Ge(IJ(YW)(function(p){return t1("")({value:Yw(p)})(KW(p))}))])],i=cD("d-flex align-items-center")([Xe("Already have an account? "),xIe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:Pb,openInNewTab:!1})]),l=[ZM("")("Graduation year"),yJ("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:ze("")(bJ(a.gradYear)(eA)),onChange:wJ(t)(function(p){return EJ(GJ.create)(cc(pM(p)))})})([Ia(Ct(a.gradYear))(t1("")({value:""})("Select one...")),Ge(IJ(n.allowedGradYears)(function(p){return t1("")({value:eA(p)})(eA(p))}))])],s=ze({path:"",token:""})(pb("livestreams_register_path")),h=NIe([lD(a.email),a.firstName!=="",a.lastName!=="",jt(a.gradYear),jt(a.persona)]);return Ge([i,jIe("")({action:s.path,method:"POST"})([q_("row")(q_("col")(r("email")("Email")("Your email")(a.email)(SJ.create)({autoFocus:e.autoFocus}))),q_("row mt-3")(q_("col")(r("first_name")("First name")("Your first name")(a.firstName)(CJ.create)({autoFocus:!1}))),q_("row mt-3")(q_("col")(r("last_name")("Last name")("Your last name")(a.lastName)(FJ.create)({autoFocus:!1}))),cD("row mt-3")([cD("col-6")(l),cD("col-6")(u)]),q_("row mt-3")(cD("col-12")([TJ("btn btn-primary w-100 mt-3 t--register")({type:"submit",disabled:!h,onClick:OIe(Xw)(ye)})("Register"),da(e.cancelButton)(function(p){return TJ("btn btn-outline-primary w-100 mt-3 t--cancel-registration")({type:"button",onClick:UIe(p.click)})(p.text)})])),a1("")({type:"hidden",name:"authenticity_token",value:s.token}),a1("")({type:"hidden",name:"register_for_conference_id",value:kIe(n.conference.id)}),a1("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},ud=function(e){return function(n){if(n instanceof SJ)return sD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof CJ)return sD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof FJ)return sD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof GJ)return sD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new S(n.value0)});if(n instanceof MJ)return sD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new S(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 171, column 16 - line 181, column 36): "+[n.constructor.name])}},id=function(){return{email:"",firstName:"",lastName:"",gradYear:M.value,persona:M.value}}();var AJ=Ce(De),BIe=Kw(Z),HIe=kt(Z)()(),ld=function(e){return Ge([AJ("")([Xe(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),BIe("")(` 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. `)]),AJ("")([Xe(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),HIe("")({href:e.paths.termsAndConditions})("here"),Xe(".")])])};var nA={eq:function(e){return function(n){return e===n}}};var qs=un(en)(zn),qIe=ri(Ne),LJ=Sa(),WIe=Fi(LJ(B({reflectSymbol:function(){return"author"}})(LJ(B({reflectSymbol:function(){return"cvid"}})(de)(B({reflectSymbol:function(){return"username"}})(de)(ln))))(B({reflectSymbol:function(){return"id"}})(cn)(B({reflectSymbol:function(){return"isFromHQ"}})(Ea)(B({reflectSymbol:function(){return"isPublic"}})(Ea)(B({reflectSymbol:function(){return"text"}})(de)(B({reflectSymbol:function(){return"time"}})(de)(ln))))))))(Ne),cd=Ma(Ne),r1=W(Xn),Fr=W(Rn),aA=Ql(),JIe=Ut(De),tA=Pa(Z),rA=po(Z),$Ie=Ka(Z),W_=Ce(De),sd=Ce(Ve),o1=sa(Z)()(),vd=aa(ga),vD=Ce(Z),PJ=At(Z),xJ=pe(Ye),zIe=Lt(De)()(),VIe=Pa(De),NJ=ne(rn),QIe=lp()(),KIe=aa(ai),YIe=tl(Tv(nl)),XIe=Mv(De),ZIe=$r()(),eTe=Kw(Z),nTe=Ee(Vt(Nt)),aTe=pe(oe),jJ=Jo(WW(iu(ei))),tTe=Bo(nA),OJ=U(Ga),rTe=on(yt),oTe=uc(We)(nA),UJ=lt(wr(Ga)),kJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BJ=function(){function e(){}return e.value=new e,e}(),HJ=function(){function e(){}return e.value=new e,e}(),J_=function(){function e(){}return e.value=new e,e}(),u1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),i1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),l1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WJ=function(){function e(){}return e.value=new e,e}(),oA=function(){function e(){}return e.value=new e,e}(),uA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JJ=function(){function e(){}return e.value=new e,e}(),$J=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iA=function(){function e(){}return e.value=new e,e}(),c1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),s1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zJ=function(){function e(){}return e.value=new e,e}(),fd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fD=function(){function e(){}return e.value=new e,e}();var VJ=function(e){return qs(qIe(function(n){return xe.create(uA.create(p_(n)))})(WIe(e.pusher.dataChannel)("question")))(function(){return qs(cd(r1(new xe(JJ.value))))(function(){return Fr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:J_.value})})})},QJ=function(e){if(e.user instanceof M)return new S(new xe(iA.value));if(e.user instanceof S&&e.user.value0.username instanceof M)return new S(new xe(zJ.value));if(e.user instanceof S&&e.user.value0.username instanceof S)return M.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 356, column 3 - line 362, column 14): "+[e.user.constructor.name])},uTe=function(){return No(Vo(We)([Jl.value,new Dt(":"),Ti.value,new Dt(" "),$l.value]))}(),KJ=function(e){return function(n){return function(a){var t=function(s){return a(xe.create(s))},r=function(s){return aA({onDismiss:t(fD.value),body:Ge([JIe("")([tA("")("By: "),rA("")("@"+s.author.username)]),$Ie("")(s.text),Ol(""),W_("row align-items-center mb-3")([sd("col-4")(o1("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())({onClick:vd(t)(new s1(BJ.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),vD("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."}())]),W_("row align-items-center")([sd("col-4")(o1("btn w-100 btn-danger")({onClick:vd(t)(new s1(HJ.value))})("Ban this user")),W_("col")([Xe("This user will not be able to ask any more questions "),rA("")("in this livestream. "),tA("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Ge([o1("btn btn-outline-primary px-4")({onClick:vd(t)(fD.value)})("Never mind, close this dialog")])})},u=function(s){return aA({onDismiss:t(fD.value),title:PJ("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Ge([od({cancelButton:M.value,autoFocus:!0})(e)(s)(function(h){return t(c1.create(h))}),sd("small mt-3")(ld(e))])})},i=function(s){return aA({onDismiss:t(fD.value),title:PJ("")("Please select a user name"),body:BW(s)(function(h){return t(fd.create(h))}),bodyClass:"t--username-modal"})},l=function(s){var h=function(y){return function(E){return function(b){return Ge([vD("ml-2 badge badge-"+E)(y),da(b)(function(T){return vD("ml-2 text-secondary")(uTe(T))})])}}},p=s.isFromHQ&&s.isPublic;return p?h("CollegeVine")("success")(s.time):s.isPublic?h("Question")("warning")(M.value):qn};return Ge([sd("position-relative h-100")(sd("d-flex flex-column position-absolute-fullsize")(W_("d-flex flex-column flex-grow-1 min-height-0")([W_("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(xJ(n.questions)(function(s){return zIe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:vd(t)(new s1(new kJ(s)))})([VIe("small d-inline-flex align-items-center")([rA("")("@"+s.author.username),l(s),Xe(":")]),tA("ml-1")(s.text)])})),W_("")([da(NJ(e.user)(function(s){return s.username}))(function(s){return vD("small text-secondary mt-2")("@"+s)}),QIe("form-control t--question-text")({onChange:KIe(t)(function(s){return qJ.create(Mw(s))}),onClick:YIe(a)(QJ(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),Ia(e.isPrivilegedUser)(sd("form-check my-2")(XIe("form-check-label d-flex align-items-center t--broadcast-checkbox")([ZIe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:vd(t)(WJ.value)}),vD("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Send to all viewers")]))),W_("d-flex justify-content-end align-items-center")([eTe("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. `),o1("mt-2 px-5 btn-sm btn btn-primary t--submit-question")({onClick:vd(t)(oA.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof J_)return qn;if(n.modal instanceof i1)return u(n.modal.value0);if(n.modal instanceof u1)return r(n.modal.value0);if(n.modal instanceof l1)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 139, column 5 - line 143, column 41): "+[n.modal.constructor.name])}()])}}},iTe=function(e){return function(n){return nTe(aTe(e.user)(function(a){return a.cvid}))(new S(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},YJ=function(e){return function(n){return function(a){if(a instanceof En)return Fr(n);if(a instanceof xe){if(a.value0 instanceof qJ){var t=QJ(e);if(t instanceof S)return qs(cd(r1(t.value0)))(function(){return Fr(n)});if(t instanceof M)return Fr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 243, column 5 - line 248, column 46): "+[t.constructor.name])}if(a.value0 instanceof WJ)return Fr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof oA)return qs(cd(r1(new xe(iA.value))))(function(){return Fr(n)});if(a.value0 instanceof uA)return Fr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:jJ(function(l){return BM(function(s){return s.time}(l))})(fu(iTe(e))($o(a.value0.value0)(fu(function(){var l=tTe(a.value0.value0.id);return function(s){return l(function(h){return h.id}(s))}}())(n.questions))))});if(a.value0 instanceof JJ)return qs(cd(OJ(function(l){return xe.create($J.create(l))})(Rb(e.conference.id))))(function(){return Fr(n)});if(a.value0 instanceof $J){var u=xJ(a.value0.value0)(function(l){return l.id});return Fr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:jJ(function(l){return BM(function(s){return s.time}(l))})(rTe(a.value0.value0)(fu(function(l){return oTe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof iA)return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new i1(id)});var i=function(l){if(a.value0 instanceof c1)return Fr(n);if(a.value0 instanceof zJ)return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new l1(qW(ze("")(NJ(e.user)(function(h){return h.username}))))});if(a.value0 instanceof fd&&a.value0.value0 instanceof En&&a.value0.value0.value0 instanceof UM)return qs(cd(r1(new En(a.value0.value0.value0.value0))))(function(){return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:J_.value})});if(a.value0 instanceof fd&&a.value0.value0 instanceof En&&a.value0.value0.value0 instanceof kM)return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:J_.value});var s=function(h){if(a.value0 instanceof fd&&$e)return Fr(n);if(a.value0 instanceof fD)return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:J_.value});if(a.value0 instanceof s1){if(e.isPrivilegedUser){if(a.value0.value0 instanceof kJ)return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new u1(a.value0.value0.value0)});var p=function(y){var E=function(b){return Fr(n)};return a.value0.value0 instanceof HJ&&n.modal instanceof u1?qs(Qa(DU({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:J_.value})}):E(!0)};return a.value0.value0 instanceof BJ&&n.modal instanceof u1?qs(Qa(cU({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Fr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:J_.value})}):p(!0)}if($e)return Fr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 239, column 1 - line 239, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof fd&&n.modal instanceof l1?UJ(function(h){return xe.create(fd.create(h))})(function(h){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new l1(h)}})(HW(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof c1&&n.modal instanceof i1?UJ(function(l){return xe.create(c1.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new i1(l)}})(ud(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof oA&&e.user instanceof S?qs(cd(OJ(function(r){return xe.create(uA.create(r))})(sU({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Fr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 239, column 1 - line 239, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var v1,lTe=new Uint8Array(16);function lA(){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(lTe)}var XJ=/^(?:[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 cTe(e){return typeof e=="string"&&XJ.test(e)}var cA=cTe;var Oo=[];for(f1=0;f1<256;++f1)Oo.push((f1+256).toString(16).substr(1));var f1;function sTe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(Oo[e[n+0]]+Oo[e[n+1]]+Oo[e[n+2]]+Oo[e[n+3]]+"-"+Oo[e[n+4]]+Oo[e[n+5]]+"-"+Oo[e[n+6]]+Oo[e[n+7]]+"-"+Oo[e[n+8]]+Oo[e[n+9]]+"-"+Oo[e[n+10]]+Oo[e[n+11]]+Oo[e[n+12]]+Oo[e[n+13]]+Oo[e[n+14]]+Oo[e[n+15]]).toLowerCase();if(!cA(a))throw TypeError("Stringified UUID is invalid");return a}var ZJ=sTe;function vTe(e,n,a){e=e||{};var t=e.random||(e.rng||lA)();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 ZJ(t)}var sA=vTe;var e$=sA;var fTe=function(e){return e},vA=function(e){return e};var fA=ne(Qt)(e$)(function(){var e=W(vt);return function(n){return e(fTe(n))}}());var _d=Ma(Ne),n$=un(en),_Te=n$(ca),pTe=on(AR),dTe=U(Ga),_D=yn(Ne),mTe=Ka(Z),hTe=Su()(),a$=Lt(Ve)()(),t$=zd(ei),DTe=So(or),gTe=$n(Ru),RTe=re(kx),r$=re(yf),yTe=U(Ye),kc=n$(zn),bTe=ri(Ne),wTe=Fi(Sa()(B({reflectSymbol:function(){return"authorTag"}})(de)(B({reflectSymbol:function(){return"kind"}})(de)(ln))))(Ne),_1=U(Hn),af=W(Rn),o$=ot(Q0),u$=$d(ei),ETe=W(Xn),_A=hc(z0),ITe=Ce(De),TTe=pe(Ye),STe=sa(De)()(),CTe=aa(ga),FTe=Pa(Z),p1=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}(),pD=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}(),i$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dA=function(e){return _d(_Te(er(pTe(e)(10)))(function(){return dTe(pA.create)(_D(oi))}))},l$=50,c$=function(e){var n=function(r){return mTe("text-white fe fe-"+r)("")},a=function(){if(e instanceof Gs)return n("heart");if(e instanceof Hv)return n("thumbs-up");if(e instanceof d_)return n("thumbs-down");if(e instanceof qv)return n("file-text");if(e instanceof Wv)return hTe("")({src:"/img/icons/smile-white.svg",style:et({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 Gs)return"#F0747B";if(e instanceof Hv)return"#008CFD";if(e instanceof d_)return"#6E84A3";if(e instanceof qv)return"#18A668";if(e instanceof Wv)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 159, column 23 - line 164, column 34): "+[e.constructor.name])}();return a$("d-flex justify-content-center align-items-center rounded-circle")({style:et({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},s$=6,v$=function(){return s$*1e3}(),f$=function(e){return function(n){var a=function(t){if(t$(t.removeAt)(e.currentTime))return qn;var r=Gt(DTe(gTe(el(WT(t.startDecayAt))))(10)),u=function(){var p=r<=3;if(p)return"linear";var y=r<=7;return y?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=t$(t.startDecayAt)(e.currentTime),h=s$+(r-5)/10;return a$("position-absolute mb-4 mt-2")({key:RTe(t.startDecayAt),style:et({right:r$(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:r$(h)+"s",transitionTimingFunction:u})})(c$(t.reaction.kind))};return Ge(yTe(a)(e.reactions))}},_$=function(e){return kc(bTe(function(n){return new pD(ZO(n),M.value)})(wTe(e.pusher.dataChannel)("reaction")))(function(){return kc(_d(_D(_1(function(n){return i$.create(vA(n))})(fA))))(function(){return kc(_d(_D(_1(pA.create)(oi))))(function(){return af({authorTag:"",currentTime:o$,coolDownUntil:o$,reactions:[]})})})})},p$=800,d$=function(e){return function(n){return function(a){if(a instanceof p1&&a.value1 instanceof M)return kc(_d(_D(_1(function(){var t=p1.create(a.value0);return function(r){return t(S.create(r))}}())(oi))))(function(){return af(n)});if(a instanceof p1&&a.value1 instanceof S){if(u$(n.coolDownUntil)(a.value1.value0))return kc(_d(ETe(new pD({kind:a.value0,authorTag:n.authorTag},new S(a.value1.value0)))))(function(){return af(n)});if($e)return kc(Qa(dU(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return kc(dA(p$))(function(){return af({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:ze(a.value1.value0)(_A(p$)(a.value1.value0))})})})}if(a instanceof pD&&a.value1 instanceof M)return kc(_d(_D(_1(function(){var t=pD.create(a.value0);return function(r){return t(S.create(r))}}())(oi))))(function(){return af(n)});if(a instanceof pD&&a.value1 instanceof S)return kc(dA(l$))(function(){return kc(dA(v$))(function(){var t={reaction:a.value0,startDecayAt:ze(a.value1.value0)(_A(l$)(a.value1.value0)),removeAt:ze(a.value1.value0)(_A(v$)(a.value1.value0))};return af({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:A0(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof i$)return af({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof pA)return af({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:fu(function(t){return u$(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])}}},m$=function(e){return function(n){var a=function(t){if(t instanceof Gs)return"love this";if(t instanceof Hv)return"helpful";if(t instanceof d_)return"not helpful";if(t instanceof qv)return"taking notes";if(t instanceof Wv)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 138, column 13 - line 143, column 30): "+[t.constructor.name])};return ITe("d-flex justify-content-end my-2")(TTe([Gs.value,Wv.value,Hv.value,qv.value])(function(t){return STe("btn bg-light d-flex align-items-center p-0 ml-3")({onClick:CTe(n)(new p1(t,M.value)),style:et({borderRadius:"1em"})})([c$(t),FTe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var h$=un(en),GTe=ne(ca),mA=yn(Ne),d1=W(Xn),m1=Ut(Z),h1=re(an),dD=h$(zn),mD=Ma(Ne),gl=W(Rn),D$=Ot(Ur),g$=co(Pm),R$=U(Ga),MTe=qo(Rn)(Ou),ATe=ni(ss),y$=Ce(Z),LTe=Vl(),PTe=At(Z),b$=sa(Z)()(),hA=aa(ga),w$=Ce(Ve),xTe=sa(De)()(),NTe=Ka(Z),jTe=Ce(De),E$=function(){function e(){}return e.value=new e,e}(),I$=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}(),S$=function(){function e(){}return e.value=new e,e}(),C$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),F$=function(){function e(){}return e.value=new e,e}(),G$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),M$=function(){function e(){}return e.value=new e,e}(),A$=function(){function e(){}return e.value=new e,e}(),gA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),D1=function(){function e(){}return e.value=new e,e}(),L$=h$(ca)(er(1e3))(function(){return GTe(mA(oi))(function(e){return d1(new gA(e))})}),OTe=function(e){return{header:"Go on-air?",body:Ge([m1("")("Are you sure you want to go on-air?"),m1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(h1(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:S$.value}},P$=function(e){return function(n){return function(a){return function(t){return dD(mD(L$))(function(){return gl({confirmation:n.confirmation,network:E$.value,streamStatus:t,transition:new S({since:a,secondsLeft:e.videoLagSeconds})})})}}}},x$=function(e){return function(n){return function(a){if(a instanceof S$)return dD(mD(D$(g$(tU(e.conference.id))(R$(C$.create)(mA(oi))))(function(l){return d1(new RA("Error opening the stream. Please try again."))})))(function(){return gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:I$.value})});if(a instanceof C$)return P$(e)(n)(a.value0)(zr.value);if(a instanceof F$)return dD(mD(D$(g$(rU(e.conference.id))(R$(G$.create)(mA(oi))))(function(l){return d1(new RA("Error closing the stream. Please try again."))})))(function(){return gl(n)});if(a instanceof G$)return P$(e)(n)(a.value0)(Tr.value);if(a instanceof DA)return gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new S(a.value0)});if(a instanceof M$)return dD(MTe(n.confirmation)(function(l){return mD(d1(l.confirmMsg))}))(function(){return gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value})});if(a instanceof A$)return gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value});if(a instanceof RA)return gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new T$(a.value0)});var t=function(l){if(a instanceof gA||a instanceof D1)return gl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 178, column 1 - line 178, column 76): "+[a.constructor.name])};if(a instanceof gA){if(n.transition instanceof S){var r=ATe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-_o(r)|0,i=u>0;return i?dD(mD(L$))(function(){return gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new S({since:n.transition.value0.since,secondsLeft:u})})}):gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:M.value})}return t(!0)}return t(!0)}}},N$=function(e){return gl({streamStatus:e.streamStatus,transition:M.value,network:E$.value,confirmation:M.value})},UTe=function(){return{header:"End the stream?",body:Ge([m1("")("Are you sure you want to end the stream?"),m1("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:F$.value}}(),j$=function(e){return function(n){return function(a){var t=function(){return n.network instanceof I$?y$("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):qn}(),r=function(h){return LTe({header:PTe("my-0")(h.header),bodyClass:"p-5",body:h.body,footerClass:"p-4",footer:Ge([b$("btn btn-primary px-4")({onClick:hA(a)(M$.value)})(h.confirmText),b$("btn btn-outline-primary px-4")({onClick:hA(a)(A$.value)})(h.cancelText)])})},u=function(h){return function(p){return function(y){return function(E){return function(b){return w$("col-auto pr-0")(xTe("btn btn-"+(h+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))({onClick:hA(a)(b)})([NTe("fe mr-2 fe-"+p)(""),Xe(y)]))}}}}},i=function(){if(n.streamStatus instanceof Eu)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new DA(OTe(e)));var h=function(p){if(n.streamStatus instanceof zr)return Ge([u("lg")("radio")("ON AIR")("success")(D1.value),u("sm")("x-circle")("End stream")("outline-danger")(new DA(UTe))]);if(n.streamStatus instanceof Tr)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(D1.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 71, column 1 - line 71, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof zr&&n.transition instanceof S?u("lg")("radio")("ON AIR")("success")(D1.value):h(!0)}(),l=function(h){return y$("alert small m-0 flex-grow-1 alert-"+h)},s=function(){if(n.network instanceof T$)return l("danger")(n.network.value0);if(n.streamStatus instanceof Eu)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var h=function(p){if(n.streamStatus instanceof zr)return l("light")(` We're live. The audience should see your video with a `+(h1(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var y=function(E){if(n.streamStatus instanceof Tr)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 71, column 1 - line 71, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof Tr&&n.transition instanceof S?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(h1(n.transition.value0.secondsLeft)+" seconds.")):y(!0)};return n.streamStatus instanceof zr&&n.transition instanceof S?l("info")("Start presenting now. The audience will see the stream in "+(h1(n.transition.value0.secondsLeft)+" seconds...")):h(!0)}();return jTe("position-relative row align-items-center t--stream-controls")([i,w$("col")(s),t,da(n.confirmation)(r)])}}};var kTe=hc(Dv),O$=ni(Dv),U$=A8(),BTe=Ql(),HTe=At(Z),qTe=Ce(Z),k$=Ut(Z),WTe=sa(Z)()(),JTe=aa(ga),B$=Ma(Ne),H$=un(en),q$=U(Ga),W$=yn(Ne),J$=H$(zn),$Te=vu(We)(tt),yA=W(Rn),bA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wA=function(){function e(){}return e.value=new e,e}(),zTe=[30,15,5,0],$$=function(e){return ze(e.conference.scheduledStartTime)(kTe(Gt(e.conference.duration))(e.conference.scheduledStartTime))},z$=function(e){return function(n){return function(a){if(!n.modal)return qn;if(n.now instanceof M)return qn;if(n.now instanceof S){var t=$$(e),r=O$(t)(n.now.value0),u=function(){if(r<1)return" ended "+U$({from:t,to:n.now.value0,format:Ny("ago")});if($e)return" ends "+U$({from:n.now.value0,to:t,format:Ny("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 68, column 7 - line 70, column 105): "+[])}();return BTe({onDismiss:a(wA.value),body:Ge([HTe("mb-0")("Host-only warning"),qTe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),k$("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),k$("")(` You have `+(sl(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. `)),WTe("btn btn-primary px-4")({onClick:JTe(a)(wA.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])}}},VTe=B$(H$(ca)(er(60100))(function(){return q$(bA.create)(W$(f_))})),V$=function(e){return function(n){return function(a){if(a instanceof bA)return J$(VTe)(function(){var t=O$($$(e))(a.value0),r=$Te(_o(t))(zTe);return yA({now:new S(a.value0),modal:n.modal||r})});if(a instanceof wA)return yA({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 73, column 22 - line 84, column 33): "+[a.constructor.name])}}},Q$=function(){return J$(B$(q$(bA.create)(W$(f_))))(function(){return yA({modal:!1,now:M.value})})}();var K$=un(en),QTe=K$(ca),Y$=W(Xn),KTe=K$(zn),YTe=Ma(Ne),XTe=Ot(Ur),g1=W(Rn),ZTe=Ee(uh),X$=Vo(We),EA=Ce(De),R1=Ka(Z),eSe=sa(Z)()(),Z$=aa(ga),nSe=kt(Z)()(),aSe=sa(Ve)()(),tSe=Vl(),ez=Ce(Ve),rSe=po(Z),oSe=gc(Z)()(),uSe=Pa(Z),nz=function(){function e(){}return e.value=new e,e}(),az=function(){function e(){}return e.value=new e,e}(),IA=function(){function e(){}return e.value=new e,e}(),tz=function(){function e(){}return e.value=new e,e}(),rz=function(){function e(){}return e.value=new e,e}(),oz=function(){function e(){}return e.value=new e,e}(),uz=function(){function e(){}return e.value=new e,e}(),iSe=function(){function e(){}return e.value=new e,e}(),iz=function(e){return function(n){return function(a){var t=QTe(Db({fromConference:new S(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return Y$(new xe(oz.value))});if(a instanceof rz)return KTe(YTe(XTe(t)(function(r){return Y$(new xe(uz.value))})))(function(){return g1({cta:n.cta,stage:az.value})});if(a instanceof oz)return g1({cta:n.cta,stage:tz.value});if(a instanceof uz)return g1({cta:n.cta,stage:IA.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 133, column 24 - line 143, column 44): "+[a.constructor.name])}}},lz=function(e){return function(n){return ZTe(e.cta.conferenceId)(n.conferenceId)}},cz=function(e){return g1({cta:e,stage:nz.value})},lSe=function(){return No(X$([Wl.value,new Dt(", "),Hl.value,new Dt(" "),ql.value,new Dt(" at "),Jl.value,new Dt(":"),Ti.value,new Dt(" "),$l.value]))}(),cSe=function(){return No(X$([Wl.value]))}(),sz=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof IA?EA("text-danger small mt-2")([R1("fe fe-x-circle mr-2")(""),Xe("Something went wrong. Please try again.")]):qn}(),r=function(h){return a(xe.create(h))},u=function(){if(e.user instanceof S)return eSe("btn btn-primary px-4 t--register-one-click")({onClick:Z$(r)(rz.value)})("Register (one-click)");if(e.user instanceof M)return nSe("btn btn-primary px-4 t--register-new-tab")({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 95, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof nz||n.stage instanceof IA)return u;if(n.stage instanceof az)return EA("text-secondary")([R1("fe fe-refresh-cw mr-2")(""),Xe("Hold on tight...")]);if(n.stage instanceof tz)return EA("text-success")([R1("fe fe-check-circle mr-2")(""),Xe("You\u2019ve registered \u2013\xA0see you "+(cSe(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(h){return a(En.create(h))},s=aSe("btn btn-sm btn-outline-primary d-flex py-1 px-2")({onClick:Z$(l)(iSe.value)})(R1("fe fe-x")(""));return tSe({body:Ge([ez("row justify-content-end mt-n3")(s),rSe("")("Join us for our upcoming livestream:"),oSe("mt-3")({id:Ci})(n.cta.title),uSe("small")(lSe(n.cta.startTime)+(" "+v_)),ez("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:ph.value})}}};var sSe=Vl(),y1=Ce(De),vSe=py(Z)()(),b1=Ce(Ve),fSe=sa(Ve)()(),vz=aa(ga),_Se=Ka(Z),pSe=pe(Ye),dSe=ti()(),mSe=Ir(Z),hSe=Ut(Z),DSe=kt(Z)()(),gSe=un(en),RSe=gSe(zn),ySe=Ma(Ne),bSe=yn(Ne),wSe=As(Rr)(),ESe=re(an),fz=W(Rn),ISe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_z=function(){function e(){}return e.value=new e,e}(),pz=function(e){return function(n){var a=function(){var i=so(e.cta.providers);return i===1?Jv.value:i===2?Jv.value:dh.value}(),t=function(i){return n(xe.create(i))},r=function(i){return n(En.create(i))},u=function(){var i=so(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 sSe({bodyClass:"bg-gray-900 text-white t--cta-active",body:Ge([y1("row no-gutters g-0 mb-4")([y1("col text-center")([vSe("mb-2")({id:Ci})("The admissions process is hard - advisors are here to help!"),Xe("Schedule a free consulation to get your questions answered")]),b1("col-auto text-right")(fSe("btn btn-link p-0 m-0 text-white")({onClick:vz(r)(_z.value)})(_Se("fe fe-x")("")))]),y1("row text-center")(pSe(e.cta.providers)(function(i){return y1(u)([b1("row mb-3")(b1("col-auto mx-auto")(b1("avatar avatar-xl")(dSe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),mSe("mb-2")(i.name),hSe("mb-3")(i.location),DSe("btn btn-primary btn-sm px-3 py-1")({target:"_blank",href:i.linkUrl,onClick:vz(t)(new ISe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},dz=function(e){return function(n){return RSe(ySe(bSe(function(){return wSe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:ESe(e.cta.id),livestream_cta_url:n.value0})(),new En(_z.value)})))(function(){return fz(e)})}},mz=function(e){return function(n){return e.cta.id===n.id}},hz=function(e){return fz({cta:e})};var TSe=kt(Z)()(),Dz=aa(ga),SSe=sa(Ve)()(),CSe=Ka(Z),FSe=Vl(),gz=Ce(Ve),GSe=gc(Z)()(),MSe=un(en),ASe=MSe(zn),LSe=Ma(Ne),PSe=yn(Ne),xSe=As(Rr)(),NSe=re(an),Rz=W(Rn),jSe=function(){function e(){}return e.value=new e,e}(),yz=function(){function e(){}return e.value=new e,e}(),bz=function(e){return function(n){var a=function(i){return n(xe.create(i))},t=TSe("btn btn-primary px-4 t--register-new-tab")({href:e.cta.url,target:"_blank",rel:"noopener",onClick:Dz(a)(jSe.value)})(e.cta.buttonText),r=function(i){return n(En.create(i))},u=SSe("btn btn-sm btn-outline-primary d-flex py-1 px-2")({onClick:Dz(r)(yz.value)})(CSe("fe fe-x")(""));return FSe({body:Ge([gz("row justify-content-end mt-n3")(u),GSe("mt-3")({id:Ci})(e.cta.title),gz("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:ph.value})}},wz=function(e){return function(n){return ASe(LSe(PSe(function(){return xSe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:NSe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new En(yz.value)})))(function(){return Rz(e)})}},Ez=function(e){return function(n){return e.cta.id===n.id}},Iz=function(e){return Rz({cta:e})};var TA=un(en),li=TA(rn),ci=br(Wr),pd=W(ra),Tz=Lr(Ho(it)),hD=ma(Kr),Ws=W(Rn),OSe=TA(zn),USe=Ma(Ne),kSe=TA(ca),BSe=W(Xn),SA=Ce(De),HSe=Mv(Z),qSe=$r()(),WSe=aa(ai),JSe=sa(Ve)()(),Sz=aa(ga),$Se=Ka(Z),zSe=Vl(),CA=Ce(Ve),VSe=gc(Z)()(),QSe=Ut(Z),KSe=sa(Z)()(),Cz=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}(),Gz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Az=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Lz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Pz=function(){function e(){}return e.value=new e,e}(),xz=function(){function e(){}return e.value=new e,e}(),Nz=function(e){return function(n){return e.cta.id===n.id}},jz=function(e){return function(n){var a=li(ci(n.cta.requireReferredUserLastName))(function(){return li(ci(n.referredUserLastName===""))(function(){return pd("Please enter the other person\u2019s last name")})}),t=li(ci(n.cta.requireReferredUserFirstName))(function(){return li(ci(n.referredUserFirstName===""))(function(){return pd("Please enter the other person\u2019s first name")})}),r=li(ci(Tz(lD)(n.referredUserEmail)))(function(){return pd("Please enter a valid email address")}),u=li(ci(Ct(e.user)))(function(){return li(ci(n.cta.requireAnonymousUserLastName))(function(){return li(ci(n.anonymousUserLastName===""))(function(){return pd("Please enter your last name")})})}),i=li(ci(Ct(e.user)))(function(){return li(ci(n.cta.requireAnonymousUserFirstName))(function(){return li(ci(n.anonymousUserFirstName===""))(function(){return pd("Please enter your first name")})})}),l=li(ci(Ct(e.user)))(function(){return li(ci(n.cta.requireAnonymousUserEmail))(function(){return li(ci(Tz(lD)(n.anonymousUserEmail)))(function(){return pd("Please enter a valid email address")})})});return hD(i)(hD(u)(hD(l)(hD(t)(hD(a)(r)))))}},Oz=function(e){return function(n){return function(a){if(a instanceof Cz)return Ws({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 Fz)return Ws({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 Gz)return Ws({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 Mz)return Ws({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 Az)return Ws({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 Lz)return Ws({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 Pz){var t=Ct(jz(e)(n));return t?OSe(USe(kSe(oU({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return BSe(new En(xz.value))})))(function(){return Ws(n)}):Ws({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 141, column 24 - line 170, column 45): "+[a.constructor.name])}}},Uz=function(e){return function(n){return function(a){var t=jz(e)(n),r=function(E){return function(b){return function(T){return function(L){return function(O){return SA(E)([HSe("mb-2")(T),qSe("form-control "+b)({type:"text",value:L,onChange:WSe(a)(function($){return xe.create(O(Os($)))})})])}}}}},u=Ia(Ct(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(Gz.create)),i=Ia(Ct(e.user))(Ge([Ia(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(Cz.create)),Ia(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(Fz.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(Lz.create),s=Ge([Ia(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(Mz.create)),Ia(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(Az.create))]),h=function(E){return a(xe.create(E))},p=function(E){return a(En.create(E))},y=JSe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")({onClick:Sz(p)(xz.value)})($Se("fe fe-x")(""));return zSe({body:Ge([CA("row justify-content-end mt-n3")(y),VSe("mt-3")({id:Ci})(n.cta.title),da(n.cta.description)(QSe("")),SA("row")([i,u,s,l]),SA("row")([CA("col-auto my-auto")(KSe("btn btn-primary t--save")({onClick:Sz(h)(Pz.value)})("Save")),CA("col my-auto text-danger")(Ia(n.validationActive)(da(t)(Xe)))])]),bodyClass:"t--cta-active",size:Jv.value})}}},kz=function(e){return Ws({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var YSe=Ma(Ne),XSe=W(Xn),tf=lt(wr(Ga)),w1=un(en)(zn),DD=W(Rn),gD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),E1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),I1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),T1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),S1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ZSe=function(){function e(){}return e.value=new e,e}(),Bz=function(e){return function(n){return function(a){var t=function(r){return a(xe.create(r))};if(n instanceof gD)return sz(e)(n.value0)(function(r){return t(E1.create(r))});if(n instanceof RD)return pz(n.value0)(function(r){return t(I1.create(r))});if(n instanceof yD)return bz(n.value0)(function(r){return t(T1.create(r))});if(n instanceof bD)return Uz(e)(n.value0)(function(r){return t(S1.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},Hz=function(e){return function(n){return function(a){var t=YSe(XSe(new En(ZSe.value)));if(n instanceof gD&&a instanceof E1){if(a.value0 instanceof xe)return tf(function(r){return xe.create(E1.create(r))})(gD.create)(iz(e)(n.value0)(a.value0.value0));if(a.value0 instanceof En)return w1(t)(function(){return DD(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 RD&&a instanceof I1){if(a.value0 instanceof xe)return tf(function(r){return xe.create(I1.create(r))})(RD.create)(dz(n.value0)(a.value0.value0));if(a.value0 instanceof En)return w1(t)(function(){return DD(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 yD&&a instanceof T1){if(a.value0 instanceof xe)return tf(function(r){return xe.create(T1.create(r))})(yD.create)(wz(n.value0)(a.value0.value0));if(a.value0 instanceof En)return w1(t)(function(){return DD(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 bD&&a instanceof S1){if(a.value0 instanceof xe)return tf(function(r){return xe.create(S1.create(r))})(bD.create)(Oz(e)(n.value0)(a.value0.value0));if(a.value0 instanceof En)return w1(t)(function(){return DD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return DD(n)}}},qz=function(e){return function(n){return e instanceof gD&&n instanceof vl?lz(e.value0)(n.value0):e instanceof yD&&n instanceof fl?Ez(e.value0)(n.value0):e instanceof RD&&n instanceof _l?mz(e.value0)(n.value0):e instanceof bD&&n instanceof pl?Nz(e.value0)(n.value0):!1}},Wz=function(e){if(e instanceof vl)return tf(function(n){return xe.create(E1.create(n))})(gD.create)(cz(e.value0));if(e instanceof _l)return tf(function(n){return xe.create(I1.create(n))})(RD.create)(hz(e.value0));if(e instanceof fl)return tf(function(n){return xe.create(T1.create(n))})(yD.create)(Iz(e.value0));if(e instanceof pl)return tf(function(n){return xe.create(S1.create(n))})(bD.create)(kz(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var Jz=At(Z),C1=Ce(De),eCe=po(Z),nCe=gc(Z)()(),$z=ic(sv),aCe=Mv(De),tCe=$r()(),FA=vu(We)(tt),GA=aa(ga),zz=sa(Z)()(),rCe=Ap(Ve),oCe=yn(Ne),uCe=Ms(Rr),iCe=Wu(),lCe=re(an),$_=W(Rn),cCe=Lf(tt),z_=un(en)(zn),sCe=Ot(Ur),MA=W(Xn),vCe=qo(Xn)(We),fCe=cr(Xn),Vz=Ma(Ne),_Ce=lt(wr(Ga)),dd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LA=function(){function e(){}return e.value=new e,e}(),Qz=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}(),Kz=function(e){return function(n){return function(a){var t=Ge([Jz("text-center")("The host just asked a poll question!"),Jz("text-center")("To participate in live polls, please introduce yourself:"),od({cancelButton:new S({text:"Not now",click:a(new dd({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(PA.create(i))}),C1("small mt-3")([ld(e),C1("mt-2")([Xe("After submitting, you\u2019ll be able to answer all "),eCe("")("future"),Xe(" poll questions in this stream!")])])]),r=Ge([nCe("font-weight-bold fw-bold")({id:Ci})(n.poll.question),C1("d-flex flex-column ml-4")($z(function(i){return function(l){return aCe("form-check-label mb-2")([tCe("form-check-input mt-2 t--option")({checked:FA(i)(n.selected),onChange:GA(a)(new AA(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Xe(l)])}})(n.poll.options)),C1("d-flex justify-content-start mt-6")([zz("btn btn-primary px-4 mr-3 t--submit")({onClick:GA(a)(LA.value),disabled:mi(n.selected)})("Submit answer"),zz("btn btn-outline-primary px-4 d-flex align-items-center t--skip")({onClick:GA(a)(Qz.value)})("Do it later")])]),u=function(){if(e.user instanceof S)return"t--poll-active";if(e.user instanceof M)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 56, column 18 - line 58, column 45): "+[e.user.constructor.name])}();return rCe(u)(function(){if(e.user instanceof S)return r;if(e.user instanceof M)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 52, column 5 - line 54, column 34): "+[e.user.constructor.name])}())}}},Yz=function(e){return function(n){return function(a){var t=function(r){return oCe(uCe("Livestream: Poll Response")(cs(Bv(e.conference))(iCe({livestream_poll_id:lCe(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 dd)return $_(n);if(a instanceof AA&&n.poll.multiSelect)return $_({poll:n.poll,registration:n.registration,selected:function(){var r=FA(a.value0)(n.selected);return r?cCe(a.value0)(n.selected):$o(a.value0)(n.selected)}()});if(a instanceof AA)return $_({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof LA&&mi(n.selected))return $_(n);if(a instanceof LA)return z_(Qa(sCe(sF(n.poll)(n.selected))(function(r){return kl(bc)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return MA(ye)})})))(function(){return z_(Qa(vCe($z(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return fCe(FA(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return z_(Vz(MA(new dd({keepShowingPolls:!0}))))(function(){return $_(n)})})});if(a instanceof Qz)return z_(Qa(sF(n.poll)([])))(function(){return z_(Qa(t({skipped:!0,option:""})))(function(){return z_(Vz(MA(new dd({keepShowingPolls:!0}))))(function(){return $_(n)})})});if(a instanceof PA)return _Ce(PA.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(ud(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 108, column 24 - line 155, column 55): "+[a.constructor.name])}}},Xz=function(e){return z_(Qa(uU(e)))(function(){return $_({poll:e,selected:[],registration:id})})};var Zz=un(en),pCe=Zz(ca),dCe=ne(ca),eV=yn(Ne),mCe=qo(Xn)(Ou),hCe=Ms(Rr),nV=Wu(),DCe=re(D0),gCe=re(ui),F1=re(an),Rl=W(Rn),aV=wr(Ga),tV=lt(aV),rV=ne(zn),oV=_r(aV),rf=Zz(zn),RCe=Ee(tt),of=W(ra),wD=dy(Ne),ED=U(oe),yCe=U(Pu),ID=lv(We),xA=Sa(),uV=Fi(xA(B({reflectSymbol:function(){return"poll_id"}})(cn)(ln)))(Ne),bCe=ri(Ne),wCe=Ee(Vt(uh)),ECe=Fi(xA(B({reflectSymbol:function(){return"conference_id"}})(cn)(ln)))(Ne),NA=Ee(Vt(tt)),jA=Fi(xA(B({reflectSymbol:function(){return"id"}})(cn)(ln)))(Ne),TD=function(){function e(){}return e.value=new e,e}(),md=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),SD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),G1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),M1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OA=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}(),iV=function(e){return function(n){return function(a){if(n.stage instanceof TD)return qn;if(n.stage instanceof md)return Kz(e)(n.stage.value0)(function(t){return a(hd.create(t))});if(n.stage instanceof SD)return Bz(e)(n.stage.value0)(function(t){return a(G1.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},ICe=function(e){return function(n){return e instanceof SD?qz(e.value0)(n):!1}},TCe=function(){return function(e){return function(n){return function(a){return pCe(er(100))(function(){return dCe(eV(By(Ci)))(function(t){return mCe(t)(function(r){return eV(function(){var i=JF(hC(r))(),l=Z8({x:i.left+1,y:i.top+1})(),s=qF(hC(l))();return hCe(n)(cs(nV(a))(cs(Bv(e.conference))(nV({livestream_popup_visible:DCe(s===Ci)}))))()})})})})}}}},lV=TCe(),SCe=function(e){var n=function(){return lV(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof vl)return a({livestream_cta_target_conference_id:gCe(t.value0.conferenceId)});if(t instanceof _l)return a({livestream_cta_id:F1(t.value0.id)});if(t instanceof fl)return a({livestream_cta_id:F1(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof pl)return a({livestream_cta_id:F1(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])}},cV=function(e){return function(n){return function(a){if(a instanceof hd&&a.value0 instanceof dd)return Rl({stage:TD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof hd)return Rl(n);if(a instanceof G1){if(a.value0 instanceof En)return Rl({showPolls:n.showPolls,stage:TD.value});var u=function(s){return Rl(n)};return a.value0 instanceof xe&&n.stage instanceof SD?tV(G1.create)(function(s){return{showPolls:n.showPolls,stage:new SD(s)}})(Hz(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof M1&&n.showPolls)return rV(oV(hd.create)(Xz(a.value0)))(function(p){return rf(Qa(lV(e)("Livestream: Poll Popup Shown")({livestream_poll_id:F1(a.value0.id)})))(function(){return Rl({showPolls:n.showPolls,stage:new md(p)})})});if(a instanceof M1)return Rl(n);var s=function(p){if(a instanceof OA||a instanceof Dd&&ICe(n.stage)(a.value0))return Rl(n);if(a instanceof Dd)return rf(Qa(SCe(e)(a.value0)))(function(){return rV(oV(G1.create)(Wz(a.value0)))(function(y){return Rl({showPolls:n.showPolls,stage:new SD(y)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof OA){if(n.stage instanceof md){var h=n.stage.value0.poll.id===a.value0.pollId;return h?Rl({showPolls:n.showPolls,stage:TD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof M1){if(n.stage instanceof md){var i=n.stage.value0.poll.id===a.value0.id;return i?Rl(n):u(!0)}return u(!0)}return u(!0)};return a instanceof hd&&n.stage instanceof md?tV(hd.create)(function(r){return{showPolls:n.showPolls,stage:new md(r)}})(Yz(e)(n.stage.value0)(a.value0)):t(!0)}}},sV=function(e){var n=function(u){return u instanceof pl?of(u.value0.id):M.value},a=function(u){return u instanceof _l?of(u.value0.id):M.value},t=function(u){return u instanceof fl?of(u.value0.id):M.value},r=function(u){return u instanceof vl?of(u.value0.conferenceId):M.value};return rf(wD(function(u){return ED(yCe(M1.create)(function(i){return i.poll}))(ID(function(){var i=RCe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(uV(e.pusher.dataChannel)("show-poll")))(function(){return rf(bCe(function(u){return new OA({pollId:u.poll_id})})(uV(e.pusher.dataChannel)("hide-poll")))(function(){return rf(wD(function(u){return ED(Dd.create)(ID(function(){var i=wCe(of(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(ECe(e.pusher.dataChannel)("show-event-cta")))(function(){return rf(wD(function(u){return ED(Dd.create)(ID(function(){var i=NA(of(u.id));return function(l){return i(t(l))}}())(e.ctas))})(jA(e.pusher.dataChannel)("show-general-cta")))(function(){return rf(wD(function(u){return ED(Dd.create)(ID(function(){var i=NA(of(u.id));return function(l){return i(a(l))}}())(e.ctas))})(jA(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return rf(wD(function(u){return ED(Dd.create)(ID(function(){var i=NA(of(u.id));return function(l){return i(n(l))}}())(e.ctas))})(jA(e.pusher.dataChannel)("show-referral-cta")))(function(){return Rl({stage:TD.value,showPolls:!0})})})})})})})};var CCe=Ql(),UA=Ce(De),FCe=At(Ve),GCe=Pa(De),MCe=Ka(Z),vV=Su()(),fV=At(Z),ACe=Ut(Z),A1=sa(Z)()(),LCe=Jr(bu),PCe=un(en),kA=aa(ga),_V=PCe(zn),xCe=Fq(),BA=W(Rn),pV=ne(rn),NCe=tv(Ix),jCe=ni(NT),OCe=Ee(Jy),UCe=Ee(ev),kCe=Nl()(),dV=function(){function e(){}return e.value=new e,e}(),HA=function(){function e(){}return e.value=new e,e}(),mV=function(){function e(){}return e.value=new e,e}(),qA=function(){function e(){}return e.value=new e,e}(),WA=function(){function e(){}return e.value=new e,e}(),L1=function(e){return function(n){return CCe({onDismiss:n(new En(WA.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof dV)return UA("text-center")([Ia(e.confirmConferenceRegistration)(FCe("mb-4")(GCe("badge badge-soft-primary bg-primary-soft")([MCe("fe fe-check mr-1")(""),Xe("You\u2019re registered!")]))),vV("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),fV("")("Connect with colleges when you attend or register for their livestreams?"),ACe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),UA("mx-md-6 mt-4")([A1("btn btn-primary w-100 t--livestream-opt-into-auto-connect")({onClick:LCe(function(){return n(new xe(mV.value))(),n(new xe(qA.value))()})})("Yes, always connect"),A1("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")({onClick:kA(n)(new xe(qA.value))})("Only connect with "+e.school.name),A1("btn btn-link mt-3")({onClick:kA(n)(new En(WA.value))})("Close")])]);if(e.modalView instanceof HA)return UA("text-center")([vV("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),fV("")("Connection request sent!"),A1("mt-4 btn btn-primary t--livestream-network-settings-modal-close")({onClick:kA(n)(new En(WA.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 74, column 13 - line 105, column 12): "+[e.modalView.constructor.name])}()})}},P1=function(e){return function(n){if(n instanceof xe){if(n.value0 instanceof mV)return _V(Qa(xCe({publishScope:Si.value,publishContext:dM.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return BA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:HA.value})});if(n.value0 instanceof qA)return _V(Qa(Z6(e.school.id)(e.conference.id)))(function(){return BA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:HA.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 En)return BA(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 1 - line 51, column 55): "+[e.constructor.name,n.constructor.name])}},x1=function(e){return function(n){var a=ze(!1)(pV(e.dismissedNetworkSettingsModalAt)(function(r){return new S(NCe(jCe(GC(ye))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,OCe(r.publishScope)(Si.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return ze(!1)(pV(e.profile)(function(r){return new S(mT(UCe(!0))(t(r)))}))}},N1=function(e){return kCe(e)({modalView:dV.value})};var CD=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}(),FD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),j1=function(){function e(){}return e.value=new e,e}();var hV=un(en),DV=hV(zn),JA=Ma(Ne),BCe=hV(ca),$A=W(Xn),O1=W(Rn),gV=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof CD&&t instanceof FD?DV(JA(BCe(er(a.delay))(function(){return $A(e(j1.value))})))(function(){return O1(n({delay:a.delay,throttleState:new gd(t.value0)}))}):a.throttleState instanceof gd&&t instanceof FD?O1(n({delay:a.delay,throttleState:new gd(t.value0)})):a.throttleState instanceof gd&&t instanceof j1?DV(JA($A(a.throttleState.value0)))(function(){return O1(n({delay:a.delay,throttleState:CD.value}))}):O1(n(a))}}}},RV=function(e){return function(n){return JA($A(e(new FD(n))))}},yV=function(e){return{throttleState:CD.value,delay:e}};var U1=Ce(Z),k1=Ce(De),HCe=At(Z),Js=re(an),qCe=vo(or),bV=Ce(Ve),WCe=Lt(Z)()(),JCe=po(Z),$Ce=Pa(Z),zCe=hs(Ve),VCe=cy(De)()(),wV=Ds(na),B1=sa(Z)()(),zA=aa(ga),EV=vu(We)(tt),IV=hs(De),H1=jl(Z),QCe=jl(Ve),KCe=jl(De),YCe=Gv(De),XCe=Sv(De),Rd=Cv(Z),ZCe=Fv(De),q1=pe(Ye),eFe=Jo(na),GD=un(en)(zn),VA=Ma(Ne),nFe=Ot(Ur),TV=W(Xn),uf=W(Rn),QA=U(Ga),aFe=Ee(FO),SV=ul(na)(We),tFe=on(yt),rFe=Zg(na),oFe=Lf(tt),uFe=ri(Ne),iFe=hb(Ne),W1=function(){function e(){}return e.value=new e,e}(),FV=function(){function e(){}return e.value=new e,e}(),GV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AV=function(){function e(){}return e.value=new e,e}(),LV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PV=function(){function e(){}return e.value=new e,e}(),YA=function(){function e(){}return e.value=new e,e}(),xV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NV=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return qn;var t=function(){if(n.stage instanceof W1)return qn;if(n.stage instanceof FV)return U1("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 177, column 24 - line 182, column 25): "+[n.stage.constructor.name])}(),r=k1("d-flex flex-nowrap align-items-baseline")([HCe("")("Polls"),U1("text-muted ml-3 small")("Polls will be shown to viewers "+(Js(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(h){return function(p){var y=function(E){return function(b){var T=function(){if(h===0)return"0%";if($e)return Js(qCe(100*b|0)(h))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 173, column 13 - line 175, column 69): "+[])}();return k1("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([U1("col-7 d-flex justify-content-end")(E),bV("col-4")(bV("progress")(WCe("progress-bar")({style:et({width:T})})(""))),k1("col-1")([JCe("")(Js(b)),$Ce("text-secondary text-nowrap")(" ("+(T+")"))])])}};return zCe("t--poll-responses-"+Js(s.id))(VCe("py-0")({colSpan:6})(vT(y)(s.options)(p.optionCounts)))}}},i=function(s){var h=ze(s.status)(wV(s.poll.id)(n.statuses)),p=B1("btn btn-white btn-sm px-4 t--open")({onClick:zA(a)(new GV(s.poll))})("Launch poll");if(h instanceof Cs)return p;if(h instanceof Cc)return Ge([B1("btn btn-success btn-sm px-4 mr-3")({disabled:!0})("Poll LIVE"),B1("btn btn-danger btn-sm px-4 t--close")({onClick:zA(a)(new MV(s.poll))})("Close poll")]);if(h instanceof Fs)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 147, column 21): "+[h.constructor.name])},l=function(s){var h=EV(s.poll.id)(n.expandedResponses),p=wV(s.poll.id)(n.responses),y=wn(0)(function(T){return T.answered})(p),E=wn(0)(function(T){return T.seen})(p),b=wn(0)(function(T){return T.skipped})(p);return Ge([IV("t--poll t--poll-"+Js(s.poll.id))([H1("pt-3")(function(){var T=jt(s.poll.autoDisplayMinutesFromStart);return T?"\u23F0 ":""}()+s.poll.question),QCe("text-nowrap")(i(s)),H1("t--shown")(Js(E)),KCe("t--answers")([Xe(Js(y)),B1("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return h?"up":"down t--expand-responses"}()))({onClick:zA(a)(new LV(s.poll.id))})("")]),H1("t--skipped")(Js(b)),H1("t--pending")(Js((E-y|0)-b|0))]),Ia(h)(da(p)(u(s.poll)(y)))])};return Ge([r,k1("t--polls position-relative")([da(n.error)(function(s){return U1("alert alert-danger")(s)}),YCe("table table-sm mb-0")([XCe("")([IV("")([Rd("")("Question"),Rd("")("Actions"),Rd("")("# saw poll"),Rd("")("# answered"),Rd("")("# skipped"),Rd("")("# not responded")])]),ZCe("")(q1(eFe(function(s){return-function(h){return h.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},jV=function(e){return function(n){var a=function(t){return GD(VA(nFe(t)(function(r){return TV(AV.value)})))(function(){return uf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:FV.value,error:M.value})})};return function(t){if(t instanceof GV)return a(QA(KA.create)(cF(t.value0)(Cc.value)));if(t instanceof MV)return a(QA(KA.create)(cF(t.value0)(Fs.value)));if(t instanceof KA){var r=q1(fu(function(){var u=aFe(Cc.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return uf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:SV(q1(t.value0)(function(u){return new Dn(u.pollId,u.status)})),expandedResponses:tFe(n.expandedResponses)(rFe(r)),stage:W1.value})}if(t instanceof AV)return uf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:W1.value,error:new S("That didn't work for some reason, try again")});if(t instanceof LV)return uf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=EV(t.value0)(n.expandedResponses);return u?oFe(t.value0)(n.expandedResponses):$o(t.value0)(n.expandedResponses)}()});if(t instanceof PV)return GD(RV(XA.create)(YA.value))(function(){return uf(n)});if(t instanceof YA)return GD(VA(QA(xV.create)(mU(e.conference.id))))(function(){return uf(n)});if(t instanceof xV)return uf({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:SV(q1(t.value0)(function(u){return new Dn(u.pollId,u.responses)}))});if(t instanceof XA)return gV(XA.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 194, column 22 - line 240, column 98): "+[t.constructor.name])}}},OV=function(e){return GD(uFe(hn(PV.value))(iFe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return GD(VA(TV(YA.value)))(function(){return uf({statuses:gs,responses:gs,expandedResponses:[],responseThrottle:yV(500),stage:W1.value,error:M.value})})})};var UV=Su()(),kV=Ce(De),BV=At(Z),HV=Ir(Z),qV=UV("img-fluid mb-6")({src:"/img/logo-white.svg",style:et({width:"5em"})}),J1=function(e){return kV(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},MD=function(e){return J1("")([BV("text-center")(e)])},ZA=J1("t--splashscreen-intro")([Ce(Ve)("text-center mt-7")(HV("")("The recording will load in a moment.")),qV]),$1=J1("px-4 px-md-6 t--splashscreen-intro")([UV("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),WV=J1("t--splashscreen-complete")([kV("text-center mt-7")([HV("")("The event is now over."),BV("")("Thank you for attending!"),Ko(Z)("")("A recording will be available to watch shortly.")]),qV]);var z1=e=>e.play();var lf=uu(JV());qa();var $V=e=>{let[n,a]=Ha.useState(),[t,r]=Ha.useState(),u=Ha.useRef();return u.current=e,Mt(()=>{if(!t)return lf.default.isSupported()?a(lFe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},lFe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new lf.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(lf.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case lf.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(lf.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(lf.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(lf.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 cFe=Ev();var zV=function(){return function(){return cFe($V)}};qa();var Yl={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var xD=uu(eQ()),nQ=4,kFe=({trackColor:e,background:n})=>({props:a,children:t})=>Ha.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${nQ}px`,borderRadius:`${nQ*2}px`,background:n||e})}),...t),BFe=({horizontal:e})=>({props:n,isDragged:a})=>Ha.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Ha.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?Yl.SECONDARY:Yl.WHITE,stroke:Yl.SECONDARY}),Ha.createElement("path",{stroke:a?Yl.WHITE:Yl.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Ha.createElement("path",{stroke:a?Yl.WHITE:Yl.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),aQ=e=>Ha.createElement("div",{"aria-label":e.ariaLabel},Ha.createElement(xD.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:kFe({trackColor:e.trackColor||Yl.GRAY_300,background:e.fillBefore?(0,xD.getTrackBackground)({values:[e.value],colors:[Yl.PRIMARY,Yl.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:BFe({horizontal:!0})}));var HFe=Ev(),tQ={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return dv}};var rQ=function(e){return function(){return function(){return HFe(aQ)}}};var qFe=Lt(Ve)()(),WFe=rQ(tQ)()(),JFe=aa(ai),$Fe=sa(Ve)()(),zFe=aa(ga),oQ=Ce(De),VFe=Pa(Z),Y1=Ma(Ne),tL=W(Xn),uQ=un(en),QFe=ot(Q0),Bc=W(Rn),KFe=op(Ne),rL=yn(Ne),YFe=U(oe),XFe=hc(z0),ZFe=uQ(ca),cf=uQ(zn),eGe=cr(Rn),nGe=ne(ca),aGe=ac(ei),tGe=cr(vt),oL=function(){function e(){}return e.value=new e,e}(),uL=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}(),iQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cQ=function(){function e(){}return e.value=new e,e}(),rGe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sQ=function(e){return function(n){if(e.videoState instanceof M)return qn;if(e.videoState instanceof S){var a=qFe("")({style:et({minWidth:"6rem",width:"6rem"})})(WFe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:JFe(n)(function(i){return xe.create(uL.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if($e)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=$Fe("btn large px-3 py-1 mr-3 text-white fe "+t)({onClick:zFe(n)(new xe(oL.value))})(qn),u=oQ("d-flex align-items-center text-white px-3")([Xe("LIVE"),VFe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return oQ("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([Ia(e.config.liveIndicator)(u),Ia(e.config.mute)(r),Ia(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 96, column 1 - line 96, column 50): "+[e.constructor.name,n.constructor.name])}},vQ=function(e){return xe.create(iL.create(e))},fQ=function(e){return Y1(tL(new En(new rGe(function(n){return function(){return e(n)(),new xe(new iL(n))}}))))},X1=function(){return new xe(new lL(!0))}(),_Q=function(e){return{config:e,videoState:M.value,visible:!1,visibilityExpiration:QFe}},pQ=2e3,dQ=function(e){return function(n){if(n instanceof En)return Bc(e);if(n instanceof xe){var a=KFe(rL(function(){var i=oi();return YFe(function(l){return xe.create(lQ.create(l))})(XFe(pQ)(i))})),t=ZFe(er(pQ))(function(){return tL(new xe(cQ.value))}),r=function(u){if(n.value0 instanceof oL)return Bc(e);var i=function(l){if(n.value0 instanceof uL)return Bc(e);if(n.value0 instanceof iL)return cf(Y1(rL(function(){var h=yC(n.value0.value0)(),p=gC(n.value0.value0)();return new xe(new iQ({muted:h,volume:p}))})))(function(){return Bc(e)});if(n.value0 instanceof iQ)return Bc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S(n.value0.value0)});if(n.value0 instanceof lL)return cf(eGe(n.value0.value0)(a))(function(){return cf(Y1(t))(function(){return Bc({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof lQ)return Bc({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof cQ)return cf(Y1(nGe(rL(oi))(function(s){var h=aGe(s)(e.visibilityExpiration);return h?tL(new xe(new lL(!1))):t})))(function(){return Bc(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 uL&&e.videoState instanceof S?cf(a)(function(){return cf(fQ(function(l){return function(){return tGe(n.value0.value0>0)(s_(!1)(l))(),RC(n.value0.value0)(l)()}}))(function(){return Bc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof oL&&e.videoState instanceof S?cf(a)(function(){return cf(fQ(s_(!e.videoState.value0.muted)))(function(){return Bc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S({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])}},mQ=function(e){if(e instanceof S)return!1;if(e instanceof M)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var hQ=e=>n=>a=>()=>e.then(a,n),DQ=e=>e instanceof Error,gQ=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var oGe=W(os(sr)),uGe=B0(sr),iGe=pn(dn),RQ=ma(_R(gR)(sr)),lGe=ls(sr),cGe=U(fR(ns)),sGe=Rm(sr),vGe=xg(Hn),fGe=Za(rN);var _Ge=function(e){var n=function(a){if(DQ(a))return oGe(a);if($e)return uGe(new Dm(""));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 pu("Promise failed: "+gQ(e))})(iGe)(ch(RQ(n(e))(RQ(lGe("Error")(e))(cGe(pu)(sGe(e))))))},Z1=function(e){return Rv(function(n){return vGe(fGe)(hQ(e)(function(a){return n(Pe.create(_Ge(a)))()})(function(a){return n(Oe.create(a))()}))})};var pGe=ne(rn),dGe=Ce(Ve),cL=Jr(ry),ND=ne(Qt),sL=iv(vt)(Ou),Q_=aa(ga),yQ=ip(Z)()(),mGe=zV()(),hGe=W(vt),bQ=aa(ai),wQ=Lt(Ve)()(),DGe=sa(De)()(),gGe=Ka(Z),RGe=Ce(De),EQ=un(en),yGe=As(Ne)(),bGe=Uu(We)(it),wGe=Ee(Vt(tt)),yd=EQ(ca),EGe=Ys(Xn),IGe=Nr(Z0),uo=W(Xn),IQ=yn(Ne),TQ=Ot(Ur),SQ=kI(ca),Vr=W(Rn),io=EQ(zn),Fu=Ma(Ne),CQ=U(Ga),FQ=op(Ne),GQ=U(Hn),TGe=lt(wr(Ga)),SGe=U(oe),CGe=pe(oe),MQ=on(wx),AQ=function(){function e(){}return e.value=new e,e}(),LQ=function(){function e(){}return e.value=new e,e}(),jD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PQ=function(){function e(){}return e.value=new e,e}(),bd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xQ=function(){function e(){}return e.value=new e,e}(),NQ=function(){function e(){}return e.value=new e,e}(),jQ=function(){function e(){}return e.value=new e,e}(),vL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fL=function(){function e(){}return e.value=new e,e}(),eE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),aE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OQ=function(){function e(){}return e.value=new e,e}(),_L=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pL=function(){function e(){}return e.value=new e,e}(),UQ=function(){function e(){}return e.value=new e,e}(),kQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),K_=function(){function e(){}return e.value=new e,e}(),Hc=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}(),dL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mL=function(e){var n=e.Monad0(),a=ne(n.Bind1()),t=yn(e),r=W(n.Applicative0());return function(u){return function(i){return function(l){return a(t(By(u.videoId)))(function(s){return wn(r(i.whenNotFound))(l)(pGe(s)(J8))})}}}},BQ=mL(Rr),hL=mL(Ne),HQ=function(e){var n=mL(e);return function(a){return n(a)({whenNotFound:ye})}},FGe=HQ(Rr),GGe=HQ(Ne),rE=function(e){return function(n){return function(a){var t=function(){var T=dGe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof PQ)return T(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof xQ)return T(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof jD)return T(e.introScreen);if(n.stage instanceof bd)return qn;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 242, column 20 - line 253, column 16): "+[n.stage.constructor.name])}(),r=function(){return n.stage instanceof jD?n.stage.value0.reset:!1}(),u=cL(function(T){return ND(ky(T))(sL(function(L){return a(new xe(new dL({time:L})))}))}),i=cL(function(T){return ND(ky(T))(sL(function(L){return a(new xe(new tE({playing:!0,time:L})))}))}),l=function(T){return a(En.create(T))},s=cL(function(T){return ND(ky(T))(sL(function(L){return l(new _L(L))}))}),h=Q_(l)(OQ.value),p=Ge([yQ("w-100 t--real-video")({id:n.videoId,controls:Ct(n.customControls),onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s})(""),Ia(!r)(mGe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(NQ.value),onError:function(T,L){return ye},onCriticalFail:bQ(l)(function(T){var L=T==="networkError";return L?fL.value:new eE("HLS player crashed")}),onReady:l(new nE({autoPlay:e.autoPlay})),onInitialPts:bQ(l)(function(T){return new kQ(T.initPTS)})}))]),y=function(){return n.stage instanceof bd&&n.stage.value0.unmuteOverlay?wQ("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:et({pointerEvents:"none"})})(DGe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")({onClick:Q_(l)(UQ.value),style:et({pointerEvents:"all"})})([Xe("click for sound"),gGe("fe fe-volume-2 ml-2")("")])):qn}(),E=function(T){return wQ("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:Q_(l)(new Hc(X1)),onMouseDown:Q_(l)(new Hc(X1)),onTouchStart:Q_(l)(new Hc(X1))})(sQ(T)(function(L){return l(Hc.create(L))}))},b=yQ("w-100 t--real-video")({id:n.videoId,controls:Ct(n.customControls),playsInline:!0,onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:Q_(l)(new nE({autoPlay:e.autoPlay})),onError:Q_(l)(fL.value),src:function(){return r?"":e.watchUrl}()})("");return RGe("position-relative w-100")([function(){if(n.support instanceof AQ)return p;if(n.support instanceof LQ)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 164, column 7 - line 166, column 40): "+[n.support.constructor.name])}(),da(n.customControls)(E),Ia(n.allowSound)(y),t])}}},MGe=function(e){var n=yn(e.MonadEffect0());return function(a){return n(function(){return FGe(a)(s_(!1))(),pL.value})}},AGe=MGe(rO),DL=function(e){return yGe("Livestream: Error")({livestream_error_message:e})},qQ=function(e){return BQ(e)({whenNotFound:!1})(DC)},LGe=function(e){return yn(e)(function(){var a=ND(ND(jo)(TC))(IC)();return bGe(function(t){return wGe(r4(t)(a))(new S(0))})(["iPad","iPod","iPhone"])})},WQ=LGe(Ne),PGe=function(e){var n=function(t){return yd(EGe(e.allowSound)(IGe(pu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return yd(Z1(z1(t)))(function(){return uo(new aE({unmuteOverlay:!1}))})})},a=function(t){return yd(IQ(s_(!0)(t)))(function(){return yd(Z1(z1(t)))(function(){return uo(new aE({unmuteOverlay:!0}))})})};return hL(e)({whenNotFound:new eE("