You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Commo...

162 lines
1.2 MiB

!(function(){var nc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[2303],{95869:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return O}});var V=K(14809),me=K(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},he=Se,W=K(7657),m=function(q,D){return me.createElement(W.Z,(0,V.Z)({},q,{ref:D,icon:he}))},ge=me.forwardRef(m),O=ge},65966:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return Ut}});var V=K(20439),me=K(50298),Se=K(62646),he=K(43403),W=K(92310),m=K.n(W),ge=K(29301),O=K(76846),u=K(96452),q=K(6089),D=K(80402),y=K(34280),_=K(49658),C=K(59301),x=K(14809),j=K(77900),M=K(8654);function H(Be){var L=Be.prefixCls,p=Be.align,b=Be.arrow,N=Be.arrowPos,S=b||{},k=S.className,te=S.content,Fe=N.x,ke=Fe===void 0?0:Fe,Ge=N.y,ze=Ge===void 0?0:Ge,Ft=C.useRef();if(!p||!p.points)return null;var Je={position:"absolute"};if(p.autoArrow!==!1){var ut=p.points[0],st=p.points[1],Xe=ut[0],Ve=ut[1],Ze=st[0],ct=st[1];Xe===Ze||!["t","b"].includes(Xe)?Je.top=ze:Xe==="t"?Je.top=0:Je.bottom=0,Ve===ct||!["l","r"].includes(Ve)?Je.left=ke:Ve==="l"?Je.left=0:Je.right=0}return C.createElement("div",{ref:Ft,className:m()("".concat(L,"-arrow"),k),style:Je},te)}function R(Be){var L=Be.prefixCls,p=Be.open,b=Be.zIndex,N=Be.mask,S=Be.motion;return N?C.createElement(j.default,(0,x.Z)({},S,{motionAppear:!0,visible:p,removeOnLeave:!0}),function(k){var te=k.className;return C.createElement("div",{style:{zIndex:b},className:m()("".concat(L,"-mask"),te)})}):null}var P=C.memo(function(Be){var L=Be.children;return L},function(Be,L){return L.cache}),X=P,fe=C.forwardRef(function(Be,L){var p=Be.popup,b=Be.className,N=Be.prefixCls,S=Be.style,k=Be.target,te=Be.onVisibleChanged,Fe=Be.open,ke=Be.keepDom,Ge=Be.fresh,ze=Be.onClick,Ft=Be.mask,Je=Be.arrow,ut=Be.arrowPos,st=Be.align,Xe=Be.motion,Ve=Be.maskMotion,Ze=Be.forceRender,ct=Be.getPopupContainer,yt=Be.autoDestroy,Nt=Be.portal,bt=Be.zIndex,Wt=Be.onMouseEnter,Ht=Be.onMouseLeave,qt=Be.onPointerEnter,fr=Be.onPointerDownCapture,Ur=Be.ready,St=Be.offsetX,er=Be.offsetY,Ue=Be.offsetR,be=Be.offsetB,Ee=Be.onAlign,Y=Be.onPrepare,ee=Be.stretch,oe=Be.targetWidth,pe=Be.targetHeight,Ce=typeof p=="function"?p():p,ft=Fe||ke,Et=(ct==null?void 0:ct.length)>0,dt=C.useState(!ct||!Et),Zt=(0,me.Z)(dt,2),_r=Zt[0],Mr=Zt[1];if((0,y.Z)(function(){!_r&&Et&&k&&Mr(!0)},[_r,Et,k]),!_r)return null;var $t="auto",Kt={left:"-1000vw",top:"-1000vh",right:$t,bottom:$t};if(Ur||!Fe){var Tr,Zr=st.points,Re=st.dynamicInset||((Tr=st._experimental)===null||Tr===void 0?void 0:Tr.dynamicInset),Ir=Re&&Zr[0][1]==="r",Er=Re&&Zr[0][0]==="b";Ir?(Kt.right=Ue,Kt.left=$t):(Kt.left=St,Kt.right=$t),Er?(Kt.bottom=be,Kt.top=$t):(Kt.top=er,Kt.bottom=$t)}var vr={};return ee&&(ee.includes("height")&&pe?vr.height=pe:ee.includes("minHeight")&&pe&&(vr.minHeight=pe),ee.includes("width")&&oe?vr.width=oe:ee.includes("minWidth")&&oe&&(vr.minWidth=oe)),Fe||(vr.pointerEvents="none"),C.createElement(Nt,{open:Ze||ft,getContainer:ct&&function(){return ct(k)},autoDestroy:yt},C.createElement(R,{prefixCls:N,open:Fe,zIndex:bt,mask:Ft,motion:Ve}),C.createElement(ge.Z,{onResize:Ee,disabled:!Fe},function(_n){return C.createElement(j.default,(0,x.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ze,leavedClassName:"".concat(N,"-hidden")},Xe,{onAppearPrepare:Y,onEnterPrepare:Y,visible:Fe,onVisibleChanged:function(vn){var zr;Xe==null||(zr=Xe.onVisibleChanged)===null||zr===void 0||zr.call(Xe,vn),te(vn)}}),function(Or,vn){var zr=Or.className,Fn=Or.style,hn=m()(N,zr,b);return C.createElement("div",{ref:(0,M.sQ)(_n,L,vn),className:hn,style:(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({"--arrow-x":"".concat(ut.x||0,"px"),"--arrow-y":"".concat(ut.y||0,"px")},Kt),vr),Fn),{},{boxSizing:"border-box",zIndex:bt},S),onMouseEnter:Wt,onMouseLeave:Ht,onPointerEnter:qt,onClick:ze,onPointerDownCapture:fr},Je&&C.createElement(H,{prefixCls:N,arrow:Je,arrowPos:ut,align:st}),C.createElement(X,{cache:!Fe&&!Ge},Ce))})}))}),_e=fe,we=C.forwardRef(function(Be,L){var p=Be.children,b=Be.getTriggerDOMNode,N=(0,M.Yr)(p),S=C.useCallback(function(te){(0,M.mH)(L,b?b(te):te)},[b]),k=(0,M.x1)(S,(0,M.C4)(p));return N?C.cloneElement(p,{ref:k}):p}),ie=we,ye=C.createContext(null),Pe=ye;function ue(Be){return Be?Array.isArray(Be)?Be:[Be]:[]}function Me(Be,L,p,b){return C.useMemo(function(){var N=ue(p!=null?p:L),S=ue(b!=null?b:L),k=new Set(N),te=new Set(S);return Be&&(k.has("hover")&&(k.delete("hover"),k.add("click")),te.has("hover")&&(te.delete("hover"),te.add("click"))),[k,te]},[Be,L,p,b])}var Z=K(29194);function I(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],p=arguments.length>2?arguments[2]:void 0;return p?Be[0]===L[0]:Be[0]===L[0]&&Be[1]===L[1]}function G(Be,L,p,b){for(var N=p.points,S=Object.keys(Be),k=0;k<S.length;k+=1){var te,Fe=S[k];if(I((te=Be[Fe])===null||te===void 0?void 0:te.points,N,b))return"".concat(L,"-placement-").concat(Fe)}return""}function z(Be,L,p,b){return L||(p?{motionName:"".concat(Be,"-").concat(p)}:b?{motionName:b}:null)}function se(Be){return Be.ownerDocument.defaultView}function re(Be){for(var L=[],p=Be==null?void 0:Be.parentElement,b=["hidden","scroll","clip","auto"];p;){var N=se(p).getComputedStyle(p),S=N.overflowX,k=N.overflowY,te=N.overflow;[S,k,te].some(function(Fe){return b.includes(Fe)})&&L.push(p),p=p.parentElement}return L}function w(Be){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Be)?L:Be}function B(Be){return w(parseFloat(Be),0)}function $(Be,L){var p=(0,V.Z)({},Be);return(L||[]).forEach(function(b){if(!(b instanceof HTMLBodyElement||b instanceof HTMLHtmlElement)){var N=se(b).getComputedStyle(b),S=N.overflow,k=N.overflowClipMargin,te=N.borderTopWidth,Fe=N.borderBottomWidth,ke=N.borderLeftWidth,Ge=N.borderRightWidth,ze=b.getBoundingClientRect(),Ft=b.offsetHeight,Je=b.clientHeight,ut=b.offsetWidth,st=b.clientWidth,Xe=B(te),Ve=B(Fe),Ze=B(ke),ct=B(Ge),yt=w(Math.round(ze.width/ut*1e3)/1e3),Nt=w(Math.round(ze.height/Ft*1e3)/1e3),bt=(ut-st-Ze-ct)*yt,Wt=(Ft-Je-Xe-Ve)*Nt,Ht=Xe*Nt,qt=Ve*Nt,fr=Ze*yt,Ur=ct*yt,St=0,er=0;if(S==="clip"){var Ue=B(k);St=Ue*yt,er=Ue*Nt}var be=ze.x+fr-St,Ee=ze.y+Ht-er,Y=be+ze.width+2*St-fr-Ur-bt,ee=Ee+ze.height+2*er-Ht-qt-Wt;p.left=Math.max(p.left,be),p.top=Math.max(p.top,Ee),p.right=Math.min(p.right,Y),p.bottom=Math.min(p.bottom,ee)}}),p}function ae(Be){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,p="".concat(L),b=p.match(/^(.*)\%$/);return b?Be*(parseFloat(b[1])/100):parseFloat(p)}function $e(Be,L){var p=L||[],b=(0,me.Z)(p,2),N=b[0],S=b[1];return[ae(Be.width,N),ae(Be.height,S)]}function qe(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Be[0],Be[1]]}function Bt(Be,L){var p=L[0],b=L[1],N,S;return p==="t"?S=Be.y:p==="b"?S=Be.y+Be.height:S=Be.y+Be.height/2,b==="l"?N=Be.x:b==="r"?N=Be.x+Be.width:N=Be.x+Be.width/2,{x:N,y:S}}function pt(Be,L){var p={t:"b",b:"t",l:"r",r:"l"};return Be.map(function(b,N){return N===L?p[b]||"c":b}).join("")}function Qt(Be,L,p,b,N,S,k){var te=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:N[b]||{}}),Fe=(0,me.Z)(te,2),ke=Fe[0],Ge=Fe[1],ze=C.useRef(0),Ft=C.useMemo(function(){return L?re(L):[]},[L]),Je=C.useRef({}),ut=function(){Je.current={}};Be||ut();var st=(0,q.Z)(function(){if(L&&p&&Be){let bn=function(An,Mn){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gr,gi=ft.x+An,pi=ft.y+Mn,qn=gi+Er,ei=pi+Ir,Ot=Math.max(gi,Yn.left),Sr=Math.max(pi,Yn.top),an=Math.min(qn,Yn.right),gn=Math.min(ei,Yn.bottom);return Math.max(0,(an-Ot)*(gn-Sr))},Cr=function(){Xt=ft.y+Ie,sr=Xt+Ir,nr=ft.x+le,Gt=nr+Er};var Ze,ct,yt,Nt,bt=L,Wt=bt.ownerDocument,Ht=se(bt),qt=Ht.getComputedStyle(bt),fr=qt.position,Ur=bt.style.left,St=bt.style.top,er=bt.style.right,Ue=bt.style.bottom,be=bt.style.overflow,Ee=(0,V.Z)((0,V.Z)({},N[b]),S),Y=Wt.createElement("div");(Ze=bt.parentElement)===null||Ze===void 0||Ze.appendChild(Y),Y.style.left="".concat(bt.offsetLeft,"px"),Y.style.top="".concat(bt.offsetTop,"px"),Y.style.position=fr,Y.style.height="".concat(bt.offsetHeight,"px"),Y.style.width="".concat(bt.offsetWidth,"px"),bt.style.left="0",bt.style.top="0",bt.style.right="auto",bt.style.bottom="auto",bt.style.overflow="hidden";var ee;if(Array.isArray(p))ee={x:p[0],y:p[1],width:0,height:0};else{var oe,pe,Ce=p.getBoundingClientRect();Ce.x=(oe=Ce.x)!==null&&oe!==void 0?oe:Ce.left,Ce.y=(pe=Ce.y)!==null&&pe!==void 0?pe:Ce.top,ee={x:Ce.x,y:Ce.y,width:Ce.width,height:Ce.height}}var ft=bt.getBoundingClientRect(),Et=Ht.getComputedStyle(bt),dt=Et.height,Zt=Et.width;ft.x=(ct=ft.x)!==null&&ct!==void 0?ct:ft.left,ft.y=(yt=ft.y)!==null&&yt!==void 0?yt:ft.top;var _r=Wt.documentElement,Mr=_r.clientWidth,$t=_r.clientHeight,Kt=_r.scrollWidth,Tr=_r.scrollHeight,Zr=_r.scrollTop,Re=_r.scrollLeft,Ir=ft.height,Er=ft.width,vr=ee.height,_n=ee.width,Or={left:0,top:0,right:Mr,bottom:$t},vn={left:-Re,top:-Zr,right:Kt-Re,bottom:Tr-Zr},zr=Ee.htmlRegion,Fn="visible",hn="visibleFirst";zr!=="scroll"&&zr!==hn&&(zr=Fn);var yn=zr===hn,Kn=$(vn,Ft),Hr=$(Or,Ft),Gr=zr===Fn?Hr:Kn,Xr=yn?Hr:Gr;bt.style.left="auto",bt.style.top="auto",bt.style.right="0",bt.style.bottom="0";var Kr=bt.getBoundingClientRect();bt.style.left=Ur,bt.style.top=St,bt.style.right=er,bt.style.bottom=Ue,bt.style.overflow=be,(Nt=bt.parentElement)===null||Nt===void 0||Nt.removeChild(Y);var ln=w(Math.round(Er/parseFloat(Zt)*1e3)/1e3),dn=w(Math.round(Ir/parseFloat(dt)*1e3)/1e3);if(ln===0||dn===0||(0,O.Sh)(p)&&!(0,Z.Z)(p))return;var Cn=Ee.offset,cr=Ee.targetOffset,yr=$e(ft,Cn),Qe=(0,me.Z)(yr,2),Ye=Qe[0],_t=Qe[1],at=$e(ee,cr),wt=(0,me.Z)(at,2),At=wt[0],ot=wt[1];ee.x-=At,ee.y-=ot;var Dt=Ee.points||[],zt=(0,me.Z)(Dt,2),ar=zt[0],Lr=zt[1],lr=qe(Lr),wr=qe(ar),U=Bt(ee,lr),Q=Bt(ft,wr),ne=(0,V.Z)({},Ee),le=U.x-Q.x+Ye,Ie=U.y-Q.y+_t,Ke=bn(le,Ie),et=bn(le,Ie,Hr),tt=Bt(ee,["t","l"]),Tt=Bt(ft,["t","l"]),lt=Bt(ee,["b","r"]),ve=Bt(ft,["b","r"]),rt=Ee.overflow||{},mt=rt.adjustX,Rt=rt.adjustY,Yt=rt.shiftX,It=rt.shiftY,kt=function(Mn){return typeof Mn=="boolean"?Mn:Mn>=0},Xt,sr,nr,Gt;Cr();var mr=kt(Rt),pr=wr[0]===lr[0];if(mr&&wr[0]==="t"&&(sr>Xr.bottom||Je.current.bt)){var Dr=Ie;pr?Dr-=Ir-vr:Dr=tt.y-ve.y-_t;var gr=bn(le,Dr),Ar=bn(le,Dr,Hr);gr>Ke||gr===Ke&&(!yn||Ar>=et)?(Je.current.bt=!0,Ie=Dr,_t=-_t,ne.points=[pt(wr,0),pt(lr,0)]):Je.current.bt=!1}if(mr&&wr[0]==="b"&&(Xt<Xr.top||Je.current.tb)){var Pr=Ie;pr?Pr+=Ir-vr:Pr=lt.y-Tt.y-_t;var Br=bn(le,Pr),Qr=bn(le,Pr,Hr);Br>Ke||Br===Ke&&(!yn||Qr>=et)?(Je.current.tb=!0,Ie=Pr,_t=-_t,ne.points=[pt(wr,0),pt(lr,0)]):Je.current.tb=!1}var Yr=kt(mt),tn=wr[1]===lr[1];if(Yr&&wr[1]==="l"&&(Gt>Xr.right||Je.current.rl)){var kr=le;tn?kr-=Er-_n:kr=tt.x-ve.x-Ye;var Vr=bn(kr,Ie),Fr=bn(kr,Ie,Hr);Vr>Ke||Vr===Ke&&(!yn||Fr>=et)?(Je.current.rl=!0,le=kr,Ye=-Ye,ne.points=[pt(wr,1),pt(lr,1)]):Je.current.rl=!1}if(Yr&&wr[1]==="r"&&(nr<Xr.left||Je.current.lr)){var Nr=le;tn?Nr+=Er-_n:Nr=lt.x-Tt.x-Ye;var Wr=bn(Nr,Ie),ur=bn(Nr,Ie,Hr);Wr>Ke||Wr===Ke&&(!yn||ur>=et)?(Je.current.lr=!0,le=Nr,Ye=-Ye,ne.points=[pt(wr,1),pt(lr,1)]):Je.current.lr=!1}Cr();var qr=Yt===!0?0:Yt;typeof qr=="number"&&(nr<Hr.left&&(le-=nr-Hr.left-Ye,ee.x+_n<Hr.left+qr&&(le+=ee.x-Hr.left+_n-qr)),Gt>Hr.right&&(le-=Gt-Hr.right-Ye,ee.x>Hr.right-qr&&(le+=ee.x-Hr.right+qr)));var Jr=It===!0?0:It;typeof Jr=="number"&&(Xt<Hr.top&&(Ie-=Xt-Hr.top-_t,ee.y+vr<Hr.top+Jr&&(Ie+=ee.y-Hr.top+vr-Jr)),sr>Hr.bottom&&(Ie-=sr-Hr.bottom-_t,ee.y>Hr.bottom-Jr&&(Ie+=ee.y-Hr.bottom+Jr)));var sn=ft.x+le,cn=sn+Er,rn=ft.y+Ie,Tn=rn+Ir,Qn=ee.x,$r=Qn+_n,Xn=ee.y,ri=Xn+vr,$n=Math.max(sn,Qn),Sn=Math.min(cn,$r),Wn=($n+Sn)/2,li=Wn-sn,Zn=Math.max(rn,Xn),di=Math.min(Tn,ri),zn=(Zn+di)/2,ni=zn-rn;k==null||k(L,ne);var Rn=Kr.right-ft.x-(le+ft.width),Jn=Kr.bottom-ft.y-(Ie+ft.height);ln===1&&(le=Math.round(le),Rn=Math.round(Rn)),dn===1&&(Ie=Math.round(Ie),Jn=Math.round(Jn));var Ci={ready:!0,offsetX:le/ln,offsetY:Ie/dn,offsetR:Rn/ln,offsetB:Jn/dn,arrowX:li/ln,arrowY:ni/dn,scaleX:ln,scaleY:dn,align:ne};Ge(Ci)}}),Xe=function(){ze.current+=1;var ct=ze.current;Promise.resolve().then(function(){ze.current===ct&&st()})},Ve=function(){Ge(function(ct){return(0,V.Z)((0,V.Z)({},ct),{},{ready:!1})})};return(0,y.Z)(Ve,[b]),(0,y.Z)(function(){Be||Ve()},[Be]),[ke.ready,ke.offsetX,ke.offsetY,ke.offsetR,ke.offsetB,ke.arrowX,ke.arrowY,ke.scaleX,ke.scaleY,ke.align,Xe]}var xt=K(95190);function ht(Be,L,p,b,N){(0,y.Z)(function(){if(Be&&L&&p){let ze=function(){b(),N()};var S=L,k=p,te=re(S),Fe=re(k),ke=se(k),Ge=new Set([ke].concat((0,xt.Z)(te),(0,xt.Z)(Fe)));return Ge.forEach(function(Ft){Ft.addEventListener("scroll",ze,{passive:!0})}),ke.addEventListener("resize",ze,{passive:!0}),b(),function(){Ge.forEach(function(Ft){Ft.removeEventListener("scroll",ze),ke.removeEventListener("resize",ze)})}}},[Be,L,p])}var De=K(48736);function it(Be,L,p,b,N,S,k,te){var Fe=C.useRef(Be);Fe.current=Be;var ke=C.useRef(!1);C.useEffect(function(){if(L&&b&&(!N||S)){var ze=function(){ke.current=!1},Ft=function(yt){var Nt;Fe.current&&!k(((Nt=yt.composedPath)===null||Nt===void 0||(Nt=Nt.call(yt))===null||Nt===void 0?void 0:Nt[0])||yt.target)&&!ke.current&&te(!1)},Je=se(b);Je.addEventListener("pointerdown",ze,!0),Je.addEventListener("mousedown",Ft,!0),Je.addEventListener("contextmenu",Ft,!0);var ut=(0,u.A)(p);if(ut&&(ut.addEventListener("mousedown",Ft,!0),ut.addEventListener("contextmenu",Ft,!0)),0)var st,Xe,Ve,Ze;return function(){Je.removeEventListener("pointerdown",ze,!0),Je.removeEventListener("mousedown",Ft,!0),Je.removeEventListener("contextmenu",Ft,!0),ut&&(ut.removeEventListener("mousedown",Ft,!0),ut.removeEventListener("contextmenu",Ft,!0))}}},[L,p,b,N,S]);function Ge(){ke.current=!0}return Ge}var Le=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Ct(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he.Z,L=C.forwardRef(function(p,b){var N=p.prefixCls,S=N===void 0?"rc-trigger-popup":N,k=p.children,te=p.action,Fe=te===void 0?"hover":te,ke=p.showAction,Ge=p.hideAction,ze=p.popupVisible,Ft=p.defaultPopupVisible,Je=p.onPopupVisibleChange,ut=p.afterPopupVisibleChange,st=p.mouseEnterDelay,Xe=p.mouseLeaveDelay,Ve=Xe===void 0?.1:Xe,Ze=p.focusDelay,ct=p.blurDelay,yt=p.mask,Nt=p.maskClosable,bt=Nt===void 0?!0:Nt,Wt=p.getPopupContainer,Ht=p.forceRender,qt=p.autoDestroy,fr=p.destroyPopupOnHide,Ur=p.popup,St=p.popupClassName,er=p.popupStyle,Ue=p.popupPlacement,be=p.builtinPlacements,Ee=be===void 0?{}:be,Y=p.popupAlign,ee=p.zIndex,oe=p.stretch,pe=p.getPopupClassNameFromAlign,Ce=p.fresh,ft=p.alignPoint,Et=p.onPopupClick,dt=p.onPopupAlign,Zt=p.arrow,_r=p.popupMotion,Mr=p.maskMotion,$t=p.popupTransitionName,Kt=p.popupAnimation,Tr=p.maskTransitionName,Zr=p.maskAnimation,Re=p.className,Ir=p.getTriggerDOMNode,Er=(0,Se.Z)(p,Le),vr=qt||fr||!1,_n=C.useState(!1),Or=(0,me.Z)(_n,2),vn=Or[0],zr=Or[1];(0,y.Z)(function(){zr((0,_.Z)())},[]);var Fn=C.useRef({}),hn=C.useContext(Pe),yn=C.useMemo(function(){return{registerSubPopup:function(Sr,an){Fn.current[Sr]=an,hn==null||hn.registerSubPopup(Sr,an)}}},[hn]),Kn=(0,D.Z)(),Hr=C.useState(null),Gr=(0,me.Z)(Hr,2),Xr=Gr[0],Kr=Gr[1],ln=C.useRef(null),dn=(0,q.Z)(function(Ot){ln.current=Ot,(0,O.Sh)(Ot)&&Xr!==Ot&&Kr(Ot),hn==null||hn.registerSubPopup(Kn,Ot)}),Cn=C.useState(null),cr=(0,me.Z)(Cn,2),yr=cr[0],Qe=cr[1],Ye=C.useRef(null),_t=(0,q.Z)(function(Ot){(0,O.Sh)(Ot)&&yr!==Ot&&(Qe(Ot),Ye.current=Ot)}),at=C.Children.only(k),wt=(at==null?void 0:at.props)||{},At={},ot=(0,q.Z)(function(Ot){var Sr,an,gn=yr;return(gn==null?void 0:gn.contains(Ot))||((Sr=(0,u.A)(gn))===null||Sr===void 0?void 0:Sr.host)===Ot||Ot===gn||(Xr==null?void 0:Xr.contains(Ot))||((an=(0,u.A)(Xr))===null||an===void 0?void 0:an.host)===Ot||Ot===Xr||Object.values(Fn.current).some(function(en){return(en==null?void 0:en.contains(Ot))||Ot===en})}),Dt=z(S,_r,Kt,$t),zt=z(S,Mr,Zr,Tr),ar=C.useState(Ft||!1),Lr=(0,me.Z)(ar,2),lr=Lr[0],wr=Lr[1],U=ze!=null?ze:lr,Q=(0,q.Z)(function(Ot){ze===void 0&&wr(Ot)});(0,y.Z)(function(){wr(ze||!1)},[ze]);var ne=C.useRef(U);ne.current=U;var le=C.useRef([]);le.current=[];var Ie=(0,q.Z)(function(Ot){var Sr;Q(Ot),((Sr=le.current[le.current.length-1])!==null&&Sr!==void 0?Sr:U)!==Ot&&(le.current.push(Ot),Je==null||Je(Ot))}),Ke=C.useRef(),et=function(){clearTimeout(Ke.current)},tt=function(Sr){var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;et(),an===0?Ie(Sr):Ke.current=setTimeout(function(){Ie(Sr)},an*1e3)};C.useEffect(function(){return et},[]);var Tt=C.useState(!1),lt=(0,me.Z)(Tt,2),ve=lt[0],rt=lt[1];(0,y.Z)(function(Ot){(!Ot||U)&&rt(!0)},[U]);var mt=C.useState(null),Rt=(0,me.Z)(mt,2),Yt=Rt[0],It=Rt[1],kt=C.useState(null),Xt=(0,me.Z)(kt,2),sr=Xt[0],nr=Xt[1],Gt=function(Sr){nr([Sr.clientX,Sr.clientY])},mr=Qt(U,Xr,ft&&sr!==null?sr:yr,Ue,Ee,Y,dt),pr=(0,me.Z)(mr,11),Dr=pr[0],gr=pr[1],Ar=pr[2],Pr=pr[3],Br=pr[4],Qr=pr[5],Yr=pr[6],tn=pr[7],kr=pr[8],Vr=pr[9],Fr=pr[10],Nr=Me(vn,Fe,ke,Ge),Wr=(0,me.Z)(Nr,2),ur=Wr[0],qr=Wr[1],Jr=ur.has("click"),sn=qr.has("click")||qr.has("contextMenu"),cn=(0,q.Z)(function(){ve||Fr()}),rn=function(){ne.current&&ft&&sn&&tt(!1)};ht(U,yr,Xr,cn,rn),(0,y.Z)(function(){cn()},[sr,Ue]),(0,y.Z)(function(){U&&!(Ee!=null&&Ee[Ue])&&cn()},[JSON.stringify(Y)]);var Tn=C.useMemo(function(){var Ot=G(Ee,S,Vr,ft);return m()(Ot,pe==null?void 0:pe(Vr))},[Vr,pe,Ee,S,ft]);C.useImperativeHandle(b,function(){return{nativeElement:Ye.current,popupElement:ln.current,forceAlign:cn}});var Qn=C.useState(0),$r=(0,me.Z)(Qn,2),Xn=$r[0],ri=$r[1],$n=C.useState(0),Sn=(0,me.Z)($n,2),Wn=Sn[0],li=Sn[1],Zn=function(){if(oe&&yr){var Sr=yr.getBoundingClientRect();ri(Sr.width),li(Sr.height)}},di=function(){Zn(),cn()},zn=function(Sr){rt(!1),Fr(),ut==null||ut(Sr)},ni=function(){return new Promise(function(Sr){Zn(),It(function(){return Sr})})};(0,y.Z)(function(){Yt&&(Fr(),Yt(),It(null))},[Yt]);function Rn(Ot,Sr,an,gn){At[Ot]=function(en){var Ln;gn==null||gn(en),tt(Sr,an);for(var Ni=arguments.length,Un=new Array(Ni>1?Ni-1:0),Bn=1;Bn<Ni;Bn++)Un[Bn-1]=arguments[Bn];(Ln=wt[Ot])===null||Ln===void 0||Ln.call.apply(Ln,[wt,en].concat(Un))}}(Jr||sn)&&(At.onClick=function(Ot){var Sr;ne.current&&sn?tt(!1):!ne.current&&Jr&&(Gt(Ot),tt(!0));for(var an=arguments.length,gn=new Array(an>1?an-1:0),en=1;en<an;en++)gn[en-1]=arguments[en];(Sr=wt.onClick)===null||Sr===void 0||Sr.call.apply(Sr,[wt,Ot].concat(gn))});var Jn=it(U,sn,yr,Xr,yt,bt,ot,tt),Ci=ur.has("hover"),bn=qr.has("hover"),Cr,An;Ci&&(Rn("onMouseEnter",!0,st,function(Ot){Gt(Ot)}),Rn("onPointerEnter",!0,st,function(Ot){Gt(Ot)}),Cr=function(Sr){(U||ve)&&Xr!==null&&Xr!==void 0&&Xr.contains(Sr.target)&&tt(!0,st)},ft&&(At.onMouseMove=function(Ot){var Sr;(Sr=wt.onMouseMove)===null||Sr===void 0||Sr.call(wt,Ot)})),bn&&(Rn("onMouseLeave",!1,Ve),Rn("onPointerLeave",!1,Ve),An=function(){tt(!1,Ve)}),ur.has("focus")&&Rn("onFocus",!0,Ze),qr.has("focus")&&Rn("onBlur",!1,ct),ur.has("contextMenu")&&(At.onContextMenu=function(Ot){var Sr;ne.current&&qr.has("contextMenu")?tt(!1):(Gt(Ot),tt(!0)),Ot.preventDefault();for(var an=arguments.length,gn=new Array(an>1?an-1:0),en=1;en<an;en++)gn[en-1]=arguments[en];(Sr=wt.onContextMenu)===null||Sr===void 0||Sr.call.apply(Sr,[wt,Ot].concat(gn))}),Re&&(At.className=m()(wt.className,Re));var Mn=(0,V.Z)((0,V.Z)({},wt),At),Yn={},gi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];gi.forEach(function(Ot){Er[Ot]&&(Yn[Ot]=function(){for(var Sr,an=arguments.length,gn=new Array(an),en=0;en<an;en++)gn[en]=arguments[en];(Sr=Mn[Ot])===null||Sr===void 0||Sr.call.apply(Sr,[Mn].concat(gn)),Er[Ot].apply(Er,gn)})});var pi=C.cloneElement(at,(0,V.Z)((0,V.Z)({},Mn),Yn)),qn={x:Qr,y:Yr},ei=Zt?(0,V.Z)({},Zt!==!0?Zt:{}):null;return C.createElement(C.Fragment,null,C.createElement(ge.Z,{disabled:!U,ref:_t,onResize:di},C.createElement(ie,{getTriggerDOMNode:Ir},pi)),C.createElement(Pe.Provider,{value:yn},C.createElement(_e,{portal:Be,ref:dn,prefixCls:S,popup:Ur,className:m()(St,Tn),style:er,target:yr,onMouseEnter:Cr,onMouseLeave:An,onPointerEnter:Cr,zIndex:ee,open:U,keepDom:ve,fresh:Ce,onClick:Et,onPointerDownCapture:Jn,mask:yt,motion:Dt,maskMotion:zt,onVisibleChanged:zn,onPrepare:ni,forceRender:Ht,autoDestroy:vr,getPopupContainer:Wt,align:Vr,arrow:ei,arrowPos:qn,ready:Dr,offsetX:gr,offsetY:Ar,offsetR:Pr,offsetB:Br,onAlign:cn,stretch:oe,targetWidth:Xn/tn,targetHeight:Wn/kr})))});return L}var Ut=Ct(he.Z)},63437:function(dr,vt,K){"use strict";K.r(vt),K.d(vt,{default:function(){return st}});var V=K(59301),me=K(61186),Se=K.n(me),he=K(86129),W=K.n(he),m=K(38986),ge=K(25690),O=K(62957),u=K(6767),q=K(77019),D=K(5269),y=K(99571),_=K(458),C=K(91882),x=K(37285),j=K(54172),M=K(71114),H=K(82326),R=K(29787),P=K(27812),X=K(95869),fe=K(87169),_e=K(26227),we=K(346),ie=K(48790),ye=K(51257),Pe=K(28284),ue=K(71051),Me=K(37568),Z=({defaultValue:Xe,onBlur:Ve,max:Ze,className:ct="game-score"})=>{const[yt,Nt]=(0,V.useState)(Xe);(0,V.useEffect)(()=>{Nt(Xe)},[Xe]);function bt(Ht){Nt(Ht)}function Wt(){yt&&(Ve(yt>Ze?Ze:yt),Nt(null))}return V.createElement(ue.Z,{max:Ze,min:0,className:ct,value:yt,onChange:bt,onBlur:Wt})},I={greyText:"greyText___lvEE6",info:"info___El01Z",label:"label___GmvST",blackContent:"blackContent___FYo0Z",orangeContent:"orangeContent____uYQ3",inputLabel:"inputLabel___ruiZm",tableTitle:"tableTitle___ir3x7",scoreTable:"scoreTable___b9Z37"},G=K(89274),z=K(18638),se=K(59301),re=Object.defineProperty,w=Object.defineProperties,B=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,qe=(Xe,Ve,Ze)=>Ve in Xe?re(Xe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Xe[Ve]=Ze,Bt=(Xe,Ve)=>{for(var Ze in Ve||(Ve={}))ae.call(Ve,Ze)&&qe(Xe,Ze,Ve[Ze]);if($)for(var Ze of $(Ve))$e.call(Ve,Ze)&&qe(Xe,Ze,Ve[Ze]);return Xe},pt=(Xe,Ve)=>w(Xe,B(Ve)),Qt=(Xe,Ve,Ze)=>new Promise((ct,yt)=>{var Nt=Ht=>{try{Wt(Ze.next(Ht))}catch(qt){yt(qt)}},bt=Ht=>{try{Wt(Ze.throw(Ht))}catch(qt){yt(qt)}},Wt=Ht=>Ht.done?ct(Ht.value):Promise.resolve(Ht.value).then(Nt,bt);Wt((Ze=Ze.apply(Xe,Ve)).next())});const xt=({shixunHomeworks:Xe,dispatch:Ve,classroomList:Ze,gethomeworkreport:ct,homeWorkReport:yt})=>{var Nt,bt;const{shixunWorkReport:Wt}=Xe,Ht=(0,ge.useParams)(),[qt,fr]=(0,V.useState)(!1),[Ur,St]=(0,V.useState)(!1),[er,Ue]=(0,V.useState)(""),[be]=Pe.default.useForm(),Ee=Pe.default.useWatch("comment",be),Y=Pe.default.useWatch("hidden_comment",be),[ee,oe]=(0,V.useState)(!1),pe=(0,V.useRef)({}),[Ce,ft]=O.default.useModal(),Et=()=>Qt(void 0,null,function*(){St(!0);const $t=be.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Ht.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:$t.hidden_comment,comment:$t.comment}})).status===0&&(u.ZP.success("\u70B9\u8BC4\u6210\u529F"),be.resetFields(),Ve({type:"classroomList/setActionTabs",payload:{}}),ct()),St(!1)}),dt=()=>Qt(void 0,null,function*(){if(!er){u.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");return}St(!0);const $t=be.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Ht.homeworkId}/add_score.json`,{method:"post",body:{comment:$t.comment,score:er}})).status===0&&(u.ZP.success("\u70B9\u8BC4\u6210\u529F"),Ve({type:"classroomList/setActionTabs",payload:{}}),ct()),St(!1)}),Zt=$t=>Qt(void 0,null,function*(){const{mes:Kt,setChatData:Tr,setTyping:Zr}=$t,Re=yield(0,m.ZP)("/api/intelligent_reviews/large_model_intelligent_qa.json",{method:"post",body:Bt({query:Kt,student_work_id:Ht.homeworkId},pe.current)});Re.answer=(Re==null?void 0:Re.status)==-3?Re.message:Re==null?void 0:Re.answer,Re!=null&&Re.answer&&Tr(Ir=>[...Ir].map((Er,vr)=>vr===Ir.length-1?pt(Bt({},Er),{text:Re==null?void 0:Re.answer,loading:!1,response:Re}):Er))}),_r=({chatData:$t,setChatData:Kt,setLoading:Tr,getData:Zr,renderChatItems:Re})=>{Ve({type:"shixunHomeworks/setActionTabs",payload:{key:"\u667A\u80FD\u8BC4\u9605\u914D\u7F6E",onOk:Ir=>{pe.current=Ir,oe(!0),Tr(!0);const Er=Re();Er[0].show=!1,Kt(Er),Zr()}}})},Mr=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:160,render:$t=>$t||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:110},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:160},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"cost_time",width:160},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:$t=>$t||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:90,render:($t,Kt)=>se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Kt.score_full)!==parseFloat($t)?"#E30000":"#53C41B"}},$t),"/",Kt.score_full)},{title:"\u8C03\u5206",width:100,dataIndex:"action",render:($t,Kt)=>(0,ie.GJ)()?se.createElement(Z,{max:Kt.score_full,onBlur:Tr=>Qt(void 0,null,function*(){var Zr;if((0,ie.Rm)()&&!((Zr=Ze.AssistantObject.practice)!=null&&Zr.can_appraise)){u.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Re=yield(0,m.ZP)(`/api/student_works/${Ht.homeworkId}/adjust_score.json`,{method:"post",body:{score:Tr}});ct(),Re.status===0&&u.ZP.success("\u8C03\u5206\u6210\u529F")})}):yt!=null&&yt.is_anonymous?se.createElement(ue.Z,{min:0,value:er,onChange:Tr=>Ue(Tr),max:Kt.score_full}):$t}].filter($t=>yt!=null&&yt.is_anonymous?!["late_penalty","score","absence_penalty"].includes($t.dataIndex):!0);return se.createElement(se.Fragment,null,se.createElement(O.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",afterClose:()=>{be.resetFields(),Ue("")},confirmLoading:Ur,open:Ze.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Qt(void 0,null,function*(){var $t;if((0,ie.Rm)()&&!(($t=Ze.AssistantObject.practice)!=null&&$t.can_appraise)){u.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}if(yt!=null&&yt.is_anonymous){dt();return}const Kt=be.getFieldsValue();JSON.stringify(Kt)==="{}"||Kt.hidden_comment===""&&Kt.comment===""?fr(!0):Et()}),onCancel:()=>{Ve({type:"classroomList/setActionTabs",payload:{}})}},se.createElement(q.Z,{className:I.info},se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u59D3\u540D"),se.createElement("span",{className:I.blackContent},yt==null?void 0:yt.username)),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u5B66\u53F7"),se.createElement("span",{className:I.blackContent},(yt==null?void 0:yt.student_id)||"--")),!(yt!=null&&yt.is_anonymous)&&se.createElement(se.Fragment,null,se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u73ED\u7EA7"),se.createElement("span",{className:I.blackContent},(yt==null?void 0:yt.group_name)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u8865\u4EA4\u6263\u5206"),se.createElement("span",{className:I.orangeContent},((Nt=yt==null?void 0:yt.stage_list[0])==null?void 0:Nt.late_penalty)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u7F3A\u8BC4\u6263\u5206"),se.createElement("span",{className:I.orangeContent},((bt=yt==null?void 0:yt.stage_list[0])==null?void 0:bt.absence_penalty)||"--")),se.createElement(D.Z,null,se.createElement("span",{className:`${I.label} ${I.greyText}`},"\u603B\u6210\u7EE9"),se.createElement("span",{className:I.orangeContent},(yt==null?void 0:yt.stage_list[0].score)||"--")))),se.createElement(Pe.default,{form:be,onChange:()=>{qt&&fr(!1)}},se.createElement("div",{className:"w-full flex justify-between item-center"},se.createElement("div",{className:`${I.inputLabel} ${I.greyText}`,style:{marginBottom:0}},yt!=null&&yt.is_anonymous?"\u8BC4\u8BED":"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement("div",{className:"mb10"},se.createElement(G.Z,{title:"\u667A\u80FD\u8BC4\u9605",visible:ee,onOpen:_r,onClose:()=>{oe(!1)},loadingOption:{text:"AI\u8BC4\u9605\u4E2D..."},hideUpload:!0,showDefaultTips:!1,hideInputBox:!0,customRequest:Zt,extraAnswerAction:$t=>{var Kt;return!$t.loading&&![-1,-3].includes((Kt=$t==null?void 0:$t.response)==null?void 0:Kt.status)&&se.createElement("div",{className:I.apply,onClick:()=>{const Tr=()=>{var Zr,Re,Ir;be.setFieldsValue({comment:(Zr=$t==null?void 0:$t.response)==null?void 0:Zr.remarks,hidden_comment:(Re=$t==null?void 0:$t.response)==null?void 0:Re.remarks}),Ue((Ir=$t==null?void 0:$t.response)==null?void 0:Ir.score),oe(!1)};if(er||Ee||Y){Ce.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u5206\u6216\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4E00\u952E\u5E94\u7528\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u5E94\u7528\uFF1F",okText:"\u5E94\u7528",onOk:Tr});return}Tr()}},se.createElement("i",{style:{color:"#3061D0"},className:"iconfont icon-yijianyingyong1 font12 mr5"}),"\u4E00\u952E\u5E94\u7528")}},se.createElement(y.ZP,{icon:se.createElement("img",{src:K(11689)}),type:"link"},"\u667A\u80FD\u8BC4\u9605")))),se.createElement(Pe.default.Item,{name:"comment"},se.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),!(yt!=null&&yt.is_anonymous)&&se.createElement(se.Fragment,null,se.createElement("div",{className:`${I.inputLabel} ${I.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement(Pe.default.Item,{name:"hidden_comment"},se.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))," ")),qt&&se.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),se.createElement("div",{className:I.tableTitle},"\u5173\u5361\u6210\u7EE9"),se.createElement(j.default,{className:I.scoreTable,dataSource:yt==null?void 0:yt.stage_list,rowKey:"challenge_id",pagination:!1,columns:Mr})),se.createElement(z.Z,null))};var ht=(0,ge.connect)(({shixunHomeworks:Xe,classroomList:Ve})=>({shixunHomeworks:Xe,classroomList:Ve}))(xt),De={},it=(Xe,Ve,Ze)=>new Promise((ct,yt)=>{var Nt=Ht=>{try{Wt(Ze.next(Ht))}catch(qt){yt(qt)}},bt=Ht=>{try{Wt(Ze.throw(Ht))}catch(qt){yt(qt)}},Wt=Ht=>Ht.done?ct(Ht.value):Promise.resolve(Ht.value).then(Nt,bt);Wt((Ze=Ze.apply(Xe,Ve)).next())});const Le=({shixunHomeworks:Xe,dispatch:Ve,gethomeworkreport:Ze,homeWorkReport:ct})=>{var yt,Nt;const{shixunWorkReport:bt}=Xe;console.log(ct,"homeWorkReport");const Wt=(0,ge.useParams)(),[Ht,qt]=(0,V.useState)(!1),[fr]=Pe.default.useForm(),{user_name:Ur,score:St,comment_time:er,content:Ue,score_id:be,user_id:Ee}=((Nt=(yt=Xe==null?void 0:Xe.actionTabs)==null?void 0:yt.selectArrs)==null?void 0:Nt.data)||{},Y=()=>it(void 0,null,function*(){yield fr.validateFields(),qt(!0);const ee=fr.getFieldsValue();(yield(0,m.ZP)(`/api/student_works/${Wt.homeworkId}/appeal_anonymous_score.json`,{method:"post",body:{comment:ee.comment,score_id:be,userId:Ee}})).status===0&&(u.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ve({type:"shixunHomeworks/setActionTabs",payload:{}}),Ze()),qt(!1)});return V.createElement(O.default,{centered:!0,width:600,title:"\u533F\u8BC4\u7533\u8BC9",afterClose:()=>{fr.resetFields()},confirmLoading:Ht,open:Xe.actionTabs.key==="\u533F\u8BC4\u7533\u8BC9",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Y,onCancel:()=>{Ve({type:"shixunHomeworks/setActionTabs",payload:{}})}},V.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15,marginBottom:20}},V.createElement(q.Z,{justify:"space-between",className:De.info},V.createElement("span",null,V.createElement("span",{className:"c-grey-666"},Ur),V.createElement("span",{className:"c-grey-333 ml5"},"\u8C03\u5206\u4E3A"),V.createElement("span",{className:"c-orange ml5"},St,"\u5206")),V.createElement("span",{className:"c-grey-333"},er)),V.createElement("div",{className:"c-grey-333 mt5"},Ue)),V.createElement(Pe.default,{form:fr,className:"mt15",layout:"vertical"},V.createElement(Pe.default.Item,{name:"comment",label:"\u7533\u8BC9",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"}]},V.createElement(Me.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0",rows:3}))))};var Ct=(0,ge.connect)(({shixunHomeworks:Xe})=>({shixunHomeworks:Xe}))(Le),Ut=K(16143),Be={flex_box_center:"flex_box_center___uz0LL",flex_space_between:"flex_space_between___kuKI5",flex_box_vertical_center:"flex_box_vertical_center___VzPH1",flex_box_center_end:"flex_box_center_end___Tyr1U",flex_box_column:"flex_box_column___qsgVa",title:"title___SFyGM",export:"export___ezPhH",title1_right:"title1_right___tMOJn",userPic:"userPic___mW4Rr",userInfo:"userInfo___vYvSZ",listItem:"listItem___gJf4Z",rightInfo:"rightInfo___PRYRt",shixunTitle:"shixunTitle___STlvE",shixunWrp:"shixunWrp___knhTt",footerBar:"footerBar___R5IlQ",footerBarStatic:"footerBarStatic___M4EQj",exitComment:"exitComment___NoCI4",nextComment:"nextComment___sFj7z",modal:"modal___TwQdH",tag:"tag___RErUu"},L=K(76902),p=K(1247),b=K(44164),N=K.n(b),S=K(59301),k=Object.defineProperty,te=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Ge=(Xe,Ve,Ze)=>Ve in Xe?k(Xe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Xe[Ve]=Ze,ze=(Xe,Ve)=>{for(var Ze in Ve||(Ve={}))Fe.call(Ve,Ze)&&Ge(Xe,Ze,Ve[Ze]);if(te)for(var Ze of te(Ve))ke.call(Ve,Ze)&&Ge(Xe,Ze,Ve[Ze]);return Xe},Ft=(Xe,Ve)=>{var Ze={};for(var ct in Xe)Fe.call(Xe,ct)&&Ve.indexOf(ct)<0&&(Ze[ct]=Xe[ct]);if(Xe!=null&&te)for(var ct of te(Xe))Ve.indexOf(ct)<0&&ke.call(Xe,ct)&&(Ze[ct]=Xe[ct]);return Ze},Je=(Xe,Ve,Ze)=>new Promise((ct,yt)=>{var Nt=Ht=>{try{Wt(Ze.next(Ht))}catch(qt){yt(qt)}},bt=Ht=>{try{Wt(Ze.throw(Ht))}catch(qt){yt(qt)}},Wt=Ht=>Ht.done?ct(Ht.value):Promise.resolve(Ht.value).then(Nt,bt);Wt((Ze=Ze.apply(Xe,Ve)).next())});const ut=Xe=>{var Ve=Xe,{shixunHomeworks:Ze,classroomList:ct,globalSetting:yt,loading:Nt,user:bt,dispatch:Wt}=Ve,Ht=Ft(Ve,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),qt,fr,Ur,St,er,Ue,be;const[Ee,Y]=(0,V.useState)(ze({},(0,ge.useParams)())),ee=(0,ge.useParams)(),oe=(0,ge.useLocation)(),[]=(0,V.useState)([]),[pe,Ce]=(0,V.useState)({last:!1}),[ft,Et]=(0,V.useState)({last:!1}),dt=(0,V.useRef)(),Zt=(0,V.useRef)(),[_r,Mr]=(0,V.useState)(!1),[$t,Kt]=(0,V.useState)(!1),[Tr,Zr]=(0,V.useState)(!1),[Re,Ir]=(0,V.useState)(),[Er,vr]=(0,V.useState)(),[_n,Or]=(0,V.useState)(!0),[vn,zr]=(0,V.useState)(),Fn=(0,ie.GJ)(),[hn,yn]=(0,V.useState)(new(W())),[Kn,Hr]=(0,V.useState)(0),[Gr,Xr]=(0,V.useState)([]),[Kr,ln]=(0,V.useState)(!1),[dn,Cn]=(0,V.useState)(!1),[cr,yr]=(0,V.useState)(""),[Qe,Ye]=(0,V.useState)(!1),[_t,at]=(0,V.useState)(!0),[wt,At]=(0,V.useState)(0),[ot]=(0,ge.useSearchParams)(),Dt=()=>Je(void 0,null,function*(){(bt.userInfo.is_teacher||bt.userInfo.admin)&&(Ye(!0),at(!1))});(0,V.useEffect)(()=>{Dt(),console.log("\u6253\u5370\u7684------",Re),console.log(Ze),yr(Re==null?void 0:Re.repeat_minus_score)},[Re,bt]),(0,V.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Re==null?void 0:Re.work_score),At(Re==null?void 0:Re.work_score)},[Re==null?void 0:Re.work_score,cr]),(0,V.useEffect)(()=>(Wt({type:"globalSetting/footerToggle",payload:!1}),()=>{Wt({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,V.useEffect)(()=>{var ve;if(Re){let rt=[];(ve=Re==null?void 0:Re.target_test_sets)==null||ve.map((mt,Rt)=>{var Yt;(Yt=mt==null?void 0:mt.targets)==null||Yt.map((It,kt)=>{var Xt;It.name=mt==null?void 0:mt.name,It.total_target_score=mt==null?void 0:mt.total_target_score,It.actual_target_score=mt==null?void 0:mt.actual_target_score,It.rowSpan=kt===0?(Xt=mt==null?void 0:mt.targets)==null?void 0:Xt.length:0,It.order=Rt+1,rt.push(It)})}),zr(rt),Wt({type:"classroomList/getAssistantPermissions",payload:{course_id:Ee.coursesId}})}},[Re]),(0,V.useEffect)(()=>{Ze.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Gr.length>0&&Re!=null&&Re.course_name&&lr("all")},[Re==null?void 0:Re.course_name]),(0,V.useEffect)(()=>{console.log(ee),Y(ze({},ee))},[oe.pathname]);const zt=()=>{document.body.scrollIntoView()};function ar(){return Je(this,null,function*(){var ve,rt,mt,Rt;const Yt=JSON.parse(localStorage.all_student_works_param||"{}"),It=yield Wt({type:"shixunHomeworks/getAllStudentWorks",payload:ze(ze({},Ee),Yt)});Xr(It.all_student_works);const kt=(ve=It.all_student_works)==null?void 0:ve.map(Xt=>String(Xt.student_work_id)).indexOf(Ee.homeworkId);kt===((rt=It.all_student_works)==null?void 0:rt.length)-1?Ce({last:!0}):Ce((mt=It.all_student_works)==null?void 0:mt[kt+1]),Et(kt===0?{last:!0}:(Rt=It.all_student_works)==null?void 0:Rt[kt-1])})}const Lr=()=>{document.querySelectorAll("canvas").forEach(ve=>{(!ve.clientWidth||!ve.clientHeight)&&ve.remove()})},lr=ve=>Je(void 0,null,function*(){let rt=0,mt;mt=O.default.info({width:460,title:S.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",S.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:S.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",S.createElement("span",{className:"c-blue"},rt+1),"/",ve!=="all"?1:Gr==null?void 0:Gr.length,S.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Be.modal,onOk:()=>{}});const Rt={margin:[0,0],filename:`${Re==null?void 0:Re.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};function Yt(){return Je(this,null,function*(){zt(),rt++,setTimeout(()=>Je(this,null,function*(){var kt;Lr();const Xt=hn.folder(`${(kt=Re==null?void 0:Re.stage_list[0])==null?void 0:kt.shixun_name}`),sr=document.querySelector("#export-all").children;let nr=N()();for(let Gt=0;Gt<sr.length;Gt++)yield nr.set(Rt).from(sr[Gt]).toContainer().toCanvas().toPdf().get("pdf").then(mr=>Je(this,null,function*(){Gt<sr.length-1&&(yield mr.addPage())}));Xt.file(`${Gr[rt-1].student_work_user_name}.pdf`,nr.output("blob")),mt.update({content:S.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",S.createElement("span",{className:"c-blue"},rt),"/",Gr==null?void 0:Gr.length,S.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),rt==(Gr==null?void 0:Gr.length)?(mt.destroy(),wr()):It()}),2200)})}function It(){return Je(this,null,function*(){var kt,Xt,sr,nr,Gt;const mr=yield(0,m.ZP)(`/api/student_works/${Gr[rt].student_work_id}/jupyter_work_report.json`,{method:"get"});if((mr==null?void 0:mr.status)===0)if(Ir(mr.data),(Xt=(kt=mr==null?void 0:mr.data)==null?void 0:kt.shixun_detail[0])!=null&&Xt.myshixun_identifier){Or(!0);const pr=yield(0,m.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(nr=(sr=mr==null?void 0:mr.data)==null?void 0:sr.shixun_detail[0])==null?void 0:nr.myshixun_identifier,student_work_id:(Gt=mr==null?void 0:mr.data)==null?void 0:Gt.work_id}});pr.status===0&&(vr(pr.html_content),Or(!1),le(),Yt())}else Yt()})}if(ve!=="all"||(Gr==null?void 0:Gr.length)<2){Lr(),zt();const kt=Zt.current.children;let Xt=N()();const sr=hn.folder(`${Re==null?void 0:Re.username}`);for(let nr=0;nr<kt.length;nr++)yield Xt.set(Rt).from(kt[nr]).toContainer().toCanvas().toPdf().get("pdf").then(Gt=>Je(void 0,null,function*(){nr<kt.length-1&&(yield Gt.addPage())}));Mr(!1),sr.file(`${Re==null?void 0:Re.username}.pdf`,Xt.output("blob"),{base64:!1}),mt.destroy(),wr();return}else It()}),wr=()=>{hn.generateAsync({type:"blob"}).then(function(ve){const rt=document.createElement("a");rt.href=window.URL.createObjectURL(ve),rt.download=(Re==null?void 0:Re.course_name)+".zip",document.body.appendChild(rt);const mt=document.createEvent("MouseEvents");mt.initEvent("click",!1,!1),rt.dispatchEvent(mt),document.body.removeChild(rt),yn(new(W()))}),Zr(!1)};(0,V.useEffect)(()=>{Ie()},[Ee.homeworkId]),(0,V.useEffect)(()=>{Re!=null&&Re.work_id&&((0,ie.GJ)()||Re!=null&&Re.is_anonymous)&&ar()},[Re==null?void 0:Re.work_id]),(0,V.useEffect)(()=>{console.log(Re)},[Re]);const U=()=>Je(void 0,null,function*(){const ve=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/jupyter_work_report.json`,{method:"get"});(ve==null?void 0:ve.status)===0&&Ir(ve.data)}),Q=()=>Je(void 0,null,function*(){var ve,rt,mt,Rt,Yt;const It=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/jupyter_work_report.json`,{method:"get"});if((It==null?void 0:It.status)===0&&(Ir(It.data),(rt=(ve=It==null?void 0:It.data)==null?void 0:ve.shixun_detail[0])!=null&&rt.myshixun_identifier)){Or(!0);const kt=yield(0,m.ZP)("/api/jupyters/preview_tpi.json",{method:"get",params:{identifier:(Rt=(mt=It==null?void 0:It.data)==null?void 0:mt.shixun_detail[0])==null?void 0:Rt.myshixun_identifier,student_work_id:(Yt=It==null?void 0:It.data)==null?void 0:Yt.work_id}});if(kt.status===0){vr(kt.html_content),Or(!1),ne(kt.html_content);return}}}),ne=ve=>{var rt,mt;(mt=(rt=ve==null?void 0:ve.match)==null?void 0:rt.call(ve,/<script [^>]*src=['"]([^'"]+)[^>]*>/gi))==null||mt.map(Rt=>{const Yt=document.createElement("script");Yt.src=/<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(Rt)[1],document.body.appendChild(Yt)}),le()},le=()=>{try{window.MathJax&&(MathJax.Hub.Config({TeX:{equationNumbers:{autoNumber:"AMS",useLabelIds:!0}},tex2jax:{inlineMath:[["$","$"],["\\\\(","\\\\)"]],displayMath:[["$$","$$"],["\\\\[","\\\\]"]],processEscapes:!0,processEnvironments:!0},displayAlign:"center",CommonHTML:{linebreaks:{automatic:!0}},"HTML-CSS":{linebreaks:{automatic:!0}}}),MathJax.Hub.Queue(["Typeset",MathJax.Hub]))}catch(ve){}},Ie=()=>Je(void 0,null,function*(){Kt(!0),Q(),Kt(!1)}),Ke=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"shixun_name",ellipsis:!0,render:(ve,rt,mt)=>ve},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time",width:Re!=null&&Re.is_anonymous?220:170,render:ve=>ve||"--"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",width:Re!=null&&Re.is_anonymous?140:90},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time",width:Re!=null&&Re.is_anonymous?220:170},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"cost_time",width:130},{title:"\u8865\u4EA4\u6263\u5206",dataIndex:"late_penalty",width:90,render:ve=>ve||"--"},{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",width:90,render:ve=>ve||"--"},{title:"\u5F97\u5206",dataIndex:"score",width:100,render:(ve,rt)=>S.createElement("div",null,S.createElement("span",{style:{color:parseFloat(rt.score_full)!==parseFloat(ve)?"red":"green"}},ve||0),"/",rt.score_full)},{title:"\u8C03\u5206",dataIndex:"action",width:110,render:(ve,rt)=>Fn?S.createElement(Z,{max:rt.score_full,onBlur:mt=>Je(void 0,null,function*(){var Rt;if((0,ie.Rm)()&&!((Rt=ct.AssistantObject.practice)!=null&&Rt.can_appraise)){u.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Yt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/adjust_score.json`,{method:"post",body:{score:mt}});U(),Yt.status===0&&u.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):ve}].filter(ve=>Re!=null&&Re.is_anonymous?!["late_penalty","absence_penalty","score","action"].includes(ve.dataIndex):!0),et=Re==null?void 0:Re.comment_scores.map(ve=>{var rt,mt,Rt;return{children:S.createElement(q.Z,null,S.createElement(D.Z,{span:24},S.createElement(q.Z,null,S.createElement(D.Z,{flex:1},S.createElement("span",{className:"c-light-black mr10"},ve.user_name),S.createElement("span",null,"\u8C03\u5206\u4E3A"),S.createElement("span",{className:"ml10 c-orange"},ve.score?ve.score:0,"\u5206")),S.createElement(D.Z,null,S.createElement("span",{className:"c-light-black ml10"},ve.comment_time)))),S.createElement(D.Z,{span:24,className:"mt8"},S.createElement(q.Z,{className:"mt8"},S.createElement(D.Z,{span:22},ve.content?S.createElement(L.Z,{value:ve.content,style:{fontSize:14}}):S.createElement("span",{className:"c-light-black"},"\u6682\u672A\u5199\u8BC4\u8BED")),S.createElement(D.Z,{className:"tr",span:2},(ve==null?void 0:ve.can_appeal)&&!(ve!=null&&ve.is_invalid)&&S.createElement(y.ZP,{size:"small",type:"primary",onClick:()=>{Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u533F\u8BC4\u7533\u8BC9",selectArrs:{data:ze({},ve)}}})}},"\u7533\u8BC9")))),!!(ve!=null&&ve.appeal_info)&&S.createElement(D.Z,{span:24,className:"mt8"},S.createElement("div",{className:"p20",style:{background:"#F7F8F9",padding:15}},S.createElement(q.Z,{justify:"space-between"},S.createElement("span",null,S.createElement("span",{className:"c-grey-333"},(rt=ve==null?void 0:ve.appeal_info)==null?void 0:rt.user_name),S.createElement("span",null,(ve==null?void 0:ve.appeal_status)===1&&S.createElement("span",{className:`tag-style bg-orange ml10 ${Be.tag}`},"\u7533\u8BC9\u4E2D"),(ve==null?void 0:ve.appeal_status)===2&&S.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Be.tag}`},"\u7533\u8BC9\u5DF2\u64A4\u9500"),(ve==null?void 0:ve.appeal_status)===3&&S.createElement("span",{className:`tag-style ml10 ${Be.tag}`,style:{background:"#57BE40"}},"\u7533\u8BC9\u6210\u529F"),(ve==null?void 0:ve.appeal_status)===4&&S.createElement("span",{className:`tag-style bg-grey-ede c-light-black ml10 ${Be.tag}`},"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(ve==null?void 0:ve.appeal_status)===5&&S.createElement("span",{className:`tag-style c-light-black ml10 ${Be.tag}`,style:{background:"#E9EAED"}},"\u7533\u8BC9\u5931\u8D25"))),S.createElement("span",{className:"c-light-black"}," ",Se()((mt=ve==null?void 0:ve.appeal_info)==null?void 0:mt.time).format("YYYY-MM-DD HH:mm:ss"))),S.createElement(q.Z,{justify:"space-between",className:"mt10"},S.createElement(D.Z,{flex:1},(Rt=ve.appeal_info)==null?void 0:Rt.content),S.createElement(D.Z,{style:{flexShrink:0,marginLeft:"auto"}},(ve==null?void 0:ve.appeal_status)===1&&(0,ie.GJ)()&&S.createElement("span",{onClick:()=>{O.default.confirm({title:"\u63A5\u53D7\u7533\u8BC9",icon:null,content:"\u6B64\u533F\u8BC4\u8BB0\u5F55\u5C06\u4F5C\u5E9F\uFF0C\u533F\u8BC4\u5B66\u751F\u7684\u4F5C\u54C1\u5C06\u88AB\u6263\u51CF\u8FDD\u89C4\u533F\u8BC4\u5206 \u662F\u5426\u786E\u8BA4\u63A5\u53D7\u7533\u8BC9\uFF1F",onOk:()=>Je(void 0,null,function*(){const Yt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:ve.score_id,status:3}});(Yt==null?void 0:Yt.status)===0&&U()})})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(ve==null?void 0:ve.appeal_status)===1&&(0,ie.GJ)()&&S.createElement("span",{onClick:()=>{O.default.confirm({icon:null,title:"\u63A5\u53D7\u7533\u8BC9",content:"\u6B64\u533F\u8BC4\u8BB0\u5F55\u88AB\u8BA4\u4E3A\u5408\u7406\uFF0C\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9\uFF1F",onOk:()=>Je(void 0,null,function*(){const Yt=yield(0,m.ZP)(`/api/student_works/${Ee.homeworkId}/deal_appeal_score.json`,{method:"post",body:{score_id:ve.score_id,status:4}});(Yt==null?void 0:Yt.status)===0&&U()})})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))))))}}),tt=ve=>{vr(null),Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{ve==="next"?ge.history.push(`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/${pe==null?void 0:pe.student_work_id}/comment?page=${ot.get("page")}`):ge.history.push(`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/${ft==null?void 0:ft.student_work_id}/comment?page=${ot.get("page")}`)},200)},Tt=ve=>{yr(""),ve.target.value&&(console.log("\u8FDB\u6765",Re),ve.target.value=ve.target.value>(Re==null?void 0:Re.repeat_setting_score)?Re==null?void 0:Re.repeat_setting_score:ve.target.value,yr(ve.target.value))},lt=()=>Je(void 0,null,function*(){const ve=yield(0,m.ZP)(`/api/student_works/${Re==null?void 0:Re.work_id}/update_repeat_score`,{method:"put",body:{score:cr}});yield Wt({type:"shixunHomeworks/gethomeWorkReport",payload:ze({},Ee)}),ve.status===0&&u.ZP.info("\u64CD\u4F5C\u6210\u529F")});return console.log(!!(Re!=null&&Re.category),Re==null?void 0:Re.course_id,"homeWorkReport"),S.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},S.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},S.createElement(_.Z,{loading:$t,active:!0,avatar:{size:40},paragraph:{rows:5}},S.createElement("div",{className:"edu-container"},(Re==null?void 0:Re.course_id)&&S.createElement("section",{className:"animated fadeIn"},S.createElement("aside",{className:""},(Re==null?void 0:Re.category)&&S.createElement(C.Z,{separator:">"},S.createElement(C.Z.Item,null,S.createElement(ge.Link,{to:`/classrooms/${Re==null?void 0:Re.course_id}/common_homework`},Re==null?void 0:Re.course_name)),S.createElement(C.Z.Item,null,S.createElement(ge.Link,{to:`/classrooms/${Re==null?void 0:Re.course_id}/common_homework/${Re!=null&&Re.category.main?"":Re==null?void 0:Re.category.category_id}`},Re==null?void 0:Re.category.category_name)),S.createElement(C.Z.Item,null,S.createElement(ge.Link,{to:`/classrooms/${Re==null?void 0:Re.course_id}/common_homework/${Re==null?void 0:Re.homework_common_id}/detail`},"\u4F5C\u4E1A\u8BE6\u60C5")),S.createElement(C.Z.Item,null,Re==null?void 0:Re.username))),S.createElement("aside",{className:[Be.title1,"mt20"].join(" ")},S.createElement(q.Z,{align:"middle"},S.createElement(D.Z,{flex:1},S.createElement(ge.Link,{to:`/classrooms/${Re==null?void 0:Re.course_id}/common_homework/${Re==null?void 0:Re.homework_common_id}/detail?page=${ot.get("page")}`},S.createElement(P.Z,{className:"font16 c-black"})),S.createElement("strong",{style:{fontWeight:700},className:"font20 ml5"},Re==null?void 0:Re.shixun_name),S.createElement(ye.VV,{status:Re==null?void 0:Re.homework_status})),S.createElement(D.Z,{className:Be.title1_right},!(Re!=null&&Re.is_anonymous)&&!!(Re!=null&&Re.work_status)&&S.createElement(y.ZP,null,S.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),S.createElement(ge.Link,{className:"c-black",target:"_blank",to:`/tasks/${(fr=(qt=Re==null?void 0:Re.shixun_detail)==null?void 0:qt[0])==null?void 0:fr.myshixun_identifier}/jupyter${(0,ie.GJ)()?"":`?homework_common_id=${ee.categoryId}`}`},(0,ie.GJ)()?"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD":"\u67E5\u770B\u5B9E\u8BAD")),(0,ie.GJ)()&&!((Ur=Re==null?void 0:Re.homework_status)!=null&&Ur.includes("\u5DF2\u622A\u6B62"))&&S.createElement(y.ZP,{className:"ml10",onClick:()=>Je(void 0,null,function*(){yield Wt({type:"shixunHomeworks/setActionTabs",payload:{key:"redoShixunModal",homework_common_id:ee.categoryId,student_work_id:ee.homeworkId}})})},S.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),!(Re!=null&&Re.is_anonymous)&&S.createElement(y.ZP,{className:"ml10",onClick:()=>{var ve;if((0,ie.Rm)()&&!((ve=ct.AssistantObject.normal)!=null&&ve.can_download)){u.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}lr("")},loading:_r},S.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,ie.GJ)()&&(Gr==null?void 0:Gr.length)>1&&S.createElement(y.ZP,{className:"ml10",onClick:()=>{var ve;if((0,ie.Rm)()&&!((ve=ct.AssistantObject.normal)!=null&&ve.can_download)){u.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}lr("all")}},S.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),S.createElement("aside",{className:"mt30 relative"})),S.createElement("aside",{className:"edu-container bg-white",ref:dt},S.createElement("div",{id:"export-all",ref:Zt},S.createElement("div",{id:"export-all-1"},S.createElement("div",{className:Be.title},S.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),S.createElement("div",null,!((St=Re==null?void 0:Re.homework_status)!=null&&St.includes("\u5DF2\u622A\u6B62")&&(0,ie.dE)())&&((0,ie.GJ)()||(Re==null?void 0:Re.is_anonymous))&&S.createElement(y.ZP,{className:"mr20",type:"primary",onClick:()=>{Wt({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Re==null?void 0:Re.user_id,data:ze({},Re)}}})}},S.createElement(X.Z,null),Re!=null&&Re.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),S.createElement(x.Z,{style:{marginTop:0}}),S.createElement(q.Z,{className:"pl30 pr30"},S.createElement(D.Z,null,S.createElement("img",{className:Be.userPic,src:`${we.Z.IMG_SERVER}/images/${Re==null?void 0:Re.image_url}`,alt:Re==null?void 0:Re.username})),S.createElement(D.Z,{className:"pt20"},S.createElement("span",{className:"font16 ml40"},Re==null?void 0:Re.username),S.createElement(ye.Y,{status:Re==null?void 0:Re.work_status}),S.createElement("ul",{className:Be.userInfo},S.createElement("li",null,"\u5B66\u53F7\uFF1A",(Re==null?void 0:Re.student_id)||"--"),((0,ie.GJ)()||!(Re!=null&&Re.is_anonymous))&&S.createElement("li",null,"\u5206\u73ED\uFF1A",(Re==null?void 0:Re.group_name)||"--"),S.createElement("br",null)))),S.createElement("aside",{className:"pl30 pr30 mt30 mb10"},S.createElement(j.default,{dataSource:Re==null?void 0:Re.stage_list,rowKey:ve=>ve==null?void 0:ve.challenge_id,pagination:!1,columns:Ke})),((Re==null?void 0:Re.work_comment_hidden)||(Re==null?void 0:Re.work_comment))&&S.createElement("div",null,S.createElement(q.Z,{align:"middle"},S.createElement(D.Z,{flex:1},S.createElement("h1",{className:Be.title},"\u70B9\u8BC4\u5185\u5BB9")),S.createElement(D.Z,{className:"pr30"},(0,ie.GJ)()&&S.createElement(y.ZP,{onClick:()=>Je(void 0,null,function*(){O.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:S.createElement(fe.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return Je(this,null,function*(){(yield(0,p.gZ)({comment_id:Re==null?void 0:Re.comment_id,homeworkId:Ee.homeworkId})).status===0&&(u.ZP.success("\u5220\u9664\u6210\u529F"),U())})}})})},S.createElement(_e.Z,null),"\u5220\u9664"))),(Re==null?void 0:Re.work_comment)&&S.createElement("aside",{className:"pl30 pr30",style:{marginTop:"-5px"}},S.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),S.createElement("br",null),S.createElement(L.Z,{value:Re==null?void 0:Re.work_comment,className:"font14"})),(Re==null?void 0:Re.work_comment_hidden)&&S.createElement("aside",{className:"pl30 pr30 mt15"},S.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),S.createElement("br",null),S.createElement(L.Z,{value:Re==null?void 0:Re.work_comment_hidden,className:"font14"}))),(Re==null?void 0:Re.comment_scores.length)>0&&S.createElement(S.Fragment,null,S.createElement("h1",{className:Be.title},"\u8C03\u5206\u539F\u56E0"),S.createElement("aside",{className:"pl30 pr30",style:{marginTop:"4px"}},S.createElement(M.Z,{items:et}))),((er=Re==null?void 0:Re.shixun_detail[0])==null?void 0:er.myshixun_identifier)&&S.createElement(S.Fragment,null,S.createElement("h1",{className:Be.title,style:{marginTop:"-20px"}},"\u5B9E\u8BAD\u8BE6\u60C5"),S.createElement("aside",{className:"pl30 pr30"},S.createElement("div",{className:Be.shixunWrp},S.createElement("h2",null,S.createElement("span",null,"\u8BC4\u6D4B\u4EE3\u7801",S.createElement("span",{className:"ml5 font12 c-grey-999"},"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5")),S.createElement("span",null,S.createElement(H.default,{style:{width:200},value:(Ue=Re==null?void 0:Re.shixun_detail[0])==null?void 0:Ue.path}," ",Re==null?void 0:Re.shixun_detail.map(ve=>S.createElement(Option,{value:ve.path},ve.path))," "))),S.createElement(R.Z,{spinning:_n},S.createElement("div",{style:{width:"100%",minHeight:"550px",padding:"16px"},dangerouslySetInnerHTML:{__html:Er}})))))))),((0,ie.GJ)()||(Re==null?void 0:Re.is_anonymous))&&S.createElement("aside",{className:`${Be.footerBar} ${_r?Be.footerBarStatic:""}`},S.createElement("aside",{className:"edu-container"},S.createElement(q.Z,{align:"middle"},S.createElement(D.Z,{flex:"1"},S.createElement(ge.Link,{className:Be.exitComment,to:`/classrooms/${Ee.coursesId}/common_homework/${Ee.categoryId}/detail?page=${ot.get("page")}`},"\u8FD4\u56DE\u5217\u8868")),S.createElement(D.Z,{flex:"1",className:"tr"},S.createElement(y.ZP,{type:"default",disabled:ft==null?void 0:ft.last,onClick:()=>tt()},"\u4E0A\u4E00\u4E2A"),S.createElement(y.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:pe==null?void 0:pe.last,onClick:()=>tt("next")},"\u4E0B\u4E00\u4E2A"),!((be=Re==null?void 0:Re.homework_status)!=null&&be.includes("\u5DF2\u622A\u6B62")&&(0,ie.dE)())&&((0,ie.GJ)()||(Re==null?void 0:Re.is_anonymous))&&S.createElement(y.ZP,{type:"primary",onClick:()=>Je(void 0,null,function*(){Wt({type:"classroomList/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Re==null?void 0:Re.user_id,data:ze({},Re)}}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),S.createElement(Ct,{gethomeworkreport:U,homeWorkReport:Re}),S.createElement(ht,{gethomeworkreport:U,homeWorkReport:Re}),S.createElement(Ut.Z,{getData:U}),S.createElement(O.default,{open:Kr,width:860,centered:!0,onCancel:()=>{ln(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},S.createElement("div",{style:{color:"#333333",fontWeight:400}},S.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),S.createElement("br",null),S.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),S.createElement("br",null),S.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),S.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),S.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),S.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},S.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),S.createElement("br",null),S.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),S.createElement("br",null),S.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),S.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),S.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),S.createElement("br",null),S.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),S.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},S.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),S.createElement("br",null),S.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),S.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},S.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),S.createElement("br",null),S.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),S.createElement(O.default,{open:dn,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Cn(!1)},width:600},S.createElement("div",{style:{fontWeight:400,color:"#333333"}},S.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",S.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),S.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",S.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),S.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",S.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))};var st=(0,ge.connect)(({shixunHomeworks:Xe,classroomList:Ve,loading:Ze,globalSetting:ct,user:yt})=>({shixunHomeworks:Xe,classroomList:Ve,globalSetting:ct,loading:Ze.effects,user:yt}))(ut)},16143:function(dr,vt,K){"use strict";var V=K(62957),me=K(6767),Se=K(38986),he=K(25690),W=K(48790),m=K(59301),ge=(u,q,D)=>new Promise((y,_)=>{var C=M=>{try{j(D.next(M))}catch(H){_(H)}},x=M=>{try{j(D.throw(M))}catch(H){_(H)}},j=M=>M.done?y(M.value):Promise.resolve(M.value).then(C,x);j((D=D.apply(u,q)).next())});const O=({shixunHomeworks:u,dispatch:q,classroomList:D,getData:y})=>m.createElement(V.default,{centered:!0,title:"\u63D0\u793A",open:u.actionTabs.key==="redoShixunModal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ge(void 0,null,function*(){var _;if((0,W.Rm)()&&!((_=D.AssistantObject.normal)!=null&&_.can_redo)){me.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(yield(0,Se.ZP)(`/api/homework_commons/${u.actionTabs.homework_common_id}/batch_redo_modal.json`,{method:"post",body:{student_work_id:u.actionTabs.student_work_id}})).status===0&&(me.ZP.success("\u64CD\u4F5C\u6210\u529F"),q({type:"shixunHomeworks/setActionTabs",payload:{}}),y())}),onCancel:()=>{q({type:"shixunHomeworks/setActionTabs",payload:{}})}},m.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C",u.actionTabs.isshixun?"\u5B66\u751F\u5B9E\u8BAD":"\u5B66\u751F\u4F5C\u54C1\u63D0\u4EA4","\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),m.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"));vt.Z=(0,he.connect)(({shixunHomeworks:u,classroomList:q})=>({shixunHomeworks:u,classroomList:q}))(O)},71114:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return Pe}});var V=K(59301),me=K(92310),Se=K.n(me),he=K(48755),W=K(83397),m=K(93083),ge=K(63356),O=K(16931),u=K(51636);const q=ue=>{const{componentCls:Me,calc:Z}=ue;return{[Me]:Object.assign(Object.assign({},(0,ge.Wf)(ue)),{margin:0,padding:0,listStyle:"none",[`${Me}-item`]:{position:"relative",margin:0,paddingBottom:ue.itemPaddingBottom,fontSize:ue.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:ue.itemHeadSize,insetInlineStart:Z(Z(ue.itemHeadSize).sub(ue.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,m.unit)(ue.itemHeadSize)})`,borderInlineStart:`${(0,m.unit)(ue.tailWidth)} ${ue.lineType} ${ue.tailColor}`},"&-pending":{[`${Me}-item-head`]:{fontSize:ue.fontSizeSM,backgroundColor:"transparent"},[`${Me}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:ue.itemHeadSize,height:ue.itemHeadSize,backgroundColor:ue.dotBg,border:`${(0,m.unit)(ue.dotBorderWidth)} ${ue.lineType} transparent`,borderRadius:"50%","&-blue":{color:ue.colorPrimary,borderColor:ue.colorPrimary},"&-red":{color:ue.colorError,borderColor:ue.colorError},"&-green":{color:ue.colorSuccess,borderColor:ue.colorSuccess},"&-gray":{color:ue.colorTextDisabled,borderColor:ue.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:Z(ue.itemHeadSize).div(2).equal(),insetInlineStart:Z(ue.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:ue.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:Z(Z(ue.fontSize).mul(ue.lineHeight).sub(ue.fontSize)).mul(-1).add(ue.lineWidth).equal(),marginInlineStart:Z(ue.margin).add(ue.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Me}-item-tail`]:{display:"none"},[`> ${Me}-item-content`]:{minHeight:Z(ue.controlHeightLG).mul(1.2).equal()}}},[`&${Me}-alternate,
&${Me}-right,
&${Me}-label`]:{[`${Me}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:Z(ue.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:Z(ue.tailWidth).div(2).equal()}},"&-left":{[`${Me}-item-content`]:{insetInlineStart:`calc(50% - ${(0,m.unit)(ue.marginXXS)})`,width:`calc(50% - ${(0,m.unit)(ue.marginSM)})`,textAlign:"start"}},"&-right":{[`${Me}-item-content`]:{width:`calc(50% - ${(0,m.unit)(ue.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${Me}-right`]:{[`${Me}-item-right`]:{[`${Me}-item-tail,
${Me}-item-head,
${Me}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,m.unit)(Z(Z(ue.itemHeadSize).add(ue.tailWidth)).div(2).equal())})`},[`${Me}-item-content`]:{width:`calc(100% - ${(0,m.unit)(Z(ue.itemHeadSize).add(ue.marginXS).equal())})`}}},[`&${Me}-pending
${Me}-item-last
${Me}-item-tail`]:{display:"block",height:`calc(100% - ${(0,m.unit)(ue.margin)})`,borderInlineStart:`${(0,m.unit)(ue.tailWidth)} dotted ${ue.tailColor}`},[`&${Me}-reverse
${Me}-item-last
${Me}-item-tail`]:{display:"none"},[`&${Me}-reverse ${Me}-item-pending`]:{[`${Me}-item-tail`]:{insetBlockStart:ue.margin,display:"block",height:`calc(100% - ${(0,m.unit)(ue.margin)})`,borderInlineStart:`${(0,m.unit)(ue.tailWidth)} dotted ${ue.tailColor}`},[`${Me}-item-content`]:{minHeight:Z(ue.controlHeightLG).mul(1.2).equal()}},[`&${Me}-label`]:{[`${Me}-item-label`]:{position:"absolute",insetBlockStart:Z(Z(ue.fontSize).mul(ue.lineHeight).sub(ue.fontSize)).mul(-1).add(ue.tailWidth).equal(),width:`calc(50% - ${(0,m.unit)(ue.marginSM)})`,textAlign:"end"},[`${Me}-item-right`]:{[`${Me}-item-label`]:{insetInlineStart:`calc(50% + ${(0,m.unit)(ue.marginSM)})`,width:`calc(50% - ${(0,m.unit)(ue.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Me}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},D=ue=>({tailColor:ue.colorSplit,tailWidth:ue.lineWidthBold,dotBorderWidth:ue.wireframe?ue.lineWidthBold:ue.lineWidth*3,dotBg:ue.colorBgContainer,itemPaddingBottom:ue.padding*1.25});var y=(0,O.I$)("Timeline",ue=>{const Me=(0,u.mergeToken)(ue,{itemHeadSize:10,customHeadPaddingVertical:ue.paddingXXS,paddingInlineEnd:2});return[q(Me)]},D),_=function(ue,Me){var Z={};for(var I in ue)Object.prototype.hasOwnProperty.call(ue,I)&&Me.indexOf(I)<0&&(Z[I]=ue[I]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(ue);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(ue,I[G])&&(Z[I[G]]=ue[I[G]]);return Z},x=ue=>{var{prefixCls:Me,className:Z,color:I="blue",dot:G,pending:z=!1,position:se,label:re,children:w}=ue,B=_(ue,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:$}=V.useContext(he.E_),ae=$("timeline",Me),$e=Se()(`${ae}-item`,{[`${ae}-item-pending`]:z},Z),qe=/blue|red|green|gray/.test(I||"")?void 0:I,Bt=Se()(`${ae}-item-head`,{[`${ae}-item-head-custom`]:!!G,[`${ae}-item-head-${I}`]:!qe});return V.createElement("li",Object.assign({},B,{className:$e}),re&&V.createElement("div",{className:`${ae}-item-label`},re),V.createElement("div",{className:`${ae}-item-tail`}),V.createElement("div",{className:Bt,style:{borderColor:qe,color:qe}},G),V.createElement("div",{className:`${ae}-item-content`},w))},j=K(95190),M=K(58617),H=function(ue,Me){var Z={};for(var I in ue)Object.prototype.hasOwnProperty.call(ue,I)&&Me.indexOf(I)<0&&(Z[I]=ue[I]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(ue);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(ue,I[G])&&(Z[I[G]]=ue[I[G]]);return Z},P=ue=>{var{prefixCls:Me,className:Z,pending:I=!1,children:G,items:z,rootClassName:se,reverse:re=!1,direction:w,hashId:B,pendingDot:$,mode:ae=""}=ue,$e=H(ue,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const qe=(Le,Ct)=>ae==="alternate"?Le==="right"?`${Me}-item-right`:Le==="left"?`${Me}-item-left`:Ct%2===0?`${Me}-item-left`:`${Me}-item-right`:ae==="left"?`${Me}-item-left`:ae==="right"?`${Me}-item-right`:Le==="right"?`${Me}-item-right`:"",Bt=(0,j.Z)(z||[]),pt=typeof I=="boolean"?null:I;I&&Bt.push({pending:!!I,dot:$||V.createElement(M.Z,null),children:pt}),re&&Bt.reverse();const Qt=Bt.length,xt=`${Me}-item-last`,ht=Bt.filter(Le=>!!Le).map((Le,Ct)=>{var Ut;const Be=Ct===Qt-2?xt:"",L=Ct===Qt-1?xt:"",{className:p}=Le,b=H(Le,["className"]);return V.createElement(x,Object.assign({},b,{className:Se()([p,!re&&I?Be:L,qe((Ut=Le==null?void 0:Le.position)!==null&&Ut!==void 0?Ut:"",Ct)]),key:(Le==null?void 0:Le.key)||Ct}))}),De=Bt.some(Le=>!!(Le!=null&&Le.label)),it=Se()(Me,{[`${Me}-pending`]:!!I,[`${Me}-reverse`]:!!re,[`${Me}-${ae}`]:!!ae&&!De,[`${Me}-label`]:De,[`${Me}-rtl`]:w==="rtl"},Z,se,B);return V.createElement("ul",Object.assign({},$e,{className:it}),ht)},X=K(11592);function fe(ue,Me){return ue&&Array.isArray(ue)?ue:(0,X.Z)(Me).map(Z=>{var I,G;return Object.assign({children:(G=(I=Z==null?void 0:Z.props)===null||I===void 0?void 0:I.children)!==null&&G!==void 0?G:""},Z.props)})}var _e=fe,we=function(ue,Me){var Z={};for(var I in ue)Object.prototype.hasOwnProperty.call(ue,I)&&Me.indexOf(I)<0&&(Z[I]=ue[I]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,I=Object.getOwnPropertySymbols(ue);G<I.length;G++)Me.indexOf(I[G])<0&&Object.prototype.propertyIsEnumerable.call(ue,I[G])&&(Z[I[G]]=ue[I[G]]);return Z};const ie=ue=>{const{getPrefixCls:Me,direction:Z,timeline:I}=V.useContext(he.E_),{prefixCls:G,children:z,items:se,className:re,style:w}=ue,B=we(ue,["prefixCls","children","items","className","style"]),$=Me("timeline",G),ae=(0,W.Z)($),[$e,qe,Bt]=y($,ae),pt=_e(se,z);return $e(V.createElement(P,Object.assign({},B,{className:Se()(I==null?void 0:I.className,re,Bt,ae),style:Object.assign(Object.assign({},I==null?void 0:I.style),w),prefixCls:$,direction:Z,items:pt,hashId:qe})))};ie.Item=x;var ye=ie,Pe=ye},86251:function(dr,vt){"use strict";vt.byteLength=ge,vt.toByteArray=u,vt.fromByteArray=y;for(var K=[],V=[],me=typeof Uint8Array!="undefined"?Uint8Array:Array,Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=0,W=Se.length;he<W;++he)K[he]=Se[he],V[Se.charCodeAt(he)]=he;V[45]=62,V[95]=63;function m(_){var C=_.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=_.indexOf("=");x===-1&&(x=C);var j=x===C?0:4-x%4;return[x,j]}function ge(_){var C=m(_),x=C[0],j=C[1];return(x+j)*3/4-j}function O(_,C,x){return(C+x)*3/4-x}function u(_){var C,x=m(_),j=x[0],M=x[1],H=new me(O(_,j,M)),R=0,P=M>0?j-4:j,X;for(X=0;X<P;X+=4)C=V[_.charCodeAt(X)]<<18|V[_.charCodeAt(X+1)]<<12|V[_.charCodeAt(X+2)]<<6|V[_.charCodeAt(X+3)],H[R++]=C>>16&255,H[R++]=C>>8&255,H[R++]=C&255;return M===2&&(C=V[_.charCodeAt(X)]<<2|V[_.charCodeAt(X+1)]>>4,H[R++]=C&255),M===1&&(C=V[_.charCodeAt(X)]<<10|V[_.charCodeAt(X+1)]<<4|V[_.charCodeAt(X+2)]>>2,H[R++]=C>>8&255,H[R++]=C&255),H}function q(_){return K[_>>18&63]+K[_>>12&63]+K[_>>6&63]+K[_&63]}function D(_,C,x){for(var j,M=[],H=C;H<x;H+=3)j=(_[H]<<16&16711680)+(_[H+1]<<8&65280)+(_[H+2]&255),M.push(q(j));return M.join("")}function y(_){for(var C,x=_.length,j=x%3,M=[],H=16383,R=0,P=x-j;R<P;R+=H)M.push(D(_,R,R+H>P?P:R+H));return j===1?(C=_[x-1],M.push(K[C>>2]+K[C<<4&63]+"==")):j===2&&(C=(_[x-2]<<8)+_[x-1],M.push(K[C>>10]+K[C>>4&63]+K[C<<2&63]+"=")),M.join("")}},19208:function(dr,vt,K){"use strict";var V;var me=K(86251),Se=K(67467),he=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;vt.lW=O,V=R,vt.h2=50;var W=2147483647;V=W,O.TYPED_ARRAY_SUPPORT=m(),!O.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{var L=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(L,p),L.foo()===42}catch(b){return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function ge(L){if(L>W)throw new RangeError('The value "'+L+'" is invalid for option "size"');var p=new Uint8Array(L);return Object.setPrototypeOf(p,O.prototype),p}function O(L,p,b){if(typeof L=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(L)}return u(L,p,b)}O.poolSize=8192;function u(L,p,b){if(typeof L=="string")return _(L,p);if(ArrayBuffer.isView(L))return x(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(Ct(L,ArrayBuffer)||L&&Ct(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ct(L,SharedArrayBuffer)||L&&Ct(L.buffer,SharedArrayBuffer)))return j(L,p,b);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=L.valueOf&&L.valueOf();if(N!=null&&N!==L)return O.from(N,p,b);var S=M(L);if(S)return S;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return O.from(L[Symbol.toPrimitive]("string"),p,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}O.from=function(L,p,b){return u(L,p,b)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function q(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function D(L,p,b){return q(L),L<=0?ge(L):p!==void 0?typeof b=="string"?ge(L).fill(p,b):ge(L).fill(p):ge(L)}O.alloc=function(L,p,b){return D(L,p,b)};function y(L){return q(L),ge(L<0?0:H(L)|0)}O.allocUnsafe=function(L){return y(L)},O.allocUnsafeSlow=function(L){return y(L)};function _(L,p){if((typeof p!="string"||p==="")&&(p="utf8"),!O.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var b=P(L,p)|0,N=ge(b),S=N.write(L,p);return S!==b&&(N=N.slice(0,S)),N}function C(L){for(var p=L.length<0?0:H(L.length)|0,b=ge(p),N=0;N<p;N+=1)b[N]=L[N]&255;return b}function x(L){if(Ct(L,Uint8Array)){var p=new Uint8Array(L);return j(p.buffer,p.byteOffset,p.byteLength)}return C(L)}function j(L,p,b){if(p<0||L.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<p+(b||0))throw new RangeError('"length" is outside of buffer bounds');var N;return p===void 0&&b===void 0?N=new Uint8Array(L):b===void 0?N=new Uint8Array(L,p):N=new Uint8Array(L,p,b),Object.setPrototypeOf(N,O.prototype),N}function M(L){if(O.isBuffer(L)){var p=H(L.length)|0,b=ge(p);return b.length===0||L.copy(b,0,0,p),b}if(L.length!==void 0)return typeof L.length!="number"||Ut(L.length)?ge(0):C(L);if(L.type==="Buffer"&&Array.isArray(L.data))return C(L.data)}function H(L){if(L>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return L|0}function R(L){return+L!=L&&(L=0),O.alloc(+L)}O.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==O.prototype},O.compare=function(p,b){if(Ct(p,Uint8Array)&&(p=O.from(p,p.offset,p.byteLength)),Ct(b,Uint8Array)&&(b=O.from(b,b.offset,b.byteLength)),!O.isBuffer(p)||!O.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===b)return 0;for(var N=p.length,S=b.length,k=0,te=Math.min(N,S);k<te;++k)if(p[k]!==b[k]){N=p[k],S=b[k];break}return N<S?-1:S<N?1:0},O.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},O.concat=function(p,b){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return O.alloc(0);var N;if(b===void 0)for(b=0,N=0;N<p.length;++N)b+=p[N].length;var S=O.allocUnsafe(b),k=0;for(N=0;N<p.length;++N){var te=p[N];if(Ct(te,Uint8Array))k+te.length>S.length?O.from(te).copy(S,k):Uint8Array.prototype.set.call(S,te,k);else if(O.isBuffer(te))te.copy(S,k);else throw new TypeError('"list" argument must be an Array of Buffers');k+=te.length}return S};function P(L,p){if(O.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||Ct(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var b=L.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&b===0)return 0;for(var S=!1;;)switch(p){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return xt(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return it(L).length;default:if(S)return N?-1:xt(L).length;p=(""+p).toLowerCase(),S=!0}}O.byteLength=P;function X(L,p,b){var N=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,p>>>=0,b<=p))return"";for(L||(L="utf8");;)switch(L){case"hex":return w(this,p,b);case"utf8":case"utf-8":return I(this,p,b);case"ascii":return se(this,p,b);case"latin1":case"binary":return re(this,p,b);case"base64":return Z(this,p,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,p,b);default:if(N)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),N=!0}}O.prototype._isBuffer=!0;function fe(L,p,b){var N=L[p];L[p]=L[b],L[b]=N}O.prototype.swap16=function(){var p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;b<p;b+=2)fe(this,b,b+1);return this},O.prototype.swap32=function(){var p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<p;b+=4)fe(this,b,b+3),fe(this,b+1,b+2);return this},O.prototype.swap64=function(){var p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<p;b+=8)fe(this,b,b+7),fe(this,b+1,b+6),fe(this,b+2,b+5),fe(this,b+3,b+4);return this},O.prototype.toString=function(){var p=this.length;return p===0?"":arguments.length===0?I(this,0,p):X.apply(this,arguments)},O.prototype.toLocaleString=O.prototype.toString,O.prototype.equals=function(p){if(!O.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:O.compare(this,p)===0},O.prototype.inspect=function(){var p="",b=vt.h2;return p=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(p+=" ... "),"<Buffer "+p+">"},he&&(O.prototype[he]=O.prototype.inspect),O.prototype.compare=function(p,b,N,S,k){if(Ct(p,Uint8Array)&&(p=O.from(p,p.offset,p.byteLength)),!O.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(b===void 0&&(b=0),N===void 0&&(N=p?p.length:0),S===void 0&&(S=0),k===void 0&&(k=this.length),b<0||N>p.length||S<0||k>this.length)throw new RangeError("out of range index");if(S>=k&&b>=N)return 0;if(S>=k)return-1;if(b>=N)return 1;if(b>>>=0,N>>>=0,S>>>=0,k>>>=0,this===p)return 0;for(var te=k-S,Fe=N-b,ke=Math.min(te,Fe),Ge=this.slice(S,k),ze=p.slice(b,N),Ft=0;Ft<ke;++Ft)if(Ge[Ft]!==ze[Ft]){te=Ge[Ft],Fe=ze[Ft];break}return te<Fe?-1:Fe<te?1:0};function _e(L,p,b,N,S){if(L.length===0)return-1;if(typeof b=="string"?(N=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Ut(b)&&(b=S?0:L.length-1),b<0&&(b=L.length+b),b>=L.length){if(S)return-1;b=L.length-1}else if(b<0)if(S)b=0;else return-1;if(typeof p=="string"&&(p=O.from(p,N)),O.isBuffer(p))return p.length===0?-1:we(L,p,b,N,S);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?S?Uint8Array.prototype.indexOf.call(L,p,b):Uint8Array.prototype.lastIndexOf.call(L,p,b):we(L,[p],b,N,S);throw new TypeError("val must be string, number or Buffer")}function we(L,p,b,N,S){var k=1,te=L.length,Fe=p.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(L.length<2||p.length<2)return-1;k=2,te/=2,Fe/=2,b/=2}function ke(ut,st){return k===1?ut[st]:ut.readUInt16BE(st*k)}var Ge;if(S){var ze=-1;for(Ge=b;Ge<te;Ge++)if(ke(L,Ge)===ke(p,ze===-1?0:Ge-ze)){if(ze===-1&&(ze=Ge),Ge-ze+1===Fe)return ze*k}else ze!==-1&&(Ge-=Ge-ze),ze=-1}else for(b+Fe>te&&(b=te-Fe),Ge=b;Ge>=0;Ge--){for(var Ft=!0,Je=0;Je<Fe;Je++)if(ke(L,Ge+Je)!==ke(p,Je)){Ft=!1;break}if(Ft)return Ge}return-1}O.prototype.includes=function(p,b,N){return this.indexOf(p,b,N)!==-1},O.prototype.indexOf=function(p,b,N){return _e(this,p,b,N,!0)},O.prototype.lastIndexOf=function(p,b,N){return _e(this,p,b,N,!1)};function ie(L,p,b,N){b=Number(b)||0;var S=L.length-b;N?(N=Number(N),N>S&&(N=S)):N=S;var k=p.length;N>k/2&&(N=k/2);for(var te=0;te<N;++te){var Fe=parseInt(p.substr(te*2,2),16);if(Ut(Fe))return te;L[b+te]=Fe}return te}function ye(L,p,b,N){return Le(xt(p,L.length-b),L,b,N)}function Pe(L,p,b,N){return Le(ht(p),L,b,N)}function ue(L,p,b,N){return Le(it(p),L,b,N)}function Me(L,p,b,N){return Le(De(p,L.length-b),L,b,N)}O.prototype.write=function(p,b,N,S){if(b===void 0)S="utf8",N=this.length,b=0;else if(N===void 0&&typeof b=="string")S=b,N=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(N)?(N=N>>>0,S===void 0&&(S="utf8")):(S=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var k=this.length-b;if((N===void 0||N>k)&&(N=k),p.length>0&&(N<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var te=!1;;)switch(S){case"hex":return ie(this,p,b,N);case"utf8":case"utf-8":return ye(this,p,b,N);case"ascii":case"latin1":case"binary":return Pe(this,p,b,N);case"base64":return ue(this,p,b,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,p,b,N);default:if(te)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),te=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(L,p,b){return p===0&&b===L.length?me.fromByteArray(L):me.fromByteArray(L.slice(p,b))}function I(L,p,b){b=Math.min(L.length,b);for(var N=[],S=p;S<b;){var k=L[S],te=null,Fe=k>239?4:k>223?3:k>191?2:1;if(S+Fe<=b){var ke,Ge,ze,Ft;switch(Fe){case 1:k<128&&(te=k);break;case 2:ke=L[S+1],(ke&192)===128&&(Ft=(k&31)<<6|ke&63,Ft>127&&(te=Ft));break;case 3:ke=L[S+1],Ge=L[S+2],(ke&192)===128&&(Ge&192)===128&&(Ft=(k&15)<<12|(ke&63)<<6|Ge&63,Ft>2047&&(Ft<55296||Ft>57343)&&(te=Ft));break;case 4:ke=L[S+1],Ge=L[S+2],ze=L[S+3],(ke&192)===128&&(Ge&192)===128&&(ze&192)===128&&(Ft=(k&15)<<18|(ke&63)<<12|(Ge&63)<<6|ze&63,Ft>65535&&Ft<1114112&&(te=Ft))}}te===null?(te=65533,Fe=1):te>65535&&(te-=65536,N.push(te>>>10&1023|55296),te=56320|te&1023),N.push(te),S+=Fe}return z(N)}var G=4096;function z(L){var p=L.length;if(p<=G)return String.fromCharCode.apply(String,L);for(var b="",N=0;N<p;)b+=String.fromCharCode.apply(String,L.slice(N,N+=G));return b}function se(L,p,b){var N="";b=Math.min(L.length,b);for(var S=p;S<b;++S)N+=String.fromCharCode(L[S]&127);return N}function re(L,p,b){var N="";b=Math.min(L.length,b);for(var S=p;S<b;++S)N+=String.fromCharCode(L[S]);return N}function w(L,p,b){var N=L.length;(!p||p<0)&&(p=0),(!b||b<0||b>N)&&(b=N);for(var S="",k=p;k<b;++k)S+=Be[L[k]];return S}function B(L,p,b){for(var N=L.slice(p,b),S="",k=0;k<N.length-1;k+=2)S+=String.fromCharCode(N[k]+N[k+1]*256);return S}O.prototype.slice=function(p,b){var N=this.length;p=~~p,b=b===void 0?N:~~b,p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),b<0?(b+=N,b<0&&(b=0)):b>N&&(b=N),b<p&&(b=p);var S=this.subarray(p,b);return Object.setPrototypeOf(S,O.prototype),S};function $(L,p,b){if(L%1!==0||L<0)throw new RangeError("offset is not uint");if(L+p>b)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(p,b,N){p=p>>>0,b=b>>>0,N||$(p,b,this.length);for(var S=this[p],k=1,te=0;++te<b&&(k*=256);)S+=this[p+te]*k;return S},O.prototype.readUintBE=O.prototype.readUIntBE=function(p,b,N){p=p>>>0,b=b>>>0,N||$(p,b,this.length);for(var S=this[p+--b],k=1;b>0&&(k*=256);)S+=this[p+--b]*k;return S},O.prototype.readUint8=O.prototype.readUInt8=function(p,b){return p=p>>>0,b||$(p,1,this.length),this[p]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(p,b){return p=p>>>0,b||$(p,2,this.length),this[p]|this[p+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(p,b){return p=p>>>0,b||$(p,2,this.length),this[p]<<8|this[p+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(p,b){return p=p>>>0,b||$(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(p,b){return p=p>>>0,b||$(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},O.prototype.readIntLE=function(p,b,N){p=p>>>0,b=b>>>0,N||$(p,b,this.length);for(var S=this[p],k=1,te=0;++te<b&&(k*=256);)S+=this[p+te]*k;return k*=128,S>=k&&(S-=Math.pow(2,8*b)),S},O.prototype.readIntBE=function(p,b,N){p=p>>>0,b=b>>>0,N||$(p,b,this.length);for(var S=b,k=1,te=this[p+--S];S>0&&(k*=256);)te+=this[p+--S]*k;return k*=128,te>=k&&(te-=Math.pow(2,8*b)),te},O.prototype.readInt8=function(p,b){return p=p>>>0,b||$(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},O.prototype.readInt16LE=function(p,b){p=p>>>0,b||$(p,2,this.length);var N=this[p]|this[p+1]<<8;return N&32768?N|4294901760:N},O.prototype.readInt16BE=function(p,b){p=p>>>0,b||$(p,2,this.length);var N=this[p+1]|this[p]<<8;return N&32768?N|4294901760:N},O.prototype.readInt32LE=function(p,b){return p=p>>>0,b||$(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},O.prototype.readInt32BE=function(p,b){return p=p>>>0,b||$(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},O.prototype.readFloatLE=function(p,b){return p=p>>>0,b||$(p,4,this.length),Se.read(this,p,!0,23,4)},O.prototype.readFloatBE=function(p,b){return p=p>>>0,b||$(p,4,this.length),Se.read(this,p,!1,23,4)},O.prototype.readDoubleLE=function(p,b){return p=p>>>0,b||$(p,8,this.length),Se.read(this,p,!0,52,8)},O.prototype.readDoubleBE=function(p,b){return p=p>>>0,b||$(p,8,this.length),Se.read(this,p,!1,52,8)};function ae(L,p,b,N,S,k){if(!O.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>S||p<k)throw new RangeError('"value" argument is out of bounds');if(b+N>L.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(p,b,N,S){if(p=+p,b=b>>>0,N=N>>>0,!S){var k=Math.pow(2,8*N)-1;ae(this,p,b,N,k,0)}var te=1,Fe=0;for(this[b]=p&255;++Fe<N&&(te*=256);)this[b+Fe]=p/te&255;return b+N},O.prototype.writeUintBE=O.prototype.writeUIntBE=function(p,b,N,S){if(p=+p,b=b>>>0,N=N>>>0,!S){var k=Math.pow(2,8*N)-1;ae(this,p,b,N,k,0)}var te=N-1,Fe=1;for(this[b+te]=p&255;--te>=0&&(Fe*=256);)this[b+te]=p/Fe&255;return b+N},O.prototype.writeUint8=O.prototype.writeUInt8=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,1,255,0),this[b]=p&255,b+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,2,65535,0),this[b]=p&255,this[b+1]=p>>>8,b+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,2,65535,0),this[b]=p>>>8,this[b+1]=p&255,b+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,4,4294967295,0),this[b+3]=p>>>24,this[b+2]=p>>>16,this[b+1]=p>>>8,this[b]=p&255,b+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,4,4294967295,0),this[b]=p>>>24,this[b+1]=p>>>16,this[b+2]=p>>>8,this[b+3]=p&255,b+4},O.prototype.writeIntLE=function(p,b,N,S){if(p=+p,b=b>>>0,!S){var k=Math.pow(2,8*N-1);ae(this,p,b,N,k-1,-k)}var te=0,Fe=1,ke=0;for(this[b]=p&255;++te<N&&(Fe*=256);)p<0&&ke===0&&this[b+te-1]!==0&&(ke=1),this[b+te]=(p/Fe>>0)-ke&255;return b+N},O.prototype.writeIntBE=function(p,b,N,S){if(p=+p,b=b>>>0,!S){var k=Math.pow(2,8*N-1);ae(this,p,b,N,k-1,-k)}var te=N-1,Fe=1,ke=0;for(this[b+te]=p&255;--te>=0&&(Fe*=256);)p<0&&ke===0&&this[b+te+1]!==0&&(ke=1),this[b+te]=(p/Fe>>0)-ke&255;return b+N},O.prototype.writeInt8=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,1,127,-128),p<0&&(p=255+p+1),this[b]=p&255,b+1},O.prototype.writeInt16LE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,2,32767,-32768),this[b]=p&255,this[b+1]=p>>>8,b+2},O.prototype.writeInt16BE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,2,32767,-32768),this[b]=p>>>8,this[b+1]=p&255,b+2},O.prototype.writeInt32LE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,4,2147483647,-2147483648),this[b]=p&255,this[b+1]=p>>>8,this[b+2]=p>>>16,this[b+3]=p>>>24,b+4},O.prototype.writeInt32BE=function(p,b,N){return p=+p,b=b>>>0,N||ae(this,p,b,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[b]=p>>>24,this[b+1]=p>>>16,this[b+2]=p>>>8,this[b+3]=p&255,b+4};function $e(L,p,b,N,S,k){if(b+N>L.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function qe(L,p,b,N,S){return p=+p,b=b>>>0,S||$e(L,p,b,4,34028234663852886e22,-34028234663852886e22),Se.write(L,p,b,N,23,4),b+4}O.prototype.writeFloatLE=function(p,b,N){return qe(this,p,b,!0,N)},O.prototype.writeFloatBE=function(p,b,N){return qe(this,p,b,!1,N)};function Bt(L,p,b,N,S){return p=+p,b=b>>>0,S||$e(L,p,b,8,17976931348623157e292,-17976931348623157e292),Se.write(L,p,b,N,52,8),b+8}O.prototype.writeDoubleLE=function(p,b,N){return Bt(this,p,b,!0,N)},O.prototype.writeDoubleBE=function(p,b,N){return Bt(this,p,b,!1,N)},O.prototype.copy=function(p,b,N,S){if(!O.isBuffer(p))throw new TypeError("argument should be a Buffer");if(N||(N=0),!S&&S!==0&&(S=this.length),b>=p.length&&(b=p.length),b||(b=0),S>0&&S<N&&(S=N),S===N||p.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),p.length-b<S-N&&(S=p.length-b+N);var k=S-N;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,N,S):Uint8Array.prototype.set.call(p,this.subarray(N,S),b),k},O.prototype.fill=function(p,b,N,S){if(typeof p=="string"){if(typeof b=="string"?(S=b,b=0,N=this.length):typeof N=="string"&&(S=N,N=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!O.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(p.length===1){var k=p.charCodeAt(0);(S==="utf8"&&k<128||S==="latin1")&&(p=k)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(b<0||this.length<b||this.length<N)throw new RangeError("Out of range index");if(N<=b)return this;b=b>>>0,N=N===void 0?this.length:N>>>0,p||(p=0);var te;if(typeof p=="number")for(te=b;te<N;++te)this[te]=p;else{var Fe=O.isBuffer(p)?p:O.from(p,S),ke=Fe.length;if(ke===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(te=0;te<N-b;++te)this[te+b]=Fe[te%ke]}return this};var pt=/[^+/0-9A-Za-z-_]/g;function Qt(L){if(L=L.split("=")[0],L=L.trim().replace(pt,""),L.length<2)return"";for(;L.length%4!==0;)L=L+"=";return L}function xt(L,p){p=p||1/0;for(var b,N=L.length,S=null,k=[],te=0;te<N;++te){if(b=L.charCodeAt(te),b>55295&&b<57344){if(!S){if(b>56319){(p-=3)>-1&&k.push(239,191,189);continue}else if(te+1===N){(p-=3)>-1&&k.push(239,191,189);continue}S=b;continue}if(b<56320){(p-=3)>-1&&k.push(239,191,189),S=b;continue}b=(S-55296<<10|b-56320)+65536}else S&&(p-=3)>-1&&k.push(239,191,189);if(S=null,b<128){if((p-=1)<0)break;k.push(b)}else if(b<2048){if((p-=2)<0)break;k.push(b>>6|192,b&63|128)}else if(b<65536){if((p-=3)<0)break;k.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((p-=4)<0)break;k.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return k}function ht(L){for(var p=[],b=0;b<L.length;++b)p.push(L.charCodeAt(b)&255);return p}function De(L,p){for(var b,N,S,k=[],te=0;te<L.length&&!((p-=2)<0);++te)b=L.charCodeAt(te),N=b>>8,S=b%256,k.push(S),k.push(N);return k}function it(L){return me.toByteArray(Qt(L))}function Le(L,p,b,N){for(var S=0;S<N&&!(S+b>=p.length||S>=L.length);++S)p[S+b]=L[S];return S}function Ct(L,p){return L instanceof p||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===p.name}function Ut(L){return L!==L}var Be=function(){for(var L="0123456789abcdef",p=new Array(256),b=0;b<16;++b)for(var N=b*16,S=0;S<16;++S)p[N+S]=L[b]+L[S];return p}()},64018:function(){var dr,vt,K,V=!1,me,Se;window.PR_SHOULD_USE_CONTINUATION=!0;var he,W;(function(){var m=window,ge=["break,continue,do,else,for,if,return,while"],O=[ge,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],u=[O,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],q=[u,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],D=[u,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],y=[u,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],_="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",C=[u,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],x="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",j=[ge,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],M=[ge,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],H=[ge,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[q,y,D,C,x,j,M,H],P=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,X="str",fe="kwd",_e="com",we="typ",ie="lit",ye="pun",Pe="pln",ue="tag",Me="dec",Z="src",I="atn",G="atv",z="nocode",se="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function re(L){for(var p=0,b=!1,N=!1,S=0,k=L.length;S<k;++S){var te=L[S];if(te.ignoreCase)N=!0;else if(/[a-z]/i.test(te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){b=!0,N=!1;break}}var Fe={b:8,t:9,n:10,v:11,f:12,r:13};function ke(ut){var st=ut.charCodeAt(0);if(st!==92)return st;var Xe=ut.charAt(1);return st=Fe[Xe],st||("0"<=Xe&&Xe<="7"?parseInt(ut.substring(1),8):Xe==="u"||Xe==="x"?parseInt(ut.substring(2),16):ut.charCodeAt(1))}function Ge(ut){if(ut<32)return(ut<16?"\\x0":"\\x")+ut.toString(16);var st=String.fromCharCode(ut);return st==="\\"||st==="-"||st==="]"||st==="^"?"\\"+st:st}function ze(ut){var st=ut.substring(1,ut.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Xe=[],Ve=st[0]==="^",Ze=["["];Ve&&Ze.push("^");for(var ct=Ve?1:0,yt=st.length;ct<yt;++ct){var Nt=st[ct];if(/\\[bdsw]/i.test(Nt))Ze.push(Nt);else{var bt=ke(Nt),Wt;ct+2<yt&&st[ct+1]==="-"?(Wt=ke(st[ct+2]),ct+=2):Wt=bt,Xe.push([bt,Wt]),Wt<65||bt>122||(Wt<65||bt>90||Xe.push([Math.max(65,bt)|32,Math.min(Wt,90)|32]),Wt<97||bt>122||Xe.push([Math.max(97,bt)&-33,Math.min(Wt,122)&-33]))}}Xe.sort(function(Ur,St){return Ur[0]-St[0]||St[1]-Ur[1]});for(var Ht=[],qt=[],ct=0;ct<Xe.length;++ct){var fr=Xe[ct];fr[0]<=qt[1]+1?qt[1]=Math.max(qt[1],fr[1]):Ht.push(qt=fr)}for(var ct=0;ct<Ht.length;++ct){var fr=Ht[ct];Ze.push(Ge(fr[0])),fr[1]>fr[0]&&(fr[1]+1>fr[0]&&Ze.push("-"),Ze.push(Ge(fr[1])))}return Ze.push("]"),Ze.join("")}function Ft(ut){for(var st=ut.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Xe=st.length,Ve=[],Ze=0,ct=0;Ze<Xe;++Ze){var yt=st[Ze];if(yt==="(")++ct;else if(yt.charAt(0)==="\\"){var Nt=+yt.substring(1);Nt&&(Nt<=ct?Ve[Nt]=-1:st[Ze]=Ge(Nt))}}for(var Ze=1;Ze<Ve.length;++Ze)Ve[Ze]===-1&&(Ve[Ze]=++p);for(var Ze=0,ct=0;Ze<Xe;++Ze){var yt=st[Ze];if(yt==="(")++ct,Ve[ct]||(st[Ze]="(?:");else if(yt.charAt(0)==="\\"){var Nt=+yt.substring(1);Nt&&Nt<=ct&&(st[Ze]="\\"+Ve[Nt])}}for(var Ze=0;Ze<Xe;++Ze)st[Ze]==="^"&&st[Ze+1]!=="^"&&(st[Ze]="");if(ut.ignoreCase&&b)for(var Ze=0;Ze<Xe;++Ze){var yt=st[Ze],bt=yt.charAt(0);yt.length>=2&&bt==="["?st[Ze]=ze(yt):bt!=="\\"&&(st[Ze]=yt.replace(/[a-zA-Z]/g,function(qt){var fr=qt.charCodeAt(0);return"["+String.fromCharCode(fr&-33,fr|32)+"]"}))}return st.join("")}for(var Je=[],S=0,k=L.length;S<k;++S){var te=L[S];if(te.global||te.multiline)throw new Error(""+te);Je.push("(?:"+Ft(te)+")")}return new RegExp(Je.join("|"),N?"gi":"g")}function w(L,p){var b=/(?:^|\s)nocode(?:\s|$)/,N=[],S=0,k=[],te=0;function Fe(ke){var Ge=ke.nodeType;if(Ge==1){if(b.test(ke.className))return;for(var ze=ke.firstChild;ze;ze=ze.nextSibling)Fe(ze);var Ft=ke.nodeName.toLowerCase();(Ft==="br"||Ft==="li")&&(N[te]=`
`,k[te<<1]=S++,k[te++<<1|1]=ke)}else if(Ge==3||Ge==4){var Je=ke.nodeValue;Je.length&&(p?Je=Je.replace(/\r\n?/g,`
`):Je=Je.replace(/[ \t\r\n]+/g," "),N[te]=Je,k[te<<1]=S,S+=Je.length,k[te++<<1|1]=ke)}}return Fe(L),{sourceCode:N.join("").replace(/\n$/,""),spans:k}}function B(L,p,b,N,S){if(b){var k={sourceNode:L,pre:1,langExtension:null,numberLines:null,sourceCode:b,spans:null,basePos:p,decorations:null};N(k),S.push.apply(S,k.decorations)}}var $=/\S/;function ae(L){for(var p=void 0,b=L.firstChild;b;b=b.nextSibling){var N=b.nodeType;p=N===1?p?L:b:N===3&&$.test(b.nodeValue)?L:p}return p===L?void 0:p}function $e(L,p){var b={},N;(function(){for(var te=L.concat(p),Fe=[],ke={},Ge=0,ze=te.length;Ge<ze;++Ge){var Ft=te[Ge],Je=Ft[3];if(Je)for(var ut=Je.length;--ut>=0;)b[Je.charAt(ut)]=Ft;var st=Ft[1],Xe=""+st;ke.hasOwnProperty(Xe)||(Fe.push(st),ke[Xe]=null)}Fe.push(/[\0-\uffff]/),N=re(Fe)})();var S=p.length,k=function(te){for(var Fe=te.sourceCode,ke=te.basePos,Ge=te.sourceNode,ze=[ke,Pe],Ft=0,Je=Fe.match(N)||[],ut={},st=0,Xe=Je.length;st<Xe;++st){var Ve=Je[st],Ze=ut[Ve],ct=void 0,yt;if(typeof Ze=="string")yt=!1;else{var Nt=b[Ve.charAt(0)];if(Nt)ct=Ve.match(Nt[1]),Ze=Nt[0];else{for(var bt=0;bt<S;++bt)if(Nt=p[bt],ct=Ve.match(Nt[1]),ct){Ze=Nt[0];break}ct||(Ze=Pe)}yt=Ze.length>=5&&Ze.substring(0,5)==="lang-",yt&&!(ct&&typeof ct[1]=="string")&&(yt=!1,Ze=Z),yt||(ut[Ve]=Ze)}var Wt=Ft;if(Ft+=Ve.length,!yt)ze.push(ke+Wt,Ze);else{var Ht=ct[1],qt=Ve.indexOf(Ht),fr=qt+Ht.length;ct[2]&&(fr=Ve.length-ct[2].length,qt=fr-Ht.length);var Ur=Ze.substring(5);B(Ge,ke+Wt,Ve.substring(0,qt),k,ze),B(Ge,ke+Wt+qt,Ht,De(Ur,Ht),ze),B(Ge,ke+Wt+fr,Ve.substring(fr),k,ze)}}te.decorations=ze};return k}function qe(L){var p=[],b=[];L.tripleQuotedStrings?p.push([X,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):L.multiLineStrings?p.push([X,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):p.push([X,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),L.verbatimStrings&&b.push([X,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var N=L.hashComments;N&&(L.cStyleComments?(N>1?p.push([_e,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):p.push([_e,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),b.push([X,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):p.push([_e,/^#[^\r\n]*/,null,"#"])),L.cStyleComments&&(b.push([_e,/^\/\/[^\r\n]*/,null]),b.push([_e,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var S=L.regexLiterals;if(S){var k=S>1?"":`
\r`,te=k?".":"[\\S\\s]",Fe="/(?=[^/*"+k+"])(?:[^/\\x5B\\x5C"+k+"]|\\x5C"+te+"|\\x5B(?:[^\\x5C\\x5D"+k+"]|\\x5C"+te+")*(?:\\x5D|$))+/";b.push(["lang-regex",RegExp("^"+se+"("+Fe+")")])}var ke=L.types;ke&&b.push([we,ke]);var Ge=(""+L.keywords).replace(/^ | $/g,"");Ge.length&&b.push([fe,new RegExp("^(?:"+Ge.replace(/[\s,]+/g,"|")+")\\b"),null]),p.push([Pe,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return L.regexLiterals&&(ze+="(?!s*/)"),b.push([ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[we,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Pe,/^[a-z_$][a-z_$@0-9]*/i,null],[ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Pe,/^\\[\s\S]?/,null],[ye,new RegExp(ze),null]),$e(p,b)}var Bt=qe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pt(L,p,b){for(var N=/(?:^|\s)nocode(?:\s|$)/,S=/\r\n?|\n/,k=L.ownerDocument,te=k.createElement("li");L.firstChild;)te.appendChild(L.firstChild);var Fe=[te];function ke(st){var Xe=st.nodeType;if(Xe==1&&!N.test(st.className))if(st.nodeName==="br")Ge(st),st.parentNode&&st.parentNode.removeChild(st);else for(var Ve=st.firstChild;Ve;Ve=Ve.nextSibling)ke(Ve);else if((Xe==3||Xe==4)&&b){var Ze=st.nodeValue,ct=Ze.match(S);if(ct){var yt=Ze.substring(0,ct.index);st.nodeValue=yt;var Nt=Ze.substring(ct.index+ct[0].length);if(Nt){var bt=st.parentNode;bt.insertBefore(k.createTextNode(Nt),st.nextSibling)}Ge(st),yt||st.parentNode.removeChild(st)}}}function Ge(st){for(;!st.nextSibling;)if(st=st.parentNode,!st)return;function Xe(ct,yt){var Nt=yt?ct.cloneNode(!1):ct,bt=ct.parentNode;if(bt){var Wt=Xe(bt,1),Ht=ct.nextSibling;Wt.appendChild(Nt);for(var qt=Ht;qt;qt=Ht)Ht=qt.nextSibling,Wt.appendChild(qt)}return Nt}for(var Ve=Xe(st.nextSibling,0),Ze;(Ze=Ve.parentNode)&&Ze.nodeType===1;)Ve=Ze;Fe.push(Ve)}for(var ze=0;ze<Fe.length;++ze)ke(Fe[ze]);p===(p|0)&&Fe[0].setAttribute("value",p);var Ft=k.createElement("ol");Ft.className="linenums";for(var Je=Math.max(0,p-1|0)||0,ze=0,ut=Fe.length;ze<ut;++ze)te=Fe[ze],te.className="L"+(ze+Je)%10,te.firstChild||te.appendChild(k.createTextNode("\xA0")),Ft.appendChild(te);L.appendChild(Ft)}function Qt(L){var p=/\bMSIE\s(\d+)/.exec(navigator.userAgent);p=p&&+p[1]<=8;var b=/\n/g,N=L.sourceCode,S=N.length,k=0,te=L.spans,Fe=te.length,ke=0,Ge=L.decorations,ze=Ge.length,Ft=0;Ge[ze]=S;var Je,ut;for(ut=Je=0;ut<ze;)Ge[ut]!==Ge[ut+2]?(Ge[Je++]=Ge[ut++],Ge[Je++]=Ge[ut++]):ut+=2;for(ze=Je,ut=Je=0;ut<ze;){for(var st=Ge[ut],Xe=Ge[ut+1],Ve=ut+2;Ve+2<=ze&&Ge[Ve+1]===Xe;)Ve+=2;Ge[Je++]=st,Ge[Je++]=Xe,ut=Ve}ze=Ge.length=Je;var Ze=L.sourceNode,ct="";Ze&&(ct=Ze.style.display,Ze.style.display="none");try{for(var yt=null;ke<Fe;){var Nt=te[ke],bt=te[ke+2]||S,Wt=Ge[Ft+2]||S,Ve=Math.min(bt,Wt),Ht=te[ke+1],qt;if(Ht.nodeType!==1&&(qt=N.substring(k,Ve))){p&&(qt=qt.replace(b,"\r")),Ht.nodeValue=qt;var fr=Ht.ownerDocument,Ur=fr.createElement("span");Ur.className=Ge[Ft+1];var St=Ht.parentNode;St.replaceChild(Ur,Ht),Ur.appendChild(Ht),k<bt&&(te[ke+1]=Ht=fr.createTextNode(N.substring(Ve,bt)),St.insertBefore(Ht,Ur.nextSibling))}k=Ve,k>=bt&&(ke+=2),k>=Wt&&(Ft+=2)}}finally{Ze&&(Ze.style.display=ct)}}var xt={};function ht(L,p){for(var b=p.length;--b>=0;){var N=p[b];xt.hasOwnProperty(N)?m.console&&console.warn("cannot override language handler %s",N):xt[N]=L}}function De(L,p){return L&&xt.hasOwnProperty(L)||(L=/^\s*</.test(p)?"default-markup":"default-code"),xt[L]}ht(Bt,["default-code"]),ht($e([],[[Pe,/^[^<?]+/],[Me,/^<!\w[^>]*(?:>|$)/],[_e,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ye,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ht($e([[Pe,/^[\s]+/,null,` \r
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ue,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ye,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ht($e([],[[G,/^[\s\S]+/]]),["uq.val"]),ht(qe({keywords:q,hashComments:!0,cStyleComments:!0,types:P}),["c","cc","cpp","cxx","cyc","m"]),ht(qe({keywords:"null,true,false"}),["json"]),ht(qe({keywords:y,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:P}),["cs"]),ht(qe({keywords:D,cStyleComments:!0}),["java"]),ht(qe({keywords:H,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ht(qe({keywords:j,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ht(qe({keywords:x,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ht(qe({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ht(qe({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ht(qe({keywords:_,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ht($e([],[[X,/^[\s\S]+/]]),["regex"]);function it(L){var p=L.langExtension;try{var b=w(L.sourceNode,L.pre),N=b.sourceCode;L.sourceCode=N,L.spans=b.spans,L.basePos=0,De(p,N)(L),Qt(L)}catch(S){m.console&&console.log(S&&S.stack||S)}}function Le(L,p,b){var N=b||!1,S=p||null,k=document.createElement("div");k.innerHTML="<pre>"+L+"</pre>",k=k.firstChild,N&&pt(k,N,!0);var te={langExtension:S,numberLines:N,sourceNode:k,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return it(te),k.innerHTML}function Ct(L,p){var b=p||document.body,N=b.ownerDocument||document;function S(Nt){return b.getElementsByTagName(Nt)}for(var k=[S("pre"),S("code"),S("xmp")],te=[],Fe=0;Fe<k.length;++Fe)for(var ke=0,Ge=k[Fe].length;ke<Ge;++ke)te.push(k[Fe][ke]);k=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var Ft=0,Je=/\blang(?:uage)?-([\w.]+)(?!\S)/,ut=/\bprettyprint\b/,st=/\bprettyprinted\b/,Xe=/pre|xmp/i,Ve=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,ct={};function yt(){for(var Nt=m.PR_SHOULD_USE_CONTINUATION?ze.now()+250:1/0;Ft<te.length&&ze.now()<Nt;Ft++){for(var bt=te[Ft],Wt=ct,Ht=bt;Ht=Ht.previousSibling;){var qt=Ht.nodeType,fr=(qt===7||qt===8)&&Ht.nodeValue;if(fr?!/^\??prettify\b/.test(fr):qt!==3||/\S/.test(Ht.nodeValue))break;if(fr){Wt={},fr.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Et,dt,Zt){Wt[dt]=Zt});break}}var Ur=bt.className;if((Wt!==ct||ut.test(Ur))&&!st.test(Ur)){for(var St=!1,er=bt.parentNode;er;er=er.parentNode){var Ue=er.tagName;if(Ze.test(Ue)&&er.className&&ut.test(er.className)){St=!0;break}}if(!St){bt.className+=" prettyprinted";var be=Wt.lang;if(!be){be=Ur.match(Je);var Ee;!be&&(Ee=ae(bt))&&Ve.test(Ee.tagName)&&(be=Ee.className.match(Je)),be&&(be=be[1])}var Y;if(Xe.test(bt.tagName))Y=1;else{var ee=bt.currentStyle,oe=N.defaultView,pe=ee?ee.whiteSpace:oe&&oe.getComputedStyle?oe.getComputedStyle(bt,null).getPropertyValue("white-space"):0;Y=pe&&pe.substring(0,3)==="pre"}var Ce=Wt.linenums;(Ce=Ce==="true"||+Ce)||(Ce=Ur.match(/\blinenums\b(?::(\d+))?/),Ce=Ce?Ce[1]&&Ce[1].length?+Ce[1]:!0:!1),Ce&&pt(bt,Ce,Y);var ft={langExtension:be,sourceNode:bt,numberLines:Ce,pre:Y,sourceCode:null,basePos:null,spans:null,decorations:null};it(ft)}}}Ft<te.length?m.setTimeout(yt,250):typeof L=="function"&&L()}yt()}var Ut=m.PR={createSimpleLexer:$e,registerLangHandler:ht,sourceDecorator:qe,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:G,PR_COMMENT:_e,PR_DECLARATION:Me,PR_KEYWORD:fe,PR_LITERAL:ie,PR_NOCODE:z,PR_PLAIN:Pe,PR_PUNCTUATION:ye,PR_SOURCE:Z,PR_STRING:X,PR_TAG:ue,PR_TYPE:we,prettyPrintOne:V?m.prettyPrintOne=Le:he=Le,prettyPrint:W=V?m.prettyPrint=Ct:W=Ct},Be=m.define;typeof Be=="function"&&Be.amd&&Be("google-code-prettify",[],function(){return Ut})})()},25769:function(dr,vt,K){"use strict";var V=K(98040),me={"text/plain":"Text","text/html":"Url",default:"Text"},Se="Copy to clipboard: #{key}, Enter";function he(m){var ge=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,ge)}function W(m,ge){var O,u,q,D,y,_,C=!1;ge||(ge={}),O=ge.debug||!1;try{q=V(),D=document.createRange(),y=document.getSelection(),_=document.createElement("span"),_.textContent=m,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(j){if(j.stopPropagation(),ge.format)if(j.preventDefault(),typeof j.clipboardData=="undefined"){O&&console.warn("unable to use e.clipboardData"),O&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var M=me[ge.format]||me.default;window.clipboardData.setData(M,m)}else j.clipboardData.clearData(),j.clipboardData.setData(ge.format,m);ge.onCopy&&(j.preventDefault(),ge.onCopy(j.clipboardData))}),document.body.appendChild(_),D.selectNodeContents(_),y.addRange(D);var x=document.execCommand("copy");if(!x)throw new Error("copy command was unsuccessful");C=!0}catch(j){O&&console.error("unable to copy using execCommand: ",j),O&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ge.format||"text",m),ge.onCopy&&ge.onCopy(window.clipboardData),C=!0}catch(M){O&&console.error("unable to copy using clipboardData: ",M),O&&console.error("falling back to prompt"),u=he("message"in ge?ge.message:Se),window.prompt(u,m)}}finally{y&&(typeof y.removeRange=="function"?y.removeRange(D):y.removeAllRanges()),_&&document.body.removeChild(_),q()}return C}dr.exports=W},6330:function(dr,vt,K){"use strict";K.d(vt,{HT:function(){return Re},iZ:function(){return $t}});var V={},me=function(U,Q,ne,le,Ie){var Ke=new Worker(V[Q]||(V[Q]=URL.createObjectURL(new Blob([U+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return Ke.onmessage=function(et){var tt=et.data,Tt=tt.$e$;if(Tt){var lt=new Error(Tt[0]);lt.code=Tt[1],lt.stack=Tt[2],Ie(lt,null)}else Ie(null,tt)},Ke.postMessage(ne,le),Ke},Se=Uint8Array,he=Uint16Array,W=Int32Array,m=new Se([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ge=new Se([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),O=new Se([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(U,Q){for(var ne=new he(31),le=0;le<31;++le)ne[le]=Q+=1<<U[le-1];for(var Ie=new W(ne[30]),le=1;le<30;++le)for(var Ke=ne[le];Ke<ne[le+1];++Ke)Ie[Ke]=Ke-ne[le]<<5|le;return{b:ne,r:Ie}},q=u(m,2),D=q.b,y=q.r;D[28]=258,y[258]=28;for(var _=u(ge,0),C=_.b,x=_.r,j=new he(32768),M=0;M<32768;++M){var H=(M&43690)>>1|(M&21845)<<1;H=(H&52428)>>2|(H&13107)<<2,H=(H&61680)>>4|(H&3855)<<4,j[M]=((H&65280)>>8|(H&255)<<8)>>1}for(var R=function(U,Q,ne){for(var le=U.length,Ie=0,Ke=new he(Q);Ie<le;++Ie)U[Ie]&&++Ke[U[Ie]-1];var et=new he(Q);for(Ie=1;Ie<Q;++Ie)et[Ie]=et[Ie-1]+Ke[Ie-1]<<1;var tt;if(ne){tt=new he(1<<Q);var Tt=15-Q;for(Ie=0;Ie<le;++Ie)if(U[Ie])for(var lt=Ie<<4|U[Ie],ve=Q-U[Ie],rt=et[U[Ie]-1]++<<ve,mt=rt|(1<<ve)-1;rt<=mt;++rt)tt[j[rt]>>Tt]=lt}else for(tt=new he(le),Ie=0;Ie<le;++Ie)U[Ie]&&(tt[Ie]=j[et[U[Ie]-1]++]>>15-U[Ie]);return tt},P=new Se(288),M=0;M<144;++M)P[M]=8;for(var M=144;M<256;++M)P[M]=9;for(var M=256;M<280;++M)P[M]=7;for(var M=280;M<288;++M)P[M]=8;for(var X=new Se(32),M=0;M<32;++M)X[M]=5;var fe=R(P,9,0),_e=R(P,9,1),we=R(X,5,0),ie=R(X,5,1),ye=function(U){for(var Q=U[0],ne=1;ne<U.length;++ne)U[ne]>Q&&(Q=U[ne]);return Q},Pe=function(U,Q,ne){var le=Q/8|0;return(U[le]|U[le+1]<<8)>>(Q&7)&ne},ue=function(U,Q){var ne=Q/8|0;return(U[ne]|U[ne+1]<<8|U[ne+2]<<16)>>(Q&7)},Me=function(U){return(U+7)/8|0},Z=function(U,Q,ne){return(Q==null||Q<0)&&(Q=0),(ne==null||ne>U.length)&&(ne=U.length),new Se(U.subarray(Q,ne))},I={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},G=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],z=function(U,Q,ne){var le=new Error(Q||G[U]);if(le.code=U,Error.captureStackTrace&&Error.captureStackTrace(le,z),!ne)throw le;return le},se=function(U,Q,ne,le){var Ie=U.length,Ke=le?le.length:0;if(!Ie||Q.f&&!Q.l)return ne||new Se(0);var et=!ne,tt=et||Q.i!=2,Tt=Q.i;et&&(ne=new Se(Ie*3));var lt=function($n){var Sn=ne.length;if($n>Sn){var Wn=new Se(Math.max(Sn*2,$n));Wn.set(ne),ne=Wn}},ve=Q.f||0,rt=Q.p||0,mt=Q.b||0,Rt=Q.l,Yt=Q.d,It=Q.m,kt=Q.n,Xt=Ie*8;do{if(!Rt){ve=Pe(U,rt,1);var sr=Pe(U,rt+1,3);if(rt+=3,sr)if(sr==1)Rt=_e,Yt=ie,It=9,kt=5;else if(sr==2){var pr=Pe(U,rt,31)+257,Dr=Pe(U,rt+10,15)+4,gr=pr+Pe(U,rt+5,31)+1;rt+=14;for(var Ar=new Se(gr),Pr=new Se(19),Br=0;Br<Dr;++Br)Pr[O[Br]]=Pe(U,rt+Br*3,7);rt+=Dr*3;for(var Qr=ye(Pr),Yr=(1<<Qr)-1,tn=R(Pr,Qr,1),Br=0;Br<gr;){var kr=tn[Pe(U,rt,Yr)];rt+=kr&15;var nr=kr>>4;if(nr<16)Ar[Br++]=nr;else{var Vr=0,Fr=0;for(nr==16?(Fr=3+Pe(U,rt,3),rt+=2,Vr=Ar[Br-1]):nr==17?(Fr=3+Pe(U,rt,7),rt+=3):nr==18&&(Fr=11+Pe(U,rt,127),rt+=7);Fr--;)Ar[Br++]=Vr}}var Nr=Ar.subarray(0,pr),Wr=Ar.subarray(pr);It=ye(Nr),kt=ye(Wr),Rt=R(Nr,It,1),Yt=R(Wr,kt,1)}else z(1);else{var nr=Me(rt)+4,Gt=U[nr-4]|U[nr-3]<<8,mr=nr+Gt;if(mr>Ie){Tt&&z(0);break}tt&&lt(mt+Gt),ne.set(U.subarray(nr,mr),mt),Q.b=mt+=Gt,Q.p=rt=mr*8,Q.f=ve;continue}if(rt>Xt){Tt&&z(0);break}}tt&&lt(mt+131072);for(var ur=(1<<It)-1,qr=(1<<kt)-1,Jr=rt;;Jr=rt){var Vr=Rt[ue(U,rt)&ur],sn=Vr>>4;if(rt+=Vr&15,rt>Xt){Tt&&z(0);break}if(Vr||z(2),sn<256)ne[mt++]=sn;else if(sn==256){Jr=rt,Rt=null;break}else{var cn=sn-254;if(sn>264){var Br=sn-257,rn=m[Br];cn=Pe(U,rt,(1<<rn)-1)+D[Br],rt+=rn}var Tn=Yt[ue(U,rt)&qr],Qn=Tn>>4;Tn||z(3),rt+=Tn&15;var Wr=C[Qn];if(Qn>3){var rn=ge[Qn];Wr+=ue(U,rt)&(1<<rn)-1,rt+=rn}if(rt>Xt){Tt&&z(0);break}tt&&lt(mt+131072);var $r=mt+cn;if(mt<Wr){var Xn=Ke-Wr,ri=Math.min(Wr,$r);for(Xn+mt<0&&z(3);mt<ri;++mt)ne[mt]=le[Xn+mt]}for(;mt<$r;++mt)ne[mt]=ne[mt-Wr]}}Q.l=Rt,Q.p=Jr,Q.b=mt,Q.f=ve,Rt&&(ve=1,Q.m=It,Q.d=Yt,Q.n=kt)}while(!ve);return mt!=ne.length&&et?Z(ne,0,mt):ne.subarray(0,mt)},re=function(U,Q,ne){ne<<=Q&7;var le=Q/8|0;U[le]|=ne,U[le+1]|=ne>>8},w=function(U,Q,ne){ne<<=Q&7;var le=Q/8|0;U[le]|=ne,U[le+1]|=ne>>8,U[le+2]|=ne>>16},B=function(U,Q){for(var ne=[],le=0;le<U.length;++le)U[le]&&ne.push({s:le,f:U[le]});var Ie=ne.length,Ke=ne.slice();if(!Ie)return{t:Qt,l:0};if(Ie==1){var et=new Se(ne[0].s+1);return et[ne[0].s]=1,{t:et,l:1}}ne.sort(function(mr,pr){return mr.f-pr.f}),ne.push({s:-1,f:25001});var tt=ne[0],Tt=ne[1],lt=0,ve=1,rt=2;for(ne[0]={s:-1,f:tt.f+Tt.f,l:tt,r:Tt};ve!=Ie-1;)tt=ne[ne[lt].f<ne[rt].f?lt++:rt++],Tt=ne[lt!=ve&&ne[lt].f<ne[rt].f?lt++:rt++],ne[ve++]={s:-1,f:tt.f+Tt.f,l:tt,r:Tt};for(var mt=Ke[0].s,le=1;le<Ie;++le)Ke[le].s>mt&&(mt=Ke[le].s);var Rt=new he(mt+1),Yt=$(ne[ve-1],Rt,0);if(Yt>Q){var le=0,It=0,kt=Yt-Q,Xt=1<<kt;for(Ke.sort(function(pr,Dr){return Rt[Dr.s]-Rt[pr.s]||pr.f-Dr.f});le<Ie;++le){var sr=Ke[le].s;if(Rt[sr]>Q)It+=Xt-(1<<Yt-Rt[sr]),Rt[sr]=Q;else break}for(It>>=kt;It>0;){var nr=Ke[le].s;Rt[nr]<Q?It-=1<<Q-Rt[nr]++-1:++le}for(;le>=0&&It;--le){var Gt=Ke[le].s;Rt[Gt]==Q&&(--Rt[Gt],++It)}Yt=Q}return{t:new Se(Rt),l:Yt}},$=function(U,Q,ne){return U.s==-1?Math.max($(U.l,Q,ne+1),$(U.r,Q,ne+1)):Q[U.s]=ne},ae=function(U){for(var Q=U.length;Q&&!U[--Q];);for(var ne=new he(++Q),le=0,Ie=U[0],Ke=1,et=function(Tt){ne[le++]=Tt},tt=1;tt<=Q;++tt)if(U[tt]==Ie&&tt!=Q)++Ke;else{if(!Ie&&Ke>2){for(;Ke>138;Ke-=138)et(32754);Ke>2&&(et(Ke>10?Ke-11<<5|28690:Ke-3<<5|12305),Ke=0)}else if(Ke>3){for(et(Ie),--Ke;Ke>6;Ke-=6)et(8304);Ke>2&&(et(Ke-3<<5|8208),Ke=0)}for(;Ke--;)et(Ie);Ke=1,Ie=U[tt]}return{c:ne.subarray(0,le),n:Q}},$e=function(U,Q){for(var ne=0,le=0;le<Q.length;++le)ne+=U[le]*Q[le];return ne},qe=function(U,Q,ne){var le=ne.length,Ie=Me(Q+2);U[Ie]=le&255,U[Ie+1]=le>>8,U[Ie+2]=U[Ie]^255,U[Ie+3]=U[Ie+1]^255;for(var Ke=0;Ke<le;++Ke)U[Ie+Ke+4]=ne[Ke];return(Ie+4+le)*8},Bt=function(U,Q,ne,le,Ie,Ke,et,tt,Tt,lt,ve){re(Q,ve++,ne),++Ie[256];for(var rt=B(Ie,15),mt=rt.t,Rt=rt.l,Yt=B(Ke,15),It=Yt.t,kt=Yt.l,Xt=ae(mt),sr=Xt.c,nr=Xt.n,Gt=ae(It),mr=Gt.c,pr=Gt.n,Dr=new he(19),gr=0;gr<sr.length;++gr)++Dr[sr[gr]&31];for(var gr=0;gr<mr.length;++gr)++Dr[mr[gr]&31];for(var Ar=B(Dr,7),Pr=Ar.t,Br=Ar.l,Qr=19;Qr>4&&!Pr[O[Qr-1]];--Qr);var Yr=lt+5<<3,tn=$e(Ie,P)+$e(Ke,X)+et,kr=$e(Ie,mt)+$e(Ke,It)+et+14+3*Qr+$e(Dr,Pr)+2*Dr[16]+3*Dr[17]+7*Dr[18];if(Tt>=0&&Yr<=tn&&Yr<=kr)return qe(Q,ve,U.subarray(Tt,Tt+lt));var Vr,Fr,Nr,Wr;if(re(Q,ve,1+(kr<tn)),ve+=2,kr<tn){Vr=R(mt,Rt,0),Fr=mt,Nr=R(It,kt,0),Wr=It;var ur=R(Pr,Br,0);re(Q,ve,nr-257),re(Q,ve+5,pr-1),re(Q,ve+10,Qr-4),ve+=14;for(var gr=0;gr<Qr;++gr)re(Q,ve+3*gr,Pr[O[gr]]);ve+=3*Qr;for(var qr=[sr,mr],Jr=0;Jr<2;++Jr)for(var sn=qr[Jr],gr=0;gr<sn.length;++gr){var cn=sn[gr]&31;re(Q,ve,ur[cn]),ve+=Pr[cn],cn>15&&(re(Q,ve,sn[gr]>>5&127),ve+=sn[gr]>>12)}}else Vr=fe,Fr=P,Nr=we,Wr=X;for(var gr=0;gr<tt;++gr){var rn=le[gr];if(rn>255){var cn=rn>>18&31;w(Q,ve,Vr[cn+257]),ve+=Fr[cn+257],cn>7&&(re(Q,ve,rn>>23&31),ve+=m[cn]);var Tn=rn&31;w(Q,ve,Nr[Tn]),ve+=Wr[Tn],Tn>3&&(w(Q,ve,rn>>5&8191),ve+=ge[Tn])}else w(Q,ve,Vr[rn]),ve+=Fr[rn]}return w(Q,ve,Vr[256]),ve+Fr[256]},pt=new W([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Qt=new Se(0),xt=function(U,Q,ne,le,Ie,Ke){var et=Ke.z||U.length,tt=new Se(le+et+5*(1+Math.ceil(et/7e3))+Ie),Tt=tt.subarray(le,tt.length-Ie),lt=Ke.l,ve=(Ke.r||0)&7;if(Q){ve&&(Tt[0]=Ke.r>>3);for(var rt=pt[Q-1],mt=rt>>13,Rt=rt&8191,Yt=(1<<ne)-1,It=Ke.p||new he(32768),kt=Ke.h||new he(Yt+1),Xt=Math.ceil(ne/3),sr=2*Xt,nr=function(li){return(U[li]^U[li+1]<<Xt^U[li+2]<<sr)&Yt},Gt=new W(25e3),mr=new he(288),pr=new he(32),Dr=0,gr=0,Ar=Ke.i||0,Pr=0,Br=Ke.w||0,Qr=0;Ar+2<et;++Ar){var Yr=nr(Ar),tn=Ar&32767,kr=kt[Yr];if(It[tn]=kr,kt[Yr]=tn,Br<=Ar){var Vr=et-Ar;if((Dr>7e3||Pr>24576)&&(Vr>423||!lt)){ve=Bt(U,Tt,0,Gt,mr,pr,gr,Pr,Qr,Ar-Qr,ve),Pr=Dr=gr=0,Qr=Ar;for(var Fr=0;Fr<286;++Fr)mr[Fr]=0;for(var Fr=0;Fr<30;++Fr)pr[Fr]=0}var Nr=2,Wr=0,ur=Rt,qr=tn-kr&32767;if(Vr>2&&Yr==nr(Ar-qr))for(var Jr=Math.min(mt,Vr)-1,sn=Math.min(32767,Ar),cn=Math.min(258,Vr);qr<=sn&&--ur&&tn!=kr;){if(U[Ar+Nr]==U[Ar+Nr-qr]){for(var rn=0;rn<cn&&U[Ar+rn]==U[Ar+rn-qr];++rn);if(rn>Nr){if(Nr=rn,Wr=qr,rn>Jr)break;for(var Tn=Math.min(qr,rn-2),Qn=0,Fr=0;Fr<Tn;++Fr){var $r=Ar-qr+Fr&32767,Xn=It[$r],ri=$r-Xn&32767;ri>Qn&&(Qn=ri,kr=$r)}}}tn=kr,kr=It[tn],qr+=tn-kr&32767}if(Wr){Gt[Pr++]=268435456|y[Nr]<<18|x[Wr];var $n=y[Nr]&31,Sn=x[Wr]&31;gr+=m[$n]+ge[Sn],++mr[257+$n],++pr[Sn],Br=Ar+Nr,++Dr}else Gt[Pr++]=U[Ar],++mr[U[Ar]]}}for(Ar=Math.max(Ar,Br);Ar<et;++Ar)Gt[Pr++]=U[Ar],++mr[U[Ar]];ve=Bt(U,Tt,lt,Gt,mr,pr,gr,Pr,Qr,Ar-Qr,ve),lt||(Ke.r=ve&7|Tt[ve/8|0]<<3,ve-=7,Ke.h=kt,Ke.p=It,Ke.i=Ar,Ke.w=Br)}else{for(var Ar=Ke.w||0;Ar<et+lt;Ar+=65535){var Wn=Ar+65535;Wn>=et&&(Tt[ve/8|0]=lt,Wn=et),ve=qe(Tt,ve+1,U.subarray(Ar,Wn))}Ke.i=et}return Z(tt,0,le+Me(ve)+Ie)},ht=null,De=function(){var U=-1;return{p:function(Q){for(var ne=U,le=0;le<Q.length;++le)ne=ht[ne&255^Q[le]]^ne>>>8;U=ne},d:function(){return~U}}},it=function(){var U=1,Q=0;return{p:function(ne){for(var le=U,Ie=Q,Ke=ne.length|0,et=0;et!=Ke;){for(var tt=Math.min(et+2655,Ke);et<tt;++et)Ie+=le+=ne[et];le=(le&65535)+15*(le>>16),Ie=(Ie&65535)+15*(Ie>>16)}U=le,Q=Ie},d:function(){return U%=65521,Q%=65521,(U&255)<<24|(U&65280)<<8|(Q&255)<<8|Q>>8}}},Le=function(U,Q,ne,le,Ie){if(!Ie&&(Ie={l:1},Q.dictionary)){var Ke=Q.dictionary.subarray(-32768),et=new Se(Ke.length+U.length);et.set(Ke),et.set(U,Ke.length),U=et,Ie.w=Ke.length}return xt(U,Q.level==null?6:Q.level,Q.mem==null?Ie.l?Math.ceil(Math.max(8,Math.min(13,Math.log(U.length)))*1.5):20:12+Q.mem,ne,le,Ie)},Ct=function(U,Q){var ne={};for(var le in U)ne[le]=U[le];for(var le in Q)ne[le]=Q[le];return ne},Ut=function(U,Q,ne){for(var le=U(),Ie=U.toString(),Ke=Ie.slice(Ie.indexOf("[")+1,Ie.lastIndexOf("]")).replace(/\s+/g,"").split(","),et=0;et<le.length;++et){var tt=le[et],Tt=Ke[et];if(typeof tt=="function"){Q+=";"+Tt+"=";var lt=tt.toString();if(tt.prototype)if(lt.indexOf("[native code]")!=-1){var ve=lt.indexOf(" ",8)+1;Q+=lt.slice(ve,lt.indexOf("(",ve))}else{Q+=lt;for(var rt in tt.prototype)Q+=";"+Tt+".prototype."+rt+"="+tt.prototype[rt].toString()}else Q+=lt}else ne[Tt]=tt}return Q},Be=null,L=function(U){var Q=[];for(var ne in U)U[ne].buffer&&Q.push((U[ne]=new U[ne].constructor(U[ne])).buffer);return Q},p=function(U,Q,ne,le){if(!Be[ne]){for(var Ie="",Ke={},et=U.length-1,tt=0;tt<et;++tt)Ie=Ut(U[tt],Ie,Ke);Be[ne]={c:Ut(U[et],Ie,Ke),e:Ke}}var Tt=Ct({},Be[ne].e);return me(Be[ne].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+Q.toString()+"}",ne,Tt,L(Tt),le)},b=function(){return[Se,he,W,m,ge,O,D,C,_e,ie,j,G,R,ye,Pe,ue,Me,Z,z,se,Ee,ke,Ge]},N=function(){return[Se,he,W,m,ge,O,y,x,fe,P,we,X,j,pt,Qt,R,re,w,B,$,ae,$e,qe,Bt,Me,Z,xt,Le,St,ke]},S=function(){return[Ze,Nt,Ve,De,ht]},k=function(){return[ct,yt]},te=function(){return[bt,Ve,it]},Fe=function(){return[Wt]},ke=function(U){return postMessage(U,[U.buffer])},Ge=function(U){return U&&{out:U.size&&new Se(U.size),dictionary:U.dictionary}},ze=function(U,Q,ne,le,Ie,Ke){var et=p(ne,le,Ie,function(tt,Tt){et.terminate(),Ke(tt,Tt)});return et.postMessage([U,Q],Q.consume?[U.buffer]:[]),function(){et.terminate()}},Ft=function(U){return U.ondata=function(Q,ne){return postMessage([Q,ne],[Q.buffer])},function(Q){Q.data.length?(U.push(Q.data[0],Q.data[1]),postMessage([Q.data[0].length])):U.flush()}},Je=function(U,Q,ne,le,Ie,Ke,et){var tt,Tt=p(U,le,Ie,function(lt,ve){lt?(Tt.terminate(),Q.ondata.call(Q,lt)):Array.isArray(ve)?ve.length==1?(Q.queuedSize-=ve[0],Q.ondrain&&Q.ondrain(ve[0])):(ve[1]&&Tt.terminate(),Q.ondata.call(Q,lt,ve[0],ve[1])):et(ve)});Tt.postMessage(ne),Q.queuedSize=0,Q.push=function(lt,ve){Q.ondata||z(5),tt&&Q.ondata(z(4,0,1),null,!!ve),Q.queuedSize+=lt.length,Tt.postMessage([lt,tt=ve],[lt.buffer])},Q.terminate=function(){Tt.terminate()},Ke&&(Q.flush=function(){Tt.postMessage([])})},ut=function(U,Q){return U[Q]|U[Q+1]<<8},st=function(U,Q){return(U[Q]|U[Q+1]<<8|U[Q+2]<<16|U[Q+3]<<24)>>>0},Xe=function(U,Q){return st(U,Q)+st(U,Q+4)*4294967296},Ve=function(U,Q,ne){for(;ne;++Q)U[Q]=ne,ne>>>=8},Ze=function(U,Q){var ne=Q.filename;if(U[0]=31,U[1]=139,U[2]=8,U[8]=Q.level<2?4:Q.level==9?2:0,U[9]=3,Q.mtime!=0&&Ve(U,4,Math.floor(new Date(Q.mtime||Date.now())/1e3)),ne){U[3]=8;for(var le=0;le<=ne.length;++le)U[le+10]=ne.charCodeAt(le)}},ct=function(U){(U[0]!=31||U[1]!=139||U[2]!=8)&&z(6,"invalid gzip data");var Q=U[3],ne=10;Q&4&&(ne+=(U[10]|U[11]<<8)+2);for(var le=(Q>>3&1)+(Q>>4&1);le>0;le-=!U[ne++]);return ne+(Q&2)},yt=function(U){var Q=U.length;return(U[Q-4]|U[Q-3]<<8|U[Q-2]<<16|U[Q-1]<<24)>>>0},Nt=function(U){return 10+(U.filename?U.filename.length+1:0)},bt=function(U,Q){var ne=Q.level,le=ne==0?0:ne<6?1:ne==9?3:2;if(U[0]=120,U[1]=le<<6|(Q.dictionary&&32),U[1]|=31-(U[0]<<8|U[1])%31,Q.dictionary){var Ie=it();Ie.p(Q.dictionary),Ve(U,2,Ie.d())}},Wt=function(U,Q){return((U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31)&&z(6,"invalid zlib data"),(U[1]>>5&1)==+!Q&&z(6,"invalid zlib data: "+(U[1]&32?"need":"unexpected")+" dictionary"),(U[1]>>3&4)+2};function Ht(U,Q){return typeof U=="function"&&(Q=U,U={}),this.ondata=Q,U}var qt=null,fr=null;function Ur(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[N],function(le){return ke(St(le.data[0],le.data[1]))},0,ne)}function St(U,Q){return Le(U,Q||{},0,0)}var er=null,Ue=null;function be(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[b],function(le){return ke(Ee(le.data[0],Ge(le.data[1])))},1,ne)}function Ee(U,Q){return se(U,{i:2},Q&&Q.out,Q&&Q.dictionary)}var Y=null,ee=null;function oe(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[N,S,function(){return[pe]}],function(le){return ke(pe(le.data[0],le.data[1]))},2,ne)}function pe(U,Q){Q||(Q={});var ne=De(),le=U.length;ne.p(U);var Ie=Le(U,Q,Nt(Q),8),Ke=Ie.length;return Ze(Ie,Q),Ve(Ie,Ke-8,ne.d()),Ve(Ie,Ke-4,le),Ie}var Ce=null,ft=null;function Et(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[b,k,function(){return[dt]}],function(le){return ke(dt(le.data[0],le.data[1]))},3,ne)}function dt(U,Q){var ne=ct(U);return ne+8>U.length&&z(6,"invalid gzip data"),se(U.subarray(ne,-8),{i:2},Q&&Q.out||new Se(yt(U)),Q&&Q.dictionary)}var Zt=null,_r=null;function Mr(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[N,te,function(){return[$t]}],function(le){return ke($t(le.data[0],le.data[1]))},4,ne)}function $t(U,Q){Q||(Q={});var ne=it();ne.p(U);var le=Le(U,Q,Q.dictionary?6:2,4);return bt(le,Q),Ve(le,le.length-4,ne.d()),le}var Kt=null,Tr=null;function Zr(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),ze(U,Q,[b,Fe,function(){return[Re]}],function(le){return ke(Re(le.data[0],Ge(le.data[1])))},5,ne)}function Re(U,Q){return se(U.subarray(Wt(U,Q&&Q.dictionary),-4),{i:2},Q&&Q.out,Q&&Q.dictionary)}var Ir=null,Er=null;function vr(U,Q,ne){return ne||(ne=Q,Q={}),typeof ne!="function"&&z(7),U[0]==31&&U[1]==139&&U[2]==8?Et(U,Q,ne):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?be(U,Q,ne):Zr(U,Q,ne)}function _n(U,Q){return U[0]==31&&U[1]==139&&U[2]==8?dt(U,Q):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?Ee(U,Q):Re(U,Q)}var Or=function(U,Q,ne,le){for(var Ie in U){var Ke=U[Ie],et=Q+Ie,tt=le;Array.isArray(Ke)&&(tt=Ct(le,Ke[1]),Ke=Ke[0]),Ke instanceof Se?ne[et]=[Ke,tt]:(ne[et+="/"]=[new Se(0),tt],Or(Ke,et,ne,le))}},vn=typeof TextEncoder!="undefined"&&new TextEncoder,zr=typeof TextDecoder!="undefined"&&new TextDecoder,Fn=0;try{zr.decode(Qt,{stream:!0}),Fn=1}catch(U){}var hn=function(U){for(var Q="",ne=0;;){var le=U[ne++],Ie=(le>127)+(le>223)+(le>239);if(ne+Ie>U.length)return{s:Q,r:Z(U,ne-1)};Ie?Ie==3?(le=((le&15)<<18|(U[ne++]&63)<<12|(U[ne++]&63)<<6|U[ne++]&63)-65536,Q+=String.fromCharCode(55296|le>>10,56320|le&1023)):Ie&1?Q+=String.fromCharCode((le&31)<<6|U[ne++]&63):Q+=String.fromCharCode((le&15)<<12|(U[ne++]&63)<<6|U[ne++]&63):Q+=String.fromCharCode(le)}},yn=null,Kn=null;function Hr(U,Q){if(Q){for(var ne=new Se(U.length),le=0;le<U.length;++le)ne[le]=U.charCodeAt(le);return ne}if(vn)return vn.encode(U);for(var Ie=U.length,Ke=new Se(U.length+(U.length>>1)),et=0,tt=function(ve){Ke[et++]=ve},le=0;le<Ie;++le){if(et+5>Ke.length){var Tt=new Se(et+8+(Ie-le<<1));Tt.set(Ke),Ke=Tt}var lt=U.charCodeAt(le);lt<128||Q?tt(lt):lt<2048?(tt(192|lt>>6),tt(128|lt&63)):lt>55295&&lt<57344?(lt=65536+(lt&1047552)|U.charCodeAt(++le)&1023,tt(240|lt>>18),tt(128|lt>>12&63),tt(128|lt>>6&63),tt(128|lt&63)):(tt(224|lt>>12),tt(128|lt>>6&63),tt(128|lt&63))}return Z(Ke,0,et)}function Gr(U,Q){if(Q){for(var ne="",le=0;le<U.length;le+=16384)ne+=String.fromCharCode.apply(null,U.subarray(le,le+16384));return ne}else{if(zr)return zr.decode(U);var Ie=hn(U),Ke=Ie.s,ne=Ie.r;return ne.length&&z(8),Ke}}var Xr=function(U){return U==1?3:U<6?2:U==9?1:0},Kr=function(U,Q){return Q+30+ut(U,Q+26)+ut(U,Q+28)},ln=function(U,Q,ne){var le=ut(U,Q+28),Ie=Gr(U.subarray(Q+46,Q+46+le),!(ut(U,Q+8)&2048)),Ke=Q+46+le,et=st(U,Q+20),tt=ne&&et==4294967295?dn(U,Ke):[et,st(U,Q+24),st(U,Q+42)],Tt=tt[0],lt=tt[1],ve=tt[2];return[ut(U,Q+10),Tt,lt,Ie,Ke+ut(U,Q+30)+ut(U,Q+32),ve]},dn=function(U,Q){for(;ut(U,Q)!=1;Q+=4+ut(U,Q+2));return[Xe(U,Q+12),Xe(U,Q+4),Xe(U,Q+20)]},Cn=function(U){var Q=0;if(U)for(var ne in U){var le=U[ne].length;le>65535&&z(9),Q+=le+4}return Q},cr=function(U,Q,ne,le,Ie,Ke,et,tt){var Tt=le.length,lt=ne.extra,ve=tt&&tt.length,rt=Cn(lt);Ve(U,Q,et!=null?33639248:67324752),Q+=4,et!=null&&(U[Q++]=20,U[Q++]=ne.os),U[Q]=20,Q+=2,U[Q++]=ne.flag<<1|(Ke<0&&8),U[Q++]=Ie&&8,U[Q++]=ne.compression&255,U[Q++]=ne.compression>>8;var mt=new Date(ne.mtime==null?Date.now():ne.mtime),Rt=mt.getFullYear()-1980;if((Rt<0||Rt>119)&&z(10),Ve(U,Q,Rt<<25|mt.getMonth()+1<<21|mt.getDate()<<16|mt.getHours()<<11|mt.getMinutes()<<5|mt.getSeconds()>>1),Q+=4,Ke!=-1&&(Ve(U,Q,ne.crc),Ve(U,Q+4,Ke<0?-Ke-2:Ke),Ve(U,Q+8,ne.size)),Ve(U,Q+12,Tt),Ve(U,Q+14,rt),Q+=16,et!=null&&(Ve(U,Q,ve),Ve(U,Q+6,ne.attrs),Ve(U,Q+10,et),Q+=14),U.set(le,Q),Q+=Tt,rt)for(var Yt in lt){var It=lt[Yt],kt=It.length;Ve(U,Q,+Yt),Ve(U,Q+2,kt),U.set(It,Q+4),Q+=4+kt}return ve&&(U.set(tt,Q),Q+=ve),Q},yr=function(U,Q,ne,le,Ie){Ve(U,Q,101010256),Ve(U,Q+8,ne),Ve(U,Q+10,ne),Ve(U,Q+12,le),Ve(U,Q+16,Ie)},Qe=null,Ye=null,_t=null,at=null;function wt(U,Q,ne){ne||(ne=Q,Q={}),typeof ne!="function"&&z(7);var le={};Or(U,"",le,Q);var Ie=Object.keys(le),Ke=Ie.length,et=0,tt=0,Tt=Ke,lt=new Array(Ke),ve=[],rt=function(){for(var kt=0;kt<ve.length;++kt)ve[kt]()},mt=function(kt,Xt){Lr(function(){ne(kt,Xt)})};Lr(function(){mt=ne});var Rt=function(){var kt=new Se(tt+22),Xt=et,sr=tt-et;tt=0;for(var nr=0;nr<Tt;++nr){var Gt=lt[nr];try{var mr=Gt.c.length;cr(kt,tt,Gt,Gt.f,Gt.u,mr);var pr=30+Gt.f.length+Cn(Gt.extra),Dr=tt+pr;kt.set(Gt.c,Dr),cr(kt,et,Gt,Gt.f,Gt.u,mr,tt,Gt.m),et+=16+pr+(Gt.m?Gt.m.length:0),tt=Dr+mr}catch(gr){return mt(gr,null)}}yr(kt,et,lt.length,sr,Xt),mt(null,kt)};Ke||Rt();for(var Yt=function(kt){var Xt=Ie[kt],sr=le[Xt],nr=sr[0],Gt=sr[1],mr=De(),pr=nr.length;mr.p(nr);var Dr=Hr(Xt),gr=Dr.length,Ar=Gt.comment,Pr=Ar&&Hr(Ar),Br=Pr&&Pr.length,Qr=Cn(Gt.extra),Yr=Gt.level==0?0:8,tn=function(kr,Vr){if(kr)rt(),mt(kr,null);else{var Fr=Vr.length;lt[kt]=Ct(Gt,{size:pr,crc:mr.d(),c:Vr,f:Dr,m:Pr,u:gr!=Xt.length||Pr&&Ar.length!=Br,compression:Yr}),et+=30+gr+Qr+Fr,tt+=76+2*(gr+Qr)+(Br||0)+Fr,--Ke||Rt()}};if(gr>65535&&tn(z(11,0,1),null),!Yr)tn(null,nr);else if(pr<16e4)try{tn(null,St(nr,Gt))}catch(kr){tn(kr,null)}else ve.push(Ur(nr,Gt,tn))},It=0;It<Tt;++It)Yt(It);return rt}function At(U,Q){Q||(Q={});var ne={},le=[];Or(U,"",ne,Q);var Ie=0,Ke=0;for(var et in ne){var tt=ne[et],Tt=tt[0],lt=tt[1],ve=lt.level==0?0:8,rt=Hr(et),mt=rt.length,Rt=lt.comment,Yt=Rt&&Hr(Rt),It=Yt&&Yt.length,kt=Cn(lt.extra);mt>65535&&z(11);var Xt=ve?St(Tt,lt):Tt,sr=Xt.length,nr=De();nr.p(Tt),le.push(Ct(lt,{size:Tt.length,crc:nr.d(),c:Xt,f:rt,m:Yt,u:mt!=et.length||Yt&&Rt.length!=It,o:Ie,compression:ve})),Ie+=30+mt+kt+sr,Ke+=76+2*(mt+kt)+(It||0)+sr}for(var Gt=new Se(Ke+22),mr=Ie,pr=Ke-Ie,Dr=0;Dr<le.length;++Dr){var rt=le[Dr];cr(Gt,rt.o,rt,rt.f,rt.u,rt.c.length);var gr=30+rt.f.length+Cn(rt.extra);Gt.set(rt.c,rt.o+gr),cr(Gt,Ie,rt,rt.f,rt.u,rt.c.length,rt.o,rt.m),Ie+=16+gr+(rt.m?rt.m.length:0)}return yr(Gt,Ie,le.length,pr,mr),Gt}var ot=null,Dt=null,zt=null,ar=null,Lr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(U){U()};function lr(U,Q,ne){ne||(ne=Q,Q={}),typeof ne!="function"&&z(7);var le=[],Ie=function(){for(var kt=0;kt<le.length;++kt)le[kt]()},Ke={},et=function(kt,Xt){Lr(function(){ne(kt,Xt)})};Lr(function(){et=ne});for(var tt=U.length-22;st(U,tt)!=101010256;--tt)if(!tt||U.length-tt>65558)return et(z(13,0,1),null),Ie;var Tt=ut(U,tt+8);if(Tt){var lt=Tt,ve=st(U,tt+16),rt=ve==4294967295||lt==65535;if(rt){var mt=st(U,tt-12);rt=st(U,mt)==101075792,rt&&(lt=Tt=st(U,mt+32),ve=st(U,mt+48))}for(var Rt=Q&&Q.filter,Yt=function(kt){var Xt=ln(U,ve,rt),sr=Xt[0],nr=Xt[1],Gt=Xt[2],mr=Xt[3],pr=Xt[4],Dr=Xt[5],gr=Kr(U,Dr);ve=pr;var Ar=function(Br,Qr){Br?(Ie(),et(Br,null)):(Qr&&(Ke[mr]=Qr),--Tt||et(null,Ke))};if(!Rt||Rt({name:mr,size:nr,originalSize:Gt,compression:sr}))if(!sr)Ar(null,Z(U,gr,gr+nr));else if(sr==8){var Pr=U.subarray(gr,gr+nr);if(Gt<524288||nr>.8*Gt)try{Ar(null,Ee(Pr,{out:new Se(Gt)}))}catch(Br){Ar(Br,null)}else le.push(be(Pr,{size:Gt},Ar))}else Ar(z(14,"unknown compression type "+sr,1),null);else Ar(null,null)},It=0;It<lt;++It)Yt(It)}else et(null,{});return Ie}function wr(U,Q){for(var ne={},le=U.length-22;st(U,le)!=101010256;--le)(!le||U.length-le>65558)&&z(13);var Ie=ut(U,le+8);if(!Ie)return{};var Ke=st(U,le+16),et=Ke==4294967295||Ie==65535;if(et){var tt=st(U,le-12);et=st(U,tt)==101075792,et&&(Ie=st(U,tt+32),Ke=st(U,tt+48))}for(var Tt=Q&&Q.filter,lt=0;lt<Ie;++lt){var ve=ln(U,Ke,et),rt=ve[0],mt=ve[1],Rt=ve[2],Yt=ve[3],It=ve[4],kt=ve[5],Xt=Kr(U,kt);Ke=It,(!Tt||Tt({name:Yt,size:mt,originalSize:Rt,compression:rt}))&&(rt?rt==8?ne[Yt]=Ee(U.subarray(Xt,Xt+mt),{out:new Se(Rt)}):z(14,"unknown compression type "+rt):ne[Yt]=Z(U,Xt,Xt+mt))}return ne}},64270:function(dr){(function(vt,K){dr.exports=K()})(this,function(){"use strict";var vt=function(f,c){return vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},vt(f,c)};function K(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");vt(f,c);function i(){this.constructor=f}f.prototype=c===null?Object.create(c):(i.prototype=c.prototype,new i)}var V=function(){return V=Object.assign||function(c){for(var i,e=1,t=arguments.length;e<t;e++){i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(c[r]=i[r])}return c},V.apply(this,arguments)};function me(f,c,i,e){function t(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(r,n){function s(l){try{a(e.next(l))}catch(o){n(o)}}function A(l){try{a(e.throw(l))}catch(o){n(o)}}function a(l){l.done?r(l.value):t(l.value).then(s,A)}a((e=e.apply(f,c||[])).next())})}function Se(f,c){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,t,r,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(a){return function(l){return A([a,l])}}function A(a){if(e)throw new TypeError("Generator is already executing.");for(;i;)try{if(e=1,t&&(r=a[0]&2?t.return:a[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,a[1])).done)return r;switch(t=0,r&&(a=[a[0]&2,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(r=i.trys,!(r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=c.call(f,i)}catch(l){a=[6,l],t=0}finally{e=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function he(f,c,i){if(i||arguments.length===2)for(var e=0,t=c.length,r;e<t;e++)(r||!(e in c))&&(r||(r=Array.prototype.slice.call(c,0,e)),r[e]=c[e]);return f.concat(r||c)}for(var W=function(){function f(c,i,e,t){this.left=c,this.top=i,this.width=e,this.height=t}return f.prototype.add=function(c,i,e,t){return new f(this.left+c,this.top+i,this.width+e,this.height+t)},f.fromClientRect=function(c,i){return new f(i.left+c.windowBounds.left,i.top+c.windowBounds.top,i.width,i.height)},f.fromDOMRectList=function(c,i){var e=Array.from(i).find(function(t){return t.width!==0});return e?new f(e.left+c.windowBounds.left,e.top+c.windowBounds.top,e.width,e.height):f.EMPTY},f.EMPTY=new f(0,0,0,0),f}(),m=function(f,c){return W.fromClientRect(f,c.getBoundingClientRect())},ge=function(f){var c=f.body,i=f.documentElement;if(!c||!i)throw new Error("Unable to get document size");var e=Math.max(Math.max(c.scrollWidth,i.scrollWidth),Math.max(c.offsetWidth,i.offsetWidth),Math.max(c.clientWidth,i.clientWidth)),t=Math.max(Math.max(c.scrollHeight,i.scrollHeight),Math.max(c.offsetHeight,i.offsetHeight),Math.max(c.clientHeight,i.clientHeight));return new W(0,0,e,t)},O=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var r=f.charCodeAt(i++);(r&64512)===56320?c.push(((t&1023)<<10)+(r&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},u=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,r="";++t<i;){var n=f[t];n<=65535?e.push(n):(n-=65536,e.push((n>>10)+55296,n%1024+56320)),(t+1===i||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r},q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),y=0;y<q.length;y++)D[q.charCodeAt(y)]=y;for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),x=0;x<_.length;x++)C[_.charCodeAt(x)]=x;for(var j=function(f){var c=f.length*.75,i=f.length,e,t=0,r,n,s,A;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var a=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),l=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<i;e+=4)r=C[f.charCodeAt(e)],n=C[f.charCodeAt(e+1)],s=C[f.charCodeAt(e+2)],A=C[f.charCodeAt(e+3)],l[t++]=r<<2|n>>4,l[t++]=(n&15)<<4|s>>2,l[t++]=(s&3)<<6|A&63;return a},M=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},H=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},R=5,P=11,X=2,fe=P-R,_e=65536>>R,we=1<<R,ie=we-1,ye=1024>>R,Pe=_e+ye,ue=Pe,Me=32,Z=ue+Me,I=65536>>P,G=1<<fe,z=G-1,se=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},re=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},w=function(f,c){var i=j(f),e=Array.isArray(i)?H(i):new Uint32Array(i),t=Array.isArray(i)?M(i):new Uint16Array(i),r=24,n=se(t,r/2,e[4]/2),s=e[5]===2?se(t,(r+e[4])/2):re(e,Math.ceil((r+e[4])/4));return new B(e[0],e[1],e[2],e[3],n,s)},B=function(){function f(c,i,e,t,r,n){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=r,this.data=n}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>R],i=(i<<X)+(c&ie),this.data[i];if(c<=65535)return i=this.index[_e+(c-55296>>R)],i=(i<<X)+(c&ie),this.data[i];if(c<this.highStart)return i=Z-I+(c>>P),i=this.index[i],i+=c>>R&z,i=this.index[i],i=(i<<X)+(c&ie),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ae=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),$e=0;$e<$.length;$e++)ae[$.charCodeAt($e)]=$e;var qe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Bt=50,pt=1,Qt=2,xt=3,ht=4,De=5,it=7,Le=8,Ct=9,Ut=10,Be=11,L=12,p=13,b=14,N=15,S=16,k=17,te=18,Fe=19,ke=20,Ge=21,ze=22,Ft=23,Je=24,ut=25,st=26,Xe=27,Ve=28,Ze=29,ct=30,yt=31,Nt=32,bt=33,Wt=34,Ht=35,qt=36,fr=37,Ur=38,St=39,er=40,Ue=41,be=42,Ee=43,Y=[9001,65288],ee="!",oe="\xD7",pe="\xF7",Ce=w(qe),ft=[ct,qt],Et=[pt,Qt,xt,De],dt=[Ut,Le],Zt=[Xe,st],_r=Et.concat(dt),Mr=[Ur,St,er,Wt,Ht],$t=[N,p],Kt=function(f,c){c===void 0&&(c="strict");var i=[],e=[],t=[];return f.forEach(function(r,n){var s=Ce.get(r);if(s>Bt?(t.push(!0),s-=Bt):t.push(!1),["normal","auto","loose"].indexOf(c)!==-1&&[8208,8211,12316,12448].indexOf(r)!==-1)return e.push(n),i.push(S);if(s===ht||s===Be){if(n===0)return e.push(n),i.push(ct);var A=i[n-1];return _r.indexOf(A)===-1?(e.push(e[n-1]),i.push(A)):(e.push(n),i.push(ct))}if(e.push(n),s===yt)return i.push(c==="strict"?Ge:fr);if(s===be||s===Ze)return i.push(ct);if(s===Ee)return r>=131072&&r<=196605||r>=196608&&r<=262141?i.push(fr):i.push(ct);i.push(s)}),[e,i,t]},Tr=function(f,c,i,e){var t=e[i];if(Array.isArray(f)?f.indexOf(t)!==-1:f===t)for(var r=i;r<=e.length;){r++;var n=e[r];if(n===c)return!0;if(n!==Ut)break}if(t===Ut)for(var r=i;r>0;){r--;var s=e[r];if(Array.isArray(f)?f.indexOf(s)!==-1:f===s)for(var A=i;A<=e.length;){A++;var n=e[A];if(n===c)return!0;if(n!==Ut)break}if(s!==Ut)break}return!1},Zr=function(f,c){for(var i=f;i>=0;){var e=c[i];if(e===Ut)i--;else return e}return 0},Re=function(f,c,i,e,t){if(i[e]===0)return oe;var r=e-1;if(Array.isArray(t)&&t[r]===!0)return oe;var n=r-1,s=r+1,A=c[r],a=n>=0?c[n]:0,l=c[s];if(A===Qt&&l===xt)return oe;if(Et.indexOf(A)!==-1)return ee;if(Et.indexOf(l)!==-1||dt.indexOf(l)!==-1)return oe;if(Zr(r,c)===Le)return pe;if(Ce.get(f[r])===Be||(A===Nt||A===bt)&&Ce.get(f[s])===Be||A===it||l===it||A===Ct||[Ut,p,N].indexOf(A)===-1&&l===Ct||[k,te,Fe,Je,Ve].indexOf(l)!==-1||Zr(r,c)===ze||Tr(Ft,ze,r,c)||Tr([k,te],Ge,r,c)||Tr(L,L,r,c))return oe;if(A===Ut)return pe;if(A===Ft||l===Ft)return oe;if(l===S||A===S)return pe;if([p,N,Ge].indexOf(l)!==-1||A===b||a===qt&&$t.indexOf(A)!==-1||A===Ve&&l===qt||l===ke||ft.indexOf(l)!==-1&&A===ut||ft.indexOf(A)!==-1&&l===ut||A===Xe&&[fr,Nt,bt].indexOf(l)!==-1||[fr,Nt,bt].indexOf(A)!==-1&&l===st||ft.indexOf(A)!==-1&&Zt.indexOf(l)!==-1||Zt.indexOf(A)!==-1&&ft.indexOf(l)!==-1||[Xe,st].indexOf(A)!==-1&&(l===ut||[ze,N].indexOf(l)!==-1&&c[s+1]===ut)||[ze,N].indexOf(A)!==-1&&l===ut||A===ut&&[ut,Ve,Je].indexOf(l)!==-1)return oe;if([ut,Ve,Je,k,te].indexOf(l)!==-1)for(var o=r;o>=0;){var h=c[o];if(h===ut)return oe;if([Ve,Je].indexOf(h)!==-1)o--;else break}if([Xe,st].indexOf(l)!==-1)for(var o=[k,te].indexOf(A)!==-1?n:r;o>=0;){var h=c[o];if(h===ut)return oe;if([Ve,Je].indexOf(h)!==-1)o--;else break}if(Ur===A&&[Ur,St,Wt,Ht].indexOf(l)!==-1||[St,Wt].indexOf(A)!==-1&&[St,er].indexOf(l)!==-1||[er,Ht].indexOf(A)!==-1&&l===er||Mr.indexOf(A)!==-1&&[ke,st].indexOf(l)!==-1||Mr.indexOf(l)!==-1&&A===Xe||ft.indexOf(A)!==-1&&ft.indexOf(l)!==-1||A===Je&&ft.indexOf(l)!==-1||ft.concat(ut).indexOf(A)!==-1&&l===ze&&Y.indexOf(f[s])===-1||ft.concat(ut).indexOf(l)!==-1&&A===te)return oe;if(A===Ue&&l===Ue){for(var d=i[r],g=1;d>0&&(d--,c[d]===Ue);)g++;if(g%2!==0)return oe}return A===Nt&&l===bt?oe:pe},Ir=function(f,c){c||(c={lineBreak:"normal",wordBreak:"normal"});var i=Kt(f,c.lineBreak),e=i[0],t=i[1],r=i[2];(c.wordBreak==="break-all"||c.wordBreak==="break-word")&&(t=t.map(function(s){return[ut,ct,be].indexOf(s)!==-1?fr:s}));var n=c.wordBreak==="keep-all"?r.map(function(s,A){return s&&f[A]>=19968&&f[A]<=40959}):void 0;return[e,t,n]},Er=function(){function f(c,i,e,t){this.codePoints=c,this.required=i===ee,this.start=e,this.end=t}return f.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},f}(),vr=function(f,c){var i=O(f),e=Ir(i,c),t=e[0],r=e[1],n=e[2],s=i.length,A=0,a=0;return{next:function(){if(a>=s)return{done:!0,value:null};for(var l=oe;a<s&&(l=Re(i,r,t,++a,n))===oe;);if(l!==oe||a===s){var o=new Er(i,l,A,a);return A=a,{value:o,done:!1}}return{done:!0,value:null}}}},_n=1,Or=2,vn=4,zr=8,Fn=10,hn=47,yn=92,Kn=9,Hr=32,Gr=34,Xr=61,Kr=35,ln=36,dn=37,Cn=39,cr=40,yr=41,Qe=95,Ye=45,_t=33,at=60,wt=62,At=64,ot=91,Dt=93,zt=61,ar=123,Lr=63,lr=125,wr=124,U=126,Q=128,ne=65533,le=42,Ie=43,Ke=44,et=58,tt=59,Tt=46,lt=0,ve=8,rt=11,mt=14,Rt=31,Yt=127,It=-1,kt=48,Xt=97,sr=101,nr=102,Gt=117,mr=122,pr=65,Dr=69,gr=70,Ar=85,Pr=90,Br=function(f){return f>=kt&&f<=57},Qr=function(f){return f>=55296&&f<=57343},Yr=function(f){return Br(f)||f>=pr&&f<=gr||f>=Xt&&f<=nr},tn=function(f){return f>=Xt&&f<=mr},kr=function(f){return f>=pr&&f<=Pr},Vr=function(f){return tn(f)||kr(f)},Fr=function(f){return f>=Q},Nr=function(f){return f===Fn||f===Kn||f===Hr},Wr=function(f){return Vr(f)||Fr(f)||f===Qe},ur=function(f){return Wr(f)||Br(f)||f===Ye},qr=function(f){return f>=lt&&f<=ve||f===rt||f>=mt&&f<=Rt||f===Yt},Jr=function(f,c){return f!==yn?!1:c!==Fn},sn=function(f,c,i){return f===Ye?Wr(c)||Jr(c,i):Wr(f)?!0:!!(f===yn&&Jr(f,c))},cn=function(f,c,i){return f===Ie||f===Ye?Br(c)?!0:c===Tt&&Br(i):Br(f===Tt?c:f)},rn=function(f){var c=0,i=1;(f[c]===Ie||f[c]===Ye)&&(f[c]===Ye&&(i=-1),c++);for(var e=[];Br(f[c]);)e.push(f[c++]);var t=e.length?parseInt(u.apply(void 0,e),10):0;f[c]===Tt&&c++;for(var r=[];Br(f[c]);)r.push(f[c++]);var n=r.length,s=n?parseInt(u.apply(void 0,r),10):0;(f[c]===Dr||f[c]===sr)&&c++;var A=1;(f[c]===Ie||f[c]===Ye)&&(f[c]===Ye&&(A=-1),c++);for(var a=[];Br(f[c]);)a.push(f[c++]);var l=a.length?parseInt(u.apply(void 0,a),10):0;return i*(t+s*Math.pow(10,-n))*Math.pow(10,A*l)},Tn={type:2},Qn={type:3},$r={type:4},Xn={type:13},ri={type:8},$n={type:21},Sn={type:9},Wn={type:10},li={type:11},Zn={type:12},di={type:14},zn={type:23},ni={type:1},Rn={type:25},Jn={type:24},Ci={type:26},bn={type:27},Cr={type:28},An={type:29},Mn={type:31},Yn={type:32},gi=function(){function f(){this._value=[]}return f.prototype.write=function(c){this._value=this._value.concat(O(c))},f.prototype.read=function(){for(var c=[],i=this.consumeToken();i!==Yn;)c.push(i),i=this.consumeToken();return c},f.prototype.consumeToken=function(){var c=this.consumeCodePoint();switch(c){case Gr:return this.consumeStringToken(Gr);case Kr:var i=this.peekCodePoint(0),e=this.peekCodePoint(1),t=this.peekCodePoint(2);if(ur(i)||Jr(e,t)){var r=sn(i,e,t)?Or:_n,n=this.consumeName();return{type:5,value:n,flags:r}}break;case ln:if(this.peekCodePoint(0)===Xr)return this.consumeCodePoint(),Xn;break;case Cn:return this.consumeStringToken(Cn);case cr:return Tn;case yr:return Qn;case le:if(this.peekCodePoint(0)===Xr)return this.consumeCodePoint(),di;break;case Ie:if(cn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case Ke:return $r;case Ye:var s=c,A=this.peekCodePoint(0),a=this.peekCodePoint(1);if(cn(s,A,a))return this.reconsumeCodePoint(c),this.consumeNumericToken();if(sn(s,A,a))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();if(A===Ye&&a===wt)return this.consumeCodePoint(),this.consumeCodePoint(),Jn;break;case Tt:if(cn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case hn:if(this.peekCodePoint(0)===le)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===le&&(l=this.consumeCodePoint(),l===hn))return this.consumeToken();if(l===It)return this.consumeToken()}break;case et:return Ci;case tt:return bn;case at:if(this.peekCodePoint(0)===_t&&this.peekCodePoint(1)===Ye&&this.peekCodePoint(2)===Ye)return this.consumeCodePoint(),this.consumeCodePoint(),Rn;break;case At:var o=this.peekCodePoint(0),h=this.peekCodePoint(1),d=this.peekCodePoint(2);if(sn(o,h,d)){var n=this.consumeName();return{type:7,value:n}}break;case ot:return Cr;case yn:if(Jr(c,this.peekCodePoint(0)))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();break;case Dt:return An;case zt:if(this.peekCodePoint(0)===Xr)return this.consumeCodePoint(),ri;break;case ar:return li;case lr:return Zn;case Gt:case Ar:var g=this.peekCodePoint(0),v=this.peekCodePoint(1);return g===Ie&&(Yr(v)||v===Lr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(c),this.consumeIdentLikeToken();case wr:if(this.peekCodePoint(0)===Xr)return this.consumeCodePoint(),Sn;if(this.peekCodePoint(0)===wr)return this.consumeCodePoint(),$n;break;case U:if(this.peekCodePoint(0)===Xr)return this.consumeCodePoint(),Wn;break;case It:return Yn}return Nr(c)?(this.consumeWhiteSpace(),Mn):Br(c)?(this.reconsumeCodePoint(c),this.consumeNumericToken()):Wr(c)?(this.reconsumeCodePoint(c),this.consumeIdentLikeToken()):{type:6,value:u(c)}},f.prototype.consumeCodePoint=function(){var c=this._value.shift();return typeof c=="undefined"?-1:c},f.prototype.reconsumeCodePoint=function(c){this._value.unshift(c)},f.prototype.peekCodePoint=function(c){return c>=this._value.length?-1:this._value[c]},f.prototype.consumeUnicodeRangeToken=function(){for(var c=[],i=this.consumeCodePoint();Yr(i)&&c.length<6;)c.push(i),i=this.consumeCodePoint();for(var e=!1;i===Lr&&c.length<6;)c.push(i),i=this.consumeCodePoint(),e=!0;if(e){var t=parseInt(u.apply(void 0,c.map(function(A){return A===Lr?kt:A})),16),r=parseInt(u.apply(void 0,c.map(function(A){return A===Lr?gr:A})),16);return{type:30,start:t,end:r}}var n=parseInt(u.apply(void 0,c),16);if(this.peekCodePoint(0)===Ye&&Yr(this.peekCodePoint(1))){this.consumeCodePoint(),i=this.consumeCodePoint();for(var s=[];Yr(i)&&s.length<6;)s.push(i),i=this.consumeCodePoint();var r=parseInt(u.apply(void 0,s),16);return{type:30,start:n,end:r}}else return{type:30,start:n,end:n}},f.prototype.consumeIdentLikeToken=function(){var c=this.consumeName();return c.toLowerCase()==="url"&&this.peekCodePoint(0)===cr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===cr?(this.consumeCodePoint(),{type:19,value:c}):{type:20,value:c}},f.prototype.consumeUrlToken=function(){var c=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===It)return{type:22,value:""};var i=this.peekCodePoint(0);if(i===Cn||i===Gr){var e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===It||this.peekCodePoint(0)===yr)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),zn)}for(;;){var t=this.consumeCodePoint();if(t===It||t===yr)return{type:22,value:u.apply(void 0,c)};if(Nr(t))return this.consumeWhiteSpace(),this.peekCodePoint(0)===It||this.peekCodePoint(0)===yr?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,c)}):(this.consumeBadUrlRemnants(),zn);if(t===Gr||t===Cn||t===cr||qr(t))return this.consumeBadUrlRemnants(),zn;if(t===yn)if(Jr(t,this.peekCodePoint(0)))c.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),zn;else c.push(t)}},f.prototype.consumeWhiteSpace=function(){for(;Nr(this.peekCodePoint(0));)this.consumeCodePoint()},f.prototype.consumeBadUrlRemnants=function(){for(;;){var c=this.consumeCodePoint();if(c===yr||c===It)return;Jr(c,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},f.prototype.consumeStringSlice=function(c){for(var i=5e4,e="";c>0;){var t=Math.min(i,c);e+=u.apply(void 0,this._value.splice(0,t)),c-=t}return this._value.shift(),e},f.prototype.consumeStringToken=function(c){var i="",e=0;do{var t=this._value[e];if(t===It||t===void 0||t===c)return i+=this.consumeStringSlice(e),{type:0,value:i};if(t===Fn)return this._value.splice(0,e),ni;if(t===yn){var r=this._value[e+1];r!==It&&r!==void 0&&(r===Fn?(i+=this.consumeStringSlice(e),e=-1,this._value.shift()):Jr(t,r)&&(i+=this.consumeStringSlice(e),i+=u(this.consumeEscapedCodePoint()),e=-1))}e++}while(!0)},f.prototype.consumeNumber=function(){var c=[],i=vn,e=this.peekCodePoint(0);for((e===Ie||e===Ye)&&c.push(this.consumeCodePoint());Br(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0);var t=this.peekCodePoint(1);if(e===Tt&&Br(t))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=zr;Br(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0),t=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((e===Dr||e===sr)&&((t===Ie||t===Ye)&&Br(r)||Br(t)))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=zr;Br(this.peekCodePoint(0));)c.push(this.consumeCodePoint());return[rn(c),i]},f.prototype.consumeNumericToken=function(){var c=this.consumeNumber(),i=c[0],e=c[1],t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(sn(t,r,n)){var s=this.consumeName();return{type:15,number:i,flags:e,unit:s}}return t===dn?(this.consumeCodePoint(),{type:16,number:i,flags:e}):{type:17,number:i,flags:e}},f.prototype.consumeEscapedCodePoint=function(){var c=this.consumeCodePoint();if(Yr(c)){for(var i=u(c);Yr(this.peekCodePoint(0))&&i.length<6;)i+=u(this.consumeCodePoint());Nr(this.peekCodePoint(0))&&this.consumeCodePoint();var e=parseInt(i,16);return e===0||Qr(e)||e>1114111?ne:e}return c===It?ne:c},f.prototype.consumeName=function(){for(var c="";;){var i=this.consumeCodePoint();if(ur(i))c+=u(i);else if(Jr(i,this.peekCodePoint(0)))c+=u(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(i),c}},f}(),pi=function(){function f(c){this._tokens=c}return f.create=function(c){var i=new gi;return i.write(c),new f(i.read())},f.parseValue=function(c){return f.create(c).parseComponentValue()},f.parseValues=function(c){return f.create(c).parseComponentValues()},f.prototype.parseComponentValue=function(){for(var c=this.consumeToken();c.type===31;)c=this.consumeToken();if(c.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(c);var i=this.consumeComponentValue();do c=this.consumeToken();while(c.type===31);if(c.type===32)return i;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},f.prototype.parseComponentValues=function(){for(var c=[];;){var i=this.consumeComponentValue();if(i.type===32)return c;c.push(i),c.push()}},f.prototype.consumeComponentValue=function(){var c=this.consumeToken();switch(c.type){case 11:case 28:case 2:return this.consumeSimpleBlock(c.type);case 19:return this.consumeFunction(c)}return c},f.prototype.consumeSimpleBlock=function(c){for(var i={type:c,values:[]},e=this.consumeToken();;){if(e.type===32||Ni(e,c))return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue()),e=this.consumeToken()}},f.prototype.consumeFunction=function(c){for(var i={name:c.value,values:[],type:18};;){var e=this.consumeToken();if(e.type===32||e.type===3)return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue())}},f.prototype.consumeToken=function(){var c=this._tokens.shift();return typeof c=="undefined"?Yn:c},f.prototype.reconsumeToken=function(c){this._tokens.unshift(c)},f}(),qn=function(f){return f.type===15},ei=function(f){return f.type===17},Ot=function(f){return f.type===20},Sr=function(f){return f.type===0},an=function(f,c){return Ot(f)&&f.value===c},gn=function(f){return f.type!==31},en=function(f){return f.type!==31&&f.type!==4},Ln=function(f){var c=[],i=[];return f.forEach(function(e){if(e.type===4){if(i.length===0)throw new Error("Error parsing function args, zero tokens for arg");c.push(i),i=[];return}e.type!==31&&i.push(e)}),i.length&&c.push(i),c},Ni=function(f,c){return c===11&&f.type===12||c===28&&f.type===29?!0:c===2&&f.type===3},Un=function(f){return f.type===17||f.type===15},Bn=function(f){return f.type===16||Un(f)},Xs=function(f){return f.length>1?[f[0],f[1]]:[f[0]]},In={type:17,number:0,flags:vn},Fs={type:16,number:50,flags:vn},kn={type:16,number:100,flags:vn},Hi=function(f,c,i){var e=f[0],t=f[1];return[pn(e,c),pn(typeof t!="undefined"?t:e,i)]},pn=function(f,c){if(f.type===16)return f.number/100*c;if(qn(f))switch(f.unit){case"rem":case"em":return 16*f.number;case"px":default:return f.number}return f.number},Ki="deg",Ss="grad",Xi="rad",bi="turn",Ji={name:"angle",parse:function(f,c){if(c.type===15)switch(c.unit){case Ki:return Math.PI*c.number/180;case Ss:return Math.PI/200*c.number;case Xi:return c.number;case bi:return Math.PI*2*c.number}throw new Error("Unsupported angle type")}},qi=function(f){return f.type===15&&(f.unit===Ki||f.unit===Ss||f.unit===Xi||f.unit===bi)},Ts=function(f){var c=f.filter(Ot).map(function(i){return i.value}).join(" ");switch(c){case"to bottom right":case"to right bottom":case"left top":case"top left":return[In,In];case"to top":case"bottom":return jn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[In,kn];case"to right":case"left":return jn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[kn,kn];case"to bottom":case"top":return jn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[kn,In];case"to left":case"right":return jn(270)}return 0},jn=function(f){return Math.PI*f/180},Nn={name:"color",parse:function(f,c){if(c.type===18){var i=us[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported color function "'+c.name+'"');return i(f,c.values)}if(c.type===5){if(c.value.length===3){var e=c.value.substring(0,1),t=c.value.substring(1,2),r=c.value.substring(2,3);return xi(parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),1)}if(c.value.length===4){var e=c.value.substring(0,1),t=c.value.substring(1,2),r=c.value.substring(2,3),n=c.value.substring(3,4);return xi(parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16)/255)}if(c.value.length===6){var e=c.value.substring(0,2),t=c.value.substring(2,4),r=c.value.substring(4,6);return xi(parseInt(e,16),parseInt(t,16),parseInt(r,16),1)}if(c.value.length===8){var e=c.value.substring(0,2),t=c.value.substring(2,4),r=c.value.substring(4,6),n=c.value.substring(6,8);return xi(parseInt(e,16),parseInt(t,16),parseInt(r,16),parseInt(n,16)/255)}}if(c.type===20){var s=ui[c.value.toUpperCase()];if(typeof s!="undefined")return s}return ui.TRANSPARENT}},mi=function(f){return(255&f)===0},Dn=function(f){var c=255&f,i=255&f>>8,e=255&f>>16,t=255&f>>24;return c<255?"rgba("+t+","+e+","+i+","+c/255+")":"rgb("+t+","+e+","+i+")"},xi=function(f,c,i,e){return(f<<24|c<<16|i<<8|Math.round(e*255)<<0)>>>0},Js=function(f,c){if(f.type===17)return f.number;if(f.type===16){var i=c===3?1:255;return c===3?f.number/100*i:Math.round(f.number/100*i)}return 0},qs=function(f,c){var i=c.filter(en);if(i.length===3){var e=i.map(Js),t=e[0],r=e[1],n=e[2];return xi(t,r,n,1)}if(i.length===4){var s=i.map(Js),t=s[0],r=s[1],n=s[2],A=s[3];return xi(t,r,n,A)}return 0};function ls(f,c,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(c-f)*i*6+f:i<1/2?c:i<2/3?(c-f)*6*(2/3-i)+f:f}var $i=function(f,c){var i=c.filter(en),e=i[0],t=i[1],r=i[2],n=i[3],s=(e.type===17?jn(e.number):Ji.parse(f,e))/(Math.PI*2),A=Bn(t)?t.number/100:0,a=Bn(r)?r.number/100:0,l=typeof n!="undefined"&&Bn(n)?pn(n,1):1;if(A===0)return xi(a*255,a*255,a*255,1);var o=a<=.5?a*(A+1):a+A-a*A,h=a*2-o,d=ls(h,o,s+1/3),g=ls(h,o,s),v=ls(h,o,s-1/3);return xi(d*255,g*255,v*255,l)},us={hsl:$i,hsla:$i,rgb:qs,rgba:qs},Gi=function(f,c){return Nn.parse(f,pi.create(c).parseComponentValue())},ui={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},eA={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(Ot(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Is={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ii=function(f,c){var i=Nn.parse(f,c[0]),e=c[1];return e&&Bn(e)?{color:i,stop:e}:{color:i,stop:null}},Ds=function(f,c){var i=f[0],e=f[f.length-1];i.stop===null&&(i.stop=In),e.stop===null&&(e.stop=kn);for(var t=[],r=0,n=0;n<f.length;n++){var s=f[n].stop;if(s!==null){var A=pn(s,c);A>r?t.push(A):t.push(r),r=A}else t.push(null)}for(var a=null,n=0;n<t.length;n++){var l=t[n];if(l===null)a===null&&(a=n);else if(a!==null){for(var o=n-a,h=t[a-1],d=(l-h)/(o+1),g=1;g<=o;g++)t[a+g-1]=d*g;a=null}}return f.map(function(v,E){var T=v.color;return{color:T,stop:Math.max(Math.min(1,t[E]/c),0)}})},tA=function(f,c,i){var e=c/2,t=i/2,r=pn(f[0],c)-e,n=t-pn(f[1],i);return(Math.atan2(n,r)+Math.PI*2)%(Math.PI*2)},es=function(f,c,i){var e=typeof f=="number"?f:tA(f,c,i),t=Math.abs(c*Math.sin(e))+Math.abs(i*Math.cos(e)),r=c/2,n=i/2,s=t/2,A=Math.sin(e-Math.PI/2)*s,a=Math.cos(e-Math.PI/2)*s;return[t,r-a,r+a,n-A,n+A]},ii=function(f,c){return Math.sqrt(f*f+c*c)},Ls=function(f,c,i,e,t){var r=[[0,0],[0,c],[f,0],[f,c]];return r.reduce(function(n,s){var A=s[0],a=s[1],l=ii(i-A,e-a);return(t?l<n.optimumDistance:l>n.optimumDistance)?{optimumCorner:s,optimumDistance:l}:n},{optimumDistance:t?1/0:-1/0,optimumCorner:null}).optimumCorner},rA=function(f,c,i,e,t){var r=0,n=0;switch(f.size){case 0:f.shape===0?r=n=Math.min(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(r=Math.min(Math.abs(c),Math.abs(c-e)),n=Math.min(Math.abs(i),Math.abs(i-t)));break;case 2:if(f.shape===0)r=n=Math.min(ii(c,i),ii(c,i-t),ii(c-e,i),ii(c-e,i-t));else if(f.shape===1){var s=Math.min(Math.abs(i),Math.abs(i-t))/Math.min(Math.abs(c),Math.abs(c-e)),A=Ls(e,t,c,i,!0),a=A[0],l=A[1];r=ii(a-c,(l-i)/s),n=s*r}break;case 1:f.shape===0?r=n=Math.max(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(r=Math.max(Math.abs(c),Math.abs(c-e)),n=Math.max(Math.abs(i),Math.abs(i-t)));break;case 3:if(f.shape===0)r=n=Math.max(ii(c,i),ii(c,i-t),ii(c-e,i),ii(c-e,i-t));else if(f.shape===1){var s=Math.max(Math.abs(i),Math.abs(i-t))/Math.max(Math.abs(c),Math.abs(c-e)),o=Ls(e,t,c,i,!1),a=o[0],l=o[1];r=ii(a-c,(l-i)/s),n=s*r}break}return Array.isArray(f.size)&&(r=pn(f.size[0],e),n=f.size.length===2?pn(f.size[1],t):r),[r,n]},GA=function(f,c){var i=jn(180),e=[];return Ln(c).forEach(function(t,r){if(r===0){var n=t[0];if(n.type===20&&n.value==="to"){i=Ts(t);return}else if(qi(n)){i=Ji.parse(f,n);return}}var s=Ii(f,t);e.push(s)}),{angle:i,stops:e,type:1}},ts=function(f,c){var i=jn(180),e=[];return Ln(c).forEach(function(t,r){if(r===0){var n=t[0];if(n.type===20&&["top","left","right","bottom"].indexOf(n.value)!==-1){i=Ts(t);return}else if(qi(n)){i=(Ji.parse(f,n)+jn(270))%jn(360);return}}var s=Ii(f,t);e.push(s)}),{angle:i,stops:e,type:1}},cs=function(f,c){var i=jn(180),e=[],t=1,r=0,n=3,s=[];return Ln(c).forEach(function(A,a){var l=A[0];if(a===0){if(Ot(l)&&l.value==="linear"){t=1;return}else if(Ot(l)&&l.value==="radial"){t=2;return}}if(l.type===18){if(l.name==="from"){var o=Nn.parse(f,l.values[0]);e.push({stop:In,color:o})}else if(l.name==="to"){var o=Nn.parse(f,l.values[0]);e.push({stop:kn,color:o})}else if(l.name==="color-stop"){var h=l.values.filter(en);if(h.length===2){var o=Nn.parse(f,h[1]),d=h[0];ei(d)&&e.push({stop:{type:16,number:d.number*100,flags:d.flags},color:o})}}}}),t===1?{angle:(i+jn(180))%jn(360),stops:e,type:t}:{size:n,shape:r,stops:e,position:s,type:t}},En="closest-side",nt="farthest-side",mn="closest-corner",Gn="farthest-corner",Vn="circle",rs="ellipse",Vi="cover",Us="contain",nA=function(f,c){var i=0,e=3,t=[],r=[];return Ln(c).forEach(function(n,s){var A=!0;if(s===0){var a=!1;A=n.reduce(function(o,h){if(a)if(Ot(h))switch(h.value){case"center":return r.push(Fs),o;case"top":case"left":return r.push(In),o;case"right":case"bottom":return r.push(kn),o}else(Bn(h)||Un(h))&&r.push(h);else if(Ot(h))switch(h.value){case Vn:return i=0,!1;case rs:return i=1,!1;case"at":return a=!0,!1;case En:return e=0,!1;case Vi:case nt:return e=1,!1;case Us:case mn:return e=2,!1;case Gn:return e=3,!1}else if(Un(h)||Bn(h))return Array.isArray(e)||(e=[]),e.push(h),!1;return o},A)}if(A){var l=Ii(f,n);t.push(l)}}),{size:e,shape:i,stops:t,position:r,type:2}},ns=function(f,c){var i=0,e=3,t=[],r=[];return Ln(c).forEach(function(n,s){var A=!0;if(s===0?A=n.reduce(function(l,o){if(Ot(o))switch(o.value){case"center":return r.push(Fs),!1;case"top":case"left":return r.push(In),!1;case"right":case"bottom":return r.push(kn),!1}else if(Bn(o)||Un(o))return r.push(o),!1;return l},A):s===1&&(A=n.reduce(function(l,o){if(Ot(o))switch(o.value){case Vn:return i=0,!1;case rs:return i=1,!1;case Us:case En:return e=0,!1;case nt:return e=1,!1;case mn:return e=2,!1;case Vi:case Gn:return e=3,!1}else if(Un(o)||Bn(o))return Array.isArray(e)||(e=[]),e.push(o),!1;return l},A)),A){var a=Ii(f,n);t.push(a)}}),{size:e,shape:i,stops:t,position:r,type:2}},Ri=function(f){return f.type===1},Qi=function(f){return f.type===2},Di={name:"image",parse:function(f,c){if(c.type===22){var i={url:c.value,type:0};return f.cache.addImage(c.value),i}if(c.type===18){var e=Za[c.name];if(typeof e=="undefined")throw new Error('Attempting to parse an unsupported image function "'+c.name+'"');return e(f,c.values)}throw new Error("Unsupported image type "+c.type)}};function Al(f){return!(f.type===20&&f.value==="none")&&(f.type!==18||!!Za[f.name])}var Za={"linear-gradient":GA,"-moz-linear-gradient":ts,"-ms-linear-gradient":ts,"-o-linear-gradient":ts,"-webkit-linear-gradient":ts,"radial-gradient":nA,"-moz-radial-gradient":ns,"-ms-radial-gradient":ns,"-o-radial-gradient":ns,"-webkit-radial-gradient":ns,"-webkit-gradient":cs},al={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c.filter(function(e){return en(e)&&Al(e)}).map(function(e){return Di.parse(f,e)})}},ol={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(Ot(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},za={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(f,c){return Ln(c).map(function(i){return i.filter(Bn)}).map(Xs)}},VA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(f,c){return Ln(c).map(function(i){return i.filter(Ot).map(function(e){return e.value}).join(" ")}).map(iA)}},iA=function(f){switch(f){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Li;(function(f){f.AUTO="auto",f.CONTAIN="contain",f.COVER="cover"})(Li||(Li={}));var ll={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(f,c){return Ln(c).map(function(i){return i.filter(Ya)})}},Ya=function(f){return Ot(f)||Bn(f)},Rs=function(f){return{name:"border-"+f+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},WA=Rs("top"),ul=Rs("right"),sA=Rs("bottom"),cl=Rs("left"),AA=function(f){return{name:"border-radius-"+f,initialValue:"0 0",prefix:!1,type:1,parse:function(c,i){return Xs(i.filter(Bn))}}},ja=AA("top-left"),Xa=AA("top-right"),fl=AA("bottom-right"),Ja=AA("bottom-left"),aA=function(f){return{name:"border-"+f+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(c,i){switch(i){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},hl=aA("top"),ZA=aA("right"),dl=aA("bottom"),gl=aA("left"),oA=function(f){return{name:"border-"+f+"-width",initialValue:"0",type:0,prefix:!1,parse:function(c,i){return qn(i)?i.number:0}}},pl=oA("top"),ml=oA("right"),_l=oA("bottom"),vl=oA("left"),yl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Bl={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(f,c){switch(c){case"rtl":return 1;case"ltr":default:return 0}}},lA={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(f,c){return c.filter(Ot).reduce(function(i,e){return i|El(e.value)},0)}},El=function(f){switch(f){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},qa={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},eo={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(f,c){return c.type===20&&c.value==="normal"?0:c.type===17||c.type===15?c.number:0}},uA;(function(f){f.NORMAL="normal",f.STRICT="strict"})(uA||(uA={}));var zA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"strict":return uA.STRICT;case"normal":default:return uA.NORMAL}}},ci={name:"line-height",initialValue:"normal",prefix:!1,type:4},Fi=function(f,c){return Ot(f)&&f.value==="normal"?1.2*c:f.type===17?c*f.number:Bn(f)?pn(f,c):c},YA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(f,c){return c.type===20&&c.value==="none"?null:Di.parse(f,c)}},wl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(f,c){switch(c){case"inside":return 0;case"outside":default:return 1}}},fs={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},cA=function(f){return{name:"margin-"+f,initialValue:"0",prefix:!1,type:4}},Cl=cA("top"),bl=cA("right"),xl=cA("bottom"),to=cA("left"),ro={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(f,c){return c.filter(Ot).map(function(i){switch(i.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},jA={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-word":return"break-word";case"normal":default:return"normal"}}},Qs=function(f){return{name:"padding-"+f,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Fl=Qs("top"),no=Qs("right"),Sl=Qs("bottom"),io=Qs("left"),Tl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(f,c){switch(c){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},so={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(f,c){switch(c){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Il={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&an(c[0],"none")?[]:Ln(c).map(function(i){for(var e={color:ui.TRANSPARENT,offsetX:In,offsetY:In,blur:In},t=0,r=0;r<i.length;r++){var n=i[r];Un(n)?(t===0?e.offsetX=n:t===1?e.offsetY=n:e.blur=n,t++):e.color=Nn.parse(f,n)}return e})}},Dl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Ll={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(f,c){if(c.type===20&&c.value==="none")return null;if(c.type===18){var i=ao[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+c.name+'"');return i(c.values)}return null}},Ao=function(f){var c=f.filter(function(i){return i.type===17}).map(function(i){return i.number});return c.length===6?c:null},Ul=function(f){var c=f.filter(function(A){return A.type===17}).map(function(A){return A.number}),i=c[0],e=c[1];c[2],c[3];var t=c[4],r=c[5];c[6],c[7],c[8],c[9],c[10],c[11];var n=c[12],s=c[13];return c[14],c[15],c.length===16?[i,e,t,r,n,s]:null},ao={matrix:Ao,matrix3d:Ul},hs={type:16,number:50,flags:vn},oo=[hs,hs],lo={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(f,c){var i=c.filter(Bn);return i.length!==2?oo:[i[0],i[1]]}},Hn={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},_i;(function(f){f.NORMAL="normal",f.BREAK_ALL="break-all",f.KEEP_ALL="keep-all"})(_i||(_i={}));for(var XA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-all":return _i.BREAK_ALL;case"keep-all":return _i.KEEP_ALL;case"normal":default:return _i.NORMAL}}},Rl={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(f,c){if(c.type===20)return{auto:!0,order:0};if(ei(c))return{auto:!1,order:c.number};throw new Error("Invalid z-index number parsed")}},uo={name:"time",parse:function(f,c){if(c.type===15)switch(c.unit.toLowerCase()){case"s":return 1e3*c.number;case"ms":return c.number}throw new Error("Unsupported time type")}},JA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(f,c){return ei(c)?c.number:1}},qA={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ds={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(f,c){return c.filter(Ot).map(function(i){switch(i.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(i){return i!==0})}},Ql={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(f,c){var i=[],e=[];return c.forEach(function(t){switch(t.type){case 20:case 0:i.push(t.value);break;case 17:i.push(t.number.toString());break;case 4:e.push(i.join(" ")),i.length=0;break}}),i.length&&e.push(i.join(" ")),e.map(function(t){return t.indexOf(" ")===-1?t:"'"+t+"'"})}},Wi={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},We={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(f,c){if(ei(c))return c.number;if(Ot(c))switch(c.value){case"bold":return 700;case"normal":default:return 400}return 400}},co={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.filter(Ot).map(function(i){return i.value})}},ea={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},On=function(f,c){return(f&c)!==0},ks={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c}},kl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;for(var e=[],t=c.filter(gn),r=0;r<t.length;r++){var n=t[r],s=t[r+1];if(n.type===20){var A=s&&ei(s)?s.number:1;e.push({counter:n.value,increment:A})}}return e}},Ol={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return[];for(var i=[],e=c.filter(gn),t=0;t<e.length;t++){var r=e[t],n=e[t+1];if(Ot(r)&&r.value!=="none"){var s=n&&ei(n)?n.number:0;i.push({counter:r.value,reset:s})}}return i}},Pl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(f,c){return c.filter(qn).map(function(i){return uo.parse(f,i)})}},Ml={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;var e=[],t=c.filter(Sr);if(t.length%2!==0)return null;for(var r=0;r<t.length;r+=2){var n=t[r].value,s=t[r+1].value;e.push({open:n,close:s})}return e}},fo=function(f,c,i){if(!f)return"";var e=f[Math.min(c,f.length-1)];return e?i?e.open:e.close:""},gs={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&an(c[0],"none")?[]:Ln(c).map(function(i){for(var e={color:255,offsetX:In,offsetY:In,blur:In,spread:In,inset:!1},t=0,r=0;r<i.length;r++){var n=i[r];an(n,"inset")?e.inset=!0:Un(n)?(t===0?e.offsetX=n:t===1?e.offsetY=n:t===2?e.blur=n:e.spread=n,t++):e.color=Nn.parse(f,n)}return e})}},ta={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(f,c){var i=[0,1,2],e=[];return c.filter(Ot).forEach(function(t){switch(t.value){case"stroke":e.push(1);break;case"fill":e.push(0);break;case"markers":e.push(2);break}}),i.forEach(function(t){e.indexOf(t)===-1&&e.push(t)}),e}},ho={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},fA={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(f,c){return qn(c)?c.number:0}},vi=function(){function f(c,i){var e,t;this.animationDuration=ir(c,Pl,i.animationDuration),this.backgroundClip=ir(c,eA,i.backgroundClip),this.backgroundColor=ir(c,Is,i.backgroundColor),this.backgroundImage=ir(c,al,i.backgroundImage),this.backgroundOrigin=ir(c,ol,i.backgroundOrigin),this.backgroundPosition=ir(c,za,i.backgroundPosition),this.backgroundRepeat=ir(c,VA,i.backgroundRepeat),this.backgroundSize=ir(c,ll,i.backgroundSize),this.borderTopColor=ir(c,WA,i.borderTopColor),this.borderRightColor=ir(c,ul,i.borderRightColor),this.borderBottomColor=ir(c,sA,i.borderBottomColor),this.borderLeftColor=ir(c,cl,i.borderLeftColor),this.borderTopLeftRadius=ir(c,ja,i.borderTopLeftRadius),this.borderTopRightRadius=ir(c,Xa,i.borderTopRightRadius),this.borderBottomRightRadius=ir(c,fl,i.borderBottomRightRadius),this.borderBottomLeftRadius=ir(c,Ja,i.borderBottomLeftRadius),this.borderTopStyle=ir(c,hl,i.borderTopStyle),this.borderRightStyle=ir(c,ZA,i.borderRightStyle),this.borderBottomStyle=ir(c,dl,i.borderBottomStyle),this.borderLeftStyle=ir(c,gl,i.borderLeftStyle),this.borderTopWidth=ir(c,pl,i.borderTopWidth),this.borderRightWidth=ir(c,ml,i.borderRightWidth),this.borderBottomWidth=ir(c,_l,i.borderBottomWidth),this.borderLeftWidth=ir(c,vl,i.borderLeftWidth),this.boxShadow=ir(c,gs,i.boxShadow),this.color=ir(c,yl,i.color),this.direction=ir(c,Bl,i.direction),this.display=ir(c,lA,i.display),this.float=ir(c,qa,i.cssFloat),this.fontFamily=ir(c,Ql,i.fontFamily),this.fontSize=ir(c,Wi,i.fontSize),this.fontStyle=ir(c,ea,i.fontStyle),this.fontVariant=ir(c,co,i.fontVariant),this.fontWeight=ir(c,We,i.fontWeight),this.letterSpacing=ir(c,eo,i.letterSpacing),this.lineBreak=ir(c,zA,i.lineBreak),this.lineHeight=ir(c,ci,i.lineHeight),this.listStyleImage=ir(c,YA,i.listStyleImage),this.listStylePosition=ir(c,wl,i.listStylePosition),this.listStyleType=ir(c,fs,i.listStyleType),this.marginTop=ir(c,Cl,i.marginTop),this.marginRight=ir(c,bl,i.marginRight),this.marginBottom=ir(c,xl,i.marginBottom),this.marginLeft=ir(c,to,i.marginLeft),this.opacity=ir(c,JA,i.opacity);var r=ir(c,ro,i.overflow);this.overflowX=r[0],this.overflowY=r[r.length>1?1:0],this.overflowWrap=ir(c,jA,i.overflowWrap),this.paddingTop=ir(c,Fl,i.paddingTop),this.paddingRight=ir(c,no,i.paddingRight),this.paddingBottom=ir(c,Sl,i.paddingBottom),this.paddingLeft=ir(c,io,i.paddingLeft),this.paintOrder=ir(c,ta,i.paintOrder),this.position=ir(c,so,i.position),this.textAlign=ir(c,Tl,i.textAlign),this.textDecorationColor=ir(c,qA,(e=i.textDecorationColor)!==null&&e!==void 0?e:i.color),this.textDecorationLine=ir(c,ds,(t=i.textDecorationLine)!==null&&t!==void 0?t:i.textDecoration),this.textShadow=ir(c,Il,i.textShadow),this.textTransform=ir(c,Dl,i.textTransform),this.transform=ir(c,Ll,i.transform),this.transformOrigin=ir(c,lo,i.transformOrigin),this.visibility=ir(c,Hn,i.visibility),this.webkitTextStrokeColor=ir(c,ho,i.webkitTextStrokeColor),this.webkitTextStrokeWidth=ir(c,fA,i.webkitTextStrokeWidth),this.wordBreak=ir(c,XA,i.wordBreak),this.zIndex=ir(c,Rl,i.zIndex)}return f.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},f.prototype.isTransparent=function(){return mi(this.backgroundColor)},f.prototype.isTransformed=function(){return this.transform!==null},f.prototype.isPositioned=function(){return this.position!==0},f.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},f.prototype.isFloating=function(){return this.float!==0},f.prototype.isInlineLevel=function(){return On(this.display,4)||On(this.display,33554432)||On(this.display,268435456)||On(this.display,536870912)||On(this.display,67108864)||On(this.display,134217728)},f}(),Nl=function(){function f(c,i){this.content=ir(c,ks,i.content),this.quotes=ir(c,Ml,i.quotes)}return f}(),ra=function(){function f(c,i){this.counterIncrement=ir(c,kl,i.counterIncrement),this.counterReset=ir(c,Ol,i.counterReset)}return f}(),ir=function(f,c,i){var e=new gi,t=i!==null&&typeof i!="undefined"?i.toString():c.initialValue;e.write(t);var r=new pi(e.read());switch(c.type){case 2:var n=r.parseComponentValue();return c.parse(f,Ot(n)?n.value:c.initialValue);case 0:return c.parse(f,r.parseComponentValue());case 1:return c.parse(f,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(c.format){case"angle":return Ji.parse(f,r.parseComponentValue());case"color":return Nn.parse(f,r.parseComponentValue());case"image":return Di.parse(f,r.parseComponentValue());case"length":var s=r.parseComponentValue();return Un(s)?s:In;case"length-percentage":var A=r.parseComponentValue();return Bn(A)?A:In;case"time":return uo.parse(f,r.parseComponentValue())}break}},Hl="data-html2canvas-debug",hA=function(f){var c=f.getAttribute(Hl);switch(c){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},na=function(f,c){var i=hA(f);return i===1||c===i},Si=function(){function f(c,i){if(this.context=c,this.textNodes=[],this.elements=[],this.flags=0,na(i,3))debugger;this.styles=new vi(c,window.getComputedStyle(i,null)),vs(i)&&(this.styles.animationDuration.some(function(e){return e>0})&&(i.style.animationDuration="0s"),this.styles.transform!==null&&(i.style.transform="none")),this.bounds=m(this.context,i),na(i,4)&&(this.flags|=16)}return f}(),ki="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Os="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ps=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),dA=0;dA<Os.length;dA++)ps[Os.charCodeAt(dA)]=dA;for(var ia=function(f){var c=f.length*.75,i=f.length,e,t=0,r,n,s,A;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var a=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),l=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e<i;e+=4)r=ps[f.charCodeAt(e)],n=ps[f.charCodeAt(e+1)],s=ps[f.charCodeAt(e+2)],A=ps[f.charCodeAt(e+3)],l[t++]=r<<2|n>>4,l[t++]=(n&15)<<4|s>>2,l[t++]=(s&3)<<6|A&63;return a},Ps=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},Kl=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},is=5,gA=11,pA=2,go=gA-is,po=65536>>is,sa=1<<is,mA=sa-1,Ms=1024>>is,Aa=po+Ms,$l=Aa,Gl=32,mo=$l+Gl,_o=65536>>gA,Vl=1<<go,Wl=Vl-1,aa=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},Zl=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},oa=function(f,c){var i=ia(f),e=Array.isArray(i)?Kl(i):new Uint32Array(i),t=Array.isArray(i)?Ps(i):new Uint16Array(i),r=24,n=aa(t,r/2,e[4]/2),s=e[5]===2?aa(t,(r+e[4])/2):Zl(e,Math.ceil((r+e[4])/4));return new la(e[0],e[1],e[2],e[3],n,s)},la=function(){function f(c,i,e,t,r,n){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=r,this.data=n}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>is],i=(i<<pA)+(c&mA),this.data[i];if(c<=65535)return i=this.index[po+(c-55296>>is)],i=(i<<pA)+(c&mA),this.data[i];if(c<this.highStart)return i=mo-_o+(c>>gA),i=this.index[i],i+=c>>is&Wl,i=this.index[i],i=(i<<pA)+(c&mA),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",si=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ua=0;ua<zl.length;ua++)si[zl.charCodeAt(ua)]=ua;var Yl=1,vo=2,yo=3,jl=4,Xl=5,Ns=7,Bo=8,Zi=9,ca=10,Eo=11,wo=12,Ti=13,fa=14,_A=15,Jl=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var r=f.charCodeAt(i++);(r&64512)===56320?c.push(((t&1023)<<10)+(r&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},ql=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,r="";++t<i;){var n=f[t];n<=65535?e.push(n):(n-=65536,e.push((n>>10)+55296,n%1024+56320)),(t+1===i||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r},eu=oa(ki),yi="\xD7",ha="\xF7",tu=function(f){return eu.get(f)},ru=function(f,c,i){var e=i-2,t=c[e],r=c[i-1],n=c[i];if(r===vo&&n===yo)return yi;if(r===vo||r===yo||r===jl||n===vo||n===yo||n===jl)return ha;if(r===Bo&&[Bo,Zi,Eo,wo].indexOf(n)!==-1||(r===Eo||r===Zi)&&(n===Zi||n===ca)||(r===wo||r===ca)&&n===ca||n===Ti||n===Xl||n===Ns||r===Yl)return yi;if(r===Ti&&n===fa){for(;t===Xl;)t=c[--e];if(t===fa)return yi}if(r===_A&&n===_A){for(var s=0;t===_A;)s++,t=c[--e];if(s%2===0)return yi}return ha},Co=function(f){var c=Jl(f),i=c.length,e=0,t=0,r=c.map(tu);return{next:function(){if(e>=i)return{done:!0,value:null};for(var n=yi;e<i&&(n=ru(c,r,++e))===yi;);if(n!==yi||e===i){var s=ql.apply(null,c.slice(t,e));return t=e,{value:s,done:!1}}return{done:!0,value:null}}}},nu=function(f){for(var c=Co(f),i=[],e;!(e=c.next()).done;)e.value&&i.push(e.value.slice());return i},bo=function(f){var c=123;if(f.createRange){var i=f.createRange();if(i.getBoundingClientRect){var e=f.createElement("boundtest");e.style.height=c+"px",e.style.display="block",f.body.appendChild(e),i.selectNode(e);var t=i.getBoundingClientRect(),r=Math.round(t.height);if(f.body.removeChild(e),r===c)return!0}}return!1},iu=function(f){var c=f.createElement("boundtest");c.style.width="50px",c.style.display="block",c.style.fontSize="12px",c.style.letterSpacing="0px",c.style.wordSpacing="0px",f.body.appendChild(c);var i=f.createRange();c.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var e=c.firstChild,t=O(e.data).map(function(A){return u(A)}),r=0,n={},s=t.every(function(A,a){i.setStart(e,r),i.setEnd(e,r+A.length);var l=i.getBoundingClientRect();r+=A.length;var o=l.x>n.x||l.y>n.y;return n=l,a===0?!0:o});return f.body.removeChild(c),s},su=function(){return typeof new Image().crossOrigin!="undefined"},Au=function(){return typeof new XMLHttpRequest().responseType=="string"},au=function(f){var c=new Image,i=f.createElement("canvas"),e=i.getContext("2d");if(!e)return!1;c.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{e.drawImage(c,0,0),i.toDataURL()}catch(t){return!1}return!0},xo=function(f){return f[0]===0&&f[1]===255&&f[2]===0&&f[3]===255},ou=function(f){var c=f.createElement("canvas"),i=100;c.width=i,c.height=i;var e=c.getContext("2d");if(!e)return Promise.reject(!1);e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,i,i);var t=new Image,r=c.toDataURL();t.src=r;var n=da(i,i,0,0,t);return e.fillStyle="red",e.fillRect(0,0,i,i),ga(n).then(function(s){e.drawImage(s,0,0);var A=e.getImageData(0,0,i,i).data;e.fillStyle="red",e.fillRect(0,0,i,i);var a=f.createElement("div");return a.style.backgroundImage="url("+r+")",a.style.height=i+"px",xo(A)?ga(da(i,i,0,0,a)):Promise.reject(!1)}).then(function(s){return e.drawImage(s,0,0),xo(e.getImageData(0,0,i,i).data)}).catch(function(){return!1})},da=function(f,c,i,e,t){var r="http://www.w3.org/2000/svg",n=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return n.setAttributeNS(null,"width",f.toString()),n.setAttributeNS(null,"height",c.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",i.toString()),s.setAttributeNS(null,"y",e.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),n.appendChild(s),s.appendChild(t),n},ga=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){return c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Pn={get SUPPORT_RANGE_BOUNDS(){var f=bo(document);return Object.defineProperty(Pn,"SUPPORT_RANGE_BOUNDS",{value:f}),f},get SUPPORT_WORD_BREAKING(){var f=Pn.SUPPORT_RANGE_BOUNDS&&iu(document);return Object.defineProperty(Pn,"SUPPORT_WORD_BREAKING",{value:f}),f},get SUPPORT_SVG_DRAWING(){var f=au(document);return Object.defineProperty(Pn,"SUPPORT_SVG_DRAWING",{value:f}),f},get SUPPORT_FOREIGNOBJECT_DRAWING(){var f=typeof Array.from=="function"&&typeof window.fetch=="function"?ou(document):Promise.resolve(!1);return Object.defineProperty(Pn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:f}),f},get SUPPORT_CORS_IMAGES(){var f=su();return Object.defineProperty(Pn,"SUPPORT_CORS_IMAGES",{value:f}),f},get SUPPORT_RESPONSE_TYPE(){var f=Au();return Object.defineProperty(Pn,"SUPPORT_RESPONSE_TYPE",{value:f}),f},get SUPPORT_CORS_XHR(){var f="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Pn,"SUPPORT_CORS_XHR",{value:f}),f},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var f=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Pn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:f}),f}},Hs=function(){function f(c,i){this.text=c,this.bounds=i}return f}(),pa=function(f,c,i,e){var t=uu(c,i),r=[],n=0;return t.forEach(function(s){if(i.textDecorationLine.length||s.trim().length>0)if(Pn.SUPPORT_RANGE_BOUNDS){var A=_a(e,n,s.length).getClientRects();if(A.length>1){var a=va(s),l=0;a.forEach(function(h){r.push(new Hs(h,W.fromDOMRectList(f,_a(e,l+n,h.length).getClientRects()))),l+=h.length})}else r.push(new Hs(s,W.fromDOMRectList(f,A)))}else{var o=e.splitText(s.length);r.push(new Hs(s,ma(f,e))),e=o}else Pn.SUPPORT_RANGE_BOUNDS||(e=e.splitText(s.length));n+=s.length}),r},ma=function(f,c){var i=c.ownerDocument;if(i){var e=i.createElement("html2canvaswrapper");e.appendChild(c.cloneNode(!0));var t=c.parentNode;if(t){t.replaceChild(e,c);var r=m(f,e);return e.firstChild&&t.replaceChild(e.firstChild,e),r}}return W.EMPTY},_a=function(f,c,i){var e=f.ownerDocument;if(!e)throw new Error("Node has no owner document");var t=e.createRange();return t.setStart(f,c),t.setEnd(f,c+i),t},va=function(f){if(Pn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(c.segment(f)).map(function(i){return i.segment})}return nu(f)},lu=function(f,c){if(Pn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(f)).map(function(e){return e.segment})}return fu(f,c)},uu=function(f,c){return c.letterSpacing!==0?va(f):lu(f,c)},cu=[32,160,4961,65792,65793,4153,4241],fu=function(f,c){for(var i=vr(f,{lineBreak:c.lineBreak,wordBreak:c.overflowWrap==="break-word"?"break-word":c.wordBreak}),e=[],t,r=function(){if(t.value){var n=t.value.slice(),s=O(n),A="";s.forEach(function(a){cu.indexOf(a)===-1?A+=u(a):(A.length&&e.push(A),e.push(u(a)),A="")}),A.length&&e.push(A)}};!(t=i.next()).done;)r();return e},hu=function(){function f(c,i,e){this.text=vA(i.data,e.textTransform),this.textBounds=pa(c,this.text,e,i)}return f}(),vA=function(f,c){switch(c){case 1:return f.toLowerCase();case 3:return f.replace(du,yA);case 2:return f.toUpperCase();default:return f}},du=/(^|\s|:|-|\(|\))([a-z])/g,yA=function(f,c,i){return f.length>0?c+i.toUpperCase():f},Fo=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,t.context.cache.addImage(t.src),t}return c}(Si),So=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return c}(Si),ya=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this,r=new XMLSerializer,n=m(i,e);return e.setAttribute("width",n.width+"px"),e.setAttribute("height",n.height+"px"),t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,t.context.cache.addImage(t.svg),t}return c}(Si),To=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(Si),Ba=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.start=e.start,t.reversed=typeof e.reversed=="boolean"&&e.reversed===!0,t}return c}(Si),gu=[{type:15,flags:0,unit:"px",number:3}],pu=[{type:16,flags:0,number:50}],Io=function(f){return f.width>f.height?new W(f.left+(f.width-f.height)/2,f.top,f.height,f.height):f.width<f.height?new W(f.left,f.top+(f.height-f.width)/2,f.width,f.width):f},mu=function(f){var c=f.type===_u?new Array(f.value.length+1).join("\u2022"):f.value;return c.length===0?f.placeholder||"":c},BA="checkbox",EA="radio",_u="password",Ea=707406591,wA=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;switch(t.type=e.type.toLowerCase(),t.checked=e.checked,t.value=mu(e),(t.type===BA||t.type===EA)&&(t.styles.backgroundColor=3739148031,t.styles.borderTopColor=t.styles.borderRightColor=t.styles.borderBottomColor=t.styles.borderLeftColor=2779096575,t.styles.borderTopWidth=t.styles.borderRightWidth=t.styles.borderBottomWidth=t.styles.borderLeftWidth=1,t.styles.borderTopStyle=t.styles.borderRightStyle=t.styles.borderBottomStyle=t.styles.borderLeftStyle=1,t.styles.backgroundClip=[0],t.styles.backgroundOrigin=[0],t.bounds=Io(t.bounds)),t.type){case BA:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=gu;break;case EA:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=pu;break}return t}return c}(Si),Ai=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this,r=e.options[e.selectedIndex||0];return t.value=r&&r.text||"",t}return c}(Si),fi=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(Si),ss=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;t.src=e.src,t.width=parseInt(e.width,10)||0,t.height=parseInt(e.height,10)||0,t.backgroundColor=t.styles.backgroundColor;try{if(e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement){t.tree=Ca(i,e.contentWindow.document.documentElement);var r=e.contentWindow.document.documentElement?Gi(i,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):ui.TRANSPARENT,n=e.contentWindow.document.body?Gi(i,getComputedStyle(e.contentWindow.document.body).backgroundColor):ui.TRANSPARENT;t.backgroundColor=mi(r)?mi(n)?t.styles.backgroundColor:n:r}}catch(s){}return t}return c}(Si),Bi=["OL","UL","MENU"],CA=function(f,c,i,e){for(var t=c.firstChild,r=void 0;t;t=r)if(r=t.nextSibling,Do(t)&&t.data.trim().length>0)i.textNodes.push(new hu(f,t,i.styles));else if(_s(t))if(Oi(t)&&t.assignedNodes)t.assignedNodes().forEach(function(s){return CA(f,s,i,e)});else{var n=wa(f,t);n.styles.isVisible()&&(ms(t,n,e)?n.flags|=4:ba(n.styles)&&(n.flags|=2),Bi.indexOf(t.tagName)!==-1&&(n.flags|=8),i.elements.push(n),t.slot,t.shadowRoot?CA(f,t.shadowRoot,n,e):!Gs(t)&&!Lo(t)&&!SA(t)&&CA(f,t,n,e))}},wa=function(f,c){return $s(c)?new Fo(f,c):FA(c)?new So(f,c):Lo(c)?new ya(f,c):vu(c)?new To(f,c):Ks(c)?new Ba(f,c):ys(c)?new wA(f,c):SA(c)?new Ai(f,c):Gs(c)?new fi(f,c):Uo(c)?new ss(f,c):new Si(f,c)},Ca=function(f,c){var i=wa(f,c);return i.flags|=4,CA(f,c,i,i),i},ms=function(f,c,i){return c.styles.isPositionedWithZIndex()||c.styles.opacity<1||c.styles.isTransformed()||xa(f)&&i.styles.isTransparent()},ba=function(f){return f.isPositioned()||f.isFloating()},Do=function(f){return f.nodeType===Node.TEXT_NODE},_s=function(f){return f.nodeType===Node.ELEMENT_NODE},vs=function(f){return _s(f)&&typeof f.style!="undefined"&&!bA(f)},bA=function(f){return typeof f.className=="object"},vu=function(f){return f.tagName==="LI"},Ks=function(f){return f.tagName==="OL"},ys=function(f){return f.tagName==="INPUT"},xA=function(f){return f.tagName==="HTML"},Lo=function(f){return f.tagName==="svg"},xa=function(f){return f.tagName==="BODY"},FA=function(f){return f.tagName==="CANVAS"},Fa=function(f){return f.tagName==="VIDEO"},$s=function(f){return f.tagName==="IMG"},Uo=function(f){return f.tagName==="IFRAME"},As=function(f){return f.tagName==="STYLE"},yu=function(f){return f.tagName==="SCRIPT"},Gs=function(f){return f.tagName==="TEXTAREA"},SA=function(f){return f.tagName==="SELECT"},Oi=function(f){return f.tagName==="SLOT"},Ro=function(f){return f.tagName.indexOf("-")>0},Qo=function(){function f(){this.counters={}}return f.prototype.getCounterValue=function(c){var i=this.counters[c];return i&&i.length?i[i.length-1]:1},f.prototype.getCounterValues=function(c){var i=this.counters[c];return i||[]},f.prototype.pop=function(c){var i=this;c.forEach(function(e){return i.counters[e].pop()})},f.prototype.parse=function(c){var i=this,e=c.counterIncrement,t=c.counterReset,r=!0;e!==null&&e.forEach(function(s){var A=i.counters[s.counter];A&&s.increment!==0&&(r=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=s.increment)});var n=[];return r&&t.forEach(function(s){var A=i.counters[s.counter];n.push(s.counter),A||(A=i.counters[s.counter]=[]),A.push(s.reset)}),n},f}(),ko={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Sa={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Bu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Eu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Bs=function(f,c,i,e,t,r){return f<c||f>i?Ws(f,t,r.length>0):e.integers.reduce(function(n,s,A){for(;f>=s;)f-=s,n+=e.values[A];return n},"")+r},Ta=function(f,c,i,e){var t="";do i||f--,t=e(f)+t,f/=c;while(f*c>=c);return t},un=function(f,c,i,e,t){var r=i-c+1;return(f<0?"-":"")+(Ta(Math.abs(f),r,e,function(n){return u(Math.floor(n%r)+c)})+t)},ti=function(f,c,i){i===void 0&&(i=". ");var e=c.length;return Ta(Math.abs(f),e,!1,function(t){return c[Math.floor(t%e)]})+i},Es=1,zi=2,Yi=4,Vs=8,Pi=function(f,c,i,e,t,r){if(f<-9999||f>9999)return Ws(f,4,t.length>0);var n=Math.abs(f),s=t;if(n===0)return c[0]+s;for(var A=0;n>0&&A<=4;A++){var a=n%10;a===0&&On(r,Es)&&s!==""?s=c[a]+s:a>1||a===1&&A===0||a===1&&A===1&&On(r,zi)||a===1&&A===1&&On(r,Yi)&&f>100||a===1&&A>1&&On(r,Vs)?s=c[a]+(A>0?i[A-1]:"")+s:a===1&&A>0&&(s=i[A-1]+s),n=Math.floor(n/10)}return(f<0?e:"")+s},Oo="\u5341\u767E\u5343\u842C",ji="\u62FE\u4F70\u4EDF\u842C",Ia="\u30DE\u30A4\u30CA\u30B9",Da="\uB9C8\uC774\uB108\uC2A4",Ws=function(f,c,i){var e=i?". ":"",t=i?"\u3001":"",r=i?", ":"",n=i?" ":"";switch(c){case 0:return"\u2022"+n;case 1:return"\u25E6"+n;case 2:return"\u25FE"+n;case 5:var s=un(f,48,57,!0,e);return s.length<4?"0"+s:s;case 4:return ti(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",t);case 6:return Bs(f,1,3999,ko,3,e).toLowerCase();case 7:return Bs(f,1,3999,ko,3,e);case 8:return un(f,945,969,!1,e);case 9:return un(f,97,122,!1,e);case 10:return un(f,65,90,!1,e);case 11:return un(f,1632,1641,!0,e);case 12:case 49:return Bs(f,1,9999,Sa,3,e);case 35:return Bs(f,1,9999,Sa,3,e).toLowerCase();case 13:return un(f,2534,2543,!0,e);case 14:case 30:return un(f,6112,6121,!0,e);case 15:return ti(f,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",t);case 16:return ti(f,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",t);case 17:case 48:return Pi(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Oo,"\u8CA0",t,zi|Yi|Vs);case 47:return Pi(f,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",ji,"\u8CA0",t,Es|zi|Yi|Vs);case 42:return Pi(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Oo,"\u8D1F",t,zi|Yi|Vs);case 41:return Pi(f,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",ji,"\u8D1F",t,Es|zi|Yi|Vs);case 26:return Pi(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ia,t,0);case 25:return Pi(f,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ia,t,Es|zi|Yi);case 31:return Pi(f,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Da,r,Es|zi|Yi);case 33:return Pi(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Da,r,0);case 32:return Pi(f,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Da,r,Es|zi|Yi);case 18:return un(f,2406,2415,!0,e);case 20:return Bs(f,1,19999,Eu,3,e);case 21:return un(f,2790,2799,!0,e);case 22:return un(f,2662,2671,!0,e);case 22:return Bs(f,1,10999,Bu,3,e);case 23:return ti(f,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return ti(f,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return un(f,3302,3311,!0,e);case 28:return ti(f,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",t);case 29:return ti(f,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",t);case 34:return un(f,3792,3801,!0,e);case 37:return un(f,6160,6169,!0,e);case 38:return un(f,4160,4169,!0,e);case 39:return un(f,2918,2927,!0,e);case 40:return un(f,1776,1785,!0,e);case 43:return un(f,3046,3055,!0,e);case 44:return un(f,3174,3183,!0,e);case 45:return un(f,3664,3673,!0,e);case 46:return un(f,3872,3881,!0,e);case 3:default:return un(f,48,57,!0,e)}},TA="data-html2canvas-ignore",La=function(){function f(c,i,e){if(this.context=c,this.options=e,this.scrolledElements=[],this.referenceElement=i,this.counters=new Qo,this.quoteDepth=0,!i.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(i.ownerDocument.documentElement,!1)}return f.prototype.toIFrame=function(c,i){var e=this,t=IA(c,i);if(!t.contentWindow)return Promise.reject("Unable to find iframe window");var r=c.defaultView.pageXOffset,n=c.defaultView.pageYOffset,s=t.contentWindow,A=s.document,a=Ua(t).then(function(){return me(e,void 0,void 0,function(){var l,o;return Se(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(Ra),s&&(s.scrollTo(i.left,i.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==i.top||s.scrollX!==i.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-i.left,s.scrollY-i.top,0,0))),l=this.options.onclone,o=this.clonedReferenceElement,typeof o=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:A.fonts&&A.fonts.ready?[4,A.fonts.ready]:[3,2];case 1:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Cu(A)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof l=="function"?[2,Promise.resolve().then(function(){return l(A,o)}).then(function(){return t})]:[2,t]}})})});return A.open(),A.write(xu(document.doctype)+"<html></html>"),Po(this.referenceElement.ownerDocument,r,n),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),a},f.prototype.createElementClone=function(c){if(na(c,2))debugger;if(FA(c))return this.createCanvasClone(c);if(Fa(c))return this.createVideoClone(c);if(As(c))return this.createStyleClone(c);var i=c.cloneNode(!1);return $s(i)&&($s(c)&&c.currentSrc&&c.currentSrc!==c.src&&(i.src=c.currentSrc,i.srcset=""),i.loading==="lazy"&&(i.loading="eager")),Ro(i)?this.createCustomElementClone(i):i},f.prototype.createCustomElementClone=function(c){var i=document.createElement("html2canvascustomelement");return DA(c.style,i),i},f.prototype.createStyleClone=function(c){try{var i=c.sheet;if(i&&i.cssRules){var e=[].slice.call(i.cssRules,0).reduce(function(r,n){return n&&typeof n.cssText=="string"?r+n.cssText:r},""),t=c.cloneNode(!1);return t.textContent=e,t}}catch(r){if(this.context.logger.error("Unable to access cssRules property",r),r.name!=="SecurityError")throw r}return c.cloneNode(!1)},f.prototype.createCanvasClone=function(c){var i;if(this.options.inlineImages&&c.ownerDocument){var e=c.ownerDocument.createElement("img");try{return e.src=c.toDataURL(),e}catch(a){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",c)}}var t=c.cloneNode(!1);try{t.width=c.width,t.height=c.height;var r=c.getContext("2d"),n=t.getContext("2d");if(n)if(!this.options.allowTaint&&r)n.putImageData(r.getImageData(0,0,c.width,c.height),0,0);else{var s=(i=c.getContext("webgl2"))!==null&&i!==void 0?i:c.getContext("webgl");if(s){var A=s.getContextAttributes();(A==null?void 0:A.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",c)}n.drawImage(c,0,0)}return t}catch(a){this.context.logger.info("Unable to clone canvas as it is tainted",c)}return t},f.prototype.createVideoClone=function(c){var i=c.ownerDocument.createElement("canvas");i.width=c.offsetWidth,i.height=c.offsetHeight;var e=i.getContext("2d");try{return e&&(e.drawImage(c,0,0,i.width,i.height),this.options.allowTaint||e.getImageData(0,0,i.width,i.height)),i}catch(r){this.context.logger.info("Unable to clone video as it is tainted",c)}var t=c.ownerDocument.createElement("canvas");return t.width=c.offsetWidth,t.height=c.offsetHeight,t},f.prototype.appendChildNode=function(c,i,e){(!_s(i)||!yu(i)&&!i.hasAttribute(TA)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(i)))&&(!this.options.copyStyles||!_s(i)||!As(i))&&c.appendChild(this.cloneNode(i,e))},f.prototype.cloneChildNodes=function(c,i,e){for(var t=this,r=c.shadowRoot?c.shadowRoot.firstChild:c.firstChild;r;r=r.nextSibling)if(_s(r)&&Oi(r)&&typeof r.assignedNodes=="function"){var n=r.assignedNodes();n.length&&n.forEach(function(s){return t.appendChildNode(i,s,e)})}else this.appendChildNode(i,r,e)},f.prototype.cloneNode=function(c,i){if(Do(c))return document.createTextNode(c.data);if(!c.ownerDocument)return c.cloneNode(!1);var e=c.ownerDocument.defaultView;if(e&&_s(c)&&(vs(c)||bA(c))){var t=this.createElementClone(c);t.style.transitionProperty="none";var r=e.getComputedStyle(c),n=e.getComputedStyle(c,":before"),s=e.getComputedStyle(c,":after");this.referenceElement===c&&vs(t)&&(this.clonedReferenceElement=t),xa(t)&&ka(t);var A=this.counters.parse(new ra(this.context,r)),a=this.resolvePseudoContent(c,t,n,ws.BEFORE);Ro(c)&&(i=!0),Fa(c)||this.cloneChildNodes(c,t,i),a&&t.insertBefore(a,t.firstChild);var l=this.resolvePseudoContent(c,t,s,ws.AFTER);return l&&t.appendChild(l),this.counters.pop(A),(r&&(this.options.copyStyles||bA(c))&&!Uo(c)||i)&&DA(r,t),(c.scrollTop!==0||c.scrollLeft!==0)&&this.scrolledElements.push([t,c.scrollLeft,c.scrollTop]),(Gs(c)||SA(c))&&(Gs(t)||SA(t))&&(t.value=c.value),t}return c.cloneNode(!1)},f.prototype.resolvePseudoContent=function(c,i,e,t){var r=this;if(e){var n=e.content,s=i.ownerDocument;if(!(!s||!n||n==="none"||n==="-moz-alt-content"||e.display==="none")){this.counters.parse(new ra(this.context,e));var A=new Nl(this.context,e),a=s.createElement("html2canvaspseudoelement");DA(e,a),A.content.forEach(function(o){if(o.type===0)a.appendChild(s.createTextNode(o.value));else if(o.type===22){var h=s.createElement("img");h.src=o.value,h.style.opacity="1",a.appendChild(h)}else if(o.type===18){if(o.name==="attr"){var d=o.values.filter(Ot);d.length&&a.appendChild(s.createTextNode(c.getAttribute(d[0].value)||""))}else if(o.name==="counter"){var g=o.values.filter(en),v=g[0],E=g[1];if(v&&Ot(v)){var T=r.counters.getCounterValue(v.value),F=E&&Ot(E)?fs.parse(r.context,E.value):3;a.appendChild(s.createTextNode(Ws(T,F,!1)))}}else if(o.name==="counters"){var J=o.values.filter(en),v=J[0],ce=J[1],E=J[2];if(v&&Ot(v)){var Ae=r.counters.getCounterValues(v.value),de=E&&Ot(E)?fs.parse(r.context,E.value):3,Te=ce&&ce.type===0?ce.value:"",He=Ae.map(function(je){return Ws(je,de,!1)}).join(Te);a.appendChild(s.createTextNode(He))}}}else if(o.type===20)switch(o.value){case"open-quote":a.appendChild(s.createTextNode(fo(A.quotes,r.quoteDepth++,!0)));break;case"close-quote":a.appendChild(s.createTextNode(fo(A.quotes,--r.quoteDepth,!1)));break;default:a.appendChild(s.createTextNode(o.value))}}),a.className=UA+" "+Qa;var l=t===ws.BEFORE?" "+UA:" "+Qa;return bA(i)?i.className.baseValue+=l:i.className+=l,a}}},f.destroy=function(c){return c.parentNode?(c.parentNode.removeChild(c),!0):!1},f}(),ws;(function(f){f[f.BEFORE=0]="BEFORE",f[f.AFTER=1]="AFTER"})(ws||(ws={}));var IA=function(f,c){var i=f.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=c.width.toString(),i.height=c.height.toString(),i.scrolling="no",i.setAttribute(TA,"true"),f.body.appendChild(i),i},wu=function(f){return new Promise(function(c){if(f.complete){c();return}if(!f.src){c();return}f.onload=c,f.onerror=c})},Cu=function(f){return Promise.all([].slice.call(f.images,0).map(wu))},Ua=function(f){return new Promise(function(c,i){var e=f.contentWindow;if(!e)return i("No window assigned for iframe");var t=e.document;e.onload=f.onload=function(){e.onload=f.onload=null;var r=setInterval(function(){t.body.childNodes.length>0&&t.readyState==="complete"&&(clearInterval(r),c(f))},50)}})},bu=["all","d","content"],DA=function(f,c){for(var i=f.length-1;i>=0;i--){var e=f.item(i);bu.indexOf(e)===-1&&c.style.setProperty(e,f.getPropertyValue(e))}return c},xu=function(f){var c="";return f&&(c+="<!DOCTYPE ",f.name&&(c+=f.name),f.internalSubset&&(c+=f.internalSubset),f.publicId&&(c+='"'+f.publicId+'"'),f.systemId&&(c+='"'+f.systemId+'"'),c+=">"),c},Po=function(f,c,i){f&&f.defaultView&&(c!==f.defaultView.pageXOffset||i!==f.defaultView.pageYOffset)&&f.defaultView.scrollTo(c,i)},Ra=function(f){var c=f[0],i=f[1],e=f[2];c.scrollLeft=i,c.scrollTop=e},LA=":before",Fu=":after",UA="___html2canvas___pseudoelement_before",Qa="___html2canvas___pseudoelement_after",Mo=`{
content: "" !important;
display: none !important;
}`,ka=function(f){Su(f,"."+UA+LA+Mo+`
.`+Qa+Fu+Mo)},Su=function(f,c){var i=f.ownerDocument;if(i){var e=i.createElement("style");e.textContent=c,f.appendChild(e)}},RA=function(){function f(){}return f.getOrigin=function(c){var i=f._link;return i?(i.href=c,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},f.isSameOrigin=function(c){return f.getOrigin(c)===f._origin},f.setContext=function(c){f._link=c.document.createElement("a"),f._origin=f.getOrigin(c.location.href)},f._origin="about:blank",f}(),Tu=function(){function f(c,i){this.context=c,this._options=i,this._cache={}}return f.prototype.addImage=function(c){var i=Promise.resolve();return this.has(c)||(Ma(c)||Ho(c))&&(this._cache[c]=this.loadImage(c)).catch(function(){}),i},f.prototype.match=function(c){return this._cache[c]},f.prototype.loadImage=function(c){return me(this,void 0,void 0,function(){var i,e,t,r,n=this;return Se(this,function(s){switch(s.label){case 0:return i=RA.isSameOrigin(c),e=!Pa(c)&&this._options.useCORS===!0&&Pn.SUPPORT_CORS_IMAGES&&!i,t=!Pa(c)&&!i&&!Ma(c)&&typeof this._options.proxy=="string"&&Pn.SUPPORT_CORS_XHR&&!e,!i&&this._options.allowTaint===!1&&!Pa(c)&&!Ma(c)&&!t&&!e?[2]:(r=c,t?[4,this.proxy(r)]:[3,2]);case 1:r=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+c.substring(0,256)),[4,new Promise(function(A,a){var l=new Image;l.onload=function(){return A(l)},l.onerror=a,(Ko(r)||e)&&(l.crossOrigin="anonymous"),l.src=r,l.complete===!0&&setTimeout(function(){return A(l)},500),n._options.imageTimeout>0&&setTimeout(function(){return a("Timed out ("+n._options.imageTimeout+"ms) loading image")},n._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},f.prototype.has=function(c){return typeof this._cache[c]!="undefined"},f.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},f.prototype.proxy=function(c){var i=this,e=this._options.proxy;if(!e)throw new Error("No proxy defined");var t=c.substring(0,256);return new Promise(function(r,n){var s=Pn.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(A.status===200)if(s==="text")r(A.response);else{var o=new FileReader;o.addEventListener("load",function(){return r(o.result)},!1),o.addEventListener("error",function(h){return n(h)},!1),o.readAsDataURL(A.response)}else n("Failed to proxy resource "+t+" with status code "+A.status)},A.onerror=n;var a=e.indexOf("?")>-1?"&":"?";if(A.open("GET",""+e+a+"url="+encodeURIComponent(c)+"&responseType="+s),s!=="text"&&A instanceof XMLHttpRequest&&(A.responseType=s),i._options.imageTimeout){var l=i._options.imageTimeout;A.timeout=l,A.ontimeout=function(){return n("Timed out ("+l+"ms) proxying "+t)}}A.send()})},f}(),Iu=/^data:image\/svg\+xml/i,Oa=/^data:image\/.*;base64,/i,No=/^data:image\/.*/i,Ho=function(f){return Pn.SUPPORT_SVG_DRAWING||!Na(f)},Pa=function(f){return No.test(f)},Ko=function(f){return Oa.test(f)},Ma=function(f){return f.substr(0,4)==="blob"},Na=function(f){return f.substr(-3).toLowerCase()==="svg"||Iu.test(f)},tr=function(){function f(c,i){this.type=0,this.x=c,this.y=i}return f.prototype.add=function(c,i){return new f(this.x+c,this.y+i)},f}(),as=function(f,c,i){return new tr(f.x+(c.x-f.x)*i,f.y+(c.y-f.y)*i)},QA=function(){function f(c,i,e,t){this.type=1,this.start=c,this.startControl=i,this.endControl=e,this.end=t}return f.prototype.subdivide=function(c,i){var e=as(this.start,this.startControl,c),t=as(this.startControl,this.endControl,c),r=as(this.endControl,this.end,c),n=as(e,t,c),s=as(t,r,c),A=as(n,s,c);return i?new f(this.start,e,n,A):new f(A,s,r,this.end)},f.prototype.add=function(c,i){return new f(this.start.add(c,i),this.startControl.add(c,i),this.endControl.add(c,i),this.end.add(c,i))},f.prototype.reverse=function(){return new f(this.end,this.endControl,this.startControl,this.start)},f}(),ai=function(f){return f.type===1},$o=function(){function f(c){var i=c.styles,e=c.bounds,t=Hi(i.borderTopLeftRadius,e.width,e.height),r=t[0],n=t[1],s=Hi(i.borderTopRightRadius,e.width,e.height),A=s[0],a=s[1],l=Hi(i.borderBottomRightRadius,e.width,e.height),o=l[0],h=l[1],d=Hi(i.borderBottomLeftRadius,e.width,e.height),g=d[0],v=d[1],E=[];E.push((r+A)/e.width),E.push((g+o)/e.width),E.push((n+v)/e.height),E.push((a+h)/e.height);var T=Math.max.apply(Math,E);T>1&&(r/=T,n/=T,A/=T,a/=T,o/=T,h/=T,g/=T,v/=T);var F=e.width-A,J=e.height-h,ce=e.width-o,Ae=e.height-v,de=i.borderTopWidth,Te=i.borderRightWidth,He=i.borderBottomWidth,xe=i.borderLeftWidth,Ne=pn(i.paddingTop,c.bounds.width),je=pn(i.paddingRight,c.bounds.width),Oe=pn(i.paddingBottom,c.bounds.width),gt=pn(i.paddingLeft,c.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||n>0?xn(e.left+xe/3,e.top+de/3,r-xe/3,n-de/3,on.TOP_LEFT):new tr(e.left+xe/3,e.top+de/3),this.topRightBorderDoubleOuterBox=r>0||n>0?xn(e.left+F,e.top+de/3,A-Te/3,a-de/3,on.TOP_RIGHT):new tr(e.left+e.width-Te/3,e.top+de/3),this.bottomRightBorderDoubleOuterBox=o>0||h>0?xn(e.left+ce,e.top+J,o-Te/3,h-He/3,on.BOTTOM_RIGHT):new tr(e.left+e.width-Te/3,e.top+e.height-He/3),this.bottomLeftBorderDoubleOuterBox=g>0||v>0?xn(e.left+xe/3,e.top+Ae,g-xe/3,v-He/3,on.BOTTOM_LEFT):new tr(e.left+xe/3,e.top+e.height-He/3),this.topLeftBorderDoubleInnerBox=r>0||n>0?xn(e.left+xe*2/3,e.top+de*2/3,r-xe*2/3,n-de*2/3,on.TOP_LEFT):new tr(e.left+xe*2/3,e.top+de*2/3),this.topRightBorderDoubleInnerBox=r>0||n>0?xn(e.left+F,e.top+de*2/3,A-Te*2/3,a-de*2/3,on.TOP_RIGHT):new tr(e.left+e.width-Te*2/3,e.top+de*2/3),this.bottomRightBorderDoubleInnerBox=o>0||h>0?xn(e.left+ce,e.top+J,o-Te*2/3,h-He*2/3,on.BOTTOM_RIGHT):new tr(e.left+e.width-Te*2/3,e.top+e.height-He*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||v>0?xn(e.left+xe*2/3,e.top+Ae,g-xe*2/3,v-He*2/3,on.BOTTOM_LEFT):new tr(e.left+xe*2/3,e.top+e.height-He*2/3),this.topLeftBorderStroke=r>0||n>0?xn(e.left+xe/2,e.top+de/2,r-xe/2,n-de/2,on.TOP_LEFT):new tr(e.left+xe/2,e.top+de/2),this.topRightBorderStroke=r>0||n>0?xn(e.left+F,e.top+de/2,A-Te/2,a-de/2,on.TOP_RIGHT):new tr(e.left+e.width-Te/2,e.top+de/2),this.bottomRightBorderStroke=o>0||h>0?xn(e.left+ce,e.top+J,o-Te/2,h-He/2,on.BOTTOM_RIGHT):new tr(e.left+e.width-Te/2,e.top+e.height-He/2),this.bottomLeftBorderStroke=g>0||v>0?xn(e.left+xe/2,e.top+Ae,g-xe/2,v-He/2,on.BOTTOM_LEFT):new tr(e.left+xe/2,e.top+e.height-He/2),this.topLeftBorderBox=r>0||n>0?xn(e.left,e.top,r,n,on.TOP_LEFT):new tr(e.left,e.top),this.topRightBorderBox=A>0||a>0?xn(e.left+F,e.top,A,a,on.TOP_RIGHT):new tr(e.left+e.width,e.top),this.bottomRightBorderBox=o>0||h>0?xn(e.left+ce,e.top+J,o,h,on.BOTTOM_RIGHT):new tr(e.left+e.width,e.top+e.height),this.bottomLeftBorderBox=g>0||v>0?xn(e.left,e.top+Ae,g,v,on.BOTTOM_LEFT):new tr(e.left,e.top+e.height),this.topLeftPaddingBox=r>0||n>0?xn(e.left+xe,e.top+de,Math.max(0,r-xe),Math.max(0,n-de),on.TOP_LEFT):new tr(e.left+xe,e.top+de),this.topRightPaddingBox=A>0||a>0?xn(e.left+Math.min(F,e.width-Te),e.top+de,F>e.width+Te?0:Math.max(0,A-Te),Math.max(0,a-de),on.TOP_RIGHT):new tr(e.left+e.width-Te,e.top+de),this.bottomRightPaddingBox=o>0||h>0?xn(e.left+Math.min(ce,e.width-xe),e.top+Math.min(J,e.height-He),Math.max(0,o-Te),Math.max(0,h-He),on.BOTTOM_RIGHT):new tr(e.left+e.width-Te,e.top+e.height-He),this.bottomLeftPaddingBox=g>0||v>0?xn(e.left+xe,e.top+Math.min(Ae,e.height-He),Math.max(0,g-xe),Math.max(0,v-He),on.BOTTOM_LEFT):new tr(e.left+xe,e.top+e.height-He),this.topLeftContentBox=r>0||n>0?xn(e.left+xe+gt,e.top+de+Ne,Math.max(0,r-(xe+gt)),Math.max(0,n-(de+Ne)),on.TOP_LEFT):new tr(e.left+xe+gt,e.top+de+Ne),this.topRightContentBox=A>0||a>0?xn(e.left+Math.min(F,e.width+xe+gt),e.top+de+Ne,F>e.width+xe+gt?0:A-xe+gt,a-(de+Ne),on.TOP_RIGHT):new tr(e.left+e.width-(Te+je),e.top+de+Ne),this.bottomRightContentBox=o>0||h>0?xn(e.left+Math.min(ce,e.width-(xe+gt)),e.top+Math.min(J,e.height+de+Ne),Math.max(0,o-(Te+je)),h-(He+Oe),on.BOTTOM_RIGHT):new tr(e.left+e.width-(Te+je),e.top+e.height-(He+Oe)),this.bottomLeftContentBox=g>0||v>0?xn(e.left+xe+gt,e.top+Ae,Math.max(0,g-(xe+gt)),v-(He+Oe),on.BOTTOM_LEFT):new tr(e.left+xe+gt,e.top+e.height-(He+Oe))}return f}(),on;(function(f){f[f.TOP_LEFT=0]="TOP_LEFT",f[f.TOP_RIGHT=1]="TOP_RIGHT",f[f.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",f[f.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(on||(on={}));var xn=function(f,c,i,e,t){var r=4*((Math.sqrt(2)-1)/3),n=i*r,s=e*r,A=f+i,a=c+e;switch(t){case on.TOP_LEFT:return new QA(new tr(f,a),new tr(f,a-s),new tr(A-n,c),new tr(A,c));case on.TOP_RIGHT:return new QA(new tr(f,c),new tr(f+n,c),new tr(A,a-s),new tr(A,a));case on.BOTTOM_RIGHT:return new QA(new tr(A,c),new tr(A,c+s),new tr(f+n,a),new tr(f,a));case on.BOTTOM_LEFT:default:return new QA(new tr(A,a),new tr(A-n,a),new tr(f,c+s),new tr(f,c))}},kA=function(f){return[f.topLeftBorderBox,f.topRightBorderBox,f.bottomRightBorderBox,f.bottomLeftBorderBox]},OA=function(f){return[f.topLeftContentBox,f.topRightContentBox,f.bottomRightContentBox,f.bottomLeftContentBox]},PA=function(f){return[f.topLeftPaddingBox,f.topRightPaddingBox,f.bottomRightPaddingBox,f.bottomLeftPaddingBox]},Go=function(){function f(c,i,e){this.offsetX=c,this.offsetY=i,this.matrix=e,this.type=0,this.target=6}return f}(),Zs=function(){function f(c,i){this.path=c,this.target=i,this.type=1}return f}(),Du=function(){function f(c){this.opacity=c,this.type=2,this.target=6}return f}(),Vo=function(f){return f.type===0},Wo=function(f){return f.type===1},Lu=function(f){return f.type===2},Zo=function(f,c){return f.length===c.length?f.some(function(i,e){return i===c[e]}):!1},Uu=function(f,c,i,e,t){return f.map(function(r,n){switch(n){case 0:return r.add(c,i);case 1:return r.add(c+e,i);case 2:return r.add(c+e,i+t);case 3:return r.add(c,i+t)}return r})},Ha=function(){function f(c){this.element=c,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return f}(),zo=function(){function f(c,i){if(this.container=c,this.parent=i,this.effects=[],this.curves=new $o(this.container),this.container.styles.opacity<1&&this.effects.push(new Du(this.container.styles.opacity)),this.container.styles.transform!==null){var e=this.container.bounds.left+this.container.styles.transformOrigin[0].number,t=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new Go(e,t,r))}if(this.container.styles.overflowX!==0){var n=kA(this.curves),s=PA(this.curves);Zo(n,s)?this.effects.push(new Zs(n,6)):(this.effects.push(new Zs(n,2)),this.effects.push(new Zs(s,4)))}}return f.prototype.getEffects=function(c){for(var i=[2,3].indexOf(this.container.styles.position)===-1,e=this.parent,t=this.effects.slice(0);e;){var r=e.effects.filter(function(A){return!Wo(A)});if(i||e.container.styles.position!==0||!e.parent){if(t.unshift.apply(t,r),i=[2,3].indexOf(e.container.styles.position)===-1,e.container.styles.overflowX!==0){var n=kA(e.curves),s=PA(e.curves);Zo(n,s)||t.unshift(new Zs(s,6))}}else t.unshift.apply(t,r);e=e.parent}return t.filter(function(A){return On(A.target,c)})},f}(),Ka=function(f,c,i,e){f.container.elements.forEach(function(t){var r=On(t.flags,4),n=On(t.flags,2),s=new zo(t,f);On(t.styles.display,2048)&&e.push(s);var A=On(t.flags,8)?[]:e;if(r||n){var a=r||t.styles.isPositioned()?i:c,l=new Ha(s);if(t.styles.isPositioned()||t.styles.opacity<1||t.styles.isTransformed()){var o=t.styles.zIndex.order;if(o<0){var h=0;a.negativeZIndex.some(function(g,v){return o>g.element.container.styles.zIndex.order?(h=v,!1):h>0}),a.negativeZIndex.splice(h,0,l)}else if(o>0){var d=0;a.positiveZIndex.some(function(g,v){return o>=g.element.container.styles.zIndex.order?(d=v+1,!1):d>0}),a.positiveZIndex.splice(d,0,l)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else t.styles.isFloating()?a.nonPositionedFloats.push(l):a.nonPositionedInlineLevel.push(l);Ka(s,l,r?l:i,A)}else t.styles.isInlineLevel()?c.inlineLevel.push(s):c.nonInlineLevel.push(s),Ka(s,c,i,A);On(t.flags,8)&&Yo(t,A)})},Yo=function(f,c){for(var i=f instanceof Ba?f.start:1,e=f instanceof Ba?f.reversed:!1,t=0;t<c.length;t++){var r=c[t];r.container instanceof To&&typeof r.container.value=="number"&&r.container.value!==0&&(i=r.container.value),r.listValue=Ws(i,r.container.styles.listStyleType,!0),i+=e?-1:1}},Ru=function(f){var c=new zo(f,null),i=new Ha(c),e=[];return Ka(c,i,i,e),Yo(c.container,e),i},jo=function(f,c){switch(c){case 0:return Ei(f.topLeftBorderBox,f.topLeftPaddingBox,f.topRightBorderBox,f.topRightPaddingBox);case 1:return Ei(f.topRightBorderBox,f.topRightPaddingBox,f.bottomRightBorderBox,f.bottomRightPaddingBox);case 2:return Ei(f.bottomRightBorderBox,f.bottomRightPaddingBox,f.bottomLeftBorderBox,f.bottomLeftPaddingBox);case 3:default:return Ei(f.bottomLeftBorderBox,f.bottomLeftPaddingBox,f.topLeftBorderBox,f.topLeftPaddingBox)}},Qu=function(f,c){switch(c){case 0:return Ei(f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox,f.topRightBorderBox,f.topRightBorderDoubleOuterBox);case 1:return Ei(f.topRightBorderBox,f.topRightBorderDoubleOuterBox,f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox);case 2:return Ei(f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox,f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox);case 3:default:return Ei(f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox,f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox)}},Xo=function(f,c){switch(c){case 0:return Ei(f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox,f.topRightBorderDoubleInnerBox,f.topRightPaddingBox);case 1:return Ei(f.topRightBorderDoubleInnerBox,f.topRightPaddingBox,f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox);case 2:return Ei(f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox,f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox);case 3:default:return Ei(f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox,f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox)}},ku=function(f,c){switch(c){case 0:return MA(f.topLeftBorderStroke,f.topRightBorderStroke);case 1:return MA(f.topRightBorderStroke,f.bottomRightBorderStroke);case 2:return MA(f.bottomRightBorderStroke,f.bottomLeftBorderStroke);case 3:default:return MA(f.bottomLeftBorderStroke,f.topLeftBorderStroke)}},MA=function(f,c){var i=[];return ai(f)?i.push(f.subdivide(.5,!1)):i.push(f),ai(c)?i.push(c.subdivide(.5,!0)):i.push(c),i},Ei=function(f,c,i,e){var t=[];return ai(f)?t.push(f.subdivide(.5,!1)):t.push(f),ai(i)?t.push(i.subdivide(.5,!0)):t.push(i),ai(e)?t.push(e.subdivide(.5,!0).reverse()):t.push(e),ai(c)?t.push(c.subdivide(.5,!1).reverse()):t.push(c),t},Jo=function(f){var c=f.bounds,i=f.styles;return c.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},Cs=function(f){var c=f.styles,i=f.bounds,e=pn(c.paddingLeft,i.width),t=pn(c.paddingRight,i.width),r=pn(c.paddingTop,i.width),n=pn(c.paddingBottom,i.width);return i.add(e+c.borderLeftWidth,r+c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth+e+t),-(c.borderTopWidth+c.borderBottomWidth+r+n))},Ou=function(f,c){return f===0?c.bounds:f===2?Cs(c):Jo(c)},NA=function(f,c){return f===0?c.bounds:f===2?Cs(c):Jo(c)},$a=function(f,c,i){var e=Ou(os(f.styles.backgroundOrigin,c),f),t=NA(os(f.styles.backgroundClip,c),f),r=Pu(os(f.styles.backgroundSize,c),i,e),n=r[0],s=r[1],A=Hi(os(f.styles.backgroundPosition,c),e.width-n,e.height-s),a=qo(os(f.styles.backgroundRepeat,c),A,r,e,t),l=Math.round(e.left+A[0]),o=Math.round(e.top+A[1]);return[a,l,o,n,s]},bs=function(f){return Ot(f)&&f.value===Li.AUTO},HA=function(f){return typeof f=="number"},Pu=function(f,c,i){var e=c[0],t=c[1],r=c[2],n=f[0],s=f[1];if(!n)return[0,0];if(Bn(n)&&s&&Bn(s))return[pn(n,i.width),pn(s,i.height)];var A=HA(r);if(Ot(n)&&(n.value===Li.CONTAIN||n.value===Li.COVER)){if(HA(r)){var a=i.width/i.height;return a<r!=(n.value===Li.COVER)?[i.width,i.width/r]:[i.height*r,i.height]}return[i.width,i.height]}var l=HA(e),o=HA(t),h=l||o;if(bs(n)&&(!s||bs(s))){if(l&&o)return[e,t];if(!A&&!h)return[i.width,i.height];if(h&&A){var d=l?e:t*r,g=o?t:e/r;return[d,g]}var v=l?e:i.width,E=o?t:i.height;return[v,E]}if(A){var T=0,F=0;return Bn(n)?T=pn(n,i.width):Bn(s)&&(F=pn(s,i.height)),bs(n)?T=F*r:(!s||bs(s))&&(F=T/r),[T,F]}var J=null,ce=null;if(Bn(n)?J=pn(n,i.width):s&&Bn(s)&&(ce=pn(s,i.height)),J!==null&&(!s||bs(s))&&(ce=l&&o?J/e*t:i.height),ce!==null&&bs(n)&&(J=l&&o?ce/t*e:i.width),J!==null&&ce!==null)return[J,ce];throw new Error("Unable to calculate background-size for element")},os=function(f,c){var i=f[c];return typeof i=="undefined"?f[0]:i},qo=function(f,c,i,e,t){var r=c[0],n=c[1],s=i[0],A=i[1];switch(f){case 2:return[new tr(Math.round(e.left),Math.round(e.top+n)),new tr(Math.round(e.left+e.width),Math.round(e.top+n)),new tr(Math.round(e.left+e.width),Math.round(A+e.top+n)),new tr(Math.round(e.left),Math.round(A+e.top+n))];case 3:return[new tr(Math.round(e.left+r),Math.round(e.top)),new tr(Math.round(e.left+r+s),Math.round(e.top)),new tr(Math.round(e.left+r+s),Math.round(e.height+e.top)),new tr(Math.round(e.left+r),Math.round(e.height+e.top))];case 1:return[new tr(Math.round(e.left+r),Math.round(e.top+n)),new tr(Math.round(e.left+r+s),Math.round(e.top+n)),new tr(Math.round(e.left+r+s),Math.round(e.top+n+A)),new tr(Math.round(e.left+r),Math.round(e.top+n+A))];default:return[new tr(Math.round(t.left),Math.round(t.top)),new tr(Math.round(t.left+t.width),Math.round(t.top)),new tr(Math.round(t.left+t.width),Math.round(t.height+t.top)),new tr(Math.round(t.left),Math.round(t.height+t.top))]}},Mu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",KA="Hidden Text",el=function(){function f(c){this._data={},this._document=c}return f.prototype.parseMetrics=function(c,i){var e=this._document.createElement("div"),t=this._document.createElement("img"),r=this._document.createElement("span"),n=this._document.body;e.style.visibility="hidden",e.style.fontFamily=c,e.style.fontSize=i,e.style.margin="0",e.style.padding="0",e.style.whiteSpace="nowrap",n.appendChild(e),t.src=Mu,t.width=1,t.height=1,t.style.margin="0",t.style.padding="0",t.style.verticalAlign="baseline",r.style.fontFamily=c,r.style.fontSize=i,r.style.margin="0",r.style.padding="0",r.appendChild(this._document.createTextNode(KA)),e.appendChild(r),e.appendChild(t);var s=t.offsetTop-r.offsetTop+2;e.removeChild(r),e.appendChild(this._document.createTextNode(KA)),e.style.lineHeight="normal",t.style.verticalAlign="super";var A=t.offsetTop-e.offsetTop+2;return n.removeChild(e),{baseline:s,middle:A}},f.prototype.getMetrics=function(c,i){var e=c+" "+i;return typeof this._data[e]=="undefined"&&(this._data[e]=this.parseMetrics(c,i)),this._data[e]},f}(),zs=function(){function f(c,i){this.context=c,this.options=i}return f}(),Nu=1e4,Hu=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t._activeEffects=[],t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.canvas||(t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px"),t.fontMetrics=new el(document),t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.ctx.textBaseline="bottom",t._activeEffects=[],t.context.logger.debug("Canvas renderer initialized ("+e.width+"x"+e.height+") with scale "+e.scale),t}return c.prototype.applyEffects=function(i){for(var e=this;this._activeEffects.length;)this.popEffect();i.forEach(function(t){return e.applyEffect(t)})},c.prototype.applyEffect=function(i){this.ctx.save(),Lu(i)&&(this.ctx.globalAlpha=i.opacity),Vo(i)&&(this.ctx.translate(i.offsetX,i.offsetY),this.ctx.transform(i.matrix[0],i.matrix[1],i.matrix[2],i.matrix[3],i.matrix[4],i.matrix[5]),this.ctx.translate(-i.offsetX,-i.offsetY)),Wo(i)&&(this.path(i.path),this.ctx.clip()),this._activeEffects.push(i)},c.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},c.prototype.renderStack=function(i){return me(this,void 0,void 0,function(){var e;return Se(this,function(t){switch(t.label){case 0:return e=i.element.container.styles,e.isVisible()?[4,this.renderStackContent(i)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},c.prototype.renderNode=function(i){return me(this,void 0,void 0,function(){return Se(this,function(e){switch(e.label){case 0:if(On(i.container.flags,16))debugger;return i.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(i)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(i)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},c.prototype.renderTextWithLetterSpacing=function(i,e,t){var r=this;if(e===0)this.ctx.fillText(i.text,i.bounds.left,i.bounds.top+t);else{var n=va(i.text);n.reduce(function(s,A){return r.ctx.fillText(A,s,i.bounds.top+t),s+r.ctx.measureText(A).width},i.bounds.left)}},c.prototype.createFontStyle=function(i){var e=i.fontVariant.filter(function(n){return n==="normal"||n==="small-caps"}).join(""),t=nl(i.fontFamily).join(", "),r=qn(i.fontSize)?""+i.fontSize.number+i.fontSize.unit:i.fontSize.number+"px";return[[i.fontStyle,e,i.fontWeight,r,t].join(" "),t,r]},c.prototype.renderTextNode=function(i,e){return me(this,void 0,void 0,function(){var t,r,n,s,A,a,l,o,h=this;return Se(this,function(d){return t=this.createFontStyle(e),r=t[0],n=t[1],s=t[2],this.ctx.font=r,this.ctx.direction=e.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",A=this.fontMetrics.getMetrics(n,s),a=A.baseline,l=A.middle,o=e.paintOrder,i.textBounds.forEach(function(g){o.forEach(function(v){switch(v){case 0:h.ctx.fillStyle=Dn(e.color),h.renderTextWithLetterSpacing(g,e.letterSpacing,a);var E=e.textShadow;E.length&&g.text.trim().length&&(E.slice(0).reverse().forEach(function(T){h.ctx.shadowColor=Dn(T.color),h.ctx.shadowOffsetX=T.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=T.offsetY.number*h.options.scale,h.ctx.shadowBlur=T.blur.number,h.renderTextWithLetterSpacing(g,e.letterSpacing,a)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),e.textDecorationLine.length&&(h.ctx.fillStyle=Dn(e.textDecorationColor||e.color),e.textDecorationLine.forEach(function(T){switch(T){case 1:h.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+a),g.bounds.width,1);break;case 2:h.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:h.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+l),g.bounds.width,1);break}}));break;case 1:e.webkitTextStrokeWidth&&g.text.trim().length&&(h.ctx.strokeStyle=Dn(e.webkitTextStrokeColor),h.ctx.lineWidth=e.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+a)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},c.prototype.renderReplacedElement=function(i,e,t){if(t&&i.intrinsicWidth>0&&i.intrinsicHeight>0){var r=Cs(i),n=PA(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,i.intrinsicWidth,i.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},c.prototype.renderNodeContent=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A,F,F,a,l,o,h,ce,d,g,Ae,v,E,T,F,J,ce,Ae;return Se(this,function(de){switch(de.label){case 0:this.applyEffects(i.getEffects(4)),e=i.container,t=i.curves,r=e.styles,n=0,s=e.textNodes,de.label=1;case 1:return n<s.length?(A=s[n],[4,this.renderTextNode(A,r)]):[3,4];case 2:de.sent(),de.label=3;case 3:return n++,[3,1];case 4:if(!(e instanceof Fo))return[3,8];de.label=5;case 5:return de.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return F=de.sent(),this.renderReplacedElement(e,t,F),[3,8];case 7:return de.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof So&&this.renderReplacedElement(e,t,e.canvas),!(e instanceof ya))return[3,12];de.label=9;case 9:return de.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return F=de.sent(),this.renderReplacedElement(e,t,F),[3,12];case 11:return de.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof ss&&e.tree?(a=new c(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}),[4,a.render(e.tree)]):[3,14];case 13:l=de.sent(),e.width&&e.height&&this.ctx.drawImage(l,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),de.label=14;case 14:if(e instanceof wA&&(o=Math.min(e.bounds.width,e.bounds.height),e.type===BA?e.checked&&(this.ctx.save(),this.path([new tr(e.bounds.left+o*.39363,e.bounds.top+o*.79),new tr(e.bounds.left+o*.16,e.bounds.top+o*.5549),new tr(e.bounds.left+o*.27347,e.bounds.top+o*.44071),new tr(e.bounds.left+o*.39694,e.bounds.top+o*.5649),new tr(e.bounds.left+o*.72983,e.bounds.top+o*.23),new tr(e.bounds.left+o*.84,e.bounds.top+o*.34085),new tr(e.bounds.left+o*.39363,e.bounds.top+o*.79)]),this.ctx.fillStyle=Dn(Ea),this.ctx.fill(),this.ctx.restore()):e.type===EA&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+o/2,e.bounds.top+o/2,o/4,0,Math.PI*2,!0),this.ctx.fillStyle=Dn(Ea),this.ctx.fill(),this.ctx.restore())),Ku(e)&&e.value.length){switch(h=this.createFontStyle(r),ce=h[0],d=h[1],g=this.fontMetrics.getMetrics(ce,d).baseline,this.ctx.font=ce,this.ctx.fillStyle=Dn(r.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=tl(e.styles.textAlign),Ae=Cs(e),v=0,e.styles.textAlign){case 1:v+=Ae.width/2;break;case 2:v+=Ae.width;break}E=Ae.add(v,0,0,-Ae.height/2+1),this.ctx.save(),this.path([new tr(Ae.left,Ae.top),new tr(Ae.left+Ae.width,Ae.top),new tr(Ae.left+Ae.width,Ae.top+Ae.height),new tr(Ae.left,Ae.top+Ae.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Hs(e.value,E),r.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!On(e.styles.display,2048))return[3,20];if(e.styles.listStyleImage===null)return[3,19];if(T=e.styles.listStyleImage,T.type!==0)return[3,18];F=void 0,J=T.url,de.label=15;case 15:return de.trys.push([15,17,,18]),[4,this.context.cache.match(J)];case 16:return F=de.sent(),this.ctx.drawImage(F,e.bounds.left-(F.width+10),e.bounds.top),[3,18];case 17:return de.sent(),this.context.logger.error("Error loading list-style-image "+J),[3,18];case 18:return[3,20];case 19:i.listValue&&e.styles.listStyleType!==-1&&(ce=this.createFontStyle(r)[0],this.ctx.font=ce,this.ctx.fillStyle=Dn(r.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Ae=new W(e.bounds.left,e.bounds.top+pn(e.styles.paddingTop,e.bounds.width),e.bounds.width,Fi(r.lineHeight,r.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Hs(i.listValue,Ae),r.letterSpacing,Fi(r.lineHeight,r.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),de.label=20;case 20:return[2]}})})},c.prototype.renderStackContent=function(i){return me(this,void 0,void 0,function(){var e,t,T,r,n,T,s,A,T,a,l,T,o,h,T,d,g,T,v,E,T;return Se(this,function(F){switch(F.label){case 0:if(On(i.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(i.element)];case 1:F.sent(),e=0,t=i.negativeZIndex,F.label=2;case 2:return e<t.length?(T=t[e],[4,this.renderStack(T)]):[3,5];case 3:F.sent(),F.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(i.element)];case 6:F.sent(),r=0,n=i.nonInlineLevel,F.label=7;case 7:return r<n.length?(T=n[r],[4,this.renderNode(T)]):[3,10];case 8:F.sent(),F.label=9;case 9:return r++,[3,7];case 10:s=0,A=i.nonPositionedFloats,F.label=11;case 11:return s<A.length?(T=A[s],[4,this.renderStack(T)]):[3,14];case 12:F.sent(),F.label=13;case 13:return s++,[3,11];case 14:a=0,l=i.nonPositionedInlineLevel,F.label=15;case 15:return a<l.length?(T=l[a],[4,this.renderStack(T)]):[3,18];case 16:F.sent(),F.label=17;case 17:return a++,[3,15];case 18:o=0,h=i.inlineLevel,F.label=19;case 19:return o<h.length?(T=h[o],[4,this.renderNode(T)]):[3,22];case 20:F.sent(),F.label=21;case 21:return o++,[3,19];case 22:d=0,g=i.zeroOrAutoZIndexOrTransformedOrOpacity,F.label=23;case 23:return d<g.length?(T=g[d],[4,this.renderStack(T)]):[3,26];case 24:F.sent(),F.label=25;case 25:return d++,[3,23];case 26:v=0,E=i.positiveZIndex,F.label=27;case 27:return v<E.length?(T=E[v],[4,this.renderStack(T)]):[3,30];case 28:F.sent(),F.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},c.prototype.mask=function(i){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(i.slice(0).reverse()),this.ctx.closePath()},c.prototype.path=function(i){this.ctx.beginPath(),this.formatPath(i),this.ctx.closePath()},c.prototype.formatPath=function(i){var e=this;i.forEach(function(t,r){var n=ai(t)?t.start:t;r===0?e.ctx.moveTo(n.x,n.y):e.ctx.lineTo(n.x,n.y),ai(t)&&e.ctx.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},c.prototype.renderRepeat=function(i,e,t,r){this.path(i),this.ctx.fillStyle=e,this.ctx.translate(t,r),this.ctx.fill(),this.ctx.translate(-t,-r)},c.prototype.resizeImage=function(i,e,t){var r;if(i.width===e&&i.height===t)return i;var n=(r=this.canvas.ownerDocument)!==null&&r!==void 0?r:document,s=n.createElement("canvas");s.width=Math.max(1,e),s.height=Math.max(1,t);var A=s.getContext("2d");return A.drawImage(i,0,0,i.width,i.height,0,0,e,t),s},c.prototype.renderBackgroundImage=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A;return Se(this,function(a){switch(a.label){case 0:e=i.styles.backgroundImage.length-1,t=function(l){var o,h,d,Ne,jt,Jt,gt,Pt,He,g,Ne,jt,Jt,gt,Pt,v,E,T,F,J,ce,Ae,de,Te,He,xe,Ne,je,Oe,gt,Pt,hr,jt,Jt,Vt,rr,or,Lt,Mt,xr,br,Rr;return Se(this,function(jr){switch(jr.label){case 0:if(l.type!==0)return[3,5];o=void 0,h=l.url,jr.label=1;case 1:return jr.trys.push([1,3,,4]),[4,r.context.cache.match(h)];case 2:return o=jr.sent(),[3,4];case 3:return jr.sent(),r.context.logger.error("Error loading background-image "+h),[3,4];case 4:return o&&(d=$a(i,e,[o.width,o.height,o.width/o.height]),Ne=d[0],jt=d[1],Jt=d[2],gt=d[3],Pt=d[4],He=r.ctx.createPattern(r.resizeImage(o,gt,Pt),"repeat"),r.renderRepeat(Ne,He,jt,Jt)),[3,6];case 5:Ri(l)?(g=$a(i,e,[null,null,null]),Ne=g[0],jt=g[1],Jt=g[2],gt=g[3],Pt=g[4],v=es(l.angle,gt,Pt),E=v[0],T=v[1],F=v[2],J=v[3],ce=v[4],Ae=document.createElement("canvas"),Ae.width=gt,Ae.height=Pt,de=Ae.getContext("2d"),Te=de.createLinearGradient(T,J,F,ce),Ds(l.stops,E).forEach(function(nn){return Te.addColorStop(nn.stop,Dn(nn.color))}),de.fillStyle=Te,de.fillRect(0,0,gt,Pt),gt>0&&Pt>0&&(He=r.ctx.createPattern(Ae,"repeat"),r.renderRepeat(Ne,He,jt,Jt))):Qi(l)&&(xe=$a(i,e,[null,null,null]),Ne=xe[0],je=xe[1],Oe=xe[2],gt=xe[3],Pt=xe[4],hr=l.position.length===0?[Fs]:l.position,jt=pn(hr[0],gt),Jt=pn(hr[hr.length-1],Pt),Vt=rA(l,jt,Jt,gt,Pt),rr=Vt[0],or=Vt[1],rr>0&&or>0&&(Lt=r.ctx.createRadialGradient(je+jt,Oe+Jt,0,je+jt,Oe+Jt,rr),Ds(l.stops,rr*2).forEach(function(nn){return Lt.addColorStop(nn.stop,Dn(nn.color))}),r.path(Ne),r.ctx.fillStyle=Lt,rr!==or?(Mt=i.bounds.left+.5*i.bounds.width,xr=i.bounds.top+.5*i.bounds.height,br=or/rr,Rr=1/br,r.ctx.save(),r.ctx.translate(Mt,xr),r.ctx.transform(1,0,0,br,0,0),r.ctx.translate(-Mt,-xr),r.ctx.fillRect(je,Rr*(Oe-xr)+xr,gt,Pt*Rr),r.ctx.restore()):r.ctx.fill())),jr.label=6;case 6:return e--,[2]}})},r=this,n=0,s=i.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return n<s.length?(A=s[n],[5,t(A)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},c.prototype.renderSolidBorder=function(i,e,t){return me(this,void 0,void 0,function(){return Se(this,function(r){return this.path(jo(t,e)),this.ctx.fillStyle=Dn(i),this.ctx.fill(),[2]})})},c.prototype.renderDoubleBorder=function(i,e,t,r){return me(this,void 0,void 0,function(){var n,s;return Se(this,function(A){switch(A.label){case 0:return e<3?[4,this.renderSolidBorder(i,t,r)]:[3,2];case 1:return A.sent(),[2];case 2:return n=Qu(r,t),this.path(n),this.ctx.fillStyle=Dn(i),this.ctx.fill(),s=Xo(r,t),this.path(s),this.ctx.fill(),[2]}})})},c.prototype.renderNodeBackgroundAndBorders=function(i){return me(this,void 0,void 0,function(){var e,t,r,n,s,A,a,l,o=this;return Se(this,function(h){switch(h.label){case 0:return this.applyEffects(i.getEffects(2)),e=i.container.styles,t=!mi(e.backgroundColor)||e.backgroundImage.length,r=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],n=$u(os(e.backgroundClip,0),i.curves),t||e.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),mi(e.backgroundColor)||(this.ctx.fillStyle=Dn(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(i.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach(function(d){o.ctx.save();var g=kA(i.curves),v=d.inset?0:Nu,E=Uu(g,-v+(d.inset?1:-1)*d.spread.number,(d.inset?1:-1)*d.spread.number,d.spread.number*(d.inset?-2:2),d.spread.number*(d.inset?-2:2));d.inset?(o.path(g),o.ctx.clip(),o.mask(E)):(o.mask(g),o.ctx.clip(),o.path(E)),o.ctx.shadowOffsetX=d.offsetX.number+v,o.ctx.shadowOffsetY=d.offsetY.number,o.ctx.shadowColor=Dn(d.color),o.ctx.shadowBlur=d.blur.number,o.ctx.fillStyle=d.inset?Dn(d.color):"rgba(0,0,0,1)",o.ctx.fill(),o.ctx.restore()}),h.label=2;case 2:s=0,A=0,a=r,h.label=3;case 3:return A<a.length?(l=a[A],l.style!==0&&!mi(l.color)&&l.width>0?l.style!==2?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,s,i.curves,2)]:[3,11]):[3,13];case 4:return h.sent(),[3,11];case 5:return l.style!==3?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,s,i.curves,3)];case 6:return h.sent(),[3,11];case 7:return l.style!==4?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,s,i.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,s,i.curves)];case 10:h.sent(),h.label=11;case 11:s++,h.label=12;case 12:return A++,[3,3];case 13:return[2]}})})},c.prototype.renderDashedDottedBorder=function(i,e,t,r,n){return me(this,void 0,void 0,function(){var s,A,a,l,o,h,d,g,v,E,T,F,J,ce,Ae,de,Ae,de;return Se(this,function(Te){return this.ctx.save(),s=ku(r,t),A=jo(r,t),n===2&&(this.path(A),this.ctx.clip()),ai(A[0])?(a=A[0].start.x,l=A[0].start.y):(a=A[0].x,l=A[0].y),ai(A[1])?(o=A[1].end.x,h=A[1].end.y):(o=A[1].x,h=A[1].y),t===0||t===2?d=Math.abs(a-o):d=Math.abs(l-h),this.ctx.beginPath(),n===3?this.formatPath(s):this.formatPath(A.slice(0,2)),g=e<3?e*3:e*2,v=e<3?e*2:e,n===3&&(g=e,v=e),E=!0,d<=g*2?E=!1:d<=g*2+v?(T=d/(2*g+v),g*=T,v*=T):(F=Math.floor((d+v)/(g+v)),J=(d-F*g)/(F-1),ce=(d-(F+1)*g)/F,v=ce<=0||Math.abs(v-J)<Math.abs(v-ce)?J:ce),E&&(n===3?this.ctx.setLineDash([0,g+v]):this.ctx.setLineDash([g,v])),n===3?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=e*2+1.1,this.ctx.strokeStyle=Dn(i),this.ctx.stroke(),this.ctx.setLineDash([]),n===2&&(ai(A[0])&&(Ae=A[3],de=A[0],this.ctx.beginPath(),this.formatPath([new tr(Ae.end.x,Ae.end.y),new tr(de.start.x,de.start.y)]),this.ctx.stroke()),ai(A[1])&&(Ae=A[1],de=A[2],this.ctx.beginPath(),this.formatPath([new tr(Ae.end.x,Ae.end.y),new tr(de.start.x,de.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},c.prototype.render=function(i){return me(this,void 0,void 0,function(){var e;return Se(this,function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Dn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),e=Ru(i),[4,this.renderStack(e)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}})})},c}(zs),Ku=function(f){return f instanceof fi||f instanceof Ai?!0:f instanceof wA&&f.type!==EA&&f.type!==BA},$u=function(f,c){switch(f){case 0:return kA(c);case 2:return OA(c);case 1:default:return PA(c)}},tl=function(f){switch(f){case 1:return"center";case 2:return"right";case 0:default:return"left"}},rl=["-apple-system","system-ui"],nl=function(f){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?f.filter(function(c){return rl.indexOf(c)===-1}):f},Gu=function(f){K(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.options=e,t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px",t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale),t}return c.prototype.render=function(i){return me(this,void 0,void 0,function(){var e,t;return Se(this,function(r){switch(r.label){case 0:return e=da(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,i),[4,Vu(e)];case 1:return t=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Dn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},c}(zs),Vu=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Wu=function(){function f(c){var i=c.id,e=c.enabled;this.id=i,this.enabled=e,this.start=Date.now()}return f.prototype.debug=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.getTime=function(){return Date.now()-this.start},f.prototype.info=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,he([this.id,this.getTime()+"ms"],c))},f.prototype.warn=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.error=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,he([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.instances={},f}(),Zu=function(){function f(c,i){var e;this.windowBounds=i,this.instanceName="#"+f.instanceCount++,this.logger=new Wu({id:this.instanceName,enabled:c.logging}),this.cache=(e=c.cache)!==null&&e!==void 0?e:new Tu(this,c)}return f.instanceCount=1,f}(),zu=function(f,c){return c===void 0&&(c={}),il(f,c)};typeof window!="undefined"&&RA.setContext(window);var il=function(f,c){return me(void 0,void 0,void 0,function(){var i,e,t,r,n,s,A,a,l,o,h,d,g,v,E,T,F,J,ce,Ae,Te,de,Te,He,xe,Ne,je,Oe,gt,Pt,hr,jt,Jt,Vt,rr,or,Lt,Mt,xr,br;return Se(this,function(Rr){switch(Rr.label){case 0:if(!f||typeof f!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(i=f.ownerDocument,!i)throw new Error("Element is not attached to a Document");if(e=i.defaultView,!e)throw new Error("Document is not attached to a Window");return t={allowTaint:(He=c.allowTaint)!==null&&He!==void 0?He:!1,imageTimeout:(xe=c.imageTimeout)!==null&&xe!==void 0?xe:15e3,proxy:c.proxy,useCORS:(Ne=c.useCORS)!==null&&Ne!==void 0?Ne:!1},r=V({logging:(je=c.logging)!==null&&je!==void 0?je:!0,cache:c.cache},t),n={windowWidth:(Oe=c.windowWidth)!==null&&Oe!==void 0?Oe:e.innerWidth,windowHeight:(gt=c.windowHeight)!==null&&gt!==void 0?gt:e.innerHeight,scrollX:(Pt=c.scrollX)!==null&&Pt!==void 0?Pt:e.pageXOffset,scrollY:(hr=c.scrollY)!==null&&hr!==void 0?hr:e.pageYOffset},s=new W(n.scrollX,n.scrollY,n.windowWidth,n.windowHeight),A=new Zu(r,s),a=(jt=c.foreignObjectRendering)!==null&&jt!==void 0?jt:!1,l={allowTaint:(Jt=c.allowTaint)!==null&&Jt!==void 0?Jt:!1,onclone:c.onclone,ignoreElements:c.ignoreElements,inlineImages:a,copyStyles:a},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),o=new La(A,f,l),h=o.clonedReferenceElement,h?[4,o.toIFrame(i,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=Rr.sent(),g=xa(h)||xA(h)?ge(h.ownerDocument):m(A,h),v=g.width,E=g.height,T=g.left,F=g.top,J=Ga(A,h,c.backgroundColor),ce={canvas:c.canvas,backgroundColor:J,scale:(rr=(Vt=c.scale)!==null&&Vt!==void 0?Vt:e.devicePixelRatio)!==null&&rr!==void 0?rr:1,x:((or=c.x)!==null&&or!==void 0?or:0)+T,y:((Lt=c.y)!==null&&Lt!==void 0?Lt:0)+F,width:(Mt=c.width)!==null&&Mt!==void 0?Mt:Math.ceil(v),height:(xr=c.height)!==null&&xr!==void 0?xr:Math.ceil(E)},a?(A.logger.debug("Document cloned, using foreign object rendering"),Te=new Gu(A,ce),[4,Te.render(h)]):[3,3];case 2:return Ae=Rr.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+T+","+F+" with size "+v+"x"+E+" using computed rendering"),A.logger.debug("Starting DOM parsing"),de=Ca(A,h),J===de.styles.backgroundColor&&(de.styles.backgroundColor=ui.TRANSPARENT),A.logger.debug("Starting renderer for element at "+ce.x+","+ce.y+" with size "+ce.width+"x"+ce.height),Te=new Hu(A,ce),[4,Te.render(de)];case 4:Ae=Rr.sent(),Rr.label=5;case 5:return(!((br=c.removeContainer)!==null&&br!==void 0)||br)&&(La.destroy(d)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,Ae]}})})},Ga=function(f,c,i){var e=c.ownerDocument,t=e.documentElement?Gi(f,getComputedStyle(e.documentElement).backgroundColor):ui.TRANSPARENT,r=e.body?Gi(f,getComputedStyle(e.body).backgroundColor):ui.TRANSPARENT,n=typeof i=="string"?Gi(f,i):i===null?ui.TRANSPARENT:4294967295;return c===e.documentElement?mi(t)?mi(r)?n:r:t:n};return zu})},67467:function(dr,vt){vt.read=function(K,V,me,Se,he){var W,m,ge=he*8-Se-1,O=(1<<ge)-1,u=O>>1,q=-7,D=me?he-1:0,y=me?-1:1,_=K[V+D];for(D+=y,W=_&(1<<-q)-1,_>>=-q,q+=ge;q>0;W=W*256+K[V+D],D+=y,q-=8);for(m=W&(1<<-q)-1,W>>=-q,q+=Se;q>0;m=m*256+K[V+D],D+=y,q-=8);if(W===0)W=1-u;else{if(W===O)return m?NaN:(_?-1:1)*(1/0);m=m+Math.pow(2,Se),W=W-u}return(_?-1:1)*m*Math.pow(2,W-Se)},vt.write=function(K,V,me,Se,he,W){var m,ge,O,u=W*8-he-1,q=(1<<u)-1,D=q>>1,y=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=Se?0:W-1,C=Se?1:-1,x=V<0||V===0&&1/V<0?1:0;for(V=Math.abs(V),isNaN(V)||V===1/0?(ge=isNaN(V)?1:0,m=q):(m=Math.floor(Math.log(V)/Math.LN2),V*(O=Math.pow(2,-m))<1&&(m--,O*=2),m+D>=1?V+=y/O:V+=y*Math.pow(2,1-D),V*O>=2&&(m++,O/=2),m+D>=q?(ge=0,m=q):m+D>=1?(ge=(V*O-1)*Math.pow(2,he),m=m+D):(ge=V*Math.pow(2,D-1)*Math.pow(2,he),m=0));he>=8;K[me+_]=ge&255,_+=C,ge/=256,he-=8);for(m=m<<he|ge,u+=he;u>0;K[me+_]=m&255,_+=C,m/=256,u-=8);K[me+_-C]|=x*128}},53184:function(dr,vt,K){"use strict";var V,me;function Se(he,W,m){var ge=function(O,u){return he.js_beautify(O,u)};return ge.js=he.js_beautify,ge.css=W.css_beautify,ge.html=m.html_beautify,ge.js_beautify=he.js_beautify,ge.css_beautify=W.css_beautify,ge.html_beautify=m.html_beautify,ge}V=[K(58553),K(87804),K(40998)],me=function(he,W,m){return Se(he,W,m)}.apply(vt,V),me!==void 0&&(dr.exports=me)},87804:function(dr,vt){var K,V;(function(){var me;(function(){"use strict";var he=[,,function(O){function u(y){this.__parent=y,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}u.prototype.clone_empty=function(){var y=new u(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},u.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},u.prototype.has_match=function(y){for(var _=this.__items.length-1;_>=0;_--)if(this.__items[_].match(y))return!0;return!1},u.prototype.set_indent=function(y,_){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=_||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},u.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},u.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(y){this.__items.push(y);var _=y.lastIndexOf(`
`);_!==-1?this.__character_count=y.length-_:this.__character_count+=y.length},u.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function q(y,_){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),_=_||"",y.indent_level>0&&(_=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=_,this.__base_string_length=_.length}q.prototype.get_indent_size=function(y,_){var C=this.__base_string_length;return _=_||0,y<0&&(C=0),C+=y*this.__indent_size,C+=_,C},q.prototype.get_indent_string=function(y,_){var C=this.__base_string;return _=_||0,y<0&&(y=0,C=""),_+=y*this.__indent_size,this.__ensure_cache(_),C+=this.__cache[_],C},q.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},q.prototype.__add_column=function(){var y=this.__cache.length,_=0,C="";this.__indent_size&&y>=this.__indent_size&&(_=Math.floor(y/this.__indent_size),y-=_*this.__indent_size,C=new Array(_+1).join(this.__indent_string)),y&&(C+=new Array(y+1).join(" ")),this.__cache.push(C)};function D(y,_){this.__indent_cache=new q(y,_),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(y,_){return this.__indent_cache.get_indent_string(y,_)},D.prototype.get_indent_size=function(y,_){return this.__indent_cache.get_indent_size(y,_)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(y){this.trim(!0);var _=this.current_line.pop();_&&(_[_.length-1]===`
`&&(_=_.replace(/\n+$/g,"")),this.current_line.push(_)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return y!==`
`&&(C=C.replace(/[\n]/g,y)),C},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(y,_){return y=y||0,_=_||0,this.next_line.set_indent(y,_),this.__lines.length>1?(this.current_line.set_indent(y,_),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(y){for(var _=0;_<y.newlines;_++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},D.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},D.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},D.prototype.remove_indent=function(y){for(var _=this.__lines.length;y<_;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},D.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(y,_){for(var C=this.__lines.length-2;C>=0;){var x=this.__lines[C];if(x.is_empty())break;if(x.item(0).indexOf(y)!==0&&x.item(-1)!==_){this.__lines.splice(C+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},O.exports.Output=D},,,,function(O){function u(y,_){this.raw_options=q(y,_),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}u.prototype._get_array=function(y,_){var C=this.raw_options[y],x=_||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(x=C.concat()):typeof C=="string"&&(x=C.split(/[^a-zA-Z0-9_\/\-]+/)),x},u.prototype._get_boolean=function(y,_){var C=this.raw_options[y],x=C===void 0?!!_:!!C;return x},u.prototype._get_characters=function(y,_){var C=this.raw_options[y],x=_||"";return typeof C=="string"&&(x=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),x},u.prototype._get_number=function(y,_){var C=this.raw_options[y];_=parseInt(_,10),isNaN(_)&&(_=0);var x=parseInt(C,10);return isNaN(x)&&(x=_),x},u.prototype._get_selection=function(y,_,C){var x=this._get_selection_list(y,_,C);if(x.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
`+_+`
You passed in: '`+this.raw_options[y]+"'");return x[0]},u.prototype._get_selection_list=function(y,_,C){if(!_||_.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[_[0]],!this._is_valid_selection(C,_))throw new Error("Invalid Default Value!");var x=this._get_array(y,C);if(!this._is_valid_selection(x,_))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
`+_+`
You passed in: '`+this.raw_options[y]+"'");return x},u.prototype._is_valid_selection=function(y,_){return y.length&&_.length&&!y.some(function(C){return _.indexOf(C)===-1})};function q(y,_){var C={};y=D(y);var x;for(x in y)x!==_&&(C[x]=y[x]);if(_&&y[_])for(x in y[_])C[x]=y[_][x];return C}function D(y){var _={},C;for(C in y){var x=C.replace(/-/g,"_");_[x]=y[C]}return _}O.exports.Options=u,O.exports.normalizeOpts=D,O.exports.mergeOpts=q},,function(O){var u=RegExp.prototype.hasOwnProperty("sticky");function q(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}q.prototype.restart=function(){this.__position=0},q.prototype.back=function(){this.__position>0&&(this.__position-=1)},q.prototype.hasNext=function(){return this.__position<this.__input_length},q.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},q.prototype.peek=function(D){var y=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(y=this.__input.charAt(D)),y},q.prototype.__match=function(D,y){D.lastIndex=y;var _=D.exec(this.__input);return _&&!(u&&D.sticky)&&_.index!==y&&(_=null),_},q.prototype.test=function(D,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(D,y):!1},q.prototype.testChar=function(D,y){var _=this.peek(y);return D.lastIndex=0,_!==null&&D.test(_)},q.prototype.match=function(D){var y=this.__match(D,this.__position);return y?this.__position+=y[0].length:y=null,y},q.prototype.read=function(D,y,_){var C="",x;return D&&(x=this.match(D),x&&(C+=x[0])),y&&(x||!D)&&(C+=this.readUntil(y,_)),C},q.prototype.readUntil=function(D,y){var _="",C=this.__position;D.lastIndex=this.__position;var x=D.exec(this.__input);return x?(C=x.index,y&&(C+=x[0].length)):C=this.__input_length,_=this.__input.substring(this.__position,C),this.__position=C,_},q.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},q.prototype.get_regexp=function(D,y){var _=null,C="g";return y&&u&&(C="y"),typeof D=="string"&&D!==""?_=new RegExp(D,C):D&&(_=new RegExp(D.source,C)),_},q.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},q.prototype.peekUntilAfter=function(D){var y=this.__position,_=this.readUntilAfter(D);return this.__position=y,_},q.prototype.lookBack=function(D){var y=this.__position-1;return y>=D.length&&this.__input.substring(y-D.length,y).toLowerCase()===D},O.exports.InputScanner=q},,,,,function(O){function u(q,D){q=typeof q=="string"?q:q.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(q+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(q+/\sbeautify\signore:end\s/.source+D,"g")}u.prototype.get_directives=function(q){if(!q.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(q);y;)D[y[1]]=y[2],y=this.__directive_pattern.exec(q);return D},u.prototype.readIgnored=function(q){return q.readUntilAfter(this.__directives_end_ignore_pattern)},O.exports.Directives=u},,function(O,u,q){var D=q(16).Beautifier,y=q(17).Options;function _(C,x){var j=new D(C,x);return j.beautify()}O.exports=_,O.exports.defaultOptions=function(){return new y}},function(O,u,q){var D=q(17).Options,y=q(2).Output,_=q(8).InputScanner,C=q(13).Directives,x=new C(/\/\*/,/\*\//),j=/\r\n|[\r\n]/,M=/\r\n|[\r\n]/g,H=/\s/,R=/(?:\s|\n)+/g,P=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,X=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function fe(_e,we){this._source_text=_e||"",this._options=new D(we),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}fe.prototype.eatString=function(_e){var we="";for(this._ch=this._input.next();this._ch;){if(we+=this._ch,this._ch==="\\")we+=this._input.next();else if(_e.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return we},fe.prototype.eatWhitespace=function(_e){for(var we=H.test(this._input.peek()),ie=0;H.test(this._input.peek());)this._ch=this._input.next(),_e&&this._ch===`
`&&(ie===0||ie<this._options.max_preserve_newlines)&&(ie++,this._output.add_new_line(!0));return we},fe.prototype.foundNestedPseudoClass=function(){for(var _e=0,we=1,ie=this._input.peek(we);ie;){if(ie==="{")return!0;if(ie==="(")_e+=1;else if(ie===")"){if(_e===0)return!1;_e-=1}else if(ie===";"||ie==="}")return!1;we++,ie=this._input.peek(we)}return!1},fe.prototype.print_string=function(_e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(_e)},fe.prototype.preserveSingleSpace=function(_e){_e&&(this._output.space_before_token=!0)},fe.prototype.indent=function(){this._indentLevel++},fe.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},fe.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _e=this._source_text,we=this._options.eol;we==="auto"&&(we=`
`,_e&&j.test(_e||"")&&(we=_e.match(j)[0])),_e=_e.replace(M,`
`);var ie=_e.match(/^[\t ]*/)[0];this._output=new y(this._options,ie),this._input=new _(_e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ye=0,Pe=!1,ue=!1,Me=!1,Z=!1,I=!1,G=this._ch,z=!1,se,re,w;se=this._input.read(R),re=se!=="",w=G,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),G=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var B=this._input.read(P),$=x.get_directives(B);$&&$.ignore==="start"&&(B+=x.readIgnored(this._input)),this.print_string(B),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(X)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(re),this.print_string(this._ch);var ae=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ae.match(/[ :]$/)&&(ae=this.eatString(": ").replace(/\s+$/,""),this.print_string(ae),this._output.space_before_token=!0),ye===0&&ae.indexOf(":")!==-1&&(ue=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(re),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $e=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$e.match(/[ :]$/)&&($e=this.eatString(": ").replace(/\s+$/,""),this.print_string($e),this._output.space_before_token=!0),ye===0&&$e.indexOf(":")!==-1?(ue=!0,this.indent()):$e in this.NESTED_AT_RULE?(this._nestedLevel+=1,$e in this.CONDITIONAL_GROUP_RULE&&(Me=!0)):ye===0&&!ue&&(Z=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(re),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ue&&(ue=!1,this.outdent()),Z=!1,Me?(Me=!1,Pe=this._indentLevel>=this._nestedLevel):Pe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Pe&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(w==="("?this._output.space_before_token=!1:w!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),w==="{"&&this._output.trim(!0),ue&&(this.outdent(),ue=!1),this.print_string(this._ch),Pe=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var qe=0;qe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;qe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[qe])){z=!0;break}(Pe||Me)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Z&&ye===0?(this.print_string(":"),ue||(ue=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Bt=w==='"'||w==="'";this.preserveSingleSpace(Bt||re),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")z=!1,ye===0?(ue&&(this.outdent(),ue=!1),Z=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),ye++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),ye&&(ye--,this.outdent()));else{var pt=!1;this._input.lookBack("with")&&(pt=!0),this.preserveSingleSpace(re||pt),this.print_string(this._ch),ue&&w==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),I=!0):(this.eatWhitespace(),ye++,this.indent())}else if(this._ch===")")ye&&(ye--,this.outdent()),I&&this._input.peek()===";"&&this._options.selector_separator_newline&&(I=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!ue||I)&&ye===0&&!Z?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ue&&ye===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&H.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(re),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),H.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Qt=w==='"'||w==="'";this.preserveSingleSpace(Qt||re),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&z&&this._output.add_new_line()}var xt=this._output.get_code(we);return xt},O.exports.Beautifier=fe},function(O,u,q){var D=q(6).Options;function y(_){D.call(this,_,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var C=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||C;var x=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var j=0;j<x.length;j++)x[j]!=="expand"?this.brace_style="collapse":this.brace_style=x[j]}y.prototype=new D,O.exports.Options=y}],W={};function m(O){var u=W[O];if(u!==void 0)return u.exports;var q=W[O]={exports:{}};return he[O](q,q.exports,m),q.exports}var ge=m(15);me=ge})();var Se=me;K=[],V=function(){return{css_beautify:Se}}.apply(vt,K),V!==void 0&&(dr.exports=V)})()},40998:function(dr,vt,K){var V,me;(function(){var Se;(function(){"use strict";var ge=[,,function(D){function y(x){this.__parent=x,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}y.prototype.clone_empty=function(){var x=new y(this.__parent);return x.set_indent(this.__indent_count,this.__alignment_count),x},y.prototype.item=function(x){return x<0?this.__items[this.__items.length+x]:this.__items[x]},y.prototype.has_match=function(x){for(var j=this.__items.length-1;j>=0;j--)if(this.__items[j].match(x))return!0;return!1},y.prototype.set_indent=function(x,j){this.is_empty()&&(this.__indent_count=x||0,this.__alignment_count=j||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},y.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},y.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},y.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var x=this.__parent.current_line;return x.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),x.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),x.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,x.__items[0]===" "&&(x.__items.splice(0,1),x.__character_count-=1),!0}return!1},y.prototype.is_empty=function(){return this.__items.length===0},y.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},y.prototype.push=function(x){this.__items.push(x);var j=x.lastIndexOf(`
`);j!==-1?this.__character_count=x.length-j:this.__character_count+=x.length},y.prototype.pop=function(){var x=null;return this.is_empty()||(x=this.__items.pop(),this.__character_count-=x.length),x},y.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},y.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},y.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},y.prototype.toString=function(){var x="";return this.is_empty()?this.__parent.indent_empty_lines&&(x=this.__parent.get_indent_string(this.__indent_count)):(x=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),x+=this.__items.join("")),x};function _(x,j){this.__cache=[""],this.__indent_size=x.indent_size,this.__indent_string=x.indent_char,x.indent_with_tabs||(this.__indent_string=new Array(x.indent_size+1).join(x.indent_char)),j=j||"",x.indent_level>0&&(j=new Array(x.indent_level+1).join(this.__indent_string)),this.__base_string=j,this.__base_string_length=j.length}_.prototype.get_indent_size=function(x,j){var M=this.__base_string_length;return j=j||0,x<0&&(M=0),M+=x*this.__indent_size,M+=j,M},_.prototype.get_indent_string=function(x,j){var M=this.__base_string;return j=j||0,x<0&&(x=0,M=""),j+=x*this.__indent_size,this.__ensure_cache(j),M+=this.__cache[j],M},_.prototype.__ensure_cache=function(x){for(;x>=this.__cache.length;)this.__add_column()},_.prototype.__add_column=function(){var x=this.__cache.length,j=0,M="";this.__indent_size&&x>=this.__indent_size&&(j=Math.floor(x/this.__indent_size),x-=j*this.__indent_size,M=new Array(j+1).join(this.__indent_string)),x&&(M+=new Array(x+1).join(" ")),this.__cache.push(M)};function C(x,j){this.__indent_cache=new _(x,j),this.raw=!1,this._end_with_newline=x.end_with_newline,this.indent_size=x.indent_size,this.wrap_line_length=x.wrap_line_length,this.indent_empty_lines=x.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new y(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(x,j){return this.__indent_cache.get_indent_string(x,j)},C.prototype.get_indent_size=function(x,j){return this.__indent_cache.get_indent_size(x,j)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(x){return this.is_empty()||!x&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(x){this.trim(!0);var j=this.current_line.pop();j&&(j[j.length-1]===`
`&&(j=j.replace(/\n+$/g,"")),this.current_line.push(j)),this._end_with_newline&&this.__add_outputline();var M=this.__lines.join(`
`);return x!==`
`&&(M=M.replace(/[\n]/g,x)),M},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(x,j){return x=x||0,j=j||0,this.next_line.set_indent(x,j),this.__lines.length>1?(this.current_line.set_indent(x,j),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(x){for(var j=0;j<x.newlines;j++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(x.whitespace_before),this.current_line.push(x.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(x){this.__add_space_before_token(),this.current_line.push(x),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(x){for(var j=this.__lines.length;x<j;)this.__lines[x]._remove_indent(),x++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(x){for(x=x===void 0?!1:x,this.current_line.trim();x&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(x,j){for(var M=this.__lines.length-2;M>=0;){var H=this.__lines[M];if(H.is_empty())break;if(H.item(0).indexOf(x)!==0&&H.item(-1)!==j){this.__lines.splice(M+1,0,new y(this)),this.previous_line=this.__lines[this.__lines.length-2];break}M--}},D.exports.Output=C},function(D){function y(_,C,x,j){this.type=_,this.text=C,this.comments_before=null,this.newlines=x||0,this.whitespace_before=j||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}D.exports.Token=y},,,function(D){function y(x,j){this.raw_options=_(x,j),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}y.prototype._get_array=function(x,j){var M=this.raw_options[x],H=j||[];return typeof M=="object"?M!==null&&typeof M.concat=="function"&&(H=M.concat()):typeof M=="string"&&(H=M.split(/[^a-zA-Z0-9_\/\-]+/)),H},y.prototype._get_boolean=function(x,j){var M=this.raw_options[x],H=M===void 0?!!j:!!M;return H},y.prototype._get_characters=function(x,j){var M=this.raw_options[x],H=j||"";return typeof M=="string"&&(H=M.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),H},y.prototype._get_number=function(x,j){var M=this.raw_options[x];j=parseInt(j,10),isNaN(j)&&(j=0);var H=parseInt(M,10);return isNaN(H)&&(H=j),H},y.prototype._get_selection=function(x,j,M){var H=this._get_selection_list(x,j,M);if(H.length!==1)throw new Error("Invalid Option Value: The option '"+x+`' can only be one of the following values:
`+j+`
You passed in: '`+this.raw_options[x]+"'");return H[0]},y.prototype._get_selection_list=function(x,j,M){if(!j||j.length===0)throw new Error("Selection list cannot be empty.");if(M=M||[j[0]],!this._is_valid_selection(M,j))throw new Error("Invalid Default Value!");var H=this._get_array(x,M);if(!this._is_valid_selection(H,j))throw new Error("Invalid Option Value: The option '"+x+`' can contain only the following values:
`+j+`
You passed in: '`+this.raw_options[x]+"'");return H},y.prototype._is_valid_selection=function(x,j){return x.length&&j.length&&!x.some(function(M){return j.indexOf(M)===-1})};function _(x,j){var M={};x=C(x);var H;for(H in x)H!==j&&(M[H]=x[H]);if(j&&x[j])for(H in x[j])M[H]=x[j][H];return M}function C(x){var j={},M;for(M in x){var H=M.replace(/-/g,"_");j[H]=x[M]}return j}D.exports.Options=y,D.exports.normalizeOpts=C,D.exports.mergeOpts=_},,function(D){var y=RegExp.prototype.hasOwnProperty("sticky");function _(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}_.prototype.restart=function(){this.__position=0},_.prototype.back=function(){this.__position>0&&(this.__position-=1)},_.prototype.hasNext=function(){return this.__position<this.__input_length},_.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},_.prototype.peek=function(C){var x=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(x=this.__input.charAt(C)),x},_.prototype.__match=function(C,x){C.lastIndex=x;var j=C.exec(this.__input);return j&&!(y&&C.sticky)&&j.index!==x&&(j=null),j},_.prototype.test=function(C,x){return x=x||0,x+=this.__position,x>=0&&x<this.__input_length?!!this.__match(C,x):!1},_.prototype.testChar=function(C,x){var j=this.peek(x);return C.lastIndex=0,j!==null&&C.test(j)},_.prototype.match=function(C){var x=this.__match(C,this.__position);return x?this.__position+=x[0].length:x=null,x},_.prototype.read=function(C,x,j){var M="",H;return C&&(H=this.match(C),H&&(M+=H[0])),x&&(H||!C)&&(M+=this.readUntil(x,j)),M},_.prototype.readUntil=function(C,x){var j="",M=this.__position;C.lastIndex=this.__position;var H=C.exec(this.__input);return H?(M=H.index,x&&(M+=H[0].length)):M=this.__input_length,j=this.__input.substring(this.__position,M),this.__position=M,j},_.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},_.prototype.get_regexp=function(C,x){var j=null,M="g";return x&&y&&(M="y"),typeof C=="string"&&C!==""?j=new RegExp(C,M):C&&(j=new RegExp(C.source,M)),j},_.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},_.prototype.peekUntilAfter=function(C){var x=this.__position,j=this.readUntilAfter(C);return this.__position=x,j},_.prototype.lookBack=function(C){var x=this.__position-1;return x>=C.length&&this.__input.substring(x-C.length,x).toLowerCase()===C},D.exports.InputScanner=_},function(D,y,_){var C=_(8).InputScanner,x=_(3).Token,j=_(10).TokenStream,M=_(11).WhitespacePattern,H={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(P,X){this._input=new C(P),this._options=X||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new M(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new j,this._reset();for(var P,X=new x(H.START,""),fe=null,_e=[],we=new j;X.type!==H.EOF;){for(P=this._get_next_token(X,fe);this._is_comment(P);)we.add(P),P=this._get_next_token(X,fe);we.isEmpty()||(P.comments_before=we,we=new j),P.parent=fe,this._is_opening(P)?(_e.push(fe),fe=P):fe&&this._is_closing(P,fe)&&(P.opened=fe,fe.closed=P,fe=_e.pop(),P.parent=fe),P.previous=X,X.next=P,this.__tokens.add(P),X=P}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(P,X){this._readWhitespace();var fe=this._input.read(/.+/g);return fe?this._create_token(H.RAW,fe):this._create_token(H.EOF,"")},R.prototype._is_comment=function(P){return!1},R.prototype._is_opening=function(P){return!1},R.prototype._is_closing=function(P,X){return!1},R.prototype._create_token=function(P,X){var fe=new x(P,X,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return fe},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},D.exports.Tokenizer=R,D.exports.TOKEN=H},function(D){function y(_){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=_}y.prototype.restart=function(){this.__position=0},y.prototype.isEmpty=function(){return this.__tokens_length===0},y.prototype.hasNext=function(){return this.__position<this.__tokens_length},y.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__tokens[this.__position],this.__position+=1),_},y.prototype.peek=function(_){var C=null;return _=_||0,_+=this.__position,_>=0&&_<this.__tokens_length&&(C=this.__tokens[_]),C},y.prototype.add=function(_){this.__parent_token&&(_.parent=this.__parent_token),this.__tokens.push(_),this.__tokens_length+=1},D.exports.TokenStream=y},function(D,y,_){var C=_(12).Pattern;function x(j,M){C.call(this,j,M),M?this._line_regexp=this._input.get_regexp(M._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}x.prototype=new C,x.prototype.__set_whitespace_patterns=function(j,M){j+="\\t ",M+="\\n\\r",this._match_pattern=this._input.get_regexp("["+j+M+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+M+"]")},x.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var j=this._input.read(this._match_pattern);if(j===" ")this.whitespace_before_token=" ";else if(j){var M=this.__split(this._newline_regexp,j);this.newline_count=M.length-1,this.whitespace_before_token=M[this.newline_count]}return j},x.prototype.matching=function(j,M){var H=this._create();return H.__set_whitespace_patterns(j,M),H._update(),H},x.prototype._create=function(){return new x(this._input,this)},x.prototype.__split=function(j,M){j.lastIndex=0;for(var H=0,R=[],P=j.exec(M);P;)R.push(M.substring(H,P.index)),H=P.index+P[0].length,P=j.exec(M);return H<M.length?R.push(M.substring(H,M.length)):R.push(""),R},D.exports.WhitespacePattern=x},function(D){function y(_,C){this._input=_,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,C&&(this._starting_pattern=this._input.get_regexp(C._starting_pattern,!0),this._match_pattern=this._input.get_regexp(C._match_pattern,!0),this._until_pattern=this._input.get_regexp(C._until_pattern),this._until_after=C._until_after)}y.prototype.read=function(){var _=this._input.read(this._starting_pattern);return(!this._starting_pattern||_)&&(_+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),_},y.prototype.read_match=function(){return this._input.match(this._match_pattern)},y.prototype.until_after=function(_){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(_),C._update(),C},y.prototype.until=function(_){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(_),C._update(),C},y.prototype.starting_with=function(_){var C=this._create();return C._starting_pattern=this._input.get_regexp(_,!0),C._update(),C},y.prototype.matching=function(_){var C=this._create();return C._match_pattern=this._input.get_regexp(_,!0),C._update(),C},y.prototype._create=function(){return new y(this._input,this)},y.prototype._update=function(){},D.exports.Pattern=y},function(D){function y(_,C){_=typeof _=="string"?_:_.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(_+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(_+/\sbeautify\signore:end\s/.source+C,"g")}y.prototype.get_directives=function(_){if(!_.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var x=this.__directive_pattern.exec(_);x;)C[x[1]]=x[2],x=this.__directive_pattern.exec(_);return C},y.prototype.readIgnored=function(_){return _.readUntilAfter(this.__directives_end_ignore_pattern)},D.exports.Directives=y},function(D,y,_){var C=_(12).Pattern,x={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function j(M,H){C.call(this,M,H),this.__template_pattern=null,this._disabled=Object.assign({},x),this._excluded=Object.assign({},x),H&&(this.__template_pattern=this._input.get_regexp(H.__template_pattern),this._excluded=Object.assign(this._excluded,H._excluded),this._disabled=Object.assign(this._disabled,H._disabled));var R=new C(M);this.__patterns={handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:R.starting_with(/{{{/).until_after(/}}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),php:R.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:R.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:R.starting_with(/{%/).until_after(/%}/),django_value:R.starting_with(/{{/).until_after(/}}/),django_comment:R.starting_with(/{#/).until_after(/#}/),smarty:R.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:R.starting_with(/{\*/).until_after(/\*}/),smarty_literal:R.starting_with(/{literal}/).until_after(/{\/literal}/)}}j.prototype=new C,j.prototype._create=function(){return new j(this._input,this)},j.prototype._update=function(){this.__set_templated_pattern()},j.prototype.disable=function(M){var H=this._create();return H._disabled[M]=!0,H._update(),H},j.prototype.read_options=function(M){var H=this._create();for(var R in x)H._disabled[R]=M.templating.indexOf(R)===-1;return H._update(),H},j.prototype.exclude=function(M){var H=this._create();return H._excluded[M]=!0,H._update(),H},j.prototype.read=function(){var M="";this._match_pattern?M=this._input.read(this._starting_pattern):M=this._input.read(this._starting_pattern,this.__template_pattern);for(var H=this._read_template();H;)this._match_pattern?H+=this._input.read(this._match_pattern):H+=this._input.readUntil(this.__template_pattern),M+=H,H=this._read_template();return this._until_after&&(M+=this._input.readUntilAfter(this._until_pattern)),M},j.prototype.__set_templated_pattern=function(){var M=[];this._disabled.php||M.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||M.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||M.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||M.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(M.push(this.__patterns.django._starting_pattern.source),M.push(this.__patterns.django_value._starting_pattern.source),M.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||M.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&M.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+M.join("|")+")")},j.prototype._read_template=function(){var M="",H=this._input.peek();if(H==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(M=M||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(M=M||this.__patterns.erb.read())}else H==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(M=M||this.__patterns.handlebars_comment.read(),M=M||this.__patterns.handlebars_unescaped.read(),M=M||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(M=M||this.__patterns.django_value.read()),this._excluded.django||(M=M||this.__patterns.django_comment.read(),M=M||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(M=M||this.__patterns.smarty_comment.read(),M=M||this.__patterns.smarty_literal.read(),M=M||this.__patterns.smarty.read()));return M},D.exports.TemplatablePattern=j},,,,function(D,y,_){var C=_(19).Beautifier,x=_(20).Options;function j(M,H,R,P){var X=new C(M,H,R,P);return X.beautify()}D.exports=j,D.exports.defaultOptions=function(){return new x}},function(D,y,_){var C=_(20).Options,x=_(2).Output,j=_(21).Tokenizer,M=_(21).TOKEN,H=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,P=function(Z,I){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Z.max_preserve_newlines,this.preserve_newlines=Z.preserve_newlines,this._output=new x(Z,I)};P.prototype.current_line_has_match=function(Z){return this._output.current_line.has_match(Z)},P.prototype.set_space_before_token=function(Z,I){this._output.space_before_token=Z,this._output.non_breaking_space=I},P.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},P.prototype.add_raw_token=function(Z){this._output.add_raw_token(Z)},P.prototype.print_preserved_newlines=function(Z){var I=0;Z.type!==M.TEXT&&Z.previous.type!==M.TEXT&&(I=Z.newlines?1:0),this.preserve_newlines&&(I=Z.newlines<this.max_preserve_newlines+1?Z.newlines:this.max_preserve_newlines+1);for(var G=0;G<I;G++)this.print_newline(G>0);return I!==0},P.prototype.traverse_whitespace=function(Z){return Z.whitespace_before||Z.newlines?(this.print_preserved_newlines(Z)||(this._output.space_before_token=!0),!0):!1},P.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},P.prototype.print_newline=function(Z){this._output.add_new_line(Z)},P.prototype.print_token=function(Z){Z.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Z.text))},P.prototype.indent=function(){this.indent_level++},P.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},P.prototype.get_full_indent=function(Z){return Z=this.indent_level+(Z||0),Z<1?"":this._output.get_indent_string(Z)};var X=function(Z){for(var I=null,G=Z.next;G.type!==M.EOF&&Z.closed!==G;){if(G.type===M.ATTRIBUTE&&G.text==="type"){G.next&&G.next.type===M.EQUALS&&G.next.next&&G.next.next.type===M.VALUE&&(I=G.next.next.text);break}G=G.next}return I},fe=function(Z,I){var G=null,z=null;return I.closed?(Z==="script"?G="text/javascript":Z==="style"&&(G="text/css"),G=X(I)||G,G.search("text/css")>-1?z="css":G.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?z="javascript":G.search(/(text|application|dojo)\/(x-)?(html)/)>-1?z="html":G.search(/test\/null/)>-1&&(z="null"),z):null};function _e(Z,I){return I.indexOf(Z)!==-1}function we(Z,I,G){this.parent=Z||null,this.tag=I?I.tag_name:"",this.indent_level=G||0,this.parser_token=I||null}function ie(Z){this._printer=Z,this._current_frame=null}ie.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ie.prototype.record_tag=function(Z){var I=new we(this._current_frame,Z,this._printer.indent_level);this._current_frame=I},ie.prototype._try_pop_frame=function(Z){var I=null;return Z&&(I=Z.parser_token,this._printer.indent_level=Z.indent_level,this._current_frame=Z.parent),I},ie.prototype._get_frame=function(Z,I){for(var G=this._current_frame;G&&Z.indexOf(G.tag)===-1;){if(I&&I.indexOf(G.tag)!==-1){G=null;break}G=G.parent}return G},ie.prototype.try_pop=function(Z,I){var G=this._get_frame([Z],I);return this._try_pop_frame(G)},ie.prototype.indent_to_tag=function(Z){var I=this._get_frame(Z);I&&(this._printer.indent_level=I.indent_level)};function ye(Z,I,G,z){this._source_text=Z||"",I=I||{},this._js_beautify=G,this._css_beautify=z,this._tag_stack=null;var se=new C(I,"html");this._options=se,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}ye.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Z=this._source_text,I=this._options.eol;this._options.eol==="auto"&&(I=`
`,Z&&H.test(Z)&&(I=Z.match(H)[0])),Z=Z.replace(R,`
`);var G=Z.match(/^[\t ]*/)[0],z={text:"",type:""},se=new Pe(this._options),re=new P(this._options,G),w=new j(Z,this._options).tokenize();this._tag_stack=new ie(re);for(var B=null,$=w.next();$.type!==M.EOF;)$.type===M.TAG_OPEN||$.type===M.COMMENT?(B=this._handle_tag_open(re,$,se,z,w),se=B):$.type===M.ATTRIBUTE||$.type===M.EQUALS||$.type===M.VALUE||$.type===M.TEXT&&!se.tag_complete?B=this._handle_inside_tag(re,$,se,z):$.type===M.TAG_CLOSE?B=this._handle_tag_close(re,$,se):$.type===M.TEXT?B=this._handle_text(re,$,se):$.type===M.CONTROL_FLOW_OPEN?B=this._handle_control_flow_open(re,$):$.type===M.CONTROL_FLOW_CLOSE?B=this._handle_control_flow_close(re,$):re.add_raw_token($),z=B,$=w.next();var ae=re._output.get_code(I);return ae},ye.prototype._handle_control_flow_open=function(Z,I){var G={text:I.text,type:I.type};return Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),I.newlines?Z.print_preserved_newlines(I):Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),Z.print_token(I),Z.indent(),G},ye.prototype._handle_control_flow_close=function(Z,I){var G={text:I.text,type:I.type};return Z.deindent(),I.newlines?Z.print_preserved_newlines(I):Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),Z.print_token(I),G},ye.prototype._handle_tag_close=function(Z,I,G){var z={text:I.text,type:I.type};return Z.alignment_size=0,G.tag_complete=!0,Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),G.is_unformatted?Z.add_raw_token(I):(G.tag_start_char==="<"&&(Z.set_space_before_token(I.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&G.has_wrapped_attrs&&Z.print_newline(!1)),Z.print_token(I)),G.indent_content&&!(G.is_unformatted||G.is_content_unformatted)&&(Z.indent(),G.indent_content=!1),!G.is_inline_element&&!(G.is_unformatted||G.is_content_unformatted)&&Z.set_wrap_point(),z},ye.prototype._handle_inside_tag=function(Z,I,G,z){var se=G.has_wrapped_attrs,re={text:I.text,type:I.type};return Z.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),G.is_unformatted?Z.add_raw_token(I):G.tag_start_char==="{"&&I.type===M.TEXT?Z.print_preserved_newlines(I)?(I.newlines=0,Z.add_raw_token(I)):Z.print_token(I):(I.type===M.ATTRIBUTE?Z.set_space_before_token(!0):(I.type===M.EQUALS||I.type===M.VALUE&&I.previous.type===M.EQUALS)&&Z.set_space_before_token(!1),I.type===M.ATTRIBUTE&&G.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Z.traverse_whitespace(I),se=se||I.newlines!==0),this._is_wrap_attributes_force&&G.attr_count>=this._options.wrap_attributes_min_attrs&&(z.type!==M.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Z.print_newline(!1),se=!0)),Z.print_token(I),se=se||Z.previous_token_wrapped(),G.has_wrapped_attrs=se),re},ye.prototype._handle_text=function(Z,I,G){var z={text:I.text,type:"TK_CONTENT"};return G.custom_beautifier_name?this._print_custom_beatifier_text(Z,I,G):G.is_unformatted||G.is_content_unformatted?Z.add_raw_token(I):(Z.traverse_whitespace(I),Z.print_token(I)),z},ye.prototype._print_custom_beatifier_text=function(Z,I,G){var z=this;if(I.text!==""){var se=I.text,re,w=1,B="",$="";G.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?re=this._js_beautify:G.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?re=this._css_beautify:G.custom_beautifier_name==="html"&&(re=function(Qt,xt){var ht=new ye(Qt,xt,z._js_beautify,z._css_beautify);return ht.beautify()}),this._options.indent_scripts==="keep"?w=0:this._options.indent_scripts==="separate"&&(w=-Z.indent_level);var ae=Z.get_full_indent(w);if(se=se.replace(/\n[ \t]*$/,""),G.custom_beautifier_name!=="html"&&se[0]==="<"&&se.match(/^(<!--|<!\[CDATA\[)/)){var $e=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(se);if(!$e){Z.add_raw_token(I);return}B=ae+$e[1]+`
`,se=$e[4],$e[5]&&($=ae+$e[5]),se=se.replace(/\n[ \t]*$/,""),($e[2]||$e[3].indexOf(`
`)!==-1)&&($e=$e[3].match(/[ \t]+$/),$e&&(I.whitespace_before=$e[0]))}if(se)if(re){var qe=function(){this.eol=`
`};qe.prototype=this._options.raw_options;var Bt=new qe;se=re(ae+se,Bt)}else{var pt=I.whitespace_before;pt&&(se=se.replace(new RegExp(`
(`+pt+")?","g"),`
`)),se=ae+se.replace(/\n/g,`
`+ae)}B&&(se?se=B+se+`
`+$:se=B+$),Z.print_newline(!1),se&&(I.text=se,I.whitespace_before="",I.newlines=0,Z.add_raw_token(I),Z.print_newline(!0))}},ye.prototype._handle_tag_open=function(Z,I,G,z,se){var re=this._get_tag_open_token(I);if((G.is_unformatted||G.is_content_unformatted)&&!G.is_empty_element&&I.type===M.TAG_OPEN&&!re.is_start_tag?(Z.add_raw_token(I),re.start_tag_token=this._tag_stack.try_pop(re.tag_name)):(Z.traverse_whitespace(I),this._set_tag_position(Z,I,re,G,z),re.is_inline_element||Z.set_wrap_point(),Z.print_token(I)),re.is_start_tag&&this._is_wrap_attributes_force){var w=0,B;do B=se.peek(w),B.type===M.ATTRIBUTE&&(re.attr_count+=1),w+=1;while(B.type!==M.EOF&&B.type!==M.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(re.alignment_size=I.text.length+1),!re.tag_complete&&!re.is_unformatted&&(Z.alignment_size=re.alignment_size),re};var Pe=function(Z,I,G){if(this.parent=I||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!G)this.tag_complete=!0;else{var z;this.tag_start_char=G.text[0],this.text=G.text,this.tag_start_char==="<"?(z=G.text.match(/^<([^\s>]*)/),this.tag_check=z?z[1]:""):(z=G.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=z?z[1]:"",(G.text.startsWith("{{#>")||G.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&G.next!==null?this.tag_check=G.next.text.split(" ")[0]:this.tag_check=G.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),G.type===M.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||G.closed&&G.closed.text==="/>";var se=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(se=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Z.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(se)))}};ye.prototype._get_tag_open_token=function(Z){var I=new Pe(this._options,this._tag_stack.get_parser_token(),Z);return I.alignment_size=this._options.wrap_attributes_indent_size,I.is_end_tag=I.is_end_tag||_e(I.tag_check,this._options.void_elements),I.is_empty_element=I.tag_complete||I.is_start_tag&&I.is_end_tag,I.is_unformatted=!I.tag_complete&&_e(I.tag_check,this._options.unformatted),I.is_content_unformatted=!I.is_empty_element&&_e(I.tag_check,this._options.content_unformatted),I.is_inline_element=_e(I.tag_name,this._options.inline)||this._options.inline_custom_elements&&I.tag_name.includes("-")||I.tag_start_char==="{",I},ye.prototype._set_tag_position=function(Z,I,G,z,se){if(G.is_empty_element||(G.is_end_tag?G.start_tag_token=this._tag_stack.try_pop(G.tag_name):(this._do_optional_end_element(G)&&(G.is_inline_element||Z.print_newline(!1)),this._tag_stack.record_tag(G),(G.tag_name==="script"||G.tag_name==="style")&&!(G.is_unformatted||G.is_content_unformatted)&&(G.custom_beautifier_name=fe(G.tag_check,I)))),_e(G.tag_check,this._options.extra_liners)&&(Z.print_newline(!1),Z._output.just_added_blankline()||Z.print_newline(!0)),G.is_empty_element){if(G.tag_start_char==="{"&&G.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),G.indent_content=!0;var re=Z.current_line_has_match(/{{#if/);re||Z.print_newline(!1)}G.tag_name==="!--"&&se.type===M.TAG_CLOSE&&z.is_end_tag&&G.text.indexOf(`
`)===-1||(G.is_inline_element||G.is_unformatted||Z.print_newline(!1),this._calcluate_parent_multiline(Z,G))}else if(G.is_end_tag){var w=!1;w=G.start_tag_token&&G.start_tag_token.multiline_content,w=w||!G.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(se.type===M.TAG_CLOSE&&G.start_tag_token===z)&&se.type!=="TK_CONTENT",(G.is_content_unformatted||G.is_unformatted)&&(w=!1),w&&Z.print_newline(!1)}else G.indent_content=!G.custom_beautifier_name,G.tag_start_char==="<"&&(G.tag_name==="html"?G.indent_content=this._options.indent_inner_html:G.tag_name==="head"?G.indent_content=this._options.indent_head_inner_html:G.tag_name==="body"&&(G.indent_content=this._options.indent_body_inner_html)),!(G.is_inline_element||G.is_unformatted)&&(se.type!=="TK_CONTENT"||G.is_content_unformatted)&&Z.print_newline(!1),this._calcluate_parent_multiline(Z,G)},ye.prototype._calcluate_parent_multiline=function(Z,I){I.parent&&Z._output.just_added_newline()&&!((I.is_inline_element||I.is_unformatted)&&I.parent.is_inline_element)&&(I.parent.multiline_content=!0)};var ue=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Me=["a","audio","del","ins","map","noscript","video"];ye.prototype._do_optional_end_element=function(Z){var I=null;if(!(Z.is_empty_element||!Z.is_start_tag||!Z.parent)){if(Z.tag_name==="body")I=I||this._tag_stack.try_pop("head");else if(Z.tag_name==="li")I=I||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Z.tag_name==="dd"||Z.tag_name==="dt")I=I||this._tag_stack.try_pop("dt",["dl"]),I=I||this._tag_stack.try_pop("dd",["dl"]);else if(Z.parent.tag_name==="p"&&ue.indexOf(Z.tag_name)!==-1){var G=Z.parent.parent;(!G||Me.indexOf(G.tag_name)===-1)&&(I=I||this._tag_stack.try_pop("p"))}else Z.tag_name==="rp"||Z.tag_name==="rt"?(I=I||this._tag_stack.try_pop("rt",["ruby","rtc"]),I=I||this._tag_stack.try_pop("rp",["ruby","rtc"])):Z.tag_name==="optgroup"?I=I||this._tag_stack.try_pop("optgroup",["select"]):Z.tag_name==="option"?I=I||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Z.tag_name==="colgroup"?I=I||this._tag_stack.try_pop("caption",["table"]):Z.tag_name==="thead"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"])):Z.tag_name==="tbody"||Z.tag_name==="tfoot"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("thead",["table"]),I=I||this._tag_stack.try_pop("tbody",["table"])):Z.tag_name==="tr"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Z.tag_name==="th"||Z.tag_name==="td")&&(I=I||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),I=I||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Z.parent=this._tag_stack.get_parser_token(),I}},D.exports.Beautifier=ye},function(D,y,_){var C=_(6).Options;function x(j){C.call(this,j,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}x.prototype=new C,D.exports.Options=x},function(D,y,_){var C=_(9).Tokenizer,x=_(9).TOKEN,j=_(13).Directives,M=_(14).TemplatablePattern,H=_(12).Pattern,R={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:x.START,RAW:x.RAW,EOF:x.EOF},P=new j(/<\!--/,/-->/),X=function(fe,_e){C.call(this,fe,_e),this._current_tag_name="";var we=new M(this._input).read_options(this._options),ie=new H(this._input);if(this.__patterns={word:we.until(/[\n\r\t <]/),word_control_flow_close_excluded:we.until(/[\n\r\t <}]/),single_quote:we.until_after(/'/),double_quote:we.until_after(/"/),attribute:we.until(/[\n\r\t =>]|\/>/),element_name:we.until(/[\n\r\t >\/]/),angular_control_flow_start:ie.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ie.starting_with(/{{!--/).until_after(/--}}/),handlebars:ie.starting_with(/{{/).until_after(/}}/),handlebars_open:ie.until(/[\n\r\t }]/),handlebars_raw_close:ie.until(/}}/),comment:ie.starting_with(/<!--/).until_after(/-->/),cdata:ie.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ie.starting_with(/<!\[/).until_after(/]>/),processing:ie.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var ye=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ie.matching(ye).until_after(ye)}};X.prototype=new C,X.prototype._is_comment=function(fe){return!1},X.prototype._is_opening=function(fe){return fe.type===R.TAG_OPEN||fe.type===R.CONTROL_FLOW_OPEN},X.prototype._is_closing=function(fe,_e){return fe.type===R.TAG_CLOSE&&_e&&((fe.text===">"||fe.text==="/>")&&_e.text[0]==="<"||fe.text==="}}"&&_e.text[0]==="{"&&_e.text[1]==="{")||fe.type===R.CONTROL_FLOW_CLOSE&&fe.text==="}"&&_e.text.endsWith("{")},X.prototype._reset=function(){this._current_tag_name=""},X.prototype._get_next_token=function(fe,_e){var we=null;this._readWhitespace();var ie=this._input.peek();return ie===null?this._create_token(R.EOF,""):(we=we||this._read_open_handlebars(ie,_e),we=we||this._read_attribute(ie,fe,_e),we=we||this._read_close(ie,_e),we=we||this._read_script_and_style(ie,fe),we=we||this._read_control_flows(ie,_e),we=we||this._read_raw_content(ie,fe,_e),we=we||this._read_content_word(ie,_e),we=we||this._read_comment_or_cdata(ie),we=we||this._read_processing(ie),we=we||this._read_open(ie,_e),we=we||this._create_token(R.UNKNOWN,this._input.next()),we)},X.prototype._read_comment_or_cdata=function(fe){var _e=null,we=null,ie=null;if(fe==="<"){var ye=this._input.peek(1);ye==="!"&&(we=this.__patterns.comment.read(),we?(ie=P.get_directives(we),ie&&ie.ignore==="start"&&(we+=P.readIgnored(this._input))):we=this.__patterns.cdata.read()),we&&(_e=this._create_token(R.COMMENT,we),_e.directives=ie)}return _e},X.prototype._read_processing=function(fe){var _e=null,we=null,ie=null;if(fe==="<"){var ye=this._input.peek(1);(ye==="!"||ye==="?")&&(we=this.__patterns.conditional_comment.read(),we=we||this.__patterns.processing.read()),we&&(_e=this._create_token(R.COMMENT,we),_e.directives=ie)}return _e},X.prototype._read_open=function(fe,_e){var we=null,ie=null;return(!_e||_e.type===R.CONTROL_FLOW_OPEN)&&fe==="<"&&(we=this._input.next(),this._input.peek()==="/"&&(we+=this._input.next()),we+=this.__patterns.element_name.read(),ie=this._create_token(R.TAG_OPEN,we)),ie},X.prototype._read_open_handlebars=function(fe,_e){var we=null,ie=null;return(!_e||_e.type===R.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&fe==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(we=this.__patterns.handlebars_comment.read(),we=we||this.__patterns.handlebars.read(),ie=this._create_token(R.COMMENT,we)):(we=this.__patterns.handlebars_open.read(),ie=this._create_token(R.TAG_OPEN,we))),ie},X.prototype._read_control_flows=function(fe,_e){var we="",ie=null;if(!this._options.templating.includes("angular"))return ie;if(fe==="@"){if(we=this.__patterns.angular_control_flow_start.read(),we==="")return ie;for(var ye=we.endsWith("(")?1:0,Pe=0;!(we.endsWith("{")&&ye===Pe);){var ue=this._input.next();if(ue===null)break;ue==="("?ye++:ue===")"&&Pe++,we+=ue}ie=this._create_token(R.CONTROL_FLOW_OPEN,we)}else fe==="}"&&_e&&_e.type===R.CONTROL_FLOW_OPEN&&(we=this._input.next(),ie=this._create_token(R.CONTROL_FLOW_CLOSE,we));return ie},X.prototype._read_close=function(fe,_e){var we=null,ie=null;return _e&&_e.type===R.TAG_OPEN&&(_e.text[0]==="<"&&(fe===">"||fe==="/"&&this._input.peek(1)===">")?(we=this._input.next(),fe==="/"&&(we+=this._input.next()),ie=this._create_token(R.TAG_CLOSE,we)):_e.text[0]==="{"&&fe==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ie=this._create_token(R.TAG_CLOSE,"}}"))),ie},X.prototype._read_attribute=function(fe,_e,we){var ie=null,ye="";if(we&&we.text[0]==="<")if(fe==="=")ie=this._create_token(R.EQUALS,this._input.next());else if(fe==='"'||fe==="'"){var Pe=this._input.next();fe==='"'?Pe+=this.__patterns.double_quote.read():Pe+=this.__patterns.single_quote.read(),ie=this._create_token(R.VALUE,Pe)}else ye=this.__patterns.attribute.read(),ye&&(_e.type===R.EQUALS?ie=this._create_token(R.VALUE,ye):ie=this._create_token(R.ATTRIBUTE,ye));return ie},X.prototype._is_content_unformatted=function(fe){return this._options.void_elements.indexOf(fe)===-1&&(this._options.content_unformatted.indexOf(fe)!==-1||this._options.unformatted.indexOf(fe)!==-1)},X.prototype._read_raw_content=function(fe,_e,we){var ie="";if(we&&we.text[0]==="{")ie=this.__patterns.handlebars_raw_close.read();else if(_e.type===R.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var ye=_e.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ye)&&(ie=this._input.readUntil(new RegExp("</"+ye+"[\\n\\r\\t ]*?>","ig")))}return ie?this._create_token(R.TEXT,ie):null},X.prototype._read_script_and_style=function(fe,_e){if(_e.type===R.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var we=_e.opened.text.substr(1).toLowerCase();if(we==="script"||we==="style"){var ie=this._read_comment_or_cdata(fe);if(ie)return ie.type=R.TEXT,ie;var ye=this._input.readUntil(new RegExp("</"+we+"[\\n\\r\\t ]*?>","ig"));if(ye)return this._create_token(R.TEXT,ye)}}return null},X.prototype._read_content_word=function(fe,_e){var we="";return this._options.unformatted_content_delimiter&&fe===this._options.unformatted_content_delimiter[0]&&(we=this.__patterns.unformatted_content_delimiter.read()),we||(we=_e&&_e.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),we?this._create_token(R.TEXT,we):null},D.exports.Tokenizer=X,D.exports.TOKEN=R}],O={};function u(D){var y=O[D];if(y!==void 0)return y.exports;var _=O[D]={exports:{}};return ge[D](_,_.exports,u),_.exports}var q=u(18);Se=q})();var he=Se;if(1)V=[K,K(58553),K(87804)],me=function(ge){var O=K(58553),u=K(87804);return{html_beautify:function(q,D){return he(q,D,O.js_beautify,u.css_beautify)}}}.apply(vt,V),me!==void 0&&(dr.exports=me);else var W,m})()},58553:function(dr,vt){var K,V;(function(){var me;(function(){"use strict";var he=[function(O,u,q){var D=q(1).Beautifier,y=q(5).Options;function _(C,x){var j=new D(C,x);return j.beautify()}O.exports=_,O.exports.defaultOptions=function(){return new y}},function(O,u,q){var D=q(2).Output,y=q(3).Token,_=q(4),C=q(5).Options,x=q(7).Tokenizer,j=q(7).line_starters,M=q(7).positionable_operators,H=q(7).TOKEN;function R(B,$){return $.indexOf(B)!==-1}function P(B){return B.replace(/^\s+/g,"")}function X(B){for(var $={},ae=0;ae<B.length;ae++)$[B[ae].replace(/-/g,"_")]=B[ae];return $}function fe(B,$){return B&&B.type===H.RESERVED&&B.text===$}function _e(B,$){return B&&B.type===H.RESERVED&&R(B.text,$)}var we=["case","return","do","if","throw","else","await","break","continue","async"],ie=["before-newline","after-newline","preserve-newline"],ye=X(ie),Pe=[ye.before_newline,ye.preserve_newline],ue={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Me(B,$){$.multiline_frame||$.mode===ue.ForInitializer||$.mode===ue.Conditional||B.remove_indent($.start_line_index)}function Z(B){B=B.replace(_.allLineBreaks,`
`);for(var $=[],ae=B.indexOf(`
`);ae!==-1;)$.push(B.substring(0,ae)),B=B.substring(ae+1),ae=B.indexOf(`
`);return B.length&&$.push(B),$}function I(B){return B===ue.ArrayLiteral}function G(B){return R(B,[ue.Expression,ue.ForInitializer,ue.Conditional])}function z(B,$){for(var ae=0;ae<B.length;ae++){var $e=B[ae].trim();if($e.charAt(0)!==$)return!1}return!0}function se(B,$){for(var ae=0,$e=B.length,qe;ae<$e;ae++)if(qe=B[ae],qe&&qe.indexOf($)!==0)return!1;return!0}function re(B,$){$=$||{},this._source_text=B||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new C($)}re.prototype.create_flags=function(B,$){var ae=0;B&&(ae=B.indentation_level,!this._output.just_added_newline()&&B.line_indent_level>ae&&(ae=B.line_indent_level));var $e={mode:$,parent:B,last_token:B?B.last_token:new y(H.START_BLOCK,""),last_word:B?B.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ae,alignment:0,line_indent_level:B?B.line_indent_level:ae,start_line_index:this._output.get_line_number(),ternary_depth:0};return $e},re.prototype._reset=function(B){var $=B.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new D(this._options,$),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ue.BlockStatement);var ae=new x(B,this._options);return this._tokens=ae.tokenize(),B},re.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var B,$=this._reset(this._source_text),ae=this._options.eol;this._options.eol==="auto"&&(ae=`
`,$&&_.lineBreak.test($||"")&&(ae=$.match(_.lineBreak)[0]));for(var $e=this._tokens.next();$e;)this.handle_token($e),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$e,$e=this._tokens.next();return B=this._output.get_code(ae),B},re.prototype.handle_token=function(B,$){B.type===H.START_EXPR?this.handle_start_expr(B):B.type===H.END_EXPR?this.handle_end_expr(B):B.type===H.START_BLOCK?this.handle_start_block(B):B.type===H.END_BLOCK?this.handle_end_block(B):B.type===H.WORD?this.handle_word(B):B.type===H.RESERVED?this.handle_word(B):B.type===H.SEMICOLON?this.handle_semicolon(B):B.type===H.STRING?this.handle_string(B):B.type===H.EQUALS?this.handle_equals(B):B.type===H.OPERATOR?this.handle_operator(B):B.type===H.COMMA?this.handle_comma(B):B.type===H.BLOCK_COMMENT?this.handle_block_comment(B,$):B.type===H.COMMENT?this.handle_comment(B,$):B.type===H.DOT?this.handle_dot(B):B.type===H.EOF?this.handle_eof(B):B.type===H.UNKNOWN?this.handle_unknown(B,$):this.handle_unknown(B,$)},re.prototype.handle_whitespace_and_comments=function(B,$){var ae=B.newlines,$e=this._options.keep_array_indentation&&I(this._flags.mode);if(B.comments_before)for(var qe=B.comments_before.next();qe;)this.handle_whitespace_and_comments(qe,$),this.handle_token(qe,$),qe=B.comments_before.next();if($e)for(var Bt=0;Bt<ae;Bt+=1)this.print_newline(Bt>0,$);else if(this._options.max_preserve_newlines&&ae>this._options.max_preserve_newlines&&(ae=this._options.max_preserve_newlines),this._options.preserve_newlines&&ae>1){this.print_newline(!1,$);for(var pt=1;pt<ae;pt+=1)this.print_newline(!0,$)}};var w=["async","break","continue","return","throw","yield"];re.prototype.allow_wrap_or_preserved_newline=function(B,$){if($=$===void 0?!1:$,!this._output.just_added_newline()){var ae=this._options.preserve_newlines&&B.newlines||$,$e=R(this._flags.last_token.text,M)||R(B.text,M);if($e){var qe=R(this._flags.last_token.text,M)&&R(this._options.operator_position,Pe)||R(B.text,M);ae=ae&&qe}if(ae)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(_e(this._flags.last_token,w))return;this._output.set_wrap_point()}}},re.prototype.print_newline=function(B,$){if(!$&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ae=this._tokens.peek();this._flags.mode===ue.Statement&&!(this._flags.if_block&&fe(ae,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(B)&&(this._flags.multiline_frame=!0)},re.prototype.print_token_line_indentation=function(B){this._output.just_added_newline()&&(this._options.keep_array_indentation&&B.newlines&&(B.text==="["||I(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(B.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},re.prototype.print_token=function(B){if(this._output.raw){this._output.add_raw_token(B);return}if(this._options.comma_first&&B.previous&&B.previous.type===H.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var $=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push($),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(B),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(B),this._output.non_breaking_space=!0,this._output.add_token(B.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},re.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},re.prototype.set_mode=function(B){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,B),this._flags=this.create_flags(this._previous_flags,B),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},re.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ue.Statement&&Me(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},re.prototype.start_of_object_property=function(){return this._flags.parent.mode===ue.ObjectLiteral&&this._flags.mode===ue.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"]))},re.prototype.start_of_statement=function(B){var $=!1;return $=$||_e(this._flags.last_token,["var","let","const"])&&B.type===H.WORD,$=$||fe(this._flags.last_token,"do"),$=$||!(this._flags.parent.mode===ue.ObjectLiteral&&this._flags.mode===ue.Statement)&&_e(this._flags.last_token,w)&&!B.newlines,$=$||fe(this._flags.last_token,"else")&&!(fe(B,"if")&&!B.comments_before),$=$||this._flags.last_token.type===H.END_EXPR&&(this._previous_flags.mode===ue.ForInitializer||this._previous_flags.mode===ue.Conditional),$=$||this._flags.last_token.type===H.WORD&&this._flags.mode===ue.BlockStatement&&!this._flags.in_case&&!(B.text==="--"||B.text==="++")&&this._last_last_text!=="function"&&B.type!==H.WORD&&B.type!==H.RESERVED,$=$||this._flags.mode===ue.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"])),$?(this.set_mode(ue.Statement),this.indent(),this.handle_whitespace_and_comments(B,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(B,_e(B,["do","for","if","while"])),!0):!1},re.prototype.handle_start_expr=function(B){this.start_of_statement(B)||this.handle_whitespace_and_comments(B);var $=ue.Expression;if(B.text==="["){if(this._flags.last_token.type===H.WORD||this._flags.last_token.text===")"){_e(this._flags.last_token,j)&&(this._output.space_before_token=!0),this.print_token(B),this.set_mode($),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}$=ue.ArrayLiteral,I(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),R(this._flags.last_token.type,[H.START_EXPR,H.END_EXPR,H.WORD,H.OPERATOR,H.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===H.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,$=ue.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,$=ue.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&B.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,j)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(B);else if(this._flags.last_token.type===H.WORD){this._output.space_before_token=!1;var ae=this._tokens.peek(-3);if(this._options.space_after_named_function&&ae){var $e=this._tokens.peek(-4);_e(ae,["async","function"])||ae.text==="*"&&_e($e,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ue.ObjectLiteral?(ae.text==="{"||ae.text===","||ae.text==="*"&&($e.text==="{"||$e.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(B);(this._flags.last_token.type===H.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===ue.ObjectLiteral&&R(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===H.START_BLOCK?this.print_newline():(this._flags.last_token.type===H.END_EXPR||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===H.COMMA)&&this.allow_wrap_or_preserved_newline(B,B.newlines),this.print_token(B),this.set_mode($),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},re.prototype.handle_end_expr=function(B){for(;this._flags.mode===ue.Statement;)this.restore_mode();this.handle_whitespace_and_comments(B),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(B,B.text==="]"&&I(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===H.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(B),this.restore_mode(),Me(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ue.Conditional&&(this._previous_flags.mode=ue.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},re.prototype.handle_start_block=function(B){this.handle_whitespace_and_comments(B);var $=this._tokens.peek(),ae=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===H.END_EXPR?(this.set_mode(ue.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ue.BlockStatement):ae&&(R(ae.text,[":",","])&&R($.type,[H.STRING,H.WORD,H.RESERVED])||R($.text,["get","set","..."])&&R(ae.type,[H.WORD,H.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(ae.text,[":",","])?this.set_mode(ue.BlockStatement):this.set_mode(ue.ObjectLiteral):this._flags.last_token.type===H.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ue.BlockStatement):R(this._flags.last_token.type,[H.EQUALS,H.START_EXPR,H.COMMA,H.OPERATOR])||_e(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ue.ObjectLiteral):this.set_mode(ue.BlockStatement),this._flags.last_token&&_e(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var $e=!$.comments_before&&$.text==="}",qe=$e&&this._flags.last_word==="function"&&this._flags.last_token.type===H.END_EXPR;if(this._options.brace_preserve_inline){var Bt=0,pt=null;this._flags.inline_frame=!0;do if(Bt+=1,pt=this._tokens.peek(Bt-1),pt.newlines){this._flags.inline_frame=!1;break}while(pt.type!==H.EOF&&!(pt.type===H.END_BLOCK&&pt.opened===B))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&B.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==H.OPERATOR&&(qe||this._flags.last_token.type===H.EQUALS||_e(this._flags.last_token,we)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(I(this._previous_flags.mode)&&(this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.COMMA)&&((this._flags.last_token.type===H.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(B),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==H.OPERATOR&&this._flags.last_token.type!==H.START_EXPR&&(R(this._flags.last_token.type,[H.START_BLOCK,H.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(B),this.indent(),!$e&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},re.prototype.handle_end_block=function(B){for(this.handle_whitespace_and_comments(B);this._flags.mode===ue.Statement;)this.restore_mode();var $=this._flags.last_token.type===H.START_BLOCK;this._flags.inline_frame&&!$?this._output.space_before_token=!0:this._options.brace_style==="expand"?$||this.print_newline():$||(I(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(B)},re.prototype.handle_word=function(B){if(B.type===H.RESERVED){if(R(B.text,["set","get"])&&this._flags.mode!==ue.ObjectLiteral)B.type=H.WORD;else if(B.text==="import"&&R(this._tokens.peek().text,["(","."]))B.type=H.WORD;else if(R(B.text,["as","from"])&&!this._flags.import_block)B.type=H.WORD;else if(this._flags.mode===ue.ObjectLiteral){var $=this._tokens.peek();$.text===":"&&(B.type=H.WORD)}}if(this.start_of_statement(B)?_e(this._flags.last_token,["var","let","const"])&&B.type===H.WORD&&(this._flags.declaration_statement=!0):B.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==H.EQUALS&&(this._options.preserve_newlines||!_e(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(B),this.print_newline()):this.handle_whitespace_and_comments(B),this._flags.do_block&&!this._flags.do_while)if(fe(B,"while")){this._output.space_before_token=!0,this.print_token(B),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&fe(B,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ue.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&_e(B,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(B),this._flags.in_case=!0;return}if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ue.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(B),fe(B,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===H.OPERATOR))&&!this._output.just_added_blankline()&&!B.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD?_e(this._flags.last_token,["get","set","new","export"])||_e(this._flags.last_token,w)?this._output.space_before_token=!0:fe(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===H.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||I(this._flags.mode))||this.print_newline(),this.print_token(B),this._flags.last_word=B.text;return}var ae="NONE";if(this._flags.last_token.type===H.END_BLOCK?this._previous_flags.inline_frame?ae="SPACE":_e(B,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&B.newlines?ae="NEWLINE":(ae="SPACE",this._output.space_before_token=!0):ae="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&this._flags.mode===ue.BlockStatement?ae="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&G(this._flags.mode)?ae="SPACE":this._flags.last_token.type===H.STRING?ae="NEWLINE":this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===ue.ObjectLiteral&&R(this._last_last_text,["{",","]))?ae="SPACE":this._flags.last_token.type===H.START_BLOCK?this._flags.inline_frame?ae="SPACE":ae="NEWLINE":this._flags.last_token.type===H.END_EXPR&&(this._output.space_before_token=!0,ae="NEWLINE"),_e(B,j)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ae="SPACE":ae="NEWLINE"),_e(B,["else","catch","finally"]))if((!(this._flags.last_token.type===H.END_BLOCK&&this._previous_flags.mode===ue.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&B.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $e=this._output.current_line;$e.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ae==="NEWLINE"?_e(this._flags.last_token,we)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&_e(B,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==H.END_EXPR?(this._flags.last_token.type!==H.START_EXPR||!_e(B,["var","let","const"]))&&this._flags.last_token.text!==":"&&(fe(B,"if")&&fe(B.previous,"else")?this._output.space_before_token=!0:this.print_newline()):_e(B,j)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&I(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ae==="SPACE"&&(this._output.space_before_token=!0);B.previous&&(B.previous.type===H.WORD||B.previous.type===H.RESERVED)&&(this._output.space_before_token=!0),this.print_token(B),this._flags.last_word=B.text,B.type===H.RESERVED&&(B.text==="do"?this._flags.do_block=!0:B.text==="if"?this._flags.if_block=!0:B.text==="import"?this._flags.import_block=!0:this._flags.import_block&&fe(B,"from")&&(this._flags.import_block=!1))},re.prototype.handle_semicolon=function(B){this.start_of_statement(B)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(B);for(var $=this._tokens.peek();this._flags.mode===ue.Statement&&!(this._flags.if_block&&fe($,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(B)},re.prototype.handle_string=function(B){B.text.startsWith("`")&&B.newlines===0&&B.whitespace_before===""&&(B.previous.text===")"||this._flags.last_token.type===H.WORD)||(this.start_of_statement(B)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(B),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(B):B.text.startsWith("`")&&this._flags.last_token.type===H.END_EXPR&&(B.previous.text==="]"||B.previous.text===")")&&B.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(B)},re.prototype.handle_equals=function(B){this.start_of_statement(B)||this.handle_whitespace_and_comments(B),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(B),this._output.space_before_token=!0},re.prototype.handle_comma=function(B){this.handle_whitespace_and_comments(B,!0),this.print_token(B),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(B)):this._flags.mode===ue.ObjectLiteral||this._flags.mode===ue.Statement&&this._flags.parent.mode===ue.ObjectLiteral?(this._flags.mode===ue.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(B)},re.prototype.handle_operator=function(B){var $=B.text==="*"&&(_e(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[H.START_BLOCK,H.COMMA,H.END_BLOCK,H.SEMICOLON])),ae=R(B.text,["-","+"])&&(R(this._flags.last_token.type,[H.START_BLOCK,H.START_EXPR,H.EQUALS,H.OPERATOR])||R(this._flags.last_token.text,j)||this._flags.last_token.text===",");if(!this.start_of_statement(B)){var $e=!$;this.handle_whitespace_and_comments(B,$e)}if(B.text==="*"&&this._flags.last_token.type===H.DOT){this.print_token(B);return}if(B.text==="::"){this.print_token(B);return}if(R(B.text,["-","+"])&&this.start_of_object_property()){this.print_token(B);return}if(this._flags.last_token.type===H.OPERATOR&&R(this._options.operator_position,Pe)&&this.allow_wrap_or_preserved_newline(B),B.text===":"&&this._flags.in_case){this.print_token(B),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==H.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var qe=!0,Bt=!0,pt=!1;if(B.text===":"?this._flags.ternary_depth===0?qe=!1:(this._flags.ternary_depth-=1,pt=!0):B.text==="?"&&(this._flags.ternary_depth+=1),!ae&&!$&&this._options.preserve_newlines&&R(B.text,M)){var Qt=B.text===":",xt=Qt&&pt,ht=Qt&&!pt;switch(this._options.operator_position){case ye.before_newline:this._output.space_before_token=!ht,this.print_token(B),(!Qt||xt)&&this.allow_wrap_or_preserved_newline(B),this._output.space_before_token=!0;return;case ye.after_newline:this._output.space_before_token=!0,!Qt||xt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(B):this._output.space_before_token=!1,this.print_token(B),this._output.space_before_token=!0;return;case ye.preserve_newline:ht||this.allow_wrap_or_preserved_newline(B),qe=!(this._output.just_added_newline()||ht),this._output.space_before_token=qe,this.print_token(B),this._output.space_before_token=!0;return}}if($){this.allow_wrap_or_preserved_newline(B),qe=!1;var De=this._tokens.peek();Bt=De&&R(De.type,[H.WORD,H.RESERVED])}else if(B.text==="...")this.allow_wrap_or_preserved_newline(B),qe=this._flags.last_token.type===H.START_BLOCK,Bt=!1;else if(R(B.text,["--","++","!","~"])||ae){if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR)&&this.allow_wrap_or_preserved_newline(B),qe=!1,Bt=!1,B.newlines&&(B.text==="--"||B.text==="++"||B.text==="~")){var it=_e(this._flags.last_token,we)&&B.newlines;it&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(it,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(qe=!0),this._flags.last_token.type===H.RESERVED?qe=!0:this._flags.last_token.type===H.END_EXPR?qe=!(this._flags.last_token.text==="]"&&(B.text==="--"||B.text==="++")):this._flags.last_token.type===H.OPERATOR&&(qe=R(B.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(B.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(Bt=!0)),(this._flags.mode===ue.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ue.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||qe,this.print_token(B),this._output.space_before_token=Bt},re.prototype.handle_block_comment=function(B,$){if(this._output.raw){this._output.add_raw_token(B),B.directives&&B.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(B.directives){this.print_newline(!1,$),this.print_token(B),B.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!_.newline.test(B.text)&&!B.newlines){this._output.space_before_token=!0,this.print_token(B),this._output.space_before_token=!0;return}else this.print_block_commment(B,$)},re.prototype.print_block_commment=function(B,$){var ae=Z(B.text),$e,qe=!1,Bt=!1,pt=B.whitespace_before,Qt=pt.length;if(this.print_newline(!1,$),this.print_token_line_indentation(B),this._output.add_token(ae[0]),this.print_newline(!1,$),ae.length>1){for(ae=ae.slice(1),qe=z(ae,"*"),Bt=se(ae,pt),qe&&(this._flags.alignment=1),$e=0;$e<ae.length;$e++)qe?(this.print_token_line_indentation(B),this._output.add_token(P(ae[$e]))):Bt&&ae[$e]?(this.print_token_line_indentation(B),this._output.add_token(ae[$e].substring(Qt))):(this._output.current_line.set_indent(-1),this._output.add_token(ae[$e])),this.print_newline(!1,$);this._flags.alignment=0}},re.prototype.handle_comment=function(B,$){B.newlines?this.print_newline(!1,$):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(B),this.print_newline(!1,$)},re.prototype.handle_dot=function(B){this.start_of_statement(B)||this.handle_whitespace_and_comments(B,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),_e(this._flags.last_token,we)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(B,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(B)},re.prototype.handle_unknown=function(B,$){this.print_token(B),B.text[B.text.length-1]===`
`&&this.print_newline(!1,$)},re.prototype.handle_eof=function(B){for(;this._flags.mode===ue.Statement;)this.restore_mode();this.handle_whitespace_and_comments(B)},O.exports.Beautifier=re},function(O){function u(y){this.__parent=y,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}u.prototype.clone_empty=function(){var y=new u(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},u.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},u.prototype.has_match=function(y){for(var _=this.__items.length-1;_>=0;_--)if(this.__items[_].match(y))return!0;return!1},u.prototype.set_indent=function(y,_){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=_||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},u.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},u.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(y){this.__items.push(y);var _=y.lastIndexOf(`
`);_!==-1?this.__character_count=y.length-_:this.__character_count+=y.length},u.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function q(y,_){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),_=_||"",y.indent_level>0&&(_=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=_,this.__base_string_length=_.length}q.prototype.get_indent_size=function(y,_){var C=this.__base_string_length;return _=_||0,y<0&&(C=0),C+=y*this.__indent_size,C+=_,C},q.prototype.get_indent_string=function(y,_){var C=this.__base_string;return _=_||0,y<0&&(y=0,C=""),_+=y*this.__indent_size,this.__ensure_cache(_),C+=this.__cache[_],C},q.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},q.prototype.__add_column=function(){var y=this.__cache.length,_=0,C="";this.__indent_size&&y>=this.__indent_size&&(_=Math.floor(y/this.__indent_size),y-=_*this.__indent_size,C=new Array(_+1).join(this.__indent_string)),y&&(C+=new Array(y+1).join(" ")),this.__cache.push(C)};function D(y,_){this.__indent_cache=new q(y,_),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(y,_){return this.__indent_cache.get_indent_string(y,_)},D.prototype.get_indent_size=function(y,_){return this.__indent_cache.get_indent_size(y,_)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(y){this.trim(!0);var _=this.current_line.pop();_&&(_[_.length-1]===`
`&&(_=_.replace(/\n+$/g,"")),this.current_line.push(_)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return y!==`
`&&(C=C.replace(/[\n]/g,y)),C},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(y,_){return y=y||0,_=_||0,this.next_line.set_indent(y,_),this.__lines.length>1?(this.current_line.set_indent(y,_),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(y){for(var _=0;_<y.newlines;_++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},D.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},D.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},D.prototype.remove_indent=function(y){for(var _=this.__lines.length;y<_;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},D.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(y,_){for(var C=this.__lines.length-2;C>=0;){var x=this.__lines[C];if(x.is_empty())break;if(x.item(0).indexOf(y)!==0&&x.item(-1)!==_){this.__lines.splice(C+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},O.exports.Output=D},function(O){function u(q,D,y,_){this.type=q,this.text=D,this.comments_before=null,this.newlines=y||0,this.whitespace_before=_||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}O.exports.Token=u},function(O,u){var q="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",D="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",y="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",_="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",C="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",x="(?:"+C+"|["+q+y+"])",j="(?:"+C+"|["+D+y+_+"])*";u.identifier=new RegExp(x+j,"g"),u.identifierStart=new RegExp(x),u.identifierMatch=new RegExp("(?:"+C+"|["+D+y+_+"])+");var M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;u.newline=/[\n\r\u2028\u2029]/,u.lineBreak=new RegExp(`\r
|`+u.newline.source),u.allLineBreaks=new RegExp(u.lineBreak.source,"g")},function(O,u,q){var D=q(6).Options,y=["before-newline","after-newline","preserve-newline"];function _(C){D.call(this,C,"js");var x=this.raw_options.brace_style||null;x==="expand-strict"?this.raw_options.brace_style="expand":x==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var j=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var M=0;M<j.length;M++)j[M]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=j[M];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",y),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}_.prototype=new D,O.exports.Options=_},function(O){function u(y,_){this.raw_options=q(y,_),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}u.prototype._get_array=function(y,_){var C=this.raw_options[y],x=_||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(x=C.concat()):typeof C=="string"&&(x=C.split(/[^a-zA-Z0-9_\/\-]+/)),x},u.prototype._get_boolean=function(y,_){var C=this.raw_options[y],x=C===void 0?!!_:!!C;return x},u.prototype._get_characters=function(y,_){var C=this.raw_options[y],x=_||"";return typeof C=="string"&&(x=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),x},u.prototype._get_number=function(y,_){var C=this.raw_options[y];_=parseInt(_,10),isNaN(_)&&(_=0);var x=parseInt(C,10);return isNaN(x)&&(x=_),x},u.prototype._get_selection=function(y,_,C){var x=this._get_selection_list(y,_,C);if(x.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
`+_+`
You passed in: '`+this.raw_options[y]+"'");return x[0]},u.prototype._get_selection_list=function(y,_,C){if(!_||_.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[_[0]],!this._is_valid_selection(C,_))throw new Error("Invalid Default Value!");var x=this._get_array(y,C);if(!this._is_valid_selection(x,_))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
`+_+`
You passed in: '`+this.raw_options[y]+"'");return x},u.prototype._is_valid_selection=function(y,_){return y.length&&_.length&&!y.some(function(C){return _.indexOf(C)===-1})};function q(y,_){var C={};y=D(y);var x;for(x in y)x!==_&&(C[x]=y[x]);if(_&&y[_])for(x in y[_])C[x]=y[_][x];return C}function D(y){var _={},C;for(C in y){var x=C.replace(/-/g,"_");_[x]=y[C]}return _}O.exports.Options=u,O.exports.normalizeOpts=D,O.exports.mergeOpts=q},function(O,u,q){var D=q(8).InputScanner,y=q(9).Tokenizer,_=q(9).TOKEN,C=q(13).Directives,x=q(4),j=q(12).Pattern,M=q(14).TemplatablePattern;function H(z,se){return se.indexOf(z)!==-1}var R={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:_.START,RAW:_.RAW,EOF:_.EOF},P=new C(/\/\*/,/\*\//),X=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,fe=/[0-9]/,_e=/[^\d\.]/,we=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ie=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ie=ie.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ie="\\?\\.(?!\\d) "+ie,ie=ie.replace(/ /g,"|");var ye=new RegExp(ie),Pe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ue=Pe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Me=new RegExp("^(?:"+ue.join("|")+")$"),Z,I=function(z,se){y.call(this,z,se),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var re=new j(this._input),w=new M(this._input).read_options(this._options);this.__patterns={template:w,identifier:w.starting_with(x.identifier).matching(x.identifierMatch),number:re.matching(X),punct:re.matching(ye),comment:re.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:re.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:re.matching(/<!--/),html_comment_end:re.matching(/-->/),include:re.starting_with(/#include/).until_after(x.lineBreak),shebang:re.starting_with(/#!/).until_after(x.lineBreak),xml:re.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:w.until(/['\\\n\r\u2028\u2029]/),double_quote:w.until(/["\\\n\r\u2028\u2029]/),template_text:w.until(/[`\\$]/),template_expression:w.until(/[`}\\]/)}};I.prototype=new y,I.prototype._is_comment=function(z){return z.type===R.COMMENT||z.type===R.BLOCK_COMMENT||z.type===R.UNKNOWN},I.prototype._is_opening=function(z){return z.type===R.START_BLOCK||z.type===R.START_EXPR},I.prototype._is_closing=function(z,se){return(z.type===R.END_BLOCK||z.type===R.END_EXPR)&&se&&(z.text==="]"&&se.text==="["||z.text===")"&&se.text==="("||z.text==="}"&&se.text==="{")},I.prototype._reset=function(){Z=!1},I.prototype._get_next_token=function(z,se){var re=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(R.EOF,""):(re=re||this._read_non_javascript(w),re=re||this._read_string(w),re=re||this._read_pair(w,this._input.peek(1)),re=re||this._read_word(z),re=re||this._read_singles(w),re=re||this._read_comment(w),re=re||this._read_regexp(w,z),re=re||this._read_xml(w,z),re=re||this._read_punctuation(),re=re||this._create_token(R.UNKNOWN,this._input.next()),re)},I.prototype._read_word=function(z){var se;if(se=this.__patterns.identifier.read(),se!=="")return se=se.replace(x.allLineBreaks,`
`),!(z.type===R.DOT||z.type===R.RESERVED&&(z.text==="set"||z.text==="get"))&&Me.test(se)?(se==="in"||se==="of")&&(z.type===R.WORD||z.type===R.STRING)?this._create_token(R.OPERATOR,se):this._create_token(R.RESERVED,se):this._create_token(R.WORD,se);if(se=this.__patterns.number.read(),se!=="")return this._create_token(R.WORD,se)},I.prototype._read_singles=function(z){var se=null;return z==="("||z==="["?se=this._create_token(R.START_EXPR,z):z===")"||z==="]"?se=this._create_token(R.END_EXPR,z):z==="{"?se=this._create_token(R.START_BLOCK,z):z==="}"?se=this._create_token(R.END_BLOCK,z):z===";"?se=this._create_token(R.SEMICOLON,z):z==="."&&_e.test(this._input.peek(1))?se=this._create_token(R.DOT,z):z===","&&(se=this._create_token(R.COMMA,z)),se&&this._input.next(),se},I.prototype._read_pair=function(z,se){var re=null;return z==="#"&&se==="{"&&(re=this._create_token(R.START_BLOCK,z+se)),re&&(this._input.next(),this._input.next()),re},I.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(R.EQUALS,z):z==="?."?this._create_token(R.DOT,z):this._create_token(R.OPERATOR,z)},I.prototype._read_non_javascript=function(z){var se="";if(z==="#"){if(this._is_first_token()&&(se=this.__patterns.shebang.read(),se))return this._create_token(R.UNKNOWN,se.trim()+`
`);if(se=this.__patterns.include.read(),se)return this._create_token(R.UNKNOWN,se.trim()+`
`);z=this._input.next();var re="#";if(this._input.hasNext()&&this._input.testChar(fe)){do z=this._input.next(),re+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(re+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(re+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,re)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(se=this.__patterns.html_comment_start.read(),se){for(;this._input.hasNext()&&!this._input.testChar(x.newline);)se+=this._input.next();return Z=!0,this._create_token(R.COMMENT,se)}}else if(Z&&z==="-"&&(se=this.__patterns.html_comment_end.read(),se))return Z=!1,this._create_token(R.COMMENT,se);return null},I.prototype._read_comment=function(z){var se=null;if(z==="/"){var re="";if(this._input.peek(1)==="*"){re=this.__patterns.block_comment.read();var w=P.get_directives(re);w&&w.ignore==="start"&&(re+=P.readIgnored(this._input)),re=re.replace(x.allLineBreaks,`
`),se=this._create_token(R.BLOCK_COMMENT,re),se.directives=w}else this._input.peek(1)==="/"&&(re=this.__patterns.comment.read(),se=this._create_token(R.COMMENT,re))}return se},I.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var se=this._input.next();return this.has_char_escapes=!1,z==="`"?se+=this._read_string_recursive("`",!0,"${"):se+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(se=G(se)),this._input.peek()===z&&(se+=this._input.next()),se=se.replace(x.allLineBreaks,`
`),this._create_token(R.STRING,se)}return null},I.prototype._allow_regexp_or_xml=function(z){return z.type===R.RESERVED&&H(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===R.END_EXPR&&z.text===")"&&z.opened.previous.type===R.RESERVED&&H(z.opened.previous.text,["if","while","for"])||H(z.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},I.prototype._read_regexp=function(z,se){if(z==="/"&&this._allow_regexp_or_xml(se)){for(var re=this._input.next(),w=!1,B=!1;this._input.hasNext()&&(w||B||this._input.peek()!==z)&&!this._input.testChar(x.newline);)re+=this._input.peek(),w?w=!1:(w=this._input.peek()==="\\",this._input.peek()==="["?B=!0:this._input.peek()==="]"&&(B=!1)),this._input.next();return this._input.peek()===z&&(re+=this._input.next(),re+=this._input.read(x.identifier)),this._create_token(R.STRING,re)}return null},I.prototype._read_xml=function(z,se){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(se)){var re="",w=this.__patterns.xml.read_match();if(w){for(var B=w[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),$=B.indexOf("{")===0,ae=0;w;){var $e=!!w[1],qe=w[2],Bt=!!w[w.length-1]||qe.slice(0,8)==="![CDATA[";if(!Bt&&(qe===B||$&&qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&($e?--ae:++ae),re+=w[0],ae<=0)break;w=this.__patterns.xml.read_match()}return w||(re+=this._input.match(/[\s\S]*/g)[0]),re=re.replace(x.allLineBreaks,`
`),this._create_token(R.STRING,re)}}return null};function G(z){for(var se="",re=0,w=new D(z),B=null;w.hasNext();)if(B=w.match(/([\s]|[^\\]|\\\\)+/g),B&&(se+=B[0]),w.peek()==="\\"){if(w.next(),w.peek()==="x")B=w.match(/x([0-9A-Fa-f]{2})/g);else if(w.peek()==="u")B=w.match(/u([0-9A-Fa-f]{4})/g),B||(B=w.match(/u\{([0-9A-Fa-f]+)\}/g));else{se+="\\",w.hasNext()&&(se+=w.next());continue}if(!B||(re=parseInt(B[1],16),re>126&&re<=255&&B[0].indexOf("x")===0))return z;re>=0&&re<32||re>1114111?se+="\\"+B[0]:re===34||re===39||re===92?se+="\\"+String.fromCharCode(re):se+=String.fromCharCode(re)}return se}I.prototype._read_string_recursive=function(z,se,re){var w,B;z==="'"?B=this.__patterns.single_quote:z==='"'?B=this.__patterns.double_quote:z==="`"?B=this.__patterns.template_text:z==="}"&&(B=this.__patterns.template_expression);for(var $=B.read(),ae="";this._input.hasNext();){if(ae=this._input.next(),ae===z||!se&&x.newline.test(ae)){this._input.back();break}else ae==="\\"&&this._input.hasNext()?(w=this._input.peek(),w==="x"||w==="u"?this.has_char_escapes=!0:w==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ae+=this._input.next()):re&&(re==="${"&&ae==="$"&&this._input.peek()==="{"&&(ae+=this._input.next()),re===ae&&(z==="`"?ae+=this._read_string_recursive("}",se,"`"):ae+=this._read_string_recursive("`",se,"${"),this._input.hasNext()&&(ae+=this._input.next())));ae+=B.read(),$+=ae}return $},O.exports.Tokenizer=I,O.exports.TOKEN=R,O.exports.positionable_operators=we.slice(),O.exports.line_starters=Pe.slice()},function(O){var u=RegExp.prototype.hasOwnProperty("sticky");function q(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}q.prototype.restart=function(){this.__position=0},q.prototype.back=function(){this.__position>0&&(this.__position-=1)},q.prototype.hasNext=function(){return this.__position<this.__input_length},q.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},q.prototype.peek=function(D){var y=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(y=this.__input.charAt(D)),y},q.prototype.__match=function(D,y){D.lastIndex=y;var _=D.exec(this.__input);return _&&!(u&&D.sticky)&&_.index!==y&&(_=null),_},q.prototype.test=function(D,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(D,y):!1},q.prototype.testChar=function(D,y){var _=this.peek(y);return D.lastIndex=0,_!==null&&D.test(_)},q.prototype.match=function(D){var y=this.__match(D,this.__position);return y?this.__position+=y[0].length:y=null,y},q.prototype.read=function(D,y,_){var C="",x;return D&&(x=this.match(D),x&&(C+=x[0])),y&&(x||!D)&&(C+=this.readUntil(y,_)),C},q.prototype.readUntil=function(D,y){var _="",C=this.__position;D.lastIndex=this.__position;var x=D.exec(this.__input);return x?(C=x.index,y&&(C+=x[0].length)):C=this.__input_length,_=this.__input.substring(this.__position,C),this.__position=C,_},q.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},q.prototype.get_regexp=function(D,y){var _=null,C="g";return y&&u&&(C="y"),typeof D=="string"&&D!==""?_=new RegExp(D,C):D&&(_=new RegExp(D.source,C)),_},q.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},q.prototype.peekUntilAfter=function(D){var y=this.__position,_=this.readUntilAfter(D);return this.__position=y,_},q.prototype.lookBack=function(D){var y=this.__position-1;return y>=D.length&&this.__input.substring(y-D.length,y).toLowerCase()===D},O.exports.InputScanner=q},function(O,u,q){var D=q(8).InputScanner,y=q(3).Token,_=q(10).TokenStream,C=q(11).WhitespacePattern,x={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},j=function(M,H){this._input=new D(M),this._options=H||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new C(this._input)};j.prototype.tokenize=function(){this._input.restart(),this.__tokens=new _,this._reset();for(var M,H=new y(x.START,""),R=null,P=[],X=new _;H.type!==x.EOF;){for(M=this._get_next_token(H,R);this._is_comment(M);)X.add(M),M=this._get_next_token(H,R);X.isEmpty()||(M.comments_before=X,X=new _),M.parent=R,this._is_opening(M)?(P.push(R),R=M):R&&this._is_closing(M,R)&&(M.opened=R,R.closed=M,R=P.pop(),M.parent=R),M.previous=H,H.next=M,this.__tokens.add(M),H=M}return this.__tokens},j.prototype._is_first_token=function(){return this.__tokens.isEmpty()},j.prototype._reset=function(){},j.prototype._get_next_token=function(M,H){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(x.RAW,R):this._create_token(x.EOF,"")},j.prototype._is_comment=function(M){return!1},j.prototype._is_opening=function(M){return!1},j.prototype._is_closing=function(M,H){return!1},j.prototype._create_token=function(M,H){var R=new y(M,H,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},j.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},O.exports.Tokenizer=j,O.exports.TOKEN=x},function(O){function u(q){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=q}u.prototype.restart=function(){this.__position=0},u.prototype.isEmpty=function(){return this.__tokens_length===0},u.prototype.hasNext=function(){return this.__position<this.__tokens_length},u.prototype.next=function(){var q=null;return this.hasNext()&&(q=this.__tokens[this.__position],this.__position+=1),q},u.prototype.peek=function(q){var D=null;return q=q||0,q+=this.__position,q>=0&&q<this.__tokens_length&&(D=this.__tokens[q]),D},u.prototype.add=function(q){this.__parent_token&&(q.parent=this.__parent_token),this.__tokens.push(q),this.__tokens_length+=1},O.exports.TokenStream=u},function(O,u,q){var D=q(12).Pattern;function y(_,C){D.call(this,_,C),C?this._line_regexp=this._input.get_regexp(C._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}y.prototype=new D,y.prototype.__set_whitespace_patterns=function(_,C){_+="\\t ",C+="\\n\\r",this._match_pattern=this._input.get_regexp("["+_+C+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+C+"]")},y.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var _=this._input.read(this._match_pattern);if(_===" ")this.whitespace_before_token=" ";else if(_){var C=this.__split(this._newline_regexp,_);this.newline_count=C.length-1,this.whitespace_before_token=C[this.newline_count]}return _},y.prototype.matching=function(_,C){var x=this._create();return x.__set_whitespace_patterns(_,C),x._update(),x},y.prototype._create=function(){return new y(this._input,this)},y.prototype.__split=function(_,C){_.lastIndex=0;for(var x=0,j=[],M=_.exec(C);M;)j.push(C.substring(x,M.index)),x=M.index+M[0].length,M=_.exec(C);return x<C.length?j.push(C.substring(x,C.length)):j.push(""),j},O.exports.WhitespacePattern=y},function(O){function u(q,D){this._input=q,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,D&&(this._starting_pattern=this._input.get_regexp(D._starting_pattern,!0),this._match_pattern=this._input.get_regexp(D._match_pattern,!0),this._until_pattern=this._input.get_regexp(D._until_pattern),this._until_after=D._until_after)}u.prototype.read=function(){var q=this._input.read(this._starting_pattern);return(!this._starting_pattern||q)&&(q+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),q},u.prototype.read_match=function(){return this._input.match(this._match_pattern)},u.prototype.until_after=function(q){var D=this._create();return D._until_after=!0,D._until_pattern=this._input.get_regexp(q),D._update(),D},u.prototype.until=function(q){var D=this._create();return D._until_after=!1,D._until_pattern=this._input.get_regexp(q),D._update(),D},u.prototype.starting_with=function(q){var D=this._create();return D._starting_pattern=this._input.get_regexp(q,!0),D._update(),D},u.prototype.matching=function(q){var D=this._create();return D._match_pattern=this._input.get_regexp(q,!0),D._update(),D},u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){},O.exports.Pattern=u},function(O){function u(q,D){q=typeof q=="string"?q:q.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(q+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(q+/\sbeautify\signore:end\s/.source+D,"g")}u.prototype.get_directives=function(q){if(!q.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(q);y;)D[y[1]]=y[2],y=this.__directive_pattern.exec(q);return D},u.prototype.readIgnored=function(q){return q.readUntilAfter(this.__directives_end_ignore_pattern)},O.exports.Directives=u},function(O,u,q){var D=q(12).Pattern,y={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function _(C,x){D.call(this,C,x),this.__template_pattern=null,this._disabled=Object.assign({},y),this._excluded=Object.assign({},y),x&&(this.__template_pattern=this._input.get_regexp(x.__template_pattern),this._excluded=Object.assign(this._excluded,x._excluded),this._disabled=Object.assign(this._disabled,x._disabled));var j=new D(C);this.__patterns={handlebars_comment:j.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:j.starting_with(/{{{/).until_after(/}}}/),handlebars:j.starting_with(/{{/).until_after(/}}/),php:j.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:j.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:j.starting_with(/{%/).until_after(/%}/),django_value:j.starting_with(/{{/).until_after(/}}/),django_comment:j.starting_with(/{#/).until_after(/#}/),smarty:j.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:j.starting_with(/{\*/).until_after(/\*}/),smarty_literal:j.starting_with(/{literal}/).until_after(/{\/literal}/)}}_.prototype=new D,_.prototype._create=function(){return new _(this._input,this)},_.prototype._update=function(){this.__set_templated_pattern()},_.prototype.disable=function(C){var x=this._create();return x._disabled[C]=!0,x._update(),x},_.prototype.read_options=function(C){var x=this._create();for(var j in y)x._disabled[j]=C.templating.indexOf(j)===-1;return x._update(),x},_.prototype.exclude=function(C){var x=this._create();return x._excluded[C]=!0,x._update(),x},_.prototype.read=function(){var C="";this._match_pattern?C=this._input.read(this._starting_pattern):C=this._input.read(this._starting_pattern,this.__template_pattern);for(var x=this._read_template();x;)this._match_pattern?x+=this._input.read(this._match_pattern):x+=this._input.readUntil(this.__template_pattern),C+=x,x=this._read_template();return this._until_after&&(C+=this._input.readUntilAfter(this._until_pattern)),C},_.prototype.__set_templated_pattern=function(){var C=[];this._disabled.php||C.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||C.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(C.push(this.__patterns.django._starting_pattern.source),C.push(this.__patterns.django_value._starting_pattern.source),C.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||C.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&C.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+C.join("|")+")")},_.prototype._read_template=function(){var C="",x=this._input.peek();if(x==="<"){var j=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&j==="?"&&(C=C||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&j==="%"&&(C=C||this.__patterns.erb.read())}else x==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(C=C||this.__patterns.handlebars_comment.read(),C=C||this.__patterns.handlebars_unescaped.read(),C=C||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(C=C||this.__patterns.django_value.read()),this._excluded.django||(C=C||this.__patterns.django_comment.read(),C=C||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(C=C||this.__patterns.smarty_comment.read(),C=C||this.__patterns.smarty_literal.read(),C=C||this.__patterns.smarty.read()));return C},O.exports.TemplatablePattern=_}],W={};function m(O){var u=W[O];if(u!==void 0)return u.exports;var q=W[O]={exports:{}};return he[O](q,q.exports,m),q.exports}var ge=m(0);me=ge})();var Se=me;K=[],V=function(){return{js_beautify:Se}}.apply(vt,K),V!==void 0&&(dr.exports=V)})()},32834:function(dr){(function(vt,K){dr.exports=K()})(this,function(){"use strict";function vt(Ue,be){for(var Ee=0;Ee<be.length;Ee++){var Y=be[Ee];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(Ue,Y.key,Y)}}function K(Ue,be,Ee){return be&&vt(Ue.prototype,be),Ee&&vt(Ue,Ee),Ue}function V(Ue,be){if(Ue){if(typeof Ue=="string")return me(Ue,be);var Ee=Object.prototype.toString.call(Ue).slice(8,-1);if(Ee==="Object"&&Ue.constructor&&(Ee=Ue.constructor.name),Ee==="Map"||Ee==="Set")return Array.from(Ue);if(Ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return me(Ue,be)}}function me(Ue,be){(be==null||be>Ue.length)&&(be=Ue.length);for(var Ee=0,Y=new Array(be);Ee<be;Ee++)Y[Ee]=Ue[Ee];return Y}function Se(Ue,be){var Ee=typeof Symbol!="undefined"&&Ue[Symbol.iterator]||Ue["@@iterator"];if(Ee)return(Ee=Ee.call(Ue)).next.bind(Ee);if(Array.isArray(Ue)||(Ee=V(Ue))||be&&Ue&&typeof Ue.length=="number"){Ee&&(Ue=Ee);var Y=0;return function(){return Y>=Ue.length?{done:!0}:{done:!1,value:Ue[Y++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var he={exports:{}};function W(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function m(Ue){he.exports.defaults=Ue}he.exports={defaults:W(),getDefaults:W,changeDefaults:m};var ge=/[&<>"']/,O=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,q=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y=function(be){return D[be]};function _(Ue,be){if(be){if(ge.test(Ue))return Ue.replace(O,y)}else if(u.test(Ue))return Ue.replace(q,y);return Ue}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function x(Ue){return Ue.replace(C,function(be,Ee){return Ee=Ee.toLowerCase(),Ee==="colon"?":":Ee.charAt(0)==="#"?Ee.charAt(1)==="x"?String.fromCharCode(parseInt(Ee.substring(2),16)):String.fromCharCode(+Ee.substring(1)):""})}var j=/(^|[^\[])\^/g;function M(Ue,be){Ue=Ue.source||Ue,be=be||"";var Ee={replace:function(ee,oe){return oe=oe.source||oe,oe=oe.replace(j,"$1"),Ue=Ue.replace(ee,oe),Ee},getRegex:function(){return new RegExp(Ue,be)}};return Ee}var H=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(Ue,be,Ee){if(Ue){var Y;try{Y=decodeURIComponent(x(Ee)).replace(H,"").toLowerCase()}catch(ee){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}be&&!R.test(Ee)&&(Ee=ie(be,Ee));try{Ee=encodeURI(Ee).replace(/%25/g,"%")}catch(ee){return null}return Ee}var X={},fe=/^[^:]+:\/*[^/]*$/,_e=/^([^:]+:)[\s\S]*$/,we=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ie(Ue,be){X[" "+Ue]||(fe.test(Ue)?X[" "+Ue]=Ue+"/":X[" "+Ue]=Me(Ue,"/",!0)),Ue=X[" "+Ue];var Ee=Ue.indexOf(":")===-1;return be.substring(0,2)==="//"?Ee?be:Ue.replace(_e,"$1")+be:be.charAt(0)==="/"?Ee?be:Ue.replace(we,"$1")+be:Ue+be}var ye={exec:function(){}};function Pe(Ue){for(var be=1,Ee,Y;be<arguments.length;be++){Ee=arguments[be];for(Y in Ee)Object.prototype.hasOwnProperty.call(Ee,Y)&&(Ue[Y]=Ee[Y])}return Ue}function ue(Ue,be){var Ee=Ue.replace(/\|/g,function(oe,pe,Ce){for(var ft=!1,Et=pe;--Et>=0&&Ce[Et]==="\\";)ft=!ft;return ft?"|":" |"}),Y=Ee.split(/ \|/),ee=0;if(Y.length>be)Y.splice(be);else for(;Y.length<be;)Y.push("");for(;ee<Y.length;ee++)Y[ee]=Y[ee].trim().replace(/\\\|/g,"|");return Y}function Me(Ue,be,Ee){var Y=Ue.length;if(Y===0)return"";for(var ee=0;ee<Y;){var oe=Ue.charAt(Y-ee-1);if(oe===be&&!Ee)ee++;else if(oe!==be&&Ee)ee++;else break}return Ue.substr(0,Y-ee)}function Z(Ue,be){if(Ue.indexOf(be[1])===-1)return-1;for(var Ee=Ue.length,Y=0,ee=0;ee<Ee;ee++)if(Ue[ee]==="\\")ee++;else if(Ue[ee]===be[0])Y++;else if(Ue[ee]===be[1]&&(Y--,Y<0))return ee;return-1}function I(Ue){Ue&&Ue.sanitize&&!Ue.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function G(Ue,be){if(be<1)return"";for(var Ee="";be>1;)be&1&&(Ee+=Ue),be>>=1,Ue+=Ue;return Ee+Ue}var z={escape:_,unescape:x,edit:M,cleanUrl:P,resolveUrl:ie,noopTest:ye,merge:Pe,splitCells:ue,rtrim:Me,findClosingBracket:Z,checkSanitizeDeprecation:I,repeatString:G},se=he.exports.defaults,re=z.rtrim,w=z.splitCells,B=z.escape,$=z.findClosingBracket;function ae(Ue,be,Ee){var Y=be.href,ee=be.title?B(be.title):null,oe=Ue[1].replace(/\\([\[\]])/g,"$1");return Ue[0].charAt(0)!=="!"?{type:"link",raw:Ee,href:Y,title:ee,text:oe}:{type:"image",raw:Ee,href:Y,title:ee,text:B(oe)}}function $e(Ue,be){var Ee=Ue.match(/^(\s+)(?:```)/);if(Ee===null)return be;var Y=Ee[1];return be.split(`
`).map(function(ee){var oe=ee.match(/^\s+/);if(oe===null)return ee;var pe=oe[0];return pe.length>=Y.length?ee.slice(Y.length):ee}).join(`
`)}var qe=function(){function Ue(Ee){this.options=Ee||se}var be=Ue.prototype;return be.space=function(Y){var ee=this.rules.block.newline.exec(Y);if(ee)return ee[0].length>1?{type:"space",raw:ee[0]}:{raw:`
`}},be.code=function(Y){var ee=this.rules.block.code.exec(Y);if(ee){var oe=ee[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ee[0],codeBlockStyle:"indented",text:this.options.pedantic?oe:re(oe,`
`)}}},be.fences=function(Y){var ee=this.rules.block.fences.exec(Y);if(ee){var oe=ee[0],pe=$e(oe,ee[3]||"");return{type:"code",raw:oe,lang:ee[2]?ee[2].trim():ee[2],text:pe}}},be.heading=function(Y){var ee=this.rules.block.heading.exec(Y);if(ee){var oe=ee[2].trim();if(/#$/.test(oe)){var pe=re(oe,"#");(this.options.pedantic||!pe||/ $/.test(pe))&&(oe=pe.trim())}return{type:"heading",raw:ee[0],depth:ee[1].length,text:oe}}},be.nptable=function(Y){var ee=this.rules.block.nptable.exec(Y);if(ee){var oe={type:"table",header:w(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[],raw:ee[0]};if(oe.header.length===oe.align.length){var pe=oe.align.length,Ce;for(Ce=0;Ce<pe;Ce++)/^ *-+: *$/.test(oe.align[Ce])?oe.align[Ce]="right":/^ *:-+: *$/.test(oe.align[Ce])?oe.align[Ce]="center":/^ *:-+ *$/.test(oe.align[Ce])?oe.align[Ce]="left":oe.align[Ce]=null;for(pe=oe.cells.length,Ce=0;Ce<pe;Ce++)oe.cells[Ce]=w(oe.cells[Ce],oe.header.length);return oe}}},be.hr=function(Y){var ee=this.rules.block.hr.exec(Y);if(ee)return{type:"hr",raw:ee[0]}},be.blockquote=function(Y){var ee=this.rules.block.blockquote.exec(Y);if(ee){var oe=ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ee[0],text:oe}}},be.list=function(Y){var ee=this.rules.block.list.exec(Y);if(ee){var oe=ee[0],pe=ee[2],Ce=pe.length>1,ft={type:"list",raw:oe,ordered:Ce,start:Ce?+pe.slice(0,-1):"",loose:!1,items:[]},Et=ee[0].match(this.rules.block.item),dt=!1,Zt,_r,Mr,$t,Kt,Tr,Zr,Re,Ir,Er=Et.length;Mr=this.rules.block.listItemStart.exec(Et[0]);for(var vr=0;vr<Er;vr++){if(Zt=Et[vr],oe=Zt,this.options.pedantic||(Ir=Zt.match(new RegExp("\\n\\s*\\n {0,"+(Mr[0].length-1)+"}\\S")),Ir&&(Kt=Zt.length-Ir.index+Et.slice(vr+1).join(`
`).length,ft.raw=ft.raw.substring(0,ft.raw.length-Kt),Zt=Zt.substring(0,Ir.index),oe=Zt,Er=vr+1)),vr!==Er-1){if($t=this.rules.block.listItemStart.exec(Et[vr+1]),this.options.pedantic?$t[1].length>Mr[1].length:$t[1].length>=Mr[0].length||$t[1].length>3){Et.splice(vr,2,Et[vr]+(!this.options.pedantic&&$t[1].length<Mr[0].length&&!Et[vr].match(/\n$/)?"":`
`)+Et[vr+1]),vr--,Er--;continue}else(!this.options.pedantic||this.options.smartLists?$t[2][$t[2].length-1]!==pe[pe.length-1]:Ce===($t[2].length===1))&&(Kt=Et.slice(vr+1).join(`
`).length,ft.raw=ft.raw.substring(0,ft.raw.length-Kt),vr=Er-1);Mr=$t}_r=Zt.length,Zt=Zt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Zt.indexOf(`
`)&&(_r-=Zt.length,Zt=this.options.pedantic?Zt.replace(/^ {1,4}/gm,""):Zt.replace(new RegExp("^ {1,"+_r+"}","gm"),"")),Zt=re(Zt,`
`),vr!==Er-1&&(oe=oe+`
`),Tr=dt||/\n\n(?!\s*$)/.test(oe),vr!==Er-1&&(dt=oe.slice(-2)===`
`,Tr||(Tr=dt)),Tr&&(ft.loose=!0),this.options.gfm&&(Zr=/^\[[ xX]\] /.test(Zt),Re=void 0,Zr&&(Re=Zt[1]!==" ",Zt=Zt.replace(/^\[[ xX]\] +/,""))),ft.items.push({type:"list_item",raw:oe,task:Zr,checked:Re,loose:Tr,text:Zt})}return ft}},be.html=function(Y){var ee=this.rules.block.html.exec(Y);if(ee)return{type:this.options.sanitize?"paragraph":"html",raw:ee[0],pre:!this.options.sanitizer&&(ee[1]==="pre"||ee[1]==="script"||ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):B(ee[0]):ee[0]}},be.def=function(Y){var ee=this.rules.block.def.exec(Y);if(ee){ee[3]&&(ee[3]=ee[3].substring(1,ee[3].length-1));var oe=ee[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:oe,raw:ee[0],href:ee[2],title:ee[3]}}},be.table=function(Y){var ee=this.rules.block.table.exec(Y);if(ee){var oe={type:"table",header:w(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[]};if(oe.header.length===oe.align.length){oe.raw=ee[0];var pe=oe.align.length,Ce;for(Ce=0;Ce<pe;Ce++)/^ *-+: *$/.test(oe.align[Ce])?oe.align[Ce]="right":/^ *:-+: *$/.test(oe.align[Ce])?oe.align[Ce]="center":/^ *:-+ *$/.test(oe.align[Ce])?oe.align[Ce]="left":oe.align[Ce]=null;for(pe=oe.cells.length,Ce=0;Ce<pe;Ce++)oe.cells[Ce]=w(oe.cells[Ce].replace(/^ *\| *| *\| *$/g,""),oe.header.length);return oe}}},be.lheading=function(Y){var ee=this.rules.block.lheading.exec(Y);if(ee)return{type:"heading",raw:ee[0],depth:ee[2].charAt(0)==="="?1:2,text:ee[1]}},be.paragraph=function(Y){var ee=this.rules.block.paragraph.exec(Y);if(ee)return{type:"paragraph",raw:ee[0],text:ee[1].charAt(ee[1].length-1)===`
`?ee[1].slice(0,-1):ee[1]}},be.text=function(Y){var ee=this.rules.block.text.exec(Y);if(ee)return{type:"text",raw:ee[0],text:ee[0]}},be.escape=function(Y){var ee=this.rules.inline.escape.exec(Y);if(ee)return{type:"escape",raw:ee[0],text:B(ee[1])}},be.tag=function(Y,ee,oe){var pe=this.rules.inline.tag.exec(Y);if(pe)return!ee&&/^<a /i.test(pe[0])?ee=!0:ee&&/^<\/a>/i.test(pe[0])&&(ee=!1),!oe&&/^<(pre|code|kbd|script)(\s|>)/i.test(pe[0])?oe=!0:oe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(pe[0])&&(oe=!1),{type:this.options.sanitize?"text":"html",raw:pe[0],inLink:ee,inRawBlock:oe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):B(pe[0]):pe[0]}},be.link=function(Y){var ee=this.rules.inline.link.exec(Y);if(ee){var oe=ee[2].trim();if(!this.options.pedantic&&/^</.test(oe)){if(!/>$/.test(oe))return;var pe=re(oe.slice(0,-1),"\\");if((oe.length-pe.length)%2===0)return}else{var Ce=$(ee[2],"()");if(Ce>-1){var ft=ee[0].indexOf("!")===0?5:4,Et=ft+ee[1].length+Ce;ee[2]=ee[2].substring(0,Ce),ee[0]=ee[0].substring(0,Et).trim(),ee[3]=""}}var dt=ee[2],Zt="";if(this.options.pedantic){var _r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(dt);_r&&(dt=_r[1],Zt=_r[3])}else Zt=ee[3]?ee[3].slice(1,-1):"";return dt=dt.trim(),/^</.test(dt)&&(this.options.pedantic&&!/>$/.test(oe)?dt=dt.slice(1):dt=dt.slice(1,-1)),ae(ee,{href:dt&&dt.replace(this.rules.inline._escapes,"$1"),title:Zt&&Zt.replace(this.rules.inline._escapes,"$1")},ee[0])}},be.reflink=function(Y,ee){var oe;if((oe=this.rules.inline.reflink.exec(Y))||(oe=this.rules.inline.nolink.exec(Y))){var pe=(oe[2]||oe[1]).replace(/\s+/g," ");if(pe=ee[pe.toLowerCase()],!pe||!pe.href){var Ce=oe[0].charAt(0);return{type:"text",raw:Ce,text:Ce}}return ae(oe,pe,oe[0])}},be.emStrong=function(Y,ee,oe){oe===void 0&&(oe="");var pe=this.rules.inline.emStrong.lDelim.exec(Y);if(pe&&!(pe[3]&&oe.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var Ce=pe[1]||pe[2]||"";if(!Ce||Ce&&(oe===""||this.rules.inline.punctuation.exec(oe))){var ft=pe[0].length-1,Et,dt,Zt=ft,_r=0,Mr=pe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Mr.lastIndex=0,ee=ee.slice(-1*Y.length+ft);(pe=Mr.exec(ee))!=null;)if(Et=pe[1]||pe[2]||pe[3]||pe[4]||pe[5]||pe[6],!!Et){if(dt=Et.length,pe[3]||pe[4]){Zt+=dt;continue}else if((pe[5]||pe[6])&&ft%3&&!((ft+dt)%3)){_r+=dt;continue}if(Zt-=dt,!(Zt>0))return dt=Math.min(dt,dt+Zt+_r),Math.min(ft,dt)%2?{type:"em",raw:Y.slice(0,ft+pe.index+dt+1),text:Y.slice(1,ft+pe.index+dt)}:{type:"strong",raw:Y.slice(0,ft+pe.index+dt+1),text:Y.slice(2,ft+pe.index+dt-1)}}}}},be.codespan=function(Y){var ee=this.rules.inline.code.exec(Y);if(ee){var oe=ee[2].replace(/\n/g," "),pe=/[^ ]/.test(oe),Ce=/^ /.test(oe)&&/ $/.test(oe);return pe&&Ce&&(oe=oe.substring(1,oe.length-1)),oe=B(oe,!0),{type:"codespan",raw:ee[0],text:oe}}},be.br=function(Y){var ee=this.rules.inline.br.exec(Y);if(ee)return{type:"br",raw:ee[0]}},be.del=function(Y){var ee=this.rules.inline.del.exec(Y);if(ee)return{type:"del",raw:ee[0],text:ee[2]}},be.autolink=function(Y,ee){var oe=this.rules.inline.autolink.exec(Y);if(oe){var pe,Ce;return oe[2]==="@"?(pe=B(this.options.mangle?ee(oe[1]):oe[1]),Ce="mailto:"+pe):(pe=B(oe[1]),Ce=pe),{type:"link",raw:oe[0],text:pe,href:Ce,tokens:[{type:"text",raw:pe,text:pe}]}}},be.url=function(Y,ee){var oe;if(oe=this.rules.inline.url.exec(Y)){var pe,Ce;if(oe[2]==="@")pe=B(this.options.mangle?ee(oe[0]):oe[0]),Ce="mailto:"+pe;else{var ft;do ft=oe[0],oe[0]=this.rules.inline._backpedal.exec(oe[0])[0];while(ft!==oe[0]);pe=B(oe[0]),oe[1]==="www."?Ce="http://"+pe:Ce=pe}return{type:"link",raw:oe[0],text:pe,href:Ce,tokens:[{type:"text",raw:pe,text:pe}]}}},be.inlineText=function(Y,ee,oe){var pe=this.rules.inline.text.exec(Y);if(pe){var Ce;return ee?Ce=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):B(pe[0]):pe[0]:Ce=B(this.options.smartypants?oe(pe[0]):pe[0]),{type:"text",raw:pe[0],text:Ce}}},Ue}(),Bt=z.noopTest,pt=z.edit,Qt=z.merge,xt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Bt,table:Bt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};xt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,xt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,xt.def=pt(xt.def).replace("label",xt._label).replace("title",xt._title).getRegex(),xt.bullet=/(?:[*+-]|\d{1,9}[.)])/,xt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,xt.item=pt(xt.item,"gm").replace(/bull/g,xt.bullet).getRegex(),xt.listItemStart=pt(/^( *)(bull) */).replace("bull",xt.bullet).getRegex(),xt.list=pt(xt.list).replace(/bull/g,xt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xt.def.source+")").getRegex(),xt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,xt.html=pt(xt.html,"i").replace("comment",xt._comment).replace("tag",xt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xt.paragraph=pt(xt._paragraph).replace("hr",xt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",xt._tag).getRegex(),xt.blockquote=pt(xt.blockquote).replace("paragraph",xt.paragraph).getRegex(),xt.normal=Qt({},xt),xt.gfm=Qt({},xt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),xt.gfm.nptable=pt(xt.gfm.nptable).replace("hr",xt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",xt._tag).getRegex(),xt.gfm.table=pt(xt.gfm.table).replace("hr",xt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",xt._tag).getRegex(),xt.pedantic=Qt({},xt.normal,{html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bt,paragraph:pt(xt.normal._paragraph).replace("hr",xt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",xt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ht={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Bt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Bt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ht._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ht.punctuation=pt(ht.punctuation).replace(/punctuation/g,ht._punctuation).getRegex(),ht.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ht.escapedEmSt=/\\\*|\\_/g,ht._comment=pt(xt._comment).replace("(?:-->|$)","-->").getRegex(),ht.emStrong.lDelim=pt(ht.emStrong.lDelim).replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimAst=pt(ht.emStrong.rDelimAst,"g").replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimUnd=pt(ht.emStrong.rDelimUnd,"g").replace(/punct/g,ht._punctuation).getRegex(),ht._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ht._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ht._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ht.autolink=pt(ht.autolink).replace("scheme",ht._scheme).replace("email",ht._email).getRegex(),ht._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ht.tag=pt(ht.tag).replace("comment",ht._comment).replace("attribute",ht._attribute).getRegex(),ht._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ht._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ht._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ht.link=pt(ht.link).replace("label",ht._label).replace("href",ht._href).replace("title",ht._title).getRegex(),ht.reflink=pt(ht.reflink).replace("label",ht._label).getRegex(),ht.reflinkSearch=pt(ht.reflinkSearch,"g").replace("reflink",ht.reflink).replace("nolink",ht.nolink).getRegex(),ht.normal=Qt({},ht),ht.pedantic=Qt({},ht.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",ht._label).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ht._label).getRegex()}),ht.gfm=Qt({},ht.normal,{escape:pt(ht.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ht.gfm.url=pt(ht.gfm.url,"i").replace("email",ht.gfm._extended_email).getRegex(),ht.breaks=Qt({},ht.gfm,{br:pt(ht.br).replace("{2,}","*").getRegex(),text:pt(ht.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var De={block:xt,inline:ht},it=qe,Le=he.exports.defaults,Ct=De.block,Ut=De.inline,Be=z.repeatString;function L(Ue){return Ue.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function p(Ue){var be="",Ee,Y,ee=Ue.length;for(Ee=0;Ee<ee;Ee++)Y=Ue.charCodeAt(Ee),Math.random()>.5&&(Y="x"+Y.toString(16)),be+="&#"+Y+";";return be}var b=function(){function Ue(Ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ee||Le,this.options.tokenizer=this.options.tokenizer||new it,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Y={block:Ct.normal,inline:Ut.normal};this.options.pedantic?(Y.block=Ct.pedantic,Y.inline=Ut.pedantic):this.options.gfm&&(Y.block=Ct.gfm,this.options.breaks?Y.inline=Ut.breaks:Y.inline=Ut.gfm),this.tokenizer.rules=Y}Ue.lex=function(Y,ee){var oe=new Ue(ee);return oe.lex(Y)},Ue.lexInline=function(Y,ee){var oe=new Ue(ee);return oe.inlineTokens(Y)};var be=Ue.prototype;return be.lex=function(Y){return Y=Y.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Y,this.tokens,!0),this.inline(this.tokens),this.tokens},be.blockTokens=function(Y,ee,oe){ee===void 0&&(ee=[]),oe===void 0&&(oe=!0),this.options.pedantic&&(Y=Y.replace(/^ +$/gm,""));for(var pe,Ce,ft,Et;Y;){if(pe=this.tokenizer.space(Y)){Y=Y.substring(pe.raw.length),pe.type&&ee.push(pe);continue}if(pe=this.tokenizer.code(Y)){Y=Y.substring(pe.raw.length),Et=ee[ee.length-1],Et&&Et.type==="paragraph"?(Et.raw+=`
`+pe.raw,Et.text+=`
`+pe.text):ee.push(pe);continue}if(pe=this.tokenizer.fences(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.heading(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.nptable(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.hr(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.blockquote(Y)){Y=Y.substring(pe.raw.length),pe.tokens=this.blockTokens(pe.text,[],oe),ee.push(pe);continue}if(pe=this.tokenizer.list(Y)){for(Y=Y.substring(pe.raw.length),ft=pe.items.length,Ce=0;Ce<ft;Ce++)pe.items[Ce].tokens=this.blockTokens(pe.items[Ce].text,[],!1);ee.push(pe);continue}if(pe=this.tokenizer.html(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(oe&&(pe=this.tokenizer.def(Y))){Y=Y.substring(pe.raw.length),this.tokens.links[pe.tag]||(this.tokens.links[pe.tag]={href:pe.href,title:pe.title});continue}if(pe=this.tokenizer.table(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.lheading(Y)){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(oe&&(pe=this.tokenizer.paragraph(Y))){Y=Y.substring(pe.raw.length),ee.push(pe);continue}if(pe=this.tokenizer.text(Y)){Y=Y.substring(pe.raw.length),Et=ee[ee.length-1],Et&&Et.type==="text"?(Et.raw+=`
`+pe.raw,Et.text+=`
`+pe.text):ee.push(pe);continue}if(Y){var dt="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return ee},be.inline=function(Y){var ee,oe,pe,Ce,ft,Et,dt=Y.length;for(ee=0;ee<dt;ee++)switch(Et=Y[ee],Et.type){case"paragraph":case"text":case"heading":{Et.tokens=[],this.inlineTokens(Et.text,Et.tokens);break}case"table":{for(Et.tokens={header:[],cells:[]},Ce=Et.header.length,oe=0;oe<Ce;oe++)Et.tokens.header[oe]=[],this.inlineTokens(Et.header[oe],Et.tokens.header[oe]);for(Ce=Et.cells.length,oe=0;oe<Ce;oe++)for(ft=Et.cells[oe],Et.tokens.cells[oe]=[],pe=0;pe<ft.length;pe++)Et.tokens.cells[oe][pe]=[],this.inlineTokens(ft[pe],Et.tokens.cells[oe][pe]);break}case"blockquote":{this.inline(Et.tokens);break}case"list":{for(Ce=Et.items.length,oe=0;oe<Ce;oe++)this.inline(Et.items[oe].tokens);break}}return Y},be.inlineTokens=function(Y,ee,oe,pe){ee===void 0&&(ee=[]),oe===void 0&&(oe=!1),pe===void 0&&(pe=!1);var Ce,ft,Et=Y,dt,Zt,_r;if(this.tokens.links){var Mr=Object.keys(this.tokens.links);if(Mr.length>0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(Et))!=null;)Mr.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(Et=Et.slice(0,dt.index)+"["+Be("a",dt[0].length-2)+"]"+Et.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(Et))!=null;)Et=Et.slice(0,dt.index)+"["+Be("a",dt[0].length-2)+"]"+Et.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(dt=this.tokenizer.rules.inline.escapedEmSt.exec(Et))!=null;)Et=Et.slice(0,dt.index)+"++"+Et.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Y;){if(Zt||(_r=""),Zt=!1,Ce=this.tokenizer.escape(Y)){Y=Y.substring(Ce.raw.length),ee.push(Ce);continue}if(Ce=this.tokenizer.tag(Y,oe,pe)){Y=Y.substring(Ce.raw.length),oe=Ce.inLink,pe=Ce.inRawBlock;var $t=ee[ee.length-1];$t&&Ce.type==="text"&&$t.type==="text"?($t.raw+=Ce.raw,$t.text+=Ce.text):ee.push(Ce);continue}if(Ce=this.tokenizer.link(Y)){Y=Y.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,pe)),ee.push(Ce);continue}if(Ce=this.tokenizer.reflink(Y,this.tokens.links)){Y=Y.substring(Ce.raw.length);var Kt=ee[ee.length-1];Ce.type==="link"?(Ce.tokens=this.inlineTokens(Ce.text,[],!0,pe),ee.push(Ce)):Kt&&Ce.type==="text"&&Kt.type==="text"?(Kt.raw+=Ce.raw,Kt.text+=Ce.text):ee.push(Ce);continue}if(Ce=this.tokenizer.emStrong(Y,Et,_r)){Y=Y.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],oe,pe),ee.push(Ce);continue}if(Ce=this.tokenizer.codespan(Y)){Y=Y.substring(Ce.raw.length),ee.push(Ce);continue}if(Ce=this.tokenizer.br(Y)){Y=Y.substring(Ce.raw.length),ee.push(Ce);continue}if(Ce=this.tokenizer.del(Y)){Y=Y.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],oe,pe),ee.push(Ce);continue}if(Ce=this.tokenizer.autolink(Y,p)){Y=Y.substring(Ce.raw.length),ee.push(Ce);continue}if(!oe&&(Ce=this.tokenizer.url(Y,p))){Y=Y.substring(Ce.raw.length),ee.push(Ce);continue}if(Ce=this.tokenizer.inlineText(Y,pe,L)){Y=Y.substring(Ce.raw.length),Ce.raw.slice(-1)!=="_"&&(_r=Ce.raw.slice(-1)),Zt=!0,ft=ee[ee.length-1],ft&&ft.type==="text"?(ft.raw+=Ce.raw,ft.text+=Ce.text):ee.push(Ce);continue}if(Y){var Tr="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Tr);break}else throw new Error(Tr)}}return ee},K(Ue,null,[{key:"rules",get:function(){return{block:Ct,inline:Ut}}}]),Ue}(),N=he.exports.defaults,S=z.cleanUrl,k=z.escape,te=function(){function Ue(Ee){this.options=Ee||N}var be=Ue.prototype;return be.code=function(Y,ee,oe){var pe=(ee||"").match(/\S*/)[0];if(this.options.highlight){var Ce=this.options.highlight(Y,pe);Ce!=null&&Ce!==Y&&(oe=!0,Y=Ce)}return Y=Y.replace(/\n$/,"")+`
`,pe?'<pre><code class="'+this.options.langPrefix+k(pe,!0)+'">'+(oe?Y:k(Y,!0))+`</code></pre>
`:"<pre><code>"+(oe?Y:k(Y,!0))+`</code></pre>
`},be.blockquote=function(Y){return`<blockquote>
`+Y+`</blockquote>
`},be.html=function(Y){return Y},be.heading=function(Y,ee,oe,pe){return this.options.headerIds?"<h"+ee+' id="'+this.options.headerPrefix+pe.slug(oe)+'">'+Y+"</h"+ee+`>
`:"<h"+ee+">"+Y+"</h"+ee+`>
`},be.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},be.list=function(Y,ee,oe){var pe=ee?"ol":"ul",Ce=ee&&oe!==1?' start="'+oe+'"':"";return"<"+pe+Ce+`>
`+Y+"</"+pe+`>
`},be.listitem=function(Y){return"<li>"+Y+`</li>
`},be.checkbox=function(Y){return"<input "+(Y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},be.paragraph=function(Y){return"<p>"+Y+`</p>
`},be.table=function(Y,ee){return ee&&(ee="<tbody>"+ee+"</tbody>"),`<table>
<thead>
`+Y+`</thead>
`+ee+`</table>
`},be.tablerow=function(Y){return`<tr>
`+Y+`</tr>
`},be.tablecell=function(Y,ee){var oe=ee.header?"th":"td",pe=ee.align?"<"+oe+' align="'+ee.align+'">':"<"+oe+">";return pe+Y+"</"+oe+`>
`},be.strong=function(Y){return"<strong>"+Y+"</strong>"},be.em=function(Y){return"<em>"+Y+"</em>"},be.codespan=function(Y){return"<code>"+Y+"</code>"},be.br=function(){return this.options.xhtml?"<br/>":"<br>"},be.del=function(Y){return"<del>"+Y+"</del>"},be.link=function(Y,ee,oe){if(Y=S(this.options.sanitize,this.options.baseUrl,Y),Y===null)return oe;var pe='<a href="'+k(Y)+'"';return ee&&(pe+=' title="'+ee+'"'),pe+=">"+oe+"</a>",pe},be.image=function(Y,ee,oe){if(Y=S(this.options.sanitize,this.options.baseUrl,Y),Y===null)return oe;var pe='<img src="'+Y+'" alt="'+oe+'"';return ee&&(pe+=' title="'+ee+'"'),pe+=this.options.xhtml?"/>":">",pe},be.text=function(Y){return Y},Ue}(),Fe=function(){function Ue(){}var be=Ue.prototype;return be.strong=function(Y){return Y},be.em=function(Y){return Y},be.codespan=function(Y){return Y},be.del=function(Y){return Y},be.html=function(Y){return Y},be.text=function(Y){return Y},be.link=function(Y,ee,oe){return""+oe},be.image=function(Y,ee,oe){return""+oe},be.br=function(){return""},Ue}(),ke=function(){function Ue(){this.seen={}}var be=Ue.prototype;return be.serialize=function(Y){return Y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},be.getNextSafeSlug=function(Y,ee){var oe=Y,pe=0;if(this.seen.hasOwnProperty(oe)){pe=this.seen[Y];do pe++,oe=Y+"-"+pe;while(this.seen.hasOwnProperty(oe))}return ee||(this.seen[Y]=pe,this.seen[oe]=0),oe},be.slug=function(Y,ee){ee===void 0&&(ee={});var oe=this.serialize(Y);return this.getNextSafeSlug(oe,ee.dryrun)},Ue}(),Ge=te,ze=Fe,Ft=ke,Je=he.exports.defaults,ut=z.unescape,st=function(){function Ue(Ee){this.options=Ee||Je,this.options.renderer=this.options.renderer||new Ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ze,this.slugger=new Ft}Ue.parse=function(Y,ee){var oe=new Ue(ee);return oe.parse(Y)},Ue.parseInline=function(Y,ee){var oe=new Ue(ee);return oe.parseInline(Y)};var be=Ue.prototype;return be.parse=function(Y,ee){ee===void 0&&(ee=!0);var oe="",pe,Ce,ft,Et,dt,Zt,_r,Mr,$t,Kt,Tr,Zr,Re,Ir,Er,vr,_n,Or,vn=Y.length;for(pe=0;pe<vn;pe++)switch(Kt=Y[pe],Kt.type){case"space":continue;case"hr":{oe+=this.renderer.hr();continue}case"heading":{oe+=this.renderer.heading(this.parseInline(Kt.tokens),Kt.depth,ut(this.parseInline(Kt.tokens,this.textRenderer)),this.slugger);continue}case"code":{oe+=this.renderer.code(Kt.text,Kt.lang,Kt.escaped);continue}case"table":{for(Mr="",_r="",Et=Kt.header.length,Ce=0;Ce<Et;Ce++)_r+=this.renderer.tablecell(this.parseInline(Kt.tokens.header[Ce]),{header:!0,align:Kt.align[Ce]});for(Mr+=this.renderer.tablerow(_r),$t="",Et=Kt.cells.length,Ce=0;Ce<Et;Ce++){for(Zt=Kt.tokens.cells[Ce],_r="",dt=Zt.length,ft=0;ft<dt;ft++)_r+=this.renderer.tablecell(this.parseInline(Zt[ft]),{header:!1,align:Kt.align[ft]});$t+=this.renderer.tablerow(_r)}oe+=this.renderer.table(Mr,$t);continue}case"blockquote":{$t=this.parse(Kt.tokens),oe+=this.renderer.blockquote($t);continue}case"list":{for(Tr=Kt.ordered,Zr=Kt.start,Re=Kt.loose,Et=Kt.items.length,$t="",Ce=0;Ce<Et;Ce++)Er=Kt.items[Ce],vr=Er.checked,_n=Er.task,Ir="",Er.task&&(Or=this.renderer.checkbox(vr),Re?Er.tokens.length>0&&Er.tokens[0].type==="text"?(Er.tokens[0].text=Or+" "+Er.tokens[0].text,Er.tokens[0].tokens&&Er.tokens[0].tokens.length>0&&Er.tokens[0].tokens[0].type==="text"&&(Er.tokens[0].tokens[0].text=Or+" "+Er.tokens[0].tokens[0].text)):Er.tokens.unshift({type:"text",text:Or}):Ir+=Or),Ir+=this.parse(Er.tokens,Re),$t+=this.renderer.listitem(Ir,_n,vr);oe+=this.renderer.list($t,Tr,Zr);continue}case"html":{oe+=this.renderer.html(Kt.text);continue}case"paragraph":{oe+=this.renderer.paragraph(this.parseInline(Kt.tokens));continue}case"text":{for($t=Kt.tokens?this.parseInline(Kt.tokens):Kt.text;pe+1<vn&&Y[pe+1].type==="text";)Kt=Y[++pe],$t+=`
`+(Kt.tokens?this.parseInline(Kt.tokens):Kt.text);oe+=ee?this.renderer.paragraph($t):$t;continue}default:{var zr='Token with "'+Kt.type+'" type was not found.';if(this.options.silent){console.error(zr);return}else throw new Error(zr)}}return oe},be.parseInline=function(Y,ee){ee=ee||this.renderer;var oe="",pe,Ce,ft=Y.length;for(pe=0;pe<ft;pe++)switch(Ce=Y[pe],Ce.type){case"escape":{oe+=ee.text(Ce.text);break}case"html":{oe+=ee.html(Ce.text);break}case"link":{oe+=ee.link(Ce.href,Ce.title,this.parseInline(Ce.tokens,ee));break}case"image":{oe+=ee.image(Ce.href,Ce.title,Ce.text);break}case"strong":{oe+=ee.strong(this.parseInline(Ce.tokens,ee));break}case"em":{oe+=ee.em(this.parseInline(Ce.tokens,ee));break}case"codespan":{oe+=ee.codespan(Ce.text);break}case"br":{oe+=ee.br();break}case"del":{oe+=ee.del(this.parseInline(Ce.tokens,ee));break}case"text":{oe+=ee.text(Ce.text);break}default:{var Et='Token with "'+Ce.type+'" type was not found.';if(this.options.silent){console.error(Et);return}else throw new Error(Et)}}return oe},Ue}(),Xe=b,Ve=st,Ze=qe,ct=te,yt=Fe,Nt=ke,bt=z.merge,Wt=z.checkSanitizeDeprecation,Ht=z.escape,qt=he.exports.getDefaults,fr=he.exports.changeDefaults,Ur=he.exports.defaults;function St(Ue,be,Ee){if(typeof Ue=="undefined"||Ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ue)+", string expected");if(typeof be=="function"&&(Ee=be,be=null),be=bt({},St.defaults,be||{}),Wt(be),Ee){var Y=be.highlight,ee;try{ee=Xe.lex(Ue,be)}catch(ft){return Ee(ft)}var oe=function(Et){var dt;if(!Et)try{be.walkTokens&&St.walkTokens(ee,be.walkTokens),dt=Ve.parse(ee,be)}catch(Zt){Et=Zt}return be.highlight=Y,Et?Ee(Et):Ee(null,dt)};if(!Y||Y.length<3||(delete be.highlight,!ee.length))return oe();var pe=0;St.walkTokens(ee,function(ft){ft.type==="code"&&(pe++,setTimeout(function(){Y(ft.text,ft.lang,function(Et,dt){if(Et)return oe(Et);dt!=null&&dt!==ft.text&&(ft.text=dt,ft.escaped=!0),pe--,pe===0&&oe()})},0))}),pe===0&&oe();return}try{var Ce=Xe.lex(Ue,be);return be.walkTokens&&St.walkTokens(Ce,be.walkTokens),Ve.parse(Ce,be)}catch(ft){if(ft.message+=`
Please report this to https://github.com/markedjs/marked.`,be.silent)return"<p>An error occurred:</p><pre>"+Ht(ft.message+"",!0)+"</pre>";throw ft}}St.options=St.setOptions=function(Ue){return bt(St.defaults,Ue),fr(St.defaults),St},St.getDefaults=qt,St.defaults=Ur,St.use=function(Ue){var be=bt({},Ue);if(Ue.renderer&&function(){var Y=St.defaults.renderer||new ct,ee=function(Ce){var ft=Y[Ce];Y[Ce]=function(){for(var Et=arguments.length,dt=new Array(Et),Zt=0;Zt<Et;Zt++)dt[Zt]=arguments[Zt];var _r=Ue.renderer[Ce].apply(Y,dt);return _r===!1&&(_r=ft.apply(Y,dt)),_r}};for(var oe in Ue.renderer)ee(oe);be.renderer=Y}(),Ue.tokenizer&&function(){var Y=St.defaults.tokenizer||new Ze,ee=function(Ce){var ft=Y[Ce];Y[Ce]=function(){for(var Et=arguments.length,dt=new Array(Et),Zt=0;Zt<Et;Zt++)dt[Zt]=arguments[Zt];var _r=Ue.tokenizer[Ce].apply(Y,dt);return _r===!1&&(_r=ft.apply(Y,dt)),_r}};for(var oe in Ue.tokenizer)ee(oe);be.tokenizer=Y}(),Ue.walkTokens){var Ee=St.defaults.walkTokens;be.walkTokens=function(Y){Ue.walkTokens(Y),Ee&&Ee(Y)}}St.setOptions(be)},St.walkTokens=function(Ue,be){for(var Ee=Se(Ue),Y;!(Y=Ee()).done;){var ee=Y.value;switch(be(ee),ee.type){case"table":{for(var oe=Se(ee.tokens.header),pe;!(pe=oe()).done;){var Ce=pe.value;St.walkTokens(Ce,be)}for(var ft=Se(ee.tokens.cells),Et;!(Et=ft()).done;)for(var dt=Et.value,Zt=Se(dt),_r;!(_r=Zt()).done;){var Mr=_r.value;St.walkTokens(Mr,be)}break}case"list":{St.walkTokens(ee.items,be);break}default:ee.tokens&&St.walkTokens(ee.tokens,be)}}},St.parseInline=function(Ue,be){if(typeof Ue=="undefined"||Ue===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ue!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ue)+", string expected");be=bt({},St.defaults,be||{}),Wt(be);try{var Ee=Xe.lexInline(Ue,be);return be.walkTokens&&St.walkTokens(Ee,be.walkTokens),Ve.parseInline(Ee,be)}catch(Y){if(Y.message+=`
Please report this to https://github.com/markedjs/marked.`,be.silent)return"<p>An error occurred:</p><pre>"+Ht(Y.message+"",!0)+"</pre>";throw Y}},St.Parser=Ve,St.parser=Ve.parse,St.Renderer=ct,St.TextRenderer=yt,St.Lexer=Xe,St.lexer=Xe.lex,St.Tokenizer=Ze,St.Slugger=Nt,St.parse=St;var er=St;return er})},11690:function(dr){const vt=/[&<>"']/,K=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,me=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},he=ie=>Se[ie];function W(ie,ye){if(ye){if(vt.test(ie))return ie.replace(K,he)}else if(V.test(ie))return ie.replace(me,he);return ie}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ge(ie){return ie.replace(m,(ye,Pe)=>(Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""))}const O=/(^|[^\[])\^/g;function u(ie,ye){ie=ie.source||ie,ye=ye||"";const Pe={replace:(ue,Me)=>(Me=Me.source||Me,Me=Me.replace(O,"$1"),ie=ie.replace(ue,Me),Pe),getRegex:()=>new RegExp(ie,ye)};return Pe}const q=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(ie,ye,Pe){if(ie){let ue;try{ue=decodeURIComponent(ge(Pe)).replace(q,"").toLowerCase()}catch(Me){return null}if(ue.indexOf("javascript:")===0||ue.indexOf("vbscript:")===0||ue.indexOf("data:")===0)return null}ye&&!D.test(Pe)&&(Pe=M(ye,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(ue){return null}return Pe}const _={},C=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,j=/^([^:]+:\/*[^/]*)[\s\S]*$/;function M(ie,ye){_[" "+ie]||(C.test(ie)?_[" "+ie]=ie+"/":_[" "+ie]=X(ie,"/",!0)),ie=_[" "+ie];const Pe=ie.indexOf(":")===-1;return ye.substring(0,2)==="//"?Pe?ye:ie.replace(x,"$1")+ye:ye.charAt(0)==="/"?Pe?ye:ie.replace(j,"$1")+ye:ie+ye}const H={exec:function(){}};function R(ie){let ye=1,Pe,ue;for(;ye<arguments.length;ye++){Pe=arguments[ye];for(ue in Pe)Object.prototype.hasOwnProperty.call(Pe,ue)&&(ie[ue]=Pe[ue])}return ie}function P(ie,ye){const Pe=ie.replace(/\|/g,(Z,I,G)=>{let z=!1,se=I;for(;--se>=0&&G[se]==="\\";)z=!z;return z?"|":" |"}),ue=Pe.split(/ \|/);let Me=0;if(ue.length>ye)ue.splice(ye);else for(;ue.length<ye;)ue.push("");for(;Me<ue.length;Me++)ue[Me]=ue[Me].trim().replace(/\\\|/g,"|");return ue}function X(ie,ye,Pe){const ue=ie.length;if(ue===0)return"";let Me=0;for(;Me<ue;){const Z=ie.charAt(ue-Me-1);if(Z===ye&&!Pe)Me++;else if(Z!==ye&&Pe)Me++;else break}return ie.substr(0,ue-Me)}function fe(ie,ye){if(ie.indexOf(ye[1])===-1)return-1;const Pe=ie.length;let ue=0,Me=0;for(;Me<Pe;Me++)if(ie[Me]==="\\")Me++;else if(ie[Me]===ye[0])ue++;else if(ie[Me]===ye[1]&&(ue--,ue<0))return Me;return-1}function _e(ie){ie&&ie.sanitize&&!ie.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function we(ie,ye){if(ye<1)return"";let Pe="";for(;ye>1;)ye&1&&(Pe+=ie),ye>>=1,ie+=ie;return Pe+ie}dr.exports={escape:W,unescape:ge,edit:u,cleanUrl:y,resolveUrl:M,noopTest:H,merge:R,splitCells:P,rtrim:X,findClosingBracket:fe,checkSanitizeDeprecation:_e,repeatString:we}},75918:function(dr,vt,K){"use strict";K.d(vt,{Wi:function(){return m},Z0:function(){return ge},aU:function(){return W},eZ:function(){return u},wY:function(){return O}});var V=K(4348),me=K(69323),Se=K(13268),he=function(q,D,y,_){function C(x){return x instanceof y?x:new y(function(j){j(x)})}return new(y||(y=Promise))(function(x,j){function M(P){try{R(_.next(P))}catch(X){j(X)}}function H(P){try{R(_.throw(P))}catch(X){j(X)}}function R(P){P.done?x(P.value):C(P.value).then(M,H)}R((_=_.apply(q,D||[])).next())})};class W extends me.JT{constructor(D,y="",_="",C=!0,x){super(),this._onDidChange=this._register(new V.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=D,this._label=y,this._cssClass=_,this._enabled=C,this._actionCallback=x}get id(){return this._id}get label(){return this._label}set label(D){this._setLabel(D)}_setLabel(D){this._label!==D&&(this._label=D,this._onDidChange.fire({label:D}))}get tooltip(){return this._tooltip||""}set tooltip(D){this._setTooltip(D)}_setTooltip(D){this._tooltip!==D&&(this._tooltip=D,this._onDidChange.fire({tooltip:D}))}get class(){return this._cssClass}set class(D){this._setClass(D)}_setClass(D){this._cssClass!==D&&(this._cssClass=D,this._onDidChange.fire({class:D}))}get enabled(){return this._enabled}set enabled(D){this._setEnabled(D)}_setEnabled(D){this._enabled!==D&&(this._enabled=D,this._onDidChange.fire({enabled:D}))}get checked(){return this._checked}set checked(D){this._setChecked(D)}_setChecked(D){this._checked!==D&&(this._checked=D,this._onDidChange.fire({checked:D}))}run(D,y){return he(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(D))})}}class m extends me.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new V.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new V.Q5),this.onDidRun=this._onDidRun.event}run(D,y){return he(this,void 0,void 0,function*(){if(!D.enabled)return;this._onBeforeRun.fire({action:D});let _;try{yield this.runAction(D,y)}catch(C){_=C}this._onDidRun.fire({action:D,error:_})})}runAction(D,y){return he(this,void 0,void 0,function*(){yield D.run(y)})}}class ge extends W{constructor(D){super(ge.ID,D,D?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ge.ID="vs.actions.separator";class O{constructor(D,y,_,C){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=D,this.label=y,this.class=C,this._actions=_}get actions(){return this._actions}dispose(){}run(){return he(this,void 0,void 0,function*(){})}}class u extends W{constructor(){super(u.ID,Se.N("submenu.empty","(empty)"),void 0,!1)}}u.ID="vs.actions.empty"},76068:function(dr,vt,K){"use strict";K.d(vt,{ok:function(){return V}});function V(me,Se){if(!me)throw new Error(Se?`Assertion failed (${Se})`:"Assertion Failed")}},52615:function(dr,vt,K){"use strict";K.d(vt,{CM:function(){return W},JL:function(){return m},dT:function(){return O},fK:function(){return he},lA:function(){return ge}});var V=K(4348);class me{constructor(){this._icons=new Map,this._onDidRegister=new V.Q5}add(q){const D=this._icons.get(q.id);D?q.description?D.description=q.description:console.error(`Duplicate registration of codicon ${q.id}`):(this._icons.set(q.id,q),this._onDidRegister.fire(q))}get(q){return this._icons.get(q)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Se=new me,he=Se;function W(u,q){return new ge(u,q)}function m(u){return u?u.replace(/\$\((.*?)\)/g,(q,D)=>` ${D} `).trim():""}class ge{constructor(q,D,y){this.id=q,this.definition=D,this.description=y,Se.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var O;(function(u){u.iconNameSegment="[A-Za-z0-9]+",u.iconNameExpression="[A-Za-z0-9\\-]+",u.iconModifierExpression="~[A-Za-z]+";const q=new RegExp(`^(${u.iconNameExpression})(${u.iconModifierExpression})?$`);function D(C){if(C instanceof ge)return["codicon","codicon-"+C.id];const x=q.exec(C.id);if(!x)return D(ge.error);let[,j,M]=x;const H=["codicon","codicon-"+j];return M&&H.push("codicon-modifier-"+M.substr(1)),H}u.asClassNameArray=D;function y(C){return D(C).join(" ")}u.asClassName=y;function _(C){return"."+D(C).join(".")}u.asCSSSelector=_})(O||(O={})),function(u){u.add=new u("add",{fontCharacter:"\\ea60"}),u.plus=new u("plus",u.add.definition),u.gistNew=new u("gist-new",u.add.definition),u.repoCreate=new u("repo-create",u.add.definition),u.lightbulb=new u("lightbulb",{fontCharacter:"\\ea61"}),u.lightBulb=new u("light-bulb",{fontCharacter:"\\ea61"}),u.repo=new u("repo",{fontCharacter:"\\ea62"}),u.repoDelete=new u("repo-delete",{fontCharacter:"\\ea62"}),u.gistFork=new u("gist-fork",{fontCharacter:"\\ea63"}),u.repoForked=new u("repo-forked",{fontCharacter:"\\ea63"}),u.gitPullRequest=new u("git-pull-request",{fontCharacter:"\\ea64"}),u.gitPullRequestAbandoned=new u("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),u.recordKeys=new u("record-keys",{fontCharacter:"\\ea65"}),u.keyboard=new u("keyboard",{fontCharacter:"\\ea65"}),u.tag=new u("tag",{fontCharacter:"\\ea66"}),u.tagAdd=new u("tag-add",{fontCharacter:"\\ea66"}),u.tagRemove=new u("tag-remove",{fontCharacter:"\\ea66"}),u.person=new u("person",{fontCharacter:"\\ea67"}),u.personFollow=new u("person-follow",{fontCharacter:"\\ea67"}),u.personOutline=new u("person-outline",{fontCharacter:"\\ea67"}),u.personFilled=new u("person-filled",{fontCharacter:"\\ea67"}),u.gitBranch=new u("git-branch",{fontCharacter:"\\ea68"}),u.gitBranchCreate=new u("git-branch-create",{fontCharacter:"\\ea68"}),u.gitBranchDelete=new u("git-branch-delete",{fontCharacter:"\\ea68"}),u.sourceControl=new u("source-control",{fontCharacter:"\\ea68"}),u.mirror=new u("mirror",{fontCharacter:"\\ea69"}),u.mirrorPublic=new u("mirror-public",{fontCharacter:"\\ea69"}),u.star=new u("star",{fontCharacter:"\\ea6a"}),u.starAdd=new u("star-add",{fontCharacter:"\\ea6a"}),u.starDelete=new u("star-delete",{fontCharacter:"\\ea6a"}),u.starEmpty=new u("star-empty",{fontCharacter:"\\ea6a"}),u.comment=new u("comment",{fontCharacter:"\\ea6b"}),u.commentAdd=new u("comment-add",{fontCharacter:"\\ea6b"}),u.alert=new u("alert",{fontCharacter:"\\ea6c"}),u.warning=new u("warning",{fontCharacter:"\\ea6c"}),u.search=new u("search",{fontCharacter:"\\ea6d"}),u.searchSave=new u("search-save",{fontCharacter:"\\ea6d"}),u.logOut=new u("log-out",{fontCharacter:"\\ea6e"}),u.signOut=new u("sign-out",{fontCharacter:"\\ea6e"}),u.logIn=new u("log-in",{fontCharacter:"\\ea6f"}),u.signIn=new u("sign-in",{fontCharacter:"\\ea6f"}),u.eye=new u("eye",{fontCharacter:"\\ea70"}),u.eyeUnwatch=new u("eye-unwatch",{fontCharacter:"\\ea70"}),u.eyeWatch=new u("eye-watch",{fontCharacter:"\\ea70"}),u.circleFilled=new u("circle-filled",{fontCharacter:"\\ea71"}),u.primitiveDot=new u("primitive-dot",{fontCharacter:"\\ea71"}),u.closeDirty=new u("close-dirty",{fontCharacter:"\\ea71"}),u.debugBreakpoint=new u("debug-breakpoint",{fontCharacter:"\\ea71"}),u.debugBreakpointDisabled=new u("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),u.debugHint=new u("debug-hint",{fontCharacter:"\\ea71"}),u.primitiveSquare=new u("primitive-square",{fontCharacter:"\\ea72"}),u.edit=new u("edit",{fontCharacter:"\\ea73"}),u.pencil=new u("pencil",{fontCharacter:"\\ea73"}),u.info=new u("info",{fontCharacter:"\\ea74"}),u.issueOpened=new u("issue-opened",{fontCharacter:"\\ea74"}),u.gistPrivate=new u("gist-private",{fontCharacter:"\\ea75"}),u.gitForkPrivate=new u("git-fork-private",{fontCharacter:"\\ea75"}),u.lock=new u("lock",{fontCharacter:"\\ea75"}),u.mirrorPrivate=new u("mirror-private",{fontCharacter:"\\ea75"}),u.close=new u("close",{fontCharacter:"\\ea76"}),u.removeClose=new u("remove-close",{fontCharacter:"\\ea76"}),u.x=new u("x",{fontCharacter:"\\ea76"}),u.repoSync=new u("repo-sync",{fontCharacter:"\\ea77"}),u.sync=new u("sync",{fontCharacter:"\\ea77"}),u.clone=new u("clone",{fontCharacter:"\\ea78"}),u.desktopDownload=new u("desktop-download",{fontCharacter:"\\ea78"}),u.beaker=new u("beaker",{fontCharacter:"\\ea79"}),u.microscope=new u("microscope",{fontCharacter:"\\ea79"}),u.vm=new u("vm",{fontCharacter:"\\ea7a"}),u.deviceDesktop=new u("device-desktop",{fontCharacter:"\\ea7a"}),u.file=new u("file",{fontCharacter:"\\ea7b"}),u.fileText=new u("file-text",{fontCharacter:"\\ea7b"}),u.more=new u("more",{fontCharacter:"\\ea7c"}),u.ellipsis=new u("ellipsis",{fontCharacter:"\\ea7c"}),u.kebabHorizontal=new u("kebab-horizontal",{fontCharacter:"\\ea7c"}),u.mailReply=new u("mail-reply",{fontCharacter:"\\ea7d"}),u.reply=new u("reply",{fontCharacter:"\\ea7d"}),u.organization=new u("organization",{fontCharacter:"\\ea7e"}),u.organizationFilled=new u("organization-filled",{fontCharacter:"\\ea7e"}),u.organizationOutline=new u("organization-outline",{fontCharacter:"\\ea7e"}),u.newFile=new u("new-file",{fontCharacter:"\\ea7f"}),u.fileAdd=new u("file-add",{fontCharacter:"\\ea7f"}),u.newFolder=new u("new-folder",{fontCharacter:"\\ea80"}),u.fileDirectoryCreate=new u("file-directory-create",{fontCharacter:"\\ea80"}),u.trash=new u("trash",{fontCharacter:"\\ea81"}),u.trashcan=new u("trashcan",{fontCharacter:"\\ea81"}),u.history=new u("history",{fontCharacter:"\\ea82"}),u.clock=new u("clock",{fontCharacter:"\\ea82"}),u.folder=new u("folder",{fontCharacter:"\\ea83"}),u.fileDirectory=new u("file-directory",{fontCharacter:"\\ea83"}),u.symbolFolder=new u("symbol-folder",{fontCharacter:"\\ea83"}),u.logoGithub=new u("logo-github",{fontCharacter:"\\ea84"}),u.markGithub=new u("mark-github",{fontCharacter:"\\ea84"}),u.github=new u("github",{fontCharacter:"\\ea84"}),u.terminal=new u("terminal",{fontCharacter:"\\ea85"}),u.console=new u("console",{fontCharacter:"\\ea85"}),u.repl=new u("repl",{fontCharacter:"\\ea85"}),u.zap=new u("zap",{fontCharacter:"\\ea86"}),u.symbolEvent=new u("symbol-event",{fontCharacter:"\\ea86"}),u.error=new u("error",{fontCharacter:"\\ea87"}),u.stop=new u("stop",{fontCharacter:"\\ea87"}),u.variable=new u("variable",{fontCharacter:"\\ea88"}),u.symbolVariable=new u("symbol-variable",{fontCharacter:"\\ea88"}),u.array=new u("array",{fontCharacter:"\\ea8a"}),u.symbolArray=new u("symbol-array",{fontCharacter:"\\ea8a"}),u.symbolModule=new u("symbol-module",{fontCharacter:"\\ea8b"}),u.symbolPackage=new u("symbol-package",{fontCharacter:"\\ea8b"}),u.symbolNamespace=new u("symbol-namespace",{fontCharacter:"\\ea8b"}),u.symbolObject=new u("symbol-object",{fontCharacter:"\\ea8b"}),u.symbolMethod=new u("symbol-method",{fontCharacter:"\\ea8c"}),u.symbolFunction=new u("symbol-function",{fontCharacter:"\\ea8c"}),u.symbolConstructor=new u("symbol-constructor",{fontCharacter:"\\ea8c"}),u.symbolBoolean=new u("symbol-boolean",{fontCharacter:"\\ea8f"}),u.symbolNull=new u("symbol-null",{fontCharacter:"\\ea8f"}),u.symbolNumeric=new u("symbol-numeric",{fontCharacter:"\\ea90"}),u.symbolNumber=new u("symbol-number",{fontCharacter:"\\ea90"}),u.symbolStructure=new u("symbol-structure",{fontCharacter:"\\ea91"}),u.symbolStruct=new u("symbol-struct",{fontCharacter:"\\ea91"}),u.symbolParameter=new u("symbol-parameter",{fontCharacter:"\\ea92"}),u.symbolTypeParameter=new u("symbol-type-parameter",{fontCharacter:"\\ea92"}),u.symbolKey=new u("symbol-key",{fontCharacter:"\\ea93"}),u.symbolText=new u("symbol-text",{fontCharacter:"\\ea93"}),u.symbolReference=new u("symbol-reference",{fontCharacter:"\\ea94"}),u.goToFile=new u("go-to-file",{fontCharacter:"\\ea94"}),u.symbolEnum=new u("symbol-enum",{fontCharacter:"\\ea95"}),u.symbolValue=new u("symbol-value",{fontCharacter:"\\ea95"}),u.symbolRuler=new u("symbol-ruler",{fontCharacter:"\\ea96"}),u.symbolUnit=new u("symbol-unit",{fontCharacter:"\\ea96"}),u.activateBreakpoints=new u("activate-breakpoints",{fontCharacter:"\\ea97"}),u.archive=new u("archive",{fontCharacter:"\\ea98"}),u.arrowBoth=new u("arrow-both",{fontCharacter:"\\ea99"}),u.arrowDown=new u("arrow-down",{fontCharacter:"\\ea9a"}),u.arrowLeft=new u("arrow-left",{fontCharacter:"\\ea9b"}),u.arrowRight=new u("arrow-right",{fontCharacter:"\\ea9c"}),u.arrowSmallDown=new u("arrow-small-down",{fontCharacter:"\\ea9d"}),u.arrowSmallLeft=new u("arrow-small-left",{fontCharacter:"\\ea9e"}),u.arrowSmallRight=new u("arrow-small-right",{fontCharacter:"\\ea9f"}),u.arrowSmallUp=new u("arrow-small-up",{fontCharacter:"\\eaa0"}),u.arrowUp=new u("arrow-up",{fontCharacter:"\\eaa1"}),u.bell=new u("bell",{fontCharacter:"\\eaa2"}),u.bold=new u("bold",{fontCharacter:"\\eaa3"}),u.book=new u("book",{fontCharacter:"\\eaa4"}),u.bookmark=new u("bookmark",{fontCharacter:"\\eaa5"}),u.debugBreakpointConditionalUnverified=new u("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),u.debugBreakpointConditional=new u("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),u.debugBreakpointConditionalDisabled=new u("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),u.debugBreakpointDataUnverified=new u("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),u.debugBreakpointData=new u("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),u.debugBreakpointDataDisabled=new u("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),u.debugBreakpointLogUnverified=new u("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),u.debugBreakpointLog=new u("debug-breakpoint-log",{fontCharacter:"\\eaab"}),u.debugBreakpointLogDisabled=new u("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),u.briefcase=new u("briefcase",{fontCharacter:"\\eaac"}),u.broadcast=new u("broadcast",{fontCharacter:"\\eaad"}),u.browser=new u("browser",{fontCharacter:"\\eaae"}),u.bug=new u("bug",{fontCharacter:"\\eaaf"}),u.calendar=new u("calendar",{fontCharacter:"\\eab0"}),u.caseSensitive=new u("case-sensitive",{fontCharacter:"\\eab1"}),u.check=new u("check",{fontCharacter:"\\eab2"}),u.checklist=new u("checklist",{fontCharacter:"\\eab3"}),u.chevronDown=new u("chevron-down",{fontCharacter:"\\eab4"}),u.dropDownButton=new u("drop-down-button",u.chevronDown.definition),u.chevronLeft=new u("chevron-left",{fontCharacter:"\\eab5"}),u.chevronRight=new u("chevron-right",{fontCharacter:"\\eab6"}),u.chevronUp=new u("chevron-up",{fontCharacter:"\\eab7"}),u.chromeClose=new u("chrome-close",{fontCharacter:"\\eab8"}),u.chromeMaximize=new u("chrome-maximize",{fontCharacter:"\\eab9"}),u.chromeMinimize=new u("chrome-minimize",{fontCharacter:"\\eaba"}),u.chromeRestore=new u("chrome-restore",{fontCharacter:"\\eabb"}),u.circleOutline=new u("circle-outline",{fontCharacter:"\\eabc"}),u.debugBreakpointUnverified=new u("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),u.circleSlash=new u("circle-slash",{fontCharacter:"\\eabd"}),u.circuitBoard=new u("circuit-board",{fontCharacter:"\\eabe"}),u.clearAll=new u("clear-all",{fontCharacter:"\\eabf"}),u.clippy=new u("clippy",{fontCharacter:"\\eac0"}),u.closeAll=new u("close-all",{fontCharacter:"\\eac1"}),u.cloudDownload=new u("cloud-download",{fontCharacter:"\\eac2"}),u.cloudUpload=new u("cloud-upload",{fontCharacter:"\\eac3"}),u.code=new u("code",{fontCharacter:"\\eac4"}),u.collapseAll=new u("collapse-all",{fontCharacter:"\\eac5"}),u.colorMode=new u("color-mode",{fontCharacter:"\\eac6"}),u.commentDiscussion=new u("comment-discussion",{fontCharacter:"\\eac7"}),u.compareChanges=new u("compare-changes",{fontCharacter:"\\eafd"}),u.creditCard=new u("credit-card",{fontCharacter:"\\eac9"}),u.dash=new u("dash",{fontCharacter:"\\eacc"}),u.dashboard=new u("dashboard",{fontCharacter:"\\eacd"}),u.database=new u("database",{fontCharacter:"\\eace"}),u.debugContinue=new u("debug-continue",{fontCharacter:"\\eacf"}),u.debugDisconnect=new u("debug-disconnect",{fontCharacter:"\\ead0"}),u.debugPause=new u("debug-pause",{fontCharacter:"\\ead1"}),u.debugRestart=new u("debug-restart",{fontCharacter:"\\ead2"}),u.debugStart=new u("debug-start",{fontCharacter:"\\ead3"}),u.debugStepInto=new u("debug-step-into",{fontCharacter:"\\ead4"}),u.debugStepOut=new u("debug-step-out",{fontCharacter:"\\ead5"}),u.debugStepOver=new u("debug-step-over",{fontCharacter:"\\ead6"}),u.debugStop=new u("debug-stop",{fontCharacter:"\\ead7"}),u.debug=new u("debug",{fontCharacter:"\\ead8"}),u.deviceCameraVideo=new u("device-camera-video",{fontCharacter:"\\ead9"}),u.deviceCamera=new u("device-camera",{fontCharacter:"\\eada"}),u.deviceMobile=new u("device-mobile",{fontCharacter:"\\eadb"}),u.diffAdded=new u("diff-added",{fontCharacter:"\\eadc"}),u.diffIgnored=new u("diff-ignored",{fontCharacter:"\\eadd"}),u.diffModified=new u("diff-modified",{fontCharacter:"\\eade"}),u.diffRemoved=new u("diff-removed",{fontCharacter:"\\eadf"}),u.diffRenamed=new u("diff-renamed",{fontCharacter:"\\eae0"}),u.diff=new u("diff",{fontCharacter:"\\eae1"}),u.discard=new u("discard",{fontCharacter:"\\eae2"}),u.editorLayout=new u("editor-layout",{fontCharacter:"\\eae3"}),u.emptyWindow=new u("empty-window",{fontCharacter:"\\eae4"}),u.exclude=new u("exclude",{fontCharacter:"\\eae5"}),u.extensions=new u("extensions",{fontCharacter:"\\eae6"}),u.eyeClosed=new u("eye-closed",{fontCharacter:"\\eae7"}),u.fileBinary=new u("file-binary",{fontCharacter:"\\eae8"}),u.fileCode=new u("file-code",{fontCharacter:"\\eae9"}),u.fileMedia=new u("file-media",{fontCharacter:"\\eaea"}),u.filePdf=new u("file-pdf",{fontCharacter:"\\eaeb"}),u.fileSubmodule=new u("file-submodule",{fontCharacter:"\\eaec"}),u.fileSymlinkDirectory=new u("file-symlink-directory",{fontCharacter:"\\eaed"}),u.fileSymlinkFile=new u("file-symlink-file",{fontCharacter:"\\eaee"}),u.fileZip=new u("file-zip",{fontCharacter:"\\eaef"}),u.files=new u("files",{fontCharacter:"\\eaf0"}),u.filter=new u("filter",{fontCharacter:"\\eaf1"}),u.flame=new u("flame",{fontCharacter:"\\eaf2"}),u.foldDown=new u("fold-down",{fontCharacter:"\\eaf3"}),u.foldUp=new u("fold-up",{fontCharacter:"\\eaf4"}),u.fold=new u("fold",{fontCharacter:"\\eaf5"}),u.folderActive=new u("folder-active",{fontCharacter:"\\eaf6"}),u.folderOpened=new u("folder-opened",{fontCharacter:"\\eaf7"}),u.gear=new u("gear",{fontCharacter:"\\eaf8"}),u.gift=new u("gift",{fontCharacter:"\\eaf9"}),u.gistSecret=new u("gist-secret",{fontCharacter:"\\eafa"}),u.gist=new u("gist",{fontCharacter:"\\eafb"}),u.gitCommit=new u("git-commit",{fontCharacter:"\\eafc"}),u.gitCompare=new u("git-compare",{fontCharacter:"\\eafd"}),u.gitMerge=new u("git-merge",{fontCharacter:"\\eafe"}),u.githubAction=new u("github-action",{fontCharacter:"\\eaff"}),u.githubAlt=new u("github-alt",{fontCharacter:"\\eb00"}),u.globe=new u("globe",{fontCharacter:"\\eb01"}),u.grabber=new u("grabber",{fontCharacter:"\\eb02"}),u.graph=new u("graph",{fontCharacter:"\\eb03"}),u.gripper=new u("gripper",{fontCharacter:"\\eb04"}),u.heart=new u("heart",{fontCharacter:"\\eb05"}),u.home=new u("home",{fontCharacter:"\\eb06"}),u.horizontalRule=new u("horizontal-rule",{fontCharacter:"\\eb07"}),u.hubot=new u("hubot",{fontCharacter:"\\eb08"}),u.inbox=new u("inbox",{fontCharacter:"\\eb09"}),u.issueClosed=new u("issue-closed",{fontCharacter:"\\eba4"}),u.issueReopened=new u("issue-reopened",{fontCharacter:"\\eb0b"}),u.issues=new u("issues",{fontCharacter:"\\eb0c"}),u.italic=new u("italic",{fontCharacter:"\\eb0d"}),u.jersey=new u("jersey",{fontCharacter:"\\eb0e"}),u.json=new u("json",{fontCharacter:"\\eb0f"}),u.kebabVertical=new u("kebab-vertical",{fontCharacter:"\\eb10"}),u.key=new u("key",{fontCharacter:"\\eb11"}),u.law=new u("law",{fontCharacter:"\\eb12"}),u.lightbulbAutofix=new u("lightbulb-autofix",{fontCharacter:"\\eb13"}),u.linkExternal=new u("link-external",{fontCharacter:"\\eb14"}),u.link=new u("link",{fontCharacter:"\\eb15"}),u.listOrdered=new u("list-ordered",{fontCharacter:"\\eb16"}),u.listUnordered=new u("list-unordered",{fontCharacter:"\\eb17"}),u.liveShare=new u("live-share",{fontCharacter:"\\eb18"}),u.loading=new u("loading",{fontCharacter:"\\eb19"}),u.location=new u("location",{fontCharacter:"\\eb1a"}),u.mailRead=new u("mail-read",{fontCharacter:"\\eb1b"}),u.mail=new u("mail",{fontCharacter:"\\eb1c"}),u.markdown=new u("markdown",{fontCharacter:"\\eb1d"}),u.megaphone=new u("megaphone",{fontCharacter:"\\eb1e"}),u.mention=new u("mention",{fontCharacter:"\\eb1f"}),u.milestone=new u("milestone",{fontCharacter:"\\eb20"}),u.mortarBoard=new u("mortar-board",{fontCharacter:"\\eb21"}),u.move=new u("move",{fontCharacter:"\\eb22"}),u.multipleWindows=new u("multiple-windows",{fontCharacter:"\\eb23"}),u.mute=new u("mute",{fontCharacter:"\\eb24"}),u.noNewline=new u("no-newline",{fontCharacter:"\\eb25"}),u.note=new u("note",{fontCharacter:"\\eb26"}),u.octoface=new u("octoface",{fontCharacter:"\\eb27"}),u.openPreview=new u("open-preview",{fontCharacter:"\\eb28"}),u.package_=new u("package",{fontCharacter:"\\eb29"}),u.paintcan=new u("paintcan",{fontCharacter:"\\eb2a"}),u.pin=new u("pin",{fontCharacter:"\\eb2b"}),u.play=new u("play",{fontCharacter:"\\eb2c"}),u.run=new u("run",{fontCharacter:"\\eb2c"}),u.plug=new u("plug",{fontCharacter:"\\eb2d"}),u.preserveCase=new u("preserve-case",{fontCharacter:"\\eb2e"}),u.preview=new u("preview",{fontCharacter:"\\eb2f"}),u.project=new u("project",{fontCharacter:"\\eb30"}),u.pulse=new u("pulse",{fontCharacter:"\\eb31"}),u.question=new u("question",{fontCharacter:"\\eb32"}),u.quote=new u("quote",{fontCharacter:"\\eb33"}),u.radioTower=new u("radio-tower",{fontCharacter:"\\eb34"}),u.reactions=new u("reactions",{fontCharacter:"\\eb35"}),u.references=new u("references",{fontCharacter:"\\eb36"}),u.refresh=new u("refresh",{fontCharacter:"\\eb37"}),u.regex=new u("regex",{fontCharacter:"\\eb38"}),u.remoteExplorer=new u("remote-explorer",{fontCharacter:"\\eb39"}),u.remote=new u("remote",{fontCharacter:"\\eb3a"}),u.remove=new u("remove",{fontCharacter:"\\eb3b"}),u.replaceAll=new u("replace-all",{fontCharacter:"\\eb3c"}),u.replace=new u("replace",{fontCharacter:"\\eb3d"}),u.repoClone=new u("repo-clone",{fontCharacter:"\\eb3e"}),u.repoForcePush=new u("repo-force-push",{fontCharacter:"\\eb3f"}),u.repoPull=new u("repo-pull",{fontCharacter:"\\eb40"}),u.repoPush=new u("repo-push",{fontCharacter:"\\eb41"}),u.report=new u("report",{fontCharacter:"\\eb42"}),u.requestChanges=new u("request-changes",{fontCharacter:"\\eb43"}),u.rocket=new u("rocket",{fontCharacter:"\\eb44"}),u.rootFolderOpened=new u("root-folder-opened",{fontCharacter:"\\eb45"}),u.rootFolder=new u("root-folder",{fontCharacter:"\\eb46"}),u.rss=new u("rss",{fontCharacter:"\\eb47"}),u.ruby=new u("ruby",{fontCharacter:"\\eb48"}),u.saveAll=new u("save-all",{fontCharacter:"\\eb49"}),u.saveAs=new u("save-as",{fontCharacter:"\\eb4a"}),u.save=new u("save",{fontCharacter:"\\eb4b"}),u.screenFull=new u("screen-full",{fontCharacter:"\\eb4c"}),u.screenNormal=new u("screen-normal",{fontCharacter:"\\eb4d"}),u.searchStop=new u("search-stop",{fontCharacter:"\\eb4e"}),u.server=new u("server",{fontCharacter:"\\eb50"}),u.settingsGear=new u("settings-gear",{fontCharacter:"\\eb51"}),u.settings=new u("settings",{fontCharacter:"\\eb52"}),u.shield=new u("shield",{fontCharacter:"\\eb53"}),u.smiley=new u("smiley",{fontCharacter:"\\eb54"}),u.sortPrecedence=new u("sort-precedence",{fontCharacter:"\\eb55"}),u.splitHorizontal=new u("split-horizontal",{fontCharacter:"\\eb56"}),u.splitVertical=new u("split-vertical",{fontCharacter:"\\eb57"}),u.squirrel=new u("squirrel",{fontCharacter:"\\eb58"}),u.starFull=new u("star-full",{fontCharacter:"\\eb59"}),u.starHalf=new u("star-half",{fontCharacter:"\\eb5a"}),u.symbolClass=new u("symbol-class",{fontCharacter:"\\eb5b"}),u.symbolColor=new u("symbol-color",{fontCharacter:"\\eb5c"}),u.symbolConstant=new u("symbol-constant",{fontCharacter:"\\eb5d"}),u.symbolEnumMember=new u("symbol-enum-member",{fontCharacter:"\\eb5e"}),u.symbolField=new u("symbol-field",{fontCharacter:"\\eb5f"}),u.symbolFile=new u("symbol-file",{fontCharacter:"\\eb60"}),u.symbolInterface=new u("symbol-interface",{fontCharacter:"\\eb61"}),u.symbolKeyword=new u("symbol-keyword",{fontCharacter:"\\eb62"}),u.symbolMisc=new u("symbol-misc",{fontCharacter:"\\eb63"}),u.symbolOperator=new u("symbol-operator",{fontCharacter:"\\eb64"}),u.symbolProperty=new u("symbol-property",{fontCharacter:"\\eb65"}),u.wrench=new u("wrench",{fontCharacter:"\\eb65"}),u.wrenchSubaction=new u("wrench-subaction",{fontCharacter:"\\eb65"}),u.symbolSnippet=new u("symbol-snippet",{fontCharacter:"\\eb66"}),u.tasklist=new u("tasklist",{fontCharacter:"\\eb67"}),u.telescope=new u("telescope",{fontCharacter:"\\eb68"}),u.textSize=new u("text-size",{fontCharacter:"\\eb69"}),u.threeBars=new u("three-bars",{fontCharacter:"\\eb6a"}),u.thumbsdown=new u("thumbsdown",{fontCharacter:"\\eb6b"}),u.thumbsup=new u("thumbsup",{fontCharacter:"\\eb6c"}),u.tools=new u("tools",{fontCharacter:"\\eb6d"}),u.triangleDown=new u("triangle-down",{fontCharacter:"\\eb6e"}),u.triangleLeft=new u("triangle-left",{fontCharacter:"\\eb6f"}),u.triangleRight=new u("triangle-right",{fontCharacter:"\\eb70"}),u.triangleUp=new u("triangle-up",{fontCharacter:"\\eb71"}),u.twitter=new u("twitter",{fontCharacter:"\\eb72"}),u.unfold=new u("unfold",{fontCharacter:"\\eb73"}),u.unlock=new u("unlock",{fontCharacter:"\\eb74"}),u.unmute=new u("unmute",{fontCharacter:"\\eb75"}),u.unverified=new u("unverified",{fontCharacter:"\\eb76"}),u.verified=new u("verified",{fontCharacter:"\\eb77"}),u.versions=new u("versions",{fontCharacter:"\\eb78"}),u.vmActive=new u("vm-active",{fontCharacter:"\\eb79"}),u.vmOutline=new u("vm-outline",{fontCharacter:"\\eb7a"}),u.vmRunning=new u("vm-running",{fontCharacter:"\\eb7b"}),u.watch=new u("watch",{fontCharacter:"\\eb7c"}),u.whitespace=new u("whitespace",{fontCharacter:"\\eb7d"}),u.wholeWord=new u("whole-word",{fontCharacter:"\\eb7e"}),u.window=new u("window",{fontCharacter:"\\eb7f"}),u.wordWrap=new u("word-wrap",{fontCharacter:"\\eb80"}),u.zoomIn=new u("zoom-in",{fontCharacter:"\\eb81"}),u.zoomOut=new u("zoom-out",{fontCharacter:"\\eb82"}),u.listFilter=new u("list-filter",{fontCharacter:"\\eb83"}),u.listFlat=new u("list-flat",{fontCharacter:"\\eb84"}),u.listSelection=new u("list-selection",{fontCharacter:"\\eb85"}),u.selection=new u("selection",{fontCharacter:"\\eb85"}),u.listTree=new u("list-tree",{fontCharacter:"\\eb86"}),u.debugBreakpointFunctionUnverified=new u("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),u.debugBreakpointFunction=new u("debug-breakpoint-function",{fontCharacter:"\\eb88"}),u.debugBreakpointFunctionDisabled=new u("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),u.debugStackframeActive=new u("debug-stackframe-active",{fontCharacter:"\\eb89"}),u.debugStackframeDot=new u("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),u.debugStackframe=new u("debug-stackframe",{fontCharacter:"\\eb8b"}),u.debugStackframeFocused=new u("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),u.debugBreakpointUnsupported=new u("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),u.symbolString=new u("symbol-string",{fontCharacter:"\\eb8d"}),u.debugReverseContinue=new u("debug-reverse-continue",{fontCharacter:"\\eb8e"}),u.debugStepBack=new u("debug-step-back",{fontCharacter:"\\eb8f"}),u.debugRestartFrame=new u("debug-restart-frame",{fontCharacter:"\\eb90"}),u.callIncoming=new u("call-incoming",{fontCharacter:"\\eb92"}),u.callOutgoing=new u("call-outgoing",{fontCharacter:"\\eb93"}),u.menu=new u("menu",{fontCharacter:"\\eb94"}),u.expandAll=new u("expand-all",{fontCharacter:"\\eb95"}),u.feedback=new u("feedback",{fontCharacter:"\\eb96"}),u.groupByRefType=new u("group-by-ref-type",{fontCharacter:"\\eb97"}),u.ungroupByRefType=new u("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),u.account=new u("account",{fontCharacter:"\\eb99"}),u.bellDot=new u("bell-dot",{fontCharacter:"\\eb9a"}),u.debugConsole=new u("debug-console",{fontCharacter:"\\eb9b"}),u.library=new u("library",{fontCharacter:"\\eb9c"}),u.output=new u("output",{fontCharacter:"\\eb9d"}),u.runAll=new u("run-all",{fontCharacter:"\\eb9e"}),u.syncIgnored=new u("sync-ignored",{fontCharacter:"\\eb9f"}),u.pinned=new u("pinned",{fontCharacter:"\\eba0"}),u.githubInverted=new u("github-inverted",{fontCharacter:"\\eba1"}),u.debugAlt=new u("debug-alt",{fontCharacter:"\\eb91"}),u.serverProcess=new u("server-process",{fontCharacter:"\\eba2"}),u.serverEnvironment=new u("server-environment",{fontCharacter:"\\eba3"}),u.pass=new u("pass",{fontCharacter:"\\eba4"}),u.stopCircle=new u("stop-circle",{fontCharacter:"\\eba5"}),u.playCircle=new u("play-circle",{fontCharacter:"\\eba6"}),u.record=new u("record",{fontCharacter:"\\eba7"}),u.debugAltSmall=new u("debug-alt-small",{fontCharacter:"\\eba8"}),u.vmConnect=new u("vm-connect",{fontCharacter:"\\eba9"}),u.cloud=new u("cloud",{fontCharacter:"\\ebaa"}),u.merge=new u("merge",{fontCharacter:"\\ebab"}),u.exportIcon=new u("export",{fontCharacter:"\\ebac"}),u.graphLeft=new u("graph-left",{fontCharacter:"\\ebad"}),u.magnet=new u("magnet",{fontCharacter:"\\ebae"}),u.notebook=new u("notebook",{fontCharacter:"\\ebaf"}),u.redo=new u("redo",{fontCharacter:"\\ebb0"}),u.checkAll=new u("check-all",{fontCharacter:"\\ebb1"}),u.pinnedDirty=new u("pinned-dirty",{fontCharacter:"\\ebb2"}),u.passFilled=new u("pass-filled",{fontCharacter:"\\ebb3"}),u.circleLargeFilled=new u("circle-large-filled",{fontCharacter:"\\ebb4"}),u.circleLargeOutline=new u("circle-large-outline",{fontCharacter:"\\ebb5"}),u.combine=new u("combine",{fontCharacter:"\\ebb6"}),u.gather=new u("gather",{fontCharacter:"\\ebb6"}),u.table=new u("table",{fontCharacter:"\\ebb7"}),u.variableGroup=new u("variable-group",{fontCharacter:"\\ebb8"}),u.typeHierarchy=new u("type-hierarchy",{fontCharacter:"\\ebb9"}),u.typeHierarchySub=new u("type-hierarchy-sub",{fontCharacter:"\\ebba"}),u.typeHierarchySuper=new u("type-hierarchy-super",{fontCharacter:"\\ebbb"}),u.gitPullRequestCreate=new u("git-pull-request-create",{fontCharacter:"\\ebbc"}),u.runAbove=new u("run-above",{fontCharacter:"\\ebbd"}),u.runBelow=new u("run-below",{fontCharacter:"\\ebbe"}),u.notebookTemplate=new u("notebook-template",{fontCharacter:"\\ebbf"}),u.debugRerun=new u("debug-rerun",{fontCharacter:"\\ebc0"}),u.workspaceTrusted=new u("workspace-trusted",{fontCharacter:"\\ebc1"}),u.workspaceUntrusted=new u("workspace-untrusted",{fontCharacter:"\\ebc2"}),u.workspaceUnspecified=new u("workspace-unspecified",{fontCharacter:"\\ebc3"}),u.terminalCmd=new u("terminal-cmd",{fontCharacter:"\\ebc4"}),u.terminalDebian=new u("terminal-debian",{fontCharacter:"\\ebc5"}),u.terminalLinux=new u("terminal-linux",{fontCharacter:"\\ebc6"}),u.terminalPowershell=new u("terminal-powershell",{fontCharacter:"\\ebc7"}),u.terminalTmux=new u("terminal-tmux",{fontCharacter:"\\ebc8"}),u.terminalUbuntu=new u("terminal-ubuntu",{fontCharacter:"\\ebc9"}),u.terminalBash=new u("terminal-bash",{fontCharacter:"\\ebca"}),u.arrowSwap=new u("arrow-swap",{fontCharacter:"\\ebcb"}),u.copy=new u("copy",{fontCharacter:"\\ebcc"}),u.personAdd=new u("person-add",{fontCharacter:"\\ebcd"}),u.filterFilled=new u("filter-filled",{fontCharacter:"\\ebce"}),u.wand=new u("wand",{fontCharacter:"\\ebcf"}),u.debugLineByLine=new u("debug-line-by-line",{fontCharacter:"\\ebd0"}),u.inspect=new u("inspect",{fontCharacter:"\\ebd1"}),u.layers=new u("layers",{fontCharacter:"\\ebd2"}),u.layersDot=new u("layers-dot",{fontCharacter:"\\ebd3"}),u.layersActive=new u("layers-active",{fontCharacter:"\\ebd4"}),u.compass=new u("compass",{fontCharacter:"\\ebd5"}),u.compassDot=new u("compass-dot",{fontCharacter:"\\ebd6"}),u.compassActive=new u("compass-active",{fontCharacter:"\\ebd7"}),u.azure=new u("azure",{fontCharacter:"\\ebd8"}),u.issueDraft=new u("issue-draft",{fontCharacter:"\\ebd9"}),u.gitPullRequestClosed=new u("git-pull-request-closed",{fontCharacter:"\\ebda"}),u.gitPullRequestDraft=new u("git-pull-request-draft",{fontCharacter:"\\ebdb"}),u.debugAll=new u("debug-all",{fontCharacter:"\\ebdc"}),u.debugCoverage=new u("debug-coverage",{fontCharacter:"\\ebdd"}),u.runErrors=new u("run-errors",{fontCharacter:"\\ebde"}),u.folderLibrary=new u("folder-library",{fontCharacter:"\\ebdf"}),u.debugContinueSmall=new u("debug-continue-small",{fontCharacter:"\\ebe0"}),u.beakerStop=new u("beaker-stop",{fontCharacter:"\\ebe1"}),u.graphLine=new u("graph-line",{fontCharacter:"\\ebe2"}),u.graphScatter=new u("graph-scatter",{fontCharacter:"\\ebe3"}),u.pieChart=new u("pie-chart",{fontCharacter:"\\ebe4"}),u.bracket=new u("bracket",u.json.definition),u.bracketDot=new u("bracket-dot",{fontCharacter:"\\ebe5"}),u.bracketError=new u("bracket-error",{fontCharacter:"\\ebe6"}),u.lockSmall=new u("lock-small",{fontCharacter:"\\ebe7"}),u.azureDevops=new u("azure-devops",{fontCharacter:"\\ebe8"}),u.verifiedFilled=new u("verified-filled",{fontCharacter:"\\ebe9"})}(ge||(ge={}))},79881:function(dr,vt,K){"use strict";K.d(vt,{B8:function(){return D},Cp:function(){return he},F0:function(){return O},L6:function(){return q},VV:function(){return ge},b1:function(){return u},dL:function(){return Se},ri:function(){return W}});class V{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(_){setTimeout(()=>{throw _.stack?new Error(_.message+`
`+_.stack):_},0)}}emit(_){this.listeners.forEach(C=>{C(_)})}onUnexpectedError(_){this.unexpectedErrorHandler(_),this.emit(_)}onUnexpectedExternalError(_){this.unexpectedErrorHandler(_)}}const me=new V;function Se(y){ge(y)||me.onUnexpectedError(y)}function he(y){ge(y)||me.onUnexpectedExternalError(y)}function W(y){if(y instanceof Error){let{name:_,message:C}=y;const x=y.stacktrace||y.stack;return{$isError:!0,name:_,message:C,stack:x}}return y}const m="Canceled";function ge(y){return y instanceof Error&&y.name===m&&y.message===m}function O(){const y=new Error(m);return y.name=y.message,y}function u(y){return y?new Error(`Illegal argument: ${y}`):new Error("Illegal argument")}function q(y){return y?new Error(`Illegal state: ${y}`):new Error("Illegal state")}class D extends Error{constructor(_){super("NotSupported"),_&&(this.message=_)}}},4348:function(dr,vt,K){"use strict";K.d(vt,{D0:function(){return D},E7:function(){return y},K3:function(){return q},Q5:function(){return u},ZD:function(){return _},ju:function(){return W}});var V=K(79881),me=K(69323),Se=K(34502),he=K(95830),W;(function(C){C.None=()=>me.JT.None;function x(G){return(z,se=null,re)=>{let w=!1,B;return B=G($=>{if(!w)return B?B.dispose():w=!0,z.call(se,$)},null,re),w&&B.dispose(),B}}C.once=x;function j(G,z){return fe((se,re=null,w)=>G(B=>se.call(re,z(B)),null,w))}C.map=j;function M(G,z){return fe((se,re=null,w)=>G(B=>{z(B),se.call(re,B)},null,w))}C.forEach=M;function H(G,z){return fe((se,re=null,w)=>G(B=>z(B)&&se.call(re,B),null,w))}C.filter=H;function R(G){return G}C.signal=R;function P(...G){return(z,se=null,re)=>(0,me.F8)(...G.map(w=>w(B=>z.call(se,B),null,re)))}C.any=P;function X(G,z,se){let re=se;return j(G,w=>(re=z(re,w),re))}C.reduce=X;function fe(G){let z;const se=new u({onFirstListenerAdd(){z=G(se.fire,se)},onLastListenerRemove(){z.dispose()}});return se.event}function _e(G,z,se=100,re=!1,w){let B,$,ae,$e=0;const qe=new u({leakWarningThreshold:w,onFirstListenerAdd(){B=G(Bt=>{$e++,$=z($,Bt),re&&!ae&&(qe.fire($),$=void 0),clearTimeout(ae),ae=setTimeout(()=>{const pt=$;$=void 0,ae=void 0,(!re||$e>1)&&qe.fire(pt),$e=0},se)})},onLastListenerRemove(){B.dispose()}});return qe.event}C.debounce=_e;function we(G,z=(se,re)=>se===re){let se=!0,re;return H(G,w=>{const B=se||!z(w,re);return se=!1,re=w,B})}C.latch=we;function ie(G,z){return[C.filter(G,z),C.filter(G,se=>!z(se))]}C.split=ie;function ye(G,z=!1,se=[]){let re=se.slice(),w=G(ae=>{re?re.push(ae):$.fire(ae)});const B=()=>{re&&re.forEach(ae=>$.fire(ae)),re=null},$=new u({onFirstListenerAdd(){w||(w=G(ae=>$.fire(ae)))},onFirstListenerDidAdd(){re&&(z?setTimeout(B):B())},onLastListenerRemove(){w&&w.dispose(),w=null}});return $.event}C.buffer=ye;class Pe{constructor(z){this.event=z}map(z){return new Pe(j(this.event,z))}forEach(z){return new Pe(M(this.event,z))}filter(z){return new Pe(H(this.event,z))}reduce(z,se){return new Pe(X(this.event,z,se))}latch(){return new Pe(we(this.event))}debounce(z,se=100,re=!1,w){return new Pe(_e(this.event,z,se,re,w))}on(z,se,re){return this.event(z,se,re)}once(z,se,re){return x(this.event)(z,se,re)}}function ue(G){return new Pe(G)}C.chain=ue;function Me(G,z,se=re=>re){const re=(...ae)=>$.fire(se(...ae)),w=()=>G.on(z,re),B=()=>G.removeListener(z,re),$=new u({onFirstListenerAdd:w,onLastListenerRemove:B});return $.event}C.fromNodeEventEmitter=Me;function Z(G,z,se=re=>re){const re=(...ae)=>$.fire(se(...ae)),w=()=>G.addEventListener(z,re),B=()=>G.removeEventListener(z,re),$=new u({onFirstListenerAdd:w,onLastListenerRemove:B});return $.event}C.fromDOMEventEmitter=Z;function I(G){return new Promise(z=>x(G)(z))}C.toPromise=I})(W||(W={}));class m{constructor(x){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${x}_${m._idPool++}`}start(x){this._stopWatch=new he.G(!0),this._listenerCount=x}stop(){if(this._stopWatch){const x=this._stopWatch.elapsed();this._elapsedOverall+=x,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${x.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let ge=-1;class O{constructor(x,j=Math.random().toString(18).slice(2,5)){this.customThreshold=x,this.name=j,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(x){let j=ge;if(typeof this.customThreshold=="number"&&(j=this.customThreshold),j<=0||x<j)return;this._stacks||(this._stacks=new Map);const M=new Error().stack.split(`
`).slice(3).join(`
`),H=this._stacks.get(M)||0;if(this._stacks.set(M,H+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=j*.5;let R,P=0;for(const[X,fe]of this._stacks)(!R||P<fe)&&(R=X,P=fe);console.warn(`[${this.name}] potential listener LEAK detected, having ${x} listeners already. MOST frequent listener (${P}):`),console.warn(R)}return()=>{const R=this._stacks.get(M)||0;this._stacks.set(M,R-1)}}}class u{constructor(x){var j;this._disposed=!1,this._options=x,this._leakageMon=ge>0?new O(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((j=this._options)===null||j===void 0)&&j._profName?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(x,j,M)=>{var H;this._listeners||(this._listeners=new Se.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const P=this._listeners.push(j?[x,j]:x);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,x,j);const X=(H=this._leakageMon)===null||H===void 0?void 0:H.check(this._listeners.size),fe=(0,me.OF)(()=>{X&&X(),this._disposed||(P(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return M instanceof me.SL?M.add(fe):Array.isArray(M)&&M.push(fe),fe}),this._event}fire(x){var j,M;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Se.S);for(let H of this._listeners)this._deliveryQueue.push([H,x]);for((j=this._perfMon)===null||j===void 0||j.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[H,R]=this._deliveryQueue.shift();try{typeof H=="function"?H.call(void 0,R):H[0].call(H[1],R)}catch(P){(0,V.dL)(P)}}(M=this._perfMon)===null||M===void 0||M.stop()}}dispose(){var x,j,M,H,R;this._disposed||(this._disposed=!0,(x=this._listeners)===null||x===void 0||x.clear(),(j=this._deliveryQueue)===null||j===void 0||j.clear(),(H=(M=this._options)===null||M===void 0?void 0:M.onLastListenerRemove)===null||H===void 0||H.call(M),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class q extends u{constructor(x){super(x),this._isPaused=0,this._eventQueue=new Se.S,this._mergeFn=x==null?void 0:x.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const x=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(x))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(x){this._listeners&&(this._isPaused!==0?this._eventQueue.push(x):super.fire(x))}}class D extends q{constructor(x){var j;super(x),this._delay=(j=x.delay)!==null&&j!==void 0?j:100}fire(x){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(x)}}class y{constructor(){this.buffers=[]}wrapEvent(x){return(j,M,H)=>x(R=>{const P=this.buffers[this.buffers.length-1];P?P.push(()=>j.call(M,R)):j.call(M,R)},void 0,H)}bufferEvents(x){const j=[];this.buffers.push(j);const M=x();return this.buffers.pop(),j.forEach(H=>H()),M}}class _{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=me.JT.None,this.emitter=new u({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(x){this.inputEvent=x,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=x(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(dr,vt,K){"use strict";K.d(vt,{I:function(){return V}});function V(me){const Se=this;let he=!1,W;return function(){return he||(he=!0,W=me.apply(Se,arguments)),W}}},88226:function(dr,vt,K){"use strict";K.d(vt,{$:function(){return V}});var V;(function(me){function Se(P){return P&&typeof P=="object"&&typeof P[Symbol.iterator]=="function"}me.is=Se;const he=Object.freeze([]);function W(){return he}me.empty=W;function*m(P){yield P}me.single=m;function ge(P){return P||he}me.from=ge;function O(P){return!P||P[Symbol.iterator]().next().done===!0}me.isEmpty=O;function u(P){return P[Symbol.iterator]().next().value}me.first=u;function q(P,X){for(const fe of P)if(X(fe))return!0;return!1}me.some=q;function D(P,X){for(const fe of P)if(X(fe))return fe}me.find=D;function*y(P,X){for(const fe of P)X(fe)&&(yield fe)}me.filter=y;function*_(P,X){let fe=0;for(const _e of P)yield X(_e,fe++)}me.map=_;function*C(...P){for(const X of P)for(const fe of X)yield fe}me.concat=C;function*x(P){for(const X of P)for(const fe of X)yield fe}me.concatNested=x;function j(P,X,fe){let _e=fe;for(const we of P)_e=X(_e,we);return _e}me.reduce=j;function*M(P,X,fe=P.length){for(X<0&&(X+=P.length),fe<0?fe+=P.length:fe>P.length&&(fe=P.length);X<fe;X++)yield P[X]}me.slice=M;function H(P,X=Number.POSITIVE_INFINITY){const fe=[];if(X===0)return[fe,P];const _e=P[Symbol.iterator]();for(let we=0;we<X;we++){const ie=_e.next();if(ie.done)return[fe,me.empty()];fe.push(ie.value)}return[fe,{[Symbol.iterator](){return _e}}]}me.consume=H;function R(P,X,fe=(_e,we)=>_e===we){const _e=P[Symbol.iterator](),we=X[Symbol.iterator]();for(;;){const ie=_e.next(),ye=we.next();if(ie.done!==ye.done)return!1;if(ie.done)return!0;if(!fe(ie.value,ye.value))return!1}}me.equals=R})(V||(V={}))},69323:function(dr,vt,K){"use strict";K.d(vt,{B9:function(){return _},F8:function(){return C},JT:function(){return M},Jz:function(){return R},OF:function(){return x},SL:function(){return j},Wf:function(){return y},XK:function(){return H},dk:function(){return q}});var V=K(17845),me=K(88226);const Se=!1;let he=null;function W(P){he=P}if(Se){const P="__is_disposable_tracked__";W(new class{trackDisposable(X){const fe=new Error("Potentially leaked disposable").stack;setTimeout(()=>{X[P]||console.log(fe)},3e3)}setParent(X,fe){if(X&&X!==M.None)try{X[P]=!0}catch(_e){}}markAsDisposed(X){if(X&&X!==M.None)try{X[P]=!0}catch(fe){}}markAsSingleton(X){}})}function m(P){return he==null||he.trackDisposable(P),P}function ge(P){he==null||he.markAsDisposed(P)}function O(P,X){he==null||he.setParent(P,X)}function u(P,X){if(he)for(const fe of P)he.setParent(fe,X)}function q(P){return he==null||he.markAsSingleton(P),P}class D extends Error{constructor(X){super(`Encountered errors while disposing of store. Errors: [${X.join(", ")}]`),this.errors=X}}function y(P){return typeof P.dispose=="function"&&P.dispose.length===0}function _(P){if(me.$.is(P)){let X=[];for(const fe of P)if(fe)try{fe.dispose()}catch(_e){X.push(_e)}if(X.length===1)throw X[0];if(X.length>1)throw new D(X);return Array.isArray(P)?[]:P}else if(P)return P.dispose(),P}function C(...P){const X=x(()=>_(P));return u(P,X),X}function x(P){const X=m({dispose:(0,V.I)(()=>{ge(X),P()})});return X}class j{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(ge(this),this._isDisposed=!0,this.clear())}clear(){try{_(this._toDispose.values())}finally{this._toDispose.clear()}}add(X){if(!X)return X;if(X===this)throw new Error("Cannot register a disposable on itself!");return O(X,this),this._isDisposed?j.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(X),X}}j.DISABLE_DISPOSED_WARNING=!1;class M{constructor(){this._store=new j,m(this),O(this._store,this)}dispose(){ge(this),this._store.dispose()}_register(X){if(X===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(X)}}M.None=Object.freeze({dispose(){}});class H{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(X){var fe;this._isDisposed||X===this._value||((fe=this._value)===null||fe===void 0||fe.dispose(),X&&O(X,this),this._value=X)}clear(){this.value=void 0}dispose(){var X;this._isDisposed=!0,ge(this),(X=this._value)===null||X===void 0||X.dispose(),this._value=void 0}clearAndLeak(){const X=this._value;return this._value=void 0,X&&O(X,null),X}}class R{constructor(X){this.object=X}dispose(){}}},34502:function(dr,vt,K){"use strict";K.d(vt,{S:function(){return me}});class V{constructor(he){this.element=he,this.next=V.Undefined,this.prev=V.Undefined}}V.Undefined=new V(void 0);class me{constructor(){this._first=V.Undefined,this._last=V.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===V.Undefined}clear(){let he=this._first;for(;he!==V.Undefined;){const W=he.next;he.prev=V.Undefined,he.next=V.Undefined,he=W}this._first=V.Undefined,this._last=V.Undefined,this._size=0}unshift(he){return this._insert(he,!1)}push(he){return this._insert(he,!0)}_insert(he,W){const m=new V(he);if(this._first===V.Undefined)this._first=m,this._last=m;else if(W){const O=this._last;this._last=m,m.prev=O,O.next=m}else{const O=this._first;this._first=m,m.next=O,O.prev=m}this._size+=1;let ge=!1;return()=>{ge||(ge=!0,this._remove(m))}}shift(){if(this._first!==V.Undefined){const he=this._first.element;return this._remove(this._first),he}}pop(){if(this._last!==V.Undefined){const he=this._last.element;return this._remove(this._last),he}}_remove(he){if(he.prev!==V.Undefined&&he.next!==V.Undefined){const W=he.prev;W.next=he.next,he.next.prev=W}else he.prev===V.Undefined&&he.next===V.Undefined?(this._first=V.Undefined,this._last=V.Undefined):he.next===V.Undefined?(this._last=this._last.prev,this._last.next=V.Undefined):he.prev===V.Undefined&&(this._first=this._first.next,this._first.prev=V.Undefined);this._size-=1}*[Symbol.iterator](){let he=this._first;for(;he!==V.Undefined;)yield he.element,he=he.next}}},23345:function(dr,vt,K){"use strict";K.d(vt,{$L:function(){return _e},ED:function(){return R},IJ:function(){return X},OS:function(){return Pe},WE:function(){return ie},dz:function(){return P},gn:function(){return we},li:function(){return x},r:function(){return Z},tY:function(){return fe},xS:function(){return ye}});var V=K(97671),me;const Se="en";let he=!1,W=!1,m=!1,ge=!1,O=!1,u=!1,q=!1,D,y=null,_=null,C;const x=typeof self=="object"?self:typeof K.g=="object"?K.g:{};let j;typeof x.vscode!="undefined"&&typeof x.vscode.process!="undefined"?j=x.vscode.process:typeof V!="undefined"&&(j=V);const M=typeof((me=j==null?void 0:j.versions)===null||me===void 0?void 0:me.electron)=="string"&&j.type==="renderer";if(typeof navigator=="object"&&!M)C=navigator.userAgent,he=C.indexOf("Windows")>=0,W=C.indexOf("Macintosh")>=0,q=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=C.indexOf("Linux")>=0,u=!0,D=navigator.language,y=D;else if(typeof j=="object"){he=j.platform==="win32",W=j.platform==="darwin",m=j.platform==="linux",ge=m&&!!j.env.SNAP&&!!j.env.SNAP_REVISION,D=Se,y=Se;const I=j.env.VSCODE_NLS_CONFIG;if(I)try{const G=JSON.parse(I),z=G.availableLanguages["*"];D=G.locale,y=z||Se,_=G._translationsConfigFile}catch(G){}O=!0}else console.error("Unable to resolve platform.");let H=0;W?H=1:he?H=3:m&&(H=2);const R=he,P=W,X=m,fe=O,_e=u,we=q,ie=C,ye=function(){if(x.setImmediate)return x.setImmediate.bind(x);if(typeof x.postMessage=="function"&&!x.importScripts){let z=[];x.addEventListener("message",re=>{if(re.data&&re.data.vscodeSetImmediateId)for(let w=0,B=z.length;w<B;w++){const $=z[w];if($.id===re.data.vscodeSetImmediateId){z.splice(w,1),$.callback();return}}});let se=0;return re=>{const w=++se;z.push({id:w,callback:re}),x.postMessage({vscodeSetImmediateId:w},"*")}}if(typeof(j==null?void 0:j.nextTick)=="function")return j.nextTick.bind(j);const G=Promise.resolve();return z=>G.then(z)}(),Pe=W||q?2:he?1:3;let ue=!0,Me=!1;function Z(){if(!Me){Me=!0;const I=new Uint8Array(2);I[0]=1,I[1]=2,ue=new Uint16Array(I.buffer)[0]===513}return ue}},95830:function(dr,vt,K){"use strict";K.d(vt,{G:function(){return Se}});var V=K(23345);const me=V.li.performance&&typeof V.li.performance.now=="function";class Se{constructor(W){this._highResolution=me&&W,this._startTime=this._now(),this._stopTime=-1}static create(W=!0){return new Se(W)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?V.li.performance.now():Date.now()}}},82983:function(dr,vt,K){"use strict";K.d(vt,{$i:function(){return $e},C8:function(){return xt},GF:function(){return D},HO:function(){return se},IO:function(){return y},K7:function(){return Qt},Kw:function(){return it},LC:function(){return x},Mh:function(){return ye},P1:function(){return Pe},PJ:function(){return Le},Qe:function(){return qe},R1:function(){return q},RP:function(){return $},S6:function(){return Ct},TT:function(){return R},Ut:function(){return w},V8:function(){return j},WU:function(){return Se},YK:function(){return Me},YU:function(){return he},ZG:function(){return ue},ZH:function(){return I},ab:function(){return Bt},c1:function(){return ht},df:function(){return _e},ec:function(){return W},fi:function(){return Ut},fy:function(){return m},j3:function(){return ge},j_:function(){return X},m5:function(){return V},mK:function(){return fe},mr:function(){return _},oH:function(){return p},oL:function(){return O},ok:function(){return ie},ow:function(){return M},qq:function(){return we},qu:function(){return H},rL:function(){return Z},uS:function(){return De},un:function(){return u},uq:function(){return C},vH:function(){return z},xe:function(){return pt},zY:function(){return P}});function V(k){return!k||typeof k!="string"?!0:k.trim().length===0}const me=/{(\d+)}/g;function Se(k,...te){return te.length===0?k:k.replace(me,function(Fe,ke){const Ge=parseInt(ke,10);return isNaN(Ge)||Ge<0||Ge>=te.length?Fe:te[Ge]})}function he(k){return k.replace(/[<>&]/g,function(te){switch(te){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return te}})}function W(k){return k.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(k,te=" "){const Fe=ge(k,te);return O(Fe,te)}function ge(k,te){if(!k||!te)return k;const Fe=te.length;if(Fe===0||k.length===0)return k;let ke=0;for(;k.indexOf(te,ke)===ke;)ke=ke+Fe;return k.substring(ke)}function O(k,te){if(!k||!te)return k;const Fe=te.length,ke=k.length;if(Fe===0||ke===0)return k;let Ge=ke,ze=-1;for(;ze=k.lastIndexOf(te,Ge-1),!(ze===-1||ze+Fe!==Ge);){if(ze===0)return"";Ge=ze}return k.substring(0,Ge)}function u(k){return k.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function q(k){return k.replace(/\*/g,"")}function D(k,te,Fe={}){if(!k)throw new Error("Cannot create regex from empty string");te||(k=W(k)),Fe.wholeWord&&(/\B/.test(k.charAt(0))||(k="\\b"+k),/\B/.test(k.charAt(k.length-1))||(k=k+"\\b"));let ke="";return Fe.global&&(ke+="g"),Fe.matchCase||(ke+="i"),Fe.multiline&&(ke+="m"),Fe.unicode&&(ke+="u"),new RegExp(k,ke)}function y(k){return k.source==="^"||k.source==="^$"||k.source==="$"||k.source==="^\\s*$"?!1:!!(k.exec("")&&k.lastIndex===0)}function _(k){return(k.global?"g":"")+(k.ignoreCase?"i":"")+(k.multiline?"m":"")+(k.unicode?"u":"")}function C(k){return k.split(/\r\n|\r|\n/)}function x(k){for(let te=0,Fe=k.length;te<Fe;te++){const ke=k.charCodeAt(te);if(ke!==32&&ke!==9)return te}return-1}function j(k,te=0,Fe=k.length){for(let ke=te;ke<Fe;ke++){const Ge=k.charCodeAt(ke);if(Ge!==32&&Ge!==9)return k.substring(te,ke)}return k.substring(te,Fe)}function M(k,te=k.length-1){for(let Fe=te;Fe>=0;Fe--){const ke=k.charCodeAt(Fe);if(ke!==32&&ke!==9)return Fe}return-1}function H(k,te){return k<te?-1:k>te?1:0}function R(k,te,Fe=0,ke=k.length,Ge=0,ze=te.length){for(;Fe<ke&&Ge<ze;Fe++,Ge++){let ut=k.charCodeAt(Fe),st=te.charCodeAt(Ge);if(ut<st)return-1;if(ut>st)return 1}const Ft=ke-Fe,Je=ze-Ge;return Ft<Je?-1:Ft>Je?1:0}function P(k,te){return X(k,te,0,k.length,0,te.length)}function X(k,te,Fe=0,ke=k.length,Ge=0,ze=te.length){for(;Fe<ke&&Ge<ze;Fe++,Ge++){let ut=k.charCodeAt(Fe),st=te.charCodeAt(Ge);if(ut===st)continue;if(ut>=128||st>=128)return R(k.toLowerCase(),te.toLowerCase(),Fe,ke,Ge,ze);fe(ut)&&(ut-=32),fe(st)&&(st-=32);const Xe=ut-st;if(Xe!==0)return Xe}const Ft=ke-Fe,Je=ze-Ge;return Ft<Je?-1:Ft>Je?1:0}function fe(k){return k>=97&&k<=122}function _e(k){return k>=65&&k<=90}function we(k,te){return k.length===te.length&&X(k,te)===0}function ie(k,te){const Fe=te.length;return te.length>k.length?!1:X(k,te,0,Fe)===0}function ye(k,te){let Fe,ke=Math.min(k.length,te.length);for(Fe=0;Fe<ke;Fe++)if(k.charCodeAt(Fe)!==te.charCodeAt(Fe))return Fe;return ke}function Pe(k,te){let Fe,ke=Math.min(k.length,te.length);const Ge=k.length-1,ze=te.length-1;for(Fe=0;Fe<ke;Fe++)if(k.charCodeAt(Ge-Fe)!==te.charCodeAt(ze-Fe))return Fe;return ke}function ue(k){return 55296<=k&&k<=56319}function Me(k){return 56320<=k&&k<=57343}function Z(k,te){return(k-55296<<10)+(te-56320)+65536}function I(k,te,Fe){const ke=k.charCodeAt(Fe);if(ue(ke)&&Fe+1<te){const Ge=k.charCodeAt(Fe+1);if(Me(Ge))return Z(ke,Ge)}return ke}function G(k,te){const Fe=k.charCodeAt(te-1);if(Me(Fe)&&te>1){const ke=k.charCodeAt(te-2);if(ue(ke))return Z(ke,Fe)}return Fe}function z(k,te){const Fe=Be.getInstance(),ke=te,Ge=k.length,ze=I(k,Ge,te);te+=ze>=65536?2:1;let Ft=Fe.getGraphemeBreakType(ze);for(;te<Ge;){const Je=I(k,Ge,te),ut=Fe.getGraphemeBreakType(Je);if(Ut(Ft,ut))break;te+=Je>=65536?2:1,Ft=ut}return te-ke}function se(k,te){const Fe=Be.getInstance(),ke=te,Ge=G(k,te);te-=Ge>=65536?2:1;let ze=Fe.getGraphemeBreakType(Ge);for(;te>0;){const Ft=G(k,te),Je=Fe.getGraphemeBreakType(Ft);if(Ut(Je,ze))break;te-=Ft>=65536?2:1,ze=Je}return ke-te}const re=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function w(k){return re.test(k)}const B=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function $(k){return B.test(k)}const ae=/^[\t\n\r\x20-\x7E]*$/;function $e(k){return ae.test(k)}const qe=/[\u2028\u2029]/;function Bt(k){return qe.test(k)}function pt(k){for(let te=0,Fe=k.length;te<Fe;te++)if(Qt(k.charCodeAt(te)))return!0;return!1}function Qt(k){return k=+k,k>=11904&&k<=55215||k>=63744&&k<=64255||k>=65281&&k<=65374}function xt(k){return k>=127462&&k<=127487||k===8986||k===8987||k===9200||k===9203||k>=9728&&k<=10175||k===11088||k===11093||k>=127744&&k<=128591||k>=128640&&k<=128764||k>=128992&&k<=129003||k>=129280&&k<=129535||k>=129648&&k<=129750}const ht="\uFEFF";function De(k){return!!(k&&k.length>0&&k.charCodeAt(0)===65279)}function it(k,te=!1){return k?(te&&(k=k.replace(/\\./g,"")),k.toLowerCase()!==k):!1}function Le(k){return k=k%(2*26),k<26?String.fromCharCode(97+k):String.fromCharCode(65+k-26)}function Ct(k){return Be.getInstance().getGraphemeBreakType(k)}function Ut(k,te){return k===0?te!==5&&te!==7:k===2&&te===3?!1:k===4||k===2||k===3||te===4||te===2||te===3?!0:!(k===8&&(te===8||te===9||te===11||te===12)||(k===11||k===9)&&(te===9||te===10)||(k===12||k===10)&&te===10||te===5||te===13||te===7||k===1||k===13&&te===14||k===6&&te===6)}class Be{constructor(){this._data=L()}static getInstance(){return Be._INSTANCE||(Be._INSTANCE=new Be),Be._INSTANCE}getGraphemeBreakType(te){if(te<32)return te===10?3:te===13?2:4;if(te<127)return 0;const Fe=this._data,ke=Fe.length/3;let Ge=1;for(;Ge<=ke;)if(te<Fe[3*Ge])Ge=2*Ge;else if(te>Fe[3*Ge+1])Ge=2*Ge+1;else return Fe[3*Ge+2];return 0}}Be._INSTANCE=null;function L(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function p(k,te){if(k===0)return 0;const Fe=b(k,te);if(Fe!==void 0)return Fe;const ke=G(te,k);return k-=N(ke),k}function b(k,te){let Fe=G(te,k);for(k-=N(Fe);S(Fe)||Fe===65039||Fe===8419;){if(k===0)return;Fe=G(te,k),k-=N(Fe)}if(xt(Fe)){if(k>=0){const ke=G(te,k);ke===8205&&(k-=N(ke))}return k}}function N(k){return k>=65536?2:1}function S(k){return 127995<=k&&k<=127999}},72999:function(dr,vt,K){"use strict";K.d(vt,{$E:function(){return x},$K:function(){return ge},D8:function(){return y},HD:function(){return me},IU:function(){return j},Jp:function(){return O},Kn:function(){return Se},cW:function(){return q},f6:function(){return M},hj:function(){return he},jn:function(){return W},kJ:function(){return V},mf:function(){return D},o8:function(){return m},p_:function(){return u},vE:function(){return H}});function V(R){return Array.isArray(R)}function me(R){return typeof R=="string"}function Se(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function he(R){return typeof R=="number"&&!isNaN(R)}function W(R){return R===!0||R===!1}function m(R){return typeof R=="undefined"}function ge(R){return!O(R)}function O(R){return m(R)||R===null}function u(R,P){if(!R)throw new Error(P?`Unexpected type, expected '${P}'`:"Unexpected type")}function q(R){if(O(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function D(R){return typeof R=="function"}function y(R,P){const X=Math.min(R.length,P.length);for(let fe=0;fe<X;fe++)_(R[fe],P[fe])}function _(R,P){if(me(P)){if(typeof R!==P)throw new Error(`argument does not match constraint: typeof ${P}`)}else if(D(P)){try{if(R instanceof P)return}catch(X){}if(!O(R)&&R.constructor===P||P.length===1&&P.call(void 0,R)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function C(R){let P=[],X=Object.getPrototypeOf(R);for(;Object.prototype!==X;)P=P.concat(Object.getOwnPropertyNames(X)),X=Object.getPrototypeOf(X);return P}function x(R){const P=[];for(const X of C(R))typeof R[X]=="function"&&P.push(X);return P}function j(R,P){const X=_e=>function(){const we=Array.prototype.slice.call(arguments,0);return P(_e,we)};let fe={};for(const _e of R)fe[_e]=X(_e);return fe}function M(R){return R===null?void 0:R}function H(R,P="Unreachable"){throw new Error(P)}},13268:function(dr,vt,K){"use strict";K.d(vt,{N:function(){return me}});function V(Se,he){let W;return he.length===0?W=Se:W=Se.replace(/\{(\d+)\}/g,function(m,ge){const O=ge[0];return typeof he[O]!="undefined"?he[O]:m}),W}function me(Se,he,...W){return V(he,W)}},96236:function(dr,vt,K){"use strict";K.d(vt,{BH:function(){return j},NZ:function(){return M},U8:function(){return H},co:function(){return x},eH:function(){return C},vr:function(){return _}});var V=K(75918),me=K(52615),Se=K(4348),he=K(88226),W=K(69323),m=K(34502),ge=K(35884),O=K(90689),u=K(16925),q=K(49055),D=function(R,P,X,fe){var _e=arguments.length,we=_e<3?P:fe===null?fe=Object.getOwnPropertyDescriptor(P,X):fe,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(R,P,X,fe);else for(var ye=R.length-1;ye>=0;ye--)(ie=R[ye])&&(we=(_e<3?ie(we):_e>3?ie(P,X,we):ie(P,X))||we);return _e>3&&we&&Object.defineProperty(P,X,we),we},y=function(R,P){return function(X,fe){P(X,fe,R)}};function _(R){return R.command!==void 0}class C{constructor(P){this.id=C._idPool++,this._debugName=P}}C._idPool=0,C.CommandPalette=new C("CommandPalette"),C.EditorContext=new C("EditorContext"),C.SimpleEditorContext=new C("SimpleEditorContext"),C.EditorContextCopy=new C("EditorContextCopy"),C.EditorContextPeek=new C("EditorContextPeek"),C.MenubarEditMenu=new C("MenubarEditMenu"),C.MenubarCopy=new C("MenubarCopy"),C.MenubarGoMenu=new C("MenubarGoMenu"),C.MenubarSelectionMenu=new C("MenubarSelectionMenu"),C.InlineCompletionsActions=new C("InlineCompletionsActions");const x=(0,u.yh)("menuService"),j=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Se.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===C.CommandPalette}}addCommand(R){return this.addCommands(he.$.single(R))}addCommands(R){for(const P of R)this._commands.set(P.id,P);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,W.OF)(()=>{let P=!1;for(const X of R)P=this._commands.delete(X.id)||P;P&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((P,X)=>R.set(X,P)),R}appendMenuItem(R,P){return this.appendMenuItems(he.$.single({id:R,item:P}))}appendMenuItems(R){const P=new Set,X=new m.S;for(const{id:fe,item:_e}of R){let we=this._menuItems.get(fe);we||(we=new m.S,this._menuItems.set(fe,we)),X.push(we.push(_e)),P.add(fe)}return this._onDidChangeMenu.fire(P),(0,W.OF)(()=>{if(X.size>0){for(let fe of X)fe();this._onDidChangeMenu.fire(P),X.clear()}})}getMenuItems(R){let P;return this._menuItems.has(R)?P=[...this._menuItems.get(R)]:P=[],R===C.CommandPalette&&this._appendImplicitItems(P),P}_appendImplicitItems(R){const P=new Set;for(const X of R)_(X)&&(P.add(X.command.id),X.alt&&P.add(X.alt.id));this._commands.forEach((X,fe)=>{P.has(fe)||R.push({command:X})})}};class M extends V.wY{constructor(P,X,fe,_e){super(`submenuitem.${P.submenu.id}`,typeof P.title=="string"?P.title:P.title.value,[],"submenu"),this.item=P,this._menuService=X,this._contextKeyService=fe,this._options=_e}get actions(){const P=[],X=this._menuService.createMenu(this.item.submenu,this._contextKeyService),fe=X.getActions(this._options);X.dispose();for(const[,_e]of fe)_e.length>0&&(P.push(..._e),P.push(new V.Z0));return P.length&&P.pop(),P}}let H=class ic{constructor(P,X,fe,_e,we){var ie,ye;if(this._commandService=we,this.id=P.id,this.label=fe!=null&&fe.renderShortTitle&&P.shortTitle?typeof P.shortTitle=="string"?P.shortTitle:P.shortTitle.value:typeof P.title=="string"?P.title:P.title.value,this.tooltip=(ye=typeof P.tooltip=="string"?P.tooltip:(ie=P.tooltip)===null||ie===void 0?void 0:ie.value)!==null&&ye!==void 0?ye:"",this.enabled=!P.precondition||_e.contextMatchesRules(P.precondition),this.checked=void 0,P.toggled){const Pe=P.toggled.condition?P.toggled:{condition:P.toggled};this.checked=_e.contextMatchesRules(Pe.condition),this.checked&&Pe.tooltip&&(this.tooltip=typeof Pe.tooltip=="string"?Pe.tooltip:Pe.tooltip.value),Pe.title&&(this.label=typeof Pe.title=="string"?Pe.title:Pe.title.value)}this.item=P,this.alt=X?new ic(X,void 0,fe,_e,we):void 0,this._options=fe,q.kS.isThemeIcon(P.icon)&&(this.class=me.dT.asClassName(P.icon))}dispose(){}run(...P){var X,fe;let _e=[];return!((X=this._options)===null||X===void 0)&&X.arg&&(_e=[..._e,this._options.arg]),!((fe=this._options)===null||fe===void 0)&&fe.shouldForwardArgs&&(_e=[..._e,...P]),this._commandService.executeCommand(this.id,..._e)}};H=D([y(3,O.i6),y(4,ge.H)],H)},35884:function(dr,vt,K){"use strict";K.d(vt,{H:function(){return ge},P:function(){return O}});var V=K(4348),me=K(88226),Se=K(69323),he=K(34502),W=K(72999),m=K(16925);const ge=(0,m.yh)("commandService"),O=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new V.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(u,q){if(!u)throw new Error("invalid command");if(typeof u=="string"){if(!q)throw new Error("invalid command");return this.registerCommand({id:u,handler:q})}if(u.description){const x=[];for(let M of u.description.args)x.push(M.constraint);const j=u.handler;u.handler=function(M,...H){return(0,W.D8)(H,x),j(M,...H)}}const{id:D}=u;let y=this._commands.get(D);y||(y=new he.S,this._commands.set(D,y));let _=y.unshift(u),C=(0,Se.OF)(()=>{_();const x=this._commands.get(D);x!=null&&x.isEmpty()&&this._commands.delete(D)});return this._onDidRegisterCommand.fire(D),C}registerCommandAlias(u,q){return O.registerCommand(u,(D,...y)=>D.get(ge).executeCommand(q,...y))}getCommand(u){const q=this._commands.get(u);if(!(!q||q.isEmpty()))return me.$.first(q)}getCommands(){const u=new Map;for(const q of this._commands.keys()){const D=this.getCommand(q);D&&u.set(q,D)}return u}};O.registerCommand("noop",()=>{})},90689:function(dr,vt,K){"use strict";K.d(vt,{Ao:function(){return ge},Eq:function(){return Z},Fb:function(){return O},K8:function(){return z},i6:function(){return Me},uy:function(){return ue}});var V=K(23345),me=K(82983),Se=K(16925);let he=V.WE||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",V.dz),W.set("isLinux",V.IJ),W.set("isWindows",V.ED),W.set("isWeb",V.$L),W.set("isMacNative",V.dz&&!V.$L),W.set("isEdge",he.indexOf("Edg/")>=0),W.set("isFirefox",he.indexOf("Firefox")>=0),W.set("isChrome",he.indexOf("Chrome")>=0),W.set("isSafari",he.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class ge{static has(w){return y.create(w)}static equals(w,B){return _.create(w,B)}static regex(w,B){return _e.create(w,B)}static not(w){return M.create(w)}static and(...w){return ye.create(w,null)}static or(...w){return Pe.create(w,null,!0)}static deserialize(w,B=!1){if(w)return this._deserializeOrExpression(w,B)}static _deserializeOrExpression(w,B){let $=w.split("||");return Pe.create($.map(ae=>this._deserializeAndExpression(ae,B)),null,!0)}static _deserializeAndExpression(w,B){let $=w.split("&&");return ye.create($.map(ae=>this._deserializeOne(ae,B)),null)}static _deserializeOne(w,B){if(w=w.trim(),w.indexOf("!=")>=0){let $=w.split("!=");return j.create($[0].trim(),this._deserializeValue($[1],B))}if(w.indexOf("==")>=0){let $=w.split("==");return _.create($[0].trim(),this._deserializeValue($[1],B))}if(w.indexOf("=~")>=0){let $=w.split("=~");return _e.create($[0].trim(),this._deserializeRegexValue($[1],B))}if(w.indexOf(" in ")>=0){let $=w.split(" in ");return C.create($[0].trim(),$[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(w)){const $=w.split(">=");return P.create($[0].trim(),$[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(w)){const $=w.split(">");return R.create($[0].trim(),$[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(w)){const $=w.split("<=");return fe.create($[0].trim(),$[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(w)){const $=w.split("<");return X.create($[0].trim(),$[1].trim())}return/^\!\s*/.test(w)?M.create(w.substr(1).trim()):y.create(w)}static _deserializeValue(w,B){if(w=w.trim(),w==="true")return!0;if(w==="false")return!1;let $=/^'([^']*)'$/.exec(w);return $?$[1].trim():w}static _deserializeRegexValue(w,B){if((0,me.m5)(w)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let $=w.indexOf("/"),ae=w.lastIndexOf("/");if($===ae||$<0){if(B)throw new Error(`bad regexp-value '${w}', missing /-enclosure`);return console.warn(`bad regexp-value '${w}', missing /-enclosure`),null}let $e=w.slice($+1,ae),qe=w[ae+1]==="i"?"i":"";try{return new RegExp($e,qe)}catch(Bt){if(B)throw new Error(`bad regexp-value '${w}', parse error: ${Bt}`);return console.warn(`bad regexp-value '${w}', parse error: ${Bt}`),null}}}function O(re,w){const B=re?re.substituteConstants():void 0,$=w?w.substituteConstants():void 0;return!B&&!$?!0:!B||!$?!1:B.equals($)}function u(re,w){return re.cmp(w)}class q{constructor(){this.type=0}cmp(w){return this.type-w.type}equals(w){return w.type===this.type}substituteConstants(){return this}evaluate(w){return!1}serialize(){return"false"}keys(){return[]}negate(){return D.INSTANCE}}q.INSTANCE=new q;class D{constructor(){this.type=1}cmp(w){return this.type-w.type}equals(w){return w.type===this.type}substituteConstants(){return this}evaluate(w){return!0}serialize(){return"true"}keys(){return[]}negate(){return q.INSTANCE}}D.INSTANCE=new D;class y{constructor(w,B){this.key=w,this.negated=B,this.type=2}static create(w,B=null){const $=W.get(w);return typeof $=="boolean"?$?D.INSTANCE:q.INSTANCE:new y(w,B)}cmp(w){return w.type!==this.type?this.type-w.type:I(this.key,w.key)}equals(w){return w.type===this.type?this.key===w.key:!1}substituteConstants(){const w=W.get(this.key);return typeof w=="boolean"?w?D.INSTANCE:q.INSTANCE:this}evaluate(w){return!!w.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this)),this.negated}}class _{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=4}static create(w,B,$=null){if(typeof B=="boolean")return B?y.create(w,$):M.create(w,$);const ae=W.get(w);return typeof ae=="boolean"?B===(ae?"true":"false")?D.INSTANCE:q.INSTANCE:new _(w,B,$)}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){const w=W.get(this.key);if(typeof w=="boolean"){const B=w?"true":"false";return this.value===B?D.INSTANCE:q.INSTANCE}return this}evaluate(w){return w.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this.value,this)),this.negated}}class C{constructor(w,B){this.key=w,this.valueKey=B,this.type=10,this.negated=null}static create(w,B){return new C(w,B)}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.valueKey,w.key,w.valueKey)}equals(w){return w.type===this.type?this.key===w.key&&this.valueKey===w.valueKey:!1}substituteConstants(){return this}evaluate(w){const B=w.getValue(this.valueKey),$=w.getValue(this.key);return Array.isArray(B)?B.indexOf($)>=0:typeof $=="string"&&typeof B=="object"&&B!==null?m.call(B,$):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(w){this._actual=w,this.type=11}static create(w){return new x(w)}cmp(w){return w.type!==this.type?this.type-w.type:this._actual.cmp(w._actual)}equals(w){return w.type===this.type?this._actual.equals(w._actual):!1}substituteConstants(){return this}evaluate(w){return!this._actual.evaluate(w)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class j{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=5}static create(w,B,$=null){if(typeof B=="boolean")return B?M.create(w,$):y.create(w,$);const ae=W.get(w);return typeof ae=="boolean"?B===(ae?"true":"false")?q.INSTANCE:D.INSTANCE:new j(w,B,$)}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){const w=W.get(this.key);if(typeof w=="boolean"){const B=w?"true":"false";return this.value===B?q.INSTANCE:D.INSTANCE}return this}evaluate(w){return w.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class M{constructor(w,B){this.key=w,this.negated=B,this.type=3}static create(w,B=null){const $=W.get(w);return typeof $=="boolean"?$?q.INSTANCE:D.INSTANCE:new M(w,B)}cmp(w){return w.type!==this.type?this.type-w.type:I(this.key,w.key)}equals(w){return w.type===this.type?this.key===w.key:!1}substituteConstants(){const w=W.get(this.key);return typeof w=="boolean"?w?q.INSTANCE:D.INSTANCE:this}evaluate(w){return!w.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this)),this.negated}}function H(re,w){if(typeof re=="string"){const B=parseFloat(re);isNaN(B)||(re=B)}return typeof re=="string"||typeof re=="number"?w(re):q.INSTANCE}class R{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=12}static create(w,B,$=null){return H(B,ae=>new R(w,ae,$))}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=fe.create(this.key,this.value,this)),this.negated}}class P{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=13}static create(w,B,$=null){return H(B,ae=>new P(w,ae,$))}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this.key,this.value,this)),this.negated}}class X{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=14}static create(w,B,$=null){return H(B,ae=>new X(w,ae,$))}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class fe{constructor(w,B,$){this.key=w,this.value=B,this.negated=$,this.type=15}static create(w,B,$=null){return H(B,ae=>new fe(w,ae,$))}cmp(w){return w.type!==this.type?this.type-w.type:G(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class _e{constructor(w,B){this.key=w,this.regexp=B,this.type=7,this.negated=null}static create(w,B){return new _e(w,B)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.key<w.key)return-1;if(this.key>w.key)return 1;const B=this.regexp?this.regexp.source:"",$=w.regexp?w.regexp.source:"";return B<$?-1:B>$?1:0}equals(w){if(w.type===this.type){const B=this.regexp?this.regexp.source:"",$=w.regexp?w.regexp.source:"";return this.key===w.key&&B===$}return!1}substituteConstants(){return this}evaluate(w){let B=w.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const w=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${w}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=we.create(this)),this.negated}}class we{constructor(w){this._actual=w,this.type=8}static create(w){return new we(w)}cmp(w){return w.type!==this.type?this.type-w.type:this._actual.cmp(w._actual)}equals(w){return w.type===this.type?this._actual.equals(w._actual):!1}substituteConstants(){return this}evaluate(w){return!this._actual.evaluate(w)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ie(re){let w=null;for(let B=0,$=re.length;B<$;B++){const ae=re[B].substituteConstants();if(re[B]!==ae&&w===null){w=[];for(let $e=0;$e<B;$e++)w[$e]=re[$e]}w!==null&&(w[B]=ae)}return w===null?re:w}class ye{constructor(w,B){this.expr=w,this.negated=B,this.type=6}static create(w,B){return ye._normalizeArr(w,B)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.expr.length<w.expr.length)return-1;if(this.expr.length>w.expr.length)return 1;for(let B=0,$=this.expr.length;B<$;B++){const ae=u(this.expr[B],w.expr[B]);if(ae!==0)return ae}return 0}equals(w){if(w.type===this.type){if(this.expr.length!==w.expr.length)return!1;for(let B=0,$=this.expr.length;B<$;B++)if(!this.expr[B].equals(w.expr[B]))return!1;return!0}return!1}substituteConstants(){const w=ie(this.expr);return w===this.expr?this:ye.create(w,this.negated)}evaluate(w){for(let B=0,$=this.expr.length;B<$;B++)if(!this.expr[B].evaluate(w))return!1;return!0}static _normalizeArr(w,B){const $=[];let ae=!1;for(const $e of w)if($e){if($e.type===1){ae=!0;continue}if($e.type===0)return q.INSTANCE;if($e.type===6){$.push(...$e.expr);continue}$.push($e)}if($.length===0&&ae)return D.INSTANCE;if($.length!==0){if($.length===1)return $[0];$.sort(u);for(let $e=1;$e<$.length;$e++)$[$e-1].equals($[$e])&&($.splice($e,1),$e--);if($.length===1)return $[0];for(;$.length>1;){const $e=$[$.length-1];if($e.type!==9)break;$.pop();const qe=$.pop(),Bt=$.length===0,pt=Pe.create($e.expr.map(Qt=>ye.create([Qt,qe],null)),null,Bt);pt&&($.push(pt),$.sort(u))}return $.length===1?$[0]:new ye($,B)}}serialize(){return this.expr.map(w=>w.serialize()).join(" && ")}keys(){const w=[];for(let B of this.expr)w.push(...B.keys());return w}negate(){if(!this.negated){const w=[];for(let B of this.expr)w.push(B.negate());this.negated=Pe.create(w,this,!0)}return this.negated}}class Pe{constructor(w,B){this.expr=w,this.negated=B,this.type=9}static create(w,B,$){return Pe._normalizeArr(w,B,$)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.expr.length<w.expr.length)return-1;if(this.expr.length>w.expr.length)return 1;for(let B=0,$=this.expr.length;B<$;B++){const ae=u(this.expr[B],w.expr[B]);if(ae!==0)return ae}return 0}equals(w){if(w.type===this.type){if(this.expr.length!==w.expr.length)return!1;for(let B=0,$=this.expr.length;B<$;B++)if(!this.expr[B].equals(w.expr[B]))return!1;return!0}return!1}substituteConstants(){const w=ie(this.expr);return w===this.expr?this:Pe.create(w,this.negated,!1)}evaluate(w){for(let B=0,$=this.expr.length;B<$;B++)if(this.expr[B].evaluate(w))return!0;return!1}static _normalizeArr(w,B,$){let ae=[],$e=!1;if(w){for(let qe=0,Bt=w.length;qe<Bt;qe++){const pt=w[qe];if(pt){if(pt.type===0){$e=!0;continue}if(pt.type===1)return D.INSTANCE;if(pt.type===9){ae=ae.concat(pt.expr);continue}ae.push(pt)}}if(ae.length===0&&$e)return q.INSTANCE;ae.sort(u)}if(ae.length!==0){if(ae.length===1)return ae[0];for(let qe=1;qe<ae.length;qe++)ae[qe-1].equals(ae[qe])&&(ae.splice(qe,1),qe--);if(ae.length===1)return ae[0];if($){for(let qe=0;qe<ae.length;qe++)for(let Bt=qe+1;Bt<ae.length;Bt++)z(ae[qe],ae[Bt])&&(ae.splice(Bt,1),Bt--);if(ae.length===1)return ae[0]}return new Pe(ae,B)}}serialize(){return this.expr.map(w=>w.serialize()).join(" || ")}keys(){const w=[];for(let B of this.expr)w.push(...B.keys());return w}negate(){if(!this.negated){let w=[];for(let B of this.expr)w.push(B.negate());for(;w.length>1;){const B=w.shift(),$=w.shift(),ae=[];for(const qe of se(B))for(const Bt of se($))ae.push(ye.create([qe,Bt],null));const $e=w.length===0;w.unshift(Pe.create(ae,null,$e))}this.negated=w[0]}return this.negated}}class ue extends y{constructor(w,B,$){super(w,null),this._defaultValue=B,typeof $=="object"?ue._info.push(Object.assign(Object.assign({},$),{key:w})):$!==!0&&ue._info.push({key:w,description:$,type:B!=null?typeof B:void 0})}static all(){return ue._info.values()}bindTo(w){return w.createKey(this.key,this._defaultValue)}getValue(w){return w.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(w){return _.create(this.key,w)}}ue._info=[];const Me=(0,Se.yh)("contextKeyService"),Z="setContext";function I(re,w){return re<w?-1:re>w?1:0}function G(re,w,B,$){return re<B?-1:re>B?1:w<$?-1:w>$?1:0}function z(re,w){if(w.type===6&&re.type!==9&&re.type!==6){for(const ae of w.expr)if(re.equals(ae))return!0}const B=re.negate(),$=se(B).concat(se(w));$.sort(u);for(let ae=0;ae<$.length;ae++){const qe=$[ae].negate();for(let Bt=ae+1;Bt<$.length;Bt++){const pt=$[Bt];if(qe.equals(pt))return!0}}return!1}function se(re){return re.type===9?re.expr:[re]}},16925:function(dr,vt,K){"use strict";K.d(vt,{I8:function(){return V},TG:function(){return me},jt:function(){return W},yh:function(){return he}});var V;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function ge(O){return O[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=ge})(V||(V={}));const me=he("instantiationService");function Se(m,ge,O,u){ge[V.DI_TARGET]===ge?ge[V.DI_DEPENDENCIES].push({id:m,index:O,optional:u}):(ge[V.DI_DEPENDENCIES]=[{id:m,index:O,optional:u}],ge[V.DI_TARGET]=ge)}function he(m){if(V.serviceIds.has(m))return V.serviceIds.get(m);const ge=function(O,u,q){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Se(ge,O,q,!1)};return ge.toString=()=>m,V.serviceIds.set(m,ge),ge}function W(m){return function(ge,O,u){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Se(m,ge,u,!0)}}},44650:function(dr,vt,K){"use strict";K.d(vt,{B:function(){return he}});var V=K(76068),me=K(72999);class Se{constructor(){this.data=new Map}add(m,ge){V.ok(me.HD(m)),V.ok(me.Kn(ge)),V.ok(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,ge)}as(m){return this.data.get(m)||null}}const he=new Se},66213:function(dr,vt,K){"use strict";K.d(vt,{e:function(){return V}});var V;(function(me){me.DARK="dark",me.LIGHT="light",me.HIGH_CONTRAST="hc"})(V||(V={}))},49055:function(dr,vt,K){"use strict";K.d(vt,{EN:function(){return u},IP:function(){return y},Ic:function(){return x},XE:function(){return ge},bB:function(){return j},kS:function(){return q},m6:function(){return D}});var V=K(52615),me=K(4348),Se=K(69323),he=K(16925),W=K(44650),m=K(66213);const ge=(0,he.yh)("themeService");var O;(function(M){function H(R){return R&&typeof R=="object"&&typeof R.id=="string"}M.isThemeColor=H})(O||(O={}));function u(M){return{id:M}}var q;(function(M){function H(we){return we&&typeof we=="object"&&typeof we.id=="string"&&(typeof we.color=="undefined"||O.isThemeColor(we.color))}M.isThemeIcon=H;const R=new RegExp(`^\\$\\((${V.dT.iconNameExpression}(?:${V.dT.iconModifierExpression})?)\\)$`);function P(we){const ie=R.exec(we);if(!ie)return;let[,ye]=ie;return{id:ye}}M.fromString=P;function X(we,ie){let ye=we.id;const Pe=ye.lastIndexOf("~");return Pe!==-1&&(ye=ye.substring(0,Pe)),ie&&(ye=`${ye}~${ie}`),{id:ye}}M.modify=X;function fe(we,ie){var ye,Pe;return we.id===ie.id&&((ye=we.color)===null||ye===void 0?void 0:ye.id)===((Pe=ie.color)===null||Pe===void 0?void 0:Pe.id)}M.isEqual=fe;function _e(we,ie){return{id:we.id,color:ie?u(ie):void 0}}M.asThemeIcon=_e,M.asClassNameArray=V.dT.asClassNameArray,M.asClassName=V.dT.asClassName,M.asCSSSelector=V.dT.asCSSSelector})(q||(q={}));function D(M){switch(M){case m.e.DARK:return"vs-dark";case m.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const y={ThemingContribution:"base.contributions.theming"};class _{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new me.Q5}onColorThemeChange(H){return this.themingParticipants.push(H),this.onThemingParticipantAddedEmitter.fire(H),(0,Se.OF)(()=>{const R=this.themingParticipants.indexOf(H);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let C=new _;W.B.add(y.ThemingContribution,C);function x(M){return C.onColorThemeChange(M)}class j extends Se.JT{constructor(H){super(),this.themeService=H,this.theme=H.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(H){this.theme=H,this.updateStyles()}updateStyles(){}}},16632:function(dr,vt,K){"use strict";var V=K(14809),me=K(20439),Se=K(4635),he=K(50298),W=K(62646),m=K(92310),ge=K.n(m),O=K(18929),u=K(59301),q=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],D=(0,u.forwardRef)(function(y,_){var C=y.prefixCls,x=C===void 0?"rc-checkbox":C,j=y.className,M=y.style,H=y.checked,R=y.disabled,P=y.defaultChecked,X=P===void 0?!1:P,fe=y.type,_e=fe===void 0?"checkbox":fe,we=y.title,ie=y.onChange,ye=(0,W.Z)(y,q),Pe=(0,u.useRef)(null),ue=(0,u.useRef)(null),Me=(0,O.Z)(X,{value:H}),Z=(0,he.Z)(Me,2),I=Z[0],G=Z[1];(0,u.useImperativeHandle)(_,function(){return{focus:function(w){var B;(B=Pe.current)===null||B===void 0||B.focus(w)},blur:function(){var w;(w=Pe.current)===null||w===void 0||w.blur()},input:Pe.current,nativeElement:ue.current}});var z=ge()(x,j,(0,Se.Z)((0,Se.Z)({},"".concat(x,"-checked"),I),"".concat(x,"-disabled"),R)),se=function(w){R||("checked"in y||G(w.target.checked),ie==null||ie({target:(0,me.Z)((0,me.Z)({},y),{},{type:_e,checked:w.target.checked}),stopPropagation:function(){w.stopPropagation()},preventDefault:function(){w.preventDefault()},nativeEvent:w.nativeEvent}))};return u.createElement("span",{className:z,title:we,style:M,ref:ue},u.createElement("input",(0,V.Z)({},ye,{className:"".concat(x,"-input"),ref:Pe,onChange:se,disabled:R,checked:!!I,type:_e})),u.createElement("span",{className:"".concat(x,"-inner")}))});vt.Z=D},96478:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return we}});var V=K(14809),me=K(4635),Se=K(50298),he=K(62646),W=K(65966),m=K(92310),ge=K.n(m),O=K(8654),u=K(59301),q=K(10228),D=K(16089),y=q.Z.ESC,_=q.Z.TAB;function C(ie){var ye=ie.visible,Pe=ie.triggerRef,ue=ie.onVisibleChange,Me=ie.autoFocus,Z=ie.overlayRef,I=u.useRef(!1),G=function(){if(ye){var w,B;(w=Pe.current)===null||w===void 0||(B=w.focus)===null||B===void 0||B.call(w),ue==null||ue(!1)}},z=function(){var w;return(w=Z.current)!==null&&w!==void 0&&w.focus?(Z.current.focus(),I.current=!0,!0):!1},se=function(w){switch(w.keyCode){case y:G();break;case _:{var B=!1;I.current||(B=z()),B?w.preventDefault():G();break}}};u.useEffect(function(){return ye?(window.addEventListener("keydown",se),Me&&(0,D.Z)(z,3),function(){window.removeEventListener("keydown",se),I.current=!1}):function(){I.current=!1}},[ye])}var x=(0,u.forwardRef)(function(ie,ye){var Pe=ie.overlay,ue=ie.arrow,Me=ie.prefixCls,Z=(0,u.useMemo)(function(){var G;return typeof Pe=="function"?G=Pe():G=Pe,G},[Pe]),I=(0,O.sQ)(ye,(0,O.C4)(Z));return u.createElement(u.Fragment,null,ue&&u.createElement("div",{className:"".concat(Me,"-arrow")}),u.cloneElement(Z,{ref:(0,O.Yr)(Z)?I:void 0}))}),j=x,M={adjustX:1,adjustY:1},H=[0,0],R={topLeft:{points:["bl","tl"],overflow:M,offset:[0,-4],targetOffset:H},top:{points:["bc","tc"],overflow:M,offset:[0,-4],targetOffset:H},topRight:{points:["br","tr"],overflow:M,offset:[0,-4],targetOffset:H},bottomLeft:{points:["tl","bl"],overflow:M,offset:[0,4],targetOffset:H},bottom:{points:["tc","bc"],overflow:M,offset:[0,4],targetOffset:H},bottomRight:{points:["tr","br"],overflow:M,offset:[0,4],targetOffset:H}},P=R,X=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function fe(ie,ye){var Pe,ue=ie.arrow,Me=ue===void 0?!1:ue,Z=ie.prefixCls,I=Z===void 0?"rc-dropdown":Z,G=ie.transitionName,z=ie.animation,se=ie.align,re=ie.placement,w=re===void 0?"bottomLeft":re,B=ie.placements,$=B===void 0?P:B,ae=ie.getPopupContainer,$e=ie.showAction,qe=ie.hideAction,Bt=ie.overlayClassName,pt=ie.overlayStyle,Qt=ie.visible,xt=ie.trigger,ht=xt===void 0?["hover"]:xt,De=ie.autoFocus,it=ie.overlay,Le=ie.children,Ct=ie.onVisibleChange,Ut=(0,he.Z)(ie,X),Be=u.useState(),L=(0,Se.Z)(Be,2),p=L[0],b=L[1],N="visible"in ie?Qt:p,S=u.useRef(null),k=u.useRef(null),te=u.useRef(null);u.useImperativeHandle(ye,function(){return S.current});var Fe=function(Ve){b(Ve),Ct==null||Ct(Ve)};C({visible:N,triggerRef:te,onVisibleChange:Fe,autoFocus:De,overlayRef:k});var ke=function(Ve){var Ze=ie.onOverlayClick;b(!1),Ze&&Ze(Ve)},Ge=function(){return u.createElement(j,{ref:k,overlay:it,prefixCls:I,arrow:Me})},ze=function(){return typeof it=="function"?Ge:Ge()},Ft=function(){var Ve=ie.minOverlayWidthMatchTrigger,Ze=ie.alignPoint;return"minOverlayWidthMatchTrigger"in ie?Ve:!Ze},Je=function(){var Ve=ie.openClassName;return Ve!==void 0?Ve:"".concat(I,"-open")},ut=u.cloneElement(Le,{className:ge()((Pe=Le.props)===null||Pe===void 0?void 0:Pe.className,N&&Je()),ref:(0,O.Yr)(Le)?(0,O.sQ)(te,(0,O.C4)(Le)):void 0}),st=qe;return!st&&ht.indexOf("contextMenu")!==-1&&(st=["click"]),u.createElement(W.Z,(0,V.Z)({builtinPlacements:$},Ut,{prefixCls:I,ref:S,popupClassName:ge()(Bt,(0,me.Z)({},"".concat(I,"-show-arrow"),Me)),popupStyle:pt,action:ht,showAction:$e,hideAction:st,popupPlacement:w,popupAlign:se,popupTransitionName:G,popupAnimation:z,popupVisible:N,stretch:Ft()?"minWidth":"",popup:ze(),onPopupVisibleChange:Fe,onPopupClick:ke,getPopupContainer:ae}),ut)}var _e=u.forwardRef(fe),we=_e},20922:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return ht}});var V=K(14809),me=K(4635),Se=K(93664),he=K(50298),W=K(62646),m=K(99153),ge=K(84851);function O(){return typeof BigInt=="function"}function u(De){return!De&&De!==0&&!Number.isNaN(De)||!String(De).trim()}function q(De){var it=De.trim(),Le=it.startsWith("-");Le&&(it=it.slice(1)),it=it.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),it.startsWith(".")&&(it="0".concat(it));var Ct=it||"0",Ut=Ct.split("."),Be=Ut[0]||"0",L=Ut[1]||"0";Be==="0"&&L==="0"&&(Le=!1);var p=Le?"-":"";return{negative:Le,negativeStr:p,trimStr:Ct,integerStr:Be,decimalStr:L,fullStr:"".concat(p).concat(Ct)}}function D(De){var it=String(De);return!Number.isNaN(Number(it))&&it.includes("e")}function y(De){var it=String(De);if(D(De)){var Le=Number(it.slice(it.indexOf("e-")+2)),Ct=it.match(/\.(\d+)/);return Ct!=null&&Ct[1]&&(Le+=Ct[1].length),Le}return it.includes(".")&&C(it)?it.length-it.indexOf(".")-1:0}function _(De){var it=String(De);if(D(De)){if(De>Number.MAX_SAFE_INTEGER)return String(O()?BigInt(De).toString():Number.MAX_SAFE_INTEGER);if(De<Number.MIN_SAFE_INTEGER)return String(O()?BigInt(De).toString():Number.MIN_SAFE_INTEGER);it=De.toFixed(y(it))}return q(it).fullStr}function C(De){return typeof De=="number"?!Number.isNaN(De):De?/^\s*-?\d+(\.\d+)?\s*$/.test(De)||/^\s*-?\d+\.\s*$/.test(De)||/^\s*-?\.\d+\s*$/.test(De):!1}var x=function(){function De(it){if((0,m.Z)(this,De),(0,me.Z)(this,"origin",""),(0,me.Z)(this,"negative",void 0),(0,me.Z)(this,"integer",void 0),(0,me.Z)(this,"decimal",void 0),(0,me.Z)(this,"decimalLen",void 0),(0,me.Z)(this,"empty",void 0),(0,me.Z)(this,"nan",void 0),u(it)){this.empty=!0;return}if(this.origin=String(it),it==="-"||Number.isNaN(it)){this.nan=!0;return}var Le=it;if(D(Le)&&(Le=Number(Le)),Le=typeof Le=="string"?Le:_(Le),C(Le)){var Ct=q(Le);this.negative=Ct.negative;var Ut=Ct.trimStr.split(".");this.integer=BigInt(Ut[0]);var Be=Ut[1]||"0";this.decimal=BigInt(Be),this.decimalLen=Be.length}else this.nan=!0}return(0,ge.Z)(De,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Le){var Ct="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Le,"0"));return BigInt(Ct)}},{key:"negate",value:function(){var Le=new De(this.toString());return Le.negative=!Le.negative,Le}},{key:"cal",value:function(Le,Ct,Ut){var Be=Math.max(this.getDecimalStr().length,Le.getDecimalStr().length),L=this.alignDecimal(Be),p=Le.alignDecimal(Be),b=Ct(L,p).toString(),N=Ut(Be),S=q(b),k=S.negativeStr,te=S.trimStr,Fe="".concat(k).concat(te.padStart(N+1,"0"));return new De("".concat(Fe.slice(0,-N),".").concat(Fe.slice(-N)))}},{key:"add",value:function(Le){if(this.isInvalidate())return new De(Le);var Ct=new De(Le);return Ct.isInvalidate()?this:this.cal(Ct,function(Ut,Be){return Ut+Be},function(Ut){return Ut})}},{key:"multi",value:function(Le){var Ct=new De(Le);return this.isInvalidate()||Ct.isInvalidate()?new De(NaN):this.cal(Ct,function(Ut,Be){return Ut*Be},function(Ut){return Ut*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Le){return this.toString()===(Le==null?void 0:Le.toString())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":q("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),De}(),j=function(){function De(it){if((0,m.Z)(this,De),(0,me.Z)(this,"origin",""),(0,me.Z)(this,"number",void 0),(0,me.Z)(this,"empty",void 0),u(it)){this.empty=!0;return}this.origin=String(it),this.number=Number(it)}return(0,ge.Z)(De,[{key:"negate",value:function(){return new De(-this.toNumber())}},{key:"add",value:function(Le){if(this.isInvalidate())return new De(Le);var Ct=Number(Le);if(Number.isNaN(Ct))return this;var Ut=this.number+Ct;if(Ut>Number.MAX_SAFE_INTEGER)return new De(Number.MAX_SAFE_INTEGER);if(Ut<Number.MIN_SAFE_INTEGER)return new De(Number.MIN_SAFE_INTEGER);var Be=Math.max(y(this.number),y(Ct));return new De(Ut.toFixed(Be))}},{key:"multi",value:function(Le){var Ct=Number(Le);if(this.isInvalidate()||Number.isNaN(Ct))return new De(NaN);var Ut=this.number*Ct;if(Ut>Number.MAX_SAFE_INTEGER)return new De(Number.MAX_SAFE_INTEGER);if(Ut<Number.MIN_SAFE_INTEGER)return new De(Number.MIN_SAFE_INTEGER);var Be=Math.max(y(this.number),y(Ct));return new De(Ut.toFixed(Be))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Le){return this.toNumber()===(Le==null?void 0:Le.toNumber())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":_(this.number):this.origin}}]),De}();function M(De){return O()?new x(De):new j(De)}function H(De,it,Le){var Ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(De==="")return"";var Ut=q(De),Be=Ut.negativeStr,L=Ut.integerStr,p=Ut.decimalStr,b="".concat(it).concat(p),N="".concat(Be).concat(L);if(Le>=0){var S=Number(p[Le]);if(S>=5&&!Ct){var k=M(De).add("".concat(Be,"0.").concat("0".repeat(Le)).concat(10-S));return H(k.toString(),it,Le,Ct)}return Le===0?N:"".concat(N).concat(it).concat(p.padEnd(Le,"0").slice(0,Le))}return b===".0"?N:"".concat(N).concat(b)}var R=M,P=K(92310),X=K.n(P),fe=K(36901),_e=K(34280);function we(De,it){return typeof Proxy!="undefined"&&De?new Proxy(De,{get:function(Ct,Ut){if(it[Ut])return it[Ut];var Be=Ct[Ut];return typeof Be=="function"?Be.bind(Ct):Be}}):De}var ie=K(8654),ye=K(59301),Pe=K(48736);function ue(De,it){var Le=(0,ye.useRef)(null);function Ct(){try{var Be=De.selectionStart,L=De.selectionEnd,p=De.value,b=p.substring(0,Be),N=p.substring(L);Le.current={start:Be,end:L,value:p,beforeTxt:b,afterTxt:N}}catch(S){}}function Ut(){if(De&&Le.current&&it)try{var Be=De.value,L=Le.current,p=L.beforeTxt,b=L.afterTxt,N=L.start,S=Be.length;if(Be.startsWith(p))S=p.length;else if(Be.endsWith(b))S=Be.length-Le.current.afterTxt.length;else{var k=p[N-1],te=Be.indexOf(k,N-1);te!==-1&&(S=te+1)}De.setSelectionRange(S,S)}catch(Fe){(0,Pe.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Fe.message))}}return[Ct,Ut]}var Me=K(49658),Z=function(){var it=(0,ye.useState)(!1),Le=(0,he.Z)(it,2),Ct=Le[0],Ut=Le[1];return(0,_e.Z)(function(){Ut((0,Me.Z)())},[]),Ct},I=Z,G=K(16089),z=200,se=600;function re(De){var it=De.prefixCls,Le=De.upNode,Ct=De.downNode,Ut=De.upDisabled,Be=De.downDisabled,L=De.onStep,p=ye.useRef(),b=ye.useRef([]),N=ye.useRef();N.current=L;var S=function(){clearTimeout(p.current)},k=function(ut,st){ut.preventDefault(),S(),N.current(st);function Xe(){N.current(st),p.current=setTimeout(Xe,z)}p.current=setTimeout(Xe,se)};ye.useEffect(function(){return function(){S(),b.current.forEach(function(Je){return G.Z.cancel(Je)})}},[]);var te=I();if(te)return null;var Fe="".concat(it,"-handler"),ke=X()(Fe,"".concat(Fe,"-up"),(0,me.Z)({},"".concat(Fe,"-up-disabled"),Ut)),Ge=X()(Fe,"".concat(Fe,"-down"),(0,me.Z)({},"".concat(Fe,"-down-disabled"),Be)),ze=function(){return b.current.push((0,G.Z)(S))},Ft={unselectable:"on",role:"button",onMouseUp:ze,onMouseLeave:ze};return ye.createElement("div",{className:"".concat(Fe,"-wrap")},ye.createElement("span",(0,V.Z)({},Ft,{onMouseDown:function(ut){k(ut,!0)},"aria-label":"Increase Value","aria-disabled":Ut,className:ke}),Le||ye.createElement("span",{unselectable:"on",className:"".concat(it,"-handler-up-inner")})),ye.createElement("span",(0,V.Z)({},Ft,{onMouseDown:function(ut){k(ut,!1)},"aria-label":"Decrease Value","aria-disabled":Be,className:Ge}),Ct||ye.createElement("span",{unselectable:"on",className:"".concat(it,"-handler-down-inner")})))}function w(De){var it=typeof De=="number"?_(De):q(De).fullStr,Le=it.includes(".");return Le?q(it.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:De+"0"}var B=K(30292),$=function(){var De=(0,ye.useRef)(0),it=function(){G.Z.cancel(De.current)};return(0,ye.useEffect)(function(){return it},[]),function(Le){it(),De.current=(0,G.Z)(function(){Le()})}},ae=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],$e=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],qe=function(it,Le){return it||Le.isEmpty()?Le.toString():Le.toNumber()},Bt=function(it){var Le=R(it);return Le.isInvalidate()?null:Le},pt=ye.forwardRef(function(De,it){var Le=De.prefixCls,Ct=De.className,Ut=De.style,Be=De.min,L=De.max,p=De.step,b=p===void 0?1:p,N=De.defaultValue,S=De.value,k=De.disabled,te=De.readOnly,Fe=De.upHandler,ke=De.downHandler,Ge=De.keyboard,ze=De.changeOnWheel,Ft=ze===void 0?!1:ze,Je=De.controls,ut=Je===void 0?!0:Je,st=De.classNames,Xe=De.stringMode,Ve=De.parser,Ze=De.formatter,ct=De.precision,yt=De.decimalSeparator,Nt=De.onChange,bt=De.onInput,Wt=De.onPressEnter,Ht=De.onStep,qt=De.changeOnBlur,fr=qt===void 0?!0:qt,Ur=De.domRef,St=(0,W.Z)(De,ae),er="".concat(Le,"-input"),Ue=ye.useRef(null),be=ye.useState(!1),Ee=(0,he.Z)(be,2),Y=Ee[0],ee=Ee[1],oe=ye.useRef(!1),pe=ye.useRef(!1),Ce=ye.useRef(!1),ft=ye.useState(function(){return R(S!=null?S:N)}),Et=(0,he.Z)(ft,2),dt=Et[0],Zt=Et[1];function _r(At){S===void 0&&Zt(At)}var Mr=ye.useCallback(function(At,ot){if(!ot)return ct>=0?ct:Math.max(y(At),y(b))},[ct,b]),$t=ye.useCallback(function(At){var ot=String(At);if(Ve)return Ve(ot);var Dt=ot;return yt&&(Dt=Dt.replace(yt,".")),Dt.replace(/[^\w.-]+/g,"")},[Ve,yt]),Kt=ye.useRef(""),Tr=ye.useCallback(function(At,ot){if(Ze)return Ze(At,{userTyping:ot,input:String(Kt.current)});var Dt=typeof At=="number"?_(At):At;if(!ot){var zt=Mr(Dt,ot);if(C(Dt)&&(yt||zt>=0)){var ar=yt||".";Dt=H(Dt,ar,zt)}}return Dt},[Ze,Mr,yt]),Zr=ye.useState(function(){var At=N!=null?N:S;return dt.isInvalidate()&&["string","number"].includes((0,Se.Z)(At))?Number.isNaN(At)?"":At:Tr(dt.toString(),!1)}),Re=(0,he.Z)(Zr,2),Ir=Re[0],Er=Re[1];Kt.current=Ir;function vr(At,ot){Er(Tr(At.isInvalidate()?At.toString(!1):At.toString(!ot),ot))}var _n=ye.useMemo(function(){return Bt(L)},[L,ct]),Or=ye.useMemo(function(){return Bt(Be)},[Be,ct]),vn=ye.useMemo(function(){return!_n||!dt||dt.isInvalidate()?!1:_n.lessEquals(dt)},[_n,dt]),zr=ye.useMemo(function(){return!Or||!dt||dt.isInvalidate()?!1:dt.lessEquals(Or)},[Or,dt]),Fn=ue(Ue.current,Y),hn=(0,he.Z)(Fn,2),yn=hn[0],Kn=hn[1],Hr=function(ot){return _n&&!ot.lessEquals(_n)?_n:Or&&!Or.lessEquals(ot)?Or:null},Gr=function(ot){return!Hr(ot)},Xr=function(ot,Dt){var zt=ot,ar=Gr(zt)||zt.isEmpty();if(!zt.isEmpty()&&!Dt&&(zt=Hr(zt)||zt,ar=!0),!te&&!k&&ar){var Lr=zt.toString(),lr=Mr(Lr,Dt);return lr>=0&&(zt=R(H(Lr,".",lr)),Gr(zt)||(zt=R(H(Lr,".",lr,!0)))),zt.equals(dt)||(_r(zt),Nt==null||Nt(zt.isEmpty()?null:qe(Xe,zt)),S===void 0&&vr(zt,Dt)),zt}return dt},Kr=$(),ln=function At(ot){if(yn(),Kt.current=ot,Er(ot),!pe.current){var Dt=$t(ot),zt=R(Dt);zt.isNaN()||Xr(zt,!0)}bt==null||bt(ot),Kr(function(){var ar=ot;Ve||(ar=ot.replace(/。/g,".")),ar!==ot&&At(ar)})},dn=function(){pe.current=!0},Cn=function(){pe.current=!1,ln(Ue.current.value)},cr=function(ot){ln(ot.target.value)},yr=function(ot){var Dt;if(!(ot&&vn||!ot&&zr)){oe.current=!1;var zt=R(Ce.current?w(b):b);ot||(zt=zt.negate());var ar=(dt||R(0)).add(zt.toString()),Lr=Xr(ar,!1);Ht==null||Ht(qe(Xe,Lr),{offset:Ce.current?w(b):b,type:ot?"up":"down"}),(Dt=Ue.current)===null||Dt===void 0||Dt.focus()}},Qe=function(ot){var Dt=R($t(Ir)),zt;Dt.isNaN()?zt=Xr(dt,ot):zt=Xr(Dt,ot),S!==void 0?vr(dt,!1):zt.isNaN()||vr(zt,!1)},Ye=function(){oe.current=!0},_t=function(ot){var Dt=ot.key,zt=ot.shiftKey;oe.current=!0,Ce.current=zt,Dt==="Enter"&&(pe.current||(oe.current=!1),Qe(!1),Wt==null||Wt(ot)),Ge!==!1&&!pe.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Dt)&&(yr(Dt==="Up"||Dt==="ArrowUp"),ot.preventDefault())},at=function(){oe.current=!1,Ce.current=!1};ye.useEffect(function(){if(Ft&&Y){var At=function(zt){yr(zt.deltaY<0),zt.preventDefault()},ot=Ue.current;if(ot)return ot.addEventListener("wheel",At,{passive:!1}),function(){return ot.removeEventListener("wheel",At)}}});var wt=function(){fr&&Qe(!1),ee(!1),oe.current=!1};return(0,_e.o)(function(){dt.isInvalidate()||vr(dt,!1)},[ct,Ze]),(0,_e.o)(function(){var At=R(S);Zt(At);var ot=R($t(Ir));(!At.equals(ot)||!oe.current||Ze)&&vr(At,oe.current)},[S]),(0,_e.o)(function(){Ze&&Kn()},[Ir]),ye.createElement("div",{ref:Ur,className:X()(Le,Ct,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Le,"-focused"),Y),"".concat(Le,"-disabled"),k),"".concat(Le,"-readonly"),te),"".concat(Le,"-not-a-number"),dt.isNaN()),"".concat(Le,"-out-of-range"),!dt.isInvalidate()&&!Gr(dt))),style:Ut,onFocus:function(){ee(!0)},onBlur:wt,onKeyDown:_t,onKeyUp:at,onCompositionStart:dn,onCompositionEnd:Cn,onBeforeInput:Ye},ut&&ye.createElement(re,{prefixCls:Le,upNode:Fe,downNode:ke,upDisabled:vn,downDisabled:zr,onStep:yr}),ye.createElement("div",{className:"".concat(er,"-wrap")},ye.createElement("input",(0,V.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Be,"aria-valuemax":L,"aria-valuenow":dt.isInvalidate()?null:dt.toString(),step:b},St,{ref:(0,ie.sQ)(Ue,it),className:er,value:Ir,onChange:cr,disabled:k,readOnly:te}))))}),Qt=ye.forwardRef(function(De,it){var Le=De.disabled,Ct=De.style,Ut=De.prefixCls,Be=Ut===void 0?"rc-input-number":Ut,L=De.value,p=De.prefix,b=De.suffix,N=De.addonBefore,S=De.addonAfter,k=De.className,te=De.classNames,Fe=(0,W.Z)(De,$e),ke=ye.useRef(null),Ge=ye.useRef(null),ze=ye.useRef(null),Ft=function(ut){ze.current&&(0,B.nH)(ze.current,ut)};return ye.useImperativeHandle(it,function(){return we(ze.current,{focus:Ft,nativeElement:ke.current.nativeElement||Ge.current})}),ye.createElement(fe.BaseInput,{className:k,triggerFocus:Ft,prefixCls:Be,value:L,disabled:Le,style:Ct,prefix:p,suffix:b,addonAfter:S,addonBefore:N,classNames:te,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ke},ye.createElement(pt,(0,V.Z)({prefixCls:Be,disabled:Le,ref:ze,domRef:Ge,className:te==null?void 0:te.input},Fe)))}),xt=Qt,ht=xt},66003:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return ge}});var V=K(62646),me=K(20439),Se=K(93664),he=K(59301),W=["show"];function m(O,u){if(!u.max)return!0;var q=u.strategy(O);return q<=u.max}function ge(O,u){return he.useMemo(function(){var q={};u&&(q.show=(0,Se.Z)(u)==="object"&&u.formatter?u.formatter:!!u),q=(0,me.Z)((0,me.Z)({},q),O);var D=q,y=D.show,_=(0,V.Z)(D,W);return(0,me.Z)((0,me.Z)({},_),{},{show:!!y,showFormatter:typeof y=="function"?y:void 0,strategy:_.strategy||function(C){return C.length}})},[O,u])}},36901:function(dr,vt,K){"use strict";K.r(vt),K.d(vt,{BaseInput:function(){return q},default:function(){return P}});var V=K(20439),me=K(14809),Se=K(4635),he=K(93664),W=K(92310),m=K.n(W),ge=K(59301),O=K(30292),u=ge.forwardRef(function(X,fe){var _e,we,ie,ye=X.inputElement,Pe=X.children,ue=X.prefixCls,Me=X.prefix,Z=X.suffix,I=X.addonBefore,G=X.addonAfter,z=X.className,se=X.style,re=X.disabled,w=X.readOnly,B=X.focused,$=X.triggerFocus,ae=X.allowClear,$e=X.value,qe=X.handleReset,Bt=X.hidden,pt=X.classes,Qt=X.classNames,xt=X.dataAttrs,ht=X.styles,De=X.components,it=X.onClear,Le=Pe!=null?Pe:ye,Ct=(De==null?void 0:De.affixWrapper)||"span",Ut=(De==null?void 0:De.groupWrapper)||"span",Be=(De==null?void 0:De.wrapper)||"span",L=(De==null?void 0:De.groupAddon)||"span",p=(0,ge.useRef)(null),b=function(yt){var Nt;(Nt=p.current)!==null&&Nt!==void 0&&Nt.contains(yt.target)&&($==null||$())},N=(0,O.X3)(X),S=(0,ge.cloneElement)(Le,{value:$e,className:m()((_e=Le.props)===null||_e===void 0?void 0:_e.className,!N&&(Qt==null?void 0:Qt.variant))||null}),k=(0,ge.useRef)(null);if(ge.useImperativeHandle(fe,function(){return{nativeElement:k.current||p.current}}),N){var te=null;if(ae){var Fe=!re&&!w&&$e,ke="".concat(ue,"-clear-icon"),Ge=(0,he.Z)(ae)==="object"&&ae!==null&&ae!==void 0&&ae.clearIcon?ae.clearIcon:"\u2716";te=ge.createElement("button",{type:"button",tabIndex:-1,onClick:function(yt){qe==null||qe(yt),it==null||it()},onMouseDown:function(yt){return yt.preventDefault()},className:m()(ke,(0,Se.Z)((0,Se.Z)({},"".concat(ke,"-hidden"),!Fe),"".concat(ke,"-has-suffix"),!!Z))},Ge)}var ze="".concat(ue,"-affix-wrapper"),Ft=m()(ze,(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(ue,"-disabled"),re),"".concat(ze,"-disabled"),re),"".concat(ze,"-focused"),B),"".concat(ze,"-readonly"),w),"".concat(ze,"-input-with-clear-btn"),Z&&ae&&$e),pt==null?void 0:pt.affixWrapper,Qt==null?void 0:Qt.affixWrapper,Qt==null?void 0:Qt.variant),Je=(Z||ae)&&ge.createElement("span",{className:m()("".concat(ue,"-suffix"),Qt==null?void 0:Qt.suffix),style:ht==null?void 0:ht.suffix},te,Z);S=ge.createElement(Ct,(0,me.Z)({className:Ft,style:ht==null?void 0:ht.affixWrapper,onClick:b},xt==null?void 0:xt.affixWrapper,{ref:p}),Me&&ge.createElement("span",{className:m()("".concat(ue,"-prefix"),Qt==null?void 0:Qt.prefix),style:ht==null?void 0:ht.prefix},Me),S,Je)}if((0,O.He)(X)){var ut="".concat(ue,"-group"),st="".concat(ut,"-addon"),Xe="".concat(ut,"-wrapper"),Ve=m()("".concat(ue,"-wrapper"),ut,pt==null?void 0:pt.wrapper,Qt==null?void 0:Qt.wrapper),Ze=m()(Xe,(0,Se.Z)({},"".concat(Xe,"-disabled"),re),pt==null?void 0:pt.group,Qt==null?void 0:Qt.groupWrapper);S=ge.createElement(Ut,{className:Ze,ref:k},ge.createElement(Be,{className:Ve},I&&ge.createElement(L,{className:st},I),S,G&&ge.createElement(L,{className:st},G)))}return ge.cloneElement(S,{className:m()((we=S.props)===null||we===void 0?void 0:we.className,z)||null,style:(0,V.Z)((0,V.Z)({},(ie=S.props)===null||ie===void 0?void 0:ie.style),se),hidden:Bt})}),q=u,D=K(95190),y=K(50298),_=K(62646),C=K(18929),x=K(2738),j=K(66003),M=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],H=(0,ge.forwardRef)(function(X,fe){var _e=X.autoComplete,we=X.onChange,ie=X.onFocus,ye=X.onBlur,Pe=X.onPressEnter,ue=X.onKeyDown,Me=X.onKeyUp,Z=X.prefixCls,I=Z===void 0?"rc-input":Z,G=X.disabled,z=X.htmlSize,se=X.className,re=X.maxLength,w=X.suffix,B=X.showCount,$=X.count,ae=X.type,$e=ae===void 0?"text":ae,qe=X.classes,Bt=X.classNames,pt=X.styles,Qt=X.onCompositionStart,xt=X.onCompositionEnd,ht=(0,_.Z)(X,M),De=(0,ge.useState)(!1),it=(0,y.Z)(De,2),Le=it[0],Ct=it[1],Ut=(0,ge.useRef)(!1),Be=(0,ge.useRef)(!1),L=(0,ge.useRef)(null),p=(0,ge.useRef)(null),b=function(er){L.current&&(0,O.nH)(L.current,er)},N=(0,C.Z)(X.defaultValue,{value:X.value}),S=(0,y.Z)(N,2),k=S[0],te=S[1],Fe=k==null?"":String(k),ke=(0,ge.useState)(null),Ge=(0,y.Z)(ke,2),ze=Ge[0],Ft=Ge[1],Je=(0,j.Z)($,B),ut=Je.max||re,st=Je.strategy(Fe),Xe=!!ut&&st>ut;(0,ge.useImperativeHandle)(fe,function(){var St;return{focus:b,blur:function(){var Ue;(Ue=L.current)===null||Ue===void 0||Ue.blur()},setSelectionRange:function(Ue,be,Ee){var Y;(Y=L.current)===null||Y===void 0||Y.setSelectionRange(Ue,be,Ee)},select:function(){var Ue;(Ue=L.current)===null||Ue===void 0||Ue.select()},input:L.current,nativeElement:((St=p.current)===null||St===void 0?void 0:St.nativeElement)||L.current}}),(0,ge.useEffect)(function(){Be.current&&(Be.current=!1),Ct(function(St){return St&&G?!1:St})},[G]);var Ve=function(er,Ue,be){var Ee=Ue;if(!Ut.current&&Je.exceedFormatter&&Je.max&&Je.strategy(Ue)>Je.max){if(Ee=Je.exceedFormatter(Ue,{max:Je.max}),Ue!==Ee){var Y,ee;Ft([((Y=L.current)===null||Y===void 0?void 0:Y.selectionStart)||0,((ee=L.current)===null||ee===void 0?void 0:ee.selectionEnd)||0])}}else if(be.source==="compositionEnd")return;te(Ee),L.current&&(0,O.rJ)(L.current,er,we,Ee)};(0,ge.useEffect)(function(){if(ze){var St;(St=L.current)===null||St===void 0||St.setSelectionRange.apply(St,(0,D.Z)(ze))}},[ze]);var Ze=function(er){Ve(er,er.target.value,{source:"change"})},ct=function(er){Ut.current=!1,Ve(er,er.currentTarget.value,{source:"compositionEnd"}),xt==null||xt(er)},yt=function(er){Pe&&er.key==="Enter"&&!Be.current&&(Be.current=!0,Pe(er)),ue==null||ue(er)},Nt=function(er){er.key==="Enter"&&(Be.current=!1),Me==null||Me(er)},bt=function(er){Ct(!0),ie==null||ie(er)},Wt=function(er){Be.current&&(Be.current=!1),Ct(!1),ye==null||ye(er)},Ht=function(er){te(""),b(),L.current&&(0,O.rJ)(L.current,er,we)},qt=Xe&&"".concat(I,"-out-of-range"),fr=function(){var er=(0,x.Z)(X,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ge.createElement("input",(0,me.Z)({autoComplete:_e},er,{onChange:Ze,onFocus:bt,onBlur:Wt,onKeyDown:yt,onKeyUp:Nt,className:m()(I,(0,Se.Z)({},"".concat(I,"-disabled"),G),Bt==null?void 0:Bt.input),style:pt==null?void 0:pt.input,ref:L,size:z,type:$e,onCompositionStart:function(be){Ut.current=!0,Qt==null||Qt(be)},onCompositionEnd:ct}))},Ur=function(){var er=Number(ut)>0;if(w||Je.show){var Ue=Je.showFormatter?Je.showFormatter({value:Fe,count:st,maxLength:ut}):"".concat(st).concat(er?" / ".concat(ut):"");return ge.createElement(ge.Fragment,null,Je.show&&ge.createElement("span",{className:m()("".concat(I,"-show-count-suffix"),(0,Se.Z)({},"".concat(I,"-show-count-has-suffix"),!!w),Bt==null?void 0:Bt.count),style:(0,V.Z)({},pt==null?void 0:pt.count)},Ue),w)}return null};return ge.createElement(q,(0,me.Z)({},ht,{prefixCls:I,className:m()(se,qt),handleReset:Ht,value:Fe,focused:Le,triggerFocus:b,suffix:Ur(),disabled:G,classes:qe,classNames:Bt,styles:pt}),fr())}),R=H,P=R},30292:function(dr,vt,K){"use strict";K.d(vt,{He:function(){return V},X3:function(){return me},nH:function(){return W},rJ:function(){return he}});function V(m){return!!(m.addonBefore||m.addonAfter)}function me(m){return!!(m.prefix||m.suffix||m.allowClear)}function Se(m,ge,O){var u=ge.cloneNode(!0),q=Object.create(m,{target:{value:u},currentTarget:{value:u}});return u.value=O,typeof ge.selectionStart=="number"&&typeof ge.selectionEnd=="number"&&(u.selectionStart=ge.selectionStart,u.selectionEnd=ge.selectionEnd),u.setSelectionRange=function(){ge.setSelectionRange.apply(ge,arguments)},q}function he(m,ge,O,u){if(O){var q=ge;if(ge.type==="click"){q=Se(ge,m,""),O(q);return}if(m.type!=="file"&&u!==void 0){q=Se(ge,m,u),O(q);return}O(q)}}function W(m,ge){if(m){m.focus(ge);var O=ge||{},u=O.cursor;if(u){var q=m.value.length;switch(u){case"start":m.setSelectionRange(0,0);break;case"end":m.setSelectionRange(q,q);break;default:m.setSelectionRange(0,q)}}}}},28321:function(dr,vt,K){"use strict";K.d(vt,{iz:function(){return zr},ck:function(){return Ee},BW:function(){return Kn},sN:function(){return Ee},Wd:function(){return Or},ZP:function(){return yr},Xl:function(){return Pe}});var V=K(14809),me=K(4635),Se=K(20439),he=K(95190),W=K(50298),m=K(62646),ge=K(92310),O=K.n(ge),u=K(11780),q=K(18929),D=K(13697),y=K(48736),_=K(59301),C=K(4676),x=_.createContext(null);function j(Qe,Ye){return Qe===void 0?null:"".concat(Qe,"-").concat(Ye)}function M(Qe){var Ye=_.useContext(x);return j(Ye,Qe)}var H=K(80547),R=["children","locked"],P=_.createContext(null);function X(Qe,Ye){var _t=(0,Se.Z)({},Qe);return Object.keys(Ye).forEach(function(at){var wt=Ye[at];wt!==void 0&&(_t[at]=wt)}),_t}function fe(Qe){var Ye=Qe.children,_t=Qe.locked,at=(0,m.Z)(Qe,R),wt=_.useContext(P),At=(0,H.Z)(function(){return X(wt,at)},[wt,at],function(ot,Dt){return!_t&&(ot[0]!==Dt[0]||!(0,D.Z)(ot[1],Dt[1],!0))});return _.createElement(P.Provider,{value:At},Ye)}var _e=[],we=_.createContext(null);function ie(){return _.useContext(we)}var ye=_.createContext(_e);function Pe(Qe){var Ye=_.useContext(ye);return _.useMemo(function(){return Qe!==void 0?[].concat((0,he.Z)(Ye),[Qe]):Ye},[Ye,Qe])}var ue=_.createContext(null),Me=_.createContext({}),Z=Me,I=K(29194);function G(Qe){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,I.Z)(Qe)){var _t=Qe.nodeName.toLowerCase(),at=["input","select","textarea","button"].includes(_t)||Qe.isContentEditable||_t==="a"&&!!Qe.getAttribute("href"),wt=Qe.getAttribute("tabindex"),At=Number(wt),ot=null;return wt&&!Number.isNaN(At)?ot=At:at&&ot===null&&(ot=0),at&&Qe.disabled&&(ot=null),ot!==null&&(ot>=0||Ye&&ot<0)}return!1}function z(Qe){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_t=(0,he.Z)(Qe.querySelectorAll("*")).filter(function(at){return G(at,Ye)});return G(Qe,Ye)&&_t.unshift(Qe),_t}var se=null;function re(){se=document.activeElement}function w(){se=null}function B(){if(se)try{se.focus()}catch(Qe){}}function $(Qe,Ye){if(Ye.keyCode===9){var _t=z(Qe),at=_t[Ye.shiftKey?0:_t.length-1],wt=at===document.activeElement||Qe===document.activeElement;if(wt){var At=_t[Ye.shiftKey?_t.length-1:0];At.focus(),Ye.preventDefault()}}}var ae=K(10228),$e=K(16089),qe=ae.Z.LEFT,Bt=ae.Z.RIGHT,pt=ae.Z.UP,Qt=ae.Z.DOWN,xt=ae.Z.ENTER,ht=ae.Z.ESC,De=ae.Z.HOME,it=ae.Z.END,Le=[pt,Qt,qe,Bt];function Ct(Qe,Ye,_t,at){var wt,At="prev",ot="next",Dt="children",zt="parent";if(Qe==="inline"&&at===xt)return{inlineTrigger:!0};var ar=(0,me.Z)((0,me.Z)({},pt,At),Qt,ot),Lr=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},qe,_t?ot:At),Bt,_t?At:ot),Qt,Dt),xt,Dt),lr=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},pt,At),Qt,ot),xt,Dt),ht,zt),qe,_t?Dt:zt),Bt,_t?zt:Dt),wr={inline:ar,horizontal:Lr,vertical:lr,inlineSub:ar,horizontalSub:lr,verticalSub:lr},U=(wt=wr["".concat(Qe).concat(Ye?"":"Sub")])===null||wt===void 0?void 0:wt[at];switch(U){case At:return{offset:-1,sibling:!0};case ot:return{offset:1,sibling:!0};case zt:return{offset:-1,sibling:!1};case Dt:return{offset:1,sibling:!1};default:return null}}function Ut(Qe){for(var Ye=Qe;Ye;){if(Ye.getAttribute("data-menu-list"))return Ye;Ye=Ye.parentElement}return null}function Be(Qe,Ye){for(var _t=Qe||document.activeElement;_t;){if(Ye.has(_t))return _t;_t=_t.parentElement}return null}function L(Qe,Ye){var _t=z(Qe,!0);return _t.filter(function(at){return Ye.has(at)})}function p(Qe,Ye,_t){var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Qe)return null;var wt=L(Qe,Ye),At=wt.length,ot=wt.findIndex(function(Dt){return _t===Dt});return at<0?ot===-1?ot=At-1:ot-=1:at>0&&(ot+=1),ot=(ot+At)%At,wt[ot]}var b=function(Ye,_t){var at=new Set,wt=new Map,At=new Map;return Ye.forEach(function(ot){var Dt=document.querySelector("[data-menu-id='".concat(j(_t,ot),"']"));Dt&&(at.add(Dt),At.set(Dt,ot),wt.set(ot,Dt))}),{elements:at,key2element:wt,element2key:At}};function N(Qe,Ye,_t,at,wt,At,ot,Dt,zt,ar){var Lr=_.useRef(),lr=_.useRef();lr.current=Ye;var wr=function(){$e.Z.cancel(Lr.current)};return _.useEffect(function(){return function(){wr()}},[]),function(U){var Q=U.which;if([].concat(Le,[xt,ht,De,it]).includes(Q)){var ne=At(),le=b(ne,at),Ie=le,Ke=Ie.elements,et=Ie.key2element,tt=Ie.element2key,Tt=et.get(Ye),lt=Be(Tt,Ke),ve=tt.get(lt),rt=Ct(Qe,ot(ve,!0).length===1,_t,Q);if(!rt&&Q!==De&&Q!==it)return;(Le.includes(Q)||[De,it].includes(Q))&&U.preventDefault();var mt=function(Gt){if(Gt){var mr=Gt,pr=Gt.querySelector("a");pr!=null&&pr.getAttribute("href")&&(mr=pr);var Dr=tt.get(Gt);Dt(Dr),wr(),Lr.current=(0,$e.Z)(function(){lr.current===Dr&&mr.focus()})}};if([De,it].includes(Q)||rt.sibling||!lt){var Rt;!lt||Qe==="inline"?Rt=wt.current:Rt=Ut(lt);var Yt,It=L(Rt,Ke);Q===De?Yt=It[0]:Q===it?Yt=It[It.length-1]:Yt=p(Rt,Ke,lt,rt.offset),mt(Yt)}else if(rt.inlineTrigger)zt(ve);else if(rt.offset>0)zt(ve,!0),wr(),Lr.current=(0,$e.Z)(function(){le=b(ne,at);var nr=lt.getAttribute("aria-controls"),Gt=document.getElementById(nr),mr=p(Gt,le.elements);mt(mr)},5);else if(rt.offset<0){var kt=ot(ve,!0),Xt=kt[kt.length-2],sr=et.get(Xt);zt(Xt,!1),mt(sr)}}ar==null||ar(U)}}function S(Qe){Promise.resolve().then(Qe)}var k="__RC_UTIL_PATH_SPLIT__",te=function(Ye){return Ye.join(k)},Fe=function(Ye){return Ye.split(k)},ke="rc-menu-more";function Ge(){var Qe=_.useState({}),Ye=(0,W.Z)(Qe,2),_t=Ye[1],at=(0,_.useRef)(new Map),wt=(0,_.useRef)(new Map),At=_.useState([]),ot=(0,W.Z)(At,2),Dt=ot[0],zt=ot[1],ar=(0,_.useRef)(0),Lr=(0,_.useRef)(!1),lr=function(){Lr.current||_t({})},wr=(0,_.useCallback)(function(et,tt){var Tt=te(tt);wt.current.set(Tt,et),at.current.set(et,Tt),ar.current+=1;var lt=ar.current;S(function(){lt===ar.current&&lr()})},[]),U=(0,_.useCallback)(function(et,tt){var Tt=te(tt);wt.current.delete(Tt),at.current.delete(et)},[]),Q=(0,_.useCallback)(function(et){zt(et)},[]),ne=(0,_.useCallback)(function(et,tt){var Tt=at.current.get(et)||"",lt=Fe(Tt);return tt&&Dt.includes(lt[0])&&lt.unshift(ke),lt},[Dt]),le=(0,_.useCallback)(function(et,tt){return et.filter(function(Tt){return Tt!==void 0}).some(function(Tt){var lt=ne(Tt,!0);return lt.includes(tt)})},[ne]),Ie=function(){var tt=(0,he.Z)(at.current.keys());return Dt.length&&tt.push(ke),tt},Ke=(0,_.useCallback)(function(et){var tt="".concat(at.current.get(et)).concat(k),Tt=new Set;return(0,he.Z)(wt.current.keys()).forEach(function(lt){lt.startsWith(tt)&&Tt.add(wt.current.get(lt))}),Tt},[]);return _.useEffect(function(){return function(){Lr.current=!0}},[]),{registerPath:wr,unregisterPath:U,refreshOverflowKeys:Q,isSubPathKey:le,getKeyPath:ne,getKeys:Ie,getSubPathKeys:Ke}}function ze(Qe){var Ye=_.useRef(Qe);Ye.current=Qe;var _t=_.useCallback(function(){for(var at,wt=arguments.length,At=new Array(wt),ot=0;ot<wt;ot++)At[ot]=arguments[ot];return(at=Ye.current)===null||at===void 0?void 0:at.call.apply(at,[Ye].concat(At))},[]);return Qe?_t:void 0}var Ft=Math.random().toFixed(5).toString().slice(2),Je=0;function ut(Qe){var Ye=(0,q.Z)(Qe,{value:Qe}),_t=(0,W.Z)(Ye,2),at=_t[0],wt=_t[1];return _.useEffect(function(){Je+=1;var At="".concat(Ft,"-").concat(Je);wt("rc-menu-uuid-".concat(At))},[]),at}var st=K(99153),Xe=K(84851),Ve=K(19257),Ze=K(93046),ct=K(2738),yt=K(8654);function Nt(Qe,Ye,_t,at){var wt=_.useContext(P),At=wt.activeKey,ot=wt.onActive,Dt=wt.onInactive,zt={active:At===Qe};return Ye||(zt.onMouseEnter=function(ar){_t==null||_t({key:Qe,domEvent:ar}),ot(Qe)},zt.onMouseLeave=function(ar){at==null||at({key:Qe,domEvent:ar}),Dt(Qe)}),zt}function bt(Qe){var Ye=_.useContext(P),_t=Ye.mode,at=Ye.rtl,wt=Ye.inlineIndent;if(_t!=="inline")return null;var At=Qe;return at?{paddingRight:At*wt}:{paddingLeft:At*wt}}function Wt(Qe){var Ye=Qe.icon,_t=Qe.props,at=Qe.children,wt;return Ye===null||Ye===!1?null:(typeof Ye=="function"?wt=_.createElement(Ye,(0,Se.Z)({},_t)):typeof Ye!="boolean"&&(wt=Ye),wt||at||null)}var Ht=["item"];function qt(Qe){var Ye=Qe.item,_t=(0,m.Z)(Qe,Ht);return Object.defineProperty(_t,"item",{get:function(){return(0,y.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ye}}),_t}var fr=["title","attribute","elementRef"],Ur=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],St=["active"],er=function(Qe){(0,Ve.Z)(_t,Qe);var Ye=(0,Ze.Z)(_t);function _t(){return(0,st.Z)(this,_t),Ye.apply(this,arguments)}return(0,Xe.Z)(_t,[{key:"render",value:function(){var wt=this.props,At=wt.title,ot=wt.attribute,Dt=wt.elementRef,zt=(0,m.Z)(wt,fr),ar=(0,ct.Z)(zt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,y.ZP)(!ot,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),_.createElement(u.Z.Item,(0,V.Z)({},ot,{title:typeof At=="string"?At:void 0},ar,{ref:Dt}))}}]),_t}(_.Component),Ue=_.forwardRef(function(Qe,Ye){var _t=Qe.style,at=Qe.className,wt=Qe.eventKey,At=Qe.warnKey,ot=Qe.disabled,Dt=Qe.itemIcon,zt=Qe.children,ar=Qe.role,Lr=Qe.onMouseEnter,lr=Qe.onMouseLeave,wr=Qe.onClick,U=Qe.onKeyDown,Q=Qe.onFocus,ne=(0,m.Z)(Qe,Ur),le=M(wt),Ie=_.useContext(P),Ke=Ie.prefixCls,et=Ie.onItemClick,tt=Ie.disabled,Tt=Ie.overflowDisabled,lt=Ie.itemIcon,ve=Ie.selectedKeys,rt=Ie.onActive,mt=_.useContext(Z),Rt=mt._internalRenderMenuItem,Yt="".concat(Ke,"-item"),It=_.useRef(),kt=_.useRef(),Xt=tt||ot,sr=(0,yt.x1)(Ye,kt),nr=Pe(wt),Gt=function(Fr){return{key:wt,keyPath:(0,he.Z)(nr).reverse(),item:It.current,domEvent:Fr}},mr=Dt||lt,pr=Nt(wt,Xt,Lr,lr),Dr=pr.active,gr=(0,m.Z)(pr,St),Ar=ve.includes(wt),Pr=bt(nr.length),Br=function(Fr){if(!Xt){var Nr=Gt(Fr);wr==null||wr(qt(Nr)),et(Nr)}},Qr=function(Fr){if(U==null||U(Fr),Fr.which===ae.Z.ENTER){var Nr=Gt(Fr);wr==null||wr(qt(Nr)),et(Nr)}},Yr=function(Fr){rt(wt),Q==null||Q(Fr)},tn={};Qe.role==="option"&&(tn["aria-selected"]=Ar);var kr=_.createElement(er,(0,V.Z)({ref:It,elementRef:sr,role:ar===null?"none":ar||"menuitem",tabIndex:ot?null:-1,"data-menu-id":Tt&&le?null:le},(0,ct.Z)(ne,["extra"]),gr,tn,{component:"li","aria-disabled":ot,style:(0,Se.Z)((0,Se.Z)({},Pr),_t),className:O()(Yt,(0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Yt,"-active"),Dr),"".concat(Yt,"-selected"),Ar),"".concat(Yt,"-disabled"),Xt),at),onClick:Br,onKeyDown:Qr,onFocus:Yr}),zt,_.createElement(Wt,{props:(0,Se.Z)((0,Se.Z)({},Qe),{},{isSelected:Ar}),icon:mr}));return Rt&&(kr=Rt(kr,Qe,{selected:Ar})),kr});function be(Qe,Ye){var _t=Qe.eventKey,at=ie(),wt=Pe(_t);return _.useEffect(function(){if(at)return at.registerPath(_t,wt),function(){at.unregisterPath(_t,wt)}},[wt]),at?null:_.createElement(Ue,(0,V.Z)({},Qe,{ref:Ye}))}var Ee=_.forwardRef(be),Y=["className","children"],ee=function(Ye,_t){var at=Ye.className,wt=Ye.children,At=(0,m.Z)(Ye,Y),ot=_.useContext(P),Dt=ot.prefixCls,zt=ot.mode,ar=ot.rtl;return _.createElement("ul",(0,V.Z)({className:O()(Dt,ar&&"".concat(Dt,"-rtl"),"".concat(Dt,"-sub"),"".concat(Dt,"-").concat(zt==="inline"?"inline":"vertical"),at),role:"menu"},At,{"data-menu-list":!0,ref:_t}),wt)},oe=_.forwardRef(ee);oe.displayName="SubMenuList";var pe=oe,Ce=K(11592);function ft(Qe,Ye){return(0,Ce.Z)(Qe).map(function(_t,at){if(_.isValidElement(_t)){var wt,At,ot=_t.key,Dt=(wt=(At=_t.props)===null||At===void 0?void 0:At.eventKey)!==null&&wt!==void 0?wt:ot,zt=Dt==null;zt&&(Dt="tmp_key-".concat([].concat((0,he.Z)(Ye),[at]).join("-")));var ar={key:Dt,eventKey:Dt};return _.cloneElement(_t,ar)}return _t})}var Et=K(65966),dt={adjustX:1,adjustY:1},Zt={topLeft:{points:["bl","tl"],overflow:dt},topRight:{points:["br","tr"],overflow:dt},bottomLeft:{points:["tl","bl"],overflow:dt},bottomRight:{points:["tr","br"],overflow:dt},leftTop:{points:["tr","tl"],overflow:dt},leftBottom:{points:["br","bl"],overflow:dt},rightTop:{points:["tl","tr"],overflow:dt},rightBottom:{points:["bl","br"],overflow:dt}},_r={topLeft:{points:["bl","tl"],overflow:dt},topRight:{points:["br","tr"],overflow:dt},bottomLeft:{points:["tl","bl"],overflow:dt},bottomRight:{points:["tr","br"],overflow:dt},rightTop:{points:["tr","tl"],overflow:dt},rightBottom:{points:["br","bl"],overflow:dt},leftTop:{points:["tl","tr"],overflow:dt},leftBottom:{points:["bl","br"],overflow:dt}},Mr=null;function $t(Qe,Ye,_t){if(Ye)return Ye;if(_t)return _t[Qe]||_t.other}var Kt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Tr(Qe){var Ye=Qe.prefixCls,_t=Qe.visible,at=Qe.children,wt=Qe.popup,At=Qe.popupStyle,ot=Qe.popupClassName,Dt=Qe.popupOffset,zt=Qe.disabled,ar=Qe.mode,Lr=Qe.onVisibleChange,lr=_.useContext(P),wr=lr.getPopupContainer,U=lr.rtl,Q=lr.subMenuOpenDelay,ne=lr.subMenuCloseDelay,le=lr.builtinPlacements,Ie=lr.triggerSubMenuAction,Ke=lr.forceSubMenuRender,et=lr.rootClassName,tt=lr.motion,Tt=lr.defaultMotions,lt=_.useState(!1),ve=(0,W.Z)(lt,2),rt=ve[0],mt=ve[1],Rt=U?(0,Se.Z)((0,Se.Z)({},_r),le):(0,Se.Z)((0,Se.Z)({},Zt),le),Yt=Kt[ar],It=$t(ar,tt,Tt),kt=_.useRef(It);ar!=="inline"&&(kt.current=It);var Xt=(0,Se.Z)((0,Se.Z)({},kt.current),{},{leavedClassName:"".concat(Ye,"-hidden"),removeOnLeave:!1,motionAppear:!0}),sr=_.useRef();return _.useEffect(function(){return sr.current=(0,$e.Z)(function(){mt(_t)}),function(){$e.Z.cancel(sr.current)}},[_t]),_.createElement(Et.Z,{prefixCls:Ye,popupClassName:O()("".concat(Ye,"-popup"),(0,me.Z)({},"".concat(Ye,"-rtl"),U),ot,et),stretch:ar==="horizontal"?"minWidth":null,getPopupContainer:wr,builtinPlacements:Rt,popupPlacement:Yt,popupVisible:rt,popup:wt,popupStyle:At,popupAlign:Dt&&{offset:Dt},action:zt?[]:[Ie],mouseEnterDelay:Q,mouseLeaveDelay:ne,onPopupVisibleChange:Lr,forceRender:Ke,popupMotion:Xt,fresh:!0},at)}var Zr=K(77900);function Re(Qe){var Ye=Qe.id,_t=Qe.open,at=Qe.keyPath,wt=Qe.children,At="inline",ot=_.useContext(P),Dt=ot.prefixCls,zt=ot.forceSubMenuRender,ar=ot.motion,Lr=ot.defaultMotions,lr=ot.mode,wr=_.useRef(!1);wr.current=lr===At;var U=_.useState(!wr.current),Q=(0,W.Z)(U,2),ne=Q[0],le=Q[1],Ie=wr.current?_t:!1;_.useEffect(function(){wr.current&&le(!1)},[lr]);var Ke=(0,Se.Z)({},$t(At,ar,Lr));at.length>1&&(Ke.motionAppear=!1);var et=Ke.onVisibleChanged;return Ke.onVisibleChanged=function(tt){return!wr.current&&!tt&&le(!0),et==null?void 0:et(tt)},ne?null:_.createElement(fe,{mode:At,locked:!wr.current},_.createElement(Zr.default,(0,V.Z)({visible:Ie},Ke,{forceRender:zt,removeOnLeave:!1,leavedClassName:"".concat(Dt,"-hidden")}),function(tt){var Tt=tt.className,lt=tt.style;return _.createElement(pe,{id:Ye,className:Tt,style:lt},wt)}))}var Ir=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Er=["active"],vr=_.forwardRef(function(Qe,Ye){var _t=Qe.style,at=Qe.className,wt=Qe.title,At=Qe.eventKey,ot=Qe.warnKey,Dt=Qe.disabled,zt=Qe.internalPopupClose,ar=Qe.children,Lr=Qe.itemIcon,lr=Qe.expandIcon,wr=Qe.popupClassName,U=Qe.popupOffset,Q=Qe.popupStyle,ne=Qe.onClick,le=Qe.onMouseEnter,Ie=Qe.onMouseLeave,Ke=Qe.onTitleClick,et=Qe.onTitleMouseEnter,tt=Qe.onTitleMouseLeave,Tt=(0,m.Z)(Qe,Ir),lt=M(At),ve=_.useContext(P),rt=ve.prefixCls,mt=ve.mode,Rt=ve.openKeys,Yt=ve.disabled,It=ve.overflowDisabled,kt=ve.activeKey,Xt=ve.selectedKeys,sr=ve.itemIcon,nr=ve.expandIcon,Gt=ve.onItemClick,mr=ve.onOpenChange,pr=ve.onActive,Dr=_.useContext(Z),gr=Dr._internalRenderSubMenuItem,Ar=_.useContext(ue),Pr=Ar.isSubPathKey,Br=Pe(),Qr="".concat(rt,"-submenu"),Yr=Yt||Dt,tn=_.useRef(),kr=_.useRef(),Vr=Lr!=null?Lr:sr,Fr=lr!=null?lr:nr,Nr=Rt.includes(At),Wr=!It&&Nr,ur=Pr(Xt,At),qr=Nt(At,Yr,et,tt),Jr=qr.active,sn=(0,m.Z)(qr,Er),cn=_.useState(!1),rn=(0,W.Z)(cn,2),Tn=rn[0],Qn=rn[1],$r=function(An){Yr||Qn(An)},Xn=function(An){$r(!0),le==null||le({key:At,domEvent:An})},ri=function(An){$r(!1),Ie==null||Ie({key:At,domEvent:An})},$n=_.useMemo(function(){return Jr||(mt!=="inline"?Tn||Pr([kt],At):!1)},[mt,Jr,kt,Tn,At,Pr]),Sn=bt(Br.length),Wn=function(An){Yr||(Ke==null||Ke({key:At,domEvent:An}),mt==="inline"&&mr(At,!Nr))},li=ze(function(Cr){ne==null||ne(qt(Cr)),Gt(Cr)}),Zn=function(An){mt!=="inline"&&mr(At,An)},di=function(){pr(At)},zn=lt&&"".concat(lt,"-popup"),ni=_.useMemo(function(){return _.createElement(Wt,{icon:mt!=="horizontal"?Fr:void 0,props:(0,Se.Z)((0,Se.Z)({},Qe),{},{isOpen:Wr,isSubMenu:!0})},_.createElement("i",{className:"".concat(Qr,"-arrow")}))},[mt,Fr,Qe,Wr,Qr]),Rn=_.createElement("div",(0,V.Z)({role:"menuitem",style:Sn,className:"".concat(Qr,"-title"),tabIndex:Yr?null:-1,ref:tn,title:typeof wt=="string"?wt:null,"data-menu-id":It&&lt?null:lt,"aria-expanded":Wr,"aria-haspopup":!0,"aria-controls":zn,"aria-disabled":Yr,onClick:Wn,onFocus:di},sn),wt,ni),Jn=_.useRef(mt);if(mt!=="inline"&&Br.length>1?Jn.current="vertical":Jn.current=mt,!It){var Ci=Jn.current;Rn=_.createElement(Tr,{mode:Ci,prefixCls:Qr,visible:!zt&&Wr&&mt!=="inline",popupClassName:wr,popupOffset:U,popupStyle:Q,popup:_.createElement(fe,{mode:Ci==="horizontal"?"vertical":Ci},_.createElement(pe,{id:zn,ref:kr},ar)),disabled:Yr,onVisibleChange:Zn},Rn)}var bn=_.createElement(u.Z.Item,(0,V.Z)({ref:Ye,role:"none"},Tt,{component:"li",style:_t,className:O()(Qr,"".concat(Qr,"-").concat(mt),at,(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},"".concat(Qr,"-open"),Wr),"".concat(Qr,"-active"),$n),"".concat(Qr,"-selected"),ur),"".concat(Qr,"-disabled"),Yr)),onMouseEnter:Xn,onMouseLeave:ri}),Rn,!It&&_.createElement(Re,{id:zn,open:Wr,keyPath:Br},ar));return gr&&(bn=gr(bn,Qe,{selected:ur,active:$n,open:Wr,disabled:Yr})),_.createElement(fe,{onItemClick:li,mode:mt==="horizontal"?"vertical":mt,itemIcon:Vr,expandIcon:Fr},bn)}),_n=_.forwardRef(function(Qe,Ye){var _t=Qe.eventKey,at=Qe.children,wt=Pe(_t),At=ft(at,wt),ot=ie();_.useEffect(function(){if(ot)return ot.registerPath(_t,wt),function(){ot.unregisterPath(_t,wt)}},[wt]);var Dt;return ot?Dt=At:Dt=_.createElement(vr,(0,V.Z)({ref:Ye},Qe),At),_.createElement(ye.Provider,{value:wt},Dt)}),Or=_n,vn=K(93664);function zr(Qe){var Ye=Qe.className,_t=Qe.style,at=_.useContext(P),wt=at.prefixCls,At=ie();return At?null:_.createElement("li",{role:"separator",className:O()("".concat(wt,"-item-divider"),Ye),style:_t})}var Fn=["className","title","eventKey","children"],hn=_.forwardRef(function(Qe,Ye){var _t=Qe.className,at=Qe.title,wt=Qe.eventKey,At=Qe.children,ot=(0,m.Z)(Qe,Fn),Dt=_.useContext(P),zt=Dt.prefixCls,ar="".concat(zt,"-item-group");return _.createElement("li",(0,V.Z)({ref:Ye,role:"presentation"},ot,{onClick:function(lr){return lr.stopPropagation()},className:O()(ar,_t)}),_.createElement("div",{role:"presentation",className:"".concat(ar,"-title"),title:typeof at=="string"?at:void 0},at),_.createElement("ul",{role:"group",className:"".concat(ar,"-list")},At))}),yn=_.forwardRef(function(Qe,Ye){var _t=Qe.eventKey,at=Qe.children,wt=Pe(_t),At=ft(at,wt),ot=ie();return ot?At:_.createElement(hn,(0,V.Z)({ref:Ye},(0,ct.Z)(Qe,["warnKey"])),At)}),Kn=yn,Hr=["label","children","key","type","extra"];function Gr(Qe,Ye,_t){var at=Ye.item,wt=Ye.group,At=Ye.submenu,ot=Ye.divider;return(Qe||[]).map(function(Dt,zt){if(Dt&&(0,vn.Z)(Dt)==="object"){var ar=Dt,Lr=ar.label,lr=ar.children,wr=ar.key,U=ar.type,Q=ar.extra,ne=(0,m.Z)(ar,Hr),le=wr!=null?wr:"tmp-".concat(zt);return lr||U==="group"?U==="group"?_.createElement(wt,(0,V.Z)({key:le},ne,{title:Lr}),Gr(lr,Ye,_t)):_.createElement(At,(0,V.Z)({key:le},ne,{title:Lr}),Gr(lr,Ye,_t)):U==="divider"?_.createElement(ot,(0,V.Z)({key:le},ne)):_.createElement(at,(0,V.Z)({key:le},ne,{extra:Q}),Lr,(!!Q||Q===0)&&_.createElement("span",{className:"".concat(_t,"-item-extra")},Q))}return null}).filter(function(Dt){return Dt})}function Xr(Qe,Ye,_t,at,wt){var At=Qe,ot=(0,Se.Z)({divider:zr,item:Ee,group:Kn,submenu:Or},at);return Ye&&(At=Gr(Ye,ot,wt)),ft(At,_t)}var Kr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ln=[],dn=_.forwardRef(function(Qe,Ye){var _t,at=Qe,wt=at.prefixCls,At=wt===void 0?"rc-menu":wt,ot=at.rootClassName,Dt=at.style,zt=at.className,ar=at.tabIndex,Lr=ar===void 0?0:ar,lr=at.items,wr=at.children,U=at.direction,Q=at.id,ne=at.mode,le=ne===void 0?"vertical":ne,Ie=at.inlineCollapsed,Ke=at.disabled,et=at.disabledOverflow,tt=at.subMenuOpenDelay,Tt=tt===void 0?.1:tt,lt=at.subMenuCloseDelay,ve=lt===void 0?.1:lt,rt=at.forceSubMenuRender,mt=at.defaultOpenKeys,Rt=at.openKeys,Yt=at.activeKey,It=at.defaultActiveFirst,kt=at.selectable,Xt=kt===void 0?!0:kt,sr=at.multiple,nr=sr===void 0?!1:sr,Gt=at.defaultSelectedKeys,mr=at.selectedKeys,pr=at.onSelect,Dr=at.onDeselect,gr=at.inlineIndent,Ar=gr===void 0?24:gr,Pr=at.motion,Br=at.defaultMotions,Qr=at.triggerSubMenuAction,Yr=Qr===void 0?"hover":Qr,tn=at.builtinPlacements,kr=at.itemIcon,Vr=at.expandIcon,Fr=at.overflowedIndicator,Nr=Fr===void 0?"...":Fr,Wr=at.overflowedIndicatorPopupClassName,ur=at.getPopupContainer,qr=at.onClick,Jr=at.onOpenChange,sn=at.onKeyDown,cn=at.openAnimation,rn=at.openTransitionName,Tn=at._internalRenderMenuItem,Qn=at._internalRenderSubMenuItem,$r=at._internalComponents,Xn=(0,m.Z)(at,Kr),ri=_.useMemo(function(){return[Xr(wr,lr,ln,$r,At),Xr(wr,lr,ln,{},At)]},[wr,lr,$r]),$n=(0,W.Z)(ri,2),Sn=$n[0],Wn=$n[1],li=_.useState(!1),Zn=(0,W.Z)(li,2),di=Zn[0],zn=Zn[1],ni=_.useRef(),Rn=ut(Q),Jn=U==="rtl",Ci=(0,q.Z)(mt,{value:Rt,postState:function(nt){return nt||ln}}),bn=(0,W.Z)(Ci,2),Cr=bn[0],An=bn[1],Mn=function(nt){var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Gn(){An(nt),Jr==null||Jr(nt)}mn?(0,C.flushSync)(Gn):Gn()},Yn=_.useState(Cr),gi=(0,W.Z)(Yn,2),pi=gi[0],qn=gi[1],ei=_.useRef(!1),Ot=_.useMemo(function(){return(le==="inline"||le==="vertical")&&Ie?["vertical",Ie]:[le,!1]},[le,Ie]),Sr=(0,W.Z)(Ot,2),an=Sr[0],gn=Sr[1],en=an==="inline",Ln=_.useState(an),Ni=(0,W.Z)(Ln,2),Un=Ni[0],Bn=Ni[1],Xs=_.useState(gn),In=(0,W.Z)(Xs,2),Fs=In[0],kn=In[1];_.useEffect(function(){Bn(an),kn(gn),ei.current&&(en?An(pi):Mn(ln))},[an,gn]);var Hi=_.useState(0),pn=(0,W.Z)(Hi,2),Ki=pn[0],Ss=pn[1],Xi=Ki>=Sn.length-1||Un!=="horizontal"||et;_.useEffect(function(){en&&qn(Cr)},[Cr]),_.useEffect(function(){return ei.current=!0,function(){ei.current=!1}},[]);var bi=Ge(),Ji=bi.registerPath,qi=bi.unregisterPath,Ts=bi.refreshOverflowKeys,jn=bi.isSubPathKey,Nn=bi.getKeyPath,mi=bi.getKeys,Dn=bi.getSubPathKeys,xi=_.useMemo(function(){return{registerPath:Ji,unregisterPath:qi}},[Ji,qi]),Js=_.useMemo(function(){return{isSubPathKey:jn}},[jn]);_.useEffect(function(){Ts(Xi?ln:Sn.slice(Ki+1).map(function(En){return En.key}))},[Ki,Xi]);var qs=(0,q.Z)(Yt||It&&((_t=Sn[0])===null||_t===void 0?void 0:_t.key),{value:Yt}),ls=(0,W.Z)(qs,2),$i=ls[0],us=ls[1],Gi=ze(function(En){us(En)}),ui=ze(function(){us(void 0)});(0,_.useImperativeHandle)(Ye,function(){return{list:ni.current,focus:function(nt){var mn,Gn=mi(),Vn=b(Gn,Rn),rs=Vn.elements,Vi=Vn.key2element,Us=Vn.element2key,nA=L(ni.current,rs),ns=$i!=null?$i:nA[0]?Us.get(nA[0]):(mn=Sn.find(function(Di){return!Di.props.disabled}))===null||mn===void 0?void 0:mn.key,Ri=Vi.get(ns);if(ns&&Ri){var Qi;Ri==null||(Qi=Ri.focus)===null||Qi===void 0||Qi.call(Ri,nt)}}}});var eA=(0,q.Z)(Gt||[],{value:mr,postState:function(nt){return Array.isArray(nt)?nt:nt==null?ln:[nt]}}),Is=(0,W.Z)(eA,2),Ii=Is[0],Ds=Is[1],tA=function(nt){if(Xt){var mn=nt.key,Gn=Ii.includes(mn),Vn;nr?Gn?Vn=Ii.filter(function(Vi){return Vi!==mn}):Vn=[].concat((0,he.Z)(Ii),[mn]):Vn=[mn],Ds(Vn);var rs=(0,Se.Z)((0,Se.Z)({},nt),{},{selectedKeys:Vn});Gn?Dr==null||Dr(rs):pr==null||pr(rs)}!nr&&Cr.length&&Un!=="inline"&&Mn(ln)},es=ze(function(En){qr==null||qr(qt(En)),tA(En)}),ii=ze(function(En,nt){var mn=Cr.filter(function(Vn){return Vn!==En});if(nt)mn.push(En);else if(Un!=="inline"){var Gn=Dn(En);mn=mn.filter(function(Vn){return!Gn.has(Vn)})}(0,D.Z)(Cr,mn,!0)||Mn(mn,!0)}),Ls=function(nt,mn){var Gn=mn!=null?mn:!Cr.includes(nt);ii(nt,Gn)},rA=N(Un,$i,Jn,Rn,ni,mi,Nn,us,Ls,sn);_.useEffect(function(){zn(!0)},[]);var GA=_.useMemo(function(){return{_internalRenderMenuItem:Tn,_internalRenderSubMenuItem:Qn}},[Tn,Qn]),ts=Un!=="horizontal"||et?Sn:Sn.map(function(En,nt){return _.createElement(fe,{key:En.key,overflowDisabled:nt>Ki},En)}),cs=_.createElement(u.Z,(0,V.Z)({id:Q,ref:ni,prefixCls:"".concat(At,"-overflow"),component:"ul",itemComponent:Ee,className:O()(At,"".concat(At,"-root"),"".concat(At,"-").concat(Un),zt,(0,me.Z)((0,me.Z)({},"".concat(At,"-inline-collapsed"),Fs),"".concat(At,"-rtl"),Jn),ot),dir:U,style:Dt,role:"menu",tabIndex:Lr,data:ts,renderRawItem:function(nt){return nt},renderRawRest:function(nt){var mn=nt.length,Gn=mn?Sn.slice(-mn):null;return _.createElement(Or,{eventKey:ke,title:Nr,disabled:Xi,internalPopupClose:mn===0,popupClassName:Wr},Gn)},maxCount:Un!=="horizontal"||et?u.Z.INVALIDATE:u.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(nt){Ss(nt)},onKeyDown:rA},Xn));return _.createElement(Z.Provider,{value:GA},_.createElement(x.Provider,{value:Rn},_.createElement(fe,{prefixCls:At,rootClassName:ot,mode:Un,openKeys:Cr,rtl:Jn,disabled:Ke,motion:di?Pr:null,defaultMotions:di?Br:null,activeKey:$i,onActive:Gi,onInactive:ui,selectedKeys:Ii,inlineIndent:Ar,subMenuOpenDelay:Tt,subMenuCloseDelay:ve,forceSubMenuRender:rt,builtinPlacements:tn,triggerSubMenuAction:Yr,getPopupContainer:ur,itemIcon:kr,expandIcon:Vr,onItemClick:es,onOpenChange:ii},_.createElement(ue.Provider,{value:Js},cs),_.createElement("div",{style:{display:"none"},"aria-hidden":!0},_.createElement(we.Provider,{value:xi},Wn)))))}),Cn=dn,cr=Cn;cr.Item=Ee,cr.SubMenu=Or,cr.ItemGroup=Kn,cr.Divider=zr;var yr=cr},11780:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return re}});var V=K(14809),me=K(20439),Se=K(50298),he=K(62646),W=K(59301),m=K(92310),ge=K.n(m),O=K(29301),u=K(34280),q=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],D=void 0;function y(w,B){var $=w.prefixCls,ae=w.invalidate,$e=w.item,qe=w.renderItem,Bt=w.responsive,pt=w.responsiveDisabled,Qt=w.registerSize,xt=w.itemKey,ht=w.className,De=w.style,it=w.children,Le=w.display,Ct=w.order,Ut=w.component,Be=Ut===void 0?"div":Ut,L=(0,he.Z)(w,q),p=Bt&&!Le;function b(Fe){Qt(xt,Fe)}W.useEffect(function(){return function(){b(null)}},[]);var N=qe&&$e!==D?qe($e,{index:Ct}):it,S;ae||(S={opacity:p?0:1,height:p?0:D,overflowY:p?"hidden":D,order:Bt?Ct:D,pointerEvents:p?"none":D,position:p?"absolute":D});var k={};p&&(k["aria-hidden"]=!0);var te=W.createElement(Be,(0,V.Z)({className:ge()(!ae&&$,ht),style:(0,me.Z)((0,me.Z)({},S),De)},k,L,{ref:B}),N);return Bt&&(te=W.createElement(O.Z,{onResize:function(ke){var Ge=ke.offsetWidth;b(Ge)},disabled:pt},te)),te}var _=W.forwardRef(y);_.displayName="Item";var C=_,x=K(6089),j=K(4676),M=K(16089);function H(w){if(typeof MessageChannel=="undefined")(0,M.Z)(w);else{var B=new MessageChannel;B.port1.onmessage=function(){return w()},B.port2.postMessage(void 0)}}function R(){var w=W.useRef(null),B=function(ae){w.current||(w.current=[],H(function(){(0,j.unstable_batchedUpdates)(function(){w.current.forEach(function($e){$e()}),w.current=null})})),w.current.push(ae)};return B}function P(w,B){var $=W.useState(B),ae=(0,Se.Z)($,2),$e=ae[0],qe=ae[1],Bt=(0,x.Z)(function(pt){w(function(){qe(pt)})});return[$e,Bt]}var X=W.createContext(null),fe=["component"],_e=["className"],we=["className"],ie=function(B,$){var ae=W.useContext(X);if(!ae){var $e=B.component,qe=$e===void 0?"div":$e,Bt=(0,he.Z)(B,fe);return W.createElement(qe,(0,V.Z)({},Bt,{ref:$}))}var pt=ae.className,Qt=(0,he.Z)(ae,_e),xt=B.className,ht=(0,he.Z)(B,we);return W.createElement(X.Provider,{value:null},W.createElement(C,(0,V.Z)({ref:$,className:ge()(pt,xt)},Qt,ht)))},ye=W.forwardRef(ie);ye.displayName="RawItem";var Pe=ye,ue=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Me="responsive",Z="invalidate";function I(w){return"+ ".concat(w.length," ...")}function G(w,B){var $=w.prefixCls,ae=$===void 0?"rc-overflow":$,$e=w.data,qe=$e===void 0?[]:$e,Bt=w.renderItem,pt=w.renderRawItem,Qt=w.itemKey,xt=w.itemWidth,ht=xt===void 0?10:xt,De=w.ssr,it=w.style,Le=w.className,Ct=w.maxCount,Ut=w.renderRest,Be=w.renderRawRest,L=w.suffix,p=w.component,b=p===void 0?"div":p,N=w.itemComponent,S=w.onVisibleChange,k=(0,he.Z)(w,ue),te=De==="full",Fe=R(),ke=P(Fe,null),Ge=(0,Se.Z)(ke,2),ze=Ge[0],Ft=Ge[1],Je=ze||0,ut=P(Fe,new Map),st=(0,Se.Z)(ut,2),Xe=st[0],Ve=st[1],Ze=P(Fe,0),ct=(0,Se.Z)(Ze,2),yt=ct[0],Nt=ct[1],bt=P(Fe,0),Wt=(0,Se.Z)(bt,2),Ht=Wt[0],qt=Wt[1],fr=P(Fe,0),Ur=(0,Se.Z)(fr,2),St=Ur[0],er=Ur[1],Ue=(0,W.useState)(null),be=(0,Se.Z)(Ue,2),Ee=be[0],Y=be[1],ee=(0,W.useState)(null),oe=(0,Se.Z)(ee,2),pe=oe[0],Ce=oe[1],ft=W.useMemo(function(){return pe===null&&te?Number.MAX_SAFE_INTEGER:pe||0},[pe,ze]),Et=(0,W.useState)(!1),dt=(0,Se.Z)(Et,2),Zt=dt[0],_r=dt[1],Mr="".concat(ae,"-item"),$t=Math.max(yt,Ht),Kt=Ct===Me,Tr=qe.length&&Kt,Zr=Ct===Z,Re=Tr||typeof Ct=="number"&&qe.length>Ct,Ir=(0,W.useMemo)(function(){var cr=qe;return Tr?ze===null&&te?cr=qe:cr=qe.slice(0,Math.min(qe.length,Je/ht)):typeof Ct=="number"&&(cr=qe.slice(0,Ct)),cr},[qe,ht,ze,Ct,Tr]),Er=(0,W.useMemo)(function(){return Tr?qe.slice(ft+1):qe.slice(Ir.length)},[qe,Ir,Tr,ft]),vr=(0,W.useCallback)(function(cr,yr){var Qe;return typeof Qt=="function"?Qt(cr):(Qe=Qt&&(cr==null?void 0:cr[Qt]))!==null&&Qe!==void 0?Qe:yr},[Qt]),_n=(0,W.useCallback)(Bt||function(cr){return cr},[Bt]);function Or(cr,yr,Qe){pe===cr&&(yr===void 0||yr===Ee)||(Ce(cr),Qe||(_r(cr<qe.length-1),S==null||S(cr)),yr!==void 0&&Y(yr))}function vn(cr,yr){Ft(yr.clientWidth)}function zr(cr,yr){Ve(function(Qe){var Ye=new Map(Qe);return yr===null?Ye.delete(cr):Ye.set(cr,yr),Ye})}function Fn(cr,yr){qt(yr),Nt(Ht)}function hn(cr,yr){er(yr)}function yn(cr){return Xe.get(vr(Ir[cr],cr))}(0,u.Z)(function(){if(Je&&typeof $t=="number"&&Ir){var cr=St,yr=Ir.length,Qe=yr-1;if(!yr){Or(0,null);return}for(var Ye=0;Ye<yr;Ye+=1){var _t=yn(Ye);if(te&&(_t=_t||0),_t===void 0){Or(Ye-1,void 0,!0);break}if(cr+=_t,Qe===0&&cr<=Je||Ye===Qe-1&&cr+yn(Qe)<=Je){Or(Qe,null);break}else if(cr+$t>Je){Or(Ye-1,cr-_t-St+Ht);break}}L&&yn(0)+St>Je&&Y(null)}},[Je,Xe,Ht,St,vr,Ir]);var Kn=Zt&&!!Er.length,Hr={};Ee!==null&&Tr&&(Hr={position:"absolute",left:Ee,top:0});var Gr={prefixCls:Mr,responsive:Tr,component:N,invalidate:Zr},Xr=pt?function(cr,yr){var Qe=vr(cr,yr);return W.createElement(X.Provider,{key:Qe,value:(0,me.Z)((0,me.Z)({},Gr),{},{order:yr,item:cr,itemKey:Qe,registerSize:zr,display:yr<=ft})},pt(cr,yr))}:function(cr,yr){var Qe=vr(cr,yr);return W.createElement(C,(0,V.Z)({},Gr,{order:yr,key:Qe,item:cr,renderItem:_n,itemKey:Qe,registerSize:zr,display:yr<=ft}))},Kr={order:Kn?ft:Number.MAX_SAFE_INTEGER,className:"".concat(Mr,"-rest"),registerSize:Fn,display:Kn},ln=Ut||I,dn=Be?W.createElement(X.Provider,{value:(0,me.Z)((0,me.Z)({},Gr),Kr)},Be(Er)):W.createElement(C,(0,V.Z)({},Gr,Kr),typeof ln=="function"?ln(Er):ln),Cn=W.createElement(b,(0,V.Z)({className:ge()(!Zr&&ae,Le),style:it,ref:B},k),Ir.map(Xr),Re?dn:null,L&&W.createElement(C,(0,V.Z)({},Gr,{responsive:Kt,responsiveDisabled:!Tr,order:ft,className:"".concat(Mr,"-suffix"),registerSize:hn,display:!0,style:Hr}),L));return Kt?W.createElement(O.Z,{onResize:vn,disabled:!Tr},Cn):Cn}var z=W.forwardRef(G);z.displayName="Overflow",z.Item=Pe,z.RESPONSIVE=Me,z.INVALIDATE=Z;var se=z,re=se},29301:function(dr,vt,K){"use strict";K.d(vt,{Z:function(){return Z}});var V=K(14809),me=K(59301),Se=K(11592),he=K(48736),W=K(20439),m=K(93664),ge=K(76846),O=K(8654),u=me.createContext(null);function q(I){var G=I.children,z=I.onBatchResize,se=me.useRef(0),re=me.useRef([]),w=me.useContext(u),B=me.useCallback(function($,ae,$e){se.current+=1;var qe=se.current;re.current.push({size:$,element:ae,data:$e}),Promise.resolve().then(function(){qe===se.current&&(z==null||z(re.current),re.current=[])}),w==null||w($,ae,$e)},[z,w]);return me.createElement(u.Provider,{value:B},G)}var D=K(76374),y=new Map;function _(I){I.forEach(function(G){var z,se=G.target;(z=y.get(se))===null||z===void 0||z.forEach(function(re){return re(se)})})}var C=new D.Z(_),x=null,j=null;function M(I,G){y.has(I)||(y.set(I,new Set),C.observe(I)),y.get(I).add(G)}function H(I,G){y.has(I)&&(y.get(I).delete(G),y.get(I).size||(C.unobserve(I),y.delete(I)))}var R=K(99153),P=K(84851),X=K(19257),fe=K(93046),_e=function(I){(0,X.Z)(z,I);var G=(0,fe.Z)(z);function z(){return(0,R.Z)(this,z),G.apply(this,arguments)}return(0,P.Z)(z,[{key:"render",value:function(){return this.props.children}}]),z}(me.Component);function we(I,G){var z=I.children,se=I.disabled,re=me.useRef(null),w=me.useRef(null),B=me.useContext(u),$=typeof z=="function",ae=$?z(re):z,$e=me.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),qe=!$&&me.isValidElement(ae)&&(0,O.Yr)(ae),Bt=qe?(0,O.C4)(ae):null,pt=(0,O.x1)(Bt,re),Qt=function(){var it;return(0,ge.ZP)(re.current)||(re.current&&(0,m.Z)(re.current)==="object"?(0,ge.ZP)((it=re.current)===null||it===void 0?void 0:it.nativeElement):null)||(0,ge.ZP)(w.current)};me.useImperativeHandle(G,function(){return Qt()});var xt=me.useRef(I);xt.current=I;var ht=me.useCallback(function(De){var it=xt.current,Le=it.onResize,Ct=it.data,Ut=De.getBoundingClientRect(),Be=Ut.width,L=Ut.height,p=De.offsetWidth,b=De.offsetHeight,N=Math.floor(Be),S=Math.floor(L);if($e.current.width!==N||$e.current.height!==S||$e.current.offsetWidth!==p||$e.current.offsetHeight!==b){var k={width:N,height:S,offsetWidth:p,offsetHeight:b};$e.current=k;var te=p===Math.round(Be)?Be:p,Fe=b===Math.round(L)?L:b,ke=(0,W.Z)((0,W.Z)({},k),{},{offsetWidth:te,offsetHeight:Fe});B==null||B(ke,De,Ct),Le&&Promise.resolve().then(function(){Le(ke,De)})}},[]);return me.useEffect(function(){var De=Qt();return De&&!se&&M(De,ht),function(){return H(De,ht)}},[re.current,se]),me.createElement(_e,{ref:w},qe?me.cloneElement(ae,{ref:pt}):ae)}var ie=me.forwardRef(we),ye=ie,Pe="rc-observer-key";function ue(I,G){var z=I.children,se=typeof z=="function"?[z]:(0,Se.Z)(z);return se.map(function(re,w){var B=(re==null?void 0:re.key)||"".concat(Pe,"-").concat(w);return me.createElement(ye,(0,V.Z)({},I,{key:B,ref:w===0?G:void 0}),re)})}var Me=me.forwardRef(ue);Me.Collection=q;var Z=Me},29125:function(dr,vt,K){"use strict";K.d(vt,{G:function(){return he},Z:function(){return H}});var V=K(92310),me=K.n(V),Se=K(59301);function he(R){var P=R.children,X=R.prefixCls,fe=R.id,_e=R.overlayInnerStyle,we=R.bodyClassName,ie=R.className,ye=R.style;return Se.createElement("div",{className:me()("".concat(X,"-content"),ie),style:ye},Se.createElement("div",{className:me()("".concat(X,"-inner"),we),id:fe,role:"tooltip",style:_e},typeof P=="function"?P():P))}var W=K(14809),m=K(20439),ge=K(62646),O=K(65966),u={shiftX:64,adjustY:1},q={adjustX:1,shiftY:!0},D=[0,0],y={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:D},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:D},top:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:D},bottom:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:D},topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:D},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:D},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:D},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:D},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:D},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:D},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:D},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:D}},_=null,C=K(80402),x=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],j=function(P,X){var fe=P.overlayClassName,_e=P.trigger,we=_e===void 0?["hover"]:_e,ie=P.mouseEnterDelay,ye=ie===void 0?0:ie,Pe=P.mouseLeaveDelay,ue=Pe===void 0?.1:Pe,Me=P.overlayStyle,Z=P.prefixCls,I=Z===void 0?"rc-tooltip":Z,G=P.children,z=P.onVisibleChange,se=P.afterVisibleChange,re=P.transitionName,w=P.animation,B=P.motion,$=P.placement,ae=$===void 0?"right":$,$e=P.align,qe=$e===void 0?{}:$e,Bt=P.destroyTooltipOnHide,pt=Bt===void 0?!1:Bt,Qt=P.defaultVisible,xt=P.getTooltipContainer,ht=P.overlayInnerStyle,De=P.arrowContent,it=P.overlay,Le=P.id,Ct=P.showArrow,Ut=Ct===void 0?!0:Ct,Be=P.classNames,L=P.styles,p=(0,ge.Z)(P,x),b=(0,C.Z)(Le),N=(0,Se.useRef)(null);(0,Se.useImperativeHandle)(X,function(){return N.current});var S=(0,m.Z)({},p);"visible"in P&&(S.popupVisible=P.visible);var k=function(){return Se.createElement(he,{key:"content",prefixCls:I,id:b,bodyClassName:Be==null?void 0:Be.body,overlayInnerStyle:(0,m.Z)((0,m.Z)({},ht),L==null?void 0:L.body)},it)},te=function(){var ke=Se.Children.only(G),Ge=(ke==null?void 0:ke.props)||{},ze=(0,m.Z)((0,m.Z)({},Ge),{},{"aria-describedby":it?b:null});return Se.cloneElement(G,ze)};return Se.createElement(O.Z,(0,W.Z)({popupClassName:me()(fe,Be==null?void 0:Be.root),prefixCls:I,popup:k,action:we,builtinPlacements:y,popupPlacement:ae,ref:N,popupAlign:qe,getPopupContainer:xt,onPopupVisibleChange:z,afterPopupVisibleChange:se,popupTransitionName:re,popupAnimation:w,popupMotion:B,defaultPopupVisible:Qt,autoDestroy:pt,mouseLeaveDelay:ue,popupStyle:(0,m.Z)((0,m.Z)({},Me),L==null?void 0:L.root),mouseEnterDelay:ye,arrow:Ut},S),te())},M=(0,Se.forwardRef)(j),H=M},49658:function(dr,vt){"use strict";vt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var K=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(K)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(K==null?void 0:K.substr(0,4))}},83145:function(dr,vt,K){"use strict";Object.defineProperty(vt,"__esModule",{value:!0}),vt.CopyToClipboard=void 0;var V=Se(K(59301)),me=Se(K(25769));function Se(R){return R&&R.__esModule?R:{default:R}}function he(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?he=function(X){return typeof X}:he=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},he(R)}function W(R,P){var X=Object.keys(R);if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(R);P&&(fe=fe.filter(function(_e){return Object.getOwnPropertyDescriptor(R,_e).enumerable})),X.push.apply(X,fe)}return X}function m(R){for(var P=1;P<arguments.length;P++){var X=arguments[P]!=null?arguments[P]:{};P%2?W(X,!0).forEach(function(fe){M(R,fe,X[fe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(X)):W(X).forEach(function(fe){Object.defineProperty(R,fe,Object.getOwnPropertyDescriptor(X,fe))})}return R}function ge(R,P){if(R==null)return{};var X=O(R,P),fe,_e;if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(R);for(_e=0;_e<we.length;_e++)fe=we[_e],!(P.indexOf(fe)>=0)&&Object.prototype.propertyIsEnumerable.call(R,fe)&&(X[fe]=R[fe])}return X}function O(R,P){if(R==null)return{};var X={},fe=Object.keys(R),_e,we;for(we=0;we<fe.length;we++)_e=fe[we],!(P.indexOf(_e)>=0)&&(X[_e]=R[_e]);return X}function u(R,P){if(!(R instanceof P))throw new TypeError("Cannot call a class as a function")}function q(R,P){for(var X=0;X<P.length;X++){var fe=P[X];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(R,fe.key,fe)}}function D(R,P,X){return P&&q(R.prototype,P),X&&q(R,X),R}function y(R,P){return P&&(he(P)==="object"||typeof P=="function")?P:C(R)}function _(R){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)},_(R)}function C(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function x(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),P&&j(R,P)}function j(R,P){return j=Object.setPrototypeOf||function(fe,_e){return fe.__proto__=_e,fe},j(R,P)}function M(R,P,X){return P in R?Object.defineProperty(R,P,{value:X,enumerable:!0,configurable:!0,writable:!0}):R[P]=X,R}var H=function(R){x(P,R);function P(){var X,fe;u(this,P);for(var _e=arguments.length,we=new Array(_e),ie=0;ie<_e;ie++)we[ie]=arguments[ie];return fe=y(this,(X=_(P)).call.apply(X,[this].concat(we))),M(C(fe),"onClick",function(ye){var Pe=fe.props,ue=Pe.text,Me=Pe.onCopy,Z=Pe.children,I=Pe.options,G=V.default.Children.only(Z),z=(0,me.default)(ue,I);Me&&Me(ue,z),G&&G.props&&typeof G.props.onClick=="function"&&G.props.onClick(ye)}),fe}return D(P,[{key:"render",value:function(){var fe=this.props,_e=fe.text,we=fe.onCopy,ie=fe.options,ye=fe.children,Pe=ge(fe,["text","onCopy","options","children"]),ue=V.default.Children.only(ye);return V.default.cloneElement(ue,m({},Pe,{onClick:this.onClick}))}}]),P}(V.default.PureComponent);vt.CopyToClipboard=H,M(H,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(dr,vt,K){"use strict";var V=K(83145),me=V.CopyToClipboard;me.CopyToClipboard=me,dr.exports=me},76374:function(dr,vt,K){"use strict";var V=function(){if(typeof Map!="undefined")return Map;function Z(I,G){var z=-1;return I.some(function(se,re){return se[0]===G?(z=re,!0):!1}),z}return function(){function I(){this.__entries__=[]}return Object.defineProperty(I.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),I.prototype.get=function(G){var z=Z(this.__entries__,G),se=this.__entries__[z];return se&&se[1]},I.prototype.set=function(G,z){var se=Z(this.__entries__,G);~se?this.__entries__[se][1]=z:this.__entries__.push([G,z])},I.prototype.delete=function(G){var z=this.__entries__,se=Z(z,G);~se&&z.splice(se,1)},I.prototype.has=function(G){return!!~Z(this.__entries__,G)},I.prototype.clear=function(){this.__entries__.splice(0)},I.prototype.forEach=function(G,z){z===void 0&&(z=null);for(var se=0,re=this.__entries__;se<re.length;se++){var w=re[se];G.call(z,w[1],w[0])}},I}()}(),me=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Se=function(){return typeof K.g!="undefined"&&K.g.Math===Math?K.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),he=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Se):function(Z){return setTimeout(function(){return Z(Date.now())},1e3/60)}}(),W=2;function m(Z,I){var G=!1,z=!1,se=0;function re(){G&&(G=!1,Z()),z&&B()}function w(){he(re)}function B(){var $=Date.now();if(G){if($-se<W)return;z=!0}else G=!0,z=!1,setTimeout(w,I);se=$}return B}var ge=20,O=["top","right","bottom","left","width","height","size","weight"],u=typeof MutationObserver!="undefined",q=function(){function Z(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=m(this.refresh.bind(this),ge)}return Z.prototype.addObserver=function(I){~this.observers_.indexOf(I)||this.observers_.push(I),this.connected_||this.connect_()},Z.prototype.removeObserver=function(I){var G=this.observers_,z=G.indexOf(I);~z&&G.splice(z,1),!G.length&&this.connected_&&this.disconnect_()},Z.prototype.refresh=function(){var I=this.updateObservers_();I&&this.refresh()},Z.prototype.updateObservers_=function(){var I=this.observers_.filter(function(G){return G.gatherActive(),G.hasActive()});return I.forEach(function(G){return G.broadcastActive()}),I.length>0},Z.prototype.connect_=function(){!me||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(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)},Z.prototype.disconnect_=function(){!me||!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)},Z.prototype.onTransitionEnd_=function(I){var G=I.propertyName,z=G===void 0?"":G,se=O.some(function(re){return!!~z.indexOf(re)});se&&this.refresh()},Z.getInstance=function(){return this.instance_||(this.instance_=new Z),this.instance_},Z.instance_=null,Z}(),D=function(Z,I){for(var G=0,z=Object.keys(I);G<z.length;G++){var se=z[G];Object.defineProperty(Z,se,{value:I[se],enumerable:!1,writable:!1,configurable:!0})}return Z},y=function(Z){var I=Z&&Z.ownerDocument&&Z.ownerDocument.defaultView;return I||Se},_=_e(0,0,0,0);function C(Z){return parseFloat(Z)||0}function x(Z){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return I.reduce(function(z,se){var re=Z["border-"+se+"-width"];return z+C(re)},0)}function j(Z){for(var I=["top","right","bottom","left"],G={},z=0,se=I;z<se.length;z++){var re=se[z],w=Z["padding-"+re];G[re]=C(w)}return G}function M(Z){var I=Z.getBBox();return _e(0,0,I.width,I.height)}function H(Z){var I=Z.clientWidth,G=Z.clientHeight;if(!I&&!G)return _;var z=y(Z).getComputedStyle(Z),se=j(z),re=se.left+se.right,w=se.top+se.bottom,B=C(z.width),$=C(z.height);if(z.boxSizing==="border-box"&&(Math.round(B+re)!==I&&(B-=x(z,"left","right")+re),Math.round($+w)!==G&&($-=x(z,"top","bottom")+w)),!P(Z)){var ae=Math.round(B+re)-I,$e=Math.round($+w)-G;Math.abs(ae)!==1&&(B-=ae),Math.abs($e)!==1&&($-=$e)}return _e(se.left,se.top,B,$)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(Z){return Z instanceof y(Z).SVGGraphicsElement}:function(Z){return Z instanceof y(Z).SVGElement&&typeof Z.getBBox=="function"}}();function P(Z){return Z===y(Z).document.documentElement}function X(Z){return me?R(Z)?M(Z):H(Z):_}function fe(Z){var I=Z.x,G=Z.y,z=Z.width,se=Z.height,re=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,w=Object.create(re.prototype);return D(w,{x:I,y:G,width:z,height:se,top:G,right:I+z,bottom:se+G,left:I}),w}function _e(Z,I,G,z){return{x:Z,y:I,width:G,height:z}}var we=function(){function Z(I){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_e(0,0,0,0),this.target=I}return Z.prototype.isActive=function(){var I=X(this.target);return this.contentRect_=I,I.width!==this.broadcastWidth||I.height!==this.broadcastHeight},Z.prototype.broadcastRect=function(){var I=this.contentRect_;return this.broadcastWidth=I.width,this.broadcastHeight=I.height,I},Z}(),ie=function(){function Z(I,G){var z=fe(G);D(this,{target:I,contentRect:z})}return Z}(),ye=function(){function Z(I,G,z){if(this.activeObservations_=[],this.observations_=new V,typeof I!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=I,this.controller_=G,this.callbackCtx_=z}return Z.prototype.observe=function(I){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(I instanceof y(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var G=this.observations_;G.has(I)||(G.set(I,new we(I)),this.controller_.addObserver(this),this.controller_.refresh())}},Z.prototype.unobserve=function(I){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(I instanceof y(I).Element))throw new TypeError('parameter 1 is not of type "Element".');var G=this.observations_;G.has(I)&&(G.delete(I),G.size||this.controller_.removeObserver(this))}},Z.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Z.prototype.gatherActive=function(){var I=this;this.clearActive(),this.observations_.forEach(function(G){G.isActive()&&I.activeObservations_.push(G)})},Z.prototype.broadcastActive=function(){if(this.hasActive()){var I=this.callbackCtx_,G=this.activeObservations_.map(function(z){return new ie(z.target,z.broadcastRect())});this.callback_.call(I,G,I),this.clearActive()}},Z.prototype.clearActive=function(){this.activeObservations_.splice(0)},Z.prototype.hasActive=function(){return this.activeObservations_.length>0},Z}(),Pe=typeof WeakMap!="undefined"?new WeakMap:new V,ue=function(){function Z(I){if(!(this instanceof Z))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var G=q.getInstance(),z=new ye(I,G,this);Pe.set(this,z)}return Z}();["observe","unobserve","disconnect"].forEach(function(Z){ue.prototype[Z]=function(){var I;return(I=Pe.get(this))[Z].apply(I,arguments)}});var Me=function(){return typeof Se.ResizeObserver!="undefined"?Se.ResizeObserver:ue}();vt.Z=Me},98040:function(dr){dr.exports=function(){var vt=document.getSelection();if(!vt.rangeCount)return function(){};for(var K=document.activeElement,V=[],me=0;me<vt.rangeCount;me++)V.push(vt.getRangeAt(me));switch(K.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":K.blur();break;default:K=null;break}return vt.removeAllRanges(),function(){vt.type==="Caret"&&vt.removeAllRanges(),vt.rangeCount||V.forEach(function(Se){vt.addRange(Se)}),K&&K.focus()}}},15360:function(dr,vt,K){"use strict";K.d(vt,{ZP:function(){return c}});const V=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},me=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=Se},Se=Number.MAX_SAFE_INTEGER||9007199254740991;let he=function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),W=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i}({}),m=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i}({});var ge={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},O={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class u{constructor(e,t=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class q{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new u(e),this.fast_=new u(t),this.defaultTTFB_=n,this.ttfb_=new u(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:s}=this;r.halfLife!==e&&(this.slow_=new u(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new u(t,n.getEstimate(),n.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new u(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,s=r/n;this.fast_.sample(n,s),this.slow_.sample(n,s)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function D(i,e,t){return(e=j(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},y.apply(null,arguments)}function _(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function C(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_(Object(t),!0).forEach(function(r){D(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function x(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function j(i){var e=x(i,"string");return typeof e=="symbol"?e:e+""}class M{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=H,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}}const H=function(){},R={trace:H,debug:H,log:H,warn:H,info:H,error:H};function P(){return y({},R)}function X(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):H}function fe(i,e,t){return e[i]?e[i].bind(e):X(i,t)}const _e=P();function we(i,e,t){const r=P();if(typeof console=="object"&&i===!0||typeof i=="object"){const n=["debug","log","info","warn","error"];n.forEach(s=>{r[s]=fe(s,i,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.5`)}catch(s){return P()}n.forEach(s=>{_e[s]=fe(s,i)})}else y(_e,r);return r}const ie=_e;function ye(i=!0){return typeof self=="undefined"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Pe(i){return typeof self!="undefined"&&i===self.ManagedMediaSource}function ue(i,e){const t=Object.keys(i),r=Object.keys(e),n=t.length,s=r.length;return!n||!s||n===s&&!t.some(A=>r.indexOf(A)===-1)}function Me(i,e=!1){if(typeof TextDecoder!="undefined"){const o=new TextDecoder("utf-8").decode(i);if(e){const h=o.indexOf("\0");return h!==-1?o.substring(0,h):o}return o.replace(/\0/g,"")}const t=i.length;let r,n,s,A="",a=0;for(;a<t;){if(r=i[a++],r===0&&e)return A;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(r);break;case 12:case 13:n=i[a++],A+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=i[a++],s=i[a++],A+=String.fromCharCode((r&15)<<12|(n&63)<<6|(s&63)<<0);break}}return A}const Z={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}};function I(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var G={exports:{}},z;function se(){return z||(z=1,function(i,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,A=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(l,o,h){if(h=h||{},l=l.trim(),o=o.trim(),!o){if(!h.alwaysNormalize)return l;var d=a.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=a.normalizePath(d.path),a.buildURLFromParts(d)}var g=a.parseURL(o);if(!g)throw new Error("Error trying to parse relative URL.");if(g.scheme)return h.alwaysNormalize?(g.path=a.normalizePath(g.path),a.buildURLFromParts(g)):o;var v=a.parseURL(l);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var E=n.exec(v.path);v.netLoc=E[1],v.path=E[2]}v.netLoc&&!v.path&&(v.path="/");var T={scheme:v.scheme,netLoc:g.netLoc,path:null,params:g.params,query:g.query,fragment:g.fragment};if(!g.netLoc&&(T.netLoc=v.netLoc,g.path[0]!=="/"))if(!g.path)T.path=v.path,g.params||(T.params=v.params,g.query||(T.query=v.query));else{var F=v.path,J=F.substring(0,F.lastIndexOf("/")+1)+g.path;T.path=a.normalizePath(J)}return T.path===null&&(T.path=h.alwaysNormalize?a.normalizePath(g.path):g.path),a.buildURLFromParts(T)},parseURL:function(l){var o=r.exec(l);return o?{scheme:o[1]||"",netLoc:o[2]||"",path:o[3]||"",params:o[4]||"",query:o[5]||"",fragment:o[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(s,"");l.length!==(l=l.replace(A,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};i.exports=a})()}(G)),G.exports}var re=se();class w{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var B={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ${constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,pt(this,"stats")}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=(t==null?void 0:t.byteRangeEndOffset)||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[B.AUDIO]:null,[B.VIDEO]:null,[B.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new w),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=re.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[B.AUDIO]=null,e[B.VIDEO]=null,e[B.AUDIOVIDEO]=null}}function ae(i){return i.sn!=="initSegment"}class $e extends ${constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(V(e)&&V(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=V(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!V(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return ae(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,s,A=!1){const{elementaryStreams:a}=this,l=a[e];if(!l){a[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:s,partial:A};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,r),l.startDTS=Math.min(l.startDTS,n),l.endDTS=Math.max(l.endDTS,s)}}class qe extends ${constructor(e,t,r,n,s){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=n;const A=e.enumeratedString("BYTERANGE");A&&this.setByteRange(A,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Bt(i,e){const t=Object.getPrototypeOf(i);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||Bt(t,e)}}function pt(i,e){const t=Bt(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const Qt=Math.pow(2,32)-1,xt=[].push,ht={video:1,audio:2,id3:3,text:4};function De(i){return String.fromCharCode.apply(null,i)}function it(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function Le(i,e){const t=Ut(i,e);return t<0?4294967296+t:t}function Ct(i,e){let t=Le(i,e);return t*=Math.pow(2,32),t+=Le(i,e+4),t}function Ut(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function Be(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function L(i){const e=i.byteLength;for(let t=0;t<e;){const r=Le(i,t);if(r>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=r>1?t+r:e}return!1}function p(i,e){const t=[];if(!e.length)return t;const r=i.byteLength;for(let n=0;n<r;){const s=Le(i,n),A=De(i.subarray(n+4,n+8)),a=s>1?n+s:r;if(A===e[0])if(e.length===1)t.push(i.subarray(n+8,a));else{const l=p(i.subarray(n+8,a),e.slice(1));l.length&&xt.apply(t,l)}n=a}return t}function b(i){const e=[],t=i[0];let r=8;const n=Le(i,r);r+=4;let s=0,A=0;t===0?(s=Le(i,r),A=Le(i,r+4),r+=8):(s=Ct(i,r),A=Ct(i,r+8),r+=16),r+=2;let a=i.length+A;const l=it(i,r);r+=2;for(let o=0;o<l;o++){let h=r;const d=Le(i,h);h+=4;const g=d&2147483647;if((d&2147483648)>>>31===1)return ie.warn("SIDX has hierarchical references (not supported)"),null;const E=Le(i,h);h+=4,e.push({referenceSize:g,subsegmentDuration:E,info:{duration:E/n,start:a,end:a+g-1}}),a+=g,h+=4,r=h}return{earliestPresentationTime:s,timescale:n,version:t,referencesCount:l,references:e}}function N(i){const e=[],t=p(i,["moov","trak"]);for(let n=0;n<t.length;n++){const s=t[n],A=p(s,["tkhd"])[0];if(A){let a=A[0];const l=Le(A,a===0?12:20),o=p(s,["mdia","mdhd"])[0];if(o){a=o[0];const h=Le(o,a===0?12:20),d=p(s,["mdia","hdlr"])[0];if(d){const g=De(d.subarray(8,12)),v={soun:B.AUDIO,vide:B.VIDEO}[g],E=p(s,["mdia","minf","stbl","stsd"])[0],T=S(E);v?(e[l]={timescale:h,type:v,stsd:T},e[v]=C({timescale:h,id:l},T)):e[l]={timescale:h,type:g,stsd:T}}}}}return p(i,["moov","mvex","trex"]).forEach(n=>{const s=Le(n,4),A=e[s];A&&(A.default={duration:Le(n,12),flags:Le(n,20)})}),e}function S(i){const e=i.subarray(8),t=e.subarray(86),r=De(e.subarray(4,8));let n=r,s;const A=r==="enca"||r==="encv";if(A){const o=p(e,[r])[0].subarray(r==="enca"?28:78);p(o,["sinf"]).forEach(d=>{const g=p(d,["schm"])[0];if(g){const v=De(g.subarray(4,8));if(v==="cbcs"||v==="cenc"){const E=p(d,["frma"])[0];E&&(n=De(E))}}})}const a=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const l=p(t,["avcC"])[0];l&&l.length>3&&(n+="."+ke(l[1])+ke(l[2])+ke(l[3]),s=k(a==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const l=p(e,[r])[0],o=p(l.subarray(28),["esds"])[0];if(o&&o.length>7){let h=4;if(o[h++]!==3)break;h=Fe(o,h),h+=2;const d=o[h++];if(d&128&&(h+=2),d&64&&(h+=o[h++]),o[h++]!==4)break;h=Fe(o,h);const g=o[h++];if(g===64)n+="."+ke(g);else break;if(h+=12,o[h++]!==5)break;h=Fe(o,h);const v=o[h++];let E=(v&248)>>3;E===31&&(E+=1+((v&7)<<3)+((o[h]&224)>>5)),n+="."+E}break}case"hvc1":case"hev1":{const l=p(t,["hvcC"])[0];if(l&&l.length>12){const o=l[1],h=["","A","B","C"][o>>6],d=o&31,g=Le(l,2),v=(o&32)>>5?"H":"L",E=l[12],T=l.subarray(6,12);n+="."+h+d,n+="."+te(g).toString(16).toUpperCase(),n+="."+v+E;let F="";for(let J=T.length;J--;){const ce=T[J];(ce||F)&&(F="."+ce.toString(16).toUpperCase()+F)}n+=F}s=k(a=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=k(n,t)||n;break}case"vp09":{const l=p(t,["vpcC"])[0];if(l&&l.length>6){const o=l[4],h=l[5],d=l[6]>>4&15;n+="."+Ge(o)+"."+Ge(h)+"."+Ge(d)}break}case"av01":{const l=p(t,["av1C"])[0];if(l&&l.length>2){const o=l[1]>>>5,h=l[1]&31,d=l[2]>>>7?"H":"M",g=(l[2]&64)>>6,v=(l[2]&32)>>5,E=o===2&&g?v?12:10:g?10:8,T=(l[2]&16)>>4,F=(l[2]&8)>>3,J=(l[2]&4)>>2,ce=l[2]&3;n+="."+o+"."+Ge(h)+d+"."+Ge(E)+"."+T+"."+F+J+ce+"."+Ge(1)+"."+Ge(1)+"."+Ge(1)+"."+0,s=k("dav1",t)}break}}return{codec:n,encrypted:A,supplemental:s}}function k(i,e){const t=p(e,["dvvC"]),r=t.length?t[0]:p(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,s=r[2]<<5&32|r[3]>>3&31;return i+"."+Ge(n)+"."+Ge(s)}}function te(i){let e=0;for(let t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}function Fe(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function ke(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function Ge(i){return(i<10?"0":"")+i}function ze(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&p(i,["moov","trak"]).forEach(n=>{const A=p(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let a=p(A,["enca"]);const l=a.length>0;l||(a=p(A,["encv"])),a.forEach(o=>{const h=l?o.subarray(28):o.subarray(78);p(h,["sinf"]).forEach(g=>{const v=Ft(g);if(v){const E=v.subarray(8,24);E.some(T=>T!==0)||(ie.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${Z.hexDump(E)} -> ${Z.hexDump(t)}`),v.set(t,8))}})})}),i}function Ft(i){const e=p(i,["schm"])[0];if(e){const t=De(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return p(i,["schi","tenc"])[0]}return null}function Je(i,e,t){const r={},n=p(i,["moof","traf"]);for(let s=0;s<n.length;s++){const A=n[s],a=p(A,["tfhd"])[0],l=Le(a,4),o=e[l];if(!o)continue;const h=r[l]||(r[l]={start:NaN,duration:0,sampleCount:0,timescale:o.timescale,type:o.type}),d=p(A,["tfdt"])[0];if(d){const Ae=d[0];let de=Le(d,4);Ae===1&&(de===Qt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(de*=Qt+1,de+=Le(d,8))),V(de)&&(!V(h.start)||de<h.start)&&(h.start=de)}const g=o.default,v=Le(a,0)|(g==null?void 0:g.flags);let E=(g==null?void 0:g.duration)||0;v&8&&(v&2?E=Le(a,12):E=Le(a,8));const T=p(A,["trun"]);let F=h.start||0,J=0,ce=E;for(let Ae=0;Ae<T.length;Ae++){const de=T[Ae],Te=Le(de,4),He=h.sampleCount;h.sampleCount+=Te;const xe=de[3]&1,Ne=de[3]&4,je=de[2]&1,Oe=de[2]&2,gt=de[2]&4,Pt=de[2]&8;let hr=8,jt=Te;for(xe&&(hr+=4),Ne&&Te&&(!(de[hr+1]&1)&&h.keyFrameIndex===void 0&&(h.keyFrameIndex=He),hr+=4,je?(ce=Le(de,hr),hr+=4):ce=E,Oe&&(hr+=4),Pt&&(hr+=4),F+=ce,J+=ce,jt--);jt--;)je?(ce=Le(de,hr),hr+=4):ce=E,Oe&&(hr+=4),gt&&(de[hr+1]&1||h.keyFrameIndex===void 0&&(h.keyFrameIndex=h.sampleCount-(jt+1),h.keyFrameStart=F),hr+=4),Pt&&(hr+=4),F+=ce,J+=ce;!J&&E&&(J+=E*Te)}h.duration+=J}if(!Object.keys(r).some(s=>r[s].duration)){let s=1/0,A=0;const a=p(i,["sidx"]);for(let l=0;l<a.length;l++){const o=b(a[l]);if(o!=null&&o.references){s=Math.min(s,o.earliestPresentationTime/o.timescale);const h=o.references.reduce((d,g)=>d+g.info.duration||0,0);A=Math.max(A,h+o.earliestPresentationTime/o.timescale)}}A&&V(A)&&Object.keys(r).forEach(l=>{r[l].duration||(r[l].duration=A*r[l].timescale-r[l].start)})}return r}function ut(i,e,t){p(e,["moof","traf"]).forEach(r=>{p(r,["tfhd"]).forEach(n=>{const s=Le(n,4),A=i[s];if(!A)return;const a=A.timescale||9e4;p(r,["tfdt"]).forEach(l=>{const o=l[0],h=t*a;if(h){let d=Le(l,4);if(o===0)d-=h,d=Math.max(d,0),Be(l,4,d);else{d*=Math.pow(2,32),d+=Le(l,8),d-=h,d=Math.max(d,0);const g=Math.floor(d/(Qt+1)),v=Math.floor(d%(Qt+1));Be(l,4,g),Be(l,8,v)}}})})})}function st(i){const e={valid:null,remainder:null},t=p(i,["moof"]);if(t.length<2)return e.remainder=i,e;const r=t[t.length-1];return e.valid=i.slice(0,r.byteOffset-8),e.remainder=i.slice(r.byteOffset-8),e}function Xe(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function Ve(i,e){const t=[],r=e.samples,n=e.timescale,s=e.id;let A=!1;return p(r,["moof"]).map(l=>{const o=l.byteOffset-8;p(l,["traf"]).map(d=>{const g=p(d,["tfdt"]).map(v=>{const E=v[0];let T=Le(v,4);return E===1&&(T*=Math.pow(2,32),T+=Le(v,8)),T/n})[0];return g!==void 0&&(i=g),p(d,["tfhd"]).map(v=>{const E=Le(v,4),T=Le(v,0)&16777215,F=(T&1)!==0,J=(T&2)!==0,ce=(T&8)!==0;let Ae=0;const de=(T&16)!==0;let Te=0;const He=(T&32)!==0;let xe=8;E===s&&(F&&(xe+=8),J&&(xe+=4),ce&&(Ae=Le(v,xe),xe+=4),de&&(Te=Le(v,xe),xe+=4),He&&(xe+=4),e.type==="video"&&(A=Ze(e.codec)),p(d,["trun"]).map(Ne=>{const je=Ne[0],Oe=Le(Ne,0)&16777215,gt=(Oe&1)!==0;let Pt=0;const hr=(Oe&4)!==0,jt=(Oe&256)!==0;let Jt=0;const Vt=(Oe&512)!==0;let rr=0;const or=(Oe&1024)!==0,Lt=(Oe&2048)!==0;let Mt=0;const xr=Le(Ne,4);let br=8;gt&&(Pt=Le(Ne,br),br+=4),hr&&(br+=4);let Rr=Pt+o;for(let jr=0;jr<xr;jr++){if(jt?(Jt=Le(Ne,br),br+=4):Jt=Ae,Vt?(rr=Le(Ne,br),br+=4):rr=Te,or&&(br+=4),Lt&&(je===0?Mt=Le(Ne,br):Mt=Ut(Ne,br),br+=4),e.type===B.VIDEO){let nn=0;for(;nn<rr;){const wn=Le(r,Rr);if(Rr+=4,ct(A,r[Rr])){const hi=r.subarray(Rr,Rr+wn);yt(hi,A?2:1,i+Mt/n,t)}Rr+=wn,nn+=wn+4}}i+=Jt/n}}))})})}),t}function Ze(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function ct(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function yt(i,e,t,r){const n=Nt(i);let s=0;s+=e;let A=0,a=0,l=0;for(;s<n.length;){A=0;do{if(s>=n.length)break;l=n[s++],A+=l}while(l===255);a=0;do{if(s>=n.length)break;l=n[s++],a+=l}while(l===255);const o=n.length-s;let h=s;if(a<o)s+=a;else if(a>o){ie.error(`Malformed SEI payload. ${a} is too small, only ${o} bytes left to parse.`);break}if(A===4){if(n[h++]===181){const g=it(n,h);if(h+=2,g===49){const v=Le(n,h);if(h+=4,v===1195456820){const E=n[h++];if(E===3){const T=n[h++],F=31&T,J=64&T,ce=J?2+F*3:0,Ae=new Uint8Array(ce);if(J){Ae[0]=T;for(let de=1;de<ce;de++)Ae[de]=n[h++]}r.push({type:E,payloadType:A,pts:t,bytes:Ae})}}}}}else if(A===5&&a>16){const d=[];for(let E=0;E<16;E++){const T=n[h++].toString(16);d.push(T.length==1?"0"+T:T),(E===3||E===5||E===7||E===9)&&d.push("-")}const g=a-16,v=new Uint8Array(g);for(let E=0;E<g;E++)v[E]=n[h++];r.push({payloadType:A,pts:t,uuid:d.join(""),userData:Me(v),userDataBytes:v})}}}function Nt(i){const e=i.byteLength,t=[];let r=1;for(;r<e-2;)i[r]===0&&i[r+1]===0&&i[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return i;const n=e-t.length,s=new Uint8Array(n);let A=0;for(r=0;r<n;A++,r++)A===t[0]&&(A++,t.shift()),s[r]=i[A];return s}function bt(i){const e=i[0];let t="",r="",n=0,s=0,A=0,a=0,l=0,o=0;if(e===0){for(;De(i.subarray(o,o+1))!=="\0";)t+=De(i.subarray(o,o+1)),o+=1;for(t+=De(i.subarray(o,o+1)),o+=1;De(i.subarray(o,o+1))!=="\0";)r+=De(i.subarray(o,o+1)),o+=1;r+=De(i.subarray(o,o+1)),o+=1,n=Le(i,12),s=Le(i,16),a=Le(i,20),l=Le(i,24),o=28}else if(e===1){o+=4,n=Le(i,o),o+=4;const d=Le(i,o);o+=4;const g=Le(i,o);for(o+=4,A=nc(2,32)*d+g,me(A)||(A=Number.MAX_SAFE_INTEGER,ie.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),a=Le(i,o),o+=4,l=Le(i,o),o+=4;De(i.subarray(o,o+1))!=="\0";)t+=De(i.subarray(o,o+1)),o+=1;for(t+=De(i.subarray(o,o+1)),o+=1;De(i.subarray(o,o+1))!=="\0";)r+=De(i.subarray(o,o+1)),o+=1;r+=De(i.subarray(o,o+1)),o+=1}const h=i.subarray(o,i.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:A,presentationTimeDelta:s,eventDuration:a,id:l,payload:h}}function Wt(i,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(i,4),n=0,r=8;n<t;n++)s.set(e[n],r),r+=e[n].byteLength;return s}function Ht(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let s;r>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const A=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(A.buffer).setUint32(0,t.byteLength,!1),Wt([112,115,115,104],new Uint8Array([r,0,0,0]),i,s,n,A,t||new Uint8Array)}function qt(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let r=0;for(;r+32<t;){const n=new DataView(i,r),s=fr(n);e.push(s),r+=s.size}}return e}function fr(i){const e=i.getUint32(0),t=i.byteOffset,r=i.byteLength;if(r<e)return{offset:t,size:r};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const s=i.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const A=i.buffer,a=Z.hexDump(new Uint8Array(A,t+12,16)),l=i.getUint32(28);let o=null,h=null;if(s===0){if(e-32<l||l<22)return{offset:t,size:e};h=new Uint8Array(A,t+32,l)}else if(s===1){if(!l||r<t+32+l*16+16)return{offset:t,size:e};o=[];for(let d=0;d<l;d++)o.push(new Uint8Array(A,t+32+d*16,16))}return{version:s,systemId:a,kids:o,data:h,offset:t,size:e}}const Ur=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),St={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function er(i,e){const t=St[e];return!!t&&!!t[i.slice(0,4)]}function Ue(i,e,t=!0){return!i.split(",").some(r=>!be(r,e,t))}function be(i,e,t=!0){var r;const n=ye(t);return(r=n==null?void 0:n.isTypeSupported(Ee(i,e)))!=null?r:!1}function Ee(i,e){return`${e}/mp4;codecs=${i}`}function Y(i){if(i){const e=i.substring(0,4);return St.video[e]}return 2}function ee(i){const e=Ur();return i.split(",").reduce((t,r)=>{const s=e&&Ze(r)?9:St.video[r];return s?(s*2+t)/(t?3:2):(St.audio[r]+t)/(t?2:1)},0)}const oe={};function pe(i,e=!0){if(oe[i])return oe[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let n=0;n<t.length;n++){var r;if(be(t[n],"audio",e))return oe[i]=t[n],t[n];if(t[n]==="mp3"&&(r=ye(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return i}const Ce=/flac|opus|mp4a\.40\.34/i;function ft(i,e=!0){return i.replace(Ce,t=>pe(t.toLowerCase(),e))}function Et(i,e){const t=[];if(i){const r=i.split(",");for(let n=0;n<r.length;n++)er(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function dt(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let r=t.length;r--;)if(t[r].substring(0,4)===i.substring(0,4))return t[r]}return t[0]}}return e||i}function Zt(i){const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");r.length>2&&r[0]==="avc1"&&(e[t]=`avc1.${parseInt(r[1]).toString(16)}${("000"+parseInt(r[2]).toString(16)).slice(-4)}`)}return e.join(",")}function _r(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return i}function Mr(i){const e=ye(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function $t(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Kt={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Tr(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}const Zr={};function Re(i,e,t,r,n,s){const A=i.audioCodec?i.audioGroups:null,a=s==null?void 0:s.audioCodec,l=s==null?void 0:s.channels,o=l?parseInt(l):a?1/0:2;let h=null;if(A!=null&&A.length)try{A.length===1&&A[0]?h=e.groups[A[0]].channels:h=A.reduce((d,g)=>{if(g){const v=e.groups[g];if(!v)throw new Error(`Audio track group ${g} not found`);Object.keys(v.channels).forEach(E=>{d[E]=(d[E]||0)+v.channels[E]})}return d},{2:0})}catch(d){return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(r,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(n,8e6))||!!h&&V(o)&&Object.keys(h).some(d=>parseInt(d)>o)}function Ir(i,e,t){const r=i.videoCodec,n=i.audioCodec;if(!r&&!n||!t)return Promise.resolve(Kt);const s=[];if(r){const A={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},a=i.videoRange;a!=="SDR"&&(A.transferFunction=a.toLowerCase());const l=r.split(","),o=navigator.userAgent;if(l.some(h=>Ze(h))&&Ur())return Promise.resolve(Tr(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${o})`),s));s.push.apply(s,l.map(h=>({type:"media-source",video:C(C({},A),{},{contentType:Ee(_r(h),"video")})})))}return n&&i.audioGroups&&i.audioGroups.forEach(A=>{var a;A&&((a=e.groups[A])==null||a.tracks.forEach(l=>{if(l.groupId===A){const o=l.channels||"",h=parseFloat(o);V(h)&&h>2&&s.push.apply(s,n.split(",").map(d=>({type:"media-source",audio:{contentType:Ee(d,"audio"),channels:""+h}})))}}))}),Promise.all(s.map(A=>{const a=Er(A);return Zr[a]||(Zr[a]=t.decodingInfo(A))})).then(A=>({supported:!A.some(a=>!a.supported),configurations:s,decodingInfoResults:A})).catch(A=>({supported:!1,configurations:s,decodingInfoResults:[],error:A}))}function Er(i){const{audio:e,video:t}=i,r=t||e;if(r){const n=$t(r.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}const vr=["NONE","TYPE-0","TYPE-1",null];function _n(i){return vr.indexOf(i)>-1}const Or=["SDR","PQ","HLG"];function vn(i){return!!i&&Or.indexOf(i)>-1}var zr={No:"",Yes:"YES",v2:"v2"};function Fn(i){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=i,n=r<e/2;return e&&n?t?zr.v2:zr.Yes:zr.No}class hn{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class yn{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Kn(this._audioGroups,e)}hasSubtitleGroup(e){return Kn(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Kn(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function Hr(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function Gr(i,e){let t=!1,r=[];if(i&&(t=i!=="SDR",r=[i]),e){r=e.allowedVideoRanges||Or.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&Hr(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const Xr=i=>{const e=new WeakSet;return(t,r)=>{if(i&&(r=i(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},Kr=(i,e)=>JSON.stringify(i,Xr(e));function ln(i,e,t,r,n){const s=Object.keys(i),A=r==null?void 0:r.channels,a=r==null?void 0:r.audioCodec,l=n==null?void 0:n.videoCodec,o=A&&parseInt(A)===2;let h=!1,d=!1,g=1/0,v=1/0,E=1/0,T=1/0,F=0,J=[];const{preferHDR:ce,allowedVideoRanges:Ae}=Gr(e,n);for(let Ne=s.length;Ne--;){const je=i[s[Ne]];h||(h=je.channels[2]>0),g=Math.min(g,je.minHeight),v=Math.min(v,je.minFramerate),E=Math.min(E,je.minBitrate),Ae.filter(gt=>je.videoRanges[gt]>0).length>0&&(d=!0)}g=V(g)?g:0,v=V(v)?v:0;const de=Math.max(1080,g),Te=Math.max(30,v);E=V(E)?E:t,t=Math.max(E,t),d||(e=void 0);const He=s.length>1;return{codecSet:s.reduce((Ne,je)=>{const Oe=i[je];if(je===Ne)return Ne;if(J=d?Ae.filter(gt=>Oe.videoRanges[gt]>0):[],He){if(Oe.minBitrate>t)return dn(je,`min bitrate of ${Oe.minBitrate} > current estimate of ${t}`),Ne;if(!Oe.hasDefaultAudio)return dn(je,"no renditions with default or auto-select sound found"),Ne;if(a&&je.indexOf(a.substring(0,4))%5!==0)return dn(je,`audio codec preference "${a}" not found`),Ne;if(A&&!o){if(!Oe.channels[A])return dn(je,`no renditions with ${A} channel sound found (channels options: ${Object.keys(Oe.channels)})`),Ne}else if((!a||o)&&h&&Oe.channels[2]===0)return dn(je,"no renditions with stereo sound found"),Ne;if(Oe.minHeight>de)return dn(je,`min resolution of ${Oe.minHeight} > maximum of ${de}`),Ne;if(Oe.minFramerate>Te)return dn(je,`min framerate of ${Oe.minFramerate} > maximum of ${Te}`),Ne;if(!J.some(gt=>Oe.videoRanges[gt]>0))return dn(je,`no variants with VIDEO-RANGE of ${Kr(J)} found`),Ne;if(l&&je.indexOf(l.substring(0,4))%5!==0)return dn(je,`video codec preference "${l}" not found`),Ne;if(Oe.maxScore<F)return dn(je,`max score of ${Oe.maxScore} < selected max of ${F}`),Ne}return Ne&&(ee(je)>=ee(Ne)||Oe.fragmentError>i[Ne].fragmentError)?Ne:(T=Oe.minIndex,F=Oe.maxScore,je)},void 0),videoRanges:J,preferHDR:ce,minFramerate:v,minBitrate:E,minIndex:T}}function dn(i,e){ie.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function Cn(i){return i.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function cr(i,e,t,r){return i.slice(t,r+1).reduce((n,s,A)=>{if(!s.codecSet)return n;const a=s.audioGroups;let l=n[s.codecSet];l||(n[s.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:A,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!a,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,s.bitrate);const o=Math.min(s.height,s.width);return l.minHeight=Math.min(l.minHeight,o),l.minFramerate=Math.min(l.minFramerate,s.frameRate),l.minIndex=Math.min(l.minIndex,A),l.maxScore=Math.max(l.maxScore,s.score),l.fragmentError+=s.fragmentError,l.videoRanges[s.videoRange]=(l.videoRanges[s.videoRange]||0)+1,a&&a.forEach(h=>{if(!h)return;const d=e.groups[h];d&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(g=>{l.channels[g]=(l.channels[g]||0)+d.channels[g]}))}),n},{})}function yr(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}}function Qe(i,e,t){if("attrs"in i){const r=e.indexOf(i);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(Ye(i,n,t))return r}return-1}function Ye(i,e,t){const{groupId:r,name:n,lang:s,assocLang:A,default:a}=i,l=i.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(s===void 0||_t(s,e.lang))&&(s===void 0||e.assocLang===A)&&(a===void 0||e.default===a)&&(l===void 0||e.forced===l)&&(!("characteristics"in i)||at(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function _t(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function at(i,e=""){const t=i.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function wt(i,e){const{audioCodec:t,channels:r}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function At(i,e,t,r,n){const s=e[r],a=e.reduce((g,v,E)=>{const T=v.uri;return(g[T]||(g[T]=[])).push(E),g},{})[s.uri];a.length>1&&(r=Math.max.apply(Math,a));const l=s.videoRange,o=s.frameRate,h=s.codecSet.substring(0,4),d=ot(e,r,g=>{if(g.videoRange!==l||g.frameRate!==o||g.codecSet.substring(0,4)!==h)return!1;const v=g.audioGroups,E=t.filter(T=>!v||v.indexOf(T.groupId)!==-1);return Qe(i,E,n)>-1});return d>-1?d:ot(e,r,g=>{const v=g.audioGroups,E=t.filter(T=>!v||v.indexOf(T.groupId)!==-1);return Qe(i,E,n)>-1})}function ot(i,e,t){for(let r=e;r>-1;r--)if(t(i[r]))return r;for(let r=e+1;r<i.length;r++)if(t(i[r]))return r;return-1}function Dt(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class zt extends M{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:s,hls:A}=this,{autoLevelEnabled:a,media:l}=A;if(!n||!l)return;const o=performance.now(),h=s?s.stats:n.stats,d=s?s.duration:n.duration,g=o-h.loading.start,v=A.minAutoLevel,E=n.level,T=this._nextAutoLevel;if(h.aborted||h.loaded&&h.loaded===h.total||E<=v){this.clearTimer(),this._nextAutoLevel=-1;return}if(!a)return;const F=T>-1&&T!==E,J=!!t||F;if(!J&&(l.paused||!l.playbackRate||!l.readyState))return;const ce=A.mainForwardBufferInfo;if(!J&&ce===null)return;const Ae=this.bwEstimator.getEstimateTTFB(),de=Math.abs(l.playbackRate);if(g<=Math.max(Ae,1e3*(d/(de*2))))return;const Te=ce?ce.len/de:0,He=h.loading.first?h.loading.first-h.loading.start:-1,xe=h.loaded&&He>-1,Ne=this.getBwEstimate(),je=A.levels,Oe=je[E],gt=Math.max(h.loaded,Math.round(d*(n.bitrate||Oe.averageBitrate)/8));let Pt=xe?g-He:g;Pt<1&&xe&&(Pt=Math.min(g,h.loaded*8/Ne));const hr=xe?h.loaded*1e3/Pt:0,jt=Ae/1e3,Jt=hr?(gt-h.loaded)/hr:gt*8/Ne+jt;if(Jt<=Te)return;const Vt=hr?hr*8:Ne,rr=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,or=this.hls.config.abrBandWidthUpFactor;let Lt=Number.POSITIVE_INFINITY,Mt;for(Mt=E-1;Mt>v;Mt--){const jr=je[Mt].maxBitrate,nn=!je[Mt].details||rr;if(Lt=this.getTimeToLoadFrag(jt,Vt,d*jr,nn),Lt<Math.min(Te,d+jt))break}if(Lt>=Jt||Lt>d*10)return;xe?this.bwEstimator.sample(g-Math.min(Ae,He),h.loaded):this.bwEstimator.sampleTTFB(g);const xr=je[Mt].maxBitrate;this.getBwEstimate()*or>xr&&this.resetEstimator(xr);const br=this.findBestLevel(xr,v,Mt,0,Te,1,1);br>-1&&(Mt=br),this.warn(`Fragment ${n.sn}${s?" part "+s.index:""} of level ${E} is loading too slowly;
Fragment duration: ${n.duration.toFixed(3)}
Time to underbuffer: ${Te.toFixed(3)} s
Estimated load time for current fragment: ${Jt.toFixed(3)} s
Estimated load time for down switch fragment: ${Lt.toFixed(3)} s
TTFB estimate: ${He|0} ms
Current BW estimate: ${V(Ne)?Ne|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Mt} @ ${xr|0} bps`),A.nextLoadLevel=A.nextAutoLevel=Mt,this.clearTimer();const Rr=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Mt&&Mt>0){const jr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Mt>0?"and switching down":""}
Fragment duration: ${n.duration.toFixed(3)} s
Time to underbuffer: ${jr.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Mt>v){let nn=this.findBestLevel(this.hls.levels[v].bitrate,v,Mt,0,jr,1,1);nn===-1&&(nn=v),this.hls.nextLoadLevel=this.hls.nextAutoLevel=nn,this.resetEstimator(this.hls.levels[nn].bitrate)}}};F||Jt>Lt*2?Rr():this.timer=self.setInterval(Rr,Lt*1e3),A.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:s,stats:h})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new q(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(m.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case W.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:s}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const A=performance.now(),a=s?s.stats:r.stats,l=A-a.loading.start,o=a.loading.first?a.loading.first-a.loading.start:-1;if(a.loaded&&o>-1){const d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(d,o),a.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,t,r,n){const s=e+r/t,A=n?e+this.lastLevelLoadSec:0;return s+A}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,s=n.end-n.first;V(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:r}){const n=r?r.stats:t.stats;if(t.type===O.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const s=r?r.duration:t.duration,A=this.hls.levels[t.level],a=(A.loaded?A.loaded.bytes:0)+n.loaded,l=(A.loaded?A.loaded.duration:0)+s;A.loaded={bytes:a,duration:l},A.realBitrate=Math.round(8*a/l)}if(t.bitrateTest){const s={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(m.FRAG_BUFFERED,s),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,s=n!=null&&n.stats.loaded?n.stats:r.stats;if(s.aborted||this.ignoreFragment(r))return;const A=s.parsing.end-s.loading.start-Math.min(s.loading.first-s.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(A,s.loaded),s.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==O.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,s=this.findBestLevel(r,t,e,0,n,1,1);if(s>-1)return s;const A=this.hls.firstLevel,a=Math.min(Math.max(A,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${A} clamped to ${a}`),a}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!n||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const s=r&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const A=this.hls.levels;if(A.length>Math.max(e,s)&&A[e].loadError<=A[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:r}=this;if(r.levels.length<=1)return r.loadLevel;const{maxAutoLevel:n,config:s,minAutoLevel:A}=r,a=t?t.duration:e?e.duration:0,l=this.getBwEstimate(),o=this.getStarvationDelay();let h=s.abrBandWidthFactor,d=s.abrBandWidthUpFactor;if(o){const F=this.findBestLevel(l,A,n,o,0,h,d);if(F>=0)return this.rebufferNotice=-1,F}let g=a?Math.min(a,s.maxStarvationDelay):s.maxStarvationDelay;if(!o){const F=this.bitrateTestDelay;F&&(g=(a?Math.min(a,s.maxLoadingDelay):s.maxLoadingDelay)-F,this.info(`bitrate test took ${Math.round(1e3*F)}ms, set first fragment max fetchDuration to ${Math.round(1e3*g)} ms`),h=d=1)}const v=this.findBestLevel(l,A,n,o,g,h,d);if(this.rebufferNotice!==v&&(this.rebufferNotice=v,this.info(`${o?"rebuffering expected":"buffer is empty"}, optimal quality level ${v}`)),v>-1)return v;const E=r.levels[A],T=r.loadLevelObj;return T&&(E==null?void 0:E.bitrate)<T.bitrate?A:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,n,s,A,a){var l;const o=n+s,h=this.lastLoadedFragLevel,d=h===-1?this.hls.firstLevel:h,{fragCurrent:g,partCurrent:v}=this,{levels:E,allAudioTracks:T,loadLevel:F,config:J}=this.hls;if(E.length===1)return 0;const ce=E[d],Ae=!!((l=this.hls.latestLevelDetails)!=null&&l.live),de=F===-1||h===-1;let Te,He="SDR",xe=(ce==null?void 0:ce.frameRate)||0;const{audioPreference:Ne,videoPreference:je}=J,Oe=this.audioTracksByGroup||(this.audioTracksByGroup=Cn(T));let gt=-1;if(de){if(this.firstSelection!==-1)return this.firstSelection;const Vt=this.codecTiers||(this.codecTiers=cr(E,Oe,t,r)),rr=ln(Vt,He,e,Ne,je),{codecSet:or,videoRanges:Lt,minFramerate:Mt,minBitrate:xr,minIndex:br,preferHDR:Rr}=rr;gt=br,Te=or,He=Rr?Lt[Lt.length-1]:Lt[0],xe=Mt,e=Math.max(e,xr),this.log(`picked start tier ${Kr(rr)}`)}else Te=ce==null?void 0:ce.codecSet,He=ce==null?void 0:ce.videoRange;const Pt=v?v.duration:g?g.duration:0,hr=this.bwEstimator.getEstimateTTFB()/1e3,jt=[];for(let Vt=r;Vt>=t;Vt--){var Jt;const rr=E[Vt],or=Vt>d;if(!rr)continue;if(J.useMediaCapabilities&&!rr.supportedResult&&!rr.supportedPromise){const nn=navigator.mediaCapabilities;typeof(nn==null?void 0:nn.decodingInfo)=="function"&&(Re(rr,Oe,He,xe,e,Ne)||Ze(rr.videoCodec))?(rr.supportedPromise=Ir(rr,Oe,nn),rr.supportedPromise.then(wn=>{if(!this.hls)return;rr.supportedResult=wn;const hi=this.hls.levels,wi=hi.indexOf(rr);wn.error?this.warn(`MediaCapabilities decodingInfo error: "${wn.error}" for level ${wi} ${Kr(wn)}`):wn.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${wi} ${Kr(wn)}`),wi>-1&&hi.length>1&&(this.log(`Removing unsupported level ${wi}`),this.hls.removeLevel(wi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):rr.supportedResult=Kt}if((Te&&rr.codecSet!==Te||He&&rr.videoRange!==He||or&&xe>rr.frameRate||!or&&xe>0&&xe<rr.frameRate||rr.supportedResult&&!((Jt=rr.supportedResult.decodingInfoResults)!=null&&Jt[0].smooth))&&(!de||Vt!==gt)){jt.push(Vt);continue}const Lt=rr.details,Mt=(v?Lt==null?void 0:Lt.partTarget:Lt==null?void 0:Lt.averagetargetduration)||Pt;let xr;or?xr=a*e:xr=A*e;const br=Pt&&n>=Pt*2&&s===0?rr.averageBitrate:rr.maxBitrate,Rr=this.getTimeToLoadFrag(hr,xr,br*Mt,Lt===void 0);if(xr>=br&&(Vt===h||rr.loadError===0&&rr.fragmentError===0)&&(Rr<=hr||!V(Rr)||Ae&&!this.bitrateTestDelay||Rr<o)){const nn=this.forcedAutoLevel;return Vt!==F&&(nn===-1||nn!==F)&&(jt.length&&this.trace(`Skipped level(s) ${jt.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${E[jt[0]].codecs}" ${E[jt[0]].videoRange}; not compatible with "${Te}" ${He}`),this.info(`switch candidate:${d}->${Vt} adjustedbw(${Math.round(xr)})-bitrate=${Math.round(xr-br)} ttfb:${hr.toFixed(1)} avgDuration:${Mt.toFixed(1)} maxFetchDuration:${o.toFixed(1)} fetchDuration:${Rr.toFixed(1)} firstSelection:${de} codecSet:${rr.codecSet} videoRange:${rr.videoRange} hls.loadLevel:${F}`)),de&&(this.firstSelection=Vt),Vt}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls;return Math.min(Math.max(e,r),t)}}const ar={search:function(i,e){let t=0,r=i.length-1,n=null,s=null;for(;t<=r;){n=(t+r)/2|0,s=i[n];const A=e(s);if(A>0)t=n+1;else if(A<0)r=n-1;else return s}return null}};function Lr(i,e,t){if(e===null||!Array.isArray(i)||!i.length||!V(e))return null;const r=i[0].programDateTime;if(e<(r||0))return null;const n=i[i.length-1].endProgramDateTime;if(e>=(n||0))return null;for(let s=0;s<i.length;++s){const A=i[s];if(Q(e,t,A))return A}return null}function lr(i,e,t=0,r=0,n=.005){let s=null;if(i){s=e[1+i.sn-e[0].sn]||null;const a=i.endDTS-t;a>0&&a<15e-7&&(t+=15e-7),s&&i.level!==s.level&&s.end<=i.end&&(s=e[2+i.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&((!i||i.level===s.level)&&U(t,r,s)===0||wr(s,i,Math.min(n,r))))return s;const A=ar.search(e,U.bind(null,t,r));return A&&(A!==i||!s)?A:s}function wr(i,e,t){if(e&&e.start===0&&e.level<i.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,s)=>(s[0]==="INF"&&(n+=parseFloat(s[1])),n),t);return i.start<=r}return!1}function U(i=0,e=0,t){if(t.start<=i&&t.start+t.duration>i)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=i?1:t.start-r>i&&t.start?-1:0}function Q(i,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>i}function ne(i,e,t){if(i&&i.startCC<=e&&i.endCC>=e){let r=i.fragments;const{fragmentHint:n}=i;n&&(r=r.concat(n));let s;return ar.search(r,A=>A.cc<e?1:A.cc>e?-1:(s=A,A.end<=t?1:A.start>t?-1:0)),s||null}return null}function le(i){switch(i.details){case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_TIMEOUT:case W.LEVEL_LOAD_TIMEOUT:case W.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Ie(i,e){const t=le(e);return i.default[`${t?"timeout":"error"}Retry`]}function Ke(i,e){const t=i.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function et(i){return C(C({},i),{errorRetry:null,timeoutRetry:null})}function tt(i,e,t,r){if(!i)return!1;const n=r==null?void 0:r.code,s=e<i.maxNumRetry&&(Tt(n)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,r,s):s}function Tt(i){return i===0&&navigator.onLine===!1||!!i&&(i<400||i>499)}var lt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},ve={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class rt extends M{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.ERROR,this.onError,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.ERROR,this.onError,this),e.off(m.ERROR,this.onErrorOut,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===O.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r;if(t.fatal)return;const n=this.hls,s=t.context;switch(t.details){case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case W.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=mt();return}case W.FRAG_GAP:case W.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=lt.SendAlternateToPenaltyBox;return}case W.LEVEL_EMPTY_ERROR:case W.LEVEL_PARSING_ERROR:{var A,a;const o=t.parent===O.MAIN?t.level:n.loadLevel;t.details===W.LEVEL_EMPTY_ERROR&&((A=t.context)!=null&&(a=A.levelDetails)!=null&&a.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,o))}return;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.SUBTITLE_LOAD_ERROR:case W.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const o=n.loadLevelObj;if(o&&(s.type===ge.AUDIO_TRACK&&o.hasAudioGroup(s.groupId)||s.type===ge.SUBTITLE_TRACK&&o.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=lt.SendAlternateToPenaltyBox,t.errorAction.flags=ve.MoveAllAlternatesMatchingHost;return}}return;case W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const o=n.loadLevelObj,h=o==null?void 0:o.attrs["HDCP-LEVEL"];h?t.errorAction={action:lt.SendAlternateToPenaltyBox,flags:ve.MoveAllAlternatesMatchingHDCP,hdcpLevel:h}:this.keySystemError(t)}return;case W.BUFFER_ADD_CODEC_ERROR:case W.REMUX_ALLOC_ERROR:case W.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:n.loadLevel)}return;case W.INTERNAL_EXCEPTION:case W.BUFFER_APPENDING_ERROR:case W.BUFFER_FULL_ERROR:case W.LEVEL_SWITCH_ERROR:case W.BUFFER_STALLED_ERROR:case W.BUFFER_SEEK_OVER_HOLE:case W.BUFFER_NUDGE_ON_STALL:t.errorAction=mt();return}t.type===he.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,n=Ie(r.config.playlistLoadPolicy,e),s=this.playlistError++;if(tt(n,s,le(e),e.response))return{action:lt.RetryRequest,flags:ve.None,retryConfig:n,retryCount:s};const a=this.getLevelSwitchAction(e,t);return n&&(a.retryConfig=n,a.retryCount=s),a}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:s,keyLoadPolicy:A}=t.config,a=Ie(e.details.startsWith("key")?A:s,e),l=t.levels.reduce((h,d)=>h+d.fragmentError,0);if(n&&(e.details!==W.FRAG_GAP&&n.fragmentError++,tt(a,l,le(e),e.response)))return{action:lt.RetryRequest,flags:ve.None,retryConfig:a,retryCount:l};const o=this.getLevelSwitchAction(e,r);return a&&(o.retryConfig=a,o.retryCount=l),o}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var s,A;const o=e.details;n.loadError++,o===W.BUFFER_APPEND_ERROR&&n.fragmentError++;let h=-1;const{levels:d,loadLevel:g,minAutoLevel:v,maxAutoLevel:E}=r;!r.autoLevelEnabled&&!r.config.preserveManualLevelOnError&&(r.loadLevel=-1);const T=(s=e.frag)==null?void 0:s.type,J=(T===O.AUDIO&&o===W.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(o===W.BUFFER_ADD_CODEC_ERROR||o===W.BUFFER_APPEND_ERROR))&&d.some(({audioCodec:He})=>n.audioCodec!==He),Ae=e.sourceBufferName==="video"&&(o===W.BUFFER_ADD_CODEC_ERROR||o===W.BUFFER_APPEND_ERROR)&&d.some(({codecSet:He,audioCodec:xe})=>n.codecSet!==He&&n.audioCodec===xe),{type:de,groupId:Te}=(A=e.context)!=null?A:{};for(let He=d.length;He--;){const xe=(He+g)%d.length;if(xe!==g&&xe>=v&&xe<=E&&d[xe].loadError===0){var a,l;const Ne=d[xe];if(o===W.FRAG_GAP&&T===O.MAIN&&e.frag){const je=d[xe].details;if(je){const Oe=lr(e.frag,je.fragments,e.frag.start);if(Oe!=null&&Oe.gap)continue}}else{if(de===ge.AUDIO_TRACK&&Ne.hasAudioGroup(Te)||de===ge.SUBTITLE_TRACK&&Ne.hasSubtitleGroup(Te))continue;if(T===O.AUDIO&&(a=n.audioGroups)!=null&&a.some(je=>Ne.hasAudioGroup(je))||T===O.SUBTITLE&&(l=n.subtitleGroups)!=null&&l.some(je=>Ne.hasSubtitleGroup(je))||J&&n.audioCodec===Ne.audioCodec||!J&&n.audioCodec!==Ne.audioCodec||Ae&&n.codecSet===Ne.codecSet)continue}h=xe;break}}if(h>-1&&r.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:lt.SendAlternateToPenaltyBox,flags:ve.None,nextAutoLevel:h}}return{action:lt.SendAlternateToPenaltyBox,flags:ve.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case lt.DoNothing:break;case lt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==W.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case lt.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n,hdcpLevel:s,nextAutoLevel:A}=r;switch(n){case ve.None:this.switchLevel(e,A);break;case ve.MoveAllAlternatesMatchingHDCP:s&&(t.maxHdcpLevel=vr[vr.indexOf(s)-1],r.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}r.resolved||this.switchLevel(e,A)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===W.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=$t(e.mimeType),n=this.hls.levels;for(let s=n.length;s--;)n[s][`${e.sourceBufferName}Codec`]===r&&this.hls.removeLevel(s)}}}function mt(i){const e={action:lt.DoNothing,flags:ve.None};return i&&(e.resolved=!0),e}var Rt={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Yt{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const r=this.activePartLists[t];if(r)for(let n=r.length;n--;){const s=r[n];if(!s)break;const A=s.end;if(s.start<=e&&A!==null&&e<=A)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,r){const{fragments:n}=this,s=Object.keys(n);for(let A=s.length;A--;){const a=n[s[A]];if((a==null?void 0:a.body.type)===t&&(!r||a.buffered)){const l=a.body;if(l.start<=e&&e<=l.end)return l}}return null}detectEvictedFragments(e,t,r,n,s){this.timeRanges&&(this.timeRanges[e]=t);const A=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(a=>{const l=this.fragments[a];if(!l||A>=l.body.sn)return;if(!l.buffered&&(!l.loaded||s)){l.body.type===r&&this.removeFragment(l.body);return}const o=l.range[e];if(o){if(o.time.length===0){this.removeFragment(l.body);return}o.time.some(h=>{const d=!this.isTimeBuffered(h.startPTS,h.endPTS,t);return d&&this.removeFragment(l.body),d})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=kt(r),s=this.fragments[n];if(!s||s.buffered&&r.gap)return;const A=!r.relurl;Object.keys(t).forEach(a=>{const l=r.elementaryStreams[a];if(!l)return;const o=t[a],h=A||l.partial===!0;s.range[a]=this.getBufferedTimes(r,e.part,h,o)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=r.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),It(s)||this.removeParts(r.sn-1,r.type)):this.removeFragment(s.body)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=Xt(r,n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=kt(e);let n=this.fragments[r];!n&&t&&(n=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,n.buffered=!0)}getBufferedTimes(e,t,r,n){const s={time:[],partial:r},A=e.start,a=e.end,l=e.minEndPTS||a,o=e.maxStartPTS||A;for(let h=0;h<n.length;h++){const d=n.start(h)-this.bufferPadding,g=n.end(h)+this.bufferPadding;if(o>=d&&l<=g){s.time.push({startPTS:Math.max(A,n.start(h)),endPTS:Math.min(a,n.end(h))});break}else if(A<g&&a>d){const v=Math.max(A,n.start(h)),E=Math.min(a,n.end(h));E>v&&(s.partial=!0,s.time.push({startPTS:v,endPTS:E}))}else if(a<=d)break}return s}getPartialFragment(e){let t=null,r,n,s,A=0;const{bufferPadding:a,fragments:l}=this;return Object.keys(l).forEach(o=>{const h=l[o];h&&It(h)&&(n=h.body.start-a,s=h.body.end+a,e>=n&&e<=s&&(r=Math.min(e-n,s-e),A<=r&&(t=h.body,A=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||It(t))}getState(e){const t=kt(e),r=this.fragments[t];return r?r.buffered?It(r)?Rt.PARTIAL:Rt.OK:Rt.APPENDING:Rt.NOT_LOADED}isTimeBuffered(e,t,r){let n,s;for(let A=0;A<r.length;A++){if(n=r.start(A)-this.bufferPadding,s=r.end(A)+this.bufferPadding,e>=n&&t<=s)return!0;if(t<=n)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const r=t.frag,n=t.part?null:t,s=kt(r);this.fragments[s]={body:r,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:s,type:A}=t;if(r.sn==="initSegment")return;const a=r.type;if(n){let o=this.activePartLists[a];o||(this.activePartLists[a]=o=[]),o.push(n)}this.timeRanges=s;const l=s[A];this.detectEvictedFragments(A,l,a,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=kt(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,r=Object.keys(t);if(!e)return r.length>0;for(let n=r.length;n--;){const s=t[r[n]];if((s==null?void 0:s.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,s){n&&!this.hasGaps||Object.keys(this.fragments).forEach(A=>{const a=this.fragments[A];if(!a)return;const l=a.body;l.type!==r||n&&!l.gap||l.start<t&&l.end>e&&(a.buffered||s)&&this.removeFragment(l)})}removeFragment(e){const t=kt(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=Xt(r,s=>s.fragment.sn!==n)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const r=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;r&&r.forEach(n=>n.clearElementaryStreamInfo())}}function It(i){var e,t,r;return i.buffered&&(i.body.gap||((e=i.range.video)==null?void 0:e.partial)||((t=i.range.audio)==null?void 0:t.partial)||((r=i.range.audiovideo)==null?void 0:r.partial))}function kt(i){return`${i.type}_${i.level}_${i.sn}`}function Xt(i,e){return i.filter(t=>{const r=e(t);return r||t.clearElementaryStreamInfo(),r})}var sr={cbc:0,ctr:1};class nr{constructor(e,t,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=r}decrypt(e,t){switch(this.aesMode){case sr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case sr.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function Gt(i){const e=i.byteLength,t=e&&new DataView(i.buffer).getUint8(e-1);return t?i.slice(0,e-t):i}class mr{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),r=new Uint32Array(4);for(let n=0;n<4;n++)r[n]=t.getUint32(n*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],s=r[1],A=r[2],a=r[3],l=this.invSubMix,o=l[0],h=l[1],d=l[2],g=l[3],v=new Uint32Array(256);let E=0,T=0,F=0;for(F=0;F<256;F++)F<128?v[F]=F<<1:v[F]=F<<1^283;for(F=0;F<256;F++){let J=T^T<<1^T<<2^T<<3^T<<4;J=J>>>8^J&255^99,e[E]=J,t[J]=E;const ce=v[E],Ae=v[ce],de=v[Ae];let Te=v[J]*257^J*16843008;n[E]=Te<<24|Te>>>8,s[E]=Te<<16|Te>>>16,A[E]=Te<<8|Te>>>24,a[E]=Te,Te=de*16843009^Ae*65537^ce*257^E*16843008,o[J]=Te<<24|Te>>>8,h[J]=Te<<16|Te>>>16,d[J]=Te<<8|Te>>>24,g[J]=Te,E?(E=ce^v[v[v[de^ce]]],T^=v[v[T]]):E=T=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,n=0;for(;n<t.length&&r;)r=t[n]===this.key[n],n++;if(r)return;this.key=t;const s=this.keySize=t.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);const A=this.ksRows=(s+6+1)*4;let a,l;const o=this.keySchedule=new Uint32Array(A),h=this.invKeySchedule=new Uint32Array(A),d=this.sBox,g=this.rcon,v=this.invSubMix,E=v[0],T=v[1],F=v[2],J=v[3];let ce,Ae;for(a=0;a<A;a++){if(a<s){ce=o[a]=t[a];continue}Ae=ce,a%s===0?(Ae=Ae<<8|Ae>>>24,Ae=d[Ae>>>24]<<24|d[Ae>>>16&255]<<16|d[Ae>>>8&255]<<8|d[Ae&255],Ae^=g[a/s|0]<<24):s>6&&a%s===4&&(Ae=d[Ae>>>24]<<24|d[Ae>>>16&255]<<16|d[Ae>>>8&255]<<8|d[Ae&255]),o[a]=ce=(o[a-s]^Ae)>>>0}for(l=0;l<A;l++)a=A-l,l&3?Ae=o[a]:Ae=o[a-4],l<4||a<=4?h[l]=Ae:h[l]=E[d[Ae>>>24]]^T[d[Ae>>>16&255]]^F[d[Ae>>>8&255]]^J[d[Ae&255]],h[l]=h[l]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,s=this.invKeySchedule,A=this.invSBox,a=this.invSubMix,l=a[0],o=a[1],h=a[2],d=a[3],g=this.uint8ArrayToUint32Array_(r);let v=g[0],E=g[1],T=g[2],F=g[3];const J=new Int32Array(e),ce=new Int32Array(J.length);let Ae,de,Te,He,xe,Ne,je,Oe,gt,Pt,hr,jt,Jt,Vt;const rr=this.networkToHostOrderSwap;for(;t<J.length;){for(gt=rr(J[t]),Pt=rr(J[t+1]),hr=rr(J[t+2]),jt=rr(J[t+3]),xe=gt^s[0],Ne=jt^s[1],je=hr^s[2],Oe=Pt^s[3],Jt=4,Vt=1;Vt<n;Vt++)Ae=l[xe>>>24]^o[Ne>>16&255]^h[je>>8&255]^d[Oe&255]^s[Jt],de=l[Ne>>>24]^o[je>>16&255]^h[Oe>>8&255]^d[xe&255]^s[Jt+1],Te=l[je>>>24]^o[Oe>>16&255]^h[xe>>8&255]^d[Ne&255]^s[Jt+2],He=l[Oe>>>24]^o[xe>>16&255]^h[Ne>>8&255]^d[je&255]^s[Jt+3],xe=Ae,Ne=de,je=Te,Oe=He,Jt=Jt+4;Ae=A[xe>>>24]<<24^A[Ne>>16&255]<<16^A[je>>8&255]<<8^A[Oe&255]^s[Jt],de=A[Ne>>>24]<<24^A[je>>16&255]<<16^A[Oe>>8&255]<<8^A[xe&255]^s[Jt+1],Te=A[je>>>24]<<24^A[Oe>>16&255]<<16^A[xe>>8&255]<<8^A[Ne&255]^s[Jt+2],He=A[Oe>>>24]<<24^A[xe>>16&255]<<16^A[Ne>>8&255]<<8^A[je&255]^s[Jt+3],ce[t]=rr(Ae^v),ce[t+1]=rr(He^E),ce[t+2]=rr(Te^T),ce[t+3]=rr(de^F),v=gt,E=Pt,T=hr,F=jt,t=t+4}return ce.buffer}}class pr{constructor(e,t,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=r}expandKey(){const e=Dr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Dr(i){switch(i){case sr.cbc:return"AES-CBC";case sr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${i}`)}}const gr=16;class Ar{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(r){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Gt(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r,n){return this.useSoftware?new Promise((s,A)=>{const a=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(a,t,r,n);const l=this.flush();l?s(l.buffer):A(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r,n)}softwareDecrypt(e,t,r,n){const{currentIV:s,currentResult:A,remainderData:a}=this;if(n!==sr.cbc||t.byteLength!==16)return ie.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),a&&(e=Xe(a,e),this.remainderData=null);const l=this.getValidChunk(e);if(!l.length)return null;s&&(r=s);let o=this.softwareDecrypter;o||(o=this.softwareDecrypter=new mr),o.expandKey(t);const h=A;return this.currentResult=o.decrypt(l.buffer,0,r),this.currentIV=l.slice(-16).buffer,h||null}webCryptoDecrypt(e,t,r,n){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r,n));this.key=t,this.fastAesKey=new pr(this.subtle,t,n)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new nr(this.subtle,new Uint8Array(r),n).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(ie.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,r,n)))}onWebCryptoError(e,t,r,n){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,n);const A=this.flush();if(A)return A.buffer}throw new Error("WebCrypto"+(s?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%gr;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t}logOnce(e){this.logEnabled&&(ie.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Pr=Math.pow(2,17);class Br{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const r=e.url;if(!r)return Promise.reject(new kr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,s=n.fLoader,A=n.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(E=>E[0]==="GAP")){l(Yr(e));return}else e.gap=!1;const o=this.loader=s?new s(n):new A(n),h=Qr(e);e.loader=o;const d=et(n.fragLoadPolicy.default),g={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Pr};e.stats=o.stats;const v={onSuccess:(E,T,F,J)=>{this.resetLoader(e,o);let ce=E.data;F.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(ce.slice(0,16)),ce=ce.slice(16)),a({frag:e,part:null,payload:ce,networkDetails:J})},onError:(E,T,F,J)=>{this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:C({url:r,data:void 0},E),error:new Error(`HTTP Error ${E.code} ${E.text}`),networkDetails:F,stats:J}))},onAbort:(E,T,F)=>{this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:F,stats:E}))},onTimeout:(E,T,F)=>{this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${g.timeout}ms`),networkDetails:F,stats:E}))}};t&&(v.onProgress=(E,T,F,J)=>t({frag:e,part:null,payload:F,networkDetails:J})),o.load(h,g,v)})}loadPart(e,t,r){this.abort();const n=this.config,s=n.fLoader,A=n.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){l(Yr(e,t));return}const o=this.loader=s?new s(n):new A(n),h=Qr(e,t);e.loader=o;const d=et(n.fragLoadPolicy.default),g={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Pr};t.stats=o.stats,o.load(h,g,{onSuccess:(v,E,T,F)=>{this.resetLoader(e,o),this.updateStatsFromPart(e,t);const J={frag:e,part:t,payload:v.data,networkDetails:F};r(J),a(J)},onError:(v,E,T,F)=>{this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:C({url:h.url,data:void 0},v),error:new Error(`HTTP Error ${v.code} ${v.text}`),networkDetails:T,stats:F}))},onAbort:(v,E,T)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:T,stats:v}))},onTimeout:(v,E,T)=>{this.resetLoader(e,o),l(new kr({type:he.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${g.timeout}ms`),networkDetails:T,stats:v}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,s=n.total;if(r.loaded+=n.loaded,s){const l=Math.round(e.duration/t.duration),o=Math.min(Math.round(r.loaded/s),l),d=(l-o)*Math.round(r.loaded/o);r.total=r.loaded+d}else r.total=Math.max(r.loaded,r.total);const A=r.loading,a=n.loading;A.start?A.first+=a.first-a.start:(A.start=a.start,A.first=a.first),A.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Qr(i,e=null){const t=e||i,r={frag:i,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,s=t.byteRangeEndOffset;if(V(n)&&V(s)){var A;let a=n,l=s;if(i.sn==="initSegment"&&tn((A=i.decryptdata)==null?void 0:A.method)){const o=s-n;o%16&&(l=s+(16-o%16)),n!==0&&(r.resetIV=!0,a=n-16)}r.rangeStart=a,r.rangeEnd=l}return r}function Yr(i,e){const t=new Error(`GAP ${i.gap?"tag":"attribute"} found`),r={type:he.MEDIA_ERROR,details:W.FRAG_GAP,fatal:!1,frag:i,error:t,networkDetails:null};return e&&(r.part=e),(e||i).stats.aborted=!0,new kr(r)}function tn(i){return i==="AES-128"||i==="AES-256"}class kr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Vr extends M{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Fr{constructor(e,t,r,n=0,s=-1,A=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=Nr(),this.buffering={audio:Nr(),video:Nr(),audiovideo:Nr()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=s,this.partial=A}}function Nr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Wr={length:0,start:()=>0,end:()=>0};class ur{static isBuffered(e,t){if(e){const r=ur.getBuffered(e);for(let n=r.length;n--;)if(t>=r.start(n)&&t<=r.end(n))return!0}return!1}static bufferedRanges(e){if(e){const t=ur.getBuffered(e);return ur.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}static bufferInfo(e,t,r){if(e){const n=ur.bufferedRanges(e);if(n.length)return ur.bufferedInfo(n,t,r)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.length>1&&e.sort((h,d)=>h.start-d.start||d.end-h.end);let n=-1,s=[];if(r)for(let h=0;h<e.length;h++){t>=e[h].start&&t<=e[h].end&&(n=h);const d=s.length;if(d){const g=s[d-1].end;e[h].start-g<r?e[h].end>g&&(s[d-1].end=e[h].end):s.push(e[h])}else s.push(e[h])}else s=e;let A=0,a,l=t,o=t;for(let h=0;h<s.length;h++){const d=s[h].start,g=s[h].end;if(n===-1&&t>=d&&t<=g&&(n=h),t+r>=d&&t<g)l=d,o=g,A=o-t;else if(t+r<d){a=d;break}}return{len:A,start:l||0,end:o||0,nextStart:a,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||Wr}catch(t){return ie.log("failed to get media.buffered",t),Wr}}}const qr=/\{\$([a-zA-Z0-9-_]+)\}/g;function Jr(i){return qr.test(i)}function sn(i,e){if(i.variableList!==null||i.hasVariableRefs){const t=i.variableList;return e.replace(qr,r=>{const n=r.substring(2,r.length-1),s=t==null?void 0:t[n];return s===void 0?(i.playlistParsingError||(i.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):s})}return e}function cn(i,e,t){let r=i.variableList;r||(i.variableList=r={});let n,s;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const A=new self.URL(t).searchParams;if(A.has(n))s=A.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(A){i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${A.message}`))}}else n=e.NAME,s=e.VALUE;n in r?i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=s||""}function rn(i,e,t){const r=e.IMPORT;if(t&&r in t){let n=i.variableList;n||(i.variableList=n={}),n[r]=t[r]}else i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const Tn=/^(\d+)x(\d+)$/,Qn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class $r{constructor(e,t){typeof e=="string"&&(e=$r.parseAttrList(e,t)),y(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const r=new Uint8Array(t.length/2);for(let n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(n*2,n*2+2),16);return r}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const r=this[e];return r?parseFloat(r):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((n,s)=>(n[s.toLowerCase()]=!0,n),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Tn.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let r;const n={},s='"';for(Qn.lastIndex=0;(r=Qn.exec(e))!==null;){const A=r[1].trim();let a=r[2];const l=a.indexOf(s)===0&&a.lastIndexOf(s)===a.length-1;let o=!1;if(l)a=a.slice(1,-1);else switch(A){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":o=!0}if(t&&(l||o))a=sn(t,a);else if(!o&&!l)switch(A){case"CLOSED-CAPTIONS":if(a==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":ie.warn(`${e}: attribute ${A} is missing quotes`)}n[A]=a}return n}}const Xn="com.apple.hls.interstitial";function ri(i){return i!=="ID"&&i!=="CLASS"&&i!=="CUE"&&i!=="START-DATE"&&i!=="DURATION"&&i!=="END-DATE"&&i!=="END-ON-NEXT"}function $n(i){return i==="SCTE35-OUT"||i==="SCTE35-IN"||i==="SCTE35-CMD"}class Sn{constructor(e,t,r=0){var n;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(n=t==null?void 0:t.tagOrder)!=null?n:r,t){const s=t.attr;for(const A in s)if(Object.prototype.hasOwnProperty.call(e,A)&&e[A]!==s[A]){ie.warn(`DATERANGE tag attribute: "${A}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=A;break}e=y(new $r({}),s,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const s=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);V(s.getTime())&&(this._endDate=s)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(ie.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(V(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===Xn}get isValid(){return!!this.id&&!this._badValueForSameId&&V(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Wn=10;class li{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?V(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Wn}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let r=e.length;r--;)if(e[r].index>t)return e[r].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Zn(i){return i==="AES-128"||i==="AES-256"||i==="AES-256-CTR"}function di(i){switch(i){case"AES-128":case"AES-256":return sr.cbc;case"AES-256-CTR":return sr.ctr;default:throw new Error(`invalid full segment method ${i}`)}}function zn(i){return Uint8Array.from(atob(i),e=>e.charCodeAt(0))}function ni(i){return Uint8Array.from(unescape(encodeURIComponent(i)),e=>e.charCodeAt(0))}function Rn(i){const e=ni(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Jn(i){const e=function(r,n,s){const A=r[n];r[n]=r[s],r[s]=A};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function Ci(i){const e=i.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),n=r[r.length-1].split(",");if(n.length===2){const s=n[0]==="base64",A=n[1];s?(r.splice(-1,1),t=zn(A)):t=Rn(A)}}return t}const bn=typeof self!="undefined"?self:void 0;var Cr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},An={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Mn(i){switch(i){case An.FAIRPLAY:return Cr.FAIRPLAY;case An.PLAYREADY:return Cr.PLAYREADY;case An.WIDEVINE:return Cr.WIDEVINE;case An.CLEARKEY:return Cr.CLEARKEY}}var Yn={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function gi(i){if(i===Yn.WIDEVINE)return Cr.WIDEVINE;if(i===Yn.PLAYREADY)return Cr.PLAYREADY;if(i===Yn.CENC||i===Yn.CLEARKEY)return Cr.CLEARKEY}function pi(i){switch(i){case Cr.FAIRPLAY:return An.FAIRPLAY;case Cr.PLAYREADY:return An.PLAYREADY;case Cr.WIDEVINE:return An.WIDEVINE;case Cr.CLEARKEY:return An.CLEARKEY}}function qn(i){const{drmSystems:e,widevineLicenseUrl:t}=i,r=e?[Cr.FAIRPLAY,Cr.WIDEVINE,Cr.PLAYREADY,Cr.CLEARKEY].filter(n=>!!e[n]):[];return!r[Cr.WIDEVINE]&&t&&r.push(Cr.WIDEVINE),r}const ei=function(i){return bn!=null&&(i=bn.navigator)!=null&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Ot(i,e,t,r){let n;switch(i){case Cr.FAIRPLAY:n=["cenc","sinf"];break;case Cr.WIDEVINE:case Cr.PLAYREADY:n=["cenc"];break;case Cr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${i}`)}return Sr(n,e,t,r)}function Sr(i,e,t,r){return[{initDataTypes:i,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function an(i){var e;return i.sessionType==="persistent-license"||!!((e=i.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function gn(i){const e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),A=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(A){const a=A.childNodes[0]?A.childNodes[0].nodeValue:A.getAttribute("VALUE");if(a){const l=zn(a).subarray(0,16);return Jn(l),l}}return null}let en={};class Ln{static clearKeyUriToKeyIdMap(){en={}}constructor(e,t,r,n=[1],s=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=r,this.keyFormatVersions=n,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Zn(e)}isSupported(){if(this.method){if(Zn(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case An.FAIRPLAY:case An.WIDEVINE:case An.PLAYREADY:case An.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Zn(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(ie.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=Ni(e);return new Ln(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=Ci(this.uri);if(t)switch(this.keyFormat){case An.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case An.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Ht(r,null,t),this.keyId=gn(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const n=new Uint8Array(16);n.set(r,16-r.length),r=n}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=en[this.uri];if(!r){const n=Object.keys(en).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,n),en[this.uri]=r}this.keyId=r}return this}}function Ni(i){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}const Un=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Bn=/#EXT-X-MEDIA:(.*)/g,Xs=/^#EXT(?:INF|-X-TARGETDURATION):/m,In=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Fs=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class kn{static findGroup(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.id===t)return n}}static resolve(e,t){return re.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Xs.test(e)}static parseMasterPlaylist(e,t){const r=Jr(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},s=[];Un.lastIndex=0;let A;for(;(A=Un.exec(e))!=null;)if(A[1]){var a;const o=new $r(A[1],n),h=sn(n,A[2]),d={attrs:o,bitrate:o.decimalInteger("BANDWIDTH")||o.decimalInteger("AVERAGE-BANDWIDTH"),name:o.NAME,url:kn.resolve(h,t)},g=o.decimalResolution("RESOLUTION");g&&(d.width=g.width,d.height=g.height),Xi(o.CODECS,d);const v=o["SUPPLEMENTAL-CODECS"];v&&(d.supplemental={},Xi(v,d.supplemental)),(a=d.unknownCodecs)!=null&&a.length||s.push(d),n.levels.push(d)}else if(A[3]){const o=A[3],h=A[4];switch(o){case"SESSION-DATA":{const d=new $r(h,n),g=d["DATA-ID"];g&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[g]=d);break}case"SESSION-KEY":{const d=Ki(h,t,n);d.encrypted&&d.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(d)):ie.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${h}"`);break}case"DEFINE":{{const d=new $r(h,n);cn(n,d,t)}break}case"CONTENT-STEERING":{const d=new $r(h,n);n.contentSteering={uri:kn.resolve(d["SERVER-URI"],t),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=Ss(h);break}}}const l=s.length>0&&s.length<n.levels.length;return n.levels=l?s:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const s={},A=r.levels,a={AUDIO:A.map(o=>({id:o.attrs.AUDIO,audioCodec:o.audioCodec})),SUBTITLES:A.map(o=>({id:o.attrs.SUBTITLES,textCodec:o.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(Bn.lastIndex=0;(n=Bn.exec(e))!==null;){const o=new $r(n[1],r),h=o.TYPE;if(h){const d=a[h],g=s[h]||[];s[h]=g;const v=o.LANGUAGE,E=o["ASSOC-LANGUAGE"],T=o.CHANNELS,F=o.CHARACTERISTICS,J=o["INSTREAM-ID"],ce={attrs:o,bitrate:0,id:l++,groupId:o["GROUP-ID"]||"",name:o.NAME||v||"",type:h,default:o.bool("DEFAULT"),autoselect:o.bool("AUTOSELECT"),forced:o.bool("FORCED"),lang:v,url:o.URI?kn.resolve(o.URI,t):""};if(E&&(ce.assocLang=E),T&&(ce.channels=T),F&&(ce.characteristics=F),J&&(ce.instreamId=J),d!=null&&d.length){const Ae=kn.findGroup(d,ce.groupId)||d[0];bi(ce,Ae,"audioCodec"),bi(ce,Ae,"textCodec")}g.push(ce)}}return s}static parseLevelPlaylist(e,t,r,n,s,A){var a;const l={url:t},o=new li(t),h=o.fragments,d=[];let g=null,v=0,E=0,T=0,F=0,J=0,ce=null,Ae=new $e(n,l),de,Te,He,xe=-1,Ne=!1,je=null,Oe;if(In.lastIndex=0,o.m3u8=e,o.hasVariableRefs=Jr(e),((a=In.exec(e))==null?void 0:a[0])!=="#EXTM3U")return o.playlistParsingError=new Error("Missing format identifier #EXTM3U"),o;for(;(de=In.exec(e))!==null;){Ne&&(Ne=!1,Ae=new $e(n,l),Ae.playlistOffset=T,Ae.start=T,Ae.sn=v,Ae.cc=F,J&&(Ae.bitrate=J),Ae.level=r,g&&(Ae.initSegment=g,g.rawProgramDateTime&&(Ae.rawProgramDateTime=g.rawProgramDateTime,g.rawProgramDateTime=null),je&&(Ae.setByteRange(je),je=null)));const jt=de[1];if(jt){Ae.duration=parseFloat(jt);const Jt=(" "+de[2]).slice(1);Ae.title=Jt||null,Ae.tagList.push(Jt?["INF",jt,Jt]:["INF",jt])}else if(de[3]){if(V(Ae.duration)){Ae.playlistOffset=T,Ae.start=T,He&&jn(Ae,He,o),Ae.sn=v,Ae.level=r,Ae.cc=F,h.push(Ae);const Jt=(" "+de[3]).slice(1);Ae.relurl=sn(o,Jt),qi(Ae,ce,d),ce=Ae,T+=Ae.duration,v++,E=0,Ne=!0}}else{if(de=de[0].match(Fs),!de){ie.warn("No matches on slow regex match for level playlist!");continue}for(Te=1;Te<de.length&&de[Te]===void 0;Te++);const Jt=(" "+de[Te]).slice(1),Vt=(" "+de[Te+1]).slice(1),rr=de[Te+2]?(" "+de[Te+2]).slice(1):null;switch(Jt){case"BYTERANGE":ce?Ae.setByteRange(Vt,ce):Ae.setByteRange(Vt);break;case"PROGRAM-DATE-TIME":Ae.rawProgramDateTime=Vt,Ae.tagList.push(["PROGRAM-DATE-TIME",Vt]),xe===-1&&(xe=h.length);break;case"PLAYLIST-TYPE":o.type&&Nn(o,Jt,de),o.type=Vt.toUpperCase();break;case"MEDIA-SEQUENCE":o.startSN!==0?Nn(o,Jt,de):h.length>0&&mi(o,Jt,de),v=o.startSN=parseInt(Vt);break;case"SKIP":{o.skippedSegments&&Nn(o,Jt,de);const or=new $r(Vt,o),Lt=or.decimalInteger("SKIPPED-SEGMENTS");if(V(Lt)){o.skippedSegments+=Lt;for(let xr=Lt;xr--;)h.push(null);v+=Lt}const Mt=or.enumeratedString("RECENTLY-REMOVED-DATERANGES");Mt&&(o.recentlyRemovedDateranges=(o.recentlyRemovedDateranges||[]).concat(Mt.split(" ")));break}case"TARGETDURATION":o.targetduration!==0&&Nn(o,Jt,de),o.targetduration=Math.max(parseInt(Vt),1);break;case"VERSION":o.version!==null&&Nn(o,Jt,de),o.version=parseInt(Vt);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":o.live||Nn(o,Jt,de),o.live=!1;break;case"#":(Vt||rr)&&Ae.tagList.push(rr?[Vt,rr]:[Vt]);break;case"DISCONTINUITY":F++,Ae.tagList.push(["DIS"]);break;case"GAP":Ae.gap=!0,Ae.tagList.push([Jt]);break;case"BITRATE":Ae.tagList.push([Jt,Vt]),J=parseInt(Vt)*1e3,V(J)?Ae.bitrate=J:J=0;break;case"DATERANGE":{const or=new $r(Vt,o),Lt=new Sn(or,o.dateRanges[or.ID],o.dateRangeTagCount);o.dateRangeTagCount++,Lt.isValid||o.skippedSegments?o.dateRanges[Lt.id]=Lt:ie.warn(`Ignoring invalid DATERANGE tag: "${Vt}"`),Ae.tagList.push(["EXT-X-DATERANGE",Vt]);break}case"DEFINE":{{const or=new $r(Vt,o);"IMPORT"in or?rn(o,or,A):cn(o,or,t)}break}case"DISCONTINUITY-SEQUENCE":o.startCC!==0?Nn(o,Jt,de):h.length>0&&mi(o,Jt,de),o.startCC=F=parseInt(Vt);break;case"KEY":{const or=Ki(Vt,t,o);if(or.isSupported()){if(or.method==="NONE"){He=void 0;break}He||(He={}),He[or.keyFormat]&&(He=y({},He)),He[or.keyFormat]=or}else ie.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Vt}"`);break}case"START":o.startTimeOffset=Ss(Vt);break;case"MAP":{const or=new $r(Vt,o);if(Ae.duration){const Lt=new $e(n,l);Ts(Lt,or,r,He),g=Lt,Ae.initSegment=g,g.rawProgramDateTime&&!Ae.rawProgramDateTime&&(Ae.rawProgramDateTime=g.rawProgramDateTime)}else{const Lt=Ae.byteRangeEndOffset;if(Lt){const Mt=Ae.byteRangeStartOffset;je=`${Lt-Mt}@${Mt}`}else je=null;Ts(Ae,or,r,He),g=Ae,Ne=!0}g.cc=F;break}case"SERVER-CONTROL":{Oe&&Nn(o,Jt,de),Oe=new $r(Vt),o.canBlockReload=Oe.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=Oe.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&Oe.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=Oe.optionalFloat("PART-HOLD-BACK",0),o.holdBack=Oe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{o.partTarget&&Nn(o,Jt,de);const or=new $r(Vt);o.partTarget=or.decimalFloatingPoint("PART-TARGET");break}case"PART":{let or=o.partList;or||(or=o.partList=[]);const Lt=E>0?or[or.length-1]:void 0,Mt=E++,xr=new $r(Vt,o),br=new qe(xr,Ae,l,Mt,Lt);or.push(br),Ae.duration+=br.duration;break}case"PRELOAD-HINT":{const or=new $r(Vt,o);o.preloadHint=or;break}case"RENDITION-REPORT":{const or=new $r(Vt,o);o.renditionReports=o.renditionReports||[],o.renditionReports.push(or);break}default:ie.warn(`line parsed but not handled: ${de}`);break}}}ce&&!ce.relurl?(h.pop(),T-=ce.duration,o.partList&&(o.fragmentHint=ce)):o.partList&&(qi(Ae,ce,d),Ae.cc=F,o.fragmentHint=Ae,He&&jn(Ae,He,o)),o.targetduration||(o.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const gt=h.length,Pt=h[0],hr=h[gt-1];if(T+=o.skippedSegments*o.targetduration,T>0&&gt&&hr){o.averagetargetduration=T/gt;const jt=hr.sn;o.endSN=jt!=="initSegment"?jt:0,o.live||(hr.endList=!0),Pt&&o.startCC===void 0&&(o.startCC=Pt.cc),xe>0&&(Ji(h,xe),Pt&&d.unshift(Pt))}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(T+=o.fragmentHint.duration),o.totalduration=T,d.length&&o.dateRangeTagCount&&Pt&&Hi(d,o),o.endCC=F,o}}function Hi(i,e){const t=i.length;if(!t)return;const r=i[t-1],n=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let A=s.length;A--;){const a=e.dateRanges[s[A]],l=a.startDate.getTime();a.tagAnchor=r.ref;for(let o=t;o--;){const h=pn(e,l,i,o,n);if(h!==-1){a.tagAnchor=e.fragments[h].ref;break}}}}function pn(i,e,t,r,n){const s=t[r];if(s){const a=s.programDateTime;if(e>=a||r===0){var A;const l=(((A=t[r+1])==null?void 0:A.start)||n)-s.start;if(e<=a+l*1e3){const o=t[r].sn-i.startSN,h=i.fragments;if(h.length>t.length){const g=(t[r+1]||h[h.length-1]).sn-i.startSN;for(let v=g;v>o;v--){const E=h[v].programDateTime;if(e>=E&&e<E+h[v].duration*1e3)return v}}return o}}}return-1}function Ki(i,e,t){var r,n;const s=new $r(i,t),A=(r=s.METHOD)!=null?r:"",a=s.URI,l=s.hexadecimalInteger("IV"),o=s.KEYFORMATVERSIONS,h=(n=s.KEYFORMAT)!=null?n:"identity";a&&s.IV&&!l&&ie.error(`Invalid IV: ${s.IV}`);const d=a?kn.resolve(a,e):"",g=(o||"1").split("/").map(Number).filter(Number.isFinite);return new Ln(A,d,h,g,l)}function Ss(i){const t=new $r(i).decimalFloatingPoint("TIME-OFFSET");return V(t)?t:null}function Xi(i,e){let t=(i||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(s=>er(s,r));n.length&&(e[`${r}Codec`]=n.map(s=>s.split("/")[0]).join(","),t=t.filter(s=>n.indexOf(s)===-1))}),e.unknownCodecs=t}function bi(i,e,t){const r=e[t];r&&(i[t]=r)}function Ji(i,e){let t=i[e];for(let r=e;r--;){const n=i[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function qi(i,e,t){i.rawProgramDateTime?t.push(i):e!=null&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime)}function Ts(i,e,t,r){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",r&&(i.levelkeys=r),i.initSegment=null}function jn(i,e,t){i.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(i)}function Nn(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function mi(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Dn(i,e){const t=e.startPTS;if(V(t)){let r=0,n;e.sn>i.sn?(r=t-i.start,n=i):(r=i.start-t,n=e),n.duration!==r&&n.setDuration(r)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.setStart(i.start+(i.minEndPTS-i.start)):e.setStart(i.start+i.duration):e.setStart(Math.max(i.start-e.duration,0))}function xi(i,e,t,r,n,s){r-t<=0&&(ie.warn("Fragment should have a positive duration",e),r=t+e.duration,s=n+e.duration);let a=t,l=r;const o=e.startPTS,h=e.endPTS;if(V(o)){const F=Math.abs(o-t);V(e.deltaPTS)?e.deltaPTS=Math.max(F,e.deltaPTS):e.deltaPTS=F,a=Math.max(t,o),t=Math.min(t,o),n=Math.min(n,e.startDTS),l=Math.min(r,h),r=Math.max(r,h),s=Math.max(s,e.endDTS)}const d=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(r-e.start),e.startPTS=t,e.maxStartPTS=a,e.startDTS=n,e.endPTS=r,e.minEndPTS=l,e.endDTS=s;const g=e.sn;if(!i||g<i.startSN||g>i.endSN)return 0;let v;const E=g-i.startSN,T=i.fragments;for(T[E]=e,v=E;v>0;v--)Dn(T[v],T[v-1]);for(v=E;v<T.length-1;v++)Dn(T[v],T[v+1]);return i.fragmentHint&&Dn(T[T.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,d}function Js(i,e){if(i===e)return;let t=null;const r=i.fragments;for(let o=r.length-1;o>=0;o--){const h=r[o].initSegment;if(h){t=h;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;let n;$i(i,e,(o,h,d,g)=>{if((!e.startCC||e.skippedSegments)&&h.cc!==o.cc){const v=o.cc-h.cc;for(let E=d;E<g.length;E++)g[E].cc+=v;e.endCC=g[g.length-1].cc}V(o.startPTS)&&V(o.endPTS)&&(h.setStart(h.startPTS=o.startPTS),h.startDTS=o.startDTS,h.maxStartPTS=o.maxStartPTS,h.endPTS=o.endPTS,h.endDTS=o.endDTS,h.minEndPTS=o.minEndPTS,h.setDuration(o.endPTS-o.startPTS),h.duration&&(n=h),e.PTSKnown=e.alignedSliding=!0),o.hasStreams&&(h.elementaryStreams=o.elementaryStreams),h.loader=o.loader,o.hasStats&&(h.stats=o.stats),o.initSegment&&(h.initSegment=o.initSegment,t=o.initSegment)});const s=e.fragments,A=e.fragmentHint?s.concat(e.fragmentHint):s;if(t&&A.forEach(o=>{var h;o&&(!o.initSegment||o.initSegment.relurl===((h=t)==null?void 0:h.relurl))&&(o.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(o=>!o),e.deltaUpdateFailed){ie.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let o=e.skippedSegments;o--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=qs(i.dateRanges,e));const o=i.fragments.filter(h=>h.rawProgramDateTime);if(i.hasProgramDateTime&&!e.hasProgramDateTime)for(let h=1;h<A.length;h++)A[h].programDateTime===null&&qi(A[h],A[h-1],o);Hi(o,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var a;const o=Is(i,e.startSN-1);e.startCC=(a=o==null?void 0:o.cc)!=null?a:s[0].cc}ls(i.partList,e.partList,(o,h)=>{h.elementaryStreams=o.elementaryStreams,h.stats=o.stats}),n?xi(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):Gi(i,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const o=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=o),e.driftEndTime=l,e.driftEnd=o}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=i.requestScheduled)}function qs(i,e){const{dateRanges:t,recentlyRemovedDateranges:r}=e,n=y({},i);r&&r.forEach(a=>{delete n[a]});const A=Object.keys(n).length;return A&&Object.keys(t).forEach(a=>{const l=n[a],o=new Sn(t[a].attr,l);o.isValid?(n[a]=o,l||(o.tagOrder+=A)):ie.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Kr(t[a].attr)}"`)}),n}function ls(i,e,t){if(i&&e){let r=0;for(let n=0,s=i.length;n<=s;n++){const A=i[n],a=e[n+r];A&&a&&A.index===a.index&&A.fragment.sn===a.fragment.sn?t(A,a):r--}}}function $i(i,e,t){const r=e.skippedSegments,n=Math.max(i.startSN,e.startSN)-e.startSN,s=(i.fragmentHint?1:0)+(r?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,A=e.startSN-i.startSN,a=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;for(let o=n;o<=s;o++){const h=l[A+o];let d=a[o];if(r&&!d&&h&&(d=e.fragments[o]=h),h&&d){if(t(h,d,o,a),h.url&&h.url!==d.url){e.playlistParsingError=us(`media sequence mismatch ${d.sn}:`,i,e,h,d);return}else if(h.cc!==d.cc){e.playlistParsingError=us(`discontinuity sequence mismatch (${h.cc}!=${d.cc})`,i,e,h,d);return}}}}function us(i,e,t,r,n){return new Error(`${i} ${n.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function Gi(i,e,t=!0){const r=e.startSN+e.skippedSegments-i.startSN,n=i.fragments,s=r>=0;let A=0;if(s&&r<n.length)A=n[r].start;else if(s&&e.startSN===i.endSN+1)A=i.fragmentEnd;else if(s&&t)A=i.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)A=i.fragmentStart;else return;ui(e,A)}function ui(i,e){if(e){const t=i.fragments;for(let r=i.skippedSegments;r<t.length;r++)t[r].addStart(e);i.fragmentHint&&i.fragmentHint.addStart(e)}}function eA(i,e=1/0){let t=1e3*i.targetduration;if(i.updated){const r=i.fragments;if(r.length&&t*4>e){const s=r[r.length-1].duration*1e3;s<t&&(t=s)}}else t/=2;return Math.round(t)}function Is(i,e,t){if(!i)return null;let r=i.fragments[e-i.startSN];return r||(r=i.fragmentHint,r&&r.sn===e)?r:e<i.startSN&&t&&t.sn===e?t:null}function Ii(i,e,t){return i?Ds(i.partList,e,t):null}function Ds(i,e,t){if(i)for(let r=i.length;r--;){const n=i[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function tA(i){i.forEach((e,t)=>{var r;(r=e.details)==null||r.fragments.forEach(n=>{n.level=t,n.initSegment&&(n.initSegment.level=t)})})}function es(i,e){for(let r=0,n=i.length;r<n;r++){var t;if(((t=i[r])==null?void 0:t.cc)===e)return i[r]}return null}function ii(i,e){return!!(i&&e.startCC<i.endCC&&e.endCC>i.startCC)}function Ls(i,e){if(i){const t=i.start+e;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function rA(i,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Ls(t[r],i);e.fragmentHint&&Ls(e.fragmentHint,i),e.alignedSliding=!0}function GA(i,e){i&&(ts(e,i),!e.alignedSliding&&i&&cs(e,i),!e.alignedSliding&&i&&!e.skippedSegments&&Gi(i,e,!1))}function ts(i,e){if(!ii(e,i))return;const t=Math.min(e.endCC,i.endCC),r=es(e.fragments,t),n=es(i.fragments,t);if(!r||!n)return;ie.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const s=r.start-n.start;rA(s,i)}function cs(i,e){if(!i.hasProgramDateTime||!e.hasProgramDateTime)return;const t=i.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,s;const A=Math.min(e.endCC,i.endCC);e.startCC<A&&i.startCC<A&&(n=es(r,A),s=es(t,A)),(!n||!s)&&(n=r[Math.floor(r.length/2)],s=es(t,n.cc)||t[Math.floor(t.length/2)]);const a=n.programDateTime,l=s.programDateTime;if(!a||!l)return;const o=(l-a)/1e3-(s.start-n.start);rA(o,i)}const En={toString:function(i){let e="";const t=i.length;for(let r=0;r<t;r++)e+=`[${i.start(r).toFixed(3)}-${i.end(r).toFixed(3)}]`;return e}},nt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class mn extends Vr{constructor(e,t,r,n,s){super(n,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=nt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:A,fragCurrent:a,media:l,mediaBuffer:o,state:h}=this,d=l?l.currentTime:0,g=ur.bufferInfo(o||l,d,A.maxBufferHole);if(this.log(`media seeking to ${V(d)?d.toFixed(3):d}, state: ${h}`),this.state===nt.ENDED)this.resetLoadingState();else if(a){const v=A.maxFragLookUpTolerance,E=a.start-v,T=a.start+a.duration+v;if(!g.len||T<g.start||E>g.end){const F=d>T;(d<E||F)&&(F&&a.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(l){this.fragmentTracker.removeFragmentsInRange(d,1/0,this.playlistType,!0);const v=this.lastCurrentTime;if(d>v&&(this.lastCurrentTime=d),!this.loadingParts){const E=Math.max(g.end,d),T=this.shouldLoadParts(this.getLevelDetails(),E);T&&(this.log(`LL-Part loading ON after seeking to ${d.toFixed(2)} with buffer @${E.toFixed(2)}`),this.loadingParts=T)}}!this.hls.hasEnoughToStart&&!g.len&&(this.log(`setting startPosition to ${d} because of seek before start`),this.nextLoadPosition=this.startPosition=d),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new Br(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Ar(e.config)}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===nt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=nt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const r=e.end||0,n=this.config.timelineOffset||0;if(r<=n)return!1;const s=e.buffered;this.config.maxBufferHole&&s&&s.length>1&&(e=ur.bufferedInfo(s,e.start,0));const A=e.nextStart;if(A&&A>n&&A<t.edge||this.media.currentTime<e.start)return!1;const l=t.partList;if(l!=null&&l.length){const h=l[l.length-1];return ur.isBuffered(this.media,h.start+h.duration/2)}const o=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(o)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const r=this.media=this.mediaBuffer=t.media;r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),r.addEventListener("seeking",this.onMediaSeeking),r.addEventListener("ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===nt.STOPPED&&this.startLoad(n.startPosition)}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(n!==null){if(n.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=nt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,r){this.startFragRequested=!0,this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const n=s=>{const A=s.frag;if(this.fragContextChanged(A)){this.warn(`${A.type} sn: ${A.sn}${s.part?" part: "+s.part.index:""} of ${this.fragInfo(A,!1,s.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(A);return}A.stats.chunkCount++,this._handleFragmentLoadProgress(s)};this._doFragLoad(e,t,r,n).then(s=>{if(!s)return;const A=this.state,a=s.frag;if(this.fragContextChanged(a)){(A===nt.FRAG_LOADING||!this.fragCurrent&&A===nt.PARSING)&&(this.fragmentTracker.removeFragment(a),this.state=nt.IDLE);return}"payload"in s&&(this.log(`Loaded ${a.type} sn: ${a.sn} of ${this.playlistLabel()} ${a.level}`),this.hls.trigger(m.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===nt.STOPPED||this.state===nt.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===Rt.APPENDING){const s=e.type,A=this.getFwdBufferInfo(this.mediaBuffer,s),a=Math.max(e.duration,A?A.len:this.config.maxBufferLength),l=this.backtrackFragment;((l?e.sn-l.sn:0)===1||this.reduceMaxBufferLength(a,e.duration))&&r.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===Rt.PARTIAL&&r.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(m.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{const n=r==null?void 0:r.frag;if(!n||this.fragContextChanged(n)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{frag:s,payload:A}=r,a=s.decryptdata;if(A&&A.byteLength>0&&a!=null&&a.key&&a.iv&&Zn(a.method)){const l=self.performance.now();return this.decrypter.decrypt(new Uint8Array(A),a.key.buffer,a.iv.buffer,di(a.method)).catch(o=>{throw n.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:s}),o}).then(o=>{const h=self.performance.now();return n.trigger(m.FRAG_DECRYPTED,{frag:s,payload:o,stats:{tstart:l,tdecrypt:h}}),r.payload=o,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===nt.STOPPED||this.state===nt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state!==nt.STOPPED&&(this.state=nt.IDLE),e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const r=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${r?En.toString(ur.getBuffered(r)):"(detached)"})`),ae(e)){var n;if(e.type!==O.SUBTITLE){const A=e.elementaryStreams;if(!Object.keys(A).some(a=>!!A[a])){this.state=nt.IDLE;return}}const s=(n=this.levels)==null?void 0:n[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=nt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:s}=e,A=!s||s.length===0||s.some(l=>!l),a=new Fr(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!A);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var s;this.fragCurrent=e;const A=t==null?void 0:t.details;if(!this.levels||!A)throw new Error(`frag load aborted, missing level${A?"":" detail"}s`);let a=null;e.encrypted&&!((s=e.decryptdata)!=null&&s.key)?(this.log(`Loading key for ${e.sn} of [${A.startSN}-${A.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=nt.KEY_LOADING,this.fragCurrent=e,a=this.keyLoader.load(e).then(d=>{if(!this.fragContextChanged(d.frag))return this.hls.trigger(m.KEY_LOADED,d),this.state===nt.KEY_LOADING&&(this.state=nt.IDLE),d}),this.hls.trigger(m.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(a=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):e.encrypted||(a=this.keyLoader.loadClear(e,A.encryptedFragments),a&&this.log("[eme] blocking frag load until media-keys acquired"));const l=this.fragPrevious;if(ae(e)&&(!l||e.sn!==l.sn)){const d=this.shouldLoadParts(t.details,e.end);d!==this.loadingParts&&(this.log(`LL-Part loading ${d?"ON":"OFF"} loading sn ${l==null?void 0:l.sn}->${e.sn}`),this.loadingParts=d)}if(r=Math.max(e.start,r||0),this.loadingParts&&ae(e)){const d=A.partList;if(d&&n){r>e.end&&A.fragmentHint&&(e=A.fragmentHint);const g=this.getNextPart(d,e,r);if(g>-1){const v=d[g];e=this.fragCurrent=v.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${v.index} (${g}/${d.length-1}) of ${this.fragInfo(e,!1,v)}) cc: ${e.cc} [${A.startSN}-${A.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=v.start+v.duration,this.state=nt.FRAG_LOADING;let E;return a?E=a.then(T=>!T||this.fragContextChanged(T.frag)?null:this.doFragPartsLoad(e,v,t,n)).catch(T=>this.handleFragLoadError(T)):E=this.doFragPartsLoad(e,v,t,n).catch(T=>this.handleFragLoadError(T)),this.hls.trigger(m.FRAG_LOADING,{frag:e,part:v,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):E}else if(!e.url||this.loadedEndOfParts(d,r))return Promise.resolve(null)}}if(ae(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${A?"["+A.startSN+"-"+A.endSN+"]":""}, target: ${parseFloat(r.toFixed(3))}`),V(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=nt.FRAG_LOADING;const o=this.config.progressive;let h;return o&&a?h=a.then(d=>!d||this.fragContextChanged(d==null?void 0:d.frag)?null:this.fragmentLoader.load(e,n)).catch(d=>this.handleFragLoadError(d)):h=Promise.all([this.fragmentLoader.load(e,o?n:void 0),a]).then(([d])=>(!o&&d&&n&&n(d),d)).catch(d=>this.handleFragLoadError(d)),this.hls.trigger(m.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h}doFragPartsLoad(e,t,r,n){return new Promise((s,A)=>{var a;const l=[],o=(a=r.details)==null?void 0:a.partList,h=d=>{this.fragmentLoader.loadPart(e,d,n).then(g=>{l[d.index]=g;const v=g.part;this.hls.trigger(m.FRAG_LOADED,g);const E=Ii(r.details,e.sn,d.index+1)||Ds(o,e.sn,d.index+1);if(E)h(E);else return s({frag:e,part:v,partsLoaded:l})}).catch(A)};h(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===W.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(m.ERROR,t)}else this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==nt.PARSING){!this.fragCurrent&&this.state!==nt.STOPPED&&this.state!==nt.ERROR&&(this.state=nt.IDLE);return}const{frag:r,part:n,level:s}=t,A=self.performance.now();r.stats.parsing.end=A,n&&(n.stats.parsing.end=A);const a=this.getLevelDetails(),o=a&&r.sn>a.endSN||this.shouldLoadParts(a,r.end);o!==this.loadingParts&&(this.log(`LL-Part loading ${o?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=o),this.updateLevelTiming(r,n,s,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var r;const s=e.partList[0],A=s.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(t>=A){var n;if((this.hls.hasEnoughToStart?((n=this.media)==null?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:s,part:A}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${n}. The current chunk will not be buffered.`),null;const a=t[n],l=a.details,o=A>-1?Ii(l,s,A):null,h=o?o.fragment:Is(l,s,r);return h?(r&&r!==h&&(h.stats=r.stats),{frag:h,part:o,level:a}):null}bufferFragmentData(e,t,r,n,s){var A;if(!e||this.state!==nt.PARSING)return;const{data1:a,data2:l}=e;let o=a;if(a&&l&&(o=Xe(a,l)),!((A=o)!=null&&A.length))return;const h={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:o};if(this.hls.trigger(m.BUFFER_APPENDING,h),e.dropped&&e.independent&&!r){if(s)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!ur.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=ur.bufferInfo(t,r,0),s=e.duration,A=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),a=Math.max(Math.min(e.start-A,n.end-A),r+A);e.start-a>A&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!V(n))return null;const A=this.lastCurrentTime>n||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,A)}getFwdBufferInfoAtPos(e,t,r,n){const s=ur.bufferInfo(e,t,n);if(s.len===0&&s.nextStart!==void 0){const A=this.fragmentTracker.getBufferedFrag(t,r);if(A&&(s.nextStart<=A.end||A.gap)){const a=Math.max(Math.min(s.nextStart,A.end)-t,n);return ur.bufferInfo(e,t,a)}}return s}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,n=Math.max(Math.min(e-t,r.maxBufferLength),t),s=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return s>=n?(r.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,t=O.MAIN){var r;const n=(r=this.fragmentTracker)==null?void 0:r.getAppendedFrag(e,t);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:s}=this,A=r[0].start,a=s.lowLatencyMode&&!!t.partList;let l=null;if(t.live){const d=s.initialLiveManifestSize;if(n<d)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${d})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<A){var o;a&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),l=this.getInitialLiveFragment(t);const g=this.hls.startPosition,v=this.hls.liveSyncPosition,E=l?(g!==-1&&g>=A?g:v)||l.start:e;this.log(`Setting startPosition to ${E} to match start frag at live edge. mainStart: ${g} liveSyncPosition: ${v} frag.start: ${(o=l)==null?void 0:o.start}`),this.startPosition=this.nextLoadPosition=E}}else e<=A&&(l=r[0]);if(!l){const d=this.loadingParts?t.partEnd:t.fragmentEnd;l=this.getFragmentAtPosition(e,d,t)}let h=this.filterReplacedPrimary(l,t);if(!h&&l){const d=l.sn-t.startSN;h=this.filterReplacedPrimary(r[d+1]||null,t)}return this.mapToInitFragWhenRequired(h)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===Rt.OK||r===Rt.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,s){let A=null;if(e.gap&&(A=this.getNextFragment(this.nextLoadPosition,t),A&&!A.gap&&r.nextStart)){const a=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(a!==null&&r.len+a.len>=s){const l=A.sn;return this.loopSn!==l&&(this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${l}`),this.loopSn=l),null}}return this.loopSn=void 0,A}get primaryPrefetch(){if(Gn(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Gn(this.hls.config)&&e.type!==O.SUBTITLE){const r=this.hls.interstitialsManager,n=r==null?void 0:r.bufferingItem;if(n){const A=n.event;if(A){if(A.appendInPlace||Math.abs(e.start-n.start)>1||n.start===0)return null}else if(e.end<=n.start&&(t==null?void 0:t.live)===!1||e.start>n.end&&n.nextEvent&&(n.nextEvent.appendInPlace||e.start-n.end>1))return null}const s=r==null?void 0:r.playerQueue;if(s)for(let A=s.length;A--;){const a=s[A].interstitial;if(a.appendInPlace&&e.start>=a.startTime&&e.end<=a.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,s=!1,A=!0;for(let a=0,l=e.length;a<l;a++){const o=e[a];if(A=A&&!o.independent,n>-1&&r<o.start)break;const h=o.loaded;h?n=-1:(s||o.independent||A)&&o.fragment===t&&(n=a),s=h}return n}loadedEndOfParts(e,t){const r=e[e.length-1];return r&&t>r.start&&r.loaded}getInitialLiveFragment(e){const t=e.fragments,r=this.fragPrevious;let n=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),n=Lr(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const s=r.sn+1;if(s>=e.startSN&&s<=e.endSN){const A=t[s-e.startSN];r.cc===A.cc&&(n=A,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=ne(e,r.cc,r.end),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(n=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:s}=this,{fragments:A,endSN:a}=r;const{fragmentHint:l}=r,{maxFragLookUpTolerance:o}=n,h=r.partList,d=!!(this.loadingParts&&h!=null&&h.length&&l);d&&l&&!this.bitrateTest&&h[h.length-1].fragment.sn===l.sn&&(A=A.concat(l),a=l.sn);let g;if(e<t){var v;const T=e<this.lastCurrentTime||e>t-o||(v=this.media)!=null&&v.paused||!this.startFragRequested?0:o;g=lr(s,A,e,T)}else g=A[A.length-1];if(g){const E=g.sn-r.startSN,T=this.fragmentTracker.getState(g);if((T===Rt.OK||T===Rt.PARTIAL&&g.gap)&&(s=g),s&&g.sn===s.sn&&(!d||h[0].fragment.sn>g.sn||!r.live&&!d)&&s&&g.level===s.level){const J=A[E+1];g.sn<a&&this.fragmentTracker.getState(J)!==Rt.OK?g=J:g=null}}return g}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,A=!t,a=e.alignedSliding&&V(s);if(A||!a&&!s){GA(r,e);const l=e.fragmentStart;return this.log(`Live playlist sliding: ${l.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${n}`),l}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;r<t&&(r=-1);const n=this.timelineOffset;if(r===-1){const s=this.startTimeOffset!==null,A=s?this.startTimeOffset:e.startTimeOffset;A!==null&&V(A)?(r=t+A,A<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${A} found in ${s?"multivariant":"media"} playlist`),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${r}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+n}this.nextLoadPosition=r+n}getLoadPosition(){var e;const{media:t}=this;let r=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?r=t.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&ae(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==nt.FRAG_LOADING_WAITING_RETRY)&&(this.state=nt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const E=this.getCurrentContext(t.chunkMeta);E&&(t.frag=E.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var n;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(n=this.fragCurrent)==null?void 0:n.url}`);return}const s=t.details===W.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const A=t.errorAction,{action:a,flags:l,retryCount:o=0,retryConfig:h}=A||{},d=!!A&&!!h,g=d&&a===lt.RetryRequest,v=d&&!A.resolved&&l===ve.MoveAllAlternatesMatchingHost;if(!g&&v&&ae(r)&&!r.endList)this.resetFragmentErrors(e),this.treatAsGap(r),A.resolved=!0;else if((g||v)&&o<h.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const E=Ke(h,o);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${o+1}/${h.maxNumRetry} in ${E}ms`),A.resolved=!0,this.retryDate=self.performance.now()+E,this.state=nt.FRAG_LOADING_WAITING_RETRY}else if(h&&A)if(this.resetFragmentErrors(e),o<h.maxNumRetry)!s&&a!==lt.RemoveAlternatePermanently&&(A.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${o})`);return}else a===lt.SendAlternateToPenaltyBox?this.state=nt.WAITING_LEVEL:this.state=nt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===nt.PARSING||this.state===nt.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),s=n&&n.len>.5;s&&this.reduceMaxBufferLength(n.len,(t==null?void 0:t.duration)||10);const A=!s;return A&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),A}return!1}resetFragmentErrors(e){e===O.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==nt.STOPPED&&(this.state=nt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=ur.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===nt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==nt.STOPPED&&(this.state=nt.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,n){const s=r.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((l,o)=>{const h=e.elementaryStreams[o];if(h){const d=h.endPTS-h.startPTS;if(d<=0)return this.warn(`Could not parse fragment ${e.sn} ${o} duration reliably (${d})`),l||!1;const g=n?0:xi(s,e,h.startPTS,h.endPTS,h.startDTS,h.endDTS);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:s,level:r,drift:g,type:o,frag:e,start:h.startPTS,end:h.endPTS}),!0}return l},!1)){var a;if(r.fragmentError===0&&this.treatAsGap(e,r),((a=this.transmuxer)==null?void 0:a.error)===null){const l=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(l.message),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:l,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=nt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(m.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===O.MAIN?"level":"track"}fragInfo(e,t=!0,r){var n,s;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((n=t&&!r?e.startPTS:(r||e).start)!=null?n:NaN).toFixed(3)}-${((s=t&&!r?e.endPTS:(r||e).end)!=null?s:NaN).toFixed(3)}]${r&&e.type==="main"?"INDEPENDENT="+(r.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Gn(i){return!!i.interstitialsController&&i.enableInterstitialPlayback!==!1}class Vn{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let r;if(e.length)e.length===1?r=e[0]:r=rs(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function rs(i,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<i.length;n++){const s=i[n];t.set(s,r),r+=s.length}return t}var Vi={exports:{}},Us;function nA(){return Us||(Us=1,function(i){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(l,o,h){this.fn=l,this.context=o,this.once=h||!1}function s(l,o,h,d,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new n(h,d||l,g),E=t?t+o:o;return l._events[E]?l._events[E].fn?l._events[E]=[l._events[E],v]:l._events[E].push(v):(l._events[E]=v,l._eventsCount++),l}function A(l,o){--l._eventsCount===0?l._events=new r:delete l._events[o]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var o=[],h,d;if(this._eventsCount===0)return o;for(d in h=this._events)e.call(h,d)&&o.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(h)):o},a.prototype.listeners=function(o){var h=t?t+o:o,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,v=d.length,E=new Array(v);g<v;g++)E[g]=d[g].fn;return E},a.prototype.listenerCount=function(o){var h=t?t+o:o,d=this._events[h];return d?d.fn?1:d.length:0},a.prototype.emit=function(o,h,d,g,v,E){var T=t?t+o:o;if(!this._events[T])return!1;var F=this._events[T],J=arguments.length,ce,Ae;if(F.fn){switch(F.once&&this.removeListener(o,F.fn,void 0,!0),J){case 1:return F.fn.call(F.context),!0;case 2:return F.fn.call(F.context,h),!0;case 3:return F.fn.call(F.context,h,d),!0;case 4:return F.fn.call(F.context,h,d,g),!0;case 5:return F.fn.call(F.context,h,d,g,v),!0;case 6:return F.fn.call(F.context,h,d,g,v,E),!0}for(Ae=1,ce=new Array(J-1);Ae<J;Ae++)ce[Ae-1]=arguments[Ae];F.fn.apply(F.context,ce)}else{var de=F.length,Te;for(Ae=0;Ae<de;Ae++)switch(F[Ae].once&&this.removeListener(o,F[Ae].fn,void 0,!0),J){case 1:F[Ae].fn.call(F[Ae].context);break;case 2:F[Ae].fn.call(F[Ae].context,h);break;case 3:F[Ae].fn.call(F[Ae].context,h,d);break;case 4:F[Ae].fn.call(F[Ae].context,h,d,g);break;default:if(!ce)for(Te=1,ce=new Array(J-1);Te<J;Te++)ce[Te-1]=arguments[Te];F[Ae].fn.apply(F[Ae].context,ce)}}return!0},a.prototype.on=function(o,h,d){return s(this,o,h,d,!1)},a.prototype.once=function(o,h,d){return s(this,o,h,d,!0)},a.prototype.removeListener=function(o,h,d,g){var v=t?t+o:o;if(!this._events[v])return this;if(!h)return A(this,v),this;var E=this._events[v];if(E.fn)E.fn===h&&(!g||E.once)&&(!d||E.context===d)&&A(this,v);else{for(var T=0,F=[],J=E.length;T<J;T++)(E[T].fn!==h||g&&!E[T].once||d&&E[T].context!==d)&&F.push(E[T]);F.length?this._events[v]=F.length===1?F[0]:F:A(this,v)}return this},a.prototype.removeAllListeners=function(o){var h;return o?(h=t?t+o:o,this._events[h]&&A(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,i.exports=a}(Vi)),Vi.exports}var ns=nA(),Ri=I(ns);const Qi="1.6.5",Di={};function Al(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Za(){const i=Di[Qi];if(i)return i.clientCount++,i;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),n={worker:new self.Worker(t),objectURL:t,clientCount:1};return Di[Qi]=n,n}function al(i){const e=Di[i];if(e)return e.clientCount++,e;const t=new self.URL(i,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Di[i]=n,n}function ol(i){const e=Di[i||Qi];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete Di[i||Qi],n&&self.URL.revokeObjectURL(n),r.terminate()}}function za(i,e){return e+10<=i.length&&i[e]===51&&i[e+1]===68&&i[e+2]===73&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function VA(i,e){return e+10<=i.length&&i[e]===73&&i[e+1]===68&&i[e+2]===51&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function iA(i,e){let t=0;return t=(i[e]&127)<<21,t|=(i[e+1]&127)<<14,t|=(i[e+2]&127)<<7,t|=i[e+3]&127,t}function Li(i,e){const t=e;let r=0;for(;VA(i,e);){r+=10;const n=iA(i,e+6);r+=n,za(i,e+10)&&(r+=10),e+=r}if(r>0)return i.subarray(t,t+r)}function ll(i,e,t,r){const n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=e[t+2],A=s>>2&15;if(A>12){const v=new Error(`invalid ADTS sampling index:${A}`);i.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!0,error:v,reason:v.message});return}const a=(s>>6&3)+1,l=e[t+3]>>6&3|(s&1)<<2,o="mp4a.40."+a,h=n[A];let d=A;(a===5||a===29)&&(d-=3);const g=[a<<3|(d&14)>>1,(d&1)<<7|l<<3];return ie.log(`manifest codec:${r}, parsed codec:${o}, channels:${l}, rate:${h} (ADTS object type:${a} sampling index:${A})`),{config:g,samplerate:h,channelCount:l,codec:o,parsedCodec:o,manifestCodec:r}}function Ya(i,e){return i[e]===255&&(i[e+1]&246)===240}function Rs(i,e){return i[e+1]&1?7:9}function WA(i,e){return(i[e+3]&3)<<11|i[e+4]<<3|(i[e+5]&224)>>>5}function ul(i,e){return e+5<i.length}function sA(i,e){return e+1<i.length&&Ya(i,e)}function cl(i,e){return ul(i,e)&&Ya(i,e)&&WA(i,e)<=i.length-e}function AA(i,e){if(sA(i,e)){const t=Rs(i,e);if(e+t>=i.length)return!1;const r=WA(i,e);if(r<=t)return!1;const n=e+r;return n===i.length||sA(i,n)}return!1}function ja(i,e,t,r,n){if(!i.samplerate){const s=ll(e,t,r,n);if(!s)return;y(i,s)}}function Xa(i){return 1024*9e4/i}function fl(i,e){const t=Rs(i,e);if(e+t<=i.length){const r=WA(i,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function Ja(i,e,t,r,n){const s=Xa(i.samplerate),A=r+n*s,a=fl(e,t);let l;if(a){const{frameLength:d,headerLength:g}=a,v=g+d,E=Math.max(0,t+v-e.length);E?(l=new Uint8Array(v-g),l.set(e.subarray(t+g,e.length),0)):l=e.subarray(t+g,t+v);const T={unit:l,pts:A};return E||i.samples.push(T),{sample:T,length:v,missing:E}}const o=e.length-t;return l=new Uint8Array(o),l.set(e.subarray(t,e.length),0),{sample:{unit:l,pts:A},length:o,missing:-1}}function aA(i,e){return VA(i,e)&&iA(i,e+6)+10<=i.length-e}function hl(i){return i instanceof ArrayBuffer?i:i.byteOffset==0&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function ZA(i,e=0,t=1/0){return dl(i,e,t,Uint8Array)}function dl(i,e,t,r){const n=gl(i);let s=1;"BYTES_PER_ELEMENT"in r&&(s=r.BYTES_PER_ELEMENT);const A=oA(i)?i.byteOffset:0,a=(A+i.byteLength)/s,l=(A+e)/s,o=Math.floor(Math.max(0,Math.min(l,a))),h=Math.floor(Math.min(o+Math.max(t,0),a));return new r(n,o,h-o)}function gl(i){return i instanceof ArrayBuffer?i:i.buffer}function oA(i){return i&&i.buffer instanceof ArrayBuffer&&i.byteLength!==void 0&&i.byteOffset!==void 0}function pl(i){const e={key:i.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(i.size<2)return;if(i.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const r=i.data.subarray(1).indexOf(0);if(r===-1)return;const n=Me(ZA(i.data,1,r)),s=i.data[2+r],A=i.data.subarray(3+r).indexOf(0);if(A===-1)return;const a=Me(ZA(i.data,3+r,A));let l;return n==="-->"?l=Me(ZA(i.data,4+r+A)):l=hl(i.data.subarray(4+r+A)),e.mimeType=n,e.pictureType=s,e.description=a,e.data=l,e}function ml(i){if(i.size<2)return;const e=Me(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}}function _l(i){if(i.size<2)return;if(i.type==="TXXX"){let t=1;const r=Me(i.data.subarray(t),!0);t+=r.length+1;const n=Me(i.data.subarray(t));return{key:i.type,info:r,data:n}}const e=Me(i.data.subarray(1));return{key:i.type,info:"",data:e}}function vl(i){if(i.type==="WXXX"){if(i.size<2)return;let t=1;const r=Me(i.data.subarray(t),!0);t+=r.length+1;const n=Me(i.data.subarray(t));return{key:i.type,info:r,data:n}}const e=Me(i.data);return{key:i.type,info:"",data:e}}function yl(i){return i.type==="PRIV"?ml(i):i.type[0]==="W"?vl(i):i.type==="APIC"?pl(i):_l(i)}function Bl(i){const e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=iA(i,4),r=10;return{type:e,size:t,data:i.subarray(r,r+t)}}const lA=10,El=10;function qa(i){let e=0;const t=[];for(;VA(i,e);){const r=iA(i,e+6);i[e+5]>>6&1&&(e+=lA),e+=lA;const n=e+r;for(;e+El<n;){const s=Bl(i.subarray(e)),A=yl(s);A&&t.push(A),e+=s.size+lA}za(i,e)&&(e+=lA)}return t}function eo(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"}function uA(i){if(i.data.byteLength===8){const e=new Uint8Array(i.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}}function zA(i){const e=qa(i);for(let t=0;t<e.length;t++){const r=e[t];if(eo(r))return uA(r)}}let ci=function(i){return i.audioId3="org.id3",i.dateRange="com.apple.quicktime.HLS",i.emsg="https://aomedia.org/emsg/ID3",i.misbklv="urn:misb:KLV:bin:1910.1",i}({});function Fi(i="",e=9e4){return{type:i,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class YA{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,r,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,r){}demux(e,t){this.cachedData&&(e=Xe(this.cachedData,e),this.cachedData=null);let r=Li(e,0),n=r?r.length:0,s;const A=this._audioTrack,a=this._id3Track,l=r?zA(r):void 0,o=e.length;for((this.basePTS===null||this.frameIndex===0&&V(l))&&(this.basePTS=wl(l,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:ci.audioId3,duration:Number.POSITIVE_INFINITY});n<o;){if(this.canParse(e,n)){const h=this.appendFrame(A,e,n);h?(this.frameIndex++,this.lastPTS=h.sample.pts,n+=h.length,s=n):n=o}else aA(e,n)?(r=Li(e,n),a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:ci.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,s=n):n++;if(n===o&&s!==o){const h=e.slice(s);this.cachedData?this.cachedData=Xe(this.cachedData,h):this.cachedData=h}}return{audioTrack:A,videoTrack:Fi(),id3Track:a,textTrack:Fi()}}demuxSampleAes(e,t,r){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Fi(),id3Track:this._id3Track,textTrack:Fi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const wl=(i,e,t)=>{if(V(i))return i*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let fs=null;const cA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Cl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],bl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],xl=[0,1,1,4];function to(i,e,t,r,n){if(t+24>e.length)return;const s=ro(e,t);if(s&&t+s.frameLength<=e.length){const A=s.samplesPerFrame*9e4/s.sampleRate,a=r+n*A,l={unit:e.subarray(t,t+s.frameLength),pts:a,dts:a};return i.config=[],i.channelCount=s.channelCount,i.samplerate=s.sampleRate,i.samples.push(l),{sample:l,length:s.frameLength,missing:0}}}function ro(i,e){const t=i[e+1]>>3&3,r=i[e+1]>>1&3,n=i[e+2]>>4&15,s=i[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&s!==3){const A=i[e+2]>>1&1,a=i[e+3]>>6,l=t===3?3-r:r===3?3:4,o=cA[l*14+n-1]*1e3,d=Cl[(t===3?0:t===2?1:2)*3+s],g=a===3?1:2,v=bl[t][r],E=xl[r],T=v*8*E,F=Math.floor(v*o/d+A)*E;if(fs===null){const Ae=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fs=Ae?parseInt(Ae[1]):0}return!!fs&&fs<=87&&r===2&&o>=224e3&&a===0&&(i[e+3]=i[e+3]|128),{sampleRate:d,channelCount:g,frameLength:F,samplesPerFrame:T}}}function jA(i,e){return i[e]===255&&(i[e+1]&224)===224&&(i[e+1]&6)!==0}function Qs(i,e){return e+1<i.length&&jA(i,e)}function Fl(i,e){return jA(i,e)&&4<=i.length-e}function no(i,e){if(e+1<i.length&&jA(i,e)){const r=ro(i,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const s=e+n;return s===i.length||Qs(i,s)}return!1}class Sl extends YA{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const r=Li(e,0);let n=(r==null?void 0:r.length)||0;if(no(e,n))return!1;for(let s=e.length;n<s;n++)if(AA(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return cl(e,t)}appendFrame(e,t,r){ja(e,this.observer,t,r,e.manifestCodec);const n=Ja(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const io=(i,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),s=new Uint32Array(1),A=new Uint8Array(1);for(;r>0;){A[0]=i[e];const a=Math.min(r,8),l=8-a;s[0]=4278190080>>>24+l<<l,n[0]=(A[0]&s[0])>>l,t=t?t<<a|n[0]:n[0],e+=1,r-=a}return t};class Tl extends YA{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=so(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=Li(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&zA(t)!==void 0&&io(e,r)<16}}function so(i,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const s=e[t+4]>>6;if(s>=3)return-1;const a=[48e3,44100,32e3][s],l=e[t+4]&63,h=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][l*3+s]*2;if(t+h>e.length)return-1;const d=e[t+6]>>5;let g=0;d===2?g+=2:(d&1&&d!==1&&(g+=2),d&4&&(g+=2));const v=(e[t+6]<<8|e[t+7])>>12-g&1,T=[2,1,2,3,3,4,4,5][d]+v,F=e[t+5]>>3,J=e[t+5]&7,ce=new Uint8Array([s<<6|F<<1|J>>2,(J&3)<<6|d<<3|v<<2|l>>4,l<<4&224]),Ae=1536/a*9e4,de=r+n*Ae,Te=e.subarray(t,t+h);return i.config=ce,i.channelCount=T,i.samplerate=a,i.samples.push({unit:Te,pts:de}),h}class Il extends YA{resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Li(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&zA(t)!==void 0&&io(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(no(e,r))return ie.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Fl(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return to(e,t,r,this.basePTS,this.frameIndex)}}const Dl=/\/emsg[-/]ID3/i;class Ll{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,r,n){const s=this.videoTrack=Fi("video",1),A=this.audioTrack=Fi("audio",1),a=this.txtTrack=Fi("text",1);if(this.id3Track=Fi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const l=N(e);if(l.video){const{id:o,timescale:h,codec:d,supplemental:g}=l.video;s.id=o,s.timescale=a.timescale=h,s.codec=d,s.supplemental=g}if(l.audio){const{id:o,timescale:h,codec:d}=l.audio;A.id=o,A.timescale=h,A.codec=d}a.id=ht.text,s.sampleDuration=0,s.duration=A.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return L(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Xe(this.remainderData,e));const a=st(r);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=r;const A=this.extractID3Track(n,t);return s.samples=Ve(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:A,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const n=this.extractID3Track(t,this.timeOffset);return r.samples=Ve(e,t),{videoTrack:t,audioTrack:Fi(),id3Track:n,textTrack:Fi()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=p(e.samples,["emsg"]);n&&n.forEach(s=>{const A=bt(s);if(Dl.test(A.schemeIdUri)){const a=Ao(A,t);let l=A.eventDuration===4294967295?Number.POSITIVE_INFINITY:A.eventDuration/A.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const o=A.payload;r.samples.push({data:o,len:o.byteLength,dts:a,pts:a,type:ci.emsg,duration:l})}else if(this.config.enableEmsgKLVMetadata&&A.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const a=Ao(A,t);r.samples.push({data:A.payload,len:A.payload.byteLength,dts:a,pts:a,type:ci.misbklv,duration:Number.POSITIVE_INFINITY})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function Ao(i,e){return V(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale}class Ul{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new Ar(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,sr.cbc)}decryptAacSample(e,t,r){const n=e[t].unit;if(n.length<=16)return;const s=n.subarray(16,n.length-n.length%16),A=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(A).then(a=>{const l=new Uint8Array(a);n.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)})}decryptAacSamples(e,t,r){for(;;t++){if(t>=e.length){r();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(t);let n=0;for(let s=32;s<e.length-16;s+=160,n+=16)r.set(e.subarray(s,s+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let s=32;s<e.length-16;s+=160,n+=16)e.set(r.subarray(n,n+16),s);return e}decryptAvcSample(e,t,r,n,s){const A=Nt(s.data),a=this.getAvcEncryptedData(A);this.decryptBuffer(a.buffer).then(l=>{s.data=this.getAvcDecryptedUnit(A,l),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)})}decryptAvcSamples(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){n();return}const s=e[t].units;for(;!(r>=s.length);r++){const A=s[r];if(!(A.data.length<=48||A.type!==1&&A.type!==5)&&(this.decryptAvcSample(e,t,r,n,A),!this.decrypter.isSync()))return}}}}class ao{constructor(){this.VideoSample=null}createVideoSample(e,t,r){return{key:e,frame:!1,pts:t,dts:r,units:[],length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,n;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const s=r.units;n=s[s.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,n=r.length;if(n){const s=r[n-1];e.pts=s.pts,e.dts=s.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,r){const n=t.byteLength;let s=e.naluState||0;const A=s,a=[];let l=0,o,h,d,g=-1,v=0;for(s===-1&&(g=0,v=this.getNALuType(t,0),s=0,l=1);l<n;){if(o=t[l++],!s){s=o?0:1;continue}if(s===1){s=o?0:2;continue}if(!o)s=3;else if(o===1){if(h=l-s-1,g>=0){const E={data:t.subarray(g,h),type:v};a.push(E)}else{const E=this.getLastNalUnit(e.samples);E&&(A&&l<=4-A&&E.state&&(E.data=E.data.subarray(0,E.data.byteLength-A)),h>0&&(E.data=Xe(E.data,t.subarray(0,h)),E.state=0))}l<n?(d=this.getNALuType(t,l),g=l,v=d,s=0):s=-1}else s=0}if(g>=0&&s>=0){const E={data:t.subarray(g,n),type:v,state:s};a.push(E)}if(a.length===0){const E=this.getLastNalUnit(e.samples);E&&(E.data=Xe(E.data,t))}return e.naluState=s,a}}class hs{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,r=e.byteLength-t,n=new Uint8Array(4),s=Math.min(4,t);if(s===0)throw new Error("no bytes available");n.set(e.subarray(r,r+s)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=s*8,this.bytesAvailable-=s}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const r=this.word>>>32-t;if(e>32&&ie.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?r<<t|this.readBits(t):r}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class oo extends ao{parsePES(e,t,r,n){const s=this.parseNALu(e,r.data,n);let A=this.VideoSample,a,l=!1;r.data=null,A&&s.length&&!e.audFound&&(this.pushAccessUnit(A,e),A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach(o=>{var h,d;switch(o.type){case 1:{let T=!1;a=!0;const F=o.data;if(l&&F.length>4){const J=this.readSliceType(F);(J===2||J===4||J===7||J===9)&&(T=!0)}if(T){var g;(g=A)!=null&&g.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null)}A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.frame=!0,A.key=T;break}case 5:a=!0,(h=A)!=null&&h.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 6:{a=!0,yt(o.data,1,r.pts,t.samples);break}case 7:{var v,E;a=!0,l=!0;const T=o.data,F=this.readSPS(T);if(!e.sps||e.width!==F.width||e.height!==F.height||((v=e.pixelRatio)==null?void 0:v[0])!==F.pixelRatio[0]||((E=e.pixelRatio)==null?void 0:E[1])!==F.pixelRatio[1]){e.width=F.width,e.height=F.height,e.pixelRatio=F.pixelRatio,e.sps=[T];const J=T.subarray(1,4);let ce="avc1.";for(let Ae=0;Ae<3;Ae++){let de=J[Ae].toString(16);de.length<2&&(de="0"+de),ce+=de}e.codec=ce}break}case 8:a=!0,e.pps=[o.data];break;case 9:a=!0,e.audFound=!0,(d=A)!=null&&d.frame&&(this.pushAccessUnit(A,e),A=null),A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:a=!0;break;default:a=!1;break}A&&a&&A.units.push(o)}),n&&A&&(this.pushAccessUnit(A,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new hs(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let r=8,n=8,s;for(let A=0;A<e;A++)n!==0&&(s=t.readEG(),n=(r+s+256)%256),r=n===0?r:n}readSPS(e){const t=new hs(e);let r=0,n=0,s=0,A=0,a,l,o;const h=t.readUByte.bind(t),d=t.readBits.bind(t),g=t.readUEG.bind(t),v=t.readBoolean.bind(t),E=t.skipBits.bind(t),T=t.skipEG.bind(t),F=t.skipUEG.bind(t),J=this.skipScalingList.bind(this);h();const ce=h();if(d(5),E(3),h(),F(),ce===100||ce===110||ce===122||ce===244||ce===44||ce===83||ce===86||ce===118||ce===128){const Ne=g();if(Ne===3&&E(1),F(),F(),E(1),v())for(l=Ne!==3?8:12,o=0;o<l;o++)v()&&(o<6?J(16,t):J(64,t))}F();const Ae=g();if(Ae===0)g();else if(Ae===1)for(E(1),T(),T(),a=g(),o=0;o<a;o++)T();F(),E(1);const de=g(),Te=g(),He=d(1);He===0&&E(1),E(1),v()&&(r=g(),n=g(),s=g(),A=g());let xe=[1,1];if(v()&&v())switch(h()){case 1:xe=[1,1];break;case 2:xe=[12,11];break;case 3:xe=[10,11];break;case 4:xe=[16,11];break;case 5:xe=[40,33];break;case 6:xe=[24,11];break;case 7:xe=[20,11];break;case 8:xe=[32,11];break;case 9:xe=[80,33];break;case 10:xe=[18,11];break;case 11:xe=[15,11];break;case 12:xe=[64,33];break;case 13:xe=[160,99];break;case 14:xe=[4,3];break;case 15:xe=[3,2];break;case 16:xe=[2,1];break;case 255:{xe=[h()<<8|h(),h()<<8|h()];break}}return{width:Math.ceil((de+1)*16-r*2-n*2),height:(2-He)*(Te+1)*16-(He?2:4)*(s+A),pixelRatio:xe}}}class lo extends ao{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const s=this.parseNALu(e,r.data,n);let A=this.VideoSample,a,l=!1;r.data=null,A&&s.length&&!e.audFound&&(this.pushAccessUnit(A,e),A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach(o=>{var h,d;switch(o.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),A.frame=!0,a=!0;break;case 16:case 17:case 18:case 21:if(a=!0,l){var g;(g=A)!=null&&g.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null)}A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 19:case 20:a=!0,(h=A)!=null&&h.frame&&!A.key&&(this.pushAccessUnit(A,e),A=this.VideoSample=null),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0,A.frame=!0;break;case 39:a=!0,yt(o.data,2,r.pts,t.samples);break;case 32:a=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=y(e.params,this.readVPS(o.data)),this.initVPS=o.data),e.vps=[o.data];break;case 33:if(a=!0,l=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],o.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const v=this.readSPS(o.data);e.width=v.width,e.height=v.height,e.pixelRatio=v.pixelRatio,e.codec=v.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const E in v.params)e.params[E]=v.params[E]}this.pushParameterSet(e.sps,o.data,e.vps),A||(A=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),A.key=!0;break;case 34:if(a=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const v=this.readPPS(o.data);for(const E in v)e.params[E]=v[E]}this.pushParameterSet(e.pps,o.data,e.vps)}break;case 35:a=!0,e.audFound=!0,(d=A)!=null&&d.frame&&(this.pushAccessUnit(A,e),A=null),A||(A=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:a=!1;break}A&&a&&A.units.push(o)}),n&&A&&(this.pushAccessUnit(A,e),this.VideoSample=null)}pushParameterSet(e,t,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let r=0;for(let n=0;n<e.byteLength;n++)n>=2&&e[n]===3&&e[n-1]===0&&e[n-2]===0||(t[r]=e[n],r++);return new Uint8Array(t.buffer,0,r)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new hs(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const r=t.readBits(3),n=t.readBoolean();return{numTemporalLayers:r+1,temporalIdNested:n}}readSPS(e){const t=new hs(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const r=t.readBits(3);t.readBoolean();const n=t.readBits(2),s=t.readBoolean(),A=t.readBits(5),a=t.readUByte(),l=t.readUByte(),o=t.readUByte(),h=t.readUByte(),d=t.readUByte(),g=t.readUByte(),v=t.readUByte(),E=t.readUByte(),T=t.readUByte(),F=t.readUByte(),J=t.readUByte(),ce=[],Ae=[];for(let fn=0;fn<r;fn++)ce.push(t.readBoolean()),Ae.push(t.readBoolean());if(r>0)for(let fn=r;fn<8;fn++)t.readBits(2);for(let fn=0;fn<r;fn++)ce[fn]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ae[fn]&&t.readUByte();t.readUEG();const de=t.readUEG();de==3&&t.skipBits(1);const Te=t.readUEG(),He=t.readUEG(),xe=t.readBoolean();let Ne=0,je=0,Oe=0,gt=0;xe&&(Ne+=t.readUEG(),je+=t.readUEG(),Oe+=t.readUEG(),gt+=t.readUEG());const Pt=t.readUEG(),hr=t.readUEG(),jt=t.readUEG(),Jt=t.readBoolean();for(let fn=Jt?0:r;fn<=r;fn++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let oi=0;oi<4;oi++)for(let Ui=0;Ui<(oi===3?2:6);Ui++)if(!t.readBoolean())t.readUEG();else{const Mi=Math.min(64,1<<4+(oi<<1));oi>1&&t.readEG();for(let $A=0;$A<Mi;$A++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const or=t.readUEG();let Lt=0;for(let fn=0;fn<or;fn++){let oi=!1;if(fn!==0&&(oi=t.readBoolean()),oi){fn===or&&t.readUEG(),t.readBoolean(),t.readUEG();let Ui=0;for(let Ys=0;Ys<=Lt;Ys++){const Mi=t.readBoolean();let $A=!1;Mi||($A=t.readBoolean()),(Mi||$A)&&Ui++}Lt=Ui}else{const Ui=t.readUEG(),Ys=t.readUEG();Lt=Ui+Ys;for(let Mi=0;Mi<Ui;Mi++)t.readUEG(),t.readBoolean();for(let Mi=0;Mi<Ys;Mi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const fn=t.readUEG();for(let oi=0;oi<fn;oi++){for(let Ui=0;Ui<jt+4;Ui++)t.readBits(1);t.readBits(1)}}let xr=0,br=1,Rr=1,jr=!0,nn=1,wn=0;t.readBoolean(),t.readBoolean();let hi=!1;if(t.readBoolean()){if(t.readBoolean()){const js=t.readUByte(),Ju=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],sl=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];js>0&&js<16?(br=Ju[js-1],Rr=sl[js-1]):js===255&&(br=t.readBits(16),Rr=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),hi=t.readBoolean(),hi&&(Ne+=t.readUEG(),je+=t.readUEG(),Oe+=t.readUEG(),gt+=t.readUEG()),t.readBoolean()&&(nn=t.readBits(32),wn=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const sl=t.readBoolean(),qu=t.readBoolean();let Va=!1;(sl||qu)&&(Va=t.readBoolean(),Va&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Va&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let ec=0;ec<=r;ec++){jr=t.readBoolean();const ac=jr||t.readBoolean();let tc=!1;ac?t.readEG():tc=t.readBoolean();const rc=tc?1:t.readUEG()+1;if(sl)for(let Wa=0;Wa<rc;Wa++)t.readUEG(),t.readUEG(),Va&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(qu)for(let Wa=0;Wa<rc;Wa++)t.readUEG(),t.readUEG(),Va&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),xr=t.readUEG())}let xs=Te,Xu=He;if(xe||hi){let fn=1,oi=1;de===1?fn=oi=2:de==2&&(fn=2),xs=Te-fn*je-fn*Ne,Xu=He-oi*gt-oi*Oe}const sc=n?["A","B","C"][n]:"",Ac=a<<24|l<<16|o<<8|h;let Yu=0;for(let fn=0;fn<32;fn++)Yu=(Yu|(Ac>>fn&1)<<31-fn)>>>0;let ju=Yu.toString(16);return A===1&&ju==="2"&&(ju="6"),{codecString:`hvc1.${sc}${A}.${ju}.${s?"H":"L"}${J}.B0`,params:{general_tier_flag:s,general_profile_idc:A,general_profile_space:n,general_profile_compatibility_flags:[a,l,o,h],general_constraint_indicator_flags:[d,g,v,E,T,F],general_level_idc:J,bit_depth:Pt+8,bit_depth_luma_minus8:Pt,bit_depth_chroma_minus8:hr,min_spatial_segmentation_idc:xr,chroma_format_idc:de,frame_rate:{fixed:jr,fps:wn/nn}},width:xs,height:Xu,pixelRatio:[br,Rr]}}readPPS(e){const t=new hs(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const n=t.readBoolean(),s=t.readBoolean();let A=1;return s&&n?A=0:s?A=3:n&&(A=2),{parallelismType:A}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Hn=188;class _i{constructor(e,t,r,n){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.videoParser=null}static probe(e,t){const r=_i.syncOffset(e);return r>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const t=e.length;let r=Math.min(Hn*5,t-Hn)+1,n=0;for(;n<r;){let s=!1,A=-1,a=0;for(let l=n;l<t;l+=Hn)if(e[l]===71&&(t-l===Hn||e[l+Hn]===71)){if(a++,A===-1&&(A=l,A!==0&&(r=Math.min(A+Hn*99,e.length-Hn)+1)),s||(s=XA(e,l)===0),s&&a>1&&(A===0&&a>2||l+Hn>r))return A}else{if(a)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ht[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=_i.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=_i.createTrack("audio",n),this._id3Track=_i.createTrack("id3"),this._txtTrack=_i.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,n=!1){r||(this.sampleAes=null);let s;const A=this._videoTrack,a=this._audioTrack,l=this._id3Track,o=this._txtTrack;let h=A.pid,d=A.pesData,g=a.pid,v=l.pid,E=a.pesData,T=l.pesData,F=null,J=this.pmtParsed,ce=this._pmtId,Ae=e.length;if(this.remainderData&&(e=Xe(this.remainderData,e),Ae=e.length,this.remainderData=null),Ae<Hn&&!n)return this.remainderData=e,{audioTrack:a,videoTrack:A,id3Track:l,textTrack:o};const de=Math.max(0,_i.syncOffset(e));Ae-=(Ae-de)%Hn,Ae<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Ae,e.buffer.byteLength-Ae));let Te=0;for(let xe=de;xe<Ae;xe+=Hn)if(e[xe]===71){const Ne=!!(e[xe+1]&64),je=XA(e,xe),Oe=(e[xe+3]&48)>>4;let gt;if(Oe>1){if(gt=xe+5+e[xe+4],gt===xe+Hn)continue}else gt=xe+4;switch(je){case h:if(Ne){if(d&&(s=ds(d,this.logger))){if(this.videoParser===null)switch(A.segmentCodec){case"avc":this.videoParser=new oo;break;case"hevc":this.videoParser=new lo;break}this.videoParser!==null&&this.videoParser.parsePES(A,o,s,!1)}d={data:[],size:0}}d&&(d.data.push(e.subarray(gt,xe+Hn)),d.size+=xe+Hn-gt);break;case g:if(Ne){if(E&&(s=ds(E,this.logger)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,s);break;case"mp3":this.parseMPEGPES(a,s);break;case"ac3":this.parseAC3PES(a,s);break}E={data:[],size:0}}E&&(E.data.push(e.subarray(gt,xe+Hn)),E.size+=xe+Hn-gt);break;case v:Ne&&(T&&(s=ds(T,this.logger))&&this.parseID3PES(l,s),T={data:[],size:0}),T&&(T.data.push(e.subarray(gt,xe+Hn)),T.size+=xe+Hn-gt);break;case 0:Ne&&(gt+=e[gt]+1),ce=this._pmtId=Rl(e,gt);break;case ce:{Ne&&(gt+=e[gt]+1);const Pt=uo(e,gt,this.typeSupported,r,this.observer,this.logger);h=Pt.videoPid,h>0&&(A.pid=h,A.segmentCodec=Pt.segmentVideoCodec),g=Pt.audioPid,g>0&&(a.pid=g,a.segmentCodec=Pt.segmentAudioCodec),v=Pt.id3Pid,v>0&&(l.pid=v),F!==null&&!J&&(this.logger.warn(`MPEG-TS PMT found at ${xe} after unknown PID '${F}'. Backtracking to sync byte @${de} to parse all TS packets.`),F=null,xe=de-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:F=je;break}}else Te++;Te>0&&JA(this.observer,new Error(`Found ${Te} TS packet/s that do not start with 0x47`),void 0,this.logger),A.pesData=d,a.pesData=E,l.pesData=T;const He={audioTrack:a,videoTrack:A,id3Track:l,textTrack:o};return n&&this.extractRemainingSamples(He),He}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:r,id3Track:n,textTrack:s}=e,A=r.pesData,a=t.pesData,l=n.pesData;let o;if(A&&(o=ds(A,this.logger))){if(this.videoParser===null)switch(r.segmentCodec){case"avc":this.videoParser=new oo;break;case"hevc":this.videoParser=new lo;break}this.videoParser!==null&&(this.videoParser.parsePES(r,s,o,!0),r.pesData=null)}else r.pesData=A;if(a&&(o=ds(a,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,o);break;case"mp3":this.parseMPEGPES(t,o);break;case"ac3":this.parseAC3PES(t,o);break}t.pesData=null}else a!=null&&a.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;l&&(o=ds(l,this.logger))?(this.parseID3PES(n,o),n.pesData=null):n.pesData=l}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),s=this.sampleAes=new Ul(this.observer,this.config,t);return this.decrypt(n,s)}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:s}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{s.samples?t.decryptAvcSamples(s.samples,0,0,()=>{r(e)}):r(e)}):s.samples&&t.decryptAvcSamples(s.samples,0,0,()=>{r(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let r=0;const n=this.aacOverFlow;let s=t.data;if(n){this.aacOverFlow=null;const d=n.missing,g=n.sample.unit.byteLength;if(d===-1)s=Xe(n.sample.unit,s);else{const v=g-d;n.sample.unit.set(s.subarray(0,d),v),e.samples.push(n.sample),r=n.missing}}let A,a;for(A=r,a=s.length;A<a-1&&!sA(s,A);A++);if(A!==r){let d;const g=A<a-1;if(g?d=`AAC PES did not start with ADTS header,offset:${A}`:d="No ADTS header found in AAC PES",JA(this.observer,new Error(d),g,this.logger),!g)return}ja(e,this.observer,s,A,this.audioCodec);let l;if(t.pts!==void 0)l=t.pts;else if(n){const d=Xa(e.samplerate);l=n.sample.pts+d}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let o=0,h;for(;A<a;)if(h=Ja(e,s,A,l,o),A+=h.length,h.missing){this.aacOverFlow=h;break}else for(o++;A<a-1&&!sA(s,A);A++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let s=0,A=0;const a=t.pts;if(a===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;A<n;)if(Qs(r,A)){const l=to(e,r,A,a,s);if(l)A+=l.length,s++;else break}else A++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=r.length;let A=0,a=0,l;for(;a<s&&(l=so(e,r,a,n,A++))>0;)a+=l}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=y({},t,{type:this._videoTrack?ci.emsg:ci.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function XA(i,e){return((i[e+1]&31)<<8)+i[e+2]}function Rl(i,e){return(i[e+10]&31)<<8|i[e+11]}function uo(i,e,t,r,n,s){const A={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=(i[e+1]&15)<<8|i[e+2],l=e+3+a-4,o=(i[e+10]&15)<<8|i[e+11];for(e+=12+o;e<l;){const h=XA(i,e),d=(i[e+3]&15)<<8|i[e+4];switch(i[e]){case 207:if(!r){qA("ADTS AAC",s);break}case 15:A.audioPid===-1&&(A.audioPid=h);break;case 21:A.id3Pid===-1&&(A.id3Pid=h);break;case 219:if(!r){qA("H.264",s);break}case 27:A.videoPid===-1&&(A.videoPid=h);break;case 3:case 4:!t.mpeg&&!t.mp3?s.log("MPEG audio found, not supported in this browser"):A.audioPid===-1&&(A.audioPid=h,A.segmentAudioCodec="mp3");break;case 193:if(!r){qA("AC-3",s);break}case 129:t.ac3?A.audioPid===-1&&(A.audioPid=h,A.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(A.audioPid===-1&&d>0){let g=e+5,v=d;for(;v>2;){switch(i[g]){case 106:t.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(A.audioPid=h,A.segmentAudioCodec="ac3");break}const T=i[g+1]+2;g+=T,v-=T}}break;case 194:case 135:return JA(n,new Error("Unsupported EC-3 in M2TS found"),void 0,s),A;case 36:A.videoPid===-1&&(A.videoPid=h,A.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=d+5}return A}function JA(i,e,t,r){r.warn(`parsing error: ${e.message}`),i.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function qA(i,e){e.log(`${i} with AES-128-CBC encryption found in unencrypted stream`)}function ds(i,e){let t=0,r,n,s,A,a;const l=i.data;if(!i||i.size===0)return null;for(;l[0].length<19&&l.length>1;)l[0]=Xe(l[0],l[1]),l.splice(1,1);if(r=l[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>i.size-6)return null;const h=r[7];h&192&&(A=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,h&64?(a=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,A-a>60*9e4&&(e.warn(`${Math.round((A-a)/9e4)}s delta between PTS and DTS, align them`),A=a)):a=A),s=r[8];let d=s+9;if(i.size<=d)return null;i.size-=d;const g=new Uint8Array(i.size);for(let v=0,E=l.length;v<E;v++){r=l[v];let T=r.byteLength;if(d)if(d>T){d-=T;continue}else r=r.subarray(d),T-=d,d=0;g.set(r,t),t+=T}return n&&(n-=s+3),{data:g,pts:A,dts:a,len:n}}return null}class Ql{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const Wi=Math.pow(2,32)-1;class We{static init(){We.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in We.types)We.types.hasOwnProperty(e)&&(We.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);We.HDLR_TYPES={video:t,audio:r};const n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);We.STTS=We.STSC=We.STCO=s,We.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),We.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),We.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),We.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const A=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);We.FTYP=We.box(We.types.ftyp,A,l,A,a),We.DINF=We.box(We.types.dinf,We.box(We.types.dref,n))}static box(e,...t){let r=8,n=t.length;const s=n;for(;n--;)r+=t[n].byteLength;const A=new Uint8Array(r);for(A[0]=r>>24&255,A[1]=r>>16&255,A[2]=r>>8&255,A[3]=r&255,A.set(e,4),n=0,r=8;n<s;n++)A.set(t[n],r),r+=t[n].byteLength;return A}static hdlr(e){return We.box(We.types.hdlr,We.HDLR_TYPES[e])}static mdat(e){return We.box(We.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(Wi+1)),n=Math.floor(t%(Wi+1));return We.box(We.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))}static mdia(e){return We.box(We.types.mdia,We.mdhd(e.timescale||0,e.duration||0),We.hdlr(e.type),We.minf(e))}static mfhd(e){return We.box(We.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?We.box(We.types.minf,We.box(We.types.smhd,We.SMHD),We.DINF,We.stbl(e)):We.box(We.types.minf,We.box(We.types.vmhd,We.VMHD),We.DINF,We.stbl(e))}static moof(e,t,r){return We.box(We.types.moof,We.mfhd(e),We.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=We.trak(e[t]);return We.box.apply(null,[We.types.moov,We.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(We.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=We.trex(e[t]);return We.box.apply(null,[We.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(Wi+1)),n=Math.floor(t%(Wi+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return We.box(We.types.mvhd,s)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,s;for(n=0;n<t.length;n++)s=t[n].flags,r[n+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return We.box(We.types.sdtp,r)}static stbl(e){return We.box(We.types.stbl,We.stsd(e),We.box(We.types.stts,We.STTS),We.box(We.types.stsc,We.STSC),We.box(We.types.stsz,We.STSZ),We.box(We.types.stco,We.STCO))}static avc1(e){let t=[],r=[],n,s,A;for(n=0;n<e.sps.length;n++)s=e.sps[n],A=s.byteLength,t.push(A>>>8&255),t.push(A&255),t=t.concat(Array.prototype.slice.call(s));for(n=0;n<e.pps.length;n++)s=e.pps[n],A=s.byteLength,r.push(A>>>8&255),r.push(A&255),r=r.concat(Array.prototype.slice.call(s));const a=We.box(We.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),l=e.width,o=e.height,h=e.pixelRatio[0],d=e.pixelRatio[1];return We.box(We.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,l>>8&255,l&255,o>>8&255,o&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]),a,We.box(We.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),We.box(We.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,h&255,d>>24,d>>16&255,d>>8&255,d&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return We.box(We.types.mp4a,We.audioStsd(e),We.box(We.types.esds,We.esds(e)))}static mp3(e){return We.box(We.types[".mp3"],We.audioStsd(e))}static ac3(e){return We.box(We.types["ac-3"],We.audioStsd(e),We.box(We.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return We.box(We.types.stsd,We.STSD,We.mp4a(e));if(t==="ac3"&&e.config)return We.box(We.types.stsd,We.STSD,We.ac3(e));if(t==="mp3"&&e.codec==="mp3")return We.box(We.types.stsd,We.STSD,We.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return We.box(We.types.stsd,We.STSD,We.avc1(e));if(t==="hevc"&&e.vps)return We.box(We.types.stsd,We.STSD,We.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,r=(e.duration||0)*(e.timescale||0),n=e.width||0,s=e.height||0,A=Math.floor(r/(Wi+1)),a=Math.floor(r%(Wi+1));return We.box(We.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,s>>8&255,s&255,0,0]))}static traf(e,t){const r=We.sdtp(e),n=e.id,s=Math.floor(t/(Wi+1)),A=Math.floor(t%(Wi+1));return We.box(We.types.traf,We.box(We.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),We.box(We.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,A>>24,A>>16&255,A>>8&255,A&255])),We.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,We.box(We.types.trak,We.tkhd(e),We.mdia(e))}static trex(e){const t=e.id;return We.box(We.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const r=e.samples||[],n=r.length,s=12+16*n,A=new Uint8Array(s);let a,l,o,h,d,g;for(t+=8+s,A.set([e.type==="video"?1:0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<n;a++)l=r[a],o=l.duration,h=l.size,d=l.flags,g=l.cts,A.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,g>>>24&255,g>>>16&255,g>>>8&255,g&255],12+16*a);return We.box(We.types.trun,A)}static initSegment(e){We.types||We.init();const t=We.moov(e);return Xe(We.FTYP,t)}static hvc1(e){const t=e.params,r=[e.vps,e.sps,e.pps],n=4,s=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),n-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),r.length]);let A=s.length;for(let E=0;E<r.length;E+=1){A+=3;for(let T=0;T<r[E].length;T+=1)A+=2+r[E][T].length}const a=new Uint8Array(A);a.set(s,0),A=s.length;const l=r.length-1;for(let E=0;E<r.length;E+=1){a.set(new Uint8Array([32+E|(E===l?128:0),0,r[E].length]),A),A+=3;for(let T=0;T<r[E].length;T+=1)a.set(new Uint8Array([r[E][T].length>>8,r[E][T].length&255]),A),A+=2,a.set(r[E][T],A),A+=r[E][T].length}const o=We.box(We.types.hvcC,a),h=e.width,d=e.height,g=e.pixelRatio[0],v=e.pixelRatio[1];return We.box(We.types.hvc1,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,h>>8&255,h&255,d>>8&255,d&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]),o,We.box(We.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),We.box(We.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,v>>24,v>>16&255,v>>8&255,v&255])))}}We.types=void 0,We.HDLR_TYPES=void 0,We.STTS=void 0,We.STSC=void 0,We.STCO=void 0,We.STSZ=void 0,We.VMHD=void 0,We.SMHD=void 0,We.STSD=void 0,We.FTYP=void 0,We.DINF=void 0;const co=9e4;function ea(i,e,t=1,r=!1){const n=i*e*t;return r?Math.round(n):n}function On(i,e,t=1,r=!1){return ea(i,e,1/t,r)}function ks(i,e=!1){return ea(i,1e3,1/co,e)}function kl(i,e=1){return ea(i,co,1/e)}const Ol=10*1e3,Pl=1024,Ml=1152,fo=1536;let gs=null,ta=null;function ho(i,e,t,r){return{duration:e,size:t,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:i?2:1,isNonSync:i?0:1}}}class fA{constructor(e,t,r,n){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.ISGenerated=!1,gs===null){const A=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);gs=A?parseInt(A[1]):0}if(ta===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);ta=s?parseInt(s[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((s,A)=>{let a=A.pts,l=a-s;return l<-4294967296&&(t=!0,a=vi(a,r),l=a-s),l>0?s:a},r);return t&&this.logger.debug("PTS rollover detected"),n}remux(e,t,r,n,s,A,a,l){let o,h,d,g,v,E,T=s,F=s;const J=e.pid>-1,ce=t.pid>-1,Ae=t.samples.length,de=e.samples.length>0,Te=a&&Ae>0||Ae>1;if((!J||de)&&(!ce||Te)||this.ISGenerated||a){if(this.ISGenerated){var xe,Ne,je,Oe;const jt=this.videoTrackConfig;(jt&&(t.width!==jt.width||t.height!==jt.height||((xe=t.pixelRatio)==null?void 0:xe[0])!==((Ne=jt.pixelRatio)==null?void 0:Ne[0])||((je=t.pixelRatio)==null?void 0:je[1])!==((Oe=jt.pixelRatio)==null?void 0:Oe[1]))||!jt&&Te||this.nextAudioPts===null&&de)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,s,A));const gt=this.isVideoContiguous;let Pt=-1,hr;if(Te&&(Pt=Nl(t.samples),!gt&&this.config.forceKeyFrameOnDiscontinuity))if(E=!0,Pt>0){this.logger.warn(`[mp4-remuxer]: Dropped ${Pt} out of ${Ae} video samples due to a missing keyframe`);const jt=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Pt),t.dropped+=Pt,F+=(t.samples[0].pts-jt)/t.inputTimeScale,hr=F}else Pt===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${Ae} video samples`),E=!1);if(this.ISGenerated){if(de&&Te){const jt=this.getVideoStartPts(t.samples),Vt=(vi(e.samples[0].pts,jt)-jt)/t.inputTimeScale;T+=Math.max(0,Vt),F+=Math.max(0,-Vt)}if(de){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,s,A)),h=this.remuxAudio(e,T,this.isAudioContiguous,A,ce||Te||l===O.AUDIO?F:void 0),Te){const jt=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,s,A)),o=this.remuxVideo(t,F,gt,jt)}}else Te&&(o=this.remuxVideo(t,F,gt,0));o&&(o.firstKeyFrame=Pt,o.independent=Pt!==-1,o.firstKeyFramePTS=hr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(v=ra(r,s,this._initPTS,this._initDTS)),n.samples.length&&(g=ir(n,s,this._initPTS))),{audio:h,video:o,initSegment:d,independent:E,text:g,id3:v}}generateIS(e,t,r,n){const s=e.samples,A=t.samples,a=this.typeSupported,l={},o=this._initPTS;let h=!o||n,d="audio/mp4",g,v,E,T;if(h&&(g=v=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":a.mpeg?(d="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}l.audio={id:"audio",container:d,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&a.mpeg?new Uint8Array(0):We.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(T=e.id,E=e.inputTimeScale,!o||E!==o.timescale?g=v=s[0].pts-Math.round(E*r):h=!1)}if(t.sps&&t.pps&&A.length){if(t.timescale=t.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:We.initSegment([t]),metadata:{width:t.width,height:t.height}},h)if(T=t.id,E=t.inputTimeScale,!o||E!==o.timescale){const F=this.getVideoStartPts(A),J=Math.round(E*r);v=Math.min(v,vi(A[0].dts,F)-J),g=Math.min(g,F-J)}else h=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(l).length)return this.ISGenerated=!0,h?(this._initPTS={baseTime:g,timescale:E},this._initDTS={baseTime:v,timescale:E}):g=E=void 0,{tracks:l,initPTS:g,timescale:E,trackId:T}}remuxVideo(e,t,r,n){const s=e.inputTimeScale,A=e.samples,a=[],l=A.length,o=this._initPTS;let h=this.nextAvcDts,d=8,g=this.videoSampleDuration,v,E,T=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY,J=!1;if(!r||h===null){const Lt=t*s,Mt=A[0].pts-vi(A[0].dts,A[0].pts);gs&&h!==null&&Math.abs(Lt-Mt-h)<15e3?r=!0:h=Lt-Mt}const ce=o.baseTime*s/o.timescale;for(let Lt=0;Lt<l;Lt++){const Mt=A[Lt];Mt.pts=vi(Mt.pts-ce,h),Mt.dts=vi(Mt.dts-ce,h),Mt.dts<A[Lt>0?Lt-1:Lt].dts&&(J=!0)}J&&A.sort(function(Lt,Mt){const xr=Lt.dts-Mt.dts,br=Lt.pts-Mt.pts;return xr||br}),v=A[0].dts,E=A[A.length-1].dts;const Ae=E-v,de=Ae?Math.round(Ae/(l-1)):g||e.inputTimeScale/30;if(r){const Lt=v-h,Mt=Lt>de,xr=Lt<-1;if((Mt||xr)&&(Mt?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ks(Lt,!0)} ms (${Lt}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ks(-Lt,!0)} ms (${Lt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!xr||h>=A[0].pts||gs)){v=h;const br=A[0].pts-Lt;if(Mt)A[0].dts=v,A[0].pts=br;else{let Rr=!0;for(let jr=0;jr<A.length&&!(A[jr].dts>br&&Rr);jr++){const nn=A[jr].pts;if(A[jr].dts-=Lt,A[jr].pts-=Lt,jr<A.length-1){const wn=A[jr+1].pts,hi=A[jr].pts,wi=wn<=hi,xs=wn<=nn;Rr=wi==xs}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${ks(br,!0)}/${ks(v,!0)}, delta: ${ks(Lt,!0)} ms`)}}v=Math.max(0,v);let Te=0,He=0,xe=v;for(let Lt=0;Lt<l;Lt++){const Mt=A[Lt],xr=Mt.units,br=xr.length;let Rr=0;for(let jr=0;jr<br;jr++)Rr+=xr[jr].data.length;He+=Rr,Te+=br,Mt.length=Rr,Mt.dts<xe?(Mt.dts=xe,xe+=de/4|0||1):xe=Mt.dts,T=Math.min(Mt.pts,T),F=Math.max(Mt.pts,F)}E=A[l-1].dts;const Ne=He+4*Te+8;let je;try{je=new Uint8Array(Ne)}catch(Lt){this.observer.emit(m.ERROR,m.ERROR,{type:he.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:Lt,bytes:Ne,reason:`fail allocating video mdat ${Ne}`});return}const Oe=new DataView(je.buffer);Oe.setUint32(0,Ne),je.set(We.types.mdat,4);let gt=!1,Pt=Number.POSITIVE_INFINITY,hr=Number.POSITIVE_INFINITY,jt=Number.NEGATIVE_INFINITY,Jt=Number.NEGATIVE_INFINITY;for(let Lt=0;Lt<l;Lt++){const Mt=A[Lt],xr=Mt.units;let br=0;for(let nn=0,wn=xr.length;nn<wn;nn++){const hi=xr[nn],wi=hi.data,xs=hi.data.byteLength;Oe.setUint32(d,xs),d+=4,je.set(wi,d),d+=xs,br+=4+xs}let Rr;if(Lt<l-1)g=A[Lt+1].dts-Mt.dts,Rr=A[Lt+1].pts-Mt.pts;else{const nn=this.config,wn=Lt>0?Mt.dts-A[Lt-1].dts:de;if(Rr=Lt>0?Mt.pts-A[Lt-1].pts:de,nn.stretchShortVideoTrack&&this.nextAudioPts!==null){const hi=Math.floor(nn.maxBufferHole*s),wi=(n?T+n*s:this.nextAudioPts)-Mt.pts;wi>hi?(g=wi-wn,g<0?g=wn:gt=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${wi/90} ms to the next segment; using duration ${g/90} ms for the last video frame.`)):g=wn}else g=wn}const jr=Math.round(Mt.pts-Mt.dts);Pt=Math.min(Pt,g),jt=Math.max(jt,g),hr=Math.min(hr,Rr),Jt=Math.max(Jt,Rr),a.push(ho(Mt.key,g,br,jr))}if(a.length){if(gs){if(gs<70){const Lt=a[0].flags;Lt.dependsOn=2,Lt.isNonSync=0}}else if(ta&&Jt-hr<jt-Pt&&de/jt<.025&&a[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Lt=v;for(let Mt=0,xr=a.length;Mt<xr;Mt++){const br=Lt+a[Mt].duration,Rr=Lt+a[Mt].cts;if(Mt<xr-1){const jr=br+a[Mt+1].cts;a[Mt].duration=jr-Rr}else a[Mt].duration=Mt?a[Mt-1].duration:de;a[Mt].cts=0,Lt=br}}}g=gt||!g?de:g,this.nextAvcDts=h=E+g,this.videoSampleDuration=g,this.isVideoContiguous=!0;const or={data1:We.moof(e.sequenceNumber++,v,y(e,{samples:a})),data2:je,startPTS:T/s,endPTS:(F+g)/s,startDTS:v/s,endDTS:h/s,type:"video",hasAudio:!1,hasVideo:!0,nb:a.length,dropped:e.dropped};return e.samples=[],e.dropped=0,or}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ml;case"ac3":return fo;default:return Pl}}remuxAudio(e,t,r,n,s){const A=e.inputTimeScale,a=e.samplerate?e.samplerate:A,l=A/a,o=this.getSamplesPerFrame(e),h=o*l,d=this._initPTS,g=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,v=[],E=s!==void 0;let T=e.samples,F=g?0:8,J=this.nextAudioPts||-1;const ce=t*A,Ae=d.baseTime*A/d.timescale;if(this.isAudioContiguous=r=r||T.length&&J>0&&(n&&Math.abs(ce-J)<9e3||Math.abs(vi(T[0].pts-Ae,ce)-J)<20*h),T.forEach(function(Vt){Vt.pts=vi(Vt.pts-Ae,ce)}),!r||J<0){if(T=T.filter(Vt=>Vt.pts>=0),!T.length)return;s===0?J=0:n&&!E?J=Math.max(0,ce):J=T[0].pts}if(e.segmentCodec==="aac"){const Vt=this.config.maxAudioFramesDrift;for(let rr=0,or=J;rr<T.length;rr++){const Lt=T[rr],Mt=Lt.pts,xr=Mt-or,br=Math.abs(1e3*xr/A);if(xr<=-Vt*h&&E)rr===0&&(this.logger.warn(`Audio frame @ ${(Mt/A).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*xr/A)} ms.`),this.nextAudioPts=J=or=Mt);else if(xr>=Vt*h&&br<Ol&&E){let Rr=Math.round(xr/h);or=Mt-Rr*h,or<0&&(Rr--,or+=h),rr===0&&(this.nextAudioPts=J=or),this.logger.warn(`[mp4-remuxer]: Injecting ${Rr} audio frame @ ${(or/A).toFixed(3)}s due to ${Math.round(1e3*xr/A)} ms gap.`);for(let jr=0;jr<Rr;jr++){const nn=Math.max(or,0);let wn=Ql.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);wn||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),wn=Lt.unit.subarray()),T.splice(rr,0,{unit:wn,pts:nn}),or+=h,rr++}}Lt.pts=or,or+=h}}let de=null,Te=null,He,xe=0,Ne=T.length;for(;Ne--;)xe+=T[Ne].unit.byteLength;for(let Vt=0,rr=T.length;Vt<rr;Vt++){const or=T[Vt],Lt=or.unit;let Mt=or.pts;if(Te!==null){const br=v[Vt-1];br.duration=Math.round((Mt-Te)/l)}else if(r&&e.segmentCodec==="aac"&&(Mt=J),de=Mt,xe>0){xe+=F;try{He=new Uint8Array(xe)}catch(br){this.observer.emit(m.ERROR,m.ERROR,{type:he.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:br,bytes:xe,reason:`fail allocating audio mdat ${xe}`});return}g||(new DataView(He.buffer).setUint32(0,xe),He.set(We.types.mdat,4))}else return;He.set(Lt,F);const xr=Lt.byteLength;F+=xr,v.push(ho(!0,o,xr,0)),Te=Mt}const je=v.length;if(!je)return;const Oe=v[v.length-1];this.nextAudioPts=J=Te+l*Oe.duration;const gt=g?new Uint8Array(0):We.moof(e.sequenceNumber++,de/l,y({},e,{samples:v}));e.samples=[];const Pt=de/A,hr=J/A,Jt={data1:gt,data2:He,startPTS:Pt,endPTS:hr,startDTS:Pt,endDTS:hr,type:"audio",hasAudio:!0,hasVideo:!1,nb:je};return this.isAudioContiguous=!0,Jt}}function vi(i,e){let t;if(e===null)return i;for(e<i?t=-8589934592:t=8589934592;Math.abs(i-e)>4294967296;)i+=t;return i}function Nl(i){for(let e=0;e<i.length;e++)if(i[e].key)return e;return-1}function ra(i,e,t,r){const n=i.samples.length;if(!n)return;const s=i.inputTimeScale;for(let a=0;a<n;a++){const l=i.samples[a];l.pts=vi(l.pts-t.baseTime*s/t.timescale,e*s)/s,l.dts=vi(l.dts-r.baseTime*s/r.timescale,e*s)/s}const A=i.samples;return i.samples=[],{samples:A}}function ir(i,e,t){const r=i.samples.length;if(!r)return;const n=i.inputTimeScale;for(let A=0;A<r;A++){const a=i.samples[A];a.pts=vi(a.pts-t.baseTime*n/t.timescale,e*n)/n}i.samples.sort((A,a)=>A.pts-a.pts);const s=i.samples;return i.samples=[],{samples:s}}class Hl{constructor(e,t,r,n){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1,this.logger=n}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,r,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(ze(e,n)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const n=this.initData=N(e);n.audio&&(t=Si(n.audio,B.AUDIO,this.logger)),n.video&&(r=Si(n.video,B.VIDEO,this.logger));const s={};n.audio&&n.video?s.audiovideo={container:"video/mp4",codec:t+","+r,supplemental:n.video.supplemental,initSegment:e,id:"main"}:n.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?s.video={container:"video/mp4",codec:r,supplemental:n.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s}remux(e,t,r,n,s,A){var a,l;let{initPTS:o,lastEndTime:h}=this;const d={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};V(h)||(h=this.lastEndTime=s||0);const g=t.samples;if(!(g!=null&&g.length))return d;const v={initPTS:void 0,timescale:void 0,trackId:void 0};let E=this.initData;if((a=E)!=null&&a.length||(this.generateInitSegment(g),E=this.initData),!((l=E)!=null&&l.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(v.tracks=this.initTracks,this.emitInitSegment=!1);const T=Je(g,E,this.logger),F=E.audio?T[E.audio.id]:null,J=E.video?T[E.video.id]:null,ce=hA(J,1/0),Ae=hA(F,1/0),de=hA(J,0,!0),Te=hA(F,0,!0);let He,xe=s,Ne=0;if(F&&(!J||!o&&Ae<ce||o&&o.trackId===E.audio.id)?(v.trackId=E.audio.id,He=F,Ne=Te-Ae):J&&(v.trackId=E.video.id,He=J,Ne=de-ce),He){const Vt=He.timescale;xe=He.start/Vt,v.timescale=Vt,o||(v.initPTS=He.start-s*Vt,this.initPTS=o={baseTime:v.initPTS,timescale:Vt,trackId:v.trackId})}(A||!o)&&(na(o,xe,s,Ne)||v.timescale!==o.timescale)&&(v.initPTS=xe-s,o&&o.timescale===1&&this.logger.warn(`Adjusting initPTS @${s} from ${o.baseTime/o.timescale} to ${v.initPTS}`),this.initPTS=o={baseTime:v.initPTS,timescale:1});const je=e?xe-o.baseTime/o.timescale:h;ut(E,g,o.baseTime/o.timescale);const Oe=je+Ne;Ne>0?this.lastEndTime=Oe:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const gt=!!E.audio,Pt=!!E.video;let hr="";gt&&(hr+="audio"),Pt&&(hr+="video");const jt={data1:g,startPTS:je,startDTS:je,endPTS:Oe,endDTS:Oe,type:hr,hasAudio:gt,hasVideo:Pt,nb:1,dropped:0};d.audio=gt&&!Pt?jt:void 0,d.video=Pt?jt:void 0;const Jt=J==null?void 0:J.sampleCount;if(Jt){const Vt=J.keyFrameIndex,rr=Vt!==-1;jt.nb=Jt,jt.dropped=Vt===0||this.isVideoContiguous?0:rr?Vt:Jt,jt.independent=rr,jt.firstKeyFrame=Vt,rr&&J.keyFrameStart&&(jt.firstKeyFramePTS=J.keyFrameStart-o.baseTime/o.timescale),this.isVideoContiguous||(d.independent=rr),this.isVideoContiguous||(this.isVideoContiguous=rr),jt.dropped&&this.logger.warn(`fmp4 does not start with IDR: firstIDR ${Vt}/${Jt} dropped: ${jt.dropped} pts: ${jt.firstKeyFramePTS||"NA"}`)}return d.initSegment=v,d.id3=ra(r,s,o,o),n.samples.length&&(d.text=ir(n,s,o)),d}}function hA(i,e,t=!1){return(i==null?void 0:i.start)!==void 0?(i.start+(t?i.duration:0))/i.timescale:e}function na(i,e,t,r){if(i===null)return!0;const n=Math.max(r,1),s=e-i.baseTime/i.timescale;return Math.abs(s-t)>n}function Si(i,e,t){const r=i==null?void 0:i.codec;return r&&r.length>4?r:e===B.AUDIO?r==="ec-3"||r==="ac-3"||r==="alac"?r:r==="fLaC"||r==="Opus"?ft(r,!1):(t.warn(`Unhandled audio codec "${r}" in mp4 MAP`),r||"mp4a"):(t.warn(`Unhandled video codec "${r}" in mp4 MAP`),r||"avc1")}let ki;try{ki=self.performance.now.bind(self.performance)}catch(i){ki=Date.now}const Os=[{demux:Ll,remux:Hl},{demux:_i,remux:fA},{demux:Sl,remux:fA},{demux:Il,remux:fA}];Os.splice(2,0,{demux:Tl,remux:fA});class ps{constructor(e,t,r,n,s,A){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.id=s,this.logger=A}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const s=r.transmuxing;s.executeStart=ki();let A=new Uint8Array(e);const{currentTransmuxState:a,transmuxConfig:l}=this;n&&(this.currentTransmuxState=n);const{contiguous:o,discontinuity:h,trackSwitch:d,accurateTimeOffset:g,timeOffset:v,initSegmentChange:E}=n||a,{audioCodec:T,videoCodec:F,defaultInitPts:J,duration:ce,initSegmentData:Ae}=l,de=dA(A,t);if(de&&Zn(de.method)){const Ne=this.getDecrypter(),je=di(de.method);if(Ne.isSync()){let Oe=Ne.softwareDecrypt(A,de.key.buffer,de.iv.buffer,je);if(r.part>-1){const Pt=Ne.flush();Oe=Pt&&Pt.buffer}if(!Oe)return s.executeEnd=ki(),ia(r);A=new Uint8Array(Oe)}else return this.asyncResult=!0,this.decryptionPromise=Ne.webCryptoDecrypt(A,de.key.buffer,de.iv.buffer,je).then(Oe=>{const gt=this.push(Oe,null,r);return this.decryptionPromise=null,gt}),this.decryptionPromise}const Te=this.needsProbing(h,d);if(Te){const Ne=this.configureTransmuxer(A);if(Ne)return this.logger.warn(`[transmuxer] ${Ne.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:Ne,reason:Ne.message}),s.executeEnd=ki(),ia(r)}(h||d||E||Te)&&this.resetInitSegment(Ae,T,F,ce,t),(h||E||Te)&&this.resetInitialTimestamp(J),o||this.resetContiguity();const He=this.transmux(A,de,v,g,r);this.asyncResult=Ps(He);const xe=this.currentTransmuxState;return xe.contiguous=!0,xe.discontinuity=!1,xe.trackSwitch=!1,s.executeEnd=ki(),He}flush(e){const t=e.transmuxing;t.executeStart=ki();const{decrypter:r,currentTransmuxState:n,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const A=[],{timeOffset:a}=n;if(r){const d=r.flush();d&&A.push(this.push(d.buffer,null,e))}const{demuxer:l,remuxer:o}=this;if(!l||!o){t.executeEnd=ki();const d=[ia(e)];return this.asyncResult?Promise.resolve(d):d}const h=l.flush(a);return Ps(h)?(this.asyncResult=!0,h.then(d=>(this.flushRemux(A,d,e),A))):(this.flushRemux(A,h,e),this.asyncResult?Promise.resolve(A):A)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:s,id3Track:A,textTrack:a}=t,{accurateTimeOffset:l,timeOffset:o}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===O.MAIN?"level":"track"} ${r.level}`);const h=this.remuxer.remux(n,s,A,a,o,l,!0,this.id);e.push({remuxResult:h,chunkMeta:r}),r.transmuxing.executeEnd=ki()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,n,s){const{demuxer:A,remuxer:a}=this;!A||!a||(A.resetInitSegment(e,t,r,n),a.resetInitSegment(e,t,r,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,s){let A;return t&&t.method==="SAMPLE-AES"?A=this.transmuxSampleAes(e,t,r,n,s):A=this.transmuxUnencrypted(e,r,n,s),A}transmuxUnencrypted(e,t,r,n){const{audioTrack:s,videoTrack:A,id3Track:a,textTrack:l}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,A,a,l,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,s){return this.demuxer.demuxSampleAes(e,t,r).then(A=>({remuxResult:this.remuxer.remux(A.audioTrack,A.videoTrack,A.id3Track,A.textTrack,r,n,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n}=this;let s;for(let d=0,g=Os.length;d<g;d++){var A;if((A=Os[d].demux)!=null&&A.probe(e,this.logger)){s=Os[d];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const a=this.demuxer,l=this.remuxer,o=s.remux,h=s.demux;(!l||!(l instanceof o))&&(this.remuxer=new o(r,t,n,this.logger)),(!a||!(a instanceof h))&&(this.demuxer=new h(r,t,n,this.logger),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Ar(this.config)),e}}function dA(i,e){let t=null;return i.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const ia=i=>({remuxResult:{},chunkMeta:i});function Ps(i){return"then"in i&&i.then instanceof Function}class Kl{constructor(e,t,r,n,s){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=n,this.defaultInitPts=s||null}}class is{constructor(e,t,r,n,s,A){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=n,this.timeOffset=s,this.initSegmentChange=A}}let gA=0;class pA{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=gA++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=l=>{const o=l.data,h=this.hls;if(!(!h||!(o!=null&&o.event)||o.instanceNo!==this.instanceNo))switch(o.event){case"init":{var d;const g=(d=this.workerContext)==null?void 0:d.objectURL;g&&self.URL.revokeObjectURL(g);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}case"workerLog":{h.logger[o.data.logType]&&h.logger[o.data.logType](o.data.message);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.part=this.part,o.data.id=this.id,h.trigger(o.event,o.data);break}}},this.onWorkerError=l=>{if(!this.hls)return;const o=new Error(`${l.message} (${l.filename}:${l.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:o})};const s=e.config;this.hls=e,this.id=t,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const A=(l,o)=>{o=o||{},o.frag=this.frag||void 0,l===m.ERROR&&(o=o,o.parent=this.id,o.part=this.part,this.error=o.error),this.hls.trigger(l,o)};this.observer=new Ri,this.observer.on(m.FRAG_DECRYPTED,A),this.observer.on(m.ERROR,A);const a=Mr(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const l=this.hls.logger;if(s.workerPath||Al()){try{s.workerPath?(l.log(`loading Web Worker ${s.workerPath} for "${t}"`),this.workerContext=al(s.workerPath)):(l.log(`injecting Web Worker for "${t}"`),this.workerContext=Za());const{worker:h}=this.workerContext;h.addEventListener("message",this.onWorkerMessage),h.addEventListener("error",this.onWorkerError),h.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:a,id:t,config:Kr(s)})}catch(h){l.warn(`Error setting up "${t}" Web Worker, fallback to inline`,h),this.terminateWorker(),this.error=null,this.transmuxer=new ps(this.observer,a,s,"",t,e.logger)}return}}this.transmuxer=new ps(this.observer,a,s,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=gA++;const t=this.hls.config,r=Mr(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:Kr(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),ol(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,r,n,s,A,a,l,o,h){var d,g;o.transmuxing.start=self.performance.now();const{instanceNo:v,transmuxer:E}=this,T=A?A.start:s.start,F=s.decryptdata,J=this.frag,ce=!(J&&s.cc===J.cc),Ae=!(J&&o.level===J.level),de=J?o.sn-J.sn:-1,Te=this.part?o.part-this.part.index:-1,He=de===0&&o.id>1&&o.id===(J==null?void 0:J.stats.chunkCount),xe=!Ae&&(de===1||de===0&&(Te===1||He&&Te<=0)),Ne=self.performance.now();(Ae||de||s.stats.parsing.start===0)&&(s.stats.parsing.start=Ne),A&&(Te||!xe)&&(A.stats.parsing.start=Ne);const je=!(J&&((d=s.initSegment)==null?void 0:d.url)===((g=J.initSegment)==null?void 0:g.url)),Oe=new is(ce,xe,l,Ae,T,je);if(!xe||ce||je){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${o.sn}${o.part>-1?" part: "+o.part:""} ${this.id===O.MAIN?"level":"track"}: ${o.level} id: ${o.id}
discontinuity: ${ce}
trackSwitch: ${Ae}
contiguous: ${xe}
accurateTimeOffset: ${l}
timeOffset: ${T}
initSegmentChange: ${je}`);const gt=new Kl(r,n,t,a,h);this.configureTransmuxer(gt)}if(this.frag=s,this.part=A,this.workerContext)this.workerContext.worker.postMessage({instanceNo:v,cmd:"demux",data:e,decryptdata:F,chunkMeta:o,state:Oe},e instanceof ArrayBuffer?[e]:[]);else if(E){const gt=E.push(e,F,o,Oe);Ps(gt)?gt.then(Pt=>{this.handleTransmuxComplete(Pt)}).catch(Pt=>{this.transmuxerError(Pt,o,"transmuxer-interface push error")}):this.handleTransmuxComplete(gt)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(r){const n=r.flush(e);Ps(n)?n.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(n,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const go=100;class po extends mn{constructor(e,t,r){super(e,t,r,"audio-stream-controller",O.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:s}){if(r===O.MAIN){const A=t.cc,a=this.fragCurrent;if(this.initPTS[A]={baseTime:n,timescale:s},this.log(`InitPTS for cc: ${A} found from main: ${n}/${s}`),this.mainAnchor=t,this.state===nt.WAITING_INIT_PTS){const l=this.waitingData;(!l&&!this.loadingParts||l&&l.frag.cc!==A)&&this.syncWithAnchor(t,l==null?void 0:l.frag)}else!this.hls.hasEnoughToStart&&a&&a.cc!==A?(a.abortRequests(),this.syncWithAnchor(t,a)):this.state===nt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var r;const n=((r=this.mainFragLoading)==null?void 0:r.frag)||null;if(t&&(n==null?void 0:n.cc)===t.cc)return;const s=(n||e).cc,A=this.getLevelDetails(),a=this.getLoadPosition(),l=ne(A,s,a);l&&(this.log(`Waiting fragment cc (${t==null?void 0:t.cc}) cancelled because video is at cc ${e.cc}`),this.startFragRequested=!1,this.nextLoadPosition=l.start,this.resetLoadingState(),this.state===nt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=nt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(go),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=nt.IDLE):this.state=nt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case nt.IDLE:this.doTickIdle();break;case nt.WAITING_TRACK:{const{levels:t,trackId:r}=this,n=t==null?void 0:t[r],s=n==null?void 0:n.details;if(s&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(s))break;this.state=nt.WAITING_INIT_PTS}break}case nt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((n==null?void 0:n[s])||null),this.state=nt.IDLE}break}case nt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:r,part:n,cache:s,complete:A}=t,a=this.mainAnchor;if(this.initPTS[r.cc]!==void 0){this.waitingData=null,this.state=nt.FRAG_LOADING;const l=s.flush().buffer,o={frag:r,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(o),A&&super._handleFragmentLoadComplete(o)}else a&&a.cc!==t.frag.cc&&this.syncWithAnchor(a,t.frag)}else this.state=nt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:r,media:n,trackId:s}=this,A=t.config;if(!this.buffering||!n&&!this.primaryPrefetch&&(this.startFragRequested||!A.startFragPrefetch)||!(r!=null&&r[s]))return;const a=r[s],l=a.details;if(!l||this.waitForLive(a)||this.waitForCdnTuneIn(l)){this.state=nt.WAITING_TRACK,this.startFragRequested=!1;return}const o=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&o&&(this.bufferFlushed=!1,this.afterBufferFlushed(o,B.AUDIO,O.AUDIO));const h=this.getFwdBufferInfo(o,O.AUDIO);if(h===null)return;if(!this.switchingTrack&&this._streamEnded(h,l)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=nt.ENDED;return}const d=h.len,g=t.maxBufferLength,v=l.fragments,E=v[0].start,T=this.getLoadPosition(),F=this.flushing?T:h.end;if(this.switchingTrack&&n){const Ae=T;l.PTSKnown&&Ae<E&&(h.end>E||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=E+.05)}if(d>=g&&!this.switchingTrack&&F<v[v.length-1].start)return;let J=this.getNextFragment(F,l);if(J&&this.isLoopLoading(J,F)&&(J=this.getNextFragmentLoopLoading(J,l,h,O.MAIN,g)),!J){this.bufferFlushed=!0;return}let ce=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&ce&&ae(J)&&!J.endList&&(!l.live||!this.loadingParts&&F<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(ce)===Rt.OK&&(this.mainFragLoading=ce=null),ce&&ae(ce))){if(J.start>ce.end){const de=this.fragmentTracker.getFragAtPos(F,O.MAIN);de&&de.end>ce.end&&(ce=de,this.mainFragLoading={frag:de,targetBufferTime:null})}if(J.start>ce.end)return}this.loadFragment(J,a,F)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new yn(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:n}=this;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),r?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==nt.STOPPED&&(this.setInterval(go),this.state=nt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(m.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:s,id:A,groupId:a,track:l}=t;if(!n){this.warn(`Audio tracks reset while loading track ${A} "${l.name}" of "${a}"`);return}const o=this.mainDetails;if(!o||s.endCC>o.endCC||o.expired){this.cachedTrackLoadedData=t,this.state!==nt.STOPPED&&(this.state=nt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${A} "${l.name}" of "${a}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const h=n[A];let d=0;if(s.live||(r=h.details)!=null&&r.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(h.details){var g;d=this.alignPlaylists(s,h.details,(g=this.levelLastLoaded)==null?void 0:g.details)}s.alignedSliding||(ts(s,o),s.alignedSliding||cs(s,o),d=s.fragmentStart)}h.details=s,this.levelLastLoaded=h,this.startFragRequested||this.setStartPosition(o,d),this.hls.trigger(m.AUDIO_TRACK_UPDATED,{details:s,id:A,groupId:t.groupId}),this.state===nt.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=nt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:s}=e,{config:A,trackId:a,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const o=l[a];if(!o){this.warn("Audio track is undefined on fragment load progress");return}const h=o.details;if(!h){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const d=A.defaultAudioCodec||o.audioCodec||"mp4a.40.2";let g=this.transmuxer;g||(g=this.transmuxer=new pA(this.hls,O.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const v=this.initPTS[r.cc],E=(t=r.initSegment)==null?void 0:t.data;if(v!==void 0){const F=n?n.index:-1,J=F!==-1,ce=new Fr(r.level,r.sn,r.stats.chunkCount,s.byteLength,F,J);g.push(s,E,d,"",r,n,h.totalduration,!1,ce,v)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${h.startSN} ,${h.endSN}],track ${a}`);const{cache:T}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Vn,complete:!1};T.push(new Uint8Array(s)),this.state!==nt.STOPPED&&(this.state=nt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===O.MAIN&&ae(t.frag)&&(this.mainFragLoading=t,this.state===nt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==O.AUDIO){!this.audioOnly&&r.type===O.MAIN&&!r.elementaryStreams.video&&!r.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(ae(r)){this.fragPrevious=r;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,C({},s)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=nt.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(O.AUDIO,t);break;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===nt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===ge.AUDIO_TRACK&&(this.state=nt.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case W.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==B.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==B.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===nt.ENDED&&(this.state=nt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,O.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:s,chunkMeta:A}=e,a=this.getCurrentContext(A);if(!a){this.resetWhenMissingContext(A);return}const{frag:l,part:o,level:h}=a,{details:d}=h,{audio:g,text:v,id3:E,initSegment:T}=s;if(this.fragContextChanged(l)||!d){this.fragmentTracker.removeFragment(l);return}if(this.state=nt.PARSING,this.switchingTrack&&g&&this.completeAudioSwitch(this.switchingTrack),T!=null&&T.tracks){const F=l.initSegment||l;this._bufferInitSegment(h,T.tracks,F,A),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:r,tracks:T.tracks})}if(g){const{startPTS:F,endPTS:J,startDTS:ce,endDTS:Ae}=g;o&&(o.elementaryStreams[B.AUDIO]={startPTS:F,endPTS:J,startDTS:ce,endDTS:Ae}),l.setElementaryStreamInfo(B.AUDIO,F,J,ce,Ae),this.bufferFragmentData(g,l,o,A)}if(E!=null&&(t=E.samples)!=null&&t.length){const F=y({id:r,frag:l,details:d},E);n.trigger(m.FRAG_PARSING_METADATA,F)}if(v){const F=y({id:r,frag:l,details:d},v);n.trigger(m.FRAG_PARSING_USERDATA,F)}}_bufferInitSegment(e,t,r,n){if(this.state!==nt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const s=t.audio;s.id=O.AUDIO;const A=e.audioCodec;this.log(`Init audio buffer, container:${s.container}, codecs[level/parsed]=[${A}/${s.codec}]`),A&&A.split(",").length===1&&(s.levelCodec=A),this.hls.trigger(m.BUFFER_CODECS,t);const a=s.initSegment;if(a!=null&&a.byteLength){const l={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:a};this.hls.trigger(m.BUFFER_APPENDING,l)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===Rt.NOT_LOADED||n===Rt.PARTIAL){var s;if(!ae(e))this._loadInitSegment(e,t);else if((s=t.details)!=null&&s.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=nt.WAITING_INIT_PTS;const A=this.mainDetails;A&&A.fragmentStart!==t.details.fragmentStart&&cs(t.details,A)}else super.loadFragment(e,t,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:r,assocLang:n,characteristics:s,audioCodec:A,channels:a}=this.bufferedTrack;Ye({name:t,lang:r,assocLang:n,characteristics:s,audioCodec:A,channels:a},e,wt)||(Dt(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(m.AUDIO_TRACK_SWITCHED,C({},e))}}class sa extends M{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,r){const n=t==null?void 0:t.renditionReports;if(n){let s=-1;for(let A=0;A<n.length;A++){const a=n[A];let l;try{l=new self.URL(a.URI,t.url).href}catch(o){this.warn(`Could not construct new URL for Rendition Report: ${o}`),l=a.URI||""}if(l===e){s=A;break}else l===e.substring(0,l.length)&&(s=A)}if(s!==-1){const A=n[s],a=parseInt(A["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let l=parseInt(A["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const h=Math.min(t.age-t.partTarget,t.targetduration);l>=0&&h>t.partTarget&&(l+=1)}const o=r&&Fn(r);return new hn(a,l>=0?l:void 0,o)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}return e}playlistLoaded(e,t,r){const{details:n,stats:s}=t,A=self.performance.now(),a=s.loading.first?Math.max(0,A-s.loading.first):0;n.advancedDateTime=Date.now()-a;const l=this.hls.config.timelineOffset;if(l!==n.appliedTimelineOffset){const h=Math.max(l||0,0);n.appliedTimelineOffset=h,n.fragments.forEach(d=>{d.start=d.playlistOffset+h})}if(n.live||r!=null&&r.live){const h="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(r),r&&n.fragments.length>0){Js(r,n);const ce=n.playlistParsingError;if(ce){this.warn(ce);const Ae=this.hls;if(!Ae.config.ignorePlaylistParsingErrors){var o;const{networkDetails:de}=t;Ae.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:ce,reason:ce.message,level:t.level||void 0,parent:(o=n.fragments[0])==null?void 0:o.type,networkDetails:de,stats:s});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=s.loading.start);const d=this.hls.mainForwardBufferInfo,g=d?d.end-d.len:0,v=(n.edge-g)*1e3,E=eA(n,v);if(n.requestScheduled+E<A?n.requestScheduled=A:n.requestScheduled+=E,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let T,F,J;if(n.canBlockReload&&n.endSN&&n.advanced){const ce=this.hls.config.lowLatencyMode,Ae=n.lastPartSn,de=n.endSN,Te=n.lastPartIndex,He=Te!==-1,xe=Ae===de;He?xe?(F=de+1,J=ce?0:Te):(F=Ae,J=ce?Te+1:n.maxPartIndex):F=de+1;const Ne=n.age,je=Ne+n.ageHeader;let Oe=Math.min(je-n.partTarget,n.targetduration*1.5);if(Oe>0){if(je>n.targetduration*3)this.log(`Playlist last advanced ${Ne.toFixed(2)}s ago. Omitting segment and part directives.`),F=void 0,J=void 0;else if(r!=null&&r.tuneInGoal&&je-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Oe} with playlist age: ${n.age}`),Oe=0;else{const gt=Math.floor(Oe/n.targetduration);if(F+=gt,J!==void 0){const Pt=Math.round(Oe%n.targetduration/n.partTarget);J+=Pt}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${Ne.toFixed(2)}s goal: ${Oe} skip sn ${gt} to part ${J}`)}n.tuneInGoal=Oe}if(T=this.getDeliveryDirectives(n,t.deliveryDirectives,F,J),ce||!xe){n.requestScheduled=A,this.loadingPlaylist(h,T);return}}else(n.canBlockReload||n.canSkipUntil)&&(T=this.getDeliveryDirectives(n,t.deliveryDirectives,F,J));T&&F!==void 0&&n.canBlockReload&&(n.requestScheduled=s.loading.first+Math.max(E-a*2,E/2)),this.scheduleLoading(h,T,n)}else this.clearTimer()}scheduleLoading(e,t,r){const n=r||e.details;if(!n){this.loadingPlaylist(e,t);return}const s=self.performance.now(),A=n.requestScheduled;if(s>=A){this.loadingPlaylist(e,t);return}const a=A-s;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(a)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),a)}getDeliveryDirectives(e,t,r,n){let s=Fn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,s=zr.No),new hn(r,n,s)}checkRetry(e){const t=e.details,r=le(e),n=e.errorAction,{action:s,retryCount:A=0,retryConfig:a}=n||{},l=!!n&&!!a&&(s===lt.RetryRequest||!n.resolved&&s===lt.SendAlternateToPenaltyBox);if(l){var o;if(A>=a.maxNumRetry)return!1;if(r&&(o=e.context)!=null&&o.deliveryDirectives)this.warn(`Retrying playlist loading ${A+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const h=Ke(a,A);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),h),this.warn(`Retrying playlist loading ${A+1}/${a.maxNumRetry} after "${t}" in ${h}ms`)}e.levelRetry=!0,n.resolved=!0}return l}}function mA(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!Ms(i[t].attrs,e[t].attrs))return!1;return!0}function Ms(i,e,t){const r=i["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>i[n]!==e[n])}function Aa(i,e){return e.label.toLowerCase()===i.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(i.lang||"").toLowerCase())}class $l extends sa{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:r,groupId:n,details:s}=t,A=this.tracksInGroup[r];if(!A||A.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${A==null?void 0:A.groupId}`);return}const a=A.details;A.details=t.details,this.log(`Audio track ${r} "${A.name}" lang:${A.lang} group:${n} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.audioGroups||null,n=this.groupIds;let s=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(a=>(n==null?void 0:n.indexOf(a))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(g=>!r||r.indexOf(g.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(g=>g.default)&&(this.selectDefaultTrack=!1),a.forEach((g,v)=>{g.id=v});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const l=this.hls.config.audioPreference;if(!s&&l){const g=Qe(l,a,wt);if(g>-1)s=a[g];else{const v=Qe(l,this.tracks);s=this.tracks[v]}}let o=this.findTrackId(s);o===-1&&s&&(o=this.findTrackId(null));const h={audioTracks:a};this.log(`Updating audio tracks, ${a.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,h);const d=this.trackId;if(o!==-1&&d===-1)this.setAudioTrack(o);else if(a.length&&d===-1){var A;const g=new Error(`No audio track selected for current audio group-ID(s): ${(A=this.groupIds)==null?void 0:A.join(",")} track count: ${a.length}`);this.warn(g.message),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:g})}}}onError(e,t){t.fatal||!t.context||t.context.type===ge.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const n=this.currentTrack;if(n&&Ye(e,n,wt))return n;const s=Qe(e,this.tracksInGroup,wt);if(s>-1){const A=this.tracksInGroup[s];return this.setAudioTrack(s),A}else if(n){let A=t.loadLevel;A===-1&&(A=t.firstAutoLevel);const a=At(e,t.levels,r,A,wt);if(a===-1)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const A=Qe(e,r);if(A>-1)return r[A]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e],s=n.details&&!n.details.live;if(e===this.trackId&&n===r&&s||(this.log(`Switching to audio-track ${e} "${n.name}" lang:${n.lang} group:${n.groupId} channels:${n.channels}`),this.trackId=e,this.currentTrack=n,this.hls.trigger(m.AUDIO_TRACK_SWITCHING,C({},n)),s))return;const A=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(A)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||Ye(e,n,wt)))return r}if(e){const{name:r,lang:n,assocLang:s,characteristics:A,audioCodec:a,channels:l}=e;for(let o=0;o<t.length;o++){const h=t[o];if(Ye({name:r,lang:n,assocLang:s,characteristics:A,audioCodec:a,channels:l},h,wt))return o}for(let o=0;o<t.length;o++){const h=t[o];if(Ms(e.attrs,h.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return o}for(let o=0;o<t.length;o++){const h=t[o];if(Ms(e.attrs,h.attrs,["LANGUAGE"]))return o}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Dt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,s=this.getUrlWithDirectives(e.url,t),A=e.details,a=A==null?void 0:A.age;this.log(`Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${s}`),this.hls.trigger(m.AUDIO_TRACK_LOADING,{url:s,id:r,groupId:n,deliveryDirectives:t||null,track:e})}}class Gl{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,r){if(this.queues===null||this.tracks===null)return;const n=this.queues[t];n.push(e),n.length===1&&!r&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const r={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(r,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const r={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(r)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const r=(t=e[0])==null?void 0:t.label;(r==="async-blocker"||r==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(s){var r;if(n.onError(s),this.queues===null||this.tracks===null)return;const A=(r=this.tracks[e])==null?void 0:r.buffer;A!=null&&A.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,r;return(t=this.queues)!=null&&t[e]||(r=this.tracks)!=null&&r[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const r=(t=this.tracks)==null?void 0:t[e],n=r==null?void 0:r.buffer;return n?`SourceBuffer${n.updating?" updating":""}${r.ended?" ended":""}${r.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(r=>r.label).join(", "))||""}}const mo=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,_o="HlsJsTrackRemovedError";class Vl extends Error{constructor(e){super(e),this.name=_o}}class Wl extends M{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=r=>{var n;this.hls&&((n=this.mediaSource)==null?void 0:n.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=r=>{const{media:n,mediaSource:s}=this;r&&this.log("Media source opened"),!(!n||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(m.MEDIA_ATTACHED,{media:n,mediaSource:s}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:n}=this;r!==n&&this.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Pe(ye(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_APPENDING,this.onBufferAppending,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.BUFFER_EOS,this.onBufferEos,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.FRAG_PARSED,this.onFragParsed,this),e.on(m.FRAG_CHANGED,this.onFragChanged,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_APPENDING,this.onBufferAppending,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_EOS,this.onBufferEos,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.FRAG_PARSED,this.onFragParsed,this),e.off(m.FRAG_CHANGED,this.onFragChanged,this),e.off(m.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const s=this.isUpdating();s||this.operationQueue.removeBlockers();const A=this.isQueued();(s||A)&&this.warn(`Transfering MediaSource with${A?" operations in queue":""}${s?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const n=this.transferData;return!this.sourceBufferCount&&n&&n.mediaSource===t?y(r,n.tracks):this.sourceBuffers.forEach(s=>{const[A]=s;A&&(r[A]=y({},this.tracks[A]),this.removeBuffer(A)),s[0]=s[1]=null}),{media:e,mediaSource:t,tracks:r}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var r;let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsTotal=n,this.log(`${n} bufferCodec event(s) expected.`),(r=this.transferData)!=null&&r.mediaSource&&this.sourceBufferCount&&n&&this.bufferCreated()}onMediaAttaching(e,t){const r=this.media=t.media,n=ye(this.appendSource);if(this.transferData=this.overrides=void 0,r&&n){const s=!!t.mediaSource;(s||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const A=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(A),s)this._objectUrl=r.src,this.attachTransferred();else{const a=this._objectUrl=self.URL.createObjectURL(A);if(this.appendSource)try{r.removeAttribute("src");const l=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||l&&A instanceof l,aa(r),Zl(r,a),r.load()}catch(l){r.src=a}else r.src=a}r.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,r;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(r=e.constructor)==null?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const r=this.tracks,n=t.tracks,s=n?Object.keys(n):null,A=s?s.length:0,a=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(n&&s&&A){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${Kr(r,(l,o)=>l==="initSegment"?void 0:o)};
transfer tracks: ${Kr(n,(l,o)=>l==="initSegment"?void 0:o)}}`),!ue(n,r)){t.mediaSource=null,t.tracks=void 0;const l=e.currentTime,o=this.details,h=Math.max(l,(o==null?void 0:o.fragments[0].start)||0);if(h-l>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${l} -> ${h}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(n)}"->"${Object.keys(r)}") start time: ${h} currentTime: ${l}`),this.onMediaDetaching(m.MEDIA_DETACHING,{}),this.onMediaAttaching(m.MEDIA_ATTACHING,t),e.currentTime=h;return}this.transferData=void 0,s.forEach(l=>{const o=l,h=n[o];if(h){const d=h.buffer;if(d){const g=this.fragmentTracker,v=h.id;if(g.hasFragments(v)||g.hasParts(v)){const F=ur.getBuffered(d);g.detectEvictedFragments(o,F,v,null,!0)}const E=oa(o),T=[o,d];this.sourceBuffers[E]=T,d.updating&&this.operationQueue&&this.operationQueue.prependBlocker(o),this.trackSourceBuffer(o,h)}}}),a(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),a()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const r=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:n,mediaSource:s,_objectUrl:A}=this;if(s){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([a])=>{a&&this.removeBuffer(a)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const a=s.readyState==="open";try{const l=s.sourceBuffers;for(let o=l.length;o--;)a&&l[o].abort(),s.removeSourceBuffer(l[o]);a&&s.endOfStream()}catch(l){this.warn(`onMediaDetaching: ${l.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.removeEventListener("startstreaming",this._onStartStreaming),s.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),r||(A&&self.URL.revokeObjectURL(A),this.mediaSrc===A?(n.removeAttribute("src"),this.appendSource&&aa(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(m.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const r=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),r)try{var n;(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[oa(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Gl(this.tracks)}onBufferCodecs(e,t){const r=this.tracks,n=Object.keys(t);this.log(`BUFFER_CODECS: "${n}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),A=!s&&this.sourceBufferCount&&this.media&&n.some(a=>!r[a]);if(s||A){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${n}" SourceBuffers`);return}n.forEach(a=>{var l,o,h;const d=t[a],{id:g,codec:v,levelCodec:E,container:T,metadata:F,supplemental:J}=d;let ce=r[a];const Ae=(l=this.transferData)==null||(o=l.tracks)==null?void 0:o[a],de=Ae!=null&&Ae.buffer?Ae:ce,Te=(de==null?void 0:de.pendingCodec)||(de==null?void 0:de.codec),He=de==null?void 0:de.levelCodec;ce||(ce=r[a]={buffer:void 0,listeners:[],codec:v,supplemental:J,container:T,levelCodec:E,metadata:F,id:g});const xe=dt(Te,He),Ne=xe==null?void 0:xe.replace(mo,"$1");let je=dt(v,E);const Oe=(h=je)==null?void 0:h.replace(mo,"$1");je&&xe&&Ne!==Oe&&(a.slice(0,5)==="audio"&&(je=ft(je,this.appendSource)),this.log(`switching codec ${Te} to ${je}`),je!==(ce.pendingCodec||ce.codec)&&(ce.pendingCodec=je),ce.container=T,this.appendChangeType(a,T,je))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const r=this.tracks[t];return e[t]={id:r.id,container:r.container,codec:r.codec,levelCodec:r.levelCodec},e},{})}appendChangeType(e,t,r){const n=`${t};codecs=${r}`,s={label:`change-type=${n}`,execute:()=>{const A=this.tracks[e];if(A){const a=A.buffer;a!=null&&a.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),a.changeType(n),A.codec=r,A.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:A=>{this.warn(`Failed to change ${e} SourceBuffer type`,A)}};this.append(s,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const r=e.start,n=r+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(r,O.MAIN))==null?void 0:t.gap)===!0)return;const A={label:"block-audio",execute:()=>{var a;const l=this.tracks.video;(this.lastVideoAppendEnd>n||l!=null&&l.buffer&&ur.isBuffered(l.buffer,n)||((a=this.fragmentTracker.getAppendedFrag(n,O.MAIN))==null?void 0:a.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:a=>{this.warn("Error executing block-audio operation",a)}};this.blockedAudioAppend={op:A,frag:e},this.append(A,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:r}=this,{data:n,type:s,parent:A,frag:a,part:l,chunkMeta:o}=t,h=o.buffering[s],d=a.sn,g=self.performance.now();h.start=g;const v=a.stats.buffering,E=l?l.stats.buffering:null;v.start===0&&(v.start=g),E&&E.start===0&&(E.start=g);const T=r.audio;let F=!1;s==="audio"&&(T==null?void 0:T.container)==="audio/mpeg"&&(F=!this.lastMpegAudioChunk||o.id===1||this.lastMpegAudioChunk.sn!==o.sn,this.lastMpegAudioChunk=o);const J=this.tracks.video,ce=J==null?void 0:J.buffer;if(ce&&d!=="initSegment"){const Te=l||a,He=this.blockedAudioAppend;if(s==="audio"&&A!=="main"&&!this.blockedAudioAppend){const Ne=Te.start+Te.duration*.05,je=ce.buffered,Oe=this.currentOp("video");!je.length&&!Oe?this.blockAudio(Te):!Oe&&!ur.isBuffered(ce,Ne)&&this.lastVideoAppendEnd<Ne&&this.blockAudio(Te)}else if(s==="video"){const xe=Te.end;if(He){const Ne=He.frag.start;(xe>Ne||xe<this.lastVideoAppendEnd||ur.isBuffered(ce,Ne))&&this.unblockAudio()}this.lastVideoAppendEnd=xe}}const Ae=(l||a).start,de={label:`append-${s}`,execute:()=>{if(h.executeStart=self.performance.now(),F){const Te=this.tracks[s];if(Te){const He=Te.buffer;if(He){const xe=Ae-He.timestampOffset;Math.abs(xe)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${Ae} (delta: ${xe}) sn: ${d})`),He.timestampOffset=Ae)}}}this.appendExecutor(n,s)},onStart:()=>{},onComplete:()=>{const Te=self.performance.now();h.executeEnd=h.end=Te,v.first===0&&(v.first=Te),E&&E.first===0&&(E.first=Te);const He={};this.sourceBuffers.forEach(([xe,Ne])=>{xe&&(He[xe]=ur.getBuffered(Ne))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(m.BUFFER_APPENDED,{type:s,frag:a,part:l,chunkMeta:o,parent:a.type,timeRanges:He})},onError:Te=>{var He;const xe={type:he.MEDIA_ERROR,parent:a.type,details:W.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:a,part:l,chunkMeta:o,error:Te,err:Te,fatal:!1},Ne=(He=this.media)==null?void 0:He.error;if(Te.code===DOMException.QUOTA_EXCEEDED_ERR)xe.details=W.BUFFER_FULL_ERROR;else if(Te.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Ne)xe.errorAction=mt(!0);else if(Te.name===_o&&this.sourceBufferCount===0)xe.errorAction=mt(!0);else{const je=++this.appendErrors[s];this.warn(`Failed ${je}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${Ne||"no media error"})`),(je>=this.hls.config.appendErrorMaxRetry||Ne)&&(xe.fatal=!0)}this.hls.trigger(m.ERROR,xe)}};this.append(de,s,this.isPending(this.tracks[s]))}getFlushOp(e,t,r){return this.log(`queuing "${e}" remove ${t}-${r}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,r)},onStart:()=>{},onComplete:()=>{this.hls.trigger(m.BUFFER_FLUSHED,{type:e})},onError:n=>{this.warn(`Failed to remove ${t}-${r} from "${e}" SourceBuffer`,n)}}}onBufferFlushing(e,t){const{type:r,startOffset:n,endOffset:s}=t;r?this.append(this.getFlushOp(r,n,s),r):this.sourceBuffers.forEach(([A])=>{A&&this.append(this.getFlushOp(A,n,s),A)})}onFragParsed(e,t){const{frag:r,part:n}=t,s=[],A=n?n.elementaryStreams:r.elementaryStreams;A[B.AUDIOVIDEO]?s.push("audiovideo"):(A[B.AUDIO]&&s.push("audio"),A[B.VIDEO]&&s.push("video"));const a=()=>{const l=self.performance.now();r.stats.buffering.end=l,n&&(n.stats.buffering.end=l);const o=n?n.stats:r.stats;this.hls.trigger(m.FRAG_BUFFERED,{frag:r,part:n,stats:o,id:r.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(a,s).catch(l=>{this.warn(`Fragment buffered callback ${l}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,r;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((r=this.tracks[e])==null?void 0:r.ending))})}onBufferEos(e,t){var r;this.sourceBuffers.forEach(([A])=>{if(A){const a=this.tracks[A];(!t.type||t.type===A)&&(a.ending=!0,a.ended||(a.ended=!0,this.log(`${A} buffer reached EOS`)))}});const n=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([A])=>{var a;return A&&!((a=this.tracks[A])!=null&&a.ended)})&&(n?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:A}=this;if(!A||A.readyState!=="open"){A&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${A.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),A.endOfStream(),this.hls.trigger(m.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(m.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===W.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;V(n)&&n!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.sourceBufferCount)return;const n=e.config,s=r.currentTime,A=t.levelTargetDuration,a=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(V(a)&&a>=0){const l=Math.max(a,A),o=Math.floor(s/A)*A-l;this.flushBackBuffer(s,A,o)}if(V(n.frontBufferFlushThreshold)&&n.frontBufferFlushThreshold>0){const l=Math.max(n.maxBufferLength,n.frontBufferFlushThreshold),o=Math.max(l,A),h=Math.floor(s/A)*A+o;this.flushFrontBuffer(s,A,h)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,s])=>{if(s){const a=ur.getBuffered(s);if(a.length>0&&r>a.start(0)){var A;this.hls.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:r});const l=this.tracks[n];if((A=this.details)!=null&&A.live)this.hls.trigger(m.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(l!=null&&l.ended){this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,s])=>{if(s){const A=ur.getBuffered(s),a=A.length;if(a<2)return;const l=A.start(a-1),o=A.end(a-1);if(r>l||e>=l&&e<=o)return;this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:l,endOffset:1/0,type:n})}})}getDurationAndRange(){var e;const{details:t,mediaSource:r}=this;if(!t||!this.media||(r==null?void 0:r.readyState)!=="open")return null;const n=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&r.setLiveSeekableRange){const o=Math.max(0,t.fragmentStart),h=Math.max(o,n);return{duration:1/0,start:o,end:h}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return V(s)?{duration:s}:null;const A=this.media.duration,a=V(r.duration)?r.duration:0;return n>a&&n>A||!V(A)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&(V(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),n.duration=e),t!==void 0&&r!==void 0&&(this.log(`MediaSource duration is set to ${n.duration}. Setting seekable range to ${t}-${r}.`),n.setLiveSeekableRange(t,r)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:r}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Kr(r)}`),this.tracksReady){var n;const s=(n=this.transferData)==null?void 0:n.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,r])=>{if(t){const n=this.tracks[t];e[t]={buffer:r,container:n.container,codec:n.codec,supplemental:n.supplemental,levelCodec:n.levelCodec,id:n.id,metadata:n.metadata}}}),this.hls.trigger(m.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:r}=this;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const A=s,a=e[A];if(this.isPending(a)){const l=this.getTrackCodec(a,A),o=`${a.container};codecs=${l}`;a.codec=l,this.log(`creating sourceBuffer(${o})${this.currentOp(A)?" Queued":""} ${Kr(a)}`);try{const h=r.addSourceBuffer(o),d=oa(A),g=[A,h];t[d]=g,a.buffer=h}catch(h){var n;this.error(`error while trying to add sourceBuffer: ${h.message}`),this.shiftAndExecuteNext(A),(n=this.operationQueue)==null||n.removeBlockers(),delete this.tracks[A],this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:h,sourceBufferName:A,mimeType:o,parent:a.id});return}this.trackSourceBuffer(A,a)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&Ue(r,"video")&&(n=Et(n,r));const s=dt(n,e.levelCodec);return s?t.slice(0,5)==="audio"?ft(s,this.appendSource):s:""}trackSourceBuffer(e,t){const r=t.buffer;if(!r)return;const n=this.getTrackCodec(t,e);this.tracks[e]={buffer:r,codec:n,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(s,A)=>{const a=A.removedRanges;a!=null&&a.length&&this.hls.trigger(m.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const r=this.currentOp(e);r&&(r.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var r;const n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const s=this.currentOp(e);s&&s.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:s}=this,A=this.tracks[e],a=A==null?void 0:A.buffer;if(!n||!s||!a){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const l=V(n.duration)?n.duration:1/0,o=V(s.duration)?s.duration:1/0,h=Math.max(0,t),d=Math.min(r,l,o);d>h&&(!A.ending||A.ended)?(A.ended=!1,this.log(`Removing [${h},${d}] from the ${e} SourceBuffer`),a.remove(h,d)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Vl(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);r.ending=!1,r.ended=!1,n.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:r}=this,n=t.map(A=>this.appendBlocker(A));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then(A=>{r===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var r;const n=(r=this.tracks[t])==null?void 0:r.buffer;!n||n.updating||this.shiftAndExecuteNext(t)})}append(e,t,r){this.operationQueue&&this.operationQueue.append(e,t,r)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,r){const n=this.tracks[e];if(!n)return;const s=n.buffer;if(!s)return;const A=r.bind(this,e);n.listeners.push({event:t,listener:A}),s.addEventListener(t,A)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const r=t.buffer;r&&(t.listeners.forEach(n=>{r.removeEventListener(n.event,n.listener)}),t.listeners.length=0)}}function aa(i){const e=i.querySelectorAll("source");[].slice.call(e).forEach(t=>{i.removeChild(t)})}function Zl(i,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,i.appendChild(t)}function oa(i){return i==="audio"?1:0}class la{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&V(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const r=t.filter((n,s)=>this.isLevelAllowed(n)&&s<=e);return this.clientRect=null,la.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,!t.width&&!t.height&&(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,t,r){if(!(e!=null&&e.length))return-1;const n=(a,l)=>l?a.width!==l.width||a.height!==l.height:!0;let s=e.length-1;const A=Math.max(t,r);for(let a=0;a<e.length;a+=1){const l=e[a];if((l.width>=A||l.height>=A)&&n(l,e[a+1])){s=a;break}}return s}}const si={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Yl={HLS:"h"},Ns={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},Bo={[Ns.OBJECT]:["br","d","ot","tb"],[Ns.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Ns.SESSION]:["cid","pr","sf","sid","st","v"],[Ns.STATUS]:["bs","rtp"]};class Zi{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof Zi?r:new Zi(r))),this.value=e,this.params=t}}const ca="Dict";function Eo(i){return Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":typeof i=="object"?JSON.stringify(i):String(i)}function wo(i,e,t,r){return new Error(`failed to ${i} "${Eo(e)}" as ${t}`,{cause:r})}function Ti(i,e,t){return wo("serialize",i,e,t)}class fa{constructor(e){this.description=e}}const _A="Bare Item",Jl="Boolean";function ql(i){if(typeof i!="boolean")throw Ti(i,Jl);return i?"?1":"?0"}function eu(i){return btoa(String.fromCharCode(...i))}const yi="Byte Sequence";function ha(i){if(ArrayBuffer.isView(i)===!1)throw Ti(i,yi);return`:${eu(i)}:`}const tu="Integer";function ru(i){return i<-999999999999999||999999999999999<i}function Co(i){if(ru(i))throw Ti(i,tu);return i.toString()}function nu(i){return`@${Co(i.getTime()/1e3)}`}function bo(i,e){if(i<0)return-bo(-i,e);const t=Math.pow(10,e);if(Math.abs(i*t%1-.5)<Number.EPSILON){const n=Math.floor(i*t);return(n%2===0?n:n+1)/t}else return Math.round(i*t)/t}const iu="Decimal";function su(i){const e=bo(i,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Ti(i,iu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Au="String",au=/[\x00-\x1f\x7f]+/;function xo(i){if(au.test(i))throw Ti(i,Au);return`"${i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ou(i){return i.description||i.toString().slice(7,-1)}const da="Token";function ga(i){const e=ou(i);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Ti(e,da);return e}function Pn(i){switch(typeof i){case"number":if(!V(i))throw Ti(i,_A);return Number.isInteger(i)?Co(i):su(i);case"string":return xo(i);case"symbol":return ga(i);case"boolean":return ql(i);case"object":if(i instanceof Date)return nu(i);if(i instanceof Uint8Array)return ha(i);if(i instanceof fa)return ga(i);default:throw Ti(i,_A)}}const Hs="Key";function pa(i){if(/^[a-z*][a-z0-9\-_.*]*$/.test(i)===!1)throw Ti(i,Hs);return i}function ma(i){return i==null?"":Object.entries(i).map(([e,t])=>t===!0?`;${pa(e)}`:`;${pa(e)}=${Pn(t)}`).join("")}function _a(i){return i instanceof Zi?`${Pn(i.value)}${ma(i.params)}`:Pn(i)}function va(i){return`(${i.value.map(_a).join(" ")})${ma(i.params)}`}function lu(i,e={whitespace:!0}){if(typeof i!="object")throw Ti(i,ca);const t=i instanceof Map?i.entries():Object.entries(i),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,s])=>{s instanceof Zi||(s=new Zi(s));let A=pa(n);return s.value===!0?A+=ma(s.params):(A+="=",Array.isArray(s.value)?A+=va(s):A+=_a(s)),A}).join(`,${r}`)}function uu(i,e){return lu(i,e)}function cu(i){return i==="ot"||i==="sf"||i==="st"}function fu(i){return typeof i=="number"?V(i):i!=null&&i!==""&&i!==!1}function hu(i,e){const t=new URL(i),r=new URL(e);if(t.origin!==r.origin)return i;const n=t.pathname.split("/").slice(1),s=r.pathname.split("/").slice(1,-1);for(;n[0]===s[0];)n.shift(),s.shift();for(;s.length;)s.shift(),n.unshift("..");return n.join("/")}const vA=i=>Math.round(i),du=(i,e)=>(e!=null&&e.baseUrl&&(i=hu(i,e.baseUrl)),encodeURIComponent(i)),yA=i=>vA(i/100)*100,Fo={br:vA,d:vA,bl:yA,dl:yA,mtp:yA,nor:du,rtp:yA,tb:vA};function So(i,e){const t={};if(i==null||typeof i!="object")return t;const r=Object.keys(i).sort(),n=y({},Fo,e==null?void 0:e.formatters),s=e==null?void 0:e.filter;return r.forEach(A=>{if(s!=null&&s(A))return;let a=i[A];const l=n[A];l&&(a=l(a,e)),!(A==="v"&&a===1)&&(A=="pr"&&a===1||fu(a)&&(cu(A)&&typeof a=="string"&&(a=new fa(a)),t[A]=a))}),t}function ya(i,e={}){return i?uu(So(i,e),y({whitespace:!1},e)):""}function To(i,e={}){const t={};if(!i)return t;const r=Object.entries(i),n=Object.entries(Bo).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=r.reduce((A,a)=>{var l,o;const[h,d]=a,g=((l=n.find(v=>v[1].includes(h)))===null||l===void 0?void 0:l[0])||Ns.REQUEST;return(o=A[g])!==null&&o!==void 0||(A[g]={}),A[g][h]=d,A},{});return Object.entries(s).reduce((A,[a,l])=>(A[a]=ya(l,e),A),t)}function Ba(i,e,t){return y(i,To(e,t))}const gu="CMCD";function pu(i,e={}){if(!i)return"";const t=ya(i,e);return`${gu}=${encodeURIComponent(t)}`}const Io=/CMCD=[^&#]+/;function mu(i,e,t){const r=pu(e,t);if(!r)return i;if(Io.test(i))return i.replace(Io,r);const n=i.includes("?")?"&":"?";return`${i}${n}${r}`}class BA{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=n=>{try{this.apply(n,{ot:si.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=n=>{try{const{frag:s,part:A}=n,a=this.hls.levels[s.level],l=this.getObjectType(s),o={d:(A||s).duration*1e3,ot:l};(l===si.VIDEO||l===si.AUDIO||l==si.MUXED)&&(o.br=a.bitrate/1e3,o.tb=this.getTopBandwidth(l)/1e3,o.bl=this.getBufferLength(l));const h=A?this.getNextPart(A):this.getNextFrag(s);h!=null&&h.url&&h.url!==s.url&&(o.nor=h.url),this.apply(n,o)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||e.sessionId,this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHED,this.onMediaDetached,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHED,this.onMediaDetached,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var r,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf:Yl.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){y(t,this.createData());const r=t.ot===si.INIT||t.ot===si.VIDEO||t.ot===si.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:n}=this;n&&(t=Object.keys(t).reduce((A,a)=>(n.includes(a)&&(A[a]=t[a]),A),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),Ba(e.headers,t,s)):e.url=mu(e.url,t,s)}getNextFrag(e){var t;const r=(t=this.hls.levels[e.level])==null?void 0:t.details;if(r){const n=e.sn-r.startSN;return r.fragments[n+1]}}getNextPart(e){var t,r;const{index:n,fragment:s}=e,A=(t=this.hls.levels[s.level])==null||(r=t.details)==null?void 0:r.partList;if(A){const{sn:a}=s;for(let l=A.length-1;l>=0;l--){const o=A[l];if(o.index===n&&o.fragment.sn===a)return A[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return si.TIMED_TEXT;if(e.sn==="initSegment")return si.INIT;if(t==="audio")return si.AUDIO;if(t==="main")return this.hls.audioTracks.length?si.VIDEO:si.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===si.AUDIO)r=n.audioTracks;else{const s=n.maxAutoLevel,A=s>-1?s+1:n.levels.length;r=n.levels.slice(0,A)}return r.forEach(s=>{s.bitrate>t&&(t=s.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,r=e===si.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:ur.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,A,a){t(s),this.loader.load(s,A,a)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,A,a){t(s),this.loader.load(s,A,a)}}}}const EA=3e5;class _u extends M{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(r=>r!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===lt.SendAlternateToPenaltyBox&&r.flags===ve.MoveAllAlternatesMatchingHost){const n=this.levels;let s=this._pathwayPriority,A=this.pathwayId;if(t.context){const{groupId:a,pathwayId:l,type:o}=t.context;a&&n?A=this.getPathwayForGroupId(a,o,A):l&&(A=l)}A in this.penalizedPathways||(this.penalizedPathways[A]=performance.now()),!s&&n&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),r.resolved=this.pathwayId!==A),r.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${A} levels: ${n&&n.length} priorities: ${Kr(s)} penalized: ${Kr(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),t=this.getLevelsForPathway(r),this.pathwayId=r}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const r=this.penalizedPathways,n=performance.now();Object.keys(r).forEach(s=>{n-r[s]>EA&&delete r[s]});for(let s=0;s<e.length;s++){const A=e[s];if(A in r)continue;if(A===this.pathwayId)return;const a=this.hls.nextLoadLevel,l=this.hls.levels[a];if(t=this.getLevelsForPathway(A),t.length>0){this.log(`Setting Pathway to "${A}"`),this.pathwayId=A,tA(t),this.hls.trigger(m.LEVELS_UPDATED,{levels:t});const o=this.hls.levels[a];l&&o&&this.levels&&(o.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&o.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${o.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let s=0;s<n.length;s++)if(t===ge.AUDIO_TRACK&&n[s].hasAudioGroup(e)||t===ge.SUBTITLE_TRACK&&n[s].hasSubtitleGroup(e))return n[s].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(s=>{const{ID:A,"BASE-ID":a,"URI-REPLACEMENT":l}=s;if(t.some(h=>h.pathwayId===A))return;const o=this.getLevelsForPathway(a).map(h=>{const d=new $r(h.attrs);d["PATHWAY-ID"]=A;const g=d.AUDIO&&`${d.AUDIO}_clone_${A}`,v=d.SUBTITLES&&`${d.SUBTITLES}_clone_${A}`;g&&(r[d.AUDIO]=g,d.AUDIO=g),v&&(n[d.SUBTITLES]=v,d.SUBTITLES=v);const E=wA(h.uri,d["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l),T=new yn({attrs:d,audioCodec:h.audioCodec,bitrate:h.bitrate,height:h.height,name:h.name,url:E,videoCodec:h.videoCodec,width:h.width});if(h.audioGroups)for(let F=1;F<h.audioGroups.length;F++)T.addGroupId("audio",`${h.audioGroups[F]}_clone_${A}`);if(h.subtitleGroups)for(let F=1;F<h.subtitleGroups.length;F++)T.addGroupId("text",`${h.subtitleGroups[F]}_clone_${A}`);return T});t.push(...o),Ea(this.audioTracks,r,l,A),Ea(this.subtitleTracks,n,l,A)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let n;try{n=new self.URL(e)}catch(h){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const h=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+h)}const s={responseType:"json",url:n.href},A=t.steeringManifestLoadPolicy.default,a=A.errorRetry||A.timeoutRetry||{},l={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},o={onSuccess:(h,d,g,v)=>{this.log(`Loaded steering manifest: "${n}"`);const E=h.data;if((E==null?void 0:E.VERSION)!==1){this.log(`Steering VERSION ${E.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=E.TTL;const{"RELOAD-URI":T,"PATHWAY-CLONES":F,"PATHWAY-PRIORITY":J}=E;if(T)try{this.uri=new self.URL(T,n).href}catch(Ae){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${T}`);return}this.scheduleRefresh(this.uri||g.url),F&&this.clonePathways(F);const ce={steeringManifest:E,url:n.toString()};this.hls.trigger(m.STEERING_MANIFEST_LOADED,ce),J&&this.updatePathwayPriority(J)},onError:(h,d,g,v)=>{if(this.log(`Error loading steering manifest: ${h.code} ${h.text} (${d.url})`),this.stopLoad(),h.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let E=this.timeToLoad*1e3;if(h.code===429){const T=this.loader;if(typeof(T==null?void 0:T.getResponseHeader)=="function"){const F=T.getResponseHeader("Retry-After");F&&(E=parseFloat(F)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,E)},onTimeout:(h,d,g)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(s,l,o)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const n=(r=this.hls)==null?void 0:r.media;if(n&&!n.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Ea(i,e,t,r){i&&Object.keys(e).forEach(n=>{const s=i.filter(A=>A.groupId===n).map(A=>{const a=y({},A);return a.details=void 0,a.attrs=new $r(a.attrs),a.url=a.attrs.URI=wA(A.url,A.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),a.groupId=a.attrs["GROUP-ID"]=e[n],a.attrs["PATHWAY-ID"]=r,a});i.push(...s)})}function wA(i,e,t,r){const{HOST:n,PARAMS:s,[t]:A}=r;let a;e&&(a=A==null?void 0:A[e],a&&(i=a));const l=new self.URL(i);return n&&!a&&(l.host=n),s&&Object.keys(s).sort().forEach(o=>{o&&l.searchParams.set(o,s[o])}),l.href}function Ai(i,e,t){fi(i,e,t),i.addEventListener(e,t)}function fi(i,e,t){i.removeEventListener(e,t)}class ss extends M{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=ss.CDMCleanupPromise?[ss.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,s=`"${t.type}" event: init data type: "${r}"`;if(this.debug(s),n!==null){if(!this.keyFormatPromise){let A=Object.keys(this.keySystemAccessPromises);A.length||(A=qn(this.config));const a=A.map(pi).filter(l=>!!l);this.keyFormatPromise=this.getKeyFormatPromise(a)}this.keyFormatPromise.then(A=>{const a=Mn(A);let l,o;if(r==="sinf"){if(a!==Cr.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${a}`);return}const E=De(new Uint8Array(n));try{const T=zn(JSON.parse(E).sinf),F=Ft(T);if(!F)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");l=new Uint8Array(F.subarray(8,24)),o=Cr.FAIRPLAY}catch(T){this.warn(`${s} Failed to parse sinf: ${T}`);return}}else{if(a!==Cr.WIDEVINE&&a!==Cr.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${a}`);return}const E=qt(n),T=E.filter(J=>!!J.systemId&&gi(J.systemId)===a);T.length>1&&this.warn(`${s} Using first of ${T.length} pssh found for selected key-system ${a}`);const F=T[0];if(!F){E.length===0||E.some(J=>!J.systemId)?this.warn(`${s} contains incomplete or invalid pssh data`):this.log(`ignoring ${s} for ${E.map(J=>gi(J.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(o=gi(F.systemId),F.version===0&&F.data)if(o===Cr.WIDEVINE){const J=F.data.length-22;l=new Uint8Array(F.data.subarray(J,J+16))}else o===Cr.PLAYREADY&&(l=gn(F.data))}if(!o||!l)return;const h=Z.hexDump(l),{keyIdToKeySessionPromise:d,mediaKeySessions:g}=this;let v=d[h];for(let E=0;E<g.length;E++){const T=g[E],F=T.decryptdata;if(!F.keyId)continue;const J=Z.hexDump(F.keyId);if(h===J||F.uri.replace(/-/g,"").indexOf(h)!==-1){if(v=d[J],F.pssh)break;delete d[J],F.pssh=new Uint8Array(n),F.keyId=l,v=d[h]=v.then(()=>this.generateRequestWithPreferredKeySession(T,r,n,"encrypted-event-key-match")),v.catch(ce=>this.handleError(ce));break}}if(!v){if(o!==a){this.log(`Ignoring "${t.type}" event with ${o} init data for selected key-system ${a}`);return}v=d[h]=this.getKeySystemSelectionPromise([o]).then(({keySystem:E,mediaKeys:T})=>{var F;this.throwIfDestroyed();const J=new Ln("ISO-23001-7",h,(F=pi(E))!=null?F:"");return J.pssh=new Uint8Array(n),J.keyId=l,this.attemptSetMediaKeys(E,T).then(()=>{this.throwIfDestroyed();const ce=this.createMediaKeySessionContext({decryptdata:J,keySystem:E,mediaKeys:T});return this.generateRequestWithPreferredKeySession(ce,r,n,"encrypted-event-no-match")})}),v.catch(E=>this.handleError(E))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(m.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t[e];if(n)return n.licenseUrl;if(e===Cr.WIDEVINE&&r)return r}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,r=t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(A,a,l)=>!!A&&l.indexOf(A)===a,n=t.map(A=>A.audioCodec).filter(r),s=t.map(A=>A.videoCodec).filter(r);return n.length+s.length===0&&s.push("avc1.42e01e"),new Promise((A,a)=>{const l=o=>{const h=o.shift();this.getMediaKeysPromise(h,n,s).then(d=>A({keySystem:h,mediaKeys:d})).catch(d=>{o.length?l(o):d instanceof Bi?a(d):a(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};l(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return ei===null&&self.location.protocol==="http:"&&(n=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(n))}return r(e,t)}getMediaKeysPromise(e,t,r){const n=Ot(e,t,r,this.config.drmSystemOptions),s=this.keySystemAccessPromises[e];let A=s==null?void 0:s.keySystemAccess;if(!A){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Kr(n)}`),A=this.requestMediaKeySystemAccess(e,n);const a=this.keySystemAccessPromises[e]={keySystemAccess:A};return A.catch(l=>{this.log(`Failed to obtain access to key-system "${e}": ${l}`)}),A.then(l=>{this.log(`Access for key-system "${l.keySystem}" obtained`);const o=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),a.mediaKeys=l.createMediaKeys().then(h=>(this.log(`Media-keys created for "${e}"`),a.hasMediaKeys=!0,o.then(d=>d?this.setMediaKeysServerCertificate(h,e,d):h))),a.mediaKeys.catch(h=>{this.error(`Failed to create media-keys for "${e}"}: ${h}`)}),a.mediaKeys})}return A.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${Z.hexDump(e.keyId||[])}`);const n=r.createSession(),s={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=this.getKeyIdString(t),s="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,s,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Z.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${Z.hexDump(((r=e.decryptdata)==null?void 0:r.keyId)||[])}
} (data length: ${t&&t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>pi(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:r})=>this.attemptSetMediaKeys(t,r))}selectKeySystem(e){return new Promise((t,r)=>this.getKeySystemSelectionPromise(e).then(({keySystem:n})=>{const s=pi(n);s?t(s):r(new Error(`Unable to find format for key-system "${n}"`))}).catch(r))}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=qn(this.config),r=e.map(Mn).filter(n=>!!n&&t.indexOf(n)!==-1);return this.selectKeySystem(r)}loadKey(e){const t=e.keyInfo.decryptdata,r=this.getKeyIdString(t),n=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${n}`);let s=this.keyIdToKeySessionPromise[r];return s||(s=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(a,l).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:a,mediaKeys:l,decryptdata:t}))))),(this.keyIdToKeySessionPromise[r]=s.then(a=>{const l="cenc",o=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(a,l,o,"playlist-key")})).catch(a=>this.handleError(a))),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Bi?this.hls.trigger(m.ERROR,e.data):this.hls.trigger(m.ERROR,{type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=Mn(e.keyFormat),s=n?[n]:qn(this.config);return this.attemptKeySystemAccess(s)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=qn(this.config)),e.length===0)throw new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Kr({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaKeys===t)return Promise.resolve();const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>{if(!this.media)throw this.mediaKeys=null,new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.mediaKeys=t,this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>r.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var s,A;const a=(s=this.config.drmSystems)==null||(A=s[e.keySystem])==null?void 0:A.generateRequest;if(a)try{const E=a.call(this.hls,t,r,e);if(!E)throw new Error("Invalid response from configured generateRequest filter");t=E.initDataType,r=E.initData?E.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(E){var l;if(this.warn(E.message),(l=this.hls)!=null&&l.config.debug)throw E}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const o=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${n}": ${o} (init data type: ${t} length: ${r?r.byteLength:null})`);const h=new Ri,d=e._onmessage=E=>{const T=e.mediaKeysSession;if(!T){h.emit("error",new Error("invalid state"));return}const{messageType:F,message:J}=E;this.log(`"${F}" message event for session "${T.sessionId}" message size: ${J.byteLength}`),F==="license-request"||F==="license-renewal"?this.renewLicense(e,J).catch(ce=>{h.eventNames().length?h.emit("error",ce):this.handleError(ce)}):F==="license-release"?e.keySystem===Cr.FAIRPLAY&&(this.updateKeySession(e,ni("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${F}"`)},g=e._onkeystatuseschange=E=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const F=e.keyStatus;h.emit("keyStatus",F),F==="expired"&&(this.warn(`${e.keySystem} expired for key ${o}`),this.renewKeySession(e))};Ai(e.mediaKeysSession,"message",d),Ai(e.mediaKeysSession,"keystatuseschange",g);const v=new Promise((E,T)=>{h.on("error",T),h.on("keyStatus",F=>{F.startsWith("usable")?E():F==="output-restricted"?T(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):F==="internal-error"?T(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${F}"`)):F==="expired"?T(new Error("key expired while generating request")):this.warn(`unhandled key status change "${F}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var E;this.log(`Request generated for key-session "${(E=e.mediaKeysSession)==null?void 0:E.sessionId}" keyId: ${o}`)}).catch(E=>{throw new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_SESSION,error:E,fatal:!1},`Error generating key-session request: ${E}`)}).then(()=>v).catch(E=>{throw h.removeAllListeners(),this.removeSession(e),E}).then(()=>(h.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{if(typeof r=="string"&&typeof t=="object"){const n=r;r=t,t=n}this.log(`key status change "${t}" for keyStatuses keyId: ${Z.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${Z.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((A,a)=>{const l={responseType:"arraybuffer",url:s},o=t.certLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,v,E,T)=>{A(g.data)},onError:(g,v,E,T)=>{a(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:E,response:C({url:l.url,data:void 0},g)},`"${e}" certificate request failed (${s}). Status: ${g.code} (${g.text})`))},onTimeout:(g,v,E)=>{a(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:E,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(g,v,E)=>{a(new Error("aborted"))}};n.load(l,h,d)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,s)=>{e.setServerCertificate(r).then(A=>{this.log(`setServerCertificate ${A?"success":"not supported by CDM"} (${r==null?void 0:r.byteLength}) on "${t}"`),n(e)}).catch(A=>{s(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:A,fatal:!0},A.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:n,fatal:!0},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),s=n.querySelectorAll("HttpHeader");if(s.length>0){let h;for(let d=0,g=s.length;d<g;d++){var A,a;h=s[d];const v=(A=h.querySelector("name"))==null?void 0:A.textContent,E=(a=h.querySelector("value"))==null?void 0:a.textContent;v&&E&&e.setRequestHeader(v,E)}}const l=n.querySelector("Challenge"),o=l==null?void 0:l.textContent;if(!o)throw new Error("Cannot find <Challenge> in key message");return ni(atob(o))}setupLicenseXHR(e,t,r,n){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,t,r,n)}).catch(A=>{if(!r.decryptdata)throw A;return e.open("POST",t,!0),s.call(this.hls,e,t,r,n)}).then(A=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:A||n})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((n,s)=>{const A=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${A}`);const a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(a.readyState===4)if(a.status===200){this._requestLicenseFailureCount=0;let l=a.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const o=this.config.licenseResponseCallback;if(o)try{l=o.call(this.hls,a,A,e)}catch(h){this.error(h)}n(l)}else{const l=r.errorRetry,o=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>o||a.status>=400&&a.status<500)s(new Bi({type:he.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:A,data:void 0,code:a.status,text:a.statusText}},`License Request XHR failed (${A}). Status: ${a.status} (${a.statusText})`));else{const h=o-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${h} attempts left`),this.requestLicense(e,t).then(n,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=a,this.setupLicenseXHR(a,A,e,t).then(({xhr:l,licenseChallenge:o})=>{e.keySystem==Cr.PLAYREADY&&(o=this.unpackPlayReadyKeyMessage(l,o)),l.send(o)})})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const r=t.media;this.media=r,Ai(r,"encrypted",this.onMediaEncrypted),Ai(r,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(fi(e,"encrypted",this.onMediaEncrypted),fi(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Ln.clearKeyUriToKeyIdMap();const n=r.length;ss.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat(t==null||(e=t.setMediaKeys(null))==null?void 0:e.catch(s=>{var A;this.log(`Could not clear media keys: ${s}`),(A=this.hls)==null||A.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))).catch(s=>{var A;this.log(`Could not close sessions and clear media keys: ${s}`),(A=this.hls)==null||A.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{n&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,s)=>(n.indexOf(s.keyFormat)===-1&&n.push(s.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const n=this.mediaKeySessions.indexOf(e);n>-1&&this.mediaKeySessions.splice(n,1);const{drmSystemOptions:s}=this.config;return(an(s)?new Promise((a,l)=>{self.setTimeout(()=>l(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(a)}):Promise.resolve()).catch(a=>{var l;this.log(`Could not remove session: ${a}`),(l=this.hls)==null||l.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${a}`)})}).then(()=>t.close()).catch(a=>{var l;this.log(`Could not close session: ${a}`),(l=this.hls)==null||l.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${a}`)})})}}}ss.CDMCleanupPromise=void 0;class Bi extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}class CA{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const s=n-this.lastTime,A=r-this.lastDroppedFrames,a=t-this.lastDecodedFrames,l=1e3*A/s,o=this.hls;if(o.trigger(m.FPS_DROP,{currentDropped:A,currentDecoded:a,totalDroppedFrames:r}),l>0&&A>o.config.fpsDroppedMonitoringThreshold*a){let h=o.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=h)&&(h=h-1,o.trigger(m.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:o.currentLevel}),o.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function wa(i,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function Ca(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){ie.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,i.addCue(n)}catch(n){ie.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(i.mode=t)}function ms(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues)for(let r=i.cues.length;r--;)e&&i.cues[r].removeEventListener("enter",e),i.removeCue(i.cues[r]);t==="disabled"&&(i.mode=t)}function ba(i,e,t,r){const n=i.mode;if(n==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0){const s=_s(i.cues,e,t);for(let A=0;A<s.length;A++)(!r||r(s[A]))&&i.removeCue(s[A])}n==="disabled"&&(i.mode=n)}function Do(i,e){if(e<=i[0].startTime)return 0;const t=i.length-1;if(e>i[t].endTime)return-1;let r=0,n=t,s;for(;r<=n;)if(s=Math.floor((n+r)/2),e<i[s].startTime)n=s-1;else if(e>i[s].startTime&&r<t)r=s+1;else return s;return i[r].startTime-e<e-i[n].startTime?r:n}function _s(i,e,t){const r=[],n=Do(i,e);if(n>-1)for(let s=n,A=i.length;s<A;s++){const a=i[s];if(a.startTime>=e&&a.endTime<=t)r.push(a);else if(a.startTime>t)return r}return r}function vs(i){const e=[];for(let t=0;t<i.length;t++){const r=i[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(i[t])}return e}class bA extends sa{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const r=vs(this.media.textTracks);for(let s=0;s<r.length;s++)if(r[s].mode==="hidden")t=r[s];else if(r[s].mode==="showing"){t=r[s];break}const n=this.findTrackForTextTrack(t);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const r=this.media;if(!r)return;const n=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n)return;vs(r.textTracks).forEach(A=>{ms(A)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:r,groupId:n,details:s}=t,A=this.tracksInGroup[r];if(!A||A.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${A==null?void 0:A.groupId}`);return}const a=A.details;A.details=t.details,this.log(`Subtitle track ${r} "${A.name}" lang:${A.lang} group:${n} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.subtitleGroups||null,n=this.groupIds;let s=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(A=>(n==null?void 0:n.indexOf(A))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const A=this.tracks.filter(h=>!r||r.indexOf(h.groupId)!==-1);if(A.length)this.selectDefaultTrack&&!A.some(h=>h.default)&&(this.selectDefaultTrack=!1),A.forEach((h,d)=>{h.id=d});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=A;const a=this.hls.config.subtitlePreference;if(!s&&a){this.selectDefaultTrack=!1;const h=Qe(a,A);if(h>-1)s=A[h];else{const d=Qe(a,this.tracks);s=this.tracks[d]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const o={subtitleTracks:A};this.log(`Updating subtitle tracks, ${A.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED,o),l!==-1&&this.trackId===-1&&this.setSubtitleTrack(l)}}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const s=t[n];if(!(r&&!s.default||!r&&!e)&&(!e||Ye(s,e)))return n}if(e){for(let n=0;n<t.length;n++){const s=t[n];if(Ms(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const s=t[n];if(Ms(e.attrs,s.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(Aa(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ge.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const r=this.currentTrack;if(r&&Ye(e,r))return r;const n=Qe(e,this.tracksInGroup);if(n>-1){const s=this.tracksInGroup[n];return this.setSubtitleTrack(n),s}else{if(r)return null;{const s=Qe(e,t);if(s>-1)return t[s]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,s=this.getUrlWithDirectives(e.url,t),A=e.details,a=A==null?void 0:A.age;this.log(`Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${s}`),this.hls.trigger(m.SUBTITLE_TRACK_LOADING,{url:s,id:r,groupId:n,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=vs(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(s=>Aa(r,s))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(s=>{s.mode!=="disabled"&&s!==n&&(s.mode="disabled")}),n){const s=this.subtitleDisplay?"showing":"hidden";n.mode!==s&&(n.mode=s)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!V(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&s)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:A,groupId:a="",name:l,type:o,url:h}=n;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:A,groupId:a,name:l,type:o,url:h});const d=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(d)}}function vu(){try{return crypto.randomUUID()}catch(i){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const s=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?s:s&3|8).toString(16)})}}}function Ks(i){let e=5381,t=i.length;for(;t;)e=e*33^i.charCodeAt(--t);return(e>>>0).toString()}const ys=.025;let xA=function(i){return i[i.Point=0]="Point",i[i.Range=1]="Range",i}({});function Lo(i,e,t){return`${i.identifier}-${t+1}-${Ks(e)}`}class xa{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const r=this.playoutLimit;return e<=0||isNaN(r)?!1:r===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>r}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return FA(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,r=FA(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=V(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return FA(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<ys))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?xA.Range:xA.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return Uo(this)}}function FA(i,e){return i-e.start<e.duration/2&&!(Math.abs(i-(e.start+e.duration))<ys)?e.start:e.start+e.duration}function Fa(i,e,t){const r=new self.URL(i,t);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function $s(i,e){for(;(t=i.assetList[++e])!=null&&t.error;)var t;return e}function Uo(i){return`["${i.identifier}" ${i.cue.pre?"<pre>":i.cue.post?"<post>":""}${i.timelineStart.toFixed(2)}-${i.resumeTime.toFixed(2)}]`}function As(i){const e=i.timelineStart,t=i.duration||0;return`["${i.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class yu{constructor(e,t,r,n){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls.trigger(m.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(t);this.interstitial=r,this.assetItem=n;let A=n.uri;try{A=Fa(A,t.primarySessionId).href}catch(l){}s.loadSource(A);const a=()=>{this.hasDetails=!0};s.once(m.LEVEL_LOADED,a),s.once(m.AUDIO_TRACK_LOADED,a),s.once(m.SUBTITLE_TRACK_LOADED,a),s.on(m.MEDIA_ATTACHING,(l,{media:o})=>{this.removeMediaListeners(),this.mediaAttached=o,this.interstitial.playoutLimit&&(o.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&s.on(m.BUFFER_APPENDED,()=>{const d=this.bufferedEnd;this.reachedPlayout(d)&&(this._bufferedEosTime=d,s.trigger(m.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){var e;return((e=this.interstitial)==null?void 0:e.appendInPlace)||!1}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const r=this.timelineOffset,n=ur.bufferInfo(e,r,0);return this.getAssetTime(n.end)>=this._bufferedEosTime-.02}reachedPlayout(e){const r=this.interstitial.playoutLimit;return this.startOffset+e>=r}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=ur.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const r=e-t;if(Math.abs(r)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-t),r)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}resetDetails(){const e=this.hls;if(this.hasDetails){e.stopLoad();const t=r=>delete r.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,r){this.hls.on(e,t)}once(e,t,r){this.hls.once(e,t)}off(e,t,r){this.hls.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${As(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Gs=.033;class SA extends M{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((r,n)=>e<=n.startOffset&&t>n.startOffset?(delete n.error,r+1):r,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);const n=this.items;if(n)for(n[r]||(t===void 0&&(t=e.start),r=this.findItemIndexAtTime(t));r>=0&&(s=n[r])!=null&&s.event;){var s;r--}return r}findItemIndexAtTime(e,t){const r=this.items;if(r)for(let n=0;n<r.length;n++){let s=r[n];if(t&&t!=="primary"&&(s=s[t]),e===s.start||e>s.start&&e<s.end)return n}return-1}findJumpRestrictedIndex(e,t){const r=this.items;if(r)for(let n=e;n<=t&&r[n];n++){const s=r[n].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return n}return-1}findEventIndex(e){const t=this.items;if(t)for(let n=t.length;n--;){var r;if(((r=t[n].event)==null?void 0:r.identifier)===e)return n}return-1}findAssetIndex(e,t){const r=e.assetList,n=r.length;if(n>1)for(let s=0;s<n;s++){const A=r[s];if(!A.error){const a=A.timelineStart;if(t===a||t>a&&t<a+(A.duration||0))return s}}return 0}get assetIdAtEnd(){var e,t;const r=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(r){const n=r.assetList,s=n[n.length-1];if(s)return s.identifier}return null}parseInterstitialDateRanges(e,t){const r=e.main.details,{dateRanges:n}=r,s=this.events,A=this.parseDateRanges(n,{url:r.url},t),a=Object.keys(n),l=s?s.filter(o=>!a.includes(o.identifier)):[];A.length&&A.sort((o,h)=>{const d=o.cue.pre,g=o.cue.post,v=h.cue.pre,E=h.cue.post;if(d&&!v)return-1;if(v&&!d||g&&!E)return 1;if(E&&!g)return-1;if(!d&&!v&&!g&&!E){const T=o.startTime,F=h.startTime;if(T!==F)return T-F}return o.dateRange.tagOrder-h.dateRange.tagOrder}),this.events=A,l.forEach(o=>{this.removeEvent(o)}),this.updateSchedule(e,l)}updateSchedule(e,t=[]){const r=this.events||[];if(r.length||t.length||this.length<2){const n=this.items,s=this.parseSchedule(r,e);(t.length||(n==null?void 0:n.length)!==s.length||s.some((a,l)=>Math.abs(a.playout.start-n[l].playout.start)>.005||Math.abs(a.playout.end-n[l].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,n))}}parseDateRanges(e,t,r){const n=[],s=Object.keys(e);for(let A=0;A<s.length;A++){const a=s[A],l=e[a];if(l.isInterstitial){let o=this.eventMap[a];o?o.setDateRange(l):(o=new xa(l,t),this.eventMap[a]=o,r===!1&&(o.appendInPlace=r)),n.push(o)}}return n}parseSchedule(e,t){const r=[],n=t.main.details,s=n.live?1/0:n.edge;let A=0;if(e=e.filter(l=>!l.error&&!(l.cue.once&&l.hasPlayed)),e.length){this.resolveOffsets(e,t);let l=0,o=0;if(e.forEach((h,d)=>{const g=h.cue.pre,v=h.cue.post,E=e[d-1]||null,T=h.appendInPlace,F=v?s:h.startOffset,J=h.duration,ce=h.timelineOccupancy===xA.Range?J:0,Ae=h.resumptionOffset,de=(E==null?void 0:E.startTime)===F,Te=F+h.cumulativeDuration;let He=T?Te+J:F+Ae;if(g||!v&&F<=0){const Ne=o;o+=ce,h.timelineStart=Te;const je=A;A+=J,r.push({event:h,start:Te,end:He,playout:{start:je,end:A},integrated:{start:Ne,end:o}})}else if(F<=s){if(!de){const Oe=F-l;if(Oe>Gs){const gt=l,Pt=o;o+=Oe;const hr=A;A+=Oe;const jt={previousEvent:e[d-1]||null,nextEvent:h,start:gt,end:gt+Oe,playout:{start:hr,end:A},integrated:{start:Pt,end:o}};r.push(jt)}else Oe>0&&E&&(E.cumulativeDuration+=Oe,r[r.length-1].end=F)}v&&(He=Te),h.timelineStart=Te;const Ne=o;o+=ce;const je=A;A+=J,r.push({event:h,start:Te,end:He,playout:{start:je,end:A},integrated:{start:Ne,end:o}})}else return;const xe=h.resumeTime;v||xe>s?l=s:l=xe}),l<s){var a;const h=l,d=o,g=s-l;o+=g;const v=A;A+=g,r.push({previousEvent:((a=r[r.length-1])==null?void 0:a.event)||null,nextEvent:null,start:l,end:h+g,playout:{start:v,end:A},integrated:{start:d,end:o}})}this.setDurations(s,A,o)}else r.push({previousEvent:null,nextEvent:null,start:0,end:s,playout:{start:0,end:s},integrated:{start:0,end:s}}),this.setDurations(s,s,s);return r}setDurations(e,t,r){this.durations={primary:e,playout:t,integrated:r}}resolveOffsets(e,t){const r=t.main.details,n=r.live?1/0:r.edge;let s=0,A=-1;e.forEach((a,l)=>{const o=a.cue.pre,h=a.cue.post,d=o?0:h?n:a.startTime;this.updateAssetDurations(a),A===d?a.cumulativeDuration=s:(s=0,A=d),!h&&a.snapOptions.in&&(a.resumeAnchor=lr(null,r.fragments,a.startOffset+a.resumptionOffset,0,0)||void 0),a.appendInPlace&&!a.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(a,t)||(a.appendInPlace=!1)),!a.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<Gs&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${a}`));const v=V(a.resumeOffset)?a.resumeOffset:a.duration;s+=v})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>ys?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):t?!Object.keys(t).some(A=>{const a=t[A].details,l=a.edge;if(r>=l)return this.log(`"${e.identifier}" resumption ${r} past ${A} playlist end ${l}`),!1;const o=lr(null,a.fragments,r);if(!o)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${A} playlist (${a.fragStart}-${a.fragmentEnd})`),!0;const h=A==="audio"?.175:0;return Math.abs(o.start-r)<ys+h||Math.abs(o.end-r)<ys+h?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${A} fragment bounds (${o.start}-${o.end} sn: ${o.sn} cc: ${o.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${r} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let r=0,n=!1,s=!1;e.assetList.forEach((A,a)=>{const l=t+r;A.startOffset=r,A.timelineStart=l,n||(n=A.duration===null),s||(s=!!A.error);const o=A.error?0:A.duration||0;r+=o}),n&&!s?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Oi(i){return`[${i.event?'"'+i.event.identifier+'"':"primary"}: ${i.start.toFixed(2)}-${i.end.toFixed(2)}]`}class Ro{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const r=e.assetListUrl;let n;try{n=Fa(r,this.hls.sessionId,e.baseUrl)}catch(g){const v=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,g,r);this.hls.trigger(m.ERROR,v);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const s=this.hls.config,A=s.loader,a=new A(s),l={responseType:"json",url:n.href},o=s.interstitialAssetListLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,v,E,T)=>{const F=g.data,J=F==null?void 0:F.ASSETS;if(!Array.isArray(J)){const ce=this.assignAssetListError(e,W.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),E.url,v,T);this.hls.trigger(m.ERROR,ce);return}e.assetListResponse=F,this.hls.trigger(m.ASSET_LIST_LOADED,{event:e,assetListResponse:F,networkDetails:T})},onError:(g,v,E,T)=>{const F=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${g.code} ${g.text} (${v.url})`),v.url,T,E);this.hls.trigger(m.ERROR,F)},onTimeout:(g,v,E)=>{const T=this.assignAssetListError(e,W.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${v.url})`),v.url,g,E);this.hls.trigger(m.ERROR,T)}};return a.load(l,h,d),this.hls.trigger(m.ASSET_LIST_LOADING,{event:e}),a}assignAssetListError(e,t,r,n,s,A){return e.error=r,{type:he.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:A,stats:s}}}function Qo(i){i==null||i.play().catch(()=>{})}class ko extends M{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;const n=r-this.timelinePos;if(Math.abs(n)<1/7056e5)return;const A=n<=-.01;this.timelinePos=r,this.bufferedPos=r;const a=this.playingItem;if(!a){this.checkBuffer();return}if(A&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(),this.checkBuffer(),A&&r<a.start||r>=a.end){var l;const g=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(a)&&(l=this.media)!=null&&l.paused&&(this.shouldPlay=!1),!A){const v=this.findItemIndex(a);if(g>v){const E=this.schedule.findJumpRestrictedIndex(v+1,g);if(E>v){this.setSchedulePosition(E);return}}}this.setSchedulePosition(g);return}const o=this.playingAsset;if(!o){if(this.playingLastItem&&this.isInterstitial(a)){const g=a.event.assetList[0];g&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,g))}return}const h=o.timelineStart,d=o.duration||0;(A&&r<h||r>=h+d)&&this.setScheduleToAssetAtTime(r,o)},this.onTimeupdate=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;if(r>this.timelinePos)this.timelinePos=r,r>this.bufferedPos&&this.checkBuffer();else return;const n=this.playingItem;if(!n||this.playingLastItem)return;if(r>=n.end){this.timelinePos=n.end;const a=this.findItemIndex(n);this.setSchedulePosition(a+1)}const s=this.playingAsset;if(!s)return;const A=s.timelineStart+(s.duration||0);r>=A&&this.setScheduleToAssetAtTime(r,s)},this.onScheduleUpdate=(r,n)=>{const s=this.schedule,A=this.playingItem,a=s.events||[],l=s.items||[],o=s.durations,h=r.map(E=>E.identifier),d=!!(a.length||h.length);(d||n)&&this.log(`INTERSTITIALS_UPDATED (${a.length}): ${a}
Schedule: ${l.map(E=>Oi(E))} pos: ${this.timelinePos}`),h.length&&this.log(`Removed events ${h}`),this.playerQueue.forEach(E=>{if(E.interstitial.appendInPlace){const T=E.assetItem.timelineStart,F=E.timelineOffset-T;if(F)try{E.timelineOffset=T}catch(J){Math.abs(F)>ys&&this.warn(`${J} ("${E.assetId}" ${E.timelineOffset}->${T})`)}}});let g=null;if(A){const E=this.updateItem(A,this.timelinePos);this.itemsMatch(A,E)&&(this.playingItem=E,this.waitingItem=this.endedItem=null,g=()=>this.trimInPlace(E,A))}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const v=this.bufferingItem;if(v){const E=this.updateItem(v,this.bufferedPos);this.itemsMatch(v,E)?(this.bufferingItem=E,g||(g=()=>this.trimInPlace(E,v))):v.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(v.event,null))}if(r.forEach(E=>{E.assetList.forEach(T=>{this.clearAssetPlayer(T.identifier,null)})}),d||n){if(this.hls.trigger(m.INTERSTITIALS_UPDATED,{events:a.slice(0),schedule:l.slice(0),durations:o,removedIds:h}),this.isInterstitial(A)&&h.includes(A.event.identifier)){this.warn(`Interstitial "${A.event.identifier}" removed while playing`),this.primaryFallback(A.event);return}g&&g(),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Ro(e),this.schedule=new SA(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(m.MEDIA_ENDED,this.onMediaEnded,this),e.on(m.ERROR,this.onError,this),e.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(m.MEDIA_ENDED,this.onMediaEnded,this),e.off(m.ERROR,this.onError,this),e.off(m.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){fi(e,"play",this.onPlay),fi(e,"pause",this.onPause),fi(e,"seeking",this.onSeeking),fi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const r=this.media=t.media;Ai(r,"seeking",this.onSeeking),Ai(r,"timeupdate",this.onTimeupdate),Ai(r,"play",this.onPlay),Ai(r,"pause",this.onPause)}onMediaAttached(e,t){const r=this.effectivePlayingItem,n=this.detachedData;if(this.detachedData=null,r===null)this.checkStart();else if(!n){this.clearScheduleState();const s=this.findItemIndex(r);this.setSchedulePosition(s)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(this.media=null,!r&&(n&&this.removeMediaListeners(n),this.detachedData)){const s=this.getBufferingPlayer();s&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,s.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,r=d=>d&&e.getAssetPlayer(d.identifier),n=(d,g,v,E,T)=>{if(d){let F=d[g].start;const J=d.event;if(J){if(g==="playout"||J.timelineOccupancy!==xA.Point){const ce=r(v);(ce==null?void 0:ce.interstitial)===J&&(F+=ce.assetItem.startOffset+ce[T])}}else{const ce=E==="bufferedPos"?A():e[E];F+=ce-d.start}return F}return 0},s=(d,g)=>{if(d!==0&&g!=="primary"&&e.schedule.length){var v;const E=e.schedule.findItemIndexAtTime(d),T=(v=e.schedule.items)==null?void 0:v[E];if(T){const F=T[g].start-T.start;return d+F}}return d},A=()=>{const d=e.bufferedPos;return d===Number.MAX_VALUE?a("primary"):Math.max(d,0)},a=d=>{var g;return(g=e.primaryDetails)!=null&&g.live?e.primaryDetails.edge:e.schedule.durations[d]},l=(d,g)=>{var v,E;const T=e.effectivePlayingItem;if(T!=null&&(v=T.event)!=null&&v.restrictions.skip)return;e.log(`seek to ${d} "${g}"`);const F=e.effectivePlayingItem,J=e.schedule.findItemIndexAtTime(d,g),ce=(E=e.schedule.items)==null?void 0:E[J],Ae=e.getBufferingPlayer(),de=Ae==null?void 0:Ae.interstitial,Te=de==null?void 0:de.appendInPlace,He=F&&e.itemsMatch(F,ce);if(F&&(Te||He)){const Ne=r(e.playingAsset),je=(Ne==null?void 0:Ne.media)||e.primaryMedia;if(je){const Oe=g==="primary"?je.currentTime:n(F,g,e.playingAsset,"timelinePos","currentTime"),gt=d-Oe,Pt=(Te?Oe:je.currentTime)+gt;if(Pt>=0&&(!Ne||Te||Pt<=Ne.duration)){je.currentTime=Pt;return}}}if(ce){let Ne=d;if(g!=="primary"){const Oe=ce[g].start,gt=d-Oe;Ne=ce.start+gt}const je=!e.isInterstitial(ce);if((!e.isInterstitial(F)||F.event.appendInPlace)&&(je||ce.event.appendInPlace)){const Oe=e.media||(Te?Ae==null?void 0:Ae.media:null);Oe&&(Oe.currentTime=Ne)}else if(F){const Oe=e.findItemIndex(F);if(J>Oe){const Pt=e.schedule.findJumpRestrictedIndex(Oe+1,J);if(Pt>Oe){e.setSchedulePosition(Pt);return}}let gt=0;if(je)e.timelinePos=Ne,e.checkBuffer();else{var xe;const Pt=ce==null||(xe=ce.event)==null?void 0:xe.assetList;if(Pt){const hr=d-(ce[g]||ce).start;for(let jt=Pt.length;jt--;){const Jt=Pt[jt];if(Jt.duration&&hr>=Jt.startOffset&&hr<Jt.startOffset+Jt.duration){gt=jt;break}}}}e.setSchedulePosition(J,gt)}}},o=()=>{const d=e.effectivePlayingItem;if(e.isInterstitial(d))return d;const g=t();return e.isInterstitial(g)?g:null},h={get currentTime(){const d=o(),g=e.effectivePlayingItem;return g&&g===d?n(g,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-g.playout.start:0},set currentTime(d){const g=o(),v=e.effectivePlayingItem;v&&v===g&&l(d+v.playout.start,"playout")},get duration(){const d=o();return d?d.playout.end-d.playout.start:0},get assetPlayers(){var d;const g=(d=o())==null?void 0:d.event.assetList;return g?g.map(v=>e.getAssetPlayer(v.identifier)):[]},get playingIndex(){var d;const g=(d=o())==null?void 0:d.event;return g&&e.effectivePlayingAsset?g.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return o()}};this.manager={get events(){var d,g;return((d=e.schedule)==null||(g=d.events)==null?void 0:g.slice(0))||[]},get schedule(){var d,g;return((d=e.schedule)==null||(g=d.items)==null?void 0:g.slice(0))||[]},get interstitialPlayer(){return o()?h:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const d=t();return e.findItemIndex(d)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const d=e.effectivePlayingItem;return e.findItemIndex(d)},primary:{get bufferedEnd(){return A()},get currentTime(){const d=e.timelinePos;return d>0?d:0},set currentTime(d){l(d,"primary")},get duration(){return a("primary")},get seekableStart(){var d;return((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0}},integrated:{get bufferedEnd(){return n(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return n(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(d){l(d,"integrated")},get duration(){return a("integrated")},get seekableStart(){var d;return s(((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0,"integrated")}},skip:()=>{const d=e.effectivePlayingItem,g=d==null?void 0:d.event;if(g&&!g.restrictions.skip){const v=e.findItemIndex(d);if(g.appendInPlace){const E=d.playout.start+d.event.duration;l(E+.001,"playout")}else e.advanceAfterAssetEnded(g,v,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,r=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!r?!1:this.findItemIndex(t)===r.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,r;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let s=this.media;!s&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(s=this.primaryMedia);const A=(r=s)==null?void 0:r.currentTime;if(!(A===void 0||!V(A)))return A}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,t)}transferMediaFromPlayer(e,t){const r=e.interstitial.appendInPlace,n=e.media;if(r&&n===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&n){this.detachedData={media:n};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Kr(s)}`),this.detachedData=s}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}transferMediaTo(e,t){var r,n;if(e.media===t)return;let s=null;const A=this.hls,a=e!==A,l=a&&e.interstitial.appendInPlace,o=(r=this.detachedData)==null?void 0:r.mediaSource;let h;if(A.media)l&&(s=A.transferMedia(),this.detachedData=s),h="Primary";else if(o){const v=this.getBufferingPlayer();v?(s=v.transferMedia(),h=`${v}`):h="detached MediaSource"}else h="detached media";if(!s){if(o)s=this.detachedData,this.log(`using detachedData: MediaSource ${Kr(s)}`);else if(!this.detachedData||A.media===t){const v=this.playerQueue;v.length>1&&v.forEach(E=>{if(a&&E.interstitial.appendInPlace!==l){const T=E.interstitial;this.clearInterstitial(E.interstitial,null),T.appendInPlace=!1,T.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${T}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const d=s&&"mediaSource"in s&&((n=s.mediaSource)==null?void 0:n.readyState)!=="closed",g=d&&s?s:t;if(this.log(`${d?"transfering MediaSource":"attaching media"} to ${a?e:"Primary"} from ${h}`),g===s){const v=a&&e.assetId===this.schedule.assetIdAtEnd;g.overrides={duration:this.schedule.duration,endOfStream:!a||v,cueRemoval:!a}}e.attachMedia(g)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const r=this.timelinePos,n=this.effectivePlayingItem;if(r===-1){const s=this.hls.startPosition;if(this.timelinePos=s,t.length&&t[0].cue.pre){const A=e.findEventIndex(t[0].identifier);this.setSchedulePosition(A)}else if(s>=0||!this.primaryLive){const A=this.timelinePos=s>0?s:0,a=e.findItemIndexAtTime(A);this.setSchedulePosition(a)}}else if(n&&!this.playingItem){const s=e.findItemIndex(n);this.setSchedulePosition(s)}}advanceAfterAssetEnded(e,t,r){const n=$s(e,r);if(!e.isAssetPastPlayoutLimit(n))this.setSchedulePosition(t,n);else{const s=this.schedule.items;if(s){const A=t+1,a=s.length;if(A>=a){this.setSchedulePosition(-1);return}const l=e.resumeTime;this.timelinePos<l&&(this.timelinePos=l,this.checkBuffer()),this.setSchedulePosition(A)}}}setScheduleToAssetAtTime(e,t){const r=this.schedule,n=t.parentIdentifier,s=r.getEvent(n);if(s){const A=r.findEventIndex(n),a=r.findAssetIndex(s,e);this.advanceAfterAssetEnded(s,A,a-1)}}setSchedulePosition(e,t){const r=this.schedule.items;if(!r||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const n=e>=0?r[e]:null,s=this.playingItem,A=this.playingLastItem;if(this.isInterstitial(s)){var a;const o=s.event,h=this.playingAsset,d=h==null?void 0:h.identifier,g=d?this.getAssetPlayer(d):null;if(g&&d&&(!this.eventItemsMatch(s,n)||t!==void 0&&d!==((a=o.assetList)==null?void 0:a[t].identifier))){var l;const v=o.findAssetIndex(h);this.log(`INTERSTITIAL_ASSET_ENDED ${v+1}/${o.assetList.length} ${As(h)}`),this.endedAsset=h,this.playingAsset=null,this.hls.trigger(m.INTERSTITIAL_ASSET_ENDED,{asset:h,assetListIndex:v,event:o,schedule:r.slice(0),scheduleIndex:e,player:g}),this.retreiveMediaSource(d,n),g.media&&!((l=this.detachedData)!=null&&l.mediaSource)&&g.detachMedia()}if(!this.eventItemsMatch(s,n)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${o} ${Oi(s)}`),o.hasPlayed=!0,this.hls.trigger(m.INTERSTITIAL_ENDED,{event:o,schedule:r.slice(0),scheduleIndex:e}),o.cue.once)){this.updateSchedule();const v=this.schedule.items;if(n&&v){const E=this.schedule.findItemIndex(n);this.advanceSchedule(E,v,t,s,A)}return}}this.advanceSchedule(e,r,t,s,A)}advanceSchedule(e,t,r,n,s){const A=e>=0?t[e]:null,a=this.primaryMedia,l=this.playerQueue;if(l.length&&l.forEach(o=>{const h=o.interstitial,d=this.schedule.findEventIndex(h.identifier);(d<e||d>e+1)&&this.clearInterstitial(h,A)}),this.isInterstitial(A)){this.timelinePos=Math.min(Math.max(this.timelinePos,A.start),A.end);const o=A.event;if(r===void 0){r=this.schedule.findAssetIndex(o,this.timelinePos);const v=$s(o,r-1);if(o.isAssetPastPlayoutLimit(v)){this.advanceAfterAssetEnded(o,e,r);return}r=v}const h=this.waitingItem;this.assetsBuffered(A,a)||this.setBufferingItem(A);let d=this.preloadAssets(o,r);if(this.eventItemsMatch(A,h||n)||(this.waitingItem=A,this.log(`INTERSTITIAL_STARTED ${Oi(A)} ${o.appendInPlace?"append in place":""}`),this.hls.trigger(m.INTERSTITIAL_STARTED,{event:o,schedule:t.slice(0),scheduleIndex:e})),!o.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${o}`);return}if(o.assetListLoader&&(o.assetListLoader.destroy(),o.assetListLoader=void 0),!a){this.log(`Waiting for attachMedia to start Interstitial ${o}`);return}this.waitingItem=this.endedItem=null,this.playingItem=A;const g=o.assetList[r];if(!g){const v=t[e+1],E=this.media;v&&E&&!this.isInterstitial(v)&&E.currentTime<v.start&&(E.currentTime=this.timelinePos=v.start),this.advanceAfterAssetEnded(o,e,r||0);return}if(d||(d=this.getAssetPlayer(g.identifier)),d===null||d.destroyed){const v=o.assetList.length;this.warn(`asset ${r+1}/${v} player destroyed ${o}`),d=this.createAssetPlayer(o,g,r)}if(!this.eventItemsMatch(A,this.bufferingItem)&&o.appendInPlace&&this.isAssetBuffered(g))return;this.startAssetPlayer(d,r,t,e,a),this.shouldPlay&&Qo(d.media)}else A!==null?(this.resumePrimary(A,e,n),this.shouldPlay&&Qo(this.hls.media)):s&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,r){var n;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Oi(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let A=this.timelinePos;(A<e.start||A>=e.end)&&(A=this.getPrimaryResumption(e,t),this.timelinePos=A),this.attachPrimary(A,e)}if(!r)return;const s=this.schedule.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Oi(e)}`),this.hls.trigger(m.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const r=e.start;if(this.primaryLive){const n=this.primaryDetails;if(t===0)return this.hls.startPosition;if(n&&(r<n.fragmentStart||r>n.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:ur.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,r){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const n=this.primaryMedia;if(!n)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,n),r&&this.startLoadingPrimaryAt(e,r)),r||(this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}startLoadingPrimaryAt(e,t){var r;const n=this.hls;!n.loadingEnabled||!n.media||Math.abs((((r=n.mainForwardBufferInfo)==null?void 0:r.start)||n.media.currentTime)-e)>.5?n.startLoad(e,t):n.bufferingEnabled||n.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(m.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(m.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const r=this.hls.levels[t.level],n=C(C({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const r=this.hls.audioTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=C(C({},this.altSelection),{},{audio:r});return}const s=C(C({},n),{},{audio:r});this.mediaSelection=s}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=C(C({},this.altSelection),{},{subtitles:r});return}const s=C(C({},n),{},{subtitles:r});this.mediaSelection=s}onAudioTrackSwitching(e,t){const r=yr(t);this.playerQueue.forEach(n=>n.hls.setAudioOption(t)||n.hls.setAudioOption(r))}onSubtitleTrackSwitch(e,t){const r=yr(t);this.playerQueue.forEach(n=>n.hls.setSubtitleOption(t)||t.id!==-1&&n.hls.setSubtitleOption(r))}onBufferCodecs(e,t){const r=t.tracks;r&&(this.requiredTracks=r)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){const n=this.timelinePos;this.bufferedPos=n,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let n=0;n<t.length;n++){const s=t[n];if(s.cue.post){var r;const A=this.schedule.findEventIndex(s.identifier),a=(r=this.schedule.items)==null?void 0:r[A];this.isInterstitial(a)&&this.eventItemsMatch(a,this.bufferingItem)&&this.bufferedToItem(a,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const r=this.findItemIndex(t);this.setSchedulePosition(r+1)}else this.shouldPlay=!1}updateItem(e,t){const r=this.schedule.items;if(e&&r){const n=this.findItemIndex(e,t);return r[n]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((s,A)=>{e.event.isAssetPastPlayoutLimit(A)&&this.clearAssetPlayer(s.identifier,null)});const r=e.end+.25,n=ur.bufferInfo(this.primaryMedia,r,0);(n.end>r||(n.nextStart||0)>r)&&(this.attachPrimary(r,null),this.flushFrontBuffer(r))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var r;return!!t&&(e===t||e.event.identifier===((r=t.event)==null?void 0:r.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const r=ur.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,t,e)}updateBufferedPos(e,t,r){const n=this.schedule,s=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],s)){this.bufferedPos=e;return}const A=this.playingItem,a=this.findItemIndex(A);let l=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var o,h;const d=this.findItemIndex(s),g=Math.min(d+1,t.length-1),v=t[g];if((l===-1&&s&&e>=s.end||(o=v.event)!=null&&o.appendInPlace&&e+.01>=v.start)&&(l=g),g-a>1&&(s==null||(h=s.event)==null?void 0:h.appendInPlace)===!1)return;if(this.bufferedPos=e,l>d&&l>a)this.bufferedToItem(v);else{const E=this.primaryDetails;this.primaryLive&&E&&e>E.edge-E.targetduration&&v.start<E.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(v)&&this.preloadAssets(v.event,0)}}else r&&A&&!this.itemsMatch(A,s)&&(l===a?this.bufferedToItem(A):l===a+1&&this.bufferedToItem(t[l]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(n=>{const s=this.getAssetPlayer(n.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,r=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:n,events:s}=r;if(!n||!s)return t;const A=this.isInterstitial(e),a=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const l=a?a.remaining:t?t.end-this.timelinePos:0;this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Oi(e)}`+(t?` (${l.toFixed(2)} remaining)`:"")),this.playbackDisabled||(A?e.event.assetList.forEach(o=>{const h=this.getAssetPlayer(o.identifier);h&&h.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(o=>o.pauseBuffering()))),this.hls.trigger(m.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const r=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(r!==null){this.bufferingAsset=null;const n=this.detachedData;n?n.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),r=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(r)}bufferedToEvent(e,t){const r=e.event,n=r.assetList.length===0&&!r.assetListLoader,s=r.cue.once;if(n||!s){const A=this.preloadAssets(r,t);if(A!=null&&A.interstitial.appendInPlace){const a=r.assetList[t],l=this.primaryMedia;a&&l&&this.bufferAssetPlayer(A,l)}}}preloadAssets(e,t){const r=e.assetUrl,n=e.assetList.length,s=n===0&&!e.assetListLoader,A=e.cue.once;if(s){const l=e.timelineStart;if(e.appendInPlace){var a;const g=this.playingItem;!this.isInterstitial(g)&&(g==null||(a=g.nextEvent)==null?void 0:a.identifier)===e.identifier&&this.flushFrontBuffer(l+.25)}let o,h=0;if(!this.playingItem&&this.primaryLive&&(h=this.hls.startPosition,h===-1&&(h=this.hls.liveSyncPosition||0)),h&&!(e.cue.pre||e.cue.post)){const g=h-l;g>0&&(o=Math.round(g*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${r?1:n} ${e}${o?` live-start: ${h} start-offset: ${o}`:""}`),r)return this.createAsset(e,0,0,l,e.duration,r);const d=this.assetListLoader.loadAssetList(e,o);d&&(e.assetListLoader=d)}else if(!A&&n){for(let l=t;l<n;l++){const o=e.assetList[l],h=this.getAssetPlayerQueueIndex(o.identifier);(h===-1||this.playerQueue[h].destroyed)&&!o.error&&this.createAssetPlayer(e,o,l)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(n=>{this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let r=0;r<t.length;r++)if(e===t[r].assetId)return r;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let r=0;r<e.length;r++)if(e[r].media===t)return e[r]}return null}createAsset(e,t,r,n,s,A){const a={parentIdentifier:e.identifier,identifier:Lo(e,A,t),duration:s,startOffset:r,timelineStart:n,uri:A};return this.createAssetPlayer(e,a,t)}createAssetPlayer(e,t,r){const n=this.hls,s=n.userConfig;let A=s.videoPreference;const a=n.loadLevelObj||n.levels[n.currentLevel];(A||a)&&(A=y({},A),a.videoCodec&&(A.videoCodec=a.videoCodec),a.videoRange&&(A.allowedVideoRanges=[a.videoRange]));const l=n.audioTracks[n.audioTrack],o=n.subtitleTracks[n.subtitleTrack];let h=0;if(this.primaryLive||e.appendInPlace){const Ae=this.timelinePos-t.timelineStart;if(Ae>1){const de=t.duration;de&&Ae<de&&(h=Ae)}}const d=t.identifier,g=C(C({},s),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:d,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:h,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:A,audioPreference:l||s.audioPreference,subtitlePreference:o||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(g.timelineOffset=t.timelineStart));const v=g.cmcd;v!=null&&v.sessionId&&v.contentId&&(g.cmcd=y({},v,{contentId:Ks(t.uri)})),this.getAssetPlayer(d)&&this.warn(`Duplicate date range identifier ${e} and asset ${d}`);const E=new yu(this.HlsPlayerClass,g,e,t);this.playerQueue.push(E),e.assetList[r]=t;const T=Ae=>{if(Ae.live){const He=new Error(`Interstitials MUST be VOD assets ${e}`),xe={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:He};this.handleAssetItemError(xe,e,this.schedule.findEventIndex(e.identifier),r,He.message);return}const de=Ae.edge-Ae.fragmentStart,Te=t.duration;(Te===null||de>Te)&&(this.log(`Interstitial asset "${d}" duration change ${Te} > ${de}`),t.duration=de,this.updateSchedule())};E.on(m.LEVEL_UPDATED,(Ae,{details:de})=>T(de)),E.on(m.LEVEL_PTS_UPDATED,(Ae,{details:de})=>T(de));const F=(Ae,de)=>{const Te=this.getAssetPlayer(d);if(Te&&de.tracks){Te.off(m.BUFFER_CODECS,F),Te.tracks=de.tracks;const He=this.primaryMedia;this.bufferingAsset===Te.assetItem&&He&&!Te.media&&this.bufferAssetPlayer(Te,He)}};E.on(m.BUFFER_CODECS,F);const J=()=>{var Ae;const de=this.getAssetPlayer(d);if(this.log(`buffered to end of asset ${de}`),!de)return;const Te=this.schedule.findEventIndex(e.identifier),He=(Ae=this.schedule.items)==null?void 0:Ae[Te];if(this.isInterstitial(He)){const Ne=e.findAssetIndex(t),je=$s(e,Ne);if(!e.isAssetPastPlayoutLimit(je))this.bufferedToItem(He,je);else{var xe;const Oe=(xe=this.schedule.items)==null?void 0:xe[Te+1];Oe&&this.bufferedToItem(Oe)}}};E.on(m.BUFFERED_TO_END,J);const ce=Ae=>()=>{if(!this.getAssetPlayer(d))return;this.shouldPlay=!0;const Te=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Te,Ae)};return E.once(m.MEDIA_ENDED,ce(r)),E.once(m.PLAYOUT_LIMIT_REACHED,ce(1/0)),E.on(m.ERROR,(Ae,de)=>{const Te=this.getAssetPlayer(d);if(de.details===W.BUFFER_STALLED_ERROR){if(Te!=null&&Te.media){const He=Te.currentTime,xe=Te.duration-He;He&&e.appendInPlace&&xe/Te.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${d} ${e} at ${Te.media.currentTime}`),J()):(this.warn(`Stalled at ${He} of ${He+xe} in asset ${d} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(de,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${de.error} ${e}`)}),E.on(m.DESTROYING,()=>{if(!this.getAssetPlayer(d))return;const de=new Error(`Asset player destroyed unexpectedly ${d}`),Te={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:de};this.handleAssetItemError(Te,e,this.schedule.findEventIndex(e.identifier),r,de.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${As(t)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:E}),E}clearInterstitial(e,t){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,t)}),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const r=this.playerQueue[t];this.transferMediaFromPlayer(r,null),r.resetDetails()}}clearAssetPlayer(e,t){const r=this.getAssetPlayerQueueIndex(e);if(r!==-1){this.log(`clear asset player "${e}" toSegment: ${t&&Oi(t)}`);const n=this.playerQueue[r];this.transferMediaFromPlayer(n,t),this.playerQueue.splice(r,1),n.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,r,n,s){const{interstitial:A,assetItem:a,assetId:l}=e,o=A.assetList.length,h=this.playingAsset;this.endedAsset=null,this.playingAsset=a,(!h||h.identifier!==l)&&(h&&(this.clearAssetPlayer(h.identifier,r[n]),delete h.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${o} ${As(a)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_STARTED,{asset:a,assetListIndex:t,event:A,schedule:r.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,t){var r,n;const{interstitial:s,assetItem:A}=e,a=this.schedule.findEventIndex(s.identifier),l=(r=this.schedule.items)==null?void 0:r[a];if(!l)return;this.setBufferingItem(l),this.bufferingAsset=A;const o=this.getBufferingPlayer();if(o===e)return;const h=s.appendInPlace;if(h&&(o==null?void 0:o.interstitial.appendInPlace)===!1)return;const d=(o==null?void 0:o.tracks)||((n=this.detachedData)==null?void 0:n.tracks)||this.requiredTracks;if(h&&A!==this.playingAsset){if(!e.tracks)return;if(d&&!ue(d,e.tracks)){const g=new Error(`Asset ${As(A)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(d)}')`),v={fatal:!0,type:he.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:g},E=s.findAssetIndex(A);this.handleAssetItemError(v,s,a,E,g.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,r,n,s){if(e.details===W.BUFFER_STALLED_ERROR)return;const A=t.assetList[n];this.warn(`INTERSTITIAL_ASSET_ERROR ${A&&As(A)} ${e.error}`);const a=A==null?void 0:A.identifier,l=this.getAssetPlayerQueueIndex(a),o=this.playerQueue[l]||null,h=this.schedule.items,d=y({},e,{fatal:!1,errorAction:mt(!0),asset:A,assetListIndex:n,event:t,schedule:h,scheduleIndex:r,player:o});if(this.hls.trigger(m.INTERSTITIAL_ASSET_ERROR,d),!e.fatal)return;const g=this.playingAsset,v=new Error(s);if(A&&(this.clearAssetPlayer(a,null),A.error=v),!t.assetList.some(E=>!E.error))t.error=v;else if(t.appendInPlace){for(let E=n;E<t.assetList.length;E++)this.resetAssetPlayer(t.assetList[E].identifier);this.updateSchedule()}t.error?this.primaryFallback(t):g&&g.identifier===a&&this.advanceAfterAssetEnded(t,r,n)}primaryFallback(e){const t=e.timelineStart,r=this.effectivePlayingItem;if(this.updateSchedule(),r){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${r?Oi(r):"<none>"} error: ${e.error}`);let n=this.timelinePos;n===-1&&(n=this.hls.startPosition);const s=this.updateItem(r,n);this.itemsMatch(r,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));const A=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(A)}else this.checkStart()}onAssetListLoaded(e,t){var r;const n=t.event,s=n.identifier,A=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(s))return;const a=n.timelineStart,l=n.duration;let o=0;A.forEach((E,T)=>{const F=parseFloat(E.DURATION);this.createAsset(n,T,o,a+o,F,E.URI),o+=F}),n.duration=o,this.log(`Loaded asset-list with duration: ${o} (was: ${l}) ${n}`);const h=this.waitingItem,d=(h==null?void 0:h.event.identifier)===s;this.updateSchedule();const g=(r=this.bufferingItem)==null?void 0:r.event;if(d){var v;const E=this.schedule.findEventIndex(s),T=(v=this.schedule.items)==null?void 0:v[E];if(T){if(!this.playingItem&&this.timelinePos>T.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==E){n.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${n}`),this.primaryFallback(n);return}this.setBufferingItem(T)}this.setSchedulePosition(E)}else if((g==null?void 0:g.identifier)===s&&g.appendInPlace){const E=n.assetList[0],T=this.getAssetPlayer(E.identifier),F=this.primaryMedia;E&&T&&F&&this.bufferAssetPlayer(T,F)}}onError(e,t){switch(t.details){case W.ASSET_LIST_PARSING_ERROR:case W.ASSET_LIST_LOAD_ERROR:case W.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&this.primaryFallback(r);break}case W.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Sa=500;class Bu extends mn{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",O.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=nt.IDLE,this.setInterval(Sa),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:r,success:n}=t;if(ae(r)&&(this.fragPrevious=r),this.state=nt.IDLE,!n)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let A;const a=r.start;for(let o=0;o<s.length;o++)if(a>=s[o].start&&a<=s[o].end){A=s[o];break}const l=r.start+r.duration;A?A.end=l:(A={start:a,end:l},s.push(A)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:r,endOffset:n}=t;if(r===0&&n!==Number.POSITIVE_INFINITY){const s=n-1;if(s<=0)return;t.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(A=>{for(let a=0;a<A.length;){if(A[a].end<=s){A.shift();continue}else if(A[a].start<s)A[a].start=s;else break;a++}}),this.fragmentTracker.removeFragmentsInRange(r,s,O.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===O.SUBTITLE&&(t.details===W.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==nt.STOPPED&&(this.state=nt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&mA(this.levels,t)){this.levels=t.map(r=>new yn(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new yn(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,O.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.state!==nt.STOPPED&&this.setInterval(Sa)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:s}=this,{details:A,id:a}=t;if(!s){this.warn(`Subtitle tracks were reset while loading level ${a}`);return}const l=s[a];if(a>=s.length||!l)return;this.log(`Subtitle track ${a} loaded [${A.startSN},${A.endSN}]${A.lastPartSn?`[part-${A.lastPartSn}-${A.lastPartIndex}]`:""},duration:${A.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let o=0;if(A.live||(r=l.details)!=null&&r.live){const d=this.mainDetails;if(A.deltaUpdateFailed||!d)return;const g=d.fragments[0];if(!l.details)A.hasProgramDateTime&&d.hasProgramDateTime?(cs(A,d),o=A.fragmentStart):g&&(o=g.start,ui(A,o));else{var h;o=this.alignPlaylists(A,l.details,(h=this.levelLastLoaded)==null?void 0:h.details),o===0&&g&&(o=g.start,ui(A,o))}}l.details=A,this.levelLastLoaded=l,a===n&&(this.hls.trigger(m.SUBTITLE_TRACK_UPDATED,{details:A,id:a,groupId:t.groupId}),this.tick(),A.live&&!this.fragCurrent&&this.media&&this.state===nt.IDLE&&(lr(null,A.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,s=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&Zn(n.method)){const A=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,di(n.method)).catch(a=>{throw s.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:a,reason:a.message,frag:t}),a}).then(a=>{const l=performance.now();s.trigger(m.FRAG_DECRYPTED,{frag:t,payload:a,stats:{tstart:A,tdecrypt:l}})}).catch(a=>{this.warn(`${a.name}: ${a.message}`),this.state=nt.IDLE})}}doTick(){if(!this.media){this.state=nt.IDLE;return}if(this.state===nt.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details||this.waitForLive(r))return;const{config:n}=this,s=this.getLoadPosition(),A=ur.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,n.maxBufferHole),{end:a,len:l}=A,o=r.details,h=this.hls.maxBufferLength+o.levelTargetDuration;if(l>h)return;const d=o.fragments,g=d.length,v=o.edge;let E=null;const T=this.fragPrevious;if(a<v){const ce=n.maxFragLookUpTolerance,Ae=a>v-ce?0:ce;E=lr(T,d,Math.max(d[0].start,a),Ae),!E&&T&&T.start<d[0].start&&(E=d[0])}else E=d[g-1];if(E=this.filterReplacedPrimary(E,r.details),!E)return;const F=E.sn-o.startSN,J=d[F-1];if(J&&J.cc===E.cc&&this.fragmentTracker.getState(J)===Rt.NOT_LOADED&&(E=J),this.fragmentTracker.getState(E)===Rt.NOT_LOADED){const ce=this.mapToInitFragWhenRequired(E);ce&&this.loadFragment(ce,r,a)}}}loadFragment(e,t,r){ae(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Eu(this.tracksBuffered[this.currentTrackId]||[])}}class Eu{constructor(e){this.buffered=void 0;const t=(r,n,s)=>{if(n=n>>>0,n>s-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${s})`);return e[n][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}const Bs={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},Ta=i=>String.fromCharCode(Bs[i]||i),un=15,ti=100,Es={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},zi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Yi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Vs={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Pi=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Oo{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;ie.log(`${this.time} [${e}] ${r}`)}}}const ji=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Ia{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let r=0;r<t.length;r++){const n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Da{constructor(){this.uchar=" ",this.penState=new Ia}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Ws{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Ia,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ti;t++)this.chars.push(new Da);this.logger=e}equals(e){for(let t=0;t<ti;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ti;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ti;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>ti&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ti)}moveCursor(e){const t=this.pos+e;if(e>1)for(let r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Ta(e);if(this.pos>=ti){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<ti;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let r=0;r<ti;r++){const n=this.chars[r].uchar;n!==" "&&(t=!1),e.push(n)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class TA{constructor(e){this.rows=[],this.currRow=un-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<un;t++)this.rows.push(new Ws(e));this.logger=e}reset(){for(let e=0;e<un;e++)this.rows[e].clear();this.currRow=un-1}equals(e){let t=!0;for(let r=0;r<un;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<un;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<un;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+Kr(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let a=0;a<un;a++)this.rows[a].clear();const s=this.currRow+1-this.nrRollUpRows,A=this.lastOutputScreen;if(A){const a=A.rows[s].cueStartTime,l=this.logger.time;if(a!==null&&l!==null&&a<l)for(let o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(A.rows[s+o])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,A=Math.max(s-1,0);r.setCursor(e.indent),e.color=r.chars[A].penState.foreground}const n={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(n)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Kr(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let r="",n=-1;for(let s=0;s<un;s++){const A=this.rows[s].getTextString();A&&(n=s+1,e?t.push("Row "+n+": '"+A+"'"):t.push(A.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
`)),r}getTextAndFormat(){return this.rows}}class La{constructor(e,t,r){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.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new TA(r),this.nonDisplayedMemory=new TA(r),this.lastOutputScreen=new TA(r),this.currRollUpRow=this.displayedMemory.rows[un-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[un-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),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=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const r=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[r]}this.logger.log(2,"MIDROW: "+Kr(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class ws{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Cu(),this.logger=void 0;const n=this.logger=new Oo;this.channels=[null,new La(e,t,n),new La(e+1,r,n)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const n=t[r]&127,s=t[r+1]&127;let A=!1,a=null;if(n===0&&s===0)continue;this.logger.log(3,()=>"["+ji([t[r],t[r+1]])+"] -> ("+ji([n,s])+")");const l=this.cmdHistory;if(n>=16&&n<=31){if(wu(n,s,l)){IA(null,null,l),this.logger.log(3,()=>"Repeated command ("+ji([n,s])+") is dropped");continue}IA(n,s,this.cmdHistory),A=this.parseCmd(n,s),A||(A=this.parseMidrow(n,s)),A||(A=this.parsePAC(n,s)),A||(A=this.parseBackgroundAttributes(n,s))}else IA(null,null,l);if(!A&&(a=this.parseChars(n,s),a)){const h=this.currentChannel;h&&h>0?this.channels[h].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!A&&!a&&this.logger.log(2,()=>"Couldn't parse cleaned data "+ji([n,s])+" orig: "+ji([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(r||n))return!1;const s=e===20||e===21||e===23?1:2,A=this.channels[s];return e===20||e===21||e===28||e===29?t===32?A.ccRCL():t===33?A.ccBS():t===34?A.ccAOF():t===35?A.ccAON():t===36?A.ccDER():t===37?A.ccRU(2):t===38?A.ccRU(3):t===39?A.ccRU(4):t===40?A.ccFON():t===41?A.ccRDC():t===42?A.ccTR():t===43?A.ccRTD():t===44?A.ccEDM():t===45?A.ccCR():t===46?A.ccENM():t===47&&A.ccEOC():A.ccTO(t-32),this.currentChannel=s,!0}parseMidrow(e,t){let r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const n=this.channels[r];return n?(n.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+ji([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,s=(e===16||e===24)&&t>=64&&t<=95;if(!(n||s))return!1;const A=e<=23?1:2;t>=64&&t<=95?r=A===1?Es[e]:Yi[e]:r=A===1?zi[e]:Vs[e];const a=this.channels[A];return a?(a.setPAC(this.interpretPAC(r,t)),this.currentChannel=A,!0):!1}interpretPAC(e,t){let r;const n={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,n.underline=(r&1)===1,r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=Math.floor((r-16)/2)*4,n}parseChars(e,t){let r,n=null,s=null;if(e>=25?(r=2,s=e-8):(r=1,s=e),s>=17&&s<=19){let A;s===17?A=t+80:s===18?A=t+112:A=t+144,this.logger.log(2,()=>"Special char '"+Ta(A)+"' in channel "+r),n=[A]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+ji(n).join(",")),n}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=45&&t<=47;if(!(r||n))return!1;let s;const A={};e===16||e===24?(s=Math.floor((t-32)/2),A.background=Pi[s],t%2===1&&(A.background=A.background+"_semi")):t===45?A.background="transparent":(A.foreground="black",t===47&&(A.underline=!0));const a=e<=23?1:2;return this.channels[a].setBkgData(A),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}IA(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r&&r.cueSplitAtTime(e)}}}function IA(i,e,t){t.a=i,t.b=e}function wu(i,e,t){return t.a===i&&t.b===e}function Cu(){return{a:null,b:null}}var Ua=function(){if(bn!=null&&bn.VTTCue)return self.VTTCue;const i=["","lr","rl"],e=["start","middle","end","left","right"];function t(a,l){if(typeof l!="string"||!Array.isArray(a))return!1;const o=l.toLowerCase();return~a.indexOf(o)?o:!1}function r(a){return t(i,a)}function n(a){return t(e,a)}function s(a,...l){let o=1;for(;o<arguments.length;o++){const h=arguments[o];for(const d in h)a[d]=h[d]}return a}function A(a,l,o){const h=this,d={enumerable:!0};h.hasBeenReset=!1;let g="",v=!1,E=a,T=l,F=o,J=null,ce="",Ae=!0,de="auto",Te="start",He=50,xe="middle",Ne=50,je="middle";Object.defineProperty(h,"id",s({},d,{get:function(){return g},set:function(Oe){g=""+Oe}})),Object.defineProperty(h,"pauseOnExit",s({},d,{get:function(){return v},set:function(Oe){v=!!Oe}})),Object.defineProperty(h,"startTime",s({},d,{get:function(){return E},set:function(Oe){if(typeof Oe!="number")throw new TypeError("Start time must be set to a number.");E=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",s({},d,{get:function(){return T},set:function(Oe){if(typeof Oe!="number")throw new TypeError("End time must be set to a number.");T=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",s({},d,{get:function(){return F},set:function(Oe){F=""+Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",s({},d,{get:function(){return J},set:function(Oe){J=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",s({},d,{get:function(){return ce},set:function(Oe){const gt=r(Oe);if(gt===!1)throw new SyntaxError("An invalid or illegal string was specified.");ce=gt,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",s({},d,{get:function(){return Ae},set:function(Oe){Ae=!!Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",s({},d,{get:function(){return de},set:function(Oe){if(typeof Oe!="number"&&Oe!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");de=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",s({},d,{get:function(){return Te},set:function(Oe){const gt=n(Oe);if(!gt)throw new SyntaxError("An invalid or illegal string was specified.");Te=gt,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",s({},d,{get:function(){return He},set:function(Oe){if(Oe<0||Oe>100)throw new Error("Position must be between 0 and 100.");He=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",s({},d,{get:function(){return xe},set:function(Oe){const gt=n(Oe);if(!gt)throw new SyntaxError("An invalid or illegal string was specified.");xe=gt,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",s({},d,{get:function(){return Ne},set:function(Oe){if(Oe<0||Oe>100)throw new Error("Size must be between 0 and 100.");Ne=Oe,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",s({},d,{get:function(){return je},set:function(Oe){const gt=n(Oe);if(!gt)throw new SyntaxError("An invalid or illegal string was specified.");je=gt,this.hasBeenReset=!0}})),h.displayState=void 0}return A.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},A}();class bu{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function DA(i){function e(r,n,s,A){return(r|0)*3600+(n|0)*60+(s|0)+parseFloat(A||0)}const t=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class xu{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,r){for(let n=0;n<r.length;++n)if(t===r[n]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function Po(i,e,t,r){const n=r?i.split(r):[i];for(const s in n){if(typeof n[s]!="string")continue;const A=n[s].split(t);if(A.length!==2)continue;const a=A[0],l=A[1];e(a,l)}}const Ra=new Ua(0,0,""),LA=Ra.align==="middle"?"middle":"center";function Fu(i,e,t){const r=i;function n(){const a=DA(i);if(a===null)throw new Error("Malformed timestamp: "+r);return i=i.replace(/^[^\sa-zA-Z-]+/,""),a}function s(a,l){const o=new xu;Po(a,function(g,v){let E;switch(g){case"region":for(let T=t.length-1;T>=0;T--)if(t[T].id===v){o.set(g,t[T].region);break}break;case"vertical":o.alt(g,v,["rl","lr"]);break;case"line":E=v.split(","),o.integer(g,E[0]),o.percent(g,E[0])&&o.set("snapToLines",!1),o.alt(g,E[0],["auto"]),E.length===2&&o.alt("lineAlign",E[1],["start",LA,"end"]);break;case"position":E=v.split(","),o.percent(g,E[0]),E.length===2&&o.alt("positionAlign",E[1],["start",LA,"end","line-left","line-right","auto"]);break;case"size":o.percent(g,v);break;case"align":o.alt(g,v,["start",LA,"end","left","right"]);break}},/:/,/\s/),l.region=o.get("region",null),l.vertical=o.get("vertical","");let h=o.get("line","auto");h==="auto"&&Ra.line===-1&&(h=-1),l.line=h,l.lineAlign=o.get("lineAlign","start"),l.snapToLines=o.get("snapToLines",!0),l.size=o.get("size",100),l.align=o.get("align",LA);let d=o.get("position","auto");d==="auto"&&Ra.position===50&&(d=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=d}function A(){i=i.replace(/^\s+/,"")}if(A(),e.startTime=n(),A(),i.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);i=i.slice(3),A(),e.endTime=n(),A(),s(i,e)}function UA(i){return i.replace(/<br(?: \/)?>/gi,`
`)}class Qa{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new bu,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function r(){let s=t.buffer,A=0;for(s=UA(s);A<s.length&&s[A]!=="\r"&&s[A]!==`
`;)++A;const a=s.slice(0,A);return s[A]==="\r"&&++A,s[A]===`
`&&++A,t.buffer=s.slice(A),a}function n(s){Po(s,function(A,a){},/:/)}try{let s="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=r();const a=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(a!=null&&a[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let A=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(A?A=!1:s=r(),t.state){case"HEADER":/:/.test(s)?n(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;if(t.cue=new Ua(0,0,""),t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Fu(s,t.cue,t.regionList)}catch(a){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const a=s.indexOf("-->")!==-1;if(!s||a&&(A=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=s}continue;case"BADCUE":s||(t.state="ID")}}}catch(s){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const Mo=/\r\n|\n\r|\n|\r/g,ka=function(e,t,r=0){return e.slice(r,r+t.length)===t},Su=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!V(t)||!V(r)||!V(n)||!V(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*s,t};function RA(i,e,t){return Ks(i.toString())+Ks(e.toString())+Ks(t)}const Tu=function(e,t,r){let n=e[t],s=e[n.prevCC];if(!s||!s.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(A=s)!=null&&A.new;){var A;e.ccOffset+=n.start-s.start,n.new=!1,n=s,s=e[n.prevCC]}e.presentationOffset=r};function Iu(i,e,t,r,n,s,A){const a=new Qa,l=Me(new Uint8Array(i)).trim().replace(Mo,`
`).split(`
`),o=[],h=e?kl(e.baseTime,e.timescale):0;let d="00:00.000",g=0,v=0,E,T=!0;a.oncue=function(F){const J=t[r];let ce=t.ccOffset;const Ae=(g-h)/9e4;if(J!=null&&J.new&&(v!==void 0?ce=t.ccOffset=J.start:Tu(t,r,Ae)),Ae){if(!e){E=new Error("Missing initPTS for VTT MPEGTS");return}ce=Ae-t.presentationOffset}const de=F.endTime-F.startTime,Te=vi((F.startTime+ce-v)*9e4,n*9e4)/9e4;F.startTime=Math.max(Te,0),F.endTime=Math.max(Te+de,0);const He=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(He)),F.id||(F.id=RA(F.startTime,F.endTime,He)),F.endTime>0&&o.push(F)},a.onparsingerror=function(F){E=F},a.onflush=function(){if(E){A(E);return}s(o)},l.forEach(F=>{if(T)if(ka(F,"X-TIMESTAMP-MAP=")){T=!1,F.slice(16).split(",").forEach(J=>{ka(J,"LOCAL:")?d=J.slice(6):ka(J,"MPEGTS:")&&(g=parseInt(J.slice(7)))});try{v=Su(d)/1e3}catch(J){E=J}return}else F===""&&(T=!1);a.parse(F+`
`)}),a.flush()}const Oa="stpp.ttml.im1t",No=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ho=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Pa={left:"start",center:"center",right:"end",start:"start",end:"end"};function Ko(i,e,t,r){const n=p(new Uint8Array(i),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const s=n.map(a=>Me(a)),A=On(e.baseTime,1,e.timescale);try{s.forEach(a=>t(Ma(a,A)))}catch(a){r(a)}}function Ma(i,e){const n=new DOMParser().parseFromString(i,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},A=Object.keys(s).reduce((d,g)=>(d[g]=n.getAttribute(`ttp:${g}`)||s[g],d),{}),a=n.getAttribute("xml:space")!=="preserve",l=tr(Na(n,"styling","style")),o=tr(Na(n,"layout","region")),h=Na(n,"body","[begin]");return[].map.call(h,d=>{const g=as(d,a);if(!g||!d.hasAttribute("begin"))return null;const v=on(d.getAttribute("begin"),A),E=on(d.getAttribute("dur"),A);let T=on(d.getAttribute("end"),A);if(v===null)throw $o(d);if(T===null){if(E===null)throw $o(d);T=v+E}const F=new Ua(v-e,T-e,g);F.id=RA(F.startTime,F.endTime,F.text);const J=o[d.getAttribute("region")],ce=l[d.getAttribute("style")],Ae=QA(J,ce,l),{textAlign:de}=Ae;if(de){const Te=Pa[de];Te&&(F.lineAlign=Te),F.align=de}return y(F,Ae),F}).filter(d=>d!==null)}function Na(i,e,t){const r=i.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function tr(i){return i.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function as(i,e){return[].slice.call(i.childNodes).reduce((t,r,n)=>{var s;return r.nodeName==="br"&&n?t+`
`:(s=r.childNodes)!=null&&s.length?as(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function QA(i,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],A=i!=null&&i.hasAttribute("style")?i.getAttribute("style"):null;return A&&t.hasOwnProperty(A)&&(n=t[A]),s.reduce((a,l)=>{const o=ai(e,r,l)||ai(i,r,l)||ai(n,r,l);return o&&(a[l]=o),a},{})}function ai(i,e,t){return i&&i.hasAttributeNS(e,t)?i.getAttributeNS(e,t):null}function $o(i){return new Error(`Could not parse ttml timestamp ${i}`)}function on(i,e){if(!i)return null;let t=DA(i);return t===null&&(No.test(i)?t=xn(i,e):Ho.test(i)&&(t=kA(i,e))),t}function xn(i,e){const t=No.exec(i),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function kA(i,e){const t=Ho.exec(i),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class OA{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class PA{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Vo(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new OA(this,"textTrack1"),t=new OA(this,"textTrack2"),r=new OA(this,"textTrack3"),n=new OA(this,"textTrack4");this.cea608Parser1=new ws(1,e,t),this.cea608Parser2=new ws(3,r,n)}addCues(e,t,r,n,s){let A=!1;for(let a=s.length;a--;){const l=s[a],o=Du(l[0],l[1],t,r);if(o>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],r),A=!0,o/(r-t)>.5))return}if(A||s.push([t,r]),this.config.renderTextTracksNatively){const a=this.captionsTracks[e];this.Cues.newCue(a,t,r,n)}else{const a=this.Cues.newCue(null,t,r,n);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:a,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:s}){const{unparsedVttFrags:A}=this;r===O.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:s}),A.length&&(this.unparsedVttFrags=[],A.forEach(a=>{this.onFragLoaded(m.FRAG_LOADED,a)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const s=r.textTracks[n];if(Zs(s,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:n}=this,{label:s,languageCode:A}=t[e],a=this.getExistingTrack(s,A);if(a)r[e]=a,ms(r[e]),wa(r[e],n);else{const l=this.createTextTrack("captions",s,A);l&&(l[e]=!0,r[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,n={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const r=!!t.transferMedia;if(this.media=null,r)return;const{captionsTracks:n}=this;Object.keys(n).forEach(s=>{ms(n[s]),delete n[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Vo(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let r=0;r<t.length;r++)ms(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(s=>s.textCodec===Oa);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(mA(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const A=this.media,a=A?vs(A.textTracks):null;if(this.tracks.forEach((l,o)=>{let h;if(a){let d=null;for(let g=0;g<a.length;g++)if(a[g]&&Zs(a[g],l)){d=a[g],a[g]=null;break}d&&(h=d)}if(h)ms(h);else{const d=Go(l);h=this.createTextTrack(d,l.name,l.lang),h&&(h.mode="disabled")}h&&this.textTracks.push(h)}),a!=null&&a.length){const l=a.filter(o=>o!==null).map(o=>o.label);l.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${l.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const A=this.tracks.map(a=>({label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}));this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:A})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const n=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!n)return;const s=`textTrack${n[1]}`,A=this.captionsProperties[s];A&&(A.label=r.name,r.lang&&(A.languageCode=r.lang),A.media=r)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===O.MAIN){var r,n;const{cea608Parser1:s,cea608Parser2:A,lastSn:a}=this,{cc:l,sn:o}=t.frag,h=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;s&&A&&(o!==a+1||o===a&&h!==this.lastPartIndex+1||l!==this.lastCc)&&(s.reset(),A.reset()),this.lastCc=l,this.lastSn=o,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===O.SUBTITLE)if(n.byteLength){const s=r.decryptdata,A="stats"in t;if(s==null||!s.encrypted||A){const a=this.tracks[r.level],l=this.vttCCs;l[r.cc]||(l[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),a&&a.textCodec===Oa?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;Ko(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:s,unparsedVttFrags:A}=this,a=s.length-1;if(!s[r.cc]&&a===-1){A.push(e);return}const l=this.hls,o=(t=r.initSegment)!=null&&t.data?Xe(r.initSegment.data,new Uint8Array(n)).buffer:n;Iu(o,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,h=>{this._appendCues(h,r.level),l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},h=>{const d=h.message==="Missing initPTS for VTT MPEGTS";d?A.push(e):this._fallbackToIMSC1(r,n),l.logger.log(`Failed to parse VTT cue: ${h}`),!(d&&a>r.cc)&&l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:h})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||Ko(t,this.initPTS[e.cc],()=>{r.textCodec=Oa,this._parseIMSC1(e,t)},()=>{r.textCodec="wvtt"})}_appendCues(e,t){const r=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||n.mode==="disabled")return;e.forEach(s=>Ca(n,s))}else{const n=this.tracks[t];if(!n)return;const s=n.default?"default":"subtitles"+t;r.trigger(m.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===O.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:n}=t;if(!(r.type===O.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let s=0;s<n.length;s++){const A=n[s].bytes;if(A){this.cea608Parser1||this.initCea608Parsers();const a=this.extractCea608Data(A);this.cea608Parser1.addData(n[s].pts,a[0]),this.cea608Parser2.addData(n[s].pts,a[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:s}){const{media:A}=this;if(!(!A||A.currentTime<r)){if(!s||s==="video"){const{captionsTracks:a}=this;Object.keys(a).forEach(l=>ba(a[l],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:a}=this;Object.keys(a).forEach(l=>ba(a[l],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let s=0;s<r;s++){const A=e[n++],a=127&e[n++],l=127&e[n++];if(a===0&&l===0)continue;if((4&A)!==0){const h=3&A;(h===0||h===1)&&(t[h].push(a),t[h].push(l))}}return t}}function Go(i){return i.characteristics&&/transcribes-spoken-dialog/gi.test(i.characteristics)&&/describes-music-and-sound/gi.test(i.characteristics)?"captions":"subtitles"}function Zs(i,e){return!!i&&i.kind===Go(e)&&Aa(e,i)}function Du(i,e,t,r){return Math.min(e,r)-Math.max(i,t)}function Vo(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Wo=/\s/,Lu={newCue(i,e,t,r){const n=[];let s,A,a,l,o;const h=self.VTTCue||self.TextTrackCue;for(let g=0;g<r.rows.length;g++)if(s=r.rows[g],a=!0,l=0,o="",!s.isEmpty()){var d;for(let T=0;T<s.chars.length;T++)Wo.test(s.chars[T].uchar)&&a?l++:(o+=s.chars[T].uchar,a=!1);s.cueStartTime=e,e===t&&(t+=1e-4),l>=16?l--:l++;const v=UA(o.trim()),E=RA(e,t,v);i!=null&&(d=i.cues)!=null&&d.getCueById(E)||(A=new h(e,t,v),A.id=E,A.line=g+1,A.align="left",A.position=10+Math.min(80,Math.floor(l*8/32)*10),n.push(A))}return i&&n.length&&(n.sort((g,v)=>g.line==="auto"||v.line==="auto"?0:g.line>8&&v.line>8?v.line-g.line:g.line-v.line),n.forEach(g=>Ca(i,g))),n}};function Zo(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}const Uu=/(\d+)-(\d+)\/(\d+)/;class Ha{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||Ru,this.controller=new self.AbortController,this.stats=new w}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,r){const n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();const s=zo(e,this.controller.signal),A=e.responseType==="arraybuffer",a=A?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:o}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=l&&V(l)?l:o,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},t.timeout),(Ps(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(d=>{var g;this.response=this.loader=d;const v=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=o,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},o-(v-n.loading.start)),!d.ok){const{status:T,statusText:F}=d;throw new jo(F||"fetch, bad network response",T,d)}n.loading.first=v,n.total=Yo(d.headers)||n.total;const E=(g=this.callbacks)==null?void 0:g.onProgress;return E&&V(t.highWaterMark)?this.loadProgressively(d,n,e,t.highWaterMark,E):A?d.arrayBuffer():e.responseType==="json"?d.json():d.text()}).then(d=>{var g,v;const E=this.response;if(!E)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const T=d[a];T&&(n.loaded=n.total=T);const F={url:E.url,data:d,code:E.status},J=(g=this.callbacks)==null?void 0:g.onProgress;J&&!V(t.highWaterMark)&&J(n,e,d,E),(v=this.callbacks)==null||v.onSuccess(F,n,e,E)}).catch(d=>{var g;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const v=d&&d.code||0,E=d?d.message:null;(g=this.callbacks)==null||g.onError({code:v,text:E},e,d?d.details:null,n)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,r,n=0,s){const A=new Vn,a=e.body.getReader(),l=()=>a.read().then(o=>{if(o.done)return A.dataLength&&s(t,r,A.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const h=o.value,d=h.length;return t.loaded+=d,d<n||A.dataLength?(A.push(h),A.dataLength>=n&&s(t,r,A.flush().buffer,e)):s(t,r,h.buffer,e),l()}).catch(()=>Promise.reject());return l()}}function zo(i,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(y({},i.headers))};return i.rangeEnd&&t.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),t}function Ka(i){const e=Uu.exec(i);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Yo(i){const e=i.get("Content-Range");if(e){const r=Ka(e);if(V(r))return r}const t=i.get("Content-Length");if(t)return parseInt(t)}function Ru(i,e){return new self.Request(i.url,e)}class jo extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const Qu=/^age:\s*[\d.]+\s*$/im;class Xo{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new w,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;const s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return s(r,t.url)}).catch(A=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),s(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(A=>{var a;(a=this.callbacks)==null||a.onError({code:r.status,text:A.message},t,r,n)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const n=t.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:A}=r.loadPolicy;if(n)for(const a in n)e.setRequestHeader(a,n[a]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),r.timeout=s&&V(s)?s:A,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const n=t.readyState,s=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),s.timeout!==s.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),s.timeout=s.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const o=t.status,h=t.responseType==="text"?t.responseText:null;if(o>=200&&o<300){const E=h!=null?h:t.response;if(E!=null){var A,a;r.loading.end=Math.max(self.performance.now(),r.loading.first);const T=t.responseType==="arraybuffer"?E.byteLength:E.length;r.loaded=r.total=T,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const F=(A=this.callbacks)==null?void 0:A.onProgress;F&&F(r,e,E,t);const J={url:t.responseURL,data:E,code:o};(a=this.callbacks)==null||a.onSuccess(J,r,e,t);return}}const d=s.loadPolicy.errorRetry,g=r.retry,v={url:e.url,data:void 0,code:o};if(tt(d,g,!1,v))this.retry(d);else{var l;ie.error(`${o} while loading ${e.url}`),(l=this.callbacks)==null||l.onError({code:o,text:t.statusText},e,t,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(tt(e,t,!0))this.retry(e);else{var r;ie.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=Ke(e,r.retry),r.retry++,ie.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${r.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Qu.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const ku={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},MA=C(C({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:Xo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:zt,bufferController:Wl,capLevelController:la,errorController:rt,fpsController:CA,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:ei,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:ku},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Ei()),{},{subtitleStreamController:Bu,subtitleTrackController:bA,timelineController:PA,audioStreamController:po,audioTrackController:$l,emeController:ss,cmcdController:BA,contentSteeringController:_u,interstitialsController:ko});function Ei(){return{cueHandler:Lu,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function Jo(i,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=Cs(i),n=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(A=>{const a=`${A==="level"?"playlist":A}LoadPolicy`,l=e[a]===void 0,o=[];s.forEach(h=>{const d=`${A}Loading${h}`,g=e[d];if(g!==void 0&&l){o.push(d);const v=r[a].default;switch(e[a]={default:v},h){case"TimeOut":v.maxLoadTimeMs=g,v.maxTimeToFirstByteMs=g;break;case"MaxRetry":v.errorRetry.maxNumRetry=g,v.timeoutRetry.maxNumRetry=g;break;case"RetryDelay":v.errorRetry.retryDelayMs=g,v.timeoutRetry.retryDelayMs=g;break;case"MaxRetryTimeout":v.errorRetry.maxRetryDelayMs=g,v.timeoutRetry.maxRetryDelayMs=g;break}}}),o.length&&t.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${a}": ${Kr(e[a])}`)}),C(C({},r),e)}function Cs(i){return i&&typeof i=="object"?Array.isArray(i)?i.map(Cs):Object.keys(i).reduce((e,t)=>(e[t]=Cs(i[t]),e),{}):i}function Ou(i,e){const t=i.loader;t!==Ha&&t!==Xo?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),i.progressive=!1):Zo()&&(i.loader=Ha,i.progressive=!0,i.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const NA=2,$a=.1,bs=.05,HA=100;class Pu extends Vr{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var r;(r=this.media)!=null&&r.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var r;this.ended=((r=this.media)==null?void 0:r.currentTime)||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(HA),this.mediaSource=t.mediaSource;const r=this.media=t.media;Ai(r,"playing",this.onMediaPlaying),Ai(r,"waiting",this.onMediaWaiting),Ai(r,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:r}=this;r&&(fi(r,"playing",this.onMediaPlaying),fi(r,"waiting",this.onMediaWaiting),fi(r,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var r,n;const s=(r=this.hls)==null?void 0:r.config;if(!s)return;const A=this.media;if(!A)return;const{seeking:a}=A,l=this.seeking&&!a,o=!this.seeking&&a,h=A.paused&&!a||A.ended||A.playbackRate===0;if(this.seeking=a,e!==t){t&&(this.ended=0),this.moved=!0,a||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!h&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(o||l){l&&this.stallResolved(e);return}if(h){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&A.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1}));return}if(!ur.getBuffered(A).length){this.nudgeRetry=0;return}const d=ur.bufferInfo(A,e,0),g=d.nextStart||0,v=this.fragmentTracker;if(a&&v&&this.hls){const He=os(this.hls.inFlightFragments,e),xe=d.len>NA,Ne=!g||He||g-e>NA&&!v.getPartialFragment(e);if(xe||Ne)return;this.moved=!1}const E=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&v){if(!(d.len>0)&&!g)return;const xe=Math.max(g,d.start||0)-e,je=!!(E!=null&&E.live)?E.targetduration*2:NA,Oe=v.getPartialFragment(e);if(xe>0&&(xe<=je||Oe)){A.paused||this._trySkipBufferHole(Oe);return}}const T=s.detectStallWithCurrentTimeMs,F=self.performance.now(),J=this.waiting;let ce=this.stalled;if(ce===null)if(J>0&&F-J<T)ce=this.stalled=J;else{this.stalled=F;return}const Ae=F-ce;if(!a&&(Ae>=T||J)&&this.hls){var de;if(((de=this.mediaSource)==null?void 0:de.readyState)==="ended"&&!(E!=null&&E.live)&&Math.abs(e-((E==null?void 0:E.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(d),!this.media||!this.hls)return}const Te=ur.bufferInfo(A,e,s.maxBufferHole);this._tryFixBufferStall(Te,Ae,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(m.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var r;const n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&n&&n.length>1&&e>n.end(0)){const s=ur.bufferedInfo(ur.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&t>=s.start){const A=ur.timeRangesToArray(n),a=ur.bufferedInfo(A,t,0).bufferedIndex;if(a>-1&&a<A.length-1){const l=ur.bufferedInfo(A,e,0).bufferedIndex,o=A[a].end,h=A[a+1].start;if((l===-1||l>a)&&h-o<1&&e-o<2){const d=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${o} -> ${h} buffered index: ${l}`);this.warn(d.message),this.media.currentTime+=1e-6;const g=this.fragmentTracker.getPartialFragment(e)||void 0,v=ur.bufferInfo(this.media,e,0);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:g,buffer:v.len,bufferInfo:v})}}}}}_tryFixBufferStall(e,t,r){var n,s;const{fragmentTracker:A,media:a}=this,l=(n=this.hls)==null?void 0:n.config;if(!a||!A||!l)return;const o=(s=this.hls)==null?void 0:s.latestLevelDetails,h=A.getPartialFragment(r);if((h||o!=null&&o.live&&r<o.fragmentStart)&&(this._trySkipBufferHole(h)||!this.media))return;const d=e.buffered,g=this.adjacentTraversal(e,r);(d&&d.length>1&&e.len>l.maxBufferHole||e.nextStart&&(e.nextStart-r<l.maxBufferHole||g))&&(t>l.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const r=this.fragmentTracker,n=e.nextStart;if(r&&n){const s=r.getFragAtPos(t,O.MAIN),A=r.getFragAtPos(n,O.MAIN);if(s&&A)return A.sn-s.sn<2}return!1}_reportStall(e){const{hls:t,media:r,stallReported:n,stalled:s}=this;if(!n&&s!==null&&r&&t){this.stallReported=!0;const A=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${Kr(e)})`);this.warn(A.message),t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_STALLED_ERROR,fatal:!1,error:A,buffer:e.len,bufferInfo:e,stalled:{start:s}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:r,media:n}=this,s=(t=this.hls)==null?void 0:t.config;if(!n||!r||!s)return 0;const A=n.currentTime,a=ur.bufferInfo(n,A,0),l=A<a.start?a.start:a.nextStart;if(l&&this.hls){const h=a.len<=s.maxBufferHole,d=a.len>0&&a.len<1&&n.readyState<3,g=l-A;if(g>0&&(h||d)){if(g>s.maxBufferHole){let E=!1;if(A===0){const T=r.getAppendedFrag(0,O.MAIN);T&&l<T.end&&(E=!0)}if(!E){const T=e||r.getAppendedFrag(A,O.MAIN);if(T){var o;if(!((o=this.hls.loadLevelObj)!=null&&o.details)||os(this.hls.inFlightFragments,l))return 0;let J=!1,ce=T.end;for(;ce<l;){const Ae=r.getPartialFragment(ce);if(Ae)ce+=Ae.duration;else{J=!0;break}}if(J)return 0}}}const v=Math.max(l+bs,A+$a);if(this.warn(`skipping hole, adjusting currentTime from ${A} to ${v}`),this.moved=!0,n.currentTime=v,!(e!=null&&e.gap)){const E=new Error(`fragment loaded with buffer holes, seeking from ${A} to ${v}`);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:E,reason:E.message,frag:e||void 0,buffer:a.len,bufferInfo:a})}return v}}return 0}_tryNudgeBuffer(e){const{hls:t,media:r,nudgeRetry:n}=this,s=t==null?void 0:t.config;if(!r||!s)return 0;const A=r.currentTime;if(this.nudgeRetry++,n<s.nudgeMaxRetry){const a=A+(n+1)*s.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${A} to ${a}`);this.warn(l.message),r.currentTime=a,t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1,buffer:e.len,bufferInfo:e})}else{const a=new Error(`Playhead still not moving while enough data buffered @${A} after ${s.nudgeMaxRetry} nudges`);this.error(a.message),t.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.BUFFER_STALLED_ERROR,error:a,fatal:!0,buffer:e.len,bufferInfo:e})}}}function os(i,e){const t=qo(i.main);if(t&&t.start<=e)return t;const r=qo(i.audio);return r&&r.start<=e?r:null}function qo(i){if(!i)return null;switch(i.state){case nt.IDLE:case nt.STOPPED:case nt.ENDED:case nt.ERROR:return null}return i.frag}const Mu=.25;function KA(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function el(i,e,t,r,n){let s=new i(e,t,"");try{s.value=r,n&&(s.type=n)}catch(A){s=new i(e,t,Kr(n?C({type:n},r):r))}return s}const zs=(()=>{const i=KA();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Nu(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Hu{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(m.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var r;this.media=t.media,((r=t.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ms(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const r=e[t];if(r.kind==="metadata"&&r.label==="id3")return wa(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:r,enableID3MetadataCues:n}}}=this;if(!r&&!n)return;const{samples:s}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const A=KA();if(A)for(let a=0;a<s.length;a++){const l=s[a].type;if(l===ci.emsg&&!r||!n)continue;const o=qa(s[a].data);if(o){const h=s[a].pts;let d=h+s[a].duration;d>zs&&(d=zs),d-h<=0&&(d=h+Mu);for(let v=0;v<o.length;v++){const E=o[v];if(!eo(E)){this.updateId3CueEnds(h,l);const T=el(A,h,d,E,l);T&&this.id3Track.addCue(T)}}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let s=n.length;s--;){const A=n[s];A.type===t&&A.startTime<e&&A.endTime===zs&&(A.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:s,hls:A}=this;if(!A)return;const{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:l}}=A;if(s&&(a||l)){let o;n==="audio"?o=h=>h.type===ci.audioId3&&l:n==="video"?o=h=>h.type===ci.emsg&&a:o=h=>h.type===ci.audioId3&&l||h.type===ci.emsg&&a,ba(s,t,r,o)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:r}=this,{dateRanges:n}=e,s=Object.keys(n);let A=this.dateRangeCuesAppended;if(r&&t){var a;if((a=r.cues)!=null&&a.length){const h=Object.keys(A).filter(d=>!s.includes(d));for(let d=h.length;d--;){const g=h[d],v=A[g].cues;delete A[g],Object.keys(v).forEach(E=>{try{const T=v[E];T.removeEventListener("enter",this.onEventCueEnter),r.removeCue(T)}catch(T){}})}}else A=this.dateRangeCuesAppended={}}const l=e.fragments[e.fragments.length-1];if(s.length===0||!V(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=KA();for(let h=0;h<s.length;h++){const d=s[h],g=n[d],v=g.startTime,E=A[d],T=(E==null?void 0:E.cues)||{};let F=(E==null?void 0:E.durationKnown)||!1,J=zs;const{duration:ce,endDate:Ae}=g;if(Ae&&ce!==null)J=v+ce,F=!0;else if(g.endOnNext&&!F){const Te=s.reduce((He,xe)=>{if(xe!==g.id){const Ne=n[xe];if(Ne.class===g.class&&Ne.startDate>g.startDate&&(!He||g.startDate<He.startDate))return Ne}return He},null);Te&&(J=Te.startTime,F=!0)}const de=Object.keys(g.attr);for(let Te=0;Te<de.length;Te++){const He=de[Te];if(!ri(He))continue;const xe=T[He];if(xe)F&&!E.durationKnown?xe.endTime=J:Math.abs(xe.startTime-v)>.01&&(xe.startTime=v,xe.endTime=J);else if(o){let Ne=g.attr[He];$n(He)&&(Ne=Nu(Ne));const Oe=el(o,v,J,{key:He,data:Ne},ci.dateRange);Oe&&(Oe.id=d,this.id3Track.addCue(Oe),T[He]=Oe,this.hls.config.interstitialsController&&(He==="X-ASSET-LIST"||He==="X-ASSET-URL")&&Oe.addEventListener("enter",this.onEventCueEnter))}}A[d]={cues:T,dateRange:g,durationKnown:F}}}}class Ku{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,r=this.levelDetails;if(!t||!r)return;this.currentTime=t.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:A}=this.config;if(!s||A===1||!r.live)return;const a=this.targetLatency;if(a===null)return;const l=n-a,o=Math.min(this.maxLatency,a+r.targetduration);if(l<o&&l>.05&&this.forwardBufferLength>1){const d=Math.min(2,Math.max(1,A)),g=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20,v=Math.min(d,Math.max(1,g));this.changeMediaPlaybackRate(t,v)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:r,targetduration:n}=e,{liveSyncDuration:s,liveSyncDurationCount:A,lowLatencyMode:a}=this.config,l=this.hls.userConfig;let o=a&&r||t;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||o===0)&&(o=s!==void 0?s:A*n);const h=n;return o+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,h)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const r=this.levelDetails;if(r===null)return null;const n=r.edge,s=e-t-this.edgeStalled,A=n-r.totalduration,a=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(A,s),a)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var r;t.details===W.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(r=this.levelDetails)!=null&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var r,n;e.playbackRate!==t&&((r=this.hls)==null||r.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(n=this.targetLatency)==null?void 0:n.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class $u extends sa{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const r=this.hls.config.preferManagedMediaSource,n=[],s={},A={};let a=!1,l=!1,o=!1;t.levels.forEach(h=>{const d=h.attrs;let{audioCodec:g,videoCodec:v}=h;g&&(h.audioCodec=g=ft(g,r)||void 0),v&&(v=h.videoCodec=Zt(v));const{width:E,height:T,unknownCodecs:F}=h;let J=F?F.length:0;if(F)for(let Oe=J;Oe--;){const gt=F[Oe];this.isAudioSupported(gt)?(h.audioCodec=g=g?`${g},${gt}`:gt,J--,St.audio[g.substring(0,4)]=2):this.isVideoSupported(gt)&&(h.videoCodec=v=v?`${v},${gt}`:gt,J--,St.video[v.substring(0,4)]=2)}if(a||(a=!!(E&&T)),l||(l=!!v),o||(o=!!g),J||g&&!this.isAudioSupported(g)||v&&!this.isVideoSupported(v)){this.log(`Some or all CODECS not supported "${d.CODECS}"`);return}const{CODECS:ce,"FRAME-RATE":Ae,"HDCP-LEVEL":de,"PATHWAY-ID":Te,RESOLUTION:He,"VIDEO-RANGE":xe}=d,je=`${`${Te||"."}-`}${h.bitrate}-${He}-${Ae}-${ce}-${xe}-${de}`;if(s[je])if(s[je].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const Oe=A[je]+=1;h.attrs["PATHWAY-ID"]=new Array(Oe+1).join(".");const gt=this.createLevel(h);s[je]=gt,n.push(gt)}else s[je].addGroupId("audio",d.AUDIO),s[je].addGroupId("text",d.SUBTITLES);else{const Oe=this.createLevel(h);s[je]=Oe,A[je]=1,n.push(Oe)}}),this.filterAndSortMediaOptions(n,t,a,l,o)}createLevel(e){const t=new yn(e),r=e.supplemental;if(r!=null&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){const n=new Error(`SUPPLEMENTAL-CODECS not supported "${r.videoCodec}"`);this.log(n.message),t.supportedResult=Tr(n,[])}return t}isAudioSupported(e){return Ue(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ue(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,s){let A=[],a=[],l=e;if((r||n)&&s&&(l=l.filter(({videoCodec:F,videoRange:J,width:ce,height:Ae})=>(!!F||!!(ce&&Ae))&&vn(J))),l.length===0){Promise.resolve().then(()=>{if(this.hls){let F="no level with compatible codecs found in manifest",J=F;t.levels.length&&(J=`one or more CODECS in variant not supported: ${Kr(t.levels.map(Ae=>Ae.attrs.CODECS).filter((Ae,de,Te)=>Te.indexOf(Ae)===de))}`,this.warn(J),F+=` (${J})`);const ce=new Error(F);this.hls.trigger(m.ERROR,{type:he.MEDIA_ERROR,details:W.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:ce,reason:J})}});return}t.audioTracks&&(A=t.audioTracks.filter(F=>!F.audioCodec||this.isAudioSupported(F.audioCodec)),tl(A)),t.subtitles&&(a=t.subtitles,tl(a));const o=l.slice(0);l.sort((F,J)=>{if(F.attrs["HDCP-LEVEL"]!==J.attrs["HDCP-LEVEL"])return(F.attrs["HDCP-LEVEL"]||"")>(J.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&F.height!==J.height)return F.height-J.height;if(F.frameRate!==J.frameRate)return F.frameRate-J.frameRate;if(F.videoRange!==J.videoRange)return Or.indexOf(F.videoRange)-Or.indexOf(J.videoRange);if(F.videoCodec!==J.videoCodec){const ce=Y(F.videoCodec),Ae=Y(J.videoCodec);if(ce!==Ae)return Ae-ce}if(F.uri===J.uri&&F.codecSet!==J.codecSet){const ce=ee(F.codecSet),Ae=ee(J.codecSet);if(ce!==Ae)return Ae-ce}return F.averageBitrate!==J.averageBitrate?F.averageBitrate-J.averageBitrate:0});let h=o[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==o.length)){for(let F=0;F<o.length;F++)if(o[F].pathwayId===l[0].pathwayId){h=o[F];break}}this._levels=l;for(let F=0;F<l.length;F++)if(l[F]===h){var d;this._firstLevel=F;const J=h.bitrate,ce=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${J}`),((d=this.hls.userConfig)==null?void 0:d.abrEwmaDefaultEstimate)===void 0){const Ae=Math.min(J,this.hls.config.abrEwmaDefaultEstimateMax);Ae>ce&&ce===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Ae)}break}const g=s&&!n,v=this.hls.config,E=!!(v.audioStreamController&&v.audioTrackController),T={levels:l,audioTracks:A,subtitleTracks:a,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:n,altAudio:E&&!g&&A.some(F=>!!F.url)};this.hls.trigger(m.MANIFEST_PARSED,T)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const h=new Error("invalid level idx"),d=e<0;if(this.hls.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.LEVEL_SWITCH_ERROR,level:e,fatal:d,error:h,reason:h.message}),d)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,s=n?n.attrs["PATHWAY-ID"]:void 0,A=t[e],a=A.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=A,r===e&&n&&s===a)return;this.log(`Switching to level ${e} (${A.height?A.height+"p ":""}${A.videoRange?A.videoRange+" ":""}${A.codecSet?A.codecSet+" ":""}@${A.bitrate})${a?" with Pathway "+a:""} from level ${r}${s?" with Pathway "+s:""}`);const l={level:e,attrs:A.attrs,details:A.details,bitrate:A.bitrate,averageBitrate:A.averageBitrate,maxBitrate:A.maxBitrate,realBitrate:A.realBitrate,width:A.width,height:A.height,codecSet:A.codecSet,audioCodec:A.audioCodec,videoCodec:A.videoCodec,audioGroups:A.audioGroups,subtitleGroups:A.subtitleGroups,loaded:A.loaded,loadError:A.loadError,fragmentError:A.fragmentError,name:A.name,id:A.id,uri:A.uri,url:A.url,urlId:0,audioGroupIds:A.audioGroupIds,textGroupIds:A.textGroupIds};this.hls.trigger(m.LEVEL_SWITCHING,l);const o=A.details;if(!o||o.live){const h=this.switchParams(A.uri,n==null?void 0:n.details,o);this.loadPlaylist(h)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),r=e.filter(n=>t.indexOf(n)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=r}}onError(e,t){t.fatal||!t.context||t.context.type===ge.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===O.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(s=>!!r[s]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:s}=t,A=t.levelInfo;if(!A){var a;this.warn(`Invalid level index ${n}`),(a=t.deliveryDirectives)!=null&&a.skip&&(s.deltaUpdateFailed=!0);return}if(A===this.currentLevel||t.withoutMultiVariant){A.fragmentError===0&&(A.loadError=0);let l=A.details;l===t.details&&l.advanced&&(l=void 0),this.playlistLoaded(n,t,l)}else(r=t.deliveryDirectives)!=null&&r.skip&&(s.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=this.getUrlWithDirectives(e.uri,t),n=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],A=e.details,a=A==null?void 0:A.age;this.log(`Loading level index ${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${s?" Pathway "+s:""}${a&&A.live?" age "+a.toFixed(1)+(A.type?" "+A.type||0:""):""} ${r}`),this.hls.trigger(m.LEVEL_LOADING,{url:r,level:n,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const r=this._levels.filter((s,A)=>A!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(a=>a.level=-1)),!1));tA(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const n=r.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(m.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(m.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function tl(i){const e={};i.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function rl(){return self.SourceBuffer||self.WebKitSourceBuffer}function nl(){if(!ye())return!1;const e=rl();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Gu(){if(!nl())return!1;const i=ye();return typeof(i==null?void 0:i.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>i.isTypeSupported(Ee(e,"video")))||["mp4a.40.2","fLaC"].some(e=>i.isTypeSupported(Ee(e,"audio"))))}function Vu(){var i;const e=rl();return typeof(e==null||(i=e.prototype)==null?void 0:i.changeType)=="function"}const Wu=100;class Zu extends mn{constructor(e,t,r){super(e,t,r,"stream-controller",O.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const n=this.media,s=n?n.currentTime:null;if(s===null||!V(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const A=this.getFwdBufferInfoAtPos(n,s,O.MAIN,0);if(A===null||A.len===0){this.warn(`Main forward buffer length at ${s} on "seeked" event ${A?A.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval(Wu),this.level=-1,!this.startFragRequested){let s=n.startLevel;s===-1&&(n.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=n.firstAutoLevel),n.nextLoadLevel=s,this.level=n.loadLevel,this._hasEnoughToStart=!!t}r>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=nt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=nt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case nt.WAITING_LEVEL:{const{levels:t,level:r}=this,n=t==null?void 0:t[r],s=n==null?void 0:n.details;if(s&&(!s.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(s))break;this.state=nt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=nt.IDLE;break}break}case nt.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,level:s}=this,A=n==null?void 0:n[s];this.resetStartWhenNotLoaded(A||null),this.state=nt.IDLE}}break}this.state===nt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:n}=this;if(t===null||!n&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[s]))return;const A=r[s],a=this.getMainFwdBufferInfo();if(a===null)return;const l=this.getLevelDetails();if(l&&this._streamEnded(a,l)){const T={};this.altAudio===2&&(T.type="video"),this.hls.trigger(m.BUFFER_EOS,T),this.state=nt.ENDED;return}if(!this.buffering)return;e.loadLevel!==s&&e.manualLevel===-1&&this.log(`Adapting to level ${s} from level ${this.level}`),this.level=e.nextLoadLevel=s;const o=A.details;if(!o||this.state===nt.WAITING_LEVEL||this.waitForLive(A)){this.level=s,this.state=nt.WAITING_LEVEL,this.startFragRequested=!1;return}const h=a.len,d=this.getMaxBufferLength(A.maxBitrate);if(h>=d)return;this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null);const g=this.backtrackFragment?this.backtrackFragment.start:a.end;let v=this.getNextFragment(g,o);if(this.couldBacktrack&&!this.fragPrevious&&v&&ae(v)&&this.fragmentTracker.getState(v)!==Rt.OK){var E;const F=((E=this.backtrackFragment)!=null?E:v).sn-o.startSN,J=o.fragments[F-1];J&&v.cc===J.cc&&(v=J,this.fragmentTracker.removeFragment(J))}else this.backtrackFragment&&a.len&&(this.backtrackFragment=null);if(v&&this.isLoopLoading(v,g)){if(!v.gap){const F=this.audioOnly&&!this.altAudio?B.AUDIO:B.VIDEO,J=(F===B.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;J&&this.afterBufferFlushed(J,F,O.MAIN)}v=this.getNextFragmentLoopLoading(v,o,a,O.MAIN,d)}v&&(v.initSegment&&!v.initSegment.data&&!this.bitrateTest&&(v=v.initSegment),this.loadFragment(v,A,g))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===Rt.NOT_LOADED||n===Rt.PARTIAL?ae(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,r):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,O.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let r;const n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);const s=this.getLevelDetails();if(s!=null&&s.live){const a=this.getMainFwdBufferInfo();if(!a||a.len<s.targetduration*2)return}if(!t.paused&&e){const a=this.hls.nextLoadLevel,l=e[a],o=this.fragLastKbps;o&&this.fragCurrent?r=this.fragCurrent.duration*l.maxBitrate/(1e3*o)+1:r=0}else r=0;const A=this.getBufferedFrag(t.currentTime+r);if(A){const a=this.followingBufferedFrag(A);if(a){this.abortCurrentFrag();const l=a.maxStartPTS?a.maxStartPTS:a.start,o=a.duration,h=Math.max(A.end,l+Math.min(Math.max(o-this.config.maxFragLookUpTolerance,o*(this.couldBacktrack?.5:.125)),o*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case nt.KEY_LOADING:case nt.FRAG_LOADING:case nt.FRAG_LOADING_WAITING_RETRY:case nt.PARSING:case nt.PARSED:this.state=nt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const r=t.media;Ai(r,"playing",this.onMediaPlaying),Ai(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:r}=this;r&&(fi(r,"playing",this.onMediaPlaying),fi(r,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(m.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let r=!1,n=!1;t.levels.forEach(s=>{const A=s.audioCodec;A&&(r=r||A.indexOf("mp4a.40.2")!==-1,n=n||A.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=r&&n&&!Vu(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:r}=this;if(!r||this.state!==nt.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=nt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:s}=this,A=t.level,a=t.details,l=a.totalduration;if(!n){this.warn(`Levels were reset while loading level ${A}`);return}this.log(`Level ${A} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${l}`);const o=t.levelInfo,h=this.fragCurrent;h&&(this.state===nt.FRAG_LOADING||this.state===nt.FRAG_LOADING_WAITING_RETRY)&&h.level!==t.level&&h.loader&&this.abortCurrentFrag();let d=0;if(a.live||(r=o.details)!=null&&r.live){var g;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;d=this.alignPlaylists(a,o.details,(g=this.levelLastLoaded)==null?void 0:g.details)}if(o.details=a,this.levelLastLoaded=o,s||this.setStartPosition(a,d),this.hls.trigger(m.LEVEL_UPDATED,{details:a,level:A}),this.state===nt.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=nt.IDLE}s&&a.live&&this.synchronizeToLiveEdge(a),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,s=this.getLoadPosition(),A=e.fragmentStart,a=e.edge,l=s>=A-t.maxFragLookUpTolerance&&s<=a;if(n!==null&&r.duration>n&&(s<n||!l)){const h=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!l&&r.readyState<4||s<a-h)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),r.readyState))if(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${a}, reset currentTime to : ${n.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var o;const d=ur.bufferInfo(r,n,0);if(!(d!=null&&(o=d.buffered)!=null&&o.length)){r.currentTime=n;return}if(d.start<=s){r.currentTime=n;return}const{nextStart:v}=ur.bufferedInfo(d.buffered,s,0);v&&(r.currentTime=v)}else r.currentTime=n}}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:s}=e,{levels:A}=this;if(!A){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const a=A[r.level];if(!a){this.warn(`Level ${r.level} not found on progress`);return}const l=a.details;if(!l){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const o=a.videoCodec,h=l.PTSKnown||!l.live,d=(t=r.initSegment)==null?void 0:t.data,g=this._getAudioCodec(a),v=this.transmuxer=this.transmuxer||new pA(this.hls,O.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),E=n?n.index:-1,T=E!==-1,F=new Fr(r.level,r.sn,r.stats.chunkCount,s.byteLength,E,T),J=this.initPTS[r.cc];v.push(s,d,g,o,r,n,l.totalduration,h,F,J)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio===2;if(Dt(t.url,r))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const A=this.fragCurrent;A&&(this.log("Switching to main audio track, cancel main fragment load"),A.abortRequests(),this.fragmentTracker.removeFragment(A)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n){this.fragmentTracker.removeAllFragments(),r.once(m.BUFFER_FLUSHED,()=>{var A;(A=this.hls)==null||A.trigger(m.AUDIO_TRACK_SWITCHED,t)}),r.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(m.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=Dt(t.url,this.hls);if(r){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r?2:0,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,s,A=!1;for(const a in r){const l=r[a];if(l.id==="main"){if(s=a,n=l,a==="video"){const o=r[a];o&&(this.videoBuffer=o.buffer)}}else A=!0}A&&n?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t,s=r.type===O.MAIN;if(s){if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===nt.PARSED&&(this.state=nt.IDLE);return}const a=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),ae(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const A=this.media;A&&(!this._hasEnoughToStart&&ur.getBuffered(A).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var r;if(t.fatal){this.state=nt.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(O.MAIN,t);break;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===nt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===ge.LEVEL&&(this.state=nt.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case W.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=nt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==B.AUDIO||!this.altAudio){const r=(t===B.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,O.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let r=this.startPosition;if(r>=0&&t<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${t}`);return}const n=this.timelineOffset;n&&r&&(r+=n);const s=this.getLevelDetails(),A=ur.getBuffered(e),a=A.length?A.start(0):0,l=a-r,o=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||l>0&&(l<o||this.loadingParts&&l<2*((s==null?void 0:s.partTarget)||0)))&&(this.log(`adjusting start position by ${l} to match buffer start`),r+=l,this.startPosition=r),t<r&&(this.log(`seek to target start position ${r} from current time ${t} buffer start ${a}`),e.currentTime=r)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(r=>{const{hls:n}=this,s=r==null?void 0:r.frag;if(!s||this.fragContextChanged(s))return;t.fragmentError=0,this.state=nt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const A=s.stats;A.parsing.start=A.parsing.end=A.buffering.start=A.buffering.end=self.performance.now(),n.trigger(m.FRAG_LOADED,r),s.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r=this.playlistType,{hls:n}=this,{remuxResult:s,chunkMeta:A}=e,a=this.getCurrentContext(A);if(!a){this.resetWhenMissingContext(A);return}const{frag:l,part:o,level:h}=a,{video:d,text:g,id3:v,initSegment:E}=s,{details:T}=h,F=this.altAudio?void 0:s.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=nt.PARSING,E){if(E!=null&&E.tracks){const Ae=l.initSegment||l;this._bufferInitSegment(h,E.tracks,Ae,A),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:Ae,id:r,tracks:E.tracks})}const J=E.initPTS,ce=E.timescale;V(J)&&(this.initPTS[l.cc]={baseTime:J,timescale:ce},n.trigger(m.INIT_PTS_FOUND,{frag:l,id:r,initPTS:J,timescale:ce}))}if(d&&T){F&&d.type==="audiovideo"&&this.logMuxedErr(l);const J=T.fragments[l.sn-1-T.startSN],ce=l.sn===T.startSN,Ae=!J||l.cc>J.cc;if(s.independent!==!1){const{startPTS:de,endPTS:Te,startDTS:He,endDTS:xe}=d;if(o)o.elementaryStreams[d.type]={startPTS:de,endPTS:Te,startDTS:He,endDTS:xe};else if(d.firstKeyFrame&&d.independent&&A.id===1&&!Ae&&(this.couldBacktrack=!0),d.dropped&&d.independent){const Ne=this.getMainFwdBufferInfo(),je=(Ne?Ne.end:this.getLoadPosition())+this.config.maxBufferHole,Oe=d.firstKeyFramePTS?d.firstKeyFramePTS:de;if(!ce&&je<Oe-this.config.maxBufferHole&&!Ae){this.backtrack(l);return}else Ae&&(l.gap=!0);l.setElementaryStreamInfo(d.type,l.start,Te,l.start,xe,!0)}else ce&&de-(T.appliedTimelineOffset||0)>NA&&(l.gap=!0);l.setElementaryStreamInfo(d.type,de,Te,He,xe),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(d,l,o,A,ce||Ae)}else if(ce||Ae)l.gap=!0;else{this.backtrack(l);return}}if(F){const{startPTS:J,endPTS:ce,startDTS:Ae,endDTS:de}=F;o&&(o.elementaryStreams[B.AUDIO]={startPTS:J,endPTS:ce,startDTS:Ae,endDTS:de}),l.setElementaryStreamInfo(B.AUDIO,J,ce,Ae,de),this.bufferFragmentData(F,l,o,A)}if(T&&v!=null&&(t=v.samples)!=null&&t.length){const J={id:r,frag:l,details:T,samples:v.samples};n.trigger(m.FRAG_PARSING_METADATA,J)}if(T&&g){const J={id:r,frag:l,details:T,samples:g.samples};n.trigger(m.FRAG_PARSING_USERDATA,J)}}logMuxedErr(e){this.warn(`${ae(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,r,n){if(this.state!==nt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(r));const{audio:s,video:A,audiovideo:a}=t;if(s){let o=dt(s.codec,e.audioCodec);o==="mp4a"&&(o="mp4a.40.5");const h=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){o&&(o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5");const d=s.metadata;d&&"channelCount"in d&&(d.channelCount||1)!==1&&h.indexOf("firefox")===-1&&(o="mp4a.40.5")}o&&o.indexOf("mp4a.40.5")!==-1&&h.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(o="mp4a.40.2",this.log(`Android: force audio codec to ${o}`)),e.audioCodec&&e.audioCodec!==o&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${o}"`),s.levelCodec=o,s.id=O.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${o||""}/${e.audioCodec||""}/${s.codec}]`),delete t.audiovideo}if(A){A.levelCodec=e.videoCodec,A.id=O.MAIN;const o=A.codec;if((o==null?void 0:o.length)===4)switch(o){case"hvc1":case"hev1":A.codec="hvc1.1.6.L120.90";break;case"av01":A.codec="av01.0.04M.08";break;case"avc1":A.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${A.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o}]${A.codec!==o?" parsed-corrected="+A.codec:""}${A.supplemental?" supplemental="+A.supplemental:""}`),delete t.audiovideo}a&&(this.log(`Init audiovideo buffer, container:${a.container}, codecs[level/parsed]=[${e.codecs}/${a.codec}]`),delete t.video,delete t.audio);const l=Object.keys(t);if(l.length){if(this.hls.trigger(m.BUFFER_CODECS,t),!this.hls)return;l.forEach(o=>{const d=t[o].initSegment;d!=null&&d.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:o,data:d,frag:r,part:null,chunkMeta:n,parent:r.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,O.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,r=e==null?void 0:e[t];return r?this.getMaxBufferLength(r.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=nt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(ur.isBuffered(e,r)?t=this.getAppendedFrag(r):ur.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,s=t.level;(!n||t.sn!==n.sn||n.level!==s)&&(this.fragPlaying=t,this.hls.trigger(m.FRAG_CHANGED,{frag:t}),(!n||n.level!==s)&&this.hls.trigger(m.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return V(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(V(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?lr(null,r.fragments,t):null);if(n){const s=n.programDateTime;if(s!==null){const A=s+(t-n.start)*1e3;return new Date(A)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class zu{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const n=this.keyUriToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=W.KEY_LOAD_ERROR,r,n,s){return new kr({type:he.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:s,error:r,networkDetails:n})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length){const{sn:r,cc:n}=e;for(let s=0;s<t.length;s++){const A=t[s];if(n<=A.cc&&(r==="initSegment"||A.sn==="initSegment"||r<A.sn))return this.emeController.selectKeySystemFormat(A).then(a=>{if(A.setKeyFormat(a),this.emeController&&this.config.requireKeySystemAccessOnStart){const l=Mn(a);if(l)return this.emeController.getKeySystemAccess([l])}})}}else if(this.config.requireKeySystemAccessOnStart){const r=qn(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var r,n;t&&e.setKeyFormat(t);const s=e.decryptdata;if(!s){const o=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,o))}const A=s.uri;if(!A)return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${A}"`)));let a=this.keyUriToKeyInfo[A];if((r=a)!=null&&r.decryptdata.key)return s.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});if((n=a)!=null&&n.keyLoadPromise){var l;switch((l=a.mediaKeySessionContext)==null?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then(o=>(s.key=o.keyInfo.decryptdata.key,{frag:e,keyInfo:a}))}}switch(a=this.keyUriToKeyInfo[A]={decryptdata:s,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},s.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return s.keyFormat==="identity"?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${s.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const n=this.emeController.loadKey(r);if(n)return(e.keyLoadPromise=n.then(s=>(e.mediaKeySessionContext=s,r))).catch(s=>{throw e.keyLoadPromise=null,s})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,s=new n(r);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((A,a)=>{const l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},o=r.keyLoadPolicy.default,h={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(g,v,E,T)=>{const{frag:F,keyInfo:J,url:ce}=E;if(!F.decryptdata||J!==this.keyUriToKeyInfo[ce])return a(this.createKeyLoadError(F,W.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),T));J.decryptdata.key=F.decryptdata.key=new Uint8Array(g.data),F.keyLoader=null,J.loader=null,A({frag:F,keyInfo:J})},onError:(g,v,E,T)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.KEY_LOAD_ERROR,new Error(`HTTP Error ${g.code} loading key ${g.text}`),E,C({url:l.url,data:void 0},g)))},onTimeout:(g,v,E)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),E))},onAbort:(g,v,E)=>{this.resetLoader(v),a(this.createKeyLoadError(t,W.INTERNAL_ABORTED,new Error("key loading aborted"),E))}};s.load(l,h,d)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,s=r.loader;t.keyLoader===s&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[n],s&&s.destroy()}}function il(i){const{type:e}=i;switch(e){case ge.AUDIO_TRACK:return O.AUDIO;case ge.SUBTITLE_TRACK:return O.SUBTITLE;default:return O.MAIN}}function Ga(i,e){let t=i.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class f{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,s=r||n,A=new s(t);return this.loaders[e.type]=A,A}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ge.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:s,url:A,deliveryDirectives:a,levelInfo:l}=t;this.load({id:r,level:n,pathwayId:s,responseType:"text",type:ge.LEVEL,url:A,deliveryDirectives:a,levelOrTrack:l})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:s,deliveryDirectives:A,track:a}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ge.AUDIO_TRACK,url:s,deliveryDirectives:A,levelOrTrack:a})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:s,deliveryDirectives:A,track:a}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ge.SUBTITLE_TRACK,url:s,deliveryDirectives:A,levelOrTrack:a})}onLevelsUpdated(e,t){const r=this.loaders[ge.LEVEL];if(r){const n=r.context;n&&!t.levels.some(s=>s===n.levelOrTrack)&&(r.abort(),delete this.loaders[ge.LEVEL])}}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const o=this.hls.logger,h=n.context;if(h&&h.levelOrTrack===e.levelOrTrack&&(h.url===e.url||h.deliveryDirectives&&!e.deliveryDirectives)){h.url===e.url?o.log(`[playlist-loader]: ignore ${e.url} ongoing request`):o.log(`[playlist-loader]: ignore ${e.url} in favor of ${h.url}`);return}o.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let s;if(e.type===ge.MANIFEST?s=r.manifestLoadPolicy.default:s=y({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),V((t=e.deliveryDirectives)==null?void 0:t.part)){let o;if(e.type===ge.LEVEL&&e.level!==null?o=this.hls.levels[e.level].details:e.type===ge.AUDIO_TRACK&&e.id!==null?o=this.hls.audioTracks[e.id].details:e.type===ge.SUBTITLE_TRACK&&e.id!==null&&(o=this.hls.subtitleTracks[e.id].details),o){const h=o.partTarget,d=o.targetduration;if(h&&d){const g=Math.max(h*3,d*.8)*1e3;s=y({},s,{maxTimeToFirstByteMs:Math.min(g,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(g,s.maxTimeToFirstByteMs)})}}}const A=s.errorRetry||s.timeoutRetry||{},a={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},l={onSuccess:(o,h,d,g)=>{const v=this.getInternalLoader(d);this.resetInternalLoader(d.type);const E=o.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,d,new Error("no EXTM3U delimiter"),g||null,h);return}h.parsing.start=performance.now(),kn.isMediaPlaylist(E)||d.type!==ge.MANIFEST?this.handleTrackOrLevelPlaylist(o,h,d,g||null,v):this.handleMasterPlaylist(o,h,d,g)},onError:(o,h,d,g)=>{this.handleNetworkError(h,d,!1,o,g)},onTimeout:(o,h,d)=>{this.handleNetworkError(h,d,!0,void 0,o)}};n.load(e,a,l)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:r}=this.hls;(e||r)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,r,n){const s=this.hls,A=e.data,a=Ga(e,r),l=kn.parseMasterPlaylist(A,a);if(l.playlistParsingError){this.handleManifestParsingError(e,r,l.playlistParsingError,n,t);return}const{contentSteering:o,levels:h,sessionData:d,sessionKeys:g,startTimeOffset:v,variableList:E}=l;this.variableList=E;const{AUDIO:T=[],SUBTITLES:F,"CLOSED-CAPTIONS":J}=kn.parseMasterPlaylistMedia(A,a,l);T.length&&!T.some(Ae=>!Ae.url)&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),T.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new $r({}),bitrate:0,url:""})),s.trigger(m.MANIFEST_LOADED,{levels:h,audioTracks:T,subtitles:F,captions:J,contentSteering:o,url:a,stats:t,networkDetails:n,sessionData:d,sessionKeys:g,startTimeOffset:v,variableList:E})}handleTrackOrLevelPlaylist(e,t,r,n,s){const A=this.hls,{id:a,level:l,type:o}=r,h=Ga(e,r),d=V(l)?l:V(a)?a:0,g=il(r),v=kn.parseLevelPlaylist(e.data,h,d,g,0,this.variableList);if(o===ge.MANIFEST){const E={attrs:new $r({}),bitrate:0,details:v,name:"",url:h};v.requestScheduled=t.loading.start+eA(v,0),A.trigger(m.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:h,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=v,this.handlePlaylistLoaded(v,e,t,r,n,s)}handleManifestParsingError(e,t,r,n,s){this.hls.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.MANIFEST_PARSING_ERROR,fatal:t.type===ge.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:s})}handleNetworkError(e,t,r=!1,n,s){let A=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===ge.LEVEL?A+=`: ${e.level} id: ${e.id}`:(e.type===ge.AUDIO_TRACK||e.type===ge.SUBTITLE_TRACK)&&(A+=` id: ${e.id} group-id: "${e.groupId}"`);const a=new Error(A);this.hls.logger.warn(`[playlist-loader]: ${A}`);let l=W.UNKNOWN,o=!1;const h=this.getInternalLoader(e);switch(e.type){case ge.MANIFEST:l=r?W.MANIFEST_LOAD_TIMEOUT:W.MANIFEST_LOAD_ERROR,o=!0;break;case ge.LEVEL:l=r?W.LEVEL_LOAD_TIMEOUT:W.LEVEL_LOAD_ERROR,o=!1;break;case ge.AUDIO_TRACK:l=r?W.AUDIO_TRACK_LOAD_TIMEOUT:W.AUDIO_TRACK_LOAD_ERROR,o=!1;break;case ge.SUBTITLE_TRACK:l=r?W.SUBTITLE_TRACK_LOAD_TIMEOUT:W.SUBTITLE_LOAD_ERROR,o=!1;break}h&&this.resetInternalLoader(e.type);const d={type:he.NETWORK_ERROR,details:l,fatal:o,url:e.url,loader:h,context:e,error:a,networkDetails:t,stats:s};if(n){const g=(t==null?void 0:t.url)||e.url;d.response=C({url:g,data:void 0},n)}this.hls.trigger(m.ERROR,d)}handlePlaylistLoaded(e,t,r,n,s,A){const a=this.hls,{type:l,level:o,id:h,groupId:d,deliveryDirectives:g}=n,v=Ga(t,n),E=il(n),T=typeof n.level=="number"&&E===O.MAIN?o:void 0;if(!e.fragments.length){const J=e.playlistParsingError=new Error("No Segments found in Playlist");a.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_EMPTY_ERROR,fatal:!1,url:v,error:J,reason:J.message,response:t,context:n,level:T,parent:E,networkDetails:s,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const F=e.playlistParsingError;if(F){if(this.hls.logger.warn(F),!a.config.ignorePlaylistParsingErrors){a.trigger(m.ERROR,{type:he.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:v,error:F,reason:F.message,response:t,context:n,level:T,parent:E,networkDetails:s,stats:r});return}e.playlistParsingError=null}switch(e.live&&A&&(A.getCacheAge&&(e.ageHeader=A.getCacheAge()||0),(!A.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case ge.MANIFEST:case ge.LEVEL:a.trigger(m.LEVEL_LOADED,{details:e,levelInfo:n.levelOrTrack||a.levels[0],level:T||0,id:h||0,stats:r,networkDetails:s,deliveryDirectives:g,withoutMultiVariant:l===ge.MANIFEST});break;case ge.AUDIO_TRACK:a.trigger(m.AUDIO_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:h||0,groupId:d||"",stats:r,networkDetails:s,deliveryDirectives:g});break;case ge.SUBTITLE_TRACK:a.trigger(m.SUBTITLE_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:h||0,groupId:d||"",stats:r,networkDetails:s,deliveryDirectives:g});break}}}class c{static get version(){return Qi}static isMSESupported(){return nl()}static isSupported(){return Gu()}static getMediaSource(){return ye()}static get Events(){return m}static get MetadataSchema(){return ci}static get ErrorTypes(){return he}static get ErrorDetails(){return W}static get DefaultConfig(){return c.defaultConfig?c.defaultConfig:MA}static set DefaultConfig(e){c.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Ri,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=we(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=Jo(c.DefaultConfig,e,t);this.userConfig=e,r.progressive&&Ou(r,t);const{abrController:n,bufferController:s,capLevelController:A,errorController:a,fpsController:l}=r,o=new a(this),h=this.abrController=new n(this),d=new Yt(this),g=r.interstitialsController,v=g?this.interstitialsController=new g(this,c):null,E=this.bufferController=new s(this,d),T=this.capLevelController=new A(this),F=new l(this),J=new f(this),ce=r.contentSteeringController,Ae=ce?new ce(this):null,de=this.levelController=new $u(this,Ae),Te=new Hu(this),He=new zu(this.config),xe=this.streamController=new Zu(this,d,He),Ne=this.gapController=new Pu(this,d);T.setStreamController(xe),F.setStreamController(xe);const je=[J,de,xe];v&&je.splice(1,0,v),Ae&&je.splice(1,0,Ae),this.networkControllers=je;const Oe=[h,E,Ne,T,F,Te,d];this.audioTrackController=this.createController(r.audioTrackController,je);const gt=r.audioStreamController;gt&&je.push(this.audioStreamController=new gt(this,d,He)),this.subtitleTrackController=this.createController(r.subtitleTrackController,je);const Pt=r.subtitleStreamController;Pt&&je.push(this.subtititleStreamController=new Pt(this,d,He)),this.createController(r.timelineController,Oe),He.emeController=this.emeController=this.createController(r.emeController,Oe),this.cmcdController=this.createController(r.cmcdController,Oe),this.latencyController=this.createController(Ku,Oe),this.coreComponents=Oe,je.push(o);const hr=o.onErrorOut;typeof hr=="function"&&this.on(m.ERROR,hr,o),this.on(m.MANIFEST_LOADED,J.onManifestLoaded,J)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===m.ERROR;this.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(m.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const s=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(m.ERROR,{type:he.OTHER_ERROR,details:W.ATTACH_MEDIA_ERROR,fatal:!0,error:s});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,r=t?e.media:e,n=t?e:{media:r};this._media=r,this.trigger(m.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(m.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=re.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),!(!this.started||!this.networkControllers));r++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[O.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[O.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[O.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=vu()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){_n(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const r=e.length;for(let n=0;n<r;n++)if(e[n].maxBitrate>=t)return n;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let n;if(t===-1&&e!=null&&e.length?n=e.length-1:n=t,r)for(let s=n;s--;){const A=e[s].attrs["HDCP-LEVEL"];if(A&&A<=r)return s}return n}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const r=Cn(t);return Ir(e,r,navigator.mediaCapabilities)}}c.defaultConfig=void 0}}]);
}());