var Purs_EntryPoints_Livestream_Livestream=(()=>{var KZ=Object.create;var tR=Object.defineProperty;var YZ=Object.getOwnPropertyDescriptor;var XZ=Object.getOwnPropertyNames;var ZZ=Object.getPrototypeOf,eee=Object.prototype.hasOwnProperty;var B2=e=>tR(e,"__esModule",{value:!0});var nee=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ge=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),H2=(e,n)=>{B2(e);for(var a in n)tR(e,a,{get:n[a],enumerable:!0})},aee=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of XZ(n))!eee.call(e,t)&&t!=="default"&&tR(e,t,{get:()=>n[t],enumerable:!(a=YZ(n,t))||a.enumerable});return e},$u=e=>aee(B2(tR(e!=null?KZ(ZZ(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var gy={};H2(gy,{Children:()=>m_,Component:()=>h_,Fragment:()=>IS,PureComponent:()=>vre,Suspense:()=>fre,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>lre,cloneElement:()=>Zm,createContext:()=>ES,createElement:()=>pt,createRef:()=>Dy,default:()=>Ua,forwardRef:()=>Ci,isValidElement:()=>TS,lazy:()=>cre,memo:()=>sre,useCallback:()=>eh,useContext:()=>_re,useEffect:()=>Ot,useImperativeHandle:()=>Ls,useLayoutEffect:()=>nh,useMemo:()=>ah,useReducer:()=>pre,useRef:()=>st,useState:()=>ql,version:()=>dre});var Ua,lre,m_,Zm,h_,ES,pt,Dy,Ci,IS,TS,cre,sre,vre,fre,eh,_re,Ot,Ls,nh,ah,pre,st,ql,dre,Va=nee(()=>{Ua=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:lre,Children:m_,cloneElement:Zm,Component:h_,createContext:ES,createElement:pt,createRef:Dy,forwardRef:Ci,Fragment:IS,isValidElement:TS,lazy:cre,memo:sre,PureComponent:vre,Suspense:fre,useCallback:eh,useContext:_re,useEffect:Ot,useImperativeHandle:Ls,useLayoutEffect:nh,useMemo:ah,useReducer:pre,useRef:st,useState:ql,version:dre}=window.React});var CS=Ge((Ynn,BN)=>{"use strict";var kN=Object.getOwnPropertySymbols,Mre=Object.prototype.hasOwnProperty,Are=Object.prototype.propertyIsEnumerable;function Lre(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function xre(){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}}BN.exports=xre()?Object.assign:function(e,n){for(var a,t=Lre(e),r,u=1;u{"use strict";var FS=CS(),mp=60103,HN=60106;Rt.Fragment=60107;Rt.StrictMode=60108;Rt.Profiler=60114;var JN=60109,qN=60110,WN=60112;Rt.Suspense=60113;var $N=60115,zN=60116;typeof Symbol=="function"&&Symbol.for&&(vl=Symbol.for,mp=vl("react.element"),HN=vl("react.portal"),Rt.Fragment=vl("react.fragment"),Rt.StrictMode=vl("react.strict_mode"),Rt.Profiler=vl("react.profiler"),JN=vl("react.provider"),qN=vl("react.context"),WN=vl("react.forward_ref"),Rt.Suspense=vl("react.suspense"),$N=vl("react.memo"),zN=vl("react.lazy"));var vl,VN=typeof Symbol=="function"&&Symbol.iterator;function Pre(e){return e===null||typeof e!="object"?null:(e=VN&&e[VN]||e["@@iterator"],typeof e=="function"?e:null)}function oh(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";r3.exports=t3()});var C3=Ge(Dp=>{"use strict";var Wl=CS(),Ps=o3();function yr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;alh;lh++)$o[lh]=lh+1;var $o,lh;$o[15]=0;var Hre=/^[: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]*$/,f3=Object.prototype.hasOwnProperty,_3={},p3={};function d3(e){return f3.call(p3,e)?!0:f3.call(_3,e)?!1:Hre.test(e)?p3[e]=!0:(_3[e]=!0,!1)}function Jre(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 qre(e,n,a,t){if(n===null||typeof n=="undefined"||Jre(e,n,a,t))return!0;if(t)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ju(e,n,a,t,r,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=t,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var zo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zo[e]=new ju(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];zo[n]=new ju(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zo[e]=new ju(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zo[e]=new ju(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){zo[e]=new ju(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zo[e]=new ju(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zo[e]=new ju(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zo[e]=new ju(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zo[e]=new ju(e,5,!1,e.toLowerCase(),null,!1,!1)});var JS=/[\-:]([a-z])/g;function qS(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(JS,qS);zo[n]=new ju(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!1,!1)});zo.xlinkHref=new ju("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zo[e]=new ju(e,1,!1,e.toLowerCase(),null,!0,!0)});var Wre=/["'&<>]/;function R_(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Wre.exec(e);if(n){var a="",t,r=0;for(t=n.index;tCy))throw Error(yr(301));if(e===Lc)if(Sy=!0,e={action:a,next:null},Hv===null&&(Hv=new Map),a=Hv.get(n),a===void 0)Hv.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function $S(){}var b_=null,Kre={readContext:function(e){var n=b_.threadID;return ih(e,n),e[n]},useContext:function(e){y_();var n=b_.threadID;return ih(e,n),e[n]},useMemo:y3,useReducer:R3,useRef:function(e){Lc=y_(),ur=WS();var n=ur.memoizedState;return n===null?(e={current:e},ur.memoizedState=e):n},useState:function(e){return R3(g3,e)},useLayoutEffect:function(){},useCallback:function(e,n){return y3(function(){return e},n)},useImperativeHandle:$S,useEffect:$S,useDebugValue:$S,useDeferredValue:function(e){return y_(),e},useTransition:function(){return y_(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(b_.identifierPrefix||"")+"R:"+(b_.uniqueID++).toString(36)},useMutableSource:function(e,n){return y_(),n(e._source)}},b3={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function w3(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 E3={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},Yre=Wl({menuitem:!0},E3),sh={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},Xre=["Webkit","ms","Moz","O"];Object.keys(sh).forEach(function(e){Xre.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),sh[n]=sh[e]})});var Zre=/([A-Z])/g,eoe=/^ms-/,Jv=Ps.Children.toArray,zS=kre.ReactCurrentDispatcher,noe={listing:!0,pre:!0,textarea:!0},aoe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,I3={},VS={};function toe(e){if(e==null)return e;var n="";return Ps.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var roe=Object.prototype.hasOwnProperty,ooe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function T3(e,n){if(e===void 0)throw Error(yr(152,uh(n)||"Component"))}function uoe(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,m=Bre(l,n,a,s),p=[],g=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(ne,ue){g=!0,p=[ue]},enqueueSetState:function(ne,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,m,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=Wl({},s.state,b))}}else if(Lc={},s=l(i.props,m,E),s=h3(l,i.props,s,m),s==null||s.render==null){e=s,T3(e,l);return}if(s.props=i.props,s.context=m,s.updater=E,E=s.state,E===void 0&&(s.state=E=null),typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")if(typeof s.componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.UNSAFE_componentWillMount(),p.length){E=p;var I=g;if(p=null,g=!1,I&&E.length===1)s.state=E[0];else{b=I?E[0]:s.state;var L=!0;for(I=I?1:0;I=l))throw Error(yr(304));var s=new Uint16Array(l);for(s.set(i),$o=s,$o[0]=u+1,i=u;i=s.children.length){var m=s.footer;if(m!==""&&(this.previousWasTextNode=!1),this.stack.pop(),s.type==="select")this.currentSelectValue=null;else if(s.type!=null&&s.type.type!=null&&s.type.type.$$typeof===Ey)this.popProvider(s.type);else if(s.type===Iy){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var g=s.fallbackFrame;if(!g)throw Error(yr(303));this.stack.push(g),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=m}else{var E=s.children[s.childIndex++],b="";try{b+=this.render(E,s.context,s.domNamespace)}catch(I){throw I!=null&&typeof I.then=="function"?Error(yr(294)):I}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{zS.current=r,b_=t,D3()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?R_(r):this.previousWasTextNode?""+R_(r):(this.previousWasTextNode=!0,R_(r));if(t=uoe(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!Ps.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===PS?yr(257):yr(258,r.toString()));return a=Jv(a),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}var u=a.type;if(typeof u=="string")return this.renderDOM(a,t,r);switch(u){case s3:case c3:case jS:case NS:case kS:case wy:return a=Jv(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case Iy:throw Error(yr(294));case l3:throw Error(yr(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case US:Lc={};var i=u.render(a.props,a.ref);return i=h3(u.render,a.props,i,a.ref),i=Jv(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case BS:return a=[Ps.createElement(u.type,Wl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case Ey:return u=Jv(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case OS:u=a.type,i=a.props;var l=this.threadID;return ih(u,l),u=Jv(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case i3:throw Error(yr(338));case HS:return u=a.type,i=u._init,u=i(u._payload),a=[Ps.createElement(u,Wl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(yr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===b3.html&&w3(u),!I3.hasOwnProperty(u)){if(!aoe.test(u))throw Error(yr(65,u));I3[u]=!0}var i=a.props;if(u==="input")i=Wl({type:void 0},i,{defaultChecked:void 0,defaultValue:void 0,value:i.value!=null?i.value:i.defaultValue,checked:i.checked!=null?i.checked:i.defaultChecked});else if(u==="textarea"){var l=i.value;if(l==null){l=i.defaultValue;var s=i.children;if(s!=null){if(l!=null)throw Error(yr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(yr(93));s=s[0]}l=""+s}l==null&&(l="")}i=Wl({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Wl({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var m=toe(i.children);if(s!=null){var p=i.value!=null?i.value+"":m;if(l=!1,Array.isArray(s)){for(var g=0;g":(ue+=">",l="");e:{if(s=i.dangerouslySetInnerHTML,s!=null){if(s.__html!=null){s=s.__html;break e}}else if(s=i.children,typeof s=="string"||typeof s=="number"){s=R_(s);break e}s=null}return s!=null?(i=[],noe.hasOwnProperty(u)&&s.charAt(0)===` `&&(ue+=` `),ue+=s):i=Jv(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?w3(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}();Dp.renderToNodeStream=function(){throw Error(yr(207))};Dp.renderToStaticMarkup=function(e,n){e=new S3(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};Dp.renderToStaticNodeStream=function(){throw Error(yr(208))};Dp.renderToString=function(e,n){e=new S3(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};Dp.version="17.0.2"});var G3=Ge((nan,F3)=>{"use strict";F3.exports=C3()});var z7=Ge((Vb,kF)=>{(function(n,a){typeof Vb=="object"&&typeof kF=="object"?kF.exports=a():typeof define=="function"&&define.amd?define([],a):typeof Vb=="object"?Vb.Pusher=a():n.Pusher=a()})(window,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="",a(a.s=2)}([function(e,n,a){"use strict";var t=this&&this.__extends||function(){var b=function(I,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var $ in z)z.hasOwnProperty($)&&(N[$]=z[$])},b(I,L)};return function(I,L){b(I,L);function N(){this.constructor=I}I.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(I){I===void 0&&(I="="),this._paddingCharacter=I}return b.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},b.prototype.encode=function(I){for(var L="",N=0;N>>3*6&63),L+=this._encodeByte(z>>>2*6&63),L+=this._encodeByte(z>>>1*6&63),L+=this._encodeByte(z>>>0*6&63)}var $=I.length-N;if($>0){var z=I[N]<<16|($===2?I[N+1]<<8:0);L+=this._encodeByte(z>>>3*6&63),L+=this._encodeByte(z>>>2*6&63),$===2?L+=this._encodeByte(z>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},b.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},b.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),N=I.length-L,z=new Uint8Array(this.maxDecodedLength(N)),$=0,ne=0,ue=0,Z=0,Y=0,X=0,ve=0;ne>>4,z[$++]=Y<<4|X>>>2,z[$++]=X<<6|ve,ue|=Z&r,ue|=Y&r,ue|=X&r,ue|=ve&r;if(ne>>4,ue|=Z&r,ue|=Y&r),ne>>2,ue|=X&r),ne>>8&0-65-26+97,L+=51-I>>>8&26-97-52+48,L+=61-I>>>8&52-48-62+43,L+=62-I>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(I){var L=r;return L+=(42-I&I-44)>>>8&-r+I-43+62,L+=(46-I&I-48)>>>8&-r+I-47+63,L+=(47-I&I-58)>>>8&-r+I-48+52,L+=(64-I&I-91)>>>8&-r+I-65+0,L+=(96-I&I-123)>>>8&-r+I-97+26,L},b.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var N=I.length-1;N>=0&&I[N]===this._paddingCharacter;N--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var m=function(b){t(I,b);function I(){return b!==null&&b.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var N=L;return N+=65,N+=25-L>>>8&0-65-26+97,N+=51-L>>>8&26-97-52+48,N+=61-L>>>8&52-48-62+45,N+=62-L>>>8&62-45-63+95,String.fromCharCode(N)},I.prototype._decodeChar=function(L){var N=r;return N+=(44-L&L-46)>>>8&-r+L-45+62,N+=(94-L&L-96)>>>8&-r+L-95+63,N+=(47-L&L-58)>>>8&-r+L-48+52,N+=(64-L&L-91)>>>8&-r+L-65+0,N+=(96-L&L-123)>>>8&-r+L-97+26,N},I}(u);n.URLSafeCoder=m;var p=new m;function g(b){return p.encode(b)}n.encodeURLSafe=g;function E(b){return p.decode(b)}n.decodeURLSafe=E,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",r="utf8: invalid source encoding";function u(s){for(var m=new Uint8Array(i(s)),p=0,g=0;g>6,m[p++]=128|E&63):E<55296?(m[p++]=224|E>>12,m[p++]=128|E>>6&63,m[p++]=128|E&63):(g++,E=(E&1023)<<10,E|=s.charCodeAt(g)&1023,E+=65536,m[p++]=240|E>>18,m[p++]=128|E>>12&63,m[p++]=128|E>>6&63,m[p++]=128|E&63)}return m}n.encode=u;function i(s){for(var m=0,p=0;p=s.length-1)throw new Error(t);p++,m+=4}else throw new Error(t)}return m}n.encodedLength=i;function l(s){for(var m=[],p=0;p=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);g=(g&31)<<6|b&63,E=128}else if(g<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],I=s[++p];if((b&192)!=128||(I&192)!=128)throw new Error(r);g=(g&15)<<12|(b&63)<<6|I&63,E=2048}else if(g<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],I=s[++p],L=s[++p];if((b&192)!=128||(I&192)!=128||(L&192)!=128)throw new Error(r);g=(g&15)<<18|(b&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(g=55296&&g<=57343)throw new Error(r);if(g>=65536){if(g>1114111)throw new Error(r);g-=65536,m.push(String.fromCharCode(55296|g>>10)),g=56320|g&1023}}m.push(String.fromCharCode(g))}return m.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function h(d,R){this.lastId=0,this.prefix=d,this.name=R}return h.prototype.create=function(d){this.lastId++;var R=this.lastId,M=this.prefix+R,A=this.name+"["+R+"]",Q=!1,we=function(){Q||(d.apply(null,arguments),Q=!0)};return this[R]=we,{number:R,id:M,name:A,callback:we}},h.prototype.remove=function(d){delete this[d.number]},h}(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function h(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return h.prototype.load=function(d,R,M){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(M);else{A.loading[d]=[M];var Q=Xa.createScriptRequest(A.getPath(d,R)),we=A.receivers.create(function(pn){if(A.receivers.remove(we),A.loading[d]){var da=A.loading[d];delete A.loading[d];for(var wt=function(Po){Po||Q.cleanup()},rr=0;rr>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},$=function(h){return h.replace(/[^\x00-\x7F]/g,z)},ne=function(h){var d=[0,2,1][h.length%3],R=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),M=[b.charAt(R>>>18),b.charAt(R>>>12&63),d>=2?"=":b.charAt(R>>>6&63),d>=1?"=":b.charAt(R&63)];return M.join("")},ue=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,ne)},Z=function(){function h(d,R,M,A){var Q=this;this.clear=R,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},M)}return h.prototype.isRunning=function(){return this.timer!==null},h.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},h}(),Y=Z,X=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}();function ve(h){window.clearTimeout(h)}function xe(h){window.clearInterval(h)}var ke=function(h){X(d,h);function d(R,M){return h.call(this,setTimeout,ve,R,function(A){return M(),null})||this}return d}(Y),rn=function(h){X(d,h);function d(R,M){return h.call(this,setInterval,xe,R,function(A){return M(),A})||this}return d}(Y),wn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(h){return new ke(0,h)},method:function(h){for(var d=[],R=1;R0)for(var A=0;A=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}},se=ss,Al=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ll=function(h){Al(d,h);function d(R,M){var A=h.call(this)||this;return A.id=R,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(R){return this.transport.send(R)},d.prototype.send_event=function(R,M,A){var Q={event:R,data:M};return A&&(Q.channel=A),vn.debug("Event sent",Q),this.send(se.encodeMessage(Q))},d.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},d.prototype.close=function(){this.transport.close()},d.prototype.bindListeners=function(){var R=this,M={message:function(Q){var we;try{we=se.decodeMessage(Q)}catch(pn){R.emit("error",{type:"MessageParseError",error:pn,data:Q.data})}if(we!==void 0){switch(vn.debug("Event recd",we),we.event){case"pusher:error":R.emit("error",{type:"PusherError",data:we.data});break;case"pusher:ping":R.emit("ping");break;case"pusher:pong":R.emit("pong");break}R.emit("message",we)}},activity:function(){R.emit("activity")},error:function(Q){R.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&R.handleCloseEvent(Q),R.transport=null,R.emit("closed")}},A=function(){zn(M,function(Q,we){R.transport.unbind(we,Q)})};zn(M,function(Q,we){R.transport.bind(we,Q)})},d.prototype.handleCloseEvent=function(R){var M=se.getCloseAction(R),A=se.getCloseError(R);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},d}(_a),vs=Ll,xl=function(){function h(d,R){this.transport=d,this.callback=R,this.bindListeners()}return h.prototype.close=function(){this.unbindListeners(),this.transport.close()},h.prototype.bindListeners=function(){var d=this;this.onMessage=function(R){d.unbindListeners();var M;try{M=se.processHandshake(R)}catch(A){d.finish("error",{error:A}),d.transport.close();return}M.action==="connected"?d.finish("connected",{connection:new vs(M.id,d.transport),activityTimeout:M.activityTimeout}):(d.finish(M.action,{error:M.error}),d.transport.close())},this.onClosed=function(R){d.unbindListeners();var M=se.getCloseAction(R)||"backoff",A=se.getCloseError(R);d.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},h.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},h.prototype.finish=function(d,R){this.callback(mn({transport:this.transport,action:d},R))},h}(),Vi=xl,Jd=function(){function h(d,R){this.channel=d;var M=R.authTransport;if(typeof Xa.getAuthorizers()[M]=="undefined")throw"'"+M+"' is not a recognized auth transport";this.type=M,this.options=R,this.authOptions=R.auth||{}}return h.prototype.composeQuery=function(d){var R="socket_id="+encodeURIComponent(d)+"&channel_name="+encodeURIComponent(this.channel.name);for(var M in this.authOptions.params)R+="&"+encodeURIComponent(M)+"="+encodeURIComponent(this.authOptions.params[M]);return R},h.prototype.authorize=function(d,R){h.authorizers=h.authorizers||Xa.getAuthorizers(),h.authorizers[this.type].call(this,Xa,d,R)},h}(),Pf=Jd,g0=function(){function h(d,R){this.timeline=d,this.options=R||{}}return h.prototype.send=function(d,R){this.timeline.isEmpty()||this.timeline.send(Xa.TimelineTransport.getAgent(this,d),R)},h}(),R0=g0,Qi=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Ru=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),fs=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),y0=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),qd=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),b0=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),Eg=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),cv=function(h){Qi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),yI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),bI=function(h){yI(d,h);function d(R,M){var A=h.call(this,function(Q,we){vn.debug("No callbacks on "+R+" for "+Q)})||this;return A.name=R,A.pusher=M,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return d.prototype.authorize=function(R,M){return M(!1,{auth:""})},d.prototype.trigger=function(R,M){if(R.indexOf("client-")!==0)throw new Ru("Event '"+R+"' does not start with 'client-'");if(!this.subscribed){var A=Da.buildLogSuffix("triggeringClientEvents");vn.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(R,M,this.name)},d.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(R);else if(M.indexOf("pusher_internal:")!==0){var Q={};this.emit(M,A,Q)}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",R.data)},d.prototype.subscribe=function(){var R=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(M,A){M?(vn.error(A),R.emit("pusher:subscription_error",A)):(A=A,R.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:R.name}))}))},d.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},d.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},d.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},d}(_a),Ig=bI,wI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),EI=function(h){wI(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.authorize=function(R,M){var A=Ki.createAuthorizer(this,this.pusher.config);return A.authorize(R,M)},d}(Ig),Wd=EI,Tg=function(){function h(){this.reset()}return h.prototype.get=function(d){return Object.prototype.hasOwnProperty.call(this.members,d)?{id:d,info:this.members[d]}:null},h.prototype.each=function(d){var R=this;zn(this.members,function(M,A){d(R.get(A))})},h.prototype.setMyID=function(d){this.myID=d},h.prototype.onSubscription=function(d){this.members=d.presence.hash,this.count=d.presence.count,this.me=this.get(this.myID)},h.prototype.addMember=function(d){return this.get(d.user_id)===null&&this.count++,this.members[d.user_id]=d.user_info,this.get(d.user_id)},h.prototype.removeMember=function(d){var R=this.get(d.user_id);return R&&(delete this.members[d.user_id],this.count--),R},h.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},h}(),II=Tg,TI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),Sg=function(h){TI(d,h);function d(R,M){var A=h.call(this,R,M)||this;return A.members=new II,A}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(!Q){if(we=we,we.channel_data===void 0){var pn=Da.buildLogSuffix("authenticationEndpoint");vn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+pn)),M("Invalid auth response");return}var da=JSON.parse(we.channel_data);A.members.setMyID(da.user_id)}M(Q,we)})},d.prototype.handleEvent=function(R){var M=R.event;if(M.indexOf("pusher_internal:")===0)this.handleInternalEvent(R);else{var A=R.data,Q={};R.user_id&&(Q.user_id=R.user_id),this.emit(M,A,Q)}},d.prototype.handleInternalEvent=function(R){var M=R.event,A=R.data;switch(M){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(R);break;case"pusher_internal:member_added":var Q=this.members.addMember(A);this.emit("pusher:member_added",Q);break;case"pusher_internal:member_removed":var we=this.members.removeMember(A);we&&this.emit("pusher:member_removed",we);break}},d.prototype.handleSubscriptionSucceededEvent=function(R){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(R.data),this.emit("pusher:subscription_succeeded",this.members))},d.prototype.disconnect=function(){this.members.reset(),h.prototype.disconnect.call(this)},d}(Wd),SI=Sg,Cg=a(1),$d=a(0),CI=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),FI=function(h){CI(d,h);function d(R,M,A){var Q=h.call(this,R,M)||this;return Q.key=null,Q.nacl=A,Q}return d.prototype.authorize=function(R,M){var A=this;h.prototype.authorize.call(this,R,function(Q,we){if(Q){M(!0,we);return}var pn=we.shared_secret;if(!pn){var da="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,da);return}A.key=Object($d.decode)(pn),delete we.shared_secret,M(!1,we)})},d.prototype.trigger=function(R,M){throw new b0("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){h.prototype.handleEvent.call(this,R);return}this.handleEncryptedEvent(M,A)},d.prototype.handleEncryptedEvent=function(R,M){var A=this;if(!this.key){vn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){vn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Q=Object($d.decode)(M.ciphertext);if(Q.length0&&this.emit("connecting_in",Math.round(R/1e3)),this.retryTimer=new ke(R||0,function(){M.disconnectInternally(),M.connect()})},d.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},d.prototype.setUnavailableTimer=function(){var R=this;this.unavailableTimer=new ke(this.options.unavailableTimeout,function(){R.updateState("unavailable")})},d.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},d.prototype.sendActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ke(this.options.pongTimeout,function(){R.timeline.error({pong_timed_out:R.options.pongTimeout}),R.retryIn(0)})},d.prototype.resetActivityCheck=function(){var R=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ke(this.activityTimeout,function(){R.sendActivityCheck()}))},d.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},d.prototype.buildConnectionCallbacks=function(R){var M=this;return mn({},R,{message:function(A){M.resetActivityCheck(),M.emit("message",A)},ping:function(){M.send_event("pusher:pong",{})},activity:function(){M.resetActivityCheck()},error:function(A){M.emit("error",{type:"WebSocketError",error:A})},closed:function(){M.abandonConnection(),M.shouldRetry()&&M.retryIn(1e3)}})},d.prototype.buildHandshakeCallbacks=function(R){var M=this;return mn({},R,{connected:function(A){M.activityTimeout=Math.min(M.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),M.clearUnavailableTimer(),M.setConnection(A.connection),M.socket_id=M.connection.id,M.updateState("connected",{socket_id:M.socket_id})}})},d.prototype.buildErrorCallbacks=function(){var R=this,M=function(A){return function(Q){Q.error&&R.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:M(function(){R.usingTLS=!0,R.updateStrategy(),R.retryIn(0)}),refused:M(function(){R.disconnect()}),backoff:M(function(){R.retryIn(1e3)}),retry:M(function(){R.retryIn(0)})}},d.prototype.setConnection=function(R){this.connection=R;for(var M in this.connectionCallbacks)this.connection.bind(M,this.connectionCallbacks[M]);this.resetActivityCheck()},d.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var R in this.connectionCallbacks)this.connection.unbind(R,this.connectionCallbacks[R]);var M=this.connection;return this.connection=null,M}},d.prototype.updateState=function(R,M){var A=this.state;if(this.state=R,A!==R){var Q=R;Q==="connected"&&(Q+=" with new socket ID "+M.socket_id),vn.debug("State changed",A+" -> "+Q),this.timeline.info({state:R,params:M}),this.emit("state_change",{previous:A,current:R}),this.emit(R,M)}},d.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},d}(_a),Fg=AI,LI=function(){function h(){this.channels={}}return h.prototype.add=function(d,R){return this.channels[d]||(this.channels[d]=Gg(d,R)),this.channels[d]},h.prototype.all=function(){return Pa(this.channels)},h.prototype.find=function(d){return this.channels[d]},h.prototype.remove=function(d){var R=this.channels[d];return delete this.channels[d],R},h.prototype.disconnect=function(){zn(this.channels,function(d){d.disconnect()})},h}(),xI=LI;function Gg(h,d){if(h.indexOf("private-encrypted-")===0){if(d.config.nacl)return Ki.createEncryptedChannel(h,d,d.config.nacl);var R="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=Da.buildLogSuffix("encryptedChannelSupport");throw new b0(R+". "+M)}else return h.indexOf("private-")===0?Ki.createPrivateChannel(h,d):h.indexOf("presence-")===0?Ki.createPresenceChannel(h,d):Ki.createChannel(h,d)}var PI={createChannels:function(){return new xI},createConnectionManager:function(h,d){return new Fg(h,d)},createChannel:function(h,d){return new Ig(h,d)},createPrivateChannel:function(h,d){return new Wd(h,d)},createPresenceChannel:function(h,d){return new SI(h,d)},createEncryptedChannel:function(h,d,R){return new GI(h,d,R)},createTimelineSender:function(h,d){return new R0(h,d)},createAuthorizer:function(h,d){return d.authorizer?d.authorizer(h,d):new Pf(h,d)},createHandshake:function(h,d){return new Vi(h,d)},createAssistantToTheTransportManager:function(h,d,R){return new vc(h,d,R)}},Ki=PI,jI=function(){function h(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return h.prototype.getAssistant=function(d){return Ki.createAssistantToTheTransportManager(this,d,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},h.prototype.isAlive=function(){return this.livesLeft>0},h.prototype.reportDeath=function(){this.livesLeft-=1},h}(),Mg=jI,NI=function(){function h(d,R){this.strategies=d,this.loop=Boolean(R.loop),this.failFast=Boolean(R.failFast),this.timeout=R.timeout,this.timeoutLimit=R.timeoutLimit}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){var M=this,A=this.strategies,Q=0,we=this.timeout,pn=null,da=function(wt,rr){rr?R(null,rr):(Q=Q+1,M.loop&&(Q=Q%A.length),Q0&&(Q=new ke(M.timeout,function(){we.abort(),A(!0)})),we=d.connect(R,function(pn,da){pn&&Q&&Q.isRunning()&&!M.failFast||(Q&&Q.ensureAborted(),A(pn,da))}),{abort:function(){Q&&Q.ensureAborted(),we.abort()},forceMinPriority:function(pn){we.forceMinPriority(pn)}}},h}(),_s=NI,OI=function(){function h(d){this.strategies=d}return h.prototype.isSupported=function(){return Tn(this.strategies,dn.method("isSupported"))},h.prototype.connect=function(d,R){return UI(this.strategies,d,function(M,A){return function(Q,we){if(A[M].error=Q,Q){Ag(A)&&R(!0);return}Ga(A,function(pn){pn.forceMinPriority(we.transport.priority)}),R(null,we)}})},h}(),zd=OI;function UI(h,d,R){var M=sa(h,function(A,Q,we,pn){return A.connect(d,R(Q,pn))});return{abort:function(){Ga(M,Vd)},forceMinPriority:function(A){Ga(M,function(Q){Q.forceMinPriority(A)})}}}function Ag(h){return Dn(h,function(d){return Boolean(d.error)})}function Vd(h){!h.error&&!h.aborted&&(h.abort(),h.aborted=!0)}var kI=function(){function h(d,R,M){this.strategy=d,this.transports=R,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.usingTLS,A=Lg(M),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=dn.now()){var we=this.transports[A.transport];we&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new _s([we],{timeout:A.latency*2+1e3,failFast:!0})))}var pn=dn.now(),da=Q.pop().connect(d,function wt(rr,Po){rr?(xg(M),Q.length>0?(pn=dn.now(),da=Q.pop().connect(d,wt)):R(rr)):(HI(M,Po.transport.name,dn.now()-pn),R(null,Po))});return{abort:function(){da.abort()},forceMinPriority:function(wt){d=wt,da&&da.forceMinPriority(wt)}}},h}(),BI=kI;function Qd(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function Lg(h){var d=Xa.getLocalStorage();if(d)try{var R=d[Qd(h)];if(R)return JSON.parse(R)}catch{xg(h)}return null}function HI(h,d,R){var M=Xa.getLocalStorage();if(M)try{M[Qd(h)]=Ma({timestamp:dn.now(),transport:d,latency:R})}catch{}}function xg(h){var d=Xa.getLocalStorage();if(d)try{delete d[Qd(h)]}catch{}}var JI=function(){function h(d,R){var M=R.delay;this.strategy=d,this.options={delay:M}}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy,A,Q=new ke(this.options.delay,function(){A=M.connect(d,R)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(we){d=we,A&&A.forceMinPriority(we)}}},h}(),w0=JI,Pg=function(){function h(d,R,M){this.test=d,this.trueBranch=R,this.falseBranch=M}return h.prototype.isSupported=function(){var d=this.test()?this.trueBranch:this.falseBranch;return d.isSupported()},h.prototype.connect=function(d,R){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(d,R)},h}(),jf=Pg,qI=function(){function h(d){this.strategy=d}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy.connect(d,function(A,Q){Q&&M.abort(),R(A,Q)});return M},h}(),WI=qI;function Pl(h){return function(){return h.isSupported()}}var jg=function(h,d,R){var M={};function A(Nr,eR,nR,RT,aR){var w=R(h,Nr,eR,nR,RT,aR);return M[Nr]=w,w}var Q=Object.assign({},d,{hostNonTLS:h.wsHost+":"+h.wsPort,hostTLS:h.wsHost+":"+h.wssPort,httpPath:h.wsPath}),we=Object.assign({},Q,{useTLS:!0}),pn=Object.assign({},d,{hostNonTLS:h.httpHost+":"+h.httpPort,hostTLS:h.httpHost+":"+h.httpsPort,httpPath:h.httpPath}),da={loop:!0,timeout:15e3,timeoutLimit:6e4},wt=new Mg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),rr=new Mg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Po=A("ws","ws",3,Q,wt),hi=A("wss","ws",3,we,wt),mT=A("sockjs","sockjs",1,pn),zg=A("xhr_streaming","xhr_streaming",1,pn,rr),Vg=A("xdr_streaming","xdr_streaming",1,pn,rr),Qg=A("xhr_polling","xhr_polling",1,pn),hT=A("xdr_polling","xdr_polling",1,pn),Kg=new _s([Po],da),DT=new _s([hi],da),gT=new _s([mT],da),Yg=new _s([new jf(Pl(zg),zg,Vg)],da),Xg=new _s([new jf(Pl(Qg),Qg,hT)],da),Zg=new _s([new jf(Pl(Yg),new zd([Yg,new w0(Xg,{delay:4e3})]),Xg)],da),nm=new jf(Pl(Zg),Zg,gT),am;return d.useTLS?am=new zd([Kg,new w0(nm,{delay:2e3})]):am=new zd([Kg,new w0(DT,{delay:2e3}),new w0(nm,{delay:5e3})]),new BI(new WI(new jf(Pl(Po),am,nm)),M,{ttl:18e5,timeline:d.timeline,useTLS:d.useTLS})},$I=jg,zI=function(){var h=this;h.timeline.info(h.buildTimelineMessage({transport:h.name+(h.options.useTLS?"s":"")})),h.hooks.isInitialized()?h.changeState("initialized"):h.hooks.file?(h.changeState("initializing"),p.load(h.hooks.file,{useTLS:h.options.useTLS},function(d,R){h.hooks.isInitialized()?(h.changeState("initialized"),R(!0)):(d&&h.onError(d),h.onClose(),R(!1))})):h.onClose()},Ng={getRequest:function(h){var d=new window.XDomainRequest;return d.ontimeout=function(){h.emit("error",new fs),h.close()},d.onerror=function(R){h.emit("error",R),h.close()},d.onprogress=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText)},d.onload=function(){d.responseText&&d.responseText.length>0&&h.onChunk(200,d.responseText),h.emit("finished",200),h.close()},d},abortRequest:function(h){h.ontimeout=h.onerror=h.onprogress=h.onload=null,h.abort()}},VI=Ng,Og=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),QI=256*1024,Ug=function(h){Og(d,h);function d(R,M,A){var Q=h.call(this)||this;return Q.hooks=R,Q.method=M,Q.url=A,Q}return d.prototype.start=function(R){var M=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){M.close()},Xa.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(R)},d.prototype.close=function(){this.unloader&&(Xa.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},d.prototype.onChunk=function(R,M){for(;;){var A=this.advanceBuffer(M);if(A)this.emit("chunk",{status:R,data:A});else break}this.isBufferTooLong(M)&&this.emit("buffer_too_long")},d.prototype.advanceBuffer=function(R){var M=R.slice(this.position),A=M.indexOf(` `);return A!==-1?(this.position+=A+1,M.slice(0,A)):null},d.prototype.isBufferTooLong=function(R){return this.position===R.length&&R.length>QI},d}(_a),kg=Ug,Nf;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(Nf||(Nf={}));var Yi=Nf,KI=1,Bg=function(){function h(d,R){this.hooks=d,this.session=qu(1e3)+"/"+jl(8),this.location=YI(R),this.readyState=Yi.CONNECTING,this.openStream()}return h.prototype.send=function(d){return this.sendRaw(JSON.stringify([d]))},h.prototype.ping=function(){this.hooks.sendHeartbeat(this)},h.prototype.close=function(d,R){this.onClose(d,R,!0)},h.prototype.sendRaw=function(d){if(this.readyState===Yi.OPEN)try{return Xa.createSocketRequest("POST",Kd(XI(this.location,this.session))).start(d),!0}catch{return!1}else return!1},h.prototype.reconnect=function(){this.closeStream(),this.openStream()},h.prototype.onClose=function(d,R,M){this.closeStream(),this.readyState=Yi.CLOSED,this.onclose&&this.onclose({code:d,reason:R,wasClean:M})},h.prototype.onChunk=function(d){if(d.status===200){this.readyState===Yi.OPEN&&this.onActivity();var R,M=d.data.slice(0,1);switch(M){case"o":R=JSON.parse(d.data.slice(1)||"{}"),this.onOpen(R);break;case"a":R=JSON.parse(d.data.slice(1)||"[]");for(var A=0;A0&&h.onChunk(R.status,R.responseText);break;case 4:R.responseText&&R.responseText.length>0&&h.onChunk(R.status,R.responseText),h.emit("finished",R.status),h.close();break}},R},abortRequest:function(h){h.onreadystatechange=null,h.abort()}},Ya=Jg,ps={createStreamingSocket:function(h){return this.createSocket(nT,h)},createPollingSocket:function(h){return this.createSocket(tT,h)},createSocket:function(h,d){return new ZI(h,d)},createXHR:function(h,d){return this.createRequest(Ya,h,d)},createRequest:function(h,d,R){return new kg(h,d,R)}},Yd=ps;Yd.createXDR=function(h,d){return this.createRequest(VI,h,d)};var rT=Yd,oT={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:m,getDefaultStrategy:$I,Transports:xo,transportConnectionInitializer:zI,HTTPFactory:rT,TimelineTransport:ie,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(h){var d=this;window.Pusher=h;var R=function(){d.onDocumentBody(h.ready)};window.JSON?R():p.load("json2",{},R)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:J,jsonp:O}},onDocumentBody:function(h){var d=this;document.body?h():setTimeout(function(){d.onDocumentBody(h)},0)},createJSONPRequest:function(h,d){return new W(h,d)},createScriptRequest:function(h){return new x(h)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var h=this.getXHRAPI();return new h},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return mi},createWebSocket:function(h){var d=this.getWebSocketAPI();return new d(h)},createSocketRequest:function(h,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var h=this.getXHRAPI();return Boolean(h)&&new h().withCredentials!==void 0},isXDRSupported:function(h){var d=h?"https:":"http:",R=this.getProtocol();return Boolean(window.XDomainRequest)&&R===d},addUnloadListener:function(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener:function(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)}},Xa=oT,E0;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(E0||(E0={}));var I0=E0,uT=function(){function h(d,R,M){this.key=d,this.session=R,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return h.prototype.log=function(d,R){d<=this.options.level&&(this.events.push(mn({},R,{timestamp:dn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},h.prototype.error=function(d){this.log(I0.ERROR,d)},h.prototype.info=function(d){this.log(I0.INFO,d)},h.prototype.debug=function(d){this.log(I0.DEBUG,d)},h.prototype.isEmpty=function(){return this.events.length===0},h.prototype.send=function(d,R){var M=this,A=mn({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],d(A,function(Q,we){Q||M.sent++,R&&R(Q,we)}),!0},h.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},h}(),qg=uT,Xd=function(){function h(d,R,M,A){this.name=d,this.priority=R,this.transport=M,this.options=A||{}}return h.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},h.prototype.connect=function(d,R){var M=this;if(this.isSupported()){if(this.priority{"use strict";var xhe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";M5.exports=xhe});var j5=Ge((LTa,P5)=>{"use strict";var Phe=A5();function L5(){}function x5(){}x5.resetWarningCache=L5;P5.exports=function(){function e(t,r,u,i,l,s){if(s!==Phe){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}e.isRequired=e;function n(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:x5,resetWarningCache:L5};return a.PropTypes=a,a}});var O5=Ge((jTa,N5)=>{N5.exports=j5()();var xTa,PTa});var dG=Ge(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var U5=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],fw=U5.join(","),k5=typeof Element=="undefined",B_=k5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_G=!k5&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},B5=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(fw));return a&&B_.call(n,fw)&&r.unshift(n),r=r.filter(t),r},H5=function e(n,a,t){for(var r=[],u=Array.from(n);u.length;){var i=u.shift();if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,m=e(s,!0,t);t.flatten?r.push.apply(r,m):r.push({scope:i,candidates:m})}else{var p=B_.call(i,fw);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var g=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(g&&E){var b=e(g===!0?i.children:g.children,!0,t);t.flatten?r.push.apply(r,b):r.push({scope:i,candidates:b})}else u.unshift.apply(u,i.children)}}return r},J5=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},jhe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},q5=function(n){return n.tagName==="INPUT"},Nhe=function(n){return q5(n)&&n.type==="hidden"},Ohe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},Uhe=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(B_.call(i,"details:not([open]) *"))return!0;var l=_G(n).host,s=(l==null?void 0:l.ownerDocument.contains(l))||n.ownerDocument.contains(n);if(!t||t==="full"){if(typeof r=="function"){for(var m=n;n;){var p=n.parentElement,g=_G(n);if(p&&!p.shadowRoot&&r(p)===!0)return W5(n);n.assignedSlot?n=n.assignedSlot:!p&&g!==n.ownerDocument?n=g.host:n=p}n=m}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return W5(n);return!1},qhe=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)},$he=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=J5(l,i),m=i?e(r.candidates):l;s===0?i?a.push.apply(a,m):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:m})}),t.sort(jhe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},zhe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=H5([n],a.includeContainer,{filter:pG.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:Whe}):t=B5(n,a.includeContainer,pG.bind(null,a)),$he(t)},Vhe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=H5([n],a.includeContainer,{filter:_w.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=B5(n,a.includeContainer,_w.bind(null,a)),t},Qhe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return B_.call(n,fw)===!1?!1:pG(a,n)},Khe=U5.concat("iframe").join(","),Yhe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return B_.call(n,Khe)===!1?!1:_w(a,n)};qp.focusable=Vhe;qp.isFocusable=Yhe;qp.isTabbable=Qhe;qp.tabbable=zhe});var Y5=Ge(mG=>{"use strict";Object.defineProperty(mG,"__esModule",{value:!0});var Qs=dG();function $5(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 z5(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()}}}(),Zhe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},eDe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},nDe=function(n){return n.key==="Tab"||n.keyCode===9},Q5=function(n){return setTimeout(n,0)},K5=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},Wh=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?ve-1:0),ke=1;ke=0)Y=t.activeElement;else{var X=u.tabbableGroups[0],ve=X&&X.firstTabbableNode;Y=ve||m("fallbackFocus")}if(!Y)throw new Error("Your focus-trap needs to have at least one focusable element");return Y},g=function(){if(u.containerGroups=u.containers.map(function(Y){var X=Qs.tabbable(Y,r.tabbableOptions),ve=Qs.focusable(Y,r.tabbableOptions);return{container:Y,tabbableNodes:X,focusableNodes:ve,firstTabbableNode:X.length>0?X[0]:null,lastTabbableNode:X.length>0?X[X.length-1]:null,nextTabbableNode:function(ke){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,wn=ve.findIndex(function(dn){return dn===ke});if(!(wn<0))return rn?ve.slice(wn+1).find(function(dn){return Qs.isTabbable(dn,r.tabbableOptions)}):ve.slice(0,wn).reverse().find(function(dn){return Qs.isTabbable(dn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Y){return Y.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},E=function Z(Y){if(Y!==!1&&Y!==t.activeElement){if(!Y||!Y.focus){Z(p());return}Y.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Y,Zhe(Y)&&Y.select()}},b=function(Y){var X=m("setReturnFocus",Y);return X||(X===!1?!1:Y)},I=function(Y){var X=pw(Y);if(!(s(X)>=0)){if(Wh(r.clickOutsideDeactivates,Y)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Qs.isFocusable(X,r.tabbableOptions)});return}Wh(r.allowOutsideClick,Y)||Y.preventDefault()}},L=function(Y){var X=pw(Y),ve=s(X)>=0;ve||X instanceof Document?ve&&(u.mostRecentlyFocusedNode=X):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},N=function(Y){var X=pw(Y);g();var ve=null;if(u.tabbableGroups.length>0){var xe=s(X),ke=xe>=0?u.containerGroups[xe]:void 0;if(xe<0)Y.shiftKey?ve=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:ve=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var rn=K5(u.tabbableGroups,function(zn){var Wn=zn.firstTabbableNode;return X===Wn});if(rn<0&&(ke.container===X||Qs.isFocusable(X,r.tabbableOptions)&&!Qs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X,!1))&&(rn=xe),rn>=0){var wn=rn===0?u.tabbableGroups.length-1:rn-1,dn=u.tabbableGroups[wn];ve=dn.lastTabbableNode}}else{var mn=K5(u.tabbableGroups,function(zn){var Wn=zn.lastTabbableNode;return X===Wn});if(mn<0&&(ke.container===X||Qs.isFocusable(X,r.tabbableOptions)&&!Qs.isTabbable(X,r.tabbableOptions)&&!ke.nextTabbableNode(X))&&(mn=xe),mn>=0){var yn=mn===u.tabbableGroups.length-1?0:mn+1,Kn=u.tabbableGroups[yn];ve=Kn.firstTabbableNode}}}else ve=m("fallbackFocus");ve&&(Y.preventDefault(),E(ve))},z=function(Y){if(eDe(Y)&&Wh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(nDe(Y)){N(Y);return}},$=function(Y){var X=pw(Y);s(X)>=0||Wh(r.clickOutsideDeactivates,Y)||Wh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},ne=function(){if(!!u.active)return V5.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?Q5(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",I,{capture:!0,passive:!1}),t.addEventListener("touchstart",I,{capture:!0,passive:!1}),t.addEventListener("click",$,{capture:!0,passive:!1}),t.addEventListener("keydown",z,{capture:!0,passive:!1}),i},ue=function(){if(!!u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchstart",I,!0),t.removeEventListener("click",$,!0),t.removeEventListener("keydown",z,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Y){if(u.active)return this;var X=l(Y,"onActivate"),ve=l(Y,"onPostActivate"),xe=l(Y,"checkCanFocusTrap");xe||g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,X&&X();var ke=function(){xe&&g(),ne(),ve&&ve()};return xe?(xe(u.containers.concat()).then(ke,ke),this):(ke(),this)},deactivate:function(Y){if(!u.active)return this;var X=z5({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,V5.deactivateTrap(i);var ve=l(X,"onDeactivate"),xe=l(X,"onPostDeactivate"),ke=l(X,"checkCanReturnFocus"),rn=l(X,"returnFocus","returnFocusOnDeactivate");ve&&ve();var wn=function(){Q5(function(){rn&&E(b(u.nodeFocusedBeforeActivation)),xe&&xe()})};return rn&&ke?(ke(b(u.nodeFocusedBeforeActivation)).then(wn,wn),this):(wn(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,ue(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,g(),ne(),this)},updateContainerElements:function(Y){var X=[].concat(Y).filter(Boolean);return u.containers=X.map(function(ve){return typeof ve=="string"?t.querySelector(ve):ve}),u.active&&g(),this}},i.updateContainerElements(n),i};mG.createFocusTrap=aDe});var e9=Ge((UTa,Z5)=>{"use strict";function hG(e){return hG=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hG(e)}function tDe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function X5(e,n){for(var a=0;a1?p-1:0),E=1;E element.");var i=function(m){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(m):u.ref&&(u.ref.current=m)),r.focusTrapElements=p||[m]},l=mw.cloneElement(u,{ref:i});return l}return null}}]),a}(mw.Component),zh=typeof Element=="undefined"?Function:Element;gG.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(zh),xa.string,xa.bool,xa.func]),fallbackFocus:xa.oneOfType([xa.instanceOf(zh),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(zh),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(zh)),children:xa.oneOfType([xa.element,xa.instanceOf(zh)])};gG.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:vDe};Z5.exports=gG});var Z9=Ge(qt=>{"use strict";var Go=typeof Symbol=="function"&&Symbol.for,VG=Go?Symbol.for("react.element"):60103,QG=Go?Symbol.for("react.portal"):60106,Sw=Go?Symbol.for("react.fragment"):60107,Cw=Go?Symbol.for("react.strict_mode"):60108,Fw=Go?Symbol.for("react.profiler"):60114,Gw=Go?Symbol.for("react.provider"):60109,Mw=Go?Symbol.for("react.context"):60110,KG=Go?Symbol.for("react.async_mode"):60111,Aw=Go?Symbol.for("react.concurrent_mode"):60111,Lw=Go?Symbol.for("react.forward_ref"):60112,xw=Go?Symbol.for("react.suspense"):60113,Lge=Go?Symbol.for("react.suspense_list"):60120,Pw=Go?Symbol.for("react.memo"):60115,jw=Go?Symbol.for("react.lazy"):60116,xge=Go?Symbol.for("react.block"):60121,Pge=Go?Symbol.for("react.fundamental"):60117,jge=Go?Symbol.for("react.responder"):60118,Nge=Go?Symbol.for("react.scope"):60119;function Ui(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case VG:switch(e=e.type,e){case KG:case Aw:case Sw:case Fw:case Cw:case xw:return e;default:switch(e=e&&e.$$typeof,e){case Mw:case Lw:case jw:case Pw:case Gw:return e;default:return n}}case QG:return n}}}function X9(e){return Ui(e)===Aw}qt.AsyncMode=KG;qt.ConcurrentMode=Aw;qt.ContextConsumer=Mw;qt.ContextProvider=Gw;qt.Element=VG;qt.ForwardRef=Lw;qt.Fragment=Sw;qt.Lazy=jw;qt.Memo=Pw;qt.Portal=QG;qt.Profiler=Fw;qt.StrictMode=Cw;qt.Suspense=xw;qt.isAsyncMode=function(e){return X9(e)||Ui(e)===KG};qt.isConcurrentMode=X9;qt.isContextConsumer=function(e){return Ui(e)===Mw};qt.isContextProvider=function(e){return Ui(e)===Gw};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VG};qt.isForwardRef=function(e){return Ui(e)===Lw};qt.isFragment=function(e){return Ui(e)===Sw};qt.isLazy=function(e){return Ui(e)===jw};qt.isMemo=function(e){return Ui(e)===Pw};qt.isPortal=function(e){return Ui(e)===QG};qt.isProfiler=function(e){return Ui(e)===Fw};qt.isStrictMode=function(e){return Ui(e)===Cw};qt.isSuspense=function(e){return Ui(e)===xw};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Sw||e===Aw||e===Fw||e===Cw||e===xw||e===Lge||typeof e=="object"&&e!==null&&(e.$$typeof===jw||e.$$typeof===Pw||e.$$typeof===Gw||e.$$typeof===Mw||e.$$typeof===Lw||e.$$typeof===Pge||e.$$typeof===jge||e.$$typeof===Nge||e.$$typeof===xge)};qt.typeOf=Ui});var nk=Ge((UHa,ek)=>{"use strict";ek.exports=Z9()});var z_=Ge((ZHa,Uw)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function wRe(){this.__data__=[],this.size=0}Kk.exports=wRe});var hM=Ge((Jqa,Xk)=>{function ERe(e,n){return e===n||e!==e&&n!==n}Xk.exports=ERe});var oD=Ge((qqa,Zk)=>{var IRe=hM();function TRe(e,n){for(var a=e.length;a--;)if(IRe(e[a][0],n))return a;return-1}Zk.exports=TRe});var nB=Ge((Wqa,eB)=>{var SRe=oD(),CRe=Array.prototype,FRe=CRe.splice;function GRe(e){var n=this.__data__,a=SRe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():FRe.call(n,a,1),--this.size,!0}eB.exports=GRe});var tB=Ge(($qa,aB)=>{var MRe=oD();function ARe(e){var n=this.__data__,a=MRe(n,e);return a<0?void 0:n[a][1]}aB.exports=ARe});var oB=Ge((zqa,rB)=>{var LRe=oD();function xRe(e){return LRe(this.__data__,e)>-1}rB.exports=xRe});var iB=Ge((Vqa,uB)=>{var PRe=oD();function jRe(e,n){var a=this.__data__,t=PRe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}uB.exports=jRe});var uD=Ge((Qqa,lB)=>{var NRe=Yk(),ORe=nB(),URe=tB(),kRe=oB(),BRe=iB();function ed(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var HRe=uD();function JRe(){this.__data__=new HRe,this.size=0}cB.exports=JRe});var fB=Ge((Yqa,vB)=>{function qRe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}vB.exports=qRe});var pB=Ge((Xqa,_B)=>{function WRe(e){return this.__data__.get(e)}_B.exports=WRe});var mB=Ge((Zqa,dB)=>{function $Re(e){return this.__data__.has(e)}dB.exports=$Re});var DM=Ge((eWa,hB)=>{var zRe=typeof global=="object"&&global&&global.Object===Object&&global;hB.exports=zRe});var es=Ge((nWa,DB)=>{var VRe=DM(),QRe=typeof self=="object"&&self&&self.Object===Object&&self,KRe=VRe||QRe||Function("return this")();DB.exports=KRe});var u1=Ge((aWa,gB)=>{var YRe=es(),XRe=YRe.Symbol;gB.exports=XRe});var wB=Ge((tWa,bB)=>{var RB=u1(),yB=Object.prototype,ZRe=yB.hasOwnProperty,eye=yB.toString,iD=RB?RB.toStringTag:void 0;function nye(e){var n=ZRe.call(e,iD),a=e[iD];try{e[iD]=void 0;var t=!0}catch{}var r=eye.call(e);return t&&(n?e[iD]=a:delete e[iD]),r}bB.exports=nye});var IB=Ge((rWa,EB)=>{var aye=Object.prototype,tye=aye.toString;function rye(e){return tye.call(e)}EB.exports=rye});var lD=Ge((oWa,CB)=>{var TB=u1(),oye=wB(),uye=IB(),iye="[object Null]",lye="[object Undefined]",SB=TB?TB.toStringTag:void 0;function cye(e){return e==null?e===void 0?lye:iye:SB&&SB in Object(e)?oye(e):uye(e)}CB.exports=cye});var gM=Ge((uWa,FB)=>{function sye(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}FB.exports=sye});var RM=Ge((iWa,GB)=>{var vye=lD(),fye=gM(),_ye="[object AsyncFunction]",pye="[object Function]",dye="[object GeneratorFunction]",mye="[object Proxy]";function hye(e){if(!fye(e))return!1;var n=vye(e);return n==pye||n==dye||n==_ye||n==mye}GB.exports=hye});var AB=Ge((lWa,MB)=>{var Dye=es(),gye=Dye["__core-js_shared__"];MB.exports=gye});var PB=Ge((cWa,xB)=>{var yM=AB(),LB=function(){var e=/[^.]+$/.exec(yM&&yM.keys&&yM.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Rye(e){return!!LB&&LB in e}xB.exports=Rye});var bM=Ge((sWa,jB)=>{var yye=Function.prototype,bye=yye.toString;function wye(e){if(e!=null){try{return bye.call(e)}catch{}try{return e+""}catch{}}return""}jB.exports=wye});var OB=Ge((vWa,NB)=>{var Eye=RM(),Iye=PB(),Tye=gM(),Sye=bM(),Cye=/[\\^$.*+?()[\]{}|]/g,Fye=/^\[object .+?Constructor\]$/,Gye=Function.prototype,Mye=Object.prototype,Aye=Gye.toString,Lye=Mye.hasOwnProperty,xye=RegExp("^"+Aye.call(Lye).replace(Cye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pye(e){if(!Tye(e)||Iye(e))return!1;var n=Eye(e)?xye:Fye;return n.test(Sye(e))}NB.exports=Pye});var kB=Ge((fWa,UB)=>{function jye(e,n){return e==null?void 0:e[n]}UB.exports=jye});var Q_=Ge((_Wa,BB)=>{var Nye=OB(),Oye=kB();function Uye(e,n){var a=Oye(e,n);return Nye(a)?a:void 0}BB.exports=Uye});var i1=Ge((pWa,HB)=>{var kye=Q_(),Bye=es(),Hye=kye(Bye,"Map");HB.exports=Hye});var cD=Ge((dWa,JB)=>{var Jye=Q_(),qye=Jye(Object,"create");JB.exports=qye});var $B=Ge((mWa,WB)=>{var qB=cD();function Wye(){this.__data__=qB?qB(null):{},this.size=0}WB.exports=Wye});var VB=Ge((hWa,zB)=>{function $ye(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}zB.exports=$ye});var KB=Ge((DWa,QB)=>{var zye=cD(),Vye="__lodash_hash_undefined__",Qye=Object.prototype,Kye=Qye.hasOwnProperty;function Yye(e){var n=this.__data__;if(zye){var a=n[e];return a===Vye?void 0:a}return Kye.call(n,e)?n[e]:void 0}QB.exports=Yye});var XB=Ge((gWa,YB)=>{var Xye=cD(),Zye=Object.prototype,ebe=Zye.hasOwnProperty;function nbe(e){var n=this.__data__;return Xye?n[e]!==void 0:ebe.call(n,e)}YB.exports=nbe});var eH=Ge((RWa,ZB)=>{var abe=cD(),tbe="__lodash_hash_undefined__";function rbe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=abe&&n===void 0?tbe:n,this}ZB.exports=rbe});var aH=Ge((yWa,nH)=>{var obe=$B(),ube=VB(),ibe=KB(),lbe=XB(),cbe=eH();function nd(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var tH=aH(),sbe=uD(),vbe=i1();function fbe(){this.size=0,this.__data__={hash:new tH,map:new(vbe||sbe),string:new tH}}rH.exports=fbe});var iH=Ge((wWa,uH)=>{function _be(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}uH.exports=_be});var sD=Ge((EWa,lH)=>{var pbe=iH();function dbe(e,n){var a=e.__data__;return pbe(n)?a[typeof n=="string"?"string":"hash"]:a.map}lH.exports=dbe});var sH=Ge((IWa,cH)=>{var mbe=sD();function hbe(e){var n=mbe(this,e).delete(e);return this.size-=n?1:0,n}cH.exports=hbe});var fH=Ge((TWa,vH)=>{var Dbe=sD();function gbe(e){return Dbe(this,e).get(e)}vH.exports=gbe});var pH=Ge((SWa,_H)=>{var Rbe=sD();function ybe(e){return Rbe(this,e).has(e)}_H.exports=ybe});var mH=Ge((CWa,dH)=>{var bbe=sD();function wbe(e,n){var a=bbe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}dH.exports=wbe});var wM=Ge((FWa,hH)=>{var Ebe=oH(),Ibe=sH(),Tbe=fH(),Sbe=pH(),Cbe=mH();function ad(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var Fbe=uD(),Gbe=i1(),Mbe=wM(),Abe=200;function Lbe(e,n){var a=this.__data__;if(a instanceof Fbe){var t=a.__data__;if(!Gbe||t.length{var xbe=uD(),Pbe=sB(),jbe=fB(),Nbe=pB(),Obe=mB(),Ube=gH();function td(e){var n=this.__data__=new xbe(e);this.size=n.size}td.prototype.clear=Pbe;td.prototype.delete=jbe;td.prototype.get=Nbe;td.prototype.has=Obe;td.prototype.set=Ube;RH.exports=td});var wH=Ge((AWa,bH)=>{var kbe="__lodash_hash_undefined__";function Bbe(e){return this.__data__.set(e,kbe),this}bH.exports=Bbe});var IH=Ge((LWa,EH)=>{function Hbe(e){return this.__data__.has(e)}EH.exports=Hbe});var SH=Ge((xWa,TH)=>{var Jbe=wM(),qbe=wH(),Wbe=IH();function l1(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new Jbe;++n{function $be(e,n){for(var a=-1,t=e==null?0:e.length;++a{function zbe(e,n){return e.has(n)}GH.exports=zbe});var EM=Ge((NWa,AH)=>{var Vbe=SH(),Qbe=FH(),Kbe=MH(),Ybe=1,Xbe=2;function Zbe(e,n,a,t,r,u){var i=a&Ybe,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var m=u.get(e),p=u.get(n);if(m&&p)return m==n&&p==e;var g=-1,E=!0,b=a&Xbe?new Vbe:void 0;for(u.set(e,n),u.set(n,e);++g{var ewe=es(),nwe=ewe.Uint8Array;LH.exports=nwe});var jH=Ge((UWa,PH)=>{function awe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}PH.exports=awe});var OH=Ge((kWa,NH)=>{function twe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}NH.exports=twe});var JH=Ge((BWa,HH)=>{var UH=u1(),kH=xH(),rwe=hM(),owe=EM(),uwe=jH(),iwe=OH(),lwe=1,cwe=2,swe="[object Boolean]",vwe="[object Date]",fwe="[object Error]",_we="[object Map]",pwe="[object Number]",dwe="[object RegExp]",mwe="[object Set]",hwe="[object String]",Dwe="[object Symbol]",gwe="[object ArrayBuffer]",Rwe="[object DataView]",BH=UH?UH.prototype:void 0,IM=BH?BH.valueOf:void 0;function ywe(e,n,a,t,r,u,i){switch(a){case Rwe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case gwe:return!(e.byteLength!=n.byteLength||!u(new kH(e),new kH(n)));case swe:case vwe:case pwe:return rwe(+e,+n);case fwe:return e.name==n.name&&e.message==n.message;case dwe:case hwe:return e==n+"";case _we:var l=uwe;case mwe:var s=t&lwe;if(l||(l=iwe),e.size!=n.size&&!s)return!1;var m=i.get(e);if(m)return m==n;t|=cwe,i.set(e,n);var p=owe(l(e),l(n),t,r,u,i);return i.delete(e),p;case Dwe:if(IM)return IM.call(e)==IM.call(n)}return!1}HH.exports=ywe});var WH=Ge((HWa,qH)=>{function bwe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var wwe=Array.isArray;$H.exports=wwe});var VH=Ge((qWa,zH)=>{var Ewe=WH(),Iwe=c1();function Twe(e,n,a){var t=n(e);return Iwe(e)?t:Ewe(t,a(e))}zH.exports=Twe});var KH=Ge((WWa,QH)=>{function Swe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function Cwe(){return[]}YH.exports=Cwe});var nJ=Ge((zWa,eJ)=>{var Fwe=KH(),Gwe=XH(),Mwe=Object.prototype,Awe=Mwe.propertyIsEnumerable,ZH=Object.getOwnPropertySymbols,Lwe=ZH?function(e){return e==null?[]:(e=Object(e),Fwe(ZH(e),function(n){return Awe.call(e,n)}))}:Gwe;eJ.exports=Lwe});var tJ=Ge((VWa,aJ)=>{function xwe(e,n){for(var a=-1,t=Array(e);++a{function Pwe(e){return e!=null&&typeof e=="object"}rJ.exports=Pwe});var uJ=Ge((KWa,oJ)=>{var jwe=lD(),Nwe=vD(),Owe="[object Arguments]";function Uwe(e){return Nwe(e)&&jwe(e)==Owe}oJ.exports=Uwe});var sJ=Ge((YWa,cJ)=>{var iJ=uJ(),kwe=vD(),lJ=Object.prototype,Bwe=lJ.hasOwnProperty,Hwe=lJ.propertyIsEnumerable,Jwe=iJ(function(){return arguments}())?iJ:function(e){return kwe(e)&&Bwe.call(e,"callee")&&!Hwe.call(e,"callee")};cJ.exports=Jwe});var fJ=Ge((XWa,vJ)=>{function qwe(){return!1}vJ.exports=qwe});var TM=Ge((fD,rd)=>{var Wwe=es(),$we=fJ(),_J=typeof fD=="object"&&fD&&!fD.nodeType&&fD,pJ=_J&&typeof rd=="object"&&rd&&!rd.nodeType&&rd,zwe=pJ&&pJ.exports===_J,dJ=zwe?Wwe.Buffer:void 0,Vwe=dJ?dJ.isBuffer:void 0,Qwe=Vwe||$we;rd.exports=Qwe});var hJ=Ge((ZWa,mJ)=>{var Kwe=9007199254740991,Ywe=/^(?:0|[1-9]\d*)$/;function Xwe(e,n){var a=typeof e;return n=n==null?Kwe:n,!!n&&(a=="number"||a!="symbol"&&Ywe.test(e))&&e>-1&&e%1==0&&e{var Zwe=9007199254740991;function e1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zwe}DJ.exports=e1e});var RJ=Ge((n$a,gJ)=>{var n1e=lD(),a1e=SM(),t1e=vD(),r1e="[object Arguments]",o1e="[object Array]",u1e="[object Boolean]",i1e="[object Date]",l1e="[object Error]",c1e="[object Function]",s1e="[object Map]",v1e="[object Number]",f1e="[object Object]",_1e="[object RegExp]",p1e="[object Set]",d1e="[object String]",m1e="[object WeakMap]",h1e="[object ArrayBuffer]",D1e="[object DataView]",g1e="[object Float32Array]",R1e="[object Float64Array]",y1e="[object Int8Array]",b1e="[object Int16Array]",w1e="[object Int32Array]",E1e="[object Uint8Array]",I1e="[object Uint8ClampedArray]",T1e="[object Uint16Array]",S1e="[object Uint32Array]",dr={};dr[g1e]=dr[R1e]=dr[y1e]=dr[b1e]=dr[w1e]=dr[E1e]=dr[I1e]=dr[T1e]=dr[S1e]=!0;dr[r1e]=dr[o1e]=dr[h1e]=dr[u1e]=dr[D1e]=dr[i1e]=dr[l1e]=dr[c1e]=dr[s1e]=dr[v1e]=dr[f1e]=dr[_1e]=dr[p1e]=dr[d1e]=dr[m1e]=!1;function C1e(e){return t1e(e)&&a1e(e.length)&&!!dr[n1e(e)]}gJ.exports=C1e});var bJ=Ge((a$a,yJ)=>{function F1e(e){return function(n){return e(n)}}yJ.exports=F1e});var EJ=Ge((pD,od)=>{var G1e=DM(),wJ=typeof pD=="object"&&pD&&!pD.nodeType&&pD,_D=wJ&&typeof od=="object"&&od&&!od.nodeType&&od,M1e=_D&&_D.exports===wJ,CM=M1e&&G1e.process,A1e=function(){try{var e=_D&&_D.require&&_D.require("util").types;return e||CM&&CM.binding&&CM.binding("util")}catch{}}();od.exports=A1e});var FM=Ge((t$a,SJ)=>{var L1e=RJ(),x1e=bJ(),IJ=EJ(),TJ=IJ&&IJ.isTypedArray,P1e=TJ?x1e(TJ):L1e;SJ.exports=P1e});var FJ=Ge((r$a,CJ)=>{var j1e=tJ(),N1e=sJ(),O1e=c1(),U1e=TM(),k1e=hJ(),B1e=FM(),H1e=Object.prototype,J1e=H1e.hasOwnProperty;function q1e(e,n){var a=O1e(e),t=!a&&N1e(e),r=!a&&!t&&U1e(e),u=!a&&!t&&!r&&B1e(e),i=a||t||r||u,l=i?j1e(e.length,String):[],s=l.length;for(var m in e)(n||J1e.call(e,m))&&!(i&&(m=="length"||r&&(m=="offset"||m=="parent")||u&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||k1e(m,s)))&&l.push(m);return l}CJ.exports=q1e});var MJ=Ge((o$a,GJ)=>{var W1e=Object.prototype;function $1e(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||W1e;return e===a}GJ.exports=$1e});var LJ=Ge((u$a,AJ)=>{function z1e(e,n){return function(a){return e(n(a))}}AJ.exports=z1e});var PJ=Ge((i$a,xJ)=>{var V1e=LJ(),Q1e=V1e(Object.keys,Object);xJ.exports=Q1e});var NJ=Ge((l$a,jJ)=>{var K1e=MJ(),Y1e=PJ(),X1e=Object.prototype,Z1e=X1e.hasOwnProperty;function eEe(e){if(!K1e(e))return Y1e(e);var n=[];for(var a in Object(e))Z1e.call(e,a)&&a!="constructor"&&n.push(a);return n}jJ.exports=eEe});var UJ=Ge((c$a,OJ)=>{var nEe=RM(),aEe=SM();function tEe(e){return e!=null&&aEe(e.length)&&!nEe(e)}OJ.exports=tEe});var BJ=Ge((s$a,kJ)=>{var rEe=FJ(),oEe=NJ(),uEe=UJ();function iEe(e){return uEe(e)?rEe(e):oEe(e)}kJ.exports=iEe});var JJ=Ge((v$a,HJ)=>{var lEe=VH(),cEe=nJ(),sEe=BJ();function vEe(e){return lEe(e,sEe,cEe)}HJ.exports=vEe});var $J=Ge((f$a,WJ)=>{var qJ=JJ(),fEe=1,_Ee=Object.prototype,pEe=_Ee.hasOwnProperty;function dEe(e,n,a,t,r,u){var i=a&fEe,l=qJ(e),s=l.length,m=qJ(n),p=m.length;if(s!=p&&!i)return!1;for(var g=s;g--;){var E=l[g];if(!(i?E in n:pEe.call(n,E)))return!1}var b=u.get(e),I=u.get(n);if(b&&I)return b==n&&I==e;var L=!0;u.set(e,n),u.set(n,e);for(var N=i;++g{var mEe=Q_(),hEe=es(),DEe=mEe(hEe,"DataView");zJ.exports=DEe});var KJ=Ge((p$a,QJ)=>{var gEe=Q_(),REe=es(),yEe=gEe(REe,"Promise");QJ.exports=yEe});var XJ=Ge((d$a,YJ)=>{var bEe=Q_(),wEe=es(),EEe=bEe(wEe,"Set");YJ.exports=EEe});var eq=Ge((m$a,ZJ)=>{var IEe=Q_(),TEe=es(),SEe=IEe(TEe,"WeakMap");ZJ.exports=SEe});var lq=Ge((h$a,iq)=>{var GM=VJ(),MM=i1(),AM=KJ(),LM=XJ(),xM=eq(),nq=lD(),ud=bM(),aq="[object Map]",CEe="[object Object]",tq="[object Promise]",rq="[object Set]",oq="[object WeakMap]",uq="[object DataView]",FEe=ud(GM),GEe=ud(MM),MEe=ud(AM),AEe=ud(LM),LEe=ud(xM),K_=nq;(GM&&K_(new GM(new ArrayBuffer(1)))!=uq||MM&&K_(new MM)!=aq||AM&&K_(AM.resolve())!=tq||LM&&K_(new LM)!=rq||xM&&K_(new xM)!=oq)&&(K_=function(e){var n=nq(e),a=n==CEe?e.constructor:void 0,t=a?ud(a):"";if(t)switch(t){case FEe:return uq;case GEe:return aq;case MEe:return tq;case AEe:return rq;case LEe:return oq}return n});iq.exports=K_});var mq=Ge((D$a,dq)=>{var PM=yH(),xEe=EM(),PEe=JH(),jEe=$J(),cq=lq(),sq=c1(),vq=TM(),NEe=FM(),OEe=1,fq="[object Arguments]",_q="[object Array]",s1="[object Object]",UEe=Object.prototype,pq=UEe.hasOwnProperty;function kEe(e,n,a,t,r,u){var i=sq(e),l=sq(n),s=i?_q:cq(e),m=l?_q:cq(n);s=s==fq?s1:s,m=m==fq?s1:m;var p=s==s1,g=m==s1,E=s==m;if(E&&vq(e)){if(!vq(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new PM),i||NEe(e)?xEe(e,n,a,t,r,u):PEe(e,n,s,a,t,r,u);if(!(a&OEe)){var b=p&&pq.call(e,"__wrapped__"),I=g&&pq.call(n,"__wrapped__");if(b||I){var L=b?e.value():e,N=I?n.value():n;return u||(u=new PM),r(L,N,a,t,u)}}return E?(u||(u=new PM),jEe(e,n,a,t,r,u)):!1}dq.exports=kEe});var Rq=Ge((g$a,gq)=>{var BEe=mq(),hq=vD();function Dq(e,n,a,t,r){return e===n?!0:e==null||n==null||!hq(e)&&!hq(n)?e!==e&&n!==n:BEe(e,n,a,t,Dq,r)}gq.exports=Dq});var bq=Ge((R$a,yq)=>{var HEe=Rq();function JEe(e,n){return HEe(e,n)}yq.exports=JEe});var uW=Ge((xVa,hIe)=>{hIe.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 TK=Ge((ag,CL)=>{typeof window!="undefined"&&function(n,a){typeof ag=="object"&&typeof CL=="object"?CL.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ag=="object"?ag.Hls=a():n.Hls=a()}(ag,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="/dist/",a(a.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(e,n,a){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(r=!1));function i(p,g,E){this.fn=p,this.context=g,this.once=E||!1}function l(p,g,E,b,I){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,b||p,I),N=r?r+g:g;return p._events[N]?p._events[N].fn?p._events[N]=[p._events[N],L]:p._events[N].push(L):(p._events[N]=L,p._eventsCount++),p}function s(p,g){--p._eventsCount==0?p._events=new u:delete p._events[g]}function m(){this._events=new u,this._eventsCount=0}m.prototype.eventNames=function(){var g=[],E,b;if(this._eventsCount===0)return g;for(b in E=this._events)t.call(E,b)&&g.push(r?b.slice(1):b);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(E)):g},m.prototype.listeners=function(g){var E=r?r+g:g,b=this._events[E];if(!b)return[];if(b.fn)return[b.fn];for(var I=0,L=b.length,N=new Array(L);I0},!1)}function p(g,E){for(var b={main:[E]},I={main:[]},L={main:{}};m(b);)for(var N=Object.keys(b),z=0;z>>8^Pa&255^99,ne[Kn]=Pa,ue[Pa]=Kn;var Ga=yn[Kn],sa=yn[Ga],At=yn[sa],qe=yn[Pa]*257^Pa*16843008;Y[Kn]=qe<<24|qe>>>8,X[Kn]=qe<<16|qe>>>16,ve[Kn]=qe<<8|qe>>>24,xe[Kn]=qe,qe=At*16843009^sa*65537^Ga*257^Kn*16843008,rn[Pa]=qe<<24|qe>>>8,wn[Pa]=qe<<16|qe>>>16,dn[Pa]=qe<<8|qe>>>24,mn[Pa]=qe,Kn?(Kn=Ga^yn[yn[yn[At^Ga]]],zn^=yn[yn[zn]]):Kn=zn=1}},z.expandKey=function(ne){for(var ue=this.uint8ArrayToUint32Array_(ne),Z=!0,Y=0;Y>>6)+1,j=(K[O+2]&60)>>>2,j>Ee.length-1){J.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+j});return}return V=(K[O+2]&1)<<2,V|=(K[O+3]&192)>>>6,l.logger.log("manifest codec:"+T+",ADTS data:type:"+x+",sampleingIndex:"+j+"["+Ee[j]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?j>=6?(x=5,le=new Array(4),W=j-3):(x=2,le=new Array(2),W=j):ie.indexOf("android")!==-1?(x=2,le=new Array(2),W=j):(x=5,le=new Array(4),T&&(T.indexOf("mp4a.40.29")!==-1||T.indexOf("mp4a.40.5")!==-1)||!T&&j>=6?W=j-3:((T&&T.indexOf("mp4a.40.2")!==-1&&(j>=6&&V===1||/vivaldi/i.test(ie))||!T&&V===1)&&(x=2,le=new Array(2)),W=j)),le[0]=x<<3,le[0]|=(j&14)>>1,le[1]|=(j&1)<<7,le[1]|=V<<3,x===5&&(le[1]|=(W&14)>>1,le[2]=(W&1)<<7,le[2]|=2<<2,le[3]=0),{config:le,samplerate:Ee[j],channelCount:V,codec:"mp4a.40."+x,manifestCodec:ge}}function p(J,K){return J[K]===255&&(J[K+1]&246)==240}function g(J,K){return J[K+1]&1?7:9}function E(J,K){return(J[K+3]&3)<<11|J[K+4]<<3|(J[K+5]&224)>>>5}function b(J,K){return!!(K+10&&K+j+W<=le)return V=O+T*x,{headerLength:j,frameLength:W,stamp:V}}function $(J,K,O,T,x){var j=N(J.samplerate),W=z(K,O,T,x,j);if(W){var V=W.stamp,le=W.headerLength,ie=W.frameLength,ge={unit:K.subarray(O+le,O+le+ie),pts:V,dts:V};return J.samples.push(ge),{sample:ge,length:ie+le}}}var ne=a("./src/demux/id3.js"),ue=function(){function J(O,T,x){this.observer=O,this.config=x,this.remuxer=T}var K=J.prototype;return K.resetInitSegment=function(T,x,j,W){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:x,duration:W,inputTimeScale:9e4}},K.resetTimeStamp=function(){},J.probe=function(T){if(!T)return!1;for(var x=ne.default.getID3Data(T,0)||[],j=x.length,W=T.length;jO.length)){var W=this.parseHeader(O,T);if(W&&T+W.frameLength<=O.length){var V=W.samplesPerFrame*9e4/W.sampleRate,le=x+j*V,ie={unit:O.subarray(T,T+W.frameLength),pts:le,dts:le};return K.config=[],K.channelCount=W.channelCount,K.samplerate=W.sampleRate,K.samples.push(ie),{sample:ie,length:W.frameLength}}}},parseHeader:function(K,O){var T=K[O+1]>>3&3,x=K[O+1]>>1&3,j=K[O+2]>>4&15,W=K[O+2]>>2&3,V=K[O+2]>>1&1;if(T!==1&&j!==0&&j!==15&&W!==3){var le=T===3?3-x:x===3?3:4,ie=X.BitratesMap[le*14+j-1]*1e3,ge=T===3?0:T===2?1:2,Ee=X.SamplingRateMap[ge*3+W],Fe=K[O+3]>>6==3?1:2,Ae=X.SamplesCoefficients[T][x],un=X.BytesInSlot[x],hn=Ae*8*un,Pe=parseInt(Ae*ie/Ee+V,10)*un;return{sampleRate:Ee,channelCount:Fe,frameLength:Pe,samplesPerFrame:hn}}},isHeaderPattern:function(K,O){return K[O]===255&&(K[O+1]&224)==224&&(K[O+1]&6)!=0},isHeader:function(K,O){return!!(O+1T?(this.word<<=T,this.bitsAvailable-=T):(T-=this.bitsAvailable,x=T>>3,T-=x>>3,this.bytesAvailable-=x,this.loadWord(),this.word<<=T,this.bitsAvailable-=T)},K.readBits=function(T){var x=Math.min(this.bitsAvailable,T),j=this.word>>>32-x;return T>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=x,this.bitsAvailable>0?this.word<<=x:this.bytesAvailable>0&&this.loadWord(),x=T-x,x>0&&this.bitsAvailable?j<>>T)!=0)return this.word<<=T,this.bitsAvailable-=T,T;return this.loadWord(),T+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var T=this.skipLZ();return this.readBits(T+1)-1},K.readEG=function(){var T=this.readUEG();return 1&T?1+T>>>1:-1*(T>>>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(T){var x=8,j=8,W,V;for(W=0;W=T.length){j();return}if(!(T[x].unit.length<32)){var W=this.decrypter.isSync();if(this.decryptAacSample(T,x,j,W),!W)return}}},K.getAvcEncryptedData=function(T){for(var x=Math.floor((T.length-48)/160)*16+16,j=new Int8Array(x),W=0,V=32;V<=T.length-16;V+=160,W+=16)j.set(T.subarray(V,V+16),W);return j},K.getAvcDecryptedUnit=function(T,x){x=new Uint8Array(x);for(var j=0,W=32;W<=T.length-16;W+=160,j+=16)T.set(x.subarray(j,j+16),W);return T},K.decryptAvcSample=function(T,x,j,W,V,le){var ie=this.discardEPB(V.data),ge=this.getAvcEncryptedData(ie),Ee=this;this.decryptBuffer(ge.buffer,function(Fe){V.data=Ee.getAvcDecryptedUnit(ie,Fe),le||Ee.decryptAvcSamples(T,x,j+1,W)})},K.decryptAvcSamples=function(T,x,j,W){for(;;x++,j=0){if(x>=T.length){W();return}for(var V=T[x].units;!(j>=V.length);j++){var le=V[j];if(!(le.length<=48||le.type!==1&&le.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(T,x,j,W,le,ie),!ie)return}}}},J}(),wn=rn,dn={video:1,audio:2,id3:3,text:4},mn=function(){function J(O,T,x,j){this.observer=O,this.config=x,this.typeSupported=j,this.remuxer=T,this.sampleAes=null}var K=J.prototype;return K.setDecryptData=function(T){T!=null&&T.key!=null&&T.method==="SAMPLE-AES"?this.sampleAes=new wn(this.observer,this.config,T,this.discardEPB):this.sampleAes=null},J.probe=function(T){var x=J._syncOffset(T);return x<0?!1:(x&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},J._syncOffset=function(T){for(var x=Math.min(1e3,T.length-3*188),j=0;j>4,Ee>1){if(Fe=V+5+T[V+4],Fe===V+188)continue}else Fe=V+4;switch(ge){case _a:ie&&(mt&&(Ae=mr(mt))&&Pr(Ae,!1),mt={data:[],size:0}),mt&&(mt.data.push(T.subarray(Fe,V+188)),mt.size+=V+188-Fe);break;case rt:ie&&(ja&&(Ae=mr(ja))&&(En.isAAC?Do(Ae):Ir(Ae)),ja={data:[],size:0}),ja&&(ja.data.push(T.subarray(Fe,V+188)),ja.size+=V+188-Fe);break;case Ut:ie&&($t&&(Ae=mr($t))&&eu(Ae),$t={data:[],size:0}),$t&&($t.data.push(T.subarray(Fe,V+188)),$t.size+=V+188-Fe);break;case 0:ie&&(Fe+=T[Fe]+1),ya=this._pmtId=Ka(T,Fe);break;case ya:ie&&(Fe+=T[Fe]+1);var cr=Ct(T,Fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);_a=cr.avc,_a>0&&(Pe.pid=_a),rt=cr.audio,rt>0&&(En.pid=rt,En.isAAC=cr.isAAC),Ut=cr.id3,Ut>0&&(Vn.pid=Ut),un&&!hn&&(l.logger.log("reparse from beginning"),un=!1,V=jr-188),hn=this.pmtParsed=!0;break;case 17:case 8191:break;default:un=!0;break}}else this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});mt&&(Ae=mr(mt))?(Pr(Ae,!0),Pe.pesData=null):Pe.pesData=mt,ja&&(Ae=mr(ja))?(En.isAAC?Do(Ae):Ir(Ae),En.pesData=null):(ja&&ja.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),En.pesData=ja),$t&&(Ae=mr($t))?(eu(Ae),Vn.pesData=null):Vn.pesData=$t,this.sampleAes==null?this.remuxer.remux(En,Pe,Vn,this._txtTrack,x,j,W):this.decryptAndRemux(En,Pe,Vn,this._txtTrack,x,j,W)},K.decryptAndRemux=function(T,x,j,W,V,le,ie){if(T.samples&&T.isAAC){var ge=this;this.sampleAes.decryptAacSamples(T.samples,0,function(){ge.decryptAndRemuxAvc(T,x,j,W,V,le,ie)})}else this.decryptAndRemuxAvc(T,x,j,W,V,le,ie)},K.decryptAndRemuxAvc=function(T,x,j,W,V,le,ie){if(x.samples){var ge=this;this.sampleAes.decryptAvcSamples(x.samples,0,0,function(){ge.remuxer.remux(T,x,j,W,V,le,ie)})}else this.remuxer.remux(T,x,j,W,V,le,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(T,x){return(T[x+10]&31)<<8|T[x+11]},K._parsePMT=function(T,x,j,W){var V,le,ie,ge,Ee={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(T[x+1]&15)<<8|T[x+2],le=x+3+V-4,ie=(T[x+10]&15)<<8|T[x+11],x+=12+ie;x1;){var hn=new Uint8Array(un[0].length+un[1].length);hn.set(un[0]),hn.set(un[1],un[0].length),un[0]=hn,un.splice(1,1)}if(j=un[0],V=(j[0]<<16)+(j[1]<<8)+j[2],V===1){if(le=(j[4]<<8)+j[5],le&&le>T.size-6||(W=j[7],W&192&&(Ee=(j[9]&14)*536870912+(j[10]&255)*4194304+(j[11]&254)*16384+(j[12]&255)*128+(j[13]&254)/2,Ee>4294967295&&(Ee-=8589934592),W&64?(Fe=(j[14]&14)*536870912+(j[15]&255)*4194304+(j[16]&254)*16384+(j[17]&255)*128+(j[18]&254)/2,Fe>4294967295&&(Fe-=8589934592),Ee-Fe>60*9e4&&(l.logger.warn(Math.round((Ee-Fe)/9e4)+"s delta between PTS and DTS, align them"),Ee=Fe)):Fe=Ee),ie=j[8],Ae=ie+9,T.size<=Ae))return null;T.size-=Ae,ge=new Uint8Array(T.size);for(var Pe=0,En=un.length;PeVn){Ae-=Vn;continue}else j=j.subarray(Ae),Vn-=Ae,Ae=0;ge.set(j,x),x+=Vn}return le&&(le-=ie+3),{data:ge,pts:Ee,dts:Fe,len:le}}else return null},K.pushAccesUnit=function(T,x){if(T.units.length&&T.frame){var j=x.samples,W=j.length;if(isNaN(T.pts))if(W){var V=j[W-1];T.pts=V.pts,T.dts=V.dts}else{x.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||T.key===!0||x.sps&&(W||this.contiguous)?(T.id=W,j.push(T)):x.dropped++}T.debug.length&&l.logger.log(T.pts+"/"+T.dts+":"+T.debug)},K._parseAVCPES=function(T,x){var j=this,W=this._avcTrack,V=this._parseAVCNALu(T.data),le=!1,ie,ge=this.avcSample,Ee,Fe=!1,Ae,un=this.pushAccesUnit.bind(this),hn=function(En,Vn,_a,rt){return{key:En,pts:Vn,dts:_a,units:[],debug:rt}};T.data=null,ge&&V.length&&!W.audFound&&(un(ge,W),ge=this.avcSample=hn(!1,T.pts,T.dts,"")),V.forEach(function(Pe){switch(Pe.type){case 1:Ee=!0,ge||(ge=j.avcSample=hn(!0,T.pts,T.dts,"")),le&&(ge.debug+="NDR "),ge.frame=!0;var En=Pe.data;if(Fe&&En.length>4){var Vn=new ke(En).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(ge.key=!0)}break;case 5:Ee=!0,ge||(ge=j.avcSample=hn(!0,T.pts,T.dts,"")),le&&(ge.debug+="IDR "),ge.key=!0,ge.frame=!0;break;case 6:Ee=!0,le&&ge&&(ge.debug+="SEI "),ie=new ke(j.discardEPB(Pe.data)),ie.readUByte();for(var _a=0,rt=0,Ut=!1,ya=0;!Ut&&ie.bytesAvailable>1;){_a=0;do ya=ie.readUByte(),_a+=ya;while(ya===255);rt=0;do ya=ie.readUByte(),rt+=ya;while(ya===255);if(_a===4&&ie.bytesAvailable!==0){Ut=!0;var mt=ie.readUByte();if(mt===181){var ja=ie.readUShort();if(ja===49){var $t=ie.readUInt();if($t===1195456820){var Ka=ie.readUByte();if(Ka===3){var Ct=ie.readUByte(),mr=ie.readUByte(),Pr=31&Ct,Do=[Ct,mr];for(Ae=0;Ae16){var Ir=[];for(Ae=0;Ae<16;Ae++)Ir.push(ie.readUByte().toString(16)),(Ae===3||Ae===5||Ae===7||Ae===9)&&Ir.push("-");var eu=rt-16,jr=new Uint8Array(eu);for(Ae=0;Ae0){if(x.pts>=T[j-1].pts)T.push(x);else for(var W=j-1;W>=0;W--)if(x.pts=0)Fe={data:T.subarray(un,x-ie-1),type:hn},Ee.push(Fe);else{var Pe=this._getLastNalUnit();if(Pe&&(ge&&x<=4-ge&&Pe.state&&(Pe.data=Pe.data.subarray(0,Pe.data.byteLength-ge)),V=x-ie-1,V>0)){var En=new Uint8Array(Pe.data.byteLength+V);En.set(Pe.data,0),En.set(T.subarray(0,V),Pe.data.byteLength),Pe.data=En}}x=0&&ie>=0&&(Fe={data:T.subarray(un,j),type:hn,state:ie},Ee.push(Fe)),Ee.length===0){var Vn=this._getLastNalUnit();if(Vn){var _a=new Uint8Array(Vn.data.byteLength+T.byteLength);_a.set(Vn.data,0),_a.set(T,Vn.data.byteLength),Vn.data=_a}}return le.naluState=ie,Ee},K.discardEPB=function(T){for(var x=T.byteLength,j=[],W=1,V,le;W1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-W)/90)),W=Vn)}for(;Fe>24&255,V[1]=x>>16&255,V[2]=x>>8&255,V[3]=x&255,V.set(O,4),j=0,x=8;j>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,85,196,0,0]))},J.mdia=function(O){return J.box(J.types.mdia,J.mdhd(O.timescale,O.duration),J.hdlr(O.type),J.minf(O))},J.mfhd=function(O){return J.box(J.types.mfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255]))},J.minf=function(O){return O.type==="audio"?J.box(J.types.minf,J.box(J.types.smhd,J.SMHD),J.DINF,J.stbl(O)):J.box(J.types.minf,J.box(J.types.vmhd,J.VMHD),J.DINF,J.stbl(O))},J.moof=function(O,T,x){return J.box(J.types.moof,J.mfhd(O),J.traf(x,T))},J.moov=function(O){for(var T=O.length,x=[];T--;)x[T]=J.trak(O[T]);return J.box.apply(null,[J.types.moov,J.mvhd(O[0].timescale,O[0].duration)].concat(x).concat(J.mvex(O)))},J.mvex=function(O){for(var T=O.length,x=[];T--;)x[T]=J.trex(O[T]);return J.box.apply(null,[J.types.mvex].concat(x))},J.mvhd=function(O,T){T*=O;var x=Math.floor(T/(Ga+1)),j=Math.floor(T%(Ga+1)),W=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,O>>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return J.box(J.types.mvhd,W)},J.sdtp=function(O){var T=O.samples||[],x=new Uint8Array(4+T.length),j,W;for(W=0;W>>8&255),T.push(V&255),T=T.concat(Array.prototype.slice.call(W));for(j=0;j>>8&255),x.push(V&255),x=x.concat(Array.prototype.slice.call(W));var le=J.box(J.types.avcC,new Uint8Array([1,T[3],T[4],T[5],252|3,224|O.sps.length].concat(T).concat([O.pps.length]).concat(x))),ie=O.width,ge=O.height,Ee=O.pixelRatio[0],Fe=O.pixelRatio[1];return J.box(J.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,ie>>8&255,ie&255,ge>>8&255,ge&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),le,J.box(J.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),J.box(J.types.pasp,new Uint8Array([Ee>>24,Ee>>16&255,Ee>>8&255,Ee&255,Fe>>24,Fe>>16&255,Fe>>8&255,Fe&255])))},J.esds=function(O){var T=O.config.length;return new Uint8Array([0,0,0,0,3,23+T,0,1,0,4,15+T,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([T]).concat(O.config).concat([6,1,2]))},J.mp4a=function(O){var T=O.samplerate;return J.box(J.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]),J.box(J.types.esds,J.esds(O)))},J.mp3=function(O){var T=O.samplerate;return J.box(J.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]))},J.stsd=function(O){return O.type==="audio"?!O.isAAC&&O.codec==="mp3"?J.box(J.types.stsd,J.STSD,J.mp3(O)):J.box(J.types.stsd,J.STSD,J.mp4a(O)):J.box(J.types.stsd,J.STSD,J.avc1(O))},J.tkhd=function(O){var T=O.id,x=O.duration*O.timescale,j=O.width,W=O.height,V=Math.floor(x/(Ga+1)),le=Math.floor(x%(Ga+1));return J.box(J.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,le>>24,le>>16&255,le>>8&255,le&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,j>>8&255,j&255,0,0,W>>8&255,W&255,0,0]))},J.traf=function(O,T){var x=J.sdtp(O),j=O.id,W=Math.floor(T/(Ga+1)),V=Math.floor(T%(Ga+1));return J.box(J.types.traf,J.box(J.types.tfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255])),J.box(J.types.tfdt,new Uint8Array([1,0,0,0,W>>24,W>>16&255,W>>8&255,W&255,V>>24,V>>16&255,V>>8&255,V&255])),J.trun(O,x.length+16+20+8+16+8+8),x)},J.trak=function(O){return O.duration=O.duration||4294967295,J.box(J.types.trak,J.tkhd(O),J.mdia(O))},J.trex=function(O){var T=O.id;return J.box(J.types.trex,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},J.trun=function(O,T){var x=O.samples||[],j=x.length,W=12+16*j,V=new Uint8Array(W),le,ie,ge,Ee,Fe,Ae;for(T+=8+W,V.set([0,0,15,1,j>>>24&255,j>>>16&255,j>>>8&255,j&255,T>>>24&255,T>>>16&255,T>>>8&255,T&255],0),le=0;le>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255,Fe.isLeading<<2|Fe.dependsOn,Fe.isDependedOn<<6|Fe.hasRedundancy<<4|Fe.paddingValue<<1|Fe.isNonSync,Fe.degradPrio&240<<8,Fe.degradPrio&15,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255],12+16*le);return J.box(J.types.trun,V)},J.initSegment=function(O){J.types||J.init();var T=J.moov(O),x;return x=new Uint8Array(J.FTYP.byteLength+T.byteLength),x.set(J.FTYP),x.set(T,J.FTYP.byteLength),x},J}(),At=sa,qe=9e4;function pa(J,K,O,T){return O===void 0&&(O=1),T===void 0&&(T=!1),Qa(J,K,1/O)}function Qa(J,K,O,T){O===void 0&&(O=1),T===void 0&&(T=!1);var x=J*K*O;return T?Math.round(x):x}function Tn(J,K){return K===void 0&&(K=!1),Qa(J,1e3,1/qe,K)}function Dn(J,K){return K===void 0&&(K=1),Qa(J,qe,1/K)}var We=Dn(10),ea=Dn(.2),va=function(){function J(O,T,x,j){this.observer=O,this.config=T,this.typeSupported=x;var W=navigator.userAgent;this.isSafari=j&&j.indexOf("Apple")>-1&&W&&!W.match("CriOS"),this.ISGenerated=!1}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(T){this._initPTS=this._initDTS=T},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(T,x,j,W,V,le,ie){if(this.ISGenerated||this.generateIS(T,x,V),this.ISGenerated){var ge=T.samples.length,Ee=x.samples.length,Fe=V,Ae=V;if(ge&&Ee){var un=(T.samples[0].pts-x.samples[0].pts)/x.inputTimeScale;Fe+=Math.max(0,un),Ae+=Math.max(0,-un)}if(ge){T.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(T,x,V));var hn=this.remuxAudio(T,Fe,le,ie);if(Ee){var Pe;hn&&(Pe=hn.endPTS-hn.startPTS),x.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(T,x,V)),this.remuxVideo(x,Ae,le,Pe,ie)}}else if(Ee){var En=this.remuxVideo(x,Ae,le,0,ie);En&&T.codec&&this.remuxEmptyAudio(T,Fe,le,En)}}j.samples.length&&this.remuxID3(j,V),W.samples.length&&this.remuxText(W,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(T,x,j){var W=this.observer,V=T.samples,le=x.samples,ie=this.typeSupported,ge="audio/mp4",Ee={},Fe={tracks:Ee},Ae=this._initPTS===void 0,un,hn;if(Ae&&(un=hn=1/0),T.config&&V.length&&(T.timescale=T.samplerate,l.logger.log("audio sampling rate : "+T.samplerate),T.isAAC||(ie.mpeg?(ge="audio/mpeg",T.codec=""):ie.mp3&&(T.codec="mp3")),Ee.audio={container:ge,codec:T.codec,initSegment:!T.isAAC&&ie.mpeg?new Uint8Array:At.initSegment([T]),metadata:{channelCount:T.channelCount}},Ae&&(un=hn=V[0].pts-T.inputTimeScale*j)),x.sps&&x.pps&&le.length){var Pe=x.inputTimeScale;x.timescale=Pe,Ee.video={container:"video/mp4",codec:x.codec,initSegment:At.initSegment([x]),metadata:{width:x.width,height:x.height}},Ae&&(un=Math.min(un,le[0].pts-Pe*j),hn=Math.min(hn,le[0].dts-Pe*j),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:un}))}Object.keys(Ee).length?(W.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Fe),this.ISGenerated=!0,Ae&&(this._initPTS=un,this._initDTS=hn)):W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(T,x,j,W,V){var le=8,ie,ge,Ee,Fe,Ae,un,hn,Pe=T.timescale,En=T.samples,Vn=[],_a=En.length,rt=this._PTSNormalize,Ut=this._initPTS,ya=this.nextAvcDts,mt=this.isSafari;if(_a!==0){mt&&(j|=En.length&&ya&&(V&&Math.abs(x-ya/Pe)<.1||Math.abs(En[0].pts-ya-Ut)1?l.logger.log("AVC: "+Tn(Ct,!0)+" ms hole between fragments detected,filling it"):Ct<-1&&l.logger.log("AVC: "+Tn(-Ct,!0)+" ms overlapping between fragments detected"),Ae=ya,En[0].dts=Ae,Fe=Math.max(Fe-Ct,ya),En[0].pts=Fe,l.logger.log("Video: PTS/DTS adjusted: "+Tn(Fe,!0)+"/"+Tn(Ae,!0)+", delta: "+Tn(Ct,!0)+" ms")),Ka=En[En.length-1],hn=Math.max(Ka.dts,0),un=Math.max(Ka.pts,0,hn),mt&&(ie=Math.round((hn-Ae)/(En.length-1)));for(var mr=0,Pr=0,Do=0;Do<_a;Do++){for(var Ir=En[Do],eu=Ir.units,jr=eu.length,cr=0,Qr=0;Qr0?xo-1:xo].dts;if(vs.stretchShortVideoTrack){var Vi=vs.maxBufferHole,Jd=Math.floor(Vi*Pe),Pf=(W?Fe+W*Pe:this.nextAudioPts)-Kr.pts;Pf>Jd?(ie=Pf-xl,ie<0&&(ie=xl),l.logger.log("It is approximately "+Tn(Pf,!1)+" ms to the next segment; using duration "+Tn(ie,!1)+" ms for the last video frame.")):ie=xl}else ie=xl}zi=Math.round(Kr.pts-Kr.dts)}Vn.push({size:mi,duration:ie,cts:zi,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:Kr.key?2:1,isNonSync:Kr.key?0:1}})}this.nextAvcDts=hn+ie;var g0=T.dropped;if(T.nbNalu=0,T.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var R0=Vn[0].flags;R0.dependsOn=2,R0.isNonSync=0}T.samples=Vn,Ee=At.moof(T.sequenceNumber++,Ae,T),T.samples=[];var Qi={data1:Ee,data2:ge,startPTS:Fe/Pe,endPTS:(un+ie)/Pe,startDTS:Ae/Pe,endDTS:this.nextAvcDts/Pe,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:g0};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Qi),Qi}},K.remuxAudio=function(T,x,j,W){var V=T.inputTimeScale,le=T.timescale,ie=V/le,ge=T.isAAC?1024:1152,Ee=ge*ie,Fe=this._PTSNormalize,Ae=this._initPTS,un=!T.isAAC&&this.typeSupported.mpeg,hn,Pe,En,Vn,_a,rt,Ut=un?0:8,ya=T.samples,mt=[],ja=this.nextAudioPts;if(j|=ya.length&&ja&&(W&&Math.abs(x-ja/V)<.1||Math.abs(ya[0].pts-ja-Ae)<20*Ee),ya.forEach(function(Vi){Vi.pts=Vi.dts=Fe(Vi.pts-Ae,x*V)}),ya=ya.filter(function(Vi){return Vi.pts>=0}),ya.length!==0){if(j||(W?ja=x*V:ja=ya[0].pts),T.isAAC)for(var $t=this.config.maxAudioFramesDrift,Ka=0,Ct=ja;Ka=$t*Ee&&Pr.1*Ee,mr.pts=mr.dts=Ct,Ct+=Ee,Ka++}for(var cr=ya.length,Qr=0;cr--;)Qr+=ya[cr].unit.byteLength;for(var Du=0,gu=ya.length;Du0&&mi0&&(Pe=Pa.getSilentFrame(T.manifestCodec||T.codec,T.channelCount),Pe||(Pe=Kr.subarray()),Qr+=zi*Pe.length);else if(mi<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Tn(ja,!0)+" ms / "+Tn(Ju,!0)+" ms / "+Tn(-mi,!0)+" ms"),Qr-=Kr.byteLength;continue}Ju=ja}if(_a=Ju,Qr>0){Qr+=Ut;try{En=new Uint8Array(Qr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Qr,reason:"fail allocating audio mdat "+Qr});return}if(!un){var vc=new DataView(En.buffer);vc.setUint32(0,Qr),En.set(At.types.mdat,4)}}else return;for(var ss=0;ss=2&&(Al=mt[cr-2].duration,hn.duration=Al),cr){this.nextAudioPts=ja=rt+ie*Al,T.samples=mt,un?Vn=new Uint8Array:Vn=At.moof(T.sequenceNumber++,_a/ie,T),T.samples=[];var Ll=_a/V,vs=ja/V,xl={data1:Vn,data2:En,startPTS:Ll,endPTS:vs,startDTS:Ll,endDTS:vs,type:"audio",hasAudio:!0,hasVideo:!1,nb:cr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,xl),xl}return null}},K.remuxEmptyAudio=function(T,x,j,W){var V=T.inputTimeScale,le=T.samplerate?T.samplerate:V,ie=V/le,ge=this.nextAudioPts,Ee=(ge!==void 0?ge:W.startDTS*V)+this._initDTS,Fe=W.endDTS*V+this._initDTS,Ae=1024,un=ie*Ae,hn=Math.ceil((Fe-Ee)/un),Pe=Pa.getSilentFrame(T.manifestCodec||T.codec,T.channelCount);if(l.logger.warn("remux empty Audio"),!Pe){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var En=[],Vn=0;Vn4294967296;)T+=j;return T},J}(),Ma=va,dt=function(){function J(O){this.observer=O}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(T,x,j,W,V,le,ie,ge){var Ee=this.observer,Fe="";T&&(Fe+="audio"),x&&(Fe+="video"),Ee.trigger(t.default.FRAG_PARSING_DATA,{data1:ge,startPTS:V,startDTS:V,type:Fe,hasAudio:!!T,hasVideo:!!x,nb:1,dropped:0}),Ee.trigger(t.default.FRAG_PARSED)},J}(),vn=dt,oa=Object(s.getSelfScope)(),St;try{St=oa.performance.now.bind(oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),St=oa.Date.now}var Da=function(){function J(O,T,x,j){this.observer=O,this.typeSupported=T,this.config=x,this.vendor=j}var K=J.prototype;return K.destroy=function(){var T=this.demuxer;T&&T.destroy()},K.push=function(T,x,j,W,V,le,ie,ge,Ee,Fe,Ae,un){var hn=this;if(T.byteLength>0&&x!=null&&x.key!=null&&x.method==="AES-128"){var Pe=this.decrypter;Pe==null&&(Pe=this.decrypter=new u.default(this.observer,this.config));var En=St();Pe.decrypt(T,x.key.buffer,x.iv.buffer,function(Vn){var _a=St();hn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:En,tdecrypt:_a}}),hn.pushDecrypted(new Uint8Array(Vn),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Fe,Ae,un)})}else this.pushDecrypted(new Uint8Array(T),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Fe,Ae,un)},K.pushDecrypted=function(T,x,j,W,V,le,ie,ge,Ee,Fe,Ae,un){var hn=this.demuxer;if(!hn||(ie||ge)&&!this.probe(T)){for(var Pe=this.observer,En=this.typeSupported,Vn=this.config,_a=[{demux:yn,remux:Ma},{demux:Y.default,remux:vn},{demux:Z,remux:Ma},{demux:zn,remux:Ma}],rt=0,Ut=_a.length;rt1?L-1:0),z=1;z1?L-1:0),z=1;z0)return p.subarray(E,E+b)},s._readSize=function(p,g){var E=0;return E=(p[g]&127)<<21,E|=(p[g+1]&127)<<14,E|=(p[g+2]&127)<<7,E|=p[g+3]&127,E},s.getTimeStamp=function(p){for(var g=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ne+=String.fromCharCode(N);break;case 12:case 13:z=p[ue++],ne+=String.fromCharCode((N&31)<<6|z&63);break;case 14:z=p[ue++],$=p[ue++],ne+=String.fromCharCode((N&15)<<12|(z&63)<<6|($&63)<<0);break;default:}}return ne},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(u=new s.TextDecoder("utf-8")),u}var l=r._utf8ArrayToStr;n.default=r},"./src/demux/mp4demuxer.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),r=a("./src/events.js"),u=Math.pow(2,32)-1,i=function(){function l(m,p){this.observer=m,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,g,E,b){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);g==null&&(g="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:g+","+E,initSegment:b?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:g,initSegment:b?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else g&&(this.audioCodec=g),E&&(this.videoCodec=E)},l.probe=function(p){return l.findBox({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},l.bin2str=function(p){return String.fromCharCode.apply(null,p)},l.readUint16=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<8|p[g+1];return E<0?65536+E:E},l.readUint32=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3];return E<0?4294967296+E:E},l.writeUint32=function(p,g,E){p.data&&(g+=p.start,p=p.data),p[g]=E>>24,p[g+1]=E>>16&255,p[g+2]=E>>8&255,p[g+3]=E&255},l.findBox=function(p,g){var E=[],b,I,L,N,z,$,ne;if(p.data?($=p.start,N=p.end,p=p.data):($=0,N=p.byteLength),!g.length)return null;for(b=$;b1?b+I:N,L===g[0]&&(g.length===1?E.push({data:p,start:b+8,end:ne}):(z=l.findBox({data:p,start:b+8,end:ne},g.slice(1)),z.length&&(E=E.concat(z)))),b=ne;return E},l.parseSegmentIndex=function(p){var g=l.findBox(p,["moov"])[0],E=g?g.end:null,b=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var N=I.data[0];b=N===0?8:16;var z=l.readUint32(I,b);b+=4;var $=0,ne=0;N===0?b+=8:b+=16,b+=2;var ue=I.end+ne,Z=l.readUint16(I,b);b+=2;for(var Y=0;Y>>31;if(ke===1){console.warn("SIDX has hierarchical references (not supported)");return}var rn=l.readUint32(I,X);X+=4,L.push({referenceSize:xe,subsegmentDuration:rn,info:{duration:rn/z,start:ue,end:ue+xe-1}}),ue+=xe,X+=4,b=X}return{earliestPresentationTime:$,timescale:z,version:N,referencesCount:Z,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var g=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(b){var I=l.findBox(b,["tkhd"])[0];if(I){var L=I.data[I.start],N=L===0?12:20,z=l.readUint32(I,N),$=l.findBox(b,["mdia","mdhd"])[0];if($){L=$.data[$.start],N=L===0?12:20;var ne=l.readUint32($,N),ue=l.findBox(b,["mdia","hdlr"])[0];if(ue){var Z=l.bin2str(ue.data.subarray(ue.start+8,ue.start+12)),Y={soun:"audio",vide:"video"}[Z];if(Y){var X=l.findBox(b,["mdia","minf","stbl","stsd"]);if(X.length){X=X[0];var ve=l.bin2str(X.data.subarray(X.start+12,X.start+16));t.logger.log("MP4Demuxer:"+Y+":"+ve+" found")}g[z]={timescale:ne,type:Y},g[Y]={timescale:ne,id:z}}}}}}),g},l.getStartDTS=function(p,g){var E,b,I;return E=l.findBox(g,["moof","traf"]),b=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(N){var z,$,ne;return z=l.readUint32(N,4),$=p[z].timescale||9e4,ne=l.findBox(L,["tfdt"]).map(function(ue){var Z,Y;return Z=ue.data[ue.start],Y=l.readUint32(ue,4),Z===1&&(Y*=Math.pow(2,32),Y+=l.readUint32(ue,8)),Y})[0],ne/$})})),I=Math.min.apply(null,b),isFinite(I)?I:0},l.offsetStartDTS=function(p,g,E){l.findBox(g,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(I){var L=l.readUint32(I,4),N=p[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function(z){var $=z.data[z.start],ne=l.readUint32(z,4);if($===0)l.writeUint32(z,4,ne-E*N);else{ne*=Math.pow(2,32),ne+=l.readUint32(z,8),ne-=E*N,ne=Math.max(ne,0);var ue=Math.floor(ne/(u+1)),Z=Math.floor(ne%(u+1));l.writeUint32(z,4,ue),l.writeUint32(z,8,Z)}})})})},s.append=function(p,g,E,b){var I=this.initData;I||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),I=this.initData);var L,N=this.initPTS;if(N===void 0){var z=l.getStartDTS(I,p);this.initPTS=N=z-g,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:N})}l.offsetStartDTS(I,p,N),L=l.getStartDTS(I,p),this.remuxer.remux(I.audio,I.video,null,null,L,E,b,p)},s.destroy=function(){},l}();n.default=i},"./src/errors.ts":function(e,n,a){"use strict";a.r(n),a.d(n,"ErrorTypes",function(){return t}),a.d(n,"ErrorDetails",function(){return r});var t;(function(u){u.NETWORK_ERROR="networkError",u.MEDIA_ERROR="mediaError",u.KEY_SYSTEM_ERROR="keySystemError",u.MUX_ERROR="muxError",u.OTHER_ERROR="otherError"})(t||(t={}));var r;(function(u){u.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",u.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",u.KEY_SYSTEM_NO_SESSION="keySystemNoSession",u.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",u.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",u.MANIFEST_LOAD_ERROR="manifestLoadError",u.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",u.MANIFEST_PARSING_ERROR="manifestParsingError",u.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",u.LEVEL_LOAD_ERROR="levelLoadError",u.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",u.LEVEL_SWITCH_ERROR="levelSwitchError",u.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",u.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",u.FRAG_LOAD_ERROR="fragLoadError",u.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",u.FRAG_DECRYPT_ERROR="fragDecryptError",u.FRAG_PARSING_ERROR="fragParsingError",u.REMUX_ALLOC_ERROR="remuxAllocError",u.KEY_LOAD_ERROR="keyLoadError",u.KEY_LOAD_TIMEOUT="keyLoadTimeOut",u.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",u.BUFFER_APPEND_ERROR="bufferAppendError",u.BUFFER_APPENDING_ERROR="bufferAppendingError",u.BUFFER_STALLED_ERROR="bufferStalledError",u.BUFFER_FULL_ERROR="bufferFullError",u.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",u.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",u.INTERNAL_EXCEPTION="internalException"})(r||(r={}))},"./src/events.js":function(e,n,a){"use strict";a.r(n);var t={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"};n.default=t},"./src/hls.ts":function(e,n,a){"use strict";a.r(n);var t={};a.r(t),a.d(t,"newCue",function(){return XI});var r=a("./node_modules/url-toolkit/src/url-toolkit.js"),u=a("./src/errors.ts"),i=a("./src/polyfills/number-isFinite.js"),l=a("./src/events.js"),s=a("./src/utils/logger.js"),m={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},p=function(){function w(f){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=f,this.onEvent=this.onEvent.bind(this);for(var v=arguments.length,o=new Array(v>1?v-1:0),c=1;c>8*(15-c)&255;return o},D.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new z(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},ne(w,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(v){this._url=v}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Object(i.isFiniteNumber)(this.programDateTime))return null;var v=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){return!!(this.decryptdata&&this.decryptdata.uri!==null&&this.decryptdata.key===null)}}]),w}();function Y(w,D){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:o},D.hexadecimalInteger=function(v){if(this[v]){var o=(this[v]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var c=new Uint8Array(o.length/2),_=0;_Number.MAX_SAFE_INTEGER?1/0:o},D.decimalFloatingPoint=function(v){return parseFloat(this[v])},D.enumeratedString=function(v){return this[v]},D.decimalResolution=function(v){var o=xe.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},w.parseAttrList=function(v){var o,c={};for(ke.lastIndex=0;(o=ke.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},w}(),wn=rn,dn={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function mn(w,D){var f=dn[D];return!!f&&f[w.slice(0,4)]===!0}function yn(w,D){return MediaSource.isTypeSupported((D||"video")+'/mp4;codecs="'+w+'"')}var Kn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,zn=/#EXT-X-MEDIA:(.*)/g,Wn=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Pa=/(?:(?:#(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?/,Ga=/\.(mp4|m4s|m4v|m4a)$/i,sa=function(){function w(){}return w.findGroup=function(f,v){for(var o=0;o2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},w.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var o=[];Kn.lastIndex=0;function c(P,B){["video","audio"].forEach(function(k){var ae=P.filter(function($e){return mn($e,k)});if(ae.length){var ye=ae.filter(function($e){return $e.lastIndexOf("avc1",0)===0||$e.lastIndexOf("mp4a",0)===0});B[k+"Codec"]=ye.length>0?ye[0]:ae[0],P=P.filter(function($e){return ae.indexOf($e)===-1})}}),B.unknownCodecs=P}for(var _;(_=Kn.exec(f))!=null;){var y={},C=y.attrs=new wn(_[1]);y.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(y.width=F.width,y.height=F.height),y.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),y.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),y),y.videoCodec&&y.videoCodec.indexOf("avc1")!==-1&&(y.videoCodec=w.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(zn.lastIndex=0;(_=zn.exec(f))!==null;){var F=new wn(_[1]);if(F.TYPE===o){var P={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:o,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(P.url=w.resolve(F.URI,v)),c.length){var B=w.findGroup(c,P.groupId);P.audioCodec=B?B.codec:c[0].codec}y.push(P)}}return y},w.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new ve(v),P=0,B=null,k=new Z,ae,ye,$e,fn=null;for(Wn.lastIndex=0;(ae=Wn.exec(f))!==null;){var fa=ae[1];if(fa){k.duration=parseFloat(fa);var Xn=(" "+ae[2]).slice(1);k.title=Xn||null,k.tagList.push(Xn?["INF",fa,Xn]:["INF",fa])}else if(ae[3]){if(Object(i.isFiniteNumber)(k.duration)){var ua=y++;k.type=c,k.start=C,$e&&(k.levelkey=$e),k.sn=ua,k.level=o,k.cc=P,k.urlId=_,k.baseurl=v,k.relurl=(" "+ae[3]).slice(1),qe(k,B),F.fragments.push(k),B=k,C+=k.duration,k=new Z}}else if(ae[4]){var Ra=(" "+ae[4]).slice(1);B?k.setByteRange(Ra,B):k.setByteRange(Ra)}else if(ae[5])k.rawProgramDateTime=(" "+ae[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),fn===null&&(fn=F.fragments.length);else{if(ae=ae[0].match(Pa),!ae){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(ye=1;ye=0&&($e.method=ft,$e.key=null,$e.iv=Na));break}case"START":{var jo=new wn(Ja),S0=jo.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(S0)&&(F.startTimeOffset=S0);break}case"MAP":{var C0=new wn(Ja);k.relurl=C0.URI,C0.BYTERANGE&&k.setByteRange(C0.BYTERANGE),k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,k=new Z,k.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ae);break}}}return k=B,k&&!k.relurl&&(F.fragments.pop(),C-=k.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=y-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=P,!F.initSegment&&F.fragments.length&&F.fragments.every(function(yT){return Ga.test(yT.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),k=new Z,k.relurl=F.fragments[0].relurl,k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,F.needSidxRanges=!0),fn&&At(F.fragments,fn),F},w}();function At(w,D){for(var f=w[D],v=D-1;v>=0;v--){var o=w[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function qe(w,D){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):D&&D.programDateTime&&(w.programDateTime=D.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function pa(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Qa=window,Tn=Qa.performance,Dn=function(w){pa(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,o.loaders={},o}D.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},D.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return b.AUDIO;case E.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},D.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=D.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,y=c.loader,C=_||y,F=new C(c);return o.loader=F,this.loaders[o.type]=F,F},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.destroyInternalLoaders(),w.prototype.destroy.call(this)},f.onManifestLoading=function(o){this.load({url:o.url,type:E.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(o){this.load({url:o.url,type:E.LEVEL,level:o.level,id:o.id,responseType:"text"})},f.onAudioTrackLoading=function(o){this.load({url:o.url,type:E.AUDIO_TRACK,level:null,id:o.id,responseType:"text"})},f.onSubtitleTrackLoading=function(o){this.load({url:o.url,type:E.SUBTITLE_TRACK,level:null,id:o.id,responseType:"text"})},f.load=function(o){var c=this.hls.config;s.logger.debug("Loading playlist of type "+o.type+", level: "+o.level+", id: "+o.id);var _=this.getInternalLoader(o);if(_){var y=_.context;if(y&&y.url===o.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+o.type),_.abort()}var C,F,P,B;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,P=c.manifestLoadingRetryDelay,B=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,B=0,P=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,P=c.levelLoadingRetryDelay,B=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var k={timeout:F,maxRetry:C,retryDelay:P,maxRetryDelay:B},ae={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+o.url),_.load(o,k,ae),!0},f.loadsuccess=function(o,c,_,y){if(y===void 0&&(y=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,y);return}if(this.resetInternalLoader(_.type),typeof o.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=o.data;if(c.tload=Tn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",y);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,y):this._handleMasterPlaylist(o,c,_,y)},f.loaderror=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,o)},f.loadtimeout=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(o,c,_,y){var C=this.hls,F=o.data,P=D.getResponseUrl(o,_),B=sa.parseMasterPlaylist(F,P);if(!B.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var k=B.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ae=sa.parseMasterPlaylistMedia(F,P,"AUDIO",k),ye=sa.parseMasterPlaylistMedia(F,P,"SUBTITLES");if(ae.length){var $e=!1;ae.forEach(function(fn){fn.url||($e=!0)}),$e===!1&&B[0].audioCodec&&!B[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),ae.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:B,audioTracks:ae,subtitles:ye,url:P,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,P=_.level,B=_.type,k=D.getResponseUrl(o,_),ae=Object(i.isFiniteNumber)(F)?F:0,ye=Object(i.isFiniteNumber)(P)?P:ae,$e=D.mapContextToLevelType(_),fn=sa.parseLevelPlaylist(o.data,k,ye,$e,ae);if(fn.tload=c.tload,B===E.MANIFEST){var fa={url:k,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:k,stats:c,networkDetails:y})}if(c.tparsed=Tn.now(),fn.needSidxRanges){var Xn=fn.initSegment.url;this.load({url:Xn,isSidxRequest:!0,type:B,level:P,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,this._handlePlaylistLoaded(o,c,_,y)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=I.default.parseSegmentIndex(new Uint8Array(o.data));if(!!_){var y=_.references,C=c.levelDetails;y.forEach(function(F,P){var B=F.info;if(!!C){var k=C.fragments[P];k.byteRange.length===0&&k.setByteRange(String(1+B.end-B.start)+"@"+String(B.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,y){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:y})},f._handleNetworkError=function(o,c,_,y){_===void 0&&(_=!1),y===void 0&&(y=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,P=this.getInternalLoader(o);switch(o.type){case E.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case E.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case E.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}P&&(P.abort(),this.resetInternalLoader(o.type));var B={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:P,context:o,networkDetails:c};y&&(B.response=y),this.hls.trigger(l.default.ERROR,B)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,P=_.id,B=_.levelDetails;if(!B||!B.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var k=D.canHaveQualityLevels(_.type);if(k)this.hls.trigger(l.default.LEVEL_LOADED,{details:B,level:F||0,id:P||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break}},D}(g),We=Dn;function ea(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var va=function(w){ea(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=D.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,y=this.loaders,C=this.hls.config,F=C.fLoader,P=C.loader;c.loaded=0;var B=y[_];B&&(s.logger.warn("abort previous fragment loader for type: "+_),B.abort()),B=y[_]=c.loader=C.fLoader?new F(C):new P(C);var k,ae,ye;k={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var $e=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)($e)&&Object(i.isFiniteNumber)(fn)&&(k.rangeStart=$e,k.rangeEnd=fn),ae={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},ye={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},B.load(k,ae,ye)},f.loadsuccess=function(o,c,_,y){y===void 0&&(y=null);var C=o.data,F=_.frag;F.loader=void 0,this.loaders[F.type]=void 0,this.hls.trigger(l.default.FRAG_LOADED,{payload:C,frag:F,stats:c,networkDetails:y})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c.frag,response:o,networkDetails:_})},f.loadtimeout=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c.frag,networkDetails:_})},f.loadprogress=function(o,c,_,y){y===void 0&&(y=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:y})},D}(g),Ma=va;function dt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var vn=function(w){dt(D,w);function D(v){var o;return o=w.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=D.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onKeyLoading=function(o){var c=o.frag,_=c.type,y=this.loaders[_];if(!c.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var C=c.decryptdata.uri;if(C!==this.decrypturl||this.decryptkey===null){var F=this.hls.config;if(y&&(s.logger.warn("abort previous key loader for type:"+_),y.abort()),!C){s.logger.warn("key uri is falsy");return}c.loader=this.loaders[_]=new F.loader(F),this.decrypturl=C,this.decryptkey=null;var P={url:C,frag:c,responseType:"arraybuffer"},B={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},k={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(P,B,k)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var y=_.frag;if(!y.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=y.decryptdata.key=new Uint8Array(o.data),y.loader=void 0,delete this.loaders[y.type],this.hls.trigger(l.default.KEY_LOADED,{frag:y})},f.loaderror=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:_,response:o})},f.loadtimeout=function(o,c){var _=c.frag,y=_.loader;y&&y.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:_})},D}(g),oa=vn;function St(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},it=function(w){St(D,w);function D(v){var o;return o=w.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,o.bufferPadding=.2,o.fragments=Object.create(null),o.timeRanges=Object.create(null),o.config=v.config,o}var f=D.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,g.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,y=Object.keys(_).filter(function(F){var P=_[F];if(P.body.type!==c||!P.buffered)return!1;var B=P.body;return B.startPTS<=o&&o<=B.endPTS});if(y.length===0)return null;var C=y.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,y,C;Object.keys(this.fragments).forEach(function(F){var P=_.fragments[F];if(P.buffered===!0){var B=P.range[o];if(B){y=B.time;for(var k=0;k=C&&c<=F){y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))}),P=!0;else if(c<=C)break;return{time:y,partial:P}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,P=0;return Object.keys(this.fragments).forEach(function(B){var k=c.fragments[B];c.isPartial(k)&&(y=k.body.startPTS-c.bufferPadding,C=k.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),P<=_&&(F=k.body,P=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=Da.PARTIAL:y=Da.OK:y=Da.APPENDING),y},f.isPartial=function(o){return o.buffered===!0&&(o.range.video!==void 0&&o.range.video.partial===!0||o.range.audio!==void 0&&o.range.audio.partial===!0)},f.isTimeBuffered=function(o,c,_){for(var y,C,F=0;F<_.length;F++){if(y=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=y&&c<=C)return!0;if(c<=y)return!1}return!1},f.onFragLoaded=function(o){var c=o.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(o){var c=this;this.timeRanges=o.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var y=c.timeRanges[_];c.detectEvictedFragments(_,y)})},f.onFragBuffered=function(o){this.detectPartialFragments(o.frag)},f.hasFragment=function(o){var c=this.getFragmentKey(o);return this.fragments[c]!==void 0},f.removeFragment=function(o){var c=this.getFragmentKey(o);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},D}(g),J={search:function(D,f){for(var v=0,o=D.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=D[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},K=J,O=function(){function w(){}return w.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},w.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],y;for(y=0;yC&&(c[y-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,P,B=v,k=v,ae=0;ae=ye&&v<$e)B=ye,k=$e,F=k-v;else if(v+o1?c-1:0),y=1;yD?(v.duration=c-v.start,v.duration<0&&s.logger.warn("negative duration computed for frag "+v.sn+",level "+v.level+", there should be some duration drift between playlist and fragment!")):(o.duration=v.start-c,o.duration<0&&s.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):f>D?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Pe(w,D,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(D.startPTS)){var y=Math.abs(D.startPTS-f);Object(i.isFiniteNumber)(D.deltaPTS)?D.deltaPTS=Math.max(y,D.deltaPTS):D.deltaPTS=y,_=Math.max(f,D.startPTS),f=Math.min(f,D.startPTS),v=Math.max(v,D.endPTS),o=Math.min(o,D.startDTS),c=Math.max(c,D.endDTS)}var C=f-D.start;D.start=D.startPTS=f,D.maxStartPTS=_,D.endPTS=v,D.startDTS=o,D.endDTS=c,D.duration=v-f;var F=D.sn;if(!w||Fw.endSN)return 0;var P,B,k;for(P=F-w.startSN,B=w.fragments,B[P]=D,k=P;k>0;k--)hn(B,k,k-1);for(k=P;kv.length))for(var c=0;cD?-1:0})}function Ka(w,D,f){var v=!1;return D&&D.details&&f&&(f.endCC>f.startCC||w&&w.cc=(o||0))return null;f=f||0;for(var c=0;cw&&f.start?-1:0}function Qr(w,D,f){var v=Math.min(D,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>w}var Du=250,gu=2,xo=.1,Kr=.05,Ju=function(){function w(f,v,o,c){this.config=f,this.media=v,this.fragmentTracker=o,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var D=w.prototype;return D.poll=function(v){var o=this.config,c=this.media,_=this.stalled,y=c.currentTime,C=c.seeking,F=this.seeking&&!C,P=!this.seeking&&C;if(this.seeking=C,y!==v){if(this.moved=!0,_!==null){if(this.stallReported){var B=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((P||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var k=O.bufferInfo(c,y,0),ae=k.len>0,ye=k.nextStart||0;if(!(!ae&&!ye)){if(C){var $e=k.len>gu,fn=!ye||ye-y>gu;if($e||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(ye,k.start||0)-y;if(fa>0&&fa<=gu){this._trySkipBufferHole(null);return}}var Xn=self.performance.now();if(_===null){this.stalled=Xn;return}var ua=Xn-_;!C&&ua>=Du&&this._reportStall(k.len);var Ra=O.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ra,ua)}}},D._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var P=this._trySkipBufferHole(F);if(P)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},D._reportStall=function(v){var o=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},D._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,y=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var P=_.buffered.start(F);if(y+o.maxBufferHole>=C&&y1?c-1:0),y=1;y1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},D}(g);function ss(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var se={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},Al=function(w){ss(D,w);function D(){return w.apply(this,arguments)||this}var f=D.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var o=this.fragCurrent;o&&(o.loader&&o.loader.abort(),this.fragmentTracker.removeFragment(o)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=se.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,y=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=y.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=O.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===se.FRAG_LOADING){var P=this.fragCurrent;if(F.len===0&&P){var B=o.maxFragLookUpTolerance,k=P.start-B,ae=P.start+P.duration+B;Cae?(P.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),P.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=se.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===se.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=se.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=se.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(o,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return o+Math.max(0,c.totalduration-_)},D}(vc);function Ll(w,D){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=se.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=se.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case se.BUFFER_FLUSHING:this.fragLoadError=0;break;case se.IDLE:this._doTickIdle();break;case se.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var c=window.performance.now(),_=this.retryDate;(!_||c>=_||this.media&&this.media.seeking)&&(s.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.ERROR:case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var o=this.hls,c=o.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var y;this.loadedmetadata?y=_.currentTime:y=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(!!F){var P=F.bitrate,B;P?B=Math.max(8*c.maxBufferSize/P,c.maxBufferLength):B=c.maxBufferLength,B=Math.min(B,c.maxMaxBufferLength);var k=O.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),ae=k.len;if(!(ae>=B)){s.logger.trace("buffer length of "+ae.toFixed(3)+" is below max of "+B.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var ye=F.details;if(!ye||ye.live&&this.levelLastLoaded!==C){this.state=se.WAITING_LEVEL;return}if(this._streamEnded(k,ye)){var $e={};this.altAudio&&($e.type="video"),this.hls.trigger(l.default.BUFFER_EOS,$e),this.state=se.ENDED;return}this._fetchPayloadOrEos(y,k,ye)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,P=F.length;if(P!==0){var B=F[0].start,k=F[P-1].start+F[P-1].duration,ae=c.end,ye;if(_.initSegment&&!_.initSegment.data)ye=_.initSegment;else if(_.live){var $e=this.config.initialLiveManifestSize;if(P<$e){s.logger.warn("Can not start playback of a level, reason: not enough fragments "+P+" < "+$e);return}if(ye=this._ensureFragmentAtLivePoint(_,ae,B,k,y,F,P),ye===null)return}else ae$e&&$e>k.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+$e.toFixed(3)),k.currentTime=$e),this.nextLoadPosition=$e}if(o.PTSKnown&&c>y&&k&&k.readyState)return null;if(this.startFragRequested&&!o.PTSKnown){if(C)if(o.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),ae=eu(F,C.endProgramDateTime,B.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var fa=F[fn-o.startSN];C.cc===fa.cc&&(ae=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ae.sn))}ae||(ae=K.search(F,function(Xn){return C.cc-Xn.cc}),ae&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ae.sn))}ae||(ae=F[Math.min(P-1,Math.round(P/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ae.sn))}return ae},f._findFragment=function(o,c,_,y,C,F,P){var B=this.hls.config,k;if(CF-B.maxFragLookUpTolerance?0:B.maxFragLookUpTolerance;k=jr(c,y,C,ae)}else k=y[_-1];if(k){var ye=k.sn-P.startSN,$e=c&&k.level===c.level,fn=y[ye-1],fa=y[ye+1];if(c&&k.sn===c.sn)if($e&&!k.backtracked)if(k.snB.maxBufferHole&&c.dropped&&ye?(k=fn,s.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(k=fa,s.logger.log("Re-loading fragment with SN: "+k.sn))}else k=null;else k.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+k.sn+". Loading fragment "+fa.sn),k=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),k.dropped=0,fn?(k=fn,k.backtracked=!0):ye&&(k=null)))}return k},f._loadKey=function(o){this.state=se.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:o})},f._loadFragment=function(o){var c=this.fragmentTracker.getState(o);this.fragCurrent=o,o.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(o.sn)&&!o.bitrateTest&&(this.nextLoadPosition=o.start+o.duration),o.backtracked||c===Da.NOT_LOADED||c===Da.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Ae(this.hls,"main")),this.state=se.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,b.MAIN)},f.followingBufferedFrag=function(o){return o?this.getBufferedFrag(o.endPTS+.5):null},f._checkFragmentChanged=function(){var o,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),O.isBuffered(_,c)?o=this.getBufferedFrag(c):O.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var y=o;if(y!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:y});var C=y.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=y}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var o=this.media,c;o?(c=o.paused,o.pause()):c=!0,this.previouslyPaused=c}var _=this.fragCurrent;_&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var o=this.media;o&&o.buffered.length&&(this.immediateSwitch=!1,O.isBuffered(o,o.currentTime)&&(o.currentTime-=1e-4),this.previouslyPaused||o.play())},f.nextLevelSwitch=function(){var o=this.media;if(o&&o.readyState){var c,_,y;if(_=this.getBufferedFrag(o.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),o.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],P=this.fragLastKbps;P&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*P)+1:c=0}if(y=this.getBufferedFrag(o.currentTime+c),y&&(y=this.followingBufferedFrag(y),y)){var B=this.fragCurrent;B&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=se.BUFFER_FLUSHING;var _={startOffset:o,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("seeked",this.onvseeked),c.addEventListener("ended",this.onvended);var _=this.config;this.levels&&_.autoStartLoad&&this.hls.startLoad(_.startPosition),this.gapController=new Ju(_,c,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var c=this.levels;c&&c.forEach(function(_){_.details&&_.details.fragments.forEach(function(y){y.backtracked=void 0})}),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("seeked",this.onvseeked),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var o=this.media,c=o?o.currentTime:void 0;Object(i.isFiniteNumber)(c)&&s.logger.log("media seeked to "+c.toFixed(3)),this.tick()},f.onManifestLoading=function(){s.logger.log("trigger BUFFER_RESET"),this.hls.trigger(l.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(o){var c=!1,_=!1,y;o.levels.forEach(function(F){y=F.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(c=!0),y.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=c&&_,this.audioCodecSwitch&&s.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=o.altAudio,this.levels=o.levels,this.startFragRequested=!1;var C=this.config;(C.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(C.startPosition)},f.onLevelLoaded=function(o){var c=o.details,_=o.level,y=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,P=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var B=C.details;B&&c.fragments.length>0?(En(B,c),P=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(P,B),c.PTSKnown&&Object(i.isFiniteNumber)(P)?s.logger.log("live playlist sliding:"+P.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Pr(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Pr(this.fragPrevious,y,c))}else c.PTSKnown=!1;if(C.details=c,this.levelLastLoaded=_,this.hls.trigger(l.default.LEVEL_UPDATED,{details:c,level:_}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var k=c.startTimeOffset;Object(i.isFiniteNumber)(k)?(k<0&&(s.logger.log("negative start time offset "+k+", count from end of last fragment"),k=P+F+k),s.logger.log("start time offset found in playlist, adjust startPosition to "+k),this.startPosition=k):c.live?(this.startPosition=this.computeLivePosition(P,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_LEVEL&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,y=this.levels,C=this.media,F=o.frag;if(this.state===se.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var P=o.stats,B=y[c.level],k=B.details;if(this.bitrateTest=!1,this.stats=P,s.logger.log("Loaded "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=se.IDLE,this.startFragRequested=!1,P.tparsed=P.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=se.IDLE,P.tparsed=P.tbuffered=window.performance.now(),k.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level+", cc "+c.cc),this.state=se.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var ae=!(C&&C.seeking)&&(k.PTSKnown||!k.live),ye=k.initSegment?k.initSegment.data:[],$e=this._getAudioCodec(B),fn=this.demuxer=this.demuxer||new Ae(this.hls,"main");fn.push(o.payload,ye,$e,B.videoCodec,c,k.totalduration,ae)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C,F;if(y.audio&&this.altAudio&&delete y.audio,F=y.audio,F){var P=this.levels[this.level].audioCodec,B=navigator.userAgent.toLowerCase();P&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),P.indexOf("mp4a.40.5")!==-1?P="mp4a.40.2":P="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(P="mp4a.40.5"),B.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(P="mp4a.40.2",s.logger.log("Android: force audio codec to "+P)),F.levelCodec=P,F.id=o.id}F=y.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,y);for(C in y){F=y[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var k=F.initSegment;k&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:k,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="main"&&y.sn===_.sn&&y.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===se.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),o.hasAudio===!0&&F.addElementaryStream(ue.AUDIO),o.hasVideo===!0&&F.addElementaryStream(ue.VIDEO),s.logger.log("Parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb+",dropped:"+(o.dropped||0)),o.type==="video")if(F.dropped=o.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var P=C.details;if(P&&F.sn===P.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=o.startPTS,this.state=se.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var B=Pe(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),k=this.hls;k.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:B,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ae){ae&&ae.length&&c.state===se.PARSING&&(c.appended=!0,c.pendingBuffering=!0,k.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:ae,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(o){var c=!!o.url,_=o.id;if(!c){if(this.mediaBuffer!==this.media){s.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),y.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=se.IDLE}var C=this.hls;C.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:_}),this.altAudio=!1}},f.onAudioTrackSwitched=function(o){var c=o.id,_=!!this.hls.audioTracks[c].url;if(_){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,y,C=!1;for(var F in c){var P=c[F];P.id==="main"?(y=F,_=P,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(o){if(o.parent==="main"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+mt.toString(c.buffered)),this.fragPrevious=o;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:o,id:"main"}),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&O.isBuffered(this.media,this.media.currentTime)&&O.isBuffered(this.media,this.media.currentTime+.5);switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:if(!o.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var y=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+y+" ms"),this.retryDate=window.performance.now()+y,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==se.ERROR&&(o.fatal?(this.state=se.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===se.WAITING_LEVEL&&(this.state=se.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===se.PARSING||this.state===se.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=se.IDLE):(s.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}},f._reduceMaxBufferLength=function(o){var c=this.config;return c.maxMaxBufferLength>=o?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var o=this.media;if(!(!o||o.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:o,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=se.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var o=this.mediaBuffer?this.mediaBuffer:this.media;o&&this.fragmentTracker.detectEvictedFragments(ue.VIDEO,o.buffered),this.state=se.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var o=this.media,c=o.currentTime,_=o.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),o.currentTime=_)},f._getAudioCodec=function(o){var c=this.config.defaultAudioCodec||o.audioCodec;return this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5")),c},vs(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("main stream-controller: "+c+"->"+o),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:o})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var o=this.media;if(o){var c=this.getBufferedFrag(o.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var o=this.media;return o?this.followingBufferedFrag(this.getBufferedFrag(o.currentTime)):null}},{key:"nextLevel",get:function(){var o=this.nextBufferedFrag;return o?o.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(o){this._liveSyncPosition=o}}]),D}(Al),Pf=Jd;function g0(w,D){for(var f=0;f0){y=c[0].bitrate,c.sort(function(ae,ye){return ae.bitrate-ye.bitrate}),this._levels=c;for(var k=0;k=0&&o1&&B.loadError0){var c=this.currentLevelIndex,_=o.urlId,y=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:y,level:c,id:_})}}},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}(g),b0=a("./src/demux/id3.js");function Eg(w,D){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=w,D.dispatchEvent(f)}function cv(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function yI(w,D){if(Dw[w.length-1].endTime)return w[w.length-1];for(var f=0,v=w.length-1;f<=v;){var o=Math.floor((v+f)/2);if(Dw[o].endTime)f=o+1;else return w[o]}return w[f].endTime-DB&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),B=P+.25);for(var k=0;k=this.minWeight_},D.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},D.destroy=function(){},w}(),TI=II;function Sg(w,D){for(var f=0;f500*_.duration/B){var k=o.levels,ae=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/P),ye=k[_.level],$e=ye.realBitrate?Math.max(ye.realBitrate,ye.bitrate):ye.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*$e/8)),fa=c.currentTime,Xn=(fn-F.loaded)/ae,ua=(O.bufferInfo(c,fa,o.config.maxBufferHole).end-fa)/B;if(ua<2*_.duration/B&&Xn>ua){var Ra,Ja;for(Ja=_.level-1;Ja>C;Ja--){var Wu=k[Ja].realBitrate?Math.max(k[Ja].realBitrate,k[Ja].bitrate):k[Ja].bitrate,nu=_.duration*Wu/(8*.8*ae);if(nu=y;ae--){var ye=k[ae];if(!!ye){var $e=ye.details,fn=$e?$e.totalduration/$e.fragments.length:c,fa=$e?$e.live:!1,Xn=void 0;ae<=o?Xn=P*_:Xn=B*_;var ua=k[ae].realBitrate?Math.max(k[ae].realBitrate,k[ae].bitrate):k[ae].bitrate,Ra=ua*fn/Xn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ae+"/"+Math.round(Xn)+"/"+ua+"/"+fn+"/"+F+"/"+Ra),Xn>ua&&(!Ra||fa&&!this.bitrateTestDelay||Ra=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=B?Math.min(B,y.maxStarvationDelay):y.maxStarvationDelay,Xn=y.abrBandWidthFactor,ua=y.abrBandWidthUpFactor;if($e===0){var Ra=this.bitrateTestDelay;if(Ra){var Ja=B?Math.min(B,y.maxLoadingDelay):y.maxLoadingDelay;fa=Ja-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Xn=ua=1}}return fn=this._findBestLevel(P,B,ye,C,c,$e+fa,Xn,ua,_),Math.max(fn,0)}}]),D}(g),MI=GI;function AI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Fg=W(),LI=function(w){AI(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_RESET,l.default.BUFFER_APPENDING,l.default.BUFFER_CODECS,l.default.BUFFER_EOS,l.default.BUFFER_FLUSHING,l.default.LEVEL_PTS_UPDATED,l.default.LEVEL_UPDATED)||this,o._msDuration=null,o._levelDuration=null,o._levelTargetDuration=10,o._live=null,o._objectUrl=null,o._needsFlush=!1,o._needsEos=!1,o.config=void 0,o.audioTimestampOffset=void 0,o.bufferCodecEventsExpected=0,o._bufferCodecEventsTotal=0,o.media=null,o.mediaSource=null,o.segments=[],o.parent=void 0,o.appending=!1,o.appended=0,o.appendError=0,o.flushBufferCounter=0,o.tracks={},o.pendingTracks={},o.sourceBuffer={},o.flushRange=[],o._onMediaSourceOpen=function(){s.logger.log("media source opened"),o.hls.trigger(l.default.MEDIA_ATTACHED,{media:o.media});var c=o.mediaSource;c&&c.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},o._onMediaSourceClose=function(){s.logger.log("media source closed")},o._onMediaSourceEnded=function(){s.logger.log("media source ended")},o._onSBUpdateEnd=function(){if(o.audioTimestampOffset&&o.sourceBuffer.audio){var c=o.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+c.timestampOffset+" to "+o.audioTimestampOffset),c.timestampOffset=o.audioTimestampOffset,delete o.audioTimestampOffset}o._needsFlush&&o.doFlush(),o._needsEos&&o.checkEos(),o.appending=!1;var _=o.parent,y=o.segments.reduce(function(k,ae){return ae.parent===_?k+1:k},0),C={},F=o.sourceBuffer;for(var P in F){var B=F[P];if(!B)throw Error("handling source buffer update end error: source buffer for "+P+" uninitilized and unable to update buffered TimeRanges.");C[P]=B.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:y,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),y===0&&o.flushLiveBackBuffer()},o._onSBUpdateError=function(c){s.logger.error("sourceBuffer error:",c),o.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},o.config=v.config,o}var f=D.prototype;return f.destroy=function(){g.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var y=this.sourceBuffer.audio;if(!y)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(y.timestampOffset-o.start);if(C>.1){var F=y.updating;try{y.abort()}catch(P){s.logger.warn("can not abort audio buffer: "+P)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+y.timestampOffset+" to "+o.start),y.timestampOffset=o.start)}}},f.onManifestParsed=function(o){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o){var c=this.media=o.media;if(c&&Fg){var _=this.mediaSource=new Fg;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),c.src=window.URL.createObjectURL(_),this._objectUrl=c.src}},f.onMediaDetaching=function(){s.logger.log("media source detaching");var o=this.mediaSource;if(o){if(o.readyState==="open")try{o.endOfStream()}catch(c){s.logger.warn("onMediaDetaching:"+c.message+" while calling endOfStream")}o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(l.default.MEDIA_DETACHED)},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,c=this.pendingTracks,_=Object.keys(c).length;(_&&!o||_===2)&&(this.createSourceBuffers(c),this.pendingTracks={},this.doAppending())},f.onBufferReset=function(){var o=this.sourceBuffer;for(var c in o){var _=o[c];try{_&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(_),_.removeEventListener("updateend",this._onSBUpdateEnd),_.removeEventListener("error",this._onSBUpdateError))}catch{}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},f.onBufferCodecs=function(o){var c=this;Object.keys(this.sourceBuffer).length||(Object.keys(o).forEach(function(_){c.pendingTracks[_]=o[_]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},f.createSourceBuffers=function(o){var c=this.sourceBuffer,_=this.mediaSource;if(!_)throw Error("createSourceBuffers called when mediaSource was null");for(var y in o)if(!c[y]){var C=o[y];if(!C)throw Error("source buffer exists for track "+y+", however track does not");var F=C.levelCodec||C.codec,P=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+P+")");try{var B=c[y]=_.addSourceBuffer(P);B.addEventListener("updateend",this._onSBUpdateEnd),B.addEventListener("error",this._onSBUpdateError),this.tracks[y]={buffer:B,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(k){s.logger.error("error while trying to add sourceBuffer:"+k.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:k,mimeType:P})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:this.tracks})},f.onBufferAppending=function(o){this._needsFlush||(this.segments?this.segments.push(o):this.segments=[o],this.doAppending())},f.onBufferEos=function(o){for(var c in this.sourceBuffer)if(!o.type||o.type===c){var _=this.sourceBuffer[c];_&&!_.ended&&(_.ended=!0,s.logger.log(c+" sourceBuffer now EOS"))}this.checkEos()},f.checkEos=function(){var o=this.sourceBuffer,c=this.mediaSource;if(!c||c.readyState!=="open"){this._needsEos=!1;return}for(var _ in o){var y=o[_];if(!!y){if(!y.ended)return;if(y.updating){this._needsEos=!0;return}}}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{c.endOfStream()}catch{s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},f.onBufferFlushing=function(o){o.type?this.flushRange.push({start:o.startOffset,end:o.endOffset,type:o.type}):(this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"video"}),this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},f.flushLiveBackBuffer=function(){if(!!this._live){var o=this.config.liveBackBufferLength;if(!(!isFinite(o)||o<0)){if(!this.media){s.logger.error("flushLiveBackBuffer called without attaching media");return}for(var c=this.media.currentTime,_=this.sourceBuffer,y=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=y.length-1;F>=0;F--){var P=y[F],B=_[P];if(B){var k=B.buffered;k.length>0&&C>k.start(0)&&this.removeBufferRange(P,B,0,C)&&this.hls.trigger(l.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C})}}}}},f.onLevelUpdated=function(o){var c=o.details;c.fragments.length>0&&(this._levelDuration=c.totalduration+c.fragments[0].start,this._levelTargetDuration=c.averagetargetduration||c.targetduration||10,this._live=c.live,this.updateMediaElementDuration())},f.updateMediaElementDuration=function(){var o=this.config,c;if(!(this._levelDuration===null||!this.media||!this.mediaSource||!this.sourceBuffer||this.media.readyState===0||this.mediaSource.readyState!=="open")){for(var _ in this.sourceBuffer){var y=this.sourceBuffer[_];if(y&&y.updating===!0)return}c=this.media.duration,this._msDuration===null&&(this._msDuration=this.mediaSource.duration),this._live===!0&&o.liveDurationInfinity===!0?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>c||!Object(i.isFiniteNumber)(c))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},f.doFlush=function(){for(;this.flushRange.length;){var o=this.flushRange[0];if(this.flushBuffer(o.start,o.end,o.type))this.flushRange.shift(),this.flushBufferCounter=0;else{this._needsFlush=!0;return}}if(this.flushRange.length===0){this._needsFlush=!1;var c=0,_=this.sourceBuffer;try{for(var y in _){var C=_[y];C&&(c+=C.buffered.length)}}catch{s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=c,this.hls.trigger(l.default.BUFFER_FLUSHED)}},f.doAppending=function(){var o=this.config,c=this.hls,_=this.segments,y=this.sourceBuffer;if(!!Object.keys(y).length){if(!this.media||this.media.error){this.segments=[],s.logger.error("trying to append although a media error occured, flush segment and abort");return}if(!this.appending){var C=_.shift();if(!!C)try{var F=y[C.type];if(!F){this._onSBUpdateEnd();return}if(F.updating){_.unshift(C);return}F.ended=!1,this.parent=C.parent,F.appendBuffer(C.data),this.appendError=0,this.appended++,this.appending=!0}catch(B){s.logger.error("error while trying to append buffer:"+B.message),_.unshift(C);var P={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};B.code===22?(this.segments=[],P.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,P.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],P.fatal=!0)),c.trigger(l.default.ERROR,P)}}}},f.flushBuffer=function(o,c,_){var y=this.sourceBuffer;if(!Object.keys(y).length)return!0;var C="null";if(this.media&&(C=this.media.currentTime.toFixed(3)),s.logger.log("flushBuffer,pos/start/end: "+C+"/"+o+"/"+c),this.flushBufferCounter>=this.appended)return s.logger.warn("abort flushing too many retries"),!0;var F=y[_];if(F){if(F.ended=!1,F.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(_,F,o,c))return this.flushBufferCounter++,!1}return s.logger.log("buffer flushed"),!0},f.removeBufferRange=function(o,c,_,y){try{for(var C=0;C.5){var ae="null";return this.media&&(ae=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+B+","+k+"], of ["+F+","+P+"], pos:"+ae),c.remove(B,k),!0}}}catch(ye){s.logger.warn("removeBufferRange failed",ye)}return!1},D}(g),xI=LI;function Gg(w,D){for(var f=0;fthis.autoLevelCapping&&c.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},f.getMaxLevel=function(o){var c=this;if(!this.levels)return-1;var _=this.levels.filter(function(y,C){return D.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return D.getMaxLevelByMediaSize(_,this.mediaWidth,this.mediaHeight)},f.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},f.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},D.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},D.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var y=function(k,ae){return ae?k.width!==ae.width||k.height!==ae.height:!0},C=o.length-1,F=0;F=c||P.height>=_)&&y(P,o[F+1])){C=F;break}}return C},PI(D,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=D.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=D.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),D}(g),Mg=jI;function NI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var _s=window,OI=_s.performance,zd=function(w){NI(D,w);function D(v){return w.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=D.prototype;return f.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},f.onMediaAttaching=function(o){var c=this.hls.config;if(c.capLevelOnFPSDrop){var _=this.video=o.media instanceof window.HTMLVideoElement?o.media:null;typeof _.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,c,_){var y=OI.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,P=c-this.lastDecodedFrames,B=1e3*F/C,k=this.hls;if(k.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:P,totalDroppedFrames:_}),B>0&&F>k.config.fpsDroppedMonitoringThreshold*P){var ae=k.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+ae),ae>0&&(k.autoLevelCapping===-1||k.autoLevelCapping>=ae)&&(ae=ae-1,k.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:ae,droppedLevel:k.currentLevel}),k.autoLevelCapping=ae,k.streamController.nextLevelSwitch())}}this.lastTime=y,this.lastDroppedFrames=_,this.lastDecodedFrames=c}},f.checkFPSInterval=function(){var o=this.video;if(o)if(this.isVideoPlaybackQualityAvailable){var c=o.getVideoPlaybackQuality();this.checkFPS(o,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},D}(g),UI=zd,Ag=window,Vd=Ag.performance,kI=Ag.XMLHttpRequest,BI=function(){function w(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var D=w.prototype;return D.destroy=function(){this.abort(),this.loader=null},D.abort=function(){var v=this.loader;v&&v.readyState!==4&&(this.stats.aborted=!0,v.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},D.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:Vd.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},D.loadInternal=function(){var v,o=this.context;v=this.loader=new kI;var c=this.stats;c.tfirst=0,c.loaded=0;var _=this.xhrSetup;try{if(_)try{_(v,o.url)}catch{v.open("GET",o.url,!0),_(v,o.url)}v.readyState||v.open("GET",o.url,!0)}catch(y){this.callbacks.onError({code:v.status,text:y.message},o,v);return}o.rangeEnd&&v.setRequestHeader("Range","bytes="+o.rangeStart+"-"+(o.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=o.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),v.send()},D.readystatechange=function(v){var o=v.currentTarget,c=o.readyState,_=this.stats,y=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Vd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Vd.now());var P,B;y.responseType==="arraybuffer"?(P=o.response,B=P.byteLength):(P=o.responseText,B=P.length),_.loaded=_.total=B;var k={url:o.responseURL,data:P};this.callbacks.onSuccess(k,_,y,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+y.url),this.callbacks.onError({code:F,text:o.statusText},y,o)):(s.logger.warn(F+" while loading "+y.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,C.maxRetryDelay),_.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),C.timeout)},D.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},D.loadprogress=function(v){var o=v.currentTarget,c=this.stats;c.loaded=v.loaded,v.lengthComputable&&(c.total=v.total);var _=this.callbacks.onProgress;_&&_(c,this.context,null,o)},w}(),Qd=BI;function Lg(w,D){for(var f=0;f=this.tracks.length){s.logger.warn("Invalid audio track id:",o.id);return}if(s.logger.log("audioTrack "+o.id+" loaded"),this.tracks[o.id].details=o.details,o.details.live&&!this.hasInterval()){var c=o.details.targetduration*1e3;this.setInterval(c)}!o.details.live&&this.hasInterval()&&this.clearInterval()},f.onAudioTrackSwitched=function(o){var c=this.tracks[o.id].groupId;c&&this.audioGroupId!==c&&(this.audioGroupId=c)},f.onLevelLoaded=function(o){this._selectAudioGroup(o.level)},f.onError=function(o){o.type===u.ErrorTypes.NETWORK_ERROR&&(o.fatal&&this.clearInterval(),o.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",o.context.id),this._handleLoadError()))},f._setAudioTrack=function(o){if(this._trackId===o&&this.tracks[this._trackId].details){s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");return}if(o<0||o>=this.tracks.length){s.logger.warn("Invalid id passed to audio-track controller");return}var c=this.tracks[o];s.logger.log("Now switching to audio-track index "+o),this.clearInterval(),this._trackId=o;var _=c.url,y=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:y,url:_}),this._loadTrackDetailsIfNeeded(c)},f.doTick=function(){this._updateTrack(this._trackId)},f._selectAudioGroup=function(o){var c=this.hls.levels[o];if(!(!c||!c.audioGroupIds)){var _=c.audioGroupIds[c.urlId];this.audioGroupId!==_&&(this.audioGroupId=_,this._selectInitialAudioTrack())}},f._selectInitialAudioTrack=function(){var o=this,c=this.tracks;if(!!c.length){var _=this.tracks[this._trackId],y=null;if(_&&(y=_.name),this._selectDefaultTrack){var C=c.filter(function(B){return B.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,P=function(){c.forEach(function(k){F||(!o.audioGroupId||k.groupId===o.audioGroupId)&&(!y||y===k.name)&&(o._setAudioTrack(k.id),F=!0)})};P(),F||(y=null,P()),F||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},f._needsTrackLoading=function(o){var c=o.details,_=o.url;return!c||c.live?!!_:!1},f._loadTrackDetailsIfNeeded=function(o){if(this._needsTrackLoading(o)){var c=o.url,_=o.id;s.logger.log("loading audio-track playlist for id: "+_),this.hls.trigger(l.default.AUDIO_TRACK_LOADING,{url:c,id:_})}},f._updateTrack=function(o){if(!(o<0||o>=this.tracks.length)){this.clearInterval(),this._trackId=o,s.logger.log("trying to update audio-track "+o);var c=this.tracks[o];this._loadTrackDetailsIfNeeded(c)}},f._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var o=this._trackId,c=this.tracks[o],_=c.name,y=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+y+'"');for(var F=o,P=0;P0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=se.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=se.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=se.STOPPED},f.doTick=function(){var o,c,_,y=this.hls,C=y.config;switch(this.state){case se.ERROR:case se.PAUSED:case se.BUFFER_FLUSHING:break;case se.STARTING:this.state=se.WAITING_TRACK,this.loadedmetadata=!1;break;case se.IDLE:var F=this.tracks;if(!F||!this.media&&(this.startFragRequested||!C.startFragPrefetch))break;if(this.loadedmetadata)o=this.media.currentTime;else if(o=this.nextLoadPosition,o===void 0)break;var P=this.mediaBuffer?this.mediaBuffer:this.media,B=this.videoBuffer?this.videoBuffer:this.media,k=O.bufferInfo(P,o,C.maxBufferHole),ae=O.bufferInfo(B,o,C.maxBufferHole),ye=k.len,$e=k.end,fn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Xn=Math.max(fa,ae.len),ua=this.audioSwitch,Ra=this.trackId;if((yenu||k.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=nu+.05;else return}if(_.initSegment&&!_.initSegment.data)ft=_.initSegment;else if($e<=nu){if(ft=Ja[0],this.videoTrackCC!==null&&ft.cc!==this.videoTrackCC&&(ft=$t(Ja,this.videoTrackCC)),_.live&&ft.loadIdx&&ft.loadIdx===this.fragLoadIdx){var ht=k.nextStart?k.nextStart:nu;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ht+.05)),this.media.currentTime=ht+.05;return}}else{var Na,jo=C.maxFragLookUpTolerance,S0=fn?Ja[fn.sn-Ja[0].sn+1]:void 0,C0=function(tm){var k2=Math.min(jo,tm.duration);return tm.start+tm.duration-k2<=$e?1:tm.start-k2>$e&&tm.start?-1:0};$eXi-jo&&(jo=0),S0&&!C0(S0)?Na=S0:Na=K.search(Ja,C0)):Na=Ja[Wu-1],Na&&(ft=Na,nu=Na.start,fn&&ft.level===fn.level&&ft.sn===fn.sn&&(ft.sn<_.endSN?(ft=Ja[ft.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+ft.sn)):ft=null))}ft&&(ft.encrypted?(s.logger.log("Loading key for "+ft.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=se.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:ft})):(s.logger.log("Loading "+ft.sn+", cc: "+ft.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+$e.toFixed(3)),this.fragCurrent=ft,(ua||this.fragmentTracker.getState(ft)===Da.NOT_LOADED)&&(ft.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(ft.sn)&&(this.nextLoadPosition=ft.start+ft.duration),y.trigger(l.default.FRAG_LOADING,{frag:ft}),this.state=se.FRAG_LOADING)))}break;case se.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var yT=Pl.now(),N2=this.retryDate;P=this.media;var QZ=P&&P.seeking;(!N2||yT>=N2||QZ)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.WAITING_INIT_PTS:var bT=this.videoTrackCC;if(this.initPTS[bT]===void 0)break;var O2=this.waitingFragment;if(O2){var U2=O2.frag.cc;bT!==U2?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+U2+") does not match video track CC ("+bT+")"),this.waitingFragment=null,this.state=se.IDLE)):(this.state=se.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=se.IDLE;break;case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("ended",this.onvended);var _=this.config;this.tracks&&_.autoStartLoad&&this.startLoad(_.startPosition)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(o){s.logger.log("audio tracks updated"),this.tracks=o.audioTracks},f.onAudioTrackSwitching=function(o){var c=!!o.url;this.trackId=o.id,this.fragCurrent=null,this.state=se.PAUSED,this.waitingFragment=null,c?this.setInterval(jg):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=se.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,y=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var P=y.details;P&&c.fragments.length>0?(En(P,c),F=c.fragments[0].start,c.PTSKnown?s.logger.log("live audio playlist sliding:"+F.toFixed(3)):s.logger.log("live audio playlist - outdated PTS, unknown sliding")):(c.PTSKnown=!1,s.logger.log("live audio playlist - first load, unknown sliding"))}else c.PTSKnown=!1;if(y.details=c,!this.startFragRequested){if(this.startPosition===-1){var B=c.startTimeOffset;Object(i.isFiniteNumber)(B)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+B),this.startPosition=B):c.live?(this.startPosition=this.computeLivePosition(F,c),s.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_TRACK&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===se.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var y=this.tracks[this.trackId],C=y.details,F=C.totalduration,P=c.level,B=c.sn,k=c.cc,ae=this.config.defaultAudioCodec||y.audioCodec||"mp4a.40.2",ye=this.stats=o.stats;if(B==="initSegment")this.state=se.IDLE,ye.tparsed=ye.tbuffered=Pl.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:ye,frag:c,id:"audio"}),this.tick();else{this.state=se.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Ae(this.hls,"audio"));var $e=this.initPTS[k],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||$e!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P);var fa=!1;this.demuxer.push(o.payload,fn,ae,null,c,F,fa,$e)}else s.logger.log("unknown video PTS for continuity counter "+k+", waiting for video PTS before demuxing audio frag "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P),this.waitingFragment=o,this.state=se.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C;if(y.video&&delete y.video,C=y.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,y),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var P={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[P]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,P))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&y.sn===_.sn&&y.level===_.level&&this.state===se.PARSING){var C=this.trackId,F=this.tracks[C],P=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(ue.AUDIO),s.logger.log("parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb),Pe(F.details,_,o.startPTS,o.endPTS);var B=this.audioSwitch,k=this.media,ae=!1;if(B)if(k&&k.readyState){var ye=k.currentTime;s.logger.log("switching audio track : currentTime:"+ye),ye>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=se.BUFFER_FLUSHING,P.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ae=!0,this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var $e=this.pendingData;if(!$e){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),P.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(fn){fn&&fn.length&&$e.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ae&&$e.length&&($e.forEach(function(fn){c.state===se.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,fn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=Pl.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(o){var c=o.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onBufferAppended=function(o){if(o.parent==="audio"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=Pl.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var y=this.mediaBuffer?this.mediaBuffer:this.media;y&&s.logger.log("audio buffered : "+mt.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag;if(!(c&&c.type!=="audio"))switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=o.frag;if(_&&_.type!=="audio")break;if(!o.fatal){var y=this.fragLoadError;y?y++:y=1;var C=this.config;if(y<=C.fragLoadingMaxRetry){this.fragLoadError=y;var F=Math.min(Math.pow(2,y-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=Pl.now()+F,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR}break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==se.ERROR&&(this.state=o.fatal?se.ERROR:se.IDLE,s.logger.warn("AudioStreamController: "+o.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===se.PARSING||this.state===se.PARSED)){var P=this.mediaBuffer,B=this.media.currentTime,k=P&&O.isBuffered(P,B)&&O.isBuffered(P,B+.5);if(k){var ae=this.config;ae.maxMaxBufferLength>=ae.maxBufferLength&&(ae.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+ae.maxMaxBufferLength+"s")),this.state=se.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=se.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var o=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){o.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=se.PARSED):(this.state=se.IDLE,this.fragPrevious=null,this.tick())},jf(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("audio stream:"+c+"->"+o)}},get:function(){return this._state}}]),D}(Al),zI=$I,Ng=function(){if(typeof window!="undefined"&&window.VTTCue)return window.VTTCue;var w="auto",D={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(y){if(typeof y!="string")return!1;var C=D[y.toLowerCase()];return C?y.toLowerCase():!1}function o(y){if(typeof y!="string")return!1;var C=f[y.toLowerCase()];return C?y.toLowerCase():!1}function c(y){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");Wu=Na,this.hasBeenReset=!0}})),Object.defineProperty(P,"positionAlign",c({},B,{get:function(){return nu},set:function(Na){var jo=o(Na);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");nu=jo,this.hasBeenReset=!0}})),Object.defineProperty(P,"size",c({},B,{get:function(){return Xi},set:function(Na){if(Na<0||Na>100)throw new Error("Size must be between 0 and 100.");Xi=Na,this.hasBeenReset=!0}})),Object.defineProperty(P,"align",c({},B,{get:function(){return ft},set:function(Na){var jo=o(Na);if(!jo)throw new SyntaxError("An invalid or illegal string was specified.");ft=jo,this.hasBeenReset=!0}})),P.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_}(),VI=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function Og(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new VI,this.regionList=[]}function QI(w){function D(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=w.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?D(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?D(f[1],f[2],0,f[4]):D(0,f[1],f[2],f[4]):null}function Ug(){this.values=Object.create(null)}Ug.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 kg(w,D,f,v){var o=v?w.split(v):[w];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var y=_[0],C=_[1];D(y,C)}}}var Nf=new Ng(0,0,0),Yi=Nf.align==="middle"?"middle":"center";function KI(w,D,f){var v=w;function o(){var y=QI(w);if(y===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),y}function c(y,C){var F=new Ug;kg(y,function(k,ae){switch(k){case"region":for(var ye=f.length-1;ye>=0;ye--)if(f[ye].id===ae){F.set(k,f[ye].region);break}break;case"vertical":F.alt(k,ae,["rl","lr"]);break;case"line":var $e=ae.split(","),fn=$e[0];F.integer(k,fn),F.percent(k,fn)&&F.set("snapToLines",!1),F.alt(k,fn,["auto"]),$e.length===2&&F.alt("lineAlign",$e[1],["start",Yi,"end"]);break;case"position":$e=ae.split(","),F.percent(k,$e[0]),$e.length===2&&F.alt("positionAlign",$e[1],["start",Yi,"end","line-left","line-right","auto"]);break;case"size":F.percent(k,ae);break;case"align":F.alt(k,ae,["start",Yi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var P=F.get("line","auto");P==="auto"&&Nf.line===-1&&(P=-1),C.line=P,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Yi);var B=F.get("position","auto");B==="auto"&&Nf.position===50&&(B=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=B}function _(){w=w.replace(/^\s+/,"")}if(_(),D.startTime=o(),_(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);w=w.substr(3),_(),D.endTime=o(),_(),c(w,D)}function Bg(w){return w.replace(//gi,` `)}Og.prototype={parse:function(D){var f=this;D&&(f.buffer+=f.decoder.decode(D,{stream:!0}));function v(){var F=f.buffer,P=0;for(F=Bg(F);P")===-1){f.cue.id=c;continue}case"CUE":try{KI(c,f.cue,f.regionList)}catch{f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var C=c.indexOf("-->")!==-1;if(!c||C&&(y=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+=` `),f.cue.text+=c;continue;case"BADCUE":c||(f.state="ID");continue}}}catch{f.state==="CUETEXT"&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state=f.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var D=this;try{if(D.buffer+=D.decoder.decode(),(D.cue||D.state==="HEADER")&&(D.buffer+=` `,D.parse()),D.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return D.onflush&&D.onflush(),this}};var YI=Og;function XI(w,D,f,v){for(var o,c,_,y,C,F=window.VTTCue||TextTrackCue,P=0;P=16?y--:y++,navigator.userAgent.match(/Firefox\//)?c.line=P+1:c.line=P>7?P-2:P+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(y/32))),w.addCue(c)}}var Kd={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Hg=function(D){var f=D;return Kd.hasOwnProperty(D)&&(f=Kd[D]),String.fromCharCode(f)},qu=15,jl=100,ZI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},eT={17:2,18:4,21:6,22:8,23:10,19:13,20:15},nT={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},aT={25:2,26:4,29:6,30:8,31:10,27:13,28:15},tT=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Jg;(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"})(Jg||(Jg={}));var Ya={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(D){this.time=D},log:function(D,f){var v=this.verboseFilter[D];this.verboseLevel>=v}},ps=function(D){for(var f=[],v=0;vjl&&(Ya.log("ERROR","Too large cursor position "+this.pos),this.pos=jl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=Hg(v);if(this.pos>=jl){Ya.log("ERROR","Cannot insert "+v.toString(16)+" ("+o+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(o,this.currPenState),this.moveCursor(1)},D.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},D.getTextAndFormat=function(){return this.rows},w}(),E0=function(){function w(f,v){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new Xa,this.nonDisplayedMemory=new Xa,this.lastOutputScreen=new Xa,this.currRollUpRow=this.displayedMemory.rows[qu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var D=w.prototype;return D.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[qu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},D.getHandler=function(){return this.outputFilter},D.setHandler=function(v){this.outputFilter=v},D.setPAC=function(v){this.writeScreen.setPAC(v)},D.setBkgData=function(v){this.writeScreen.setBkgData(v)},D.setMode=function(v){v!==this.mode&&(this.mode=v,Ya.log("INFO","MODE="+v),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},D.insertChars=function(v){for(var o=0;o=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}Ya.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Ya.time;o!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=o:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,o,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:o),this.lastOutputScreen.copy(this.displayedMemory))},D.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),I0=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 E0(1,v),new E0(2,o)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var D=w.prototype;return D.getHandler=function(v){return this.channels[v].getHandler()},D.setHandler=function(v,o){this.channels[v].setHandler(o)},D.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Ya.setTime(v);for(var F=0;F ("+ps([_,y])+")");if(c=this.parseCmd(_,y),c||(c=this.parseMidrow(_,y)),c||(c=this.parsePAC(_,y)),c||(c=this.parseBackgroundAttributes(_,y)),!c&&(C=this.parseChars(_,y),C))if(this.currChNr&&this.currChNr>=0){var P=this.channels[this.currChNr-1];P.insertChars(C)}else Ya.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ya.log("WARNING","Couldn't parse cleaned data "+ps([_,y])+" orig: "+ps([o[F],o[F+1]])))}},D.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,y=(v===23||v===31)&&o>=33&&o<=35;if(!(_||y))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ya.log("DEBUG","Repeated command ("+ps([v,o])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?o===32?C.ccRCL():o===33?C.ccBS():o===34?C.ccAOF():o===35?C.ccAON():o===36?C.ccDER():o===37?C.ccRU(2):o===38?C.ccRU(3):o===39?C.ccRU(4):o===40?C.ccFON():o===41?C.ccRDC():o===42?C.ccTR():o===43?C.ccRTD():o===44?C.ccEDM():o===45?C.ccCR():o===46?C.ccENM():o===47&&C.ccEOC():C.ccTO(o-32),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.parseMidrow=function(v,o){var c=null;if((v===17||v===25)&&o>=32&&o<=47){if(v===17?c=1:c=2,c!==this.currChNr)return Ya.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Ya.log("DEBUG","MIDROW ("+ps([v,o])+")"),!0}return!1},D.parsePAC=function(v,o){var c=null,_=null,y=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(y||C))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,o>=64&&o<=95?_=c===1?ZI[v]:nT[v]:_=c===1?eT[v]:aT[v];var F=this.interpretPAC(_,o),P=this.channels[c-1];return P.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.interpretPAC=function(v,o){var c=o,_={color:null,italics:!1,indent:null,underline:!1,row:v};return o>95?c=o-96:c=o-64,_.underline=(c&1)==1,c<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((c-16)/2)*4,_},D.parseChars=function(v,o){var c=null,_=null,y=null;if(v>=25?(c=2,y=v-8):(c=1,y=v),y>=17&&y<=19){var C=o;y===17?C=o+80:y===18?C=o+112:C=o+144,Ya.log("INFO","Special char '"+Hg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=ps(_);Ya.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},D.parseBackgroundAttributes=function(v,o){var c,_,y,C,F=(v===16||v===24)&&o>=32&&o<=47,P=(v===23||v===31)&&o>=45&&o<=47;return F||P?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=tT[_],o%2==1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),y=v<24?1:2,C=this.channels[y-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},D.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},w}(),Xd=function(D,f,v){return D.substr(v||0,f.length)===f},iT=function(D){var f=parseInt(D.substr(-3)),v=parseInt(D.substr(-6,2)),o=parseInt(D.substr(-9,2)),c=D.length>9?parseInt(D.substr(0,D.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(o)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+D);return f+=1e3*v,f+=60*1e3*o,f+=60*60*1e3*c,f},T0=function(D){for(var f=5381,v=D.length;v;)f=f*33^D.charCodeAt(--v);return(f>>>0).toString()},lT=function(D,f,v){var o=D[f],c=D[o.prevCC];if(!c||!c.new&&o.new){D.ccOffset=D.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)D.ccOffset+=o.start-c.start,o.new=!1,o=c,c=D[o.prevCC];D.presentationOffset=v},cT={parse:function(D,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(b0.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(y,` `).split(` `),F="00:00.000",P=0,B=0,k=0,ae=[],ye,$e=!0,fn=!1,fa=new YI;fa.oncue=function(Xn){var ua=v[o],Ra=v.ccOffset;ua&&ua.new&&(B!==void 0?Ra=v.ccOffset=ua.start:lT(v,o,k)),k&&(Ra=k-v.presentationOffset),fn&&(Xn.startTime+=Ra-B,Xn.endTime+=Ra-B),Xn.id=T0(Xn.startTime.toString())+T0(Xn.endTime.toString())+T0(Xn.text),Xn.text=decodeURIComponent(encodeURIComponent(Xn.text)),Xn.endTime>0&&ae.push(Xn)},fa.onparsingerror=function(Xn){ye=Xn},fa.onflush=function(){if(ye&&_){_(ye);return}c(ae)},C.forEach(function(Xn){if($e)if(Xd(Xn,"X-TIMESTAMP-MAP=")){$e=!1,fn=!0,Xn.substr(16).split(",").forEach(function(ua){Xd(ua,"LOCAL:")?F=ua.substr(6):Xd(ua,"MPEGTS:")&&(P=parseInt(ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),P-=f,B=iT(F)/1e3,k=P/9e4}catch(ua){fn=!1,ye=ua}return}else Xn===""&&($e=!1);fa.parse(Xn+` `)}),fa.flush()}},sT=cT;function Wg(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function vT(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fT=function(w){vT(D,w);function D(v){var o;if(o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_USERDATA,l.default.FRAG_DECRYPTED,l.default.MANIFEST_LOADING,l.default.MANIFEST_LOADED,l.default.FRAG_LOADED,l.default.INIT_PTS_FOUND)||this,o.media=null,o.config=void 0,o.enabled=!0,o.Cues=void 0,o.textTracks=[],o.tracks=[],o.initPTS=[],o.unparsedVttFrags=[],o.cueRanges=[],o.captionsTracks={},o.captionsProperties=void 0,o.cea608Parser=void 0,o.lastSn=-1,o.prevCC=-1,o.vttCCs=null,o.hls=v,o.config=v.config,o.Cues=v.config.cueHandler,o.captionsProperties={textTrack1:{label:o.config.captionsTextTrack1Label,languageCode:o.config.captionsTextTrack1LanguageCode},textTrack2:{label:o.config.captionsTextTrack2Label,languageCode:o.config.captionsTextTrack2LanguageCode}},o.config.enableCEA708Captions){var c=new qg(Wg(o),"textTrack1"),_=new qg(Wg(o),"textTrack2");o.cea608Parser=new uT(0,c,_)}return o}var f=D.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,P=C.length;P--;){var B=C[P],k=_T(B[0],B[1],c,_);if(k>=0&&(B[0]=Math.min(B[0],c),B[1]=Math.max(B[1],_),F=!0,k/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,y)},f.onInitPtsFound=function(o){var c=this,_=o.frag,y=o.id,C=o.initPTS,F=this.unparsedVttFrags;y==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(P){c.onFragLoaded(P)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!P||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),y.live){var B=Ut(P.details,y,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+B+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},B)}else this._clearReloadTimer()},f.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},f.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},f._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},f._loadCurrentTrack=function(){var o=this.trackId,c=this.tracks,_=this.hls,y=c[o];o<0||!y||y.details&&!y.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:y.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,y=this.trackId;if(!!c){var C=d(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(B){B.mode="disabled"});else{var F=C[y];F&&(F.mode="disabled")}var P=C[o];P&&(P.mode=_?"showing":"hidden")}},f._setSubtitleTrackInternal=function(o){var c=this.hls,_=this.tracks;!Object(i.isFiniteNumber)(o)||o<-1||o>=_.length||(this.trackId=o,s.logger.log("Switching to subtitle track "+o),c.trigger(l.default.SUBTITLE_TRACK_SWITCH,{id:o}),this._loadCurrentTrack())},f._onTextTracksChanged=function(){if(!!this.media){for(var o=-1,c=d(this.media.textTracks),_=0;_=y[P].start&&F<=y[P].end){C=y[P];break}var B=c.start+c.duration;C?C.end=B:(C={start:F,end:B},y.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=se.IDLE},f.onMediaDetaching=function(){var o=this;!this.media||(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(c){o.tracksBuffered[c.id]=[]}),this.media=null,this.state=se.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=se.IDLE)},f.onSubtitleTracksUpdated=function(o){var c=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=o.subtitleTracks,this.tracks.forEach(function(_){c.tracksBuffered[_.id]=[]})},f.onSubtitleTrackSwitch=function(o){if(this.currentTrackId=o.id,!this.tracks||!this.tracks.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.tracks[this.currentTrackId];c&&c.details&&this.setInterval(da)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,y=this.currentTrackId,C=this.tracks,F=C[y];c>=C.length||c!==y||!F||(_.live&&Vn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(da))},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,y=o.frag,C=this.hls;if(this.state===se.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=pn.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(P){var B=pn.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:P,stats:{tstart:F,tdecrypt:B}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=se.IDLE;return}switch(this.state){case se.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,y=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,P=o.maxFragLookUpTolerance,B=Math.min(o.maxBufferLength,o.maxMaxBufferLength),k=O.bufferedInfo(this._getBuffered(),y.currentTime,F),ae=k.end,ye=k.len,$e=C[c].details,fn=$e.fragments,fa=fn.length,Xn=fn[fa-1].start+fn[fa-1].duration;if(ye>B)return;var ua,Ra=this.fragPrevious;aeVg){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=Vg-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){switch(o.mediaKeySystemDomain){case rr.WIDEVINE:return c}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},f._requestLicense=function(o,c){s.logger.log("Requesting content license for key-system");var _=this._mediaKeysList[0];if(!_){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var y=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(y,o,c);s.logger.log("Sending license request to URL: "+y);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(P){s.logger.error("Failure requesting DRM license: "+P),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(o){if(!!this._emeEnabled){var c=o.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)}},f.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},f.onManifestParsed=function(o){if(!!this._emeEnabled){var c=o.levels.map(function(y){return y.audioCodec}),_=o.levels.map(function(y){return y.videoCodec});this._attemptKeySystemAccess(rr.WIDEVINE,c,_)}},mT(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(g),DT=Kg;function gT(w){for(var D=1;Dc)return y}return 0}},{key:"maxAutoLevel",get:function(){var o=this.levels,c=this.autoLevelCapping,_;return c===-1&&o&&o.length?_=o.length-1:_=c,_}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(o){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,o)}},{key:"audioTracks",get:function(){var o=this.audioTrackController;return o?o.audioTracks:[]}},{key:"audioTrack",get:function(){var o=this.audioTrackController;return o?o.audioTrack:-1},set:function(o){var c=this.audioTrackController;c&&(c.audioTrack=o)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTrack:-1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleTrack=o)}},{key:"subtitleDisplay",get:function(){var o=this.subtitleTrackController;return o?o.subtitleDisplay:!1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=o)}}]),D}(ie);aR.defaultConfig=void 0},"./src/polyfills/number-isFinite.js":function(e,n,a){"use strict";a.r(n),a.d(n,"isFiniteNumber",function(){return t});var t=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)}},"./src/utils/get-self-scope.js":function(e,n,a){"use strict";a.r(n),a.d(n,"getSelfScope",function(){return t});function t(){return typeof window=="undefined"?self:window}},"./src/utils/logger.js":function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return g}),a.d(n,"logger",function(){return E});var t=a("./src/utils/get-self-scope.js");function r(){}var u={trace:r,debug:r,log:r,warn:r,info:r,error:r},i=u;function l(b,I){return I="["+b+"] > "+I,I}var s=Object(t.getSelfScope)();function m(b){var I=s.console[b];return I?function(){for(var L=arguments.length,N=new Array(L),z=0;z1?I-1:0),N=1;N{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.Direction=void 0;var xMe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(xMe=tg.Direction||(tg.Direction={}))});var GL=Ge(Fa=>{"use strict";var rg=Fa&&Fa.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(m&&mt)return t;if(e=a)throw new RangeError("min (".concat(n,") is equal/bigger than max (").concat(a,")"));if(ea)throw new RangeError("value (".concat(e,") is bigger than max (").concat(a,")"))}Fa.checkBoundaries=kMe;function BMe(e,n,a){return ea?a:e}Fa.checkValuesAgainstBoundaries=BMe;function HMe(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}"))}Fa.checkInitialOverlap=HMe;function JMe(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)}}Fa.getMargin=JMe;function qMe(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)}}Fa.getPaddingAndBorder=qMe;function WMe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return GK(r,t*n[u].x,n[u].y)})}Fa.translateThumbs=WMe;function $Me(e,n,a,t){for(var r=0,u=AK(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},XMe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(m){return m});var l=[],s=function(m){var p=MK(a[m],t[m],r,u,i),g=n[m].x;n.forEach(function(E,b){var I=E.x,L=MK(a[b],t[b],r,u,i);m!==b&&(g>=I&&g<=I+L||g+p>=I&&g+p<=I+L)&&(l.includes(b)||(l.push(m),l.push(b),l=rg(rg([],l,!0),[m,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},ZMe=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,Fa.getStepDecimals)(t),l=(0,FL.useState)({}),s=l[0],m=l[1],p=(0,FL.useState)(u(n[a].toFixed(i))),g=p[0],E=p[1];return(0,FL.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var I={},L=e.getOffsets(),N=XMe(a,L,b,n,r,i,u),z=u(n[a].toFixed(i));if(N.length){var $=N.reduce(function(X,ve,xe,ke){return X.length?rg(rg([],X,!0),[L[ke[xe]].x],!1):[L[ke[xe]].x]},[]);if(Math.min.apply(Math,$)===L[a].x){var ne=[];N.forEach(function(X){ne.push(n[X].toFixed(i))}),z=Array.from(new Set(ne.sort(function(X,ve){return parseFloat(X)-parseFloat(ve)}))).map(u).join(r);var ue=Math.min.apply(Math,$),Z=Math.max.apply(Math,$),Y=b[N[$.indexOf(Z)]].getBoundingClientRect().width;I.left="".concat(Math.abs(ue-(Z+Y))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(z),m(I)}},[e,n]),[g,s]};Fa.useThumbOverlap=ZMe;function AK(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return FK(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var xK=Ge(Ji=>{"use strict";var eAe=Ji&&Ji.__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)}}(),nAe=Ji&&Ji.__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]}),aAe=Ji&&Ji.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),tAe=Ji&&Ji.__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)&&nAe(n,e,a);return aAe(n,e),n},LK=Ji&&Ji.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.clientX,r.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,bt.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var u;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var u=(0,bt.isTouchEvent)(r);if(!(!u&&r.button!==0)){var i=t.getTargetIndex(r);i!==-1&&(u?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:i,thumbZIndexes:t.state.thumbZIndexes.map(function(l,s){return s===i?Math.max.apply(Math,t.state.thumbZIndexes):l<=t.state.thumbZIndexes[i]?l:l-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var u=t.props,i=u.values,l=u.onChange,s=u.step,m=u.rtl,p=u.direction,g=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=m||p===po.Direction.Left||p===po.Direction.Down?-1:1;E!==-1&&(rAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]+b*(r.key==="PageUp"?s*10:s),E)))):oAe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){g&&t.fireOnFinalChange()}):g&&t.fireOnFinalChange())},t.onKeyUp=function(r){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(r,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,m=t.props,p=m.direction,g=m.min,E=m.max,b=m.onChange,I=m.values,L=m.step,N=m.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var z=t.trackRef.current;if(!z)return null;var $=z.getBoundingClientRect(),ne=(0,bt.isVertical)(p)?$.height:$.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],Z=u-s[1],Y=0;switch(p){case po.Direction.Right:case po.Direction.Left:Y=ue/ne*(E-g);break;case po.Direction.Down:case po.Direction.Up:Y=Z/ne*(E-g);break;default:(0,bt.assertUnreachable)(p)}if(N&&(Y*=-1),Math.abs(Y)>=L/2){for(var X=0;XE?Y=E-I[X]:ve=L/2&&b((0,bt.replaceAt)(I,l,t.normalizeValue(ke,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,m=i.step,p=i.allowOverlap,g=i.values;return(0,bt.normalizeValue)(r,u,l,s,m,p,g)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,u=r.onFinalChange,i=r.values;u&&u(i)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var u=0;u-1?"grabbing":this.props.draggableTrack?(0,bt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?bt.voidFn:this.onMouseDownTrack,onTouchStart:E?bt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:LK(LK([],N.map(function(z,$,ne){return l({props:{style:a.props.direction===po.Direction.Left||a.props.direction===po.Direction.Right?{position:"absolute",left:"".concat(z[0],"px"),marginTop:"".concat(z[1],"px")}:{position:"absolute",top:"".concat(z[0],"px"),marginLeft:"".concat(z[1],"px")},key:"mark".concat($),ref:a.markRefs[$]},index:$})}),!0),s.map(function(z,$){var ne=a.state.draggedThumbIndex===$;return u({index:$,value:z,isDragged:ne,props:{style:{position:"absolute",zIndex:L[$],cursor:E?"inherit":ne?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:E?void 0:0,"aria-valuemax":g?p:s[$+1]||p,"aria-valuemin":g?m:s[$-1]||m,"aria-valuenow":z,draggable:!1,ref:a.thumbRefs[$],role:"slider",onKeyDown:E?bt.voidFn:a.onKeyDown,onKeyUp:E?bt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:po.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(AE.Component);Ji.default=uAe});var PK=Ge(hu=>{"use strict";var iAe=hu&&hu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});hu.checkValuesAgainstBoundaries=hu.relativeValue=hu.useThumbOverlap=hu.Direction=hu.getTrackBackground=hu.Range=void 0;var lAe=iAe(xK());hu.Range=lAe.default;var LE=GL();Object.defineProperty(hu,"getTrackBackground",{enumerable:!0,get:function(){return LE.getTrackBackground}});Object.defineProperty(hu,"useThumbOverlap",{enumerable:!0,get:function(){return LE.useThumbOverlap}});Object.defineProperty(hu,"relativeValue",{enumerable:!0,get:function(){return LE.relativeValue}});Object.defineProperty(hu,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return LE.checkValuesAgainstBoundaries}});var cAe=ME();Object.defineProperty(hu,"Direction",{enumerable:!0,get:function(){return cAe.Direction}})});var FPe={};H2(FPe,{boot:()=>CPe});var J2=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 K2=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 A0=function(e){return e.slice().reverse()};var X2=function(e,n){return n.filter(e)};var Z2=function(){function e(n,a,t,r,u,i){var l,s,m,p,g,E,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Gt={show:Gx};var Mx=function(e){return e.showRecordFields},Dv=function(){return function(){return function(e){var n=Mx(e);return{show:function(a){return"{"+(n(Wa.value)(a)+"}")}}}}};var Hf={show:Cx},nn={show:Sx},sm={show:Fx},P0={show:function(e){if(e)return"true";if(!e)return"false";throw new Error("Failed pattern match at Data.Show (line 29, column 1 - line 31, column 23): "+[e.constructor.name])}},te=function(e){return e.show};var gv=function(e){var n=Ft(e);return function(a){var t=Mx(a);return function(r){var u=te(r);return{showRecordFields:function(i){return function(l){var s=t(Wa.value)(l),m=n(Wa.value),p=No(m)(l);return" "+(m+(": "+(u(p)+(","+s))))}}}}}},Rv=function(e){var n=Ft(e);return function(a){var t=te(a);return{showRecordFields:function(r){return function(u){var i=n(Wa.value),l=No(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Re=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ce=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Oe=function(){function e(){}return e.value=new e,e}(),vm=function(e){return e};var j0=function(e){return e.to};var N0=function(e){return e.from};var dee=ln(_n),G=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 Ax=function(e){var n=Ye(e);return{append:function(a){return function(t){if(a instanceof G)return t;if(t instanceof G)return a;if(a instanceof 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 In=function(e){return function(n){return function(a){if(a instanceof G)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])}}},Mt=In(!0)(cn(!1)),Pt=In(!1)(cn(!0));var oe={map:function(e){return function(n){return n instanceof S?new S(e(n.value0)):G.value}}},mee=U(oe);var Ue=function(e){return In(e)(dee)},Et=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 er=function(e){var n=De(e);return{eq:function(a){return function(t){return a instanceof G&&t instanceof G?!0:a instanceof S&&t instanceof S?n(a.value0)(t.value0):!1}}}},bu=function(e){var n=He(e),a=er(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return Ne.value;if(t instanceof G)return me.value;if(r instanceof G)return pe.value;if(t instanceof 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 Dr={apply:function(e){return function(n){if(e instanceof S)return mee(e.value0)(n);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return oe}};var Ve={bind:function(e){return function(n){if(e instanceof S)return n(e.value0);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return Dr}};var la=function(){return{pure:S.create,Apply0:function(){return Dr}}}();var ro={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return oe}},hee=function(){return{empty:G.value,Alt0:function(){return ro}}}(),oo={Applicative0:function(){return la},Plus1:function(){return hee}};var Ie=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Te=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var gc=function(e){return In(new Ie(e))(Te.create)};var or={map:function(e){return function(n){if(n instanceof Ie)return new Ie(n.value0);if(n instanceof Te)return new Te(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},gee=U(or);var jt=function(e){return function(n){return function(a){if(a instanceof Ie)return e(a.value0);if(a instanceof Te)return n(a.value0);throw new Error("Failed pattern match at Data.Either (line 208, column 1 - line 208, column 64): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},yv=function(){return jt(cn(G.value))(S.create)}();var fm={apply:function(e){return function(n){if(e instanceof Ie)return new Ie(e.value0);if(e instanceof Te)return gee(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 or}};var tu={bind:jt(function(e){return function(n){return new Ie(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return fm}};var Rc=function(){return{pure:Te.create,Apply0:function(){return fm}}}(),pR={Applicative0:function(){return Rc},Bind1:function(){return tu}};var Ri=function(e){return e};var yc={map:function(e){return function(n){return e(n)}}};var Lx={apply:function(e){return function(n){return e(n)}},Functor0:function(){return yc}},Ree={bind:function(e){return function(n){return n(e)}},Apply0:function(){return Lx}},_m={pure:Ri,Apply0:function(){return Lx}},nr={Applicative0:function(){return _m},Bind1:function(){return Ree}};var xx=function(e){return Math.min(Math.abs(e),2147483647)},Px=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},jx=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var ST={Ring0:function(){return mc}};var Yr=function(e){return e.mod};var sr={degree:xx,div:Px,mod:jx,CommutativeRing0:function(){return ST}},Ur=function(e){return e.div};var It={mempty:"",Semigroup0:function(){return kf}};var za=function(e){return e.mempty};var Nx=function(e){return function(){return e}},Ox=function(e){return function(n){return function(){return n(e())()}}};var CT=function(e){return function(n){return function(){for(var a=0,t=e.length;a>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},sP=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 qne=Ht(Be),UP=kl(Iv),Wne=Dt(Be);var q0=function(e){return e.foldrWithIndex};var Sm=function(e){return e.foldlWithIndex};var $ne=function(e){var n=q0(e);return function(a){var t=Ye(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)}}},Cm={foldrWithIndex:function(e){return function(n){var a=qne(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=UP(sn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=Wne(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=UP(sn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return $ne(Cm)(e)},Foldable0:function(){return Be}};var kP=function(e){var n=Sm(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof G?a(r)(i):u}}};return n(t)(G.value)}};var BP=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Tt=function(e){return e},HP=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 FR=isFinite;var GR=Math.abs;var W0=Math.floor,QT=Math.log;var MR=function(e){return function(n){return Math.pow(e,n)}};var i_=Math.round;var JP=2.302585092994046;var qP=kt(cm),WP=nt(cm);var Xne=function(){return HP(S.create)(G.value)}(),wc=Xne(10),Is=function(){return BP(S.create)(G.value)}(),$P=function(e){if(!FR(e))return 0;if(e>=Tt(qP))return qP;if(e<=Tt(WP))return WP;if(je)return Ue(0)(Is(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},AR=function(e){return $P(i_(e))};var Eo=function(e){return $P(W0(e))};function LR(e){return Object.prototype.toString.call(e).slice(8,-1)}function Fm(e){return e===null}function l_(e){return e===void 0}var xR=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function zP(e){return e.stack||e.toString()}function Iu(e){return new Error(e)}function $0(e){return e.message}function PR(e){return function(){throw e}}var QP=function(e){return PR(Iu(e))};var KP={show:zP};var Rr=function(e){return e.throwError};var Nt=function(e){return e.catchError};var Fv=function(e){var n=Nt(e),a=e.MonadThrow0().Monad0(),t=U(a.Bind1().Apply0().Functor0()),r=q(a.Applicative0());return function(u){return n(t(Te.create)(u))(function(i){return r(Ie.create(i))})}};var Sr={liftEffect:ln(_n),Monad0:function(){return bc}},gn=function(e){return e.liftEffect};var Zne=U(or);var YT=function(e){return e};var OR=function(e){return e};var UR=function(e){return function(n){return e(n)}},Mm=function(e){var n=U(e);return{map:function(a){return UR(n(Zne(a)))}}};var XP=function(e){return{Applicative0:function(){return nl(e)},Bind1:function(){return Ec(e)}}},Ec=function(e){var n=ee(e.Bind1()),a=q(e.Applicative0());return{bind:function(t){return function(r){return n(t)(jt(function(u){return a(Ie.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return kR(e)}}},kR=function(e){var n=Mm(e.Bind1().Apply0().Functor0());return{apply:Qu(XP(e)),Functor0:function(){return n}}},nl=function(e){return{pure:function(){var n=q(e.Applicative0());return function(a){return YT(n(Te.create(a)))}}(),Apply0:function(){return kR(e)}}};var XT=function(e){var n=XP(e);return{throwError:function(){var a=q(e.Applicative0());return function(t){return YT(a(Ie.create(t)))}}(),Monad0:function(){return n}}};var BR=function(e){var n=Ye(e);return function(a){var t=a.Bind1(),r=ee(t),u=q(a.Applicative0()),i=Mm(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(m){if(m instanceof Te)return u(new Te(m.value0));if(m instanceof Ie)return r(s)(function(p){if(p instanceof Te)return u(new Te(p.value0));if(p instanceof Ie)return u(new Ie(n(m.value0)(p.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 87, column 9 - line 89, column 49): "+[p.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 83, column 5 - line 89, column 49): "+[m.constructor.name])})}},Functor0:function(){return i}}}};var ei=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var HR=function(e){var n=ru(e);return function(a){return new ei(a,n)}};var ZT=function(e){var n=U(e);return{map:function(a){return function(t){return new ei(a(t.value0),n(a)(t.value1))}}}};var eS=function(e){var n=Tr(e),a=Dt(e),t=Ht(e);return{foldMap:function(r){var u=Ye(r.Semigroup0()),i=n(r);return function(l){return function(s){return u(l(s.value0))(i(l)(s.value1))}}},foldl:function(r){return function(u){return function(i){return a(r)(r(u)(i.value0))(i.value1)}}},foldr:function(r){return function(u){return function(i){return r(i.value0)(t(r)(u)(i.value1))}}}}};var Vt=function(){function e(){}return e.value=new e,e}(),et=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),JR=function(e){return e},lae=function(e){return new et(e.value0,e.value1)};var cae=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof et&&m.value1 instanceof et&&m.value1.value1 instanceof et){r=new et(m,s),t=m.value1.value1.value1;return}var p=function(E){return E instanceof et&&E.value1 instanceof et&&E.value1.value1 instanceof Vt?new et(e(E.value0),new et(e(E.value1.value0),Vt.value)):E instanceof et&&E.value1 instanceof Vt?new et(e(E.value0),Vt.value):Vt.value},g=function(E){return function(b){var I=E,L=!1,N;function z($,ne){if($ instanceof et&&$.value0 instanceof et&&$.value0.value1 instanceof et&&$.value0.value1.value1 instanceof et){I=$.value1,b=new et(e($.value0.value0),new et(e($.value0.value1.value0),new et(e($.value0.value1.value1.value0),ne)));return}return L=!0,ne}for(;!L;)N=z(I,b);return N}};return u=!0,g(s)(p(m))}for(;!u;)i=l(r,t);return i}};return n(Vt.value)},nS={map:cae};var aS=ZT(nS),Hr={foldr:function(e){return function(n){var a=function(){var r=function(u){return function(i){var l=u,s=!1,m;function p(g,E){if(E instanceof Vt)return s=!0,g;if(E instanceof et){l=new et(E.value0,g),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[g.constructor.name,E.constructor.name])}for(;!s;)m=p(l,i);return m}};return r(Vt.value)}(),t=Dt(Hr)(qa(e))(n);return function(r){return t(a(r))}}},foldl:function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof Vt)return u=!0,s;if(m instanceof et){r=e(s)(m.value0),t=m.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[m.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=Ye(e.Semigroup0()),a=za(e);return function(t){return Dt(Hr)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var sae=Ht(Hr);var xm=eS(Hr);var qR={append:function(e){return function(n){return sae(et.create)(n)(e)}}},aj=Ye(qR);var WR={append:function(e){return function(n){return new ei(e.value0,aj(e.value1)(lae(n)))}}};var tj={alt:aj,Functor0:function(){return nS}},tS=function(){return{empty:Vt.value,Alt0:function(){return tj}}}();var Dae=ut(Wx);var uj=function(e){return new et(e,Vt.value)};var rS=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Vt)return r=!0,l;if(s instanceof et){t=new et(s.value0,l),a=s.value1;return}throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[l.constructor.name,s.constructor.name])}for(;!r;)u=i(t,a);return u}};return e(Vt.value)}();var oS=function(e){var n=ee(e.Monad0().Bind1()),a=Uo(e);return function(t){var r=t.Plus1().Alt0(),u=ia(r),i=U(r.Functor0()),l=q(t.Applicative0());return function(s){var m=function(p){return n(u(i(ar.create)(s))(l(new zt(de))))(function(g){return l(Dae(function(E){return new et(E,p)})(function(E){return rS(p)})(g))})};return a(m)(Vt.value)}}};var qo=function(e){return Ht(e)(et.create)(Vt.value)};var ij=function(e){return e()};var lj=function(e){throw new Error(e)};var cj=function(){return lj};var gae=cj(),Rae=ij,Ic=function(e){return Rae(function(){return gae(e)})};var zR=function(){var e=HR(tS);return function(n){return JR(e(n))}}();var fj=function(e){return e.value0};var Q0=function(e){return e.join("")},jm=function(e){return e.split("")},Tu=function(e){return e},_j=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 Fj(e,n){var a=sS(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=sS(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function Gj(e){return function(n){return function(a){return function(t){var r=sS(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond),u=new Date(r+a);return isNaN(u.getTime())?n:e({year:u.getUTCFullYear(),month:u.getUTCMonth()+1,day:u.getUTCDate(),hour:u.getUTCHours(),minute:u.getUTCMinutes(),second:u.getUTCSeconds(),millisecond:u.getUTCMilliseconds()})}}}}var Mj=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function Aj(e,n,a,t){var r=Mj(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function Lj(e,n,a){return Mj(e,n-1,a).getUTCDay()}function Pv(e){return e.charCodeAt(0)}function xj(e){return String.fromCharCode(e)}var Jr=function(e){var n=q(e.Applicative0()),a=ru(e.Plus1());return function(t){if(t)return n(de);if(!t)return a;throw new Error("Failed pattern match at Control.Alternative (line 48, column 1 - line 48, column 54): "+[t.constructor.name])}};var Pj=nt(hv),jj=kt(hv);var aa=function(e){return e.toEnum};var Hn=function(e){return e.fromEnum},vS=function(e){var n=aa(e),a=Hn(e),t=nt(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof S)return l.value0;if(l instanceof G){var s=i=Pv(Pj)&&e<=Pv(jj)?new S(xj(e)):G.value},kae={succ:f_(fS)(Pv),pred:__(fS)(Pv),Ord0:function(){return fR}};var p_=function(){return{cardinality:Pv(jj)-Pv(Pj)|0,toEnum:fS,fromEnum:Pv,Bounded0:function(){return hv},Enum1:function(){return kae}}}();var XR=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}},Nj=te(nn);var Ei=function(){function e(){}return e.value=new e,e}(),tl=function(){function e(){}return e.value=new e,e}(),rl=function(){function e(){}return e.value=new e,e}(),ol=function(){function e(){}return e.value=new e,e}(),ul=function(){function e(){}return e.value=new e,e}(),il=function(){function e(){}return e.value=new e,e}(),Jl=function(){function e(){}return e.value=new e,e}(),iu=function(){function e(){}return e.value=new e,e}(),Su=function(){function e(){}return e.value=new e,e}(),lu=function(){function e(){}return e.value=new e,e}(),Cu=function(){function e(){}return e.value=new e,e}(),Fu=function(){function e(){}return e.value=new e,e}(),cu=function(){function e(){}return e.value=new e,e}(),su=function(){function e(){}return e.value=new e,e}(),Gu=function(){function e(){}return e.value=new e,e}(),Mu=function(){function e(){}return e.value=new e,e}(),Au=function(){function e(){}return e.value=new e,e}(),Lu=function(){function e(){}return e.value=new e,e}(),ti=function(){function e(){}return e.value=new e,e}();var Oj={show:function(e){return"(Year "+(Nj(e)+")")}},Uj={show:function(e){if(e instanceof Ei)return"Monday";if(e instanceof tl)return"Tuesday";if(e instanceof rl)return"Wednesday";if(e instanceof ol)return"Thursday";if(e instanceof ul)return"Friday";if(e instanceof il)return"Saturday";if(e instanceof Jl)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},ZR={show:function(e){if(e instanceof iu)return"January";if(e instanceof Su)return"February";if(e instanceof lu)return"March";if(e instanceof Cu)return"April";if(e instanceof Fu)return"May";if(e instanceof cu)return"June";if(e instanceof su)return"July";if(e instanceof Gu)return"August";if(e instanceof Mu)return"September";if(e instanceof Au)return"October";if(e instanceof Lu)return"November";if(e instanceof ti)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},kj={show:function(e){return"(Day "+(Nj(e)+")")}},ey=na,ny=na,Bj=ct,Bae={eq:function(e){return function(n){return e instanceof Ei&&n instanceof Ei||e instanceof tl&&n instanceof tl||e instanceof rl&&n instanceof rl||e instanceof ol&&n instanceof ol||e instanceof ul&&n instanceof ul||e instanceof il&&n instanceof il||e instanceof Jl&&n instanceof Jl}}},Hj={compare:function(e){return function(n){if(e instanceof Ei&&n instanceof Ei)return Ne.value;if(e instanceof Ei)return me.value;if(n instanceof Ei)return pe.value;if(e instanceof tl&&n instanceof tl)return Ne.value;if(e instanceof tl)return me.value;if(n instanceof tl)return pe.value;if(e instanceof rl&&n instanceof rl)return Ne.value;if(e instanceof rl)return me.value;if(n instanceof rl)return pe.value;if(e instanceof ol&&n instanceof ol)return Ne.value;if(e instanceof ol)return me.value;if(n instanceof ol)return pe.value;if(e instanceof ul&&n instanceof ul)return Ne.value;if(e instanceof ul)return me.value;if(n instanceof ul)return pe.value;if(e instanceof il&&n instanceof il)return Ne.value;if(e instanceof il)return me.value;if(n instanceof il)return pe.value;if(e instanceof Jl&&n instanceof Jl)return Ne.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return Bae}},_S={eq:function(e){return function(n){return e instanceof iu&&n instanceof iu||e instanceof Su&&n instanceof Su||e instanceof lu&&n instanceof lu||e instanceof Cu&&n instanceof Cu||e instanceof Fu&&n instanceof Fu||e instanceof cu&&n instanceof cu||e instanceof su&&n instanceof su||e instanceof Gu&&n instanceof Gu||e instanceof Mu&&n instanceof Mu||e instanceof Au&&n instanceof Au||e instanceof Lu&&n instanceof Lu||e instanceof ti&&n instanceof ti}}},ap={compare:function(e){return function(n){if(e instanceof iu&&n instanceof iu)return Ne.value;if(e instanceof iu)return me.value;if(n instanceof iu)return pe.value;if(e instanceof Su&&n instanceof Su)return Ne.value;if(e instanceof Su)return me.value;if(n instanceof Su)return pe.value;if(e instanceof lu&&n instanceof lu)return Ne.value;if(e instanceof lu)return me.value;if(n instanceof lu)return pe.value;if(e instanceof Cu&&n instanceof Cu)return Ne.value;if(e instanceof Cu)return me.value;if(n instanceof Cu)return pe.value;if(e instanceof Fu&&n instanceof Fu)return Ne.value;if(e instanceof Fu)return me.value;if(n instanceof Fu)return pe.value;if(e instanceof cu&&n instanceof cu)return Ne.value;if(e instanceof cu)return me.value;if(n instanceof cu)return pe.value;if(e instanceof su&&n instanceof su)return Ne.value;if(e instanceof su)return me.value;if(n instanceof su)return pe.value;if(e instanceof Gu&&n instanceof Gu)return Ne.value;if(e instanceof Gu)return me.value;if(n instanceof Gu)return pe.value;if(e instanceof Mu&&n instanceof Mu)return Ne.value;if(e instanceof Mu)return me.value;if(n instanceof Mu)return pe.value;if(e instanceof Au&&n instanceof Au)return Ne.value;if(e instanceof Au)return me.value;if(n instanceof Au)return pe.value;if(e instanceof Lu&&n instanceof Lu)return Ne.value;if(e instanceof Lu)return me.value;if(n instanceof Lu)return pe.value;if(e instanceof ti&&n instanceof ti)return Ne.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return _S}},Jj=ct,ay=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return ey}}}(),Hae=function(){return{bottom:Ei.value,top:Jl.value,Ord0:function(){return Hj}}}(),ty=function(){return{bottom:iu.value,top:ti.value,Ord0:function(){return ap}}}(),qr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 35, column 1 - line 40, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return ay},Enum1:function(){return Jae(0)}},Jae=XR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=aa(qr),n=Hn(qr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(qr),n=Hn(qr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ey}}});var jv={cardinality:7,toEnum:function(e){return e===1?new S(Ei.value):e===2?new S(tl.value):e===3?new S(rl.value):e===4?new S(ol.value):e===5?new S(ul.value):e===6?new S(il.value):e===7?new S(Jl.value):G.value},fromEnum:function(e){if(e instanceof Ei)return 1;if(e instanceof tl)return 2;if(e instanceof rl)return 3;if(e instanceof ol)return 4;if(e instanceof ul)return 5;if(e instanceof il)return 6;if(e instanceof Jl)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 Hae},Enum1:function(){return qae(0)}},qae=XR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=aa(jv),n=Hn(jv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(jv),n=Hn(jv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return Hj}}});var pr={cardinality:12,toEnum:function(e){return e===1?new S(iu.value):e===2?new S(Su.value):e===3?new S(lu.value):e===4?new S(Cu.value):e===5?new S(Fu.value):e===6?new S(cu.value):e===7?new S(su.value):e===8?new S(Gu.value):e===9?new S(Mu.value):e===10?new S(Au.value):e===11?new S(Lu.value):e===12?new S(ti.value):G.value},fromEnum:function(e){if(e instanceof iu)return 1;if(e instanceof Su)return 2;if(e instanceof lu)return 3;if(e instanceof Cu)return 4;if(e instanceof Fu)return 5;if(e instanceof cu)return 6;if(e instanceof su)return 7;if(e instanceof Gu)return 8;if(e instanceof Mu)return 9;if(e instanceof Au)return 10;if(e instanceof Lu)return 11;if(e instanceof ti)return 12;throw new Error("Failed pattern match at Data.Date.Component (line 87, column 14 - line 99, column 19): "+[e.constructor.name])},Bounded0:function(){return ty},Enum1:function(){return Wae(0)}},Wae=XR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(pr),n=Hn(pr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ap}}});var qm={bottom:1,top:31,Ord0:function(){return ny}},xu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return qm},Enum1:function(){return $ae(0)}},$ae=XR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(xu),n=Hn(xu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return ny}}});var tp=RR()();var qj=ln(_n),ry=function(e){return e},Wj=function(e){return e},rp=function(e){return e};var $j=function(e){return e},op=function(e){return e.toDuration};var zj={append:function(e){return function(n){return e+n}}};var oy={append:function(e){return function(n){return e+n}}};var Vj=hc;var Qj=hc;var uy=function(e){return e.fromDuration};var Gs={fromDuration:tp(ry)(function(e){return e*1e3}),toDuration:tp(rp)(function(e){return e/1e3})},Nv={fromDuration:tp(Wj)(function(e){return e*6e4}),toDuration:tp(rp)(function(e){return e/6e4})},up={fromDuration:qj,toDuration:qj};var pS={fromDuration:tp($j)(function(e){return e*864e5}),toDuration:tp(rp)(function(e){return e/864e5})};var Xj=Hn(pr),dS=Et(),Zj=aa(jv),Vae=te(Oj),Qae=te(ZR),Kae=te(kj);var Yae=De(Bj),Xae=De(_S),Zae=De(Jj),ete=He(ey),nte=He(ap),ate=He(ny);var tte=aa(pr);var iy=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),ri=function(e){return e.value0},Wm=function(e){var n=Lj(e.value0,Xj(e.value1),e.value2),a=n===0;return dS(Zj(a?7:n))},eN={show:function(e){return"(Date "+(Vae(e.value0)+(" "+(Qae(e.value1)+(" "+(Kae(e.value2)+")")))))}},oi=function(e){return e.value1};var ly={eq:function(e){return function(n){return Yae(e.value0)(n.value0)&&Xae(e.value1)(n.value1)&&Zae(e.value2)(n.value2)}}},rte=De(ly),mS={compare:function(e){return function(n){var a=ete(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=nte(e.value1)(n.value1);return t instanceof me?me.value:t instanceof pe?pe.value:ate(e.value2)(n.value2)}},Eq0:function(){return ly}};var Fc=function(e){return e.value2},Ov=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new iy(r,dS(tte(u)),i)}}};return Aj(t,e,Xj(n),a)}}},cy=function(e){return function(n){return function(a){var t=new iy(e,n,a),r=rte(Ov(e)(n)(a))(t);return r?new S(t):G.value}}},hS=function(){return{bottom:new iy(nt(ay),nt(ty),nt(qm)),top:new iy(kt(ay),kt(ty),kt(qm)),Ord0:function(){return mS}}}();var sy=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}},vy=te(nn);var nN={show:function(e){return"(Second "+(vy(e)+")")}},aN={show:function(e){return"(Minute "+(vy(e)+")")}},tN={show:function(e){return"(Millisecond "+(vy(e)+")")}},rN={show:function(e){return"(Hour "+(vy(e)+")")}},fy=na,_y=na,py=na,dy=na,oN=ct,uN=ct,iN=ct,lN=ct,$m={bottom:0,top:59,Ord0:function(){return fy}},zm={bottom:0,top:59,Ord0:function(){return _y}},Vm={bottom:0,top:999,Ord0:function(){return py}},Qm={bottom:0,top:23,Ord0:function(){return dy}},Ii={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return $m},Enum1:function(){return ote(0)}},ote=sy("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ii),n=Hn(Ii);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return fy}}});var Ti={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return zm},Enum1:function(){return ute(0)}},ute=sy("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return _y}}});var Pu={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Vm},Enum1:function(){return ite(0)}},ite=sy("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Pu),n=Hn(Pu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return py}}});var Si={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Qm},Enum1:function(){return lte(0)}},lte=sy("enumHour","Data.Time.Component",function(){return{succ:function(){var e=aa(Si),n=Hn(Si);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Si),n=Hn(Si);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return dy}}});var vte=te(rN),fte=te(aN),_te=te(nN),pte=te(tN);var dte=De(lN),mte=De(uN),hte=De(oN),Dte=De(iN),gte=He(dy),Rte=He(_y),yte=He(fy),bte=He(py);var Gc=function(){function e(n,a,t,r){this.value0=n,this.value1=a,this.value2=t,this.value3=r}return e.create=function(n){return function(a){return function(t){return function(r){return new e(n,a,t,r)}}}},e}(),cN={show:function(e){return"(Time "+(vte(e.value0)+(" "+(fte(e.value1)+(" "+(_te(e.value2)+(" "+(pte(e.value3)+")")))))))}};var Ms=function(e){return e.value2},As=function(e){return e.value1},ll=function(e){return e.value3};var Mc=function(e){return e.value0};var DS={eq:function(e){return function(n){return dte(e.value0)(n.value0)&&mte(e.value1)(n.value1)&&hte(e.value2)(n.value2)&&Dte(e.value3)(n.value3)}}},gS={compare:function(e){return function(n){var a=gte(e.value0)(n.value0);if(a instanceof me)return me.value;if(a instanceof pe)return pe.value;var t=Rte(e.value1)(n.value1);if(t instanceof me)return me.value;if(t instanceof pe)return pe.value;var r=yte(e.value2)(n.value2);return r instanceof me?me.value:r instanceof pe?pe.value:bte(e.value3)(n.value3)}},Eq0:function(){return DS}};var ip=function(){return{bottom:new Gc(nt(Qm),nt(zm),nt($m),nt(Vm)),top:new Gc(kt(Qm),kt(zm),kt($m),kt(Vm)),Ord0:function(){return gS}}}();var wte=Hn(qr),Ete=Hn(pr),Ite=Hn(xu),Tte=Hn(Si),Ste=Hn(Ti),Cte=Hn(Ii),Fte=Hn(Pu),Gte=te(eN),Mte=te(cN),Ate=De(ly),Lte=De(DS),xte=He(mS),Pte=He(gS),jte=ee(Ve),lp=Jn(Dr),RS=U(oe),Nte=Vu(Ve),Ote=aa(qr),Ute=aa(pr),kte=aa(xu),Bte=aa(Si),Hte=aa(Ti),Jte=aa(Ii),qte=aa(Pu),cl=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),yS=function(e){return{year:wte(ri(e.value0)),month:Ete(oi(e.value0)),day:Ite(Fc(e.value0)),hour:Tte(Mc(e.value1)),minute:Ste(As(e.value1)),second:Cte(Ms(e.value1)),millisecond:Fte(ll(e.value1))}},my=function(e){return e.value1},sN={show:function(e){return"(DateTime "+(Gte(e.value0)+(" "+(Mte(e.value1)+")")))}};var Wte={eq:function(e){return function(n){return Ate(e.value0)(n.value0)&&Lte(e.value1)(n.value1)}}},ui={compare:function(e){return function(n){var a=xte(e.value0)(n.value0);return a instanceof me?me.value:a instanceof pe?pe.value:Pte(e.value1)(n.value1)}},Eq0:function(){return Wte}},ii=function(e){var n=op(e);return function(a){return function(t){return n(Fj(yS(a),yS(t)))}}},Uv=function(e){return e.value0},cp=function(){return{bottom:new cl(nt(hS),nt(ip)),top:new cl(kt(hS),kt(ip)),Ord0:function(){return ui}}}(),Ac=function(e){var n=uy(e);return function(a){return function(t){return jte(Gj(S.create)(G.value)(n(a))(yS(t)))(function(r){return lp(RS(cl.create)(Nte(lp(lp(RS(cy)(Ote(r.year)))(Ute(r.month)))(kte(r.day)))))(lp(lp(lp(RS(Gc.create)(Bte(r.hour)))(Hte(r.minute)))(Jte(r.second)))(qte(r.millisecond)))})}}};var vu=function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",m="Sequential",p="Map",g="Apply",E="Alt",b="Cons",I="Resume",L="Release",N="Finalizer",z="Finalized",$="Forked",ne="Fiber",ue="Thunk";function Z(qe,pa,Qa,Tn){this.tag=qe,this._1=pa,this._2=Qa,this._3=Tn}function Y(qe){var pa=function(Qa,Tn,Dn){return new Z(qe,Qa,Tn,Dn)};return pa.tag=qe,pa}function X(qe){return new Z(n,void 0)}function ve(qe){try{qe()}catch(pa){setTimeout(function(){throw pa},0)}}function xe(qe,pa,Qa){try{return pa(Qa())}catch(Tn){return qe(Tn)}}function ke(qe,pa,Qa){try{return pa(Qa)()}catch(Tn){return Qa(qe(Tn))(),X}}var rn=function(){var qe=1024,pa=0,Qa=0,Tn=new Array(qe),Dn=!1;function We(){var ea;for(Dn=!0;pa!==0;)pa--,ea=Tn[Qa],Tn[Qa]=void 0,Qa=(Qa+1)%qe,ea();Dn=!1}return{isDraining:function(){return Dn},enqueue:function(ea){var va,Ma;pa===qe&&(Ma=Dn,We(),Dn=Ma),Tn[(Qa+pa)%qe]=ea,pa++,Dn||We()}}}();function wn(qe){var pa={},Qa=0,Tn=0;return{register:function(Dn){var We=Qa++;Dn.onComplete({rethrow:!0,handler:function(ea){return function(){Tn--,delete pa[We]}}})(),pa[We]=Dn,Tn++},isEmpty:function(){return Tn===0},killAll:function(Dn,We){return function(){if(Tn===0)return We();var ea=0,va={};function Ma(vn){va[vn]=pa[vn].kill(Dn,function(oa){return function(){delete va[vn],ea--,qe.isLeft(oa)&&qe.fromLeft(oa)&&setTimeout(function(){throw qe.fromLeft(oa)},0),ea===0&&We()}})()}for(var dt in pa)pa.hasOwnProperty(dt)&&(ea++,Ma(dt));return pa={},Qa=0,Tn=0,function(vn){return new Z(r,function(){for(var oa in va)va.hasOwnProperty(oa)&&va[oa]()})}}}}}var dn=0,mn=1,yn=2,Kn=3,zn=4,Wn=5,Pa=6;function Ga(qe,pa,Qa){var Tn=0,Dn=dn,We=Qa,ea=null,va=null,Ma=null,dt=null,vn=null,oa=0,St=0,Da=null,it=!0;function J(x){for(var j,W,V;;)switch(j=null,W=null,V=null,Dn){case yn:Dn=mn;try{We=Ma(We),dt===null?Ma=null:(Ma=dt._1,dt=dt._2)}catch(ie){Dn=Wn,ea=qe.left(ie),We=null}break;case Kn:qe.isLeft(We)?(Dn=Wn,ea=We,We=null):Ma===null?Dn=Wn:(Dn=yn,We=qe.fromRight(We));break;case mn:switch(We.tag){case i:Ma&&(dt=new Z(b,Ma,dt)),Ma=We._2,Dn=mn,We=We._1;break;case n:Ma===null?(Dn=Wn,We=qe.right(We._1)):(Dn=yn,We=We._1);break;case r:Dn=Kn,We=xe(qe.left,qe.right,We._1);break;case u:Dn=zn,We=ke(qe.left,We._1,function(ie){return function(){Tn===x&&(Tn++,rn.enqueue(function(){Tn===x+1&&(Dn=Kn,We=ie,J(Tn))}))}});return;case a:Dn=Wn,ea=qe.left(We._1),We=null;break;case t:Ma===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Ma,dt),vn,va),va),Ma=null,dt=null,Dn=mn,We=We._1;break;case l:oa++,Ma===null?vn=new Z(b,We,vn,va):vn=new Z(b,We,new Z(b,new Z(I,Ma,dt),vn,va),va),Ma=null,dt=null,Dn=mn,We=We._1;break;case s:Dn=Kn,j=Ga(qe,pa,We._2),pa&&pa.register(j),We._1&&j.run(),We=qe.right(j);break;case m:Dn=mn,We=At(qe,pa,We._1);break}break;case Wn:if(Ma=null,dt=null,vn===null)Dn=Pa,We=va||ea||We;else switch(j=vn._3,V=vn._1,vn=vn._2,V.tag){case t:va&&va!==j&&oa===0?Dn=Wn:ea&&(Dn=mn,We=V._2(qe.fromLeft(ea)),ea=null);break;case I:va&&va!==j&&oa===0||ea?Dn=Wn:(Ma=V._1,dt=V._2,Dn=yn,We=qe.fromRight(We));break;case l:oa--,ea===null&&(W=qe.fromRight(We),vn=new Z(b,new Z(L,V._2,W),vn,j),(va===j||oa>0)&&(Dn=mn,We=V._3(W)));break;case L:vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,va&&va!==j&&oa===0?We=V._1.killed(qe.fromLeft(va))(V._2):ea?We=V._1.failed(qe.fromLeft(ea))(V._2):We=V._1.completed(qe.fromRight(We))(V._2),ea=null,oa++;break;case N:oa++,vn=new Z(b,new Z(z,We,ea),vn,va),Dn=mn,We=V._1;break;case z:oa--,Dn=Wn,We=V._1,ea=V._2;break}break;case Pa:for(var le in Da)Da.hasOwnProperty(le)&&(it=it&&Da[le].rethrow,ve(Da[le].handler(We)));Da=null,va&&ea?setTimeout(function(){throw qe.fromLeft(ea)},0):qe.isLeft(We)&&it&&setTimeout(function(){if(it)throw qe.fromLeft(We)},0);return;case dn:Dn=mn;break;case zn:return}}function K(x){return function(){if(Dn===Pa)return it=it&&x.rethrow,x.handler(We)(),function(){};var j=St++;return Da=Da||{},Da[j]=x,function(){Da!==null&&delete Da[j]}}}function O(x,j){return function(){if(Dn===Pa)return j(qe.right(void 0))(),function(){};var W=K({rethrow:!1,handler:function(){return j(qe.right(void 0))}})();switch(Dn){case dn:va=qe.left(x),Dn=Pa,We=va,J(Tn);break;case zn:va===null&&(va=qe.left(x)),oa===0&&(Dn===zn&&(vn=new Z(b,new Z(N,We(x)),vn,va)),Dn=Wn,We=null,ea=null,J(++Tn));break;default:va===null&&(va=qe.left(x)),oa===0&&(Dn=Wn,We=null,ea=null)}return W}}function T(x){return function(){var j=K({rethrow:!1,handler:x})();return Dn===dn&&J(Tn),j}}return{kill:O,join:T,onComplete:K,isSuspended:function(){return Dn===dn},run:function(){Dn===dn&&(rn.isDraining()?J(Tn):rn.enqueue(function(){J(Tn)}))}}}function sa(qe,pa,Qa,Tn){var Dn=0,We={},ea=0,va={},Ma=new Error("[ParAff] Early exit"),dt=null,vn=e;function oa(K,O,T){var x=O,j=null,W=null,V=0,le={},ie,ge;e:for(;;)switch(ie=null,x.tag){case $:if(x._3===e&&(ie=We[x._1],le[V++]=ie.kill(K,function(Ee){return function(){V--,V===0&&T(Ee)()}})),j===null)break e;x=j._2,W===null?j=null:(j=W._1,W=W._2);break;case p:x=x._2;break;case g:case E:j&&(W=new Z(b,j,W)),j=x,x=x._1;break}if(V===0)T(qe.right(void 0))();else for(ge=0,ie=V;ge()=>e.props.def;function LN(e){class n extends Ua.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 Ry=typeof module=="undefined"?void 0:module.require,mnn=function(){try{return Ry===void 0?void 0:Ry("util")}catch{return}}();var hnn=function(){var e;if(typeof performance!="undefined")e=performance;else if(Ry)try{e=Ry("perf_hooks").performance}catch{}return function(){return(e||Date).now()}}();var xN=(e,n)=>n[e],PN=(e,n,a)=>a[e]=n;var D_=function(n){return function(a){return n(a)()}};var dp=function(n){return function(a){return function(){return n(a)}}},Bv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},g_=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var Gre=_e(Bn),rh=function(){function e(){}return e.value=new e,e}(),ON=function(){return function(e){var n=Ft(e);return function(a){return g_(PN)(n(Wa.value))}}},SS=function(e){var n=gt(e);return function(a){var t=Ft(a);return function(r){return function(u){return Gre(function(){return xN(t(Wa.value),u)})(n)}}}};Va();var Fi=window.ReactDOM,{createPortal:UN,findDOMNode:znn,flushSync:Vnn,unstable_batchedUpdates:Qnn}=window.ReactDOM;var QS=$u(G3());function M3(e){return e.state&&e.state.s}function A3(e,n,a){return e.setState({s:n},a)}function L3(e,n){return e.state={s:n}}var x3=Fi.render,P3=Fi.hydrate,KS=QS.default&&QS.default.renderToString||(e=>""),ioe=Fi.unmountComponentAtNode,j3=Ua.Fragment;function N3(e,n,a){return Ua.createElement.apply(null,[e,loe(e,n)].concat(a))}function loe(e,n){if(typeof e!="string"||n._data==null)return n;var a={_data:void 0};for(var t in n._data){var r=n._data[t];a["data-"+t]=r}return Object.assign({},n,a)}function O3(e){return n=>e===n}var Fy=function(e){return function(n){return function(a){var t=fe(a);if(e instanceof G&&t instanceof G)return de;if(e instanceof S&&t instanceof G)return de;if(e instanceof S&&t instanceof S){if(O3(e.value0)(t.value0))return de;if(je)return n(new S(t.value0))()}return n(t)()}}};var re={asReactChildren:function(e){return[e]}},Qe={asReactChildren:function(e){return[e]}},be={asReactChildren:ln(_n)};var Xe=Je,YS=g_(A3),U3=Bv(x3),k3=Bv(P3),B3=dp(M3),ta=!1;var H3=Bv(L3),vh=function(e){return e.asReactChildren},$l=function(){return function(e){var n=vh(e);return function(a){return function(t){return function(r){return N3(a,t,n(r))}}}}},J3=$l()(be),xc=function(){return function(e){return function(n){return J3(e)(n)([])}}},Se=J3(j3)({});var XS=U(Bn),coe=q(_t),q3=function(e){return{initialize:function(n){return H3(n)(e.initialState)},getState:function(n){return function(){var t=XS(fe)(B3(n))();return Ue(e.initialState)(t)}},setState:YS}},W3=function(){var e=function(n){return function(a){return{initialize:function(t){return Wf(new S(a.initialState))(n)},getState:function(t){return XS(Ue(a.initialState))(qf(n))},setState:function(t){return function(r){return function(u){return function(){return Wf(new S(r))(n)(),YS(t)(r)(coe(de))(),u()}}}}}}};return XS(e)(O0(G.value))}();var z3=_e(ze),V3=Ye(Lt);var soe=q(_t),Q3=ON(),K3={reflectSymbol:function(){return"__unmounted"}},voe=Q3(K3),Y3={reflectSymbol:function(){return"__subscriptions"}},foe=Q3(Y3),Gy=_e(Bn),_oe=SS(Sa)(K3),X3=U(Bn),poe=SS(La(Sj))(Y3),doe=en(Ke),moe=Ta(vr),hoe=yR(_t)(Be),Doe=doe(ra),Z3=gn(Sr),goe=L0(bc),Roe=Ye(vv(GT(iR))),ZS=function(e){return e},qv=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),yoe={map:function(e){return function(n){return new qv(e(n.value0),n.value1)}}},Gr=function(e){return{bimap:function(n){return function(a){return function(t){return new qv(a(t.value0),z3(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},e4={apply:function(e){return function(n){return new qv(e.value0(n.value0),V3(e.value1)(n.value1))}},Functor0:function(){return yoe}},qn={bind:function(e){return function(n){var a=n(e.value0);return new qv(a.value0,V3(e.value1)(a.value1))}},Apply0:function(){return e4}},Rn={pure:function(e){return new qv(e,[])},Apply0:function(){return e4}};var n4=function(e){var n=ee(e);return function(a){var t=gn(a);return function(r){return function(u){return new qv(r,z3(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var w_=function(e){return new qv(de,[e])},Za=function(e){return w_(cn(e))},Wv=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return w_(function(r){return n(t)(function(u){return a(In(soe(de))(r.dispatch)(u))})})}},wa=function(e){var n=n4(e.Monad0().Bind1())(e);return function(a){return n(de)([a])}},a4=function(e){return function(n){var a=voe(rh.value),t=foe(rh.value),r=function(b){return function(I){return function(L){return function(){var z=Gy(th(b))(function($){return $.init})();return n({initialState:z.value0}).setState(b)(I)(L)()}}}},u=function(){var b=X3(Ue(!1)),I=_oe(rh.value);return function(L){return b(I(L))}}(),i=function(){var b=X3(Ue([])),I=poe(rh.value);return function(L){return b(I(L))}}(),l=function(b){return function(){return moe(hoe)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=Gy(th(b))(function(N){return N.init})();return n({initialState:L.value0}).getState(b)()}},m=function(b){return function(I){return function(){var N=i(b)();return t(io(fp(I))(N))(b)()}}},p=function(b){return function(I){var L=function(N){return fp(Doe(Qt(0))(function(){return N({dispatch:function(){var z=g(I);return function($){return Z3(z($))}}(),onStop:m(I)})}))};return CT(b)(L)}},g=function(b){return function(I){return goe(u(b))(function(){var N=s(b)(),z=Gy(th(b))(function(ne){return ne.update})(),$=z(N)(I);return r(b)($.value0)(p($.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),N=Gy(th(b))(function(z){return z.view})();return N(L)(g(b))}};return function(b){return AN(e,{def:b,init:n({initialState:b.init.value0}).initialize,render:E,componentDidMount:p(b.init.value1),componentWillUnmount:Roe(a(!0))(l)})}}},eC=function(e){return function(){var a=Z3(W3)();return MN(function(t){return a4(t)(a)(e)})}},js=function(e){return function(n){return GN(e,function(a){var t=a4(a)(q3);return function(r){return t(n(r))}})}};var t4=q(_t),r4=ou(),My=function(e){return{handleMaybe:function(n){return function(a){return D_(function(){var t=In(t4(de))(n);return function(r){return t(r4(a(r)))}}())}}}},$v=function(e){return{handleMaybe:function(n){return function(a){return function(t){return In(t4(de))(n)(r4(a))()}}}}},li={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},Ay={handleEffect:function(e){return D_(e)}},Nu={handleEffect:function(e){return D_(cn(e))}},ma={handle:function(e){return function(n){return function(a){return e(n)()}}}},Gi=function(e){return e.handleMaybe},Xr=function(e){return e.handleEffect},Yn=function(e){return e.handle};function Ly(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var r in e)({}).hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}var zl=function(){return function(){return function(e){return function(n){return Ly(e,n)}}}};var xy=function(e){var n=Ft(e);return function(){return function(){return function(a){return function(t){return uR(n(a))(t)}}}}};var nC=xc(),aC=$l(),o4=zl()();var gp=Je,u4=function(e){return function(n){return nC(gp(e))(n)}},tC=function(e){var n=aC(e);return function(a){return function(t){return n(gp(a))(t)}}},Vl=function(e){var n=aC(e);return function(a){return function(t){return function(r){return n(gp(a))(o4(r)({className:t}))}}}},fh=function(e){return function(n){return function(a){return nC(gp(e))(o4(a)({className:n}))}}},i4=function(e){return function(n){return nC(gp(e))({className:n})}},$r=function(e){return function(n){var a=aC(n);return function(t){return function(r){return a(gp(e))({className:t})(r)}}}};var vt=Je;var Rp=function(e){var n=Vl(e);return function(){return function(){return n("video")}}},Py=function(e){return $r("video")(e)};var jy=function(e){return $r("ul")(e)};var Ns=function(e){return $r("tr")(e)};var zv=function(e){return $r("thead")(e)};var Vv=function(e){return $r("th")(e)};var yp=function(){return function(){return fh("textarea")}};var Ny=function(e){var n=Vl(e);return function(){return function(){return n("td")}}},Ql=function(e){return $r("td")(e)};var Qv=function(e){return $r("tbody")(e)};var Kv=function(e){return $r("table")(e)};var Io=function(e){return $r("strong")(e)},bp=function(e){var n=Vl(e);return function(){return function(){return n("span")}}},$a=function(e){return $r("span")(e)},Oy=function(){return function(){return fh("source")}};var Uy=function(e){var n=Vl(e);return function(){return function(){return n("select")}}};var wp=function(e){var n=Vl(e);return function(){return function(){return n("p")}}},Kt=function(e){return $r("p")(e)};var ky=function(e){var n=Vl(e);return function(){return function(){return n("option")}}};var By=function(e){return $r("li")(e)};var Yv=function(e){return $r("label")(e)};var Zr=function(){return function(){return fh("input")}};var fl=function(){return function(){return fh("img")}};var tt=function(e){return $r("i")(e)};var Kl=i4("hr");var Ep=function(e){return $r("h6")(e)};var _l=function(e){return $r("h4")(e)},Hy=function(e){var n=Vl(e);return function(){return function(){return n("h3")}}},eo=function(e){return $r("h3")(e)},Pc=function(e){var n=Vl(e);return function(){return function(){return n("h2")}}},Yt=function(e){return $r("h2")(e)};var Xv=function(e){return $r("h1")(e)},Zv=function(e){var n=Vl(e);return function(){return function(){return n("form")}}};var Xt=function(e){var n=Vl(e);return function(){return function(){return n("div")}}},Ce=function(e){return $r("div")(e)};var l4=sp(Km);var boe=q(_t);var rC={map:function(e){return function(n){return l4(l4(e))(n)}}},c4=_e(rC),s4=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return w_(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},fu=function(e){var n=s4(e);return function(a){return function(t){return n(c4(t)(a))}}};var v4=function(e){return function(n){return e(In(boe(de))(n))}},Ip=function(e){var n=s4(e);return function(a){return function(t){return n(v4(c4(t)(a)))}}};var Gn=function(){return{"genericTop'":Oe.value}}();var oC=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":oC(e)}};var An=function(){return{"genericBottom'":Oe.value}}();var _h=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":_h(e)}};var xn=function(e){return{"genericBottom'":new Re(_h(e))}},f4=function(e){var n=j0(e);return function(a){return n(_h(a))}};var ef=U(oe),Jy=ba();var uC=function(e){return e["genericToEnum'"]};var qy=function(e){return e["genericSucc'"]},iC=function(e){var n=j0(e),a=N0(e);return function(t){var r=ef(n),u=qy(t);return function(i){return r(u(a(i)))}}},lC=function(e){return e["genericPred'"]};var cC=function(e){return e["genericFromEnum'"]};var Pn=function(e){var n=lC(e),a=qy(e);return function(t){var r=oC(t);return function(u){var i=lC(u),l=qy(u);return function(s){var m=_h(s);return{"genericPred'":function(p){if(p instanceof Re)return ef(Re.create)(n(p.value0));if(p instanceof ce){var g=i(p.value0);if(g instanceof G)return new S(new Re(r));if(g instanceof S)return new S(new ce(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[g.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[p.constructor.name])},"genericSucc'":function(p){if(p instanceof Re){var g=a(p.value0);if(g instanceof G)return new S(new ce(m));if(g instanceof S)return new S(new Re(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[g.constructor.name])}if(p instanceof ce)return ef(ce.create)(l(p.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[p.constructor.name])}}}}}};var jn={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},Nn=function(e){var n=lC(e),a=qy(e);return{"genericPred'":function(t){return ef(vm)(n(t))},"genericSucc'":function(t){return ef(vm)(a(t))}}};var sC=function(e){return e["genericCardinality'"]};var On=function(e){var n=sC(e),a=uC(e),t=cC(e);return function(r){var u=uC(r),i=cC(r);return{"genericCardinality'":Jy(n)+Jy(sC(r))|0,"genericToEnum'":function(l){var s=function(m){if(l>=0&&lt.value0;return r?a.value0:t.value0}()|0,(1+a.value1|0)+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 708, column 5 - line 712, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 700, column 32 - line 712, column 68): "+[a.constructor.name])};var $y=function(e){return function(n){return new Vo(1,1,e,n,pl.value,pl.value)}},w4=function(){var e=function(t){if(t instanceof pl)return 0;if(t instanceof Vo)return t.value0;throw new Error("Failed pattern match at Data.Map.Internal (line 757, column 12 - line 759, column 26): "+[t.constructor.name])},n=function(t,r,u,i,l,s,m){return s instanceof Vo&&s.value0>e(m)?dl(s.value2,s.value3,dl(t,r,u,s.value4),dl(i,l,s.value5,m)):dl(i,l,dl(t,r,u,s),m)},a=function(t,r,u,i,l,s,m){return s instanceof Vo&&e(l)<=s.value0?dl(s.value2,s.value3,dl(u,i,l,s.value4),dl(t,r,s.value5,m)):dl(u,i,l,dl(t,r,s,m))};return function(t,r,u,i){if(u instanceof pl)return i instanceof pl?$y(t)(r):i instanceof Vo&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):dl(t,r,u,i);if(u instanceof Vo){if(i instanceof Vo){if(i.value0>(u.value0+1|0))return n(t,r,u,i.value2,i.value3,i.value4,i.value5);if(u.value0>(i.value0+1|0))return a(t,r,u.value2,u.value3,u.value4,u.value5,i)}return i instanceof pl&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):dl(t,r,u,i)}throw new Error("Failed pattern match at Data.Map.Internal (line 717, column 40 - line 738, column 34): "+[u.constructor.name])}}();var jc=function(e){var n=He(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof pl)return u=!0,G.value;if(s instanceof Vo){var m=n(a)(s.value2);if(m instanceof me){r=s.value4;return}if(m instanceof pe){r=s.value5;return}if(m instanceof Ne)return u=!0,new S(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[m.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 8 - line 286, column 22): "+[s.constructor.name])}for(;!u;)i=l(r);return i};return t}};var dh=function(e){var n=He(e);return function(a){return function(t){var r=function(u){if(u instanceof pl)return $y(a)(t);if(u instanceof Vo){var i=n(a)(u.value2);if(i instanceof me)return w4(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof pe)return w4(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof Ne)return new Vo(u.value0,u.value1,a,t,u.value4,u.value5);throw new Error("Failed pattern match at Data.Map.Internal (line 471, column 7 - line 474, column 35): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 468, column 8 - line 474, column 35): "+[u.constructor.name])};return r}}};var Mi=function(){return pl.value}(),_u=function(e){var n=dh(e);return function(a){return Dt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(Mi)}};var aue=typeof Array.from=="function",T4=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",tue=typeof String.prototype.fromCodePoint=="function",rue=typeof String.prototype.codePointAt=="function",S4=function(e){return rue?function(n){return n.codePointAt(0)}:e},C4=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(T4)for(var l=u[Symbol.iterator](),s=r;;--s){var m=l.next();if(m.done)return a;if(s===0)return n(t(m.value))}return e(r)(u)}}}}}};var F4=function(e){return tue?String.fromCodePoint:e},G4=function(e){return function(n){return T4?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=gh(Ts(1)(e)),r=P4(t);return r?x4(n)(t):n}return n},mC=S4(pue),E_=M4(_ue)(mC),To=function(e){return Or(E_(e))};var zy=function(e){return function(n){return L4(function(a){return To(K0(a)(n))})(VR(e)(n))}},hC=function(){var e=vS(p_)(nt(hv))(kt(hv));return function(n){return Tu(e(n))}}(),due=function(e){if(e<=65535)return hC(e);var n=cue(e-65536|0)(1024)+55296|0,a=sue(e-65536|0)(1024)+56320|0;return hC(n)+hC(a)};var Sp=F4(due),N4=function(e){return function(n){if(e<1)return"";var a=nf(n);return a instanceof S?Sp(a.value0.head)+N4(e-1|0)(a.value0.tail):n}},ci=G4(N4);var Vy={eq:function(e){return function(n){return e===n}}},Qy={compare:function(e){return function(n){return vue(e)(n)}},Eq0:function(){return Vy}},af=function(e){return function(n){return Tc(Hl(ci(e)(n)))(n)}};var mue=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=nf(l);if(s instanceof S){var m=i===0;if(m)return t=!0,new S(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,G.value}for(;!t;)r=u(a,n);return r}},Cp=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new S(mC(n)):C4(mue)(S.create)(G.value)(mC)(e)(n)}},hue={bottom:0,top:1114111,Ord0:function(){return Qy}},Oc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new S(e);if(je)return G.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[e.constructor.name])},Bounded0:function(){return hue},Enum1:function(){return Due(0)}}}(),Due=iue("enumCodePoint","Data.String.CodePoints",function(){return{succ:f_(aa(Oc))(Hn(Oc)),pred:__(aa(Oc))(Hn(Oc)),Ord0:function(){return Qy}}});var Gue=ba();var W4={show:Gue};var $4=he;var Mue=Cs(Be),Aue=_e(ze),Lue=a_(vC),Sn=function(e){return function(n){var a=Mue(Aue(n)(function(t){return new sn(e(t),t)}));return function(t){return Cc(t)(a)}}},z4=function(e){var n=iC(e),a=f4(e);return function(t){var r=n(t);return function(u){return function(i){return Lue(function(l){return new sn(l,r(l))})(a(i))}}}},Cn=function(e){var n=z4(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Os(u(i))}}}};var xue={info:"info",warning:"warn",error:"error"},Ai=e=>n=>a=>t=>{let r=xue[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()},V4=(e,n)=>(n.__sentryFingerprint=e,n);var Q4=function(e){return bi(V4)(e)};var hl="error";var Xy={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Te)return a.value0;if(a instanceof Ie)return Ai(hl)("Failed to parse "+e.diagnosticName)({error:a.value0,value:n})(function(t){return e.default});throw new Error("Failed pattern match at Utils.Parse (line 49, column 5 - line 57, column 24): "+[a.constructor.name])}}},Zn=function(e){return e.parseOrPanic},Pue=Zn(Xy),ka=function(e){var n=Zn(e);return function(a){var t=U(a);return function(r){return n({parse:function(u){return t(S.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},jue=ka(Xy)(or),tf=function(e){var n=xv(e);return function(a){return jue({parse:n,diagnosticName:a})}},Ze={parseOrPanic:function(e){return Pue({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=In(new Ie(""))(Te.create);return function(a){return n(e.parse(a))}}()})}};var K4=Nn(jn),Y4=Ln(An),X4=kn(Un),ks=function(){function e(){}return e.value=new e,e}(),Bs=function(){function e(){}return e.value=new e,e}(),Nue={to:function(e){if(e instanceof Re)return ks.value;if(e instanceof ce)return Bs.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof ks)return new Re(Oe.value);if(e instanceof Bs)return new ce(Oe.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var Oue=function(e){if(e instanceof ks)return"school";if(e instanceof Bs)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},Zy=function(){return Zn(Ze)({parse:Sn(Oue)(Cn(Nue)(Pn(K4)(Mn(Gn))(K4)(Y4))(On(X4)(X4))(xn(Y4))),default:ks.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var Z4=Nn(jn),e8=Pn(Z4)(Mn(Gn)),n8=Ln(An),a8=xn(n8),t8=kn(Un),r8=On(t8),Uue=ia(ro),Yl=function(){function e(){}return e.value=new e,e}(),rf=function(){function e(){}return e.value=new e,e}(),Hs=function(){function e(){}return e.value=new e,e}(),kue={to:function(e){if(e instanceof Re)return Yl.value;if(e instanceof ce&&e.value0 instanceof Re)return rf.value;if(e instanceof ce&&e.value0 instanceof ce)return Hs.value;throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])},from:function(e){if(e instanceof Yl)return new Re(Oe.value);if(e instanceof rf)return new ce(new Re(Oe.value));if(e instanceof Hs)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var Bue=function(e){if(e instanceof Yl)return"pending";if(e instanceof rf)return"connected";if(e instanceof Hs)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},gC=function(){var e=Sn(Bue)(Cn(kue)(e8(e8(Z4)(n8))(a8))(r8(r8(t8)))(a8)),n=function(a){return a==="cold"?new S(Hs.value):G.value};return Zn(Ze)({parse:function(a){return Uue(e(a))(n(a))},default:Yl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var Hue=B0(It),o8=te(nn),Jue=gr(Be)(It),que=$a(re);var u8=function(e){return{initiator:Zy(e.initiator),status:gC(e.status),introMessage:Ue("")(fe(e.introMessage))}},i8=25,RC=function(e){return To(e)>=i8},l8=function(e){var n=To(e),a=n>0,t=Hue(" ")([function(){return a?o8(n)+" characters":""}(),Jue(["(",o8(i8),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=RC(e);return u?"text-success":""}();return que(r)(t)};var eb=function(){function e(){}return e.value=new e,e}(),c8=function(){function e(){}return e.value=new e,e}();var s8=function(){var e=Zn(Ze)({parse:function(n){return n instanceof S&&n.value0==="paid"?new S(c8.value):n instanceof S&&n.value0==="free"?new S(eb.value):n instanceof S&&n.value0==="churned"?new S(eb.value):n instanceof G?new S(eb.value):G.value},default:eb.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(fe(n))}}();var v8=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:fe(e.imageUrl),partnerStatus:s8(e.partnerStatus)}};var Wue=ee(Ve),yC=Aa(),Rh=at(he),f8=H({reflectSymbol:function(){return"id"}}),$ue=en(Ke)(Ve),zue=Jr(oo),Vue=U(oe);var Que=function(){function e(){}return e.value=new e,e}(),Kue=function(){function e(){}return e.value=new e,e}(),Yue=function(){function e(){}return e.value=new e,e}(),bC=function(){function e(){}return e.value=new e,e}(),Xue=function(){function e(){}return e.value=new e,e}(),nb=function(){function e(){}return e.value=new e,e}(),yh=function(){function e(){}return e.value=new e,e}(),wC=function(){function e(){}return e.value=new e,e}(),EC=function(){function e(){}return e.value=new e,e}();var _8={show:ba()};var Zue=he,eie=tf(yC(H({reflectSymbol:function(){return"avatarUrl"}})(Rh)(H({reflectSymbol:function(){return"bio"}})(Rh)(H({reflectSymbol:function(){return"connection"}})(at(yC(H({reflectSymbol:function(){return"initiator"}})(he)(H({reflectSymbol:function(){return"introMessage"}})(Rh)(H({reflectSymbol:function(){return"status"}})(he)(tn))))))(H({reflectSymbol:function(){return"firstName"}})(he)(f8(Zue)(H({reflectSymbol:function(){return"lastName"}})(he)(H({reflectSymbol:function(){return"school"}})(yC(H({reflectSymbol:function(){return"allowedToContact"}})(Sa)(f8($4)(H({reflectSymbol:function(){return"imageUrl"}})(Rh)(H({reflectSymbol:function(){return"name"}})(he)(H({reflectSymbol:function(){return"partnerStatus"}})(Rh)(tn)))))))(H({reflectSymbol:function(){return"title"}})(he)(H({reflectSymbol:function(){return"type"}})(he)(H({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(on)(tn))))))))))));var p8=function(e){if(e instanceof Que)return"sheet-view";if(e instanceof Kue)return"school-details";if(e instanceof Yue)return"network-gallery";if(e instanceof bC)return"livestream-details";if(e instanceof Xue)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},d8=function(e){return Wue(eie("SemUser")(e))(function(n){return $ue(zue(n.type==="Sem::User"))(function(){return new S({school:v8(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:fe(n.avatarUrl),title:n.title,bio:fe(n.bio),connection:Vue(u8)(fe(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Uc=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},kc=function(e){return e()};var E8=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}();var Die=function(e){if(e instanceof E8)return"disabled";if(e instanceof I8)return"free-consultation";if(e instanceof T8)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 gie=function(){return[E8.value,I8.value,T8.value]}(),S8=ka(Ze)(oe)({parse:Sn(Die)(gie),diagnosticName:"InquiryMode"});var Rie=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 C8(e,n,a,t,r,u,i){return Rie(e,n-1,a,t,r,u,i).getTime()}function F8(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 yie=Et(),bie=aa(pr);var wie=Hn(pr);var G8=function(e){return e},rb=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 cl(Ov(n)(yie(bie(a)))(t),new Gc(r,u,i,l))}}}}}}};return F8(e)}();var M8=function(e){return C8(ri(e.value0),wie(oi(e.value0)),Fc(e.value0),Mc(e.value1),As(e.value1),Ms(e.value1),ll(e.value1))};var A8=function(e){var n=Ye(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,m;function p(g,E,b){if(b<1)return s=!0,g;i=n(g)(E),l=E,u=b-1|0}for(;!s;)m=p(i,l,u);return m}}};return a(za(e))};var Eie=ba();var I_=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}(),bh=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 L8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),x8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GC=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var Fp={defer:function(e){var n=Uc(e);return function(a,t,r,u,i){var l=kc(n);return l(a,t,r,u,i)}}};var Bc={map:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return n(a,t,r,u,function(s,m){return t(function(p){return i(s,e(m))})})})}}}};var Hc={apply:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,m){return t(function(p){return n(s,t,r,u,function(g,E){return t(function(b){return i(g,m(E))})})})})})}}},Functor0:function(){return Bc}};var Jc={bind:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,m){return t(function(p){var g=n(m);return g(s,t,r,u,i)})})})}}},Apply0:function(){return Hc}},Iie=Ta(Jc);var Dl={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Hc}};var Tie={Applicative0:function(){return Dl},Bind1:function(){return Jc}};var P8={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return Tie}},Sie=Rr(P8);var T_={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new I_(a.value0,a.value1,!1),t,r,function(s,m){return t(function(p){return s.value2?u(s,m):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Bc}},Cie=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var Fie=function(e){var n=e.Monad0(),a=U(n.Bind1().Apply0().Functor0()),t=q(n.Applicative0()),r=Uo(e);return function(u){return function(i){var l=function(s){var m=!1,p;function g(E){var b=E(de);if(b instanceof L8){s=b.value0;return}if(b instanceof x8)return m=!0,a(ar.create)(b.value0);if(b instanceof GC)return m=!0,t(new zt(new sn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!m;)p=g(s);return p};return r(l)(function(s){return i(u,L8.create,x8.create,function(m,p){return new GC(m,new Ie(p))},function(m,p){return new GC(m,new Te(p))})})}}};var j8=Cie(function(e){return new sn(e.value1,e)}),MC=function(e){return e.value1},AC=function(e){return e.value0};var Gie={index:0,line:1,column:1},N8=function(e){var n=U(e.Monad0().Bind1().Apply0().Functor0()),a=Fie(e);return function(t){return function(r){var u=new I_(t,Gie,!1);return n(kr)(a(u)(r))}}},Mie=N8(pm),O8=function(e){var n=Mie(e);return function(a){return Eie(n(a))}};var Aie=function(e){return function(n){return Sie(new bh(e,n))}},Gp=function(e){return Iie(Aie(e))(j8)};var U8={empty:Gp("No alternative"),Alt0:function(){return T_}},S_={Applicative0:function(){return Dl},Plus1:function(){return U8}};var Bie=ia(T_);var Hie=q(Dl);var Jie=U(Bc);var qc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new I_(i.value0,i.value1,n.value2),l)},u)}};var ob=function(e){return function(n){return Bie(n)(Hie(e))}},C_=function(e){return ob(G.value)(Jie(S.create)(e))};var J8=Hn(Oc),Wie=Yr(sr);var $ie=te(Gt);var q8=function(e){return function(n){return function(a){var t=J8(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=Cp(0)(a);return r instanceof S&&J8(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)-Wie(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},zie=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,m,p){var g=nf(m);if(g instanceof G)return u=!0,s;if(g instanceof S){var E=function(){if(ml(g.value0.tail))return q8(s)(g.value0.head)(p);if(je)return q8(s)(g.value0.head)(g.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=g.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[g.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var xC=wR(function(e){return function(n){return function(a){return function(t){return function(r){var u=ml(e.value0);return u?r(new I_(e.value0,e.value1,!0),de):t(e,new bh("Expected EOF",e.value1))}}}}}),W8=function(e){return wR(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Ie)return r(n,new bh(i.value0,n.value1));if(i instanceof Te)return u(new I_(i.value0.remainder,zie(n.value1)(i.value0.consumed)(i.value0.remainder),!ml(i.value0.consumed)),i.value0.value);throw new Error("Failed pattern match at Parsing.String (line 286, column 7 - line 290, column 121): "+[i.constructor.name])}}}}})};var Wc=function(e){return W8(function(n){var a=ni(e)(n);return a instanceof S?new Te({value:e,consumed:e,remainder:a.value0}):new Ie("Expected "+$ie(e))})};var $8=te(nn),Qie=Bt(ko),Kie=G0(Hc);var Yie=function(e){return"(line "+($8(e.line)+(", col "+($8(e.column)+")")))},Xie=function(e){return AC(e)+(" "+Yie(MC(e)))},PC=function(e){return function(n){return Qie(Xie)(O8(n)(Kie(e)(xC)))}};var cb=aa(p_);var Ko=te(nn);var vle=Tr(Hr),fle=vle(It);var _le=_R(na)(mc);var jC=Hn(qr),ple=te(ZR),dle=Hn(pr),X8=Hn(xu),mle=ba(),hle=Hn(jv),Z8=te(Uj),NC=Hn(Si),Dle=Yr(sr),eO=Hn(Ti),nO=Hn(Ii),OC=Hn(Pu),aO=Ur(sr);var Mp=function(){function e(){}return e.value=new e,e}(),tO=function(){function e(){}return e.value=new e,e}(),gle=function(){function e(){}return e.value=new e,e}(),Xl=function(){function e(){}return e.value=new e,e}(),UC=function(){function e(){}return e.value=new e,e}(),rO=function(){function e(){}return e.value=new e,e}(),oO=function(){function e(){}return e.value=new e,e}(),Zl=function(){function e(){}return e.value=new e,e}(),Rle=function(){function e(){}return e.value=new e,e}(),yle=function(){function e(){}return e.value=new e,e}(),ec=function(){function e(){}return e.value=new e,e}(),ble=function(){function e(){}return e.value=new e,e}(),sb=function(){function e(){}return e.value=new e,e}(),nc=function(){function e(){}return e.value=new e,e}(),ac=function(){function e(){}return e.value=new e,e}(),wle=function(){function e(){}return e.value=new e,e}(),Li=function(){function e(){}return e.value=new e,e}(),Ele=function(){function e(){}return e.value=new e,e}(),vb=function(){function e(){}return e.value=new e,e}(),Ile=function(){function e(){}return e.value=new e,e}(),Tle=function(){function e(){}return e.value=new e,e}(),Sle=function(){function e(){}return e.value=new e,e}(),yt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Cle=function(e){if(e instanceof iu)return"Jan";if(e instanceof Su)return"Feb";if(e instanceof lu)return"Mar";if(e instanceof Cu)return"Apr";if(e instanceof Fu)return"May";if(e instanceof cu)return"Jun";if(e instanceof su)return"Jul";if(e instanceof Gu)return"Aug";if(e instanceof Mu)return"Sep";if(e instanceof Au)return"Oct";if(e instanceof Lu)return"Nov";if(e instanceof ti)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var lf=function(e){if(e<0)return"-"+lf(-e|0);if(e<10)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},uO=function(e){if(e<0)return"-"+uO(-e|0);if(e<10)return"000"+Ko(e);if(e<100)return"00"+Ko(e);if(e<1e3)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},iO=function(e){if(e<0)return"-"+iO(-e|0);if(e<10)return"00"+Ko(e);if(e<100)return"0"+Ko(e);if(je)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var Fle=function(e){var n=Ko(_le(e)),a=To(n);return a===1?"0"+n:a===2?n:af(a-2|0)(n)};var Gle=function(e){var n=e===0;return n?12:e},Mle=function(e){return function(n){if(n instanceof Mp)return uO(jC(ri(e.value0)));if(n instanceof tO)return Fle(jC(ri(e.value0)));if(n instanceof gle)return Ko(jC(ri(e.value0)));if(n instanceof Xl)return ple(oi(e.value0));if(n instanceof UC)return Cle(oi(e.value0));if(n instanceof rO)return lf(dle(oi(e.value0)));if(n instanceof oO)return lf(X8(Fc(e.value0)));if(n instanceof Zl)return Ko(X8(Fc(e.value0)));if(n instanceof Rle)return Ko(Eo(function(t){return t/1e3}(mle(G8(M8(e))))));if(n instanceof yle)return Ko(hle(Wm(e.value0)));if(n instanceof ec)return Z8(Wm(e.value0));if(n instanceof ble)return ci(3)(Z8(Wm(e.value0)));if(n instanceof sb)return lf(NC(Mc(e.value1)));if(n instanceof nc)return lf(Gle(Dle(NC(Mc(e.value1)))(12)));if(n instanceof ac){var a=NC(Mc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof wle)return Ko(eO(As(e.value1)));if(n instanceof Li)return lf(eO(As(e.value1)));if(n instanceof Ele)return Ko(nO(Ms(e.value1)));if(n instanceof vb)return lf(nO(Ms(e.value1)));if(n instanceof Ile)return iO(OC(ll(e.value1)));if(n instanceof Tle)return Ko(function(t){return aO(t)(100)}(OC(ll(e.value1))));if(n instanceof Sle)return lf(function(t){return aO(t)(10)}(OC(ll(e.value1))));if(n instanceof yt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},Yo=function(e){return function(n){return fle(Mle(n))(e)}};var Kbn=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function fb(e){return Math.round(e).toString()}var Ap=ee(Jc);var Ale=q(Dl),Lle=J0(S_)(Fp);var xle=WT(S_)(Fp),_b=A8(It),Ple=n_(Dl)(bm),jle=U(oe);var lO=Nl(na),Nle=Ur(sr),Ole=te(nn),Ule=_e(or),kle=te(Hf),Ble=ln(_n);var Hle=Ap(C_(qc(Wc("+"))))(function(e){return Ap(Lle(Wc("0")))(function(n){return Ap(C_(qc(Wc(",0"))))(function(a){return Ap(C_(qc(Wc("."))))(function(t){return Ap(Ple(t)(function(r){return qc(xle(Wc("0")))}))(function(r){return Ap(C_(qc(Wc("a"))))(function(u){return Ale({sign:Pt(e),before:Or(n),comma:Pt(a),after:Ue(0)(jle(Or)(r)),abbreviations:Pt(u)})})})})})})}),Jle=PC(Hle);var cO=function(e){return function(n){var a=GR(n),t=function(){if(a>0)return lO(Eo(QT(a)/JP))(0);if(je)return 0;throw new Error("Failed pattern match at Data.Formatter.Number (line 100, column 5 - line 102, column 22): "+[])}();if(e.abbreviations){var r=Nle(t)(3),u=function(){var z=r<1;return z?n:n/MR(1e3)(Tt(r))}(),i=function(){if(r===0)return"";if(r===1)return"K";if(r===2)return"M";if(r===3)return"G";if(r===4)return"T";if(r===5)return"P";if(r===6)return"E";if(r===7)return"Z";if(r===8)return"Y";if(je)return"10e+"+Ole(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return cO({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=MR(10)(Tt(lO(0)(e.after))),m=i_(a*s)/s,p=W0(m),g=m-p,E=i_(g*s),b=function(){var z=fb(E),$=To(z),ne=_b("0")(e.after-$|0);return ne+z}(),I=function(){var z=e.after<1;return z?"":"."+(function(){var $=E===0;return $?_b("0")(e.after):""}()+function(){var $=E>0;return $?b:""}())}(),L=function(z){return function($){return function(ne){var ue=z,Z=$,Y=!1,X;function ve(xe,ke,rn){var wn=t_(rn);if(wn instanceof G)return Y=!0,Q0(xe);if(wn instanceof S&&ke<3){ue=io(wn.value0.head)(xe),Z=ke+1|0,ne=wn.value0.tail;return}ue=io(",")(xe),Z=0,ne=rn}for(;!Y;)X=ve(ue,Z,ne);return X}}},N=function(){return e.comma?L([])(0)(A0(jm(_b("0")(l)+fb(p)))):_b("0")(l)+fb(p)}();return function(){var z=n<0;if(z)return"-";var $=n>0&&e.sign;return $?"+":""}()+(N+I)}},qle=function(e){return function(n){return Ule(Jle(e))(qa(cO)(n))}},F_=function(e){return function(n){return jt(cn(kle(n)))(Ble)(qle(e)(n))}};var $le=Je;var sO=function(e){return l_(e)};var gl=function(e){var n=sO(e);return n?G.value:new S($le(e))};var Ba=function(e){return function(n){var a=sO(e);return a?n:e}};var lo=function(){return Je};var wh=te(nn),zle=Hn(qr),Vle=Hn(pr),Qle=lo(),Kle=ou(),Yle=ii(Nv),kC=Ur(sr),Xle=qo(Be);var Zle=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 wh(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return wh(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return wh(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return wh(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if(je)return wh(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 158, column 1 - line 158, column 81): "+[e.constructor.name,n.constructor.name])}},pb=function(e){return Zle({suffix:" "+e,justNow:"just now"})},vO=function(){return function(e){var n=function(m){return(zle(ri(Uv(m)))*12|0)+Vle(oi(Uv(m)))|0},a=Qle(e),t=Ba(a.format)(pb("ago")),r=AR(Kle(Yle(a.to)(a.from))),u=kC(r+30|0)(60),i=kC(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=kC(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var fO=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var BC=F_("0,0");var _O=function(e){return BC(Tt(e))},xi=function(e){return function(n){return function(a){return _O(e)+(" "+fO(e)(n)(a))}}};var pO=function(){return Yo(Xle([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),Li.value,new yt(" "),ac.value]))}();var HC=()=>document.visibilityState=="visible",dO=(e,n)=>document.elementFromPoint(e,n);var mO=function(e){var n=tC(e);return function(){return function(){return n("button")}}},hO=function(){return function(){return u4("br")}};var DO=function(e){var n=tC(e);return function(){return function(){return n("a")}}};function gO(e){return function(n){return function(){return n.getElementById(e)}}}var ece=U(Bn),db=function(e){var n=ece(fe),a=gO(e);return function(t){return n(a(t))}};var mb=function(e){return function(n){return function(){return n[e]}}},nce=mb("children"),ace=mb("firstElementChild"),tce=mb("lastElementChild"),rce=mb("childElementCount");var pu=function(){return window};function RO(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 RO(G.value,S.create,e,n)}};var yO=Je;var hb=Je;var bO=Je;function wO(e,n,a){var t=Object.prototype.toString.call(a);return t.indexOf("[object HTML")===0&&t.indexOf("Element]")===t.length-8?n(a):e}var JC=Je;var EO=function(e){return wO(G.value,S.create,e)};function qC(e){return function(){return e.seeking}}function Eh(e){return function(){return e.currentTime}}function WC(e){return function(){return e.volume}}function $C(e){return function(n){return function(){n.volume=e}}}function zC(e){return function(){return e.muted}}function G_(e){return function(n){return function(){n.muted=e}}}var IO=Fn("HTMLMediaElement");var TO=Fn("HTMLMediaElement");function VC(e){return function(){return e.hash}}function QC(e){return function(n){return function(){n.hash=e}}}function KC(e){return function(){return e.platform}}function cf(e){return function(){return e.document}}function YC(e){return function(){return e.navigator}}function Ih(e){return function(){return e.location}}var SO=Je;var dce=U(ze);var mce=hO()(),hce=n_(_t)(bm),CO=ee(vr),FO=_e(Bn),Dce=ee(Ve);var eF=Xe("\xA0");var ha=qa(In(ta));var GO=function(e){return function(n){if(e)return ta;if(je)return n(de);throw new Error("Failed pattern match at Utils.HTML (line 111, column 1 - line 111, column 65): "+[e.constructor.name,n.constructor.name])}},nF=function(e){return function(n){return GO(e)(cn(n))}};var aF=function(e){return function(n){if(e)return n(de);if(je)return ta;throw new Error("Failed pattern match at Utils.HTML (line 98, column 1 - line 98, column 61): "+[e.constructor.name,n.constructor.name])}},ga=function(e){return function(n){return aF(e)(cn(n))}};var Lp=function(e){return Se(Em(mce({}))(dce(Xe)(Qo(` `)(e))))},gb=function(e){return hce(TO(e.target))(Eh)};var MO=function(e){return function(){return dO(e.x,e.y)}},AO=function(e){return CO(FO(CO(pu)(cf))(hb))(db(e))},Rb=function(e){return FO(AO(e))(function(n){return Dce(n)(EO)})};var Th=on;var LO=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},tF=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),xO=()=>new Date,PO=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var M_=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();function rF(){return Date.now()}var bce=U(Bn);var si=bce(rb)(rF);var NO={liftAff:ln(_n),MonadEffect0:function(){return Le}};var OBn=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,g){this.queue=p,this.value=g,this.next=null,this.prev=null}function a(p){this.draining=!1,this.error=null,this.value=p,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function r(p){try{p()}catch(g){setTimeout(function(){throw g},0)}}function u(p,g){var E=new n(p,g);switch(p.size){case 0:p.head=E;break;case 1:E.prev=p.head,p.head.next=E,p.last=E;break;default:E.prev=p.last,p.last.next=E,p.last=E}return p.size++,E}function i(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.last,p.head.next=null,p.last=null;break;default:g=p.last,p.last=g.prev,p.last.next=null}return g.prev=null,g.queue=null,p.size--,g.value}function l(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:g=p.head,p.head=g.next,p.head.prev=null}return g.next=null,g.queue=null,p.size--,g.value}function s(p){if(p.queue!==null){if(p.queue.last===p){i(p.queue);return}if(p.queue.head===p){l(p.queue);return}p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),p.queue.size--,p.queue=null,p.value=null,p.next=null,p.prev=null}}function m(p,g){if(!g.draining){var E=g.puts,b=g.takes,I=g.reads,L,N,z,$,ne;for(g.draining=!0;;){if(L=null,N=null,z=null,$=g.value,ne=I.size,g.error!==null){for($=p.left(g.error);L=l(E);)r(L.cb($));for(;N=l(I);)r(N($));for(;z=l(b);)r(z($));break}if($===t&&(L=l(E))&&(g.value=$=L.value),$!==t){for(z=l(b);ne--&&(N=l(I));)r(N(p.right($)));z!==null&&(g.value=t,r(z(p.right($))))}if(L!==null&&r(L.cb(p.right(void 0))),g.value===t&&E.size===0||g.value!==t&&b.size===0)break}g.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=m,a}();var Sh=function(e){return d_(qf(e))},Ch=function(e){return d_(O0(e))};var Ace=q(_t),sf=ee(Ve),Lce=aa(qr),xce=aa(pr),Pce=aa(xu),jce=aa(Si),Nce=aa(Ti),Oce=aa(Ii),Uce=aa(Pu),kce=q(la),kO=Ta(vr),Bce=_e(oe);var Hce=function(){return Ch(G.value)}();var BO=function(e){return sf(Lce(e.year))(function(n){return sf(xce(e.month+1|0))(function(a){return sf(Pce(e.day))(function(t){return sf(jce(e.hour))(function(r){return sf(Nce(e.minute))(function(u){return sf(Oce(e.second))(function(i){return sf(Uce(e.millisecond))(function(l){return kce(new cl(Ov(n)(a)(t),new Gc(r,u,i,l)))})})})})})})})},HO=function(e){var n=QP("Failed to obtain current time. This should never happen.");return In(n)(Ace)(BO(tF(e)))},vf=kO(HO)(xO),yb=function(e){var n=Sh(Hce);if(n instanceof S)return n.value0;if(n instanceof G)return d_(kO(HO)(PO));throw new Error("Failed pattern match at Utils.DateTime (line 63, column 3 - line 65, column 76): "+[n.constructor.name])},du=function(e){return sf(Bce(LO({just:S.create,nothing:G.value})(e))(tF))(BO)};var oF=q(la),Jce=U(oe),JO=ee(Ve);var qO=Nn(jn),WO=Pn(qO)(Mn(Gn)),$O=Ln(An),zO=xn($O),VO=kn(Un),QO=On(VO);var uF=function(){function e(){}return e.value=new e,e}(),iF=function(){function e(){}return e.value=new e,e}(),lF=function(){function e(){}return e.value=new e,e}();var qce={to:function(e){if(e instanceof Re)return uF.value;if(e instanceof ce&&e.value0 instanceof Re)return iF.value;if(e instanceof ce&&e.value0 instanceof ce)return lF.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof uF)return new Re(Oe.value);if(e instanceof iF)return new ce(new Re(Oe.value));if(e instanceof lF)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Wce=function(e){if(e instanceof uF)return"stuffed";if(e instanceof iF)return"satisfied";if(e instanceof lF)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 233, column 27 - line 236, column 35): "+[e.constructor.name])};var $ce=ka(Ze)(oe)({parse:Sn(Wce)(Cn(qce)(WO(WO(qO)($O))(zO))(QO(QO(VO)))(zO)),diagnosticName:"ClientAppetite"}),KO=function(e){return JO(In(oF(G.value))(function(){var n=Jce(oF);return function(a){return n($ce(a))}}())(fe(e.clientAppetite)))(function(n){return JO(S8(e.inquiryMode))(function(a){return oF({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:fe(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:fe(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var YO=ee(Ve),xp=Aa(),cF=at(he),XO=H({reflectSymbol:function(){return"description"}})(he),bb=H({reflectSymbol:function(){return"id"}})(on),sF=H({reflectSymbol:function(){return"name"}})(he),ZO=xp(bb(sF(H({reflectSymbol:function(){return"slug"}})(he)(tn)))),eU=La(ZO),zce=tf(xp(H({reflectSymbol:function(){return"advisingConfig"}})(at(xp(H({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(at(Sa))(H({reflectSymbol:function(){return"clientAppetite"}})(cF)(H({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(at(on))(H({reflectSymbol:function(){return"inquiryMode"}})(he)(H({reflectSymbol:function(){return"packages"}})(La(xp(H({reflectSymbol:function(){return"activeForSale"}})(Sa)(XO(bb(sF(H({reflectSymbol:function(){return"numMinutes"}})(on)(H({reflectSymbol:function(){return"packageCategories"}})(eU)(H({reflectSymbol:function(){return"refundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"totalPriceCents"}})(Th)(tn)))))))))))(H({reflectSymbol:function(){return"pricePerHourCents"}})(Th)(H({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(on)(H({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"themes"}})(La(xp(H({reflectSymbol:function(){return"active"}})(Sa)(H({reflectSymbol:function(){return"category"}})(ZO)(XO(H({reflectSymbol:function(){return"durationMinutes"}})(on)(bb(H({reflectSymbol:function(){return"priceCents"}})(Th)(H({reflectSymbol:function(){return"title"}})(he)(tn))))))))))(tn))))))))))))(H({reflectSymbol:function(){return"entity"}})(xp(H({reflectSymbol:function(){return"bio"}})(he)(bb(H({reflectSymbol:function(){return"imageUrl"}})(cF)(sF(H({reflectSymbol:function(){return"organizationId"}})(on)(H({reflectSymbol:function(){return"organizationName"}})(he)(H({reflectSymbol:function(){return"shortEducation"}})(cF)(H({reflectSymbol:function(){return"tags"}})(eU)(tn))))))))))(tn)))),vF=q(la),fF=U(oe),Fh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Gh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Vce=function(e){return YO(zce("ServiceProviderPresenter")(e))(function(n){return YO(In(vF(G.value))(function(){var a=fF(vF);return function(t){return a(KO(t))}}())(fe(n.advisingConfig)))(function(a){return vF({entity:n.entity,advisingConfig:a})})})},nU=ka(Ze)(oe)({parse:function(e){return e.type==="Sem::User"?fF(Fh.create)(d8(e.presenter)):e.type==="ServiceProviders::Individual"?fF(Gh.create)(Vce(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var aU=Nn(jn),tU=Pn(aU)(Mn(Gn)),rU=Ln(An),oU=xn(rU),uU=kn(Un),iU=On(uU),Js=function(){function e(){}return e.value=new e,e}(),$c=function(){function e(){}return e.value=new e,e}(),qs=function(){function e(){}return e.value=new e,e}(),Qce={to:function(e){if(e instanceof Re)return Js.value;if(e instanceof ce&&e.value0 instanceof Re)return $c.value;if(e instanceof ce&&e.value0 instanceof ce)return qs.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof Js)return new Re(Oe.value);if(e instanceof $c)return new ce(new Re(Oe.value));if(e instanceof qs)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},lU={eq:function(e){return function(n){return e instanceof Js&&n instanceof Js||e instanceof $c&&n instanceof $c||e instanceof qs&&n instanceof qs}}},wb=function(e){if(e instanceof Js)return"ready";if(e instanceof $c)return"live";if(e instanceof qs)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var Mh=function(){return Zn(Ze)({parse:Sn(wb)(Cn(Qce)(tU(tU(aU)(rU))(oU))(iU(iU(uU)))(oU)),default:Js.value,diagnosticName:"livestream poll status"})}(),_F=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}};var cU=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:fe(e.undergrad.college),major:fe(e.undergrad.major),year:fe(e.undergrad.year)},gradCollege:fe(e.gradCollege),workExperience:fe(e.workExperience),admissionsStory:fe(e.admissionsStory),pictureUrl:fe(e.pictureUrl),allStreamsUrl:fe(e.allStreamsUrl)}};var Kce=He(na),Yce=ai(),sU=_e(oe),vU=Nn(jn),fU=Pn(vU)(Mn(Gn)),_U=Ln(An),pU=xn(_U),dU=kn(Un),mU=On(dU),hU=Zn(Ze),DU=ys(),gU=Ta(Ve),Xce=_e(ze),Zce=U(oe),ese=ee(Ve),Ou=function(){function e(){}return e.value=new e,e}(),no=function(){function e(){}return e.value=new e,e}(),Mr=function(){function e(){}return e.value=new e,e}();var tc=nn,nse=te(tc);var ase={to:function(e){if(e instanceof Re)return Ou.value;if(e instanceof ce&&e.value0 instanceof Re)return no.value;if(e instanceof ce&&e.value0 instanceof ce)return Mr.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Ou)return new Re(Oe.value);if(e instanceof no)return new ce(new Re(Oe.value));if(e instanceof Mr)return new ce(new ce(Oe.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},ff={eq:function(e){return function(n){return e instanceof Ou&&n instanceof Ou||e instanceof no&&n instanceof no||e instanceof Mr&&n instanceof Mr}}},Ah={eq:function(e){return function(n){return e===n}}},RU={compare:function(e){return function(n){return Kce(e)(n)}},Eq0:function(){return Ah}};var _f=function(e){return Yce({livestream_conference_id:nse(e.id),livestream_conference_presenter_name:Ue("")(sU(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:Ue("")(e.partnerType)})},yU=function(){var e=function(n){if(n instanceof Ou)return"waiting_room";if(n instanceof no)return"on_air";if(n instanceof Mr)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Sn(e)(Cn(ase)(fU(fU(vU)(_U))(pU))(mU(mU(dU)))(pU))}(),bU=function(){return hU({parse:yU,default:Ou.value,diagnosticName:"livestream status"})}(),tse=hU({parse:du,default:nt(cp),diagnosticName:"livestream scheduled start time"}),Lh=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:sU(fe(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:DU(n.id),slug:DU(n.slug)}}),scheduledStartTime:tse(e.scheduledStartTime),onAirTime:gU(du)(fe(e.onAirTime)),streamStatus:bU(e.streamStatus),watchUrl:fe(e.watchUrl),streamingStartTime:gU(du)(fe(e.streamingStartTime)),polls:Xce(e.polls)(function(n){return{poll:_F(n.poll),status:Mh(n.status)}}),presenter:Zce(cU)(fe(e.presenter)),partnerType:fe(e.partnerType),guestPresenter:ese(fe(e.guestPresenter))(nU),zoomJoinUrl:fe(e.zoomJoinUrl),zoomStartUrl:fe(e.zoomStartUrl)}};var wU=Nn(jn),EU=Ln(An),IU=kn(Un),Pi=function(){function e(){}return e.value=new e,e}(),Pp=function(){function e(){}return e.value=new e,e}(),rse={to:function(e){if(e instanceof Re)return Pi.value;if(e instanceof ce)return Pp.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 Pi)return new Re(Oe.value);if(e instanceof Pp)return new ce(Oe.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},Eb={eq:function(e){return function(n){return e instanceof Pi&&n instanceof Pi||e instanceof Pp&&n instanceof Pp}}};var xh=function(e){if(e instanceof Pp)return"anonymous-all-schools";if(e instanceof Pi)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},Ib=function(){return Zn(Ze)({parse:Sn(xh)(Cn(rse)(Pn(wU)(Mn(Gn))(wU)(EU))(On(IU)(IU))(xn(EU))),diagnosticName:"Profile.PublishScope",default:Pp.value})}();var Rl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var pF=function(e){return{id:e.id,title:e.title,requireAnonymousUserFirstName:e.requireAnonymousUserFirstName,requireAnonymousUserLastName:e.requireAnonymousUserLastName,requireAnonymousUserEmail:e.requireAnonymousUserEmail,requireReferredUserFirstName:e.requireReferredUserFirstName,requireReferredUserLastName:e.requireReferredUserLastName,description:fe(e.description)}},A_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:du(e.time)}},TU=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:fe(e.fullName),publishScope:Ib(e.publishScope)}},dF=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}},ji="overlay-visibility-test";var SU=Nn(jn),Tb=Pn(SU)(Mn(Gn)),CU=Ln(An),Sb=xn(CU),FU=kn(Un),Cb=On(FU),Ws=function(){function e(){}return e.value=new e,e}(),pf=function(){function e(){}return e.value=new e,e}(),L_=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}(),ose={to:function(e){if(e instanceof Re)return Ws.value;if(e instanceof ce&&e.value0 instanceof Re)return pf.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return L_.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return df.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce)return mf.value;throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Ws)return new Re(Oe.value);if(e instanceof pf)return new ce(new Re(Oe.value));if(e instanceof L_)return new ce(new ce(new Re(Oe.value)));if(e instanceof df)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof mf)return new ce(new ce(new ce(new ce(Oe.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},GU=function(e){if(e instanceof Ws)return"love-this";if(e instanceof pf)return"helpful";if(e instanceof L_)return"not-helpful";if(e instanceof df)return"writing-down";if(e instanceof mf)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},MU=function(e){return{authorTag:e.authorTag,kind:GU(e.kind)}},use=function(){return Zn(Ze)({parse:Sn(GU)(Cn(ose)(Tb(Tb(Tb(Tb(SU)(CU))(Sb))(Sb))(Sb))(Cb(Cb(Cb(Cb(FU)))))(Sb)),default:Ws.value,diagnosticName:"Livestream Reaction Kind"})}(),AU=function(e){return{authorTag:e.authorTag,kind:use(e.kind)}};var LU=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function xU(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 PU(e,n,a,t,r){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(r.url,l);if(l.open(r.method||"GET",s,!0,r.username,r.password),r.headers)try{for(var m=0,p;(p=r.headers[m])!=null;m++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var g=function(E){return function(){u(new Error(E))}};return l.onerror=g(a),l.ontimeout=g(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(E){return E.length>0}).map(function(E){var b=E.indexOf(":");return t(E.substring(0,b))(E.substring(b+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,b,I){try{l.abort()}catch(L){return b(L)}return I()}}}var Fb="application/json",jU="application/x-www-form-urlencoded";var NU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Gb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HU=function(e){return e instanceof mF?new S(jU):e instanceof Gb?new S(Fb):G.value};var JU=function(){return Gb.create}();var qU=ba();var Mb=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}(),jp=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}(),WU=function(e){if(e instanceof Mb||e instanceof Ab)return qU(e.value0);if(e instanceof jp)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var hF=function(e){if(e instanceof Mb)return"Accept";if(e instanceof Ab)return"Content-Type";if(e instanceof jp)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var $U=ln(_n),DF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Lb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Pb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zU=function(e){if(e instanceof DF)return"arraybuffer";if(e instanceof gF)return"blob";if(e instanceof RF)return"document";if(e instanceof Lb||e instanceof xb)return"text";if(e instanceof Pb)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},VU=function(e){return e instanceof Lb?new S(Fb):G.value},QU=function(){return new xb($U)}();var KU=function(){return new Pb($U)}();var YU=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 lse=ba();var Np=function(e){return lse(OR(e))};function XU(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var jb=function(e){return XU(Ie.create,Te.create,e)};function ZU(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function e7(e,n,a){try{return n(ZU(encodeURIComponent(a)))}catch(t){return e(t)}}function n7(e,n,a){try{return n(ZU(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var Nb=function(){return wv(e7)(cn(G.value))(S.create)}();var Ob=function(){return wv(n7)(cn(G.value))(S.create)}();var sse=Jn(Dr),a7=U(oe),vse=uo(Yu)(la);var fse=function(e){return e};var t7=function(){var e=function(t){if(t.value1 instanceof G)return Ob(t.value0);if(t.value1 instanceof S)return sse(a7(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=a7(hr("&")),a=vse(e);return function(t){return n(a(fse(t)))}}();var bF=function(){function e(){}return e.value=new e,e}(),x_=function(){function e(){}return e.value=new e,e}(),wF=function(){function e(){}return e.value=new e,e}(),P_=function(){function e(){}return e.value=new e,e}(),Ub=function(){function e(){}return e.value=new e,e}(),Ph=function(){function e(){}return e.value=new e,e}(),EF=function(){function e(){}return e.value=new e,e}(),IF=function(){function e(){}return e.value=new e,e}(),TF=function(){function e(){}return e.value=new e,e}(),SF=function(){function e(){}return e.value=new e,e}(),CF=function(){function e(){}return e.value=new e,e}(),FF=function(){function e(){}return e.value=new e,e}(),GF=function(){function e(){}return e.value=new e,e}(),MF=function(){function e(){}return e.value=new e,e}(),AF=function(){function e(){}return e.value=new e,e}(),kb=function(){function e(){}return e.value=new e,e}();var _se=function(e){return e},pse={show:function(e){if(e instanceof bF)return"OPTIONS";if(e instanceof x_)return"GET";if(e instanceof wF)return"HEAD";if(e instanceof P_)return"POST";if(e instanceof Ub)return"PUT";if(e instanceof Ph)return"DELETE";if(e instanceof EF)return"TRACE";if(e instanceof IF)return"CONNECT";if(e instanceof TF)return"PROPFIND";if(e instanceof SF)return"PROPPATCH";if(e instanceof CF)return"MKCOL";if(e instanceof FF)return"COPY";if(e instanceof GF)return"MOVE";if(e instanceof MF)return"LOCK";if(e instanceof AF)return"UNLOCK";if(e instanceof kb)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var r7=jt(te(pse))(_se);var o7={eq:function(e){return function(n){return e instanceof bF&&n instanceof bF||e instanceof x_&&n instanceof x_||e instanceof wF&&n instanceof wF||e instanceof P_&&n instanceof P_||e instanceof Ub&&n instanceof Ub||e instanceof Ph&&n instanceof Ph||e instanceof EF&&n instanceof EF||e instanceof IF&&n instanceof IF||e instanceof TF&&n instanceof TF||e instanceof SF&&n instanceof SF||e instanceof CF&&n instanceof CF||e instanceof FF&&n instanceof FF||e instanceof GF&&n instanceof GF||e instanceof MF&&n instanceof MF||e instanceof AF&&n instanceof AF||e instanceof kb&&n instanceof kb}}};var u7=function(e){return kv(function(n){return function(){var t=e(function(r){return n(Ie.create(r))()},function(r){return n(Te.create(r))()});return function(r){return kv(function(u){return function(){return t(r,function(l){return u(Ie.create(l))()},function(l){return u(Te.create(l))()}),wS}})}}})};var LF=q(nl(nr)),dse=Y0(nr),j_=Ss(nr),i7=ia(BR(WR)(nr)),mse=ds(Ec(nr)),Bb=U(oe),hse=wu(Be)(ot),Dse=De(xt),gse=Ta(Ve),Rse=U(ze),yse=_e(Ca),bse=Fv(Wr),wse=q(Qn);var Hb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Jb=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}(),qb=function(){function e(){}return e.value=new e,e}(),Wb=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}(),l7=function(e){return function(n){var a=function(p){return p===""?LF(p4):jt(function(g){return dse(Um.create(g))})(LF)(jb(p))},t=function(){if(n.responseFormat instanceof DF)return j_("ArrayBuffer");if(n.responseFormat instanceof gF)return j_("Blob");if(n.responseFormat instanceof RF)return function(p){return i7(j_("Document")(p))(i7(j_("XMLDocument")(p))(j_("HTMLDocument")(p)))};if(n.responseFormat instanceof Lb)return mse(function(p){return n.responseFormat.value0(a(p))})(j_("String"));if(n.responseFormat instanceof xb)return j_("String");if(n.responseFormat instanceof Pb)return cn(n.responseFormat.value0(LF(de)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])}(),r=function(p){if(p instanceof NU)return new Te(p.value0(Fr));if(p instanceof OU)return new Te(Fr(p.value0));if(p instanceof UU)return new Te(Fr(p.value0));if(p instanceof kU)return new Te(Fr(p.value0));if(p instanceof BU)return new Te(Fr(p.value0));if(p instanceof mF)return gc("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(Bb(Fr)(t7(p.value0)));if(p instanceof Gb)return new Te(Fr(Wy(p.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[p.constructor.name])},u=function(p){return function(g){return p instanceof S&&!hse(sv(Dse)(hF)(p.value0))(g)?r_(g)(p.value0):g}},i=function(p){return u(Bb(Ab.create)(gse(HU)(p)))(u(Bb(Mb.create)(VU(n.responseFormat)))(n.headers))},l=function(p){return{method:r7(n.method),url:n.url,headers:Rse(function(g){return{field:hF(g),value:WU(g)}})(i(n.content)),content:p,responseType:zU(n.responseFormat),username:Ia(n.username),password:Ia(n.password),withCredentials:n.withCredentials,timeout:Ue(0)(Bb(function(g){return g})(n.timeout))}},s=function(p){return yse(bse(u7(PU(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",YU.create,l(p)))))(function(g){if(g instanceof Te){var E=Np(t(g.value0.body));if(E instanceof Ie)return new Ie(new Jb(fj(E.value0),g.value0));if(E instanceof Te)return new Te({headers:g.value0.headers,status:g.value0.status,statusText:g.value0.statusText,body:E.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[E.constructor.name])}if(g instanceof Ie)return new Ie(function(){var b=$0(g.value0),I=b==="AffjaxTimeoutErrorMessageIdent";if(I)return qb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?Wb.value:new $b(g.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[g.constructor.name])})};if(n.content instanceof G)return s(Ia(G.value));if(n.content instanceof S){var m=r(n.content.value0);if(m instanceof Te)return s(Ia(new S(m.value0)));if(m instanceof Ie)return wse(new Ie(new Hb(m.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[m.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Op=function(){return{method:new Ie(x_.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:KU,timeout:G.value}}();var c7={eq:function(e){return function(n){return e===n}}};var xF={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var s7=l7(xF);function M7(e){return Buffer.from(e).toString("base64")}function A7(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var OF=typeof btoa=="function";function L7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Kc||!Kc.key)return Kc||console.error("Pusher config is missing in global context"),new cve;let t={auth:{headers:{"X-CSRF-Token":Kc.authToken}},authEndpoint:Kc.authPath,cluster:Kc.cluster};return Kc.dev&&Object.assign(t,{wsHost:Kc.dev.wsHost,wsPort:Kc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new V7.default(Kc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),Q7=e=>{let n=ive().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),lve()}};function cve(){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 sve(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function sve(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 Qb=function(e){return e};var _ve=function(e){return e},Y7=function(e){var n=He(e),a=_ve(e.Eq0());return{compare:function(t){return function(r){return gx(n(t)(r))}},Eq0:function(){return a}}};var Kb=function(e){return function(){console.error(e)}};var o6=function(e){var n=gn(e);return function(a){return n(Kb(a))}};var Ive=q(_t),u6=ee(vr),Tve=U(Bn),Sve=o6(Sr),BF=function(e){var n=function(t){var r=e(t);return KS(r.view(r.init.value0)(cn(Ive(de))))},a=function(t){return function(r){return function(u){return function(){var l=u6(u6(pu)(function(){var m=Tve(hb);return function(p){return m(cf(p))}}()))(db(r))();if(l instanceof G)return Sve("Element #"+(r+" not found"))();if(l instanceof S){var s=eC(e(u))();return t(s)(l.value0)()}throw new Error("Failed pattern match at Elmish.Boot (line 117, column 11 - line 122, column 21): "+[l.constructor.name])}}}};return{mount:a(U3),renderToString:n,hydrate:a(k3)}};var Oh="";function l6(e){var n=e.split(` `);return n.reduce(function(a,t){var r=Gve(t)||Ave(t)||Pve(t)||Uve(t)||Nve(t);return r&&a.push(r),a},[])}var Cve=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fve=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Gve(e){var n=Cve.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=Fve.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]||Oh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var Mve=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ave(e){var n=Mve.exec(e);return n?{file:n[2],methodName:n[1]||Oh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var Lve=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,xve=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pve(e){var n=Lve.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=xve.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||Oh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var jve=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Nve(e){var n=jve.exec(e);return n?{file:n[3],methodName:n[1]||Oh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var Ove=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Uve(e){var n=Ove.exec(e);return n?{file:n[2],methodName:n[1]||Oh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function c6({skipFrames:e,prefix:n}){let a=new Error().stack,r=l6(a)[e],u=s6(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=s6(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var s6=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var kve=q(Rn),Bve=ln(_n),Yb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Hve={map:function(e){return function(n){return new Yb(function(a){return n.value0(function(t){return a(e(t))})})}}},Jve=U(Hve);var v6=function(e){return ZS(c6(e))},$s=function(e){return new Yb(function(n){return n(e)})},O_=function(e){return function(n){return new Yb(function(a){return js(e)(n)(a)})}},f6=function(e){return function(n){return js(e)(function(a){return{init:kve(de),update:cn(ms),view:cn(cn(n.value0(Bve)))}})(de)}},_6=function(e){var n=v6({skipFrames:3,prefix:"WithHook"});return function(a){return f6(n)(Jve(a)(e))}};var Hp=function(e){var n=v6({skipFrames:3,prefix:"HooksComponent"});return f6(n)(e)},Yc=function(){return function(e){return function(n){return new Yb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},qve=Yc(),U_=function(e){return function(){return qve}};Va();var p6=class extends Ua.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},d6=p6;var Wve=Et();var m6=function(e){return"ref:"+Ft(e)(Wa.value)},h6=function(e){var n=m6(e);return function(a){return Wve(Cc(n)(a))}},D6=function(e){var n=m6(e);return function(a){return YR(n)(a)}};var $ve=$l(),g6=en(Ke)(qn),R6=q(Rn),zve=Gi(My(sl)),y6={reflectSymbol:function(){return"deps"}},Vve=h6(y6),Qve=D6(y6),Kve=ln(_n);var Yve=function(e){var n=$ve(e);return function(){return function(){return n(d6)}}},Xve=Yve(Qe)()(),Zve=function(e){var n=Ro(e);return function(a){return function(t){return function(r){return function(u){return O_(a)(function(i){return t({init:g6(Za(u(r)))(function(){return R6(r)}),update:function(l){return function(s){return g6(Za(u(s)))(function(){return R6(s)})}},view:function(l){return function(s){return Xve({componentDidUpdate:zve(s)(function(m){var p=n(Vve(m))(r);return p?new S(r):G.value}),deps:Qve(r)})(i(de))}}})})}}}}};var Jp=function(e){var n=Zve(e);return function(a){return function(t){return n("UseEffectPrime")(Kve)(a)(t)}}};var b6=q(Rn),efe=ln(_n);var nfe=function(e){return function(n){return function(a){return O_(e)(function(t){return n({init:b6(a),update:function(r){return function(u){return b6(u)}},view:Kf(t)})})}}},El=function(e){return nfe("UseState")(efe)(e)};var HF=function(){return Yc()(El(G.value))(function(e){return $s(new sn(e.value0,Fy(e.value0)(e.value1)))})}();var w6=en(Ke)(qn),afe=fu(Le),tfe=ln(_n),E6=q(Rn),Uh=function(e){return function(n){return O_("UseSubscription")(function(a){return{init:w6(afe(tfe)(e))(function(){return E6(de)}),update:function(t){return function(r){return w6(Za(n(r)))(function(){return E6(de)})}},view:function(t){return function(r){return a(de)}}}})}};var Xb=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var JF=el(yo(ot)),ufe=ln(_n),ife=fl()(),Zb=function(e){var n=ni(e);return function(a){return Pt(n(a))}},F6=function(e){if(JF(Zb("http://"))(JF(Zb("https://"))(JF(Zb("//"))(Zb("blob:"))))(e))return e;if(je)return Xb+Ue(e)(ni("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},vi=function(){return function(){return function(e){return function(n){var a=function(r){return ufe},t=a(n)(Z0("src")(F6(n.src))(n));return ife(e)(t)}}}};var M6=q(Rn),lfe=Zn(Xy),cfe=ee(tu);var sfe={init:M6(de),update:function(e){return function(n){return M6(de)}},view:function(e){return function(n){return ta}}},qF=function(e){var n=xv(e);return function(a){return BF(lfe({parse:function(t){return cfe(n(t))(function(r){return In(new Ie("Component construction failed"))(Te.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:sfe}))}};var Me=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bn=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var wfe=gr(Be)(It),Efe=Bo(_t)(Ku),Ife=_e(rC);var Tfe={show:function(e){return e}},Sfe=te(Tfe);var aw=he;var Cfe=function(e){var n=tf(e);return function(a){return function(t){return function(r){var u=wfe(["Pusher event ",t," over channel ",Sfe(a)]),i=function(l){return Efe(n(u)(l))(r)()};return function(){return Q7({channel:a,event:t,handler:i})}}}}},Ni=function(e){var n=Cfe(e);return function(a){var t=a.Monad0(),r=ee(t.Bind1()),u=gn(a),i=q(t.Applicative0());return function(l){return function(s){return function(m){return r(u(n(l)(s)(m)))(function(p){return i(u(p))})}}}}},Ffe=Ni(v_),tw=function(e){var n=Ffe(e);return function(a){return function(t){return Ife(n(a)(t))(cn(de))}}};var K6=Qc(zc),Uu=rc(K6),Ar=ee(ra),Bh=rc(Qc(K6)),Y6=q(Qn),Gfe=_e(oe),Hh=Aa(),X6=H({reflectSymbol:function(){return"pollId"}})(on),Mfe=H({reflectSymbol:function(){return"status"}})(he)(tn),Afe=gt(La(Hh(X6(Mfe)))),Z6=U(ze),e5=U(Ca),Lfe=H({reflectSymbol:function(){return"id"}}),xfe=Lfe(on),n5=Hh(H({reflectSymbol:function(){return"author"}})(Hh(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(xfe(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))),Pfe=Bp(n5);var jfe=at(he);var Nfe=Bp(La(Hh(X6(H({reflectSymbol:function(){return"responses"}})(Hh(H({reflectSymbol:function(){return"answered"}})(on)(H({reflectSymbol:function(){return"optionCounts"}})(La(on))(H({reflectSymbol:function(){return"seen"}})(on)(H({reflectSymbol:function(){return"skipped"}})(on)(tn))))))(tn))))),Ofe=Bp(jfe),Ufe=Bp(La(n5));var QF=Bh("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Ar(e({id:n.id,status:wb(a)}))(Vc(function(t){return Y6(Ue([])(Gfe(Afe(t))(Z6(function(r){return{pollId:r.pollId,status:Mh(r.status)}}))))}))}}});var KF=Bh("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Ar(e({id:n.id,options:a}))(ir)}}}),a5=Uu("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Ar(e({conference_id:n}))(ir)}}),t5=Uu("livestreams_conferences_status_complete_path")(function(e){return function(n){return Ar(e({conference_id:n}))(ir)}}),r5=Uu("livestreams_cta_save_referral_path")(function(e){return function(n){return Ar(e(n))(ir)}}),o5=Uu("livestreams_polls_report_shown_path")(function(e){return function(n){return Ar(e({id:n.id}))(ir)}}),u5=Bh("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Ar(e({stream_id:n,visible:a.visible}))(ir)}}}),i5=Bh("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Ar(e({conference_id:n,current_time_minutes:a}))(ir)}}}),l5=Uu("livestreams_questions_visibility_path")(function(e){return function(n){return Ar(e({question_id:n.questionId,is_public:n.isPublic}))(ir)}}),c5=Uu("livestreams_questions_post_path")(function(e){return function(n){return Ar(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Vc(function(a){return e5(A_)(Pfe("Livestream question")(a))}))}}),s5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ir)}}),v5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ir)}}),f5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(ir)}}),_5=Uu("livestreams_cta_open_path")(function(e){return function(n){return Ar(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(ir)}}),rw=Uu("livestreams_register_path")(function(e){return function(n){return Ar(e({from_conference_id:Ia(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(ir)}});var p5=Bh("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Ar(e({conference_id:n,reaction:MU(a)}))(ir)}}}),d5=Uu("livestreams_polls_responses_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(Nfe("livestream poll responses")))}}),m5=Uu("livestreams_conferences_download_url_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(function(a){return e5(fe)(Ofe("Livestream download URL")(a))}))}}),ow=rc(zc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Ar(e({}))(ir)});var h5=Uu("livestreams_conferences_ban_user_path")(function(e){return function(n){return Ar(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(ir)}}),uw=Uu("livestreams_questions_all_path")(function(e){return function(n){return Ar(e({conference_id:n}))(Vc(function(a){return Ar(Ufe("Livestream questions")(a))(function(t){return Y6(Z6(A_)(t))})}))}});var XF=function(){function e(){}return e.value=new e,e}(),ZF=function(){function e(){}return e.value=new e,e}(),eG=function(){function e(){}return e.value=new e,e}(),nG=function(){function e(){}return e.value=new e,e}(),aG=function(){function e(){}return e.value=new e,e}(),tG=function(){function e(){}return e.value=new e,e}(),rG=function(){function e(){}return e.value=new e,e}(),oG=function(){function e(){}return e.value=new e,e}(),uG=function(){function e(){}return e.value=new e,e}(),iG=function(){function e(){}return e.value=new e,e}(),lG=function(){function e(){}return e.value=new e,e}(),cG=function(){function e(){}return e.value=new e,e}(),sG=function(){function e(){}return e.value=new e,e}(),vG=function(){function e(){}return e.value=new e,e}(),Jt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fG=function(){function e(){}return e.value=new e,e}();var lw=function(e){if(e instanceof Jt&&e.value0 instanceof XF)return"architecture";if(e instanceof Jt&&e.value0 instanceof eG)return"chemistry";if(e instanceof Jt&&e.value0 instanceof ZF)return"business";if(e instanceof Jt&&e.value0 instanceof nG)return"computer-science";if(e instanceof Jt&&e.value0 instanceof aG)return"criminal-justice-and-corrections";if(e instanceof Jt&&e.value0 instanceof tG)return"economics";if(e instanceof Jt&&e.value0 instanceof rG)return"engineering";if(e instanceof Jt&&e.value0 instanceof oG)return"english";if(e instanceof Jt&&e.value0 instanceof uG)return"film";if(e instanceof Jt&&e.value0 instanceof iG)return"finance";if(e instanceof Jt&&e.value0 instanceof lG)return"history";if(e instanceof Jt&&e.value0 instanceof cG)return"political-science";if(e instanceof Jt&&e.value0 instanceof sG)return"pre-med";if(e instanceof Jt&&e.value0 instanceof vG)return"psychology";if(e instanceof fG)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var cw=function(){function e(){}return e.value=new e,e}(),qfe=function(){function e(){}return e.value=new e,e}(),Wfe=function(){function e(){}return e.value=new e,e}();var D5=function(e){if(e instanceof cw)return G.value;if(e instanceof Wfe)return new S("open");if(e instanceof qfe)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 b5=Et();var vw=function(e){return function(n){var a=function(){var u=Sc("?")(n);return u?"&":"?"}(),t=b5(Nb(e.value)),r=b5(Nb(e.key));return n+(a+(r+("="+t)))}};var m_e=function(){function e(){}return e.value=new e,e}(),h_e=function(){function e(){}return e.value=new e,e}(),D_e=function(){function e(){}return e.value=new e,e}(),g_e=function(){function e(){}return e.value=new e,e}(),R_e=function(){function e(){}return e.value=new e,e}(),y_e=function(){function e(){}return e.value=new e,e}(),b_e=function(){function e(){}return e.value=new e,e}(),w_e=function(){function e(){}return e.value=new e,e}(),E_e=function(){function e(){}return e.value=new e,e}(),I_e=function(){function e(){}return e.value=new e,e}(),T_e=function(){function e(){}return e.value=new e,e}(),S_e=function(){function e(){}return e.value=new e,e}(),C_e=function(){function e(){}return e.value=new e,e}(),F_e=function(){function e(){}return e.value=new e,e}(),G_e=function(){function e(){}return e.value=new e,e}(),M_e=function(){function e(){}return e.value=new e,e}(),A_e=function(){function e(){}return e.value=new e,e}(),L_e=function(){function e(){}return e.value=new e,e}(),x_e=function(){function e(){}return e.value=new e,e}(),P_e=function(){function e(){}return e.value=new e,e}(),j_e=function(){function e(){}return e.value=new e,e}(),N_e=function(){function e(){}return e.value=new e,e}(),O_e=function(){function e(){}return e.value=new e,e}(),U_e=function(){function e(){}return e.value=new e,e}(),k_e=function(){function e(){}return e.value=new e,e}(),B_e=function(){function e(){}return e.value=new e,e}(),H_e=function(){function e(){}return e.value=new e,e}(),J_e=function(){function e(){}return e.value=new e,e}(),q_e=function(){function e(){}return e.value=new e,e}(),W_e=function(){function e(){}return e.value=new e,e}(),$_e=function(){function e(){}return e.value=new e,e}(),z_e=function(){function e(){}return e.value=new e,e}(),V_e=function(){function e(){}return e.value=new e,e}(),Q_e=function(){function e(){}return e.value=new e,e}(),K_e=function(){function e(){}return e.value=new e,e}(),Y_e=function(){function e(){}return e.value=new e,e}(),X_e=function(){function e(){}return e.value=new e,e}(),Z_e=function(){function e(){}return e.value=new e,e}(),e0e=function(){function e(){}return e.value=new e,e}(),n0e=function(){function e(){}return e.value=new e,e}(),a0e=function(){function e(){}return e.value=new e,e}(),t0e=function(){function e(){}return e.value=new e,e}(),r0e=function(){function e(){}return e.value=new e,e}(),o0e=function(){function e(){}return e.value=new e,e}(),u0e=function(){function e(){}return e.value=new e,e}(),i0e=function(){function e(){}return e.value=new e,e}(),l0e=function(){function e(){}return e.value=new e,e}(),c0e=function(){function e(){}return e.value=new e,e}(),s0e=function(){function e(){}return e.value=new e,e}(),v0e=function(){function e(){}return e.value=new e,e}(),f0e=function(){function e(){}return e.value=new e,e}(),_0e=function(){function e(){}return e.value=new e,e}(),p0e=function(){function e(){}return e.value=new e,e}(),d0e=function(){function e(){}return e.value=new e,e}(),m0e=function(){function e(){}return e.value=new e,e}(),h0e=function(){function e(){}return e.value=new e,e}();var ca=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ku=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var w5=function(e){if(e instanceof ca&&e.value0 instanceof m_e)return"AcceptanceRate";if(e instanceof ca&&e.value0 instanceof h_e)return"AcceptanceRateMen";if(e instanceof ca&&e.value0 instanceof D_e)return"AcceptanceRateWomen";if(e instanceof ca&&e.value0 instanceof g_e)return"Address";if(e instanceof ca&&e.value0 instanceof R_e)return"AdmissionChances";if(e instanceof ca&&e.value0 instanceof y_e)return"AdmissionDifficulty";if(e instanceof ca&&e.value0 instanceof b_e)return"AdmissionsNotificationDate";if(e instanceof ca&&e.value0 instanceof w_e)return"AdmissionsWebsite";if(e instanceof ca&&e.value0 instanceof E_e)return"AppDeadlineIsRolling";if(e instanceof ca&&e.value0 instanceof I_e)return"ApplicationEffort";if(e instanceof ca&&e.value0 instanceof T_e)return"ApplicationRound";if(e instanceof ca&&e.value0 instanceof S_e)return"BasketballConference";if(e instanceof ca&&e.value0 instanceof C_e)return"CampusSetting";if(e instanceof ca&&e.value0 instanceof F_e)return"City";if(e instanceof ca&&e.value0 instanceof G_e)return"ClassRank";if(e instanceof ca&&e.value0 instanceof M_e)return"CoEdSingleSex";if(e instanceof ca&&e.value0 instanceof A_e)return"CollegeType";if(e instanceof ca&&e.value0 instanceof L_e)return"CommuterCollege";if(e instanceof ca&&e.value0 instanceof x_e)return"Diversity";if(e instanceof ca&&e.value0 instanceof P_e)return"DropoutRate";if(e instanceof ca&&e.value0 instanceof N_e)return"FinancialAidWebsite";if(e instanceof ca&&e.value0 instanceof O_e)return"FirstYearEnrollment";if(e instanceof ca&&e.value0 instanceof U_e)return"FootballConference";if(e instanceof ca&&e.value0 instanceof k_e)return"FourYearGraduationRate";if(e instanceof ca&&e.value0 instanceof B_e)return"HasDivisionOneBasketball";if(e instanceof ca&&e.value0 instanceof H_e)return"HasDivisionOneFootball";if(e instanceof ca&&e.value0 instanceof J_e)return"HasMedicalSchool";if(e instanceof ca&&e.value0 instanceof q_e)return"HasStudyAbroad";if(e instanceof ca&&e.value0 instanceof W_e)return"HBCU";if(e instanceof ca&&e.value0 instanceof $_e)return"InListStatus";if(e instanceof ca&&e.value0 instanceof z_e)return"MainWebsite";if(e instanceof ca&&e.value0 instanceof j_e)return"Majors";if(e instanceof ca&&e.value0 instanceof V_e)return"Name";if(e instanceof ca&&e.value0 instanceof Q_e)return"NetCostEstimate";if(e instanceof ca&&e.value0 instanceof K_e)return"Notes";if(e instanceof ca&&e.value0 instanceof Y_e)return"PercentInternationalStudents";if(e instanceof ca&&e.value0 instanceof X_e)return"Phone";if(e instanceof ca&&e.value0 instanceof Z_e)return"Photo";if(e instanceof ca&&e.value0 instanceof e0e)return"Prestige";if(e instanceof ca&&e.value0 instanceof n0e)return"ProgramLength";if(e instanceof ca&&e.value0 instanceof a0e)return"PublicPrivate";if(e instanceof ca&&e.value0 instanceof t0e)return"RecommendationLetters";if(e instanceof ca&&e.value0 instanceof r0e)return"Region";if(e instanceof ca&&e.value0 instanceof o0e)return"ReligiousAffiliation";if(e instanceof ca&&e.value0 instanceof u0e)return"SatActDeadline";if(e instanceof ca&&e.value0 instanceof i0e)return"SatActTestPolicy";if(e instanceof ca&&e.value0 instanceof l0e)return"SatSubjectTestDeadline";if(e instanceof ca&&e.value0 instanceof c0e)return"SixYearGraduationRate";if(e instanceof ca&&e.value0 instanceof s0e)return"State";if(e instanceof ca&&e.value0 instanceof v0e)return"StudentFacultyRatio";if(e instanceof ca&&e.value0 instanceof f0e)return"SubmissionDeadline";if(e instanceof ca&&e.value0 instanceof _0e)return"TOEFLPolicy";if(e instanceof ca&&e.value0 instanceof p0e)return"TotalUndergrads";if(e instanceof ca&&e.value0 instanceof d0e)return"TuitionInState";if(e instanceof ca&&e.value0 instanceof m0e)return"TuitionOutOfState";if(e instanceof ca&&e.value0 instanceof h0e)return"YieldRate";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof XF)return"RankingArchitecture";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof ZF)return"RankingBusiness";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof eG)return"RankingChemistry";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof nG)return"RankingComputerScience";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof aG)return"RankingCriminalJusticeAndCorrections";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof tG)return"RankingEconomics";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof rG)return"RankingEngineering";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof oG)return"RankingEnglish";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof uG)return"RankingFilm";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof iG)return"RankingFinance";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof lG)return"RankingHistory";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof cG)return"RankingPoliticalScience";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof sG)return"RankingPreMed";if(e instanceof ku&&e.value0 instanceof Jt&&e.value0.value0 instanceof vG)return"RankingPsychology";if(e instanceof ku&&e.value0 instanceof fG)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var E5=zl()(),ehe=function(e){return e},an=Fr(Zu),$n=function(e){var n=mO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(E5(r)({className:a,"aria-label":t}))(u)}}}}}}},I5=function(e){var n=$n(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},tr=function(e){return ehe(Fr(e))},lr=function(e){var n=DO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(E5(r)({className:a,"aria-label":t}))(u)}}}}}}};var nhe=function(){function e(){}return e.value=new e,e}(),ahe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),the=function(){function e(){}return e.value=new e,e}();var T5=function(e){if(e instanceof nhe)return"filters";if(e instanceof ahe)return"filter:"+w5(e.value0);if(e instanceof the)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 34, column 26 - line 37, column 39): "+[e.constructor.name])};function S5(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var rhe=ai();var zs=function(e){var n=gn(e);return function(a){return function(t){return n(function(){return S5(a,t)})}}},Vs=function(e){var n=zs(e);return function(){return function(a){return function(t){return n(a)(rhe(t))}}}};var Jh=function(){function e(){}return e.value=new e,e}(),hf=function(){function e(){}return e.value=new e,e}(),qh=function(){function e(){}return e.value=new e,e}(),Lhe=function(){function e(){}return e.value=new e,e}(),G5=function(e){if(e instanceof Jh)return"modal-sm";if(e instanceof hf)return"";if(e instanceof qh)return"modal-lg";if(e instanceof Lhe)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 n9=$u(e9()),a9=n9.default;var pDe=$l(),t9=function(e){var n=pDe(e);return function(){return function(){return n(a9)}}};function RG(e){return function(){return function(n){return e(n)()}}}function yG(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function bG(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var r9="message";var o9="hashchange";var u9="popstate";var i9="keyup",l9="keydown";var c9="mouseup";var s9="mousemove";var v9=gn(Le),f9=U(Bn),dDe=Ta(vr),Vh=function(){var e=function(t){return function(r){return function(u){return v9(function(){var l=r(),s=RG(function(m){return u(m)})();return yG(t)(s)(!1)(l)(),v9(bG(t)(s)(!1)(l))})}}},n=function(t){return e(t)(f9(SO)(pu))},a=function(t){return e(t)(f9(bO)(dDe(cf)(pu)))};return{hashchange:n(o9),mousemove:n(s9),mouseup:n(c9),popstate:n(u9),resize:n("resize"),message:n(r9),keydown:a(l9),keyup:a(i9),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var hw=function(){return Je};var Wp=Ce(Qe),wG=lo(),mDe=t9(Qe)()(),hDe=Xt(Qe)()(),DDe=Xt(be)()(),gDe=Ce(be),RDe=$n(re)()(),yDe=Xr(Nu),bDe=Zt(Qn),wDe=gn(Le),_9=hw(),oc=function(){return function(e){var n=Wp("modal-backdrop fade show")(ta),a=wG(e),t=gl(a.footer),r=gl(a.header),u=Ba(a.size)(hf.value),i=hr(" ")([function(){var s=Ba(a.scrollable)(!0);return s?"modal-dialog-scrollable":""}(),function(){var s=Ba(a.centered)(!0);return s?"modal-dialog-centered":""}(),G5(u),Ba(a.dialogClass)("")]),l=mDe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(Wp("modal fade show d-block")(hDe("modal-dialog "+i)({style:Ba(a.dialogStyle)(vt({}))})(DDe("modal-content "+Ba(a.contentClass)(""))({style:Ba(a.contentStyle)(vt({}))})([ha(r)(Wp("modal-header "+Ba(a.headerClass)(""))),Wp("modal-body "+Ba(a.bodyClass)(""))(a.body),ha(t)(Wp("modal-footer "+Ba(a.footerClass)("")))]))));return Se([l,n])}},EG=oc(),uc=function(){return function(e){var n=wG(e),a=gDe("d-flex w-100 justify-content-between align-items-center")([Wp("mr-4")(Ba(n.title)(ta)),RDe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Ba(n.dismissButtonClass)("text-body"))(tr("Close"))({type:"button",onClick:yDe(n.onDismiss)})("")]),t=function(r){return bDe(r.key==="Escape")(wDe(n.onDismiss))};return _6(Uh(Vh.keyup)(t))(function(r){var u=Ba(n.bodyScrollable)(!1);return EG(u?function(){var i=wG(_9(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}}():_9({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:Se([a,n.body])}))})}},$p=function(e){var n=vh(e);return function(a){return function(t){return EG({bodyClass:a,body:Se(n(t))})}}};var EDe=lo(),IDe=ln(_n),TDe=Zv(be)()(),SDe=$n(Qe)()(),CDe=Zr()();var Dw="login",IG=function(){return function(e){var n=EDe(e),a=function(){var u=Ba(n.auth0ActiveTab)(Dw);return u}(),t=Ue({path:"",token:""})(zb("login_path")),r=function(u){return function(i){return In(IDe)(function(l){return vw(function(s){return{key:u,value:s}}(l))})(gl(i))}};return TDe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(vw({key:"screen_hint",value:a})(t.path))),target:function(){var u=Ba(n.openInNewTab)(!1);return u?"_blank":""}()})([SDe(Ba(n.className)("btn btn-primary px-4"))(an)({type:"submit",disabled:Ba(n.disabled)(!1)})(Ba(n.content)(Xe(Ba(n.text)("Log in")))),CDe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var H_=function(e){return function(n){return function(){return n[e]}}},FDe=H_("URL"),GDe=H_("documentURI"),MDe=H_("origin"),ADe=H_("compatMode"),LDe=H_("characterSet"),xDe=H_("contentType");var PDe=H_("documentElement");var gw=function(e){return function(n){return n[e]}},NDe=gw("namespaceURI"),ODe=gw("prefix"),UDe=gw("localName"),kDe=gw("tagName");function TG(e){return function(){return e.id}}function SG(e){return function(){return e.classList}}function CG(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 FG=Je;var d9=Fn("Element");var ic=function(e){return function(n){return function(){return n[e]}}};var HDe=ic("baseURI"),JDe=ic("ownerDocument"),m9=ic("parentNode"),qDe=ic("parentElement");var WDe=ic("childNodes"),$De=ic("firstChild"),zDe=ic("lastChild"),VDe=ic("previousSibling"),QDe=ic("nextSibling"),KDe=ic("nodeValue");var YDe=ic("textContent");function GG(e){return function(n){return function(){return e.isEqualNode(n)}}}var ege=U(Bn);var h9=function(){var e=ege(fe);return function(n){return e(m9(n))}}();var nge=JSON.stringify;var q_=function(){function e(){}return e.value=new e,e}(),D9=function(){function e(){}return e.value=new e,e}(),g9=function(){function e(){}return e.value=new e,e}(),Qh=function(){function e(){}return e.value=new e,e}(),R9=function(){function e(){}return e.value=new e,e}(),y9=function(){function e(){}return e.value=new e,e}(),b9=function(){function e(){}return e.value=new e,e}();var Rw=function(e){if(e instanceof q_)return G.value;if(e instanceof D9)return new S("for-you");if(e instanceof g9)return new S("chancing");if(e instanceof Qh)return new S("finances");if(e instanceof R9)return new S("majors");if(e instanceof y9)return new S("admission-requirements");if(e instanceof b9)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 MG=_e(oe);var AG=B0(It),oge=ba(),uge=Di(oe),LG=function(e){return"/schools/"+e.slug},xG="/schools/hub";var w9=function(e){return function(n){var a=MG(D5(n.whatificator))(function(l){return"simulator="+l}),t=MG(n.mobileOverlay)(function(l){return"overlay="+T5(l)}),r=hr("&")(Jo([t,a])),u=MG(n.focusedSchool)(function(l){return AG("/")(Jo([new S(oge(l.slug)),Rw(l.tab)]))}),i=function(){return e.knownSeoState instanceof S&&n.seoView?AG("/")(Jo([new S(LG({slug:e.knownSeoState.value0.slug})),u])):AG("/")(Jo([new S(xG),new S(In(e.basePath)(lw)(n.ranking)),uge(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var E9="/profile";var lge=ba();var PG=function(e){return function(n){return hr("/")(Jo([new S("/schools"),new S(lge(n)),Rw(e)]))}},I9=E9,T9="/livestreams/upcoming";var cge=function(e){return w9({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:cw.value})};var yw=function(e){return function(n){return cge(new S({tab:e,slug:n}))}};var S9=function(){function e(){}return e.value=new e,e}(),C9=function(){function e(){}return e.value=new e,e}(),bw=function(){function e(){}return e.value=new e,e}(),ww=function(){function e(){}return e.value=new e,e}(),F9=function(){function e(){}return e.value=new e,e}(),G9=function(){function e(){}return e.value=new e,e}(),M9=function(){function e(){}return e.value=new e,e}(),A9=function(e){if(e instanceof S9)return"avatar-xxs";if(e instanceof C9)return"avatar-xs";if(e instanceof bw)return"avatar-sm";if(e instanceof ww)return"";if(e instanceof F9)return"avatar-lg";if(e instanceof G9)return"avatar-xl";if(e instanceof M9)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 L9={show:ba()};var sge=Number.MAX_SAFE_INTEGER;var NG=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if(je)return e.first+(" "+e.last);throw new Error("Failed pattern match at Profile.Types.Name (line 11, column 1 - line 11, column 27): "+[e.constructor.name])};var Ige=De(Eb);var P9={show:function(e){return e}};var j9=function(e){return Ige(e.publishScope)(Pi.value)};var zp=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}(),kG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var qG=te(L9);var Tge=te(_8),N9=te(W4),Sge=te(P9);var Cge="/messages";var Fge=function(e){return function(n){return e+("/"+function(){if(n instanceof zp)return"admission-officer/"+Tge(n.value0);if(n instanceof OG)return"school/"+N9(n.value0);if(n instanceof UG)return"student/"+Sge(n.value0);if(n instanceof kG)return"high-school/"+qG(n.value0);if(n instanceof BG)return"service-provider/"+qG(n.value0);if(n instanceof HG)return"parent/"+qG(n.value0);if(n instanceof JG)return"recruiter/"+N9(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},WG=Fge(Cge);var Gge=rc(Qc(zc)),Mge=ee(ra),O9=_e(oe),U9=ba(),Age=lt(Ca);var k9=Gge("network_connections_invite_school_path")(function(e){return function(n){return Mge(e({school_id:n.schoolId,message:Ia(n.introMessage),sem_user_id:Ia(O9(n.semUserId)(U9)),livestream_id:Ia(O9(n.livestreamId)(U9))}))(ir)}}),B9=function(e){return function(n){return Age(k9({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new S(n)}))}};var H9=function(e){return function(n){return function(a){return k9({schoolId:e,introMessage:new S(a.introMessage),semUserId:new S(n),livestreamId:G.value})}}};Va();function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;K9+=1;var a=K9;function t(r){if(r===0)Y9(a),e();else{var u=V9(function(){t(r-1)});zG.set(a,u)}}return t(n),a}Oi.cancel=function(e){var n=zG.get(e);return Y9(n),Q9(n)};function $_(e,n){return e?e.contains(n):!1}function Yh(e){return e instanceof HTMLElement?e:Fi.findDOMNode(e)}var ak=$u(nk());Va();function YG(e,n){typeof e=="function"?e(n):wr(e)==="object"&&e&&"current"in e&&(e.current=n)}function Nw(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=Array(n);a1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Oi(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Ot(function(){return function(){n()}},[]),[a,n]};Va();var Hge=Xc()?nh:Ot,Jw=Hge;var Dk=[Il,Ks,Rf,Hw],tM=!1,gk=!0;function qw(e){return e===Rf||e===Hw}var Rk=function(e,n){var a=Ys(aM),t=Wt(a,2),r=t[0],u=t[1],i=hk(),l=Wt(i,2),s=l[0],m=l[1];function p(){u(Il,!0)}return Jw(function(){if(r!==aM&&r!==Hw){var g=Dk.indexOf(r),E=Dk[g+1],b=n(r);b===tM?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),Ot(function(){return function(){m()}},[]),[p,r]};Va();Va();var yk=function(e){var n=st(),a=st(e);a.current=e;var t=eh(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(eM,t),i.removeEventListener(ZG,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(eM,t),i.addEventListener(ZG,t),n.current=i)}return Ot(function(){return function(){r(n.current)}},[]),[u,r]};function rM(e,n,a,t){var r=t.motionEnter,u=r===void 0?!0:r,i=t.motionAppear,l=i===void 0?!0:i,s=t.motionLeave,m=s===void 0?!0:s,p=t.motionDeadline,g=t.motionLeaveImmediately,E=t.onAppearPrepare,b=t.onEnterPrepare,I=t.onLeavePrepare,L=t.onAppearStart,N=t.onEnterStart,z=t.onLeaveStart,$=t.onAppearActive,ne=t.onEnterActive,ue=t.onLeaveActive,Z=t.onAppearEnd,Y=t.onEnterEnd,X=t.onLeaveEnd,ve=t.onVisibleChanged,xe=Ys(),ke=Wt(xe,2),rn=ke[0],wn=ke[1],dn=Ys(gf),mn=Wt(dn,2),yn=mn[0],Kn=mn[1],zn=Ys(null),Wn=Wt(zn,2),Pa=Wn[0],Ga=Wn[1],sa=st(!1),At=st(null);function qe(){return a()}var pa=st(!1);function Qa(it){var J=qe();if(!(it&&!it.deadline&&it.target!==J)){var K=pa.current,O;yn===Xh&&K?O=Z==null?void 0:Z(J,it):yn===Zh&&K?O=Y==null?void 0:Y(J,it):yn===eD&&K&&(O=X==null?void 0:X(J,it)),yn!==gf&&K&&O!==!1&&(Kn(gf,!0),Ga(null,!0))}}var Tn=yk(Qa),Dn=Wt(Tn,1),We=Dn[0],ea=ah(function(){var it,J,K;switch(yn){case Xh:return it={},Bu(it,Il,E),Bu(it,Ks,L),Bu(it,Rf,$),it;case Zh:return J={},Bu(J,Il,b),Bu(J,Ks,N),Bu(J,Rf,ne),J;case eD:return K={},Bu(K,Il,I),Bu(K,Ks,z),Bu(K,Rf,ue),K;default:return{}}},[yn]),va=Rk(yn,function(it){if(it===Il){var J=ea[Il];return J?J(qe()):tM}if(vn in ea){var K;Ga(((K=ea[vn])===null||K===void 0?void 0:K.call(ea,qe(),null))||null)}return vn===Rf&&(We(qe()),p>0&&(clearTimeout(At.current),At.current=setTimeout(function(){Qa({deadline:!0})},p))),gk}),Ma=Wt(va,2),dt=Ma[0],vn=Ma[1],oa=qw(vn);pa.current=oa,Jw(function(){wn(n);var it=sa.current;if(sa.current=!0,!!e){var J;!it&&n&&l&&(J=Xh),it&&n&&u&&(J=Zh),(it&&!n&&m||!it&&g&&!n&&m)&&(J=eD),J&&(Kn(J),dt())}},[n]),Ot(function(){(yn===Xh&&!l||yn===Zh&&!u||yn===eD&&!m)&&Kn(gf)},[l,u,m]),Ot(function(){return function(){sa.current=!1,clearTimeout(At.current)}},[]);var St=st(!1);Ot(function(){rn&&(St.current=!0),rn!==void 0&&yn===gf&&((St.current||rn)&&(ve==null||ve(rn)),St.current=!0)},[rn,yn]);var Da=Pa;return ea[Il]&&vn===Ks&&(Da=Ea({transition:"none"},Da)),[yn,vn,Da,rn!=null?rn:n]}Va();var Jge=function(e){Kp(a,e);var n=Yp(a);function a(){return Vp(this,a),n.apply(this,arguments)}return Qp(a,[{key:"render",value:function(){return this.props.children}}]),a}(h_),bk=Jge;function qge(e){var n=e;wr(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=Ci(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,m=s===void 0?!0:s,p=r.forceRender,g=r.children,E=r.motionName,b=r.leavedClassName,I=r.eventProps,L=a(r),N=st(),z=st();function $(){try{return N.current instanceof HTMLElement?N.current:Yh(z.current)}catch{return null}}var ne=rM(L,l,$,r),ue=Wt(ne,4),Z=ue[0],Y=ue[1],X=ue[2],ve=ue[3],xe=st(ve);ve&&(xe.current=!0);var ke=eh(function(zn){N.current=zn,YG(u,zn)},[u]),rn,wn=Ea(Ea({},I),{},{visible:l});if(!g)rn=null;else if(Z===gf||!a(r))ve?rn=g(Ea({},wn),ke):!m&&xe.current?rn=g(Ea(Ea({},wn),{},{className:b}),ke):p?rn=g(Ea(Ea({},wn),{},{style:{display:"none"}}),ke):rn=null;else{var dn,mn;Y===Il?mn="prepare":qw(Y)?mn="active":Y===Ks&&(mn="start"),rn=g(Ea(Ea({},wn),{},{className:(0,wk.default)(nM(E,Z),(dn={},Bu(dn,nM(E,"".concat(Z,"-").concat(mn)),mn),Bu(dn,E,typeof E=="string"),dn)),style:X}),ke)}if(TS(rn)&&Ow(rn)){var yn=rn,Kn=yn.ref;Kn||(rn=Zm(rn,{ref:ke}))}return pt(bk,{ref:z},rn)});return t.displayName="CSSMotion",t}var Ww=qge(Bw);Va();var $w="add",zw="keep",Vw="remove",Qw="removed";function Wge(e){var n;return e&&wr(e)==="object"&&"key"in e?n=e:n={key:e},Ea(Ea({},n),{},{key:String(n.key)})}function Kw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Wge)}function Ek(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],t=0,r=n.length,u=Kw(e),i=Kw(n);u.forEach(function(m){for(var p=!1,g=t;g1});return s.forEach(function(m){a=a.filter(function(p){var g=p.key,E=p.status;return g!==m||E!==Vw}),a.forEach(function(p){p.key===m&&(p.status=zw)})}),a}var $ge=["component","children","onVisibleChanged","onAllRemoved"],zge=["status"],Vge=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Qge(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ww,a=function(t){Kp(u,t);var r=Yp(u);function u(){var i;Vp(this,u);for(var l=arguments.length,s=new Array(l),m=0;m=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function gRe(e,n,a,t){var r=Ha.clone(e),u={width:n.width,height:n.height};return t.adjustX&&r.left=a.left&&r.left+u.width>a.right&&(u.width-=r.left+u.width-a.right),t.adjustX&&r.left+u.width>a.right&&(r.left=Math.max(a.right-u.width,a.left)),t.adjustY&&r.top=a.top&&r.top+u.height>a.bottom&&(u.height-=r.top+u.height-a.bottom),t.adjustY&&r.top+u.height>a.bottom&&(r.top=Math.max(a.bottom-u.height,a.top)),Ha.mix(r,u)}function mM(e){var n,a,t;if(!Ha.isWindow(e)&&e.nodeType!==9)n=Ha.offset(e),a=Ha.outerWidth(e),t=Ha.outerHeight(e);else{var r=Ha.getWindow(e);n={left:Ha.getWindowScrollLeft(r),top:Ha.getWindowScrollTop(r)},a=Ha.viewportWidth(r),t=Ha.viewportHeight(r)}return n.width=a,n.height=t,n}function Jk(e,n){var a=n.charAt(0),t=n.charAt(1),r=e.width,u=e.height,i=e.left,l=e.top;return a==="c"?l+=u/2:a==="b"&&(l+=u),t==="c"?i+=r/2:t==="r"&&(i+=r),{left:i,top:l}}function a1(e,n,a,t,r){var u=Jk(n,a[1]),i=Jk(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 qk(e,n,a){return e.lefta.right}function Wk(e,n,a){return e.topa.bottom}function RRe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function o1(e,n,a){var t=a.target||n,r=mM(t),u=!bRe(t,a.overflow&&a.overflow.alwaysByViewport);return Vk(e,r,a,u)}o1.__getOffsetParent=pM;o1.__getVisibleRectForElement=dM;function Qk(e,n,a){var t,r,u=Ha.getDocument(e),i=u.defaultView||u.parentWindow,l=Ha.getWindowScrollLeft(i),s=Ha.getWindowScrollTop(i),m=Ha.viewportWidth(i),p=Ha.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var g={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+m&&r>=0&&r<=s+p,b=[a.points[0],"cc"];return Vk(e,g,Ck(Ck({},a),{},{points:b}),E)}var Lq=$u(bq());var wq=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(){!jM||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),QEe?(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(){!jM||!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=VEe.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}(),Eq=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),Sq=typeof WeakMap!="undefined"?new WeakMap:new wq,Cq=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=KEe.getInstance(),t=new uIe(n,a,this);Sq.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Cq.prototype[e]=function(){var n;return(n=Sq.get(this))[e].apply(n,arguments)}});var iIe=function(){return typeof v1.ResizeObserver!="undefined"?v1.ResizeObserver:Cq}(),Fq=iIe;function Gq(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 Mq(e,n){e!==document.activeElement&&$_(n,e)&&typeof e.focus=="function"&&e.focus()}function NM(e,n){var a=null,t=null;function r(i){var l=Wt(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var m=s.getBoundingClientRect(),p=m.width,g=m.height,E=Math.floor(p),b=Math.floor(g);(a!==E||t!==b)&&Promise.resolve().then(function(){n({width:E,height:b})}),a=E,t=b}}var u=new Fq(r);return e&&u.observe(e),function(){u.disconnect()}}Va();var Aq=function(e,n){var a=Ua.useRef(!1),t=Ua.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 xq(e){return typeof e!="function"?null:e()}function Pq(e){return wr(e)!=="object"||!e?null:e}var lIe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,m=n.monitorBufferTime,p=m===void 0?0:m,g=Ua.useRef({}),E=Ua.useRef(),b=Ua.Children.only(t),I=Ua.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=Aq(function(){var Y=I.current,X=Y.disabled,ve=Y.target,xe=Y.align,ke=Y.onAlign;if(!X&&ve){var rn=E.current,wn,dn=xq(ve),mn=Pq(ve);g.current.element=dn,g.current.point=mn,g.current.align=xe;var yn=document,Kn=yn.activeElement;return dn&&Tk(dn)?wn=o1(rn,dn,xe):mn&&(wn=Qk(rn,mn,xe)),Mq(Kn,rn),ke&&wn&&ke(rn,wn),!0}return!1},p),N=Wt(L,2),z=N[0],$=N[1],ne=Ua.useRef({cancel:function(){}}),ue=Ua.useRef({cancel:function(){}});Ua.useEffect(function(){var Y=xq(u),X=Pq(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=NM(E.current,z)),(g.current.element!==Y||!Gq(g.current.point,X)||!(0,Lq.default)(g.current.align,i))&&(z(),ne.current.element!==Y&&(ne.current.cancel(),ne.current.element=Y,ne.current.cancel=NM(Y,z)))}),Ua.useEffect(function(){r?$():z()},[r]);var Z=Ua.useRef(null);return Ua.useEffect(function(){s?Z.current||(Z.current=Df(window,"resize",z)):Z.current&&(Z.current.remove(),Z.current=null)},[s]),Ua.useEffect(function(){return function(){ne.current.cancel(),ue.current.cancel(),Z.current&&Z.current.remove(),$()}},[]),Ua.useImperativeHandle(a,function(){return{forceAlign:function(){return z(!0)}}}),Ua.isValidElement(b)&&(b=Ua.cloneElement(b,{ref:Nw(b.ref,E)})),b},jq=Ua.forwardRef(lIe);jq.displayName="Align";var Nq=jq;var Oq=Nq;Va();var cIe=Xc()?nh:Ot,OM=cIe;var $q=$u(z_());function p1(e,n){this.v=e,this.k=n}function Mo(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Mo=function(i,l,s,m){function p(g,E){Mo(i,g,function(b){return this._invoke(g,E,b)})}l?r?r(i,l,{value:s,enumerable:!m,configurable:!m,writable:!m}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Mo(e,n,a,t)}function dD(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(b,I,L,N){var z=I&&I.prototype instanceof l?I:l,$=Object.create(z.prototype);return Mo($,"_invoke",function(ne,ue,Z){var Y,X,ve,xe=0,ke=Z||[],rn=!1,wn={p:0,n:0,v:e,a:dn,f:dn.bind(e,4),d:function(yn,Kn){return Y=yn,X=0,ve=e,wn.n=Kn,i}};function dn(mn,yn){for(X=mn,ve=yn,n=0;!rn&&xe&&!Kn&&n3?(Kn=Pa===yn)&&(ve=zn[(X=zn[4])?5:(X=3,3)],zn[4]=zn[5]=e):zn[0]<=Wn&&((Kn=mn<2&&Wnyn||yn>Pa)&&(zn[4]=mn,zn[5]=yn,wn.n=Pa,X=0))}if(Kn||mn>1)return i;throw rn=!0,yn}return function(mn,yn,Kn){if(xe>1)throw TypeError("Generator is already running");for(rn&&yn===1&&dn(yn,Kn),X=yn,ve=Kn;(n=X<2?e:ve)||!rn;){Y||(X?X<3?(X>1&&(wn.n=-1),dn(X,ve)):wn.n=ve:wn.v=ve);try{if(xe=2,Y){if(X||(mn="next"),n=Y[mn]){if(!(n=n.call(Y,ve)))throw TypeError("iterator result is not an object");if(!n.done)return n;ve=n.value,X<2&&(X=0)}else X===1&&(n=Y.return)&&n.call(Y),X<2&&(ve=TypeError("The iterator does not provide a '"+mn+"' method"),X=1);Y=e}else if((n=(rn=wn.n<0)?ve:ne.call(ue,wn))!==i)break}catch(zn){Y=e,X=1,ve=zn}finally{xe=1}}return{value:n,done:rn}}}(b,L,N),!0),$}var i={};function l(){}function s(){}function m(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(Mo(n={},t,function(){return this}),n),g=m.prototype=l.prototype=Object.create(p);function E(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,m):(b.__proto__=m,Mo(b,r,"GeneratorFunction")),b.prototype=Object.create(g),b}return s.prototype=m,Mo(g,"constructor",m),Mo(m,"constructor",s),s.displayName="GeneratorFunction",Mo(m,r,"GeneratorFunction"),Mo(g),Mo(g,r,"Generator"),Mo(g,t,function(){return this}),Mo(g,"toString",function(){return"[object Generator]"}),(dD=function(){return{w:u,m:E}})()}function ld(e,n){function a(r,u,i,l){try{var s=e[r](u),m=s.value;return m instanceof p1?n.resolve(m.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(m).then(function(p){s.value=p,i(s)},function(p){return a("throw",p,i,l)})}catch(p){l(p)}}var t;this.next||(Mo(ld.prototype),Mo(ld.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Mo(this,"_invoke",function(r,u,i){function l(){return new n(function(s,m){a(r,i,s,m)})}return t=t?t.then(l,l):l()},!0)}function d1(e,n,a,t,r){return new ld(dD().w(e,n,a,t),r||Promise)}function Uq(e,n,a,t,r){var u=d1(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function kq(e){var n=Object(e),a=[];for(var t in n)a.unshift(t);return function r(){for(;a.length;)if((t=a.pop())in n)return r.value=t,r.done=!1,r;return r.done=!0,r}}function UM(e){if(e!=null){var n=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(n)return n.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}throw new TypeError(wr(e)+" is not iterable")}function mD(){"use strict";var e=dD(),n=e.m(mD),a=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function t(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===a||(l.displayName||l.name)==="GeneratorFunction")}var r={throw:1,return:2,break:3,continue:3};function u(i){var l,s;return function(m){l||(l={stop:function(){return s(m.a,2)},catch:function(){return m.v},abrupt:function(g,E){return s(m.a,r[g],E)},delegateYield:function(g,E,b){return l.resultName=E,s(m.d,UM(g),b)},finish:function(g){return s(m.f,g)}},s=function(g,E,b){m.p=l.prev,m.n=l.next;try{return g(E,b)}finally{l.next=m.n}}),l.resultName&&(l[l.resultName]=m.v,l.resultName=void 0),l.sent=m.v,l.next=m.n;try{return i.call(this,l)}finally{m.p=l.prev,m.n=l.next}}}return(mD=function(){return{wrap:function(s,m,p,g){return e.w(u(s),m,p,g&&g.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,m){return new p1(s,m)},AsyncIterator:ld,async:function(s,m,p,g,E){return(t(m)?d1:Uq)(u(s),m,p,g,E)},keys:kq,values:UM}})()}function Bq(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(m){return void a(m)}l.done?n(s):Promise.resolve(s).then(t,r)}function Hq(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){Bq(u,t,r,i,l,"next",s)}function l(s){Bq(u,t,r,i,l,"throw",s)}i(void 0)})}}Va();var Jq=["measure","alignPre","align",null,"motion"],qq=function(e,n){var a=Ys(null),t=Wt(a,2),r=t[0],u=t[1],i=st();function l(p){u(p,!0)}function s(){Oi.cancel(i.current)}function m(p){s(),i.current=Oi(function(){l(function(g){switch(r){case"align":return"motion";case"motion":return"stable";default:}return g}),p==null||p()})}return Ot(function(){l("measure")},[e]),Ot(function(){switch(r){case"measure":n();break;default:}r&&(i.current=Oi(Hq(mD().mark(function p(){var g,E;return mD().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:g=Jq.indexOf(r),E=Jq[g+1],E&&g!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Ot(function(){return function(){s()}},[]),[r,m]};Va();var Wq=function(e){var n=ql({width:0,height:0}),a=Wt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=ah(function(){var l={};if(e){var s=t.width,m=t.height;e.indexOf("height")!==-1&&m?l.height=m:e.indexOf("minHeight")!==-1&&m&&(l.minHeight=m),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var zq=Ci(function(e,n){var a=e.visible,t=e.prefixCls,r=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,m=e.destroyPopupOnHide,p=e.forceRender,g=e.align,E=e.point,b=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,N=e.onMouseEnter,z=e.onMouseLeave,$=e.onMouseDown,ne=e.onTouchStart,ue=e.onClick,Z=st(),Y=st(),X=ql(),ve=Wt(X,2),xe=ve[0],ke=ve[1],rn=Wq(s),wn=Wt(rn,2),dn=wn[0],mn=wn[1];function yn(){s&&mn(b())}var Kn=qq(a,yn),zn=Wt(Kn,2),Wn=zn[0],Pa=zn[1],Ga=ql(0),sa=Wt(Ga,2),At=sa[0],qe=sa[1],pa=st();OM(function(){Wn==="alignPre"&&qe(0)},[Wn]);function Qa(){return E||b}function Tn(){var vn;(vn=Z.current)===null||vn===void 0||vn.forceAlign()}function Dn(vn,oa){var St=I(oa);xe!==St&&ke(St),qe(function(Da){return Da+1}),Wn==="align"&&(L==null||L(vn,oa))}OM(function(){Wn==="align"&&(At<2?Tn():Pa(function(){var vn;(vn=pa.current)===null||vn===void 0||vn.call(pa)}))},[At]);var We=Ea({},Yw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var oa=We[vn];We[vn]=function(St,Da){return Pa(),oa==null?void 0:oa(St,Da)}});function ea(){return new Promise(function(vn){pa.current=vn})}Ot(function(){!We.motionName&&Wn==="motion"&&Pa()},[We.motionName,Wn]),Ls(n,function(){return{forceAlign:Tn,getElement:function(){return Y.current}}});var va=Ea(Ea({},dn),{},{zIndex:l,opacity:Wn==="motion"||Wn==="stable"||!a?void 0:0,pointerEvents:!a&&Wn!=="stable"?"none":void 0},u),Ma=!0;(g==null?void 0:g.points)&&(Wn==="align"||Wn==="stable")&&(Ma=!1);var dt=i;return m_.count(i)>1&&(dt=pt("div",{className:"".concat(t,"-content")},i)),pt(Xp,Xo({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},We,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:m,forceRender:p}),function(vn,oa){var St=vn.className,Da=vn.style,it=(0,$q.default)(t,r,xe,St);return pt(Oq,{target:Qa(),key:"popup",ref:Z,monitorWindowResize:!0,disabled:Ma,align:g,onAlign:Dn},pt("div",{ref:oa,className:it,onMouseEnter:N,onMouseLeave:z,onMouseDownCapture:$,onTouchStartCapture:ne,onClick:ue,style:Ea(Ea({},Da),va)},dt))})});zq.displayName="PopupInner";var Vq=zq;Va();var Qq=$u(z_()),Kq=Ci(function(e,n){var a=e.prefixCls,t=e.visible,r=e.zIndex,u=e.children,i=e.mobile;i=i===void 0?{}:i;var l=i.popupClassName,s=i.popupStyle,m=i.popupMotion,p=m===void 0?{}:m,g=i.popupRender,E=e.onClick,b=st();Ls(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var I=Ea({zIndex:r},s),L=u;return m_.count(u)>1&&(L=pt("div",{className:"".concat(a,"-content")},u)),g&&(L=g(L)),pt(Xp,Xo({visible:t,ref:b,removeOnLeave:!0},p),function(N,z){var $=N.className,ne=N.style,ue=(0,Qq.default)(a,l,$);return pt("div",{ref:z,className:ue,onClick:E,style:Ea(Ea({},ne),I)},L)})});Kq.displayName="MobilePopupInner";var Yq=Kq;var sIe=["visible","mobile"],Xq=Ci(function(e,n){var a=e.visible,t=e.mobile,r=W_(e,sIe),u=ql(a),i=Wt(u,2),l=i[0],s=i[1],m=ql(!1),p=Wt(m,2),g=p[0],E=p[1],b=Ea(Ea({},r),{},{visible:l});Ot(function(){s(a),a&&t&&E(sk())},[a,t]);var I=g?pt(Yq,Xo({},b,{mobile:t,ref:n})):pt(Vq,Xo({},b,{ref:n}));return pt("div",null,pt(oM,b),I)});Xq.displayName="Popup";var Zq=Xq;Va();var vIe=ES(null),kM=vIe;function BM(){}function fIe(){return""}function _Ie(e){return e?e.ownerDocument:window.document}var pIe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function dIe(e){var n=function(a){Kp(r,a);var t=Yp(r);function r(u){var i;Vp(this,r),i=t.call(this,u),i.popupRef=Dy(),i.triggerRef=Dy(),i.portalContainer=void 0,i.attachId=void 0,i.clickOutsideHandler=void 0,i.touchOutsideHandler=void 0,i.contextMenuOutsideHandler1=void 0,i.contextMenuOutsideHandler2=void 0,i.mouseDownTimeout=void 0,i.focusTime=void 0,i.preClickTime=void 0,i.preTouchTime=void 0,i.delayTimer=void 0,i.hasPopupMouseDown=void 0,i.onMouseEnter=function(s){var m=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,m,m?null:s)},i.onMouseMove=function(s){i.fireEvents("onMouseMove",s),i.setPoint(s)},i.onMouseLeave=function(s){i.fireEvents("onMouseLeave",s),i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onPopupMouseEnter=function(){i.clearDelayTimer()},i.onPopupMouseLeave=function(s){var m;s.relatedTarget&&!s.relatedTarget.setTimeout&&$_((m=i.popupRef.current)===null||m===void 0?void 0:m.getElement(),s.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(s){i.fireEvents("onFocus",s),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(s){i.fireEvents("onMouseDown",s),i.preClickTime=Date.now()},i.onTouchStart=function(s){i.fireEvents("onTouchStart",s),i.preTouchTime=Date.now()},i.onBlur=function(s){i.fireEvents("onBlur",s),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(s){s.preventDefault(),i.fireEvents("onContextMenu",s),i.setPopupVisible(!0,s)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(s){if(i.fireEvents("onClick",s),i.focusTime){var m;if(i.preClickTime&&i.preTouchTime?m=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?m=i.preClickTime:i.preTouchTime&&(m=i.preTouchTime),Math.abs(m-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&s&&s.preventDefault&&s.preventDefault();var p=!i.state.popupVisible;(i.isClickToHide()&&!p||p&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,s)},i.onPopupMouseDown=function(){if(i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout(function(){i.hasPopupMouseDown=!1},0),i.context){var s;(s=i.context).onPopupMouseDown.apply(s,arguments)}},i.onDocumentClick=function(s){if(!(i.props.mask&&!i.props.maskClosable)){var m=s.target,p=i.getRootDomNode(),g=i.getPopupDomNode();(!$_(p,m)||i.isContextMenuOnly())&&!$_(g,m)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var m=Yh(i.triggerRef.current);if(m)return m}catch{}return Fi.findDOMNode(Iw(i))},i.getPopupClassNameFromAlign=function(s){var m=[],p=i.props,g=p.popupPlacement,E=p.builtinPlacements,b=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return g&&E&&m.push(ok(E,b,s,I)),L&&m.push(L(s)),m.join(" ")},i.getComponent=function(){var s=i.props,m=s.prefixCls,p=s.destroyPopupOnHide,g=s.popupClassName,E=s.onPopupAlign,b=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,N=s.popupStyle,z=s.mask,$=s.maskAnimation,ne=s.maskTransitionName,ue=s.maskMotion,Z=s.zIndex,Y=s.popup,X=s.stretch,ve=s.alignPoint,xe=s.mobile,ke=s.forceRender,rn=s.onPopupClick,wn=i.state,dn=wn.popupVisible,mn=wn.point,yn=i.getPopupAlign(),Kn={};return i.isMouseEnterToShow()&&(Kn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Kn.onMouseLeave=i.onPopupMouseLeave),Kn.onMouseDown=i.onPopupMouseDown,Kn.onTouchStart=i.onPopupMouseDown,pt(Zq,Xo({prefixCls:m,destroyPopupOnHide:p,visible:dn,point:ve&&mn,className:g,align:yn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},Kn,{stretch:X,getRootDomNode:i.getRootDomNode,style:N,mask:z,zIndex:Z,transitionName:L,maskAnimation:$,maskTransitionName:ne,maskMotion:ue,ref:i.popupRef,motion:b,mobile:xe,forceRender:ke,onClick:rn}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){Oi.cancel(i.attachId);var m=i.props,p=m.getPopupContainer,g=m.getDocument,E=i.getRootDomNode(),b;p?(E||p.length===0)&&(b=p(E)):b=g(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Oi(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,m=s(i.getRootDomNode()).createElement("div");m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.width="100%",i.portalContainer=m}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var m=i.props.alignPoint;!m||!s||i.setState({point:{pageX:s.pageX,pageY:s.pageY}})},i.handlePortalUpdate=function(){i.state.prevPopupVisible!==i.state.popupVisible&&i.props.afterPopupVisibleChange(i.state.popupVisible)},i.triggerContextValue={onPopupMouseDown:i.onPopupMouseDown};var l;return"popupVisible"in u?l=!!u.popupVisible:l=!!u.defaultPopupVisible,i.state={prevPopupVisible:l,popupVisible:l},pIe.forEach(function(s){i["fire".concat(s)]=function(m){i.fireEvents(s,m)}}),i}return Qp(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var i=this.props,l=this.state;if(l.popupVisible){var s;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(s=i.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Df(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Df(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Df(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Df(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Oi.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var i;return((i=this.popupRef.current)===null||i===void 0?void 0:i.getElement())||null}},{key:"getPopupAlign",value:function(){var i=this.props,l=i.popupPlacement,s=i.popupAlign,m=i.builtinPlacements;return l&&m?rk(m,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,m=this.state.popupVisible;this.clearDelayTimer(),m!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:m}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var m=this,p=l*1e3;if(this.clearDelayTimer(),p){var g=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){m.setPopupVisible(i,g),m.clearDelayTimer()},p)}else this.setPopupVisible(i,s)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(i){var l=this.props.children.props,s=this.props;return l[i]&&s[i]?this["fire".concat(i)]:l[i]||s[i]}},{key:"isClickToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var i=this.props.action;return i==="contextMenu"||i.length===1&&i[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("contextMenu")!==-1||s.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("hover")!==-1||s.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("hover")!==-1||s.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("focus")!==-1||s.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("focus")!==-1||s.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var i;(i=this.popupRef.current)===null||i===void 0||i.forceAlign()}}},{key:"fireEvents",value:function(i,l){var s=this.props.children.props[i];s&&s(l);var m=this.props[i];m&&m(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,m=l.forceRender,p=l.alignPoint,g=l.className,E=l.autoDestroy,b=m_.only(s),I={key:"trigger"};this.isContextMenuToShow()?I.onContextMenu=this.onContextMenu:I.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(I.onClick=this.onClick,I.onMouseDown=this.onMouseDown,I.onTouchStart=this.onTouchStart):(I.onClick=this.createTwoChains("onClick"),I.onMouseDown=this.createTwoChains("onMouseDown"),I.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(I.onMouseEnter=this.onMouseEnter,p&&(I.onMouseMove=this.onMouseMove)):I.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?I.onMouseLeave=this.onMouseLeave:I.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(I.onFocus=this.onFocus,I.onBlur=this.onBlur):(I.onFocus=this.createTwoChains("onFocus"),I.onBlur=this.createTwoChains("onBlur"));var L=(0,eW.default)(b&&b.props&&b.props.className,g);L&&(I.className=L);var N=Ea({},I);Ow(b)&&(N.ref=Nw(this.triggerRef,b.ref));var z=Zm(b,N),$;return(i||this.popupRef.current||m)&&($=pt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&($=null),pt(kM.Provider,{value:this.triggerContextValue},z,$)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,m={};return s!==void 0&&l.popupVisible!==s&&(m.popupVisible=s,m.prevPopupVisible=l.popupVisible),m}}]),r}(h_);return n.contextType=kM,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:fIe,getDocument:_Ie,onPopupVisibleChange:BM,afterPopupVisibleChange:BM,onPopupAlign:BM,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 nW=dIe(tk);var Tl={adjustX:1,adjustY:1},Sl=[0,0],aW={left:{points:["cr","cl"],overflow:Tl,offset:[-4,0],targetOffset:Sl},right:{points:["cl","cr"],overflow:Tl,offset:[4,0],targetOffset:Sl},top:{points:["bc","tc"],overflow:Tl,offset:[0,-4],targetOffset:Sl},bottom:{points:["tc","bc"],overflow:Tl,offset:[0,4],targetOffset:Sl},topLeft:{points:["bl","tl"],overflow:Tl,offset:[0,-4],targetOffset:Sl},leftTop:{points:["tr","tl"],overflow:Tl,offset:[-4,0],targetOffset:Sl},topRight:{points:["br","tr"],overflow:Tl,offset:[0,-4],targetOffset:Sl},rightTop:{points:["tl","tr"],overflow:Tl,offset:[4,0],targetOffset:Sl},bottomRight:{points:["tr","br"],overflow:Tl,offset:[0,4],targetOffset:Sl},rightBottom:{points:["bl","br"],overflow:Tl,offset:[4,0],targetOffset:Sl},bottomLeft:{points:["tl","bl"],overflow:Tl,offset:[0,4],targetOffset:Sl},leftBottom:{points:["br","bl"],overflow:Tl,offset:[-4,0],targetOffset:Sl}};Va();var tW=$u(z_());function m1(e){var n=e.showArrow,a=e.arrowContent,t=e.children,r=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return pt("div",{className:(0,tW.default)("".concat(r,"-content"),l),style:s},n!==!1&&pt("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),pt("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var mIe=function(n,a){var t=n.overlayClassName,r=n.trigger,u=r===void 0?["hover"]:r,i=n.mouseEnterDelay,l=i===void 0?0:i,s=n.mouseLeaveDelay,m=s===void 0?.1:s,p=n.overlayStyle,g=n.prefixCls,E=g===void 0?"rc-tooltip":g,b=n.children,I=n.onVisibleChange,L=n.afterVisibleChange,N=n.transitionName,z=n.animation,$=n.motion,ne=n.placement,ue=ne===void 0?"right":ne,Z=n.align,Y=Z===void 0?{}:Z,X=n.destroyTooltipOnHide,ve=X===void 0?!1:X,xe=n.defaultVisible,ke=n.getTooltipContainer,rn=n.overlayInnerStyle,wn=n.arrowContent,dn=n.overlay,mn=n.id,yn=n.showArrow,Kn=W_(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),zn=st(null);Ls(a,function(){return zn.current});var Wn=Ea({},Kn);"visible"in n&&(Wn.popupVisible=n.visible);var Pa=function(){return pt(m1,{showArrow:yn,arrowContent:wn,key:"content",prefixCls:E,id:mn,overlayInnerStyle:rn},dn)},Ga=!1,sa=!1;if(typeof ve=="boolean")Ga=ve;else if(ve&&wr(ve)==="object"){var At=ve.keepParent;Ga=At===!0,sa=At===!1}return pt(nW,Xo({popupClassName:t,prefixCls:E,popup:Pa,action:u,builtinPlacements:aW,popupPlacement:ue,ref:zn,popupAlign:Y,getPopupContainer:ke,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:N,popupAnimation:z,popupMotion:$,defaultPopupVisible:xe,destroyPopupOnHide:Ga,autoDestroy:sa,mouseLeaveDelay:m,popupStyle:p,mouseEnterDelay:l},Wn),b)},rW=Ci(mIe);var oW=rW;var iW=e=>Ua.createElement(oW,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?()=>document.querySelector(e.tooltipContainerSelector)||document.body:void 0}));if(typeof window!="undefined"&&typeof global=="undefined")try{Promise.resolve().then(()=>$u(uW())).then(e=>{let n=e.default,a=document.createElement("style");a.type="text/css",a.appendChild(document.createTextNode(n)),document.head.appendChild(a)})}catch(e){window.Sentry&&window.Sentry.captureException(e)}var gIe=$l();var lW="click";var h1="top",cd=function(e){var n=gIe(e);return function(){return function(){return n(iW)}}};var cW="right";var sW=e=>()=>e.preventDefault&&e.preventDefault();var HM=function(){return sW};var RIe=Aa();var JM=ee(Ve),qM=gt(RIe(H({reflectSymbol:function(){return"value"}})(he)(tn))),WM=q(la);var D1=function(e){return Ue("")(JM(qM(Fr(e.target)))(function(n){return WM(n.value)}))},$M=function(e){return Ue("")(JM(qM(Fr(e.target)))(function(n){return WM(n.value)}))},Xs=function(e){return Ue("")(JM(qM(Fr(e.target)))(function(n){return WM(n.value)}))};var vW="/network/connections";var fW=15;var yIe=cd(Qe)()(),bIe=$a(be),wIe=function(){return"You\u2019ve hit the "+(te(nn)(fW)+`-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. `)}(),EIe=Io(Qe)("text-decoration-underline")(lr(re)()()("text-dark")(an)({href:vW})("Manage my connections")),_W=function(e){return function(n){return yIe({placement:e,trigger:lW,overlay:bIe("")([Xe(wIe),EIe]),overlayStyle:vt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var pW=ee(Ve),sd=function(e){var n=pW(e.guestPresenter)(function(a){if(a instanceof Fh)return new S(a.value0);if(a instanceof Gh)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return pW(n)(function(a){return new S({name:a.school.name,id:a.school.id})})};var IIe=function(){function e(){}return e.value=new e,e}(),TIe=function(){function e(){}return e.value=new e,e}(),zM=function(){function e(){}return e.value=new e,e}(),SIe=function(){function e(){}return e.value=new e,e}(),CIe=function(){function e(){}return e.value=new e,e}(),FIe=function(){function e(){}return e.value=new e,e}(),dW=function(e){if(e instanceof IIe)return"account_settings_page";if(e instanceof TIe)return"preference_survey";if(e instanceof zM)return"livestream_registration";if(e instanceof SIe)return"chancing_wizard_network_step";if(e instanceof CIe)return"main_profile_page";if(e instanceof FIe)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 LIe=Qc(zc),VM=rc(LIe),QM=ee(ra);var xIe=lo(),mW=_e(oe);var hW=VM("profile_visibility_path")(function(e){return function(n){return QM(e({visibility:{publish_scope:xh(n)}}))(ir)}}),DW=function(){return VM("profile_network_settings_path")(function(e){return function(n){return function(a){return QM(e({network_settings:{publish_scope:xh(a.publishScope),publish_context:dW(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Ia(mW(gl(a.livestreamConference))(function(t){return{school_name:Ia(mW(sd(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(ir)}(xIe(n))}})},gW=VM("profile_name_path")(function(e){return function(n){return QM(e({name:n}))(ir)}});var PIe=uc(),jIe=eo(re),NIe=Yt(re),KM=Kt(re),YM=_l(re),yf=Ce(be),vd=$n(re)()(),XM=Xr(Nu),OIe=en(Ke),ZM=Yn(ma),Y_=Ce(Qe),RW=vi()(),UIe=Xv(re),kIe=gr(Be)(It),yW=Zr()(),eA=Yn(li),BIe=yp()(),bW=Ce(re),HIe=jy(be),nA=By(re),JIe=$a(re),qIe=cd(Qe)()(),WIe=Kt(be),$Ie=lr(re)()(),zIe=tt(re),X_=q(Rn),wW=OIe(qn),VIe=hw(),hD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EW=function(){function e(){}return e.value=new e,e}(),IW=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}(),SW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DD=function(){function e(){}return e.value=new e,e}(),aA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FW=function(e){return function(n){var a=function(m){return PIe({body:m,title:jIe("my-0")(function(){return e.stage instanceof nb?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new bn(DD.value)),size:qh.value})},t=p8(e.context),r=Se([NIe("mt-3")("Review your message before you send it"),KM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),YM("mt-4")("Your message"),Lp(e.message),yf("d-flex mt-4 justify-content-start")([vd("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(an)({onClick:XM(function(){return n(new bn(new aA({introMessage:e.message})))(),n(new Me(new hD(EC.value)))()})})("Send"),vd("btn btn-lg btn-outline-primary ml-3 text-nowrap")(an)({onClick:ZM(n)(new Me(new hD(yh.value)))})("No, I need to edit something")])]),u=Se([yf("text-center")([Y_("")(RW("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),UIe("mt-4")("Connection request sent!"),KM("mx-md-4")(kIe(["You\u2019ve successfully demonstrated your interest to ",e.schoolName,". ","This counselor isn\u2019t part of the platform yet but we\u2019ve forwarded your message to them. ","You\u2019ll get an email notification when they respond."])),vd("btn btn-lg btn-outline-secondary mt-4")(an)({onClick:ZM(n)(new bn(DD.value))})("Close")])]),i=vd("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(an)({onClick:ZM(n)(new bn(DD.value))})("Cancel"),l=function(){var m=RC(e.message)&&function(){if(e.profile.fullName instanceof S)return!0;if(e.profile.fullName instanceof G)return!ml(e.firstName)&&!ml(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 240, column 15 - line 244, 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 G)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 233, column 13 - line 236, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Se([ga(Mt(e.profile.fullName))(Se([YM("mt-md-4")("Your preferred name"),yf("form-row mx-1")([yW("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:eA(n)(function(g){return Me.create(SW.create(Xs(g)))}),placeholder:"First name"}),yW("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:eA(n)(function(g){return Me.create(CW.create(Xs(g)))}),placeholder:"Last name"})])])),YM("mt-md-4")("Your message"),BIe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:eA(n)(function(g){return Me.create(TW.create(D1(g)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),Y_("mt-2")(l8(e.message)),bW("mt-3 mt-md-4 small")("The ideal connection message should include:"),HIe("small")([nA("")("Your name, where you\u2019re from, and a bit about who you are"),nA("")("What you\u2019re interested in studying along with one or two insightful questions"),nA("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),yf("d-flex mt-4 justify-content-start")([_W(h1)(Y_("")(vd("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(an)({onClick:XM(function(){return function(){if(e.profile.fullName instanceof S)return de;if(e.profile.fullName instanceof G)return n(new Me(new IW({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 216, column 23 - line 220, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Me(new hD(wC.value)))()}),disabled:!m||p,style:vt({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=yf("mx-md-7")([Y_("border border-success rounded p-4 my-4")(yf("row align-items-center")([Y_("col-12 col-md-auto text-center text-md-left")(RW("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),Y_("col text-center text-md-left")(JIe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),yf("d-flex flex-nowrap align-items-center")([bW("mr-4")("Publish your profile to join the CollegeVine Network"),qIe({placement:cW,overlay:WIe("")([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 `),$Ie("")(an)({href:I9})("your profile"),Xe(".")]),overlayStyle:vt({width:"15rem"})})(zIe("cursor-default text-secondary fe fe-info large")(""))]),KM("text-secondary small d-none d-md-block mt-4")("Joining the CollegeVine Network won\u2019t result in spam from colleges you don\u2019t want to hear from."),yf("d-flex mt-4 justify-content-start justify-content-md-center")([vd("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(an)({onClick:XM(function(){return n(new Me(EW.value))(),n(new Me(new hD(yh.value)))()})})("Publish profile"),i])]);return Y_("t--network-sem-user-modal")(function(){if(e.stage instanceof nb)return a(s);if(e.stage instanceof yh)return a(l);if(e.stage instanceof wC)return a(r);if(e.stage instanceof EC)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 96, column 5 - line 100, column 38): "+[e.stage.constructor.name])}())}},GW=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof hD)return X_({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 EW)return wW(Za(hW(Pi.value)))(function(){return X_({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:Pi.value}})});if(n.value0 instanceof IW)return wW(Za(gW(n.value0.value0)))(function(){return X_({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(NG(n.value0.value0))}})});if(n.value0 instanceof TW)return X_({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 SW)return X_({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 CW)return X_({context:e.context,firstName:e.firstName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,lastName:n.value0.value0});throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 75, column 31 - line 89, column 39): "+[n.value0.constructor.name])}if(n instanceof bn)return X_(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])}},QIe=function(e){var n=j9(e);return n?yh.value:nb.value},MW=function(e){return{firstName:"",lastName:"",message:"",profile:VIe(e.profile),stage:QIe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var g1=De(er(xt)),KIe=lo(),YIe=Ce(Qe),XIe=vi()(),tA=$a(re),rA=Xt(Qe)()(),ZIe=tt(re),eTe=Yc(),nTe=U_(Ke)(),aTe=gn(Le),tTe=$n(be)()(),rTe=Xr(Ay),oTe=HM(),uTe=Ta(vr),fd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AW=function(){function e(){}return e.value=new e,e}(),iTe=function(){function e(){}return e.value=new e,e}(),lTe={eq:function(e){return function(n){return e instanceof fd&&n instanceof fd?e.value0.url===n.value0.url:e instanceof gD&&n instanceof gD?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&g1(e.value0.textColorClass)(n.value0.textColorClass):e instanceof oA&&n instanceof oA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof uA&&n instanceof uA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},cTe=Jp(lTe),LW=function(){return function(e){var n=KIe(e),a=function(){var r=Ba(n.shape)(AW.value);if(r instanceof AW)return"rounded-circle";if(r instanceof iTe)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 YIe("avatar "+(A9(Ba(n.size)(ww.value))+(" "+Ba(n.className)(""))))(function(){if(r instanceof fd)return XIe("avatar-img img-fluid "+(a+(" "+Ba(n.borderClassName)(""))))({src:r.value0.url,alt:Ba(n.ariaLabel)("Avatar image")});if(r instanceof gD)return tA("avatar-title font-weight-bold fw-bold "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+(Ue("")(r.value0.textColorClass)+(" "+Ba(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof oA)return rA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)("Avatar icon")})(ZIe(r.value0.iconClass)(""));if(r instanceof uA)return rA("avatar-title "+(a+(" "+(Ue("")(r.value0.backgroundColorClass)+(" "+Ba(n.borderClassName)(""))))))({"aria-label":Ba(n.ariaLabel)("Avatar icon")})(tA("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 Hp(eTe(El(n.source))(function(r){return nTe(cTe(n.source)(function(u){return aTe(r.value1(u))}))(function(){return $s(Se([t(r.value0),function(){return r.value0 instanceof fd?ha(gl(n.hideAvatar))(function(u){return rA("hq-only-menu-item")({style:vt({marginTop:"-50px",marginLeft:"200px"})})(tTe("btn btn-sm btn-warning mb-4 t--hide-avatar")(an)({onClick:rTe(function(i){return function(){return oTe(i)(),uTe(r.value1)(u)()}})})([tA("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Hide")]))}):ta}()]))})}))}};var sTe=LW();var xW=function(e){return function(n){return sTe({source:function(){if(e.avatarUrl instanceof S)return new fd({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new gD({initials:e.initials,backgroundColorClass:G.value,textColorClass:G.value});throw new Error("Failed pattern match at Sem.Utils (line 16, column 15 - line 24, column 14): "+[e.avatarUrl.constructor.name])}(),size:n})}};var iA=U(oe),vTe=Ye(Ax(kf));var PW=function(e){var n=function(a){return Ue("")(iA(Tu)(Om(0)(a)))};return Nc(function(){var a=Qo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":Ue("?")(vTe(iA(n)(o_(a)))(iA(n)(H0(a))))}())},jW=function(e){return hh(e.firstName+(" "+e.lastName))};var lA=eo(re),fTe=lr(re)()(),_Te=lr(be)()(),NW=tt(re),pTe=$n(be)()(),dTe=Gi($v(sl)),mTe=_e(oe),hTe=ee(Ve),cA=Ce(re),R1=Ce(be),OW=Ce(Qe),DTe=Ep(re),UW=zl()(),gTe=_l(re),RTe=Kt(re),_d=q(Rn),kW=en(Ke),yTe=kW(qn),bTe=wa(Le),wTe=kW(ra),ETe=q(Qn),ITe=ut(Gr(Ca)),BW=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}(),HW=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}(),qW=function(){var e=function(a){return function(t){return function(r){var u=lA("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=lA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,fTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(an)({href:WG(new zp(t.semUser.id))})("View Message")],s=jW(t.semUser),m=PW(s),p=lA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),g=[p,_Te("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(an)({href:WG(new zp(t.semUser.id))})([NW("fe fe-message-square mr-2 large")(""),Xe("Send a message to "+t.semUser.firstName)])],E=function(L){return pTe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(an)({onClick:dTe(r)(mTe(hTe(a.currentUser)(function(N){return N.profile}))(HW.create)),disabled:L.isDisabled})([NW("fe fe-message-square mr-2 large")(""),Xe("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),cA("mt-4 text-secondary small")("Invitation pending")];return R1("t--livestream-details-guest-presenter-sem-user mb-4")([ha(a.currentUser)(function(L){return ga(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(OW("card")(R1("card-body")(function(){if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof rf)return g;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof Bs||t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof Bs)return I;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof ks)return l;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof ks||t.semUser.connection instanceof G)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])}())))}),DTe("text-uppercase text-secondary")("Your guest presenter"),R1("row align-items-center mt-4")([OW("col-auto")(xW(UW(t.semUser)({initials:m}))(bw.value)),R1("col")([gTe("mb-1")(s),cA("text-secondary small")(t.semUser.school.name),cA("text-secondary small")(t.semUser.title)]),ha(t.semUser.bio)(function(L){return RTe("mt-4 mb-2 ml-2")(L)})]),ha(t.modal)(function(L){return FW(L.value0)(function(N){return r(RD.create(N))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof RD&&r.value0 instanceof bn){if(r.value0.value0 instanceof DD)return _d({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof aA)return yTe(bTe(wTe(H9(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return ETe(new JW({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return _d(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 55 - line 55, column 19): "+[r.value0.value0.constructor.name])}if(t.modal instanceof S&&r instanceof RD&&r.value0 instanceof Me)return ITe(RD.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new BW(u))}})(GW(t.modal.value0.value0)(new Me(r.value0.value0)));if(r instanceof RD&&r.value0 instanceof Me)return _d(t);if(r instanceof HW)return _d({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new BW(MW({schoolName:a.semUser.school.name,context:bC.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof JW)return _d({currentUser:t.currentUser,modal:t.modal,vineBelowConnectionLimit:t.vineBelowConnectionLimit,semUser:{avatarUrl:t.semUser.avatarUrl,bio:t.semUser.bio,firstName:t.semUser.firstName,id:t.semUser.id,lastName:t.semUser.lastName,school:t.semUser.school,title:t.semUser.title,unreadMessageCountFromSemUser:t.semUser.unreadMessageCountFromSemUser,connection:new S({initiator:Bs.value,introMessage:r.value0.introMessage,status:Yl.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 47, column 5 - line 47, column 67): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return js("Livestream Guest Presenter SEM user")(function(a){return{init:_d(UW(a)({modal:G.value})),view:e(a),update:n(a)}})}();var TTe=$a(be),STe=tt(re),yD=Ce(be),WW=Ep(re),CTe=U(ze),sA=Ce(Qe),FTe=fl()(),GTe=eo(re),$W=function(e){return function(n){var a=function(i){return TTe("badge badge-light bg-light text-dark mr-3")([STe("fe fe-tag mr-2")(""),Xe(i.name)])},t=function(i){return function(l){return yD("mb-3")([WW("text-secondary text-uppercase mb-2")(i),l])}},r=yD("mt-4")([ha(fe(n.entity.shortEducation))(function(i){return t("Education")(Xe(i))}),t("Bio")(Lp(n.entity.bio)),nF(Xu(n.entity.tags))(t("Specialties")(Se(CTe(a)(n.entity.tags))))]),u=yD("row")([ha(fe(n.entity.imageUrl))(function(i){return sA("p-0 m-0")(sA("col-auto my-auto")(sA("avatar avatar-md")(FTe("avatar-img rounded-circle")({src:i}))))}),yD("col-auto my-auto")([WW("text-uppercase text-secondary mb-2")("Advisor"),GTe("m-0")(n.entity.name)])]);return yD("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var bD=function(e){return function(n){return function(a){return function(t){if(n instanceof Fh)return qW({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Gh)return $W(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 MTe=lr(be)()(),ATe=tt(re),pd=Ce(re),ki=Ce(Qe),Bi=Ce(be),zW=eo(re),VW=fl()(),QW=_e(ze),LTe=$a(re),KW=_e(oe),xTe=Kt(be),YW=Io(re),XW=lr(re)()(),PTe=te(nn),wD=U(oe),jTe=wp(be)()(),NTe=te(tc),ED=function(e){var n=function(a){return function(t){return MTe("mr-3")(an)({href:t,target:"_blank"})([Xe(a),ATe("fe fe-external-link ml-1")("")])}};return Se([pd("text-uppercase text-muted small mb-2")("School information"),ki("card shadow-none")(Bi("card-body")([zW("mb-1")(e.name),pd("text-uppercase small text-secondary")(e.cityState),Bi("mt-3 d-none d-md-block")([n("Stats")(yw(q_.value)(e.slug)),n("Cost")(yw(Qh.value)(e.slug)),n("Map")(yw(q_.value)(e.slug))]),Bi("mt-3 d-md-none")([n("Stats")(PG(q_.value)(e.slug)),n("Cost")(PG(Qh.value)(e.slug))])]))])},OTe=function(e){var n=function(i){return VW("avatar-img rounded-circle")({src:i})},a=hr(" ")(QW(Qo(" ")(e.fullName))(ci(1))),t=LTe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return Ue("")(KW(i)(function(l){return" '"+l}))},u=function(i){return function(l){return xTe("")([YW("")(i+": "),Xe(l)])}};return Se([pd("text-uppercase text-muted small mb-2")("Your host"),Bi("row align-items-center mb-4 pr-4")([ki("col-auto")(ki("avatar")(In(t)(n)(e.pictureUrl))),ki("col")(Bi("row align-items-center justify-content-between")([pd("col-12 col-md-auto x-large")(e.fullName),ki("col-12 col-md-auto")(ha(e.allStreamsUrl)(function(i){return XW("t--host-streams")(an)({href:i})("See all "+(PTe(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Se(Jo([wD(u("Undergrad College"))(KW(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),wD(u("Major"))(e.undergrad.major),wD(u("Graduate College"))(e.gradCollege),wD(u("Work Experience"))(e.workExperience),wD(u("My Admissions Story"))(e.admissionsStory)]))])},UTe=function(e){return Se([pd("text-uppercase text-muted small mb-2")("Description"),Bi("")([ki("col-6 col-md-4 float-right")(VW("img-fluid rounded")({src:e.imageUrl})),Bi("")(QW(Qo(` `)(e.description))(function(n){return jTe("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},kTe=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+NTe(e.conference.id));return ki("card mt-3")(ki("card-body py-3")(Bi("row align-items-center")([ki("col-12 col-md-auto mb-3 mb-md-0")(pd("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Bi("col-12 col-md mb-3 mb-md-0")([Xe("This livestream was part of the "),YW("")("\u{1F3AA} Student panel college fair"),Xe(". Recordings for all 100+ Q&A panels are available.")]),ki("col-12 col-md-auto")(XW("btn btn-sm btn-outline-primary px-3")(an)({href:n})("See all recordings"))])))},y1=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 G||e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof S)return"col-12 col-md-6";if(e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof G)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 52, column 16 - line 56, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Se([ga(e.conference.collegeFair)(kTe(e)),ki("card")(Bi("card-body")([zW("text-center mb-4")("About this livestream"),Bi("row")([Bi(n)([ha(e.conference.school)(function(a){return ki("d-md-none")(ED(a))}),UTe(e.conference)]),Bi(n)([ha(e.conference.guestPresenter)(function(a){return bD(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ha(e.conference.school)(function(a){return ki("d-none d-md-block")(ED(a))}),ha(e.conference.presenter)(OTe)])])]))])};var ZW=en(Ke),BTe=ZW(qn),HTe=wa(Le),JTe=Nt(Wr),e$=q(Qn),b1=q(Rn),qTe=ZW(ra),w1=q(la),n$=Ce(re),E1=_l(re),I1=Kv(be),T1=zv(be),bf=Ns(be),Cl=Vv(re),S1=Qv(be),C1=_e(ze),wf=Ql(re),F1=Ql(Qe),G1=$n(re)()(),M1=Yn(ma),WTe=gi(Oa),$Te=U(ze),zTe=Ye(vv(vv(vR))),VTe=gi(ui),QTe=gi(RU),KTe=te(tc),YTe=Yt(re),XTe=Ce(be),A1=function(){function e(){}return e.value=new e,e}(),a$=function(){function e(){}return e.value=new e,e}(),ID=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),t$=function(){function e(){}return e.value=new e,e}(),r$=function(){function e(){}return e.value=new e,e}(),o$=function(e){return function(n){return function(a){var t=function(u){return BTe(HTe(JTe(u)(function(i){return e$(r$.value)})))(function(){return b1({ctas:n.ctas,stage:a$.value,error:G.value})})},r=function(u){if(u instanceof Rl)return _5({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof yl)return v5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof bl)return f5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof wl)return s5({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 224, column 15 - line 232, column 83): "+[u.constructor.name])};if(a instanceof ID)return t(qTe(r(a.value0))(function(){return e$(t$.value)}));if(a instanceof t$)return b1({ctas:n.ctas,error:n.error,stage:A1.value});if(a instanceof r$)return b1({ctas:n.ctas,stage:A1.value,error:new S("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 207, column 24 - line 217, column 92): "+[a.constructor.name])}}},u$=function(e){return b1({stage:A1.value,error:G.value,ctas:e})},ZTe=function(){return Yo(qo(Be)([Xl.value,new yt(" "),Zl.value,new yt(", "),nc.value,new yt(":"),Li.value,new yt(" "),ac.value]))}(),i$=function(e){return function(n){if(e.ctas.length===0)return ta;var a=function(L){return L instanceof wl?w1(L.value0):G.value},t=function(L){return L instanceof yl?w1(L.value0):G.value},r=function(L){return L instanceof bl?w1(L.value0):G.value},u=function(L){return L instanceof Rl?w1(L.value0):G.value},i=function(){if(e.stage instanceof A1)return ta;if(e.stage instanceof a$)return n$("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Opening...");throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 186, column 24 - line 191, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?ta:Se([E1("")("Referrals"),I1("table table-sm mb-0")([T1("")([bf("")([Cl("")("Title"),Cl("")("Actions")])]),S1("")(C1(L)(function(N){return bf("t--cta t--cta-referral")([wf("pt-3")(N.title),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(an)({onClick:M1(n)(new ID(new wl(N)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?ta:Se([E1("")("General"),I1("table table-sm mb-0")([T1("")([bf("")([Cl("")("Title"),Cl("")("URL"),Cl("")("Link Text"),Cl("")("Actions")])]),S1("")(C1(Tv(WTe(function(N){return N.title}))(L))(function(N){return bf("t--cta t--cta-general")([wf("pt-3")(function(){var z=Pt(N.autoDisplayMinutesFromStart);return z?"\u23F0 ":""}()+N.title),wf("pt-3")(N.url),wf("pt-3")(N.buttonText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(an)({onClick:M1(n)(new ID(new yl(N)))})("Launch CTA"))])}))])])},m=function(L){return L.length===0?ta:Se([E1("")("Featured Service Providers"),I1("table table-sm mb-0")([T1("")([bf("")([Cl("")("Advisors"),Cl("")("Link Text"),Cl("")("Actions")])]),S1("")(C1(L)(function(N){return bf("t--cta t--cta-featured-sp")([wf("pt-3")(hr(", ")($Te(function(z){return z.name})(N.providers))),wf("pt-3")(N.linkText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(an)({onClick:M1(n)(new ID(new bl(N)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?ta:Se([E1("")("Upcoming events"),I1("table table-sm mb-0")([T1("")([bf("")([Cl("")("Livestream"),Cl("")("Date & Time"),Cl("")("Actions")])]),S1("")(C1(Tv(zTe(VTe(function(N){return N.startTime}))(QTe(function(N){return N.conferenceId})))(L))(function(N){return bf("t--cta t--cta-stream-"+KTe(N.conferenceId))([wf("pt-3")(N.title),wf("pt-3")(ZTe(N.startTime)+(" "+M_)),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(an)({onClick:M1(n)(new ID(new Rl(N)))})("Launch CTA"))])}))])])},g=Br(a)(e.ctas),E=Br(t)(e.ctas),b=Br(r)(e.ctas),I=Br(u)(e.ctas);return Se([YTe("")("Calls to action"),XTe("t--ctas position-relative")([ha(e.error)(function(L){return n$("alert alert-danger")(L)}),p(I),s(E),m(b),l(g),i])])}};var l$=rc(Qc(zc)),c$=ee(ra),eSe=UF(he),dd=function(){function e(){}return e.value=new e,e}(),TD=function(){function e(){}return e.value=new e,e}(),SD=function(){function e(){}return e.value=new e,e}(),s$={eq:function(e){return function(n){return e instanceof dd&&n instanceof dd||e instanceof TD&&n instanceof TD||e instanceof SD&&n instanceof SD}}},v$=l$("profile_validate_username_path")(function(e){return function(n){return c$(e({username:n}))(Vc(function(a){return eSe("username validation result")(a)(function(t){return t==="available"?new S(dd.value):t==="taken"?new S(TD.value):t==="invalid"?new S(SD.value):G.value})}))}}),f$=l$("profile_set_username_path")(function(e){return function(n){return c$(e({username:n}))(ir)}});var nSe=De(er(Ds()(dc(dc(hs)()({reflectSymbol:function(){return"username"}})(xt))()({reflectSymbol:function(){return"result"}})(s$)))),vA=Ce(be),_$=Ce(Qe),aSe=Kt(re),tSe=vi()(),CD=Ce(re),rSe=Zr()(),oSe=Yn(li),p$=$n(re)()(),uSe=Yn(ma),iSe=Gi($v(sl)),fA=en(Ke)(qn),lSe=Zt(Rn),_A=wa(Le),cSe=Di(Ca),Z_=q(Rn),sSe=U(Ca),vSe=ee(ra),fSe=Fv(Wr),d$=q(Qn),m$=function(){function e(){}return e.value=new e,e}(),h$=function(){function e(){}return e.value=new e,e}(),D$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),g$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),R$=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}(),y$=function(){function e(){}return e.value=new e,e}(),b$=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}(),dA=function(){function e(){}return e.value=new e,e}(),w$=function(e){return function(n){var a=e.username!==""&&Mt(e.updating)&&nSe(e.validated)(new S({username:e.username,result:dd.value}));return Se([vA("row")([_$("col col-md-6")(aSe("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),_$("col-6 d-none d-md-block")(tSe("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),CD("")("Your username:"),vA("input-group")([rSe("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:oSe(n)(function(t){return Me.create(D$.create(Xs(t)))})})]),vA("d-flex mt-3")([p$("btn btn-light mr-3")(an)({onClick:uSe(n)(new bn(dA.value))})("Cancel"),p$("btn btn-primary t--submit-username")(an)({type:"button",disabled:!a,onClick:iSe(n)(function(){return a?new S(new Me(y$.value)):G.value}())})("Save")]),ha(e.validated)(function(t){if(t.result instanceof dd)return ta;if(t.result instanceof TD)return CD("small text-danger")("Sorry, this username is already taken");if(t.result instanceof SD)return CD("small text-danger")("Usernames can only contain letters, numbers, or these symbols: _ - . with no spaces");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 73, column 37 - line 79, column 121): "+[t.result.constructor.name])}),ha(e.updating)(function(t){if(t instanceof m$)return CD("text-success")("Updating your username...");if(t instanceof h$)return CD("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])})])}},E$=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof D$)return fA(lSe(n.value0.value0!=="")(_A(cSe(Qt(100))(new Me(new g$(n.value0.value0))))))(function(){return Z_({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof g$){if(n.value0.value0===e.username)return fA(_A(sSe(function(){var a=R$.create(n.value0.value0);return function(t){return Me.create(a(t))}}())(v$(n.value0.value0))))(function(){return Z_({username:e.username,validated:G.value,updating:G.value})});if(je)return Z_(e)}if(n.value0 instanceof R$)return Z_({updating:e.updating,username:e.username,validated:new S({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof y$)return fA(_A(vSe(fSe(f$(e.username)))(function(a){if(a instanceof Te)return d$(new bn(new pA(e.username)));if(a instanceof Ie)return d$(new Me(b$.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return Z_({username:e.username,validated:G.value,updating:new S(m$.value)})});if(n.value0 instanceof b$)return Z_({username:e.username,validated:e.validated,updating:new S(h$.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 93, column 31 - line 120, column 48): "+[n.value0.constructor.name])}if(n instanceof bn)return Z_(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])}},I$=function(e){return{username:e,validated:G.value,updating:G.value}};var _Se=lo(),pSe=cd(Qe)()(),dSe=$a(be),mSe=tt(re),hSe=function(e){var n=vh(e);return function(){return function(a){return function(t){var r=_Se(a);return pSe({placement:h1,overlay:Se(n(t)),overlayStyle:Ba(r.overlayStyle)(vt({width:"15rem"}))})(dSe("d-inline-flex align-items-center text-secondary "+r.className)([mSe("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),Xe(r.anchorText)]))}}}},L1=function(e){var n=hSe(e)();return function(a){return n({className:a,anchorText:""})}};var T$=Nn(jn),FD=Pn(T$)(Mn(Gn)),S$=Ln(An),GD=xn(S$),C$=kn(Un),MD=On(C$),DSe=U(oe),md=function(){function e(){}return e.value=new e,e}(),hd=function(){function e(){}return e.value=new e,e}(),Dd=function(){function e(){}return e.value=new e,e}(),gd=function(){function e(){}return e.value=new e,e}(),Rd=function(){function e(){}return e.value=new e,e}(),e0=function(){function e(){}return e.value=new e,e}(),gSe={to:function(e){if(e instanceof Re)return md.value;if(e instanceof ce&&e.value0 instanceof Re)return hd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return Dd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return gd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof Re)return Rd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce&&e.value0.value0.value0.value0 instanceof ce)return e0.value;throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof md)return new Re(Oe.value);if(e instanceof hd)return new ce(new Re(Oe.value));if(e instanceof Dd)return new ce(new ce(new Re(Oe.value)));if(e instanceof gd)return new ce(new ce(new ce(new Re(Oe.value))));if(e instanceof Rd)return new ce(new ce(new ce(new ce(new Re(Oe.value)))));if(e instanceof e0)return new ce(new ce(new ce(new ce(new ce(Oe.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},F$=Cn(gSe)(FD(FD(FD(FD(FD(T$)(S$))(GD))(GD))(GD))(GD))(MD(MD(MD(MD(MD(C$))))))(GD);var RSe={eq:function(e){return function(n){return e instanceof md&&n instanceof md||e instanceof hd&&n instanceof hd||e instanceof Dd&&n instanceof Dd||e instanceof gd&&n instanceof gd||e instanceof Rd&&n instanceof Rd||e instanceof e0&&n instanceof e0}}},x1=function(e){if(e instanceof md)return"student";if(e instanceof hd)return"transfer_student";if(e instanceof Dd)return"counselor";if(e instanceof gd)return"iec";if(e instanceof Rd)return"parent";if(e instanceof e0)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},G$=function(){var e=Sn(x1)(F$);return Zn(Ze)({parse:function(n){return n==="unknown"?new S(G.value):DSe(S.create)(e(n))},default:G.value,diagnosticName:"User Persona"})}(),M$=function(e){if(e instanceof md)return"Student";if(e instanceof hd)return"Transfer Student";if(e instanceof Dd)return"High School Counselor";if(e instanceof gd)return"Independent Educational Counselor (IEC)";if(e instanceof Rd)return"Parent";if(e instanceof e0)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},A$=function(){return Cv(RSe)(e0.value)(F$)}();function L$(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var ySe=q(_t),bSe=Ch(!1);var P1=function(e){if(Sh(bSe))return ySe(de);if(je)return L$;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var mA=U(or);var hA=ee(tu),wSe=q(Rc),ESe=Uo(qx);var x$=function(e){return e},P$=function(e){return function(n){return mA(function(a){return a.result})(e({substring:n,position:0}))}};var ns={map:function(e){return function(n){var a=mA(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},n0=function(e){return function(n){return new Ie({pos:n.position,error:e})}},a0={apply:function(e){return function(n){return function(a){return hA(e(a))(function(t){return hA(n(t.suffix))(function(r){return wSe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return ns}};var Zs={bind:function(e){return function(n){return function(a){return hA(e(a))(function(t){return x$(n(t.result))(t.suffix)})}}},Apply0:function(){return a0}};var ev={pure:function(e){return function(n){return new Te({result:e,suffix:n})}},Apply0:function(){return a0}};var ISe={Applicative0:function(){return ev},Bind1:function(){return Zs}},j$={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof ar)return new ar({state:t.result.value0,str:t.suffix});if(t.result instanceof zt)return new zt({result:t.result.value0,suffix:t.suffix});throw new Error("Failed pattern match at StringParser.Parser (line 87, column 5 - line 87, column 68): "+[t.constructor.name])};return function(t){return ESe(function(r){return mA(a)(x$(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return ISe}};var t0={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Ie){if(a.position===t.value0.pos)return n(a);if(je)return new Ie({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return ns}},TSe={empty:n0("No alternative"),Alt0:function(){return t0}},N$={Applicative0:function(){return ev},Plus1:function(){return TSe}};var O$=ia(t0),DA=ee(Zs),gA=q(ev),SSe=U(ns);var CSe=go(a0),FSe=Jn(a0);var RA=function(e){return function(n){return O$(e)(n0(n))}},yA=function(e){return function(n){var a=e(n);return a instanceof Ie?new Ie({pos:n.position,error:a.value0.error}):a}},as=function(e){return O$(DA(e)(function(n){return gA(de)}))(gA(de))};var U$=function(e){return function(n){return new ei(e,n)}};var GSe=function(e){return function(n){var a=e(n);if(a instanceof Te){var t=n.position65535;return t?e(n):J$(a.value0)}if(a instanceof G)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})}(),Ef=function(e){return yA(H$(xSe)(function(n){var a=e(n);return a?J$(n):n0("Character "+(q$(n)+" did not satisfy predicate"))}))},Hi=function(e){return RA(Ef(function(n){return n===e}))("Could not match character "+q$(e))};var PSe=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}},jSe=Et(),bA=U(ns),NSe=gr(xm)(It),OSe=U(aS),Ao=en(Ke)(Zs),mu=lt(ns),nv=q(ev),fi=ia(t0);var yd=go(a0),If=ee(Zs),$$=gr(Hr)(It);var Lr=function(e){return jSe(cb(e))},wA=function(e){return bA(function(){var n=OSe(Tu);return function(a){return NSe(n(a))}}())(k$(Ef(e)))},z$=function(e){return Ao(mu(e))(function(){return Ao(mu(j1(e)))(function(){return nv(de)})})},j1=function(e){return fi(z$(e))(nv(de))},V$=function(e){return Ao(mu(Ef(e)))(function(){return Ao(mu(j1(Ef(e))))(function(){return nv(de)})})},USe=Hi(Lr(0));var Q$=Hi(` `),K$=function(e){return e===" "||e===" "},kSe=Ef(K$),EA=V$(K$),BSe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},ts=function(e){return function(n){return function(a){return a>=e&&a<=n}}},HSe=ts(Lr(33))(Lr(126)),JSe=Ef(HSe),IA=function(e){return function(n){return Sc(Tu(n))(e)}},N1=function(e){return ts(Lr(1))(Lr(8))(e)||ts(Lr(14))(Lr(31))(e)||IA("\v\f\x7F")(e)},qSe=function(e){return ts(Lr(33))(Lr(39))(e)||ts(Lr(42))(Lr(91))(e)||ts(Lr(93))(Lr(126))(e)||N1(e)},WSe=function(e){return ts(Lr(33))(Lr(90))(e)||ts(Lr(94))(Lr(126))(e)||N1(e)},$Se=Ef(N1),zSe=function(e){return IA(Tu(Lr(33)))(e)||ts(Lr(35))(Lr(91))(e)||ts(Lr(93))(Lr(126))(e)||N1(e)};var Y$=Hi("\r"),X$=mu(yd(Y$)(Q$)),bd=function(){var e=z$(yd(X$)(EA)),n=yd(EA)(as(yd(X$)(EA)));return fi(n)(e)}(),Z$=function(){var e=Ao(mu(Hi("\\")))(function(){return fi(JSe)(fi(kSe)(fi(Q$)(fi(Y$)(fi($Se)(USe)))))});return If(e)(function(n){return nv("\\"+Tu(n))})}(),VSe=fi(wA(zSe))(Z$),QSe=function(){var e=Ao(mu(Hi('"')))(function(){return If(r0(yd(as(bd))(VSe)))(function(n){return Ao(mu(as(bd)))(function(){return Ao(mu(Hi('"')))(function(){return nv(n)})})})});return bA(function(n){return'"'+($$(n)+'"')})(e)}(),ez=PSe("comment","Text.Email.Parser",function(){return Ao(mu(Hi("(")))(function(){return Ao(j1(fi(V$(qSe))(fi(mu(Z$))(fi(ez(155))(bd)))))(function(){return Ao(mu(Hi(")")))(function(){return nv(de)})})})}),KSe=ez(152),O1=j1(fi(KSe)(bd)),YSe=Ao(as(O1))(function(){return Ao(mu(Hi("[")))(function(){return If(r0(yd(as(bd))(wA(WSe))))(function(e){return Ao(as(bd))(function(){return Ao(mu(Hi("]")))(function(){return Ao(as(O1))(function(){return nv("["+($$(e)+"]"))})})})})})}),XSe=function(){var e=function(n){return BSe(n)||IA("!#$%&'*+/=?^_`{|}~-")(n)};return wA(e)}(),nz=function(){var e=Ao(mu(as(O1)))(function(){return If(fi(XSe)(QSe))(function(a){return Ao(mu(as(O1)))(function(){return nv(a)})})}),n=B$(e)(Hi("."));return bA(Ol(xm)(It)("."))(n)}(),ZSe=fi(nz)(YSe),eCe=nz,TA=If(eCe)(function(e){return If(Hi("@"))(function(){return If(ZSe)(function(n){return If(W$)(function(){return nv({localPart:e,domainPart:n})})})})});var aCe=function(e){return P$(TA)(e)},tCe=function(){var e=Bt(ko)(te(Dv()()(gv({reflectSymbol:function(){return"error"}})(Rv({reflectSymbol:function(){return"pos"}})(nn))(Gt))));return function(n){return e(aCe(n))}}(),AD=function(e){var n=tCe(e);if(n instanceof Ie)return!1;if(n instanceof Te)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var SA=Io(re),U1=Zr()(),rCe=Yn(li),az=Uy(be)()(),tz=_e(oe),rz=Gi(My(sl)),oz=U(oe),k1=ky(re)()(),uz=_e(ze),LD=Ce(be),oCe=IG(),CA=te(nn),uCe=bR(Be)(ot),iCe=Zv(be)()(),o0=Ce(Qe),iz=$n(re)()(),lCe=Yn(ma),cCe=Xr(Nu),sCe=te(tc),xD=q(Rn),lz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wd=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(g){return function(E){return function(b){return function(I){return function(L){return Se([SA("")(g),U1("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:rCe(t)(function(N){return I(Xs(N))})})])}}}}}},u=[SA("")("I'm a..."),az("form-control")({name:"livestream_public_registration_form[i_am_a]",value:Ue("")(tz(a.persona)(x1)),onChange:rz(t)(function(p){return oz(fz.create)(G$($M(p)))})})([ga(Mt(a.persona))(k1("")({value:""})("Select one...")),Se(uz(A$)(function(p){return k1("")({value:x1(p)})(M$(p))}))])],i=LD("d-flex align-items-center")([Xe("Already have an account? "),oCe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:Dw,openInNewTab:!1})]),l=[SA("")("Graduation year"),az("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:Ue("")(tz(a.gradYear)(CA)),onChange:rz(t)(function(p){return oz(vz.create)(wc($M(p)))})})([ga(Mt(a.gradYear))(k1("")({value:""})("Select one...")),Se(uz(n.allowedGradYears)(function(p){return k1("")({value:CA(p)})(CA(p))}))])],s=Ue({path:"",token:""})(zb("livestreams_register_path")),m=uCe([AD(a.email),a.firstName!=="",a.lastName!=="",Pt(a.gradYear),Pt(a.persona)]);return Se([i,iCe("")({action:s.path,method:"POST"})([o0("row")(o0("col")(r("email")("Email")("Your email")(a.email)(lz.create)({autoFocus:e.autoFocus}))),o0("row mt-3")(o0("col")(r("first_name")("First name")("Your first name")(a.firstName)(cz.create)({autoFocus:!1}))),o0("row mt-3")(o0("col")(r("last_name")("Last name")("Your last name")(a.lastName)(sz.create)({autoFocus:!1}))),LD("row mt-3")([LD("col-6")(l),LD("col-6")(u)]),o0("row mt-3")(LD("col-12")([iz("btn btn-primary w-100 mt-3 t--register")(an)({type:"submit",disabled:!m,onClick:lCe(P1)(de)})("Register"),ha(e.cancelButton)(function(p){return iz("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(an)({type:"button",onClick:cCe(p.click)})(p.text)})])),U1("")({type:"hidden",name:"authenticity_token",value:s.token}),U1("")({type:"hidden",name:"register_for_conference_id",value:sCe(n.conference.id)}),U1("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},Ed=function(e){return function(n){if(n instanceof lz)return xD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof cz)return xD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof sz)return xD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof vz)return xD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new S(n.value0)});if(n instanceof fz)return xD({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 172, column 16 - line 182, column 36): "+[n.constructor.name])}},Id=function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}}();var _z=Ce(be),vCe=L1(re),fCe=lr(re)()(),Td=function(e){return Se([_z("")([Xe(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),vCe("")(` 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. `)]),_z("")([Xe(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),fCe("")(tr("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),Xe(".")])])};var FA={eq:function(e){return function(n){return e===n}}};var av=en(Ke)(qn),_Ce=fu(Le),pz=Aa(),pCe=Ni(pz(H({reflectSymbol:function(){return"author"}})(pz(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(H({reflectSymbol:function(){return"id"}})(on)(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))))(Le),Sd=wa(Le),B1=q(Qn),xr=q(Rn),GA=uc(),dCe=Kt(be),MA=$a(re),AA=Io(re),mCe=tt(re),u0=Ce(be),Cd=Ce(Qe),H1=$n(re)()(),Fd=Yn(ma),PD=Ce(re),dz=Yt(re),mz=_e(ze),hCe=Xt(be)()(),DCe=$a(be),hz=ee(Ve),gCe=yp()(),RCe=Yn(li),yCe=Gi($v(sl)),bCe=Yv(be),wCe=Zr()(),ECe=L1(re),ICe=De(er(xt)),TCe=_e(oe),Dz=Ho(Y7(bu(ui))),SCe=Ro(FA),gz=U(Ca),CCe=Ye(Lt),FCe=Ul(Be)(FA),Rz=ut(Gr(Ca)),yz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bz=function(){function e(){}return e.value=new e,e}(),wz=function(){function e(){}return e.value=new e,e}(),i0=function(){function e(){}return e.value=new e,e}(),J1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),q1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),W1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ez=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Iz=function(){function e(){}return e.value=new e,e}(),LA=function(){function e(){}return e.value=new e,e}(),xA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Tz=function(){function e(){}return e.value=new e,e}(),Sz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PA=function(){function e(){}return e.value=new e,e}(),$1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),z1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Cz=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}(),jD=function(){function e(){}return e.value=new e,e}();var Fz=function(e){return av(_Ce(function(n){return Me.create(xA.create(A_(n)))})(pCe(e.pusher.dataChannel)("question")))(function(){return av(Sd(B1(new Me(Tz.value))))(function(){return xr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:i0.value})})})},Gz=function(e){if(e.user instanceof G)return new S(new Me(PA.value));if(e.user instanceof S&&e.user.value0.username instanceof G)return new S(new Me(Cz.value));if(e.user instanceof S&&e.user.value0.username instanceof S)return G.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 360, column 3 - line 366, column 14): "+[e.user.constructor.name])},GCe=function(){return Yo(qo(Be)([nc.value,new yt(":"),Li.value,new yt(" "),ac.value]))}(),Mz=function(e){return function(n){return function(a){var t=function(s){return a(Me.create(s))},r=function(s){return GA({onDismiss:t(jD.value),body:Se([dCe("")([MA("")("By: "),AA("")("@"+s.author.username)]),mCe("")(s.text),Kl(""),u0("row align-items-center mb-3")([Cd("col-4")(H1("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())(an)({onClick:Fd(t)(new z1(bz.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),PD("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."}())]),u0("row align-items-center")([Cd("col-4")(H1("btn w-100 btn-danger")(an)({onClick:Fd(t)(new z1(wz.value))})("Ban this user")),u0("col")([Xe("This user will not be able to ask any more questions "),AA("")("in this livestream. "),MA("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Se([H1("btn btn-outline-primary px-4")(an)({onClick:Fd(t)(jD.value)})("Never mind, close this dialog")])})},u=function(s){return GA({onDismiss:t(jD.value),title:dz("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Se([wd({cancelButton:G.value,autoFocus:!0})(e)(s)(function(m){return t($1.create(m))}),Cd("small mt-3")(Td(e))])})},i=function(s){return GA({onDismiss:t(jD.value),title:dz("")("Please select a user name"),body:w$(s)(function(m){return t(Gd.create(m))}),bodyClass:"t--username-modal"})},l=function(s){var m=function(g){return function(E){return function(b){return Se([PD("ml-2 badge badge-"+E)(g),ha(b)(function(I){return PD("ml-2 text-secondary")(GCe(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?m("CollegeVine")("success")(s.time):s.isPublic?m("Question")("warning")(G.value):ta};return Se([Cd("position-relative h-100")(Cd("d-flex flex-column position-absolute-fullsize")(u0("d-flex flex-column flex-grow-1 min-height-0")([u0("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(mz(n.questions)(function(s){return hCe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:Fd(t)(new z1(new yz(s)))})([DCe("small d-inline-flex align-items-center")([AA("")("@"+s.author.username),l(s),Xe(":")]),MA("ml-1")(s.text)])})),u0("")([ha(hz(e.user)(function(s){return s.username}))(function(s){return PD("small text-secondary mt-2")("@"+s)}),gCe("form-control t--question-text")({onChange:RCe(t)(function(s){return Ez.create(D1(s))}),onClick:yCe(a)(Gz(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ga(e.isPrivilegedUser)(Cd("form-check my-2")(bCe("form-check-label d-flex align-items-center t--broadcast-checkbox")([wCe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:Fd(t)(Iz.value)}),PD("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Send to all viewers")]))),u0("d-flex justify-content-end align-items-center")([ECe("large mr-2")(` Questions you ask will only be visible to you and the host unless they select it to read to the audience, at which point it will appear with a yellow \u201CQuestion\u201D tag for all viewers to see. `),H1("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(an)({onClick:Fd(t)(LA.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof i0)return ta;if(n.modal instanceof q1)return u(n.modal.value0);if(n.modal instanceof J1)return r(n.modal.value0);if(n.modal instanceof W1)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 140, column 5 - line 144, column 41): "+[n.modal.constructor.name])}()])}}},MCe=function(e){return function(n){return ICe(TCe(e.user)(function(a){return a.cvid}))(new S(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},Az=function(e){return function(n){return function(a){if(a instanceof bn)return xr(n);if(a instanceof Me){if(a.value0 instanceof Ez){var t=Gz(e);if(t instanceof S)return av(Sd(B1(t.value0)))(function(){return xr(n)});if(t instanceof G)return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 247, column 5 - line 252, column 46): "+[t.constructor.name])}if(a.value0 instanceof Iz)return xr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof LA)return av(Sd(B1(new Me(PA.value))))(function(){return xr(n)});if(a.value0 instanceof xA)return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:Dz(function(l){return Qb(function(s){return s.time}(l))})(wo(MCe(e))(io(a.value0.value0)(wo(function(){var l=SCe(a.value0.value0.id);return function(s){return l(function(m){return m.id}(s))}}())(n.questions))))});if(a.value0 instanceof Tz)return av(Sd(gz(function(l){return Me.create(Sz.create(l))})(uw(e.conference.id))))(function(){return xr(n)});if(a.value0 instanceof Sz){var u=mz(a.value0.value0)(function(l){return l.id});return xr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:Dz(function(l){return Qb(function(s){return s.time}(l))})(CCe(a.value0.value0)(wo(function(l){return FCe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof PA)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(Id)});var i=function(l){if(a.value0 instanceof $1)return xr(n);if(a.value0 instanceof Cz)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(I$(Ue("")(hz(e.user)(function(m){return m.username}))))});if(a.value0 instanceof Gd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof pA)return av(Sd(B1(new bn(a.value0.value0.value0.value0))))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:i0.value})});if(a.value0 instanceof Gd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof dA)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:i0.value});var s=function(m){if(a.value0 instanceof Gd&&je)return xr(n);if(a.value0 instanceof jD)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:i0.value});if(a.value0 instanceof z1){if(e.isPrivilegedUser){if(a.value0.value0 instanceof yz)return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new J1(a.value0.value0.value0)});var p=function(g){var E=function(b){return xr(n)};return a.value0.value0 instanceof wz&&n.modal instanceof J1?av(Za(h5({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:i0.value})}):E(!0)};return a.value0.value0 instanceof bz&&n.modal instanceof J1?av(Za(l5({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return xr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:i0.value})}):p(!0)}if(je)return xr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 243, column 1 - line 243, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof Gd&&n.modal instanceof W1?Rz(function(m){return Me.create(Gd.create(m))})(function(m){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(m)}})(E$(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof $1&&n.modal instanceof q1?Rz(function(l){return Me.create($1.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(l)}})(Ed(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof LA&&e.user instanceof S?av(Sd(gz(function(r){return Me.create(xA.create(r))})(c5({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return xr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 243, column 1 - line 243, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var V1,ACe=new Uint8Array(16);function jA(){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(ACe)}var Lz=/^(?:[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 LCe(e){return typeof e=="string"&&Lz.test(e)}var NA=LCe;var Zo=[];for(Q1=0;Q1<256;++Q1)Zo.push((Q1+256).toString(16).substr(1));var Q1;function xCe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(Zo[e[n+0]]+Zo[e[n+1]]+Zo[e[n+2]]+Zo[e[n+3]]+"-"+Zo[e[n+4]]+Zo[e[n+5]]+"-"+Zo[e[n+6]]+Zo[e[n+7]]+"-"+Zo[e[n+8]]+Zo[e[n+9]]+"-"+Zo[e[n+10]]+Zo[e[n+11]]+Zo[e[n+12]]+Zo[e[n+13]]+Zo[e[n+14]]+Zo[e[n+15]]).toLowerCase();if(!NA(a))throw TypeError("Stringified UUID is invalid");return a}var xz=xCe;function PCe(e,n,a){e=e||{};var t=e.random||(e.rng||jA)();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 xz(t)}var OA=PCe;var Pz=OA;var jCe=function(e){return e},UA=function(e){return e};var kA=ee(vr)(Pz)(function(){var e=q(_t);return function(n){return e(jCe(n))}}());var Md=wa(Le),jz=en(Ke),NCe=jz(ra),OCe=Ye(oy),UCe=U(Ca),ND=gn(Le),kCe=tt(re),BCe=vi()(),Nz=Xt(Qe)()(),Oz=lm(ui),HCe=Yr(sr),JCe=Hn(Pu),qCe=te(sN),Uz=te(Hf),WCe=U(ze),rs=jz(qn),$Ce=fu(Le),zCe=Ni(Aa()(H({reflectSymbol:function(){return"authorTag"}})(he)(H({reflectSymbol:function(){return"kind"}})(he)(tn))))(Le),K1=U(Bn),Tf=q(Rn),kz=nt(cp),Bz=im(ui),VCe=q(Qn),BA=Ac(up),QCe=Ce(be),KCe=_e(ze),YCe=$n(be)()(),XCe=Yn(ma),ZCe=$a(re),Y1=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),OD=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}(),Hz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JA=function(e){return Md(NCe(Qt(OCe(e)(10)))(function(){return UCe(HA.create)(ND(si))}))},Jz=50,qz=function(e){var n=function(r){return kCe("text-white fe fe-"+r)("")},a=function(){if(e instanceof Ws)return n("heart");if(e instanceof pf)return n("thumbs-up");if(e instanceof L_)return n("thumbs-down");if(e instanceof df)return n("file-text");if(e instanceof mf)return BCe("")({src:"/img/icons/smile-white.svg",style:vt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 152, column 12 - line 157, column 108): "+[e.constructor.name])}(),t=function(){if(e instanceof Ws)return"#F0747B";if(e instanceof pf)return"#008CFD";if(e instanceof L_)return"#6E84A3";if(e instanceof df)return"#18A668";if(e instanceof mf)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 159, column 23 - line 164, column 34): "+[e.constructor.name])}();return Nz("d-flex justify-content-center align-items-center rounded-circle")({style:vt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},Wz=6,$z=function(){return Wz*1e3}(),zz=function(e){return function(n){var a=function(t){if(Oz(t.removeAt)(e.currentTime))return ta;var r=Tt(HCe(JCe(ll(my(t.startDecayAt))))(10)),u=function(){var p=r<=3;if(p)return"linear";var g=r<=7;return g?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=Oz(t.startDecayAt)(e.currentTime),m=Wz+(r-5)/10;return Nz("position-absolute mb-4 mt-2")({key:qCe(t.startDecayAt),style:vt({right:Uz(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:Uz(m)+"s",transitionTimingFunction:u})})(qz(t.reaction.kind))};return Se(WCe(a)(e.reactions))}},Vz=function(e){return rs($Ce(function(n){return new OD(AU(n),G.value)})(zCe(e.pusher.dataChannel)("reaction")))(function(){return rs(Md(ND(K1(function(n){return Hz.create(UA(n))})(kA))))(function(){return rs(Md(ND(K1(HA.create)(si))))(function(){return Tf({authorTag:"",currentTime:kz,coolDownUntil:kz,reactions:[]})})})})},Qz=800,Kz=function(e){return function(n){return function(a){if(a instanceof Y1&&a.value1 instanceof G)return rs(Md(ND(K1(function(){var t=Y1.create(a.value0);return function(r){return t(S.create(r))}}())(si))))(function(){return Tf(n)});if(a instanceof Y1&&a.value1 instanceof S){if(Bz(n.coolDownUntil)(a.value1.value0))return rs(Md(VCe(new OD({kind:a.value0,authorTag:n.authorTag},new S(a.value1.value0)))))(function(){return Tf(n)});if(je)return rs(Za(p5(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return rs(JA(Qz))(function(){return Tf({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:Ue(a.value1.value0)(BA(Qz)(a.value1.value0))})})})}if(a instanceof OD&&a.value1 instanceof G)return rs(Md(ND(K1(function(){var t=OD.create(a.value0);return function(r){return t(S.create(r))}}())(si))))(function(){return Tf(n)});if(a instanceof OD&&a.value1 instanceof S)return rs(JA(Jz))(function(){return rs(JA($z))(function(){var t={reaction:a.value0,startDecayAt:Ue(a.value1.value0)(BA(Jz)(a.value1.value0)),removeAt:Ue(a.value1.value0)(BA($z)(a.value1.value0))};return Tf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:r_(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof Hz)return Tf({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof HA)return Tf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:wo(function(t){return Bz(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])}}},Yz=function(e){return function(n){var a=function(t){if(t instanceof Ws)return"love this";if(t instanceof pf)return"helpful";if(t instanceof L_)return"not helpful";if(t instanceof df)return"taking notes";if(t instanceof mf)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 138, column 13 - line 143, column 30): "+[t.constructor.name])};return QCe("d-flex justify-content-end my-2")(KCe([Ws.value,mf.value,pf.value,df.value])(function(t){return YCe("btn bg-light d-flex align-items-center p-0 ml-3")(tr(a(t)))({onClick:XCe(n)(new Y1(t,G.value)),style:vt({borderRadius:"1em"})})([qz(t),ZCe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var Xz=en(Ke),eFe=ee(ra),qA=gn(Le),X1=q(Qn),Z1=Kt(re),eE=te(nn),UD=Xz(qn),kD=wa(Le),Fl=q(Rn),Zz=Nt(Wr),eV=go(Xm),nV=U(Ca),nFe=Bo(Rn)(Ku),aFe=ii(Gs),aV=Ce(re),tFe=oc(),rFe=Yt(re),tV=$n(re)()(),WA=Yn(ma),rV=Ce(Qe),oFe=$n(be)()(),uFe=tt(re),iFe=Ce(be),oV=function(){function e(){}return e.value=new e,e}(),uV=function(){function e(){}return e.value=new e,e}(),iV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lV=function(){function e(){}return e.value=new e,e}(),cV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sV=function(){function e(){}return e.value=new e,e}(),vV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fV=function(){function e(){}return e.value=new e,e}(),_V=function(){function e(){}return e.value=new e,e}(),zA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),VA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nE=function(){function e(){}return e.value=new e,e}(),pV=Xz(ra)(Qt(1e3))(function(){return eFe(qA(si))(function(e){return X1(new zA(e))})}),lFe=function(e){return{header:"Go on-air?",body:Se([Z1("")("Are you sure you want to go on-air?"),Z1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(eE(e.videoLagSeconds)+` seconds if you confirm. If you're presenting with Zoom, make sure you've gone "live" on Zoom as well. `))]),confirmText:"Confirm, go on-air!",cancelText:"Cancel",confirmMsg:lV.value}},dV=function(e){return function(n){return function(a){return function(t){return UD(kD(pV))(function(){return Fl({confirmation:n.confirmation,network:oV.value,streamStatus:t,transition:new S({since:a,secondsLeft:e.videoLagSeconds})})})}}}},mV=function(e){return function(n){return function(a){if(a instanceof lV)return UD(kD(Zz(eV(a5(e.conference.id))(nV(cV.create)(qA(si))))(function(l){return X1(new VA("Error opening the stream. Please try again."))})))(function(){return Fl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:uV.value})});if(a instanceof cV)return dV(e)(n)(a.value0)(no.value);if(a instanceof sV)return UD(kD(Zz(eV(t5(e.conference.id))(nV(vV.create)(qA(si))))(function(l){return X1(new VA("Error closing the stream. Please try again."))})))(function(){return Fl(n)});if(a instanceof vV)return dV(e)(n)(a.value0)(Mr.value);if(a instanceof $A)return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new S(a.value0)});if(a instanceof fV)return UD(nFe(n.confirmation)(function(l){return kD(X1(l.confirmMsg))}))(function(){return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof _V)return Fl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof VA)return Fl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new iV(a.value0)});var t=function(l){if(a instanceof zA||a instanceof nE)return Fl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 180, column 1 - line 180, column 76): "+[a.constructor.name])};if(a instanceof zA){if(n.transition instanceof S){var r=aFe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Eo(r)|0,i=u>0;return i?UD(kD(pV))(function(){return Fl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new S({since:n.transition.value0.since,secondsLeft:u})})}):Fl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},hV=function(e){return Fl({streamStatus:e.streamStatus,transition:G.value,network:oV.value,confirmation:G.value})},cFe=function(){return{header:"End the stream?",body:Se([Z1("")("Are you sure you want to end the stream?"),Z1("mb-0 font-weight-bold fw-bold")("You won't be able to restart it again!")]),confirmText:"Yes, end it",cancelText:"No, keep streaming",confirmMsg:sV.value}}(),DV=function(e){return function(n){return function(a){var t=function(){return n.network instanceof uV?aV("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):ta}(),r=function(m){return tFe({header:rFe("my-0")(m.header),bodyClass:"p-5",body:m.body,footerClass:"p-4",footer:Se([tV("btn btn-primary px-4")(an)({onClick:WA(a)(fV.value)})(m.confirmText),tV("btn btn-outline-primary px-4")(an)({onClick:WA(a)(_V.value)})(m.cancelText)])})},u=function(m){return function(p){return function(g){return function(E){return function(b){return rV("col-auto pr-0")(oFe("btn btn-"+(m+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(an)({onClick:WA(a)(b)})([uFe("fe mr-2 fe-"+p)(""),Xe(g)]))}}}}},i=function(){if(n.streamStatus instanceof Ou)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new $A(lFe(e)));var m=function(p){if(n.streamStatus instanceof no)return Se([u("lg")("radio")("ON AIR")("success")(nE.value),u("sm")("x-circle")("End stream")("outline-danger")(new $A(cFe))]);if(n.streamStatus instanceof Mr)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(nE.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof no&&n.transition instanceof S?u("lg")("radio")("ON AIR")("success")(nE.value):m(!0)}(),l=function(m){return aV("alert small m-0 flex-grow-1 alert-"+m)},s=function(){if(n.network instanceof iV)return l("danger")(n.network.value0);if(n.streamStatus instanceof Ou)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var m=function(p){if(n.streamStatus instanceof no)return l("light")(` We're live. The audience should see your video with a `+(eE(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var g=function(E){if(n.streamStatus instanceof Mr)return l("light")("The stream has ended. The audience does not see any video right now.");throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof Mr&&n.transition instanceof S?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(eE(n.transition.value0.secondsLeft)+" seconds.")):g(!0)};return n.streamStatus instanceof no&&n.transition instanceof S?l("info")("Start presenting now. The audience will see the stream in "+(eE(n.transition.value0.secondsLeft)+" seconds...")):m(!0)}();return iFe("position-relative row align-items-center t--stream-controls")([i,rV("col")(s),t,ha(n.confirmation)(r)])}}};var sFe=Ac(Nv),gV=ii(Nv),RV=vO(),vFe=uc(),fFe=Yt(re),_Fe=Ce(re),yV=Kt(re),pFe=$n(re)()(),dFe=Yn(ma),bV=wa(Le),wV=en(Ke),EV=U(Ca),IV=gn(Le),TV=wV(qn),mFe=uu(Be)(ct),QA=q(Rn),KA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),YA=function(){function e(){}return e.value=new e,e}(),hFe=[30,15,5,0],SV=function(e){return Ue(e.conference.scheduledStartTime)(sFe(Tt(e.conference.duration))(e.conference.scheduledStartTime))},FV=function(e){return function(n){return function(a){if(!n.modal)return ta;if(n.now instanceof G)return ta;if(n.now instanceof S){var t=SV(e),r=gV(t)(n.now.value0),u=function(){if(r<1)return" ended "+RV({from:t,to:n.now.value0,format:pb("ago")});if(je)return" ends "+RV({from:n.now.value0,to:t,format:pb("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 68, column 7 - line 70, column 105): "+[])}();return vFe({onDismiss:a(YA.value),body:Se([fFe("mb-0")("Host-only warning"),_Fe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),yV("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),yV("")(` You have `+(xi(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. `)),pFe("btn btn-primary px-4")(an)({onClick:dFe(a)(YA.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])}}},DFe=bV(wV(ra)(Qt(60100))(function(){return EV(KA.create)(IV(vf))})),GV=function(e){return function(n){return function(a){if(a instanceof KA)return TV(DFe)(function(){var t=gV(SV(e))(a.value0),r=mFe(Eo(t))(hFe);return QA({now:new S(a.value0),modal:n.modal||r})});if(a instanceof YA)return QA({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])}}},MV=function(){return TV(bV(EV(KA.create)(IV(vf))))(function(){return QA({modal:!1,now:G.value})})}();var AV=en(Ke),gFe=AV(ra),LV=q(Qn),RFe=AV(qn),yFe=wa(Le),bFe=Nt(Wr),aE=q(Rn),wFe=De(Ah),xV=qo(Be),XA=Ce(be),tE=tt(re),EFe=$n(re)()(),PV=Yn(ma),IFe=lr(re)()(),TFe=$n(Qe)()(),SFe=oc(),jV=Ce(Qe),CFe=Io(re),FFe=Pc(re)()(),GFe=$a(re),NV=function(){function e(){}return e.value=new e,e}(),OV=function(){function e(){}return e.value=new e,e}(),ZA=function(){function e(){}return e.value=new e,e}(),UV=function(){function e(){}return e.value=new e,e}(),kV=function(){function e(){}return e.value=new e,e}(),BV=function(){function e(){}return e.value=new e,e}(),HV=function(){function e(){}return e.value=new e,e}(),MFe=function(){function e(){}return e.value=new e,e}(),JV=function(e){return function(n){return function(a){var t=gFe(rw({fromConference:new S(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return LV(new Me(BV.value))});if(a instanceof kV)return RFe(yFe(bFe(t)(function(r){return LV(new Me(HV.value))})))(function(){return aE({cta:n.cta,stage:OV.value})});if(a instanceof BV)return aE({cta:n.cta,stage:UV.value});if(a instanceof HV)return aE({cta:n.cta,stage:ZA.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 135, column 24 - line 145, column 44): "+[a.constructor.name])}}},qV=function(e){return function(n){return wFe(e.cta.conferenceId)(n.conferenceId)}},WV=function(e){return aE({cta:e,stage:NV.value})},AFe=function(){return Yo(xV([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),Li.value,new yt(" "),ac.value]))}(),LFe=function(){return Yo(xV([ec.value]))}(),$V=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof ZA?XA("text-danger small mt-2")([tE("fe fe-x-circle mr-2")(""),Xe("Something went wrong. Please try again.")]):ta}(),r=function(m){return a(Me.create(m))},u=function(){if(e.user instanceof S)return EFe("btn btn-primary px-4 t--register-one-click")(tr("Register for this livestream"))({onClick:PV(r)(kV.value)})("Register (one-click)");if(e.user instanceof G)return IFe("btn btn-primary px-4 t--register-new-tab")(tr("Register for this livestream"))({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 86, column 22 - line 96, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof NV||n.stage instanceof ZA)return u;if(n.stage instanceof OV)return XA("text-secondary")([tE("fe fe-refresh-cw mr-2")(""),Xe("Hold on tight...")]);if(n.stage instanceof UV)return XA("text-success")([tE("fe fe-check-circle mr-2")(""),Xe("You\u2019ve registered \u2013\xA0see you "+(LFe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 70, column 36 - line 84, column 10): "+[n.stage.constructor.name])}(),l=function(m){return a(bn.create(m))},s=TFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(tr("Close"))({onClick:PV(l)(MFe.value)})(tE("fe fe-x")(""));return SFe({body:Se([jV("row justify-content-end mt-n3")(s),CFe("")("Join us for our upcoming livestream:"),FFe("mt-3")({id:ji})(n.cta.title),GFe("small")(AFe(n.cta.startTime)+(" "+M_)),jV("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:Jh.value})}}};var xFe=oc(),rE=Ce(be),PFe=Hy(re)()(),oE=Ce(Qe),jFe=$n(Qe)()(),zV=Yn(ma),NFe=tt(re),OFe=_e(ze),UFe=fl()(),kFe=eo(re),BFe=Kt(re),HFe=lr(re)()(),JFe=en(Ke),qFe=JFe(qn),WFe=wa(Le),$Fe=gn(Le),zFe=Vs(Sr)(),VFe=te(nn),VV=q(Rn),QFe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QV=function(){function e(){}return e.value=new e,e}(),KV=function(e){return function(n){var a=function(){var i=Or(e.cta.providers);return i===1?hf.value:i===2?hf.value:qh.value}(),t=function(i){return n(Me.create(i))},r=function(i){return n(bn.create(i))},u=function(){var i=Or(e.cta.providers);return i===1?"col-12":i===2?"col-12 col-md-6 mb-3 mb-md-0":"col-12 col-md-4 mb-3 mb-md-0"}();return xFe({bodyClass:"bg-gray-900 text-white t--cta-active",body:Se([rE("row no-gutters g-0 mb-4")([rE("col text-center")([PFe("mb-2")({id:ji})("The admissions process is hard - advisors are here to help!"),Xe("Schedule a free consultation to get your questions answered")]),oE("col-auto text-right")(jFe("btn btn-link p-0 m-0 text-white")(tr("Close"))({onClick:zV(r)(QV.value)})(NFe("fe fe-x")("")))]),rE("row text-center")(OFe(e.cta.providers)(function(i){return rE(u)([oE("row mb-3")(oE("col-auto mx-auto")(oE("avatar avatar-xl")(UFe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),kFe("mb-2")(i.name),BFe("mb-3")(i.location),HFe("btn btn-primary btn-sm px-3 py-1")(an)({target:"_blank",href:i.linkUrl,onClick:zV(t)(new QFe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},YV=function(e){return function(n){return qFe(WFe($Fe(function(){return zFe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:VFe(e.cta.id),livestream_cta_url:n.value0})(),new bn(QV.value)})))(function(){return VV(e)})}},XV=function(e){return function(n){return e.cta.id===n.id}},ZV=function(e){return VV({cta:e})};var KFe=lr(re)()(),eQ=Yn(ma),YFe=$n(Qe)()(),XFe=tt(re),ZFe=oc(),nQ=Ce(Qe),eGe=Pc(re)()(),nGe=en(Ke),aGe=nGe(qn),tGe=wa(Le),rGe=gn(Le),oGe=Vs(Sr)(),uGe=te(nn),aQ=q(Rn),iGe=function(){function e(){}return e.value=new e,e}(),tQ=function(){function e(){}return e.value=new e,e}(),rQ=function(e){return function(n){var a=function(i){return n(Me.create(i))},t=KFe("btn btn-primary px-4 t--register-new-tab")(an)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:eQ(a)(iGe.value)})(e.cta.buttonText),r=function(i){return n(bn.create(i))},u=YFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(tr("Close"))({onClick:eQ(r)(tQ.value)})(XFe("fe fe-x")(""));return ZFe({body:Se([nQ("row justify-content-end mt-n3")(u),eGe("mt-3")({id:ji})(e.cta.title),nQ("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:Jh.value})}},oQ=function(e){return function(n){return aGe(tGe(rGe(function(){return oGe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:uGe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new bn(tQ.value)})))(function(){return aQ(e)})}},uQ=function(e){return function(n){return e.cta.id===n.id}},iQ=function(e){return aQ({cta:e})};var eL=en(Ke),_i=eL(Ve),pi=Jr(oo),Ad=q(la),lQ=fr(yo(ot)),BD=ia(ro),tv=q(Rn),lGe=eL(qn),cGe=wa(Le),sGe=eL(ra),vGe=q(Qn),nL=Ce(be),fGe=Yv(re),_Ge=Zr()(),pGe=Yn(li),dGe=$n(Qe)()(),cQ=Yn(ma),mGe=tt(re),hGe=oc(),aL=Ce(Qe),DGe=Pc(re)()(),gGe=Kt(re),RGe=$n(re)()(),sQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_Q=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mQ=function(){function e(){}return e.value=new e,e}(),hQ=function(){function e(){}return e.value=new e,e}(),DQ=function(e){return function(n){return e.cta.id===n.id}},gQ=function(e){return function(n){var a=_i(pi(n.cta.requireReferredUserLastName))(function(){return _i(pi(n.referredUserLastName===""))(function(){return Ad("Please enter the other person\u2019s last name")})}),t=_i(pi(n.cta.requireReferredUserFirstName))(function(){return _i(pi(n.referredUserFirstName===""))(function(){return Ad("Please enter the other person\u2019s first name")})}),r=_i(pi(lQ(AD)(n.referredUserEmail)))(function(){return Ad("Please enter a valid email address")}),u=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserLastName))(function(){return _i(pi(n.anonymousUserLastName===""))(function(){return Ad("Please enter your last name")})})}),i=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserFirstName))(function(){return _i(pi(n.anonymousUserFirstName===""))(function(){return Ad("Please enter your first name")})})}),l=_i(pi(Mt(e.user)))(function(){return _i(pi(n.cta.requireAnonymousUserEmail))(function(){return _i(pi(lQ(AD)(n.anonymousUserEmail)))(function(){return Ad("Please enter a valid email address")})})});return BD(i)(BD(u)(BD(l)(BD(t)(BD(a)(r)))))}},RQ=function(e){return function(n){return function(a){if(a instanceof sQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserFirstName:a.value0});if(a instanceof vQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserLastName:a.value0});if(a instanceof fQ)return tv({anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserEmail:a.value0});if(a instanceof _Q)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserFirstName:a.value0});if(a instanceof pQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,validationActive:n.validationActive,referredUserLastName:a.value0});if(a instanceof dQ)return tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserEmail:a.value0});if(a instanceof mQ){var t=Mt(gQ(e)(n));return t?lGe(cGe(sGe(r5({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return vGe(new bn(hQ.value))})))(function(){return tv(n)}):tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:!0})}throw new Error("Failed pattern match at Livestream.Ctas.Display.Referral (line 141, column 24 - line 170, column 45): "+[a.constructor.name])}}},yQ=function(e){return function(n){return function(a){var t=gQ(e)(n),r=function(E){return function(b){return function(I){return function(L){return function(N){return nL(E)([fGe("mb-2")(I),_Ge("form-control "+b)({type:"text",value:L,onChange:pGe(a)(function(z){return Me.create(N(Xs(z)))})})])}}}}},u=ga(Mt(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(fQ.create)),i=ga(Mt(e.user))(Se([ga(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(sQ.create)),ga(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(vQ.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(dQ.create),s=Se([ga(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(_Q.create)),ga(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(pQ.create))]),m=function(E){return a(Me.create(E))},p=function(E){return a(bn.create(E))},g=dGe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(tr("Close"))({onClick:cQ(p)(hQ.value)})(mGe("fe fe-x")(""));return hGe({body:Se([aL("row justify-content-end mt-n3")(g),DGe("mt-3")({id:ji})(n.cta.title),ha(n.cta.description)(gGe("")),nL("row")([i,u,s,l]),nL("row")([aL("col-auto my-auto")(RGe("btn btn-primary t--save")(an)({onClick:cQ(m)(mQ.value)})("Save")),aL("col my-auto text-danger")(ga(n.validationActive)(ha(t)(Xe)))])]),bodyClass:"t--cta-active",size:hf.value})}}},bQ=function(e){return tv({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var yGe=wa(Le),bGe=q(Qn),Sf=ut(Gr(Ca)),uE=en(Ke)(qn),HD=q(Rn),JD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$D=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wGe=function(){function e(){}return e.value=new e,e}(),wQ=function(e){return function(n){return function(a){var t=function(r){return a(Me.create(r))};if(n instanceof JD)return $V(e)(n.value0)(function(r){return t(iE.create(r))});if(n instanceof qD)return KV(n.value0)(function(r){return t(lE.create(r))});if(n instanceof WD)return rQ(n.value0)(function(r){return t(cE.create(r))});if(n instanceof $D)return yQ(e)(n.value0)(function(r){return t(sE.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},EQ=function(e){return function(n){return function(a){var t=yGe(bGe(new bn(wGe.value)));if(n instanceof JD&&a instanceof iE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(iE.create(r))})(JD.create)(JV(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return HD(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 qD&&a instanceof lE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(lE.create(r))})(qD.create)(YV(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return HD(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 WD&&a instanceof cE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(cE.create(r))})(WD.create)(oQ(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return HD(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 $D&&a instanceof sE){if(a.value0 instanceof Me)return Sf(function(r){return Me.create(sE.create(r))})($D.create)(RQ(e)(n.value0)(a.value0.value0));if(a.value0 instanceof bn)return uE(t)(function(){return HD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return HD(n)}}},IQ=function(e){return function(n){return e instanceof JD&&n instanceof Rl?qV(e.value0)(n.value0):e instanceof WD&&n instanceof yl?uQ(e.value0)(n.value0):e instanceof qD&&n instanceof bl?XV(e.value0)(n.value0):e instanceof $D&&n instanceof wl?DQ(e.value0)(n.value0):!1}},TQ=function(e){if(e instanceof Rl)return Sf(function(n){return Me.create(iE.create(n))})(JD.create)(WV(e.value0));if(e instanceof bl)return Sf(function(n){return Me.create(lE.create(n))})(qD.create)(ZV(e.value0));if(e instanceof yl)return Sf(function(n){return Me.create(cE.create(n))})(WD.create)(iQ(e.value0));if(e instanceof wl)return Sf(function(n){return Me.create(sE.create(n))})($D.create)(bQ(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var SQ=Yt(re),vE=Ce(be),EGe=Io(re),IGe=Pc(re)()(),CQ=kl(Iv),TGe=Yv(be),SGe=Zr()(),tL=uu(Be)(ct),rL=Yn(ma),FQ=$n(re)()(),CGe=$p(Qe),FGe=gn(Le),GGe=zs(Sr),MGe=ai(),AGe=te(nn),l0=q(Rn),LGe=Cv(ct),c0=en(Ke)(qn),xGe=Nt(Wr),oL=q(Qn),PGe=Bo(Qn)(Be),jGe=Zt(Qn),GQ=wa(Le),NGe=ut(Gr(Ca)),Ld=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iL=function(){function e(){}return e.value=new e,e}(),MQ=function(){function e(){}return e.value=new e,e}(),lL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AQ=function(e){return function(n){return function(a){var t=Se([SQ("text-center")("The host just asked a poll question!"),SQ("text-center")("To participate in live polls, please introduce yourself:"),wd({cancelButton:new S({text:"Not now",click:a(new Ld({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(lL.create(i))}),vE("small mt-3")([Td(e),vE("mt-2")([Xe("After submitting, you\u2019ll be able to answer all "),EGe("")("future"),Xe(" poll questions in this stream!")])])]),r=Se([IGe("font-weight-bold fw-bold")({id:ji})(n.poll.question),vE("d-flex flex-column ml-4")(CQ(function(i){return function(l){return TGe("form-check-label mb-2")([SGe("form-check-input mt-2 t--option")({checked:tL(i)(n.selected),onChange:rL(a)(new uL(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Xe(l)])}})(n.poll.options)),vE("d-flex justify-content-start mt-6")([FQ("btn btn-primary px-4 mr-3 t--submit")(an)({onClick:rL(a)(iL.value),disabled:Xu(n.selected)})("Submit answer"),FQ("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(an)({onClick:rL(a)(MQ.value)})("Do it later")])]),u=function(){if(e.user instanceof S)return"t--poll-active";if(e.user instanceof G)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 18 - line 57, column 45): "+[e.user.constructor.name])}();return CGe(u)(function(){if(e.user instanceof S)return r;if(e.user instanceof G)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])}())}}},LQ=function(e){return function(n){return function(a){var t=function(r){return FGe(GGe("Livestream: Poll Response")(Fs(_f(e.conference))(MGe({livestream_poll_id:AGe(n.poll.id),livestream_poll_question:n.poll.question,livestream_poll_skipped:function(){return r.skipped?"true":""}(),livestream_poll_multiselect:function(){return n.poll.multiSelect?"true":"false"}(),livestream_poll_response:r.option}))))};if(a instanceof Ld)return l0(n);if(a instanceof uL&&n.poll.multiSelect)return l0({poll:n.poll,registration:n.registration,selected:function(){var r=tL(a.value0)(n.selected);return r?LGe(a.value0)(n.selected):io(a.value0)(n.selected)}()});if(a instanceof uL)return l0({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof iL&&Xu(n.selected))return l0(n);if(a instanceof iL)return c0(Za(xGe(KF(n.poll)(n.selected))(function(r){return Ai(hl)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return oL(de)})})))(function(){return c0(Za(PGe(CQ(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return jGe(tL(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return c0(GQ(oL(new Ld({keepShowingPolls:!0}))))(function(){return l0(n)})})});if(a instanceof MQ)return c0(Za(KF(n.poll)([])))(function(){return c0(Za(t({skipped:!0,option:""})))(function(){return c0(GQ(oL(new Ld({keepShowingPolls:!0}))))(function(){return l0(n)})})});if(a instanceof lL)return NGe(lL.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(Ed(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 109, column 24 - line 156, column 55): "+[a.constructor.name])}}},xQ=function(e){return c0(Za(o5(e)))(function(){return l0({poll:e,selected:[],registration:Id})})};var PQ=en(Ke),OGe=PQ(ra),UGe=ee(ra),jQ=gn(Le),kGe=Bo(Qn)(Ku),BGe=zs(Sr),NQ=ai(),HGe=te(P0),JGe=te(tc),fE=te(nn),Gl=q(Rn),OQ=Gr(Ca),UQ=ut(OQ),kQ=ee(qn),BQ=Bt(OQ),Cf=PQ(qn),qGe=De(ct),Ff=q(la),zD=Ip(Le),VD=U(oe),WGe=U(zu),QD=ws(Be),cL=Aa(),HQ=Ni(cL(H({reflectSymbol:function(){return"poll_id"}})(on)(tn)))(Le),$Ge=fu(Le),zGe=De(er(Ah)),VGe=Ni(cL(H({reflectSymbol:function(){return"conference_id"}})(on)(tn)))(Le),sL=De(er(ct)),vL=Ni(cL(H({reflectSymbol:function(){return"id"}})(on)(tn)))(Le),KD=function(){function e(){}return e.value=new e,e}(),xd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),YD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Pd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_E=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JQ=function(e){return function(n){return function(a){if(n.stage instanceof KD)return ta;if(n.stage instanceof xd)return AQ(e)(n.stage.value0)(function(t){return a(Pd.create(t))});if(n.stage instanceof YD)return wQ(e)(n.stage.value0)(function(t){return a(_E.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},QGe=function(e){return function(n){return e instanceof YD?IQ(e.value0)(n):!1}},KGe=function(){return function(e){return function(n){return function(a){return OGe(Qt(100))(function(){return UGe(jQ(Rb(ji)))(function(t){return kGe(t)(function(r){return jQ(function(){var i=CG(JC(r))(),l=MO({x:i.left+1,y:i.top+1})(),s=TG(JC(l))();return BGe(n)(Fs(NQ(a))(Fs(_f(e.conference))(NQ({livestream_popup_visible:HGe(s===ji)}))))()})})})})}}}},qQ=KGe(),YGe=function(e){var n=function(){return qQ(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof Rl)return a({livestream_cta_target_conference_id:JGe(t.value0.conferenceId)});if(t instanceof bl)return a({livestream_cta_id:fE(t.value0.id)});if(t instanceof yl)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof wl)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 150, column 29 - line 167, column 8): "+[t.constructor.name])}},WQ=function(e){return function(n){return function(a){if(a instanceof Pd&&a.value0 instanceof Ld)return Gl({stage:KD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof Pd)return Gl(n);if(a instanceof _E){if(a.value0 instanceof bn)return Gl({showPolls:n.showPolls,stage:KD.value});var u=function(s){return Gl(n)};return a.value0 instanceof Me&&n.stage instanceof YD?UQ(_E.create)(function(s){return{showPolls:n.showPolls,stage:new YD(s)}})(EQ(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof pE&&n.showPolls)return kQ(BQ(Pd.create)(xQ(a.value0)))(function(p){return Cf(Za(qQ(e)("Livestream: Poll Popup Shown")({livestream_poll_id:fE(a.value0.id)})))(function(){return Gl({showPolls:n.showPolls,stage:new xd(p)})})});if(a instanceof pE)return Gl(n);var s=function(p){if(a instanceof fL||a instanceof jd&&QGe(n.stage)(a.value0))return Gl(n);if(a instanceof jd)return Cf(Za(YGe(e)(a.value0)))(function(){return kQ(BQ(_E.create)(TQ(a.value0)))(function(g){return Gl({showPolls:n.showPolls,stage:new YD(g)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof fL){if(n.stage instanceof xd){var m=n.stage.value0.poll.id===a.value0.pollId;return m?Gl({showPolls:n.showPolls,stage:KD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof pE){if(n.stage instanceof xd){var i=n.stage.value0.poll.id===a.value0.id;return i?Gl(n):u(!0)}return u(!0)}return u(!0)};return a instanceof Pd&&n.stage instanceof xd?UQ(Pd.create)(function(r){return{showPolls:n.showPolls,stage:new xd(r)}})(LQ(e)(n.stage.value0)(a.value0)):t(!0)}}},$Q=function(e){var n=function(u){return u instanceof wl?Ff(u.value0.id):G.value},a=function(u){return u instanceof bl?Ff(u.value0.id):G.value},t=function(u){return u instanceof yl?Ff(u.value0.id):G.value},r=function(u){return u instanceof Rl?Ff(u.value0.conferenceId):G.value};return Cf(zD(function(u){return VD(WGe(pE.create)(function(i){return i.poll}))(QD(function(){var i=qGe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(HQ(e.pusher.dataChannel)("show-poll")))(function(){return Cf($Ge(function(u){return new fL({pollId:u.poll_id})})(HQ(e.pusher.dataChannel)("hide-poll")))(function(){return Cf(zD(function(u){return VD(jd.create)(QD(function(){var i=zGe(Ff(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(VGe(e.pusher.dataChannel)("show-event-cta")))(function(){return Cf(zD(function(u){return VD(jd.create)(QD(function(){var i=sL(Ff(u.id));return function(l){return i(t(l))}}())(e.ctas))})(vL(e.pusher.dataChannel)("show-general-cta")))(function(){return Cf(zD(function(u){return VD(jd.create)(QD(function(){var i=sL(Ff(u.id));return function(l){return i(a(l))}}())(e.ctas))})(vL(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return Cf(zD(function(u){return VD(jd.create)(QD(function(){var i=sL(Ff(u.id));return function(l){return i(n(l))}}())(e.ctas))})(vL(e.pusher.dataChannel)("show-referral-cta")))(function(){return Gl({stage:KD.value,showPolls:!0})})})})})})})};var XGe=uc(),_L=Ce(be),ZGe=Yt(Qe),eMe=$a(be),nMe=tt(re),zQ=vi()(),VQ=Yt(re),aMe=Kt(re),dE=$n(re)()(),tMe=Xr(Nu),rMe=en(Ke),pL=Yn(ma),QQ=rMe(qn),oMe=DW(),dL=q(Rn),KQ=ee(Ve),uMe=mv(Qj),iMe=ii(pS),lMe=De(Eb),cMe=De(pc),sMe=zl()(),YQ=function(){function e(){}return e.value=new e,e}(),mL=function(){function e(){}return e.value=new e,e}(),XQ=function(){function e(){}return e.value=new e,e}(),hL=function(){function e(){}return e.value=new e,e}(),DL=function(){function e(){}return e.value=new e,e}(),mE=function(e){return function(n){return XGe({onDismiss:n(new bn(DL.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof YQ)return _L("text-center")([ga(e.confirmConferenceRegistration)(ZGe("mb-4")(eMe("badge badge-soft-primary bg-primary-soft")([nMe("fe fe-check mr-1")(""),Xe("You\u2019re registered!")]))),zQ("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),VQ("")("Connect with colleges when you attend or register for their livestreams?"),aMe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),_L("mx-md-6 mt-4")([dE("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(an)({onClick:tMe(function(){return n(new Me(XQ.value))(),n(new Me(hL.value))()})})("Yes, always connect"),dE("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(an)({onClick:pL(n)(new Me(hL.value))})("Only connect with "+e.school.name),dE("btn btn-link mt-3")(an)({onClick:pL(n)(new bn(DL.value))})("Close")])]);if(e.modalView instanceof mL)return _L("text-center")([zQ("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),VQ("")("Connection request sent!"),dE("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(an)({onClick:pL(n)(new bn(DL.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 74, column 13 - line 107, column 12): "+[e.modalView.constructor.name])}()})}},hE=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof XQ)return QQ(Za(oMe({publishScope:Pi.value,publishContext:zM.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return dL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:mL.value})});if(n.value0 instanceof hL)return QQ(Za(B9(e.school.id)(e.conference.id)))(function(){return dL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:mL.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 52, column 31 - line 64, column 44): "+[n.value0.constructor.name])}if(n instanceof bn)return dL(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 1 - line 51, column 55): "+[e.constructor.name,n.constructor.name])}},DE=function(e){return function(n){var a=Ue(!1)(KQ(e.dismissedNetworkSettingsModalAt)(function(r){return new S(uMe(iMe(yb(de))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,lMe(r.publishScope)(Pi.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return Ue(!1)(KQ(e.profile)(function(r){return new S(zT(cMe(!0))(t(r)))}))}},gE=function(e){return sMe(e)({modalView:YQ.value})};var XD=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}(),ZD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RE=function(){function e(){}return e.value=new e,e}();var ZQ=en(Ke),eK=ZQ(qn),gL=wa(Le),vMe=ZQ(ra),RL=q(Qn),yE=q(Rn),nK=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof XD&&t instanceof ZD?eK(gL(vMe(Qt(a.delay))(function(){return RL(e(RE.value))})))(function(){return yE(n({delay:a.delay,throttleState:new Nd(t.value0)}))}):a.throttleState instanceof Nd&&t instanceof ZD?yE(n({delay:a.delay,throttleState:new Nd(t.value0)})):a.throttleState instanceof Nd&&t instanceof RE?eK(gL(RL(a.throttleState.value0)))(function(){return yE(n({delay:a.delay,throttleState:XD.value}))}):yE(n(a))}}}},aK=function(e){return function(n){return gL(RL(e(new ZD(n))))}},tK=function(e){return{throttleState:XD.value,delay:e}};var bE=Ce(re),wE=Ce(be),fMe=Yt(re),rv=te(nn),_Me=Ur(sr),rK=Ce(Qe),pMe=Xt(re)()(),dMe=Io(re),mMe=$a(re),hMe=Ns(Qe),DMe=Ny(be)()(),oK=jc(na),EE=$n(re)()(),yL=Yn(ma),uK=uu(Be)(ct),iK=Ns(be),IE=Ql(re),gMe=Ql(Qe),RMe=Ql(be),yMe=Kv(be),bMe=zv(be),Od=Vv(re),wMe=Qv(be),TE=_e(ze),EMe=Ho(na),eg=en(Ke)(qn),bL=wa(Le),IMe=Nt(Wr),lK=q(Qn),Gf=q(Rn),wL=U(Ca),TMe=De(lU),cK=_u(na)(Be),SMe=Ye(Lt),CMe=Im(na),FMe=Cv(ct),GMe=fu(Le),MMe=tw(Le),SE=function(){function e(){}return e.value=new e,e}(),sK=function(){function e(){}return e.value=new e,e}(),vK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_K=function(){function e(){}return e.value=new e,e}(),pK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dK=function(){function e(){}return e.value=new e,e}(),IL=function(){function e(){}return e.value=new e,e}(),mK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),TL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hK=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return ta;var t=function(){if(n.stage instanceof SE)return ta;if(n.stage instanceof sK)return bE("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching...");throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 179, column 24 - line 184, column 25): "+[n.stage.constructor.name])}(),r=wE("d-flex flex-nowrap align-items-baseline")([fMe("")("Polls"),bE("text-muted ml-3 small")("Polls will be shown to viewers "+(rv(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(m){return function(p){var g=function(E){return function(b){var I=function(){if(m===0)return"0%";if(je)return rv(_Me(100*b|0)(m))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): "+[])}();return wE("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([bE("col-7 d-flex justify-content-end")(E),rK("col-4")(rK("progress")(pMe("progress-bar")({style:vt({width:I})})(""))),wE("col-1")([dMe("")(rv(b)),mMe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return hMe("t--poll-responses-"+rv(s.id))(DMe("py-0")({colSpan:6})(TR(g)(s.options)(p.optionCounts)))}}},i=function(s){var m=Ue(s.status)(oK(s.poll.id)(n.statuses)),p=EE("btn btn-white btn-sm px-4 t--open")(an)({onClick:yL(a)(new vK(s.poll))})("Launch poll");if(m instanceof Js)return p;if(m instanceof $c)return Se([EE("btn btn-success btn-sm px-4 mr-3")(an)({disabled:!0})("Poll LIVE"),EE("btn btn-danger btn-sm px-4 t--close")(an)({onClick:yL(a)(new fK(s.poll))})("Close poll")]);if(m instanceof qs)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[m.constructor.name])},l=function(s){var m=uK(s.poll.id)(n.expandedResponses),p=oK(s.poll.id)(n.responses),g=In(0)(function(I){return I.answered})(p),E=In(0)(function(I){return I.seen})(p),b=In(0)(function(I){return I.skipped})(p);return Se([iK("t--poll t--poll-"+rv(s.poll.id))([IE("pt-3")(function(){var I=Pt(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""}()+s.poll.question),gMe("text-nowrap")(i(s)),IE("t--shown")(rv(E)),RMe("t--answers")([Xe(rv(g)),EE("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return m?"up":"down t--expand-responses"}()))(tr(function(){return m?"Collapse responses":"Expand responses"}()))({onClick:yL(a)(new pK(s.poll.id))})("")]),IE("t--skipped")(rv(b)),IE("t--pending")(rv((E-g|0)-b|0))]),ga(m)(ha(p)(u(s.poll)(g)))])};return Se([r,wE("t--polls position-relative")([ha(n.error)(function(s){return bE("alert alert-danger")(s)}),yMe("table table-sm mb-0")([bMe("")([iK("")([Od("")("Question"),Od("")("Actions"),Od("")("# saw poll"),Od("")("# answered"),Od("")("# skipped"),Od("")("# not responded")])]),wMe("")(TE(EMe(function(s){return-function(m){return m.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},DK=function(e){return function(n){var a=function(t){return eg(bL(IMe(t)(function(r){return lK(_K.value)})))(function(){return Gf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:sK.value,error:G.value})})};return function(t){if(t instanceof vK)return a(wL(EL.create)(QF(t.value0)($c.value)));if(t instanceof fK)return a(wL(EL.create)(QF(t.value0)(qs.value)));if(t instanceof EL){var r=TE(wo(function(){var u=TMe($c.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return Gf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:cK(TE(t.value0)(function(u){return new sn(u.pollId,u.status)})),expandedResponses:SMe(n.expandedResponses)(CMe(r)),stage:SE.value})}if(t instanceof _K)return Gf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:SE.value,error:new S("That didn't work for some reason, try again")});if(t instanceof pK)return Gf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=uK(t.value0)(n.expandedResponses);return u?FMe(t.value0)(n.expandedResponses):io(t.value0)(n.expandedResponses)}()});if(t instanceof dK)return eg(aK(TL.create)(IL.value))(function(){return Gf(n)});if(t instanceof IL)return eg(bL(wL(mK.create)(d5(e.conference.id))))(function(){return Gf(n)});if(t instanceof mK)return Gf({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:cK(TE(t.value0)(function(u){return new sn(u.pollId,u.responses)}))});if(t instanceof TL)return nK(TL.create)(function(u){return{error:n.error,expandedResponses:n.expandedResponses,responses:n.responses,stage:n.stage,statuses:n.statuses,responseThrottle:u}})(n.responseThrottle)(t.value0);throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 196, column 22 - line 242, column 98): "+[t.constructor.name])}}},gK=function(e){return eg(GMe(cn(dK.value))(MMe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return eg(bL(lK(IL.value)))(function(){return Gf({statuses:Mi,responses:Mi,expandedResponses:[],responseThrottle:tK(500),stage:SE.value,error:G.value})})})};var RK=vi()(),yK=Ce(be),bK=Yt(re),wK=eo(re),EK=RK("img-fluid mb-6")({src:"/img/cv-logo-lilac-on-dark.svg",style:vt({width:"5em"})}),CE=function(e){return yK(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},ng=function(e){return CE("")([bK("text-center")(e)])},SL=CE("t--splashscreen-intro")([Ce(Qe)("text-center mt-7")(wK("")("The recording will load in a moment.")),EK]),FE=CE("px-4 px-md-6 t--splashscreen-intro")([RK("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),IK=CE("t--splashscreen-complete")([yK("text-center mt-7")([wK("")("The event is now over."),bK("")("Thank you for attending!"),_l(re)("")("A recording will be available to watch shortly.")]),EK]);var GE=e=>e.play();var Mf=$u(TK());Va();var SK=e=>{let[n,a]=Ua.useState(),[t,r]=Ua.useState(),u=Ua.useRef();return u.current=e,Ot(()=>{if(!t)return Mf.default.isSupported()?a(AMe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},AMe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new Mf.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(Mf.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case Mf.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(Mf.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(Mf.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(Mf.default.Events.INIT_PTS_FOUND,(r,u)=>a.current.onInitialPts&&a.current.onInitialPts({initPTS:u.initPTS})),hls.attachMedia(t),hls):(a.current.onCriticalFail&&a.current.onCriticalFail("Couldn't find element #"+n),null)};var LMe=xc();var CK=function(){return function(){return LMe(SK)}};Va();var lc={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var og=$u(PK()),jK=4,sAe=({trackColor:e,background:n})=>({props:a,children:t})=>Ua.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${jK}px`,borderRadius:`${jK*2}px`,background:n||e})}),...t),vAe=({horizontal:e})=>({props:n,isDragged:a})=>Ua.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Ua.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?lc.SECONDARY:lc.WHITE,stroke:lc.SECONDARY}),Ua.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Ua.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),NK=e=>Ua.createElement("div",{"aria-label":e.ariaLabel},Ua.createElement(og.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:sAe({trackColor:e.trackColor||lc.GRAY_300,background:e.fillBefore?(0,og.getTrackBackground)({values:[e.value],colors:[lc.PRIMARY,lc.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:vAe({horizontal:!0})}));var fAe=xc(),OK={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return ep}};var UK=function(e){return function(){return function(){return fAe(NK)}}};var _Ae=Xt(Qe)()(),pAe=UK(OK)()(),dAe=Yn(li),mAe=$n(Qe)()(),hAe=Yn(ma),kK=Ce(be),DAe=$a(re),xE=wa(Le),ML=q(Qn),BK=en(Ke),gAe=nt(cp),os=q(Rn),RAe=Wv(Le),AL=gn(Le),yAe=U(oe),bAe=Ac(up),wAe=BK(ra),Af=BK(qn),EAe=Zt(Rn),IAe=ee(ra),TAe=Dc(ui),SAe=Zt(_t),LL=function(){function e(){}return e.value=new e,e}(),xL=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}(),HK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qK=function(){function e(){}return e.value=new e,e}(),CAe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WK=function(e){return function(n){if(e.videoState instanceof G)return ta;if(e.videoState instanceof S){var a=_Ae("")({style:vt({minWidth:"6rem",width:"6rem"})})(pAe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:dAe(n)(function(i){return Me.create(xL.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if(je)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=mAe("btn large px-3 py-1 mr-3 text-white fe "+t)(tr("Mute the video"))({onClick:hAe(n)(new Me(LL.value))})(ta),u=kK("d-flex align-items-center text-white px-3")([Xe("LIVE"),DAe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return kK("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([ga(e.config.liveIndicator)(u),ga(e.config.mute)(r),ga(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 95, column 1 - line 95, column 50): "+[e.constructor.name,n.constructor.name])}},$K=function(e){return Me.create(PL.create(e))},zK=function(e){return xE(ML(new bn(new CAe(function(n){return function(){return e(n)(),new Me(new PL(n))}}))))},PE=function(){return new Me(new jL(!0))}(),VK=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:gAe}},QK=2e3,KK=function(e){return function(n){if(n instanceof bn)return os(e);if(n instanceof Me){var a=RAe(AL(function(){var i=si();return yAe(function(l){return Me.create(JK.create(l))})(bAe(QK)(i))})),t=wAe(Qt(QK))(function(){return ML(new Me(qK.value))}),r=function(u){if(n.value0 instanceof LL)return os(e);var i=function(l){if(n.value0 instanceof xL)return os(e);if(n.value0 instanceof PL)return Af(xE(AL(function(){var m=zC(n.value0.value0)(),p=WC(n.value0.value0)();return new Me(new HK({muted:m,volume:p}))})))(function(){return os(e)});if(n.value0 instanceof HK)return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S(n.value0.value0)});if(n.value0 instanceof jL)return Af(EAe(n.value0.value0)(a))(function(){return Af(xE(t))(function(){return os({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof JK)return os({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof qK)return Af(xE(IAe(AL(si))(function(s){var m=TAe(s)(e.visibilityExpiration);return m?ML(new Me(new jL(!1))):t})))(function(){return os(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof xL&&e.videoState instanceof S?Af(a)(function(){return Af(zK(function(l){return function(){return SAe(n.value0.value0>0)(G_(!1)(l))(),$C(n.value0.value0)(l)()}}))(function(){return os({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 LL&&e.videoState instanceof S?Af(a)(function(){return Af(zK(G_(!e.videoState.value0.muted)))(function(){return os({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])}},YK=function(e){if(e instanceof S)return!1;if(e instanceof G)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var XK=e=>n=>a=>()=>e.then(a,n),ZK=e=>e instanceof Error,eY=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var FAe=q(nl(nr)),GAe=Y0(nr),MAe=ln(_n),nY=ia(BR(WR)(nr)),AAe=Ss(nr),LAe=U(Mm(yc)),xAe=Bm(nr),PAe=rR(Bn),jAe=za(FN);var NAe=function(e){var n=function(a){if(ZK(a))return FAe(a);if(je)return GAe(new Um(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return jt(function(a){return Iu("Promise failed: "+eY(e))})(MAe)(Np(nY(n(e))(nY(AAe("Error")(e))(LAe(Iu)(xAe(e))))))},jE=function(e){return kv(function(n){return PAe(jAe)(XK(e)(function(a){return n(Ie.create(NAe(a)))()})(function(a){return n(Te.create(a))()}))})};var OAe=ee(Ve),UAe=Ce(Qe),NL=Xr(Ay),ug=ee(vr),OL=bs(_t)(Ku),v0=Yn(ma),aY=Rp(re)()(),kAe=CK()(),BAe=q(_t),tY=Yn(li),rY=Xt(Qe)()(),HAe=$n(be)()(),JAe=tt(re),qAe=Ce(be),oY=en(Ke),WAe=Vs(Le)(),$Ae=wu(Be)(ot),zAe=De(er(ct)),Ud=oY(ra),VAe=fc(Qn),QAe=Rr(pp),mo=q(Qn),uY=gn(Le),iY=Nt(Wr),lY=rm(ra),ao=q(Rn),ho=oY(qn),Hu=wa(Le),cY=U(Ca),sY=Wv(Le),vY=U(Bn),KAe=ut(Gr(Ca)),YAe=U(oe),XAe=_e(oe),fY=Ye(zj),_Y=function(){function e(){}return e.value=new e,e}(),pY=function(){function e(){}return e.value=new e,e}(),ig=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dY=function(){function e(){}return e.value=new e,e}(),kd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mY=function(){function e(){}return e.value=new e,e}(),hY=function(){function e(){}return e.value=new e,e}(),DY=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}(),kL=function(){function e(){}return e.value=new e,e}(),NE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gY=function(){function e(){}return e.value=new e,e}(),BL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HL=function(){function e(){}return e.value=new e,e}(),RY=function(){function e(){}return e.value=new e,e}(),yY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),f0=function(){function e(){}return e.value=new e,e}(),us=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lg=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qL=function(e){var n=e.Monad0(),a=ee(n.Bind1()),t=gn(e),r=q(n.Applicative0());return function(u){return function(i){return function(l){return a(t(Rb(u.videoId)))(function(s){return In(r(i.whenNotFound))(l)(OAe(s)(IO))})}}}},bY=qL(Sr),WL=qL(Le),wY=function(e){var n=qL(e);return function(a){return n(a)({whenNotFound:de})}},ZAe=wY(Sr),eLe=wY(Le),BE=function(e){return function(n){return function(a){var t=function(){var I=UAe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof dY)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof mY)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof ig)return I(e.introScreen);if(n.stage instanceof kd)return ta;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 243, column 20 - line 254, column 16): "+[n.stage.constructor.name])}(),r=function(){return n.stage instanceof ig?n.stage.value0.reset:!1}(),u=NL(function(I){return ug(gb(I))(OL(function(L){return a(new Me(new JL({time:L})))}))}),i=NL(function(I){return ug(gb(I))(OL(function(L){return a(new Me(new kE({playing:!0,time:L})))}))}),l=function(I){return a(bn.create(I))},s=NL(function(I){return ug(gb(I))(OL(function(L){return l(new BL(L))}))}),m=v0(l)(gY.value),p=Se([aY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s})(""),ga(!r)(kAe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(hY.value),onError:function(I,L){return de},onCriticalFail:tY(l)(function(I){var L=I==="networkError";return L?kL.value:new NE("HLS player crashed")}),onReady:l(new OE({autoPlay:e.autoPlay})),onInitialPts:tY(l)(function(I){return new yY(I.initPTS)})}))]),g=function(){return n.stage instanceof kd&&n.stage.value0.unmuteOverlay?rY("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:vt({pointerEvents:"none"})})(HAe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(an)({onClick:v0(l)(RY.value),style:vt({pointerEvents:"all"})})([Xe("click for sound"),JAe("fe fe-volume-2 ml-2")("")])):ta}(),E=function(I){return rY("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:v0(l)(new us(PE)),onMouseDown:v0(l)(new us(PE)),onTouchStart:v0(l)(new us(PE))})(WK(I)(function(L){return l(us.create(L))}))},b=aY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),playsInline:!0,onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:v0(l)(new OE({autoPlay:e.autoPlay})),onError:v0(l)(kL.value),src:function(){return r?"":e.watchUrl}()})("");return qAe("position-relative w-100")([function(){if(n.support instanceof _Y)return p;if(n.support instanceof pY)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 164, column 7 - line 166, column 40): "+[n.support.constructor.name])}(),ha(n.customControls)(E),ga(n.allowSound)(g),t])}}},nLe=function(e){var n=gn(e.MonadEffect0());return function(a){return n(function(){return ZAe(a)(G_(!1))(),HL.value})}},aLe=nLe(NO),$L=function(e){return WAe("Livestream: Error")({livestream_error_message:e})},EY=function(e){return bY(e)({whenNotFound:!1})(qC)},tLe=function(e){return gn(e)(function(){var a=ug(ug(pu)(YC))(KC)();return $Ae(function(t){return zAe(zy(t)(a))(new S(0))})(["iPad","iPod","iPhone"])})},IY=tLe(Le),rLe=function(e){var n=function(t){return Ud(VAe(e.allowSound)(QAe(Iu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return Ud(jE(GE(t)))(function(){return mo(new UE({unmuteOverlay:!1}))})})},a=function(t){return Ud(uY(G_(!0)(t)))(function(){return Ud(jE(GE(t)))(function(){return mo(new UE({unmuteOverlay:!0}))})})};return WL(e)({whenNotFound:new NE("