var Purs_EntryPoints_Livestream_Livestream=(()=>{var nee=Object.create;var tR=Object.defineProperty;var aee=Object.getOwnPropertyDescriptor;var tee=Object.getOwnPropertyNames;var ree=Object.getPrototypeOf,oee=Object.prototype.hasOwnProperty;var H2=e=>tR(e,"__esModule",{value:!0});var uee=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ge=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),J2=(e,n)=>{H2(e);for(var a in n)tR(e,a,{get:n[a],enumerable:!0})},iee=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of tee(n))!oee.call(e,t)&&t!=="default"&&tR(e,t,{get:()=>n[t],enumerable:!(a=aee(n,t))||a.enumerable});return e},Wu=e=>iee(H2(tR(e!=null?nee(ree(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var gy={};J2(gy,{Children:()=>D_,Component:()=>g_,Fragment:()=>IS,PureComponent:()=>hre,Suspense:()=>Dre,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>pre,cloneElement:()=>Xm,createContext:()=>ES,createElement:()=>pt,createRef:()=>Dy,default:()=>Ga,forwardRef:()=>Fi,isValidElement:()=>TS,lazy:()=>dre,memo:()=>mre,useCallback:()=>Zm,useContext:()=>gre,useEffect:()=>Ot,useImperativeHandle:()=>Ls,useLayoutEffect:()=>eh,useMemo:()=>nh,useReducer:()=>Rre,useRef:()=>st,useState:()=>Wl,version:()=>yre});var Ga,pre,D_,Xm,g_,ES,pt,Dy,Fi,IS,TS,dre,mre,hre,Dre,Zm,gre,Ot,Ls,eh,nh,Rre,st,Wl,yre,$a=uee(()=>{Ga=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:pre,Children:D_,cloneElement:Xm,Component:g_,createContext:ES,createElement:pt,createRef:Dy,forwardRef:Fi,Fragment:IS,isValidElement:TS,lazy:dre,memo:mre,PureComponent:hre,Suspense:Dre,useCallback:Zm,useContext:gre,useEffect:Ot,useImperativeHandle:Ls,useLayoutEffect:eh,useMemo:nh,useReducer:Rre,useRef:st,useState:Wl,version:yre}=window.React});var CS=Ge((tan,BN)=>{"use strict";var kN=Object.getOwnPropertySymbols,Nre=Object.prototype.hasOwnProperty,Ore=Object.prototype.propertyIsEnumerable;function Ure(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function kre(){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=kre()?Object.assign:function(e,n){for(var a,t=Ure(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&&(_l=Symbol.for,mp=_l("react.element"),HN=_l("react.portal"),Rt.Fragment=_l("react.fragment"),Rt.StrictMode=_l("react.strict_mode"),Rt.Profiler=_l("react.profiler"),JN=_l("react.provider"),qN=_l("react.context"),WN=_l("react.forward_ref"),Rt.Suspense=_l("react.suspense"),$N=_l("react.memo"),zN=_l("react.lazy"));var _l,VN=typeof Symbol=="function"&&Symbol.iterator;function Bre(e){return e===null||typeof e!="object"?null:(e=VN&&e[VN]||e["@@iterator"],typeof e=="function"?e:null)}function rh(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";r3.exports=t3()});var C3=Ge(Dp=>{"use strict";var $l=CS(),Ps=o3();function yr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;aih;ih++)$o[ih]=ih+1;var $o,ih;$o[15]=0;var Vre=/^[: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:Vre.test(e)?p3[e]=!0:(_3[e]=!0,!1)}function Qre(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 Kre(e,n,a,t){if(n===null||typeof n=="undefined"||Qre(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 Yre=/["'&<>]/;function y_(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Yre.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 w_=null,aoe={readContext:function(e){var n=w_.threadID;return uh(e,n),e[n]},useContext:function(e){b_();var n=w_.threadID;return uh(e,n),e[n]},useMemo:y3,useReducer:R3,useRef:function(e){Lc=b_(),ir=WS();var n=ir.memoizedState;return n===null?(e={current:e},ir.memoizedState=e):n},useState:function(e){return 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 b_(),e},useTransition:function(){return b_(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(w_.identifierPrefix||"")+"R:"+(w_.uniqueID++).toString(36)},useMutableSource:function(e,n){return b_(),n(e._source)}},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},toe=$l({menuitem:!0},E3),ch={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},roe=["Webkit","ms","Moz","O"];Object.keys(ch).forEach(function(e){roe.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ch[n]=ch[e]})});var ooe=/([A-Z])/g,uoe=/^ms-/,Jv=Ps.Children.toArray,zS=$re.ReactCurrentDispatcher,ioe={listing:!0,pre:!0,textarea:!0},loe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,I3={},VS={};function coe(e){if(e==null)return e;var n="";return Ps.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var soe=Object.prototype.hasOwnProperty,voe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function T3(e,n){if(e===void 0)throw Error(yr(152,oh(n)||"Component"))}function foe(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,m=zre(l,n,a,s),p=[],g=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(ne,ue){g=!0,p=[ue]},enqueueSetState:function(ne,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,m,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=$l({},s.state,b))}}else if(Lc={},s=l(i.props,m,E),s=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,w_=t,D3()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?y_(r):this.previousWasTextNode?""+y_(r):(this.previousWasTextNode=!0,y_(r));if(t=foe(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,$l({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 uh(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,$l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(yr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===b3.html&&w3(u),!I3.hasOwnProperty(u)){if(!loe.test(u))throw Error(yr(65,u));I3[u]=!0}var i=a.props;if(u==="input")i=$l({type:void 0},i,{defaultChecked:void 0,defaultValue:void 0,value:i.value!=null?i.value:i.defaultValue,checked:i.checked!=null?i.checked:i.defaultChecked});else if(u==="textarea"){var l=i.value;if(l==null){l=i.defaultValue;var s=i.children;if(s!=null){if(l!=null)throw Error(yr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(yr(93));s=s[0]}l=""+s}l==null&&(l="")}i=$l({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=$l({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var m=coe(i.children);if(s!=null){var p=i.value!=null?i.value+"":m;if(l=!1,Array.isArray(s)){for(var g=0;g":(ue+=">",l="");e:{if(s=i.dangerouslySetInnerHTML,s!=null){if(s.__html!=null){s=s.__html;break e}}else if(s=i.children,typeof s=="string"||typeof s=="number"){s=y_(s);break e}s=null}return s!=null?(i=[],ioe.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((ian,F3)=>{"use strict";F3.exports=C3()});var Q7=Ge((zb,HF)=>{(function(n,a){typeof zb=="object"&&typeof HF=="object"?HF.exports=a():typeof define=="function"&&define.amd?define([],a):typeof zb=="object"?zb.Pusher=a():n.Pusher=a()})(window,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="",a(a.s=2)}([function(e,n,a){"use strict";var t=this&&this.__extends||function(){var b=function(I,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var $ in z)z.hasOwnProperty($)&&(N[$]=z[$])},b(I,L)};return function(I,L){b(I,L);function N(){this.constructor=I}I.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(I){I===void 0&&(I="="),this._paddingCharacter=I}return b.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},b.prototype.encode=function(I){for(var L="",N=0;N>>3*6&63),L+=this._encodeByte(z>>>2*6&63),L+=this._encodeByte(z>>>1*6&63),L+=this._encodeByte(z>>>0*6&63)}var $=I.length-N;if($>0){var z=I[N]<<16|($===2?I[N+1]<<8:0);L+=this._encodeByte(z>>>3*6&63),L+=this._encodeByte(z>>>2*6&63),$===2?L+=this._encodeByte(z>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},b.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},b.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),N=I.length-L,z=new Uint8Array(this.maxDecodedLength(N)),$=0,ne=0,ue=0,Z=0,Y=0,X=0,ve=0;ne>>4,z[$++]=Y<<4|X>>>2,z[$++]=X<<6|ve,ue|=Z&r,ue|=Y&r,ue|=X&r,ue|=ve&r;if(ne>>4,ue|=Z&r,ue|=Y&r),ne>>2,ue|=X&r),ne>>8&0-65-26+97,L+=51-I>>>8&26-97-52+48,L+=61-I>>>8&52-48-62+43,L+=62-I>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(I){var L=r;return L+=(42-I&I-44)>>>8&-r+I-43+62,L+=(46-I&I-48)>>>8&-r+I-47+63,L+=(47-I&I-58)>>>8&-r+I-48+52,L+=(64-I&I-91)>>>8&-r+I-65+0,L+=(96-I&I-123)>>>8&-r+I-97+26,L},b.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var N=I.length-1;N>=0&&I[N]===this._paddingCharacter;N--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var m=function(b){t(I,b);function I(){return b!==null&&b.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var N=L;return N+=65,N+=25-L>>>8&0-65-26+97,N+=51-L>>>8&26-97-52+48,N+=61-L>>>8&52-48-62+45,N+=62-L>>>8&62-45-63+95,String.fromCharCode(N)},I.prototype._decodeChar=function(L){var N=r;return N+=(44-L&L-46)>>>8&-r+L-45+62,N+=(94-L&L-96)>>>8&-r+L-95+63,N+=(47-L&L-58)>>>8&-r+L-48+52,N+=(64-L&L-91)>>>8&-r+L-65+0,N+=(96-L&L-123)>>>8&-r+L-97+26,N},I}(u);n.URLSafeCoder=m;var p=new m;function g(b){return p.encode(b)}n.encodeURLSafe=g;function E(b){return p.decode(b)}n.decodeURLSafe=E,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",r="utf8: invalid source encoding";function u(s){for(var m=new Uint8Array(i(s)),p=0,g=0;g>6,m[p++]=128|E&63):E<55296?(m[p++]=224|E>>12,m[p++]=128|E>>6&63,m[p++]=128|E&63):(g++,E=(E&1023)<<10,E|=s.charCodeAt(g)&1023,E+=65536,m[p++]=240|E>>18,m[p++]=128|E>>12&63,m[p++]=128|E>>6&63,m[p++]=128|E&63)}return m}n.encode=u;function i(s){for(var m=0,p=0;p=s.length-1)throw new Error(t);p++,m+=4}else throw new Error(t)}return m}n.encodedLength=i;function l(s){for(var m=[],p=0;p=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);g=(g&31)<<6|b&63,E=128}else if(g<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],I=s[++p];if((b&192)!=128||(I&192)!=128)throw new Error(r);g=(g&15)<<12|(b&63)<<6|I&63,E=2048}else if(g<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],I=s[++p],L=s[++p];if((b&192)!=128||(I&192)!=128||(L&192)!=128)throw new Error(r);g=(g&15)<<18|(b&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(g=55296&&g<=57343)throw new Error(r);if(g>=65536){if(g>1114111)throw new Error(r);g-=65536,m.push(String.fromCharCode(55296|g>>10)),g=56320|g&1023}}m.push(String.fromCharCode(g))}return m.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function h(d,R){this.lastId=0,this.prefix=d,this.name=R}return h.prototype.create=function(d){this.lastId++;var R=this.lastId,M=this.prefix+R,A=this.name+"["+R+"]",Q=!1,we=function(){Q||(d.apply(null,arguments),Q=!0)};return this[R]=we,{number:R,id:M,name:A,callback:we}},h.prototype.remove=function(d){delete this[d.number]},h}(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function h(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return h.prototype.load=function(d,R,M){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(M);else{A.loading[d]=[M];var Q=Xa.createScriptRequest(A.getPath(d,R)),we=A.receivers.create(function(_n){if(A.receivers.remove(we),A.loading[d]){var da=A.loading[d];delete A.loading[d];for(var wt=function(Po){Po||Q.cleanup()},or=0;or>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},$=function(h){return h.replace(/[^\x00-\x7F]/g,z)},ne=function(h){var d=[0,2,1][h.length%3],R=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),M=[b.charAt(R>>>18),b.charAt(R>>>12&63),d>=2?"=":b.charAt(R>>>6&63),d>=1?"=":b.charAt(R&63)];return M.join("")},ue=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,ne)},Z=function(){function h(d,R,M,A){var Q=this;this.clear=R,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},M)}return h.prototype.isRunning=function(){return this.timer!==null},h.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},h}(),Y=Z,X=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}();function ve(h){window.clearTimeout(h)}function Pe(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,Pe,R,function(A){return M(),A})||this}return d}(Y),wn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(h){return new ke(0,h)},method:function(h){for(var d=[],R=1;R0)for(var A=0;A=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}},se=ss,Ll=function(){var h=function(d,R){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Q in A)A.hasOwnProperty(Q)&&(M[Q]=A[Q])},h(d,R)};return function(d,R){h(d,R);function M(){this.constructor=d}d.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)}}(),xl=function(h){Ll(d,h);function d(R,M){var A=h.call(this)||this;return A.id=R,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(R){return this.transport.send(R)},d.prototype.send_event=function(R,M,A){var Q={event:R,data:M};return A&&(Q.channel=A),sn.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(_n){R.emit("error",{type:"MessageParseError",error:_n,data:Q.data})}if(we!==void 0){switch(sn.debug("Event recd",we),we.event){case"pusher:error":R.emit("error",{type:"PusherError",data:we.data});break;case"pusher:ping":R.emit("ping");break;case"pusher:pong":R.emit("pong");break}R.emit("message",we)}},activity:function(){R.emit("activity")},error:function(Q){R.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&R.handleCloseEvent(Q),R.transport=null,R.emit("closed")}},A=function(){zn(M,function(Q,we){R.transport.unbind(we,Q)})};zn(M,function(Q,we){R.transport.bind(we,Q)})},d.prototype.handleCloseEvent=function(R){var M=se.getCloseAction(R),A=se.getCloseError(R);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},d}(_a),vs=xl,Pl=function(){function h(d,R){this.transport=d,this.callback=R,this.bindListeners()}return h.prototype.close=function(){this.unbindListeners(),this.transport.close()},h.prototype.bindListeners=function(){var d=this;this.onMessage=function(R){d.unbindListeners();var M;try{M=se.processHandshake(R)}catch(A){d.finish("error",{error:A}),d.transport.close();return}M.action==="connected"?d.finish("connected",{connection:new vs(M.id,d.transport),activityTimeout:M.activityTimeout}):(d.finish(M.action,{error:M.error}),d.transport.close())},this.onClosed=function(R){d.unbindListeners();var M=se.getCloseAction(R)||"backoff",A=se.getCloseError(R);d.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},h.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},h.prototype.finish=function(d,R){this.callback(mn({transport:this.transport,action:d},R))},h}(),Ki=Pl,Hd=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}(),jf=Hd,R0=function(){function h(d,R){this.timeline=d,this.options=R||{}}return h.prototype.send=function(d,R){this.timeline.isEmpty()||this.timeline.send(Xa.TimelineTransport.getAgent(this,d),R)},h}(),y0=R0,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)}}(),Ru=function(h){Yi(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){Yi(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){Yi(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),Jd=function(h){Yi(d,h);function d(R){var M=this.constructor,A=h.call(this,R)||this;return Object.setPrototypeOf(A,M.prototype),A}return d}(Error),w0=function(h){Yi(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){Yi(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){Yi(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){sn.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");sn.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?(sn.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=Xi.createAuthorizer(this,this.pusher.config);return A.authorize(R,M)},d}(Ig),qd=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 _n=Da.buildLogSuffix("authenticationEndpoint");sn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+_n)),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}(qd),SI=Sg,Cg=a(1),Wd=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 _n=we.shared_secret;if(!_n){var da="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,da);return}A.key=Object(Wd.decode)(_n),delete we.shared_secret,M(!1,we)})},d.prototype.trigger=function(R,M){throw new w0("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(R){var M=R.event,A=R.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){h.prototype.handleEvent.call(this,R);return}this.handleEncryptedEvent(M,A)},d.prototype.handleEncryptedEvent=function(R,M){var A=this;if(!this.key){sn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){sn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Q=Object(Wd.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),sn.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 Oa(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 Xi.createEncryptedChannel(h,d,d.config.nacl);var R="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=Da.buildLogSuffix("encryptedChannelSupport");throw new w0(R+". "+M)}else return h.indexOf("private-")===0?Xi.createPrivateChannel(h,d):h.indexOf("presence-")===0?Xi.createPresenceChannel(h,d):Xi.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 qd(h,d)},createPresenceChannel:function(h,d){return new SI(h,d)},createEncryptedChannel:function(h,d,R){return new GI(h,d,R)},createTimelineSender:function(h,d){return new y0(h,d)},createAuthorizer:function(h,d){return d.authorizer?d.authorizer(h,d):new jf(h,d)},createHandshake:function(h,d){return new Ki(h,d)},createAssistantToTheTransportManager:function(h,d,R){return new vc(h,d,R)}},Xi=PI,jI=function(){function h(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return h.prototype.getAssistant=function(d){return Xi.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,_n=null,da=function(wt,or){or?R(null,or):(Q=Q+1,M.loop&&(Q=Q%A.length),Q0&&(Q=new ke(M.timeout,function(){we.abort(),A(!0)})),we=d.connect(R,function(_n,da){_n&&Q&&Q.isRunning()&&!M.failFast||(Q&&Q.ensureAborted(),A(_n,da))}),{abort:function(){Q&&Q.ensureAborted(),we.abort()},forceMinPriority:function(_n){we.forceMinPriority(_n)}}},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}Aa(A,function(_n){_n.forceMinPriority(we.transport.priority)}),R(null,we)}})},h}(),$d=OI;function UI(h,d,R){var M=sa(h,function(A,Q,we,_n){return A.connect(d,R(Q,_n))});return{abort:function(){Aa(M,zd)},forceMinPriority:function(A){Aa(M,function(Q){Q.forceMinPriority(A)})}}}function Ag(h){return Dn(h,function(d){return Boolean(d.error)})}function zd(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 _n=dn.now(),da=Q.pop().connect(d,function wt(or,Po){or?(xg(M),Q.length>0?(_n=dn.now(),da=Q.pop().connect(d,wt)):R(or)):(HI(M,Po.transport.name,dn.now()-_n),R(null,Po))});return{abort:function(){da.abort()},forceMinPriority:function(wt){d=wt,da&&da.forceMinPriority(wt)}}},h}(),BI=kI;function Vd(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function Lg(h){var d=Xa.getLocalStorage();if(d)try{var R=d[Vd(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[Vd(h)]=La({timestamp:dn.now(),transport:d,latency:R})}catch{}}function xg(h){var d=Xa.getLocalStorage();if(d)try{delete d[Vd(h)]}catch{}}var JI=function(){function h(d,R){var M=R.delay;this.strategy=d,this.options={delay:M}}return h.prototype.isSupported=function(){return this.strategy.isSupported()},h.prototype.connect=function(d,R){var M=this.strategy,A,Q=new ke(this.options.delay,function(){A=M.connect(d,R)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(we){d=we,A&&A.forceMinPriority(we)}}},h}(),E0=JI,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}(),Nf=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 jl(h){return function(){return h.isSupported()}}var jg=function(h,d,R){var M={};function A(Or,eR,nR,RT,aR){var w=R(h,Or,eR,nR,RT,aR);return M[Or]=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}),_n=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}),or=new Mg({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Po=A("ws","ws",3,Q,wt),Di=A("wss","ws",3,we,wt),mT=A("sockjs","sockjs",1,_n),zg=A("xhr_streaming","xhr_streaming",1,_n,or),Vg=A("xdr_streaming","xdr_streaming",1,_n,or),Qg=A("xhr_polling","xhr_polling",1,_n),hT=A("xdr_polling","xdr_polling",1,_n),Kg=new _s([Po],da),DT=new _s([Di],da),gT=new _s([mT],da),Yg=new _s([new Nf(jl(zg),zg,Vg)],da),Xg=new _s([new Nf(jl(Qg),Qg,hT)],da),Zg=new _s([new Nf(jl(Yg),new $d([Yg,new E0(Xg,{delay:4e3})]),Xg)],da),em=new Nf(jl(Zg),Zg,gT),nm;return d.useTLS?nm=new $d([Kg,new E0(em,{delay:2e3})]):nm=new $d([Kg,new E0(DT,{delay:2e3}),new E0(em,{delay:5e3})]),new BI(new WI(new Nf(jl(Po),nm,em)),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,Of;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(Of||(Of={}));var Zi=Of,KI=1,Bg=function(){function h(d,R){this.hooks=d,this.session=Ju(1e3)+"/"+Nl(8),this.location=YI(R),this.readyState=Zi.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===Zi.OPEN)try{return Xa.createSocketRequest("POST",Qd(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=Zi.CLOSED,this.onclose&&this.onclose({code:d,reason:R,wasClean:M})},h.prototype.onChunk=function(d){if(d.status===200){this.readyState===Zi.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)}},Kd=ps;Kd.createXDR=function(h,d){return this.createRequest(VI,h,d)};var rT=Kd,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 hi},createWebSocket:function(h){var d=this.getWebSocketAPI();return new d(h)},createSocketRequest:function(h,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var h=this.getXHRAPI();return Boolean(h)&&new h().withCredentials!==void 0},isXDRSupported:function(h){var d=h?"https:":"http:",R=this.getProtocol();return Boolean(window.XDomainRequest)&&R===d},addUnloadListener:function(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener:function(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)}},Xa=oT,I0;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(I0||(I0={}));var T0=I0,uT=function(){function h(d,R,M){this.key=d,this.session=R,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return h.prototype.log=function(d,R){d<=this.options.level&&(this.events.push(mn({},R,{timestamp:dn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},h.prototype.error=function(d){this.log(T0.ERROR,d)},h.prototype.info=function(d){this.log(T0.INFO,d)},h.prototype.debug=function(d){this.log(T0.DEBUG,d)},h.prototype.isEmpty=function(){return this.events.length===0},h.prototype.send=function(d,R){var M=this,A=mn({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],d(A,function(Q,we){Q||M.sent++,R&&R(Q,we)}),!0},h.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},h}(),qg=uT,Yd=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 Vhe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";j5.exports=Vhe});var B5=Ge((_Sa,k5)=>{"use strict";var Qhe=N5();function O5(){}function U5(){}U5.resetWarningCache=O5;k5.exports=function(){function e(t,r,u,i,l,s){if(s!==Qhe){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:U5,resetWarningCache:O5};return a.PropTypes=a,a}});var J5=Ge((mSa,H5)=>{H5.exports=B5()();var pSa,dSa});var hG=Ge(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var q5=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],vw=q5.join(","),W5=typeof Element=="undefined",H_=W5?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dG=!W5&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},$5=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(vw));return a&&H_.call(n,vw)&&r.unshift(n),r=r.filter(t),r},z5=function e(n,a,t){for(var r=[],u=Array.from(n);u.length;){var i=u.shift();if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,m=e(s,!0,t);t.flatten?r.push.apply(r,m):r.push({scope:i,candidates:m})}else{var p=H_.call(i,vw);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var g=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(g&&E){var b=e(g===!0?i.children:g.children,!0,t);t.flatten?r.push.apply(r,b):r.push({scope:i,candidates:b})}else u.unshift.apply(u,i.children)}}return r},V5=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},Khe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},Q5=function(n){return n.tagName==="INPUT"},Yhe=function(n){return Q5(n)&&n.type==="hidden"},Xhe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},Zhe=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(H_.call(i,"details:not([open]) *"))return!0;var l=dG(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=dG(n);if(p&&!p.shadowRoot&&r(p)===!0)return K5(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 K5(n);return!1},rDe=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)},uDe=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=V5(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(Khe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},iDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=z5([n],a.includeContainer,{filter:mG.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:oDe}):t=$5(n,a.includeContainer,mG.bind(null,a)),uDe(t)},lDe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=z5([n],a.includeContainer,{filter:fw.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=$5(n,a.includeContainer,fw.bind(null,a)),t},cDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return H_.call(n,vw)===!1?!1:mG(a,n)},sDe=q5.concat("iframe").join(","),vDe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return H_.call(n,sDe)===!1?!1:fw(a,n)};qp.focusable=lDe;qp.isFocusable=vDe;qp.isTabbable=cDe;qp.tabbable=iDe});var a9=Ge(DG=>{"use strict";Object.defineProperty(DG,"__esModule",{value:!0});var Qs=hG();function Y5(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 X5(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()}}}(),_De=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},pDe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},dDe=function(n){return n.key==="Tab"||n.keyCode===9},e9=function(n){return setTimeout(n,0)},n9=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,_De(Y)&&Y.select()}},b=function(Y){var X=m("setReturnFocus",Y);return X||(X===!1?!1:Y)},I=function(Y){var X=_w(Y);if(!(s(X)>=0)){if(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=_w(Y),ve=s(X)>=0;ve||X instanceof Document?ve&&(u.mostRecentlyFocusedNode=X):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},N=function(Y){var X=_w(Y);g();var ve=null;if(u.tabbableGroups.length>0){var Pe=s(X),ke=Pe>=0?u.containerGroups[Pe]:void 0;if(Pe<0)Y.shiftKey?ve=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:ve=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var rn=n9(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=Pe),rn>=0){var wn=rn===0?u.tabbableGroups.length-1:rn-1,dn=u.tabbableGroups[wn];ve=dn.lastTabbableNode}}else{var mn=n9(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=Pe),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(pDe(Y)&&Wh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(dDe(Y)){N(Y);return}},$=function(Y){var X=_w(Y);s(X)>=0||Wh(r.clickOutsideDeactivates,Y)||Wh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},ne=function(){if(!!u.active)return Z5.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?e9(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"),Pe=l(Y,"checkCanFocusTrap");Pe||g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,X&&X();var ke=function(){Pe&&g(),ne(),ve&&ve()};return Pe?(Pe(u.containers.concat()).then(ke,ke),this):(ke(),this)},deactivate:function(Y){if(!u.active)return this;var X=X5({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,Z5.deactivateTrap(i);var ve=l(X,"onDeactivate"),Pe=l(X,"onPostDeactivate"),ke=l(X,"checkCanReturnFocus"),rn=l(X,"returnFocus","returnFocusOnDeactivate");ve&&ve();var wn=function(){e9(function(){rn&&E(b(u.nodeFocusedBeforeActivation)),Pe&&Pe()})};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};DG.createFocusTrap=mDe});var o9=Ge((gSa,r9)=>{"use strict";function gG(e){return gG=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},gG(e)}function hDe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function t9(e,n){for(var a=0;a1?p-1:0),E=1;E element.");var i=function(m){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(m):u.ref&&(u.ref.current=m)),r.focusTrapElements=p||[m]},l=dw.cloneElement(u,{ref:i});return l}return null}}]),a}(dw.Component),zh=typeof Element=="undefined"?Function:Element;yG.propTypes={active:Na.bool,paused:Na.bool,focusTrapOptions:Na.shape({document:Na.object,onActivate:Na.func,onPostActivate:Na.func,checkCanFocusTrap:Na.func,onDeactivate:Na.func,onPostDeactivate:Na.func,checkCanReturnFocus:Na.func,initialFocus:Na.oneOfType([Na.instanceOf(zh),Na.string,Na.bool,Na.func]),fallbackFocus:Na.oneOfType([Na.instanceOf(zh),Na.string,Na.func]),escapeDeactivates:Na.oneOfType([Na.bool,Na.func]),clickOutsideDeactivates:Na.oneOfType([Na.bool,Na.func]),returnFocusOnDeactivate:Na.bool,setReturnFocus:Na.oneOfType([Na.instanceOf(zh),Na.string,Na.bool,Na.func]),allowOutsideClick:Na.oneOfType([Na.bool,Na.func]),preventScroll:Na.bool,tabbableOptions:Na.shape({displayCheck:Na.oneOf(["full","non-zero-area","none"]),getShadowRoot:Na.oneOfType([Na.bool,Na.func])})}),containerElements:Na.arrayOf(Na.instanceOf(zh)),children:Na.oneOfType([Na.element,Na.instanceOf(zh)])};yG.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:IDe};r9.exports=yG});var rk=Ge(qt=>{"use strict";var Go=typeof Symbol=="function"&&Symbol.for,YG=Go?Symbol.for("react.element"):60103,XG=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,ZG=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,qge=Go?Symbol.for("react.suspense_list"):60120,Pw=Go?Symbol.for("react.memo"):60115,jw=Go?Symbol.for("react.lazy"):60116,Wge=Go?Symbol.for("react.block"):60121,$ge=Go?Symbol.for("react.fundamental"):60117,zge=Go?Symbol.for("react.responder"):60118,Vge=Go?Symbol.for("react.scope"):60119;function Bi(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case YG:switch(e=e.type,e){case ZG: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 XG:return n}}}function tk(e){return Bi(e)===Aw}qt.AsyncMode=ZG;qt.ConcurrentMode=Aw;qt.ContextConsumer=Mw;qt.ContextProvider=Gw;qt.Element=YG;qt.ForwardRef=Lw;qt.Fragment=Sw;qt.Lazy=jw;qt.Memo=Pw;qt.Portal=XG;qt.Profiler=Fw;qt.StrictMode=Cw;qt.Suspense=xw;qt.isAsyncMode=function(e){return tk(e)||Bi(e)===ZG};qt.isConcurrentMode=tk;qt.isContextConsumer=function(e){return Bi(e)===Mw};qt.isContextProvider=function(e){return Bi(e)===Gw};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===YG};qt.isForwardRef=function(e){return Bi(e)===Lw};qt.isFragment=function(e){return Bi(e)===Sw};qt.isLazy=function(e){return Bi(e)===jw};qt.isMemo=function(e){return Bi(e)===Pw};qt.isPortal=function(e){return Bi(e)===XG};qt.isProfiler=function(e){return Bi(e)===Fw};qt.isStrictMode=function(e){return Bi(e)===Cw};qt.isSuspense=function(e){return Bi(e)===xw};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Sw||e===Aw||e===Fw||e===Cw||e===xw||e===qge||typeof e=="object"&&e!==null&&(e.$$typeof===jw||e.$$typeof===Pw||e.$$typeof===Gw||e.$$typeof===Mw||e.$$typeof===Lw||e.$$typeof===$ge||e.$$typeof===zge||e.$$typeof===Vge||e.$$typeof===Wge)};qt.typeOf=Bi});var uk=Ge((lJa,ok)=>{"use strict";ok.exports=rk()});var V_=Ge((bJa,Uw)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function xRe(){this.__data__=[],this.size=0}nB.exports=xRe});var RM=Ge((fWa,tB)=>{function PRe(e,n){return e===n||e!==e&&n!==n}tB.exports=PRe});var oD=Ge((_Wa,rB)=>{var jRe=RM();function NRe(e,n){for(var a=e.length;a--;)if(jRe(e[a][0],n))return a;return-1}rB.exports=NRe});var uB=Ge((pWa,oB)=>{var ORe=oD(),URe=Array.prototype,kRe=URe.splice;function BRe(e){var n=this.__data__,a=ORe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():kRe.call(n,a,1),--this.size,!0}oB.exports=BRe});var lB=Ge((dWa,iB)=>{var HRe=oD();function JRe(e){var n=this.__data__,a=HRe(n,e);return a<0?void 0:n[a][1]}iB.exports=JRe});var sB=Ge((mWa,cB)=>{var qRe=oD();function WRe(e){return qRe(this.__data__,e)>-1}cB.exports=WRe});var fB=Ge((hWa,vB)=>{var $Re=oD();function zRe(e,n){var a=this.__data__,t=$Re(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}vB.exports=zRe});var uD=Ge((DWa,_B)=>{var VRe=aB(),QRe=uB(),KRe=lB(),YRe=sB(),XRe=fB();function Zp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var ZRe=uD();function eye(){this.__data__=new ZRe,this.size=0}pB.exports=eye});var hB=Ge((RWa,mB)=>{function nye(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}mB.exports=nye});var gB=Ge((yWa,DB)=>{function aye(e){return this.__data__.get(e)}DB.exports=aye});var yB=Ge((bWa,RB)=>{function tye(e){return this.__data__.has(e)}RB.exports=tye});var yM=Ge((wWa,bB)=>{var rye=typeof global=="object"&&global&&global.Object===Object&&global;bB.exports=rye});var es=Ge((EWa,wB)=>{var oye=yM(),uye=typeof self=="object"&&self&&self.Object===Object&&self,iye=oye||uye||Function("return this")();wB.exports=iye});var u1=Ge((IWa,EB)=>{var lye=es(),cye=lye.Symbol;EB.exports=cye});var CB=Ge((TWa,SB)=>{var IB=u1(),TB=Object.prototype,sye=TB.hasOwnProperty,vye=TB.toString,iD=IB?IB.toStringTag:void 0;function fye(e){var n=sye.call(e,iD),a=e[iD];try{e[iD]=void 0;var t=!0}catch{}var r=vye.call(e);return t&&(n?e[iD]=a:delete e[iD]),r}SB.exports=fye});var GB=Ge((SWa,FB)=>{var _ye=Object.prototype,pye=_ye.toString;function dye(e){return pye.call(e)}FB.exports=dye});var lD=Ge((CWa,LB)=>{var MB=u1(),mye=CB(),hye=GB(),Dye="[object Null]",gye="[object Undefined]",AB=MB?MB.toStringTag:void 0;function Rye(e){return e==null?e===void 0?gye:Dye:AB&&AB in Object(e)?mye(e):hye(e)}LB.exports=Rye});var bM=Ge((FWa,xB)=>{function yye(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}xB.exports=yye});var wM=Ge((GWa,PB)=>{var bye=lD(),wye=bM(),Eye="[object AsyncFunction]",Iye="[object Function]",Tye="[object GeneratorFunction]",Sye="[object Proxy]";function Cye(e){if(!wye(e))return!1;var n=bye(e);return n==Iye||n==Tye||n==Eye||n==Sye}PB.exports=Cye});var NB=Ge((MWa,jB)=>{var Fye=es(),Gye=Fye["__core-js_shared__"];jB.exports=Gye});var kB=Ge((AWa,UB)=>{var EM=NB(),OB=function(){var e=/[^.]+$/.exec(EM&&EM.keys&&EM.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Mye(e){return!!OB&&OB in e}UB.exports=Mye});var IM=Ge((LWa,BB)=>{var Aye=Function.prototype,Lye=Aye.toString;function xye(e){if(e!=null){try{return Lye.call(e)}catch{}try{return e+""}catch{}}return""}BB.exports=xye});var JB=Ge((xWa,HB)=>{var Pye=wM(),jye=kB(),Nye=bM(),Oye=IM(),Uye=/[\\^$.*+?()[\]{}|]/g,kye=/^\[object .+?Constructor\]$/,Bye=Function.prototype,Hye=Object.prototype,Jye=Bye.toString,qye=Hye.hasOwnProperty,Wye=RegExp("^"+Jye.call(qye).replace(Uye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $ye(e){if(!Nye(e)||jye(e))return!1;var n=Pye(e)?Wye:kye;return n.test(Oye(e))}HB.exports=$ye});var WB=Ge((PWa,qB)=>{function zye(e,n){return e==null?void 0:e[n]}qB.exports=zye});var K_=Ge((jWa,$B)=>{var Vye=JB(),Qye=WB();function Kye(e,n){var a=Qye(e,n);return Vye(a)?a:void 0}$B.exports=Kye});var i1=Ge((NWa,zB)=>{var Yye=K_(),Xye=es(),Zye=Yye(Xye,"Map");zB.exports=Zye});var cD=Ge((OWa,VB)=>{var ebe=K_(),nbe=ebe(Object,"create");VB.exports=nbe});var YB=Ge((UWa,KB)=>{var QB=cD();function abe(){this.__data__=QB?QB(null):{},this.size=0}KB.exports=abe});var ZB=Ge((kWa,XB)=>{function tbe(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}XB.exports=tbe});var nH=Ge((BWa,eH)=>{var rbe=cD(),obe="__lodash_hash_undefined__",ube=Object.prototype,ibe=ube.hasOwnProperty;function lbe(e){var n=this.__data__;if(rbe){var a=n[e];return a===obe?void 0:a}return ibe.call(n,e)?n[e]:void 0}eH.exports=lbe});var tH=Ge((HWa,aH)=>{var cbe=cD(),sbe=Object.prototype,vbe=sbe.hasOwnProperty;function fbe(e){var n=this.__data__;return cbe?n[e]!==void 0:vbe.call(n,e)}aH.exports=fbe});var oH=Ge((JWa,rH)=>{var _be=cD(),pbe="__lodash_hash_undefined__";function dbe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=_be&&n===void 0?pbe:n,this}rH.exports=dbe});var iH=Ge((qWa,uH)=>{var mbe=YB(),hbe=ZB(),Dbe=nH(),gbe=tH(),Rbe=oH();function ed(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var lH=iH(),ybe=uD(),bbe=i1();function wbe(){this.size=0,this.__data__={hash:new lH,map:new(bbe||ybe),string:new lH}}cH.exports=wbe});var fH=Ge(($Wa,vH)=>{function Ebe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}vH.exports=Ebe});var sD=Ge((zWa,_H)=>{var Ibe=fH();function Tbe(e,n){var a=e.__data__;return Ibe(n)?a[typeof n=="string"?"string":"hash"]:a.map}_H.exports=Tbe});var dH=Ge((VWa,pH)=>{var Sbe=sD();function Cbe(e){var n=Sbe(this,e).delete(e);return this.size-=n?1:0,n}pH.exports=Cbe});var hH=Ge((QWa,mH)=>{var Fbe=sD();function Gbe(e){return Fbe(this,e).get(e)}mH.exports=Gbe});var gH=Ge((KWa,DH)=>{var Mbe=sD();function Abe(e){return Mbe(this,e).has(e)}DH.exports=Abe});var yH=Ge((YWa,RH)=>{var Lbe=sD();function xbe(e,n){var a=Lbe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}RH.exports=xbe});var TM=Ge((XWa,bH)=>{var Pbe=sH(),jbe=dH(),Nbe=hH(),Obe=gH(),Ube=yH();function nd(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var kbe=uD(),Bbe=i1(),Hbe=TM(),Jbe=200;function qbe(e,n){var a=this.__data__;if(a instanceof kbe){var t=a.__data__;if(!Bbe||t.length{var Wbe=uD(),$be=dB(),zbe=hB(),Vbe=gB(),Qbe=yB(),Kbe=EH();function ad(e){var n=this.__data__=new Wbe(e);this.size=n.size}ad.prototype.clear=$be;ad.prototype.delete=zbe;ad.prototype.get=Vbe;ad.prototype.has=Qbe;ad.prototype.set=Kbe;IH.exports=ad});var CH=Ge((n$a,SH)=>{var Ybe="__lodash_hash_undefined__";function Xbe(e){return this.__data__.set(e,Ybe),this}SH.exports=Xbe});var GH=Ge((a$a,FH)=>{function Zbe(e){return this.__data__.has(e)}FH.exports=Zbe});var AH=Ge((t$a,MH)=>{var ewe=TM(),nwe=CH(),awe=GH();function l1(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new ewe;++n{function twe(e,n){for(var a=-1,t=e==null?0:e.length;++a{function rwe(e,n){return e.has(n)}PH.exports=rwe});var SM=Ge((u$a,NH)=>{var owe=AH(),uwe=xH(),iwe=jH(),lwe=1,cwe=2;function swe(e,n,a,t,r,u){var i=a&lwe,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&cwe?new owe:void 0;for(u.set(e,n),u.set(n,e);++g{var vwe=es(),fwe=vwe.Uint8Array;OH.exports=fwe});var BH=Ge((l$a,kH)=>{function _we(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}kH.exports=_we});var JH=Ge((c$a,HH)=>{function pwe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}HH.exports=pwe});var VH=Ge((s$a,zH)=>{var qH=u1(),WH=UH(),dwe=RM(),mwe=SM(),hwe=BH(),Dwe=JH(),gwe=1,Rwe=2,ywe="[object Boolean]",bwe="[object Date]",wwe="[object Error]",Ewe="[object Map]",Iwe="[object Number]",Twe="[object RegExp]",Swe="[object Set]",Cwe="[object String]",Fwe="[object Symbol]",Gwe="[object ArrayBuffer]",Mwe="[object DataView]",$H=qH?qH.prototype:void 0,CM=$H?$H.valueOf:void 0;function Awe(e,n,a,t,r,u,i){switch(a){case Mwe: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 WH(e),new WH(n)));case ywe:case bwe:case Iwe:return dwe(+e,+n);case wwe:return e.name==n.name&&e.message==n.message;case Twe:case Cwe:return e==n+"";case Ewe:var l=hwe;case Swe:var s=t&gwe;if(l||(l=Dwe),e.size!=n.size&&!s)return!1;var m=i.get(e);if(m)return m==n;t|=Rwe,i.set(e,n);var p=mwe(l(e),l(n),t,r,u,i);return i.delete(e),p;case Fwe:if(CM)return CM.call(e)==CM.call(n)}return!1}zH.exports=Awe});var KH=Ge((v$a,QH)=>{function Lwe(e,n){for(var a=-1,t=n.length,r=e.length;++a{var xwe=Array.isArray;YH.exports=xwe});var ZH=Ge((_$a,XH)=>{var Pwe=KH(),jwe=c1();function Nwe(e,n,a){var t=n(e);return jwe(e)?t:Pwe(t,a(e))}XH.exports=Nwe});var nJ=Ge((p$a,eJ)=>{function Owe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function Uwe(){return[]}aJ.exports=Uwe});var uJ=Ge((m$a,oJ)=>{var kwe=nJ(),Bwe=tJ(),Hwe=Object.prototype,Jwe=Hwe.propertyIsEnumerable,rJ=Object.getOwnPropertySymbols,qwe=rJ?function(e){return e==null?[]:(e=Object(e),kwe(rJ(e),function(n){return Jwe.call(e,n)}))}:Bwe;oJ.exports=qwe});var lJ=Ge((h$a,iJ)=>{function Wwe(e,n){for(var a=-1,t=Array(e);++a{function $we(e){return e!=null&&typeof e=="object"}cJ.exports=$we});var vJ=Ge((g$a,sJ)=>{var zwe=lD(),Vwe=vD(),Qwe="[object Arguments]";function Kwe(e){return Vwe(e)&&zwe(e)==Qwe}sJ.exports=Kwe});var dJ=Ge((R$a,pJ)=>{var fJ=vJ(),Ywe=vD(),_J=Object.prototype,Xwe=_J.hasOwnProperty,Zwe=_J.propertyIsEnumerable,e1e=fJ(function(){return arguments}())?fJ:function(e){return Ywe(e)&&Xwe.call(e,"callee")&&!Zwe.call(e,"callee")};pJ.exports=e1e});var hJ=Ge((y$a,mJ)=>{function n1e(){return!1}mJ.exports=n1e});var FM=Ge((fD,td)=>{var a1e=es(),t1e=hJ(),DJ=typeof fD=="object"&&fD&&!fD.nodeType&&fD,gJ=DJ&&typeof td=="object"&&td&&!td.nodeType&&td,r1e=gJ&&gJ.exports===DJ,RJ=r1e?a1e.Buffer:void 0,o1e=RJ?RJ.isBuffer:void 0,u1e=o1e||t1e;td.exports=u1e});var bJ=Ge((b$a,yJ)=>{var i1e=9007199254740991,l1e=/^(?:0|[1-9]\d*)$/;function c1e(e,n){var a=typeof e;return n=n==null?i1e:n,!!n&&(a=="number"||a!="symbol"&&l1e.test(e))&&e>-1&&e%1==0&&e{var s1e=9007199254740991;function v1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s1e}wJ.exports=v1e});var IJ=Ge((E$a,EJ)=>{var f1e=lD(),_1e=GM(),p1e=vD(),d1e="[object Arguments]",m1e="[object Array]",h1e="[object Boolean]",D1e="[object Date]",g1e="[object Error]",R1e="[object Function]",y1e="[object Map]",b1e="[object Number]",w1e="[object Object]",E1e="[object RegExp]",I1e="[object Set]",T1e="[object String]",S1e="[object WeakMap]",C1e="[object ArrayBuffer]",F1e="[object DataView]",G1e="[object Float32Array]",M1e="[object Float64Array]",A1e="[object Int8Array]",L1e="[object Int16Array]",x1e="[object Int32Array]",P1e="[object Uint8Array]",j1e="[object Uint8ClampedArray]",N1e="[object Uint16Array]",O1e="[object Uint32Array]",dr={};dr[G1e]=dr[M1e]=dr[A1e]=dr[L1e]=dr[x1e]=dr[P1e]=dr[j1e]=dr[N1e]=dr[O1e]=!0;dr[d1e]=dr[m1e]=dr[C1e]=dr[h1e]=dr[F1e]=dr[D1e]=dr[g1e]=dr[R1e]=dr[y1e]=dr[b1e]=dr[w1e]=dr[E1e]=dr[I1e]=dr[T1e]=dr[S1e]=!1;function U1e(e){return p1e(e)&&_1e(e.length)&&!!dr[f1e(e)]}EJ.exports=U1e});var SJ=Ge((I$a,TJ)=>{function k1e(e){return function(n){return e(n)}}TJ.exports=k1e});var FJ=Ge((pD,rd)=>{var B1e=yM(),CJ=typeof pD=="object"&&pD&&!pD.nodeType&&pD,_D=CJ&&typeof rd=="object"&&rd&&!rd.nodeType&&rd,H1e=_D&&_D.exports===CJ,MM=H1e&&B1e.process,J1e=function(){try{var e=_D&&_D.require&&_D.require("util").types;return e||MM&&MM.binding&&MM.binding("util")}catch{}}();rd.exports=J1e});var AM=Ge((T$a,AJ)=>{var q1e=IJ(),W1e=SJ(),GJ=FJ(),MJ=GJ&&GJ.isTypedArray,$1e=MJ?W1e(MJ):q1e;AJ.exports=$1e});var xJ=Ge((S$a,LJ)=>{var z1e=lJ(),V1e=dJ(),Q1e=c1(),K1e=FM(),Y1e=bJ(),X1e=AM(),Z1e=Object.prototype,eEe=Z1e.hasOwnProperty;function nEe(e,n){var a=Q1e(e),t=!a&&V1e(e),r=!a&&!t&&K1e(e),u=!a&&!t&&!r&&X1e(e),i=a||t||r||u,l=i?z1e(e.length,String):[],s=l.length;for(var m in e)(n||eEe.call(e,m))&&!(i&&(m=="length"||r&&(m=="offset"||m=="parent")||u&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Y1e(m,s)))&&l.push(m);return l}LJ.exports=nEe});var jJ=Ge((C$a,PJ)=>{var aEe=Object.prototype;function tEe(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||aEe;return e===a}PJ.exports=tEe});var OJ=Ge((F$a,NJ)=>{function rEe(e,n){return function(a){return e(n(a))}}NJ.exports=rEe});var kJ=Ge((G$a,UJ)=>{var oEe=OJ(),uEe=oEe(Object.keys,Object);UJ.exports=uEe});var HJ=Ge((M$a,BJ)=>{var iEe=jJ(),lEe=kJ(),cEe=Object.prototype,sEe=cEe.hasOwnProperty;function vEe(e){if(!iEe(e))return lEe(e);var n=[];for(var a in Object(e))sEe.call(e,a)&&a!="constructor"&&n.push(a);return n}BJ.exports=vEe});var qJ=Ge((A$a,JJ)=>{var fEe=wM(),_Ee=GM();function pEe(e){return e!=null&&_Ee(e.length)&&!fEe(e)}JJ.exports=pEe});var $J=Ge((L$a,WJ)=>{var dEe=xJ(),mEe=HJ(),hEe=qJ();function DEe(e){return hEe(e)?dEe(e):mEe(e)}WJ.exports=DEe});var VJ=Ge((x$a,zJ)=>{var gEe=ZH(),REe=uJ(),yEe=$J();function bEe(e){return gEe(e,yEe,REe)}zJ.exports=bEe});var YJ=Ge((P$a,KJ)=>{var QJ=VJ(),wEe=1,EEe=Object.prototype,IEe=EEe.hasOwnProperty;function TEe(e,n,a,t,r,u){var i=a&wEe,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:IEe.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 SEe=K_(),CEe=es(),FEe=SEe(CEe,"DataView");XJ.exports=FEe});var nq=Ge((N$a,eq)=>{var GEe=K_(),MEe=es(),AEe=GEe(MEe,"Promise");eq.exports=AEe});var tq=Ge((O$a,aq)=>{var LEe=K_(),xEe=es(),PEe=LEe(xEe,"Set");aq.exports=PEe});var oq=Ge((U$a,rq)=>{var jEe=K_(),NEe=es(),OEe=jEe(NEe,"WeakMap");rq.exports=OEe});var _q=Ge((k$a,fq)=>{var LM=ZJ(),xM=i1(),PM=nq(),jM=tq(),NM=oq(),uq=lD(),od=IM(),iq="[object Map]",UEe="[object Object]",lq="[object Promise]",cq="[object Set]",sq="[object WeakMap]",vq="[object DataView]",kEe=od(LM),BEe=od(xM),HEe=od(PM),JEe=od(jM),qEe=od(NM),Y_=uq;(LM&&Y_(new LM(new ArrayBuffer(1)))!=vq||xM&&Y_(new xM)!=iq||PM&&Y_(PM.resolve())!=lq||jM&&Y_(new jM)!=cq||NM&&Y_(new NM)!=sq)&&(Y_=function(e){var n=uq(e),a=n==UEe?e.constructor:void 0,t=a?od(a):"";if(t)switch(t){case kEe:return vq;case BEe:return iq;case HEe:return lq;case JEe:return cq;case qEe:return sq}return n});fq.exports=Y_});var yq=Ge((B$a,Rq)=>{var OM=TH(),WEe=SM(),$Ee=VH(),zEe=YJ(),pq=_q(),dq=c1(),mq=FM(),VEe=AM(),QEe=1,hq="[object Arguments]",Dq="[object Array]",s1="[object Object]",KEe=Object.prototype,gq=KEe.hasOwnProperty;function YEe(e,n,a,t,r,u){var i=dq(e),l=dq(n),s=i?Dq:pq(e),m=l?Dq:pq(n);s=s==hq?s1:s,m=m==hq?s1:m;var p=s==s1,g=m==s1,E=s==m;if(E&&mq(e)){if(!mq(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new OM),i||VEe(e)?WEe(e,n,a,t,r,u):$Ee(e,n,s,a,t,r,u);if(!(a&QEe)){var b=p&&gq.call(e,"__wrapped__"),I=g&&gq.call(n,"__wrapped__");if(b||I){var L=b?e.value():e,N=I?n.value():n;return u||(u=new OM),r(L,N,a,t,u)}}return E?(u||(u=new OM),zEe(e,n,a,t,r,u)):!1}Rq.exports=YEe});var Iq=Ge((H$a,Eq)=>{var XEe=yq(),bq=vD();function wq(e,n,a,t,r){return e===n?!0:e==null||n==null||!bq(e)&&!bq(n)?e!==e&&n!==n:XEe(e,n,a,t,wq,r)}Eq.exports=wq});var Sq=Ge((J$a,Tq)=>{var ZEe=Iq();function eIe(e,n){return ZEe(e,n)}Tq.exports=eIe});var vW=Ge((tQa,CIe)=>{CIe.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 MK=Ge((ag,GL)=>{typeof window!="undefined"&&function(n,a){typeof ag=="object"&&typeof GL=="object"?GL.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^Oa&255^99,ne[Kn]=Oa,ue[Oa]=Kn;var Aa=yn[Kn],sa=yn[Aa],At=yn[sa],qe=yn[Oa]*257^Oa*16843008;Y[Kn]=qe<<24|qe>>>8,X[Kn]=qe<<16|qe>>>16,ve[Kn]=qe<<8|qe>>>24,Pe[Kn]=qe,qe=At*16843009^sa*65537^Aa*257^Kn*16843008,rn[Oa]=qe<<24|qe>>>8,wn[Oa]=qe<<16|qe>>>16,dn[Oa]=qe<<8|qe>>>24,mn[Oa]=qe,Kn?(Kn=Aa^yn[yn[yn[At^Aa]]],zn^=yn[yn[zn]]):Kn=zn=1}},z.expandKey=function(ne){for(var ue=this.uint8ArrayToUint32Array_(ne),Z=!0,Y=0;Y>>6)+1,j=(K[O+2]&60)>>>2,j>Ee.length-1){J.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+j});return}return V=(K[O+2]&1)<<2,V|=(K[O+3]&192)>>>6,l.logger.log("manifest codec:"+S+",ADTS data:type:"+x+",sampleingIndex:"+j+"["+Ee[j]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?j>=6?(x=5,le=new Array(4),W=j-3):(x=2,le=new Array(2),W=j):ie.indexOf("android")!==-1?(x=2,le=new Array(2),W=j):(x=5,le=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&j>=6?W=j-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(j>=6&&V===1||/vivaldi/i.test(ie))||!S&&V===1)&&(x=2,le=new Array(2)),W=j)),le[0]=x<<3,le[0]|=(j&14)>>1,le[1]|=(j&1)<<7,le[1]|=V<<3,x===5&&(le[1]|=(W&14)>>1,le[2]=(W&1)<<7,le[2]|=2<<2,le[3]=0),{config:le,samplerate:Ee[j],channelCount:V,codec:"mp4a.40."+x,manifestCodec:ge}}function p(J,K){return J[K]===255&&(J[K+1]&246)==240}function g(J,K){return J[K+1]&1?7:9}function E(J,K){return(J[K+3]&3)<<11|J[K+4]<<3|(J[K+5]&224)>>>5}function b(J,K){return!!(K+10&&K+j+W<=le)return V=O+S*x,{headerLength:j,frameLength:W,stamp:V}}function $(J,K,O,S,x){var j=N(J.samplerate),W=z(K,O,S,x,j);if(W){var V=W.stamp,le=W.headerLength,ie=W.frameLength,ge={unit:K.subarray(O+le,O+le+ie),pts:V,dts:V};return J.samples.push(ge),{sample:ge,length:ie+le}}}var ne=a("./src/demux/id3.js"),ue=function(){function J(O,S,x){this.observer=O,this.config=x,this.remuxer=S}var K=J.prototype;return K.resetInitSegment=function(S,x,j,W){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:x,duration:W,inputTimeScale:9e4}},K.resetTimeStamp=function(){},J.probe=function(S){if(!S)return!1;for(var x=ne.default.getID3Data(S,0)||[],j=x.length,W=S.length;jO.length)){var W=this.parseHeader(O,S);if(W&&S+W.frameLength<=O.length){var V=W.samplesPerFrame*9e4/W.sampleRate,le=x+j*V,ie={unit:O.subarray(S,S+W.frameLength),pts:le,dts:le};return K.config=[],K.channelCount=W.channelCount,K.samplerate=W.sampleRate,K.samples.push(ie),{sample:ie,length:W.frameLength}}}},parseHeader:function(K,O){var S=K[O+1]>>3&3,x=K[O+1]>>1&3,j=K[O+2]>>4&15,W=K[O+2]>>2&3,V=K[O+2]>>1&1;if(S!==1&&j!==0&&j!==15&&W!==3){var le=S===3?3-x:x===3?3:4,ie=X.BitratesMap[le*14+j-1]*1e3,ge=S===3?0:S===2?1:2,Ee=X.SamplingRateMap[ge*3+W],Ce=K[O+3]>>6==3?1:2,Ae=X.SamplesCoefficients[S][x],un=X.BytesInSlot[x],hn=Ae*8*un,Ne=parseInt(Ae*ie/Ee+V,10)*un;return{sampleRate:Ee,channelCount:Ce,frameLength:Ne,samplesPerFrame:hn}}},isHeaderPattern:function(K,O){return K[O]===255&&(K[O+1]&224)==224&&(K[O+1]&6)!=0},isHeader:function(K,O){return!!(O+1S?(this.word<<=S,this.bitsAvailable-=S):(S-=this.bitsAvailable,x=S>>3,S-=x>>3,this.bytesAvailable-=x,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},K.readBits=function(S){var x=Math.min(this.bitsAvailable,S),j=this.word>>>32-x;return S>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=x,this.bitsAvailable>0?this.word<<=x:this.bytesAvailable>0&&this.loadWord(),x=S-x,x>0&&this.bitsAvailable?j<>>S)!=0)return this.word<<=S,this.bitsAvailable-=S,S;return this.loadWord(),S+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var S=this.skipLZ();return this.readBits(S+1)-1},K.readEG=function(){var S=this.readUEG();return 1&S?1+S>>>1:-1*(S>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(S){var x=8,j=8,W,V;for(W=0;W=S.length){j();return}if(!(S[x].unit.length<32)){var W=this.decrypter.isSync();if(this.decryptAacSample(S,x,j,W),!W)return}}},K.getAvcEncryptedData=function(S){for(var x=Math.floor((S.length-48)/160)*16+16,j=new Int8Array(x),W=0,V=32;V<=S.length-16;V+=160,W+=16)j.set(S.subarray(V,V+16),W);return j},K.getAvcDecryptedUnit=function(S,x){x=new Uint8Array(x);for(var j=0,W=32;W<=S.length-16;W+=160,j+=16)S.set(x.subarray(j,j+16),W);return S},K.decryptAvcSample=function(S,x,j,W,V,le){var ie=this.discardEPB(V.data),ge=this.getAvcEncryptedData(ie),Ee=this;this.decryptBuffer(ge.buffer,function(Ce){V.data=Ee.getAvcDecryptedUnit(ie,Ce),le||Ee.decryptAvcSamples(S,x,j+1,W)})},K.decryptAvcSamples=function(S,x,j,W){for(;;x++,j=0){if(x>=S.length){W();return}for(var V=S[x].units;!(j>=V.length);j++){var le=V[j];if(!(le.length<=48||le.type!==1&&le.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(S,x,j,W,le,ie),!ie)return}}}},J}(),wn=rn,dn={video:1,audio:2,id3:3,text:4},mn=function(){function J(O,S,x,j){this.observer=O,this.config=x,this.typeSupported=j,this.remuxer=S,this.sampleAes=null}var K=J.prototype;return K.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new wn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},J.probe=function(S){var x=J._syncOffset(S);return x<0?!1:(x&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},J._syncOffset=function(S){for(var x=Math.min(1e3,S.length-3*188),j=0;j>4,Ee>1){if(Ce=V+5+S[V+4],Ce===V+188)continue}else Ce=V+4;switch(ge){case _a:ie&&(mt&&(Ae=mr(mt))&&jr(Ae,!1),mt={data:[],size:0}),mt&&(mt.data.push(S.subarray(Ce,V+188)),mt.size+=V+188-Ce);break;case ot:ie&&(Ua&&(Ae=mr(Ua))&&(En.isAAC?go(Ae):Tr(Ae)),Ua={data:[],size:0}),Ua&&(Ua.data.push(S.subarray(Ce,V+188)),Ua.size+=V+188-Ce);break;case Ut:ie&&($t&&(Ae=mr($t))&&eu(Ae),$t={data:[],size:0}),$t&&($t.data.push(S.subarray(Ce,V+188)),$t.size+=V+188-Ce);break;case 0:ie&&(Ce+=S[Ce]+1),ya=this._pmtId=Ka(S,Ce);break;case ya:ie&&(Ce+=S[Ce]+1);var sr=Ct(S,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);_a=sr.avc,_a>0&&(Ne.pid=_a),ot=sr.audio,ot>0&&(En.pid=ot,En.isAAC=sr.isAAC),Ut=sr.id3,Ut>0&&(Vn.pid=Ut),un&&!hn&&(l.logger.log("reparse from beginning"),un=!1,V=Nr-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))?(jr(Ae,!0),Ne.pesData=null):Ne.pesData=mt,Ua&&(Ae=mr(Ua))?(En.isAAC?go(Ae):Tr(Ae),En.pesData=null):(Ua&&Ua.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),En.pesData=Ua),$t&&(Ae=mr($t))?(eu(Ae),Vn.pesData=null):Vn.pesData=$t,this.sampleAes==null?this.remuxer.remux(En,Ne,Vn,this._txtTrack,x,j,W):this.decryptAndRemux(En,Ne,Vn,this._txtTrack,x,j,W)},K.decryptAndRemux=function(S,x,j,W,V,le,ie){if(S.samples&&S.isAAC){var ge=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){ge.decryptAndRemuxAvc(S,x,j,W,V,le,ie)})}else this.decryptAndRemuxAvc(S,x,j,W,V,le,ie)},K.decryptAndRemuxAvc=function(S,x,j,W,V,le,ie){if(x.samples){var ge=this;this.sampleAes.decryptAvcSamples(x.samples,0,0,function(){ge.remuxer.remux(S,x,j,W,V,le,ie)})}else this.remuxer.remux(S,x,j,W,V,le,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(S,x){return(S[x+10]&31)<<8|S[x+11]},K._parsePMT=function(S,x,j,W){var V,le,ie,ge,Ee={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(S[x+1]&15)<<8|S[x+2],le=x+3+V-4,ie=(S[x+10]&15)<<8|S[x+11],x+=12+ie;x1;){var hn=new Uint8Array(un[0].length+un[1].length);hn.set(un[0]),hn.set(un[1],un[0].length),un[0]=hn,un.splice(1,1)}if(j=un[0],V=(j[0]<<16)+(j[1]<<8)+j[2],V===1){if(le=(j[4]<<8)+j[5],le&&le>S.size-6||(W=j[7],W&192&&(Ee=(j[9]&14)*536870912+(j[10]&255)*4194304+(j[11]&254)*16384+(j[12]&255)*128+(j[13]&254)/2,Ee>4294967295&&(Ee-=8589934592),W&64?(Ce=(j[14]&14)*536870912+(j[15]&255)*4194304+(j[16]&254)*16384+(j[17]&255)*128+(j[18]&254)/2,Ce>4294967295&&(Ce-=8589934592),Ee-Ce>60*9e4&&(l.logger.warn(Math.round((Ee-Ce)/9e4)+"s delta between PTS and DTS, align them"),Ee=Ce)):Ce=Ee),ie=j[8],Ae=ie+9,S.size<=Ae))return null;S.size-=Ae,ge=new Uint8Array(S.size);for(var Ne=0,En=un.length;NeVn){Ae-=Vn;continue}else j=j.subarray(Ae),Vn-=Ae,Ae=0;ge.set(j,x),x+=Vn}return le&&(le-=ie+3),{data:ge,pts:Ee,dts:Ce,len:le}}else return null},K.pushAccesUnit=function(S,x){if(S.units.length&&S.frame){var j=x.samples,W=j.length;if(isNaN(S.pts))if(W){var V=j[W-1];S.pts=V.pts,S.dts=V.dts}else{x.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||x.sps&&(W||this.contiguous)?(S.id=W,j.push(S)):x.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},K._parseAVCPES=function(S,x){var j=this,W=this._avcTrack,V=this._parseAVCNALu(S.data),le=!1,ie,ge=this.avcSample,Ee,Ce=!1,Ae,un=this.pushAccesUnit.bind(this),hn=function(En,Vn,_a,ot){return{key:En,pts:Vn,dts:_a,units:[],debug:ot}};S.data=null,ge&&V.length&&!W.audFound&&(un(ge,W),ge=this.avcSample=hn(!1,S.pts,S.dts,"")),V.forEach(function(Ne){switch(Ne.type){case 1:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="NDR "),ge.frame=!0;var En=Ne.data;if(Ce&&En.length>4){var Vn=new ke(En).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(ge.key=!0)}break;case 5:Ee=!0,ge||(ge=j.avcSample=hn(!0,S.pts,S.dts,"")),le&&(ge.debug+="IDR "),ge.key=!0,ge.frame=!0;break;case 6:Ee=!0,le&&ge&&(ge.debug+="SEI "),ie=new ke(j.discardEPB(Ne.data)),ie.readUByte();for(var _a=0,ot=0,Ut=!1,ya=0;!Ut&&ie.bytesAvailable>1;){_a=0;do ya=ie.readUByte(),_a+=ya;while(ya===255);ot=0;do ya=ie.readUByte(),ot+=ya;while(ya===255);if(_a===4&&ie.bytesAvailable!==0){Ut=!0;var mt=ie.readUByte();if(mt===181){var Ua=ie.readUShort();if(Ua===49){var $t=ie.readUInt();if($t===1195456820){var Ka=ie.readUByte();if(Ka===3){var Ct=ie.readUByte(),mr=ie.readUByte(),jr=31&Ct,go=[Ct,mr];for(Ae=0;Ae16){var Tr=[];for(Ae=0;Ae<16;Ae++)Tr.push(ie.readUByte().toString(16)),(Ae===3||Ae===5||Ae===7||Ae===9)&&Tr.push("-");var eu=ot-16,Nr=new Uint8Array(eu);for(Ae=0;Ae0){if(x.pts>=S[j-1].pts)S.push(x);else for(var W=j-1;W>=0;W--)if(x.pts=0)Ce={data:S.subarray(un,x-ie-1),type:hn},Ee.push(Ce);else{var Ne=this._getLastNalUnit();if(Ne&&(ge&&x<=4-ge&&Ne.state&&(Ne.data=Ne.data.subarray(0,Ne.data.byteLength-ge)),V=x-ie-1,V>0)){var En=new Uint8Array(Ne.data.byteLength+V);En.set(Ne.data,0),En.set(S.subarray(0,V),Ne.data.byteLength),Ne.data=En}}x=0&&ie>=0&&(Ce={data:S.subarray(un,j),type:hn,state:ie},Ee.push(Ce)),Ee.length===0){var Vn=this._getLastNalUnit();if(Vn){var _a=new Uint8Array(Vn.data.byteLength+S.byteLength);_a.set(Vn.data,0),_a.set(S,Vn.data.byteLength),Vn.data=_a}}return le.naluState=ie,Ee},K.discardEPB=function(S){for(var x=S.byteLength,j=[],W=1,V,le;W1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-W)/90)),W=Vn)}for(;Ce>24&255,V[1]=x>>16&255,V[2]=x>>8&255,V[3]=x&255,V.set(O,4),j=0,x=8;j>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,85,196,0,0]))},J.mdia=function(O){return J.box(J.types.mdia,J.mdhd(O.timescale,O.duration),J.hdlr(O.type),J.minf(O))},J.mfhd=function(O){return J.box(J.types.mfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255]))},J.minf=function(O){return O.type==="audio"?J.box(J.types.minf,J.box(J.types.smhd,J.SMHD),J.DINF,J.stbl(O)):J.box(J.types.minf,J.box(J.types.vmhd,J.VMHD),J.DINF,J.stbl(O))},J.moof=function(O,S,x){return J.box(J.types.moof,J.mfhd(O),J.traf(x,S))},J.moov=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trak(O[S]);return J.box.apply(null,[J.types.moov,J.mvhd(O[0].timescale,O[0].duration)].concat(x).concat(J.mvex(O)))},J.mvex=function(O){for(var S=O.length,x=[];S--;)x[S]=J.trex(O[S]);return J.box.apply(null,[J.types.mvex].concat(x))},J.mvhd=function(O,S){S*=O;var x=Math.floor(S/(Aa+1)),j=Math.floor(S%(Aa+1)),W=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,O>>24&255,O>>16&255,O>>8&255,O&255,x>>24,x>>16&255,x>>8&255,x&255,j>>24,j>>16&255,j>>8&255,j&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return J.box(J.types.mvhd,W)},J.sdtp=function(O){var S=O.samples||[],x=new Uint8Array(4+S.length),j,W;for(W=0;W>>8&255),S.push(V&255),S=S.concat(Array.prototype.slice.call(W));for(j=0;j>>8&255),x.push(V&255),x=x.concat(Array.prototype.slice.call(W));var le=J.box(J.types.avcC,new Uint8Array([1,S[3],S[4],S[5],252|3,224|O.sps.length].concat(S).concat([O.pps.length]).concat(x))),ie=O.width,ge=O.height,Ee=O.pixelRatio[0],Ce=O.pixelRatio[1];return J.box(J.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,ie>>8&255,ie&255,ge>>8&255,ge&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),le,J.box(J.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),J.box(J.types.pasp,new Uint8Array([Ee>>24,Ee>>16&255,Ee>>8&255,Ee&255,Ce>>24,Ce>>16&255,Ce>>8&255,Ce&255])))},J.esds=function(O){var S=O.config.length;return new Uint8Array([0,0,0,0,3,23+S,0,1,0,4,15+S,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([S]).concat(O.config).concat([6,1,2]))},J.mp4a=function(O){var S=O.samplerate;return J.box(J.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]),J.box(J.types.esds,J.esds(O)))},J.mp3=function(O){var S=O.samplerate;return J.box(J.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,O.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]))},J.stsd=function(O){return O.type==="audio"?!O.isAAC&&O.codec==="mp3"?J.box(J.types.stsd,J.STSD,J.mp3(O)):J.box(J.types.stsd,J.STSD,J.mp4a(O)):J.box(J.types.stsd,J.STSD,J.avc1(O))},J.tkhd=function(O){var S=O.id,x=O.duration*O.timescale,j=O.width,W=O.height,V=Math.floor(x/(Aa+1)),le=Math.floor(x%(Aa+1));return J.box(J.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,S>>24&255,S>>16&255,S>>8&255,S&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,le>>24,le>>16&255,le>>8&255,le&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,j>>8&255,j&255,0,0,W>>8&255,W&255,0,0]))},J.traf=function(O,S){var x=J.sdtp(O),j=O.id,W=Math.floor(S/(Aa+1)),V=Math.floor(S%(Aa+1));return J.box(J.types.traf,J.box(J.types.tfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255])),J.box(J.types.tfdt,new Uint8Array([1,0,0,0,W>>24,W>>16&255,W>>8&255,W&255,V>>24,V>>16&255,V>>8&255,V&255])),J.trun(O,x.length+16+20+8+16+8+8),x)},J.trak=function(O){return O.duration=O.duration||4294967295,J.box(J.types.trak,J.tkhd(O),J.mdia(O))},J.trex=function(O){var S=O.id;return J.box(J.types.trex,new Uint8Array([0,0,0,0,S>>24,S>>16&255,S>>8&255,S&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},J.trun=function(O,S){var x=O.samples||[],j=x.length,W=12+16*j,V=new Uint8Array(W),le,ie,ge,Ee,Ce,Ae;for(S+=8+W,V.set([0,0,15,1,j>>>24&255,j>>>16&255,j>>>8&255,j&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255],0),le=0;le>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Ee>>>24&255,Ee>>>16&255,Ee>>>8&255,Ee&255,Ce.isLeading<<2|Ce.dependsOn,Ce.isDependedOn<<6|Ce.hasRedundancy<<4|Ce.paddingValue<<1|Ce.isNonSync,Ce.degradPrio&240<<8,Ce.degradPrio&15,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255],12+16*le);return J.box(J.types.trun,V)},J.initSegment=function(O){J.types||J.init();var S=J.moov(O),x;return x=new Uint8Array(J.FTYP.byteLength+S.byteLength),x.set(J.FTYP),x.set(S,J.FTYP.byteLength),x},J}(),At=sa,qe=9e4;function pa(J,K,O,S){return O===void 0&&(O=1),S===void 0&&(S=!1),Qa(J,K,1/O)}function Qa(J,K,O,S){O===void 0&&(O=1),S===void 0&&(S=!1);var x=J*K*O;return S?Math.round(x):x}function Tn(J,K){return K===void 0&&(K=!1),Qa(J,1e3,1/qe,K)}function Dn(J,K){return K===void 0&&(K=1),Qa(J,qe,1/K)}var We=Dn(10),ea=Dn(.2),va=function(){function J(O,S,x,j){this.observer=O,this.config=S,this.typeSupported=x;var W=navigator.userAgent;this.isSafari=j&&j.indexOf("Apple")>-1&&W&&!W.match("CriOS"),this.ISGenerated=!1}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(S,x,j,W,V,le,ie){if(this.ISGenerated||this.generateIS(S,x,V),this.ISGenerated){var ge=S.samples.length,Ee=x.samples.length,Ce=V,Ae=V;if(ge&&Ee){var un=(S.samples[0].pts-x.samples[0].pts)/x.inputTimeScale;Ce+=Math.max(0,un),Ae+=Math.max(0,-un)}if(ge){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,x,V));var hn=this.remuxAudio(S,Ce,le,ie);if(Ee){var Ne;hn&&(Ne=hn.endPTS-hn.startPTS),x.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,x,V)),this.remuxVideo(x,Ae,le,Ne,ie)}}else if(Ee){var En=this.remuxVideo(x,Ae,le,0,ie);En&&S.codec&&this.remuxEmptyAudio(S,Ce,le,En)}}j.samples.length&&this.remuxID3(j,V),W.samples.length&&this.remuxText(W,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(S,x,j){var W=this.observer,V=S.samples,le=x.samples,ie=this.typeSupported,ge="audio/mp4",Ee={},Ce={tracks:Ee},Ae=this._initPTS===void 0,un,hn;if(Ae&&(un=hn=1/0),S.config&&V.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ie.mpeg?(ge="audio/mpeg",S.codec=""):ie.mp3&&(S.codec="mp3")),Ee.audio={container:ge,codec:S.codec,initSegment:!S.isAAC&&ie.mpeg?new Uint8Array:At.initSegment([S]),metadata:{channelCount:S.channelCount}},Ae&&(un=hn=V[0].pts-S.inputTimeScale*j)),x.sps&&x.pps&&le.length){var Ne=x.inputTimeScale;x.timescale=Ne,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-Ne*j),hn=Math.min(hn,le[0].dts-Ne*j),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:un}))}Object.keys(Ee).length?(W.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Ce),this.ISGenerated=!0,Ae&&(this._initPTS=un,this._initDTS=hn)):W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(S,x,j,W,V){var le=8,ie,ge,Ee,Ce,Ae,un,hn,Ne=S.timescale,En=S.samples,Vn=[],_a=En.length,ot=this._PTSNormalize,Ut=this._initPTS,ya=this.nextAvcDts,mt=this.isSafari;if(_a!==0){mt&&(j|=En.length&&ya&&(V&&Math.abs(x-ya/Ne)<.1||Math.abs(En[0].pts-ya-Ut)1?l.logger.log("AVC: "+Tn(Ct,!0)+" ms hole between fragments detected,filling it"):Ct<-1&&l.logger.log("AVC: "+Tn(-Ct,!0)+" ms overlapping between fragments detected"),Ae=ya,En[0].dts=Ae,Ce=Math.max(Ce-Ct,ya),En[0].pts=Ce,l.logger.log("Video: PTS/DTS adjusted: "+Tn(Ce,!0)+"/"+Tn(Ae,!0)+", delta: "+Tn(Ct,!0)+" ms")),Ka=En[En.length-1],hn=Math.max(Ka.dts,0),un=Math.max(Ka.pts,0,hn),mt&&(ie=Math.round((hn-Ae)/(En.length-1)));for(var mr=0,jr=0,go=0;go<_a;go++){for(var Tr=En[go],eu=Tr.units,Nr=eu.length,sr=0,Yr=0;Yr0?xo-1:xo].dts;if(vs.stretchShortVideoTrack){var Ki=vs.maxBufferHole,Hd=Math.floor(Ki*Ne),jf=(W?Ce+W*Ne:this.nextAudioPts)-Xr.pts;jf>Hd?(ie=jf-Pl,ie<0&&(ie=Pl),l.logger.log("It is approximately "+Tn(jf,!1)+" ms to the next segment; using duration "+Tn(ie,!1)+" ms for the last video frame.")):ie=Pl}else ie=Pl}Qi=Math.round(Xr.pts-Xr.dts)}Vn.push({size:hi,duration:ie,cts:Qi,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:Xr.key?2:1,isNonSync:Xr.key?0:1}})}this.nextAvcDts=hn+ie;var R0=S.dropped;if(S.nbNalu=0,S.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var y0=Vn[0].flags;y0.dependsOn=2,y0.isNonSync=0}S.samples=Vn,Ee=At.moof(S.sequenceNumber++,Ae,S),S.samples=[];var Yi={data1:Ee,data2:ge,startPTS:Ce/Ne,endPTS:(un+ie)/Ne,startDTS:Ae/Ne,endDTS:this.nextAvcDts/Ne,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:R0};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Yi),Yi}},K.remuxAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.timescale,ie=V/le,ge=S.isAAC?1024:1152,Ee=ge*ie,Ce=this._PTSNormalize,Ae=this._initPTS,un=!S.isAAC&&this.typeSupported.mpeg,hn,Ne,En,Vn,_a,ot,Ut=un?0:8,ya=S.samples,mt=[],Ua=this.nextAudioPts;if(j|=ya.length&&Ua&&(W&&Math.abs(x-Ua/V)<.1||Math.abs(ya[0].pts-Ua-Ae)<20*Ee),ya.forEach(function(Ki){Ki.pts=Ki.dts=Ce(Ki.pts-Ae,x*V)}),ya=ya.filter(function(Ki){return Ki.pts>=0}),ya.length!==0){if(j||(W?Ua=x*V:Ua=ya[0].pts),S.isAAC)for(var $t=this.config.maxAudioFramesDrift,Ka=0,Ct=Ua;Ka=$t*Ee&&jr.1*Ee,mr.pts=mr.dts=Ct,Ct+=Ee,Ka++}for(var sr=ya.length,Yr=0;sr--;)Yr+=ya[sr].unit.byteLength;for(var Du=0,gu=ya.length;Du0&&hi0&&(Ne=Oa.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),Ne||(Ne=Xr.subarray()),Yr+=Qi*Ne.length);else if(hi<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Tn(Ua,!0)+" ms / "+Tn(Hu,!0)+" ms / "+Tn(-hi,!0)+" ms"),Yr-=Xr.byteLength;continue}Hu=Ua}if(_a=Hu,Yr>0){Yr+=Ut;try{En=new Uint8Array(Yr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Yr,reason:"fail allocating audio mdat "+Yr});return}if(!un){var vc=new DataView(En.buffer);vc.setUint32(0,Yr),En.set(At.types.mdat,4)}}else return;for(var ss=0;ss=2&&(Ll=mt[sr-2].duration,hn.duration=Ll),sr){this.nextAudioPts=Ua=ot+ie*Ll,S.samples=mt,un?Vn=new Uint8Array:Vn=At.moof(S.sequenceNumber++,_a/ie,S),S.samples=[];var xl=_a/V,vs=Ua/V,Pl={data1:Vn,data2:En,startPTS:xl,endPTS:vs,startDTS:xl,endDTS:vs,type:"audio",hasAudio:!0,hasVideo:!1,nb:sr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Pl),Pl}return null}},K.remuxEmptyAudio=function(S,x,j,W){var V=S.inputTimeScale,le=S.samplerate?S.samplerate:V,ie=V/le,ge=this.nextAudioPts,Ee=(ge!==void 0?ge:W.startDTS*V)+this._initDTS,Ce=W.endDTS*V+this._initDTS,Ae=1024,un=ie*Ae,hn=Math.ceil((Ce-Ee)/un),Ne=Oa.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!Ne){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var En=[],Vn=0;Vn4294967296;)S+=j;return S},J}(),La=va,dt=function(){function J(O){this.observer=O}var K=J.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(S,x,j,W,V,le,ie,ge){var Ee=this.observer,Ce="";S&&(Ce+="audio"),x&&(Ce+="video"),Ee.trigger(t.default.FRAG_PARSING_DATA,{data1:ge,startPTS:V,startDTS:V,type:Ce,hasAudio:!!S,hasVideo:!!x,nb:1,dropped:0}),Ee.trigger(t.default.FRAG_PARSED)},J}(),sn=dt,oa=Object(s.getSelfScope)(),St;try{St=oa.performance.now.bind(oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),St=oa.Date.now}var Da=function(){function J(O,S,x,j){this.observer=O,this.typeSupported=S,this.config=x,this.vendor=j}var K=J.prototype;return K.destroy=function(){var S=this.demuxer;S&&S.destroy()},K.push=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this;if(S.byteLength>0&&x!=null&&x.key!=null&&x.method==="AES-128"){var Ne=this.decrypter;Ne==null&&(Ne=this.decrypter=new u.default(this.observer,this.config));var En=St();Ne.decrypt(S,x.key.buffer,x.iv.buffer,function(Vn){var _a=St();hn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:En,tdecrypt:_a}}),hn.pushDecrypted(new Uint8Array(Vn),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)})}else this.pushDecrypted(new Uint8Array(S),x,new Uint8Array(j),W,V,le,ie,ge,Ee,Ce,Ae,un)},K.pushDecrypted=function(S,x,j,W,V,le,ie,ge,Ee,Ce,Ae,un){var hn=this.demuxer;if(!hn||(ie||ge)&&!this.probe(S)){for(var Ne=this.observer,En=this.typeSupported,Vn=this.config,_a=[{demux:yn,remux:La},{demux:Y.default,remux:sn},{demux:Z,remux:La},{demux:zn,remux:La}],ot=0,Ut=_a.length;ot1?L-1:0),z=1;z1?L-1:0),z=1;z0)return p.subarray(E,E+b)},s._readSize=function(p,g){var E=0;return E=(p[g]&127)<<21,E|=(p[g+1]&127)<<14,E|=(p[g+2]&127)<<7,E|=p[g+3]&127,E},s.getTimeStamp=function(p){for(var g=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ne+=String.fromCharCode(N);break;case 12:case 13:z=p[ue++],ne+=String.fromCharCode((N&31)<<6|z&63);break;case 14:z=p[ue++],$=p[ue++],ne+=String.fromCharCode((N&15)<<12|(z&63)<<6|($&63)<<0);break;default:}}return ne},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(u=new s.TextDecoder("utf-8")),u}var l=r._utf8ArrayToStr;n.default=r},"./src/demux/mp4demuxer.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),r=a("./src/events.js"),u=Math.pow(2,32)-1,i=function(){function l(m,p){this.observer=m,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,g,E,b){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);g==null&&(g="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:g+","+E,initSegment:b?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:g,initSegment:b?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else g&&(this.audioCodec=g),E&&(this.videoCodec=E)},l.probe=function(p){return l.findBox({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},l.bin2str=function(p){return String.fromCharCode.apply(null,p)},l.readUint16=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<8|p[g+1];return E<0?65536+E:E},l.readUint32=function(p,g){p.data&&(g+=p.start,p=p.data);var E=p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3];return E<0?4294967296+E:E},l.writeUint32=function(p,g,E){p.data&&(g+=p.start,p=p.data),p[g]=E>>24,p[g+1]=E>>16&255,p[g+2]=E>>8&255,p[g+3]=E&255},l.findBox=function(p,g){var E=[],b,I,L,N,z,$,ne;if(p.data?($=p.start,N=p.end,p=p.data):($=0,N=p.byteLength),!g.length)return null;for(b=$;b1?b+I:N,L===g[0]&&(g.length===1?E.push({data:p,start:b+8,end:ne}):(z=l.findBox({data:p,start:b+8,end:ne},g.slice(1)),z.length&&(E=E.concat(z)))),b=ne;return E},l.parseSegmentIndex=function(p){var g=l.findBox(p,["moov"])[0],E=g?g.end:null,b=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var N=I.data[0];b=N===0?8:16;var z=l.readUint32(I,b);b+=4;var $=0,ne=0;N===0?b+=8:b+=16,b+=2;var ue=I.end+ne,Z=l.readUint16(I,b);b+=2;for(var Y=0;Y>>31;if(ke===1){console.warn("SIDX has hierarchical references (not supported)");return}var rn=l.readUint32(I,X);X+=4,L.push({referenceSize:Pe,subsegmentDuration:rn,info:{duration:rn/z,start:ue,end:ue+Pe-1}}),ue+=Pe,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=Pe.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"),Oa=/(?:(?:#(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?/,Aa=/\.(mp4|m4s|m4v|m4a)$/i,sa=function(){function w(){}return w.findGroup=function(f,v){for(var o=0;o2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},w.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var o=[];Kn.lastIndex=0;function c(P,B){["video","audio"].forEach(function(k){var ae=P.filter(function($e){return mn($e,k)});if(ae.length){var be=ae.filter(function($e){return $e.lastIndexOf("avc1",0)===0||$e.lastIndexOf("mp4a",0)===0});B[k+"Codec"]=be.length>0?be[0]:ae[0],P=P.filter(function($e){return ae.indexOf($e)===-1})}}),B.unknownCodecs=P}for(var _;(_=Kn.exec(f))!=null;){var y={},C=y.attrs=new wn(_[1]);y.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(y.width=F.width,y.height=F.height),y.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),y.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),y),y.videoCodec&&y.videoCodec.indexOf("avc1")!==-1&&(y.videoCodec=w.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(zn.lastIndex=0;(_=zn.exec(f))!==null;){var F=new wn(_[1]);if(F.TYPE===o){var P={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:o,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(P.url=w.resolve(F.URI,v)),c.length){var B=w.findGroup(c,P.groupId);P.audioCodec=B?B.codec:c[0].codec}y.push(P)}}return y},w.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new ve(v),P=0,B=null,k=new Z,ae,be,$e,fn=null;for(Wn.lastIndex=0;(ae=Wn.exec(f))!==null;){var fa=ae[1];if(fa){k.duration=parseFloat(fa);var Xn=(" "+ae[2]).slice(1);k.title=Xn||null,k.tagList.push(Xn?["INF",fa,Xn]:["INF",fa])}else if(ae[3]){if(Object(i.isFiniteNumber)(k.duration)){var ua=y++;k.type=c,k.start=C,$e&&(k.levelkey=$e),k.sn=ua,k.level=o,k.cc=P,k.urlId=_,k.baseurl=v,k.relurl=(" "+ae[3]).slice(1),qe(k,B),F.fragments.push(k),B=k,C+=k.duration,k=new Z}}else if(ae[4]){var Ra=(" "+ae[4]).slice(1);B?k.setByteRange(Ra,B):k.setByteRange(Ra)}else if(ae[5])k.rawProgramDateTime=(" "+ae[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),fn===null&&(fn=F.fragments.length);else{if(ae=ae[0].match(Oa),!ae){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(be=1;be=0&&($e.method=ft,$e.key=null,$e.iv=ka));break}case"START":{var jo=new wn(Ja),C0=jo.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(C0)&&(F.startTimeOffset=C0);break}case"MAP":{var F0=new wn(Ja);k.relurl=F0.URI,F0.BYTERANGE&&k.setByteRange(F0.BYTERANGE),k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,k=new Z,k.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ae);break}}}return k=B,k&&!k.relurl&&(F.fragments.pop(),C-=k.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=y-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=P,!F.initSegment&&F.fragments.length&&F.fragments.every(function(yT){return Aa.test(yT.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),k=new Z,k.relurl=F.fragments[0].relurl,k.baseurl=v,k.level=o,k.type=c,k.sn="initSegment",F.initSegment=k,F.needSidxRanges=!0),fn&&At(F.fragments,fn),F},w}();function At(w,D){for(var f=w[D],v=D-1;v>=0;v--){var o=w[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function qe(w,D){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):D&&D.programDateTime&&(w.programDateTime=D.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function pa(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Qa=window,Tn=Qa.performance,Dn=function(w){pa(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,o.loaders={},o}D.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},D.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return b.AUDIO;case E.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},D.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=D.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,y=c.loader,C=_||y,F=new C(c);return o.loader=F,this.loaders[o.type]=F,F},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.destroyInternalLoaders(),w.prototype.destroy.call(this)},f.onManifestLoading=function(o){this.load({url:o.url,type:E.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(o){this.load({url:o.url,type:E.LEVEL,level:o.level,id:o.id,responseType:"text"})},f.onAudioTrackLoading=function(o){this.load({url:o.url,type:E.AUDIO_TRACK,level:null,id:o.id,responseType:"text"})},f.onSubtitleTrackLoading=function(o){this.load({url:o.url,type:E.SUBTITLE_TRACK,level:null,id:o.id,responseType:"text"})},f.load=function(o){var c=this.hls.config;s.logger.debug("Loading playlist of type "+o.type+", level: "+o.level+", id: "+o.id);var _=this.getInternalLoader(o);if(_){var y=_.context;if(y&&y.url===o.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+o.type),_.abort()}var C,F,P,B;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,P=c.manifestLoadingRetryDelay,B=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,B=0,P=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,P=c.levelLoadingRetryDelay,B=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var k={timeout:F,maxRetry:C,retryDelay:P,maxRetryDelay:B},ae={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+o.url),_.load(o,k,ae),!0},f.loadsuccess=function(o,c,_,y){if(y===void 0&&(y=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,y);return}if(this.resetInternalLoader(_.type),typeof o.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=o.data;if(c.tload=Tn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",y);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,y):this._handleMasterPlaylist(o,c,_,y)},f.loaderror=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,o)},f.loadtimeout=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(o,c,_,y){var C=this.hls,F=o.data,P=D.getResponseUrl(o,_),B=sa.parseMasterPlaylist(F,P);if(!B.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var k=B.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ae=sa.parseMasterPlaylistMedia(F,P,"AUDIO",k),be=sa.parseMasterPlaylistMedia(F,P,"SUBTITLES");if(ae.length){var $e=!1;ae.forEach(function(fn){fn.url||($e=!0)}),$e===!1&&B[0].audioCodec&&!B[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),ae.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:B,audioTracks:ae,subtitles:be,url:P,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,P=_.level,B=_.type,k=D.getResponseUrl(o,_),ae=Object(i.isFiniteNumber)(F)?F:0,be=Object(i.isFiniteNumber)(P)?P:ae,$e=D.mapContextToLevelType(_),fn=sa.parseLevelPlaylist(o.data,k,be,$e,ae);if(fn.tload=c.tload,B===E.MANIFEST){var fa={url:k,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:k,stats:c,networkDetails:y})}if(c.tparsed=Tn.now(),fn.needSidxRanges){var Xn=fn.initSegment.url;this.load({url:Xn,isSidxRequest:!0,type:B,level:P,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,this._handlePlaylistLoaded(o,c,_,y)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=I.default.parseSegmentIndex(new Uint8Array(o.data));if(!!_){var y=_.references,C=c.levelDetails;y.forEach(function(F,P){var B=F.info;if(!!C){var k=C.fragments[P];k.byteRange.length===0&&k.setByteRange(String(1+B.end-B.start)+"@"+String(B.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,y){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:y})},f._handleNetworkError=function(o,c,_,y){_===void 0&&(_=!1),y===void 0&&(y=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,P=this.getInternalLoader(o);switch(o.type){case E.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case E.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case E.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}P&&(P.abort(),this.resetInternalLoader(o.type));var B={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:P,context:o,networkDetails:c};y&&(B.response=y),this.hls.trigger(l.default.ERROR,B)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,P=_.id,B=_.levelDetails;if(!B||!B.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var k=D.canHaveQualityLevels(_.type);if(k)this.hls.trigger(l.default.LEVEL_LOADED,{details:B,level:F||0,id:P||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:B,id:P,stats:c,networkDetails:y});break}},D}(g),We=Dn;function ea(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var va=function(w){ea(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=D.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,y=this.loaders,C=this.hls.config,F=C.fLoader,P=C.loader;c.loaded=0;var B=y[_];B&&(s.logger.warn("abort previous fragment loader for type: "+_),B.abort()),B=y[_]=c.loader=C.fLoader?new F(C):new P(C);var k,ae,be;k={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var $e=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)($e)&&Object(i.isFiniteNumber)(fn)&&(k.rangeStart=$e,k.rangeEnd=fn),ae={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},be={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},B.load(k,ae,be)},f.loadsuccess=function(o,c,_,y){y===void 0&&(y=null);var C=o.data,F=_.frag;F.loader=void 0,this.loaders[F.type]=void 0,this.hls.trigger(l.default.FRAG_LOADED,{payload:C,frag:F,stats:c,networkDetails:y})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c.frag,response:o,networkDetails:_})},f.loadtimeout=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c.frag,networkDetails:_})},f.loadprogress=function(o,c,_,y){y===void 0&&(y=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:y})},D}(g),La=va;function dt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var sn=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=sn;function St(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},it=function(w){St(D,w);function D(v){var o;return o=w.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,o.bufferPadding=.2,o.fragments=Object.create(null),o.timeRanges=Object.create(null),o.config=v.config,o}var f=D.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,g.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,y=Object.keys(_).filter(function(F){var P=_[F];if(P.body.type!==c||!P.buffered)return!1;var B=P.body;return B.startPTS<=o&&o<=B.endPTS});if(y.length===0)return null;var C=y.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,y,C;Object.keys(this.fragments).forEach(function(F){var P=_.fragments[F];if(P.buffered===!0){var B=P.range[o];if(B){y=B.time;for(var k=0;k=C&&c<=F){y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))}),P=!0;else if(c<=C)break;return{time:y,partial:P}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,P=0;return Object.keys(this.fragments).forEach(function(B){var k=c.fragments[B];c.isPartial(k)&&(y=k.body.startPTS-c.bufferPadding,C=k.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),P<=_&&(F=k.body,P=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=Da.PARTIAL:y=Da.OK:y=Da.APPENDING),y},f.isPartial=function(o){return o.buffered===!0&&(o.range.video!==void 0&&o.range.video.partial===!0||o.range.audio!==void 0&&o.range.audio.partial===!0)},f.isTimeBuffered=function(o,c,_){for(var y,C,F=0;F<_.length;F++){if(y=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=y&&c<=C)return!0;if(c<=y)return!1}return!1},f.onFragLoaded=function(o){var c=o.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(o){var c=this;this.timeRanges=o.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var y=c.timeRanges[_];c.detectEvictedFragments(_,y)})},f.onFragBuffered=function(o){this.detectPartialFragments(o.frag)},f.hasFragment=function(o){var c=this.getFragmentKey(o);return this.fragments[c]!==void 0},f.removeFragment=function(o){var c=this.getFragmentKey(o);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},D}(g),J={search:function(D,f){for(var v=0,o=D.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=D[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},K=J,O=function(){function w(){}return w.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},w.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],y;for(y=0;yC&&(c[y-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,P,B=v,k=v,ae=0;ae=be&&v<$e)B=be,k=$e,F=k-v;else if(v+o1?c-1:0),y=1;yD?(v.duration=c-v.start,v.duration<0&&s.logger.warn("negative duration computed for frag "+v.sn+",level "+v.level+", there should be some duration drift between playlist and fragment!")):(o.duration=v.start-c,o.duration<0&&s.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):f>D?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Ne(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 Yr(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,Xr=.05,Hu=function(){function w(f,v,o,c){this.config=f,this.media=v,this.fragmentTracker=o,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var D=w.prototype;return D.poll=function(v){var o=this.config,c=this.media,_=this.stalled,y=c.currentTime,C=c.seeking,F=this.seeking&&!C,P=!this.seeking&&C;if(this.seeking=C,y!==v){if(this.moved=!0,_!==null){if(this.stallReported){var B=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((P||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var k=O.bufferInfo(c,y,0),ae=k.len>0,be=k.nextStart||0;if(!(!ae&&!be)){if(C){var $e=k.len>gu,fn=!be||be-y>gu;if($e||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(be,k.start||0)-y;if(fa>0&&fa<=gu){this._trySkipBufferHole(null);return}}var Xn=self.performance.now();if(_===null){this.stalled=Xn;return}var ua=Xn-_;!C&&ua>=Du&&this._reportStall(k.len);var Ra=O.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ra,ua)}}},D._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var P=this._trySkipBufferHole(F);if(P)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},D._reportStall=function(v){var o=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},D._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,y=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var P=_.buffered.start(F);if(y+o.maxBufferHole>=C&&y1?c-1:0),y=1;y1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},D}(g);function ss(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var se={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},Ll=function(w){ss(D,w);function D(){return w.apply(this,arguments)||this}var f=D.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var o=this.fragCurrent;o&&(o.loader&&o.loader.abort(),this.fragmentTracker.removeFragment(o)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=se.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,y=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=y.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=O.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===se.FRAG_LOADING){var P=this.fragCurrent;if(F.len===0&&P){var B=o.maxFragLookUpTolerance,k=P.start-B,ae=P.start+P.duration+B;Cae?(P.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),P.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=se.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===se.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=se.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=se.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(o,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return o+Math.max(0,c.totalduration-_)},D}(vc);function xl(w,D){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=se.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=se.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case se.BUFFER_FLUSHING:this.fragLoadError=0;break;case se.IDLE:this._doTickIdle();break;case se.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var c=window.performance.now(),_=this.retryDate;(!_||c>=_||this.media&&this.media.seeking)&&(s.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.ERROR:case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var o=this.hls,c=o.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var y;this.loadedmetadata?y=_.currentTime:y=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(!!F){var P=F.bitrate,B;P?B=Math.max(8*c.maxBufferSize/P,c.maxBufferLength):B=c.maxBufferLength,B=Math.min(B,c.maxMaxBufferLength);var k=O.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),ae=k.len;if(!(ae>=B)){s.logger.trace("buffer length of "+ae.toFixed(3)+" is below max of "+B.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var be=F.details;if(!be||be.live&&this.levelLastLoaded!==C){this.state=se.WAITING_LEVEL;return}if(this._streamEnded(k,be)){var $e={};this.altAudio&&($e.type="video"),this.hls.trigger(l.default.BUFFER_EOS,$e),this.state=se.ENDED;return}this._fetchPayloadOrEos(y,k,be)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,P=F.length;if(P!==0){var B=F[0].start,k=F[P-1].start+F[P-1].duration,ae=c.end,be;if(_.initSegment&&!_.initSegment.data)be=_.initSegment;else if(_.live){var $e=this.config.initialLiveManifestSize;if(P<$e){s.logger.warn("Can not start playback of a level, reason: not enough fragments "+P+" < "+$e);return}if(be=this._ensureFragmentAtLivePoint(_,ae,B,k,y,F,P),be===null)return}else ae$e&&$e>k.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+$e.toFixed(3)),k.currentTime=$e),this.nextLoadPosition=$e}if(o.PTSKnown&&c>y&&k&&k.readyState)return null;if(this.startFragRequested&&!o.PTSKnown){if(C)if(o.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),ae=eu(F,C.endProgramDateTime,B.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var fa=F[fn-o.startSN];C.cc===fa.cc&&(ae=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ae.sn))}ae||(ae=K.search(F,function(Xn){return C.cc-Xn.cc}),ae&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ae.sn))}ae||(ae=F[Math.min(P-1,Math.round(P/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ae.sn))}return ae},f._findFragment=function(o,c,_,y,C,F,P){var B=this.hls.config,k;if(CF-B.maxFragLookUpTolerance?0:B.maxFragLookUpTolerance;k=Nr(c,y,C,ae)}else k=y[_-1];if(k){var be=k.sn-P.startSN,$e=c&&k.level===c.level,fn=y[be-1],fa=y[be+1];if(c&&k.sn===c.sn)if($e&&!k.backtracked)if(k.snB.maxBufferHole&&c.dropped&&be?(k=fn,s.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(k=fa,s.logger.log("Re-loading fragment with SN: "+k.sn))}else k=null;else k.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+k.sn+". Loading fragment "+fa.sn),k=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),k.dropped=0,fn?(k=fn,k.backtracked=!0):be&&(k=null)))}return k},f._loadKey=function(o){this.state=se.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:o})},f._loadFragment=function(o){var c=this.fragmentTracker.getState(o);this.fragCurrent=o,o.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(o.sn)&&!o.bitrateTest&&(this.nextLoadPosition=o.start+o.duration),o.backtracked||c===Da.NOT_LOADED||c===Da.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Ae(this.hls,"main")),this.state=se.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,b.MAIN)},f.followingBufferedFrag=function(o){return o?this.getBufferedFrag(o.endPTS+.5):null},f._checkFragmentChanged=function(){var o,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),O.isBuffered(_,c)?o=this.getBufferedFrag(c):O.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var y=o;if(y!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:y});var C=y.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=y}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var o=this.media,c;o?(c=o.paused,o.pause()):c=!0,this.previouslyPaused=c}var _=this.fragCurrent;_&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var o=this.media;o&&o.buffered.length&&(this.immediateSwitch=!1,O.isBuffered(o,o.currentTime)&&(o.currentTime-=1e-4),this.previouslyPaused||o.play())},f.nextLevelSwitch=function(){var o=this.media;if(o&&o.readyState){var c,_,y;if(_=this.getBufferedFrag(o.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),o.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],P=this.fragLastKbps;P&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*P)+1:c=0}if(y=this.getBufferedFrag(o.currentTime+c),y&&(y=this.followingBufferedFrag(y),y)){var B=this.fragCurrent;B&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=se.BUFFER_FLUSHING;var _={startOffset:o,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("seeked",this.onvseeked),c.addEventListener("ended",this.onvended);var _=this.config;this.levels&&_.autoStartLoad&&this.hls.startLoad(_.startPosition),this.gapController=new Hu(_,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"),jr(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,jr(this.fragPrevious,y,c))}else c.PTSKnown=!1;if(C.details=c,this.levelLastLoaded=_,this.hls.trigger(l.default.LEVEL_UPDATED,{details:c,level:_}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var k=c.startTimeOffset;Object(i.isFiniteNumber)(k)?(k<0&&(s.logger.log("negative start time offset "+k+", count from end of last fragment"),k=P+F+k),s.logger.log("start time offset found in playlist, adjust startPosition to "+k),this.startPosition=k):c.live?(this.startPosition=this.computeLivePosition(P,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_LEVEL&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,y=this.levels,C=this.media,F=o.frag;if(this.state===se.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var P=o.stats,B=y[c.level],k=B.details;if(this.bitrateTest=!1,this.stats=P,s.logger.log("Loaded "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=se.IDLE,this.startFragRequested=!1,P.tparsed=P.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=se.IDLE,P.tparsed=P.tbuffered=window.performance.now(),k.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:P,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+k.startSN+" ,"+k.endSN+"],level "+c.level+", cc "+c.cc),this.state=se.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var ae=!(C&&C.seeking)&&(k.PTSKnown||!k.live),be=k.initSegment?k.initSegment.data:[],$e=this._getAudioCodec(B),fn=this.demuxer=this.demuxer||new Ae(this.hls,"main");fn.push(o.payload,be,$e,B.videoCodec,c,k.totalduration,ae)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C,F;if(y.audio&&this.altAudio&&delete y.audio,F=y.audio,F){var P=this.levels[this.level].audioCodec,B=navigator.userAgent.toLowerCase();P&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),P.indexOf("mp4a.40.5")!==-1?P="mp4a.40.2":P="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(P="mp4a.40.5"),B.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(P="mp4a.40.2",s.logger.log("Android: force audio codec to "+P)),F.levelCodec=P,F.id=o.id}F=y.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,y);for(C in y){F=y[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var k=F.initSegment;k&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:k,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="main"&&y.sn===_.sn&&y.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===se.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),o.hasAudio===!0&&F.addElementaryStream(ue.AUDIO),o.hasVideo===!0&&F.addElementaryStream(ue.VIDEO),s.logger.log("Parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb+",dropped:"+(o.dropped||0)),o.type==="video")if(F.dropped=o.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var P=C.details;if(P&&F.sn===P.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=o.startPTS,this.state=se.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var B=Ne(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),k=this.hls;k.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:B,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ae){ae&&ae.length&&c.state===se.PARSING&&(c.appended=!0,c.pendingBuffering=!0,k.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:ae,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(o){var c=!!o.url,_=o.id;if(!c){if(this.mediaBuffer!==this.media){s.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),y.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=se.IDLE}var C=this.hls;C.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:_}),this.altAudio=!1}},f.onAudioTrackSwitched=function(o){var c=o.id,_=!!this.hls.audioTracks[c].url;if(_){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,y,C=!1;for(var F in c){var P=c[F];P.id==="main"?(y=F,_=P,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(o){if(o.parent==="main"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+mt.toString(c.buffered)),this.fragPrevious=o;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:o,id:"main"}),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&O.isBuffered(this.media,this.media.currentTime)&&O.isBuffered(this.media,this.media.currentTime+.5);switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:if(!o.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var y=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+y+" ms"),this.retryDate=window.performance.now()+y,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==se.ERROR&&(o.fatal?(this.state=se.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===se.WAITING_LEVEL&&(this.state=se.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===se.PARSING||this.state===se.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=se.IDLE):(s.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}},f._reduceMaxBufferLength=function(o){var c=this.config;return c.maxMaxBufferLength>=o?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var o=this.media;if(!(!o||o.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:o,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=se.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var o=this.mediaBuffer?this.mediaBuffer:this.media;o&&this.fragmentTracker.detectEvictedFragments(ue.VIDEO,o.buffered),this.state=se.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var o=this.media,c=o.currentTime,_=o.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),o.currentTime=_)},f._getAudioCodec=function(o){var c=this.config.defaultAudioCodec||o.audioCodec;return this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5")),c},vs(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("main stream-controller: "+c+"->"+o),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:o})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var o=this.media;if(o){var c=this.getBufferedFrag(o.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var o=this.media;return o?this.followingBufferedFrag(this.getBufferedFrag(o.currentTime)):null}},{key:"nextLevel",get:function(){var o=this.nextBufferedFrag;return o?o.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(o){this._liveSyncPosition=o}}]),D}(Ll),jf=Hd;function R0(w,D){for(var f=0;f0){y=c[0].bitrate,c.sort(function(ae,be){return ae.bitrate-be.bitrate}),this._levels=c;for(var k=0;k=0&&o1&&B.loadError0){var c=this.currentLevelIndex,_=o.urlId,y=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:y,level:c,id:_})}}},y0(D,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(o){var c=this._levels;c&&(o=Math.min(o,c.length-1),(this.currentLevelIndex!==o||!c[o].details)&&this.setLevelInternal(o))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(o){this.manualLevelIndex=o,this._startLevel===void 0&&(this._startLevel=o),o!==-1&&(this.level=o)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(o){this._firstLevel=o}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var o=this.hls.config.startLevel;return o!==void 0?o:this._firstLevel}else return this._startLevel},set:function(o){this._startLevel=o}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(o){this.level=o,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=o)}}]),D}(g),w0=a("./src/demux/id3.js");function 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),be=k[_.level],$e=be.realBitrate?Math.max(be.realBitrate,be.bitrate):be.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*$e/8)),fa=c.currentTime,Xn=(fn-F.loaded)/ae,ua=(O.bufferInfo(c,fa,o.config.maxBufferHole).end-fa)/B;if(ua<2*_.duration/B&&Xn>ua){var Ra,Ja;for(Ja=_.level-1;Ja>C;Ja--){var qu=k[Ja].realBitrate?Math.max(k[Ja].realBitrate,k[Ja].bitrate):k[Ja].bitrate,nu=_.duration*qu/(8*.8*ae);if(nu=y;ae--){var be=k[ae];if(!!be){var $e=be.details,fn=$e?$e.totalduration/$e.fragments.length:c,fa=$e?$e.live:!1,Xn=void 0;ae<=o?Xn=P*_:Xn=B*_;var ua=k[ae].realBitrate?Math.max(k[ae].realBitrate,k[ae].bitrate):k[ae].bitrate,Ra=ua*fn/Xn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ae+"/"+Math.round(Xn)+"/"+ua+"/"+fn+"/"+F+"/"+Ra),Xn>ua&&(!Ra||fa&&!this.bitrateTestDelay||Ra=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=B?Math.min(B,y.maxStarvationDelay):y.maxStarvationDelay,Xn=y.abrBandWidthFactor,ua=y.abrBandWidthUpFactor;if($e===0){var Ra=this.bitrateTestDelay;if(Ra){var Ja=B?Math.min(B,y.maxLoadingDelay):y.maxLoadingDelay;fa=Ja-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Xn=ua=1}}return fn=this._findBestLevel(P,B,be,C,c,$e+fa,Xn,ua,_),Math.max(fn,0)}}]),D}(g),MI=GI;function AI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var 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(be){s.logger.warn("removeBufferRange failed",be)}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,$d=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=$d,Ag=window,zd=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:zd.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(zd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,zd.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}(),Vd=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),be=k.len,$e=k.end,fn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Xn=Math.max(fa,ae.len),ua=this.audioSwitch,Ra=this.trackId;if((benu||k.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=nu+.05;else return}if(_.initSegment&&!_.initSegment.data)ft=_.initSegment;else if($e<=nu){if(ft=Ja[0],this.videoTrackCC!==null&&ft.cc!==this.videoTrackCC&&(ft=$t(Ja,this.videoTrackCC)),_.live&&ft.loadIdx&&ft.loadIdx===this.fragLoadIdx){var ht=k.nextStart?k.nextStart:nu;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ht+.05)),this.media.currentTime=ht+.05;return}}else{var ka,jo=C.maxFragLookUpTolerance,C0=fn?Ja[fn.sn-Ja[0].sn+1]:void 0,F0=function(am){var B2=Math.min(jo,am.duration);return am.start+am.duration-B2<=$e?1:am.start-B2>$e&&am.start?-1:0};$eel-jo&&(jo=0),C0&&!F0(C0)?ka=C0:ka=K.search(Ja,F0)):ka=Ja[qu-1],ka&&(ft=ka,nu=ka.start,fn&&ft.level===fn.level&&ft.sn===fn.sn&&(ft.sn<_.endSN?(ft=Ja[ft.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+ft.sn)):ft=null))}ft&&(ft.encrypted?(s.logger.log("Loading key for "+ft.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=se.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:ft})):(s.logger.log("Loading "+ft.sn+", cc: "+ft.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+$e.toFixed(3)),this.fragCurrent=ft,(ua||this.fragmentTracker.getState(ft)===Da.NOT_LOADED)&&(ft.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(ft.sn)&&(this.nextLoadPosition=ft.start+ft.duration),y.trigger(l.default.FRAG_LOADING,{frag:ft}),this.state=se.FRAG_LOADING)))}break;case se.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var yT=jl.now(),O2=this.retryDate;P=this.media;var eee=P&&P.seeking;(!O2||yT>=O2||eee)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.WAITING_INIT_PTS:var bT=this.videoTrackCC;if(this.initPTS[bT]===void 0)break;var U2=this.waitingFragment;if(U2){var k2=U2.frag.cc;bT!==k2?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+k2+") does not match video track CC ("+bT+")"),this.waitingFragment=null,this.state=se.IDLE)):(this.state=se.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=se.IDLE;break;case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("ended",this.onvended);var _=this.config;this.tracks&&_.autoStartLoad&&this.startLoad(_.startPosition)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(o){s.logger.log("audio tracks updated"),this.tracks=o.audioTracks},f.onAudioTrackSwitching=function(o){var c=!!o.url;this.trackId=o.id,this.fragCurrent=null,this.state=se.PAUSED,this.waitingFragment=null,c?this.setInterval(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",be=this.stats=o.stats;if(B==="initSegment")this.state=se.IDLE,be.tparsed=be.tbuffered=jl.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:be,frag:c,id:"audio"}),this.tick();else{this.state=se.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Ae(this.hls,"audio"));var $e=this.initPTS[k],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||$e!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P);var fa=!1;this.demuxer.push(o.payload,fn,ae,null,c,F,fa,$e)}else s.logger.log("unknown video PTS for continuity counter "+k+", waiting for video PTS before demuxing audio frag "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+P),this.waitingFragment=o,this.state=se.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var y=o.tracks,C;if(y.video&&delete y.video,C=y.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,y),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var P={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[P]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,P))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&y.sn===_.sn&&y.level===_.level&&this.state===se.PARSING){var C=this.trackId,F=this.tracks[C],P=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(ue.AUDIO),s.logger.log("parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb),Ne(F.details,_,o.startPTS,o.endPTS);var B=this.audioSwitch,k=this.media,ae=!1;if(B)if(k&&k.readyState){var be=k.currentTime;s.logger.log("switching audio track : currentTime:"+be),be>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=se.BUFFER_FLUSHING,P.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ae=!0,this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,P.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var $e=this.pendingData;if(!$e){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),P.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(fn){fn&&fn.length&&$e.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ae&&$e.length&&($e.forEach(function(fn){c.state===se.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,fn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=jl.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(o){var c=o.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onBufferAppended=function(o){if(o.parent==="audio"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=jl.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var y=this.mediaBuffer?this.mediaBuffer:this.media;y&&s.logger.log("audio buffered : "+mt.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=se.IDLE}this.tick()}},f.onError=function(o){var c=o.frag;if(!(c&&c.type!=="audio"))switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=o.frag;if(_&&_.type!=="audio")break;if(!o.fatal){var y=this.fragLoadError;y?y++:y=1;var C=this.config;if(y<=C.fragLoadingMaxRetry){this.fragLoadError=y;var F=Math.min(Math.pow(2,y-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=jl.now()+F,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=se.ERROR}break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==se.ERROR&&(this.state=o.fatal?se.ERROR:se.IDLE,s.logger.warn("AudioStreamController: "+o.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===se.PARSING||this.state===se.PARSED)){var P=this.mediaBuffer,B=this.media.currentTime,k=P&&O.isBuffered(P,B)&&O.isBuffered(P,B+.5);if(k){var ae=this.config;ae.maxMaxBufferLength>=ae.maxBufferLength&&(ae.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+ae.maxMaxBufferLength+"s")),this.state=se.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=se.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var o=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){o.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=se.PARSED):(this.state=se.IDLE,this.fragPrevious=null,this.tick())},Nf(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("audio stream:"+c+"->"+o)}},get:function(){return this._state}}]),D}(Ll),zI=$I,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.");qu=ka,this.hasBeenReset=!0}})),Object.defineProperty(P,"positionAlign",c({},B,{get:function(){return nu},set:function(ka){var jo=o(ka);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 el},set:function(ka){if(ka<0||ka>100)throw new Error("Size must be between 0 and 100.");el=ka,this.hasBeenReset=!0}})),Object.defineProperty(P,"align",c({},B,{get:function(){return ft},set:function(ka){var jo=o(ka);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 Of=new Ng(0,0,0),Zi=Of.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 be=f.length-1;be>=0;be--)if(f[be].id===ae){F.set(k,f[be].region);break}break;case"vertical":F.alt(k,ae,["rl","lr"]);break;case"line":var $e=ae.split(","),fn=$e[0];F.integer(k,fn),F.percent(k,fn)&&F.set("snapToLines",!1),F.alt(k,fn,["auto"]),$e.length===2&&F.alt("lineAlign",$e[1],["start",Zi,"end"]);break;case"position":$e=ae.split(","),F.percent(k,$e[0]),$e.length===2&&F.alt("positionAlign",$e[1],["start",Zi,"end","line-left","line-right","auto"]);break;case"size":F.percent(k,ae);break;case"align":F.alt(k,ae,["start",Zi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var P=F.get("line","auto");P==="auto"&&Of.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",Zi);var B=F.get("position","auto");B==="auto"&&Of.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 Qd={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 Qd.hasOwnProperty(D)&&(f=Qd[D]),String.fromCharCode(f)},Ju=15,Nl=100,ZI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},eT={17:2,18:4,21:6,22:8,23:10,19:13,20:15},nT={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},aT={25:2,26:4,29:6,30:8,31:10,27:13,28:15},tT=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],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;vNl&&(Ya.log("ERROR","Too large cursor position "+this.pos),this.pos=Nl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=Hg(v);if(this.pos>=Nl){Ya.log("ERROR","Cannot insert "+v.toString(16)+" ("+o+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(o,this.currPenState),this.moveCursor(1)},D.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},D.getTextAndFormat=function(){return this.rows},w}(),I0=function(){function w(f,v){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new Xa,this.nonDisplayedMemory=new Xa,this.lastOutputScreen=new Xa,this.currRollUpRow=this.displayedMemory.rows[Ju-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[Ju-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},D.getHandler=function(){return this.outputFilter},D.setHandler=function(v){this.outputFilter=v},D.setPAC=function(v){this.writeScreen.setPAC(v)},D.setBkgData=function(v){this.writeScreen.setBkgData(v)},D.setMode=function(v){v!==this.mode&&(this.mode=v,Ya.log("INFO","MODE="+v),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},D.insertChars=function(v){for(var o=0;o=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}Ya.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Ya.time;o!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=o:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,o,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:o),this.lastOutputScreen.copy(this.displayedMemory))},D.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),T0=function(){function w(f,v,o){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=f||1,this.outputs=[v,o],this.channels=[new I0(1,v),new I0(2,o)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var D=w.prototype;return D.getHandler=function(v){return this.channels[v].getHandler()},D.setHandler=function(v,o){this.channels[v].setHandler(o)},D.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Ya.setTime(v);for(var F=0;F ("+ps([_,y])+")");if(c=this.parseCmd(_,y),c||(c=this.parseMidrow(_,y)),c||(c=this.parsePAC(_,y)),c||(c=this.parseBackgroundAttributes(_,y)),!c&&(C=this.parseChars(_,y),C))if(this.currChNr&&this.currChNr>=0){var P=this.channels[this.currChNr-1];P.insertChars(C)}else Ya.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ya.log("WARNING","Couldn't parse cleaned data "+ps([_,y])+" orig: "+ps([o[F],o[F+1]])))}},D.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,y=(v===23||v===31)&&o>=33&&o<=35;if(!(_||y))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ya.log("DEBUG","Repeated command ("+ps([v,o])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?o===32?C.ccRCL():o===33?C.ccBS():o===34?C.ccAOF():o===35?C.ccAON():o===36?C.ccDER():o===37?C.ccRU(2):o===38?C.ccRU(3):o===39?C.ccRU(4):o===40?C.ccFON():o===41?C.ccRDC():o===42?C.ccTR():o===43?C.ccRTD():o===44?C.ccEDM():o===45?C.ccCR():o===46?C.ccENM():o===47&&C.ccEOC():C.ccTO(o-32),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.parseMidrow=function(v,o){var c=null;if((v===17||v===25)&&o>=32&&o<=47){if(v===17?c=1:c=2,c!==this.currChNr)return Ya.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Ya.log("DEBUG","MIDROW ("+ps([v,o])+")"),!0}return!1},D.parsePAC=function(v,o){var c=null,_=null,y=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(y||C))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,o>=64&&o<=95?_=c===1?ZI[v]:nT[v]:_=c===1?eT[v]:aT[v];var F=this.interpretPAC(_,o),P=this.channels[c-1];return P.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.interpretPAC=function(v,o){var c=o,_={color:null,italics:!1,indent:null,underline:!1,row:v};return o>95?c=o-96:c=o-64,_.underline=(c&1)==1,c<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((c-16)/2)*4,_},D.parseChars=function(v,o){var c=null,_=null,y=null;if(v>=25?(c=2,y=v-8):(c=1,y=v),y>=17&&y<=19){var C=o;y===17?C=o+80:y===18?C=o+112:C=o+144,Ya.log("INFO","Special char '"+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}(),Yd=function(D,f,v){return D.substr(v||0,f.length)===f},iT=function(D){var f=parseInt(D.substr(-3)),v=parseInt(D.substr(-6,2)),o=parseInt(D.substr(-9,2)),c=D.length>9?parseInt(D.substr(0,D.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(o)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+D);return f+=1e3*v,f+=60*1e3*o,f+=60*60*1e3*c,f},S0=function(D){for(var f=5381,v=D.length;v;)f=f*33^D.charCodeAt(--v);return(f>>>0).toString()},lT=function(D,f,v){var o=D[f],c=D[o.prevCC];if(!c||!c.new&&o.new){D.ccOffset=D.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)D.ccOffset+=o.start-c.start,o.new=!1,o=c,c=D[o.prevCC];D.presentationOffset=v},cT={parse:function(D,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(w0.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(y,` `).split(` `),F="00:00.000",P=0,B=0,k=0,ae=[],be,$e=!0,fn=!1,fa=new YI;fa.oncue=function(Xn){var ua=v[o],Ra=v.ccOffset;ua&&ua.new&&(B!==void 0?Ra=v.ccOffset=ua.start:lT(v,o,k)),k&&(Ra=k-v.presentationOffset),fn&&(Xn.startTime+=Ra-B,Xn.endTime+=Ra-B),Xn.id=S0(Xn.startTime.toString())+S0(Xn.endTime.toString())+S0(Xn.text),Xn.text=decodeURIComponent(encodeURIComponent(Xn.text)),Xn.endTime>0&&ae.push(Xn)},fa.onparsingerror=function(Xn){be=Xn},fa.onflush=function(){if(be&&_){_(be);return}c(ae)},C.forEach(function(Xn){if($e)if(Yd(Xn,"X-TIMESTAMP-MAP=")){$e=!1,fn=!0,Xn.substr(16).split(",").forEach(function(ua){Yd(ua,"LOCAL:")?F=ua.substr(6):Yd(ua,"MPEGTS:")&&(P=parseInt(ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),P-=f,B=iT(F)/1e3,k=P/9e4}catch(ua){fn=!1,be=ua}return}else Xn===""&&($e=!1);fa.parse(Xn+` `)}),fa.flush()}},sT=cT;function 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=_n.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(P){var B=_n.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:P,stats:{tstart:F,tdecrypt:B}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=se.IDLE;return}switch(this.state){case se.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,y=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,P=o.maxFragLookUpTolerance,B=Math.min(o.maxBufferLength,o.maxMaxBufferLength),k=O.bufferedInfo(this._getBuffered(),y.currentTime,F),ae=k.end,be=k.len,$e=C[c].details,fn=$e.fragments,fa=fn.length,Xn=fn[fa-1].start+fn[fa-1].duration;if(be>B)return;var ua,Ra=this.fragPrevious;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 or.WIDEVINE:return c}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},f._requestLicense=function(o,c){s.logger.log("Requesting content license for key-system");var _=this._mediaKeysList[0];if(!_){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var y=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(y,o,c);s.logger.log("Sending license request to URL: "+y);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(P){s.logger.error("Failure requesting DRM license: "+P),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(o){if(!!this._emeEnabled){var c=o.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)}},f.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},f.onManifestParsed=function(o){if(!!this._emeEnabled){var c=o.levels.map(function(y){return y.audioCodec}),_=o.levels.map(function(y){return y.videoCodec});this._attemptKeySystemAccess(or.WIDEVINE,c,_)}},mT(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(g),DT=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 HMe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(HMe=tg.Direction||(tg.Direction={}))});var AL=Ge(Ma=>{"use strict";var rg=Ma&&Ma.__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,")"))}Ma.checkBoundaries=VMe;function QMe(e,n,a){return ea?a:e}Ma.checkValuesAgainstBoundaries=QMe;function KMe(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}"))}Ma.checkInitialOverlap=KMe;function YMe(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)}}Ma.getMargin=YMe;function XMe(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)}}Ma.getPaddingAndBorder=XMe;function ZMe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return PK(r,t*n[u].x,n[u].y)})}Ma.translateThumbs=ZMe;function eAe(e,n,a,t){for(var r=0,u=NK(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},uAe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(m){return m});var l=[],s=function(m){var p=jK(a[m],t[m],r,u,i),g=n[m].x;n.forEach(function(E,b){var I=E.x,L=jK(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()))},iAe=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,Ma.getStepDecimals)(t),l=(0,ML.useState)({}),s=l[0],m=l[1],p=(0,ML.useState)(u(n[a].toFixed(i))),g=p[0],E=p[1];return(0,ML.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var I={},L=e.getOffsets(),N=uAe(a,L,b,n,r,i,u),z=u(n[a].toFixed(i));if(N.length){var $=N.reduce(function(X,ve,Pe,ke){return X.length?rg(rg([],X,!0),[L[ke[Pe]].x],!1):[L[ke[Pe]].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]};Ma.useThumbOverlap=iAe;function NK(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return xK(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var UK=Ge(Wi=>{"use strict";var lAe=Wi&&Wi.__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)}}(),cAe=Wi&&Wi.__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]}),sAe=Wi&&Wi.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),vAe=Wi&&Wi.__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)&&cAe(n,e,a);return sAe(n,e),n},OK=Wi&&Wi.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.clientX,r.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,bt.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var u;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var i=(0,bt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var u=(0,bt.isTouchEvent)(r);if(!(!u&&r.button!==0)){var i=t.getTargetIndex(r);i!==-1&&(u?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:i,thumbZIndexes:t.state.thumbZIndexes.map(function(l,s){return s===i?Math.max.apply(Math,t.state.thumbZIndexes):l<=t.state.thumbZIndexes[i]?l:l-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var u=t.props,i=u.values,l=u.onChange,s=u.step,m=u.rtl,p=u.direction,g=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=m||p===mo.Direction.Left||p===mo.Direction.Down?-1:1;E!==-1&&(fAe.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)))):_Ae.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,bt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){g&&t.fireOnFinalChange()}):g&&t.fireOnFinalChange())},t.onKeyUp=function(r){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(r,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,m=t.props,p=m.direction,g=m.min,E=m.max,b=m.onChange,I=m.values,L=m.step,N=m.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var z=t.trackRef.current;if(!z)return null;var $=z.getBoundingClientRect(),ne=(0,bt.isVertical)(p)?$.height:$.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],Z=u-s[1],Y=0;switch(p){case mo.Direction.Right:case mo.Direction.Left:Y=ue/ne*(E-g);break;case mo.Direction.Down:case mo.Direction.Up:Y=Z/ne*(E-g);break;default:(0,bt.assertUnreachable)(p)}if(N&&(Y*=-1),Math.abs(Y)>=L/2){for(var X=0;XE?Y=E-I[X]:ve=L/2&&b((0,bt.replaceAt)(I,l,t.normalizeValue(ke,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,m=i.step,p=i.allowOverlap,g=i.values;return(0,bt.normalizeValue)(r,u,l,s,m,p,g)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,u=r.onFinalChange,i=r.values;u&&u(i)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var u=0;u-1?"grabbing":this.props.draggableTrack?(0,bt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?bt.voidFn:this.onMouseDownTrack,onTouchStart:E?bt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:OK(OK([],N.map(function(z,$,ne){return l({props:{style:a.props.direction===mo.Direction.Left||a.props.direction===mo.Direction.Right?{position:"absolute",left:"".concat(z[0],"px"),marginTop:"".concat(z[1],"px")}:{position:"absolute",top:"".concat(z[0],"px"),marginLeft:"".concat(z[1],"px")},key:"mark".concat($),ref:a.markRefs[$]},index:$})}),!0),s.map(function(z,$){var ne=a.state.draggedThumbIndex===$;return u({index:$,value:z,isDragged:ne,props:{style:{position:"absolute",zIndex:L[$],cursor:E?"inherit":ne?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:E?void 0:0,"aria-valuemax":g?p:s[$+1]||p,"aria-valuemin":g?m:s[$-1]||m,"aria-valuenow":z,draggable:!1,ref:a.thumbRefs[$],role:"slider",onKeyDown:E?bt.voidFn:a.onKeyDown,onKeyUp:E?bt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:mo.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(AE.Component);Wi.default=pAe});var kK=Ge(hu=>{"use strict";var dAe=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 mAe=dAe(UK());hu.Range=mAe.default;var LE=AL();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 hAe=ME();Object.defineProperty(hu,"Direction",{enumerable:!0,get:function(){return hAe.Direction}})});var PPe={};J2(PPe,{boot:()=>xPe});var q2=function(e){return function(n){for(var a=e.length,t=n.length,r=new Array(a*t),u=0,i=0;i=a.length?n:e(a[t])};var Y2=function(e,n,a,t){for(var r=0,u=t.length;r=t.length)return n;var r=t.slice();return r.splice(a,1),e(r)};var L0=function(e){return e.slice().reverse()};var Z2=function(e,n){return n.filter(e)};var ex=function(){function e(n,a,t,r,u,i){var l,s,m,p,g,E,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Gt={show:Mx};var Ax=function(e){return e.showRecordFields},Dv=function(){return function(){return function(e){var n=Ax(e);return{show:function(a){return"{"+(n(Wa.value)(a)+"}")}}}}};var Jf={show:Fx},an={show:Cx},cm={show:Gx},j0={show:function(e){if(e)return"true";if(!e)return"false";throw new Error("Failed pattern match at Data.Show (line 29, column 1 - line 31, column 23): "+[e.constructor.name])}},te=function(e){return e.show};var gv=function(e){var n=Ft(e);return function(a){var t=Ax(a);return function(r){var u=te(r);return{showRecordFields:function(i){return function(l){var s=t(Wa.value)(l),m=n(Wa.value),p=No(m)(l);return" "+(m+(": "+(u(p)+(","+s))))}}}}}},Rv=function(e){var n=Ft(e);return function(a){var t=te(a);return{showRecordFields:function(r){return function(u){var i=n(Wa.value),l=No(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Re=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ce=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Ue=function(){function e(){}return e.value=new e,e}(),sm=function(e){return e};var N0=function(e){return e.to};var O0=function(e){return e.from};var Ree=vn(pn),G=function(){function e(){}return e.value=new e,e}(),T=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Lx=function(e){var n=Ye(e);return{append:function(a){return function(t){if(a instanceof G)return t;if(t instanceof G)return a;if(a instanceof T&&t instanceof T)return new T(n(a.value0)(t.value0));throw new Error("Failed pattern match at Data.Maybe (line 182, column 1 - line 185, column 43): "+[a.constructor.name,t.constructor.name])}}}};var In=function(e){return function(n){return function(a){if(a instanceof G)return e;if(a instanceof T)return n(a.value0);throw new Error("Failed pattern match at Data.Maybe (line 237, column 1 - line 237, column 51): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},Mt=In(!0)(ln(!1)),Pt=In(!1)(ln(!0));var re={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},yee=U(re);var je=function(e){return In(e)(Ree)},Et=function(){return function(e){if(e instanceof T)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var nr=function(e){var n=De(e);return{eq:function(a){return function(t){return a instanceof G&&t instanceof G?!0:a instanceof T&&t instanceof T?n(a.value0)(t.value0):!1}}}},bu=function(e){var n=He(e),a=nr(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return xe.value;if(t instanceof G)return de.value;if(r instanceof G)return pe.value;if(t instanceof T&&r instanceof T)return n(t.value0)(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 0, column 0 - line 0, column 0): "+[t.constructor.name,r.constructor.name])}},Eq0:function(){return a}}};var Dr={apply:function(e){return function(n){if(e instanceof T)return yee(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 re}};var Ve={bind:function(e){return function(n){if(e instanceof T)return n(e.value0);if(e instanceof G)return G.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return Dr}};var la=function(){return{pure:T.create,Apply0:function(){return Dr}}}();var uo={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return re}},bee=function(){return{empty:G.value,Alt0:function(){return uo}}}(),io={Applicative0:function(){return la},Plus1:function(){return bee}};var Ie=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Te=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var gc=function(e){return In(new Ie(e))(Te.create)};var ur={map:function(e){return function(n){if(n instanceof Ie)return new Ie(n.value0);if(n instanceof Te)return new Te(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},Eee=U(ur);var jt=function(e){return function(n){return function(a){if(a instanceof Ie)return e(a.value0);if(a instanceof Te)return n(a.value0);throw new Error("Failed pattern match at Data.Either (line 208, column 1 - line 208, column 64): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},yv=function(){return jt(ln(G.value))(T.create)}();var vm={apply:function(e){return function(n){if(e instanceof Ie)return new Ie(e.value0);if(e instanceof Te)return Eee(e.value0)(n);throw new Error("Failed pattern match at Data.Either (line 70, column 1 - line 72, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return ur}};var tu={bind:jt(function(e){return function(n){return new Ie(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return vm}};var Rc=function(){return{pure:Te.create,Apply0:function(){return vm}}}(),pR={Applicative0:function(){return Rc},Bind1:function(){return tu}};var yi=function(e){return e};var yc={map:function(e){return function(n){return e(n)}}};var xx={apply:function(e){return function(n){return e(n)}},Functor0:function(){return yc}},Iee={bind:function(e){return function(n){return n(e)}},Apply0:function(){return xx}},fm={pure:yi,Apply0:function(){return xx}},ar={Applicative0:function(){return fm},Bind1:function(){return Iee}};var Px=function(e){return Math.min(Math.abs(e),2147483647)},jx=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},Nx=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var ST={Ring0:function(){return mc}};var Zr=function(e){return e.mod};var vr={degree:Px,div:jx,mod:Nx,CommutativeRing0:function(){return ST}},kr=function(e){return e.div};var It={mempty:"",Semigroup0:function(){return Bf}};var Va=function(e){return e.mempty};var Ox=function(e){return function(){return e}},Ux=function(e){return function(n){return function(){return n(e())()}}};var CT=function(e){return function(n){return function(){for(var a=0,t=e.length;a>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,m=l,p=u;s0?(t[p++]=E,++m):(t[p++]=g,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},vP=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=0;u":e===void 0?"":e instanceof Date?e.toString():typeof Blob!="undefined"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var Qne=Ht(Be),kP=Bl(Iv),Kne=Dt(Be);var W0=function(e){return e.foldrWithIndex};var Tm=function(e){return e.foldlWithIndex};var Yne=function(e){var n=W0(e);return function(a){var t=Ye(a.Semigroup0()),r=Va(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},Sm={foldrWithIndex:function(e){return function(n){var a=Qne(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=kP(cn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=Kne(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=kP(cn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return Yne(Sm)(e)},Foldable0:function(){return Be}};var BP=function(e){var n=Tm(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof G?a(r)(i):u}}};return n(t)(G.value)}};var HP=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Tt=function(e){return e},JP=function(e){return function(n){return function(a){var t;a<11?t="[0-"+(a-1).toString()+"]":a===11?t="[0-9a]":t="[0-9a-"+String.fromCharCode(86+a)+"]";var r=new RegExp("^[\\+\\-]?"+t+"+$","i");return function(u){if(r.test(u)){var i=parseInt(u,a);return(i|0)===i?e(i):n}else return n}}}};var FR=isFinite;var GR=Math.abs;var $0=Math.floor,QT=Math.log;var MR=function(e){return function(n){return Math.pow(e,n)}};var l_=Math.round;var qP=2.302585092994046;var WP=kt(lm),$P=nt(lm);var tae=function(){return JP(T.create)(G.value)}(),wc=tae(10),Is=function(){return HP(T.create)(G.value)}(),zP=function(e){if(!FR(e))return 0;if(e>=Tt(WP))return WP;if(e<=Tt($P))return $P;if(Oe)return je(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 zP(l_(e))};var Eo=function(e){return zP($0(e))};function LR(e){return Object.prototype.toString.call(e).slice(8,-1)}function c_(e){return e===null}function s_(e){return e===void 0}var xR=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function VP(e){return e.stack||e.toString()}function Iu(e){return new Error(e)}function z0(e){return e.message}function PR(e){return function(){throw e}}var KP=function(e){return PR(Iu(e))};var YP={show:VP};var Rr=function(e){return e.throwError};var Nt=function(e){return e.catchError};var Fv=function(e){var n=Nt(e),a=e.MonadThrow0().Monad0(),t=U(a.Bind1().Apply0().Functor0()),r=q(a.Applicative0());return function(u){return n(t(Te.create)(u))(function(i){return r(Ie.create(i))})}};var Cr={liftEffect:vn(pn),Monad0:function(){return bc}},gn=function(e){return e.liftEffect};var rae=U(ur);var YT=function(e){return e};var OR=function(e){return e};var UR=function(e){return function(n){return e(n)}},Fm=function(e){var n=U(e);return{map:function(a){return UR(n(rae(a)))}}};var ZP=function(e){return{Applicative0:function(){return tl(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=Fm(e.Bind1().Apply0().Functor0());return{apply:Vu(ZP(e)),Functor0:function(){return n}}},tl=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=ZP(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=Fm(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 Zu=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var HR=function(e){var n=ru(e);return function(a){return new Zu(a,n)}};var ZT=function(e){var n=U(e);return{map:function(a){return function(t){return new Zu(a(t.value0),n(a)(t.value1))}}}};var eS=function(e){var n=Sr(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},_ae=function(e){return new et(e.value0,e.value1)};var pae=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:pae};var aS=ZT(nS),Jr={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(Jr)(qa(e))(n);return function(r){return t(a(r))}}},foldl:function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,m){if(m instanceof Vt)return u=!0,s;if(m instanceof et){r=e(s)(m.value0),t=m.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[m.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=Ye(e.Semigroup0()),a=Va(e);return function(t){return Dt(Jr)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var dae=Ht(Jr);var Am=eS(Jr);var qR={append:function(e){return function(n){return dae(et.create)(n)(e)}}},tj=Ye(qR);var WR={append:function(e){return function(n){return new Zu(e.value0,tj(e.value1)(_ae(n)))}}};var rj={alt:tj,Functor0:function(){return nS}},tS=function(){return{empty:Vt.value,Alt0:function(){return rj}}}();var wae=ut($x);var ij=function(e){return new et(e,Vt.value)};var rS=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Vt)return r=!0,l;if(s instanceof et){t=new et(s.value0,l),a=s.value1;return}throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[l.constructor.name,s.constructor.name])}for(;!r;)u=i(t,a);return u}};return e(Vt.value)}();var oS=function(e){var n=ee(e.Monad0().Bind1()),a=Uo(e);return function(t){var r=t.Plus1().Alt0(),u=ia(r),i=U(r.Functor0()),l=q(t.Applicative0());return function(s){var m=function(p){return n(u(i(tr.create)(s))(l(new zt(me))))(function(g){return l(wae(function(E){return new et(E,p)})(function(E){return rS(p)})(g))})};return a(m)(Vt.value)}}};var qo=function(e){return Ht(e)(et.create)(Vt.value)};var lj=function(e){return e()};var cj=function(e){throw new Error(e)};var sj=function(){return cj};var Eae=sj(),Iae=lj,Ic=function(e){return Iae(function(){return Eae(e)})};var zR=function(){var e=HR(tS);return function(n){return JR(e(n))}}();var _j=function(e){return e.value0};var K0=function(e){return e.join("")},xm=function(e){return e.split("")},Tu=function(e){return e},pj=function(e){return function(n){return function(a){return function(t){return a>=0&&a=0&&e=0&&e<100&&l.setUTCFullYear(e),l.getTime()};function 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 qr=function(e){var n=q(e.Applicative0()),a=ru(e.Plus1());return function(t){if(t)return n(me);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 T)return l.value0;if(l instanceof G){var s=i=Pv(Pj)&&e<=Pv(jj)?new T(xj(e)):G.value},$ae={succ:p_(fS)(Pv),pred:d_(fS)(Pv),Ord0:function(){return fR}};var m_=function(){return{cardinality:Pv(jj)-Pv(Pj)|0,toEnum:fS,fromEnum:Pv,Bounded0:function(){return hv},Enum1:function(){return $ae}}}();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(an);var Ii=function(){function e(){}return e.value=new e,e}(),ol=function(){function e(){}return e.value=new e,e}(),ul=function(){function e(){}return e.value=new e,e}(),il=function(){function e(){}return e.value=new e,e}(),ll=function(){function e(){}return e.value=new e,e}(),cl=function(){function e(){}return e.value=new e,e}(),ql=function(){function e(){}return e.value=new e,e}(),iu=function(){function e(){}return e.value=new e,e}(),Su=function(){function e(){}return e.value=new e,e}(),lu=function(){function e(){}return e.value=new e,e}(),Cu=function(){function e(){}return e.value=new e,e}(),Fu=function(){function e(){}return e.value=new e,e}(),cu=function(){function e(){}return e.value=new e,e}(),su=function(){function e(){}return e.value=new e,e}(),Gu=function(){function e(){}return e.value=new e,e}(),Mu=function(){function e(){}return e.value=new e,e}(),Au=function(){function e(){}return e.value=new e,e}(),Lu=function(){function e(){}return e.value=new e,e}(),ai=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 Ii)return"Monday";if(e instanceof ol)return"Tuesday";if(e instanceof ul)return"Wednesday";if(e instanceof il)return"Thursday";if(e instanceof ll)return"Friday";if(e instanceof cl)return"Saturday";if(e instanceof ql)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},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 ai)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,zae={eq:function(e){return function(n){return e instanceof Ii&&n instanceof Ii||e instanceof ol&&n instanceof ol||e instanceof ul&&n instanceof ul||e instanceof il&&n instanceof il||e instanceof ll&&n instanceof ll||e instanceof cl&&n instanceof cl||e instanceof ql&&n instanceof ql}}},Hj={compare:function(e){return function(n){if(e instanceof Ii&&n instanceof Ii)return xe.value;if(e instanceof Ii)return de.value;if(n instanceof Ii)return pe.value;if(e instanceof ol&&n instanceof ol)return xe.value;if(e instanceof ol)return de.value;if(n instanceof ol)return pe.value;if(e instanceof ul&&n instanceof ul)return xe.value;if(e instanceof ul)return de.value;if(n instanceof ul)return pe.value;if(e instanceof il&&n instanceof il)return xe.value;if(e instanceof il)return de.value;if(n instanceof il)return pe.value;if(e instanceof ll&&n instanceof ll)return xe.value;if(e instanceof ll)return de.value;if(n instanceof ll)return pe.value;if(e instanceof cl&&n instanceof cl)return xe.value;if(e instanceof cl)return de.value;if(n instanceof cl)return pe.value;if(e instanceof ql&&n instanceof ql)return xe.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 zae}},_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 ai&&n instanceof ai}}},np={compare:function(e){return function(n){if(e instanceof iu&&n instanceof iu)return xe.value;if(e instanceof iu)return de.value;if(n instanceof iu)return pe.value;if(e instanceof Su&&n instanceof Su)return xe.value;if(e instanceof Su)return de.value;if(n instanceof Su)return pe.value;if(e instanceof lu&&n instanceof lu)return xe.value;if(e instanceof lu)return de.value;if(n instanceof lu)return pe.value;if(e instanceof Cu&&n instanceof Cu)return xe.value;if(e instanceof Cu)return de.value;if(n instanceof Cu)return pe.value;if(e instanceof Fu&&n instanceof Fu)return xe.value;if(e instanceof Fu)return de.value;if(n instanceof Fu)return pe.value;if(e instanceof cu&&n instanceof cu)return xe.value;if(e instanceof cu)return de.value;if(n instanceof cu)return pe.value;if(e instanceof su&&n instanceof su)return xe.value;if(e instanceof su)return de.value;if(n instanceof su)return pe.value;if(e instanceof Gu&&n instanceof Gu)return xe.value;if(e instanceof Gu)return de.value;if(n instanceof Gu)return pe.value;if(e instanceof Mu&&n instanceof Mu)return xe.value;if(e instanceof Mu)return de.value;if(n instanceof Mu)return pe.value;if(e instanceof Au&&n instanceof Au)return xe.value;if(e instanceof Au)return de.value;if(n instanceof Au)return pe.value;if(e instanceof Lu&&n instanceof Lu)return xe.value;if(e instanceof Lu)return de.value;if(n instanceof Lu)return pe.value;if(e instanceof ai&&n instanceof ai)return xe.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}}}(),Vae=function(){return{bottom:Ii.value,top:ql.value,Ord0:function(){return Hj}}}(),ty=function(){return{bottom:iu.value,top:ai.value,Ord0:function(){return np}}}(),Wr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new T(e);if(Oe)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 Qae(0)}},Qae=XR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=aa(Wr),n=Hn(Wr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Wr),n=Hn(Wr);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 T(Ii.value):e===2?new T(ol.value):e===3?new T(ul.value):e===4?new T(il.value):e===5?new T(ll.value):e===6?new T(cl.value):e===7?new T(ql.value):G.value},fromEnum:function(e){if(e instanceof Ii)return 1;if(e instanceof ol)return 2;if(e instanceof ul)return 3;if(e instanceof il)return 4;if(e instanceof ll)return 5;if(e instanceof cl)return 6;if(e instanceof ql)return 7;throw new Error("Failed pattern match at Data.Date.Component (line 175, column 14 - line 182, column 16): "+[e.constructor.name])},Bounded0:function(){return Vae},Enum1:function(){return Kae(0)}},Kae=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 T(iu.value):e===2?new T(Su.value):e===3?new T(lu.value):e===4?new T(Cu.value):e===5?new T(Fu.value):e===6?new T(cu.value):e===7?new T(su.value):e===8?new T(Gu.value):e===9?new T(Mu.value):e===10?new T(Au.value):e===11?new T(Lu.value):e===12?new T(ai.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 ai)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 Yae(0)}},Yae=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 np}}});var Jm={bottom:1,top:31,Ord0:function(){return ny}},xu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if(Oe)return G.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Jm},Enum1:function(){return Xae(0)}},Xae=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 ap=RR()();var qj=vn(pn),ry=function(e){return e},Wj=function(e){return e},tp=function(e){return e};var $j=function(e){return e},rp=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:ap(ry)(function(e){return e*1e3}),toDuration:ap(tp)(function(e){return e/1e3})},Nv={fromDuration:ap(Wj)(function(e){return e*6e4}),toDuration:ap(tp)(function(e){return e/6e4})},op={fromDuration:qj,toDuration:qj};var pS={fromDuration:ap($j)(function(e){return e*864e5}),toDuration:ap(tp)(function(e){return e/864e5})};var Xj=Hn(pr),dS=Et(),Zj=aa(jv),ete=te(Oj),nte=te(ZR),ate=te(kj);var tte=De(Bj),rte=De(_S),ote=De(Jj),ute=He(ey),ite=He(np),lte=He(ny);var cte=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}(),ti=function(e){return e.value0},qm=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 "+(ete(e.value0)+(" "+(nte(e.value1)+(" "+(ate(e.value2)+")")))))}},ri=function(e){return e.value1};var ly={eq:function(e){return function(n){return tte(e.value0)(n.value0)&&rte(e.value1)(n.value1)&&ote(e.value2)(n.value2)}}},ste=De(ly),mS={compare:function(e){return function(n){var a=ute(e.value0)(n.value0);if(a instanceof de)return de.value;if(a instanceof pe)return pe.value;var t=ite(e.value1)(n.value1);return t instanceof de?de.value:t instanceof pe?pe.value:lte(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(cte(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=ste(Ov(e)(n)(a))(t);return r?new T(t):G.value}}},hS=function(){return{bottom:new iy(nt(ay),nt(ty),nt(Jm)),top:new iy(kt(ay),kt(ty),kt(Jm)),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(an);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,Wm={bottom:0,top:59,Ord0:function(){return fy}},$m={bottom:0,top:59,Ord0:function(){return _y}},zm={bottom:0,top:999,Ord0:function(){return py}},Vm={bottom:0,top:23,Ord0:function(){return dy}},Ti={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(Oe)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Wm},Enum1:function(){return vte(0)}},vte=sy("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ti),n=Hn(Ti);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return fy}}});var Si={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if(Oe)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return $m},Enum1:function(){return fte(0)}},fte=sy("enumMinute","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 _y}}});var Pu={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if(Oe)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return zm},Enum1:function(){return _te(0)}},_te=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 Ci={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if(Oe)return G.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Vm},Enum1:function(){return pte(0)}},pte=sy("enumHour","Data.Time.Component",function(){return{succ:function(){var e=aa(Ci),n=Hn(Ci);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=aa(Ci),n=Hn(Ci);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return dy}}});var hte=te(rN),Dte=te(aN),gte=te(nN),Rte=te(tN);var yte=De(lN),bte=De(uN),wte=De(oN),Ete=De(iN),Ite=He(dy),Tte=He(_y),Ste=He(fy),Cte=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 "+(hte(e.value0)+(" "+(Dte(e.value1)+(" "+(gte(e.value2)+(" "+(Rte(e.value3)+")")))))))}};var Ms=function(e){return e.value2},As=function(e){return e.value1},sl=function(e){return e.value3};var Mc=function(e){return e.value0};var DS={eq:function(e){return function(n){return yte(e.value0)(n.value0)&&bte(e.value1)(n.value1)&&wte(e.value2)(n.value2)&&Ete(e.value3)(n.value3)}}},gS={compare:function(e){return function(n){var a=Ite(e.value0)(n.value0);if(a instanceof de)return de.value;if(a instanceof pe)return pe.value;var t=Tte(e.value1)(n.value1);if(t instanceof de)return de.value;if(t instanceof pe)return pe.value;var r=Ste(e.value2)(n.value2);return r instanceof de?de.value:r instanceof pe?pe.value:Cte(e.value3)(n.value3)}},Eq0:function(){return DS}};var up=function(){return{bottom:new Gc(nt(Vm),nt($m),nt(Wm),nt(zm)),top:new Gc(kt(Vm),kt($m),kt(Wm),kt(zm)),Ord0:function(){return gS}}}();var Fte=Hn(Wr),Gte=Hn(pr),Mte=Hn(xu),Ate=Hn(Ci),Lte=Hn(Si),xte=Hn(Ti),Pte=Hn(Pu),jte=te(eN),Nte=te(cN),Ote=De(ly),Ute=De(DS),kte=He(mS),Bte=He(gS),Hte=ee(Ve),ip=Jn(Dr),RS=U(re),Jte=zu(Ve),qte=aa(Wr),Wte=aa(pr),$te=aa(xu),zte=aa(Ci),Vte=aa(Si),Qte=aa(Ti),Kte=aa(Pu),vl=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:Fte(ti(e.value0)),month:Gte(ri(e.value0)),day:Mte(Fc(e.value0)),hour:Ate(Mc(e.value1)),minute:Lte(As(e.value1)),second:xte(Ms(e.value1)),millisecond:Pte(sl(e.value1))}},my=function(e){return e.value1},sN={show:function(e){return"(DateTime "+(jte(e.value0)+(" "+(Nte(e.value1)+")")))}};var Yte={eq:function(e){return function(n){return Ote(e.value0)(n.value0)&&Ute(e.value1)(n.value1)}}},oi={compare:function(e){return function(n){var a=kte(e.value0)(n.value0);return a instanceof de?de.value:a instanceof pe?pe.value:Bte(e.value1)(n.value1)}},Eq0:function(){return Yte}},ui=function(e){var n=rp(e);return function(a){return function(t){return n(Fj(yS(a),yS(t)))}}},Uv=function(e){return e.value0},lp=function(){return{bottom:new vl(nt(hS),nt(up)),top:new vl(kt(hS),kt(up)),Ord0:function(){return oi}}}(),Ac=function(e){var n=uy(e);return function(a){return function(t){return Hte(Gj(T.create)(G.value)(n(a))(yS(t)))(function(r){return ip(RS(vl.create)(Jte(ip(ip(RS(cy)(qte(r.year)))(Wte(r.month)))($te(r.day)))))(ip(ip(ip(RS(Gc.create)(zte(r.hour)))(Vte(r.minute)))(Qte(r.second)))(Kte(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 Pe(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,La;pa===qe&&(La=Dn,We(),Dn=La),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 La(sn){va[sn]=pa[sn].kill(Dn,function(oa){return function(){delete va[sn],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++,La(dt));return pa={},Qa=0,Tn=0,function(sn){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,Oa=6;function Aa(qe,pa,Qa){var Tn=0,Dn=dn,We=Qa,ea=null,va=null,La=null,dt=null,sn=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=La(We),dt===null?La=null:(La=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):La===null?Dn=Wn:(Dn=yn,We=qe.fromRight(We));break;case mn:switch(We.tag){case i:La&&(dt=new Z(b,La,dt)),La=We._2,Dn=mn,We=We._1;break;case n:La===null?(Dn=Wn,We=qe.right(We._1)):(Dn=yn,We=We._1);break;case r:Dn=Kn,We=Pe(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:La===null?sn=new Z(b,We,sn,va):sn=new Z(b,We,new Z(b,new Z(I,La,dt),sn,va),va),La=null,dt=null,Dn=mn,We=We._1;break;case l:oa++,La===null?sn=new Z(b,We,sn,va):sn=new Z(b,We,new Z(b,new Z(I,La,dt),sn,va),va),La=null,dt=null,Dn=mn,We=We._1;break;case s:Dn=Kn,j=Aa(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(La=null,dt=null,sn===null)Dn=Oa,We=va||ea||We;else switch(j=sn._3,V=sn._1,sn=sn._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:(La=V._1,dt=V._2,Dn=yn,We=qe.fromRight(We));break;case l:oa--,ea===null&&(W=qe.fromRight(We),sn=new Z(b,new Z(L,V._2,W),sn,j),(va===j||oa>0)&&(Dn=mn,We=V._3(W)));break;case L:sn=new Z(b,new Z(z,We,ea),sn,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++,sn=new Z(b,new Z(z,We,ea),sn,va),Dn=mn,We=V._1;break;case z:oa--,Dn=Wn,We=V._1,ea=V._2;break}break;case Oa: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===Oa)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===Oa)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=Oa,We=va,J(Tn);break;case zn:va===null&&(va=qe.left(x)),oa===0&&(Dn===zn&&(sn=new Z(b,new Z(N,We(x)),sn,va)),Dn=Wn,We=null,ea=null,J(++Tn));break;default:va===null&&(va=qe.left(x)),oa===0&&(Dn=Wn,We=null,ea=null)}return W}}function S(x){return function(){var j=K({rethrow:!1,handler:x})();return Dn===dn&&J(Tn),j}}return{kill:O,join:S,onComplete:K,isSuspended:function(){return Dn===dn},run:function(){Dn===dn&&(rn.isDraining()?J(Tn):rn.enqueue(function(){J(Tn)}))}}}function sa(qe,pa,Qa,Tn){var Dn=0,We={},ea=0,va={},La=new Error("[ParAff] Early exit"),dt=null,sn=e;function oa(K,O,S){var x=O,j=null,W=null,V=0,le={},ie,ge;e:for(;;)switch(ie=null,x.tag){case $:if(x._3===e&&(ie=We[x._1],le[V++]=ie.kill(K,function(Ee){return function(){V--,V===0&&S(Ee)()}})),j===null)break e;x=j._2,W===null?j=null:(j=W._1,W=W._2);break;case p:x=x._2;break;case g:case E:j&&(W=new Z(b,j,W)),j=x,x=x._1;break}if(V===0)S(qe.right(void 0))();else for(ge=0,ie=V;ge()=>e.props.def;function LN(e){class n extends Ga.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,bnn=function(){try{return Ry===void 0?void 0:Ry("util")}catch{return}}();var wnn=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 pp=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)}}}},R_=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var jre=fe(Bn),th=function(){function e(){}return e.value=new e,e}(),ON=function(){return function(e){var n=Ft(e);return function(a){return R_(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 jre(function(){return xN(t(Wa.value),u)})(n)}}}};$a();var Gi=window.ReactDOM,{createPortal:UN,findDOMNode:Znn,flushSync:ean,unstable_batchedUpdates:nan}=window.ReactDOM;var QS=Wu(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=Gi.render,P3=Gi.hydrate,KS=QS.default&&QS.default.renderToString||(e=>""),_oe=Gi.unmountComponentAtNode,j3=Ga.Fragment;function N3(e,n,a){return Ga.createElement.apply(null,[e,poe(e,n)].concat(a))}function poe(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=_e(a);if(e instanceof G&&t instanceof G)return me;if(e instanceof T&&t instanceof G)return me;if(e instanceof T&&t instanceof T){if(O3(e.value0)(t.value0))return me;if(Oe)return n(new T(t.value0))()}return n(t)()}}};var oe={asReactChildren:function(e){return[e]}},Qe={asReactChildren:function(e){return[e]}},ye={asReactChildren:vn(pn)};var Xe=Je,YS=R_(A3),U3=Bv(x3),k3=Bv(P3),B3=dp(M3),ta=!1;var H3=Bv(L3),sh=function(e){return e.asReactChildren},Mi=function(){return function(e){var n=sh(e);return function(a){return function(t){return function(r){return N3(a,t,n(r))}}}}},J3=Mi()(ye),xc=function(){return function(e){return function(n){return J3(e)(n)([])}}},Fe=J3(j3)({});var XS=U(Bn),doe=q(_t),q3=function(e){return{initialize:function(n){return H3(n)(e.initialState)},getState:function(n){return function(){var t=XS(_e)(B3(n))();return je(e.initialState)(t)}},setState:YS}},W3=function(){var e=function(n){return function(a){return{initialize:function(t){return $f(new T(a.initialState))(n)},getState:function(t){return XS(je(a.initialState))(Wf(n))},setState:function(t){return function(r){return function(u){return function(){return $f(new T(r))(n)(),YS(t)(r)(doe(me))(),u()}}}}}}};return XS(e)(U0(G.value))}();var z3=fe(ze),V3=Ye(Lt);var moe=q(_t),Q3=ON(),K3={reflectSymbol:function(){return"__unmounted"}},hoe=Q3(K3),Y3={reflectSymbol:function(){return"__subscriptions"}},Doe=Q3(Y3),Gy=fe(Bn),goe=SS(Ca)(K3),X3=U(Bn),Roe=SS(ja(Sj))(Y3),yoe=nn(Ke),boe=Sa(fr),woe=yR(_t)(Be),Eoe=yoe(ra),Z3=gn(Cr),Ioe=x0(bc),Toe=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}(),Soe={map:function(e){return function(n){return new qv(e(n.value0),n.value1)}}},Mr=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 Soe}},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 E_=function(e){return new qv(me,[e])},Za=function(e){return E_(ln(e))},Wv=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return E_(function(r){return n(t)(function(u){return a(In(moe(me))(r.dispatch)(u))})})}},Ea=function(e){var n=n4(e.Monad0().Bind1())(e);return function(a){return n(me)([a])}},a4=function(e){return function(n){var a=hoe(th.value),t=Doe(th.value),r=function(b){return function(I){return function(L){return function(){var z=Gy(ah(b))(function($){return $.init})();return n({initialState:z.value0}).setState(b)(I)(L)()}}}},u=function(){var b=X3(je(!1)),I=goe(th.value);return function(L){return b(I(L))}}(),i=function(){var b=X3(je([])),I=Roe(th.value);return function(L){return b(I(L))}}(),l=function(b){return function(){return boe(woe)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=Gy(ah(b))(function(N){return N.init})();return n({initialState:L.value0}).getState(b)()}},m=function(b){return function(I){return function(){var N=i(b)();return t(co(vp(I))(N))(b)()}}},p=function(b){return function(I){var L=function(N){return vp(Eoe(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 Ioe(u(b))(function(){var N=s(b)(),z=Gy(ah(b))(function(ne){return ne.update})(),$=z(N)(I);return r(b)($.value0)(p($.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),N=Gy(ah(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:Toe(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 pp(function(){var t=In(t4(me))(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(me))(n)(r4(a))()}}}}},ii={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},o4={handleEffect:function(e){return pp(e)}};var ma={handle:function(e){return function(n){return function(a){return e(n)()}}}},Ai=function(e){return e.handleMaybe},nC=function(e){return e.handleEffect},Yn=function(e){return e.handle};function Ay(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var r in e)({}).hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}var zl=function(){return function(){return function(e){return function(n){return Ay(e,n)}}}};var Ly=function(e){var n=Ft(e);return function(){return function(){return function(a){return function(t){return uR(n(a))(t)}}}}};var aC=xc(),tC=Mi(),u4=zl()();var gp=Je,i4=function(e){return function(n){return aC(gp(e))(n)}},rC=function(e){var n=tC(e);return function(a){return function(t){return n(gp(a))(t)}}},Vl=function(e){var n=tC(e);return function(a){return function(t){return function(r){return n(gp(a))(u4(r)({className:t}))}}}},vh=function(e){return function(n){return function(a){return aC(gp(e))(u4(a)({className:n}))}}},l4=function(e){return function(n){return aC(gp(e))({className:n})}},zr=function(e){return function(n){var a=tC(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")}}},xy=function(e){return zr("video")(e)};var Py=function(e){return zr("ul")(e)};var Ns=function(e){return zr("tr")(e)};var zv=function(e){return zr("thead")(e)};var Vv=function(e){return zr("th")(e)};var yp=function(){return function(){return vh("textarea")}};var jy=function(e){var n=Vl(e);return function(){return function(){return n("td")}}},Ql=function(e){return zr("td")(e)};var Qv=function(e){return zr("tbody")(e)};var Kv=function(e){return zr("table")(e)};var Io=function(e){return zr("strong")(e)},bp=function(e){var n=Vl(e);return function(){return function(){return n("span")}}},za=function(e){return zr("span")(e)},Ny=function(){return function(){return vh("source")}};var Oy=function(e){var n=Vl(e);return function(){return function(){return n("select")}}};var wp=function(e){var n=Vl(e);return function(){return function(){return n("p")}}},Kt=function(e){return zr("p")(e)};var Uy=function(e){var n=Vl(e);return function(){return function(){return n("option")}}};var ky=function(e){return zr("li")(e)};var Yv=function(e){return zr("label")(e)};var no=function(){return function(){return vh("input")}};var pl=function(){return function(){return vh("img")}};var rt=function(e){return zr("i")(e)};var Kl=l4("hr");var Ep=function(e){return zr("h6")(e)};var dl=function(e){return zr("h4")(e)},By=function(e){var n=Vl(e);return function(){return function(){return n("h3")}}},ao=function(e){return zr("h3")(e)},Pc=function(e){var n=Vl(e);return function(){return function(){return n("h2")}}},Yt=function(e){return zr("h2")(e)};var Xv=function(e){return zr("h1")(e)},Zv=function(e){var n=Vl(e);return function(){return function(){return n("form")}}};var Xt=function(e){var n=Vl(e);return function(){return function(){return n("div")}}},Se=function(e){return zr("div")(e)};var c4=cp(Qm);var Coe=q(_t);var oC={map:function(e){return function(n){return c4(c4(e))(n)}}},s4=fe(oC),v4=function(e){var n=ee(e.Monad0().Bind1()),a=gn(e);return function(t){return E_(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},fu=function(e){var n=v4(e);return function(a){return function(t){return n(s4(t)(a))}}};var f4=function(e){return function(n){return e(In(Coe(me))(n))}},Ip=function(e){var n=v4(e);return function(a){return function(t){return n(f4(s4(t)(a)))}}};var Gn=function(){return{"genericTop'":Ue.value}}();var uC=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":uC(e)}};var An=function(){return{"genericBottom'":Ue.value}}();var fh=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":fh(e)}};var xn=function(e){return{"genericBottom'":new Re(fh(e))}},_4=function(e){var n=N0(e);return function(a){return n(fh(a))}};var ef=U(re),Hy=wa();var iC=function(e){return e["genericToEnum'"]};var Jy=function(e){return e["genericSucc'"]},lC=function(e){var n=N0(e),a=O0(e);return function(t){var r=ef(n),u=Jy(t);return function(i){return r(u(a(i)))}}},cC=function(e){return e["genericPred'"]};var sC=function(e){return e["genericFromEnum'"]};var Pn=function(e){var n=cC(e),a=Jy(e);return function(t){var r=uC(t);return function(u){var i=cC(u),l=Jy(u);return function(s){var m=fh(s);return{"genericPred'":function(p){if(p instanceof Re)return ef(Re.create)(n(p.value0));if(p instanceof ce){var g=i(p.value0);if(g instanceof G)return new T(new Re(r));if(g instanceof T)return new T(new ce(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[g.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[p.constructor.name])},"genericSucc'":function(p){if(p instanceof Re){var g=a(p.value0);if(g instanceof G)return new T(new ce(m));if(g instanceof T)return new T(new Re(g.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[g.constructor.name])}if(p instanceof ce)return ef(ce.create)(l(p.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[p.constructor.name])}}}}}};var jn={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},Nn=function(e){var n=cC(e),a=Jy(e);return{"genericPred'":function(t){return ef(sm)(n(t))},"genericSucc'":function(t){return ef(sm)(a(t))}}};var vC=function(e){return e["genericCardinality'"]};var On=function(e){var n=vC(e),a=iC(e),t=sC(e);return function(r){var u=iC(r),i=sC(r);return{"genericCardinality'":Hy(n)+Hy(vC(r))|0,"genericToEnum'":function(l){var s=function(m){if(l>=0&&lt.value0;return r?a.value0:t.value0}()|0,(1+a.value1|0)+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 708, column 5 - line 712, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 700, column 32 - line 712, column 68): "+[a.constructor.name])};var Wy=function(e){return function(n){return new Vo(1,1,e,n,ml.value,ml.value)}},E4=function(){var e=function(t){if(t instanceof ml)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)?hl(s.value2,s.value3,hl(t,r,u,s.value4),hl(i,l,s.value5,m)):hl(i,l,hl(t,r,u,s),m)},a=function(t,r,u,i,l,s,m){return s instanceof Vo&&e(l)<=s.value0?hl(s.value2,s.value3,hl(u,i,l,s.value4),hl(t,r,s.value5,m)):hl(u,i,l,hl(t,r,s,m))};return function(t,r,u,i){if(u instanceof ml)return i instanceof ml?Wy(t)(r):i instanceof Vo&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):hl(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 ml&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):hl(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 ml)return u=!0,G.value;if(s instanceof Vo){var m=n(a)(s.value2);if(m instanceof de){r=s.value4;return}if(m instanceof pe){r=s.value5;return}if(m instanceof xe)return u=!0,new T(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[m.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 8 - line 286, column 22): "+[s.constructor.name])}for(;!u;)i=l(r);return i};return t}};var ph=function(e){var n=He(e);return function(a){return function(t){var r=function(u){if(u instanceof ml)return Wy(a)(t);if(u instanceof Vo){var i=n(a)(u.value2);if(i instanceof de)return E4(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof pe)return E4(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof xe)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 Li=function(){return ml.value}(),_u=function(e){var n=ph(e);return function(a){return Dt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(Li)}};var lue=typeof Array.from=="function",S4=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",cue=typeof String.prototype.fromCodePoint=="function",sue=typeof String.prototype.codePointAt=="function",C4=function(e){return sue?function(n){return n.codePointAt(0)}:e},F4=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){var i=u.length;if(r<0||r>=i)return a;if(S4)for(var l=u[Symbol.iterator](),s=r;;--s){var m=l.next();if(m.done)return a;if(s===0)return n(t(m.value))}return e(r)(u)}}}}}};var G4=function(e){return cue?String.fromCodePoint:e},M4=function(e){return function(n){return S4?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=Dh(Ts(1)(e)),r=j4(t);return r?P4(n)(t):n}return n},hC=C4(Rue),I_=A4(gue)(hC),To=function(e){return Ur(I_(e))};var $y=function(e){return function(n){return x4(function(a){return To(Y0(a)(n))})(VR(e)(n))}},DC=function(){var e=vS(m_)(nt(hv))(kt(hv));return function(n){return Tu(e(n))}}(),yue=function(e){if(e<=65535)return DC(e);var n=due(e-65536|0)(1024)+55296|0,a=mue(e-65536|0)(1024)+56320|0;return DC(n)+DC(a)};var Sp=G4(yue),O4=function(e){return function(n){if(e<1)return"";var a=nf(n);return a instanceof T?Sp(a.value0.head)+O4(e-1|0)(a.value0.tail):n}},li=M4(O4);var zy={eq:function(e){return function(n){return e===n}}},Vy={compare:function(e){return function(n){return hue(e)(n)}},Eq0:function(){return zy}},af=function(e){return function(n){return Tc(Jl(li(e)(n)))(n)}};var bue=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=nf(l);if(s instanceof T){var m=i===0;if(m)return t=!0,new T(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,G.value}for(;!t;)r=u(a,n);return r}},Cp=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(hC(n)):F4(bue)(T.create)(G.value)(hC)(e)(n)}},wue={bottom:0,top:1114111,Ord0:function(){return Vy}},Oc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if(Oe)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 wue},Enum1:function(){return Eue(0)}}}(),Eue=_ue("enumCodePoint","Data.String.CodePoints",function(){return{succ:p_(aa(Oc))(Hn(Oc)),pred:d_(aa(Oc))(Hn(Oc)),Ord0:function(){return Vy}}});var jue=wa();var $4={show:jue};var z4=he;var Nue=Cs(Be),Oue=fe(ze),Uue=t_(fC),Sn=function(e){return function(n){var a=Nue(Oue(n)(function(t){return new cn(e(t),t)}));return function(t){return Cc(t)(a)}}},V4=function(e){var n=lC(e),a=_4(e);return function(t){var r=n(t);return function(u){return function(i){return Uue(function(l){return new cn(l,r(l))})(a(i))}}}},Cn=function(e){var n=V4(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Os(u(i))}}}};var kue={info:"info",warning:"warn",error:"error"},xi=e=>n=>a=>t=>{let r=kue[e];if(typeof console!="undefined"&&console[r]&&console[r](n,a),typeof window!="undefined"){let u=new Error(n);typeof window.Sentry!="undefined"&&window.Sentry.captureException(u,{extra:a})}return t()},Q4=(e,n)=>(n.__sentryFingerprint=e,n);var K4=function(e){return wi(Q4)(e)};var gl="error";var Yy={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Te)return a.value0;if(a instanceof Ie)return xi(gl)("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},Bue=Zn(Yy),Ba=function(e){var n=Zn(e);return function(a){var t=U(a);return function(r){return n({parse:function(u){return t(T.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},Hue=Ba(Yy)(ur),tf=function(e){var n=xv(e);return function(a){return Hue({parse:n,diagnosticName:a})}},Ze={parseOrPanic:function(e){return Bue({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=In(new Ie(""))(Te.create);return function(a){return n(e.parse(a))}}()})}};var Y4=Nn(jn),X4=Ln(An),Z4=kn(Un),ks=function(){function e(){}return e.value=new e,e}(),Bs=function(){function e(){}return e.value=new e,e}(),Jue={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(Ue.value);if(e instanceof Bs)return new ce(Ue.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var que=function(e){if(e instanceof ks)return"school";if(e instanceof Bs)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},Xy=function(){return Zn(Ze)({parse:Sn(que)(Cn(Jue)(Pn(Y4)(Mn(Gn))(Y4)(X4))(On(Z4)(Z4))(xn(X4))),default:ks.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var e8=Nn(jn),n8=Pn(e8)(Mn(Gn)),a8=Ln(An),t8=xn(a8),r8=kn(Un),o8=On(r8),Wue=ia(uo),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}(),$ue={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(Ue.value);if(e instanceof rf)return new ce(new Re(Ue.value));if(e instanceof Hs)return new ce(new ce(Ue.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var zue=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])},yC=function(){var e=Sn(zue)(Cn($ue)(n8(n8(e8)(a8))(t8))(o8(o8(r8)))(t8)),n=function(a){return a==="cold"?new T(Hs.value):G.value};return Zn(Ze)({parse:function(a){return Wue(e(a))(n(a))},default:Yl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var Vue=H0(It),u8=te(an),Que=gr(Be)(It),Kue=za(oe);var i8=function(e){return{initiator:Xy(e.initiator),status:yC(e.status),introMessage:je("")(_e(e.introMessage))}},l8=25,bC=function(e){return To(e)>=l8},c8=function(e){var n=To(e),a=n>0,t=Vue(" ")([function(){return a?u8(n)+" characters":""}(),Que(["(",u8(l8),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=bC(e);return u?"text-success":""}();return Kue(r)(t)};var Zy=function(){function e(){}return e.value=new e,e}(),s8=function(){function e(){}return e.value=new e,e}();var v8=function(){var e=Zn(Ze)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(s8.value):n instanceof T&&n.value0==="free"?new T(Zy.value):n instanceof T&&n.value0==="churned"?new T(Zy.value):n instanceof G?new T(Zy.value):G.value},default:Zy.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(_e(n))}}();var f8=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:_e(e.imageUrl),partnerStatus:v8(e.partnerStatus)}};var Yue=ee(Ve),wC=Pa(),gh=tt(he),_8=H({reflectSymbol:function(){return"id"}}),Xue=nn(Ke)(Ve),Zue=qr(io),eie=U(re);var nie=function(){function e(){}return e.value=new e,e}(),aie=function(){function e(){}return e.value=new e,e}(),tie=function(){function e(){}return e.value=new e,e}(),EC=function(){function e(){}return e.value=new e,e}(),rie=function(){function e(){}return e.value=new e,e}(),eb=function(){function e(){}return e.value=new e,e}(),Rh=function(){function e(){}return e.value=new e,e}(),IC=function(){function e(){}return e.value=new e,e}(),TC=function(){function e(){}return e.value=new e,e}();var p8={show:wa()};var oie=he,uie=tf(wC(H({reflectSymbol:function(){return"avatarUrl"}})(gh)(H({reflectSymbol:function(){return"bio"}})(gh)(H({reflectSymbol:function(){return"connection"}})(tt(wC(H({reflectSymbol:function(){return"initiator"}})(he)(H({reflectSymbol:function(){return"introMessage"}})(gh)(H({reflectSymbol:function(){return"status"}})(he)(tn))))))(H({reflectSymbol:function(){return"firstName"}})(he)(_8(oie)(H({reflectSymbol:function(){return"lastName"}})(he)(H({reflectSymbol:function(){return"school"}})(wC(H({reflectSymbol:function(){return"allowedToContact"}})(Ca)(_8(z4)(H({reflectSymbol:function(){return"imageUrl"}})(gh)(H({reflectSymbol:function(){return"name"}})(he)(H({reflectSymbol:function(){return"partnerStatus"}})(gh)(tn)))))))(H({reflectSymbol:function(){return"title"}})(he)(H({reflectSymbol:function(){return"type"}})(he)(H({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(on)(tn))))))))))));var d8=function(e){if(e instanceof nie)return"sheet-view";if(e instanceof aie)return"school-details";if(e instanceof tie)return"network-gallery";if(e instanceof EC)return"livestream-details";if(e instanceof rie)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},m8=function(e){return Yue(uie("SemUser")(e))(function(n){return Xue(Zue(n.type==="Sem::User"))(function(){return new T({school:f8(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:_e(n.avatarUrl),title:n.title,bio:_e(n.bio),connection:eie(i8)(_e(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Uc=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},kc=function(e){return e()};var I8=function(){function e(){}return e.value=new e,e}(),T8=function(){function e(){}return e.value=new e,e}(),S8=function(){function e(){}return e.value=new e,e}();var Eie=function(e){if(e instanceof I8)return"disabled";if(e instanceof T8)return"free-consultation";if(e instanceof S8)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 27, column 13 - line 30, column 40): "+[e.constructor.name])};var Iie=function(){return[I8.value,T8.value,S8.value]}(),C8=Ba(Ze)(re)({parse:Sn(Eie)(Iie),diagnosticName:"InquiryMode"});var Tie=function(e,n,a,t,r,u,i){var l=new Date(Date.UTC(e,n,a,t,r,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l};function F8(e,n,a,t,r,u,i){return Tie(e,n-1,a,t,r,u,i).getTime()}function G8(e){return function(n){var a=new Date(n);return e(a.getUTCFullYear())(a.getUTCMonth()+1)(a.getUTCDate())(a.getUTCHours())(a.getUTCMinutes())(a.getUTCSeconds())(a.getUTCMilliseconds())}}var Sie=Et(),Cie=aa(pr);var Fie=Hn(pr);var M8=function(e){return e},tb=function(){var e=function(n){return function(a){return function(t){return function(r){return function(u){return function(i){return function(l){return new vl(Ov(n)(Sie(Cie(a)))(t),new Gc(r,u,i,l))}}}}}}};return G8(e)}();var A8=function(e){return F8(ti(e.value0),Fie(ri(e.value0)),Fc(e.value0),Mc(e.value1),As(e.value1),Ms(e.value1),sl(e.value1))};var L8=function(e){var n=Ye(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,m;function p(g,E,b){if(b<1)return s=!0,g;i=n(g)(E),l=E,u=b-1|0}for(;!s;)m=p(i,l,u);return m}}};return a(Va(e))};var Gie=wa();var T_=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),yh=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var x8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),P8=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AC=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}},Mie=Sa(Jc);var Rl={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Hc}};var Aie={Applicative0:function(){return Rl},Bind1:function(){return Jc}};var j8={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return Aie}},Lie=Rr(j8);var S_={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new T_(a.value0,a.value1,!1),t,r,function(s,m){return t(function(p){return s.value2?u(s,m):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Bc}},xie=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var Pie=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(me);if(b instanceof x8){s=b.value0;return}if(b instanceof P8)return m=!0,a(tr.create)(b.value0);if(b instanceof AC)return m=!0,t(new zt(new cn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!m;)p=g(s);return p};return r(l)(function(s){return i(u,x8.create,P8.create,function(m,p){return new AC(m,new Ie(p))},function(m,p){return new AC(m,new Te(p))})})}}};var N8=xie(function(e){return new cn(e.value1,e)}),LC=function(e){return e.value1},xC=function(e){return e.value0};var jie={index:0,line:1,column:1},O8=function(e){var n=U(e.Monad0().Bind1().Apply0().Functor0()),a=Pie(e);return function(t){return function(r){var u=new T_(t,jie,!1);return n(Br)(a(u)(r))}}},Nie=O8(_m),U8=function(e){var n=Nie(e);return function(a){return Gie(n(a))}};var Oie=function(e){return function(n){return Lie(new yh(e,n))}},Gp=function(e){return Mie(Oie(e))(N8)};var k8={empty:Gp("No alternative"),Alt0:function(){return S_}},C_={Applicative0:function(){return Rl},Plus1:function(){return k8}};var zie=ia(S_);var Vie=q(Rl);var Qie=U(Bc);var qc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new T_(i.value0,i.value1,n.value2),l)},u)}};var rb=function(e){return function(n){return zie(n)(Vie(e))}},F_=function(e){return rb(G.value)(Qie(T.create)(e))};var q8=Hn(Oc),Yie=Zr(vr);var Xie=te(Gt);var W8=function(e){return function(n){return function(a){var t=q8(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=Cp(0)(a);return r instanceof T&&q8(r.value0)===10?{index:e.index+1|0,line:e.line,column:e.column}:{index:e.index+1|0,line:e.line+1|0,column:1}}return t===9?{index:e.index+1|0,line:e.line,column:(e.column+8|0)-Yie(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 T){var E=function(){if(Dl(g.value0.tail))return W8(s)(g.value0.head)(p);if(Oe)return W8(s)(g.value0.head)(g.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=g.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[g.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var jC=wR(function(e){return function(n){return function(a){return function(t){return function(r){var u=Dl(e.value0);return u?r(new T_(e.value0,e.value1,!0),me):t(e,new yh("Expected EOF",e.value1))}}}}}),$8=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 yh(i.value0,n.value1));if(i instanceof Te)return u(new T_(i.value0.remainder,Zie(n.value1)(i.value0.consumed)(i.value0.remainder),!Dl(i.value0.consumed)),i.value0.value);throw new Error("Failed pattern match at Parsing.String (line 286, column 7 - line 290, column 121): "+[i.constructor.name])}}}}})};var Wc=function(e){return $8(function(n){var a=ei(e)(n);return a instanceof T?new Te({value:e,consumed:e,remainder:a.value0}):new Ie("Expected "+Xie(e))})};var z8=te(an),nle=Bt(ko),ale=M0(Hc);var tle=function(e){return"(line "+(z8(e.line)+(", col "+(z8(e.column)+")")))},rle=function(e){return xC(e)+(" "+tle(LC(e)))},NC=function(e){return function(n){return nle(rle)(U8(n)(ale(e)(jC)))}};var lb=aa(m_);var Ko=te(an);var hle=Sr(Jr),Dle=hle(It);var gle=_R(na)(mc);var OC=Hn(Wr),Rle=te(ZR),yle=Hn(pr),Z8=Hn(xu),ble=wa(),wle=Hn(jv),eO=te(Uj),UC=Hn(Ci),Ele=Zr(vr),nO=Hn(Si),aO=Hn(Ti),kC=Hn(Pu),tO=kr(vr);var Mp=function(){function e(){}return e.value=new e,e}(),rO=function(){function e(){}return e.value=new e,e}(),Ile=function(){function e(){}return e.value=new e,e}(),Xl=function(){function e(){}return e.value=new e,e}(),BC=function(){function e(){}return e.value=new e,e}(),oO=function(){function e(){}return e.value=new e,e}(),uO=function(){function e(){}return e.value=new e,e}(),Zl=function(){function e(){}return e.value=new e,e}(),Tle=function(){function e(){}return e.value=new e,e}(),Sle=function(){function e(){}return e.value=new e,e}(),ec=function(){function e(){}return e.value=new e,e}(),Cle=function(){function e(){}return e.value=new e,e}(),cb=function(){function e(){}return e.value=new e,e}(),nc=function(){function e(){}return e.value=new e,e}(),ac=function(){function e(){}return e.value=new e,e}(),Fle=function(){function e(){}return e.value=new e,e}(),Pi=function(){function e(){}return e.value=new e,e}(),Gle=function(){function e(){}return e.value=new e,e}(),sb=function(){function e(){}return e.value=new e,e}(),Mle=function(){function e(){}return e.value=new e,e}(),Ale=function(){function e(){}return e.value=new e,e}(),Lle=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 xle=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 ai)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(Oe)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},iO=function(e){if(e<0)return"-"+iO(-e|0);if(e<10)return"000"+Ko(e);if(e<100)return"00"+Ko(e);if(e<1e3)return"0"+Ko(e);if(Oe)return Ko(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},lO=function(e){if(e<0)return"-"+lO(-e|0);if(e<10)return"00"+Ko(e);if(e<100)return"0"+Ko(e);if(Oe)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 Ple=function(e){var n=Ko(gle(e)),a=To(n);return a===1?"0"+n:a===2?n:af(a-2|0)(n)};var jle=function(e){var n=e===0;return n?12:e},Nle=function(e){return function(n){if(n instanceof Mp)return iO(OC(ti(e.value0)));if(n instanceof rO)return Ple(OC(ti(e.value0)));if(n instanceof Ile)return Ko(OC(ti(e.value0)));if(n instanceof Xl)return Rle(ri(e.value0));if(n instanceof BC)return xle(ri(e.value0));if(n instanceof oO)return lf(yle(ri(e.value0)));if(n instanceof uO)return lf(Z8(Fc(e.value0)));if(n instanceof Zl)return Ko(Z8(Fc(e.value0)));if(n instanceof Tle)return Ko(Eo(function(t){return t/1e3}(ble(M8(A8(e))))));if(n instanceof Sle)return Ko(wle(qm(e.value0)));if(n instanceof ec)return eO(qm(e.value0));if(n instanceof Cle)return li(3)(eO(qm(e.value0)));if(n instanceof cb)return lf(UC(Mc(e.value1)));if(n instanceof nc)return lf(jle(Ele(UC(Mc(e.value1)))(12)));if(n instanceof ac){var a=UC(Mc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof Fle)return Ko(nO(As(e.value1)));if(n instanceof Pi)return lf(nO(As(e.value1)));if(n instanceof Gle)return Ko(aO(Ms(e.value1)));if(n instanceof sb)return lf(aO(Ms(e.value1)));if(n instanceof Mle)return lO(kC(sl(e.value1)));if(n instanceof Ale)return Ko(function(t){return tO(t)(100)}(kC(sl(e.value1))));if(n instanceof Lle)return lf(function(t){return tO(t)(10)}(kC(sl(e.value1))));if(n instanceof yt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},Yo=function(e){return function(n){return Dle(Nle(n))(e)}};var awn=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function vb(e){return Math.round(e).toString()}var Ap=ee(Jc);var Ole=q(Rl),Ule=q0(C_)(Fp);var kle=WT(C_)(Fp),fb=L8(It),Ble=a_(Rl)(ym),Hle=U(re);var cO=Ol(na),Jle=kr(vr),qle=te(an),Wle=fe(ur),$le=te(Jf),zle=vn(pn);var Vle=Ap(F_(qc(Wc("+"))))(function(e){return Ap(Ule(Wc("0")))(function(n){return Ap(F_(qc(Wc(",0"))))(function(a){return Ap(F_(qc(Wc("."))))(function(t){return Ap(Ble(t)(function(r){return qc(kle(Wc("0")))}))(function(r){return Ap(F_(qc(Wc("a"))))(function(u){return Ole({sign:Pt(e),before:Ur(n),comma:Pt(a),after:je(0)(Hle(Ur)(r)),abbreviations:Pt(u)})})})})})})}),Qle=NC(Vle);var sO=function(e){return function(n){var a=GR(n),t=function(){if(a>0)return cO(Eo(QT(a)/qP))(0);if(Oe)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=Jle(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(Oe)return"10e+"+qle(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return sO({comma:e.comma,before:e.before,after:e.after,sign:e.sign,abbreviations:!1})(u)+i}var l=(e.before-t|0)-1|0,s=MR(10)(Tt(cO(0)(e.after))),m=l_(a*s)/s,p=$0(m),g=m-p,E=l_(g*s),b=function(){var z=vb(E),$=To(z),ne=fb("0")(e.after-$|0);return ne+z}(),I=function(){var z=e.after<1;return z?"":"."+(function(){var $=E===0;return $?fb("0")(e.after):""}()+function(){var $=E>0;return $?b:""}())}(),L=function(z){return function($){return function(ne){var ue=z,Z=$,Y=!1,X;function ve(Pe,ke,rn){var wn=r_(rn);if(wn instanceof G)return Y=!0,K0(Pe);if(wn instanceof T&&ke<3){ue=co(wn.value0.head)(Pe),Z=ke+1|0,ne=wn.value0.tail;return}ue=co(",")(Pe),Z=0,ne=rn}for(;!Y;)X=ve(ue,Z,ne);return X}}},N=function(){return e.comma?L([])(0)(L0(xm(fb("0")(l)+vb(p)))):fb("0")(l)+vb(p)}();return function(){var z=n<0;if(z)return"-";var $=n>0&&e.sign;return $?"+":""}()+(N+I)}},Kle=function(e){return function(n){return Wle(Qle(e))(qa(sO)(n))}},G_=function(e){return function(n){return jt(ln($le(n)))(zle)(Kle(e)(n))}};var cf=void 0;var Yle=Je;var vO=function(e){return s_(e)};var ci=function(e){var n=vO(e);return n?G.value:new T(Yle(e))};var ba=function(e){return function(n){var a=vO(e);return a?n:e}};var Kr=function(){return Je};var bh=te(an),Xle=Hn(Wr),Zle=Hn(pr),ece=Kr(),nce=ou(),ace=ui(Nv),HC=kr(vr),tce=qo(Be);var rce=function(e){return function(n){if(n.minutes<=0)return e.justNow;if(n.minutes<=1)return"a minute"+e.suffix;if(n.minutes<=45)return bh(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return bh(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return bh(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return bh(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if(Oe)return bh(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 158, column 1 - line 158, column 81): "+[e.constructor.name,n.constructor.name])}},_b=function(e){return rce({suffix:" "+e,justNow:"just now"})},fO=function(){return function(e){var n=function(m){return(Xle(ti(Uv(m)))*12|0)+Zle(ri(Uv(m)))|0},a=ece(e),t=ba(a.format)(_b("ago")),r=AR(nce(ace(a.to)(a.from))),u=HC(r+30|0)(60),i=HC(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=HC(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var _O=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var JC=G_("0,0");var pO=function(e){return JC(Tt(e))},ji=function(e){return function(n){return function(a){return pO(e)+(" "+_O(e)(n)(a))}}};var dO=function(){return Yo(tce([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),Pi.value,new yt(" "),ac.value]))}();$a();var mO=Ga.Fragment,qC=()=>document.visibilityState=="visible",hO=(e,n)=>document.elementFromPoint(e,n);var DO=function(e){var n=rC(e);return function(){return function(){return n("button")}}},gO=function(){return function(){return i4("br")}};var RO=function(e){var n=rC(e);return function(){return function(){return n("a")}}};function yO(e){return function(n){return function(){return n.getElementById(e)}}}var oce=U(Bn),pb=function(e){var n=oce(_e),a=yO(e);return function(t){return n(a(t))}};var db=function(e){return function(n){return function(){return n[e]}}},uce=db("children"),ice=db("firstElementChild"),lce=db("lastElementChild"),cce=db("childElementCount");var pu=function(){return window};function bO(e,n,a,t){if(typeof window!="undefined"){var r=window[a];if(r!=null&&t instanceof r)return n(t)}for(var u=t;u!=null;){var i=Object.getPrototypeOf(u),l=i.constructor.name;if(l===a)return n(t);if(l==="Object")return e;u=i}return e}var Fn=function(e){return function(n){return bO(G.value,T.create,e,n)}};var wO=Je;var mb=Je;var EO=Je;function IO(e,n,a){var t=Object.prototype.toString.call(a);return t.indexOf("[object HTML")===0&&t.indexOf("Element]")===t.length-8?n(a):e}var WC=Je;var TO=function(e){return IO(G.value,T.create,e)};function $C(e){return function(){return e.seeking}}function wh(e){return function(){return e.currentTime}}function zC(e){return function(){return e.volume}}function VC(e){return function(n){return function(){n.volume=e}}}function QC(e){return function(){return e.muted}}function M_(e){return function(n){return function(){n.muted=e}}}var SO=Fn("HTMLMediaElement");var CO=Fn("HTMLMediaElement");function KC(e){return function(){return e.hash}}function YC(e){return function(n){return function(){n.hash=e}}}function XC(e){return function(){return e.platform}}function sf(e){return function(){return e.document}}function ZC(e){return function(){return e.navigator}}function Eh(e){return function(){return e.location}}var FO=Je;var Rce=U(ze);var yce=gO()(),bce=a_(_t)(ym),GO=ee(fr),MO=fe(Bn),wce=ee(Ve);var aF=Xe("\xA0");var ha=qa(In(ta));var AO=function(e){return function(n){if(e)return ta;if(Oe)return n(me);throw new Error("Failed pattern match at Utils.HTML (line 113, column 1 - line 113, column 65): "+[e.constructor.name,n.constructor.name])}},tF=function(e){return function(n){return AO(e)(ln(n))}};var rF=function(e){return function(n){if(e)return n(me);if(Oe)return ta;throw new Error("Failed pattern match at Utils.HTML (line 100, column 1 - line 100, column 61): "+[e.constructor.name,n.constructor.name])}},ga=function(e){return function(n){return rF(e)(ln(n))}};var Ece=Mi()(ye)(mO),Ice=function(e){return function(n){return Ece({key:e.key})(wm(yce({}))(Rce(Xe)(Qo(` `)(n))))}},Lp=Ice({key:""}),Db=function(e){return bce(CO(e.target))(wh)};var LO=function(e){return function(){return hO(e.x,e.y)}},xO=function(e){return GO(MO(GO(pu)(sf))(mb))(pb(e))},gb=function(e){return MO(xO(e))(function(n){return wce(n)(TO)})};var Ih=on;var PO=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},oF=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),jO=()=>new Date,NO=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var A_=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();function uF(){return Date.now()}var Fce=U(Bn);var si=Fce(tb)(uF);var UO={liftAff:vn(pn),MonadEffect0:function(){return Le}};var WBn=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,g){this.queue=p,this.value=g,this.next=null,this.prev=null}function a(p){this.draining=!1,this.error=null,this.value=p,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function r(p){try{p()}catch(g){setTimeout(function(){throw g},0)}}function u(p,g){var E=new n(p,g);switch(p.size){case 0:p.head=E;break;case 1:E.prev=p.head,p.head.next=E,p.last=E;break;default:E.prev=p.last,p.last.next=E,p.last=E}return p.size++,E}function i(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.last,p.head.next=null,p.last=null;break;default:g=p.last,p.last=g.prev,p.last.next=null}return g.prev=null,g.queue=null,p.size--,g.value}function l(p){var g;switch(p.size){case 0:return null;case 1:g=p.head,p.head=null;break;case 2:g=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:g=p.head,p.head=g.next,p.head.prev=null}return g.next=null,g.queue=null,p.size--,g.value}function s(p){if(p.queue!==null){if(p.queue.last===p){i(p.queue);return}if(p.queue.head===p){l(p.queue);return}p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),p.queue.size--,p.queue=null,p.value=null,p.next=null,p.prev=null}}function m(p,g){if(!g.draining){var E=g.puts,b=g.takes,I=g.reads,L,N,z,$,ne;for(g.draining=!0;;){if(L=null,N=null,z=null,$=g.value,ne=I.size,g.error!==null){for($=p.left(g.error);L=l(E);)r(L.cb($));for(;N=l(I);)r(N($));for(;z=l(b);)r(z($));break}if($===t&&(L=l(E))&&(g.value=$=L.value),$!==t){for(z=l(b);ne--&&(N=l(I));)r(N(p.right($)));z!==null&&(g.value=t,r(z(p.right($))))}if(L!==null&&r(L.cb(p.right(void 0))),g.value===t&&E.size===0||g.value!==t&&b.size===0)break}g.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=m,a}();var Th=function(e){return h_(Wf(e))},Sh=function(e){return h_(U0(e))};var Uce=q(_t),vf=ee(Ve),kce=aa(Wr),Bce=aa(pr),Hce=aa(xu),Jce=aa(Ci),qce=aa(Si),Wce=aa(Ti),$ce=aa(Pu),zce=q(la),HO=Sa(fr),Vce=fe(re);var Qce=function(){return Sh(G.value)}();var JO=function(e){return vf(kce(e.year))(function(n){return vf(Bce(e.month+1|0))(function(a){return vf(Hce(e.day))(function(t){return vf(Jce(e.hour))(function(r){return vf(qce(e.minute))(function(u){return vf(Wce(e.second))(function(i){return vf($ce(e.millisecond))(function(l){return zce(new vl(Ov(n)(a)(t),new Gc(r,u,i,l)))})})})})})})})},qO=function(e){var n=KP("Failed to obtain current time. This should never happen.");return In(n)(Uce)(JO(oF(e)))},ff=HO(qO)(jO),Rb=function(e){var n=Th(Qce);if(n instanceof T)return n.value0;if(n instanceof G)return h_(HO(qO)(NO));throw new Error("Failed pattern match at Utils.DateTime (line 63, column 3 - line 65, column 76): "+[n.constructor.name])},du=function(e){return vf(Vce(PO({just:T.create,nothing:G.value})(e))(oF))(JO)};var iF=q(la),Kce=U(re),WO=ee(Ve);var $O=Nn(jn),zO=Pn($O)(Mn(Gn)),VO=Ln(An),QO=xn(VO),KO=kn(Un),YO=On(KO);var lF=function(){function e(){}return e.value=new e,e}(),cF=function(){function e(){}return e.value=new e,e}(),sF=function(){function e(){}return e.value=new e,e}();var Yce={to:function(e){if(e instanceof Re)return lF.value;if(e instanceof ce&&e.value0 instanceof Re)return cF.value;if(e instanceof ce&&e.value0 instanceof ce)return sF.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 lF)return new Re(Ue.value);if(e instanceof cF)return new ce(new Re(Ue.value));if(e instanceof sF)return new ce(new ce(Ue.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Xce=function(e){if(e instanceof lF)return"stuffed";if(e instanceof cF)return"satisfied";if(e instanceof sF)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 Zce=Ba(Ze)(re)({parse:Sn(Xce)(Cn(Yce)(zO(zO($O)(VO))(QO))(YO(YO(KO)))(QO)),diagnosticName:"ClientAppetite"}),XO=function(e){return WO(In(iF(G.value))(function(){var n=Kce(iF);return function(a){return n(Zce(a))}}())(_e(e.clientAppetite)))(function(n){return WO(C8(e.inquiryMode))(function(a){return iF({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:_e(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:_e(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var ZO=ee(Ve),xp=Pa(),vF=tt(he),eU=H({reflectSymbol:function(){return"description"}})(he),yb=H({reflectSymbol:function(){return"id"}})(on),fF=H({reflectSymbol:function(){return"name"}})(he),nU=xp(yb(fF(H({reflectSymbol:function(){return"slug"}})(he)(tn)))),aU=ja(nU),ese=tf(xp(H({reflectSymbol:function(){return"advisingConfig"}})(tt(xp(H({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(tt(Ca))(H({reflectSymbol:function(){return"clientAppetite"}})(vF)(H({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(tt(on))(H({reflectSymbol:function(){return"inquiryMode"}})(he)(H({reflectSymbol:function(){return"packages"}})(ja(xp(H({reflectSymbol:function(){return"activeForSale"}})(Ca)(eU(yb(fF(H({reflectSymbol:function(){return"numMinutes"}})(on)(H({reflectSymbol:function(){return"packageCategories"}})(aU)(H({reflectSymbol:function(){return"refundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"totalPriceCents"}})(Ih)(tn)))))))))))(H({reflectSymbol:function(){return"pricePerHourCents"}})(Ih)(H({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(on)(H({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(on)(H({reflectSymbol:function(){return"themes"}})(ja(xp(H({reflectSymbol:function(){return"active"}})(Ca)(H({reflectSymbol:function(){return"category"}})(nU)(eU(H({reflectSymbol:function(){return"durationMinutes"}})(on)(yb(H({reflectSymbol:function(){return"priceCents"}})(Ih)(H({reflectSymbol:function(){return"title"}})(he)(tn))))))))))(tn))))))))))))(H({reflectSymbol:function(){return"entity"}})(xp(H({reflectSymbol:function(){return"bio"}})(he)(yb(H({reflectSymbol:function(){return"imageUrl"}})(vF)(fF(H({reflectSymbol:function(){return"organizationId"}})(on)(H({reflectSymbol:function(){return"organizationName"}})(he)(H({reflectSymbol:function(){return"shortEducation"}})(vF)(H({reflectSymbol:function(){return"tags"}})(aU)(tn))))))))))(tn)))),_F=q(la),pF=U(re),Ch=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nse=function(e){return ZO(ese("ServiceProviderPresenter")(e))(function(n){return ZO(In(_F(G.value))(function(){var a=pF(_F);return function(t){return a(XO(t))}}())(_e(n.advisingConfig)))(function(a){return _F({entity:n.entity,advisingConfig:a})})})},tU=Ba(Ze)(re)({parse:function(e){return e.type==="Sem::User"?pF(Ch.create)(m8(e.presenter)):e.type==="ServiceProviders::Individual"?pF(Fh.create)(nse(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var rU=Nn(jn),oU=Pn(rU)(Mn(Gn)),uU=Ln(An),iU=xn(uU),lU=kn(Un),cU=On(lU),Js=function(){function e(){}return e.value=new e,e}(),$c=function(){function e(){}return e.value=new e,e}(),qs=function(){function e(){}return e.value=new e,e}(),ase={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(Ue.value);if(e instanceof $c)return new ce(new Re(Ue.value));if(e instanceof qs)return new ce(new ce(Ue.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},sU={eq:function(e){return function(n){return e instanceof Js&&n instanceof Js||e instanceof $c&&n instanceof $c||e instanceof qs&&n instanceof qs}}},bb=function(e){if(e instanceof Js)return"ready";if(e instanceof $c)return"live";if(e instanceof qs)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var Gh=function(){return Zn(Ze)({parse:Sn(bb)(Cn(ase)(oU(oU(rU)(uU))(iU))(cU(cU(lU)))(iU)),default:Js.value,diagnosticName:"livestream poll status"})}(),dF=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}};var vU=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:_e(e.undergrad.college),major:_e(e.undergrad.major),year:_e(e.undergrad.year)},gradCollege:_e(e.gradCollege),workExperience:_e(e.workExperience),admissionsStory:_e(e.admissionsStory),pictureUrl:_e(e.pictureUrl),allStreamsUrl:_e(e.allStreamsUrl)}};var tse=He(na),rse=ni(),fU=fe(re),_U=Nn(jn),pU=Pn(_U)(Mn(Gn)),dU=Ln(An),mU=xn(dU),hU=kn(Un),DU=On(hU),gU=Zn(Ze),RU=ys(),yU=Sa(Ve),ose=fe(ze),use=U(re),ise=ee(Ve),Nu=function(){function e(){}return e.value=new e,e}(),to=function(){function e(){}return e.value=new e,e}(),Ar=function(){function e(){}return e.value=new e,e}();var tc=an,lse=te(tc);var cse={to:function(e){if(e instanceof Re)return Nu.value;if(e instanceof ce&&e.value0 instanceof Re)return to.value;if(e instanceof ce&&e.value0 instanceof ce)return Ar.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 Nu)return new Re(Ue.value);if(e instanceof to)return new ce(new Re(Ue.value));if(e instanceof Ar)return new ce(new ce(Ue.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},_f={eq:function(e){return function(n){return e instanceof Nu&&n instanceof Nu||e instanceof to&&n instanceof to||e instanceof Ar&&n instanceof Ar}}},Mh={eq:function(e){return function(n){return e===n}}},bU={compare:function(e){return function(n){return tse(e)(n)}},Eq0:function(){return Mh}};var pf=function(e){return rse({livestream_conference_id:lse(e.id),livestream_conference_presenter_name:je("")(fU(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:je("")(e.partnerType)})},wU=function(){var e=function(n){if(n instanceof Nu)return"waiting_room";if(n instanceof to)return"on_air";if(n instanceof Ar)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(cse)(pU(pU(_U)(dU))(mU))(DU(DU(hU)))(mU))}(),EU=function(){return gU({parse:wU,default:Nu.value,diagnosticName:"livestream status"})}(),sse=gU({parse:du,default:nt(lp),diagnosticName:"livestream scheduled start time"}),Ah=function(e){return{uid:e.uid,title:e.title,description:e.description,url:e.url,imageUrl:e.imageUrl,duration:e.duration,tailTime:e.tailTime,stats:e.stats,isPrivate:e.isPrivate,legacyRecording:e.legacyRecording,collegeFair:e.collegeFair,id:e.id,school:fU(_e(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:RU(n.id),slug:RU(n.slug)}}),scheduledStartTime:sse(e.scheduledStartTime),onAirTime:yU(du)(_e(e.onAirTime)),streamStatus:EU(e.streamStatus),watchUrl:_e(e.watchUrl),streamingStartTime:yU(du)(_e(e.streamingStartTime)),polls:ose(e.polls)(function(n){return{poll:dF(n.poll),status:Gh(n.status)}}),presenter:use(vU)(_e(e.presenter)),partnerType:_e(e.partnerType),guestPresenter:ise(_e(e.guestPresenter))(tU),zoomJoinUrl:_e(e.zoomJoinUrl),zoomStartUrl:_e(e.zoomStartUrl)}};var IU=Nn(jn),TU=Ln(An),SU=kn(Un),Ni=function(){function e(){}return e.value=new e,e}(),Pp=function(){function e(){}return e.value=new e,e}(),vse={to:function(e){if(e instanceof Re)return Ni.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 Ni)return new Re(Ue.value);if(e instanceof Pp)return new ce(Ue.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},wb={eq:function(e){return function(n){return e instanceof Ni&&n instanceof Ni||e instanceof Pp&&n instanceof Pp}}};var Lh=function(e){if(e instanceof Pp)return"anonymous-all-schools";if(e instanceof Ni)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},Eb=function(){return Zn(Ze)({parse:Sn(Lh)(Cn(vse)(Pn(IU)(Mn(Gn))(IU)(TU))(On(SU)(SU))(xn(TU))),diagnosticName:"Profile.PublishScope",default:Pp.value})}();var yl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),El=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var mF=function(e){return{id:e.id,title:e.title,requireAnonymousUserFirstName:e.requireAnonymousUserFirstName,requireAnonymousUserLastName:e.requireAnonymousUserLastName,requireAnonymousUserEmail:e.requireAnonymousUserEmail,requireReferredUserFirstName:e.requireReferredUserFirstName,requireReferredUserLastName:e.requireReferredUserLastName,description:_e(e.description)}},L_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:du(e.time)}},CU=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:_e(e.fullName),publishScope:Eb(e.publishScope)}},hF=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}},Oi="overlay-visibility-test";var FU=Nn(jn),Ib=Pn(FU)(Mn(Gn)),GU=Ln(An),Tb=xn(GU),MU=kn(Un),Sb=On(MU),Ws=function(){function e(){}return e.value=new e,e}(),df=function(){function e(){}return e.value=new e,e}(),x_=function(){function e(){}return e.value=new e,e}(),mf=function(){function e(){}return e.value=new e,e}(),hf=function(){function e(){}return e.value=new e,e}(),fse={to:function(e){if(e instanceof Re)return Ws.value;if(e instanceof ce&&e.value0 instanceof Re)return df.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return x_.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof Re)return mf.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.value0.value0 instanceof ce)return hf.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(Ue.value);if(e instanceof df)return new ce(new Re(Ue.value));if(e instanceof x_)return new ce(new ce(new Re(Ue.value)));if(e instanceof mf)return new ce(new ce(new ce(new Re(Ue.value))));if(e instanceof hf)return new ce(new ce(new ce(new ce(Ue.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},AU=function(e){if(e instanceof Ws)return"love-this";if(e instanceof df)return"helpful";if(e instanceof x_)return"not-helpful";if(e instanceof mf)return"writing-down";if(e instanceof hf)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},LU=function(e){return{authorTag:e.authorTag,kind:AU(e.kind)}},_se=function(){return Zn(Ze)({parse:Sn(AU)(Cn(fse)(Ib(Ib(Ib(Ib(FU)(GU))(Tb))(Tb))(Tb))(Sb(Sb(Sb(Sb(MU)))))(Tb)),default:Ws.value,diagnosticName:"Livestream Reaction Kind"})}(),xU=function(e){return{authorTag:e.authorTag,kind:_se(e.kind)}};var PU=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function jU(e,n){let a=typeof CV!="undefined"&&CV.apiEndpoint||typeof global!="undefined"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function NU(e,n,a,t,r){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(r.url,l);if(l.open(r.method||"GET",s,!0,r.username,r.password),r.headers)try{for(var m=0,p;(p=r.headers[m])!=null;m++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var g=function(E){return function(){u(new Error(E))}};return l.onerror=g(a),l.ontimeout=g(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(E){return E.length>0}).map(function(E){var b=E.indexOf(":");return t(E.substring(0,b))(E.substring(b+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,b,I){try{l.abort()}catch(L){return b(L)}return I()}}}var Cb="application/json",OU="application/x-www-form-urlencoded";var UU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JU=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qU=function(e){return e instanceof DF?new T(OU):e instanceof Fb?new T(Cb):G.value};var WU=function(){return Fb.create}();var $U=wa();var Gb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),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}(),zU=function(e){if(e instanceof Gb||e instanceof Mb)return $U(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 gF=function(e){if(e instanceof Gb)return"Accept";if(e instanceof Mb)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 VU=vn(pn),RF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ab=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Lb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QU=function(e){if(e instanceof RF)return"arraybuffer";if(e instanceof yF)return"blob";if(e instanceof bF)return"document";if(e instanceof Ab||e instanceof Lb)return"text";if(e instanceof xb)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},KU=function(e){return e instanceof Ab?new T(Cb):G.value},YU=function(){return new Lb(VU)}();var XU=function(){return new xb(VU)}();var ZU=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var dse=wa();var Np=function(e){return dse(OR(e))};function e7(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var Pb=function(e){return e7(Ie.create,Te.create,e)};function n7(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function a7(e,n,a){try{return n(n7(encodeURIComponent(a)))}catch(t){return e(t)}}function t7(e,n,a){try{return n(n7(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var jb=function(){return wv(a7)(ln(G.value))(T.create)}();var Nb=function(){return wv(t7)(ln(G.value))(T.create)}();var hse=Jn(Dr),r7=U(re),Dse=lo(Ku)(la);var gse=function(e){return e};var o7=function(){var e=function(t){if(t.value1 instanceof G)return Nb(t.value0);if(t.value1 instanceof T)return hse(r7(function(r){return function(u){return r+("="+u)}})(Nb(t.value0)))(Nb(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=r7(hr("&")),a=Dse(e);return function(t){return n(a(gse(t)))}}();var EF=function(){function e(){}return e.value=new e,e}(),P_=function(){function e(){}return e.value=new e,e}(),IF=function(){function e(){}return e.value=new e,e}(),j_=function(){function e(){}return e.value=new e,e}(),Ob=function(){function e(){}return e.value=new e,e}(),xh=function(){function e(){}return e.value=new e,e}(),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}(),LF=function(){function e(){}return e.value=new e,e}(),xF=function(){function e(){}return e.value=new e,e}(),Ub=function(){function e(){}return e.value=new e,e}();var Rse=function(e){return e},yse={show:function(e){if(e instanceof EF)return"OPTIONS";if(e instanceof P_)return"GET";if(e instanceof IF)return"HEAD";if(e instanceof j_)return"POST";if(e instanceof Ob)return"PUT";if(e instanceof xh)return"DELETE";if(e instanceof TF)return"TRACE";if(e instanceof SF)return"CONNECT";if(e instanceof CF)return"PROPFIND";if(e instanceof FF)return"PROPPATCH";if(e instanceof GF)return"MKCOL";if(e instanceof MF)return"COPY";if(e instanceof AF)return"MOVE";if(e instanceof LF)return"LOCK";if(e instanceof xF)return"UNLOCK";if(e instanceof Ub)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var u7=jt(te(yse))(Rse);var i7={eq:function(e){return function(n){return e instanceof EF&&n instanceof EF||e instanceof P_&&n instanceof P_||e instanceof IF&&n instanceof IF||e instanceof j_&&n instanceof j_||e instanceof Ob&&n instanceof Ob||e instanceof xh&&n instanceof xh||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 LF&&n instanceof LF||e instanceof xF&&n instanceof xF||e instanceof Ub&&n instanceof Ub}}};var l7=function(e){return kv(function(n){return function(){var t=e(function(r){return n(Ie.create(r))()},function(r){return n(Te.create(r))()});return function(r){return kv(function(u){return function(){return t(r,function(l){return u(Ie.create(l))()},function(l){return u(Te.create(l))()}),wS}})}}})};var PF=q(tl(ar)),bse=X0(ar),N_=Ss(ar),c7=ia(BR(WR)(ar)),wse=ds(Ec(ar)),kb=U(re),Ese=wu(Be)(at),Ise=De(xt),Tse=Sa(Ve),Sse=U(ze),Cse=fe(Fa),Fse=Fv($r),Gse=q(Qn);var Bb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Hb=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),Jb=function(){function e(){}return e.value=new e,e}(),qb=function(){function e(){}return e.value=new e,e}(),Wb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),s7=function(e){return function(n){var a=function(p){return p===""?PF(d4):jt(function(g){return bse(Nm.create(g))})(PF)(Pb(p))},t=function(){if(n.responseFormat instanceof RF)return N_("ArrayBuffer");if(n.responseFormat instanceof yF)return N_("Blob");if(n.responseFormat instanceof bF)return function(p){return c7(N_("Document")(p))(c7(N_("XMLDocument")(p))(N_("HTMLDocument")(p)))};if(n.responseFormat instanceof Ab)return wse(function(p){return n.responseFormat.value0(a(p))})(N_("String"));if(n.responseFormat instanceof Lb)return N_("String");if(n.responseFormat instanceof xb)return ln(n.responseFormat.value0(PF(me)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])}(),r=function(p){if(p instanceof UU)return new Te(p.value0(Gr));if(p instanceof kU)return new Te(Gr(p.value0));if(p instanceof BU)return new Te(Gr(p.value0));if(p instanceof HU)return new Te(Gr(p.value0));if(p instanceof JU)return new Te(Gr(p.value0));if(p instanceof DF)return gc("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(kb(Gr)(o7(p.value0)));if(p instanceof Fb)return new Te(Gr(qy(p.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[p.constructor.name])},u=function(p){return function(g){return p instanceof T&&!Ese(sv(Ise)(gF)(p.value0))(g)?o_(g)(p.value0):g}},i=function(p){return u(kb(Mb.create)(Tse(qU)(p)))(u(kb(Gb.create)(KU(n.responseFormat)))(n.headers))},l=function(p){return{method:u7(n.method),url:n.url,headers:Sse(function(g){return{field:gF(g),value:zU(g)}})(i(n.content)),content:p,responseType:QU(n.responseFormat),username:Ta(n.username),password:Ta(n.password),withCredentials:n.withCredentials,timeout:je(0)(kb(function(g){return g})(n.timeout))}},s=function(p){return Cse(Fse(l7(NU(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",ZU.create,l(p)))))(function(g){if(g instanceof Te){var E=Np(t(g.value0.body));if(E instanceof Ie)return new Ie(new Hb(_j(E.value0),g.value0));if(E instanceof Te)return new Te({headers:g.value0.headers,status:g.value0.status,statusText:g.value0.statusText,body:E.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[E.constructor.name])}if(g instanceof Ie)return new Ie(function(){var b=z0(g.value0),I=b==="AffjaxTimeoutErrorMessageIdent";if(I)return Jb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?qb.value:new Wb(g.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[g.constructor.name])})};if(n.content instanceof G)return s(Ta(G.value));if(n.content instanceof T){var m=r(n.content.value0);if(m instanceof Te)return s(Ta(new T(m.value0)));if(m instanceof Ie)return Gse(new Ie(new Bb(m.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[m.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var Op=function(){return{method:new Ie(P_.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:XU,timeout:G.value}}();var v7={eq:function(e){return function(n){return e===n}}};var jF={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var f7=s7(jF);function L7(e){return Buffer.from(e).toString("base64")}function x7(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var kF=typeof btoa=="function";function P7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Kc||!Kc.key)return Kc||console.error("Pusher config is missing in global context"),new mve;let t={auth:{headers:{"X-CSRF-Token":Kc.authToken}},authEndpoint:Kc.authPath,cluster:Kc.cluster};return Kc.dev&&Object.assign(t,{wsHost:Kc.dev.wsHost,wsPort:Kc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new K7.default(Kc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),Y7=e=>{let n=pve().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),dve()}};function mve(){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 hve(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function hve(e){this.name=e,this.handlers={},this.triggered=[],this.disconnect=()=>{},this.bind=function(n,a){this.handlers[n]=a},this.unbind=function(n,a){this.handlers[n]===a&&(this.handlers[n]=null)},this.trigger=function(n,a){this.triggered.push({eventName:n,eventData:a})}}var Vb=function(e){return e};var Rve=function(e){return e},Z7=function(e){var n=He(e),a=Rve(e.Eq0());return{compare:function(t){return function(r){return Rx(n(t)(r))}},Eq0:function(){return a}}};var Qb=function(e){return function(){console.error(e)}};var i6=function(e){var n=gn(e);return function(a){return n(Qb(a))}};var Ave=q(_t),l6=ee(fr),Lve=U(Bn),xve=i6(Cr),JF=function(e){var n=function(t){var r=e(t);return KS(r.view(r.init.value0)(ln(Ave(me))))},a=function(t){return function(r){return function(u){return function(){var l=l6(l6(pu)(function(){var m=Lve(mb);return function(p){return m(sf(p))}}()))(pb(r))();if(l instanceof G)return xve("Element #"+(r+" not found"))();if(l instanceof T){var s=eC(e(u))();return t(s)(l.value0)()}throw new Error("Failed pattern match at Elmish.Boot (line 117, column 11 - line 122, column 21): "+[l.constructor.name])}}}};return{mount:a(U3),renderToString:n,hydrate:a(k3)}};var Nh="";function s6(e){var n=e.split(` `);return n.reduce(function(a,t){var r=Nve(t)||Uve(t)||Hve(t)||$ve(t)||qve(t);return r&&a.push(r),a},[])}var Pve=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jve=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Nve(e){var n=Pve.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=jve.exec(n[2]);return t&&r!=null&&(n[2]=r[1],n[3]=r[2],n[4]=r[3]),{file:a?null:n[2],methodName:n[1]||Nh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var Ove=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Uve(e){var n=Ove.exec(e);return n?{file:n[2],methodName:n[1]||Nh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var kve=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Bve=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Hve(e){var n=kve.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=Bve.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||Nh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Jve=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function qve(e){var n=Jve.exec(e);return n?{file:n[3],methodName:n[1]||Nh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var Wve=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function $ve(e){var n=Wve.exec(e);return n?{file:n[2],methodName:n[1]||Nh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function v6({skipFrames:e,prefix:n}){let a=new Error().stack,r=s6(a)[e],u=f6(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=f6(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var f6=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var zve=q(Rn),Vve=vn(pn),Kb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Qve={map:function(e){return function(n){return new Kb(function(a){return n.value0(function(t){return a(e(t))})})}}},Kve=U(Qve);var _6=function(e){return ZS(v6(e))},$s=function(e){return new Kb(function(n){return n(e)})},U_=function(e){return function(n){return new Kb(function(a){return js(e)(n)(a)})}},p6=function(e){return function(n){return js(e)(function(a){return{init:zve(me),update:ln(ms),view:ln(ln(n.value0(Vve)))}})(me)}},d6=function(e){var n=_6({skipFrames:3,prefix:"WithHook"});return function(a){return p6(n)(Kve(a)(e))}};var Hp=function(e){var n=_6({skipFrames:3,prefix:"HooksComponent"});return p6(n)(e)},Yc=function(){return function(e){return function(n){return new Kb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},Yve=Yc(),k_=function(e){return function(){return Yve}};$a();var m6=class extends Ga.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},h6=m6;var Xve=Et();var D6=function(e){return"ref:"+Ft(e)(Wa.value)},g6=function(e){var n=D6(e);return function(a){return Xve(Cc(n)(a))}},R6=function(e){var n=D6(e);return function(a){return YR(n)(a)}};var Zve=Mi(),y6=nn(Ke)(qn),b6=q(Rn),efe=Ai(My(fl)),w6={reflectSymbol:function(){return"deps"}},nfe=g6(w6),afe=R6(w6),tfe=vn(pn);var rfe=function(e){var n=Zve(e);return function(){return function(){return n(h6)}}},ofe=rfe(Qe)()(),ufe=function(e){var n=yo(e);return function(a){return function(t){return function(r){return function(u){return U_(a)(function(i){return t({init:y6(Za(u(r)))(function(){return b6(r)}),update:function(l){return function(s){return y6(Za(u(s)))(function(){return b6(s)})}},view:function(l){return function(s){return ofe({componentDidUpdate:efe(s)(function(m){var p=n(nfe(m))(r);return p?new T(r):G.value}),deps:afe(r)})(i(me))}}})})}}}}};var Jp=function(e){var n=ufe(e);return function(a){return function(t){return n("UseEffectPrime")(tfe)(a)(t)}}};var E6=q(Rn),ife=vn(pn);var lfe=function(e){return function(n){return function(a){return U_(e)(function(t){return n({init:E6(a),update:function(r){return function(u){return E6(u)}},view:Yf(t)})})}}},Il=function(e){return lfe("UseState")(ife)(e)};var qF=function(){return Yc()(Il(G.value))(function(e){return $s(new cn(e.value0,Fy(e.value0)(e.value1)))})}();var I6=nn(Ke)(qn),cfe=fu(Le),sfe=vn(pn),T6=q(Rn),Oh=function(e){return function(n){return U_("UseSubscription")(function(a){return{init:I6(cfe(sfe)(e))(function(){return T6(me)}),update:function(t){return function(r){return I6(Za(n(r)))(function(){return T6(me)})}},view:function(t){return function(r){return a(me)}}}})}};var Yb=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var kh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vi=function(){function e(){}return e.value=new e,e}();var M6=function(e){if(e instanceof kh)return e.value0;if(e instanceof vi)return"";throw new Error("Failed pattern match at Utils.HTML.Img.Alt (line 24, column 15 - line 26, column 19): "+[e.constructor.name])};var _fe=function(){function e(){}return e.value=new e,e}(),pfe=function(){function e(){}return e.value=new e,e}();var A6=function(e){if(e instanceof _fe)return"eager";if(e instanceof pfe)return"lazy";throw new Error("Failed pattern match at Utils.HTML.Img.Loading (line 19, column 15 - line 21, column 17): "+[e.constructor.name])};var WF=al(eo(at)),dfe=Kr(),mfe=fe(re),hfe=pl()(),Xb=function(e){var n=ei(e);return function(a){return Pt(n(a))}},L6=function(e){if(WF(Xb("http://"))(WF(Xb("https://"))(WF(Xb("//"))(Xb("blob:"))))(e))return e;if(Oe)return Yb+je(e)(ei("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 69, column 1 - line 69, column 30): "+[e.constructor.name])},fi=function(){return function(e){return function(n){var a=dfe(n),t={alt:M6(a.alt),height:ba(a.height)(cf),loading:je(cf)(mfe(ci(a.loading))(A6)),onClick:ba(a.onClick)(cf),src:L6(a.src),style:ba(a.style)(cf),width:ba(a.width)(cf)};return hfe(e)(t)}}};var P6=q(Rn),Dfe=Zn(Yy),gfe=ee(tu);var Rfe={init:P6(me),update:function(e){return function(n){return P6(me)}},view:function(e){return function(n){return ta}}},$F=function(e){var n=xv(e);return function(a){return JF(Dfe({parse:function(t){return gfe(n(t))(function(r){return In(new Ie("Component construction failed"))(Te.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:Rfe}))}};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 Afe=JSON.stringify;var xfe=gr(Be)(It),Pfe=Bo(_t)(Qu),jfe=fe(oC);var Nfe={show:function(e){return e}},Ofe=te(Nfe);var nw=he;var Ufe=function(e){var n=tf(e);return function(a){return function(t){return function(r){var u=xfe(["Pusher event ",t," over channel ",Ofe(a)]),i=function(l){return Pfe(n(u)(l))(r)()};return function(){return Y7({channel:a,event:t,handler:i})}}}}},Ui=function(e){var n=Ufe(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))})}}}}},kfe=Ui(__),aw=function(e){var n=kfe(e);return function(a){return function(t){return jfe(n(a)(t))(ln(me))}}};var e5=Qc(zc),Ou=rc(e5),Lr=ee(ra),Bh=rc(Qc(e5)),n5=q(Qn),Bfe=fe(re),Hh=Pa(),a5=H({reflectSymbol:function(){return"pollId"}})(on),Hfe=H({reflectSymbol:function(){return"status"}})(he)(tn),Jfe=gt(ja(Hh(a5(Hfe)))),t5=U(ze),r5=U(Fa),qfe=H({reflectSymbol:function(){return"id"}}),Wfe=qfe(on),o5=Hh(H({reflectSymbol:function(){return"author"}})(Hh(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(Wfe(H({reflectSymbol:function(){return"isFromHQ"}})(Ca)(H({reflectSymbol:function(){return"isPublic"}})(Ca)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))),$fe=Bp(o5);var zfe=tt(he);var Vfe=Bp(ja(Hh(a5(H({reflectSymbol:function(){return"responses"}})(Hh(H({reflectSymbol:function(){return"answered"}})(on)(H({reflectSymbol:function(){return"optionCounts"}})(ja(on))(H({reflectSymbol:function(){return"seen"}})(on)(H({reflectSymbol:function(){return"skipped"}})(on)(tn))))))(tn))))),Qfe=Bp(zfe),Kfe=Bp(ja(o5));var YF=Bh("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Lr(e({id:n.id,status:bb(a)}))(Vc(function(t){return n5(je([])(Bfe(Jfe(t))(t5(function(r){return{pollId:r.pollId,status:Gh(r.status)}}))))}))}}});var XF=Bh("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Lr(e({id:n.id,options:a}))(lr)}}}),u5=Ou("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Lr(e({conference_id:n}))(lr)}}),i5=Ou("livestreams_conferences_status_complete_path")(function(e){return function(n){return Lr(e({conference_id:n}))(lr)}}),l5=Ou("livestreams_cta_save_referral_path")(function(e){return function(n){return Lr(e(n))(lr)}}),c5=Ou("livestreams_polls_report_shown_path")(function(e){return function(n){return Lr(e({id:n.id}))(lr)}}),s5=Bh("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Lr(e({stream_id:n,visible:a.visible}))(lr)}}}),v5=Bh("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Lr(e({conference_id:n,current_time_minutes:a}))(lr)}}}),f5=Ou("livestreams_questions_visibility_path")(function(e){return function(n){return Lr(e({question_id:n.questionId,is_public:n.isPublic}))(lr)}}),_5=Ou("livestreams_questions_post_path")(function(e){return function(n){return Lr(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Vc(function(a){return r5(L_)($fe("Livestream question")(a))}))}}),p5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),d5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),m5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(lr)}}),h5=Ou("livestreams_cta_open_path")(function(e){return function(n){return Lr(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(lr)}}),tw=Ou("livestreams_register_path")(function(e){return function(n){return Lr(e({from_conference_id:Ta(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(lr)}});var D5=Bh("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Lr(e({conference_id:n,reaction:LU(a)}))(lr)}}}),g5=Ou("livestreams_polls_responses_path")(function(e){return function(n){return Lr(e({conference_id:n}))(Vc(Vfe("livestream poll responses")))}}),R5=Ou("livestreams_conferences_download_url_path")(function(e){return function(n){return Lr(e({conference_id:n}))(Vc(function(a){return r5(_e)(Qfe("Livestream download URL")(a))}))}}),rw=rc(zc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Lr(e({}))(lr)});var y5=Ou("livestreams_conferences_ban_user_path")(function(e){return function(n){return Lr(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(lr)}}),ow=Ou("livestreams_questions_all_path")(function(e){return function(n){return Lr(e({conference_id:n}))(Vc(function(a){return Lr(Kfe("Livestream questions")(a))(function(t){return n5(t5(L_)(t))})}))}});var 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}(),fG=function(){function e(){}return e.value=new e,e}(),_G=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}(),pG=function(){function e(){}return e.value=new e,e}();var iw=function(e){if(e instanceof Jt&&e.value0 instanceof eG)return"architecture";if(e instanceof Jt&&e.value0 instanceof aG)return"chemistry";if(e instanceof Jt&&e.value0 instanceof nG)return"business";if(e instanceof Jt&&e.value0 instanceof tG)return"computer-science";if(e instanceof Jt&&e.value0 instanceof rG)return"criminal-justice-and-corrections";if(e instanceof Jt&&e.value0 instanceof oG)return"economics";if(e instanceof Jt&&e.value0 instanceof uG)return"engineering";if(e instanceof Jt&&e.value0 instanceof iG)return"english";if(e instanceof Jt&&e.value0 instanceof lG)return"film";if(e instanceof Jt&&e.value0 instanceof cG)return"finance";if(e instanceof Jt&&e.value0 instanceof sG)return"history";if(e instanceof Jt&&e.value0 instanceof vG)return"political-science";if(e instanceof Jt&&e.value0 instanceof fG)return"pre-med";if(e instanceof Jt&&e.value0 instanceof _G)return"psychology";if(e instanceof pG)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var lw=function(){function e(){}return e.value=new e,e}(),n_e=function(){function e(){}return e.value=new e,e}(),a_e=function(){function e(){}return e.value=new e,e}();var b5=function(e){if(e instanceof lw)return G.value;if(e instanceof a_e)return new T("open");if(e instanceof n_e)return new T("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var Ude=rr(eo(at)),kde=function(e){return e},en=Gr(Xu),Bde=function(e){return Ude(c_)(e)},w5=function(e){var n=Bde(e);return n?e:""},Zt=function(e){return kde(Gr(e))};var Hde=nC(o4),E5=zl()(),wr=function(e){return Hde(e)},$n=function(e){var n=DO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(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)}}}},cr=function(e){var n=RO(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(E5(r)({className:a,"aria-label":t}))(u)}}}}}}};var F5=Et();var sw=function(e){return function(n){var a=function(){var u=Sc("?")(n);return u?"&":"?"}(),t=F5(jb(e.value)),r=F5(jb(e.key));return n+(a+(r+("="+t)))}};var _me=function(){function e(){}return e.value=new e,e}(),pme=function(){function e(){}return e.value=new e,e}(),dme=function(){function e(){}return e.value=new e,e}(),mme=function(){function e(){}return e.value=new e,e}(),hme=function(){function e(){}return e.value=new e,e}(),Dme=function(){function e(){}return e.value=new e,e}(),gme=function(){function e(){}return e.value=new e,e}(),Rme=function(){function e(){}return e.value=new e,e}(),yme=function(){function e(){}return e.value=new e,e}(),bme=function(){function e(){}return e.value=new e,e}(),wme=function(){function e(){}return e.value=new e,e}(),Eme=function(){function e(){}return e.value=new e,e}(),Ime=function(){function e(){}return e.value=new e,e}(),Tme=function(){function e(){}return e.value=new e,e}(),Sme=function(){function e(){}return e.value=new e,e}(),Cme=function(){function e(){}return e.value=new e,e}(),Fme=function(){function e(){}return e.value=new e,e}(),Gme=function(){function e(){}return e.value=new e,e}(),Mme=function(){function e(){}return e.value=new e,e}(),Ame=function(){function e(){}return e.value=new e,e}(),Lme=function(){function e(){}return e.value=new e,e}(),xme=function(){function e(){}return e.value=new e,e}(),Pme=function(){function e(){}return e.value=new e,e}(),jme=function(){function e(){}return e.value=new e,e}(),Nme=function(){function e(){}return e.value=new e,e}(),Ome=function(){function e(){}return e.value=new e,e}(),Ume=function(){function e(){}return e.value=new e,e}(),kme=function(){function e(){}return e.value=new e,e}(),Bme=function(){function e(){}return e.value=new e,e}(),Hme=function(){function e(){}return e.value=new e,e}(),Jme=function(){function e(){}return e.value=new e,e}(),qme=function(){function e(){}return e.value=new e,e}(),Wme=function(){function e(){}return e.value=new e,e}(),$me=function(){function e(){}return e.value=new e,e}(),zme=function(){function e(){}return e.value=new e,e}(),Vme=function(){function e(){}return e.value=new e,e}(),Qme=function(){function e(){}return e.value=new e,e}(),Kme=function(){function e(){}return e.value=new e,e}(),Yme=function(){function e(){}return e.value=new e,e}(),Xme=function(){function e(){}return e.value=new e,e}(),Zme=function(){function e(){}return e.value=new e,e}(),ehe=function(){function e(){}return e.value=new e,e}(),nhe=function(){function e(){}return e.value=new e,e}(),ahe=function(){function e(){}return e.value=new e,e}(),the=function(){function e(){}return e.value=new e,e}(),rhe=function(){function e(){}return e.value=new e,e}(),ohe=function(){function e(){}return e.value=new e,e}(),uhe=function(){function e(){}return e.value=new e,e}(),ihe=function(){function e(){}return e.value=new e,e}(),lhe=function(){function e(){}return e.value=new e,e}(),che=function(){function e(){}return e.value=new e,e}(),she=function(){function e(){}return e.value=new e,e}(),vhe=function(){function e(){}return e.value=new e,e}(),fhe=function(){function e(){}return e.value=new e,e}(),_he=function(){function e(){}return e.value=new e,e}(),phe=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}(),Uu=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var G5=function(e){if(e instanceof ca&&e.value0 instanceof _me)return"AcceptanceRate";if(e instanceof ca&&e.value0 instanceof pme)return"AcceptanceRateMen";if(e instanceof ca&&e.value0 instanceof dme)return"AcceptanceRateWomen";if(e instanceof ca&&e.value0 instanceof mme)return"Address";if(e instanceof ca&&e.value0 instanceof hme)return"AdmissionChances";if(e instanceof ca&&e.value0 instanceof Dme)return"AdmissionDifficulty";if(e instanceof ca&&e.value0 instanceof gme)return"AdmissionsNotificationDate";if(e instanceof ca&&e.value0 instanceof Rme)return"AdmissionsWebsite";if(e instanceof ca&&e.value0 instanceof yme)return"AppDeadlineIsRolling";if(e instanceof ca&&e.value0 instanceof bme)return"ApplicationEffort";if(e instanceof ca&&e.value0 instanceof wme)return"ApplicationRound";if(e instanceof ca&&e.value0 instanceof Eme)return"BasketballConference";if(e instanceof ca&&e.value0 instanceof Ime)return"CampusSetting";if(e instanceof ca&&e.value0 instanceof Tme)return"City";if(e instanceof ca&&e.value0 instanceof Sme)return"ClassRank";if(e instanceof ca&&e.value0 instanceof Cme)return"CoEdSingleSex";if(e instanceof ca&&e.value0 instanceof Fme)return"CollegeType";if(e instanceof ca&&e.value0 instanceof Gme)return"CommuterCollege";if(e instanceof ca&&e.value0 instanceof Mme)return"Diversity";if(e instanceof ca&&e.value0 instanceof Ame)return"DropoutRate";if(e instanceof ca&&e.value0 instanceof xme)return"FinancialAidWebsite";if(e instanceof ca&&e.value0 instanceof Pme)return"FirstYearEnrollment";if(e instanceof ca&&e.value0 instanceof jme)return"FootballConference";if(e instanceof ca&&e.value0 instanceof Nme)return"FourYearGraduationRate";if(e instanceof ca&&e.value0 instanceof Ome)return"HasDivisionOneBasketball";if(e instanceof ca&&e.value0 instanceof Ume)return"HasDivisionOneFootball";if(e instanceof ca&&e.value0 instanceof kme)return"HasMedicalSchool";if(e instanceof ca&&e.value0 instanceof Bme)return"HasStudyAbroad";if(e instanceof ca&&e.value0 instanceof Hme)return"HBCU";if(e instanceof ca&&e.value0 instanceof Jme)return"InListStatus";if(e instanceof ca&&e.value0 instanceof qme)return"MainWebsite";if(e instanceof ca&&e.value0 instanceof Lme)return"Majors";if(e instanceof ca&&e.value0 instanceof Wme)return"Name";if(e instanceof ca&&e.value0 instanceof $me)return"NetCostEstimate";if(e instanceof ca&&e.value0 instanceof zme)return"Notes";if(e instanceof ca&&e.value0 instanceof Vme)return"PercentInternationalStudents";if(e instanceof ca&&e.value0 instanceof Qme)return"Phone";if(e instanceof ca&&e.value0 instanceof Kme)return"Photo";if(e instanceof ca&&e.value0 instanceof Yme)return"Prestige";if(e instanceof ca&&e.value0 instanceof Xme)return"ProgramLength";if(e instanceof ca&&e.value0 instanceof Zme)return"PublicPrivate";if(e instanceof ca&&e.value0 instanceof ehe)return"RecommendationLetters";if(e instanceof ca&&e.value0 instanceof nhe)return"Region";if(e instanceof ca&&e.value0 instanceof ahe)return"ReligiousAffiliation";if(e instanceof ca&&e.value0 instanceof the)return"SatActDeadline";if(e instanceof ca&&e.value0 instanceof rhe)return"SatActTestPolicy";if(e instanceof ca&&e.value0 instanceof ohe)return"SatSubjectTestDeadline";if(e instanceof ca&&e.value0 instanceof uhe)return"SixYearGraduationRate";if(e instanceof ca&&e.value0 instanceof ihe)return"State";if(e instanceof ca&&e.value0 instanceof lhe)return"StudentFacultyRatio";if(e instanceof ca&&e.value0 instanceof che)return"SubmissionDeadline";if(e instanceof ca&&e.value0 instanceof she)return"TOEFLPolicy";if(e instanceof ca&&e.value0 instanceof vhe)return"TotalUndergrads";if(e instanceof ca&&e.value0 instanceof fhe)return"TuitionInState";if(e instanceof ca&&e.value0 instanceof _he)return"TuitionOutOfState";if(e instanceof ca&&e.value0 instanceof phe)return"YieldRate";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof eG)return"RankingArchitecture";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof nG)return"RankingBusiness";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof aG)return"RankingChemistry";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof tG)return"RankingComputerScience";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof rG)return"RankingCriminalJusticeAndCorrections";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof oG)return"RankingEconomics";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof uG)return"RankingEngineering";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof iG)return"RankingEnglish";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof lG)return"RankingFilm";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof cG)return"RankingFinance";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof sG)return"RankingHistory";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof vG)return"RankingPoliticalScience";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof fG)return"RankingPreMed";if(e instanceof Uu&&e.value0 instanceof Jt&&e.value0.value0 instanceof _G)return"RankingPsychology";if(e instanceof Uu&&e.value0 instanceof pG)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var dhe=function(){function e(){}return e.value=new e,e}(),mhe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hhe=function(){function e(){}return e.value=new e,e}();var M5=function(e){if(e instanceof dhe)return"filters";if(e instanceof mhe)return"filter:"+G5(e.value0);if(e instanceof hhe)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 33, column 26 - line 36, column 39): "+[e.constructor.name])};function A5(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var Dhe=ni();var zs=function(e){var n=gn(e);return function(a){return function(t){return n(function(){return A5(a,t)})}}},Vs=function(e){var n=zs(e);return function(){return function(a){return function(t){return n(a)(Dhe(t))}}}};var Jh=function(){function e(){}return e.value=new e,e}(),Df=function(){function e(){}return e.value=new e,e}(),qh=function(){function e(){}return e.value=new e,e}(),zhe=function(){function e(){}return e.value=new e,e}(),P5=function(e){if(e instanceof Jh)return"modal-sm";if(e instanceof Df)return"";if(e instanceof qh)return"modal-lg";if(e instanceof zhe)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 u9=Wu(o9()),i9=u9.default;var CDe=Mi(),l9=function(e){var n=CDe(e);return function(){return function(){return n(i9)}}};function bG(e){return function(){return function(n){return e(n)()}}}function wG(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function EG(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var c9="message";var s9="hashchange";var v9="popstate";var f9="keyup",_9="keydown";var p9="mouseup";var d9="mousemove";var m9=gn(Le),h9=U(Bn),FDe=Sa(fr),Vh=function(){var e=function(t){return function(r){return function(u){return m9(function(){var l=r(),s=bG(function(m){return u(m)})();return wG(t)(s)(!1)(l)(),m9(EG(t)(s)(!1)(l))})}}},n=function(t){return e(t)(h9(FO)(pu))},a=function(t){return e(t)(h9(EO)(FDe(sf)(pu)))};return{hashchange:n(s9),mousemove:n(d9),mouseup:n(p9),popstate:n(v9),resize:n("resize"),message:n(c9),keydown:a(_9),keyup:a(f9),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var mw=function(){return Je};var hw=Se(Qe),IG=Kr(),GDe=l9(Qe)()(),TG=Xt(Qe)()(),MDe=Xt(ye)()(),ADe=Se(ye),LDe=$n(oe)()(),xDe=er(Qn),PDe=gn(Le),D9=mw(),oc=function(){return function(e){var n=hw("modal-backdrop fade show")(ta),a=IG(e),t=a.id+"-description",r=ci(a.footer),u=ci(a.header),i=a.id+"-label",l={style:ba(a.dialogStyle)(vt({})),role:"dialog","aria-modal":"true","aria-labelledby":function(){if(u instanceof T)return i;if(u instanceof G)return"";throw new Error("Failed pattern match at Bootstrap.Modal (line 72, column 11 - line 74, column 26): "+[u.constructor.name])}(),"aria-describedby":t},s=ba(a.size)(Df.value),m=hr(" ")([function(){var g=ba(a.scrollable)(!0);return g?"modal-dialog-scrollable":""}(),function(){var g=ba(a.centered)(!0);return g?"modal-dialog-centered":""}(),P5(s),ba(a.dialogClass)("")]),p=GDe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(hw("modal fade show d-block")(TG("modal-dialog "+m)(l)(MDe("modal-content "+ba(a.contentClass)(""))({style:ba(a.contentStyle)(vt({}))})([ha(u)(TG("modal-header "+ba(a.headerClass)(""))({id:i})),TG("modal-body "+ba(a.bodyClass)(""))({id:t})(a.body),ha(r)(hw("modal-footer "+ba(a.footerClass)("")))]))));return Fe([p,n])}},SG=oc(),uc=function(){return function(e){var n=IG(e),a=ADe("d-flex w-100 justify-content-between align-items-center")([hw("mr-4")(ba(n.title)(ta)),LDe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+ba(n.dismissButtonClass)("text-body"))(Zt("Close"))({type:"button",onClick:wr(function(r){return n.onDismiss})})("")]),t=function(r){return xDe(r.key==="Escape")(PDe(n.onDismiss))};return d6(Oh(Vh.keyup)(t))(function(r){var u=ba(n.bodyScrollable)(!1);return SG(u?function(){var i=IG(D9(n));return{body:i.body,bodyClass:i.bodyClass,centered:i.centered,contentClass:i.contentClass,contentStyle:i.contentStyle,dialogClass:i.dialogClass,dialogStyle:i.dialogStyle,footer:i.footer,footerClass:i.footerClass,headerClass:i.headerClass,id:i.id,scrollable:i.scrollable,size:i.size,header:a}}():D9({bodyClass:n.bodyClass,bodyScrollable:n.bodyScrollable,centered:n.centered,contentClass:n.contentClass,contentStyle:n.contentStyle,dialogClass:n.dialogClass,dialogStyle:n.dialogStyle,dismissButtonClass:n.dismissButtonClass,footer:n.footer,footerClass:n.footerClass,headerClass:n.headerClass,id:n.id,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Fe([a,n.body])}))})}},Wp=function(e){var n=sh(e);return function(a){return function(t){return function(r){return SG({id:t.id,bodyClass:a,body:Fe(n(r))})}}}};var jDe=Kr(),NDe=vn(pn),ODe=Zv(ye)()(),UDe=$n(Qe)()(),kDe=no()();var Dw="login",CG=function(){return function(e){var n=jDe(e),a=function(){var u=ba(n.auth0ActiveTab)(Dw);return u}(),t=je({path:"",token:""})($b("login_path")),r=function(u){return function(i){return In(NDe)(function(l){return sw(function(s){return{key:u,value:s}}(l))})(ci(i))}};return ODe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(sw({key:"screen_hint",value:a})(t.path))),target:function(){var u=ba(n.openInNewTab)(!1);return u?"_blank":""}()})([UDe(ba(n.className)("btn btn-primary px-4"))(en)({type:"submit",disabled:ba(n.disabled)(!1)})(ba(n.content)(Xe(ba(n.text)("Log in")))),kDe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var J_=function(e){return function(n){return function(){return n[e]}}},BDe=J_("URL"),HDe=J_("documentURI"),JDe=J_("origin"),qDe=J_("compatMode"),WDe=J_("characterSet"),$De=J_("contentType");var zDe=J_("documentElement");var gw=function(e){return function(n){return n[e]}},QDe=gw("namespaceURI"),KDe=gw("prefix"),YDe=gw("localName"),XDe=gw("tagName");function FG(e){return function(){return e.id}}function GG(e){return function(){return e.classList}}function MG(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 AG=Je;var R9=Fn("Element");var ic=function(e){return function(n){return function(){return n[e]}}};var ege=ic("baseURI"),nge=ic("ownerDocument"),y9=ic("parentNode"),age=ic("parentElement");var tge=ic("childNodes"),rge=ic("firstChild"),oge=ic("lastChild"),uge=ic("previousSibling"),ige=ic("nextSibling"),lge=ic("nodeValue");var cge=ic("textContent");function LG(e){return function(n){return function(){return e.isEqualNode(n)}}}var fge=U(Bn);var b9=function(){var e=fge(_e);return function(n){return e(y9(n))}}();var W_=function(){function e(){}return e.value=new e,e}(),w9=function(){function e(){}return e.value=new e,e}(),E9=function(){function e(){}return e.value=new e,e}(),Qh=function(){function e(){}return e.value=new e,e}(),I9=function(){function e(){}return e.value=new e,e}(),T9=function(){function e(){}return e.value=new e,e}(),S9=function(){function e(){}return e.value=new e,e}();var Rw=function(e){if(e instanceof W_)return G.value;if(e instanceof w9)return new T("for-you");if(e instanceof E9)return new T("chancing");if(e instanceof Qh)return new T("finances");if(e instanceof I9)return new T("majors");if(e instanceof T9)return new T("admission-requirements");if(e instanceof S9)return new T("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 84, column 14 - line 91, column 39): "+[e.constructor.name])};var xG=fe(re);var PG=H0(It),mge=wa(),hge=gi(re),jG=function(e){return"/schools/"+e.slug},NG="/schools/hub";var C9=function(e){return function(n){var a=xG(b5(n.whatificator))(function(l){return"simulator="+l}),t=xG(n.mobileOverlay)(function(l){return"overlay="+M5(l)}),r=hr("&")(Jo([t,a])),u=xG(n.focusedSchool)(function(l){return PG("/")(Jo([new T(mge(l.slug)),Rw(l.tab)]))}),i=function(){return e.knownSeoState instanceof T&&n.seoView?PG("/")(Jo([new T(jG({slug:e.knownSeoState.value0.slug})),u])):PG("/")(Jo([new T(NG),new T(In(e.basePath)(iw)(n.ranking)),hge(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var F9="/profile";var gge=wa();var OG=function(e){return function(n){return hr("/")(Jo([new T("/schools"),new T(gge(n)),Rw(e)]))}},G9=F9,M9="/livestreams/upcoming";var Rge=function(e){return C9({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:lw.value})};var yw=function(e){return function(n){return Rge(new T({tab:e,slug:n}))}};var A9=function(){function e(){}return e.value=new e,e}(),L9=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}(),x9=function(){function e(){}return e.value=new e,e}(),P9=function(){function e(){}return e.value=new e,e}(),j9=function(){function e(){}return e.value=new e,e}(),N9=function(e){if(e instanceof A9)return"avatar-xxs";if(e instanceof L9)return"avatar-xs";if(e instanceof bw)return"avatar-sm";if(e instanceof ww)return"";if(e instanceof x9)return"avatar-lg";if(e instanceof P9)return"avatar-xl";if(e instanceof j9)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 O9={show:wa()};var yge=Number.MAX_SAFE_INTEGER;var kG=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if(Oe)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 jge=De(wb);var k9={show:function(e){return e}};var B9=function(e){return jge(e.publishScope)(Ni.value)};var $p=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qG=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WG=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}();var zG=te(O9);var Nge=te(p8),H9=te($4),Oge=te(k9);var Uge="/messages";var kge=function(e){return function(n){return e+("/"+function(){if(n instanceof $p)return"admission-officer/"+Nge(n.value0);if(n instanceof BG)return"school/"+H9(n.value0);if(n instanceof HG)return"student/"+Oge(n.value0);if(n instanceof JG)return"high-school/"+zG(n.value0);if(n instanceof qG)return"service-provider/"+zG(n.value0);if(n instanceof WG)return"parent/"+zG(n.value0);if(n instanceof $G)return"recruiter/"+H9(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},VG=kge(Uge);var Bge=rc(Qc(zc)),Hge=ee(ra),J9=fe(re),q9=wa(),Jge=lt(Fa);var W9=Bge("network_connections_invite_school_path")(function(e){return function(n){return Hge(e({school_id:n.schoolId,message:Ta(n.introMessage),sem_user_id:Ta(J9(n.semUserId)(q9)),livestream_id:Ta(J9(n.livestreamId)(q9))}))(lr)}}),$9=function(e){return function(n){return Jge(W9({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var z9=function(e){return function(n){return function(a){return W9({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};$a();function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;nk+=1;var a=nk;function t(r){if(r===0)ak(a),e();else{var u=Z9(function(){t(r-1)});KG.set(a,u)}}return t(n),a}ki.cancel=function(e){var n=KG.get(e);return ak(n),ek(n)};function z_(e,n){return e?e.contains(n):!1}function Yh(e){return e instanceof HTMLElement?e:Gi.findDOMNode(e)}var ik=Wu(uk());$a();function eM(e,n){typeof e=="function"?e(n):Er(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=ki(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Ot(function(){return function(){n()}},[]),[a,n]};$a();var Zge=Xc()?eh:Ot,Jw=Zge;var wk=[Tl,Ks,yf,Hw],uM=!1,Ek=!0;function qw(e){return e===yf||e===Hw}var Ik=function(e,n){var a=Ys(oM),t=Wt(a,2),r=t[0],u=t[1],i=bk(),l=Wt(i,2),s=l[0],m=l[1];function p(){u(Tl,!0)}return Jw(function(){if(r!==oM&&r!==Hw){var g=wk.indexOf(r),E=wk[g+1],b=n(r);b===uM?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),Ot(function(){return function(){m()}},[]),[p,r]};$a();$a();var Tk=function(e){var n=st(),a=st(e);a.current=e;var t=Zm(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(tM,t),i.removeEventListener(aM,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(tM,t),i.addEventListener(aM,t),n.current=i)}return Ot(function(){return function(){r(n.current)}},[]),[u,r]};function iM(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,Pe=Ys(),ke=Wt(Pe,2),rn=ke[0],wn=ke[1],dn=Ys(Rf),mn=Wt(dn,2),yn=mn[0],Kn=mn[1],zn=Ys(null),Wn=Wt(zn,2),Oa=Wn[0],Aa=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!==Rf&&K&&O!==!1&&(Kn(Rf,!0),Aa(null,!0))}}var Tn=Tk(Qa),Dn=Wt(Tn,1),We=Dn[0],ea=nh(function(){var it,J,K;switch(yn){case Xh:return it={},ku(it,Tl,E),ku(it,Ks,L),ku(it,yf,$),it;case Zh:return J={},ku(J,Tl,b),ku(J,Ks,N),ku(J,yf,ne),J;case eD:return K={},ku(K,Tl,I),ku(K,Ks,z),ku(K,yf,ue),K;default:return{}}},[yn]),va=Ik(yn,function(it){if(it===Tl){var J=ea[Tl];return J?J(qe()):uM}if(sn in ea){var K;Aa(((K=ea[sn])===null||K===void 0?void 0:K.call(ea,qe(),null))||null)}return sn===yf&&(We(qe()),p>0&&(clearTimeout(At.current),At.current=setTimeout(function(){Qa({deadline:!0})},p))),Ek}),La=Wt(va,2),dt=La[0],sn=La[1],oa=qw(sn);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(Rf)},[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===Rf&&((St.current||rn)&&(ve==null||ve(rn)),St.current=!0)},[rn,yn]);var Da=Oa;return ea[Tl]&&sn===Ks&&(Da=Ia({transition:"none"},Da)),[yn,sn,Da,rn!=null?rn:n]}$a();var eRe=function(e){Qp(a,e);var n=Kp(a);function a(){return zp(this,a),n.apply(this,arguments)}return Vp(a,[{key:"render",value:function(){return this.props.children}}]),a}(g_),Sk=eRe;function nRe(e){var n=e;Er(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=Fi(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=iM(L,l,$,r),ue=Wt(ne,4),Z=ue[0],Y=ue[1],X=ue[2],ve=ue[3],Pe=st(ve);ve&&(Pe.current=!0);var ke=Zm(function(zn){N.current=zn,eM(u,zn)},[u]),rn,wn=Ia(Ia({},I),{},{visible:l});if(!g)rn=null;else if(Z===Rf||!a(r))ve?rn=g(Ia({},wn),ke):!m&&Pe.current?rn=g(Ia(Ia({},wn),{},{className:b}),ke):p?rn=g(Ia(Ia({},wn),{},{style:{display:"none"}}),ke):rn=null;else{var dn,mn;Y===Tl?mn="prepare":qw(Y)?mn="active":Y===Ks&&(mn="start"),rn=g(Ia(Ia({},wn),{},{className:(0,Ck.default)(rM(E,Z),(dn={},ku(dn,rM(E,"".concat(Z,"-").concat(mn)),mn),ku(dn,E,typeof E=="string"),dn)),style:X}),ke)}if(TS(rn)&&Ow(rn)){var yn=rn,Kn=yn.ref;Kn||(rn=Xm(rn,{ref:ke}))}return pt(Sk,{ref:z},rn)});return t.displayName="CSSMotion",t}var Ww=nRe(Bw);$a();var $w="add",zw="keep",Vw="remove",Qw="removed";function aRe(e){var n;return e&&Er(e)==="object"&&"key"in e?n=e:n={key:e},Ia(Ia({},n),{},{key:String(n.key)})}function Kw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(aRe)}function Fk(){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 tRe=["component","children","onVisibleChanged","onAllRemoved"],rRe=["status"],oRe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function uRe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ww,a=function(t){Qp(u,t);var r=Kp(u);function u(){var i;zp(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 gM(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 Vk(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=Vk(n,a[1]),i=Vk(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 Kk(e,n,a){return e.topa.bottom}function MRe(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=gM(t),u=!LRe(t,a.overflow&&a.overflow.alwaysByViewport);return Zk(e,r,a,u)}o1.__getOffsetParent=hM;o1.__getVisibleRectForElement=DM;function eB(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 Zk(e,g,Lk(Lk({},a),{},{points:b}),E)}var Oq=Wu(Sq());var Cq=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(){!UM||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),uIe?(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(){!UM||!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=oIe.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}(),Fq=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),Aq=typeof WeakMap!="undefined"?new WeakMap:new Cq,Lq=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=iIe.getInstance(),t=new hIe(n,a,this);Aq.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Lq.prototype[e]=function(){var n;return(n=Aq.get(this))[e].apply(n,arguments)}});var DIe=function(){return typeof v1.ResizeObserver!="undefined"?v1.ResizeObserver:Lq}(),xq=DIe;function Pq(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 jq(e,n){e!==document.activeElement&&z_(n,e)&&typeof e.focus=="function"&&e.focus()}function kM(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 xq(r);return e&&u.observe(e),function(){u.disconnect()}}$a();var Nq=function(e,n){var a=Ga.useRef(!1),t=Ga.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 Uq(e){return typeof e!="function"?null:e()}function kq(e){return Er(e)!=="object"||!e?null:e}var gIe=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=Ga.useRef({}),E=Ga.useRef(),b=Ga.Children.only(t),I=Ga.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=Nq(function(){var Y=I.current,X=Y.disabled,ve=Y.target,Pe=Y.align,ke=Y.onAlign;if(!X&&ve){var rn=E.current,wn,dn=Uq(ve),mn=kq(ve);g.current.element=dn,g.current.point=mn,g.current.align=Pe;var yn=document,Kn=yn.activeElement;return dn&&Mk(dn)?wn=o1(rn,dn,Pe):mn&&(wn=eB(rn,mn,Pe)),jq(Kn,rn),ke&&wn&&ke(rn,wn),!0}return!1},p),N=Wt(L,2),z=N[0],$=N[1],ne=Ga.useRef({cancel:function(){}}),ue=Ga.useRef({cancel:function(){}});Ga.useEffect(function(){var Y=Uq(u),X=kq(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=kM(E.current,z)),(g.current.element!==Y||!Pq(g.current.point,X)||!(0,Oq.default)(g.current.align,i))&&(z(),ne.current.element!==Y&&(ne.current.cancel(),ne.current.element=Y,ne.current.cancel=kM(Y,z)))}),Ga.useEffect(function(){r?$():z()},[r]);var Z=Ga.useRef(null);return Ga.useEffect(function(){s?Z.current||(Z.current=gf(window,"resize",z)):Z.current&&(Z.current.remove(),Z.current=null)},[s]),Ga.useEffect(function(){return function(){ne.current.cancel(),ue.current.cancel(),Z.current&&Z.current.remove(),$()}},[]),Ga.useImperativeHandle(a,function(){return{forceAlign:function(){return z(!0)}}}),Ga.isValidElement(b)&&(b=Ga.cloneElement(b,{ref:Nw(b.ref,E)})),b},Bq=Ga.forwardRef(gIe);Bq.displayName="Align";var Hq=Bq;var Jq=Hq;$a();var RIe=Xc()?eh:Ot,BM=RIe;var Yq=Wu(V_());function p1(e,n){this.v=e,this.k=n}function Mo(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Mo=function(i,l,s,m){function p(g,E){Mo(i,g,function(b){return this._invoke(g,E,b)})}l?r?r(i,l,{value:s,enumerable:!m,configurable:!m,writable:!m}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Mo(e,n,a,t)}function 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,Pe=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&&Pe&&!Kn&&n3?(Kn=Oa===yn)&&(ve=zn[(X=zn[4])?5:(X=3,3)],zn[4]=zn[5]=e):zn[0]<=Wn&&((Kn=mn<2&&Wnyn||yn>Oa)&&(zn[4]=mn,zn[5]=yn,wn.n=Oa,X=0))}if(Kn||mn>1)return i;throw rn=!0,yn}return function(mn,yn,Kn){if(Pe>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(Pe=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{Pe=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 id(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(id.prototype),Mo(id.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 id(dD().w(e,n,a,t),r||Promise)}function qq(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 Wq(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 HM(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(Er(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,HM(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:id,async:function(s,m,p,g,E){return(t(m)?d1:qq)(u(s),m,p,g,E)},keys:Wq,values:HM}})()}function $q(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 zq(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){$q(u,t,r,i,l,"next",s)}function l(s){$q(u,t,r,i,l,"throw",s)}i(void 0)})}}$a();var Vq=["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(){ki.cancel(i.current)}function m(p){s(),i.current=ki(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=ki(zq(mD().mark(function p(){var g,E;return mD().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:g=Vq.indexOf(r),E=Vq[g+1],E&&g!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Ot(function(){return function(){s()}},[]),[r,m]};$a();var Kq=function(e){var n=Wl({width:0,height:0}),a=Wt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=nh(function(){var l={};if(e){var s=t.width,m=t.height;e.indexOf("height")!==-1&&m?l.height=m:e.indexOf("minHeight")!==-1&&m&&(l.minHeight=m),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var Xq=Fi(function(e,n){var a=e.visible,t=e.prefixCls,r=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,m=e.destroyPopupOnHide,p=e.forceRender,g=e.align,E=e.point,b=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,N=e.onMouseEnter,z=e.onMouseLeave,$=e.onMouseDown,ne=e.onTouchStart,ue=e.onClick,Z=st(),Y=st(),X=Wl(),ve=Wt(X,2),Pe=ve[0],ke=ve[1],rn=Kq(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],Oa=zn[1],Aa=Wl(0),sa=Wt(Aa,2),At=sa[0],qe=sa[1],pa=st();BM(function(){Wn==="alignPre"&&qe(0)},[Wn]);function Qa(){return E||b}function Tn(){var sn;(sn=Z.current)===null||sn===void 0||sn.forceAlign()}function Dn(sn,oa){var St=I(oa);Pe!==St&&ke(St),qe(function(Da){return Da+1}),Wn==="align"&&(L==null||L(sn,oa))}BM(function(){Wn==="align"&&(At<2?Tn():Oa(function(){var sn;(sn=pa.current)===null||sn===void 0||sn.call(pa)}))},[At]);var We=Ia({},Yw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(sn){var oa=We[sn];We[sn]=function(St,Da){return Oa(),oa==null?void 0:oa(St,Da)}});function ea(){return new Promise(function(sn){pa.current=sn})}Ot(function(){!We.motionName&&Wn==="motion"&&Oa()},[We.motionName,Wn]),Ls(n,function(){return{forceAlign:Tn,getElement:function(){return Y.current}}});var va=Ia(Ia({},dn),{},{zIndex:l,opacity:Wn==="motion"||Wn==="stable"||!a?void 0:0,pointerEvents:!a&&Wn!=="stable"?"none":void 0},u),La=!0;(g==null?void 0:g.points)&&(Wn==="align"||Wn==="stable")&&(La=!1);var dt=i;return D_.count(i)>1&&(dt=pt("div",{className:"".concat(t,"-content")},i)),pt(Yp,Xo({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},We,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:m,forceRender:p}),function(sn,oa){var St=sn.className,Da=sn.style,it=(0,Yq.default)(t,r,Pe,St);return pt(Jq,{target:Qa(),key:"popup",ref:Z,monitorWindowResize:!0,disabled:La,align:g,onAlign:Dn},pt("div",{ref:oa,className:it,onMouseEnter:N,onMouseLeave:z,onMouseDownCapture:$,onTouchStartCapture:ne,onClick:ue,style:Ia(Ia({},Da),va)},dt))})});Xq.displayName="PopupInner";var Zq=Xq;$a();var eW=Wu(V_()),nW=Fi(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=Ia({zIndex:r},s),L=u;return D_.count(u)>1&&(L=pt("div",{className:"".concat(a,"-content")},u)),g&&(L=g(L)),pt(Yp,Xo({visible:t,ref:b,removeOnLeave:!0},p),function(N,z){var $=N.className,ne=N.style,ue=(0,eW.default)(a,l,$);return pt("div",{ref:z,className:ue,onClick:E,style:Ia(Ia({},ne),I)},L)})});nW.displayName="MobilePopupInner";var aW=nW;var yIe=["visible","mobile"],tW=Fi(function(e,n){var a=e.visible,t=e.mobile,r=$_(e,yIe),u=Wl(a),i=Wt(u,2),l=i[0],s=i[1],m=Wl(!1),p=Wt(m,2),g=p[0],E=p[1],b=Ia(Ia({},r),{},{visible:l});Ot(function(){s(a),a&&t&&E(dk())},[a,t]);var I=g?pt(aW,Xo({},b,{mobile:t,ref:n})):pt(Zq,Xo({},b,{ref:n}));return pt("div",null,pt(lM,b),I)});tW.displayName="Popup";var rW=tW;$a();var bIe=ES(null),JM=bIe;function qM(){}function wIe(){return""}function EIe(e){return e?e.ownerDocument:window.document}var IIe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function TIe(e){var n=function(a){Qp(r,a);var t=Kp(r);function r(u){var i;zp(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&&z_((m=i.popupRef.current)===null||m===void 0?void 0:m.getElement(),s.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(s){i.fireEvents("onFocus",s),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(s){i.fireEvents("onMouseDown",s),i.preClickTime=Date.now()},i.onTouchStart=function(s){i.fireEvents("onTouchStart",s),i.preTouchTime=Date.now()},i.onBlur=function(s){i.fireEvents("onBlur",s),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(s){s.preventDefault(),i.fireEvents("onContextMenu",s),i.setPopupVisible(!0,s)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(s){if(i.fireEvents("onClick",s),i.focusTime){var m;if(i.preClickTime&&i.preTouchTime?m=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?m=i.preClickTime:i.preTouchTime&&(m=i.preTouchTime),Math.abs(m-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&s&&s.preventDefault&&s.preventDefault();var p=!i.state.popupVisible;(i.isClickToHide()&&!p||p&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,s)},i.onPopupMouseDown=function(){if(i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout(function(){i.hasPopupMouseDown=!1},0),i.context){var s;(s=i.context).onPopupMouseDown.apply(s,arguments)}},i.onDocumentClick=function(s){if(!(i.props.mask&&!i.props.maskClosable)){var m=s.target,p=i.getRootDomNode(),g=i.getPopupDomNode();(!z_(p,m)||i.isContextMenuOnly())&&!z_(g,m)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var m=Yh(i.triggerRef.current);if(m)return m}catch{}return Gi.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(sk(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,Pe=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(rW,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:Pe,forceRender:ke,onClick:rn}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){ki.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=ki(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},IIe.forEach(function(s){i["fire".concat(s)]=function(m){i.fireEvents(s,m)}}),i}return Vp(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=gf(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=gf(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=gf(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=gf(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ki.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?ck(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=D_.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,oW.default)(b&&b.props&&b.props.className,g);L&&(I.className=L);var N=Ia({},I);Ow(b)&&(N.ref=Nw(this.triggerRef,b.ref));var z=Xm(b,N),$;return(i||this.popupRef.current||m)&&($=pt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&($=null),pt(JM.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}(g_);return n.contextType=JM,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wIe,getDocument:EIe,onPopupVisibleChange:qM,afterPopupVisibleChange:qM,onPopupAlign:qM,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 uW=TIe(lk);var Sl={adjustX:1,adjustY:1},Cl=[0,0],iW={left:{points:["cr","cl"],overflow:Sl,offset:[-4,0],targetOffset:Cl},right:{points:["cl","cr"],overflow:Sl,offset:[4,0],targetOffset:Cl},top:{points:["bc","tc"],overflow:Sl,offset:[0,-4],targetOffset:Cl},bottom:{points:["tc","bc"],overflow:Sl,offset:[0,4],targetOffset:Cl},topLeft:{points:["bl","tl"],overflow:Sl,offset:[0,-4],targetOffset:Cl},leftTop:{points:["tr","tl"],overflow:Sl,offset:[-4,0],targetOffset:Cl},topRight:{points:["br","tr"],overflow:Sl,offset:[0,-4],targetOffset:Cl},rightTop:{points:["tl","tr"],overflow:Sl,offset:[4,0],targetOffset:Cl},bottomRight:{points:["tr","br"],overflow:Sl,offset:[0,4],targetOffset:Cl},rightBottom:{points:["bl","br"],overflow:Sl,offset:[4,0],targetOffset:Cl},bottomLeft:{points:["tl","bl"],overflow:Sl,offset:[0,4],targetOffset:Cl},leftBottom:{points:["br","bl"],overflow:Sl,offset:[-4,0],targetOffset:Cl}};$a();var lW=Wu(V_());function m1(e){var n=e.showArrow,a=e.arrowContent,t=e.children,r=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return pt("div",{className:(0,lW.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 SIe=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,Pe=n.defaultVisible,ke=n.getTooltipContainer,rn=n.overlayInnerStyle,wn=n.arrowContent,dn=n.overlay,mn=n.id,yn=n.showArrow,Kn=$_(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),zn=st(null);Ls(a,function(){return zn.current});var Wn=Ia({},Kn);"visible"in n&&(Wn.popupVisible=n.visible);var Oa=function(){return pt(m1,{showArrow:yn,arrowContent:wn,key:"content",prefixCls:E,id:mn,overlayInnerStyle:rn},dn)},Aa=!1,sa=!1;if(typeof ve=="boolean")Aa=ve;else if(ve&&Er(ve)==="object"){var At=ve.keepParent;Aa=At===!0,sa=At===!1}return pt(uW,Xo({popupClassName:t,prefixCls:E,popup:Oa,action:u,builtinPlacements:iW,popupPlacement:ue,ref:zn,popupAlign:Y,getPopupContainer:ke,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:N,popupAnimation:z,popupMotion:$,defaultPopupVisible:Pe,destroyPopupOnHide:Aa,autoDestroy:sa,mouseLeaveDelay:m,popupStyle:p,mouseEnterDelay:l},Wn),b)},cW=Fi(SIe);var sW=cW;var fW=e=>Ga.createElement(sW,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(()=>Wu(vW())).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=Mi();var _W="click";var h1="top",ld=function(e){var n=GIe(e);return function(){return function(){return n(fW)}}};var pW="right";var dW=e=>()=>e.preventDefault&&e.preventDefault();var WM=function(){return dW};var MIe=Pa();var $M=ee(Ve),zM=gt(MIe(H({reflectSymbol:function(){return"value"}})(he)(tn))),VM=q(la);var D1=function(e){return je("")($M(zM(Gr(e.target)))(function(n){return VM(n.value)}))},QM=function(e){return je("")($M(zM(Gr(e.target)))(function(n){return VM(n.value)}))},Xs=function(e){return je("")($M(zM(Gr(e.target)))(function(n){return VM(n.value)}))};var mW="/network/connections";var hW=15;var AIe=ld(Qe)()(),LIe=za(ye),xIe=function(){return"You\u2019ve hit the "+(te(an)(hW)+`-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. `)}(),PIe=Io(Qe)("text-decoration-underline")(cr(oe)()()("text-dark")(en)({href:mW})("Manage my connections")),DW=function(e){return function(n){return AIe({placement:e,trigger:_W,overlay:LIe("")([Xe(xIe),PIe]),overlayStyle:vt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var gW=ee(Ve),cd=function(e){var n=gW(e.guestPresenter)(function(a){if(a instanceof Ch)return new T(a.value0);if(a instanceof Fh)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return gW(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var jIe=function(){function e(){}return e.value=new e,e}(),NIe=function(){function e(){}return e.value=new e,e}(),KM=function(){function e(){}return e.value=new e,e}(),OIe=function(){function e(){}return e.value=new e,e}(),UIe=function(){function e(){}return e.value=new e,e}(),kIe=function(){function e(){}return e.value=new e,e}(),RW=function(e){if(e instanceof jIe)return"account_settings_page";if(e instanceof NIe)return"preference_survey";if(e instanceof KM)return"livestream_registration";if(e instanceof OIe)return"chancing_wizard_network_step";if(e instanceof UIe)return"main_profile_page";if(e instanceof kIe)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 qIe=Qc(zc),YM=rc(qIe),XM=ee(ra);var WIe=Kr(),yW=fe(re);var bW=YM("profile_visibility_path")(function(e){return function(n){return XM(e({visibility:{publish_scope:Lh(n)}}))(lr)}}),wW=function(){return YM("profile_network_settings_path")(function(e){return function(n){return function(a){return XM(e({network_settings:{publish_scope:Lh(a.publishScope),publish_context:RW(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Ta(yW(ci(a.livestreamConference))(function(t){return{school_name:Ta(yW(cd(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(lr)}(WIe(n))}})},EW=YM("profile_name_path")(function(e){return function(n){return XM(e({name:n}))(lr)}});var $Ie=uc(),zIe=ao(oe),VIe=Yt(oe),ZM=Kt(oe),eA=dl(oe),bf=Se(ye),sd=$n(oe)()(),QIe=nn(Ke),nA=Yn(ma),X_=Se(Qe),IW=fi(),KIe=Xv(oe),YIe=gr(Be)(It),TW=no()(),aA=Yn(ii),XIe=yp()(),SW=Se(oe),ZIe=Py(ye),tA=ky(oe),eTe=za(oe),nTe=ld(Qe)()(),aTe=Kt(ye),tTe=cr(oe)()(),rTe=rt(oe),Z_=q(Rn),CW=QIe(qn),oTe=mw(),hD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FW=function(){function e(){}return e.value=new e,e}(),GW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LW=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}(),rA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xW=function(e){return function(n){var a=function(m){return $Ie({id:"invite-school-modal",body:m,title:zIe("my-0")(function(){return e.stage instanceof eb?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new bn(DD.value)),size:qh.value})},t=d8(e.context),r=Fe([VIe("mt-3")("Review your message before you send it"),ZM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),eA("mt-4")("Your message"),Lp(e.message),bf("d-flex mt-4 justify-content-start")([sd("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(en)({onClick:wr(function(m){return function(){return n(new bn(new rA({introMessage:e.message})))(),n(new Me(new hD(TC.value)))()}})})("Send"),sd("btn btn-lg btn-outline-primary ml-3 text-nowrap")(en)({onClick:nA(n)(new Me(new hD(Rh.value)))})("No, I need to edit something")])]),u=Fe([bf("text-center")([X_("")(IW("mt-4")({src:"/img/checkmate-icon.png",alt:vi.value,height:"80",width:"80"})),KIe("mt-4")("Connection request sent!"),ZM("mx-md-4")(YIe(["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."])),sd("btn btn-lg btn-outline-secondary mt-4")(en)({onClick:nA(n)(new bn(DD.value))})("Close")])]),i=sd("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(en)({onClick:nA(n)(new bn(DD.value))})("Cancel"),l=function(){var m=bC(e.message)&&function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!Dl(e.firstName)&&!Dl(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 243, column 15 - line 247, column 88): "+[e.profile.fullName.constructor.name])}(),p=function(){if(e.vineBelowConnectionLimit instanceof T&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof T&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof G)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 236, column 13 - line 239, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Fe([ga(Mt(e.profile.fullName))(Fe([eA("mt-md-4")("Your preferred name"),bf("form-row mx-1")([TW("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:aA(n)(function(g){return Me.create(AW.create(Xs(g)))}),placeholder:"First name"}),TW("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:aA(n)(function(g){return Me.create(LW.create(Xs(g)))}),placeholder:"Last name"})])])),eA("mt-md-4")("Your message"),XIe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:aA(n)(function(g){return Me.create(MW.create(D1(g)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),X_("mt-2")(c8(e.message)),SW("mt-3 mt-md-4 small")("The ideal connection message should include:"),ZIe("small")([tA("")("Your name, where you\u2019re from, and a bit about who you are"),tA("")("What you\u2019re interested in studying along with one or two insightful questions"),tA("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),bf("d-flex mt-4 justify-content-start")([DW(h1)(X_("")(sd("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(en)({onClick:wr(function(g){return function(){return function(){if(e.profile.fullName instanceof T)return me;if(e.profile.fullName instanceof G)return n(new Me(new GW({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 219, column 23 - line 223, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Me(new hD(IC.value)))()}}),disabled:!m||p,style:vt({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=bf("mx-md-7")([X_("border border-success rounded p-4 my-4")(bf("row align-items-center")([X_("col-12 col-md-auto text-center text-md-left")(IW("img-fluid")({src:"/img/network/publish-profile-icon.png",alt:vi.value,height:"67",width:"143"})),X_("col text-center text-md-left")(eTe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),bf("d-flex flex-nowrap align-items-center")([SW("mr-4")("Publish your profile to join the CollegeVine Network"),nTe({placement:pW,overlay:aTe("")([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 `),tTe("")(en)({href:G9})("your profile"),Xe(".")]),overlayStyle:vt({width:"15rem"})})(rTe("cursor-default text-secondary fe fe-info large")(""))]),ZM("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."),bf("d-flex mt-4 justify-content-start justify-content-md-center")([sd("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(en)({onClick:wr(function(m){return function(){return n(new Me(FW.value))(),n(new Me(new hD(Rh.value)))()}})})("Publish profile"),i])]);return X_("t--network-sem-user-modal")(function(){if(e.stage instanceof eb)return a(s);if(e.stage instanceof Rh)return a(l);if(e.stage instanceof IC)return a(r);if(e.stage instanceof TC)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 97, column 5 - line 101, column 38): "+[e.stage.constructor.name])}())}},PW=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof hD)return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,vineBelowConnectionLimit:e.vineBelowConnectionLimit,stage:n.value0.value0});if(n.value0 instanceof FW)return CW(Za(bW(Ni.value)))(function(){return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{fullName:e.profile.fullName,publishScope:Ni.value}})});if(n.value0 instanceof GW)return CW(Za(EW(n.value0.value0)))(function(){return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{publishScope:e.profile.publishScope,fullName:new T(kG(n.value0.value0))}})});if(n.value0 instanceof MW)return Z_({context:e.context,firstName:e.firstName,lastName:e.lastName,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,message:n.value0.value0});if(n.value0 instanceof AW)return Z_({context:e.context,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,firstName:n.value0.value0});if(n.value0 instanceof LW)return Z_({context:e.context,firstName:e.firstName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,lastName:n.value0.value0});throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 76, column 31 - line 90, column 39): "+[n.value0.constructor.name])}if(n instanceof bn)return Z_(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 75, column 1 - line 75, column 55): "+[e.constructor.name,n.constructor.name])}},uTe=function(e){var n=B9(e);return n?Rh.value:eb.value},jW=function(e){return{firstName:"",lastName:"",message:"",profile:oTe(e.profile),stage:uTe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var g1=De(nr(xt)),iTe=Kr(),lTe=Se(Qe),cTe=fi(),oA=za(oe),uA=Xt(Qe)()(),sTe=rt(oe),vTe=Yc(),fTe=k_(Ke)(),_Te=gn(Le),pTe=$n(ye)()(),dTe=WM(),mTe=Sa(fr),vd=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}(),iA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NW=function(){function e(){}return e.value=new e,e}(),hTe=function(){function e(){}return e.value=new e,e}(),DTe={eq:function(e){return function(n){return e instanceof vd&&n instanceof vd?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 iA&&n instanceof iA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof lA&&n instanceof lA?g1(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},gTe=Jp(DTe),OW=function(){return function(e){var n=iTe(e),a=function(){var r=ba(n.shape)(NW.value);if(r instanceof NW)return"rounded-circle";if(r instanceof hTe)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 131, column 9 - line 133, column 37): "+[r.constructor.name])}(),t=function(r){return lTe("avatar "+(N9(ba(n.size)(ww.value))+(" "+ba(n.className)(""))))(function(){if(r instanceof vd)return cTe("avatar-img img-fluid "+(a+(" "+ba(n.borderClassName)(""))))({src:r.value0.url,alt:new kh(w5(ba(n.ariaLabel)(en)))});if(r instanceof gD)return oA("avatar-title font-weight-bold fw-bold "+(a+(" "+(je("")(r.value0.backgroundColorClass)+(" "+(je("")(r.value0.textColorClass)+(" "+ba(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof iA)return uA("avatar-title "+(a+(" "+(je("")(r.value0.backgroundColorClass)+(" "+ba(n.borderClassName)(""))))))({"aria-label":ba(n.ariaLabel)(en)})(sTe(r.value0.iconClass)(""));if(r instanceof lA)return uA("avatar-title "+(a+(" "+(je("")(r.value0.backgroundColorClass)+(" "+ba(n.borderClassName)(""))))))({"aria-label":ba(n.ariaLabel)(en)})(oA("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 88, column 11 - line 128, column 48): "+[r.constructor.name])}())};return Hp(vTe(Il(n.source))(function(r){return fTe(gTe(n.source)(function(u){return _Te(r.value1(u))}))(function(){return $s(Fe([t(r.value0),function(){return r.value0 instanceof vd?ha(ci(n.hideAvatar))(function(u){return uA("hq-only-menu-item")({style:vt({marginTop:"-50px",marginLeft:"200px"})})(pTe("btn btn-sm btn-warning mb-4 t--hide-avatar")(en)({onClick:wr(function(i){return function(){return dTe(i)(),mTe(r.value1)(u)()}})})([oA("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Hide")]))}):ta}()]))})}))}};var RTe=OW();var UW=function(e){return function(n){return RTe({source:function(){if(e.avatarUrl instanceof T)return new vd({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 cA=U(re),yTe=Ye(Lx(Bf));var kW=function(e){var n=function(a){return je("")(cA(Tu)(jm(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?"":je("?")(yTe(cA(n)(u_(a)))(cA(n)(J0(a))))}())},BW=function(e){return mh(e.firstName+(" "+e.lastName))};var sA=ao(oe),bTe=cr(oe)()(),wTe=cr(ye)()(),HW=rt(oe),ETe=$n(ye)()(),ITe=Ai($v(fl)),TTe=fe(re),STe=ee(Ve),vA=Se(oe),R1=Se(ye),JW=Se(Qe),CTe=Ep(oe),qW=zl()(),FTe=dl(oe),GTe=Kt(oe),fd=q(Rn),WW=nn(Ke),MTe=WW(qn),ATe=Ea(Le),LTe=WW(ra),xTe=q(Qn),PTe=ut(Mr(Fa)),$W=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}(),zW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),VW=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=sA("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=sA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,bTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(en)({href:VG(new $p(t.semUser.id))})("View Message")],s=BW(t.semUser),m=kW(s),p=sA("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),g=[p,wTe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(en)({href:VG(new $p(t.semUser.id))})([HW("fe fe-message-square mr-2 large")(""),Xe("Send a message to "+t.semUser.firstName)])],E=function(L){return ETe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(en)({onClick:ITe(r)(TTe(STe(a.currentUser)(function(N){return N.profile}))(zW.create)),disabled:L.isDisabled})([HW("fe fe-message-square mr-2 large")(""),Xe("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),vA("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)(JW("card")(R1("card-body")(function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof rf)return g;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof Bs||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof Bs)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Yl&&t.semUser.connection.value0.initiator instanceof ks)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof ks||t.semUser.connection instanceof G)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])}())))}),CTe("text-uppercase text-secondary")("Your guest presenter"),R1("row align-items-center mt-4")([JW("col-auto")(UW(qW(t.semUser)({initials:m}))(bw.value)),R1("col")([FTe("mb-1")(s),vA("text-secondary small")(t.semUser.school.name),vA("text-secondary small")(t.semUser.title)]),ha(t.semUser.bio)(function(L){return GTe("mt-4 mb-2 ml-2")(L)})]),ha(t.modal)(function(L){return xW(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 fd({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof rA)return MTe(ATe(LTe(z9(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return xTe(new VW({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return fd(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 55 - line 55, column 19): "+[r.value0.value0.constructor.name])}if(t.modal instanceof T&&r instanceof RD&&r.value0 instanceof Me)return PTe(RD.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new $W(u))}})(PW(t.modal.value0.value0)(new Me(r.value0.value0)));if(r instanceof RD&&r.value0 instanceof Me)return fd(t);if(r instanceof zW)return fd({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new $W(jW({schoolName:a.semUser.school.name,context:EC.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof VW)return fd({currentUser:t.currentUser,modal:t.modal,vineBelowConnectionLimit:t.vineBelowConnectionLimit,semUser:{avatarUrl:t.semUser.avatarUrl,bio:t.semUser.bio,firstName:t.semUser.firstName,id:t.semUser.id,lastName:t.semUser.lastName,school:t.semUser.school,title:t.semUser.title,unreadMessageCountFromSemUser:t.semUser.unreadMessageCountFromSemUser,connection:new T({initiator:Bs.value,introMessage:r.value0.introMessage,status:Yl.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 47, column 5 - line 47, column 67): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return js("Livestream Guest Presenter SEM user")(function(a){return{init:fd(qW(a)({modal:G.value})),view:e(a),update:n(a)}})}();var jTe=za(ye),NTe=rt(oe),yD=Se(ye),KW=Ep(oe),OTe=U(ze),fA=Se(Qe),UTe=pl()(),kTe=ao(oe),YW=function(e){return function(n){var a=function(i){return jTe("badge badge-light bg-light text-dark mr-3")([NTe("fe fe-tag mr-2")(""),Xe(i.name)])},t=function(i){return function(l){return yD("mb-3")([KW("text-secondary text-uppercase mb-2")(i),l])}},r=yD("mt-4")([ha(_e(n.entity.shortEducation))(function(i){return t("Education")(Xe(i))}),t("Bio")(Lp(n.entity.bio)),tF(Yu(n.entity.tags))(t("Specialties")(Fe(OTe(a)(n.entity.tags))))]),u=yD("row")([ha(_e(n.entity.imageUrl))(function(i){return fA("p-0 m-0")(fA("col-auto my-auto")(fA("avatar avatar-md")(UTe("avatar-img rounded-circle")({src:i}))))}),yD("col-auto my-auto")([KW("text-uppercase text-secondary mb-2")("Advisor"),kTe("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 Ch)return QW({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Fh)return YW(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 BTe=cr(ye)()(),HTe=rt(oe),_d=Se(oe),Hi=Se(Qe),Ji=Se(ye),XW=ao(oe),ZW=pl()(),e$=fe(ze),JTe=za(oe),n$=fe(re),qTe=Kt(ye),a$=Io(oe),t$=cr(oe)()(),WTe=te(an),wD=U(re),$Te=wp(ye)()(),zTe=te(tc),ED=function(e){var n=function(a){return function(t){return BTe("mr-3")(en)({href:t,target:"_blank"})([Xe(a),HTe("fe fe-external-link ml-1")("")])}};return Fe([_d("text-uppercase text-muted small mb-2")("School information"),Hi("card shadow-none")(Ji("card-body")([XW("mb-1")(e.name),_d("text-uppercase small text-secondary")(e.cityState),Ji("mt-3 d-none d-md-block")([n("Stats")(yw(W_.value)(e.slug)),n("Cost")(yw(Qh.value)(e.slug)),n("Map")(yw(W_.value)(e.slug))]),Ji("mt-3 d-md-none")([n("Stats")(OG(W_.value)(e.slug)),n("Cost")(OG(Qh.value)(e.slug))])]))])},VTe=function(e){var n=function(i){return ZW("avatar-img rounded-circle")({src:i})},a=hr(" ")(e$(Qo(" ")(e.fullName))(li(1))),t=JTe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return je("")(n$(i)(function(l){return" '"+l}))},u=function(i){return function(l){return qTe("")([a$("")(i+": "),Xe(l)])}};return Fe([_d("text-uppercase text-muted small mb-2")("Your host"),Ji("row align-items-center mb-4 pr-4")([Hi("col-auto")(Hi("avatar")(In(t)(n)(e.pictureUrl))),Hi("col")(Ji("row align-items-center justify-content-between")([_d("col-12 col-md-auto x-large")(e.fullName),Hi("col-12 col-md-auto")(ha(e.allStreamsUrl)(function(i){return t$("t--host-streams")(en)({href:i})("See all "+(WTe(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Fe(Jo([wD(u("Undergrad College"))(n$(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)]))])},QTe=function(e){return Fe([_d("text-uppercase text-muted small mb-2")("Description"),Ji("")([Hi("col-6 col-md-4 float-right")(ZW("img-fluid rounded")({src:e.imageUrl})),Ji("")(e$(Qo(` `)(e.description))(function(n){return $Te("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},KTe=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+zTe(e.conference.id));return Hi("card mt-3")(Hi("card-body py-3")(Ji("row align-items-center")([Hi("col-12 col-md-auto mb-3 mb-md-0")(_d("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Ji("col-12 col-md mb-3 mb-md-0")([Xe("This livestream was part of the "),a$("")("\u{1F3AA} Student panel college fair"),Xe(". Recordings for all 100+ Q&A panels are available.")]),Hi("col-12 col-md-auto")(t$("btn btn-sm btn-outline-primary px-3")(en)({href:n})("See all recordings"))])))},y1=function(e){var n=function(){if(e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof T||e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof G||e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof T)return"col-12 col-md-6";if(e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof G)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 52, column 16 - line 56, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Fe([ga(e.conference.collegeFair)(KTe(e)),Hi("card")(Ji("card-body")([XW("text-center mb-4")("About this livestream"),Ji("row")([Ji(n)([ha(e.conference.school)(function(a){return Hi("d-md-none")(ED(a))}),QTe(e.conference)]),Ji(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 Hi("d-none d-md-block")(ED(a))}),ha(e.conference.presenter)(VTe)])])]))])};var r$=nn(Ke),YTe=r$(qn),XTe=Ea(Le),ZTe=Nt($r),o$=q(Qn),b1=q(Rn),eSe=r$(ra),w1=q(la),u$=Se(oe),E1=dl(oe),I1=Kv(ye),T1=zv(ye),wf=Ns(ye),Fl=Vv(oe),S1=Qv(ye),C1=fe(ze),Ef=Ql(oe),F1=Ql(Qe),G1=$n(oe)()(),M1=Yn(ma),nSe=Ri(xa),aSe=U(ze),tSe=Ye(vv(vv(vR))),rSe=Ri(oi),oSe=Ri(bU),uSe=te(tc),iSe=Yt(oe),lSe=Se(ye),A1=function(){function e(){}return e.value=new e,e}(),i$=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}(),l$=function(){function e(){}return e.value=new e,e}(),c$=function(){function e(){}return e.value=new e,e}(),s$=function(e){return function(n){return function(a){var t=function(u){return YTe(XTe(ZTe(u)(function(i){return o$(c$.value)})))(function(){return b1({ctas:n.ctas,stage:i$.value,error:G.value})})},r=function(u){if(u instanceof yl)return h5({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof bl)return d5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof wl)return m5({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof El)return p5({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(eSe(r(a.value0))(function(){return o$(l$.value)}));if(a instanceof l$)return b1({ctas:n.ctas,error:n.error,stage:A1.value});if(a instanceof c$)return b1({ctas:n.ctas,stage:A1.value,error:new T("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 207, column 24 - line 217, column 92): "+[a.constructor.name])}}},v$=function(e){return b1({stage:A1.value,error:G.value,ctas:e})},cSe=function(){return Yo(qo(Be)([Xl.value,new yt(" "),Zl.value,new yt(", "),nc.value,new yt(":"),Pi.value,new yt(" "),ac.value]))}(),f$=function(e){return function(n){if(e.ctas.length===0)return ta;var a=function(L){return L instanceof El?w1(L.value0):G.value},t=function(L){return L instanceof bl?w1(L.value0):G.value},r=function(L){return L instanceof wl?w1(L.value0):G.value},u=function(L){return L instanceof yl?w1(L.value0):G.value},i=function(){if(e.stage instanceof A1)return ta;if(e.stage instanceof i$)return u$("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Opening...");throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 186, column 24 - line 191, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?ta:Fe([E1("")("Referrals"),I1("table table-sm mb-0")([T1("")([wf("")([Fl("")("Title"),Fl("")("Actions")])]),S1("")(C1(L)(function(N){return wf("t--cta t--cta-referral")([Ef("pt-3")(N.title),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ID(new El(N)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?ta:Fe([E1("")("General"),I1("table table-sm mb-0")([T1("")([wf("")([Fl("")("Title"),Fl("")("URL"),Fl("")("Link Text"),Fl("")("Actions")])]),S1("")(C1(Tv(nSe(function(N){return N.title}))(L))(function(N){return wf("t--cta t--cta-general")([Ef("pt-3")(function(){var z=Pt(N.autoDisplayMinutesFromStart);return z?"\u23F0 ":""}()+N.title),Ef("pt-3")(N.url),Ef("pt-3")(N.buttonText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ID(new bl(N)))})("Launch CTA"))])}))])])},m=function(L){return L.length===0?ta:Fe([E1("")("Featured Service Providers"),I1("table table-sm mb-0")([T1("")([wf("")([Fl("")("Advisors"),Fl("")("Link Text"),Fl("")("Actions")])]),S1("")(C1(L)(function(N){return wf("t--cta t--cta-featured-sp")([Ef("pt-3")(hr(", ")(aSe(function(z){return z.name})(N.providers))),Ef("pt-3")(N.linkText),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ID(new wl(N)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?ta:Fe([E1("")("Upcoming events"),I1("table table-sm mb-0")([T1("")([wf("")([Fl("")("Livestream"),Fl("")("Date & Time"),Fl("")("Actions")])]),S1("")(C1(Tv(tSe(rSe(function(N){return N.startTime}))(oSe(function(N){return N.conferenceId})))(L))(function(N){return wf("t--cta t--cta-stream-"+uSe(N.conferenceId))([Ef("pt-3")(N.title),Ef("pt-3")(cSe(N.startTime)+(" "+A_)),F1("text-nowrap")(G1("btn btn-white btn-sm px-4 t--open")(en)({onClick:M1(n)(new ID(new yl(N)))})("Launch CTA"))])}))])])},g=Hr(a)(e.ctas),E=Hr(t)(e.ctas),b=Hr(r)(e.ctas),I=Hr(u)(e.ctas);return Fe([iSe("")("Calls to action"),lSe("t--ctas position-relative")([ha(e.error)(function(L){return u$("alert alert-danger")(L)}),p(I),s(E),m(b),l(g),i])])}};var _$=rc(Qc(zc)),p$=ee(ra),sSe=BF(he),pd=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}(),d$={eq:function(e){return function(n){return e instanceof pd&&n instanceof pd||e instanceof TD&&n instanceof TD||e instanceof SD&&n instanceof SD}}},m$=_$("profile_validate_username_path")(function(e){return function(n){return p$(e({username:n}))(Vc(function(a){return sSe("username validation result")(a)(function(t){return t==="available"?new T(pd.value):t==="taken"?new T(TD.value):t==="invalid"?new T(SD.value):G.value})}))}}),h$=_$("profile_set_username_path")(function(e){return function(n){return p$(e({username:n}))(lr)}});var vSe=De(nr(Ds()(dc(dc(hs)()({reflectSymbol:function(){return"username"}})(xt))()({reflectSymbol:function(){return"result"}})(d$)))),_A=Se(ye),D$=Se(Qe),fSe=Kt(oe),_Se=fi(),CD=Se(oe),pSe=no()(),dSe=Yn(ii),g$=$n(oe)()(),mSe=Yn(ma),hSe=Ai($v(fl)),pA=nn(Ke)(qn),DSe=er(Rn),dA=Ea(Le),gSe=gi(Fa),e0=q(Rn),RSe=U(Fa),ySe=ee(ra),bSe=Fv($r),R$=q(Qn),y$=function(){function e(){}return e.value=new e,e}(),b$=function(){function e(){}return e.value=new e,e}(),w$=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}(),I$=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}(),T$=function(){function e(){}return e.value=new e,e}(),S$=function(){function e(){}return e.value=new e,e}(),mA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hA=function(){function e(){}return e.value=new e,e}(),C$=function(e){return function(n){var a=e.username!==""&&Mt(e.updating)&&vSe(e.validated)(new T({username:e.username,result:pd.value}));return Fe([_A("row")([D$("col col-md-6")(fSe("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),D$("col-6 d-none d-md-block")(_Se("img-fluid")({alt:vi.value,src:"/img/illustrations/clipboards.svg"}))]),CD("")("Your username:"),_A("input-group")([pSe("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:dSe(n)(function(t){return Me.create(w$.create(Xs(t)))})})]),_A("d-flex mt-3")([g$("btn btn-light mr-3")(en)({onClick:mSe(n)(new bn(hA.value))})("Cancel"),g$("btn btn-primary t--submit-username")(en)({type:"button",disabled:!a,onClick:hSe(n)(function(){return a?new T(new Me(T$.value)):G.value}())})("Save")]),ha(e.validated)(function(t){if(t.result instanceof pd)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 74, column 37 - line 80, column 121): "+[t.result.constructor.name])}),ha(e.updating)(function(t){if(t instanceof y$)return CD("text-success")("Updating your username...");if(t instanceof b$)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 81, column 30 - line 85, column 95): "+[t.constructor.name])})])}},F$=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof w$)return pA(DSe(n.value0.value0!=="")(dA(gSe(Qt(100))(new Me(new E$(n.value0.value0))))))(function(){return e0({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof E$){if(n.value0.value0===e.username)return pA(dA(RSe(function(){var a=I$.create(n.value0.value0);return function(t){return Me.create(a(t))}}())(m$(n.value0.value0))))(function(){return e0({username:e.username,validated:G.value,updating:G.value})});if(Oe)return e0(e)}if(n.value0 instanceof I$)return e0({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof T$)return pA(dA(ySe(bSe(h$(e.username)))(function(a){if(a instanceof Te)return R$(new bn(new mA(e.username)));if(a instanceof Ie)return R$(new Me(S$.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 113, column 7 - line 117, column 48): "+[a.constructor.name])})))(function(){return e0({username:e.username,validated:G.value,updating:new T(y$.value)})});if(n.value0 instanceof S$)return e0({username:e.username,validated:e.validated,updating:new T(b$.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 94, column 31 - line 121, column 48): "+[n.value0.constructor.name])}if(n instanceof bn)return e0(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 93, column 1 - line 93, column 55): "+[e.constructor.name,n.constructor.name])}},G$=function(e){return{username:e,validated:G.value,updating:G.value}};var wSe=Kr(),ESe=ld(Qe)()(),ISe=za(ye),TSe=rt(oe),SSe=function(e){var n=sh(e);return function(){return function(a){return function(t){var r=wSe(a);return ESe({placement:h1,overlay:Fe(n(t)),overlayStyle:ba(r.overlayStyle)(vt({width:"15rem"}))})(ISe("d-inline-flex align-items-center text-secondary "+r.className)([TSe("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),Xe(r.anchorText)]))}}}},L1=function(e){var n=SSe(e)();return function(a){return n({className:a,anchorText:""})}};var M$=Nn(jn),FD=Pn(M$)(Mn(Gn)),A$=Ln(An),GD=xn(A$),L$=kn(Un),MD=On(L$),CSe=U(re),dd=function(){function e(){}return e.value=new e,e}(),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}(),n0=function(){function e(){}return e.value=new e,e}(),FSe={to:function(e){if(e instanceof Re)return dd.value;if(e instanceof ce&&e.value0 instanceof Re)return md.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof Re)return hd.value;if(e instanceof ce&&e.value0 instanceof ce&&e.value0.value0 instanceof ce&&e.value0.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 ce&&e.value0.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 ce)return n0.value;throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof dd)return new Re(Ue.value);if(e instanceof md)return new ce(new Re(Ue.value));if(e instanceof hd)return new ce(new ce(new Re(Ue.value)));if(e instanceof Dd)return new ce(new ce(new ce(new Re(Ue.value))));if(e instanceof gd)return new ce(new ce(new ce(new ce(new Re(Ue.value)))));if(e instanceof n0)return new ce(new ce(new ce(new ce(new ce(Ue.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},x$=Cn(FSe)(FD(FD(FD(FD(FD(M$)(A$))(GD))(GD))(GD))(GD))(MD(MD(MD(MD(MD(L$))))))(GD);var GSe={eq:function(e){return function(n){return e instanceof dd&&n instanceof dd||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 n0&&n instanceof n0}}},x1=function(e){if(e instanceof dd)return"student";if(e instanceof md)return"transfer_student";if(e instanceof hd)return"counselor";if(e instanceof Dd)return"iec";if(e instanceof gd)return"parent";if(e instanceof n0)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},P$=function(){var e=Sn(x1)(x$);return Zn(Ze)({parse:function(n){return n==="unknown"?new T(G.value):CSe(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})}(),j$=function(e){if(e instanceof dd)return"Student";if(e instanceof md)return"Transfer Student";if(e instanceof hd)return"High School Counselor";if(e instanceof Dd)return"Independent Educational Counselor (IEC)";if(e instanceof gd)return"Parent";if(e instanceof n0)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},N$=function(){return Cv(GSe)(n0.value)(x$)}();function O$(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var MSe=q(_t),ASe=Sh(!1);var P1=function(e){if(Th(ASe))return MSe(me);if(Oe)return O$;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 14, column 1 - line 14, column 53): "+[e.constructor.name])};var DA=U(ur);var gA=ee(tu),LSe=q(Rc),xSe=Uo(Wx);var U$=function(e){return e},k$=function(e){return function(n){return DA(function(a){return a.result})(e({substring:n,position:0}))}};var ns={map:function(e){return function(n){var a=DA(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},a0=function(e){return function(n){return new Ie({pos:n.position,error:e})}},t0={apply:function(e){return function(n){return function(a){return gA(e(a))(function(t){return gA(n(t.suffix))(function(r){return LSe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return ns}};var Zs={bind:function(e){return function(n){return function(a){return gA(e(a))(function(t){return U$(n(t.result))(t.suffix)})}}},Apply0:function(){return t0}};var ev={pure:function(e){return function(n){return new Te({result:e,suffix:n})}},Apply0:function(){return t0}};var PSe={Applicative0:function(){return ev},Bind1:function(){return Zs}},B$={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof tr)return new tr({state:t.result.value0,str:t.suffix});if(t.result instanceof zt)return new zt({result:t.result.value0,suffix:t.suffix});throw new Error("Failed pattern match at StringParser.Parser (line 87, column 5 - line 87, column 68): "+[t.constructor.name])};return function(t){return xSe(function(r){return DA(a)(U$(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return PSe}};var r0={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Ie){if(a.position===t.value0.pos)return n(a);if(Oe)return new Ie({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return ns}},jSe={empty:a0("No alternative"),Alt0:function(){return r0}},H$={Applicative0:function(){return ev},Plus1:function(){return jSe}};var J$=ia(r0),RA=ee(Zs),yA=q(ev),NSe=U(ns);var OSe=Ro(t0),USe=Jn(t0);var bA=function(e){return function(n){return J$(e)(a0(n))}},wA=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 J$(RA(e)(function(n){return yA(me)}))(yA(me))};var q$=function(e){return function(n){return new Zu(e,n)}};var kSe=function(e){return function(n){var a=e(n);if(a instanceof Te){var t=n.position65535;return t?e(n):V$(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])})}(),If=function(e){return wA(z$(qSe)(function(n){var a=e(n);return a?V$(n):a0("Character "+(Q$(n)+" did not satisfy predicate"))}))},qi=function(e){return bA(If(function(n){return n===e}))("Could not match character "+Q$(e))};var WSe=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}},$Se=Et(),EA=U(ns),zSe=gr(Am)(It),VSe=U(aS),Ao=nn(Ke)(Zs),mu=lt(ns),nv=q(ev),_i=ia(r0);var Rd=Ro(t0),Tf=ee(Zs),Y$=gr(Jr)(It);var xr=function(e){return $Se(lb(e))},IA=function(e){return EA(function(){var n=VSe(Tu);return function(a){return zSe(n(a))}}())(W$(If(e)))},X$=function(e){return Ao(mu(e))(function(){return Ao(mu(j1(e)))(function(){return nv(me)})})},j1=function(e){return _i(X$(e))(nv(me))},Z$=function(e){return Ao(mu(If(e)))(function(){return Ao(mu(j1(If(e))))(function(){return nv(me)})})},QSe=qi(xr(0));var ez=qi(` `),nz=function(e){return e===" "||e===" "},KSe=If(nz),TA=Z$(nz),YSe=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}}},XSe=ts(xr(33))(xr(126)),ZSe=If(XSe),SA=function(e){return function(n){return Sc(Tu(n))(e)}},N1=function(e){return ts(xr(1))(xr(8))(e)||ts(xr(14))(xr(31))(e)||SA("\v\f\x7F")(e)},eCe=function(e){return ts(xr(33))(xr(39))(e)||ts(xr(42))(xr(91))(e)||ts(xr(93))(xr(126))(e)||N1(e)},nCe=function(e){return ts(xr(33))(xr(90))(e)||ts(xr(94))(xr(126))(e)||N1(e)},aCe=If(N1),tCe=function(e){return SA(Tu(xr(33)))(e)||ts(xr(35))(xr(91))(e)||ts(xr(93))(xr(126))(e)||N1(e)};var az=qi("\r"),tz=mu(Rd(az)(ez)),yd=function(){var e=X$(Rd(tz)(TA)),n=Rd(TA)(as(Rd(tz)(TA)));return _i(n)(e)}(),rz=function(){var e=Ao(mu(qi("\\")))(function(){return _i(ZSe)(_i(KSe)(_i(ez)(_i(az)(_i(aCe)(QSe)))))});return Tf(e)(function(n){return nv("\\"+Tu(n))})}(),rCe=_i(IA(tCe))(rz),oCe=function(){var e=Ao(mu(qi('"')))(function(){return Tf(o0(Rd(as(yd))(rCe)))(function(n){return Ao(mu(as(yd)))(function(){return Ao(mu(qi('"')))(function(){return nv(n)})})})});return EA(function(n){return'"'+(Y$(n)+'"')})(e)}(),oz=WSe("comment","Text.Email.Parser",function(){return Ao(mu(qi("(")))(function(){return Ao(j1(_i(Z$(eCe))(_i(mu(rz))(_i(oz(155))(yd)))))(function(){return Ao(mu(qi(")")))(function(){return nv(me)})})})}),uCe=oz(152),O1=j1(_i(uCe)(yd)),iCe=Ao(as(O1))(function(){return Ao(mu(qi("[")))(function(){return Tf(o0(Rd(as(yd))(IA(nCe))))(function(e){return Ao(as(yd))(function(){return Ao(mu(qi("]")))(function(){return Ao(as(O1))(function(){return nv("["+(Y$(e)+"]"))})})})})})}),lCe=function(){var e=function(n){return YSe(n)||SA("!#$%&'*+/=?^_`{|}~-")(n)};return IA(e)}(),uz=function(){var e=Ao(mu(as(O1)))(function(){return Tf(_i(lCe)(oCe))(function(a){return Ao(mu(as(O1)))(function(){return nv(a)})})}),n=$$(e)(qi("."));return EA(Ul(Am)(It)("."))(n)}(),cCe=_i(uz)(iCe),sCe=uz,CA=Tf(sCe)(function(e){return Tf(qi("@"))(function(){return Tf(cCe)(function(n){return Tf(K$)(function(){return nv({localPart:e,domainPart:n})})})})});var fCe=function(e){return k$(CA)(e)},_Ce=function(){var e=Bt(ko)(te(Dv()()(gv({reflectSymbol:function(){return"error"}})(Rv({reflectSymbol:function(){return"pos"}})(an))(Gt))));return function(n){return e(fCe(n))}}(),AD=function(e){var n=_Ce(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 FA=Io(oe),U1=no()(),pCe=Yn(ii),iz=Oy(ye)()(),lz=fe(re),cz=Ai(My(fl)),sz=U(re),k1=Uy(oe)()(),vz=fe(ze),LD=Se(ye),dCe=CG(),GA=te(an),mCe=bR(Be)(at),hCe=Zv(ye)()(),u0=Se(Qe),fz=$n(oe)()(),DCe=Yn(ma),gCe=te(tc),xD=q(Rn),_z=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bd=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(g){return function(E){return function(b){return function(I){return function(L){return Fe([FA("")(g),U1("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:pCe(t)(function(N){return I(Xs(N))})})])}}}}}},u=[FA("")("I'm a..."),iz("form-control")({name:"livestream_public_registration_form[i_am_a]",value:je("")(lz(a.persona)(x1)),onChange:cz(t)(function(p){return sz(hz.create)(P$(QM(p)))})})([ga(Mt(a.persona))(k1("")({value:""})("Select one...")),Fe(vz(N$)(function(p){return k1("")({value:x1(p)})(j$(p))}))])],i=LD("d-flex align-items-center")([Xe("Already have an account? "),dCe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:Dw,openInNewTab:!1})]),l=[FA("")("Graduation year"),iz("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:je("")(lz(a.gradYear)(GA)),onChange:cz(t)(function(p){return sz(mz.create)(wc(QM(p)))})})([ga(Mt(a.gradYear))(k1("")({value:""})("Select one...")),Fe(vz(n.allowedGradYears)(function(p){return k1("")({value:GA(p)})(GA(p))}))])],s=je({path:"",token:""})($b("livestreams_register_path")),m=mCe([AD(a.email),a.firstName!=="",a.lastName!=="",Pt(a.gradYear),Pt(a.persona)]);return Fe([i,hCe("")({action:s.path,method:"POST"})([u0("row")(u0("col")(r("email")("Email")("Your email")(a.email)(_z.create)({autoFocus:e.autoFocus}))),u0("row mt-3")(u0("col")(r("first_name")("First name")("Your first name")(a.firstName)(pz.create)({autoFocus:!1}))),u0("row mt-3")(u0("col")(r("last_name")("Last name")("Your last name")(a.lastName)(dz.create)({autoFocus:!1}))),LD("row mt-3")([LD("col-6")(l),LD("col-6")(u)]),u0("row mt-3")(LD("col-12")([fz("btn btn-primary w-100 mt-3 t--register")(en)({type:"submit",disabled:!m,onClick:DCe(P1)(me)})("Register"),ha(e.cancelButton)(function(p){return fz("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(en)({type:"button",onClick:wr(function(g){return p.click})})(p.text)})])),U1("")({type:"hidden",name:"authenticity_token",value:s.token}),U1("")({type:"hidden",name:"register_for_conference_id",value:gCe(n.conference.id)}),U1("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},wd=function(e){return function(n){if(n instanceof _z)return xD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof pz)return xD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof dz)return xD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof mz)return xD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof hz)return xD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new T(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 172, column 16 - line 182, column 36): "+[n.constructor.name])}},Ed=function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}}();var Dz=Se(ye),RCe=L1(oe),yCe=cr(oe)()(),Id=function(e){return Fe([Dz("")([Xe(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),RCe("")(` 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. `)]),Dz("")([Xe(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),yCe("")(Zt("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),Xe(".")])])};var MA={eq:function(e){return function(n){return e===n}}};var av=nn(Ke)(qn),bCe=fu(Le),gz=Pa(),wCe=Ui(gz(H({reflectSymbol:function(){return"author"}})(gz(H({reflectSymbol:function(){return"cvid"}})(he)(H({reflectSymbol:function(){return"username"}})(he)(tn))))(H({reflectSymbol:function(){return"id"}})(on)(H({reflectSymbol:function(){return"isFromHQ"}})(Ca)(H({reflectSymbol:function(){return"isPublic"}})(Ca)(H({reflectSymbol:function(){return"text"}})(he)(H({reflectSymbol:function(){return"time"}})(he)(tn))))))))(Le),Td=Ea(Le),B1=q(Qn),Pr=q(Rn),AA=uc(),ECe=Kt(ye),LA=za(oe),xA=Io(oe),ICe=rt(oe),i0=Se(ye),Sd=Se(Qe),H1=$n(oe)()(),Cd=Yn(ma),PD=Se(oe),Rz=Yt(oe),yz=fe(ze),TCe=Xt(ye)()(),SCe=za(ye),bz=ee(Ve),CCe=yp()(),FCe=Yn(ii),GCe=Ai($v(fl)),MCe=Yv(ye),ACe=no()(),LCe=L1(oe),xCe=De(nr(xt)),PCe=fe(re),wz=Ho(Z7(bu(oi))),jCe=yo(MA),Ez=U(Fa),NCe=Ye(Lt),OCe=kl(Be)(MA),Iz=ut(Mr(Fa)),Tz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Sz=function(){function e(){}return e.value=new e,e}(),Cz=function(){function e(){}return e.value=new e,e}(),l0=function(){function e(){}return e.value=new e,e}(),J1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),q1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),W1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Fz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Gz=function(){function e(){}return e.value=new e,e}(),PA=function(){function e(){}return e.value=new e,e}(),jA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mz=function(){function e(){}return e.value=new e,e}(),Az=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NA=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}(),Lz=function(){function e(){}return e.value=new e,e}(),Fd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jD=function(){function e(){}return e.value=new e,e}();var xz=function(e){return av(bCe(function(n){return Me.create(jA.create(L_(n)))})(wCe(e.pusher.dataChannel)("question")))(function(){return av(Td(B1(new Me(Mz.value))))(function(){return Pr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:l0.value})})})},Pz=function(e){if(e.user instanceof G)return new T(new Me(NA.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new Me(Lz.value));if(e.user instanceof T&&e.user.value0.username instanceof T)return G.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 363, column 3 - line 369, column 14): "+[e.user.constructor.name])},UCe=function(){return Yo(qo(Be)([nc.value,new yt(":"),Pi.value,new yt(" "),ac.value]))}(),jz=function(e){return function(n){return function(a){var t=function(s){return a(Me.create(s))},r=function(s){return AA({id:"question-modal",onDismiss:t(jD.value),body:Fe([ECe("")([LA("")("By: "),xA("")("@"+s.author.username)]),ICe("")(s.text),Kl(""),i0("row align-items-center mb-3")([Sd("col-4")(H1("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())(en)({onClick:Cd(t)(new z1(Sz.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."}())]),i0("row align-items-center")([Sd("col-4")(H1("btn w-100 btn-danger")(en)({onClick:Cd(t)(new z1(Cz.value))})("Ban this user")),i0("col")([Xe("This user will not be able to ask any more questions "),xA("")("in this livestream. "),LA("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Fe([H1("btn btn-outline-primary px-4")(en)({onClick:Cd(t)(jD.value)})("Never mind, close this dialog")])})},u=function(s){return AA({id:"questions-registration-form-modal",onDismiss:t(jD.value),title:Rz("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Fe([bd({cancelButton:G.value,autoFocus:!0})(e)(s)(function(m){return t($1.create(m))}),Sd("small mt-3")(Id(e))])})},i=function(s){return AA({id:"questions-username-modal",onDismiss:t(jD.value),title:Rz("")("Please select a user name"),body:C$(s)(function(m){return t(Fd.create(m))}),bodyClass:"t--username-modal"})},l=function(s){var m=function(g){return function(E){return function(b){return Fe([PD("ml-2 badge badge-"+E)(g),ha(b)(function(I){return PD("ml-2 text-secondary")(UCe(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?m("CollegeVine")("success")(s.time):s.isPublic?m("Question")("warning")(G.value):ta};return Fe([Sd("position-relative h-100")(Sd("d-flex flex-column position-absolute-fullsize")(i0("d-flex flex-column flex-grow-1 min-height-0")([i0("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(yz(n.questions)(function(s){return TCe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:Cd(t)(new z1(new Tz(s)))})([SCe("small d-inline-flex align-items-center")([xA("")("@"+s.author.username),l(s),Xe(":")]),LA("ml-1")(s.text)])})),i0("")([ha(bz(e.user)(function(s){return s.username}))(function(s){return PD("small text-secondary mt-2")("@"+s)}),CCe("form-control t--question-text")({onChange:FCe(t)(function(s){return Fz.create(D1(s))}),onClick:GCe(a)(Pz(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ga(e.isPrivilegedUser)(Sd("form-check my-2")(MCe("form-check-label d-flex align-items-center t--broadcast-checkbox")([ACe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:Cd(t)(Gz.value)}),PD("badge badge-info bg-info text-dark mr-2")("HQ"),Xe("Send to all viewers")]))),i0("d-flex justify-content-end align-items-center")([LCe("large mr-2")(` Questions you ask will only be visible to you and the host unless they select it to read to the audience, at which point it will appear with a yellow \u201CQuestion\u201D tag for all viewers to see. `),H1("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(en)({onClick:Cd(t)(PA.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof l0)return ta;if(n.modal instanceof q1)return u(n.modal.value0);if(n.modal instanceof J1)return r(n.modal.value0);if(n.modal instanceof W1)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 140, column 5 - line 144, column 41): "+[n.modal.constructor.name])}()])}}},kCe=function(e){return function(n){return xCe(PCe(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},Nz=function(e){return function(n){return function(a){if(a instanceof bn)return Pr(n);if(a instanceof Me){if(a.value0 instanceof Fz){var t=Pz(e);if(t instanceof T)return av(Td(B1(t.value0)))(function(){return Pr(n)});if(t instanceof G)return Pr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 250, column 5 - line 255, column 46): "+[t.constructor.name])}if(a.value0 instanceof Gz)return Pr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof PA)return av(Td(B1(new Me(NA.value))))(function(){return Pr(n)});if(a.value0 instanceof jA)return Pr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:wz(function(l){return Vb(function(s){return s.time}(l))})(wo(kCe(e))(co(a.value0.value0)(wo(function(){var l=jCe(a.value0.value0.id);return function(s){return l(function(m){return m.id}(s))}}())(n.questions))))});if(a.value0 instanceof Mz)return av(Td(Ez(function(l){return Me.create(Az.create(l))})(ow(e.conference.id))))(function(){return Pr(n)});if(a.value0 instanceof Az){var u=yz(a.value0.value0)(function(l){return l.id});return Pr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:wz(function(l){return Vb(function(s){return s.time}(l))})(NCe(a.value0.value0)(wo(function(l){return OCe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof NA)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(Ed)});var i=function(l){if(a.value0 instanceof $1)return Pr(n);if(a.value0 instanceof Lz)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(G$(je("")(bz(e.user)(function(m){return m.username}))))});if(a.value0 instanceof Fd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof mA)return av(Td(B1(new bn(a.value0.value0.value0.value0))))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})});if(a.value0 instanceof Fd&&a.value0.value0 instanceof bn&&a.value0.value0.value0 instanceof hA)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value});var s=function(m){if(a.value0 instanceof Fd&&Oe)return Pr(n);if(a.value0 instanceof jD)return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value});if(a.value0 instanceof z1){if(e.isPrivilegedUser){if(a.value0.value0 instanceof Tz)return Pr({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 Pr(n)};return a.value0.value0 instanceof Cz&&n.modal instanceof J1?av(Za(y5({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})}):E(!0)};return a.value0.value0 instanceof Sz&&n.modal instanceof J1?av(Za(f5({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Pr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:l0.value})}):p(!0)}if(Oe)return Pr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof Fd&&n.modal instanceof W1?Iz(function(m){return Me.create(Fd.create(m))})(function(m){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new W1(m)}})(F$(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof $1&&n.modal instanceof q1?Iz(function(l){return Me.create($1.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new q1(l)}})(wd(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof PA&&e.user instanceof T?av(Td(Ez(function(r){return Me.create(jA.create(r))})(_5({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Pr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var V1,BCe=new Uint8Array(16);function OA(){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(BCe)}var Oz=/^(?:[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 HCe(e){return typeof e=="string"&&Oz.test(e)}var UA=HCe;var Zo=[];for(Q1=0;Q1<256;++Q1)Zo.push((Q1+256).toString(16).substr(1));var Q1;function JCe(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(!UA(a))throw TypeError("Stringified UUID is invalid");return a}var Uz=JCe;function qCe(e,n,a){e=e||{};var t=e.random||(e.rng||OA)();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 Uz(t)}var kA=qCe;var kz=kA;var WCe=function(e){return e},BA=function(e){return e};var HA=ee(fr)(kz)(function(){var e=q(_t);return function(n){return e(WCe(n))}}());var Gd=Ea(Le),Bz=nn(Ke),$Ce=Bz(ra),zCe=Ye(oy),VCe=U(Fa),ND=gn(Le),QCe=rt(oe),KCe=fi(),Hz=Xt(Qe)()(),Jz=im(oi),YCe=Zr(vr),XCe=Hn(Pu),ZCe=te(sN),qz=te(Jf),eFe=U(ze),rs=Bz(qn),nFe=fu(Le),aFe=Ui(Pa()(H({reflectSymbol:function(){return"authorTag"}})(he)(H({reflectSymbol:function(){return"kind"}})(he)(tn))))(Le),K1=U(Bn),Sf=q(Rn),Wz=nt(lp),$z=um(oi),tFe=q(Qn),JA=Ac(op),rFe=Se(ye),oFe=fe(ze),uFe=$n(ye)()(),iFe=Yn(ma),lFe=za(oe),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}(),zz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WA=function(e){return Gd($Ce(Qt(zCe(e)(10)))(function(){return VCe(qA.create)(ND(si))}))},Vz=50,Qz=function(e){var n=function(r){return QCe("text-white fe fe-"+r)("")},a=function(){if(e instanceof Ws)return n("heart");if(e instanceof df)return n("thumbs-up");if(e instanceof x_)return n("thumbs-down");if(e instanceof mf)return n("file-text");if(e instanceof hf)return KCe("")({src:"/img/icons/smile-white.svg",alt:vi.value,style:vt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 153, column 12 - line 158, column 133): "+[e.constructor.name])}(),t=function(){if(e instanceof Ws)return"#F0747B";if(e instanceof df)return"#008CFD";if(e instanceof x_)return"#6E84A3";if(e instanceof mf)return"#18A668";if(e instanceof hf)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 160, column 23 - line 165, column 34): "+[e.constructor.name])}();return Hz("d-flex justify-content-center align-items-center rounded-circle")({style:vt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},Kz=6,Yz=function(){return Kz*1e3}(),Xz=function(e){return function(n){var a=function(t){if(Jz(t.removeAt)(e.currentTime))return ta;var r=Tt(YCe(XCe(sl(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=Jz(t.startDecayAt)(e.currentTime),m=Kz+(r-5)/10;return Hz("position-absolute mb-4 mt-2")({key:ZCe(t.startDecayAt),style:vt({right:qz(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:qz(m)+"s",transitionTimingFunction:u})})(Qz(t.reaction.kind))};return Fe(eFe(a)(e.reactions))}},Zz=function(e){return rs(nFe(function(n){return new OD(xU(n),G.value)})(aFe(e.pusher.dataChannel)("reaction")))(function(){return rs(Gd(ND(K1(function(n){return zz.create(BA(n))})(HA))))(function(){return rs(Gd(ND(K1(qA.create)(si))))(function(){return Sf({authorTag:"",currentTime:Wz,coolDownUntil:Wz,reactions:[]})})})})},eV=800,nV=function(e){return function(n){return function(a){if(a instanceof Y1&&a.value1 instanceof G)return rs(Gd(ND(K1(function(){var t=Y1.create(a.value0);return function(r){return t(T.create(r))}}())(si))))(function(){return Sf(n)});if(a instanceof Y1&&a.value1 instanceof T){if($z(n.coolDownUntil)(a.value1.value0))return rs(Gd(tFe(new OD({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return Sf(n)});if(Oe)return rs(Za(D5(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return rs(WA(eV))(function(){return Sf({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:je(a.value1.value0)(JA(eV)(a.value1.value0))})})})}if(a instanceof OD&&a.value1 instanceof G)return rs(Gd(ND(K1(function(){var t=OD.create(a.value0);return function(r){return t(T.create(r))}}())(si))))(function(){return Sf(n)});if(a instanceof OD&&a.value1 instanceof T)return rs(WA(Vz))(function(){return rs(WA(Yz))(function(){var t={reaction:a.value0,startDecayAt:je(a.value1.value0)(JA(Vz)(a.value1.value0)),removeAt:je(a.value1.value0)(JA(Yz)(a.value1.value0))};return Sf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:o_(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof zz)return Sf({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof qA)return Sf({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:wo(function(t){return $z(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 171, column 22 - line 214, column 8): "+[a.constructor.name])}}},aV=function(e){return function(n){var a=function(t){if(t instanceof Ws)return"love this";if(t instanceof df)return"helpful";if(t instanceof x_)return"not helpful";if(t instanceof mf)return"taking notes";if(t instanceof hf)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 139, column 13 - line 144, column 30): "+[t.constructor.name])};return rFe("d-flex justify-content-end my-2")(oFe([Ws.value,hf.value,df.value,mf.value])(function(t){return uFe("btn bg-light d-flex align-items-center p-0 ml-3")(Zt(a(t)))({onClick:iFe(n)(new Y1(t,G.value)),style:vt({borderRadius:"1em"})})([Qz(t),lFe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var tV=nn(Ke),cFe=ee(ra),$A=gn(Le),X1=q(Qn),Z1=Kt(oe),eE=te(an),UD=tV(qn),kD=Ea(Le),Gl=q(Rn),rV=Nt($r),oV=Ro(Ym),uV=U(Fa),sFe=Bo(Rn)(Qu),vFe=ui(Gs),iV=Se(oe),fFe=oc(),_Fe=Yt(oe),lV=$n(oe)()(),zA=Yn(ma),cV=Se(Qe),pFe=$n(ye)()(),dFe=rt(oe),mFe=Se(ye),sV=function(){function e(){}return e.value=new e,e}(),vV=function(){function e(){}return e.value=new e,e}(),fV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_V=function(){function e(){}return e.value=new e,e}(),pV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dV=function(){function e(){}return e.value=new e,e}(),mV=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}(),hV=function(){function e(){}return e.value=new e,e}(),DV=function(){function e(){}return e.value=new e,e}(),QA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nE=function(){function e(){}return e.value=new e,e}(),gV=tV(ra)(Qt(1e3))(function(){return cFe($A(si))(function(e){return X1(new QA(e))})}),hFe=function(e){return{header:"Go on-air?",body:Fe([Z1("")("Are you sure you want to go on-air?"),Z1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(eE(e.videoLagSeconds)+` seconds if you confirm. If you're presenting with Zoom, make sure you've gone "live" on Zoom as well. `))]),confirmText:"Confirm, go on-air!",cancelText:"Cancel",confirmMsg:_V.value}},RV=function(e){return function(n){return function(a){return function(t){return UD(kD(gV))(function(){return Gl({confirmation:n.confirmation,network:sV.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},yV=function(e){return function(n){return function(a){if(a instanceof _V)return UD(kD(rV(oV(u5(e.conference.id))(uV(pV.create)($A(si))))(function(l){return X1(new KA("Error opening the stream. Please try again."))})))(function(){return Gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:vV.value})});if(a instanceof pV)return RV(e)(n)(a.value0)(to.value);if(a instanceof dV)return UD(kD(rV(oV(i5(e.conference.id))(uV(mV.create)($A(si))))(function(l){return X1(new KA("Error closing the stream. Please try again."))})))(function(){return Gl(n)});if(a instanceof mV)return RV(e)(n)(a.value0)(Ar.value);if(a instanceof VA)return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof hV)return UD(sFe(n.confirmation)(function(l){return kD(X1(l.confirmMsg))}))(function(){return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof DV)return Gl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof KA)return Gl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new fV(a.value0)});var t=function(l){if(a instanceof QA||a instanceof nE)return Gl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 181, column 1 - line 181, column 76): "+[a.constructor.name])};if(a instanceof QA){if(n.transition instanceof T){var r=vFe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-Eo(r)|0,i=u>0;return i?UD(kD(gV))(function(){return Gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):Gl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},bV=function(e){return Gl({streamStatus:e.streamStatus,transition:G.value,network:sV.value,confirmation:G.value})},DFe=function(){return{header:"End the stream?",body:Fe([Z1("")("Are you sure you want to end the stream?"),Z1("mb-0 font-weight-bold fw-bold")("You won't be able to restart it again!")]),confirmText:"Yes, end it",cancelText:"No, keep streaming",confirmMsg:dV.value}}(),wV=function(e){return function(n){return function(a){var t=function(){return n.network instanceof vV?iV("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):ta}(),r=function(m){return fFe({id:"stream-controls-confirmation-modal",header:_Fe("my-0")(m.header),bodyClass:"p-5",body:m.body,footerClass:"p-4",footer:Fe([lV("btn btn-primary px-4")(en)({onClick:zA(a)(hV.value)})(m.confirmText),lV("btn btn-outline-primary px-4")(en)({onClick:zA(a)(DV.value)})(m.cancelText)])})},u=function(m){return function(p){return function(g){return function(E){return function(b){return cV("col-auto pr-0")(pFe("btn btn-"+(m+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(en)({onClick:zA(a)(b)})([dFe("fe mr-2 fe-"+p)(""),Xe(g)]))}}}}},i=function(){if(n.streamStatus instanceof Nu)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new VA(hFe(e)));var m=function(p){if(n.streamStatus instanceof to)return Fe([u("lg")("radio")("ON AIR")("success")(nE.value),u("sm")("x-circle")("End stream")("outline-danger")(new VA(DFe))]);if(n.streamStatus instanceof Ar)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 to&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(nE.value):m(!0)}(),l=function(m){return iV("alert small m-0 flex-grow-1 alert-"+m)},s=function(){if(n.network instanceof fV)return l("danger")(n.network.value0);if(n.streamStatus instanceof Nu)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 to)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 Ar)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 Ar&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(eE(n.transition.value0.secondsLeft)+" seconds.")):g(!0)};return n.streamStatus instanceof to&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(eE(n.transition.value0.secondsLeft)+" seconds...")):m(!0)}();return mFe("position-relative row align-items-center t--stream-controls")([i,cV("col")(s),t,ha(n.confirmation)(r)])}}};var gFe=Ac(Nv),EV=ui(Nv),IV=fO(),RFe=uc(),yFe=Yt(oe),bFe=Se(oe),TV=Kt(oe),wFe=$n(oe)()(),EFe=Yn(ma),SV=Ea(Le),FV=nn(Ke),GV=U(Fa),MV=gn(Le),AV=FV(qn),IFe=uu(Be)(ct),YA=q(Rn),XA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ZA=function(){function e(){}return e.value=new e,e}(),TFe=[30,15,5,0],LV=function(e){return je(e.conference.scheduledStartTime)(gFe(Tt(e.conference.duration))(e.conference.scheduledStartTime))},xV=function(e){return function(n){return function(a){if(!n.modal)return ta;if(n.now instanceof G)return ta;if(n.now instanceof T){var t=LV(e),r=EV(t)(n.now.value0),u=function(){if(r<1)return" ended "+IV({from:t,to:n.now.value0,format:_b("ago")});if(Oe)return" ends "+IV({from:n.now.value0,to:t,format:_b("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 69, column 7 - line 71, column 105): "+[])}();return RFe({id:"stream-end-warning-modal",onDismiss:a(ZA.value),body:Fe([yFe("mb-0")("Host-only warning"),bFe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),TV("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),TV("")(` You have `+(ji(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. `)),wFe("btn btn-primary px-4")(en)({onClick:EFe(a)(ZA.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])}}},SFe=SV(FV(ra)(Qt(60100))(function(){return GV(XA.create)(MV(ff))})),PV=function(e){return function(n){return function(a){if(a instanceof XA)return AV(SFe)(function(){var t=EV(LV(e))(a.value0),r=IFe(Eo(t))(TFe);return YA({now:new T(a.value0),modal:n.modal||r})});if(a instanceof ZA)return YA({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 74, column 22 - line 85, column 33): "+[a.constructor.name])}}},jV=function(){return AV(SV(GV(XA.create)(MV(ff))))(function(){return YA({modal:!1,now:G.value})})}();var NV=nn(Ke),CFe=NV(ra),OV=q(Qn),FFe=NV(qn),GFe=Ea(Le),MFe=Nt($r),aE=q(Rn),AFe=De(Mh),UV=qo(Be),eL=Se(ye),tE=rt(oe),LFe=$n(oe)()(),kV=Yn(ma),xFe=cr(oe)()(),PFe=$n(Qe)()(),jFe=oc(),BV=Se(Qe),NFe=Io(oe),OFe=Pc(oe)()(),UFe=za(oe),HV=function(){function e(){}return e.value=new e,e}(),JV=function(){function e(){}return e.value=new e,e}(),nL=function(){function e(){}return e.value=new e,e}(),qV=function(){function e(){}return e.value=new e,e}(),WV=function(){function e(){}return e.value=new e,e}(),$V=function(){function e(){}return e.value=new e,e}(),zV=function(){function e(){}return e.value=new e,e}(),kFe=function(){function e(){}return e.value=new e,e}(),VV=function(e){return function(n){return function(a){var t=CFe(tw({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return OV(new Me($V.value))});if(a instanceof WV)return FFe(GFe(MFe(t)(function(r){return OV(new Me(zV.value))})))(function(){return aE({cta:n.cta,stage:JV.value})});if(a instanceof $V)return aE({cta:n.cta,stage:qV.value});if(a instanceof zV)return aE({cta:n.cta,stage:nL.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 136, column 24 - line 146, column 44): "+[a.constructor.name])}}},QV=function(e){return function(n){return AFe(e.cta.conferenceId)(n.conferenceId)}},KV=function(e){return aE({cta:e,stage:HV.value})},BFe=function(){return Yo(UV([ec.value,new yt(", "),Xl.value,new yt(" "),Zl.value,new yt(" at "),nc.value,new yt(":"),Pi.value,new yt(" "),ac.value]))}(),HFe=function(){return Yo(UV([ec.value]))}(),YV=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof nL?eL("text-danger small mt-2")([tE("fe fe-x-circle mr-2")(""),Xe("Something went wrong. Please try again.")]):ta}(),r=function(m){return a(Me.create(m))},u=function(){if(e.user instanceof T)return LFe("btn btn-primary px-4 t--register-one-click")(Zt("Register for this livestream"))({onClick:kV(r)(WV.value)})("Register (one-click)");if(e.user instanceof G)return xFe("btn btn-primary px-4 t--register-new-tab")(Zt("Register for this livestream"))({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 87, column 22 - line 97, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof HV||n.stage instanceof nL)return u;if(n.stage instanceof JV)return eL("text-secondary")([tE("fe fe-refresh-cw mr-2")(""),Xe("Hold on tight...")]);if(n.stage instanceof qV)return eL("text-success")([tE("fe fe-check-circle mr-2")(""),Xe("You\u2019ve registered \u2013\xA0see you "+(HFe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 71, column 36 - line 85, column 10): "+[n.stage.constructor.name])}(),l=function(m){return a(bn.create(m))},s=PFe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:kV(l)(kFe.value)})(tE("fe fe-x")(""));return jFe({id:"livestream-event-cta-modal",body:Fe([BV("row justify-content-end mt-n3")(s),NFe("")("Join us for our upcoming livestream:"),OFe("mt-3")({id:Oi})(n.cta.title),UFe("small")(BFe(n.cta.startTime)+(" "+A_)),BV("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:Jh.value})}}};var JFe=oc(),rE=Se(ye),qFe=By(oe)()(),oE=Se(Qe),WFe=$n(Qe)()(),XV=Yn(ma),$Fe=rt(oe),zFe=fe(ze),VFe=pl()(),QFe=ao(oe),KFe=Kt(oe),YFe=cr(oe)()(),XFe=nn(Ke),ZFe=XFe(qn),eGe=Ea(Le),nGe=gn(Le),aGe=Vs(Cr)(),tGe=te(an),ZV=q(Rn),rGe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eQ=function(){function e(){}return e.value=new e,e}(),nQ=function(e){return function(n){var a=function(){var i=Ur(e.cta.providers);return i===1?Df.value:i===2?Df.value:qh.value}(),t=function(i){return n(Me.create(i))},r=function(i){return n(bn.create(i))},u=function(){var i=Ur(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 JFe({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Fe([rE("row no-gutters g-0 mb-4")([rE("col text-center")([qFe("mb-2")({id:Oi})("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")(WFe("btn btn-link p-0 m-0 text-white")(Zt("Close"))({onClick:XV(r)(eQ.value)})($Fe("fe fe-x")("")))]),rE("row text-center")(zFe(e.cta.providers)(function(i){return rE(u)([oE("row mb-3")(oE("col-auto mx-auto")(oE("avatar avatar-xl")(VFe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),QFe("mb-2")(i.name),KFe("mb-3")(i.location),YFe("btn btn-primary btn-sm px-3 py-1")(en)({target:"_blank",href:i.linkUrl,onClick:XV(t)(new rGe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},aQ=function(e){return function(n){return ZFe(eGe(nGe(function(){return aGe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:tGe(e.cta.id),livestream_cta_url:n.value0})(),new bn(eQ.value)})))(function(){return ZV(e)})}},tQ=function(e){return function(n){return e.cta.id===n.id}},rQ=function(e){return ZV({cta:e})};var oGe=cr(oe)()(),oQ=Yn(ma),uGe=$n(Qe)()(),iGe=rt(oe),lGe=oc(),uQ=Se(Qe),cGe=Pc(oe)()(),sGe=nn(Ke),vGe=sGe(qn),fGe=Ea(Le),_Ge=gn(Le),pGe=Vs(Cr)(),dGe=te(an),iQ=q(Rn),mGe=function(){function e(){}return e.value=new e,e}(),lQ=function(){function e(){}return e.value=new e,e}(),cQ=function(e){return function(n){var a=function(i){return n(Me.create(i))},t=oGe("btn btn-primary px-4 t--register-new-tab")(en)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:oQ(a)(mGe.value)})(e.cta.buttonText),r=function(i){return n(bn.create(i))},u=uGe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Zt("Close"))({onClick:oQ(r)(lQ.value)})(iGe("fe fe-x")(""));return lGe({id:"general-cta-modal",body:Fe([uQ("row justify-content-end mt-n3")(u),cGe("mt-3")({id:Oi})(e.cta.title),uQ("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:Jh.value})}},sQ=function(e){return function(n){return vGe(fGe(_Ge(function(){return pGe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:dGe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new bn(lQ.value)})))(function(){return iQ(e)})}},vQ=function(e){return function(n){return e.cta.id===n.id}},fQ=function(e){return iQ({cta:e})};var aL=nn(Ke),pi=aL(Ve),di=qr(io),Md=q(la),_Q=rr(eo(at)),BD=ia(uo),tv=q(Rn),hGe=aL(qn),DGe=Ea(Le),gGe=aL(ra),RGe=q(Qn),tL=Se(ye),yGe=Yv(oe),bGe=no()(),wGe=Yn(ii),EGe=$n(Qe)()(),pQ=Yn(ma),IGe=rt(oe),TGe=oc(),rL=Se(Qe),SGe=Pc(oe)()(),CGe=Kt(oe),FGe=$n(oe)()(),dQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yQ=function(){function e(){}return e.value=new e,e}(),bQ=function(){function e(){}return e.value=new e,e}(),wQ=function(e){return function(n){return e.cta.id===n.id}},EQ=function(e){return function(n){var a=pi(di(n.cta.requireReferredUserLastName))(function(){return pi(di(n.referredUserLastName===""))(function(){return Md("Please enter the other person\u2019s last name")})}),t=pi(di(n.cta.requireReferredUserFirstName))(function(){return pi(di(n.referredUserFirstName===""))(function(){return Md("Please enter the other person\u2019s first name")})}),r=pi(di(_Q(AD)(n.referredUserEmail)))(function(){return Md("Please enter a valid email address")}),u=pi(di(Mt(e.user)))(function(){return pi(di(n.cta.requireAnonymousUserLastName))(function(){return pi(di(n.anonymousUserLastName===""))(function(){return Md("Please enter your last name")})})}),i=pi(di(Mt(e.user)))(function(){return pi(di(n.cta.requireAnonymousUserFirstName))(function(){return pi(di(n.anonymousUserFirstName===""))(function(){return Md("Please enter your first name")})})}),l=pi(di(Mt(e.user)))(function(){return pi(di(n.cta.requireAnonymousUserEmail))(function(){return pi(di(_Q(AD)(n.anonymousUserEmail)))(function(){return Md("Please enter a valid email address")})})});return BD(i)(BD(u)(BD(l)(BD(t)(BD(a)(r)))))}},IQ=function(e){return function(n){return function(a){if(a instanceof dQ)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 mQ)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 hQ)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 DQ)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 gQ)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 RQ)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 yQ){var t=Mt(EQ(e)(n));return t?hGe(DGe(gGe(l5({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return RGe(new bn(bQ.value))})))(function(){return tv(n)}):tv({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:!0})}throw new Error("Failed pattern match at Livestream.Ctas.Display.Referral (line 142, column 24 - line 171, column 45): "+[a.constructor.name])}}},TQ=function(e){return function(n){return function(a){var t=EQ(e)(n),r=function(E){return function(b){return function(I){return function(L){return function(N){return tL(E)([yGe("mb-2")(I),bGe("form-control "+b)({type:"text",value:L,onChange:wGe(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)(hQ.create)),i=ga(Mt(e.user))(Fe([ga(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(dQ.create)),ga(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(mQ.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(RQ.create),s=Fe([ga(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(DQ.create)),ga(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(gQ.create))]),m=function(E){return a(Me.create(E))},p=function(E){return a(bn.create(E))},g=EGe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(Zt("Close"))({onClick:pQ(p)(bQ.value)})(IGe("fe fe-x")(""));return TGe({id:"referral-cta-modal",body:Fe([rL("row justify-content-end mt-n3")(g),SGe("mt-3")({id:Oi})(n.cta.title),ha(n.cta.description)(CGe("")),tL("row")([i,u,s,l]),tL("row")([rL("col-auto my-auto")(FGe("btn btn-primary t--save")(en)({onClick:pQ(m)(yQ.value)})("Save")),rL("col my-auto text-danger")(ga(n.validationActive)(ha(t)(Xe)))])]),bodyClass:"t--cta-active",size:Df.value})}}},SQ=function(e){return tv({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var GGe=Ea(Le),MGe=q(Qn),Cf=ut(Mr(Fa)),uE=nn(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}(),AGe=function(){function e(){}return e.value=new e,e}(),CQ=function(e){return function(n){return function(a){var t=function(r){return a(Me.create(r))};if(n instanceof JD)return YV(e)(n.value0)(function(r){return t(iE.create(r))});if(n instanceof qD)return nQ(n.value0)(function(r){return t(lE.create(r))});if(n instanceof WD)return cQ(n.value0)(function(r){return t(cE.create(r))});if(n instanceof $D)return TQ(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])}}},FQ=function(e){return function(n){return function(a){var t=GGe(MGe(new bn(AGe.value)));if(n instanceof JD&&a instanceof iE){if(a.value0 instanceof Me)return Cf(function(r){return Me.create(iE.create(r))})(JD.create)(VV(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 Cf(function(r){return Me.create(lE.create(r))})(qD.create)(aQ(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 Cf(function(r){return Me.create(cE.create(r))})(WD.create)(sQ(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 Cf(function(r){return Me.create(sE.create(r))})($D.create)(IQ(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)}}},GQ=function(e){return function(n){return e instanceof JD&&n instanceof yl?QV(e.value0)(n.value0):e instanceof WD&&n instanceof bl?vQ(e.value0)(n.value0):e instanceof qD&&n instanceof wl?tQ(e.value0)(n.value0):e instanceof $D&&n instanceof El?wQ(e.value0)(n.value0):!1}},MQ=function(e){if(e instanceof yl)return Cf(function(n){return Me.create(iE.create(n))})(JD.create)(KV(e.value0));if(e instanceof wl)return Cf(function(n){return Me.create(lE.create(n))})(qD.create)(rQ(e.value0));if(e instanceof bl)return Cf(function(n){return Me.create(cE.create(n))})(WD.create)(fQ(e.value0));if(e instanceof El)return Cf(function(n){return Me.create(sE.create(n))})($D.create)(SQ(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var AQ=Yt(oe),vE=Se(ye),LGe=Io(oe),xGe=Pc(oe)()(),LQ=Bl(Iv),PGe=Yv(ye),jGe=no()(),oL=uu(Be)(ct),uL=Yn(ma),xQ=$n(oe)()(),NGe=Wp(Qe),OGe=gn(Le),UGe=zs(Cr),kGe=ni(),BGe=te(an),c0=q(Rn),HGe=Cv(ct),s0=nn(Ke)(qn),JGe=Nt($r),iL=q(Qn),qGe=Bo(Qn)(Be),WGe=er(Qn),PQ=Ea(Le),$Ge=ut(Mr(Fa)),Ad=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cL=function(){function e(){}return e.value=new e,e}(),jQ=function(){function e(){}return e.value=new e,e}(),sL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NQ=function(e){return function(n){return function(a){var t=Fe([AQ("text-center")("The host just asked a poll question!"),AQ("text-center")("To participate in live polls, please introduce yourself:"),bd({cancelButton:new T({text:"Not now",click:a(new Ad({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(sL.create(i))}),vE("small mt-3")([Id(e),vE("mt-2")([Xe("After submitting, you\u2019ll be able to answer all "),LGe("")("future"),Xe(" poll questions in this stream!")])])]),r=Fe([xGe("font-weight-bold fw-bold")({id:Oi})(n.poll.question),vE("d-flex flex-column ml-4")(LQ(function(i){return function(l){return PGe("form-check-label mb-2")([jGe("form-check-input mt-2 t--option")({checked:oL(i)(n.selected),onChange:uL(a)(new lL(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Xe(l)])}})(n.poll.options)),vE("d-flex justify-content-start mt-6")([xQ("btn btn-primary px-4 mr-3 t--submit")(en)({onClick:uL(a)(cL.value),disabled:Yu(n.selected)})("Submit answer"),xQ("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(en)({onClick:uL(a)(jQ.value)})("Do it later")])]),u=function(){if(e.user instanceof T)return"t--poll-active";if(e.user instanceof G)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 18 - line 57, column 45): "+[e.user.constructor.name])}();return NGe(u)({id:"livestream-poll-display-modal"})(function(){if(e.user instanceof T)return r;if(e.user instanceof G)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])}())}}},OQ=function(e){return function(n){return function(a){var t=function(r){return OGe(UGe("Livestream: Poll Response")(Fs(pf(e.conference))(kGe({livestream_poll_id:BGe(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 Ad)return c0(n);if(a instanceof lL&&n.poll.multiSelect)return c0({poll:n.poll,registration:n.registration,selected:function(){var r=oL(a.value0)(n.selected);return r?HGe(a.value0)(n.selected):co(a.value0)(n.selected)}()});if(a instanceof lL)return c0({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof cL&&Yu(n.selected))return c0(n);if(a instanceof cL)return s0(Za(JGe(XF(n.poll)(n.selected))(function(r){return xi(gl)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return iL(me)})})))(function(){return s0(Za(qGe(LQ(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return WGe(oL(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return s0(PQ(iL(new Ad({keepShowingPolls:!0}))))(function(){return c0(n)})})});if(a instanceof jQ)return s0(Za(XF(n.poll)([])))(function(){return s0(Za(t({skipped:!0,option:""})))(function(){return s0(PQ(iL(new Ad({keepShowingPolls:!0}))))(function(){return c0(n)})})});if(a instanceof sL)return $Ge(sL.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(wd(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])}}},UQ=function(e){return s0(Za(c5(e)))(function(){return c0({poll:e,selected:[],registration:Ed})})};var kQ=nn(Ke),zGe=kQ(ra),VGe=ee(ra),BQ=gn(Le),QGe=Bo(Qn)(Qu),KGe=zs(Cr),HQ=ni(),YGe=te(j0),XGe=te(tc),fE=te(an),Ml=q(Rn),JQ=Mr(Fa),qQ=ut(JQ),WQ=ee(qn),$Q=Bt(JQ),Ff=kQ(qn),ZGe=De(ct),Gf=q(la),zD=Ip(Le),VD=U(re),eMe=U($u),QD=ws(Be),vL=Pa(),zQ=Ui(vL(H({reflectSymbol:function(){return"poll_id"}})(on)(tn)))(Le),nMe=fu(Le),aMe=De(nr(Mh)),tMe=Ui(vL(H({reflectSymbol:function(){return"conference_id"}})(on)(tn)))(Le),fL=De(nr(ct)),_L=Ui(vL(H({reflectSymbol:function(){return"id"}})(on)(tn)))(Le),KD=function(){function e(){}return e.value=new e,e}(),Ld=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}(),xd=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}(),pL=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}(),VQ=function(e){return function(n){return function(a){if(n.stage instanceof KD)return ta;if(n.stage instanceof Ld)return NQ(e)(n.stage.value0)(function(t){return a(xd.create(t))});if(n.stage instanceof YD)return CQ(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])}}},rMe=function(e){return function(n){return e instanceof YD?GQ(e.value0)(n):!1}},oMe=function(){return function(e){return function(n){return function(a){return zGe(Qt(100))(function(){return VGe(BQ(gb(Oi)))(function(t){return QGe(t)(function(r){return BQ(function(){var i=MG(WC(r))(),l=LO({x:i.left+1,y:i.top+1})(),s=FG(WC(l))();return KGe(n)(Fs(HQ(a))(Fs(pf(e.conference))(HQ({livestream_popup_visible:YGe(s===Oi)}))))()})})})})}}}},QQ=oMe(),uMe=function(e){var n=function(){return QQ(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof yl)return a({livestream_cta_target_conference_id:XGe(t.value0.conferenceId)});if(t instanceof wl)return a({livestream_cta_id:fE(t.value0.id)});if(t instanceof bl)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof El)return a({livestream_cta_id:fE(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 150, column 29 - line 167, column 8): "+[t.constructor.name])}},KQ=function(e){return function(n){return function(a){if(a instanceof xd&&a.value0 instanceof Ad)return Ml({stage:KD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof xd)return Ml(n);if(a instanceof _E){if(a.value0 instanceof bn)return Ml({showPolls:n.showPolls,stage:KD.value});var u=function(s){return Ml(n)};return a.value0 instanceof Me&&n.stage instanceof YD?qQ(_E.create)(function(s){return{showPolls:n.showPolls,stage:new YD(s)}})(FQ(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof pE&&n.showPolls)return WQ($Q(xd.create)(UQ(a.value0)))(function(p){return Ff(Za(QQ(e)("Livestream: Poll Popup Shown")({livestream_poll_id:fE(a.value0.id)})))(function(){return Ml({showPolls:n.showPolls,stage:new Ld(p)})})});if(a instanceof pE)return Ml(n);var s=function(p){if(a instanceof pL||a instanceof Pd&&rMe(n.stage)(a.value0))return Ml(n);if(a instanceof Pd)return Ff(Za(uMe(e)(a.value0)))(function(){return WQ($Q(_E.create)(MQ(a.value0)))(function(g){return Ml({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 pL){if(n.stage instanceof Ld){var m=n.stage.value0.poll.id===a.value0.pollId;return m?Ml({showPolls:n.showPolls,stage:KD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof pE){if(n.stage instanceof Ld){var i=n.stage.value0.poll.id===a.value0.id;return i?Ml(n):u(!0)}return u(!0)}return u(!0)};return a instanceof xd&&n.stage instanceof Ld?qQ(xd.create)(function(r){return{showPolls:n.showPolls,stage:new Ld(r)}})(OQ(e)(n.stage.value0)(a.value0)):t(!0)}}},YQ=function(e){var n=function(u){return u instanceof El?Gf(u.value0.id):G.value},a=function(u){return u instanceof wl?Gf(u.value0.id):G.value},t=function(u){return u instanceof bl?Gf(u.value0.id):G.value},r=function(u){return u instanceof yl?Gf(u.value0.conferenceId):G.value};return Ff(zD(function(u){return VD(eMe(pE.create)(function(i){return i.poll}))(QD(function(){var i=ZGe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(zQ(e.pusher.dataChannel)("show-poll")))(function(){return Ff(nMe(function(u){return new pL({pollId:u.poll_id})})(zQ(e.pusher.dataChannel)("hide-poll")))(function(){return Ff(zD(function(u){return VD(Pd.create)(QD(function(){var i=aMe(Gf(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(tMe(e.pusher.dataChannel)("show-event-cta")))(function(){return Ff(zD(function(u){return VD(Pd.create)(QD(function(){var i=fL(Gf(u.id));return function(l){return i(t(l))}}())(e.ctas))})(_L(e.pusher.dataChannel)("show-general-cta")))(function(){return Ff(zD(function(u){return VD(Pd.create)(QD(function(){var i=fL(Gf(u.id));return function(l){return i(a(l))}}())(e.ctas))})(_L(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return Ff(zD(function(u){return VD(Pd.create)(QD(function(){var i=fL(Gf(u.id));return function(l){return i(n(l))}}())(e.ctas))})(_L(e.pusher.dataChannel)("show-referral-cta")))(function(){return Ml({stage:KD.value,showPolls:!0})})})})})})})};var iMe=uc(),dL=Se(ye),lMe=Yt(Qe),cMe=za(ye),sMe=rt(oe),XQ=fi(),ZQ=Yt(oe),vMe=Kt(oe),dE=$n(oe)()(),fMe=nn(Ke),mL=Yn(ma),eK=fMe(qn),_Me=wW(),hL=q(Rn),nK=ee(Ve),pMe=mv(Qj),dMe=ui(pS),mMe=De(wb),hMe=De(pc),DMe=zl()(),aK=function(){function e(){}return e.value=new e,e}(),DL=function(){function e(){}return e.value=new e,e}(),tK=function(){function e(){}return e.value=new e,e}(),gL=function(){function e(){}return e.value=new e,e}(),RL=function(){function e(){}return e.value=new e,e}(),mE=function(e){return function(n){return iMe({id:"network-settings-modal",onDismiss:n(new bn(RL.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof aK)return dL("text-center")([ga(e.confirmConferenceRegistration)(lMe("mb-4")(cMe("badge badge-soft-primary bg-primary-soft")([sMe("fe fe-check mr-1")(""),Xe("You\u2019re registered!")]))),XQ("my-4")({alt:vi.value,height:"76",src:"/img/network/counselor.svg",width:"91"}),ZQ("")("Connect with colleges when you attend or register for their livestreams?"),vMe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),dL("mx-md-6 mt-4")([dE("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(en)({onClick:wr(function(a){return function(){return n(new Me(tK.value))(),n(new Me(gL.value))()}})})("Yes, always connect"),dE("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(en)({onClick:mL(n)(new Me(gL.value))})("Only connect with "+e.school.name),dE("btn btn-link mt-3")(en)({onClick:mL(n)(new bn(RL.value))})("Close")])]);if(e.modalView instanceof DL)return dL("text-center")([XQ("mt-4")({alt:vi.value,height:"42",src:"/img/livestreams/network-settings-modal/connection-sent.png",width:"42"}),ZQ("")("Connection request sent!"),dE("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(en)({onClick:mL(n)(new bn(RL.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 75, column 13 - line 120, column 12): "+[e.modalView.constructor.name])}()})}},hE=function(e){return function(n){if(n instanceof Me){if(n.value0 instanceof tK)return eK(Za(_Me({publishScope:Ni.value,publishContext:KM.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return hL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:DL.value})});if(n.value0 instanceof gL)return eK(Za($9(e.school.id)(e.conference.id)))(function(){return hL({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:DL.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 hL(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=je(!1)(nK(e.dismissedNetworkSettingsModalAt)(function(r){return new T(pMe(dMe(Rb(me))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,mMe(r.publishScope)(Ni.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return je(!1)(nK(e.profile)(function(r){return new T(zT(hMe(!0))(t(r)))}))}},gE=function(e){return DMe(e)({modalView:aK.value})};var XD=function(){function e(){}return e.value=new e,e}(),jd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),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 rK=nn(Ke),oK=rK(qn),yL=Ea(Le),gMe=rK(ra),bL=q(Qn),yE=q(Rn),uK=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof XD&&t instanceof ZD?oK(yL(gMe(Qt(a.delay))(function(){return bL(e(RE.value))})))(function(){return yE(n({delay:a.delay,throttleState:new jd(t.value0)}))}):a.throttleState instanceof jd&&t instanceof ZD?yE(n({delay:a.delay,throttleState:new jd(t.value0)})):a.throttleState instanceof jd&&t instanceof RE?oK(yL(bL(a.throttleState.value0)))(function(){return yE(n({delay:a.delay,throttleState:XD.value}))}):yE(n(a))}}}},iK=function(e){return function(n){return yL(bL(e(new ZD(n))))}},lK=function(e){return{throttleState:XD.value,delay:e}};var bE=Se(oe),wE=Se(ye),RMe=Yt(oe),rv=te(an),yMe=kr(vr),cK=Se(Qe),bMe=Xt(oe)()(),wMe=Io(oe),EMe=za(oe),IMe=Ns(Qe),TMe=jy(ye)()(),sK=jc(na),EE=$n(oe)()(),wL=Yn(ma),vK=uu(Be)(ct),fK=Ns(ye),IE=Ql(oe),SMe=Ql(Qe),CMe=Ql(ye),FMe=Kv(ye),GMe=zv(ye),Nd=Vv(oe),MMe=Qv(ye),TE=fe(ze),AMe=Ho(na),eg=nn(Ke)(qn),EL=Ea(Le),LMe=Nt($r),_K=q(Qn),Mf=q(Rn),IL=U(Fa),xMe=De(sU),pK=_u(na)(Be),PMe=Ye(Lt),jMe=Em(na),NMe=Cv(ct),OMe=fu(Le),UMe=aw(Le),SE=function(){function e(){}return e.value=new e,e}(),dK=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}(),hK=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}(),DK=function(){function e(){}return e.value=new e,e}(),gK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RK=function(){function e(){}return e.value=new e,e}(),SL=function(){function e(){}return e.value=new e,e}(),yK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bK=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 dK)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")([RMe("")("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(Oe)return rv(yMe(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),cK("col-4")(cK("progress")(bMe("progress-bar")({style:vt({width:I})})(""))),wE("col-1")([wMe("")(rv(b)),EMe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return IMe("t--poll-responses-"+rv(s.id))(TMe("py-0")({colSpan:6})(TR(g)(s.options)(p.optionCounts)))}}},i=function(s){var m=je(s.status)(sK(s.poll.id)(n.statuses)),p=EE("btn btn-white btn-sm px-4 t--open")(en)({onClick:wL(a)(new mK(s.poll))})("Launch poll");if(m instanceof Js)return p;if(m instanceof $c)return Fe([EE("btn btn-success btn-sm px-4 mr-3")(en)({disabled:!0})("Poll LIVE"),EE("btn btn-danger btn-sm px-4 t--close")(en)({onClick:wL(a)(new hK(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=vK(s.poll.id)(n.expandedResponses),p=sK(s.poll.id)(n.responses),g=In(0)(function(I){return I.answered})(p),E=In(0)(function(I){return I.seen})(p),b=In(0)(function(I){return I.skipped})(p);return Fe([fK("t--poll t--poll-"+rv(s.poll.id))([IE("pt-3")(function(){var I=Pt(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""}()+s.poll.question),SMe("text-nowrap")(i(s)),IE("t--shown")(rv(E)),CMe("t--answers")([Xe(rv(g)),EE("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return m?"up":"down t--expand-responses"}()))(Zt(function(){return m?"Collapse responses":"Expand responses"}()))({onClick:wL(a)(new gK(s.poll.id))})("")]),IE("t--skipped")(rv(b)),IE("t--pending")(rv((E-g|0)-b|0))]),ga(m)(ha(p)(u(s.poll)(g)))])};return Fe([r,wE("t--polls position-relative")([ha(n.error)(function(s){return bE("alert alert-danger")(s)}),FMe("table table-sm mb-0")([GMe("")([fK("")([Nd("")("Question"),Nd("")("Actions"),Nd("")("# saw poll"),Nd("")("# answered"),Nd("")("# skipped"),Nd("")("# not responded")])]),MMe("")(TE(AMe(function(s){return-function(m){return m.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},wK=function(e){return function(n){var a=function(t){return eg(EL(LMe(t)(function(r){return _K(DK.value)})))(function(){return Mf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:dK.value,error:G.value})})};return function(t){if(t instanceof mK)return a(IL(TL.create)(YF(t.value0)($c.value)));if(t instanceof hK)return a(IL(TL.create)(YF(t.value0)(qs.value)));if(t instanceof TL){var r=TE(wo(function(){var u=xMe($c.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return Mf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:pK(TE(t.value0)(function(u){return new cn(u.pollId,u.status)})),expandedResponses:PMe(n.expandedResponses)(jMe(r)),stage:SE.value})}if(t instanceof DK)return Mf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:SE.value,error:new T("That didn't work for some reason, try again")});if(t instanceof gK)return Mf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=vK(t.value0)(n.expandedResponses);return u?NMe(t.value0)(n.expandedResponses):co(t.value0)(n.expandedResponses)}()});if(t instanceof RK)return eg(iK(CL.create)(SL.value))(function(){return Mf(n)});if(t instanceof SL)return eg(EL(IL(yK.create)(g5(e.conference.id))))(function(){return Mf(n)});if(t instanceof yK)return Mf({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:pK(TE(t.value0)(function(u){return new cn(u.pollId,u.responses)}))});if(t instanceof CL)return uK(CL.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])}}},EK=function(e){return eg(OMe(ln(RK.value))(UMe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return eg(EL(_K(SL.value)))(function(){return Mf({statuses:Li,responses:Li,expandedResponses:[],responseThrottle:lK(500),stage:SE.value,error:G.value})})})};var IK=fi(),TK=Se(ye),SK=Yt(oe),CK=ao(oe),FK=function(){return IK("img-fluid mb-6")({alt:new kh("CollegeVine"),src:"/img/cv-logo-lilac-on-dark.svg",style:vt({width:"5em"})})}(),CE=function(e){return TK(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("")([SK("text-center")(e)])},FL=CE("t--splashscreen-intro")([Se(Qe)("text-center mt-7")(CK("")("The recording will load in a moment.")),FK]),FE=function(){return CE("px-4 px-md-6 t--splashscreen-intro")([IK("img-fluid")({alt:vi.value,src:"/img/illustrations/livestreams/2022-02-intro.svg"})])}(),GK=CE("t--splashscreen-complete")([TK("text-center mt-7")([CK("")("The event is now over."),SK("")("Thank you for attending!"),dl(oe)("")("A recording will be available to watch shortly.")]),FK]);var GE=e=>e.play();var Af=Wu(MK());$a();var AK=e=>{let[n,a]=Ga.useState(),[t,r]=Ga.useState(),u=Ga.useRef();return u.current=e,Ot(()=>{if(!t)return Af.default.isSupported()?a(kMe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},kMe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new Af.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(Af.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case Af.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(Af.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(Af.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(Af.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 BMe=xc();var LK=function(){return function(){return BMe(AK)}};$a();var lc={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var og=Wu(kK()),BK=4,DAe=({trackColor:e,background:n})=>({props:a,children:t})=>Ga.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${BK}px`,borderRadius:`${BK*2}px`,background:n||e})}),...t),gAe=({horizontal:e})=>({props:n,isDragged:a})=>Ga.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Ga.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?lc.SECONDARY:lc.WHITE,stroke:lc.SECONDARY}),Ga.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Ga.createElement("path",{stroke:a?lc.WHITE:lc.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),HK=e=>Ga.createElement("div",{"aria-label":e.ariaLabel},Ga.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:DAe({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:gAe({horizontal:!0})}));var RAe=xc(),JK={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return Z0}};var qK=function(e){return function(){return function(){return RAe(HK)}}};var yAe=Xt(Qe)()(),bAe=qK(JK)()(),wAe=Yn(ii),EAe=$n(Qe)()(),IAe=Yn(ma),WK=Se(ye),TAe=za(oe),xE=Ea(Le),LL=q(Qn),$K=nn(Ke),SAe=nt(lp),os=q(Rn),CAe=Wv(Le),xL=gn(Le),FAe=U(re),GAe=Ac(op),MAe=$K(ra),Lf=$K(qn),AAe=er(Rn),LAe=ee(ra),xAe=Dc(oi),PAe=er(_t),PL=function(){function e(){}return e.value=new e,e}(),jL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),VK=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}(),jAe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KK=function(e){return function(n){if(e.videoState instanceof G)return ta;if(e.videoState instanceof T){var a=yAe("")({style:vt({minWidth:"6rem",width:"6rem"})})(bAe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:wAe(n)(function(i){return Me.create(jL.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if(Oe)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=EAe("btn large px-3 py-1 mr-3 text-white fe "+t)(Zt("Mute the video"))({onClick:IAe(n)(new Me(PL.value))})(ta),u=WK("d-flex align-items-center text-white px-3")([Xe("LIVE"),TAe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return WK("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])}},YK=function(e){return Me.create(NL.create(e))},XK=function(e){return xE(LL(new bn(new jAe(function(n){return function(){return e(n)(),new Me(new NL(n))}}))))},PE=function(){return new Me(new OL(!0))}(),ZK=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:SAe}},eY=2e3,nY=function(e){return function(n){if(n instanceof bn)return os(e);if(n instanceof Me){var a=CAe(xL(function(){var i=si();return FAe(function(l){return Me.create(VK.create(l))})(GAe(eY)(i))})),t=MAe(Qt(eY))(function(){return LL(new Me(QK.value))}),r=function(u){if(n.value0 instanceof PL)return os(e);var i=function(l){if(n.value0 instanceof jL)return os(e);if(n.value0 instanceof NL)return Lf(xE(xL(function(){var m=QC(n.value0.value0)(),p=zC(n.value0.value0)();return new Me(new zK({muted:m,volume:p}))})))(function(){return os(e)});if(n.value0 instanceof zK)return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof OL)return Lf(AAe(n.value0.value0)(a))(function(){return Lf(xE(t))(function(){return os({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof VK)return os({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof QK)return Lf(xE(LAe(xL(si))(function(s){var m=xAe(s)(e.visibilityExpiration);return m?LL(new Me(new OL(!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 jL&&e.videoState instanceof T?Lf(a)(function(){return Lf(XK(function(l){return function(){return PAe(n.value0.value0>0)(M_(!1)(l))(),VC(n.value0.value0)(l)()}}))(function(){return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof PL&&e.videoState instanceof T?Lf(a)(function(){return Lf(XK(M_(!e.videoState.value0.muted)))(function(){return os({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):r(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[e.constructor.name,n.constructor.name])}},aY=function(e){if(e instanceof T)return!1;if(e instanceof G)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var tY=e=>n=>a=>()=>e.then(a,n),rY=e=>e instanceof Error,oY=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var NAe=q(tl(ar)),OAe=X0(ar),UAe=vn(pn),uY=ia(BR(WR)(ar)),kAe=Ss(ar),BAe=U(Fm(yc)),HAe=Um(ar),JAe=rR(Bn),qAe=Va(FN);var WAe=function(e){var n=function(a){if(rY(a))return NAe(a);if(Oe)return OAe(new Nm(""));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: "+oY(e))})(UAe)(Np(uY(n(e))(uY(kAe("Error")(e))(BAe(Iu)(HAe(e))))))},jE=function(e){return kv(function(n){return JAe(qAe)(tY(e)(function(a){return n(Ie.create(WAe(a)))()})(function(a){return n(Te.create(a))()}))})};var $Ae=ee(Ve),zAe=Se(Qe),ug=ee(fr),UL=bs(_t)(Qu),f0=Yn(ma),iY=Rp(oe)()(),VAe=LK()(),QAe=q(_t),lY=Yn(ii),cY=Xt(Qe)()(),KAe=$n(ye)()(),YAe=rt(oe),XAe=Se(ye),sY=nn(Ke),ZAe=Vs(Le)(),eLe=wu(Be)(at),nLe=De(nr(ct)),Od=sY(ra),aLe=fc(Qn),tLe=Rr(_p),ho=q(Qn),vY=gn(Le),fY=Nt($r),_Y=tm(ra),ro=q(Rn),Do=sY(qn),Bu=Ea(Le),pY=U(Fa),dY=Wv(Le),mY=U(Bn),rLe=ut(Mr(Fa)),oLe=U(re),uLe=fe(re),hY=Ye(zj),DY=function(){function e(){}return e.value=new e,e}(),gY=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}(),RY=function(){function e(){}return e.value=new e,e}(),Ud=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yY=function(){function e(){}return e.value=new e,e}(),bY=function(){function e(){}return e.value=new e,e}(),wY=function(){function e(){}return e.value=new e,e}(),kL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BL=function(){function e(){}return e.value=new e,e}(),NE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EY=function(){function e(){}return e.value=new e,e}(),HL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JL=function(){function e(){}return e.value=new e,e}(),IY=function(){function e(){}return e.value=new e,e}(),TY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_0=function(){function e(){}return e.value=new e,e}(),us=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lg=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WL=function(e){var n=e.Monad0(),a=ee(n.Bind1()),t=gn(e),r=q(n.Applicative0());return function(u){return function(i){return function(l){return a(t(gb(u.videoId)))(function(s){return In(r(i.whenNotFound))(l)($Ae(s)(SO))})}}}},SY=WL(Cr),$L=WL(Le),CY=function(e){var n=WL(e);return function(a){return n(a)({whenNotFound:me})}},iLe=CY(Cr),lLe=CY(Le),BE=function(e){return function(n){return function(a){var t=function(){var I=zAe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof RY)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof yY)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 Ud)return ta;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 242, column 20 - line 253, column 16): "+[n.stage.constructor.name])}(),r=function(){return n.stage instanceof ig?n.stage.value0.reset:!1}(),u=wr(function(I){return ug(Db(I))(UL(function(L){return a(new Me(new qL({time:L})))}))}),i=wr(function(I){return ug(Db(I))(UL(function(L){return a(new Me(new kE({playing:!0,time:L})))}))}),l=function(I){return a(bn.create(I))},s=wr(function(I){return ug(Db(I))(UL(function(L){return l(new HL(L))}))}),m=f0(l)(EY.value),p=Fe([iY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s})(""),ga(!r)(VAe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(bY.value),onError:function(I,L){return me},onCriticalFail:lY(l)(function(I){var L=I==="networkError";return L?BL.value:new NE("HLS player crashed")}),onReady:l(new OE({autoPlay:e.autoPlay})),onInitialPts:lY(l)(function(I){return new TY(I.initPTS)})}))]),g=function(){return n.stage instanceof Ud&&n.stage.value0.unmuteOverlay?cY("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:vt({pointerEvents:"none"})})(KAe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(en)({onClick:f0(l)(IY.value),style:vt({pointerEvents:"all"})})([Xe("click for sound"),YAe("fe fe-volume-2 ml-2")("")])):ta}(),E=function(I){return cY("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:f0(l)(new us(PE)),onMouseDown:f0(l)(new us(PE)),onTouchStart:f0(l)(new us(PE))})(KK(I)(function(L){return l(us.create(L))}))},b=iY("w-100 t--real-video")({id:n.videoId,controls:Mt(n.customControls),playsInline:!0,onVolumeChange:m,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:f0(l)(new OE({autoPlay:e.autoPlay})),onError:f0(l)(BL.value),src:function(){return r?"":e.watchUrl}()})("");return XAe("position-relative w-100")([function(){if(n.support instanceof DY)return p;if(n.support instanceof gY)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 163, column 7 - line 165, column 40): "+[n.support.constructor.name])}(),ha(n.customControls)(E),ga(n.allowSound)(g),t])}}},cLe=function(e){var n=gn(e.MonadEffect0());return function(a){return n(function(){return iLe(a)(M_(!1))(),JL.value})}},sLe=cLe(UO),zL=function(e){return ZAe("Livestream: Error")({livestream_error_message:e})},FY=function(e){return SY(e)({whenNotFound:!1})($C)},vLe=function(e){return gn(e)(function(){var a=ug(ug(pu)(ZC))(XC)();return eLe(function(t){return nLe($y(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},GY=vLe(Le),fLe=function(e){var n=function(t){return Od(aLe(e.allowSound)(tLe(Iu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return Od(jE(GE(t)))(function(){return ho(new UE({unmuteOverlay:!1}))})})},a=function(t){return Od(vY(M_(!0)(t)))(function(){return Od(jE(GE(t)))(function(){return ho(new UE({unmuteOverlay:!0}))})})};return $L(e)({whenNotFound:new NE("