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.
404 lines
1.2 MiB
404 lines
1.2 MiB
!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[4339],{70557:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ie}});var I=B(60499),be=B(59301),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},_e=Re,Z=B(7657),v=function(H,F){return be.createElement(Z.Z,(0,I.Z)({},H,{ref:F,icon:_e}))},me=be.forwardRef(v),ie=me},84105:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ie}});var I=B(60499),be=B(59301),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},_e=Re,Z=B(7657),v=function(H,F){return be.createElement(Z.Z,(0,I.Z)({},H,{ref:F,icon:_e}))},me=be.forwardRef(v),ie=me},18785:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ie}});var I=B(60499),be=B(59301),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},_e=Re,Z=B(7657),v=function(H,F){return be.createElement(Z.Z,(0,I.Z)({},H,{ref:F,icon:_e}))},me=be.forwardRef(v),ie=me},62772:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ie}});var I=B(60499),be=B(59301),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},_e=Re,Z=B(7657),v=function(H,F){return be.createElement(Z.Z,(0,I.Z)({},H,{ref:F,icon:_e}))},me=be.forwardRef(v),ie=me},68196:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return Er}});var I=B(85899),be=B(72190),Re=B(42244),_e=B(43403),Z=B(92310),v=B.n(Z),me=B(29301),ie=B(76846),l=B(96452),H=B(6089),F=B(80402),E=B(34280),x=B(49658),T=B(59301),L=B(60499),q=B(77900),Y=B(8654);function $(ze){var Oe=ze.prefixCls,Se=ze.align,qe=ze.arrow,ht=ze.arrowPos,pt=qe||{},Q=pt.className,we=pt.content,$e=ht.x,Be=$e===void 0?0:$e,nt=ht.y,gt=nt===void 0?0:nt,Ot=T.useRef();if(!Se||!Se.points)return null;var yt={position:"absolute"};if(Se.autoArrow!==!1){var Dt=Se.points[0],vt=Se.points[1],Gt=Dt[0],bt=Dt[1],At=vt[0],kt=vt[1];Gt===At||!["t","b"].includes(Gt)?yt.top=gt:Gt==="t"?yt.top=0:yt.bottom=0,bt===kt||!["l","r"].includes(bt)?yt.left=Be:bt==="l"?yt.left=0:yt.right=0}return T.createElement("div",{ref:Ot,className:v()("".concat(Oe,"-arrow"),Q),style:yt},we)}function A(ze){var Oe=ze.prefixCls,Se=ze.open,qe=ze.zIndex,ht=ze.mask,pt=ze.motion;return ht?T.createElement(q.default,(0,L.Z)({},pt,{motionAppear:!0,visible:Se,removeOnLeave:!0}),function(Q){var we=Q.className;return T.createElement("div",{style:{zIndex:qe},className:v()("".concat(Oe,"-mask"),we)})}):null}var M=T.memo(function(ze){var Oe=ze.children;return Oe},function(ze,Oe){return Oe.cache}),O=M,W=T.forwardRef(function(ze,Oe){var Se=ze.popup,qe=ze.className,ht=ze.prefixCls,pt=ze.style,Q=ze.target,we=ze.onVisibleChanged,$e=ze.open,Be=ze.keepDom,nt=ze.fresh,gt=ze.onClick,Ot=ze.mask,yt=ze.arrow,Dt=ze.arrowPos,vt=ze.align,Gt=ze.motion,bt=ze.maskMotion,At=ze.forceRender,kt=ze.getPopupContainer,er=ze.autoDestroy,qt=ze.portal,Pt=ze.zIndex,ir=ze.onMouseEnter,y=ze.onMouseLeave,R=ze.onPointerEnter,rt=ze.onPointerDownCapture,U=ze.ready,te=ze.offsetX,Zt=ze.offsetY,Ae=ze.offsetR,Te=ze.offsetB,Le=ze.onAlign,K=ze.onPrepare,J=ze.stretch,Ee=ze.targetWidth,Ce=ze.targetHeight,N=typeof Se=="function"?Se():Se,Et=$e||Be,de=(kt==null?void 0:kt.length)>0,Bt=T.useState(!kt||!de),Xt=(0,be.Z)(Bt,2),Br=Xt[0],cn=Xt[1];if((0,E.Z)(function(){!Br&&de&&Q&&cn(!0)},[Br,de,Q]),!Br)return null;var jr="auto",vr={left:"-1000vw",top:"-1000vh",right:jr,bottom:jr};if(U||!$e){var xn,$n=vt.points,Jr=vt.dynamicInset||((xn=vt._experimental)===null||xn===void 0?void 0:xn.dynamicInset),en=Jr&&$n[0][1]==="r",$t=Jr&&$n[0][0]==="b";en?(vr.right=Ae,vr.left=jr):(vr.left=te,vr.right=jr),$t?(vr.bottom=Te,vr.top=jr):(vr.top=Zt,vr.bottom=jr)}var xr={};return J&&(J.includes("height")&&Ce?xr.height=Ce:J.includes("minHeight")&&Ce&&(xr.minHeight=Ce),J.includes("width")&&Ee?xr.width=Ee:J.includes("minWidth")&&Ee&&(xr.minWidth=Ee)),$e||(xr.pointerEvents="none"),T.createElement(qt,{open:At||Et,getContainer:kt&&function(){return kt(Q)},autoDestroy:er},T.createElement(A,{prefixCls:ht,open:$e,zIndex:Pt,mask:Ot,motion:bt}),T.createElement(me.Z,{onResize:Le,disabled:!$e},function(se){return T.createElement(q.default,(0,L.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:At,leavedClassName:"".concat(ht,"-hidden")},Gt,{onAppearPrepare:K,onEnterPrepare:K,visible:$e,onVisibleChanged:function(ft){var _t;Gt==null||(_t=Gt.onVisibleChanged)===null||_t===void 0||_t.call(Gt,ft),we(ft)}}),function(ce,ft){var _t=ce.className,Ct=ce.style,Kt=v()(ht,_t,qe);return T.createElement("div",{ref:(0,Y.sQ)(se,Oe,ft),className:Kt,style:(0,I.Z)((0,I.Z)((0,I.Z)((0,I.Z)({"--arrow-x":"".concat(Dt.x||0,"px"),"--arrow-y":"".concat(Dt.y||0,"px")},vr),xr),Ct),{},{boxSizing:"border-box",zIndex:Pt},pt),onMouseEnter:ir,onMouseLeave:y,onPointerEnter:R,onClick:gt,onPointerDownCapture:rt},yt&&T.createElement($,{prefixCls:ht,arrow:yt,arrowPos:Dt,align:vt}),T.createElement(O,{cache:!$e&&!nt},N))})}))}),ge=W,De=T.forwardRef(function(ze,Oe){var Se=ze.children,qe=ze.getTriggerDOMNode,ht=(0,Y.Yr)(Se),pt=T.useCallback(function(we){(0,Y.mH)(Oe,qe?qe(we):we)},[qe]),Q=(0,Y.x1)(pt,(0,Y.C4)(Se));return ht?T.cloneElement(Se,{ref:Q}):Se}),he=De,Me=T.createContext(null),Fe=Me;function ke(ze){return ze?Array.isArray(ze)?ze:[ze]:[]}function ct(ze,Oe,Se,qe){return T.useMemo(function(){var ht=ke(Se!=null?Se:Oe),pt=ke(qe!=null?qe:Oe),Q=new Set(ht),we=new Set(pt);return ze&&(Q.has("hover")&&(Q.delete("hover"),Q.add("click")),we.has("hover")&&(we.delete("hover"),we.add("click"))),[Q,we]},[ze,Oe,Se,qe])}var ae=B(29194);function j(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Se=arguments.length>2?arguments[2]:void 0;return Se?ze[0]===Oe[0]:ze[0]===Oe[0]&&ze[1]===Oe[1]}function ee(ze,Oe,Se,qe){for(var ht=Se.points,pt=Object.keys(ze),Q=0;Q<pt.length;Q+=1){var we,$e=pt[Q];if(j((we=ze[$e])===null||we===void 0?void 0:we.points,ht,qe))return"".concat(Oe,"-placement-").concat($e)}return""}function ne(ze,Oe,Se,qe){return Oe||(Se?{motionName:"".concat(ze,"-").concat(Se)}:qe?{motionName:qe}:null)}function oe(ze){return ze.ownerDocument.defaultView}function re(ze){for(var Oe=[],Se=ze==null?void 0:ze.parentElement,qe=["hidden","scroll","clip","auto"];Se;){var ht=oe(Se).getComputedStyle(Se),pt=ht.overflowX,Q=ht.overflowY,we=ht.overflow;[pt,Q,we].some(function($e){return qe.includes($e)})&&Oe.push(Se),Se=Se.parentElement}return Oe}function b(ze){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ze)?Oe:ze}function S(ze){return b(parseFloat(ze),0)}function V(ze,Oe){var Se=(0,I.Z)({},ze);return(Oe||[]).forEach(function(qe){if(!(qe instanceof HTMLBodyElement||qe instanceof HTMLHtmlElement)){var ht=oe(qe).getComputedStyle(qe),pt=ht.overflow,Q=ht.overflowClipMargin,we=ht.borderTopWidth,$e=ht.borderBottomWidth,Be=ht.borderLeftWidth,nt=ht.borderRightWidth,gt=qe.getBoundingClientRect(),Ot=qe.offsetHeight,yt=qe.clientHeight,Dt=qe.offsetWidth,vt=qe.clientWidth,Gt=S(we),bt=S($e),At=S(Be),kt=S(nt),er=b(Math.round(gt.width/Dt*1e3)/1e3),qt=b(Math.round(gt.height/Ot*1e3)/1e3),Pt=(Dt-vt-At-kt)*er,ir=(Ot-yt-Gt-bt)*qt,y=Gt*qt,R=bt*qt,rt=At*er,U=kt*er,te=0,Zt=0;if(pt==="clip"){var Ae=S(Q);te=Ae*er,Zt=Ae*qt}var Te=gt.x+rt-te,Le=gt.y+y-Zt,K=Te+gt.width+2*te-rt-U-Pt,J=Le+gt.height+2*Zt-y-R-ir;Se.left=Math.max(Se.left,Te),Se.top=Math.max(Se.top,Le),Se.right=Math.min(Se.right,K),Se.bottom=Math.min(Se.bottom,J)}}),Se}function ve(ze){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Se="".concat(Oe),qe=Se.match(/^(.*)\%$/);return qe?ze*(parseFloat(qe[1])/100):parseFloat(Se)}function He(ze,Oe){var Se=Oe||[],qe=(0,be.Z)(Se,2),ht=qe[0],pt=qe[1];return[ve(ze.width,ht),ve(ze.height,pt)]}function st(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ze[0],ze[1]]}function tt(ze,Oe){var Se=Oe[0],qe=Oe[1],ht,pt;return Se==="t"?pt=ze.y:Se==="b"?pt=ze.y+ze.height:pt=ze.y+ze.height/2,qe==="l"?ht=ze.x:qe==="r"?ht=ze.x+ze.width:ht=ze.x+ze.width/2,{x:ht,y:pt}}function Xe(ze,Oe){var Se={t:"b",b:"t",l:"r",r:"l"};return ze.map(function(qe,ht){return ht===Oe?Se[qe]||"c":qe}).join("")}function xt(ze,Oe,Se,qe,ht,pt,Q){var we=T.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ht[qe]||{}}),$e=(0,be.Z)(we,2),Be=$e[0],nt=$e[1],gt=T.useRef(0),Ot=T.useMemo(function(){return Oe?re(Oe):[]},[Oe]),yt=T.useRef({}),Dt=function(){yt.current={}};ze||Dt();var vt=(0,H.Z)(function(){if(Oe&&Se&&ze){let Dn=function(Zn,ii){var wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hr,ui=Et.x+Zn,zi=Et.y+ii,Hi=ui+$t,Mi=zi+en,_i=Math.max(ui,wi.left),dr=Math.max(zi,wi.top),Mr=Math.min(Hi,wi.right),vn=Math.min(Mi,wi.bottom);return Math.max(0,(Mr-_i)*(vn-dr))},kn=function(){bn=Et.y+yr,yn=bn+en,br=Et.x+Ut,gr=br+$t};var At,kt,er,qt,Pt=Oe,ir=Pt.ownerDocument,y=oe(Pt),R=y.getComputedStyle(Pt),rt=R.position,U=Pt.style.left,te=Pt.style.top,Zt=Pt.style.right,Ae=Pt.style.bottom,Te=Pt.style.overflow,Le=(0,I.Z)((0,I.Z)({},ht[qe]),pt),K=ir.createElement("div");(At=Pt.parentElement)===null||At===void 0||At.appendChild(K),K.style.left="".concat(Pt.offsetLeft,"px"),K.style.top="".concat(Pt.offsetTop,"px"),K.style.position=rt,K.style.height="".concat(Pt.offsetHeight,"px"),K.style.width="".concat(Pt.offsetWidth,"px"),Pt.style.left="0",Pt.style.top="0",Pt.style.right="auto",Pt.style.bottom="auto",Pt.style.overflow="hidden";var J;if(Array.isArray(Se))J={x:Se[0],y:Se[1],width:0,height:0};else{var Ee,Ce,N=Se.getBoundingClientRect();N.x=(Ee=N.x)!==null&&Ee!==void 0?Ee:N.left,N.y=(Ce=N.y)!==null&&Ce!==void 0?Ce:N.top,J={x:N.x,y:N.y,width:N.width,height:N.height}}var Et=Pt.getBoundingClientRect(),de=y.getComputedStyle(Pt),Bt=de.height,Xt=de.width;Et.x=(kt=Et.x)!==null&&kt!==void 0?kt:Et.left,Et.y=(er=Et.y)!==null&&er!==void 0?er:Et.top;var Br=ir.documentElement,cn=Br.clientWidth,jr=Br.clientHeight,vr=Br.scrollWidth,xn=Br.scrollHeight,$n=Br.scrollTop,Jr=Br.scrollLeft,en=Et.height,$t=Et.width,xr=J.height,se=J.width,ce={left:0,top:0,right:cn,bottom:jr},ft={left:-Jr,top:-$n,right:vr-Jr,bottom:xn-$n},_t=Le.htmlRegion,Ct="visible",Kt="visibleFirst";_t!=="scroll"&&_t!==Kt&&(_t=Ct);var jt=_t===Kt,Wt=V(ft,Ot),Ht=V(ce,Ot),hr=_t===Ct?Ht:Wt,_r=jt?Ht:hr;Pt.style.left="auto",Pt.style.top="auto",Pt.style.right="0",Pt.style.bottom="0";var Kr=Pt.getBoundingClientRect();Pt.style.left=U,Pt.style.top=te,Pt.style.right=Zt,Pt.style.bottom=Ae,Pt.style.overflow=Te,(qt=Pt.parentElement)===null||qt===void 0||qt.removeChild(K);var Nr=b(Math.round($t/parseFloat(Xt)*1e3)/1e3),Qr=b(Math.round(en/parseFloat(Bt)*1e3)/1e3);if(Nr===0||Qr===0||(0,ie.Sh)(Se)&&!(0,ae.Z)(Se))return;var _n=Le.offset,Zr=Le.targetOffset,sn=He(Et,_n),Ie=(0,be.Z)(sn,2),Ge=Ie[0],lt=Ie[1],Ze=He(J,Zr),Je=(0,be.Z)(Ze,2),ut=Je[0],St=Je[1];J.x-=ut,J.y-=St;var It=Le.points||[],Qt=(0,be.Z)(It,2),tr=Qt[0],cr=Qt[1],Vt=st(cr),Ft=st(tr),rr=tt(J,Vt),$r=tt(Et,Ft),Ur=(0,I.Z)({},Le),Ut=rr.x-$r.x+Ge,yr=rr.y-$r.y+lt,Vr=Dn(Ut,yr),Ir=Dn(Ut,yr,Ht),Cr=tt(J,["t","l"]),tn=tt(Et,["t","l"]),pr=tt(J,["b","r"]),Lr=tt(Et,["b","r"]),rn=Le.overflow||{},Ve=rn.adjustX,fr=rn.adjustY,Gr=rn.shiftX,hn=rn.shiftY,Tn=function(ii){return typeof ii=="boolean"?ii:ii>=0},bn,yn,br,gr;kn();var gn=Tn(fr),an=Ft[0]===Vt[0];if(gn&&Ft[0]==="t"&&(yn>_r.bottom||yt.current.bt)){var on=yr;an?on-=en-xr:on=Cr.y-Lr.y-lt;var Ei=Dn(Ut,on),ei=Dn(Ut,on,Ht);Ei>Vr||Ei===Vr&&(!jt||ei>=Ir)?(yt.current.bt=!0,yr=on,lt=-lt,Ur.points=[Xe(Ft,0),Xe(Vt,0)]):yt.current.bt=!1}if(gn&&Ft[0]==="b"&&(bn<_r.top||yt.current.tb)){var An=yr;an?An+=en-xr:An=pr.y-tn.y-lt;var lr=Dn(Ut,An),un=Dn(Ut,An,Ht);lr>Vr||lr===Vr&&(!jt||un>=Ir)?(yt.current.tb=!0,yr=An,lt=-lt,Ur.points=[Xe(Ft,0),Xe(Vt,0)]):yt.current.tb=!1}var fn=Tn(Ve),qn=Ft[1]===Vt[1];if(fn&&Ft[1]==="l"&&(gr>_r.right||yt.current.rl)){var ai=Ut;qn?ai-=$t-se:ai=Cr.x-Lr.x-Ge;var Ln=Dn(ai,yr),Un=Dn(ai,yr,Ht);Ln>Vr||Ln===Vr&&(!jt||Un>=Ir)?(yt.current.rl=!0,Ut=ai,Ge=-Ge,Ur.points=[Xe(Ft,1),Xe(Vt,1)]):yt.current.rl=!1}if(fn&&Ft[1]==="r"&&(br<_r.left||yt.current.lr)){var Rn=Ut;qn?Rn+=$t-se:Rn=pr.x-tn.x-Ge;var ln=Dn(Rn,yr),fi=Dn(Rn,yr,Ht);ln>Vr||ln===Vr&&(!jt||fi>=Ir)?(yt.current.lr=!0,Ut=Rn,Ge=-Ge,Ur.points=[Xe(Ft,1),Xe(Vt,1)]):yt.current.lr=!1}kn();var Hn=Gr===!0?0:Gr;typeof Hn=="number"&&(br<Ht.left&&(Ut-=br-Ht.left-Ge,J.x+se<Ht.left+Hn&&(Ut+=J.x-Ht.left+se-Hn)),gr>Ht.right&&(Ut-=gr-Ht.right-Ge,J.x>Ht.right-Hn&&(Ut+=J.x-Ht.right+Hn)));var ni=hn===!0?0:hn;typeof ni=="number"&&(bn<Ht.top&&(yr-=bn-Ht.top-lt,J.y+xr<Ht.top+ni&&(yr+=J.y-Ht.top+xr-ni)),yn>Ht.bottom&&(yr-=yn-Ht.bottom-lt,J.y>Ht.bottom-ni&&(yr+=J.y-Ht.bottom+ni)));var oi=Et.x+Ut,ti=oi+$t,Hr=Et.y+yr,di=Hr+en,pi=J.x,vi=pi+se,jn=J.y,Or=jn+xr,Oi=Math.max(oi,pi),Mt=Math.min(ti,vi),Vn=(Oi+Mt)/2,Ri=Vn-oi,mi=Math.max(Hr,jn),Mn=Math.min(di,Or),li=(mi+Mn)/2,kr=li-Hr;Q==null||Q(Oe,Ur);var Xn=Kr.right-Et.x-(Ut+Et.width),gi=Kr.bottom-Et.y-(yr+Et.height);Nr===1&&(Ut=Math.floor(Ut),Xn=Math.floor(Xn)),Qr===1&&(yr=Math.floor(yr),gi=Math.floor(gi));var ri={ready:!0,offsetX:Ut/Nr,offsetY:yr/Qr,offsetR:Xn/Nr,offsetB:gi/Qr,arrowX:Ri/Nr,arrowY:kr/Qr,scaleX:Nr,scaleY:Qr,align:Ur};nt(ri)}}),Gt=function(){gt.current+=1;var kt=gt.current;Promise.resolve().then(function(){gt.current===kt&&vt()})},bt=function(){nt(function(kt){return(0,I.Z)((0,I.Z)({},kt),{},{ready:!1})})};return(0,E.Z)(bt,[qe]),(0,E.Z)(function(){ze||bt()},[ze]),[Be.ready,Be.offsetX,Be.offsetY,Be.offsetR,Be.offsetB,Be.arrowX,Be.arrowY,Be.scaleX,Be.scaleY,Be.align,Gt]}var et=B(77654);function Ue(ze,Oe,Se,qe,ht){(0,E.Z)(function(){if(ze&&Oe&&Se){let gt=function(){qe(),ht()};var pt=Oe,Q=Se,we=re(pt),$e=re(Q),Be=oe(Q),nt=new Set([Be].concat((0,et.Z)(we),(0,et.Z)($e)));return nt.forEach(function(Ot){Ot.addEventListener("scroll",gt,{passive:!0})}),Be.addEventListener("resize",gt,{passive:!0}),qe(),function(){nt.forEach(function(Ot){Ot.removeEventListener("scroll",gt),Be.removeEventListener("resize",gt)})}}},[ze,Oe,Se])}var Yt=B(48736);function Nt(ze,Oe,Se,qe,ht,pt,Q,we){var $e=T.useRef(ze);$e.current=ze;var Be=T.useRef(!1);T.useEffect(function(){if(Oe&&qe&&(!ht||pt)){var gt=function(){Be.current=!1},Ot=function(er){var qt;$e.current&&!Q(((qt=er.composedPath)===null||qt===void 0||(qt=qt.call(er))===null||qt===void 0?void 0:qt[0])||er.target)&&!Be.current&&we(!1)},yt=oe(qe);yt.addEventListener("pointerdown",gt,!0),yt.addEventListener("mousedown",Ot,!0),yt.addEventListener("contextmenu",Ot,!0);var Dt=(0,l.A)(Se);if(Dt&&(Dt.addEventListener("mousedown",Ot,!0),Dt.addEventListener("contextmenu",Ot,!0)),0)var vt,Gt,bt,At;return function(){yt.removeEventListener("pointerdown",gt,!0),yt.removeEventListener("mousedown",Ot,!0),yt.removeEventListener("contextmenu",Ot,!0),Dt&&(Dt.removeEventListener("mousedown",Ot,!0),Dt.removeEventListener("contextmenu",Ot,!0))}}},[Oe,Se,qe,ht,pt]);function nt(){Be.current=!0}return nt}var Sr=["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 wt(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_e.Z,Oe=T.forwardRef(function(Se,qe){var ht=Se.prefixCls,pt=ht===void 0?"rc-trigger-popup":ht,Q=Se.children,we=Se.action,$e=we===void 0?"hover":we,Be=Se.showAction,nt=Se.hideAction,gt=Se.popupVisible,Ot=Se.defaultPopupVisible,yt=Se.onPopupVisibleChange,Dt=Se.afterPopupVisibleChange,vt=Se.mouseEnterDelay,Gt=Se.mouseLeaveDelay,bt=Gt===void 0?.1:Gt,At=Se.focusDelay,kt=Se.blurDelay,er=Se.mask,qt=Se.maskClosable,Pt=qt===void 0?!0:qt,ir=Se.getPopupContainer,y=Se.forceRender,R=Se.autoDestroy,rt=Se.destroyPopupOnHide,U=Se.popup,te=Se.popupClassName,Zt=Se.popupStyle,Ae=Se.popupPlacement,Te=Se.builtinPlacements,Le=Te===void 0?{}:Te,K=Se.popupAlign,J=Se.zIndex,Ee=Se.stretch,Ce=Se.getPopupClassNameFromAlign,N=Se.fresh,Et=Se.alignPoint,de=Se.onPopupClick,Bt=Se.onPopupAlign,Xt=Se.arrow,Br=Se.popupMotion,cn=Se.maskMotion,jr=Se.popupTransitionName,vr=Se.popupAnimation,xn=Se.maskTransitionName,$n=Se.maskAnimation,Jr=Se.className,en=Se.getTriggerDOMNode,$t=(0,Re.Z)(Se,Sr),xr=R||rt||!1,se=T.useState(!1),ce=(0,be.Z)(se,2),ft=ce[0],_t=ce[1];(0,E.Z)(function(){_t((0,x.Z)())},[]);var Ct=T.useRef({}),Kt=T.useContext(Fe),jt=T.useMemo(function(){return{registerSubPopup:function(Mr,vn){Ct.current[Mr]=vn,Kt==null||Kt.registerSubPopup(Mr,vn)}}},[Kt]),Wt=(0,F.Z)(),Ht=T.useState(null),hr=(0,be.Z)(Ht,2),_r=hr[0],Kr=hr[1],Nr=T.useRef(null),Qr=(0,H.Z)(function(dr){Nr.current=dr,(0,ie.Sh)(dr)&&_r!==dr&&Kr(dr),Kt==null||Kt.registerSubPopup(Wt,dr)}),_n=T.useState(null),Zr=(0,be.Z)(_n,2),sn=Zr[0],Ie=Zr[1],Ge=T.useRef(null),lt=(0,H.Z)(function(dr){(0,ie.Sh)(dr)&&sn!==dr&&(Ie(dr),Ge.current=dr)}),Ze=T.Children.only(Q),Je=(Ze==null?void 0:Ze.props)||{},ut={},St=(0,H.Z)(function(dr){var Mr,vn,zr=sn;return(zr==null?void 0:zr.contains(dr))||((Mr=(0,l.A)(zr))===null||Mr===void 0?void 0:Mr.host)===dr||dr===zr||(_r==null?void 0:_r.contains(dr))||((vn=(0,l.A)(_r))===null||vn===void 0?void 0:vn.host)===dr||dr===_r||Object.values(Ct.current).some(function(qr){return(qr==null?void 0:qr.contains(dr))||dr===qr})}),It=ne(pt,Br,vr,jr),Qt=ne(pt,cn,$n,xn),tr=T.useState(Ot||!1),cr=(0,be.Z)(tr,2),Vt=cr[0],Ft=cr[1],rr=gt!=null?gt:Vt,$r=(0,H.Z)(function(dr){gt===void 0&&Ft(dr)});(0,E.Z)(function(){Ft(gt||!1)},[gt]);var Ur=T.useRef(rr);Ur.current=rr;var Ut=T.useRef([]);Ut.current=[];var yr=(0,H.Z)(function(dr){var Mr;$r(dr),((Mr=Ut.current[Ut.current.length-1])!==null&&Mr!==void 0?Mr:rr)!==dr&&(Ut.current.push(dr),yt==null||yt(dr))}),Vr=T.useRef(),Ir=function(){clearTimeout(Vr.current)},Cr=function(Mr){var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ir(),vn===0?yr(Mr):Vr.current=setTimeout(function(){yr(Mr)},vn*1e3)};T.useEffect(function(){return Ir},[]);var tn=T.useState(!1),pr=(0,be.Z)(tn,2),Lr=pr[0],rn=pr[1];(0,E.Z)(function(dr){(!dr||rr)&&rn(!0)},[rr]);var Ve=T.useState(null),fr=(0,be.Z)(Ve,2),Gr=fr[0],hn=fr[1],Tn=T.useState(null),bn=(0,be.Z)(Tn,2),yn=bn[0],br=bn[1],gr=function(Mr){br([Mr.clientX,Mr.clientY])},gn=xt(rr,_r,Et&&yn!==null?yn:sn,Ae,Le,K,Bt),an=(0,be.Z)(gn,11),on=an[0],Ei=an[1],ei=an[2],An=an[3],lr=an[4],un=an[5],fn=an[6],qn=an[7],ai=an[8],Ln=an[9],Un=an[10],Rn=ct(ft,$e,Be,nt),ln=(0,be.Z)(Rn,2),fi=ln[0],Hn=ln[1],ni=fi.has("click"),oi=Hn.has("click")||Hn.has("contextMenu"),ti=(0,H.Z)(function(){Lr||Un()}),Hr=function(){Ur.current&&Et&&oi&&Cr(!1)};Ue(rr,sn,_r,ti,Hr),(0,E.Z)(function(){ti()},[yn,Ae]),(0,E.Z)(function(){rr&&!(Le!=null&&Le[Ae])&&ti()},[JSON.stringify(K)]);var di=T.useMemo(function(){var dr=ee(Le,pt,Ln,Et);return v()(dr,Ce==null?void 0:Ce(Ln))},[Ln,Ce,Le,pt,Et]);T.useImperativeHandle(qe,function(){return{nativeElement:Ge.current,popupElement:Nr.current,forceAlign:ti}});var pi=T.useState(0),vi=(0,be.Z)(pi,2),jn=vi[0],Or=vi[1],Oi=T.useState(0),Mt=(0,be.Z)(Oi,2),Vn=Mt[0],Ri=Mt[1],mi=function(){if(Ee&&sn){var Mr=sn.getBoundingClientRect();Or(Mr.width),Ri(Mr.height)}},Mn=function(){mi(),ti()},li=function(Mr){rn(!1),Un(),Dt==null||Dt(Mr)},kr=function(){return new Promise(function(Mr){mi(),hn(function(){return Mr})})};(0,E.Z)(function(){Gr&&(Un(),Gr(),hn(null))},[Gr]);function Xn(dr,Mr,vn,zr){ut[dr]=function(qr){var xi;zr==null||zr(qr),Cr(Mr,vn);for(var Qn=arguments.length,Ii=new Array(Qn>1?Qn-1:0),dn=1;dn<Qn;dn++)Ii[dn-1]=arguments[dn];(xi=Je[dr])===null||xi===void 0||xi.call.apply(xi,[Je,qr].concat(Ii))}}(ni||oi)&&(ut.onClick=function(dr){var Mr;Ur.current&&oi?Cr(!1):!Ur.current&&ni&&(gr(dr),Cr(!0));for(var vn=arguments.length,zr=new Array(vn>1?vn-1:0),qr=1;qr<vn;qr++)zr[qr-1]=arguments[qr];(Mr=Je.onClick)===null||Mr===void 0||Mr.call.apply(Mr,[Je,dr].concat(zr))});var gi=Nt(rr,oi,sn,_r,er,Pt,St,Cr),ri=fi.has("hover"),Dn=Hn.has("hover"),kn,Zn;ri&&(Xn("onMouseEnter",!0,vt,function(dr){gr(dr)}),Xn("onPointerEnter",!0,vt,function(dr){gr(dr)}),kn=function(Mr){(rr||Lr)&&_r!==null&&_r!==void 0&&_r.contains(Mr.target)&&Cr(!0,vt)},Et&&(ut.onMouseMove=function(dr){var Mr;(Mr=Je.onMouseMove)===null||Mr===void 0||Mr.call(Je,dr)})),Dn&&(Xn("onMouseLeave",!1,bt),Xn("onPointerLeave",!1,bt),Zn=function(){Cr(!1,bt)}),fi.has("focus")&&Xn("onFocus",!0,At),Hn.has("focus")&&Xn("onBlur",!1,kt),fi.has("contextMenu")&&(ut.onContextMenu=function(dr){var Mr;Ur.current&&Hn.has("contextMenu")?Cr(!1):(gr(dr),Cr(!0)),dr.preventDefault();for(var vn=arguments.length,zr=new Array(vn>1?vn-1:0),qr=1;qr<vn;qr++)zr[qr-1]=arguments[qr];(Mr=Je.onContextMenu)===null||Mr===void 0||Mr.call.apply(Mr,[Je,dr].concat(zr))}),Jr&&(ut.className=v()(Je.className,Jr));var ii=T.useRef(!1);ii.current||(ii.current=y||rr||Lr);var wi=(0,I.Z)((0,I.Z)({},Je),ut),ui={},zi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];zi.forEach(function(dr){$t[dr]&&(ui[dr]=function(){for(var Mr,vn=arguments.length,zr=new Array(vn),qr=0;qr<vn;qr++)zr[qr]=arguments[qr];(Mr=wi[dr])===null||Mr===void 0||Mr.call.apply(Mr,[wi].concat(zr)),$t[dr].apply($t,zr)})});var Hi=T.cloneElement(Ze,(0,I.Z)((0,I.Z)({},wi),ui)),Mi={x:un,y:fn},_i=Xt?(0,I.Z)({},Xt!==!0?Xt:{}):null;return T.createElement(T.Fragment,null,T.createElement(me.Z,{disabled:!rr,ref:lt,onResize:Mn},T.createElement(he,{getTriggerDOMNode:en},Hi)),ii.current&&T.createElement(Fe.Provider,{value:jt},T.createElement(ge,{portal:ze,ref:Qr,prefixCls:pt,popup:U,className:v()(te,di),style:Zt,target:sn,onMouseEnter:kn,onMouseLeave:Zn,onPointerEnter:kn,zIndex:J,open:rr,keepDom:Lr,fresh:N,onClick:de,onPointerDownCapture:gi,mask:er,motion:It,maskMotion:Qt,onVisibleChanged:li,onPrepare:kr,forceRender:y,autoDestroy:xr,getPopupContainer:ir,align:Ln,arrow:_i,arrowPos:Mi,ready:on,offsetX:Ei,offsetY:ei,offsetR:An,offsetB:lr,onAlign:ti,stretch:Ee,targetWidth:jn/qn,targetHeight:Vn/ai})))});return Oe}var Er=wt(_e.Z)},84390:function(){"use strict"},96403:function(Jt,ot,B){"use strict";B.r(ot),B.d(ot,{default:function(){return Me}});var I=B(59301),be=B(73635),Re=B.p+"static/detailTitle3.35713931.png",_e=B(18645),Z=B(48289),v=B(25399),me=B(29787),ie=B(89787),l=B(27375),H=B(78991),F=B(48027),E=B(40412),x=B(21774),T=B(82875),L=Object.defineProperty,q=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,O=(Fe,ke,ct)=>ke in Fe?L(Fe,ke,{enumerable:!0,configurable:!0,writable:!0,value:ct}):Fe[ke]=ct,W=(Fe,ke)=>{for(var ct in ke||(ke={}))A.call(ke,ct)&&O(Fe,ct,ke[ct]);if($)for(var ct of $(ke))M.call(ke,ct)&&O(Fe,ct,ke[ct]);return Fe},ge=(Fe,ke)=>q(Fe,Y(ke)),De=(Fe,ke,ct)=>new Promise((ae,j)=>{var ee=re=>{try{oe(ct.next(re))}catch(b){j(b)}},ne=re=>{try{oe(ct.throw(re))}catch(b){j(b)}},oe=re=>re.done?ae(re.value):Promise.resolve(re.value).then(ee,ne);oe((ct=ct.apply(Fe,ke)).next())});const he=({pathsDetail:Fe,dispatch:ke})=>{var ct,ae,j,ee,ne;const oe=(0,be.useParams)(),[re,b]=(0,I.useState)(1),[,S,V,ve]=(0,F.U)(H.Cc,{subject_id:oe==null?void 0:oe.pathId,uuid:oe==null?void 0:oe.learningpathId}),[He,st]=(0,I.useState)([]),[tt,Xe]=(0,I.useState)(!1),[xt,et]=(0,I.useState)({}),[Ue,Yt]=(0,I.useState)(!1),Nt=[3,2,1];(0,I.useEffect)(()=>{V({})},[]),(0,I.useEffect)(()=>{var Oe,Se;if((Oe=Fe==null?void 0:Fe.detail)!=null&&Oe.nodes&&re===1){const qe=[...(Se=Fe==null?void 0:Fe.detail)==null?void 0:Se.nodes];st(qe==null?void 0:qe.splice(1)),b(2)}},[(ct=Fe==null?void 0:Fe.detail)==null?void 0:ct.nodes]);const Sr=(0,I.useMemo)(()=>[{title:"\u6807\u7B7E\u8282\u70B9\u540D\u79F0",width:"240rem",ellipsis:!0,dataIndex:"name",render:Oe=>I.createElement(v.Z,{title:Oe},Oe)},{title:"\u5DF2\u5173\u8054\u8D44\u6E90\u6570",ellipsis:!0,dataIndex:"resource_count"},{title:"\u5B9E\u8BAD",ellipsis:!0,dataIndex:"shixun"},{title:"\u89C6\u9891",ellipsis:!0,dataIndex:"video"},{title:"\u8BFE\u4EF6",ellipsis:!0,dataIndex:"attachment"},{title:"\u8BD5\u5377",ellipsis:!0,dataIndex:"examination_bank"},{title:"\u4F5C\u4E1A",ellipsis:!0,dataIndex:"homework"},{title:"\u5176\u4ED6",ellipsis:!0,dataIndex:"other"},{title:"\u67E5\u770B",ellipsis:!0,dataIndex:"look",render:(Oe,Se)=>I.createElement("a",{style:{color:"#18D6FF"},onClick:()=>{ze(Se)}},"\u67E5\u770B\u8BE6\u60C5")}],[]),wt=()=>De(void 0,null,function*(){V({})}),Er=(0,I.useMemo)(()=>{var Oe,Se;const qe=((Oe=ve==null?void 0:ve.data)==null?void 0:Oe.relation_resource_count)||0,ht=((Se=ve==null?void 0:ve.data)==null?void 0:Se.no_relation_resource_count)||0,pt=qe+ht;return pt>0?Math.round(qe/pt*100):0},[ve==null?void 0:ve.data]),ze=Oe=>De(void 0,null,function*(){var Se,qe,ht,pt,Q;Yt(!0);let we=yield(0,T.ZP)("/api/knowledge/v2/get_node.json",{method:"get",params:{depth:0,subject_id:oe==null?void 0:oe.pathId,nodeUuid:Oe==null?void 0:Oe.knowledge_uuid}});if((we==null?void 0:we.status)===0&&((qe=(Se=we==null?void 0:we.data)==null?void 0:Se.nodes)==null?void 0:qe.length)>0){let $e=(Q=(pt=(ht=we==null?void 0:we.data)==null?void 0:ht.nodes)==null?void 0:pt.map(Be=>{var nt,gt,Ot,yt,Dt,vt,Gt,bt,At,kt,er,qt,Pt;const ir=(nt=we==null?void 0:we.data)==null?void 0:nt.resource_count;return ge(W({},Be==null?void 0:Be.properties),{rootNodeUuid:(gt=Be==null?void 0:Be.properties)==null?void 0:gt.rootNodeUuid,id:(Ot=Be==null?void 0:Be.properties)==null?void 0:Ot.uuid,name:(yt=Be==null?void 0:Be.properties)==null?void 0:yt.name,description:(Dt=Be==null?void 0:Be.properties)==null?void 0:Dt.description,nodeType:(vt=Be==null?void 0:Be.properties)==null?void 0:vt.nodeType,tags:((Gt=Be==null?void 0:Be.properties)==null?void 0:Gt.tags)&&((kt=(At=(bt=Be==null?void 0:Be.properties)==null?void 0:bt.tags)==null?void 0:At.split("\uFF0C"))==null?void 0:kt.map(y=>({name:y})))||[],colorType:parseInt((er=Be==null?void 0:Be.properties)==null?void 0:er.color)>3?"3":(qt=Be==null?void 0:Be.properties)==null?void 0:qt.color,activeColor:"#FA6400",size:Nt[((Pt=Be==null?void 0:Be.properties)==null?void 0:Pt.color)-1]||1,shape:"circle",hide:!1,isExtendedState:!0,currentResourceTotal:ir})}))==null?void 0:Q[0];$e.resourceid=Oe==null?void 0:Oe.id,$e.tpacti=Oe==null?void 0:Oe.knowledge_uuid,et($e),Xe(!0)}Yt(!1)});return I.createElement(me.Z,{spinning:S||Ue},I.createElement("div",{className:"w-full c-white text-14px-rem",style:{background:`#030616 url(${Z}) 0 0 / 100% auto no-repeat`,height:"100vh",overflow:"auto"}},I.createElement("div",{className:"w-full flex item-center justify-center",style:{background:`#030616 url(${Re}) 0 0 / 100% 100% no-repeat`,height:"108rem"}}),I.createElement("div",{className:"ml-auto mr-auto flex flex-col mt-20px-rem",style:{width:"1200rem"}},I.createElement("div",{className:"w-full flex item-center gap-64px-rem",style:{background:`#030616 url(${_e}) 0 0 / 100% 100% no-repeat`,height:"156rem",padding:"0 64px",justifyContent:"space-around"}},I.createElement("div",{className:"flex item-center gap-16px-rem"},I.createElement("img",{src:B(76296),width:65,height:80,style:{width:"65rem",height:"80rem"}}),I.createElement("div",{className:"flex flex-col"},I.createElement("div",{className:"text-500"},"\u5DF2\u5173\u8054\u8D44\u6E90\u6807\u7B7E\u8282\u70B9\u6570"),I.createElement("div",{className:"text-20px-rem multi_ellipsis1 blod",style:{color:"#7FBEFF"}},((ae=ve==null?void 0:ve.data)==null?void 0:ae.relation_resource_count)||0))),I.createElement("div",{className:"flex item-center gap-16px-rem"},I.createElement("img",{src:B(30757),width:65,height:80,style:{width:"65rem",height:"80rem"}}),I.createElement("div",{className:"flex flex-col"},I.createElement("div",{className:"text-500"},"\u672A\u5173\u8054\u8D44\u6E90\u6807\u7B7E\u8282\u70B9\u6570"),I.createElement("div",{className:"text-20px-rem multi_ellipsis1 blod",style:{color:"#86A0FF"}},((j=ve==null?void 0:ve.data)==null?void 0:j.no_relation_resource_count)||0))),I.createElement("div",{className:"flex item-center gap-16px-rem"},I.createElement(ie.Z,{type:"circle",percent:Er,showInfo:!1,size:65,strokeWidth:18,trailColor:"rgba(100, 135, 188, 0.40)",strokeColor:"#1BBDE0"}),I.createElement("div",{className:"flex flex-col text-nowrap"},I.createElement("div",null,"\u77E5\u8BC6\u70B9\u5EFA\u8BBE\u7387\xA0",I.createElement(v.Z,{title:"\u8D44\u6E90\u5EFA\u8BBE\u7387 = \u56FE\u8C31\u4E2D\u5DF2\u5173\u8054\u8D44\u6E90\u7684\u6807\u7B7E\u8282\u70B9\u6570 / \u56FE\u8C31\u6807\u7B7E\u8282\u70B9\u603B\u6570"},I.createElement("i",{className:"iconfont icon-xiaowenhao2",style:{fontSize:"16rem"}})," ")),I.createElement("div",{className:"text-24px-rem ",style:{color:"#1BBDE0",fontWeight:800}},Er,"%")))),I.createElement("div",{className:"flex flex-col mt-22px-rem gap-12px-rem pb-20px"},I.createElement("div",{className:`w-full flex item-center justify-center px-30px-rem rounded-2px-rem gap-16px-rem sticky ${l.Z.TableMyHeader}`,style:{height:"40rem",top:0}},Sr==null?void 0:Sr.map((Oe,Se)=>I.createElement("div",{key:Se,className:`minW-0 ${Oe!=null&&Oe.ellipsis?"multi_ellipsis1":""}`,style:{flex:Oe!=null&&Oe.width?"":1,width:(Oe==null?void 0:Oe.width)||""}},Oe==null?void 0:Oe.title))),(ve==null?void 0:ve.total_count)==0?I.createElement(E.Z,null):(ne=(ee=ve==null?void 0:ve.data)==null?void 0:ee.knowledge_infos)==null?void 0:ne.map((Oe,Se)=>I.createElement("div",{key:Se,style:{height:"54rem"},className:`w-full flex item-center justify-center px-30px-rem rounded-2px-rem gap-16px-rem ${l.Z.TableMyDiv}`},Sr==null?void 0:Sr.map((qe,ht)=>{var pt;return I.createElement("div",{key:ht,className:`minW-0 ${qe!=null&&qe.ellipsis?"multi_ellipsis1":""}`,style:{flex:qe!=null&&qe.width?"":1,width:(qe==null?void 0:qe.width)||""}},((pt=qe==null?void 0:qe.render)==null?void 0:pt.call(qe,Oe==null?void 0:Oe[qe==null?void 0:qe.dataIndex],Oe,Se))||(Oe==null?void 0:Oe[qe==null?void 0:qe.dataIndex]))})))))),I.createElement(x.Z,{initdata:wt,uuid:oe==null?void 0:oe.learningpathId,setshow:()=>{},getData:wt,containerRef:()=>{},showdetail:tt,setshowdetail:Xe,items:xt,Tabsdatas:He,tpacti:xt==null?void 0:xt.tpacti}))};var Me=(0,be.connect)(({pathsDetail:Fe})=>({pathsDetail:Fe}))(he)},29509:function(Jt,ot,B){"use strict";B.d(ot,{o2:function(){return Z},yT:function(){return v}});var I=B(77654),be=B(34998);const Re=be.i.map(me=>`${me}-inverse`),_e=["success","processing","error","default","warning"];function Z(me){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,I.Z)(Re),(0,I.Z)(be.i)).includes(me):be.i.includes(me)}function v(me){return _e.includes(me)}},99402:function(Jt,ot,B){"use strict";B.d(ot,{T:function(){return be},n:function(){return I}});function I(Re){return["small","middle","large"].includes(Re)}function be(Re){return Re?typeof Re=="number"&&!Number.isNaN(Re):!1}},52838:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return v}});var I=B(37645);function be(me,ie,l,H){if(H===!1)return{adjustX:!1,adjustY:!1};const F=H&&typeof H=="object"?H:{},E={};switch(me){case"top":case"bottom":E.shiftX=ie.arrowOffsetHorizontal*2+l,E.shiftY=!0,E.adjustY=!0;break;case"left":case"right":E.shiftY=ie.arrowOffsetVertical*2+l,E.shiftX=!0,E.adjustX=!0;break}const x=Object.assign(Object.assign({},E),F);return x.shiftX||(x.adjustX=!0),x.shiftY||(x.adjustY=!0),x}const Re={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},_e={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Z=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function v(me){const{arrowWidth:ie,autoAdjustOverflow:l,arrowPointAtCenter:H,offset:F,borderRadius:E,visibleFirst:x}=me,T=ie/2,L={};return Object.keys(Re).forEach(q=>{const Y=H&&_e[q]||Re[q],$=Object.assign(Object.assign({},Y),{offset:[0,0],dynamicInset:!0});switch(L[q]=$,Z.has(q)&&($.autoArrow=!1),q){case"top":case"topLeft":case"topRight":$.offset[1]=-T-F;break;case"bottom":case"bottomLeft":case"bottomRight":$.offset[1]=T+F;break;case"left":case"leftTop":case"leftBottom":$.offset[0]=-T-F;break;case"right":case"rightTop":case"rightBottom":$.offset[0]=T+F;break}const A=(0,I.wZ)({contentRadius:E,limitVerticalRadius:!0});if(H)switch(q){case"topLeft":case"bottomLeft":$.offset[0]=-A.arrowOffsetHorizontal-T;break;case"topRight":case"bottomRight":$.offset[0]=A.arrowOffsetHorizontal+T;break;case"leftTop":case"rightTop":$.offset[1]=-A.arrowOffsetHorizontal*2+T;break;case"leftBottom":case"rightBottom":$.offset[1]=A.arrowOffsetHorizontal*2-T;break}$.overflow=be(q,A,ie,l),x&&($.htmlRegion="visibleFirst")}),L}},82855:function(Jt,ot,B){"use strict";B.d(ot,{F:function(){return Z},Z:function(){return _e}});var I=B(92310),be=B.n(I);const Re=null;function _e(v,me,ie){return be()({[`${v}-status-success`]:me==="success",[`${v}-status-warning`]:me==="warning",[`${v}-status-error`]:me==="error",[`${v}-status-validating`]:me==="validating",[`${v}-has-feedback`]:ie})}const Z=(v,me)=>me||v},74632:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return Re}});var I=B(59301),be=B(16089);function Re(_e){const Z=I.useRef(null),v=()=>{be.Z.cancel(Z.current),Z.current=null};return[()=>{v(),Z.current=(0,be.Z)(()=>{Z.current=null})},l=>{Z.current&&(l.stopPropagation(),v()),_e==null||_e(l)}]}},24971:function(Jt,ot,B){"use strict";var I=B(59301),be=B(56553),Re=B(48755);const _e=function(Z,v){let me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var ie,l;const{variant:H,[Z]:F}=I.useContext(Re.E_),E=I.useContext(be.pg),x=F==null?void 0:F.variant;let T;typeof v!="undefined"?T=v:me===!1?T="borderless":T=(l=(ie=E!=null?E:x)!==null&&ie!==void 0?ie:H)!==null&&l!==void 0?l:"outlined";const L=Re.tr.includes(T);return[T,L]};ot.Z=_e},53075:function(Jt,ot,B){"use strict";B.d(ot,{TI:function(){return M},ik:function(){return E},nz:function(){return ie},s7:function(){return x},x0:function(){return F}});var I=B(36237),be=B(63356),Re=B(56119),_e=B(16931),Z=B(51636),v=B(64910),me=B(39082);const ie=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),l=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0,backgroundColor:O.activeBg}),H=O=>{const{paddingBlockLG:W,lineHeightLG:ge,borderRadiusLG:De,paddingInlineLG:he}=O;return{padding:`${(0,I.unit)(W)} ${(0,I.unit)(he)}`,fontSize:O.inputFontSizeLG,lineHeight:ge,borderRadius:De}},F=O=>({padding:`${(0,I.unit)(O.paddingBlockSM)} ${(0,I.unit)(O.paddingInlineSM)}`,fontSize:O.inputFontSizeSM,borderRadius:O.borderRadiusSM}),E=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,I.unit)(O.paddingBlock)} ${(0,I.unit)(O.paddingInline)}`,color:O.colorText,fontSize:O.inputFontSize,lineHeight:O.lineHeight,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},ie(O.colorTextPlaceholder)),{"&-lg":Object.assign({},H(O)),"&-sm":Object.assign({},F(O)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),x=O=>{const{componentCls:W,antCls:ge}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${W}, &-lg > ${W}-group-addon`]:Object.assign({},H(O)),[`&-sm ${W}, &-sm > ${W}-group-addon`]:Object.assign({},F(O)),[`&-lg ${ge}-select-single ${ge}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${ge}-select-single ${ge}-select-selector`]:{height:O.controlHeightSM},[`> ${W}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${W}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,I.unit)(O.paddingInline)}`,color:O.colorText,fontWeight:"normal",fontSize:O.inputFontSize,textAlign:"center",borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${ge}-select`]:{margin:`${(0,I.unit)(O.calc(O.paddingBlock).add(1).mul(-1).equal())} ${(0,I.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,[`&${ge}-select-single:not(${ge}-select-customize-input):not(${ge}-pagination-size-changer)`]:{[`${ge}-select-selector`]:{backgroundColor:"inherit",border:`${(0,I.unit)(O.lineWidth)} ${O.lineType} transparent`,boxShadow:"none"}}},[`${ge}-cascader-picker`]:{margin:`-9px ${(0,I.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${ge}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[W]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${W}-search-with-button &`]:{zIndex:0}}},[`> ${W}:first-child, ${W}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ge}-select ${ge}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${W}-affix-wrapper`]:{[`&:not(:first-child) ${W}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${W}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${W}:last-child, ${W}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ge}-select ${ge}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${W}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${W}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${W}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${W}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,be.dF)()),{[`${W}-group-addon, ${W}-group-wrap, > ${W}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
& > ${W}-affix-wrapper,
|
|
& > ${W}-number-affix-wrapper,
|
|
& > ${ge}-picker-range
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderInlineEndWidth:O.lineWidth},[W]:{float:"none"},[`& > ${ge}-select > ${ge}-select-selector,
|
|
& > ${ge}-select-auto-complete ${W},
|
|
& > ${ge}-cascader-picker ${W},
|
|
& > ${W}-group-wrapper ${W}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${ge}-select-focused`]:{zIndex:1},[`& > ${ge}-select > ${ge}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${ge}-select:first-child > ${ge}-select-selector,
|
|
& > ${ge}-select-auto-complete:first-child ${W},
|
|
& > ${ge}-cascader-picker:first-child ${W}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
|
|
& > ${ge}-select:last-child > ${ge}-select-selector,
|
|
& > ${ge}-cascader-picker:last-child ${W},
|
|
& > ${ge}-cascader-picker-focused:last-child ${W}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${ge}-select-auto-complete ${W}`]:{verticalAlign:"top"},[`${W}-group-wrapper + ${W}-group-wrapper`]:{marginInlineStart:O.calc(O.lineWidth).mul(-1).equal(),[`${W}-affix-wrapper`]:{borderRadius:0}},[`${W}-group-wrapper:not(:last-child)`]:{[`&${W}-search > ${W}-group`]:{[`& > ${W}-group-addon > ${W}-search-button`]:{borderRadius:0},[`& > ${W}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},T=O=>{const{componentCls:W,controlHeightSM:ge,lineWidth:De,calc:he}=O,Fe=he(ge).sub(he(De).mul(2)).sub(16).div(2).equal();return{[W]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,be.Wf)(O)),E(O)),(0,me.qG)(O)),(0,me.H8)(O)),(0,me.Mu)(O)),(0,me.vc)(O)),{'&[type="color"]':{height:O.controlHeight,[`&${W}-lg`]:{height:O.controlHeightLG},[`&${W}-sm`]:{height:ge,paddingTop:Fe,paddingBottom:Fe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},L=O=>{const{componentCls:W}=O;return{[`${W}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:O.colorTextQuaternary,fontSize:O.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${O.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:O.colorTextTertiary},"&:active":{color:O.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,I.unit)(O.inputAffixPadding)}`}}}},q=O=>{const{componentCls:W,inputAffixPadding:ge,colorTextDescription:De,motionDurationSlow:he,colorIcon:Me,colorIconHover:Fe,iconCls:ke}=O,ct=`${W}-affix-wrapper`,ae=`${W}-affix-wrapper-disabled`;return{[ct]:Object.assign(Object.assign(Object.assign(Object.assign({},E(O)),{display:"inline-flex",[`&:not(${W}-disabled):hover`]:{zIndex:1,[`${W}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${W}`]:{padding:0},[`> input${W}, > textarea${W}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[W]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:De},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:ge},"&-suffix":{marginInlineStart:ge}}}),L(O)),{[`${ke}${W}-password-icon`]:{color:Me,cursor:"pointer",transition:`all ${he}`,"&:hover":{color:Fe}}}),[`${W}-underlined`]:{borderRadius:0},[ae]:{[`${ke}${W}-password-icon`]:{color:Me,cursor:"not-allowed","&:hover":{color:Me}}}}},Y=O=>{const{componentCls:W,borderRadiusLG:ge,borderRadiusSM:De}=O;return{[`${W}-group`]:Object.assign(Object.assign(Object.assign({},(0,be.Wf)(O)),x(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${W}-group-addon`]:{borderRadius:ge,fontSize:O.inputFontSizeLG}},"&-sm":{[`${W}-group-addon`]:{borderRadius:De}}},(0,me.ir)(O)),(0,me.S5)(O)),{[`&:not(${W}-compact-first-item):not(${W}-compact-last-item)${W}-compact-item`]:{[`${W}, ${W}-group-addon`]:{borderRadius:0}},[`&:not(${W}-compact-last-item)${W}-compact-first-item`]:{[`${W}, ${W}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${W}-compact-first-item)${W}-compact-last-item`]:{[`${W}, ${W}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${W}-compact-last-item)${W}-compact-item`]:{[`${W}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${W}-compact-first-item)${W}-compact-item`]:{[`${W}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},$=O=>{const{componentCls:W,antCls:ge}=O,De=`${W}-search`;return{[De]:{[W]:{"&:hover, &:focus":{[`+ ${W}-group-addon ${De}-button:not(${ge}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${W}-affix-wrapper`]:{height:O.controlHeight,borderRadius:0},[`${W}-lg`]:{lineHeight:O.calc(O.lineHeightLG).sub(2e-4).equal()},[`> ${W}-group`]:{[`> ${W}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${De}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${De}-button:not(${ge}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${ge}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${De}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${W}-affix-wrapper, ${De}-button`]:{height:O.controlHeightLG}},"&-small":{[`${W}-affix-wrapper, ${De}-button`]:{height:O.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${W}-compact-item`]:{[`&:not(${W}-compact-last-item)`]:{[`${W}-group-addon`]:{[`${W}-search-button`]:{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${W}-compact-first-item)`]:{[`${W},${W}-affix-wrapper`]:{borderRadius:0}},[`> ${W}-group-addon ${W}-search-button,
|
|
> ${W},
|
|
${W}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${W}-affix-wrapper-focused`]:{zIndex:2}}}}},A=O=>{const{componentCls:W}=O;return{[`${W}-out-of-range`]:{[`&, & input, & textarea, ${W}-show-count-suffix, ${W}-data-count`]:{color:O.colorError}}}},M=(0,_e.I$)(["Input","Shared"],O=>{const W=(0,Z.mergeToken)(O,(0,v.e)(O));return[T(W),q(W)]},v.T,{resetFont:!1});ot.ZP=(0,_e.I$)(["Input","Component"],O=>{const W=(0,Z.mergeToken)(O,(0,v.e)(O));return[Y(W),$(W),A(W),(0,Re.c)(W)]},v.T,{resetFont:!1})},64910:function(Jt,ot,B){"use strict";B.d(ot,{T:function(){return Re},e:function(){return be}});var I=B(51636);function be(_e){return(0,I.mergeToken)(_e,{inputAffixPadding:_e.paddingXXS})}const Re=_e=>{const{controlHeight:Z,fontSize:v,lineHeight:me,lineWidth:ie,controlHeightSM:l,controlHeightLG:H,fontSizeLG:F,lineHeightLG:E,paddingSM:x,controlPaddingHorizontalSM:T,controlPaddingHorizontal:L,colorFillAlter:q,colorPrimaryHover:Y,colorPrimary:$,controlOutlineWidth:A,controlOutline:M,colorErrorOutline:O,colorWarningOutline:W,colorBgContainer:ge,inputFontSize:De,inputFontSizeLG:he,inputFontSizeSM:Me}=_e,Fe=De||v,ke=Me||Fe,ct=he||F,ae=Math.round((Z-Fe*me)/2*10)/10-ie,j=Math.round((l-ke*me)/2*10)/10-ie,ee=Math.ceil((H-ct*E)/2*10)/10-ie;return{paddingBlock:Math.max(ae,0),paddingBlockSM:Math.max(j,0),paddingBlockLG:Math.max(ee,0),paddingInline:x-ie,paddingInlineSM:T-ie,paddingInlineLG:L-ie,addonBg:q,activeBorderColor:$,hoverBorderColor:Y,activeShadow:`0 0 0 ${A}px ${M}`,errorActiveShadow:`0 0 0 ${A}px ${O}`,warningActiveShadow:`0 0 0 ${A}px ${W}`,hoverBg:ge,activeBg:ge,inputFontSize:Fe,inputFontSizeLG:ct,inputFontSizeSM:ke}}},39082:function(Jt,ot,B){"use strict";B.d(ot,{$U:function(){return Z},H8:function(){return x},Mu:function(){return H},S5:function(){return L},Xy:function(){return _e},ir:function(){return l},qG:function(){return me},vc:function(){return $}});var I=B(36237),be=B(51636);const Re=A=>({borderColor:A.hoverBorderColor,backgroundColor:A.hoverBg}),_e=A=>({color:A.colorTextDisabled,backgroundColor:A.colorBgContainerDisabled,borderColor:A.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Re((0,be.mergeToken)(A,{hoverBorderColor:A.colorBorder,hoverBg:A.colorBgContainerDisabled})))}),Z=(A,M)=>({background:A.colorBgContainer,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:M.borderColor,"&:hover":{borderColor:M.hoverBorderColor,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:M.activeBorderColor,boxShadow:M.activeShadow,outline:0,backgroundColor:A.activeBg}}),v=(A,M)=>({[`&${A.componentCls}-status-${M.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},Z(A,M)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:M.affixColor}}),[`&${A.componentCls}-status-${M.status}${A.componentCls}-disabled`]:{borderColor:M.borderColor}}),me=(A,M)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Z(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},_e(A))}),v(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),v(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),M)}),ie=(A,M)=>({[`&${A.componentCls}-group-wrapper-status-${M.status}`]:{[`${A.componentCls}-group-addon`]:{borderColor:M.addonBorderColor,color:M.addonColor}}}),l=A=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.addonBg,border:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ie(A,{status:"error",addonBorderColor:A.colorError,addonColor:A.colorErrorText})),ie(A,{status:"warning",addonBorderColor:A.colorWarning,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group-addon`]:Object.assign({},_e(A))}})}),H=(A,M)=>{const{componentCls:O}=A;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${O}-disabled, &[disabled]`]:{color:A.colorTextDisabled,cursor:"not-allowed"},[`&${O}-status-error`]:{"&, & input, & textarea":{color:A.colorError}},[`&${O}-status-warning`]:{"&, & input, & textarea":{color:A.colorWarning}}},M)}},F=(A,M)=>{var O;return{background:M.bg,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(O=M==null?void 0:M.inputColor)!==null&&O!==void 0?O:"unset"},"&:hover":{background:M.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:M.activeBorderColor,backgroundColor:A.activeBg}}},E=(A,M)=>({[`&${A.componentCls}-status-${M.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},F(A,M)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:M.affixColor}})}),x=(A,M)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},F(A,{bg:A.colorFillTertiary,hoverBg:A.colorFillSecondary,activeBorderColor:A.activeBorderColor})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},_e(A))}),E(A,{status:"error",bg:A.colorErrorBg,hoverBg:A.colorErrorBgHover,activeBorderColor:A.colorError,inputColor:A.colorErrorText,affixColor:A.colorError})),E(A,{status:"warning",bg:A.colorWarningBg,hoverBg:A.colorWarningBgHover,activeBorderColor:A.colorWarning,inputColor:A.colorWarningText,affixColor:A.colorWarning})),M)}),T=(A,M)=>({[`&${A.componentCls}-group-wrapper-status-${M.status}`]:{[`${A.componentCls}-group-addon`]:{background:M.addonBg,color:M.addonColor}}}),L=A=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary},[`${A.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`}}}},T(A,{status:"error",addonBg:A.colorErrorBg,addonColor:A.colorErrorText})),T(A,{status:"warning",addonBg:A.colorWarningBg,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary,color:A.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,I.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`}}}})}),q=(A,M)=>({background:A.colorBgContainer,borderWidth:`${(0,I.unit)(A.lineWidth)} 0`,borderStyle:`${A.lineType} none`,borderColor:`transparent transparent ${M.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${M.borderColor} transparent`,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${M.borderColor} transparent`,outline:0,backgroundColor:A.activeBg}}),Y=(A,M)=>({[`&${A.componentCls}-status-${M.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},q(A,M)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:M.affixColor}}),[`&${A.componentCls}-status-${M.status}${A.componentCls}-disabled`]:{borderColor:`transparent transparent ${M.borderColor} transparent`}}),$=(A,M)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:{color:A.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${A.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Y(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),Y(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),M)})},47889:function(Jt,ot,B){"use strict";B.d(ot,{ZP:function(){return st}});var I=B(59301),be=B(92310),Re=B.n(be),_e=B(18929),Z=B(26112),v=B(48755),me=B(83397),ie=B(31756);const l=I.createContext(null),H=l.Provider;var F=l;const E=I.createContext(null),x=E.Provider;var T=B(16632),L=B(8654),q=B(12919),Y=B(63872),$=B(74632),A=B(2171),M=B(56553),O=B(36237),W=B(63356),ge=B(16931),De=B(51636);const he=tt=>{const{componentCls:Xe,antCls:xt}=tt,et=`${Xe}-group`;return{[et]:Object.assign(Object.assign({},(0,W.Wf)(tt)),{display:"inline-block",fontSize:0,[`&${et}-rtl`]:{direction:"rtl"},[`&${et}-block`]:{display:"flex"},[`${xt}-badge ${xt}-badge-count`]:{zIndex:1},[`> ${xt}-badge:not(:first-child) > ${xt}-button-wrapper`]:{borderInlineStart:"none"}})}},Me=tt=>{const{componentCls:Xe,wrapperMarginInlineEnd:xt,colorPrimary:et,radioSize:Ue,motionDurationSlow:Yt,motionDurationMid:Nt,motionEaseInOutCirc:Sr,colorBgContainer:wt,colorBorder:Er,lineWidth:ze,colorBgContainerDisabled:Oe,colorTextDisabled:Se,paddingXS:qe,dotColorDisabled:ht,lineType:pt,radioColor:Q,radioBgColor:we,calc:$e}=tt,Be=`${Xe}-inner`,gt=$e(Ue).sub($e(4).mul(2)),Ot=$e(1).mul(Ue).equal({unit:!0});return{[`${Xe}-wrapper`]:Object.assign(Object.assign({},(0,W.Wf)(tt)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:xt,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${Xe}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:tt.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${Xe}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,O.unit)(ze)} ${pt} ${et}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[Xe]:Object.assign(Object.assign({},(0,W.Wf)(tt)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Xe}-wrapper:hover &,
|
|
&:hover ${Be}`]:{borderColor:et},[`${Xe}-input:focus-visible + ${Be}`]:Object.assign({},(0,W.oN)(tt)),[`${Xe}:hover::after, ${Xe}-wrapper:hover &::after`]:{visibility:"visible"},[`${Xe}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ot,height:Ot,marginBlockStart:$e(1).mul(Ue).div(-2).equal({unit:!0}),marginInlineStart:$e(1).mul(Ue).div(-2).equal({unit:!0}),backgroundColor:Q,borderBlockStart:0,borderInlineStart:0,borderRadius:Ot,transform:"scale(0)",opacity:0,transition:`all ${Yt} ${Sr}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ot,height:Ot,backgroundColor:wt,borderColor:Er,borderStyle:"solid",borderWidth:ze,borderRadius:"50%",transition:`all ${Nt}`},[`${Xe}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Xe}-checked`]:{[Be]:{borderColor:et,backgroundColor:we,"&::after":{transform:`scale(${tt.calc(tt.dotSize).div(Ue).equal()})`,opacity:1,transition:`all ${Yt} ${Sr}`}}},[`${Xe}-disabled`]:{cursor:"not-allowed",[Be]:{backgroundColor:Oe,borderColor:Er,cursor:"not-allowed","&::after":{backgroundColor:ht}},[`${Xe}-input`]:{cursor:"not-allowed"},[`${Xe}-disabled + span`]:{color:Se,cursor:"not-allowed"},[`&${Xe}-checked`]:{[Be]:{"&::after":{transform:`scale(${$e(gt).div(Ue).equal()})`}}}},[`span${Xe} + *`]:{paddingInlineStart:qe,paddingInlineEnd:qe}})}},Fe=tt=>{const{buttonColor:Xe,controlHeight:xt,componentCls:et,lineWidth:Ue,lineType:Yt,colorBorder:Nt,motionDurationSlow:Sr,motionDurationMid:wt,buttonPaddingInline:Er,fontSize:ze,buttonBg:Oe,fontSizeLG:Se,controlHeightLG:qe,controlHeightSM:ht,paddingXS:pt,borderRadius:Q,borderRadiusSM:we,borderRadiusLG:$e,buttonCheckedBg:Be,buttonSolidCheckedColor:nt,colorTextDisabled:gt,colorBgContainerDisabled:Ot,buttonCheckedBgDisabled:yt,buttonCheckedColorDisabled:Dt,colorPrimary:vt,colorPrimaryHover:Gt,colorPrimaryActive:bt,buttonSolidCheckedBg:At,buttonSolidCheckedHoverBg:kt,buttonSolidCheckedActiveBg:er,calc:qt}=tt;return{[`${et}-button-wrapper`]:{position:"relative",display:"inline-block",height:xt,margin:0,paddingInline:Er,paddingBlock:0,color:Xe,fontSize:ze,lineHeight:(0,O.unit)(qt(xt).sub(qt(Ue).mul(2)).equal()),background:Oe,border:`${(0,O.unit)(Ue)} ${Yt} ${Nt}`,borderBlockStartWidth:qt(Ue).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:Ue,cursor:"pointer",transition:[`color ${wt}`,`background ${wt}`,`box-shadow ${wt}`].join(","),a:{color:Xe},[`> ${et}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:qt(Ue).mul(-1).equal(),insetInlineStart:qt(Ue).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ue,paddingInline:0,backgroundColor:Nt,transition:`background-color ${Sr}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,O.unit)(Ue)} ${Yt} ${Nt}`,borderStartStartRadius:Q,borderEndStartRadius:Q},"&:last-child":{borderStartEndRadius:Q,borderEndEndRadius:Q},"&:first-child:last-child":{borderRadius:Q},[`${et}-group-large &`]:{height:qe,fontSize:Se,lineHeight:(0,O.unit)(qt(qe).sub(qt(Ue).mul(2)).equal()),"&:first-child":{borderStartStartRadius:$e,borderEndStartRadius:$e},"&:last-child":{borderStartEndRadius:$e,borderEndEndRadius:$e}},[`${et}-group-small &`]:{height:ht,paddingInline:qt(pt).sub(Ue).equal(),paddingBlock:0,lineHeight:(0,O.unit)(qt(ht).sub(qt(Ue).mul(2)).equal()),"&:first-child":{borderStartStartRadius:we,borderEndStartRadius:we},"&:last-child":{borderStartEndRadius:we,borderEndEndRadius:we}},"&:hover":{position:"relative",color:vt},"&:has(:focus-visible)":Object.assign({},(0,W.oN)(tt)),[`${et}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${et}-button-wrapper-disabled)`]:{zIndex:1,color:vt,background:Be,borderColor:vt,"&::before":{backgroundColor:vt},"&:first-child":{borderColor:vt},"&:hover":{color:Gt,borderColor:Gt,"&::before":{backgroundColor:Gt}},"&:active":{color:bt,borderColor:bt,"&::before":{backgroundColor:bt}}},[`${et}-group-solid &-checked:not(${et}-button-wrapper-disabled)`]:{color:nt,background:At,borderColor:At,"&:hover":{color:nt,background:kt,borderColor:kt},"&:active":{color:nt,background:er,borderColor:er}},"&-disabled":{color:gt,backgroundColor:Ot,borderColor:Nt,cursor:"not-allowed","&:first-child, &:hover":{color:gt,backgroundColor:Ot,borderColor:Nt}},[`&-disabled${et}-button-wrapper-checked`]:{color:Dt,backgroundColor:yt,borderColor:Nt,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},ke=tt=>{const{wireframe:Xe,padding:xt,marginXS:et,lineWidth:Ue,fontSizeLG:Yt,colorText:Nt,colorBgContainer:Sr,colorTextDisabled:wt,controlItemBgActiveDisabled:Er,colorTextLightSolid:ze,colorPrimary:Oe,colorPrimaryHover:Se,colorPrimaryActive:qe,colorWhite:ht}=tt,pt=4,Q=Yt,we=Xe?Q-pt*2:Q-(pt+Ue)*2;return{radioSize:Q,dotSize:we,dotColorDisabled:wt,buttonSolidCheckedColor:ze,buttonSolidCheckedBg:Oe,buttonSolidCheckedHoverBg:Se,buttonSolidCheckedActiveBg:qe,buttonBg:Sr,buttonCheckedBg:Sr,buttonColor:Nt,buttonCheckedBgDisabled:Er,buttonCheckedColorDisabled:wt,buttonPaddingInline:xt-Ue,wrapperMarginInlineEnd:et,radioColor:Xe?Oe:ht,radioBgColor:Xe?Sr:Oe}};var ct=(0,ge.I$)("Radio",tt=>{const{controlOutline:Xe,controlOutlineWidth:xt}=tt,et=`0 0 0 ${(0,O.unit)(xt)} ${Xe}`,Ue=et,Yt=(0,De.mergeToken)(tt,{radioFocusShadow:et,radioButtonFocusShadow:Ue});return[he(Yt),Me(Yt),Fe(Yt)]},ke,{unitless:{radioSize:!0,dotSize:!0}}),ae=function(tt,Xe){var xt={};for(var et in tt)Object.prototype.hasOwnProperty.call(tt,et)&&Xe.indexOf(et)<0&&(xt[et]=tt[et]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,et=Object.getOwnPropertySymbols(tt);Ue<et.length;Ue++)Xe.indexOf(et[Ue])<0&&Object.prototype.propertyIsEnumerable.call(tt,et[Ue])&&(xt[et[Ue]]=tt[et[Ue]]);return xt};const j=(tt,Xe)=>{var xt,et;const Ue=I.useContext(F),Yt=I.useContext(E),{getPrefixCls:Nt,direction:Sr,radio:wt}=I.useContext(v.E_),Er=I.useRef(null),ze=(0,L.sQ)(Xe,Er),{isFormItemInput:Oe}=I.useContext(M.aM),Se=Pt=>{var ir,y;(ir=tt.onChange)===null||ir===void 0||ir.call(tt,Pt),(y=Ue==null?void 0:Ue.onChange)===null||y===void 0||y.call(Ue,Pt)},{prefixCls:qe,className:ht,rootClassName:pt,children:Q,style:we,title:$e}=tt,Be=ae(tt,["prefixCls","className","rootClassName","children","style","title"]),nt=Nt("radio",qe),gt=((Ue==null?void 0:Ue.optionType)||Yt)==="button",Ot=gt?`${nt}-button`:nt,yt=(0,me.Z)(nt),[Dt,vt,Gt]=ct(nt,yt),bt=Object.assign({},Be),At=I.useContext(A.Z);Ue&&(bt.name=Ue.name,bt.onChange=Se,bt.checked=tt.value===Ue.value,bt.disabled=(xt=bt.disabled)!==null&&xt!==void 0?xt:Ue.disabled),bt.disabled=(et=bt.disabled)!==null&&et!==void 0?et:At;const kt=Re()(`${Ot}-wrapper`,{[`${Ot}-wrapper-checked`]:bt.checked,[`${Ot}-wrapper-disabled`]:bt.disabled,[`${Ot}-wrapper-rtl`]:Sr==="rtl",[`${Ot}-wrapper-in-form-item`]:Oe,[`${Ot}-wrapper-block`]:!!(Ue!=null&&Ue.block)},wt==null?void 0:wt.className,ht,pt,vt,Gt,yt),[er,qt]=(0,$.Z)(bt.onClick);return Dt(I.createElement(q.Z,{component:"Radio",disabled:bt.disabled},I.createElement("label",{className:kt,style:Object.assign(Object.assign({},wt==null?void 0:wt.style),we),onMouseEnter:tt.onMouseEnter,onMouseLeave:tt.onMouseLeave,title:$e,onClick:er},I.createElement(T.Z,Object.assign({},bt,{className:Re()(bt.className,{[Y.A]:!gt}),type:"radio",prefixCls:Ot,ref:ze,onClick:qt})),Q!==void 0?I.createElement("span",{className:`${Ot}-label`},Q):null)))};var ne=I.forwardRef(j),oe=B(80402);const re=I.forwardRef((tt,Xe)=>{const{getPrefixCls:xt,direction:et}=I.useContext(v.E_),Ue=(0,oe.Z)(),{prefixCls:Yt,className:Nt,rootClassName:Sr,options:wt,buttonStyle:Er="outline",disabled:ze,children:Oe,size:Se,style:qe,id:ht,optionType:pt,name:Q=Ue,defaultValue:we,value:$e,block:Be=!1,onChange:nt,onMouseEnter:gt,onMouseLeave:Ot,onFocus:yt,onBlur:Dt}=tt,[vt,Gt]=(0,_e.Z)(we,{value:$e}),bt=I.useCallback(te=>{const Zt=vt,Ae=te.target.value;"value"in tt||Gt(Ae),Ae!==Zt&&(nt==null||nt(te))},[vt,Gt,nt]),At=xt("radio",Yt),kt=`${At}-group`,er=(0,me.Z)(At),[qt,Pt,ir]=ct(At,er);let y=Oe;wt&&wt.length>0&&(y=wt.map(te=>typeof te=="string"||typeof te=="number"?I.createElement(ne,{key:te.toString(),prefixCls:At,disabled:ze,value:te,checked:vt===te},te):I.createElement(ne,{key:`radio-group-value-options-${te.value}`,prefixCls:At,disabled:te.disabled||ze,value:te.value,checked:vt===te.value,title:te.title,style:te.style,id:te.id,required:te.required},te.label)));const R=(0,ie.Z)(Se),rt=Re()(kt,`${kt}-${Er}`,{[`${kt}-${R}`]:R,[`${kt}-rtl`]:et==="rtl",[`${kt}-block`]:Be},Nt,Sr,Pt,ir,er),U=I.useMemo(()=>({onChange:bt,value:vt,disabled:ze,name:Q,optionType:pt,block:Be}),[bt,vt,ze,Q,pt,Be]);return qt(I.createElement("div",Object.assign({},(0,Z.Z)(tt,{aria:!0,data:!0}),{className:rt,style:qe,onMouseEnter:gt,onMouseLeave:Ot,onFocus:yt,onBlur:Dt,id:ht,ref:Xe}),I.createElement(H,{value:U},y)))});var b=I.memo(re),S=function(tt,Xe){var xt={};for(var et in tt)Object.prototype.hasOwnProperty.call(tt,et)&&Xe.indexOf(et)<0&&(xt[et]=tt[et]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,et=Object.getOwnPropertySymbols(tt);Ue<et.length;Ue++)Xe.indexOf(et[Ue])<0&&Object.prototype.propertyIsEnumerable.call(tt,et[Ue])&&(xt[et[Ue]]=tt[et[Ue]]);return xt};const V=(tt,Xe)=>{const{getPrefixCls:xt}=I.useContext(v.E_),{prefixCls:et}=tt,Ue=S(tt,["prefixCls"]),Yt=xt("radio",et);return I.createElement(x,{value:"button"},I.createElement(ne,Object.assign({prefixCls:Yt},Ue,{type:"radio",ref:Xe})))};var ve=I.forwardRef(V);const He=ne;He.Button=ve,He.Group=b,He.__ANT_RADIO=!0;var st=He},44104:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return q}});var I=B(59301),be=B(92310),Re=B.n(be),_e=B(11592),Z=B(99402),v=B(48755),me=B(70045);const ie=I.createContext({latestIndex:0}),l=ie.Provider;var F=Y=>{let{className:$,index:A,children:M,split:O,style:W}=Y;const{latestIndex:ge}=I.useContext(ie);return M==null?null:I.createElement(I.Fragment,null,I.createElement("div",{className:$,style:W},M),A<ge&&O&&I.createElement("span",{className:`${$}-split`},O))},E=B(31547),x=function(Y,$){var A={};for(var M in Y)Object.prototype.hasOwnProperty.call(Y,M)&&$.indexOf(M)<0&&(A[M]=Y[M]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var O=0,M=Object.getOwnPropertySymbols(Y);O<M.length;O++)$.indexOf(M[O])<0&&Object.prototype.propertyIsEnumerable.call(Y,M[O])&&(A[M[O]]=Y[M[O]]);return A};const L=I.forwardRef((Y,$)=>{var A;const{getPrefixCls:M,direction:O,size:W,className:ge,style:De,classNames:he,styles:Me}=(0,v.dj)("space"),{size:Fe=W!=null?W:"small",align:ke,className:ct,rootClassName:ae,children:j,direction:ee="horizontal",prefixCls:ne,split:oe,style:re,wrap:b=!1,classNames:S,styles:V}=Y,ve=x(Y,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[He,st]=Array.isArray(Fe)?Fe:[Fe,Fe],tt=(0,Z.n)(st),Xe=(0,Z.n)(He),xt=(0,Z.T)(st),et=(0,Z.T)(He),Ue=(0,_e.Z)(j,{keepEmpty:!0}),Yt=ke===void 0&&ee==="horizontal"?"center":ke,Nt=M("space",ne),[Sr,wt,Er]=(0,E.Z)(Nt),ze=Re()(Nt,ge,wt,`${Nt}-${ee}`,{[`${Nt}-rtl`]:O==="rtl",[`${Nt}-align-${Yt}`]:Yt,[`${Nt}-gap-row-${st}`]:tt,[`${Nt}-gap-col-${He}`]:Xe},ct,ae,Er),Oe=Re()(`${Nt}-item`,(A=S==null?void 0:S.item)!==null&&A!==void 0?A:he.item);let Se=0;const qe=Ue.map((Q,we)=>{var $e;Q!=null&&(Se=we);const Be=(Q==null?void 0:Q.key)||`${Oe}-${we}`;return I.createElement(F,{className:Oe,key:Be,index:we,split:oe,style:($e=V==null?void 0:V.item)!==null&&$e!==void 0?$e:Me.item},Q)}),ht=I.useMemo(()=>({latestIndex:Se}),[Se]);if(Ue.length===0)return null;const pt={};return b&&(pt.flexWrap="wrap"),!Xe&&et&&(pt.columnGap=He),!tt&&xt&&(pt.rowGap=st),Sr(I.createElement("div",Object.assign({ref:$,className:ze,style:Object.assign(Object.assign(Object.assign({},pt),De),re)},ve),I.createElement(l,{value:ht},qe)))});L.Compact=me.ZP;var q=L},93873:function(Jt,ot,B){"use strict";B.d(ot,{Fm:function(){return E}});var I=B(36237),be=B(48746);const Re=new I.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_e=new I.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Z=new I.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),v=new I.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new I.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ie=new I.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),l=new I.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),H=new I.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),F={"move-up":{inKeyframes:l,outKeyframes:H},"move-down":{inKeyframes:Re,outKeyframes:_e},"move-left":{inKeyframes:Z,outKeyframes:v},"move-right":{inKeyframes:me,outKeyframes:ie}},E=(x,T)=>{const{antCls:L}=x,q=`${L}-${T}`,{inKeyframes:Y,outKeyframes:$}=F[T];return[(0,be.R)(q,Y,$,x.motionDurationMid),{[`
|
|
${q}-enter,
|
|
${q}-appear
|
|
`]:{opacity:0,animationTimingFunction:x.motionEaseOutCirc},[`${q}-leave`]:{animationTimingFunction:x.motionEaseInOutCirc}}]}},46e3:function(Jt,ot,B){"use strict";B.d(ot,{Qt:function(){return Z},Uw:function(){return _e},fJ:function(){return Re},ly:function(){return v},oN:function(){return E}});var I=B(36237),be=B(48746);const Re=new I.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_e=new I.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Z=new I.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),v=new I.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),me=new I.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ie=new I.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),l=new I.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),H=new I.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),F={"slide-up":{inKeyframes:Re,outKeyframes:_e},"slide-down":{inKeyframes:Z,outKeyframes:v},"slide-left":{inKeyframes:me,outKeyframes:ie},"slide-right":{inKeyframes:l,outKeyframes:H}},E=(x,T)=>{const{antCls:L}=x,q=`${L}-${T}`,{inKeyframes:Y,outKeyframes:$}=F[T];return[(0,be.R)(q,Y,$,x.motionDurationMid),{[`
|
|
${q}-enter,
|
|
${q}-appear
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:x.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${q}-leave`]:{animationTimingFunction:x.motionEaseInQuint}}]}},37645:function(Jt,ot,B){"use strict";B.d(ot,{ZP:function(){return v},qN:function(){return Re},wZ:function(){return _e}});var I=B(36237),be=B(36305);const Re=8;function _e(me){const{contentRadius:ie,limitVerticalRadius:l}=me,H=ie>12?ie+2:12;return{arrowOffsetHorizontal:H,arrowOffsetVertical:l?Re:H}}function Z(me,ie){return me?ie:{}}function v(me,ie,l){const{componentCls:H,boxShadowPopoverArrow:F,arrowOffsetVertical:E,arrowOffsetHorizontal:x}=me,{arrowDistance:T=0,arrowPlacement:L={left:!0,right:!0,top:!0,bottom:!0}}=l||{};return{[H]:Object.assign(Object.assign(Object.assign(Object.assign({[`${H}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,be.W)(me,ie,F)),{"&:before":{background:ie}})]},Z(!!L.top,{[[`&-placement-top > ${H}-arrow`,`&-placement-topLeft > ${H}-arrow`,`&-placement-topRight > ${H}-arrow`].join(",")]:{bottom:T,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${H}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":x,[`> ${H}-arrow`]:{left:{_skip_check_:!0,value:x}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,I.unit)(x)})`,[`> ${H}-arrow`]:{right:{_skip_check_:!0,value:x}}}})),Z(!!L.bottom,{[[`&-placement-bottom > ${H}-arrow`,`&-placement-bottomLeft > ${H}-arrow`,`&-placement-bottomRight > ${H}-arrow`].join(",")]:{top:T,transform:"translateY(-100%)"},[`&-placement-bottom > ${H}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":x,[`> ${H}-arrow`]:{left:{_skip_check_:!0,value:x}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,I.unit)(x)})`,[`> ${H}-arrow`]:{right:{_skip_check_:!0,value:x}}}})),Z(!!L.left,{[[`&-placement-left > ${H}-arrow`,`&-placement-leftTop > ${H}-arrow`,`&-placement-leftBottom > ${H}-arrow`].join(",")]:{right:{_skip_check_:!0,value:T},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${H}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${H}-arrow`]:{top:E},[`&-placement-leftBottom > ${H}-arrow`]:{bottom:E}})),Z(!!L.right,{[[`&-placement-right > ${H}-arrow`,`&-placement-rightTop > ${H}-arrow`,`&-placement-rightBottom > ${H}-arrow`].join(",")]:{left:{_skip_check_:!0,value:T},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${H}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${H}-arrow`]:{top:E},[`&-placement-rightBottom > ${H}-arrow`]:{bottom:E}}))}}},36305:function(Jt,ot,B){"use strict";B.d(ot,{W:function(){return Re},w:function(){return be}});var I=B(36237);function be(_e){const{sizePopupArrow:Z,borderRadiusXS:v,borderRadiusOuter:me}=_e,ie=Z/2,l=0,H=ie,F=me*1/Math.sqrt(2),E=ie-me*(1-1/Math.sqrt(2)),x=ie-v*(1/Math.sqrt(2)),T=me*(Math.sqrt(2)-1)+v*(1/Math.sqrt(2)),L=2*ie-x,q=T,Y=2*ie-F,$=E,A=2*ie-l,M=H,O=ie*Math.sqrt(2)+me*(Math.sqrt(2)-2),W=me*(Math.sqrt(2)-1),ge=`polygon(${W}px 100%, 50% ${W}px, ${2*ie-W}px 100%, ${W}px 100%)`,De=`path('M ${l} ${H} A ${me} ${me} 0 0 0 ${F} ${E} L ${x} ${T} A ${v} ${v} 0 0 1 ${L} ${q} L ${Y} ${$} A ${me} ${me} 0 0 0 ${A} ${M} Z')`;return{arrowShadowWidth:O,arrowPath:De,arrowPolygon:ge}}const Re=(_e,Z,v)=>{const{sizePopupArrow:me,arrowPolygon:ie,arrowPath:l,arrowShadowWidth:H,borderRadiusXS:F,calc:E}=_e;return{pointerEvents:"none",width:me,height:me,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:me,height:E(me).div(2).equal(),background:Z,clipPath:{_multi_value_:!0,value:[ie,l]},content:'""'},"&::after":{content:'""',position:"absolute",width:H,height:H,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,I.unit)(F)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:v,zIndex:0,background:"transparent"}}}},31691:function(Jt,ot,B){"use strict";B.d(ot,{default:function(){return xr}});var I=B(59301),be=B(99267),Re=B(18785),_e=B(62772),Z=B(92310),v=B.n(Z),me=B(60499),ie=B(18642),l=B(85899),H=B(72190),F=B(43749),E=B(42244),x=B(18929),T=B(49658),L=(0,I.createContext)(null),q=B(77654),Y=B(29301),$=B(6089),A=B(8654),M=B(16089),O=function(ce){var ft=ce.activeTabOffset,_t=ce.horizontal,Ct=ce.rtl,Kt=ce.indicator,jt=Kt===void 0?{}:Kt,Wt=jt.size,Ht=jt.align,hr=Ht===void 0?"center":Ht,_r=(0,I.useState)(),Kr=(0,H.Z)(_r,2),Nr=Kr[0],Qr=Kr[1],_n=(0,I.useRef)(),Zr=I.useCallback(function(Ie){return typeof Wt=="function"?Wt(Ie):typeof Wt=="number"?Wt:Ie},[Wt]);function sn(){M.Z.cancel(_n.current)}return(0,I.useEffect)(function(){var Ie={};if(ft)if(_t){Ie.width=Zr(ft.width);var Ge=Ct?"right":"left";hr==="start"&&(Ie[Ge]=ft[Ge]),hr==="center"&&(Ie[Ge]=ft[Ge]+ft.width/2,Ie.transform=Ct?"translateX(50%)":"translateX(-50%)"),hr==="end"&&(Ie[Ge]=ft[Ge]+ft.width,Ie.transform="translateX(-100%)")}else Ie.height=Zr(ft.height),hr==="start"&&(Ie.top=ft.top),hr==="center"&&(Ie.top=ft.top+ft.height/2,Ie.transform="translateY(-50%)"),hr==="end"&&(Ie.top=ft.top+ft.height,Ie.transform="translateY(-100%)");return sn(),_n.current=(0,M.Z)(function(){Qr(Ie)}),sn},[ft,_t,Ct,hr,Zr]),{style:Nr}},W=O,ge={width:0,height:0,left:0,top:0};function De(se,ce,ft){return(0,I.useMemo)(function(){for(var _t,Ct=new Map,Kt=ce.get((_t=se[0])===null||_t===void 0?void 0:_t.key)||ge,jt=Kt.left+Kt.width,Wt=0;Wt<se.length;Wt+=1){var Ht=se[Wt].key,hr=ce.get(Ht);if(!hr){var _r;hr=ce.get((_r=se[Wt-1])===null||_r===void 0?void 0:_r.key)||ge}var Kr=Ct.get(Ht)||(0,l.Z)({},hr);Kr.right=jt-Kr.left-Kr.width,Ct.set(Ht,Kr)}return Ct},[se.map(function(_t){return _t.key}).join("_"),ce,ft])}function he(se,ce){var ft=I.useRef(se),_t=I.useState({}),Ct=(0,H.Z)(_t,2),Kt=Ct[1];function jt(Wt){var Ht=typeof Wt=="function"?Wt(ft.current):Wt;Ht!==ft.current&&ce(Ht,ft.current),ft.current=Ht,Kt({})}return[ft.current,jt]}var Me=.1,Fe=.01,ke=20,ct=Math.pow(.995,ke);function ae(se,ce){var ft=(0,I.useState)(),_t=(0,H.Z)(ft,2),Ct=_t[0],Kt=_t[1],jt=(0,I.useState)(0),Wt=(0,H.Z)(jt,2),Ht=Wt[0],hr=Wt[1],_r=(0,I.useState)(0),Kr=(0,H.Z)(_r,2),Nr=Kr[0],Qr=Kr[1],_n=(0,I.useState)(),Zr=(0,H.Z)(_n,2),sn=Zr[0],Ie=Zr[1],Ge=(0,I.useRef)();function lt(Qt){var tr=Qt.touches[0],cr=tr.screenX,Vt=tr.screenY;Kt({x:cr,y:Vt}),window.clearInterval(Ge.current)}function Ze(Qt){if(Ct){var tr=Qt.touches[0],cr=tr.screenX,Vt=tr.screenY;Kt({x:cr,y:Vt});var Ft=cr-Ct.x,rr=Vt-Ct.y;ce(Ft,rr);var $r=Date.now();hr($r),Qr($r-Ht),Ie({x:Ft,y:rr})}}function Je(){if(Ct&&(Kt(null),Ie(null),sn)){var Qt=sn.x/Nr,tr=sn.y/Nr,cr=Math.abs(Qt),Vt=Math.abs(tr);if(Math.max(cr,Vt)<Me)return;var Ft=Qt,rr=tr;Ge.current=window.setInterval(function(){if(Math.abs(Ft)<Fe&&Math.abs(rr)<Fe){window.clearInterval(Ge.current);return}Ft*=ct,rr*=ct,ce(Ft*ke,rr*ke)},ke)}}var ut=(0,I.useRef)();function St(Qt){var tr=Qt.deltaX,cr=Qt.deltaY,Vt=0,Ft=Math.abs(tr),rr=Math.abs(cr);Ft===rr?Vt=ut.current==="x"?tr:cr:Ft>rr?(Vt=tr,ut.current="x"):(Vt=cr,ut.current="y"),ce(-Vt,-Vt)&&Qt.preventDefault()}var It=(0,I.useRef)(null);It.current={onTouchStart:lt,onTouchMove:Ze,onTouchEnd:Je,onWheel:St},I.useEffect(function(){function Qt(Ft){It.current.onTouchStart(Ft)}function tr(Ft){It.current.onTouchMove(Ft)}function cr(Ft){It.current.onTouchEnd(Ft)}function Vt(Ft){It.current.onWheel(Ft)}return document.addEventListener("touchmove",tr,{passive:!1}),document.addEventListener("touchend",cr,{passive:!0}),se.current.addEventListener("touchstart",Qt,{passive:!0}),se.current.addEventListener("wheel",Vt,{passive:!1}),function(){document.removeEventListener("touchmove",tr),document.removeEventListener("touchend",cr)}},[])}var j=B(34280);function ee(se){var ce=(0,I.useState)(0),ft=(0,H.Z)(ce,2),_t=ft[0],Ct=ft[1],Kt=(0,I.useRef)(0),jt=(0,I.useRef)();return jt.current=se,(0,j.o)(function(){var Wt;(Wt=jt.current)===null||Wt===void 0||Wt.call(jt)},[_t]),function(){Kt.current===_t&&(Kt.current+=1,Ct(Kt.current))}}function ne(se){var ce=(0,I.useRef)([]),ft=(0,I.useState)({}),_t=(0,H.Z)(ft,2),Ct=_t[1],Kt=(0,I.useRef)(typeof se=="function"?se():se),jt=ee(function(){var Ht=Kt.current;ce.current.forEach(function(hr){Ht=hr(Ht)}),ce.current=[],Kt.current=Ht,Ct({})});function Wt(Ht){ce.current.push(Ht),jt()}return[Kt.current,Wt]}var oe={width:0,height:0,left:0,top:0,right:0};function re(se,ce,ft,_t,Ct,Kt,jt){var Wt=jt.tabs,Ht=jt.tabPosition,hr=jt.rtl,_r,Kr,Nr;return["top","bottom"].includes(Ht)?(_r="width",Kr=hr?"right":"left",Nr=Math.abs(ft)):(_r="height",Kr="top",Nr=-ft),(0,I.useMemo)(function(){if(!Wt.length)return[0,0];for(var Qr=Wt.length,_n=Qr,Zr=0;Zr<Qr;Zr+=1){var sn=se.get(Wt[Zr].key)||oe;if(Math.floor(sn[Kr]+sn[_r])>Math.floor(Nr+ce)){_n=Zr-1;break}}for(var Ie=0,Ge=Qr-1;Ge>=0;Ge-=1){var lt=se.get(Wt[Ge].key)||oe;if(lt[Kr]<Nr){Ie=Ge+1;break}}return Ie>=_n?[0,0]:[Ie,_n]},[se,ce,_t,Ct,Kt,Nr,Ht,Wt.map(function(Qr){return Qr.key}).join("_"),hr])}function b(se){var ce;return se instanceof Map?(ce={},se.forEach(function(ft,_t){ce[_t]=ft})):ce=se,JSON.stringify(ce)}var S="TABS_DQ";function V(se){return String(se).replace(/"/g,S)}function ve(se,ce,ft,_t){return!(!ft||_t||se===!1||se===void 0&&(ce===!1||ce===null))}var He=I.forwardRef(function(se,ce){var ft=se.prefixCls,_t=se.editable,Ct=se.locale,Kt=se.style;return!_t||_t.showAdd===!1?null:I.createElement("button",{ref:ce,type:"button",className:"".concat(ft,"-nav-add"),style:Kt,"aria-label":(Ct==null?void 0:Ct.addAriaLabel)||"Add tab",onClick:function(Wt){_t.onEdit("add",{event:Wt})}},_t.addIcon||"+")}),st=He,tt=I.forwardRef(function(se,ce){var ft=se.position,_t=se.prefixCls,Ct=se.extra;if(!Ct)return null;var Kt,jt={};return(0,F.Z)(Ct)==="object"&&!I.isValidElement(Ct)?jt=Ct:jt.right=Ct,ft==="right"&&(Kt=jt.right),ft==="left"&&(Kt=jt.left),Kt?I.createElement("div",{className:"".concat(_t,"-extra-content"),ref:ce},Kt):null}),Xe=tt,xt=B(96478),et=B(28321),Ue=B(10228),Yt=I.forwardRef(function(se,ce){var ft=se.prefixCls,_t=se.id,Ct=se.tabs,Kt=se.locale,jt=se.mobile,Wt=se.more,Ht=Wt===void 0?{}:Wt,hr=se.style,_r=se.className,Kr=se.editable,Nr=se.tabBarGutter,Qr=se.rtl,_n=se.removeAriaLabel,Zr=se.onTabClick,sn=se.getPopupContainer,Ie=se.popupClassName,Ge=(0,I.useState)(!1),lt=(0,H.Z)(Ge,2),Ze=lt[0],Je=lt[1],ut=(0,I.useState)(null),St=(0,H.Z)(ut,2),It=St[0],Qt=St[1],tr=Ht.icon,cr=tr===void 0?"More":tr,Vt="".concat(_t,"-more-popup"),Ft="".concat(ft,"-dropdown"),rr=It!==null?"".concat(Vt,"-").concat(It):null,$r=Kt==null?void 0:Kt.dropdownAriaLabel;function Ur(pr,Lr){pr.preventDefault(),pr.stopPropagation(),Kr.onEdit("remove",{key:Lr,event:pr})}var Ut=I.createElement(et.ZP,{onClick:function(Lr){var rn=Lr.key,Ve=Lr.domEvent;Zr(rn,Ve),Je(!1)},prefixCls:"".concat(Ft,"-menu"),id:Vt,tabIndex:-1,role:"listbox","aria-activedescendant":rr,selectedKeys:[It],"aria-label":$r!==void 0?$r:"expanded dropdown"},Ct.map(function(pr){var Lr=pr.closable,rn=pr.disabled,Ve=pr.closeIcon,fr=pr.key,Gr=pr.label,hn=ve(Lr,Ve,Kr,rn);return I.createElement(et.sN,{key:fr,id:"".concat(Vt,"-").concat(fr),role:"option","aria-controls":_t&&"".concat(_t,"-panel-").concat(fr),disabled:rn},I.createElement("span",null,Gr),hn&&I.createElement("button",{type:"button","aria-label":_n||"remove",tabIndex:0,className:"".concat(Ft,"-menu-item-remove"),onClick:function(bn){bn.stopPropagation(),Ur(bn,fr)}},Ve||Kr.removeIcon||"\xD7"))}));function yr(pr){for(var Lr=Ct.filter(function(hn){return!hn.disabled}),rn=Lr.findIndex(function(hn){return hn.key===It})||0,Ve=Lr.length,fr=0;fr<Ve;fr+=1){rn=(rn+pr+Ve)%Ve;var Gr=Lr[rn];if(!Gr.disabled){Qt(Gr.key);return}}}function Vr(pr){var Lr=pr.which;if(!Ze){[Ue.Z.DOWN,Ue.Z.SPACE,Ue.Z.ENTER].includes(Lr)&&(Je(!0),pr.preventDefault());return}switch(Lr){case Ue.Z.UP:yr(-1),pr.preventDefault();break;case Ue.Z.DOWN:yr(1),pr.preventDefault();break;case Ue.Z.ESC:Je(!1);break;case Ue.Z.SPACE:case Ue.Z.ENTER:It!==null&&Zr(It,pr);break}}(0,I.useEffect)(function(){var pr=document.getElementById(rr);pr&&pr.scrollIntoView&&pr.scrollIntoView(!1)},[It]),(0,I.useEffect)(function(){Ze||Qt(null)},[Ze]);var Ir=(0,ie.Z)({},Qr?"marginRight":"marginLeft",Nr);Ct.length||(Ir.visibility="hidden",Ir.order=1);var Cr=v()((0,ie.Z)({},"".concat(Ft,"-rtl"),Qr)),tn=jt?null:I.createElement(xt.Z,(0,me.Z)({prefixCls:Ft,overlay:Ut,visible:Ct.length?Ze:!1,onVisibleChange:Je,overlayClassName:v()(Cr,Ie),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:sn},Ht),I.createElement("button",{type:"button",className:"".concat(ft,"-nav-more"),style:Ir,"aria-haspopup":"listbox","aria-controls":Vt,id:"".concat(_t,"-more"),"aria-expanded":Ze,onKeyDown:Vr},cr));return I.createElement("div",{className:v()("".concat(ft,"-nav-operations"),_r),style:hr,ref:ce},tn,I.createElement(st,{prefixCls:ft,locale:Kt,editable:Kr}))}),Nt=I.memo(Yt,function(se,ce){return ce.tabMoving}),Sr=function(ce){var ft=ce.prefixCls,_t=ce.id,Ct=ce.active,Kt=ce.focus,jt=ce.tab,Wt=jt.key,Ht=jt.label,hr=jt.disabled,_r=jt.closeIcon,Kr=jt.icon,Nr=ce.closable,Qr=ce.renderWrapper,_n=ce.removeAriaLabel,Zr=ce.editable,sn=ce.onClick,Ie=ce.onFocus,Ge=ce.onBlur,lt=ce.onKeyDown,Ze=ce.onMouseDown,Je=ce.onMouseUp,ut=ce.style,St=ce.tabCount,It=ce.currentPosition,Qt="".concat(ft,"-tab"),tr=ve(Nr,_r,Zr,hr);function cr(Ur){hr||sn(Ur)}function Vt(Ur){Ur.preventDefault(),Ur.stopPropagation(),Zr.onEdit("remove",{key:Wt,event:Ur})}var Ft=I.useMemo(function(){return Kr&&typeof Ht=="string"?I.createElement("span",null,Ht):Ht},[Ht,Kr]),rr=I.useRef(null);I.useEffect(function(){Kt&&rr.current&&rr.current.focus()},[Kt]);var $r=I.createElement("div",{key:Wt,"data-node-key":V(Wt),className:v()(Qt,(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(Qt,"-with-remove"),tr),"".concat(Qt,"-active"),Ct),"".concat(Qt,"-disabled"),hr),"".concat(Qt,"-focus"),Kt)),style:ut,onClick:cr},I.createElement("div",{ref:rr,role:"tab","aria-selected":Ct,id:_t&&"".concat(_t,"-tab-").concat(Wt),className:"".concat(Qt,"-btn"),"aria-controls":_t&&"".concat(_t,"-panel-").concat(Wt),"aria-disabled":hr,tabIndex:hr?null:Ct?0:-1,onClick:function(Ut){Ut.stopPropagation(),cr(Ut)},onKeyDown:lt,onMouseDown:Ze,onMouseUp:Je,onFocus:Ie,onBlur:Ge},Kt&&I.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(It," of ").concat(St)),Kr&&I.createElement("span",{className:"".concat(Qt,"-icon")},Kr),Ht&&Ft),tr&&I.createElement("button",{type:"button",role:"tab","aria-label":_n||"remove",tabIndex:Ct?0:-1,className:"".concat(Qt,"-remove"),onClick:function(Ut){Ut.stopPropagation(),Vt(Ut)}},_r||Zr.removeIcon||"\xD7"));return Qr?Qr($r):$r},wt=Sr,Er=function(ce,ft){var _t=ce.offsetWidth,Ct=ce.offsetHeight,Kt=ce.offsetTop,jt=ce.offsetLeft,Wt=ce.getBoundingClientRect(),Ht=Wt.width,hr=Wt.height,_r=Wt.left,Kr=Wt.top;return Math.abs(Ht-_t)<1?[Ht,hr,_r-ft.left,Kr-ft.top]:[_t,Ct,jt,Kt]},ze=function(ce){var ft=ce.current||{},_t=ft.offsetWidth,Ct=_t===void 0?0:_t,Kt=ft.offsetHeight,jt=Kt===void 0?0:Kt;if(ce.current){var Wt=ce.current.getBoundingClientRect(),Ht=Wt.width,hr=Wt.height;if(Math.abs(Ht-Ct)<1)return[Ht,hr]}return[Ct,jt]},Oe=function(ce,ft){return ce[ft?0:1]},Se=I.forwardRef(function(se,ce){var ft=se.className,_t=se.style,Ct=se.id,Kt=se.animated,jt=se.activeKey,Wt=se.rtl,Ht=se.extra,hr=se.editable,_r=se.locale,Kr=se.tabPosition,Nr=se.tabBarGutter,Qr=se.children,_n=se.onTabClick,Zr=se.onTabScroll,sn=se.indicator,Ie=I.useContext(L),Ge=Ie.prefixCls,lt=Ie.tabs,Ze=(0,I.useRef)(null),Je=(0,I.useRef)(null),ut=(0,I.useRef)(null),St=(0,I.useRef)(null),It=(0,I.useRef)(null),Qt=(0,I.useRef)(null),tr=(0,I.useRef)(null),cr=Kr==="top"||Kr==="bottom",Vt=he(0,function(dn,Wr){cr&&Zr&&Zr({direction:dn>Wr?"left":"right"})}),Ft=(0,H.Z)(Vt,2),rr=Ft[0],$r=Ft[1],Ur=he(0,function(dn,Wr){!cr&&Zr&&Zr({direction:dn>Wr?"top":"bottom"})}),Ut=(0,H.Z)(Ur,2),yr=Ut[0],Vr=Ut[1],Ir=(0,I.useState)([0,0]),Cr=(0,H.Z)(Ir,2),tn=Cr[0],pr=Cr[1],Lr=(0,I.useState)([0,0]),rn=(0,H.Z)(Lr,2),Ve=rn[0],fr=rn[1],Gr=(0,I.useState)([0,0]),hn=(0,H.Z)(Gr,2),Tn=hn[0],bn=hn[1],yn=(0,I.useState)([0,0]),br=(0,H.Z)(yn,2),gr=br[0],gn=br[1],an=ne(new Map),on=(0,H.Z)(an,2),Ei=on[0],ei=on[1],An=De(lt,Ei,Ve[0]),lr=Oe(tn,cr),un=Oe(Ve,cr),fn=Oe(Tn,cr),qn=Oe(gr,cr),ai=Math.floor(lr)<Math.floor(un+fn),Ln=ai?lr-qn:lr-fn,Un="".concat(Ge,"-nav-operations-hidden"),Rn=0,ln=0;cr&&Wt?(Rn=0,ln=Math.max(0,un-Ln)):(Rn=Math.min(0,Ln-un),ln=0);function fi(dn){return dn<Rn?Rn:dn>ln?ln:dn}var Hn=(0,I.useRef)(null),ni=(0,I.useState)(),oi=(0,H.Z)(ni,2),ti=oi[0],Hr=oi[1];function di(){Hr(Date.now())}function pi(){Hn.current&&clearTimeout(Hn.current)}ae(St,function(dn,Wr){function In(Bn,Jn){Bn(function(zn){var si=fi(zn+Jn);return si})}return ai?(cr?In($r,dn):In(Vr,Wr),pi(),di(),!0):!1}),(0,I.useEffect)(function(){return pi(),ti&&(Hn.current=setTimeout(function(){Hr(0)},100)),pi},[ti]);var vi=re(An,Ln,cr?rr:yr,un,fn,qn,(0,l.Z)((0,l.Z)({},se),{},{tabs:lt})),jn=(0,H.Z)(vi,2),Or=jn[0],Oi=jn[1],Mt=(0,$.Z)(function(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jt,Wr=An.get(dn)||{width:0,height:0,left:0,right:0,top:0};if(cr){var In=rr;Wt?Wr.right<rr?In=Wr.right:Wr.right+Wr.width>rr+Ln&&(In=Wr.right+Wr.width-Ln):Wr.left<-rr?In=-Wr.left:Wr.left+Wr.width>-rr+Ln&&(In=-(Wr.left+Wr.width-Ln)),Vr(0),$r(fi(In))}else{var Bn=yr;Wr.top<-yr?Bn=-Wr.top:Wr.top+Wr.height>-yr+Ln&&(Bn=-(Wr.top+Wr.height-Ln)),$r(0),Vr(fi(Bn))}}),Vn=(0,I.useState)(),Ri=(0,H.Z)(Vn,2),mi=Ri[0],Mn=Ri[1],li=(0,I.useState)(!1),kr=(0,H.Z)(li,2),Xn=kr[0],gi=kr[1],ri=lt.filter(function(dn){return!dn.disabled}).map(function(dn){return dn.key}),Dn=function(Wr){var In=ri.indexOf(mi||jt),Bn=ri.length,Jn=(In+Wr+Bn)%Bn,zn=ri[Jn];Mn(zn)},kn=function(Wr){var In=Wr.code,Bn=Wt&&cr,Jn=ri[0],zn=ri[ri.length-1];switch(In){case"ArrowLeft":{cr&&Dn(Bn?1:-1);break}case"ArrowRight":{cr&&Dn(Bn?-1:1);break}case"ArrowUp":{Wr.preventDefault(),cr||Dn(-1);break}case"ArrowDown":{Wr.preventDefault(),cr||Dn(1);break}case"Home":{Wr.preventDefault(),Mn(Jn);break}case"End":{Wr.preventDefault(),Mn(zn);break}case"Enter":case"Space":{Wr.preventDefault(),_n(jt,Wr);break}case"Backspace":case"Delete":{var si=ri.indexOf(mi),yi=lt.find(function(bi){return bi.key===mi}),Gi=ve(yi==null?void 0:yi.closable,yi==null?void 0:yi.closeIcon,hr,yi==null?void 0:yi.disabled);Gi&&(Wr.preventDefault(),Wr.stopPropagation(),hr.onEdit("remove",{key:mi,event:Wr}),si===ri.length-1?Dn(-1):Dn(1));break}}},Zn={};cr?Zn[Wt?"marginRight":"marginLeft"]=Nr:Zn.marginTop=Nr;var ii=lt.map(function(dn,Wr){var In=dn.key;return I.createElement(wt,{id:Ct,prefixCls:Ge,key:In,tab:dn,style:Wr===0?void 0:Zn,closable:dn.closable,editable:hr,active:In===jt,focus:In===mi,renderWrapper:Qr,removeAriaLabel:_r==null?void 0:_r.removeAriaLabel,tabCount:ri.length,currentPosition:Wr+1,onClick:function(Jn){_n(In,Jn)},onKeyDown:kn,onFocus:function(){Xn||Mn(In),Mt(In),di(),St.current&&(Wt||(St.current.scrollLeft=0),St.current.scrollTop=0)},onBlur:function(){Mn(void 0)},onMouseDown:function(){gi(!0)},onMouseUp:function(){gi(!1)}})}),wi=function(){return ei(function(){var Wr,In=new Map,Bn=(Wr=It.current)===null||Wr===void 0?void 0:Wr.getBoundingClientRect();return lt.forEach(function(Jn){var zn,si=Jn.key,yi=(zn=It.current)===null||zn===void 0?void 0:zn.querySelector('[data-node-key="'.concat(V(si),'"]'));if(yi){var Gi=Er(yi,Bn),bi=(0,H.Z)(Gi,4),_s=bi[0],cs=bi[1],Gs=bi[2],rs=bi[3];In.set(si,{width:_s,height:cs,left:Gs,top:rs})}}),In})};(0,I.useEffect)(function(){wi()},[lt.map(function(dn){return dn.key}).join("_")]);var ui=ee(function(){var dn=ze(Ze),Wr=ze(Je),In=ze(ut);pr([dn[0]-Wr[0]-In[0],dn[1]-Wr[1]-In[1]]);var Bn=ze(tr);bn(Bn);var Jn=ze(Qt);gn(Jn);var zn=ze(It);fr([zn[0]-Bn[0],zn[1]-Bn[1]]),wi()}),zi=lt.slice(0,Or),Hi=lt.slice(Oi+1),Mi=[].concat((0,q.Z)(zi),(0,q.Z)(Hi)),_i=An.get(jt),dr=W({activeTabOffset:_i,horizontal:cr,indicator:sn,rtl:Wt}),Mr=dr.style;(0,I.useEffect)(function(){Mt()},[jt,Rn,ln,b(_i),b(An),cr]),(0,I.useEffect)(function(){ui()},[Wt]);var vn=!!Mi.length,zr="".concat(Ge,"-nav-wrap"),qr,xi,Qn,Ii;return cr?Wt?(xi=rr>0,qr=rr!==ln):(qr=rr<0,xi=rr!==Rn):(Qn=yr<0,Ii=yr!==Rn),I.createElement(Y.Z,{onResize:ui},I.createElement("div",{ref:(0,A.x1)(ce,Ze),role:"tablist","aria-orientation":cr?"horizontal":"vertical",className:v()("".concat(Ge,"-nav"),ft),style:_t,onKeyDown:function(){di()}},I.createElement(Xe,{ref:Je,position:"left",extra:Ht,prefixCls:Ge}),I.createElement(Y.Z,{onResize:ui},I.createElement("div",{className:v()(zr,(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(zr,"-ping-left"),qr),"".concat(zr,"-ping-right"),xi),"".concat(zr,"-ping-top"),Qn),"".concat(zr,"-ping-bottom"),Ii)),ref:St},I.createElement(Y.Z,{onResize:ui},I.createElement("div",{ref:It,className:"".concat(Ge,"-nav-list"),style:{transform:"translate(".concat(rr,"px, ").concat(yr,"px)"),transition:ti?"none":void 0}},ii,I.createElement(st,{ref:tr,prefixCls:Ge,locale:_r,editable:hr,style:(0,l.Z)((0,l.Z)({},ii.length===0?void 0:Zn),{},{visibility:vn?"hidden":null})}),I.createElement("div",{className:v()("".concat(Ge,"-ink-bar"),(0,ie.Z)({},"".concat(Ge,"-ink-bar-animated"),Kt.inkBar)),style:Mr}))))),I.createElement(Nt,(0,me.Z)({},se,{removeAriaLabel:_r==null?void 0:_r.removeAriaLabel,ref:Qt,prefixCls:Ge,tabs:Mi,className:!vn&&Un,tabMoving:!!ti})),I.createElement(Xe,{ref:ut,position:"right",extra:Ht,prefixCls:Ge})))}),qe=Se,ht=I.forwardRef(function(se,ce){var ft=se.prefixCls,_t=se.className,Ct=se.style,Kt=se.id,jt=se.active,Wt=se.tabKey,Ht=se.children;return I.createElement("div",{id:Kt&&"".concat(Kt,"-panel-").concat(Wt),role:"tabpanel",tabIndex:jt?0:-1,"aria-labelledby":Kt&&"".concat(Kt,"-tab-").concat(Wt),"aria-hidden":!jt,style:Ct,className:v()(ft,jt&&"".concat(ft,"-active"),_t),ref:ce},Ht)}),pt=ht,Q=["renderTabBar"],we=["label","key"],$e=function(ce){var ft=ce.renderTabBar,_t=(0,E.Z)(ce,Q),Ct=I.useContext(L),Kt=Ct.tabs;if(ft){var jt=(0,l.Z)((0,l.Z)({},_t),{},{panes:Kt.map(function(Wt){var Ht=Wt.label,hr=Wt.key,_r=(0,E.Z)(Wt,we);return I.createElement(pt,(0,me.Z)({tab:Ht,key:hr,tabKey:hr},_r))})});return ft(jt,qe)}return I.createElement(qe,_t)},Be=$e,nt=B(77900),gt=["key","forceRender","style","className","destroyInactiveTabPane"],Ot=function(ce){var ft=ce.id,_t=ce.activeKey,Ct=ce.animated,Kt=ce.tabPosition,jt=ce.destroyInactiveTabPane,Wt=I.useContext(L),Ht=Wt.prefixCls,hr=Wt.tabs,_r=Ct.tabPane,Kr="".concat(Ht,"-tabpane");return I.createElement("div",{className:v()("".concat(Ht,"-content-holder"))},I.createElement("div",{className:v()("".concat(Ht,"-content"),"".concat(Ht,"-content-").concat(Kt),(0,ie.Z)({},"".concat(Ht,"-content-animated"),_r))},hr.map(function(Nr){var Qr=Nr.key,_n=Nr.forceRender,Zr=Nr.style,sn=Nr.className,Ie=Nr.destroyInactiveTabPane,Ge=(0,E.Z)(Nr,gt),lt=Qr===_t;return I.createElement(nt.default,(0,me.Z)({key:Qr,visible:lt,forceRender:_n,removeOnLeave:!!(jt||Ie),leavedClassName:"".concat(Kr,"-hidden")},Ct.tabPaneMotion),function(Ze,Je){var ut=Ze.style,St=Ze.className;return I.createElement(pt,(0,me.Z)({},Ge,{prefixCls:Kr,id:ft,tabKey:Qr,animated:_r,active:lt,style:(0,l.Z)((0,l.Z)({},Zr),ut),className:v()(sn,St),ref:Je}))})})))},yt=Ot,Dt=B(48736);function vt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},ce;return se===!1?ce={inkBar:!1,tabPane:!1}:se===!0?ce={inkBar:!0,tabPane:!1}:ce=(0,l.Z)({inkBar:!0},(0,F.Z)(se)==="object"?se:{}),ce.tabPaneMotion&&ce.tabPane===void 0&&(ce.tabPane=!0),!ce.tabPaneMotion&&ce.tabPane&&(ce.tabPane=!1),ce}var Gt=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],bt=0,At=I.forwardRef(function(se,ce){var ft=se.id,_t=se.prefixCls,Ct=_t===void 0?"rc-tabs":_t,Kt=se.className,jt=se.items,Wt=se.direction,Ht=se.activeKey,hr=se.defaultActiveKey,_r=se.editable,Kr=se.animated,Nr=se.tabPosition,Qr=Nr===void 0?"top":Nr,_n=se.tabBarGutter,Zr=se.tabBarStyle,sn=se.tabBarExtraContent,Ie=se.locale,Ge=se.more,lt=se.destroyInactiveTabPane,Ze=se.renderTabBar,Je=se.onChange,ut=se.onTabClick,St=se.onTabScroll,It=se.getPopupContainer,Qt=se.popupClassName,tr=se.indicator,cr=(0,E.Z)(se,Gt),Vt=I.useMemo(function(){return(jt||[]).filter(function(gr){return gr&&(0,F.Z)(gr)==="object"&&"key"in gr})},[jt]),Ft=Wt==="rtl",rr=vt(Kr),$r=(0,I.useState)(!1),Ur=(0,H.Z)($r,2),Ut=Ur[0],yr=Ur[1];(0,I.useEffect)(function(){yr((0,T.Z)())},[]);var Vr=(0,x.Z)(function(){var gr;return(gr=Vt[0])===null||gr===void 0?void 0:gr.key},{value:Ht,defaultValue:hr}),Ir=(0,H.Z)(Vr,2),Cr=Ir[0],tn=Ir[1],pr=(0,I.useState)(function(){return Vt.findIndex(function(gr){return gr.key===Cr})}),Lr=(0,H.Z)(pr,2),rn=Lr[0],Ve=Lr[1];(0,I.useEffect)(function(){var gr=Vt.findIndex(function(an){return an.key===Cr});if(gr===-1){var gn;gr=Math.max(0,Math.min(rn,Vt.length-1)),tn((gn=Vt[gr])===null||gn===void 0?void 0:gn.key)}Ve(gr)},[Vt.map(function(gr){return gr.key}).join("_"),Cr,rn]);var fr=(0,x.Z)(null,{value:ft}),Gr=(0,H.Z)(fr,2),hn=Gr[0],Tn=Gr[1];(0,I.useEffect)(function(){ft||(Tn("rc-tabs-".concat(bt)),bt+=1)},[]);function bn(gr,gn){ut==null||ut(gr,gn);var an=gr!==Cr;tn(gr),an&&(Je==null||Je(gr))}var yn={id:hn,activeKey:Cr,animated:rr,tabPosition:Qr,rtl:Ft,mobile:Ut},br=(0,l.Z)((0,l.Z)({},yn),{},{editable:_r,locale:Ie,more:Ge,tabBarGutter:_n,onTabClick:bn,onTabScroll:St,extra:sn,style:Zr,panes:null,getPopupContainer:It,popupClassName:Qt,indicator:tr});return I.createElement(L.Provider,{value:{tabs:Vt,prefixCls:Ct}},I.createElement("div",(0,me.Z)({ref:ce,id:ft,className:v()(Ct,"".concat(Ct,"-").concat(Qr),(0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(Ct,"-mobile"),Ut),"".concat(Ct,"-editable"),_r),"".concat(Ct,"-rtl"),Ft),Kt)},cr),I.createElement(Be,(0,me.Z)({},br,{renderTabBar:Ze})),I.createElement(yt,(0,me.Z)({destroyInactiveTabPane:lt},yn,{animated:rr}))))}),kt=At,er=kt,qt=B(48755),Pt=B(83397),ir=B(31756),y=B(86641);const R={motionAppear:!1,motionEnter:!0,motionLeave:!0};function rt(se){let ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},ft;return ce===!1?ft={inkBar:!1,tabPane:!1}:ce===!0?ft={inkBar:!0,tabPane:!0}:ft=Object.assign({inkBar:!0},typeof ce=="object"?ce:{}),ft.tabPane&&(ft.tabPaneMotion=Object.assign(Object.assign({},R),{motionName:(0,y.m)(se,"switch")})),ft}var U=B(11592),te=function(se,ce){var ft={};for(var _t in se)Object.prototype.hasOwnProperty.call(se,_t)&&ce.indexOf(_t)<0&&(ft[_t]=se[_t]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,_t=Object.getOwnPropertySymbols(se);Ct<_t.length;Ct++)ce.indexOf(_t[Ct])<0&&Object.prototype.propertyIsEnumerable.call(se,_t[Ct])&&(ft[_t[Ct]]=se[_t[Ct]]);return ft};function Zt(se){return se.filter(ce=>ce)}function Ae(se,ce){if(se)return se;const ft=(0,U.Z)(ce).map(_t=>{if(I.isValidElement(_t)){const{key:Ct,props:Kt}=_t,jt=Kt||{},{tab:Wt}=jt,Ht=te(jt,["tab"]);return Object.assign(Object.assign({key:String(Ct)},Ht),{label:Wt})}return null});return Zt(ft)}var Te=B(36237),Le=B(63356),K=B(16931),J=B(51636),Ee=B(46e3),N=se=>{const{componentCls:ce,motionDurationSlow:ft}=se;return[{[ce]:{[`${ce}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${ft}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${ft}`}}}}},[(0,Ee.oN)(se,"slide-up"),(0,Ee.oN)(se,"slide-down")]]};const Et=se=>{const{componentCls:ce,tabsCardPadding:ft,cardBg:_t,cardGutter:Ct,colorBorderSecondary:Kt,itemSelectedColor:jt}=se;return{[`${ce}-card`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab`]:{margin:0,padding:ft,background:_t,border:`${(0,Te.unit)(se.lineWidth)} ${se.lineType} ${Kt}`,transition:`all ${se.motionDurationSlow} ${se.motionEaseInOut}`},[`${ce}-tab-active`]:{color:jt,background:se.colorBgContainer},[`${ce}-tab-focus`]:Object.assign({},(0,Le.oN)(se,-3)),[`${ce}-ink-bar`]:{visibility:"hidden"},[`& ${ce}-tab${ce}-tab-focus ${ce}-tab-btn`]:{outline:"none"}},[`&${ce}-top, &${ce}-bottom`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab + ${ce}-tab`]:{marginLeft:{_skip_check_:!0,value:(0,Te.unit)(Ct)}}}},[`&${ce}-top`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab`]:{borderRadius:`${(0,Te.unit)(se.borderRadiusLG)} ${(0,Te.unit)(se.borderRadiusLG)} 0 0`},[`${ce}-tab-active`]:{borderBottomColor:se.colorBgContainer}}},[`&${ce}-bottom`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab`]:{borderRadius:`0 0 ${(0,Te.unit)(se.borderRadiusLG)} ${(0,Te.unit)(se.borderRadiusLG)}`},[`${ce}-tab-active`]:{borderTopColor:se.colorBgContainer}}},[`&${ce}-left, &${ce}-right`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab + ${ce}-tab`]:{marginTop:(0,Te.unit)(Ct)}}},[`&${ce}-left`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,Te.unit)(se.borderRadiusLG)} 0 0 ${(0,Te.unit)(se.borderRadiusLG)}`}},[`${ce}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:se.colorBgContainer}}}},[`&${ce}-right`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,Te.unit)(se.borderRadiusLG)} ${(0,Te.unit)(se.borderRadiusLG)} 0`}},[`${ce}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:se.colorBgContainer}}}}}}},de=se=>{const{componentCls:ce,itemHoverColor:ft,dropdownEdgeChildVerticalPadding:_t}=se;return{[`${ce}-dropdown`]:Object.assign(Object.assign({},(0,Le.Wf)(se)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:se.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${ce}-dropdown-menu`]:{maxHeight:se.tabsDropdownHeight,margin:0,padding:`${(0,Te.unit)(_t)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:se.colorBgContainer,backgroundClip:"padding-box",borderRadius:se.borderRadiusLG,outline:"none",boxShadow:se.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Le.vS),{display:"flex",alignItems:"center",minWidth:se.tabsDropdownWidth,margin:0,padding:`${(0,Te.unit)(se.paddingXXS)} ${(0,Te.unit)(se.paddingSM)}`,color:se.colorText,fontWeight:"normal",fontSize:se.fontSize,lineHeight:se.lineHeight,cursor:"pointer",transition:`all ${se.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:se.marginSM},color:se.colorTextDescription,fontSize:se.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:ft}},"&:hover":{background:se.controlItemBgHover},"&-disabled":{"&, &:hover":{color:se.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Bt=se=>{const{componentCls:ce,margin:ft,colorBorderSecondary:_t,horizontalMargin:Ct,verticalItemPadding:Kt,verticalItemMargin:jt,calc:Wt}=se;return{[`${ce}-top, ${ce}-bottom`]:{flexDirection:"column",[`> ${ce}-nav, > div > ${ce}-nav`]:{margin:Ct,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${(0,Te.unit)(se.lineWidth)} ${se.lineType} ${_t}`,content:"''"},[`${ce}-ink-bar`]:{height:se.lineWidthBold,"&-animated":{transition:`width ${se.motionDurationSlow}, left ${se.motionDurationSlow},
|
|
right ${se.motionDurationSlow}`}},[`${ce}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:se.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:se.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:se.boxShadowTabsOverflowRight},[`&${ce}-nav-wrap-ping-left::before`]:{opacity:1},[`&${ce}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${ce}-top`]:{[`> ${ce}-nav,
|
|
> div > ${ce}-nav`]:{"&::before":{bottom:0},[`${ce}-ink-bar`]:{bottom:0}}},[`${ce}-bottom`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{order:1,marginTop:ft,marginBottom:0,"&::before":{top:0},[`${ce}-ink-bar`]:{top:0}},[`> ${ce}-content-holder, > div > ${ce}-content-holder`]:{order:0}},[`${ce}-left, ${ce}-right`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{flexDirection:"column",minWidth:Wt(se.controlHeight).mul(1.25).equal(),[`${ce}-tab`]:{padding:Kt,textAlign:"center"},[`${ce}-tab + ${ce}-tab`]:{margin:jt},[`${ce}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:se.controlHeight},"&::before":{top:0,boxShadow:se.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:se.boxShadowTabsOverflowBottom},[`&${ce}-nav-wrap-ping-top::before`]:{opacity:1},[`&${ce}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${ce}-ink-bar`]:{width:se.lineWidthBold,"&-animated":{transition:`height ${se.motionDurationSlow}, top ${se.motionDurationSlow}`}},[`${ce}-nav-list, ${ce}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${ce}-left`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${ce}-content-holder, > div > ${ce}-content-holder`]:{marginLeft:{_skip_check_:!0,value:(0,Te.unit)(Wt(se.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${(0,Te.unit)(se.lineWidth)} ${se.lineType} ${se.colorBorder}`},[`> ${ce}-content > ${ce}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:se.paddingLG}}}},[`${ce}-right`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{order:1,[`${ce}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${ce}-content-holder, > div > ${ce}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:Wt(se.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${(0,Te.unit)(se.lineWidth)} ${se.lineType} ${se.colorBorder}`},[`> ${ce}-content > ${ce}-tabpane`]:{paddingRight:{_skip_check_:!0,value:se.paddingLG}}}}}},Xt=se=>{const{componentCls:ce,cardPaddingSM:ft,cardPaddingLG:_t,horizontalItemPaddingSM:Ct,horizontalItemPaddingLG:Kt}=se;return{[ce]:{"&-small":{[`> ${ce}-nav`]:{[`${ce}-tab`]:{padding:Ct,fontSize:se.titleFontSizeSM}}},"&-large":{[`> ${ce}-nav`]:{[`${ce}-tab`]:{padding:Kt,fontSize:se.titleFontSizeLG}}}},[`${ce}-card`]:{[`&${ce}-small`]:{[`> ${ce}-nav`]:{[`${ce}-tab`]:{padding:ft}},[`&${ce}-bottom`]:{[`> ${ce}-nav ${ce}-tab`]:{borderRadius:`0 0 ${(0,Te.unit)(se.borderRadius)} ${(0,Te.unit)(se.borderRadius)}`}},[`&${ce}-top`]:{[`> ${ce}-nav ${ce}-tab`]:{borderRadius:`${(0,Te.unit)(se.borderRadius)} ${(0,Te.unit)(se.borderRadius)} 0 0`}},[`&${ce}-right`]:{[`> ${ce}-nav ${ce}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,Te.unit)(se.borderRadius)} ${(0,Te.unit)(se.borderRadius)} 0`}}},[`&${ce}-left`]:{[`> ${ce}-nav ${ce}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,Te.unit)(se.borderRadius)} 0 0 ${(0,Te.unit)(se.borderRadius)}`}}}},[`&${ce}-large`]:{[`> ${ce}-nav`]:{[`${ce}-tab`]:{padding:_t}}}}}},Br=se=>{const{componentCls:ce,itemActiveColor:ft,itemHoverColor:_t,iconCls:Ct,tabsHorizontalItemMargin:Kt,horizontalItemPadding:jt,itemSelectedColor:Wt,itemColor:Ht}=se,hr=`${ce}-tab`;return{[hr]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:jt,fontSize:se.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Ht,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:ft}},"&-btn":{outline:"none",transition:`all ${se.motionDurationSlow}`,[`${hr}-icon:not(:last-child)`]:{marginInlineEnd:se.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:se.calc(se.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:se.marginXS},color:se.colorTextDescription,fontSize:se.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${se.motionDurationSlow}`,"&:hover":{color:se.colorTextHeading}},(0,Le.Qy)(se)),"&:hover":{color:_t},[`&${hr}-active ${hr}-btn`]:{color:Wt,textShadow:se.tabsActiveTextShadow},[`&${hr}-focus ${hr}-btn`]:Object.assign({},(0,Le.oN)(se)),[`&${hr}-disabled`]:{color:se.colorTextDisabled,cursor:"not-allowed"},[`&${hr}-disabled ${hr}-btn, &${hr}-disabled ${ce}-remove`]:{"&:focus, &:active":{color:se.colorTextDisabled}},[`& ${hr}-remove ${Ct}`]:{margin:0},[`${Ct}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:se.marginSM}}},[`${hr} + ${hr}`]:{margin:{_skip_check_:!0,value:Kt}}}},cn=se=>{const{componentCls:ce,tabsHorizontalItemMarginRTL:ft,iconCls:_t,cardGutter:Ct,calc:Kt}=se;return{[`${ce}-rtl`]:{direction:"rtl",[`${ce}-nav`]:{[`${ce}-tab`]:{margin:{_skip_check_:!0,value:ft},[`${ce}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[_t]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,Te.unit)(se.marginSM)}},[`${ce}-tab-remove`]:{marginRight:{_skip_check_:!0,value:(0,Te.unit)(se.marginXS)},marginLeft:{_skip_check_:!0,value:(0,Te.unit)(Kt(se.marginXXS).mul(-1).equal())},[_t]:{margin:0}}}},[`&${ce}-left`]:{[`> ${ce}-nav`]:{order:1},[`> ${ce}-content-holder`]:{order:0}},[`&${ce}-right`]:{[`> ${ce}-nav`]:{order:0},[`> ${ce}-content-holder`]:{order:1}},[`&${ce}-card${ce}-top, &${ce}-card${ce}-bottom`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-tab + ${ce}-tab`]:{marginRight:{_skip_check_:!0,value:Ct},marginLeft:{_skip_check_:!0,value:0}}}}},[`${ce}-dropdown-rtl`]:{direction:"rtl"},[`${ce}-menu-item`]:{[`${ce}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},jr=se=>{const{componentCls:ce,tabsCardPadding:ft,cardHeight:_t,cardGutter:Ct,itemHoverColor:Kt,itemActiveColor:jt,colorBorderSecondary:Wt}=se;return{[ce]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Le.Wf)(se)),{display:"flex",[`> ${ce}-nav, > div > ${ce}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${ce}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${se.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${ce}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${se.motionDurationSlow}`},[`${ce}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${ce}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${ce}-nav-more`]:{position:"relative",padding:ft,background:"transparent",border:0,color:se.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:se.calc(se.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${ce}-nav-add`]:Object.assign({minWidth:_t,marginLeft:{_skip_check_:!0,value:Ct},padding:(0,Te.unit)(se.paddingXS),background:"transparent",border:`${(0,Te.unit)(se.lineWidth)} ${se.lineType} ${Wt}`,borderRadius:`${(0,Te.unit)(se.borderRadiusLG)} ${(0,Te.unit)(se.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:se.colorText,transition:`all ${se.motionDurationSlow} ${se.motionEaseInOut}`,"&:hover":{color:Kt},"&:active, &:focus:not(:focus-visible)":{color:jt}},(0,Le.Qy)(se,-3))},[`${ce}-extra-content`]:{flex:"none"},[`${ce}-ink-bar`]:{position:"absolute",background:se.inkBarColor,pointerEvents:"none"}}),Br(se)),{[`${ce}-content`]:{position:"relative",width:"100%"},[`${ce}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${ce}-tabpane`]:Object.assign(Object.assign({},(0,Le.Qy)(se)),{"&-hidden":{display:"none"}})}),[`${ce}-centered`]:{[`> ${ce}-nav, > div > ${ce}-nav`]:{[`${ce}-nav-wrap`]:{[`&:not([class*='${ce}-nav-wrap-ping']) > ${ce}-nav-list`]:{margin:"auto"}}}}}},vr=se=>{const ce=se.controlHeightLG;return{zIndexPopup:se.zIndexPopupBase+50,cardBg:se.colorFillAlter,cardHeight:ce,cardPadding:`${(ce-Math.round(se.fontSize*se.lineHeight))/2-se.lineWidth}px ${se.padding}px`,cardPaddingSM:`${se.paddingXXS*1.5}px ${se.padding}px`,cardPaddingLG:`${se.paddingXS}px ${se.padding}px ${se.paddingXXS*1.5}px`,titleFontSize:se.fontSize,titleFontSizeLG:se.fontSizeLG,titleFontSizeSM:se.fontSize,inkBarColor:se.colorPrimary,horizontalMargin:`0 0 ${se.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${se.paddingSM}px 0`,horizontalItemPaddingSM:`${se.paddingXS}px 0`,horizontalItemPaddingLG:`${se.padding}px 0`,verticalItemPadding:`${se.paddingXS}px ${se.paddingLG}px`,verticalItemMargin:`${se.margin}px 0 0 0`,itemColor:se.colorText,itemSelectedColor:se.colorPrimary,itemHoverColor:se.colorPrimaryHover,itemActiveColor:se.colorPrimaryActive,cardGutter:se.marginXXS/2}};var xn=(0,K.I$)("Tabs",se=>{const ce=(0,J.mergeToken)(se,{tabsCardPadding:se.cardPadding,dropdownEdgeChildVerticalPadding:se.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${(0,Te.unit)(se.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${(0,Te.unit)(se.horizontalItemGutter)}`});return[Xt(ce),cn(ce),Bt(ce),de(ce),Et(ce),jr(ce),N(ce)]},vr),Jr=()=>null,en=function(se,ce){var ft={};for(var _t in se)Object.prototype.hasOwnProperty.call(se,_t)&&ce.indexOf(_t)<0&&(ft[_t]=se[_t]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,_t=Object.getOwnPropertySymbols(se);Ct<_t.length;Ct++)ce.indexOf(_t[Ct])<0&&Object.prototype.propertyIsEnumerable.call(se,_t[Ct])&&(ft[_t[Ct]]=se[_t[Ct]]);return ft};const $t=se=>{var ce,ft,_t,Ct,Kt,jt,Wt,Ht,hr,_r,Kr;const{type:Nr,className:Qr,rootClassName:_n,size:Zr,onEdit:sn,hideAdd:Ie,centered:Ge,addIcon:lt,removeIcon:Ze,moreIcon:Je,more:ut,popupClassName:St,children:It,items:Qt,animated:tr,style:cr,indicatorSize:Vt,indicator:Ft}=se,rr=en(se,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:$r}=rr,{direction:Ur,tabs:Ut,getPrefixCls:yr,getPopupContainer:Vr}=I.useContext(qt.E_),Ir=yr("tabs",$r),Cr=(0,Pt.Z)(Ir),[tn,pr,Lr]=xn(Ir,Cr);let rn;Nr==="editable-card"&&(rn={onEdit:(yn,br)=>{let{key:gr,event:gn}=br;sn==null||sn(yn==="add"?gn:gr,yn)},removeIcon:(ce=Ze!=null?Ze:Ut==null?void 0:Ut.removeIcon)!==null&&ce!==void 0?ce:I.createElement(be.Z,null),addIcon:(lt!=null?lt:Ut==null?void 0:Ut.addIcon)||I.createElement(_e.Z,null),showAdd:Ie!==!0});const Ve=yr(),fr=(0,ir.Z)(Zr),Gr=Ae(Qt,It),hn=rt(Ir,tr),Tn=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),cr),bn={align:(ft=Ft==null?void 0:Ft.align)!==null&&ft!==void 0?ft:(_t=Ut==null?void 0:Ut.indicator)===null||_t===void 0?void 0:_t.align,size:(Wt=(Kt=(Ct=Ft==null?void 0:Ft.size)!==null&&Ct!==void 0?Ct:Vt)!==null&&Kt!==void 0?Kt:(jt=Ut==null?void 0:Ut.indicator)===null||jt===void 0?void 0:jt.size)!==null&&Wt!==void 0?Wt:Ut==null?void 0:Ut.indicatorSize};return tn(I.createElement(er,Object.assign({direction:Ur,getPopupContainer:Vr},rr,{items:Gr,className:v()({[`${Ir}-${fr}`]:fr,[`${Ir}-card`]:["card","editable-card"].includes(Nr),[`${Ir}-editable-card`]:Nr==="editable-card",[`${Ir}-centered`]:Ge},Ut==null?void 0:Ut.className,Qr,_n,pr,Lr,Cr),popupClassName:v()(St,pr,Lr,Cr),style:Tn,editable:rn,more:Object.assign({icon:(Kr=(_r=(hr=(Ht=Ut==null?void 0:Ut.more)===null||Ht===void 0?void 0:Ht.icon)!==null&&hr!==void 0?hr:Ut==null?void 0:Ut.moreIcon)!==null&&_r!==void 0?_r:Je)!==null&&Kr!==void 0?Kr:I.createElement(Re.Z,null),transitionName:`${Ve}-slide-up`},ut),prefixCls:Ir,animated:hn,indicator:bn})))};$t.TabPane=Jr;var xr=$t},93427:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return be}});var I=B(34998);function be(Re,_e){return I.i.reduce((Z,v)=>{const me=Re[`${v}1`],ie=Re[`${v}3`],l=Re[`${v}6`],H=Re[`${v}7`];return Object.assign(Object.assign({},Z),_e(v,{lightColor:me,lightBorderColor:ie,darkColor:l,textColor:H}))},{})}},25399:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ne}});var I=B(59301),be=B(92310),Re=B.n(be),_e=B(29125),Z=B(18929),v=B(62487),me=B(75030),ie=B(86641),l=B(52838),H=B(22703),F=B(32383),E=B(55743),x=B(57700),T=B(48755),L=B(36237),q=B(63356),Y=B(34925),$=B(37645),A=B(36305),M=B(93427),O=B(51636),W=B(16931);const ge=oe=>{const{calc:re,componentCls:b,tooltipMaxWidth:S,tooltipColor:V,tooltipBg:ve,tooltipBorderRadius:He,zIndexPopup:st,controlHeight:tt,boxShadowSecondary:Xe,paddingSM:xt,paddingXS:et,arrowOffsetHorizontal:Ue,sizePopupArrow:Yt}=oe,Nt=re(He).add(Yt).add(Ue).equal(),Sr=re(He).mul(2).add(Yt).equal();return[{[b]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,q.Wf)(oe)),{position:"absolute",zIndex:st,display:"block",width:"max-content",maxWidth:S,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":ve,[`${b}-inner`]:{minWidth:Sr,minHeight:tt,padding:`${(0,L.unit)(oe.calc(xt).div(2).equal())} ${(0,L.unit)(et)}`,color:V,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ve,borderRadius:He,boxShadow:Xe,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:Nt},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${b}-inner`]:{borderRadius:oe.min(He,$.qN)}},[`${b}-content`]:{position:"relative"}}),(0,M.Z)(oe,(wt,Er)=>{let{darkColor:ze}=Er;return{[`&${b}-${wt}`]:{[`${b}-inner`]:{backgroundColor:ze},[`${b}-arrow`]:{"--antd-arrow-background-color":ze}}}})),{"&-rtl":{direction:"rtl"}})},(0,$.ZP)(oe,"var(--antd-arrow-background-color)"),{[`${b}-pure`]:{position:"relative",maxWidth:"none",margin:oe.sizePopupArrow}}]},De=oe=>Object.assign(Object.assign({zIndexPopup:oe.zIndexPopupBase+70},(0,$.wZ)({contentRadius:oe.borderRadius,limitVerticalRadius:!0})),(0,A.w)((0,O.mergeToken)(oe,{borderRadiusOuter:Math.min(oe.borderRadiusOuter,4)})));var he=function(oe){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,W.I$)("Tooltip",S=>{const{borderRadius:V,colorTextLightSolid:ve,colorBgSpotlight:He}=S,st=(0,O.mergeToken)(S,{tooltipMaxWidth:250,tooltipColor:ve,tooltipBorderRadius:V,tooltipBg:He});return[ge(st),(0,Y._y)(S,"zoom-big-fast")]},De,{resetStyle:!1,injectStyle:re})(oe)},Me=B(29509);function Fe(oe,re){const b=(0,Me.o2)(re),S=Re()({[`${oe}-${re}`]:re&&b}),V={},ve={};return re&&!b&&(V.background=re,ve["--antd-arrow-background-color"]=re),{className:S,overlayStyle:V,arrowStyle:ve}}var ct=oe=>{const{prefixCls:re,className:b,placement:S="top",title:V,color:ve,overlayInnerStyle:He}=oe,{getPrefixCls:st}=I.useContext(T.E_),tt=st("tooltip",re),[Xe,xt,et]=he(tt),Ue=Fe(tt,ve),Yt=Ue.arrowStyle,Nt=Object.assign(Object.assign({},He),Ue.overlayStyle),Sr=Re()(xt,et,tt,`${tt}-pure`,`${tt}-placement-${S}`,b,Ue.className);return Xe(I.createElement("div",{className:Sr,style:Yt},I.createElement("div",{className:`${tt}-arrow`}),I.createElement(_e.G,Object.assign({},oe,{className:xt,prefixCls:tt,overlayInnerStyle:Nt}),V)))},ae=function(oe,re){var b={};for(var S in oe)Object.prototype.hasOwnProperty.call(oe,S)&&re.indexOf(S)<0&&(b[S]=oe[S]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,S=Object.getOwnPropertySymbols(oe);V<S.length;V++)re.indexOf(S[V])<0&&Object.prototype.propertyIsEnumerable.call(oe,S[V])&&(b[S[V]]=oe[S[V]]);return b};const ee=I.forwardRef((oe,re)=>{var b,S;const{prefixCls:V,openClassName:ve,getTooltipContainer:He,color:st,overlayInnerStyle:tt,children:Xe,afterOpenChange:xt,afterVisibleChange:et,destroyTooltipOnHide:Ue,arrow:Yt=!0,title:Nt,overlay:Sr,builtinPlacements:wt,arrowPointAtCenter:Er=!1,autoAdjustOverflow:ze=!0,motion:Oe,getPopupContainer:Se,placement:qe="top",mouseEnterDelay:ht=.1,mouseLeaveDelay:pt=.1,overlayStyle:Q,rootClassName:we,overlayClassName:$e,styles:Be,classNames:nt}=oe,gt=ae(oe,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Ot=!!Yt,[,yt]=(0,x.ZP)(),{getPopupContainer:Dt,getPrefixCls:vt,direction:Gt,className:bt,style:At,classNames:kt,styles:er}=(0,T.dj)("tooltip"),qt=(0,F.ln)("Tooltip"),Pt=I.useRef(null),ir=()=>{var Jr;(Jr=Pt.current)===null||Jr===void 0||Jr.forceAlign()};I.useImperativeHandle(re,()=>{var Jr,en;return{forceAlign:ir,forcePopupAlign:()=>{qt.deprecated(!1,"forcePopupAlign","forceAlign"),ir()},nativeElement:(Jr=Pt.current)===null||Jr===void 0?void 0:Jr.nativeElement,popupElement:(en=Pt.current)===null||en===void 0?void 0:en.popupElement}});const[y,R]=(0,Z.Z)(!1,{value:(b=oe.open)!==null&&b!==void 0?b:oe.visible,defaultValue:(S=oe.defaultOpen)!==null&&S!==void 0?S:oe.defaultVisible}),rt=!Nt&&!Sr&&Nt!==0,U=Jr=>{var en,$t;R(rt?!1:Jr),rt||((en=oe.onOpenChange)===null||en===void 0||en.call(oe,Jr),($t=oe.onVisibleChange)===null||$t===void 0||$t.call(oe,Jr))},te=I.useMemo(()=>{var Jr,en;let $t=Er;return typeof Yt=="object"&&($t=(en=(Jr=Yt.pointAtCenter)!==null&&Jr!==void 0?Jr:Yt.arrowPointAtCenter)!==null&&en!==void 0?en:Er),wt||(0,l.Z)({arrowPointAtCenter:$t,autoAdjustOverflow:ze,arrowWidth:Ot?yt.sizePopupArrow:0,borderRadius:yt.borderRadius,offset:yt.marginXXS,visibleFirst:!0})},[Er,Yt,wt,yt]),Zt=I.useMemo(()=>Nt===0?Nt:Sr||Nt||"",[Sr,Nt]),Ae=I.createElement(v.Z,{space:!0},typeof Zt=="function"?Zt():Zt),Te=vt("tooltip",V),Le=vt(),K=oe["data-popover-inject"];let J=y;!("open"in oe)&&!("visible"in oe)&&rt&&(J=!1);const Ee=I.isValidElement(Xe)&&!(0,H.M2)(Xe)?Xe:I.createElement("span",null,Xe),Ce=Ee.props,N=!Ce.className||typeof Ce.className=="string"?Re()(Ce.className,ve||`${Te}-open`):Ce.className,[Et,de,Bt]=he(Te,!K),Xt=Fe(Te,st),Br=Xt.arrowStyle,cn=Re()($e,{[`${Te}-rtl`]:Gt==="rtl"},Xt.className,we,de,Bt,bt,kt.root,nt==null?void 0:nt.root),jr=Re()(kt.body,nt==null?void 0:nt.body),[vr,xn]=(0,me.Cn)("Tooltip",gt.zIndex),$n=I.createElement(_e.Z,Object.assign({},gt,{zIndex:vr,showArrow:Ot,placement:qe,mouseEnterDelay:ht,mouseLeaveDelay:pt,prefixCls:Te,classNames:{root:cn,body:jr},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br),er.root),At),Q),Be==null?void 0:Be.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},er.body),tt),Be==null?void 0:Be.body),Xt.overlayStyle)},getTooltipContainer:Se||He||Dt,ref:Pt,builtinPlacements:te,overlay:Ae,visible:J,onVisibleChange:U,afterVisibleChange:xt!=null?xt:et,arrowContent:I.createElement("span",{className:`${Te}-arrow-content`}),motion:{motionName:(0,ie.m)(Le,"zoom-big-fast",oe.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ue}),J?(0,H.Tm)(Ee,{className:N}):Ee);return Et(I.createElement(E.Z.Provider,{value:xn},$n))});ee._InternalPanelDoNotUseOrYouWillBeFired=ct;var ne=ee},64018:function(){var Jt,ot,B,I=!1,be,Re;window.PR_SHOULD_USE_CONTINUATION=!0;var _e,Z;(function(){var v=window,me=["break,continue,do,else,for,if,return,while"],ie=[me,"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"],l=[ie,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[l,"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"],F=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],E=[l,"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"],x="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",T=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],L="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",q=[me,"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"],Y=[me,"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"],$=[me,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[H,E,F,T,L,q,Y,$],M=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,O="str",W="kwd",ge="com",De="typ",he="lit",Me="pun",Fe="pln",ke="tag",ct="dec",ae="src",j="atn",ee="atv",ne="nocode",oe="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function re(Oe){for(var Se=0,qe=!1,ht=!1,pt=0,Q=Oe.length;pt<Q;++pt){var we=Oe[pt];if(we.ignoreCase)ht=!0;else if(/[a-z]/i.test(we.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){qe=!0,ht=!1;break}}var $e={b:8,t:9,n:10,v:11,f:12,r:13};function Be(Dt){var vt=Dt.charCodeAt(0);if(vt!==92)return vt;var Gt=Dt.charAt(1);return vt=$e[Gt],vt||("0"<=Gt&&Gt<="7"?parseInt(Dt.substring(1),8):Gt==="u"||Gt==="x"?parseInt(Dt.substring(2),16):Dt.charCodeAt(1))}function nt(Dt){if(Dt<32)return(Dt<16?"\\x0":"\\x")+Dt.toString(16);var vt=String.fromCharCode(Dt);return vt==="\\"||vt==="-"||vt==="]"||vt==="^"?"\\"+vt:vt}function gt(Dt){var vt=Dt.substring(1,Dt.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")),Gt=[],bt=vt[0]==="^",At=["["];bt&&At.push("^");for(var kt=bt?1:0,er=vt.length;kt<er;++kt){var qt=vt[kt];if(/\\[bdsw]/i.test(qt))At.push(qt);else{var Pt=Be(qt),ir;kt+2<er&&vt[kt+1]==="-"?(ir=Be(vt[kt+2]),kt+=2):ir=Pt,Gt.push([Pt,ir]),ir<65||Pt>122||(ir<65||Pt>90||Gt.push([Math.max(65,Pt)|32,Math.min(ir,90)|32]),ir<97||Pt>122||Gt.push([Math.max(97,Pt)&-33,Math.min(ir,122)&-33]))}}Gt.sort(function(U,te){return U[0]-te[0]||te[1]-U[1]});for(var y=[],R=[],kt=0;kt<Gt.length;++kt){var rt=Gt[kt];rt[0]<=R[1]+1?R[1]=Math.max(R[1],rt[1]):y.push(R=rt)}for(var kt=0;kt<y.length;++kt){var rt=y[kt];At.push(nt(rt[0])),rt[1]>rt[0]&&(rt[1]+1>rt[0]&&At.push("-"),At.push(nt(rt[1])))}return At.push("]"),At.join("")}function Ot(Dt){for(var vt=Dt.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")),Gt=vt.length,bt=[],At=0,kt=0;At<Gt;++At){var er=vt[At];if(er==="(")++kt;else if(er.charAt(0)==="\\"){var qt=+er.substring(1);qt&&(qt<=kt?bt[qt]=-1:vt[At]=nt(qt))}}for(var At=1;At<bt.length;++At)bt[At]===-1&&(bt[At]=++Se);for(var At=0,kt=0;At<Gt;++At){var er=vt[At];if(er==="(")++kt,bt[kt]||(vt[At]="(?:");else if(er.charAt(0)==="\\"){var qt=+er.substring(1);qt&&qt<=kt&&(vt[At]="\\"+bt[qt])}}for(var At=0;At<Gt;++At)vt[At]==="^"&&vt[At+1]!=="^"&&(vt[At]="");if(Dt.ignoreCase&&qe)for(var At=0;At<Gt;++At){var er=vt[At],Pt=er.charAt(0);er.length>=2&&Pt==="["?vt[At]=gt(er):Pt!=="\\"&&(vt[At]=er.replace(/[a-zA-Z]/g,function(R){var rt=R.charCodeAt(0);return"["+String.fromCharCode(rt&-33,rt|32)+"]"}))}return vt.join("")}for(var yt=[],pt=0,Q=Oe.length;pt<Q;++pt){var we=Oe[pt];if(we.global||we.multiline)throw new Error(""+we);yt.push("(?:"+Ot(we)+")")}return new RegExp(yt.join("|"),ht?"gi":"g")}function b(Oe,Se){var qe=/(?:^|\s)nocode(?:\s|$)/,ht=[],pt=0,Q=[],we=0;function $e(Be){var nt=Be.nodeType;if(nt==1){if(qe.test(Be.className))return;for(var gt=Be.firstChild;gt;gt=gt.nextSibling)$e(gt);var Ot=Be.nodeName.toLowerCase();(Ot==="br"||Ot==="li")&&(ht[we]=`
|
|
`,Q[we<<1]=pt++,Q[we++<<1|1]=Be)}else if(nt==3||nt==4){var yt=Be.nodeValue;yt.length&&(Se?yt=yt.replace(/\r\n?/g,`
|
|
`):yt=yt.replace(/[ \t\r\n]+/g," "),ht[we]=yt,Q[we<<1]=pt,pt+=yt.length,Q[we++<<1|1]=Be)}}return $e(Oe),{sourceCode:ht.join("").replace(/\n$/,""),spans:Q}}function S(Oe,Se,qe,ht,pt){if(qe){var Q={sourceNode:Oe,pre:1,langExtension:null,numberLines:null,sourceCode:qe,spans:null,basePos:Se,decorations:null};ht(Q),pt.push.apply(pt,Q.decorations)}}var V=/\S/;function ve(Oe){for(var Se=void 0,qe=Oe.firstChild;qe;qe=qe.nextSibling){var ht=qe.nodeType;Se=ht===1?Se?Oe:qe:ht===3&&V.test(qe.nodeValue)?Oe:Se}return Se===Oe?void 0:Se}function He(Oe,Se){var qe={},ht;(function(){for(var we=Oe.concat(Se),$e=[],Be={},nt=0,gt=we.length;nt<gt;++nt){var Ot=we[nt],yt=Ot[3];if(yt)for(var Dt=yt.length;--Dt>=0;)qe[yt.charAt(Dt)]=Ot;var vt=Ot[1],Gt=""+vt;Be.hasOwnProperty(Gt)||($e.push(vt),Be[Gt]=null)}$e.push(/[\0-\uffff]/),ht=re($e)})();var pt=Se.length,Q=function(we){for(var $e=we.sourceCode,Be=we.basePos,nt=we.sourceNode,gt=[Be,Fe],Ot=0,yt=$e.match(ht)||[],Dt={},vt=0,Gt=yt.length;vt<Gt;++vt){var bt=yt[vt],At=Dt[bt],kt=void 0,er;if(typeof At=="string")er=!1;else{var qt=qe[bt.charAt(0)];if(qt)kt=bt.match(qt[1]),At=qt[0];else{for(var Pt=0;Pt<pt;++Pt)if(qt=Se[Pt],kt=bt.match(qt[1]),kt){At=qt[0];break}kt||(At=Fe)}er=At.length>=5&&At.substring(0,5)==="lang-",er&&!(kt&&typeof kt[1]=="string")&&(er=!1,At=ae),er||(Dt[bt]=At)}var ir=Ot;if(Ot+=bt.length,!er)gt.push(Be+ir,At);else{var y=kt[1],R=bt.indexOf(y),rt=R+y.length;kt[2]&&(rt=bt.length-kt[2].length,R=rt-y.length);var U=At.substring(5);S(nt,Be+ir,bt.substring(0,R),Q,gt),S(nt,Be+ir+R,y,Yt(U,y),gt),S(nt,Be+ir+rt,bt.substring(rt),Q,gt)}}we.decorations=gt};return Q}function st(Oe){var Se=[],qe=[];Oe.tripleQuotedStrings?Se.push([O,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Oe.multiLineStrings?Se.push([O,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Se.push([O,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Oe.verbatimStrings&&qe.push([O,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ht=Oe.hashComments;ht&&(Oe.cStyleComments?(ht>1?Se.push([ge,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Se.push([ge,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),qe.push([O,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Se.push([ge,/^#[^\r\n]*/,null,"#"])),Oe.cStyleComments&&(qe.push([ge,/^\/\/[^\r\n]*/,null]),qe.push([ge,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pt=Oe.regexLiterals;if(pt){var Q=pt>1?"":`
|
|
\r`,we=Q?".":"[\\S\\s]",$e="/(?=[^/*"+Q+"])(?:[^/\\x5B\\x5C"+Q+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+Q+"]|\\x5C"+we+")*(?:\\x5D|$))+/";qe.push(["lang-regex",RegExp("^"+oe+"("+$e+")")])}var Be=Oe.types;Be&&qe.push([De,Be]);var nt=(""+Oe.keywords).replace(/^ | $/g,"");nt.length&&qe.push([W,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),Se.push([Fe,/^\s+/,null,` \r
|
|
\xA0`]);var gt="^.[^\\s\\w.$@'\"`/\\\\]*";return Oe.regexLiterals&&(gt+="(?!s*/)"),qe.push([he,/^@[a-z_$][a-z_$@0-9]*/i,null],[De,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Fe,/^[a-z_$][a-z_$@0-9]*/i,null],[he,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Fe,/^\\[\s\S]?/,null],[Me,new RegExp(gt),null]),He(Se,qe)}var tt=st({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Xe(Oe,Se,qe){for(var ht=/(?:^|\s)nocode(?:\s|$)/,pt=/\r\n?|\n/,Q=Oe.ownerDocument,we=Q.createElement("li");Oe.firstChild;)we.appendChild(Oe.firstChild);var $e=[we];function Be(vt){var Gt=vt.nodeType;if(Gt==1&&!ht.test(vt.className))if(vt.nodeName==="br")nt(vt),vt.parentNode&&vt.parentNode.removeChild(vt);else for(var bt=vt.firstChild;bt;bt=bt.nextSibling)Be(bt);else if((Gt==3||Gt==4)&&qe){var At=vt.nodeValue,kt=At.match(pt);if(kt){var er=At.substring(0,kt.index);vt.nodeValue=er;var qt=At.substring(kt.index+kt[0].length);if(qt){var Pt=vt.parentNode;Pt.insertBefore(Q.createTextNode(qt),vt.nextSibling)}nt(vt),er||vt.parentNode.removeChild(vt)}}}function nt(vt){for(;!vt.nextSibling;)if(vt=vt.parentNode,!vt)return;function Gt(kt,er){var qt=er?kt.cloneNode(!1):kt,Pt=kt.parentNode;if(Pt){var ir=Gt(Pt,1),y=kt.nextSibling;ir.appendChild(qt);for(var R=y;R;R=y)y=R.nextSibling,ir.appendChild(R)}return qt}for(var bt=Gt(vt.nextSibling,0),At;(At=bt.parentNode)&&At.nodeType===1;)bt=At;$e.push(bt)}for(var gt=0;gt<$e.length;++gt)Be($e[gt]);Se===(Se|0)&&$e[0].setAttribute("value",Se);var Ot=Q.createElement("ol");Ot.className="linenums";for(var yt=Math.max(0,Se-1|0)||0,gt=0,Dt=$e.length;gt<Dt;++gt)we=$e[gt],we.className="L"+(gt+yt)%10,we.firstChild||we.appendChild(Q.createTextNode("\xA0")),Ot.appendChild(we);Oe.appendChild(Ot)}function xt(Oe){var Se=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Se=Se&&+Se[1]<=8;var qe=/\n/g,ht=Oe.sourceCode,pt=ht.length,Q=0,we=Oe.spans,$e=we.length,Be=0,nt=Oe.decorations,gt=nt.length,Ot=0;nt[gt]=pt;var yt,Dt;for(Dt=yt=0;Dt<gt;)nt[Dt]!==nt[Dt+2]?(nt[yt++]=nt[Dt++],nt[yt++]=nt[Dt++]):Dt+=2;for(gt=yt,Dt=yt=0;Dt<gt;){for(var vt=nt[Dt],Gt=nt[Dt+1],bt=Dt+2;bt+2<=gt&&nt[bt+1]===Gt;)bt+=2;nt[yt++]=vt,nt[yt++]=Gt,Dt=bt}gt=nt.length=yt;var At=Oe.sourceNode,kt="";At&&(kt=At.style.display,At.style.display="none");try{for(var er=null;Be<$e;){var qt=we[Be],Pt=we[Be+2]||pt,ir=nt[Ot+2]||pt,bt=Math.min(Pt,ir),y=we[Be+1],R;if(y.nodeType!==1&&(R=ht.substring(Q,bt))){Se&&(R=R.replace(qe,"\r")),y.nodeValue=R;var rt=y.ownerDocument,U=rt.createElement("span");U.className=nt[Ot+1];var te=y.parentNode;te.replaceChild(U,y),U.appendChild(y),Q<Pt&&(we[Be+1]=y=rt.createTextNode(ht.substring(bt,Pt)),te.insertBefore(y,U.nextSibling))}Q=bt,Q>=Pt&&(Be+=2),Q>=ir&&(Ot+=2)}}finally{At&&(At.style.display=kt)}}var et={};function Ue(Oe,Se){for(var qe=Se.length;--qe>=0;){var ht=Se[qe];et.hasOwnProperty(ht)?v.console&&console.warn("cannot override language handler %s",ht):et[ht]=Oe}}function Yt(Oe,Se){return Oe&&et.hasOwnProperty(Oe)||(Oe=/^\s*</.test(Se)?"default-markup":"default-code"),et[Oe]}Ue(tt,["default-code"]),Ue(He([],[[Fe,/^[^<?]+/],[ct,/^<!\w[^>]*(?:>|$)/],[ge,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Me,/^(?:<[%?]|[%?]>)/],["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"]),Ue(He([[Fe,/^[\s]+/,null,` \r
|
|
`],[ee,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ke,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[j,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Me,/^[=<>\/]+/],["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"]),Ue(He([],[[ee,/^[\s\S]+/]]),["uq.val"]),Ue(st({keywords:H,hashComments:!0,cStyleComments:!0,types:M}),["c","cc","cpp","cxx","cyc","m"]),Ue(st({keywords:"null,true,false"}),["json"]),Ue(st({keywords:E,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:M}),["cs"]),Ue(st({keywords:F,cStyleComments:!0}),["java"]),Ue(st({keywords:$,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ue(st({keywords:q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ue(st({keywords:L,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ue(st({keywords:Y,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ue(st({keywords:T,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ue(st({keywords:x,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ue(He([],[[O,/^[\s\S]+/]]),["regex"]);function Nt(Oe){var Se=Oe.langExtension;try{var qe=b(Oe.sourceNode,Oe.pre),ht=qe.sourceCode;Oe.sourceCode=ht,Oe.spans=qe.spans,Oe.basePos=0,Yt(Se,ht)(Oe),xt(Oe)}catch(pt){v.console&&console.log(pt&&pt.stack||pt)}}function Sr(Oe,Se,qe){var ht=qe||!1,pt=Se||null,Q=document.createElement("div");Q.innerHTML="<pre>"+Oe+"</pre>",Q=Q.firstChild,ht&&Xe(Q,ht,!0);var we={langExtension:pt,numberLines:ht,sourceNode:Q,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Nt(we),Q.innerHTML}function wt(Oe,Se){var qe=Se||document.body,ht=qe.ownerDocument||document;function pt(qt){return qe.getElementsByTagName(qt)}for(var Q=[pt("pre"),pt("code"),pt("xmp")],we=[],$e=0;$e<Q.length;++$e)for(var Be=0,nt=Q[$e].length;Be<nt;++Be)we.push(Q[$e][Be]);Q=null;var gt=Date;gt.now||(gt={now:function(){return+new Date}});var Ot=0,yt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Dt=/\bprettyprint\b/,vt=/\bprettyprinted\b/,Gt=/pre|xmp/i,bt=/^code$/i,At=/^(?:pre|code|xmp)$/i,kt={};function er(){for(var qt=v.PR_SHOULD_USE_CONTINUATION?gt.now()+250:1/0;Ot<we.length&>.now()<qt;Ot++){for(var Pt=we[Ot],ir=kt,y=Pt;y=y.previousSibling;){var R=y.nodeType,rt=(R===7||R===8)&&y.nodeValue;if(rt?!/^\??prettify\b/.test(rt):R!==3||/\S/.test(y.nodeValue))break;if(rt){ir={},rt.replace(/\b(\w+)=([\w:.%+-]+)/g,function(de,Bt,Xt){ir[Bt]=Xt});break}}var U=Pt.className;if((ir!==kt||Dt.test(U))&&!vt.test(U)){for(var te=!1,Zt=Pt.parentNode;Zt;Zt=Zt.parentNode){var Ae=Zt.tagName;if(At.test(Ae)&&Zt.className&&Dt.test(Zt.className)){te=!0;break}}if(!te){Pt.className+=" prettyprinted";var Te=ir.lang;if(!Te){Te=U.match(yt);var Le;!Te&&(Le=ve(Pt))&&bt.test(Le.tagName)&&(Te=Le.className.match(yt)),Te&&(Te=Te[1])}var K;if(Gt.test(Pt.tagName))K=1;else{var J=Pt.currentStyle,Ee=ht.defaultView,Ce=J?J.whiteSpace:Ee&&Ee.getComputedStyle?Ee.getComputedStyle(Pt,null).getPropertyValue("white-space"):0;K=Ce&&Ce.substring(0,3)==="pre"}var N=ir.linenums;(N=N==="true"||+N)||(N=U.match(/\blinenums\b(?::(\d+))?/),N=N?N[1]&&N[1].length?+N[1]:!0:!1),N&&Xe(Pt,N,K);var Et={langExtension:Te,sourceNode:Pt,numberLines:N,pre:K,sourceCode:null,basePos:null,spans:null,decorations:null};Nt(Et)}}}Ot<we.length?v.setTimeout(er,250):typeof Oe=="function"&&Oe()}er()}var Er=v.PR={createSimpleLexer:He,registerLangHandler:Ue,sourceDecorator:st,PR_ATTRIB_NAME:j,PR_ATTRIB_VALUE:ee,PR_COMMENT:ge,PR_DECLARATION:ct,PR_KEYWORD:W,PR_LITERAL:he,PR_NOCODE:ne,PR_PLAIN:Fe,PR_PUNCTUATION:Me,PR_SOURCE:ae,PR_STRING:O,PR_TAG:ke,PR_TYPE:De,prettyPrintOne:I?v.prettyPrintOne=Sr:_e=Sr,prettyPrint:Z=I?v.prettyPrint=wt:Z=wt},ze=v.define;typeof ze=="function"&&ze.amd&&ze("google-code-prettify",[],function(){return Er})})()},25769:function(Jt,ot,B){"use strict";var I=B(98040),be={"text/plain":"Text","text/html":"Url",default:"Text"},Re="Copy to clipboard: #{key}, Enter";function _e(v){var me=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return v.replace(/#{\s*key\s*}/g,me)}function Z(v,me){var ie,l,H,F,E,x,T=!1;me||(me={}),ie=me.debug||!1;try{H=I(),F=document.createRange(),E=document.getSelection(),x=document.createElement("span"),x.textContent=v,x.ariaHidden="true",x.style.all="unset",x.style.position="fixed",x.style.top=0,x.style.clip="rect(0, 0, 0, 0)",x.style.whiteSpace="pre",x.style.webkitUserSelect="text",x.style.MozUserSelect="text",x.style.msUserSelect="text",x.style.userSelect="text",x.addEventListener("copy",function(q){if(q.stopPropagation(),me.format)if(q.preventDefault(),typeof q.clipboardData=="undefined"){ie&&console.warn("unable to use e.clipboardData"),ie&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Y=be[me.format]||be.default;window.clipboardData.setData(Y,v)}else q.clipboardData.clearData(),q.clipboardData.setData(me.format,v);me.onCopy&&(q.preventDefault(),me.onCopy(q.clipboardData))}),document.body.appendChild(x),F.selectNodeContents(x),E.addRange(F);var L=document.execCommand("copy");if(!L)throw new Error("copy command was unsuccessful");T=!0}catch(q){ie&&console.error("unable to copy using execCommand: ",q),ie&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(me.format||"text",v),me.onCopy&&me.onCopy(window.clipboardData),T=!0}catch(Y){ie&&console.error("unable to copy using clipboardData: ",Y),ie&&console.error("falling back to prompt"),l=_e("message"in me?me.message:Re),window.prompt(l,v)}}finally{E&&(typeof E.removeRange=="function"?E.removeRange(F):E.removeAllRanges()),x&&document.body.removeChild(x),H()}return T}Jt.exports=Z},53184:function(Jt,ot,B){"use strict";var I,be;function Re(_e,Z,v){var me=function(ie,l){return _e.js_beautify(ie,l)};return me.js=_e.js_beautify,me.css=Z.css_beautify,me.html=v.html_beautify,me.js_beautify=_e.js_beautify,me.css_beautify=Z.css_beautify,me.html_beautify=v.html_beautify,me}I=[B(58553),B(87804),B(40998)],be=function(_e,Z,v){return Re(_e,Z,v)}.apply(ot,I),be!==void 0&&(Jt.exports=be)},87804:function(Jt,ot){var B,I;(function(){var be;(function(){"use strict";var _e=[,,function(ie){function l(E){this.__parent=E,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=[]}l.prototype.clone_empty=function(){var E=new l(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},l.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},l.prototype.has_match=function(E){for(var x=this.__items.length-1;x>=0;x--)if(this.__items[x].match(E))return!0;return!1},l.prototype.set_indent=function(E,x){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=x||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(E){this.__items.push(E);var x=E.lastIndexOf(`
|
|
`);x!==-1?this.__character_count=E.length-x:this.__character_count+=E.length},l.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function H(E,x){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),x=x||"",E.indent_level>0&&(x=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=x,this.__base_string_length=x.length}H.prototype.get_indent_size=function(E,x){var T=this.__base_string_length;return x=x||0,E<0&&(T=0),T+=E*this.__indent_size,T+=x,T},H.prototype.get_indent_string=function(E,x){var T=this.__base_string;return x=x||0,E<0&&(E=0,T=""),x+=E*this.__indent_size,this.__ensure_cache(x),T+=this.__cache[x],T},H.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var E=this.__cache.length,x=0,T="";this.__indent_size&&E>=this.__indent_size&&(x=Math.floor(E/this.__indent_size),E-=x*this.__indent_size,T=new Array(x+1).join(this.__indent_string)),E&&(T+=new Array(E+1).join(" ")),this.__cache.push(T)};function F(E,x){this.__indent_cache=new H(E,x),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}F.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},F.prototype.get_line_number=function(){return this.__lines.length},F.prototype.get_indent_string=function(E,x){return this.__indent_cache.get_indent_string(E,x)},F.prototype.get_indent_size=function(E,x){return this.__indent_cache.get_indent_size(E,x)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(E){this.trim(!0);var x=this.current_line.pop();x&&(x[x.length-1]===`
|
|
`&&(x=x.replace(/\n+$/g,"")),this.current_line.push(x)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
|
|
`);return E!==`
|
|
`&&(T=T.replace(/[\n]/g,E)),T},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(E,x){return E=E||0,x=x||0,this.next_line.set_indent(E,x),this.__lines.length>1?(this.current_line.set_indent(E,x),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(E){for(var x=0;x<E.newlines;x++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},F.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(" "))},F.prototype.remove_indent=function(E){for(var x=this.__lines.length;E<x;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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},F.prototype.just_added_newline=function(){return this.current_line.is_empty()},F.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},F.prototype.ensure_empty_line_above=function(E,x){for(var T=this.__lines.length-2;T>=0;){var L=this.__lines[T];if(L.is_empty())break;if(L.item(0).indexOf(E)!==0&&L.item(-1)!==x){this.__lines.splice(T+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},ie.exports.Output=F},,,,function(ie){function l(E,x){this.raw_options=H(E,x),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"])}l.prototype._get_array=function(E,x){var T=this.raw_options[E],L=x||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(L=T.concat()):typeof T=="string"&&(L=T.split(/[^a-zA-Z0-9_\/\-]+/)),L},l.prototype._get_boolean=function(E,x){var T=this.raw_options[E],L=T===void 0?!!x:!!T;return L},l.prototype._get_characters=function(E,x){var T=this.raw_options[E],L=x||"";return typeof T=="string"&&(L=T.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),L},l.prototype._get_number=function(E,x){var T=this.raw_options[E];x=parseInt(x,10),isNaN(x)&&(x=0);var L=parseInt(T,10);return isNaN(L)&&(L=x),L},l.prototype._get_selection=function(E,x,T){var L=this._get_selection_list(E,x,T);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
`+x+`
|
|
You passed in: '`+this.raw_options[E]+"'");return L[0]},l.prototype._get_selection_list=function(E,x,T){if(!x||x.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[x[0]],!this._is_valid_selection(T,x))throw new Error("Invalid Default Value!");var L=this._get_array(E,T);if(!this._is_valid_selection(L,x))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
`+x+`
|
|
You passed in: '`+this.raw_options[E]+"'");return L},l.prototype._is_valid_selection=function(E,x){return E.length&&x.length&&!E.some(function(T){return x.indexOf(T)===-1})};function H(E,x){var T={};E=F(E);var L;for(L in E)L!==x&&(T[L]=E[L]);if(x&&E[x])for(L in E[x])T[L]=E[x][L];return T}function F(E){var x={},T;for(T in E){var L=T.replace(/-/g,"_");x[L]=E[T]}return x}ie.exports.Options=l,ie.exports.normalizeOpts=F,ie.exports.mergeOpts=H},,function(ie){var l=RegExp.prototype.hasOwnProperty("sticky");function H(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},H.prototype.peek=function(F){var E=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(E=this.__input.charAt(F)),E},H.prototype.__match=function(F,E){F.lastIndex=E;var x=F.exec(this.__input);return x&&!(l&&F.sticky)&&x.index!==E&&(x=null),x},H.prototype.test=function(F,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(F,E):!1},H.prototype.testChar=function(F,E){var x=this.peek(E);return F.lastIndex=0,x!==null&&F.test(x)},H.prototype.match=function(F){var E=this.__match(F,this.__position);return E?this.__position+=E[0].length:E=null,E},H.prototype.read=function(F,E,x){var T="",L;return F&&(L=this.match(F),L&&(T+=L[0])),E&&(L||!F)&&(T+=this.readUntil(E,x)),T},H.prototype.readUntil=function(F,E){var x="",T=this.__position;F.lastIndex=this.__position;var L=F.exec(this.__input);return L?(T=L.index,E&&(T+=L[0].length)):T=this.__input_length,x=this.__input.substring(this.__position,T),this.__position=T,x},H.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},H.prototype.get_regexp=function(F,E){var x=null,T="g";return E&&l&&(T="y"),typeof F=="string"&&F!==""?x=new RegExp(F,T):F&&(x=new RegExp(F.source,T)),x},H.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(F){var E=this.__position,x=this.readUntilAfter(F);return this.__position=E,x},H.prototype.lookBack=function(F){var E=this.__position-1;return E>=F.length&&this.__input.substring(E-F.length,E).toLowerCase()===F},ie.exports.InputScanner=H},,,,,function(ie){function l(H,F){H=typeof H=="string"?H:H.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+F,"g")}l.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(H);E;)F[E[1]]=E[2],E=this.__directive_pattern.exec(H);return F},l.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=l},,function(ie,l,H){var F=H(16).Beautifier,E=H(17).Options;function x(T,L){var q=new F(T,L);return q.beautify()}ie.exports=x,ie.exports.defaultOptions=function(){return new E}},function(ie,l,H){var F=H(17).Options,E=H(2).Output,x=H(8).InputScanner,T=H(13).Directives,L=new T(/\/\*/,/\*\//),q=/\r\n|[\r\n]/,Y=/\r\n|[\r\n]/g,$=/\s/,A=/(?:\s|\n)+/g,M=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,O=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function W(ge,De){this._source_text=ge||"",this._options=new F(De),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"]}W.prototype.eatString=function(ge){var De="";for(this._ch=this._input.next();this._ch;){if(De+=this._ch,this._ch==="\\")De+=this._input.next();else if(ge.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return De},W.prototype.eatWhitespace=function(ge){for(var De=$.test(this._input.peek()),he=0;$.test(this._input.peek());)this._ch=this._input.next(),ge&&this._ch===`
|
|
`&&(he===0||he<this._options.max_preserve_newlines)&&(he++,this._output.add_new_line(!0));return De},W.prototype.foundNestedPseudoClass=function(){for(var ge=0,De=1,he=this._input.peek(De);he;){if(he==="{")return!0;if(he==="(")ge+=1;else if(he===")"){if(ge===0)return!1;ge-=1}else if(he===";"||he==="}")return!1;De++,he=this._input.peek(De)}return!1},W.prototype.print_string=function(ge){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(ge)},W.prototype.preserveSingleSpace=function(ge){ge&&(this._output.space_before_token=!0)},W.prototype.indent=function(){this._indentLevel++},W.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},W.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ge=this._source_text,De=this._options.eol;De==="auto"&&(De=`
|
|
`,ge&&q.test(ge||"")&&(De=ge.match(q)[0])),ge=ge.replace(Y,`
|
|
`);var he=ge.match(/^[\t ]*/)[0];this._output=new E(this._options,he),this._input=new x(ge),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Me=0,Fe=!1,ke=!1,ct=!1,ae=!1,j=!1,ee=this._ch,ne=!1,oe,re,b;oe=this._input.read(A),re=oe!=="",b=ee,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ee=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var S=this._input.read(M),V=L.get_directives(S);V&&V.ignore==="start"&&(S+=L.readIgnored(this._input)),this.print_string(S),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(O)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(re),this.print_string(this._ch);var ve=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ve.match(/[ :]$/)&&(ve=this.eatString(": ").replace(/\s+$/,""),this.print_string(ve),this._output.space_before_token=!0),Me===0&&ve.indexOf(":")!==-1&&(ke=!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 He=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);He.match(/[ :]$/)&&(He=this.eatString(": ").replace(/\s+$/,""),this.print_string(He),this._output.space_before_token=!0),Me===0&&He.indexOf(":")!==-1?(ke=!0,this.indent()):He in this.NESTED_AT_RULE?(this._nestedLevel+=1,He in this.CONDITIONAL_GROUP_RULE&&(ct=!0)):Me===0&&!ke&&(ae=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(re),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ke&&(ke=!1,this.outdent()),ae=!1,ct?(ct=!1,Fe=this._indentLevel>=this._nestedLevel):Fe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Fe&&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)):(b==="("?this._output.space_before_token=!1:b!==","&&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(),b==="{"&&this._output.trim(!0),ke&&(this.outdent(),ke=!1),this.print_string(this._ch),Fe=!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 st=0;st<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;st++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[st])){ne=!0;break}(Fe||ct)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ae&&Me===0?(this.print_string(":"),ke||(ke=!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 tt=b==='"'||b==="'";this.preserveSingleSpace(tt||re),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ne=!1,Me===0?(ke&&(this.outdent(),ke=!1),ae=!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(),Me++,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(")")),Me&&(Me--,this.outdent()));else{var Xe=!1;this._input.lookBack("with")&&(Xe=!0),this.preserveSingleSpace(re||Xe),this.print_string(this._ch),ke&&b==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),j=!0):(this.eatWhitespace(),Me++,this.indent())}else if(this._ch===")")Me&&(Me--,this.outdent()),j&&this._input.peek()===";"&&this._options.selector_separator_newline&&(j=!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&&(!ke||j)&&Me===0&&!ae?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ke&&Me===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&&$.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("="),$.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 xt=b==='"'||b==="'";this.preserveSingleSpace(xt||re),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&ne&&this._output.add_new_line()}var et=this._output.get_code(De);return et},ie.exports.Beautifier=W},function(ie,l,H){var F=H(6).Options;function E(x){F.call(this,x,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var T=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||T;var L=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var q=0;q<L.length;q++)L[q]!=="expand"?this.brace_style="collapse":this.brace_style=L[q]}E.prototype=new F,ie.exports.Options=E}],Z={};function v(ie){var l=Z[ie];if(l!==void 0)return l.exports;var H=Z[ie]={exports:{}};return _e[ie](H,H.exports,v),H.exports}var me=v(15);be=me})();var Re=be;B=[],I=function(){return{css_beautify:Re}}.apply(ot,B),I!==void 0&&(Jt.exports=I)})()},40998:function(Jt,ot,B){var I,be;(function(){var Re;(function(){"use strict";var me=[,,function(F){function E(L){this.__parent=L,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=[]}E.prototype.clone_empty=function(){var L=new E(this.__parent);return L.set_indent(this.__indent_count,this.__alignment_count),L},E.prototype.item=function(L){return L<0?this.__items[this.__items.length+L]:this.__items[L]},E.prototype.has_match=function(L){for(var q=this.__items.length-1;q>=0;q--)if(this.__items[q].match(L))return!0;return!1},E.prototype.set_indent=function(L,q){this.is_empty()&&(this.__indent_count=L||0,this.__alignment_count=q||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.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)},E.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},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var L=this.__parent.current_line;return L.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),L.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),L.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,L.__items[0]===" "&&(L.__items.splice(0,1),L.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(L){this.__items.push(L);var q=L.lastIndexOf(`
|
|
`);q!==-1?this.__character_count=L.length-q:this.__character_count+=L.length},E.prototype.pop=function(){var L=null;return this.is_empty()||(L=this.__items.pop(),this.__character_count-=L.length),L},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var L="";return this.is_empty()?this.__parent.indent_empty_lines&&(L=this.__parent.get_indent_string(this.__indent_count)):(L=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),L+=this.__items.join("")),L};function x(L,q){this.__cache=[""],this.__indent_size=L.indent_size,this.__indent_string=L.indent_char,L.indent_with_tabs||(this.__indent_string=new Array(L.indent_size+1).join(L.indent_char)),q=q||"",L.indent_level>0&&(q=new Array(L.indent_level+1).join(this.__indent_string)),this.__base_string=q,this.__base_string_length=q.length}x.prototype.get_indent_size=function(L,q){var Y=this.__base_string_length;return q=q||0,L<0&&(Y=0),Y+=L*this.__indent_size,Y+=q,Y},x.prototype.get_indent_string=function(L,q){var Y=this.__base_string;return q=q||0,L<0&&(L=0,Y=""),q+=L*this.__indent_size,this.__ensure_cache(q),Y+=this.__cache[q],Y},x.prototype.__ensure_cache=function(L){for(;L>=this.__cache.length;)this.__add_column()},x.prototype.__add_column=function(){var L=this.__cache.length,q=0,Y="";this.__indent_size&&L>=this.__indent_size&&(q=Math.floor(L/this.__indent_size),L-=q*this.__indent_size,Y=new Array(q+1).join(this.__indent_string)),L&&(Y+=new Array(L+1).join(" ")),this.__cache.push(Y)};function T(L,q){this.__indent_cache=new x(L,q),this.raw=!1,this._end_with_newline=L.end_with_newline,this.indent_size=L.indent_size,this.wrap_line_length=L.wrap_line_length,this.indent_empty_lines=L.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}T.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},T.prototype.get_line_number=function(){return this.__lines.length},T.prototype.get_indent_string=function(L,q){return this.__indent_cache.get_indent_string(L,q)},T.prototype.get_indent_size=function(L,q){return this.__indent_cache.get_indent_size(L,q)},T.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},T.prototype.add_new_line=function(L){return this.is_empty()||!L&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},T.prototype.get_code=function(L){this.trim(!0);var q=this.current_line.pop();q&&(q[q.length-1]===`
|
|
`&&(q=q.replace(/\n+$/g,"")),this.current_line.push(q)),this._end_with_newline&&this.__add_outputline();var Y=this.__lines.join(`
|
|
`);return L!==`
|
|
`&&(Y=Y.replace(/[\n]/g,L)),Y},T.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},T.prototype.set_indent=function(L,q){return L=L||0,q=q||0,this.next_line.set_indent(L,q),this.__lines.length>1?(this.current_line.set_indent(L,q),!0):(this.current_line.set_indent(),!1)},T.prototype.add_raw_token=function(L){for(var q=0;q<L.newlines;q++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(L.whitespace_before),this.current_line.push(L.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},T.prototype.add_token=function(L){this.__add_space_before_token(),this.current_line.push(L),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},T.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(" "))},T.prototype.remove_indent=function(L){for(var q=this.__lines.length;L<q;)this.__lines[L]._remove_indent(),L++;this.current_line._remove_wrap_indent()},T.prototype.trim=function(L){for(L=L===void 0?!1:L,this.current_line.trim();L&&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},T.prototype.just_added_newline=function(){return this.current_line.is_empty()},T.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},T.prototype.ensure_empty_line_above=function(L,q){for(var Y=this.__lines.length-2;Y>=0;){var $=this.__lines[Y];if($.is_empty())break;if($.item(0).indexOf(L)!==0&&$.item(-1)!==q){this.__lines.splice(Y+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}Y--}},F.exports.Output=T},function(F){function E(x,T,L,q){this.type=x,this.text=T,this.comments_before=null,this.newlines=L||0,this.whitespace_before=q||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}F.exports.Token=E},,,function(F){function E(L,q){this.raw_options=x(L,q),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"])}E.prototype._get_array=function(L,q){var Y=this.raw_options[L],$=q||[];return typeof Y=="object"?Y!==null&&typeof Y.concat=="function"&&($=Y.concat()):typeof Y=="string"&&($=Y.split(/[^a-zA-Z0-9_\/\-]+/)),$},E.prototype._get_boolean=function(L,q){var Y=this.raw_options[L],$=Y===void 0?!!q:!!Y;return $},E.prototype._get_characters=function(L,q){var Y=this.raw_options[L],$=q||"";return typeof Y=="string"&&($=Y.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),$},E.prototype._get_number=function(L,q){var Y=this.raw_options[L];q=parseInt(q,10),isNaN(q)&&(q=0);var $=parseInt(Y,10);return isNaN($)&&($=q),$},E.prototype._get_selection=function(L,q,Y){var $=this._get_selection_list(L,q,Y);if($.length!==1)throw new Error("Invalid Option Value: The option '"+L+`' can only be one of the following values:
|
|
`+q+`
|
|
You passed in: '`+this.raw_options[L]+"'");return $[0]},E.prototype._get_selection_list=function(L,q,Y){if(!q||q.length===0)throw new Error("Selection list cannot be empty.");if(Y=Y||[q[0]],!this._is_valid_selection(Y,q))throw new Error("Invalid Default Value!");var $=this._get_array(L,Y);if(!this._is_valid_selection($,q))throw new Error("Invalid Option Value: The option '"+L+`' can contain only the following values:
|
|
`+q+`
|
|
You passed in: '`+this.raw_options[L]+"'");return $},E.prototype._is_valid_selection=function(L,q){return L.length&&q.length&&!L.some(function(Y){return q.indexOf(Y)===-1})};function x(L,q){var Y={};L=T(L);var $;for($ in L)$!==q&&(Y[$]=L[$]);if(q&&L[q])for($ in L[q])Y[$]=L[q][$];return Y}function T(L){var q={},Y;for(Y in L){var $=Y.replace(/-/g,"_");q[$]=L[Y]}return q}F.exports.Options=E,F.exports.normalizeOpts=T,F.exports.mergeOpts=x},,function(F){var E=RegExp.prototype.hasOwnProperty("sticky");function x(T){this.__input=T||"",this.__input_length=this.__input.length,this.__position=0}x.prototype.restart=function(){this.__position=0},x.prototype.back=function(){this.__position>0&&(this.__position-=1)},x.prototype.hasNext=function(){return this.__position<this.__input_length},x.prototype.next=function(){var T=null;return this.hasNext()&&(T=this.__input.charAt(this.__position),this.__position+=1),T},x.prototype.peek=function(T){var L=null;return T=T||0,T+=this.__position,T>=0&&T<this.__input_length&&(L=this.__input.charAt(T)),L},x.prototype.__match=function(T,L){T.lastIndex=L;var q=T.exec(this.__input);return q&&!(E&&T.sticky)&&q.index!==L&&(q=null),q},x.prototype.test=function(T,L){return L=L||0,L+=this.__position,L>=0&&L<this.__input_length?!!this.__match(T,L):!1},x.prototype.testChar=function(T,L){var q=this.peek(L);return T.lastIndex=0,q!==null&&T.test(q)},x.prototype.match=function(T){var L=this.__match(T,this.__position);return L?this.__position+=L[0].length:L=null,L},x.prototype.read=function(T,L,q){var Y="",$;return T&&($=this.match(T),$&&(Y+=$[0])),L&&($||!T)&&(Y+=this.readUntil(L,q)),Y},x.prototype.readUntil=function(T,L){var q="",Y=this.__position;T.lastIndex=this.__position;var $=T.exec(this.__input);return $?(Y=$.index,L&&(Y+=$[0].length)):Y=this.__input_length,q=this.__input.substring(this.__position,Y),this.__position=Y,q},x.prototype.readUntilAfter=function(T){return this.readUntil(T,!0)},x.prototype.get_regexp=function(T,L){var q=null,Y="g";return L&&E&&(Y="y"),typeof T=="string"&&T!==""?q=new RegExp(T,Y):T&&(q=new RegExp(T.source,Y)),q},x.prototype.get_literal_regexp=function(T){return RegExp(T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},x.prototype.peekUntilAfter=function(T){var L=this.__position,q=this.readUntilAfter(T);return this.__position=L,q},x.prototype.lookBack=function(T){var L=this.__position-1;return L>=T.length&&this.__input.substring(L-T.length,L).toLowerCase()===T},F.exports.InputScanner=x},function(F,E,x){var T=x(8).InputScanner,L=x(3).Token,q=x(10).TokenStream,Y=x(11).WhitespacePattern,$={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},A=function(M,O){this._input=new T(M),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Y(this._input)};A.prototype.tokenize=function(){this._input.restart(),this.__tokens=new q,this._reset();for(var M,O=new L($.START,""),W=null,ge=[],De=new q;O.type!==$.EOF;){for(M=this._get_next_token(O,W);this._is_comment(M);)De.add(M),M=this._get_next_token(O,W);De.isEmpty()||(M.comments_before=De,De=new q),M.parent=W,this._is_opening(M)?(ge.push(W),W=M):W&&this._is_closing(M,W)&&(M.opened=W,W.closed=M,W=ge.pop(),M.parent=W),M.previous=O,O.next=M,this.__tokens.add(M),O=M}return this.__tokens},A.prototype._is_first_token=function(){return this.__tokens.isEmpty()},A.prototype._reset=function(){},A.prototype._get_next_token=function(M,O){this._readWhitespace();var W=this._input.read(/.+/g);return W?this._create_token($.RAW,W):this._create_token($.EOF,"")},A.prototype._is_comment=function(M){return!1},A.prototype._is_opening=function(M){return!1},A.prototype._is_closing=function(M,O){return!1},A.prototype._create_token=function(M,O){var W=new L(M,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return W},A.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},F.exports.Tokenizer=A,F.exports.TOKEN=$},function(F){function E(x){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=x}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__tokens[this.__position],this.__position+=1),x},E.prototype.peek=function(x){var T=null;return x=x||0,x+=this.__position,x>=0&&x<this.__tokens_length&&(T=this.__tokens[x]),T},E.prototype.add=function(x){this.__parent_token&&(x.parent=this.__parent_token),this.__tokens.push(x),this.__tokens_length+=1},F.exports.TokenStream=E},function(F,E,x){var T=x(12).Pattern;function L(q,Y){T.call(this,q,Y),Y?this._line_regexp=this._input.get_regexp(Y._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}L.prototype=new T,L.prototype.__set_whitespace_patterns=function(q,Y){q+="\\t ",Y+="\\n\\r",this._match_pattern=this._input.get_regexp("["+q+Y+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+Y+"]")},L.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var q=this._input.read(this._match_pattern);if(q===" ")this.whitespace_before_token=" ";else if(q){var Y=this.__split(this._newline_regexp,q);this.newline_count=Y.length-1,this.whitespace_before_token=Y[this.newline_count]}return q},L.prototype.matching=function(q,Y){var $=this._create();return $.__set_whitespace_patterns(q,Y),$._update(),$},L.prototype._create=function(){return new L(this._input,this)},L.prototype.__split=function(q,Y){q.lastIndex=0;for(var $=0,A=[],M=q.exec(Y);M;)A.push(Y.substring($,M.index)),$=M.index+M[0].length,M=q.exec(Y);return $<Y.length?A.push(Y.substring($,Y.length)):A.push(""),A},F.exports.WhitespacePattern=L},function(F){function E(x,T){this._input=x,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,T&&(this._starting_pattern=this._input.get_regexp(T._starting_pattern,!0),this._match_pattern=this._input.get_regexp(T._match_pattern,!0),this._until_pattern=this._input.get_regexp(T._until_pattern),this._until_after=T._until_after)}E.prototype.read=function(){var x=this._input.read(this._starting_pattern);return(!this._starting_pattern||x)&&(x+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),x},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(x){var T=this._create();return T._until_after=!0,T._until_pattern=this._input.get_regexp(x),T._update(),T},E.prototype.until=function(x){var T=this._create();return T._until_after=!1,T._until_pattern=this._input.get_regexp(x),T._update(),T},E.prototype.starting_with=function(x){var T=this._create();return T._starting_pattern=this._input.get_regexp(x,!0),T._update(),T},E.prototype.matching=function(x){var T=this._create();return T._match_pattern=this._input.get_regexp(x,!0),T._update(),T},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},F.exports.Pattern=E},function(F){function E(x,T){x=typeof x=="string"?x:x.source,T=typeof T=="string"?T:T.source,this.__directives_block_pattern=new RegExp(x+/ beautify( \w+[:]\w+)+ /.source+T,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(x+/\sbeautify\signore:end\s/.source+T,"g")}E.prototype.get_directives=function(x){if(!x.match(this.__directives_block_pattern))return null;var T={};this.__directive_pattern.lastIndex=0;for(var L=this.__directive_pattern.exec(x);L;)T[L[1]]=L[2],L=this.__directive_pattern.exec(x);return T},E.prototype.readIgnored=function(x){return x.readUntilAfter(this.__directives_end_ignore_pattern)},F.exports.Directives=E},function(F,E,x){var T=x(12).Pattern,L={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function q(Y,$){T.call(this,Y,$),this.__template_pattern=null,this._disabled=Object.assign({},L),this._excluded=Object.assign({},L),$&&(this.__template_pattern=this._input.get_regexp($.__template_pattern),this._excluded=Object.assign(this._excluded,$._excluded),this._disabled=Object.assign(this._disabled,$._disabled));var A=new T(Y);this.__patterns={handlebars_comment:A.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:A.starting_with(/{{{/).until_after(/}}}/),handlebars:A.starting_with(/{{/).until_after(/}}/),php:A.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:A.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:A.starting_with(/{%/).until_after(/%}/),django_value:A.starting_with(/{{/).until_after(/}}/),django_comment:A.starting_with(/{#/).until_after(/#}/),smarty:A.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:A.starting_with(/{\*/).until_after(/\*}/),smarty_literal:A.starting_with(/{literal}/).until_after(/{\/literal}/)}}q.prototype=new T,q.prototype._create=function(){return new q(this._input,this)},q.prototype._update=function(){this.__set_templated_pattern()},q.prototype.disable=function(Y){var $=this._create();return $._disabled[Y]=!0,$._update(),$},q.prototype.read_options=function(Y){var $=this._create();for(var A in L)$._disabled[A]=Y.templating.indexOf(A)===-1;return $._update(),$},q.prototype.exclude=function(Y){var $=this._create();return $._excluded[Y]=!0,$._update(),$},q.prototype.read=function(){var Y="";this._match_pattern?Y=this._input.read(this._starting_pattern):Y=this._input.read(this._starting_pattern,this.__template_pattern);for(var $=this._read_template();$;)this._match_pattern?$+=this._input.read(this._match_pattern):$+=this._input.readUntil(this.__template_pattern),Y+=$,$=this._read_template();return this._until_after&&(Y+=this._input.readUntilAfter(this._until_pattern)),Y},q.prototype.__set_templated_pattern=function(){var Y=[];this._disabled.php||Y.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||Y.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||Y.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||Y.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(Y.push(this.__patterns.django._starting_pattern.source),Y.push(this.__patterns.django_value._starting_pattern.source),Y.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||Y.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&Y.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+Y.join("|")+")")},q.prototype._read_template=function(){var Y="",$=this._input.peek();if($==="<"){var A=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&A==="?"&&(Y=Y||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&A==="%"&&(Y=Y||this.__patterns.erb.read())}else $==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(Y=Y||this.__patterns.handlebars_comment.read(),Y=Y||this.__patterns.handlebars_unescaped.read(),Y=Y||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(Y=Y||this.__patterns.django_value.read()),this._excluded.django||(Y=Y||this.__patterns.django_comment.read(),Y=Y||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(Y=Y||this.__patterns.smarty_comment.read(),Y=Y||this.__patterns.smarty_literal.read(),Y=Y||this.__patterns.smarty.read()));return Y},F.exports.TemplatablePattern=q},,,,function(F,E,x){var T=x(19).Beautifier,L=x(20).Options;function q(Y,$,A,M){var O=new T(Y,$,A,M);return O.beautify()}F.exports=q,F.exports.defaultOptions=function(){return new L}},function(F,E,x){var T=x(20).Options,L=x(2).Output,q=x(21).Tokenizer,Y=x(21).TOKEN,$=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,M=function(ae,j){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ae.max_preserve_newlines,this.preserve_newlines=ae.preserve_newlines,this._output=new L(ae,j)};M.prototype.current_line_has_match=function(ae){return this._output.current_line.has_match(ae)},M.prototype.set_space_before_token=function(ae,j){this._output.space_before_token=ae,this._output.non_breaking_space=j},M.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},M.prototype.add_raw_token=function(ae){this._output.add_raw_token(ae)},M.prototype.print_preserved_newlines=function(ae){var j=0;ae.type!==Y.TEXT&&ae.previous.type!==Y.TEXT&&(j=ae.newlines?1:0),this.preserve_newlines&&(j=ae.newlines<this.max_preserve_newlines+1?ae.newlines:this.max_preserve_newlines+1);for(var ee=0;ee<j;ee++)this.print_newline(ee>0);return j!==0},M.prototype.traverse_whitespace=function(ae){return ae.whitespace_before||ae.newlines?(this.print_preserved_newlines(ae)||(this._output.space_before_token=!0),!0):!1},M.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},M.prototype.print_newline=function(ae){this._output.add_new_line(ae)},M.prototype.print_token=function(ae){ae.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ae.text))},M.prototype.indent=function(){this.indent_level++},M.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},M.prototype.get_full_indent=function(ae){return ae=this.indent_level+(ae||0),ae<1?"":this._output.get_indent_string(ae)};var O=function(ae){for(var j=null,ee=ae.next;ee.type!==Y.EOF&&ae.closed!==ee;){if(ee.type===Y.ATTRIBUTE&&ee.text==="type"){ee.next&&ee.next.type===Y.EQUALS&&ee.next.next&&ee.next.next.type===Y.VALUE&&(j=ee.next.next.text);break}ee=ee.next}return j},W=function(ae,j){var ee=null,ne=null;return j.closed?(ae==="script"?ee="text/javascript":ae==="style"&&(ee="text/css"),ee=O(j)||ee,ee.search("text/css")>-1?ne="css":ee.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ne="javascript":ee.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ne="html":ee.search(/test\/null/)>-1&&(ne="null"),ne):null};function ge(ae,j){return j.indexOf(ae)!==-1}function De(ae,j,ee){this.parent=ae||null,this.tag=j?j.tag_name:"",this.indent_level=ee||0,this.parser_token=j||null}function he(ae){this._printer=ae,this._current_frame=null}he.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},he.prototype.record_tag=function(ae){var j=new De(this._current_frame,ae,this._printer.indent_level);this._current_frame=j},he.prototype._try_pop_frame=function(ae){var j=null;return ae&&(j=ae.parser_token,this._printer.indent_level=ae.indent_level,this._current_frame=ae.parent),j},he.prototype._get_frame=function(ae,j){for(var ee=this._current_frame;ee&&ae.indexOf(ee.tag)===-1;){if(j&&j.indexOf(ee.tag)!==-1){ee=null;break}ee=ee.parent}return ee},he.prototype.try_pop=function(ae,j){var ee=this._get_frame([ae],j);return this._try_pop_frame(ee)},he.prototype.indent_to_tag=function(ae){var j=this._get_frame(ae);j&&(this._printer.indent_level=j.indent_level)};function Me(ae,j,ee,ne){this._source_text=ae||"",j=j||{},this._js_beautify=ee,this._css_beautify=ne,this._tag_stack=null;var oe=new T(j,"html");this._options=oe,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"}Me.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ae=this._source_text,j=this._options.eol;this._options.eol==="auto"&&(j=`
|
|
`,ae&&$.test(ae)&&(j=ae.match($)[0])),ae=ae.replace(A,`
|
|
`);var ee=ae.match(/^[\t ]*/)[0],ne={text:"",type:""},oe=new Fe(this._options),re=new M(this._options,ee),b=new q(ae,this._options).tokenize();this._tag_stack=new he(re);for(var S=null,V=b.next();V.type!==Y.EOF;)V.type===Y.TAG_OPEN||V.type===Y.COMMENT?(S=this._handle_tag_open(re,V,oe,ne,b),oe=S):V.type===Y.ATTRIBUTE||V.type===Y.EQUALS||V.type===Y.VALUE||V.type===Y.TEXT&&!oe.tag_complete?S=this._handle_inside_tag(re,V,oe,ne):V.type===Y.TAG_CLOSE?S=this._handle_tag_close(re,V,oe):V.type===Y.TEXT?S=this._handle_text(re,V,oe):V.type===Y.CONTROL_FLOW_OPEN?S=this._handle_control_flow_open(re,V):V.type===Y.CONTROL_FLOW_CLOSE?S=this._handle_control_flow_close(re,V):re.add_raw_token(V),ne=S,V=b.next();var ve=re._output.get_code(j);return ve},Me.prototype._handle_control_flow_open=function(ae,j){var ee={text:j.text,type:j.type};return ae.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),j.newlines?ae.print_preserved_newlines(j):ae.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ae.print_token(j),ae.indent(),ee},Me.prototype._handle_control_flow_close=function(ae,j){var ee={text:j.text,type:j.type};return ae.deindent(),j.newlines?ae.print_preserved_newlines(j):ae.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ae.print_token(j),ee},Me.prototype._handle_tag_close=function(ae,j,ee){var ne={text:j.text,type:j.type};return ae.alignment_size=0,ee.tag_complete=!0,ae.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ee.is_unformatted?ae.add_raw_token(j):(ee.tag_start_char==="<"&&(ae.set_space_before_token(j.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&ee.has_wrapped_attrs&&ae.print_newline(!1)),ae.print_token(j)),ee.indent_content&&!(ee.is_unformatted||ee.is_content_unformatted)&&(ae.indent(),ee.indent_content=!1),!ee.is_inline_element&&!(ee.is_unformatted||ee.is_content_unformatted)&&ae.set_wrap_point(),ne},Me.prototype._handle_inside_tag=function(ae,j,ee,ne){var oe=ee.has_wrapped_attrs,re={text:j.text,type:j.type};return ae.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),ee.is_unformatted?ae.add_raw_token(j):ee.tag_start_char==="{"&&j.type===Y.TEXT?ae.print_preserved_newlines(j)?(j.newlines=0,ae.add_raw_token(j)):ae.print_token(j):(j.type===Y.ATTRIBUTE?ae.set_space_before_token(!0):(j.type===Y.EQUALS||j.type===Y.VALUE&&j.previous.type===Y.EQUALS)&&ae.set_space_before_token(!1),j.type===Y.ATTRIBUTE&&ee.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ae.traverse_whitespace(j),oe=oe||j.newlines!==0),this._is_wrap_attributes_force&&ee.attr_count>=this._options.wrap_attributes_min_attrs&&(ne.type!==Y.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ae.print_newline(!1),oe=!0)),ae.print_token(j),oe=oe||ae.previous_token_wrapped(),ee.has_wrapped_attrs=oe),re},Me.prototype._handle_text=function(ae,j,ee){var ne={text:j.text,type:"TK_CONTENT"};return ee.custom_beautifier_name?this._print_custom_beatifier_text(ae,j,ee):ee.is_unformatted||ee.is_content_unformatted?ae.add_raw_token(j):(ae.traverse_whitespace(j),ae.print_token(j)),ne},Me.prototype._print_custom_beatifier_text=function(ae,j,ee){var ne=this;if(j.text!==""){var oe=j.text,re,b=1,S="",V="";ee.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?re=this._js_beautify:ee.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?re=this._css_beautify:ee.custom_beautifier_name==="html"&&(re=function(xt,et){var Ue=new Me(xt,et,ne._js_beautify,ne._css_beautify);return Ue.beautify()}),this._options.indent_scripts==="keep"?b=0:this._options.indent_scripts==="separate"&&(b=-ae.indent_level);var ve=ae.get_full_indent(b);if(oe=oe.replace(/\n[ \t]*$/,""),ee.custom_beautifier_name!=="html"&&oe[0]==="<"&&oe.match(/^(<!--|<!\[CDATA\[)/)){var He=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(oe);if(!He){ae.add_raw_token(j);return}S=ve+He[1]+`
|
|
`,oe=He[4],He[5]&&(V=ve+He[5]),oe=oe.replace(/\n[ \t]*$/,""),(He[2]||He[3].indexOf(`
|
|
`)!==-1)&&(He=He[3].match(/[ \t]+$/),He&&(j.whitespace_before=He[0]))}if(oe)if(re){var st=function(){this.eol=`
|
|
`};st.prototype=this._options.raw_options;var tt=new st;oe=re(ve+oe,tt)}else{var Xe=j.whitespace_before;Xe&&(oe=oe.replace(new RegExp(`
|
|
(`+Xe+")?","g"),`
|
|
`)),oe=ve+oe.replace(/\n/g,`
|
|
`+ve)}S&&(oe?oe=S+oe+`
|
|
`+V:oe=S+V),ae.print_newline(!1),oe&&(j.text=oe,j.whitespace_before="",j.newlines=0,ae.add_raw_token(j),ae.print_newline(!0))}},Me.prototype._handle_tag_open=function(ae,j,ee,ne,oe){var re=this._get_tag_open_token(j);if((ee.is_unformatted||ee.is_content_unformatted)&&!ee.is_empty_element&&j.type===Y.TAG_OPEN&&!re.is_start_tag?(ae.add_raw_token(j),re.start_tag_token=this._tag_stack.try_pop(re.tag_name)):(ae.traverse_whitespace(j),this._set_tag_position(ae,j,re,ee,ne),re.is_inline_element||ae.set_wrap_point(),ae.print_token(j)),re.is_start_tag&&this._is_wrap_attributes_force){var b=0,S;do S=oe.peek(b),S.type===Y.ATTRIBUTE&&(re.attr_count+=1),b+=1;while(S.type!==Y.EOF&&S.type!==Y.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(re.alignment_size=j.text.length+1),!re.tag_complete&&!re.is_unformatted&&(ae.alignment_size=re.alignment_size),re};var Fe=function(ae,j,ee){if(this.parent=j||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="",!ee)this.tag_complete=!0;else{var ne;this.tag_start_char=ee.text[0],this.text=ee.text,this.tag_start_char==="<"?(ne=ee.text.match(/^<([^\s>]*)/),this.tag_check=ne?ne[1]:""):(ne=ee.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ne?ne[1]:"",(ee.text.startsWith("{{#>")||ee.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&ee.next!==null?this.tag_check=ee.next.text.split(" ")[0]:this.tag_check=ee.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),ee.type===Y.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||ee.closed&&ee.closed.text==="/>";var oe=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(oe=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ae.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(oe)))}};Me.prototype._get_tag_open_token=function(ae){var j=new Fe(this._options,this._tag_stack.get_parser_token(),ae);return j.alignment_size=this._options.wrap_attributes_indent_size,j.is_end_tag=j.is_end_tag||ge(j.tag_check,this._options.void_elements),j.is_empty_element=j.tag_complete||j.is_start_tag&&j.is_end_tag,j.is_unformatted=!j.tag_complete&&ge(j.tag_check,this._options.unformatted),j.is_content_unformatted=!j.is_empty_element&&ge(j.tag_check,this._options.content_unformatted),j.is_inline_element=ge(j.tag_name,this._options.inline)||this._options.inline_custom_elements&&j.tag_name.includes("-")||j.tag_start_char==="{",j},Me.prototype._set_tag_position=function(ae,j,ee,ne,oe){if(ee.is_empty_element||(ee.is_end_tag?ee.start_tag_token=this._tag_stack.try_pop(ee.tag_name):(this._do_optional_end_element(ee)&&(ee.is_inline_element||ae.print_newline(!1)),this._tag_stack.record_tag(ee),(ee.tag_name==="script"||ee.tag_name==="style")&&!(ee.is_unformatted||ee.is_content_unformatted)&&(ee.custom_beautifier_name=W(ee.tag_check,j)))),ge(ee.tag_check,this._options.extra_liners)&&(ae.print_newline(!1),ae._output.just_added_blankline()||ae.print_newline(!0)),ee.is_empty_element){if(ee.tag_start_char==="{"&&ee.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),ee.indent_content=!0;var re=ae.current_line_has_match(/{{#if/);re||ae.print_newline(!1)}ee.tag_name==="!--"&&oe.type===Y.TAG_CLOSE&&ne.is_end_tag&&ee.text.indexOf(`
|
|
`)===-1||(ee.is_inline_element||ee.is_unformatted||ae.print_newline(!1),this._calcluate_parent_multiline(ae,ee))}else if(ee.is_end_tag){var b=!1;b=ee.start_tag_token&&ee.start_tag_token.multiline_content,b=b||!ee.is_inline_element&&!(ne.is_inline_element||ne.is_unformatted)&&!(oe.type===Y.TAG_CLOSE&&ee.start_tag_token===ne)&&oe.type!=="TK_CONTENT",(ee.is_content_unformatted||ee.is_unformatted)&&(b=!1),b&&ae.print_newline(!1)}else ee.indent_content=!ee.custom_beautifier_name,ee.tag_start_char==="<"&&(ee.tag_name==="html"?ee.indent_content=this._options.indent_inner_html:ee.tag_name==="head"?ee.indent_content=this._options.indent_head_inner_html:ee.tag_name==="body"&&(ee.indent_content=this._options.indent_body_inner_html)),!(ee.is_inline_element||ee.is_unformatted)&&(oe.type!=="TK_CONTENT"||ee.is_content_unformatted)&&ae.print_newline(!1),this._calcluate_parent_multiline(ae,ee)},Me.prototype._calcluate_parent_multiline=function(ae,j){j.parent&&ae._output.just_added_newline()&&!((j.is_inline_element||j.is_unformatted)&&j.parent.is_inline_element)&&(j.parent.multiline_content=!0)};var ke=["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"],ct=["a","audio","del","ins","map","noscript","video"];Me.prototype._do_optional_end_element=function(ae){var j=null;if(!(ae.is_empty_element||!ae.is_start_tag||!ae.parent)){if(ae.tag_name==="body")j=j||this._tag_stack.try_pop("head");else if(ae.tag_name==="li")j=j||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ae.tag_name==="dd"||ae.tag_name==="dt")j=j||this._tag_stack.try_pop("dt",["dl"]),j=j||this._tag_stack.try_pop("dd",["dl"]);else if(ae.parent.tag_name==="p"&&ke.indexOf(ae.tag_name)!==-1){var ee=ae.parent.parent;(!ee||ct.indexOf(ee.tag_name)===-1)&&(j=j||this._tag_stack.try_pop("p"))}else ae.tag_name==="rp"||ae.tag_name==="rt"?(j=j||this._tag_stack.try_pop("rt",["ruby","rtc"]),j=j||this._tag_stack.try_pop("rp",["ruby","rtc"])):ae.tag_name==="optgroup"?j=j||this._tag_stack.try_pop("optgroup",["select"]):ae.tag_name==="option"?j=j||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ae.tag_name==="colgroup"?j=j||this._tag_stack.try_pop("caption",["table"]):ae.tag_name==="thead"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"])):ae.tag_name==="tbody"||ae.tag_name==="tfoot"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("thead",["table"]),j=j||this._tag_stack.try_pop("tbody",["table"])):ae.tag_name==="tr"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ae.tag_name==="th"||ae.tag_name==="td")&&(j=j||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),j=j||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ae.parent=this._tag_stack.get_parser_token(),j}},F.exports.Beautifier=Me},function(F,E,x){var T=x(6).Options;function L(q){T.call(this,q,"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"])}L.prototype=new T,F.exports.Options=L},function(F,E,x){var T=x(9).Tokenizer,L=x(9).TOKEN,q=x(13).Directives,Y=x(14).TemplatablePattern,$=x(12).Pattern,A={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:L.START,RAW:L.RAW,EOF:L.EOF},M=new q(/<\!--/,/-->/),O=function(W,ge){T.call(this,W,ge),this._current_tag_name="";var De=new Y(this._input).read_options(this._options),he=new $(this._input);if(this.__patterns={word:De.until(/[\n\r\t <]/),word_control_flow_close_excluded:De.until(/[\n\r\t <}]/),single_quote:De.until_after(/'/),double_quote:De.until_after(/"/),attribute:De.until(/[\n\r\t =>]|\/>/),element_name:De.until(/[\n\r\t >\/]/),angular_control_flow_start:he.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:he.starting_with(/{{!--/).until_after(/--}}/),handlebars:he.starting_with(/{{/).until_after(/}}/),handlebars_open:he.until(/[\n\r\t }]/),handlebars_raw_close:he.until(/}}/),comment:he.starting_with(/<!--/).until_after(/-->/),cdata:he.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:he.starting_with(/<!\[/).until_after(/]>/),processing:he.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 Me=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=he.matching(Me).until_after(Me)}};O.prototype=new T,O.prototype._is_comment=function(W){return!1},O.prototype._is_opening=function(W){return W.type===A.TAG_OPEN||W.type===A.CONTROL_FLOW_OPEN},O.prototype._is_closing=function(W,ge){return W.type===A.TAG_CLOSE&&ge&&((W.text===">"||W.text==="/>")&&ge.text[0]==="<"||W.text==="}}"&&ge.text[0]==="{"&&ge.text[1]==="{")||W.type===A.CONTROL_FLOW_CLOSE&&W.text==="}"&&ge.text.endsWith("{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(W,ge){var De=null;this._readWhitespace();var he=this._input.peek();return he===null?this._create_token(A.EOF,""):(De=De||this._read_open_handlebars(he,ge),De=De||this._read_attribute(he,W,ge),De=De||this._read_close(he,ge),De=De||this._read_script_and_style(he,W),De=De||this._read_control_flows(he,ge),De=De||this._read_raw_content(he,W,ge),De=De||this._read_content_word(he,ge),De=De||this._read_comment_or_cdata(he),De=De||this._read_processing(he),De=De||this._read_open(he,ge),De=De||this._create_token(A.UNKNOWN,this._input.next()),De)},O.prototype._read_comment_or_cdata=function(W){var ge=null,De=null,he=null;if(W==="<"){var Me=this._input.peek(1);Me==="!"&&(De=this.__patterns.comment.read(),De?(he=M.get_directives(De),he&&he.ignore==="start"&&(De+=M.readIgnored(this._input))):De=this.__patterns.cdata.read()),De&&(ge=this._create_token(A.COMMENT,De),ge.directives=he)}return ge},O.prototype._read_processing=function(W){var ge=null,De=null,he=null;if(W==="<"){var Me=this._input.peek(1);(Me==="!"||Me==="?")&&(De=this.__patterns.conditional_comment.read(),De=De||this.__patterns.processing.read()),De&&(ge=this._create_token(A.COMMENT,De),ge.directives=he)}return ge},O.prototype._read_open=function(W,ge){var De=null,he=null;return(!ge||ge.type===A.CONTROL_FLOW_OPEN)&&W==="<"&&(De=this._input.next(),this._input.peek()==="/"&&(De+=this._input.next()),De+=this.__patterns.element_name.read(),he=this._create_token(A.TAG_OPEN,De)),he},O.prototype._read_open_handlebars=function(W,ge){var De=null,he=null;return(!ge||ge.type===A.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&W==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(De=this.__patterns.handlebars_comment.read(),De=De||this.__patterns.handlebars.read(),he=this._create_token(A.COMMENT,De)):(De=this.__patterns.handlebars_open.read(),he=this._create_token(A.TAG_OPEN,De))),he},O.prototype._read_control_flows=function(W,ge){var De="",he=null;if(!this._options.templating.includes("angular"))return he;if(W==="@"){if(De=this.__patterns.angular_control_flow_start.read(),De==="")return he;for(var Me=De.endsWith("(")?1:0,Fe=0;!(De.endsWith("{")&&Me===Fe);){var ke=this._input.next();if(ke===null)break;ke==="("?Me++:ke===")"&&Fe++,De+=ke}he=this._create_token(A.CONTROL_FLOW_OPEN,De)}else W==="}"&&ge&&ge.type===A.CONTROL_FLOW_OPEN&&(De=this._input.next(),he=this._create_token(A.CONTROL_FLOW_CLOSE,De));return he},O.prototype._read_close=function(W,ge){var De=null,he=null;return ge&&ge.type===A.TAG_OPEN&&(ge.text[0]==="<"&&(W===">"||W==="/"&&this._input.peek(1)===">")?(De=this._input.next(),W==="/"&&(De+=this._input.next()),he=this._create_token(A.TAG_CLOSE,De)):ge.text[0]==="{"&&W==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),he=this._create_token(A.TAG_CLOSE,"}}"))),he},O.prototype._read_attribute=function(W,ge,De){var he=null,Me="";if(De&&De.text[0]==="<")if(W==="=")he=this._create_token(A.EQUALS,this._input.next());else if(W==='"'||W==="'"){var Fe=this._input.next();W==='"'?Fe+=this.__patterns.double_quote.read():Fe+=this.__patterns.single_quote.read(),he=this._create_token(A.VALUE,Fe)}else Me=this.__patterns.attribute.read(),Me&&(ge.type===A.EQUALS?he=this._create_token(A.VALUE,Me):he=this._create_token(A.ATTRIBUTE,Me));return he},O.prototype._is_content_unformatted=function(W){return this._options.void_elements.indexOf(W)===-1&&(this._options.content_unformatted.indexOf(W)!==-1||this._options.unformatted.indexOf(W)!==-1)},O.prototype._read_raw_content=function(W,ge,De){var he="";if(De&&De.text[0]==="{")he=this.__patterns.handlebars_raw_close.read();else if(ge.type===A.TAG_CLOSE&&ge.opened.text[0]==="<"&&ge.text[0]!=="/"){var Me=ge.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Me)&&(he=this._input.readUntil(new RegExp("</"+Me+"[\\n\\r\\t ]*?>","ig")))}return he?this._create_token(A.TEXT,he):null},O.prototype._read_script_and_style=function(W,ge){if(ge.type===A.TAG_CLOSE&&ge.opened.text[0]==="<"&&ge.text[0]!=="/"){var De=ge.opened.text.substr(1).toLowerCase();if(De==="script"||De==="style"){var he=this._read_comment_or_cdata(W);if(he)return he.type=A.TEXT,he;var Me=this._input.readUntil(new RegExp("</"+De+"[\\n\\r\\t ]*?>","ig"));if(Me)return this._create_token(A.TEXT,Me)}}return null},O.prototype._read_content_word=function(W,ge){var De="";return this._options.unformatted_content_delimiter&&W===this._options.unformatted_content_delimiter[0]&&(De=this.__patterns.unformatted_content_delimiter.read()),De||(De=ge&&ge.type===A.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),De?this._create_token(A.TEXT,De):null},F.exports.Tokenizer=O,F.exports.TOKEN=A}],ie={};function l(F){var E=ie[F];if(E!==void 0)return E.exports;var x=ie[F]={exports:{}};return me[F](x,x.exports,l),x.exports}var H=l(18);Re=H})();var _e=Re;if(1)I=[B,B(58553),B(87804)],be=function(me){var ie=B(58553),l=B(87804);return{html_beautify:function(H,F){return _e(H,F,ie.js_beautify,l.css_beautify)}}}.apply(ot,I),be!==void 0&&(Jt.exports=be);else var Z,v})()},58553:function(Jt,ot){var B,I;(function(){var be;(function(){"use strict";var _e=[function(ie,l,H){var F=H(1).Beautifier,E=H(5).Options;function x(T,L){var q=new F(T,L);return q.beautify()}ie.exports=x,ie.exports.defaultOptions=function(){return new E}},function(ie,l,H){var F=H(2).Output,E=H(3).Token,x=H(4),T=H(5).Options,L=H(7).Tokenizer,q=H(7).line_starters,Y=H(7).positionable_operators,$=H(7).TOKEN;function A(S,V){return V.indexOf(S)!==-1}function M(S){return S.replace(/^\s+/g,"")}function O(S){for(var V={},ve=0;ve<S.length;ve++)V[S[ve].replace(/-/g,"_")]=S[ve];return V}function W(S,V){return S&&S.type===$.RESERVED&&S.text===V}function ge(S,V){return S&&S.type===$.RESERVED&&A(S.text,V)}var De=["case","return","do","if","throw","else","await","break","continue","async"],he=["before-newline","after-newline","preserve-newline"],Me=O(he),Fe=[Me.before_newline,Me.preserve_newline],ke={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function ct(S,V){V.multiline_frame||V.mode===ke.ForInitializer||V.mode===ke.Conditional||S.remove_indent(V.start_line_index)}function ae(S){S=S.replace(x.allLineBreaks,`
|
|
`);for(var V=[],ve=S.indexOf(`
|
|
`);ve!==-1;)V.push(S.substring(0,ve)),S=S.substring(ve+1),ve=S.indexOf(`
|
|
`);return S.length&&V.push(S),V}function j(S){return S===ke.ArrayLiteral}function ee(S){return A(S,[ke.Expression,ke.ForInitializer,ke.Conditional])}function ne(S,V){for(var ve=0;ve<S.length;ve++){var He=S[ve].trim();if(He.charAt(0)!==V)return!1}return!0}function oe(S,V){for(var ve=0,He=S.length,st;ve<He;ve++)if(st=S[ve],st&&st.indexOf(V)!==0)return!1;return!0}function re(S,V){V=V||{},this._source_text=S||"",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 T(V)}re.prototype.create_flags=function(S,V){var ve=0;S&&(ve=S.indentation_level,!this._output.just_added_newline()&&S.line_indent_level>ve&&(ve=S.line_indent_level));var He={mode:V,parent:S,last_token:S?S.last_token:new E($.START_BLOCK,""),last_word:S?S.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:ve,alignment:0,line_indent_level:S?S.line_indent_level:ve,start_line_index:this._output.get_line_number(),ternary_depth:0};return He},re.prototype._reset=function(S){var V=S.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new F(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ke.BlockStatement);var ve=new L(S,this._options);return this._tokens=ve.tokenize(),S},re.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S,V=this._reset(this._source_text),ve=this._options.eol;this._options.eol==="auto"&&(ve=`
|
|
`,V&&x.lineBreak.test(V||"")&&(ve=V.match(x.lineBreak)[0]));for(var He=this._tokens.next();He;)this.handle_token(He),this._last_last_text=this._flags.last_token.text,this._flags.last_token=He,He=this._tokens.next();return S=this._output.get_code(ve),S},re.prototype.handle_token=function(S,V){S.type===$.START_EXPR?this.handle_start_expr(S):S.type===$.END_EXPR?this.handle_end_expr(S):S.type===$.START_BLOCK?this.handle_start_block(S):S.type===$.END_BLOCK?this.handle_end_block(S):S.type===$.WORD?this.handle_word(S):S.type===$.RESERVED?this.handle_word(S):S.type===$.SEMICOLON?this.handle_semicolon(S):S.type===$.STRING?this.handle_string(S):S.type===$.EQUALS?this.handle_equals(S):S.type===$.OPERATOR?this.handle_operator(S):S.type===$.COMMA?this.handle_comma(S):S.type===$.BLOCK_COMMENT?this.handle_block_comment(S,V):S.type===$.COMMENT?this.handle_comment(S,V):S.type===$.DOT?this.handle_dot(S):S.type===$.EOF?this.handle_eof(S):S.type===$.UNKNOWN?this.handle_unknown(S,V):this.handle_unknown(S,V)},re.prototype.handle_whitespace_and_comments=function(S,V){var ve=S.newlines,He=this._options.keep_array_indentation&&j(this._flags.mode);if(S.comments_before)for(var st=S.comments_before.next();st;)this.handle_whitespace_and_comments(st,V),this.handle_token(st,V),st=S.comments_before.next();if(He)for(var tt=0;tt<ve;tt+=1)this.print_newline(tt>0,V);else if(this._options.max_preserve_newlines&&ve>this._options.max_preserve_newlines&&(ve=this._options.max_preserve_newlines),this._options.preserve_newlines&&ve>1){this.print_newline(!1,V);for(var Xe=1;Xe<ve;Xe+=1)this.print_newline(!0,V)}};var b=["async","break","continue","return","throw","yield"];re.prototype.allow_wrap_or_preserved_newline=function(S,V){if(V=V===void 0?!1:V,!this._output.just_added_newline()){var ve=this._options.preserve_newlines&&S.newlines||V,He=A(this._flags.last_token.text,Y)||A(S.text,Y);if(He){var st=A(this._flags.last_token.text,Y)&&A(this._options.operator_position,Fe)||A(S.text,Y);ve=ve&&st}if(ve)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ge(this._flags.last_token,b))return;this._output.set_wrap_point()}}},re.prototype.print_newline=function(S,V){if(!V&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==$.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ve=this._tokens.peek();this._flags.mode===ke.Statement&&!(this._flags.if_block&&W(ve,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(S)&&(this._flags.multiline_frame=!0)},re.prototype.print_token_line_indentation=function(S){this._output.just_added_newline()&&(this._options.keep_array_indentation&&S.newlines&&(S.text==="["||j(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(S.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(S){if(this._output.raw){this._output.add_raw_token(S);return}if(this._options.comma_first&&S.previous&&S.previous.type===$.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var V=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(V),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(S),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(S),this._output.non_breaking_space=!0,this._output.add_token(S.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(S){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,S),this._flags=this.create_flags(this._previous_flags,S),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===ke.Statement&&ct(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===ke.ObjectLiteral&&this._flags.mode===ke.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ge(this._flags.last_token,["get","set"]))},re.prototype.start_of_statement=function(S){var V=!1;return V=V||ge(this._flags.last_token,["var","let","const"])&&S.type===$.WORD,V=V||W(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===ke.ObjectLiteral&&this._flags.mode===ke.Statement)&&ge(this._flags.last_token,b)&&!S.newlines,V=V||W(this._flags.last_token,"else")&&!(W(S,"if")&&!S.comments_before),V=V||this._flags.last_token.type===$.END_EXPR&&(this._previous_flags.mode===ke.ForInitializer||this._previous_flags.mode===ke.Conditional),V=V||this._flags.last_token.type===$.WORD&&this._flags.mode===ke.BlockStatement&&!this._flags.in_case&&!(S.text==="--"||S.text==="++")&&this._last_last_text!=="function"&&S.type!==$.WORD&&S.type!==$.RESERVED,V=V||this._flags.mode===ke.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ge(this._flags.last_token,["get","set"])),V?(this.set_mode(ke.Statement),this.indent(),this.handle_whitespace_and_comments(S,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S,ge(S,["do","for","if","while"])),!0):!1},re.prototype.handle_start_expr=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S);var V=ke.Expression;if(S.text==="["){if(this._flags.last_token.type===$.WORD||this._flags.last_token.text===")"){ge(this._flags.last_token,q)&&(this._output.space_before_token=!0),this.print_token(S),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=ke.ArrayLiteral,j(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()),A(this._flags.last_token.type,[$.START_EXPR,$.END_EXPR,$.WORD,$.OPERATOR,$.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===$.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=ke.ForInitializer):A(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=ke.Conditional):A(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&S.whitespace_before===""?this._output.space_before_token=!1:(A(this._flags.last_token.text,q)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===$.EQUALS||this._flags.last_token.type===$.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S);else if(this._flags.last_token.type===$.WORD){this._output.space_before_token=!1;var ve=this._tokens.peek(-3);if(this._options.space_after_named_function&&ve){var He=this._tokens.peek(-4);ge(ve,["async","function"])||ve.text==="*"&&ge(He,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ke.ObjectLiteral?(ve.text==="{"||ve.text===","||ve.text==="*"&&(He.text==="{"||He.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(S);(this._flags.last_token.type===$.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===ke.ObjectLiteral&&A(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===$.START_BLOCK?this.print_newline():(this._flags.last_token.type===$.END_EXPR||this._flags.last_token.type===$.START_EXPR||this._flags.last_token.type===$.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===$.COMMA)&&this.allow_wrap_or_preserved_newline(S,S.newlines),this.print_token(S),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},re.prototype.handle_end_expr=function(S){for(;this._flags.mode===ke.Statement;)this.restore_mode();this.handle_whitespace_and_comments(S),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(S,S.text==="]"&&j(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===$.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(S),this.restore_mode(),ct(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ke.Conditional&&(this._previous_flags.mode=ke.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},re.prototype.handle_start_block=function(S){this.handle_whitespace_and_comments(S);var V=this._tokens.peek(),ve=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===$.END_EXPR?(this.set_mode(ke.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ke.BlockStatement):ve&&(A(ve.text,[":",","])&&A(V.type,[$.STRING,$.WORD,$.RESERVED])||A(V.text,["get","set","..."])&&A(ve.type,[$.WORD,$.RESERVED]))?A(this._last_last_text,["class","interface"])&&!A(ve.text,[":",","])?this.set_mode(ke.BlockStatement):this.set_mode(ke.ObjectLiteral):this._flags.last_token.type===$.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ke.BlockStatement):A(this._flags.last_token.type,[$.EQUALS,$.START_EXPR,$.COMMA,$.OPERATOR])||ge(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ke.ObjectLiteral):this.set_mode(ke.BlockStatement),this._flags.last_token&&ge(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var He=!V.comments_before&&V.text==="}",st=He&&this._flags.last_word==="function"&&this._flags.last_token.type===$.END_EXPR;if(this._options.brace_preserve_inline){var tt=0,Xe=null;this._flags.inline_frame=!0;do if(tt+=1,Xe=this._tokens.peek(tt-1),Xe.newlines){this._flags.inline_frame=!1;break}while(Xe.type!==$.EOF&&!(Xe.type===$.END_BLOCK&&Xe.opened===S))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&S.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==$.OPERATOR&&(st||this._flags.last_token.type===$.EQUALS||ge(this._flags.last_token,De)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(j(this._previous_flags.mode)&&(this._flags.last_token.type===$.START_EXPR||this._flags.last_token.type===$.COMMA)&&((this._flags.last_token.type===$.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===$.COMMA||this._flags.last_token.type===$.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(S),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==$.OPERATOR&&this._flags.last_token.type!==$.START_EXPR&&(A(this._flags.last_token.type,[$.START_BLOCK,$.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(S),this.indent(),!He&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},re.prototype.handle_end_block=function(S){for(this.handle_whitespace_and_comments(S);this._flags.mode===ke.Statement;)this.restore_mode();var V=this._flags.last_token.type===$.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(j(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(S)},re.prototype.handle_word=function(S){if(S.type===$.RESERVED){if(A(S.text,["set","get"])&&this._flags.mode!==ke.ObjectLiteral)S.type=$.WORD;else if(S.text==="import"&&A(this._tokens.peek().text,["(","."]))S.type=$.WORD;else if(A(S.text,["as","from"])&&!this._flags.import_block)S.type=$.WORD;else if(this._flags.mode===ke.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(S.type=$.WORD)}}if(this.start_of_statement(S)?ge(this._flags.last_token,["var","let","const"])&&S.type===$.WORD&&(this._flags.declaration_statement=!0):S.newlines&&!ee(this._flags.mode)&&(this._flags.last_token.type!==$.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==$.EQUALS&&(this._options.preserve_newlines||!ge(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(S),this.print_newline()):this.handle_whitespace_and_comments(S),this._flags.do_block&&!this._flags.do_while)if(W(S,"while")){this._output.space_before_token=!0,this.print_token(S),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&&W(S,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ke.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ge(S,["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(S),this._flags.in_case=!0;return}if((this._flags.last_token.type===$.COMMA||this._flags.last_token.type===$.START_EXPR||this._flags.last_token.type===$.EQUALS||this._flags.last_token.type===$.OPERATOR)&&!this.start_of_object_property()&&!(A(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ke.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(S),W(S,"function")){(A(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(A(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===$.OPERATOR))&&!this._output.just_added_blankline()&&!S.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===$.RESERVED||this._flags.last_token.type===$.WORD?ge(this._flags.last_token,["get","set","new","export"])||ge(this._flags.last_token,b)?this._output.space_before_token=!0:W(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===$.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(ee(this._flags.mode)||j(this._flags.mode))||this.print_newline(),this.print_token(S),this._flags.last_word=S.text;return}var ve="NONE";if(this._flags.last_token.type===$.END_BLOCK?this._previous_flags.inline_frame?ve="SPACE":ge(S,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&S.newlines?ve="NEWLINE":(ve="SPACE",this._output.space_before_token=!0):ve="NEWLINE":this._flags.last_token.type===$.SEMICOLON&&this._flags.mode===ke.BlockStatement?ve="NEWLINE":this._flags.last_token.type===$.SEMICOLON&&ee(this._flags.mode)?ve="SPACE":this._flags.last_token.type===$.STRING?ve="NEWLINE":this._flags.last_token.type===$.RESERVED||this._flags.last_token.type===$.WORD||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===ke.ObjectLiteral&&A(this._last_last_text,["{",","]))?ve="SPACE":this._flags.last_token.type===$.START_BLOCK?this._flags.inline_frame?ve="SPACE":ve="NEWLINE":this._flags.last_token.type===$.END_EXPR&&(this._output.space_before_token=!0,ve="NEWLINE"),ge(S,q)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ve="SPACE":ve="NEWLINE"),ge(S,["else","catch","finally"]))if((!(this._flags.last_token.type===$.END_BLOCK&&this._previous_flags.mode===ke.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&S.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var He=this._output.current_line;He.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ve==="NEWLINE"?ge(this._flags.last_token,De)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ge(S,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==$.END_EXPR?(this._flags.last_token.type!==$.START_EXPR||!ge(S,["var","let","const"]))&&this._flags.last_token.text!==":"&&(W(S,"if")&&W(S.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ge(S,q)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&j(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ve==="SPACE"&&(this._output.space_before_token=!0);S.previous&&(S.previous.type===$.WORD||S.previous.type===$.RESERVED)&&(this._output.space_before_token=!0),this.print_token(S),this._flags.last_word=S.text,S.type===$.RESERVED&&(S.text==="do"?this._flags.do_block=!0:S.text==="if"?this._flags.if_block=!0:S.text==="import"?this._flags.import_block=!0:this._flags.import_block&&W(S,"from")&&(this._flags.import_block=!1))},re.prototype.handle_semicolon=function(S){this.start_of_statement(S)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(S);for(var V=this._tokens.peek();this._flags.mode===ke.Statement&&!(this._flags.if_block&&W(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(S)},re.prototype.handle_string=function(S){S.text.startsWith("`")&&S.newlines===0&&S.whitespace_before===""&&(S.previous.text===")"||this._flags.last_token.type===$.WORD)||(this.start_of_statement(S)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(S),this._flags.last_token.type===$.RESERVED||this._flags.last_token.type===$.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===$.COMMA||this._flags.last_token.type===$.START_EXPR||this._flags.last_token.type===$.EQUALS||this._flags.last_token.type===$.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(S):S.text.startsWith("`")&&this._flags.last_token.type===$.END_EXPR&&(S.previous.text==="]"||S.previous.text===")")&&S.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(S)},re.prototype.handle_equals=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(S),this._output.space_before_token=!0},re.prototype.handle_comma=function(S){this.handle_whitespace_and_comments(S,!0),this.print_token(S),this._output.space_before_token=!0,this._flags.declaration_statement?(ee(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(S)):this._flags.mode===ke.ObjectLiteral||this._flags.mode===ke.Statement&&this._flags.parent.mode===ke.ObjectLiteral?(this._flags.mode===ke.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(S)},re.prototype.handle_operator=function(S){var V=S.text==="*"&&(ge(this._flags.last_token,["function","yield"])||A(this._flags.last_token.type,[$.START_BLOCK,$.COMMA,$.END_BLOCK,$.SEMICOLON])),ve=A(S.text,["-","+"])&&(A(this._flags.last_token.type,[$.START_BLOCK,$.START_EXPR,$.EQUALS,$.OPERATOR])||A(this._flags.last_token.text,q)||this._flags.last_token.text===",");if(!this.start_of_statement(S)){var He=!V;this.handle_whitespace_and_comments(S,He)}if(S.text==="*"&&this._flags.last_token.type===$.DOT){this.print_token(S);return}if(S.text==="::"){this.print_token(S);return}if(A(S.text,["-","+"])&&this.start_of_object_property()){this.print_token(S);return}if(this._flags.last_token.type===$.OPERATOR&&A(this._options.operator_position,Fe)&&this.allow_wrap_or_preserved_newline(S),S.text===":"&&this._flags.in_case){this.print_token(S),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==$.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 st=!0,tt=!0,Xe=!1;if(S.text===":"?this._flags.ternary_depth===0?st=!1:(this._flags.ternary_depth-=1,Xe=!0):S.text==="?"&&(this._flags.ternary_depth+=1),!ve&&!V&&this._options.preserve_newlines&&A(S.text,Y)){var xt=S.text===":",et=xt&&Xe,Ue=xt&&!Xe;switch(this._options.operator_position){case Me.before_newline:this._output.space_before_token=!Ue,this.print_token(S),(!xt||et)&&this.allow_wrap_or_preserved_newline(S),this._output.space_before_token=!0;return;case Me.after_newline:this._output.space_before_token=!0,!xt||et?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(S):this._output.space_before_token=!1,this.print_token(S),this._output.space_before_token=!0;return;case Me.preserve_newline:Ue||this.allow_wrap_or_preserved_newline(S),st=!(this._output.just_added_newline()||Ue),this._output.space_before_token=st,this.print_token(S),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(S),st=!1;var Yt=this._tokens.peek();tt=Yt&&A(Yt.type,[$.WORD,$.RESERVED])}else if(S.text==="...")this.allow_wrap_or_preserved_newline(S),st=this._flags.last_token.type===$.START_BLOCK,tt=!1;else if(A(S.text,["--","++","!","~"])||ve){if((this._flags.last_token.type===$.COMMA||this._flags.last_token.type===$.START_EXPR)&&this.allow_wrap_or_preserved_newline(S),st=!1,tt=!1,S.newlines&&(S.text==="--"||S.text==="++"||S.text==="~")){var Nt=ge(this._flags.last_token,De)&&S.newlines;Nt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Nt,!0)}this._flags.last_token.text===";"&&ee(this._flags.mode)&&(st=!0),this._flags.last_token.type===$.RESERVED?st=!0:this._flags.last_token.type===$.END_EXPR?st=!(this._flags.last_token.text==="]"&&(S.text==="--"||S.text==="++")):this._flags.last_token.type===$.OPERATOR&&(st=A(S.text,["--","-","++","+"])&&A(this._flags.last_token.text,["--","-","++","+"]),A(S.text,["+","-"])&&A(this._flags.last_token.text,["--","++"])&&(tt=!0)),(this._flags.mode===ke.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ke.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||st,this.print_token(S),this._output.space_before_token=tt},re.prototype.handle_block_comment=function(S,V){if(this._output.raw){this._output.add_raw_token(S),S.directives&&S.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(S.directives){this.print_newline(!1,V),this.print_token(S),S.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!x.newline.test(S.text)&&!S.newlines){this._output.space_before_token=!0,this.print_token(S),this._output.space_before_token=!0;return}else this.print_block_commment(S,V)},re.prototype.print_block_commment=function(S,V){var ve=ae(S.text),He,st=!1,tt=!1,Xe=S.whitespace_before,xt=Xe.length;if(this.print_newline(!1,V),this.print_token_line_indentation(S),this._output.add_token(ve[0]),this.print_newline(!1,V),ve.length>1){for(ve=ve.slice(1),st=ne(ve,"*"),tt=oe(ve,Xe),st&&(this._flags.alignment=1),He=0;He<ve.length;He++)st?(this.print_token_line_indentation(S),this._output.add_token(M(ve[He]))):tt&&ve[He]?(this.print_token_line_indentation(S),this._output.add_token(ve[He].substring(xt))):(this._output.current_line.set_indent(-1),this._output.add_token(ve[He])),this.print_newline(!1,V);this._flags.alignment=0}},re.prototype.handle_comment=function(S,V){S.newlines?this.print_newline(!1,V):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(S),this.print_newline(!1,V)},re.prototype.handle_dot=function(S){this.start_of_statement(S)||this.handle_whitespace_and_comments(S,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ge(this._flags.last_token,De)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(S,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(S)},re.prototype.handle_unknown=function(S,V){this.print_token(S),S.text[S.text.length-1]===`
|
|
`&&this.print_newline(!1,V)},re.prototype.handle_eof=function(S){for(;this._flags.mode===ke.Statement;)this.restore_mode();this.handle_whitespace_and_comments(S)},ie.exports.Beautifier=re},function(ie){function l(E){this.__parent=E,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=[]}l.prototype.clone_empty=function(){var E=new l(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},l.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},l.prototype.has_match=function(E){for(var x=this.__items.length-1;x>=0;x--)if(this.__items[x].match(E))return!0;return!1},l.prototype.set_indent=function(E,x){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=x||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(E){this.__items.push(E);var x=E.lastIndexOf(`
|
|
`);x!==-1?this.__character_count=E.length-x:this.__character_count+=E.length},l.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function H(E,x){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),x=x||"",E.indent_level>0&&(x=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=x,this.__base_string_length=x.length}H.prototype.get_indent_size=function(E,x){var T=this.__base_string_length;return x=x||0,E<0&&(T=0),T+=E*this.__indent_size,T+=x,T},H.prototype.get_indent_string=function(E,x){var T=this.__base_string;return x=x||0,E<0&&(E=0,T=""),x+=E*this.__indent_size,this.__ensure_cache(x),T+=this.__cache[x],T},H.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var E=this.__cache.length,x=0,T="";this.__indent_size&&E>=this.__indent_size&&(x=Math.floor(E/this.__indent_size),E-=x*this.__indent_size,T=new Array(x+1).join(this.__indent_string)),E&&(T+=new Array(E+1).join(" ")),this.__cache.push(T)};function F(E,x){this.__indent_cache=new H(E,x),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}F.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},F.prototype.get_line_number=function(){return this.__lines.length},F.prototype.get_indent_string=function(E,x){return this.__indent_cache.get_indent_string(E,x)},F.prototype.get_indent_size=function(E,x){return this.__indent_cache.get_indent_size(E,x)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(E){this.trim(!0);var x=this.current_line.pop();x&&(x[x.length-1]===`
|
|
`&&(x=x.replace(/\n+$/g,"")),this.current_line.push(x)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
|
|
`);return E!==`
|
|
`&&(T=T.replace(/[\n]/g,E)),T},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(E,x){return E=E||0,x=x||0,this.next_line.set_indent(E,x),this.__lines.length>1?(this.current_line.set_indent(E,x),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(E){for(var x=0;x<E.newlines;x++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},F.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(" "))},F.prototype.remove_indent=function(E){for(var x=this.__lines.length;E<x;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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},F.prototype.just_added_newline=function(){return this.current_line.is_empty()},F.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},F.prototype.ensure_empty_line_above=function(E,x){for(var T=this.__lines.length-2;T>=0;){var L=this.__lines[T];if(L.is_empty())break;if(L.item(0).indexOf(E)!==0&&L.item(-1)!==x){this.__lines.splice(T+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},ie.exports.Output=F},function(ie){function l(H,F,E,x){this.type=H,this.text=F,this.comments_before=null,this.newlines=E||0,this.whitespace_before=x||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ie.exports.Token=l},function(ie,l){var H="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",F="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",E="\\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",x="\\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",T="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",L="(?:"+T+"|["+H+E+"])",q="(?:"+T+"|["+F+E+x+"])*";l.identifier=new RegExp(L+q,"g"),l.identifierStart=new RegExp(L),l.identifierMatch=new RegExp("(?:"+T+"|["+F+E+x+"])+");var Y=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;l.newline=/[\n\r\u2028\u2029]/,l.lineBreak=new RegExp(`\r
|
|
|`+l.newline.source),l.allLineBreaks=new RegExp(l.lineBreak.source,"g")},function(ie,l,H){var F=H(6).Options,E=["before-newline","after-newline","preserve-newline"];function x(T){F.call(this,T,"js");var L=this.raw_options.brace_style||null;L==="expand-strict"?this.raw_options.brace_style="expand":L==="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 q=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var Y=0;Y<q.length;Y++)q[Y]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=q[Y];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",E),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}x.prototype=new F,ie.exports.Options=x},function(ie){function l(E,x){this.raw_options=H(E,x),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"])}l.prototype._get_array=function(E,x){var T=this.raw_options[E],L=x||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(L=T.concat()):typeof T=="string"&&(L=T.split(/[^a-zA-Z0-9_\/\-]+/)),L},l.prototype._get_boolean=function(E,x){var T=this.raw_options[E],L=T===void 0?!!x:!!T;return L},l.prototype._get_characters=function(E,x){var T=this.raw_options[E],L=x||"";return typeof T=="string"&&(L=T.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),L},l.prototype._get_number=function(E,x){var T=this.raw_options[E];x=parseInt(x,10),isNaN(x)&&(x=0);var L=parseInt(T,10);return isNaN(L)&&(L=x),L},l.prototype._get_selection=function(E,x,T){var L=this._get_selection_list(E,x,T);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
`+x+`
|
|
You passed in: '`+this.raw_options[E]+"'");return L[0]},l.prototype._get_selection_list=function(E,x,T){if(!x||x.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[x[0]],!this._is_valid_selection(T,x))throw new Error("Invalid Default Value!");var L=this._get_array(E,T);if(!this._is_valid_selection(L,x))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
`+x+`
|
|
You passed in: '`+this.raw_options[E]+"'");return L},l.prototype._is_valid_selection=function(E,x){return E.length&&x.length&&!E.some(function(T){return x.indexOf(T)===-1})};function H(E,x){var T={};E=F(E);var L;for(L in E)L!==x&&(T[L]=E[L]);if(x&&E[x])for(L in E[x])T[L]=E[x][L];return T}function F(E){var x={},T;for(T in E){var L=T.replace(/-/g,"_");x[L]=E[T]}return x}ie.exports.Options=l,ie.exports.normalizeOpts=F,ie.exports.mergeOpts=H},function(ie,l,H){var F=H(8).InputScanner,E=H(9).Tokenizer,x=H(9).TOKEN,T=H(13).Directives,L=H(4),q=H(12).Pattern,Y=H(14).TemplatablePattern;function $(ne,oe){return oe.indexOf(ne)!==-1}var A={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:x.START,RAW:x.RAW,EOF:x.EOF},M=new T(/\/\*/,/\*\//),O=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,W=/[0-9]/,ge=/[^\d\.]/,De=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),he=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";he=he.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),he="\\?\\.(?!\\d) "+he,he=he.replace(/ /g,"|");var Me=new RegExp(he),Fe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ke=Fe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),ct=new RegExp("^(?:"+ke.join("|")+")$"),ae,j=function(ne,oe){E.call(this,ne,oe),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var re=new q(this._input),b=new Y(this._input).read_options(this._options);this.__patterns={template:b,identifier:b.starting_with(L.identifier).matching(L.identifierMatch),number:re.matching(O),punct:re.matching(Me),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(L.lineBreak),shebang:re.starting_with(/#!/).until_after(L.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:b.until(/['\\\n\r\u2028\u2029]/),double_quote:b.until(/["\\\n\r\u2028\u2029]/),template_text:b.until(/[`\\$]/),template_expression:b.until(/[`}\\]/)}};j.prototype=new E,j.prototype._is_comment=function(ne){return ne.type===A.COMMENT||ne.type===A.BLOCK_COMMENT||ne.type===A.UNKNOWN},j.prototype._is_opening=function(ne){return ne.type===A.START_BLOCK||ne.type===A.START_EXPR},j.prototype._is_closing=function(ne,oe){return(ne.type===A.END_BLOCK||ne.type===A.END_EXPR)&&oe&&(ne.text==="]"&&oe.text==="["||ne.text===")"&&oe.text==="("||ne.text==="}"&&oe.text==="{")},j.prototype._reset=function(){ae=!1},j.prototype._get_next_token=function(ne,oe){var re=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(A.EOF,""):(re=re||this._read_non_javascript(b),re=re||this._read_string(b),re=re||this._read_pair(b,this._input.peek(1)),re=re||this._read_word(ne),re=re||this._read_singles(b),re=re||this._read_comment(b),re=re||this._read_regexp(b,ne),re=re||this._read_xml(b,ne),re=re||this._read_punctuation(),re=re||this._create_token(A.UNKNOWN,this._input.next()),re)},j.prototype._read_word=function(ne){var oe;if(oe=this.__patterns.identifier.read(),oe!=="")return oe=oe.replace(L.allLineBreaks,`
|
|
`),!(ne.type===A.DOT||ne.type===A.RESERVED&&(ne.text==="set"||ne.text==="get"))&&ct.test(oe)?(oe==="in"||oe==="of")&&(ne.type===A.WORD||ne.type===A.STRING)?this._create_token(A.OPERATOR,oe):this._create_token(A.RESERVED,oe):this._create_token(A.WORD,oe);if(oe=this.__patterns.number.read(),oe!=="")return this._create_token(A.WORD,oe)},j.prototype._read_singles=function(ne){var oe=null;return ne==="("||ne==="["?oe=this._create_token(A.START_EXPR,ne):ne===")"||ne==="]"?oe=this._create_token(A.END_EXPR,ne):ne==="{"?oe=this._create_token(A.START_BLOCK,ne):ne==="}"?oe=this._create_token(A.END_BLOCK,ne):ne===";"?oe=this._create_token(A.SEMICOLON,ne):ne==="."&&ge.test(this._input.peek(1))?oe=this._create_token(A.DOT,ne):ne===","&&(oe=this._create_token(A.COMMA,ne)),oe&&this._input.next(),oe},j.prototype._read_pair=function(ne,oe){var re=null;return ne==="#"&&oe==="{"&&(re=this._create_token(A.START_BLOCK,ne+oe)),re&&(this._input.next(),this._input.next()),re},j.prototype._read_punctuation=function(){var ne=this.__patterns.punct.read();if(ne!=="")return ne==="="?this._create_token(A.EQUALS,ne):ne==="?."?this._create_token(A.DOT,ne):this._create_token(A.OPERATOR,ne)},j.prototype._read_non_javascript=function(ne){var oe="";if(ne==="#"){if(this._is_first_token()&&(oe=this.__patterns.shebang.read(),oe))return this._create_token(A.UNKNOWN,oe.trim()+`
|
|
`);if(oe=this.__patterns.include.read(),oe)return this._create_token(A.UNKNOWN,oe.trim()+`
|
|
`);ne=this._input.next();var re="#";if(this._input.hasNext()&&this._input.testChar(W)){do ne=this._input.next(),re+=ne;while(this._input.hasNext()&&ne!=="#"&&ne!=="=");return ne==="#"||(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(A.WORD,re)}this._input.back()}else if(ne==="<"&&this._is_first_token()){if(oe=this.__patterns.html_comment_start.read(),oe){for(;this._input.hasNext()&&!this._input.testChar(L.newline);)oe+=this._input.next();return ae=!0,this._create_token(A.COMMENT,oe)}}else if(ae&&ne==="-"&&(oe=this.__patterns.html_comment_end.read(),oe))return ae=!1,this._create_token(A.COMMENT,oe);return null},j.prototype._read_comment=function(ne){var oe=null;if(ne==="/"){var re="";if(this._input.peek(1)==="*"){re=this.__patterns.block_comment.read();var b=M.get_directives(re);b&&b.ignore==="start"&&(re+=M.readIgnored(this._input)),re=re.replace(L.allLineBreaks,`
|
|
`),oe=this._create_token(A.BLOCK_COMMENT,re),oe.directives=b}else this._input.peek(1)==="/"&&(re=this.__patterns.comment.read(),oe=this._create_token(A.COMMENT,re))}return oe},j.prototype._read_string=function(ne){if(ne==="`"||ne==="'"||ne==='"'){var oe=this._input.next();return this.has_char_escapes=!1,ne==="`"?oe+=this._read_string_recursive("`",!0,"${"):oe+=this._read_string_recursive(ne),this.has_char_escapes&&this._options.unescape_strings&&(oe=ee(oe)),this._input.peek()===ne&&(oe+=this._input.next()),oe=oe.replace(L.allLineBreaks,`
|
|
`),this._create_token(A.STRING,oe)}return null},j.prototype._allow_regexp_or_xml=function(ne){return ne.type===A.RESERVED&&$(ne.text,["return","case","throw","else","do","typeof","yield"])||ne.type===A.END_EXPR&&ne.text===")"&&ne.opened.previous.type===A.RESERVED&&$(ne.opened.previous.text,["if","while","for"])||$(ne.type,[A.COMMENT,A.START_EXPR,A.START_BLOCK,A.START,A.END_BLOCK,A.OPERATOR,A.EQUALS,A.EOF,A.SEMICOLON,A.COMMA])},j.prototype._read_regexp=function(ne,oe){if(ne==="/"&&this._allow_regexp_or_xml(oe)){for(var re=this._input.next(),b=!1,S=!1;this._input.hasNext()&&(b||S||this._input.peek()!==ne)&&!this._input.testChar(L.newline);)re+=this._input.peek(),b?b=!1:(b=this._input.peek()==="\\",this._input.peek()==="["?S=!0:this._input.peek()==="]"&&(S=!1)),this._input.next();return this._input.peek()===ne&&(re+=this._input.next(),re+=this._input.read(L.identifier)),this._create_token(A.STRING,re)}return null},j.prototype._read_xml=function(ne,oe){if(this._options.e4x&&ne==="<"&&this._allow_regexp_or_xml(oe)){var re="",b=this.__patterns.xml.read_match();if(b){for(var S=b[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=S.indexOf("{")===0,ve=0;b;){var He=!!b[1],st=b[2],tt=!!b[b.length-1]||st.slice(0,8)==="![CDATA[";if(!tt&&(st===S||V&&st.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(He?--ve:++ve),re+=b[0],ve<=0)break;b=this.__patterns.xml.read_match()}return b||(re+=this._input.match(/[\s\S]*/g)[0]),re=re.replace(L.allLineBreaks,`
|
|
`),this._create_token(A.STRING,re)}}return null};function ee(ne){for(var oe="",re=0,b=new F(ne),S=null;b.hasNext();)if(S=b.match(/([\s]|[^\\]|\\\\)+/g),S&&(oe+=S[0]),b.peek()==="\\"){if(b.next(),b.peek()==="x")S=b.match(/x([0-9A-Fa-f]{2})/g);else if(b.peek()==="u")S=b.match(/u([0-9A-Fa-f]{4})/g),S||(S=b.match(/u\{([0-9A-Fa-f]+)\}/g));else{oe+="\\",b.hasNext()&&(oe+=b.next());continue}if(!S||(re=parseInt(S[1],16),re>126&&re<=255&&S[0].indexOf("x")===0))return ne;re>=0&&re<32||re>1114111?oe+="\\"+S[0]:re===34||re===39||re===92?oe+="\\"+String.fromCharCode(re):oe+=String.fromCharCode(re)}return oe}j.prototype._read_string_recursive=function(ne,oe,re){var b,S;ne==="'"?S=this.__patterns.single_quote:ne==='"'?S=this.__patterns.double_quote:ne==="`"?S=this.__patterns.template_text:ne==="}"&&(S=this.__patterns.template_expression);for(var V=S.read(),ve="";this._input.hasNext();){if(ve=this._input.next(),ve===ne||!oe&&L.newline.test(ve)){this._input.back();break}else ve==="\\"&&this._input.hasNext()?(b=this._input.peek(),b==="x"||b==="u"?this.has_char_escapes=!0:b==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ve+=this._input.next()):re&&(re==="${"&&ve==="$"&&this._input.peek()==="{"&&(ve+=this._input.next()),re===ve&&(ne==="`"?ve+=this._read_string_recursive("}",oe,"`"):ve+=this._read_string_recursive("`",oe,"${"),this._input.hasNext()&&(ve+=this._input.next())));ve+=S.read(),V+=ve}return V},ie.exports.Tokenizer=j,ie.exports.TOKEN=A,ie.exports.positionable_operators=De.slice(),ie.exports.line_starters=Fe.slice()},function(ie){var l=RegExp.prototype.hasOwnProperty("sticky");function H(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},H.prototype.peek=function(F){var E=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(E=this.__input.charAt(F)),E},H.prototype.__match=function(F,E){F.lastIndex=E;var x=F.exec(this.__input);return x&&!(l&&F.sticky)&&x.index!==E&&(x=null),x},H.prototype.test=function(F,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(F,E):!1},H.prototype.testChar=function(F,E){var x=this.peek(E);return F.lastIndex=0,x!==null&&F.test(x)},H.prototype.match=function(F){var E=this.__match(F,this.__position);return E?this.__position+=E[0].length:E=null,E},H.prototype.read=function(F,E,x){var T="",L;return F&&(L=this.match(F),L&&(T+=L[0])),E&&(L||!F)&&(T+=this.readUntil(E,x)),T},H.prototype.readUntil=function(F,E){var x="",T=this.__position;F.lastIndex=this.__position;var L=F.exec(this.__input);return L?(T=L.index,E&&(T+=L[0].length)):T=this.__input_length,x=this.__input.substring(this.__position,T),this.__position=T,x},H.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},H.prototype.get_regexp=function(F,E){var x=null,T="g";return E&&l&&(T="y"),typeof F=="string"&&F!==""?x=new RegExp(F,T):F&&(x=new RegExp(F.source,T)),x},H.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(F){var E=this.__position,x=this.readUntilAfter(F);return this.__position=E,x},H.prototype.lookBack=function(F){var E=this.__position-1;return E>=F.length&&this.__input.substring(E-F.length,E).toLowerCase()===F},ie.exports.InputScanner=H},function(ie,l,H){var F=H(8).InputScanner,E=H(3).Token,x=H(10).TokenStream,T=H(11).WhitespacePattern,L={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},q=function(Y,$){this._input=new F(Y),this._options=$||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new T(this._input)};q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new x,this._reset();for(var Y,$=new E(L.START,""),A=null,M=[],O=new x;$.type!==L.EOF;){for(Y=this._get_next_token($,A);this._is_comment(Y);)O.add(Y),Y=this._get_next_token($,A);O.isEmpty()||(Y.comments_before=O,O=new x),Y.parent=A,this._is_opening(Y)?(M.push(A),A=Y):A&&this._is_closing(Y,A)&&(Y.opened=A,A.closed=Y,A=M.pop(),Y.parent=A),Y.previous=$,$.next=Y,this.__tokens.add(Y),$=Y}return this.__tokens},q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},q.prototype._reset=function(){},q.prototype._get_next_token=function(Y,$){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(L.RAW,A):this._create_token(L.EOF,"")},q.prototype._is_comment=function(Y){return!1},q.prototype._is_opening=function(Y){return!1},q.prototype._is_closing=function(Y,$){return!1},q.prototype._create_token=function(Y,$){var A=new E(Y,$,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ie.exports.Tokenizer=q,ie.exports.TOKEN=L},function(ie){function l(H){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=H}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var H=null;return this.hasNext()&&(H=this.__tokens[this.__position],this.__position+=1),H},l.prototype.peek=function(H){var F=null;return H=H||0,H+=this.__position,H>=0&&H<this.__tokens_length&&(F=this.__tokens[H]),F},l.prototype.add=function(H){this.__parent_token&&(H.parent=this.__parent_token),this.__tokens.push(H),this.__tokens_length+=1},ie.exports.TokenStream=l},function(ie,l,H){var F=H(12).Pattern;function E(x,T){F.call(this,x,T),T?this._line_regexp=this._input.get_regexp(T._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}E.prototype=new F,E.prototype.__set_whitespace_patterns=function(x,T){x+="\\t ",T+="\\n\\r",this._match_pattern=this._input.get_regexp("["+x+T+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+T+"]")},E.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var x=this._input.read(this._match_pattern);if(x===" ")this.whitespace_before_token=" ";else if(x){var T=this.__split(this._newline_regexp,x);this.newline_count=T.length-1,this.whitespace_before_token=T[this.newline_count]}return x},E.prototype.matching=function(x,T){var L=this._create();return L.__set_whitespace_patterns(x,T),L._update(),L},E.prototype._create=function(){return new E(this._input,this)},E.prototype.__split=function(x,T){x.lastIndex=0;for(var L=0,q=[],Y=x.exec(T);Y;)q.push(T.substring(L,Y.index)),L=Y.index+Y[0].length,Y=x.exec(T);return L<T.length?q.push(T.substring(L,T.length)):q.push(""),q},ie.exports.WhitespacePattern=E},function(ie){function l(H,F){this._input=H,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,F&&(this._starting_pattern=this._input.get_regexp(F._starting_pattern,!0),this._match_pattern=this._input.get_regexp(F._match_pattern,!0),this._until_pattern=this._input.get_regexp(F._until_pattern),this._until_after=F._until_after)}l.prototype.read=function(){var H=this._input.read(this._starting_pattern);return(!this._starting_pattern||H)&&(H+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),H},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(H){var F=this._create();return F._until_after=!0,F._until_pattern=this._input.get_regexp(H),F._update(),F},l.prototype.until=function(H){var F=this._create();return F._until_after=!1,F._until_pattern=this._input.get_regexp(H),F._update(),F},l.prototype.starting_with=function(H){var F=this._create();return F._starting_pattern=this._input.get_regexp(H,!0),F._update(),F},l.prototype.matching=function(H){var F=this._create();return F._match_pattern=this._input.get_regexp(H,!0),F._update(),F},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},ie.exports.Pattern=l},function(ie){function l(H,F){H=typeof H=="string"?H:H.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+F,"g")}l.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(H);E;)F[E[1]]=E[2],E=this.__directive_pattern.exec(H);return F},l.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=l},function(ie,l,H){var F=H(12).Pattern,E={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function x(T,L){F.call(this,T,L),this.__template_pattern=null,this._disabled=Object.assign({},E),this._excluded=Object.assign({},E),L&&(this.__template_pattern=this._input.get_regexp(L.__template_pattern),this._excluded=Object.assign(this._excluded,L._excluded),this._disabled=Object.assign(this._disabled,L._disabled));var q=new F(T);this.__patterns={handlebars_comment:q.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:q.starting_with(/{{{/).until_after(/}}}/),handlebars:q.starting_with(/{{/).until_after(/}}/),php:q.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:q.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:q.starting_with(/{%/).until_after(/%}/),django_value:q.starting_with(/{{/).until_after(/}}/),django_comment:q.starting_with(/{#/).until_after(/#}/),smarty:q.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:q.starting_with(/{\*/).until_after(/\*}/),smarty_literal:q.starting_with(/{literal}/).until_after(/{\/literal}/)}}x.prototype=new F,x.prototype._create=function(){return new x(this._input,this)},x.prototype._update=function(){this.__set_templated_pattern()},x.prototype.disable=function(T){var L=this._create();return L._disabled[T]=!0,L._update(),L},x.prototype.read_options=function(T){var L=this._create();for(var q in E)L._disabled[q]=T.templating.indexOf(q)===-1;return L._update(),L},x.prototype.exclude=function(T){var L=this._create();return L._excluded[T]=!0,L._update(),L},x.prototype.read=function(){var T="";this._match_pattern?T=this._input.read(this._starting_pattern):T=this._input.read(this._starting_pattern,this.__template_pattern);for(var L=this._read_template();L;)this._match_pattern?L+=this._input.read(this._match_pattern):L+=this._input.readUntil(this.__template_pattern),T+=L,L=this._read_template();return this._until_after&&(T+=this._input.readUntilAfter(this._until_pattern)),T},x.prototype.__set_templated_pattern=function(){var T=[];this._disabled.php||T.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||T.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(T.push(this.__patterns.django._starting_pattern.source),T.push(this.__patterns.django_value._starting_pattern.source),T.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||T.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&T.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+T.join("|")+")")},x.prototype._read_template=function(){var T="",L=this._input.peek();if(L==="<"){var q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&q==="?"&&(T=T||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&q==="%"&&(T=T||this.__patterns.erb.read())}else L==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(T=T||this.__patterns.handlebars_comment.read(),T=T||this.__patterns.handlebars_unescaped.read(),T=T||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(T=T||this.__patterns.django_value.read()),this._excluded.django||(T=T||this.__patterns.django_comment.read(),T=T||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(T=T||this.__patterns.smarty_comment.read(),T=T||this.__patterns.smarty_literal.read(),T=T||this.__patterns.smarty.read()));return T},ie.exports.TemplatablePattern=x}],Z={};function v(ie){var l=Z[ie];if(l!==void 0)return l.exports;var H=Z[ie]={exports:{}};return _e[ie](H,H.exports,v),H.exports}var me=v(0);be=me})();var Re=be;B=[],I=function(){return{js_beautify:Re}}.apply(ot,B),I!==void 0&&(Jt.exports=I)})()},15342:function(Jt){(function(B,I){Jt.exports=I()})(typeof self!="undefined"?self:this,function(){return function(ot){var B={};function I(be){if(B[be])return B[be].exports;var Re=B[be]={i:be,l:!1,exports:{}};return ot[be].call(Re.exports,Re,Re.exports,I),Re.l=!0,Re.exports}return I.m=ot,I.c=B,I.d=function(be,Re,_e){I.o(be,Re)||Object.defineProperty(be,Re,{enumerable:!0,get:_e})},I.r=function(be){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(be,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(be,"__esModule",{value:!0})},I.t=function(be,Re){if(Re&1&&(be=I(be)),Re&8||Re&4&&typeof be=="object"&&be&&be.__esModule)return be;var _e=Object.create(null);if(I.r(_e),Object.defineProperty(_e,"default",{enumerable:!0,value:be}),Re&2&&typeof be!="string")for(var Z in be)I.d(_e,Z,function(v){return be[v]}.bind(null,Z));return _e},I.n=function(be){var Re=be&&be.__esModule?function(){return be.default}:function(){return be};return I.d(Re,"a",Re),Re},I.o=function(be,Re){return Object.prototype.hasOwnProperty.call(be,Re)},I.p="",I(I.s=1)}([function(ot,B,I){},function(ot,B,I){"use strict";I.r(B);var be=I(0),Re=function(){function P(u,f,d){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=f,this.end=d}return P.range=function(f,d){return d?!f||!f.loc||!d.loc||f.loc.lexer!==d.loc.lexer?null:new P(f.loc.lexer,f.loc.start,d.loc.end):f&&f.loc},P}(),_e=function(){function P(f,d){this.text=void 0,this.loc=void 0,this.text=f,this.loc=d}var u=P.prototype;return u.range=function(d,g){return new P(g,Re.range(this,d))},P}(),Z=function P(u,f){this.position=void 0;var d="KaTeX parse error: "+u,g,w=f&&f.loc;if(w&&w.start<=w.end){var k=w.lexer.input;g=w.start;var X=w.end;g===k.length?d+=" at end of input: ":d+=" at position "+(g+1)+": ";var le=k.slice(g,X).replace(/[^]/g,"$&\u0332"),xe;g>15?xe="\u2026"+k.slice(g-15,g):xe=k.slice(0,g);var Ne;X+15<k.length?Ne=k.slice(X,X+15)+"\u2026":Ne=k.slice(X),d+=xe+le+Ne}var Qe=new Error(d);return Qe.name="ParseError",Qe.__proto__=P.prototype,Qe.position=g,Qe};Z.prototype.__proto__=Error.prototype;var v=Z,me=function(u,f){return u.indexOf(f)!==-1},ie=function(u,f){return u===void 0?f:u},l=/([A-Z])/g,H=function(u){return u.replace(l,"-$1").toLowerCase()},F={"&":"&",">":">","<":"<",'"':""","'":"'"},E=/[&><"']/g;function x(P){return String(P).replace(E,function(u){return F[u]})}var T=function P(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?P(u.body[0]):u:u.type==="font"?P(u.body):u},L=function(u){var f=T(u);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},q=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},Y=function(u){var f=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return f!=null?f[1]:"_relative"},$={contains:me,deflt:ie,escape:x,hyphenate:H,getBaseElem:T,isCharacterBox:L,protocolFromUrl:Y},A=function(){function P(f){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,f=f||{},this.displayMode=$.deflt(f.displayMode,!1),this.output=$.deflt(f.output,"htmlAndMathml"),this.leqno=$.deflt(f.leqno,!1),this.fleqn=$.deflt(f.fleqn,!1),this.throwOnError=$.deflt(f.throwOnError,!0),this.errorColor=$.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,$.deflt(f.minRuleThickness,0)),this.colorIsTextColor=$.deflt(f.colorIsTextColor,!1),this.strict=$.deflt(f.strict,"warn"),this.trust=$.deflt(f.trust,!1),this.maxSize=Math.max(0,$.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,$.deflt(f.maxExpand,1e3))}var u=P.prototype;return u.reportNonstrict=function(d,g,w){var k=this.strict;if(typeof k=="function"&&(k=k(d,g,w)),!(!k||k==="ignore")){if(k===!0||k==="error")throw new v("LaTeX-incompatible input and strict mode is set to 'error': "+(g+" ["+d+"]"),w);k==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+d+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+k+"': "+g+" ["+d+"]"))}},u.useStrictBehavior=function(d,g,w){var k=this.strict;if(typeof k=="function")try{k=k(d,g,w)}catch(X){k="error"}return!k||k==="ignore"?!1:k===!0||k==="error"?!0:k==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+d+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+k+"': "+g+" ["+d+"]")),!1)},u.isTrusted=function(d){d.url&&!d.protocol&&(d.protocol=$.protocolFromUrl(d.url));var g=typeof this.trust=="function"?this.trust(d):this.trust;return!!g},P}(),M=function(){function P(f,d,g){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=d,this.cramped=g}var u=P.prototype;return u.sup=function(){return ct[ae[this.id]]},u.sub=function(){return ct[j[this.id]]},u.fracNum=function(){return ct[ee[this.id]]},u.fracDen=function(){return ct[ne[this.id]]},u.cramp=function(){return ct[oe[this.id]]},u.text=function(){return ct[re[this.id]]},u.isTight=function(){return this.size>=2},P}(),O=0,W=1,ge=2,De=3,he=4,Me=5,Fe=6,ke=7,ct=[new M(O,0,!1),new M(W,0,!0),new M(ge,1,!1),new M(De,1,!0),new M(he,2,!1),new M(Me,2,!0),new M(Fe,3,!1),new M(ke,3,!0)],ae=[he,Me,he,Me,Fe,ke,Fe,ke],j=[Me,Me,Me,Me,ke,ke,ke,ke],ee=[ge,De,he,Me,Fe,ke,Fe,ke],ne=[De,De,Me,Me,ke,ke,ke,ke],oe=[W,W,De,De,Me,Me,ke,ke],re=[O,W,ge,De,ge,De,ge,De],b={DISPLAY:ct[O],TEXT:ct[ge],SCRIPT:ct[he],SCRIPTSCRIPT:ct[Fe]},S=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V(P){for(var u=0;u<S.length;u++)for(var f=S[u],d=0;d<f.blocks.length;d++){var g=f.blocks[d];if(P>=g[0]&&P<=g[1])return f.name}return null}var ve=[];S.forEach(function(P){return P.blocks.forEach(function(u){return ve.push.apply(ve,u)})});function He(P){for(var u=0;u<ve.length;u+=2)if(P>=ve[u]&&P<=ve[u+1])return!0;return!1}var st=80,tt=function(u,f){return"M95,"+(622+u+f)+`
|
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
c69,-144,104.5,-217.7,106.5,-221
|
|
l`+u/2.075+" -"+u+`
|
|
c5.3,-9.3,12,-14,20,-14
|
|
H400000v`+(40+u)+`H845.2724
|
|
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
M`+(834+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},Xe=function(u,f){return"M263,"+(601+u+f)+`c0.7,0,18,39.7,52,119
|
|
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
c340,-704.7,510.7,-1060.3,512,-1067
|
|
l`+u/2.084+" -"+u+`
|
|
c4.7,-7.3,11,-11,19,-11
|
|
H40000v`+(40+u)+`H1012.3
|
|
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
M`+(1001+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},xt=function(u,f){return"M983 "+(10+u+f)+`
|
|
l`+u/3.13+" -"+u+`
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+u)+`
|
|
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
M`+(1001+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},et=function(u,f){return"M424,"+(2398+u+f)+`
|
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
l`+u/4.223+" -"+u+`c4,-6.7,10,-10,18,-10 H400000
|
|
v`+(40+u)+`H1014.6
|
|
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2z M`+(1001+u)+" "+f+`
|
|
h400000v`+(40+u)+"h-400000z"},Ue=function(u,f){return"M473,"+(2713+u+f)+`
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+u/5.298+" -"+u+`
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+u)+`H1017.7
|
|
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
606zM`+(1001+u)+" "+f+"h400000v"+(40+u)+"H1017.7z"},Yt=function(u,f,d){var g=d-54-f-u;return"M702 "+(u+f)+"H400000"+(40+u)+`
|
|
H742v`+g+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
219 661 l218 661zM702 `+f+"H400000v"+(40+u)+"H742z"},Nt=function(u,f,d){f=1e3*f;var g="";switch(u){case"sqrtMain":g=tt(f,st);break;case"sqrtSize1":g=Xe(f,st);break;case"sqrtSize2":g=xt(f,st);break;case"sqrtSize3":g=et(f,st);break;case"sqrtSize4":g=Ue(f,st);break;case"sqrtTall":g=Yt(f,st,d)}return g},Sr={doubleleftarrow:`M262 157
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},wt=function(){function P(f){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=f,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=P.prototype;return u.hasClass=function(d){return $.contains(this.classes,d)},u.toNode=function(){for(var d=document.createDocumentFragment(),g=0;g<this.children.length;g++)d.appendChild(this.children[g].toNode());return d},u.toMarkup=function(){for(var d="",g=0;g<this.children.length;g++)d+=this.children[g].toMarkup();return d},u.toText=function(){var d=function(w){return w.toText()};return this.children.map(d).join("")},P}(),Er=function(u){return u.filter(function(f){return f}).join(" ")},ze=function(u,f,d){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=d||{},f){f.style.isTight()&&this.classes.push("mtight");var g=f.getColor();g&&(this.style.color=g)}},Oe=function(u){var f=document.createElement(u);f.className=Er(this.classes);for(var d in this.style)this.style.hasOwnProperty(d)&&(f.style[d]=this.style[d]);for(var g in this.attributes)this.attributes.hasOwnProperty(g)&&f.setAttribute(g,this.attributes[g]);for(var w=0;w<this.children.length;w++)f.appendChild(this.children[w].toNode());return f},Se=function(u){var f="<"+u;this.classes.length&&(f+=' class="'+$.escape(Er(this.classes))+'"');var d="";for(var g in this.style)this.style.hasOwnProperty(g)&&(d+=$.hyphenate(g)+":"+this.style[g]+";");d&&(f+=' style="'+$.escape(d)+'"');for(var w in this.attributes)this.attributes.hasOwnProperty(w)&&(f+=" "+w+'="'+$.escape(this.attributes[w])+'"');f+=">";for(var k=0;k<this.children.length;k++)f+=this.children[k].toMarkup();return f+="</"+u+">",f},qe=function(){function P(f,d,g,w){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ze.call(this,f,g,w),this.children=d||[]}var u=P.prototype;return u.setAttribute=function(d,g){this.attributes[d]=g},u.hasClass=function(d){return $.contains(this.classes,d)},u.toNode=function(){return Oe.call(this,"span")},u.toMarkup=function(){return Se.call(this,"span")},P}(),ht=function(){function P(f,d,g,w){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ze.call(this,d,w),this.children=g||[],this.setAttribute("href",f)}var u=P.prototype;return u.setAttribute=function(d,g){this.attributes[d]=g},u.hasClass=function(d){return $.contains(this.classes,d)},u.toNode=function(){return Oe.call(this,"a")},u.toMarkup=function(){return Se.call(this,"a")},P}(),pt=function(){function P(f,d,g){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=d,this.src=f,this.classes=["mord"],this.style=g}var u=P.prototype;return u.hasClass=function(d){return $.contains(this.classes,d)},u.toNode=function(){var d=document.createElement("img");d.src=this.src,d.alt=this.alt,d.className="mord";for(var g in this.style)this.style.hasOwnProperty(g)&&(d.style[g]=this.style[g]);return d},u.toMarkup=function(){var d="<img src='"+this.src+" 'alt='"+this.alt+"' ",g="";for(var w in this.style)this.style.hasOwnProperty(w)&&(g+=$.hyphenate(w)+":"+this.style[w]+";");return g&&(d+=' style="'+$.escape(g)+'"'),d+="'/>",d},P}(),Q={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},we=function(){function P(f,d,g,w,k,X,le,xe){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=f,this.height=d||0,this.depth=g||0,this.italic=w||0,this.skew=k||0,this.width=X||0,this.classes=le||[],this.style=xe||{},this.maxFontSize=0;var Ne=V(this.text.charCodeAt(0));Ne&&this.classes.push(Ne+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Q[this.text])}var u=P.prototype;return u.hasClass=function(d){return $.contains(this.classes,d)},u.toNode=function(){var d=document.createTextNode(this.text),g=null;this.italic>0&&(g=document.createElement("span"),g.style.marginRight=this.italic+"em"),this.classes.length>0&&(g=g||document.createElement("span"),g.className=Er(this.classes));for(var w in this.style)this.style.hasOwnProperty(w)&&(g=g||document.createElement("span"),g.style[w]=this.style[w]);return g?(g.appendChild(d),g):d},u.toMarkup=function(){var d=!1,g="<span";this.classes.length&&(d=!0,g+=' class="',g+=$.escape(Er(this.classes)),g+='"');var w="";this.italic>0&&(w+="margin-right:"+this.italic+"em;");for(var k in this.style)this.style.hasOwnProperty(k)&&(w+=$.hyphenate(k)+":"+this.style[k]+";");w&&(d=!0,g+=' style="'+$.escape(w)+'"');var X=$.escape(this.text);return d?(g+=">",g+=X,g+="</span>",g):X},P}(),$e=function(){function P(f,d){this.children=void 0,this.attributes=void 0,this.children=f||[],this.attributes=d||{}}var u=P.prototype;return u.toNode=function(){var d="http://www.w3.org/2000/svg",g=document.createElementNS(d,"svg");for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&g.setAttribute(w,this.attributes[w]);for(var k=0;k<this.children.length;k++)g.appendChild(this.children[k].toNode());return g},u.toMarkup=function(){var d="<svg";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(d+=" "+g+"='"+this.attributes[g]+"'");d+=">";for(var w=0;w<this.children.length;w++)d+=this.children[w].toMarkup();return d+="</svg>",d},P}(),Be=function(){function P(f,d){this.pathName=void 0,this.alternate=void 0,this.pathName=f,this.alternate=d}var u=P.prototype;return u.toNode=function(){var d="http://www.w3.org/2000/svg",g=document.createElementNS(d,"path");return this.alternate?g.setAttribute("d",this.alternate):g.setAttribute("d",Sr[this.pathName]),g},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Sr[this.pathName]+"'/>"},P}(),nt=function(){function P(f){this.attributes=void 0,this.attributes=f||{}}var u=P.prototype;return u.toNode=function(){var d="http://www.w3.org/2000/svg",g=document.createElementNS(d,"line");for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&g.setAttribute(w,this.attributes[w]);return g},u.toMarkup=function(){var d="<line";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(d+=" "+g+"='"+this.attributes[g]+"'");return d+="/>",d},P}();function gt(P){if(P instanceof we)return P;throw new Error("Expected symbolNode but got "+String(P)+".")}function Ot(P){if(P instanceof qe)return P;throw new Error("Expected span<HtmlDomNode> but got "+String(P)+".")}var yt={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Dt={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},vt={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Gt(P,u){yt[P]=u}function bt(P,u,f){if(!yt[u])throw new Error("Font metrics not found for font: "+u+".");var d=P.charCodeAt(0),g=yt[u][d];if(!g&&P[0]in vt&&(d=vt[P[0]].charCodeAt(0),g=yt[u][d]),!g&&f==="text"&&He(d)&&(g=yt[u][77]),g)return{depth:g[0],height:g[1],italic:g[2],skew:g[3],width:g[4]}}var At={};function kt(P){var u;if(P>=5?u=0:P>=3?u=1:u=2,!At[u]){var f=At[u]={cssEmPerMu:Dt.quad[u]/18};for(var d in Dt)Dt.hasOwnProperty(d)&&(f[d]=Dt[d][u])}return At[u]}var er={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Pt={math:{},text:{}},ir=Pt;function y(P,u,f,d,g,w){Pt[P][g]={font:u,group:f,replace:d},w&&d&&(Pt[P][d]=Pt[P][g])}var R="math",rt="text",U="main",te="ams",Zt="accent-token",Ae="bin",Te="close",Le="inner",K="mathord",J="op-token",Ee="open",Ce="punct",N="rel",Et="spacing",de="textord";y(R,U,N,"\u2261","\\equiv",!0),y(R,U,N,"\u227A","\\prec",!0),y(R,U,N,"\u227B","\\succ",!0),y(R,U,N,"\u223C","\\sim",!0),y(R,U,N,"\u22A5","\\perp"),y(R,U,N,"\u2AAF","\\preceq",!0),y(R,U,N,"\u2AB0","\\succeq",!0),y(R,U,N,"\u2243","\\simeq",!0),y(R,U,N,"\u2223","\\mid",!0),y(R,U,N,"\u226A","\\ll",!0),y(R,U,N,"\u226B","\\gg",!0),y(R,U,N,"\u224D","\\asymp",!0),y(R,U,N,"\u2225","\\parallel"),y(R,U,N,"\u22C8","\\bowtie",!0),y(R,U,N,"\u2323","\\smile",!0),y(R,U,N,"\u2291","\\sqsubseteq",!0),y(R,U,N,"\u2292","\\sqsupseteq",!0),y(R,U,N,"\u2250","\\doteq",!0),y(R,U,N,"\u2322","\\frown",!0),y(R,U,N,"\u220B","\\ni",!0),y(R,U,N,"\u221D","\\propto",!0),y(R,U,N,"\u22A2","\\vdash",!0),y(R,U,N,"\u22A3","\\dashv",!0),y(R,U,N,"\u220B","\\owns"),y(R,U,Ce,".","\\ldotp"),y(R,U,Ce,"\u22C5","\\cdotp"),y(R,U,de,"#","\\#"),y(rt,U,de,"#","\\#"),y(R,U,de,"&","\\&"),y(rt,U,de,"&","\\&"),y(R,U,de,"\u2135","\\aleph",!0),y(R,U,de,"\u2200","\\forall",!0),y(R,U,de,"\u210F","\\hbar",!0),y(R,U,de,"\u2203","\\exists",!0),y(R,U,de,"\u2207","\\nabla",!0),y(R,U,de,"\u266D","\\flat",!0),y(R,U,de,"\u2113","\\ell",!0),y(R,U,de,"\u266E","\\natural",!0),y(R,U,de,"\u2663","\\clubsuit",!0),y(R,U,de,"\u2118","\\wp",!0),y(R,U,de,"\u266F","\\sharp",!0),y(R,U,de,"\u2662","\\diamondsuit",!0),y(R,U,de,"\u211C","\\Re",!0),y(R,U,de,"\u2661","\\heartsuit",!0),y(R,U,de,"\u2111","\\Im",!0),y(R,U,de,"\u2660","\\spadesuit",!0),y(rt,U,de,"\xA7","\\S",!0),y(rt,U,de,"\xB6","\\P",!0),y(R,U,de,"\u2020","\\dag"),y(rt,U,de,"\u2020","\\dag"),y(rt,U,de,"\u2020","\\textdagger"),y(R,U,de,"\u2021","\\ddag"),y(rt,U,de,"\u2021","\\ddag"),y(rt,U,de,"\u2021","\\textdaggerdbl"),y(R,U,Te,"\u23B1","\\rmoustache",!0),y(R,U,Ee,"\u23B0","\\lmoustache",!0),y(R,U,Te,"\u27EF","\\rgroup",!0),y(R,U,Ee,"\u27EE","\\lgroup",!0),y(R,U,Ae,"\u2213","\\mp",!0),y(R,U,Ae,"\u2296","\\ominus",!0),y(R,U,Ae,"\u228E","\\uplus",!0),y(R,U,Ae,"\u2293","\\sqcap",!0),y(R,U,Ae,"\u2217","\\ast"),y(R,U,Ae,"\u2294","\\sqcup",!0),y(R,U,Ae,"\u25EF","\\bigcirc"),y(R,U,Ae,"\u2219","\\bullet"),y(R,U,Ae,"\u2021","\\ddagger"),y(R,U,Ae,"\u2240","\\wr",!0),y(R,U,Ae,"\u2A3F","\\amalg"),y(R,U,Ae,"&","\\And"),y(R,U,N,"\u27F5","\\longleftarrow",!0),y(R,U,N,"\u21D0","\\Leftarrow",!0),y(R,U,N,"\u27F8","\\Longleftarrow",!0),y(R,U,N,"\u27F6","\\longrightarrow",!0),y(R,U,N,"\u21D2","\\Rightarrow",!0),y(R,U,N,"\u27F9","\\Longrightarrow",!0),y(R,U,N,"\u2194","\\leftrightarrow",!0),y(R,U,N,"\u27F7","\\longleftrightarrow",!0),y(R,U,N,"\u21D4","\\Leftrightarrow",!0),y(R,U,N,"\u27FA","\\Longleftrightarrow",!0),y(R,U,N,"\u21A6","\\mapsto",!0),y(R,U,N,"\u27FC","\\longmapsto",!0),y(R,U,N,"\u2197","\\nearrow",!0),y(R,U,N,"\u21A9","\\hookleftarrow",!0),y(R,U,N,"\u21AA","\\hookrightarrow",!0),y(R,U,N,"\u2198","\\searrow",!0),y(R,U,N,"\u21BC","\\leftharpoonup",!0),y(R,U,N,"\u21C0","\\rightharpoonup",!0),y(R,U,N,"\u2199","\\swarrow",!0),y(R,U,N,"\u21BD","\\leftharpoondown",!0),y(R,U,N,"\u21C1","\\rightharpoondown",!0),y(R,U,N,"\u2196","\\nwarrow",!0),y(R,U,N,"\u21CC","\\rightleftharpoons",!0),y(R,te,N,"\u226E","\\nless",!0),y(R,te,N,"\uE010","\\@nleqslant"),y(R,te,N,"\uE011","\\@nleqq"),y(R,te,N,"\u2A87","\\lneq",!0),y(R,te,N,"\u2268","\\lneqq",!0),y(R,te,N,"\uE00C","\\@lvertneqq"),y(R,te,N,"\u22E6","\\lnsim",!0),y(R,te,N,"\u2A89","\\lnapprox",!0),y(R,te,N,"\u2280","\\nprec",!0),y(R,te,N,"\u22E0","\\npreceq",!0),y(R,te,N,"\u22E8","\\precnsim",!0),y(R,te,N,"\u2AB9","\\precnapprox",!0),y(R,te,N,"\u2241","\\nsim",!0),y(R,te,N,"\uE006","\\@nshortmid"),y(R,te,N,"\u2224","\\nmid",!0),y(R,te,N,"\u22AC","\\nvdash",!0),y(R,te,N,"\u22AD","\\nvDash",!0),y(R,te,N,"\u22EA","\\ntriangleleft"),y(R,te,N,"\u22EC","\\ntrianglelefteq",!0),y(R,te,N,"\u228A","\\subsetneq",!0),y(R,te,N,"\uE01A","\\@varsubsetneq"),y(R,te,N,"\u2ACB","\\subsetneqq",!0),y(R,te,N,"\uE017","\\@varsubsetneqq"),y(R,te,N,"\u226F","\\ngtr",!0),y(R,te,N,"\uE00F","\\@ngeqslant"),y(R,te,N,"\uE00E","\\@ngeqq"),y(R,te,N,"\u2A88","\\gneq",!0),y(R,te,N,"\u2269","\\gneqq",!0),y(R,te,N,"\uE00D","\\@gvertneqq"),y(R,te,N,"\u22E7","\\gnsim",!0),y(R,te,N,"\u2A8A","\\gnapprox",!0),y(R,te,N,"\u2281","\\nsucc",!0),y(R,te,N,"\u22E1","\\nsucceq",!0),y(R,te,N,"\u22E9","\\succnsim",!0),y(R,te,N,"\u2ABA","\\succnapprox",!0),y(R,te,N,"\u2246","\\ncong",!0),y(R,te,N,"\uE007","\\@nshortparallel"),y(R,te,N,"\u2226","\\nparallel",!0),y(R,te,N,"\u22AF","\\nVDash",!0),y(R,te,N,"\u22EB","\\ntriangleright"),y(R,te,N,"\u22ED","\\ntrianglerighteq",!0),y(R,te,N,"\uE018","\\@nsupseteqq"),y(R,te,N,"\u228B","\\supsetneq",!0),y(R,te,N,"\uE01B","\\@varsupsetneq"),y(R,te,N,"\u2ACC","\\supsetneqq",!0),y(R,te,N,"\uE019","\\@varsupsetneqq"),y(R,te,N,"\u22AE","\\nVdash",!0),y(R,te,N,"\u2AB5","\\precneqq",!0),y(R,te,N,"\u2AB6","\\succneqq",!0),y(R,te,N,"\uE016","\\@nsubseteqq"),y(R,te,Ae,"\u22B4","\\unlhd"),y(R,te,Ae,"\u22B5","\\unrhd"),y(R,te,N,"\u219A","\\nleftarrow",!0),y(R,te,N,"\u219B","\\nrightarrow",!0),y(R,te,N,"\u21CD","\\nLeftarrow",!0),y(R,te,N,"\u21CF","\\nRightarrow",!0),y(R,te,N,"\u21AE","\\nleftrightarrow",!0),y(R,te,N,"\u21CE","\\nLeftrightarrow",!0),y(R,te,N,"\u25B3","\\vartriangle"),y(R,te,de,"\u210F","\\hslash"),y(R,te,de,"\u25BD","\\triangledown"),y(R,te,de,"\u25CA","\\lozenge"),y(R,te,de,"\u24C8","\\circledS"),y(R,te,de,"\xAE","\\circledR"),y(rt,te,de,"\xAE","\\circledR"),y(R,te,de,"\u2221","\\measuredangle",!0),y(R,te,de,"\u2204","\\nexists"),y(R,te,de,"\u2127","\\mho"),y(R,te,de,"\u2132","\\Finv",!0),y(R,te,de,"\u2141","\\Game",!0),y(R,te,de,"\u2035","\\backprime"),y(R,te,de,"\u25B2","\\blacktriangle"),y(R,te,de,"\u25BC","\\blacktriangledown"),y(R,te,de,"\u25A0","\\blacksquare"),y(R,te,de,"\u29EB","\\blacklozenge"),y(R,te,de,"\u2605","\\bigstar"),y(R,te,de,"\u2222","\\sphericalangle",!0),y(R,te,de,"\u2201","\\complement",!0),y(R,te,de,"\xF0","\\eth",!0),y(R,te,de,"\u2571","\\diagup"),y(R,te,de,"\u2572","\\diagdown"),y(R,te,de,"\u25A1","\\square"),y(R,te,de,"\u25A1","\\Box"),y(R,te,de,"\u25CA","\\Diamond"),y(R,te,de,"\xA5","\\yen",!0),y(rt,te,de,"\xA5","\\yen",!0),y(R,te,de,"\u2713","\\checkmark",!0),y(rt,te,de,"\u2713","\\checkmark"),y(R,te,de,"\u2136","\\beth",!0),y(R,te,de,"\u2138","\\daleth",!0),y(R,te,de,"\u2137","\\gimel",!0),y(R,te,de,"\u03DD","\\digamma",!0),y(R,te,de,"\u03F0","\\varkappa"),y(R,te,Ee,"\u250C","\\ulcorner",!0),y(R,te,Te,"\u2510","\\urcorner",!0),y(R,te,Ee,"\u2514","\\llcorner",!0),y(R,te,Te,"\u2518","\\lrcorner",!0),y(R,te,N,"\u2266","\\leqq",!0),y(R,te,N,"\u2A7D","\\leqslant",!0),y(R,te,N,"\u2A95","\\eqslantless",!0),y(R,te,N,"\u2272","\\lesssim",!0),y(R,te,N,"\u2A85","\\lessapprox",!0),y(R,te,N,"\u224A","\\approxeq",!0),y(R,te,Ae,"\u22D6","\\lessdot"),y(R,te,N,"\u22D8","\\lll",!0),y(R,te,N,"\u2276","\\lessgtr",!0),y(R,te,N,"\u22DA","\\lesseqgtr",!0),y(R,te,N,"\u2A8B","\\lesseqqgtr",!0),y(R,te,N,"\u2251","\\doteqdot"),y(R,te,N,"\u2253","\\risingdotseq",!0),y(R,te,N,"\u2252","\\fallingdotseq",!0),y(R,te,N,"\u223D","\\backsim",!0),y(R,te,N,"\u22CD","\\backsimeq",!0),y(R,te,N,"\u2AC5","\\subseteqq",!0),y(R,te,N,"\u22D0","\\Subset",!0),y(R,te,N,"\u228F","\\sqsubset",!0),y(R,te,N,"\u227C","\\preccurlyeq",!0),y(R,te,N,"\u22DE","\\curlyeqprec",!0),y(R,te,N,"\u227E","\\precsim",!0),y(R,te,N,"\u2AB7","\\precapprox",!0),y(R,te,N,"\u22B2","\\vartriangleleft"),y(R,te,N,"\u22B4","\\trianglelefteq"),y(R,te,N,"\u22A8","\\vDash",!0),y(R,te,N,"\u22AA","\\Vvdash",!0),y(R,te,N,"\u2323","\\smallsmile"),y(R,te,N,"\u2322","\\smallfrown"),y(R,te,N,"\u224F","\\bumpeq",!0),y(R,te,N,"\u224E","\\Bumpeq",!0),y(R,te,N,"\u2267","\\geqq",!0),y(R,te,N,"\u2A7E","\\geqslant",!0),y(R,te,N,"\u2A96","\\eqslantgtr",!0),y(R,te,N,"\u2273","\\gtrsim",!0),y(R,te,N,"\u2A86","\\gtrapprox",!0),y(R,te,Ae,"\u22D7","\\gtrdot"),y(R,te,N,"\u22D9","\\ggg",!0),y(R,te,N,"\u2277","\\gtrless",!0),y(R,te,N,"\u22DB","\\gtreqless",!0),y(R,te,N,"\u2A8C","\\gtreqqless",!0),y(R,te,N,"\u2256","\\eqcirc",!0),y(R,te,N,"\u2257","\\circeq",!0),y(R,te,N,"\u225C","\\triangleq",!0),y(R,te,N,"\u223C","\\thicksim"),y(R,te,N,"\u2248","\\thickapprox"),y(R,te,N,"\u2AC6","\\supseteqq",!0),y(R,te,N,"\u22D1","\\Supset",!0),y(R,te,N,"\u2290","\\sqsupset",!0),y(R,te,N,"\u227D","\\succcurlyeq",!0),y(R,te,N,"\u22DF","\\curlyeqsucc",!0),y(R,te,N,"\u227F","\\succsim",!0),y(R,te,N,"\u2AB8","\\succapprox",!0),y(R,te,N,"\u22B3","\\vartriangleright"),y(R,te,N,"\u22B5","\\trianglerighteq"),y(R,te,N,"\u22A9","\\Vdash",!0),y(R,te,N,"\u2223","\\shortmid"),y(R,te,N,"\u2225","\\shortparallel"),y(R,te,N,"\u226C","\\between",!0),y(R,te,N,"\u22D4","\\pitchfork",!0),y(R,te,N,"\u221D","\\varpropto"),y(R,te,N,"\u25C0","\\blacktriangleleft"),y(R,te,N,"\u2234","\\therefore",!0),y(R,te,N,"\u220D","\\backepsilon"),y(R,te,N,"\u25B6","\\blacktriangleright"),y(R,te,N,"\u2235","\\because",!0),y(R,te,N,"\u22D8","\\llless"),y(R,te,N,"\u22D9","\\gggtr"),y(R,te,Ae,"\u22B2","\\lhd"),y(R,te,Ae,"\u22B3","\\rhd"),y(R,te,N,"\u2242","\\eqsim",!0),y(R,U,N,"\u22C8","\\Join"),y(R,te,N,"\u2251","\\Doteq",!0),y(R,te,Ae,"\u2214","\\dotplus",!0),y(R,te,Ae,"\u2216","\\smallsetminus"),y(R,te,Ae,"\u22D2","\\Cap",!0),y(R,te,Ae,"\u22D3","\\Cup",!0),y(R,te,Ae,"\u2A5E","\\doublebarwedge",!0),y(R,te,Ae,"\u229F","\\boxminus",!0),y(R,te,Ae,"\u229E","\\boxplus",!0),y(R,te,Ae,"\u22C7","\\divideontimes",!0),y(R,te,Ae,"\u22C9","\\ltimes",!0),y(R,te,Ae,"\u22CA","\\rtimes",!0),y(R,te,Ae,"\u22CB","\\leftthreetimes",!0),y(R,te,Ae,"\u22CC","\\rightthreetimes",!0),y(R,te,Ae,"\u22CF","\\curlywedge",!0),y(R,te,Ae,"\u22CE","\\curlyvee",!0),y(R,te,Ae,"\u229D","\\circleddash",!0),y(R,te,Ae,"\u229B","\\circledast",!0),y(R,te,Ae,"\u22C5","\\centerdot"),y(R,te,Ae,"\u22BA","\\intercal",!0),y(R,te,Ae,"\u22D2","\\doublecap"),y(R,te,Ae,"\u22D3","\\doublecup"),y(R,te,Ae,"\u22A0","\\boxtimes",!0),y(R,te,N,"\u21E2","\\dashrightarrow",!0),y(R,te,N,"\u21E0","\\dashleftarrow",!0),y(R,te,N,"\u21C7","\\leftleftarrows",!0),y(R,te,N,"\u21C6","\\leftrightarrows",!0),y(R,te,N,"\u21DA","\\Lleftarrow",!0),y(R,te,N,"\u219E","\\twoheadleftarrow",!0),y(R,te,N,"\u21A2","\\leftarrowtail",!0),y(R,te,N,"\u21AB","\\looparrowleft",!0),y(R,te,N,"\u21CB","\\leftrightharpoons",!0),y(R,te,N,"\u21B6","\\curvearrowleft",!0),y(R,te,N,"\u21BA","\\circlearrowleft",!0),y(R,te,N,"\u21B0","\\Lsh",!0),y(R,te,N,"\u21C8","\\upuparrows",!0),y(R,te,N,"\u21BF","\\upharpoonleft",!0),y(R,te,N,"\u21C3","\\downharpoonleft",!0),y(R,te,N,"\u22B8","\\multimap",!0),y(R,te,N,"\u21AD","\\leftrightsquigarrow",!0),y(R,te,N,"\u21C9","\\rightrightarrows",!0),y(R,te,N,"\u21C4","\\rightleftarrows",!0),y(R,te,N,"\u21A0","\\twoheadrightarrow",!0),y(R,te,N,"\u21A3","\\rightarrowtail",!0),y(R,te,N,"\u21AC","\\looparrowright",!0),y(R,te,N,"\u21B7","\\curvearrowright",!0),y(R,te,N,"\u21BB","\\circlearrowright",!0),y(R,te,N,"\u21B1","\\Rsh",!0),y(R,te,N,"\u21CA","\\downdownarrows",!0),y(R,te,N,"\u21BE","\\upharpoonright",!0),y(R,te,N,"\u21C2","\\downharpoonright",!0),y(R,te,N,"\u21DD","\\rightsquigarrow",!0),y(R,te,N,"\u21DD","\\leadsto"),y(R,te,N,"\u21DB","\\Rrightarrow",!0),y(R,te,N,"\u21BE","\\restriction"),y(R,U,de,"\u2018","`"),y(R,U,de,"$","\\$"),y(rt,U,de,"$","\\$"),y(rt,U,de,"$","\\textdollar"),y(R,U,de,"%","\\%"),y(rt,U,de,"%","\\%"),y(R,U,de,"_","\\_"),y(rt,U,de,"_","\\_"),y(rt,U,de,"_","\\textunderscore"),y(R,U,de,"\u2220","\\angle",!0),y(R,U,de,"\u221E","\\infty",!0),y(R,U,de,"\u2032","\\prime"),y(R,U,de,"\u25B3","\\triangle"),y(R,U,de,"\u0393","\\Gamma",!0),y(R,U,de,"\u0394","\\Delta",!0),y(R,U,de,"\u0398","\\Theta",!0),y(R,U,de,"\u039B","\\Lambda",!0),y(R,U,de,"\u039E","\\Xi",!0),y(R,U,de,"\u03A0","\\Pi",!0),y(R,U,de,"\u03A3","\\Sigma",!0),y(R,U,de,"\u03A5","\\Upsilon",!0),y(R,U,de,"\u03A6","\\Phi",!0),y(R,U,de,"\u03A8","\\Psi",!0),y(R,U,de,"\u03A9","\\Omega",!0),y(R,U,de,"A","\u0391"),y(R,U,de,"B","\u0392"),y(R,U,de,"E","\u0395"),y(R,U,de,"Z","\u0396"),y(R,U,de,"H","\u0397"),y(R,U,de,"I","\u0399"),y(R,U,de,"K","\u039A"),y(R,U,de,"M","\u039C"),y(R,U,de,"N","\u039D"),y(R,U,de,"O","\u039F"),y(R,U,de,"P","\u03A1"),y(R,U,de,"T","\u03A4"),y(R,U,de,"X","\u03A7"),y(R,U,de,"\xAC","\\neg",!0),y(R,U,de,"\xAC","\\lnot"),y(R,U,de,"\u22A4","\\top"),y(R,U,de,"\u22A5","\\bot"),y(R,U,de,"\u2205","\\emptyset"),y(R,te,de,"\u2205","\\varnothing"),y(R,U,K,"\u03B1","\\alpha",!0),y(R,U,K,"\u03B2","\\beta",!0),y(R,U,K,"\u03B3","\\gamma",!0),y(R,U,K,"\u03B4","\\delta",!0),y(R,U,K,"\u03F5","\\epsilon",!0),y(R,U,K,"\u03B6","\\zeta",!0),y(R,U,K,"\u03B7","\\eta",!0),y(R,U,K,"\u03B8","\\theta",!0),y(R,U,K,"\u03B9","\\iota",!0),y(R,U,K,"\u03BA","\\kappa",!0),y(R,U,K,"\u03BB","\\lambda",!0),y(R,U,K,"\u03BC","\\mu",!0),y(R,U,K,"\u03BD","\\nu",!0),y(R,U,K,"\u03BE","\\xi",!0),y(R,U,K,"\u03BF","\\omicron",!0),y(R,U,K,"\u03C0","\\pi",!0),y(R,U,K,"\u03C1","\\rho",!0),y(R,U,K,"\u03C3","\\sigma",!0),y(R,U,K,"\u03C4","\\tau",!0),y(R,U,K,"\u03C5","\\upsilon",!0),y(R,U,K,"\u03D5","\\phi",!0),y(R,U,K,"\u03C7","\\chi",!0),y(R,U,K,"\u03C8","\\psi",!0),y(R,U,K,"\u03C9","\\omega",!0),y(R,U,K,"\u03B5","\\varepsilon",!0),y(R,U,K,"\u03D1","\\vartheta",!0),y(R,U,K,"\u03D6","\\varpi",!0),y(R,U,K,"\u03F1","\\varrho",!0),y(R,U,K,"\u03C2","\\varsigma",!0),y(R,U,K,"\u03C6","\\varphi",!0),y(R,U,Ae,"\u2217","*"),y(R,U,Ae,"+","+"),y(R,U,Ae,"\u2212","-"),y(R,U,Ae,"\u22C5","\\cdot",!0),y(R,U,Ae,"\u2218","\\circ"),y(R,U,Ae,"\xF7","\\div",!0),y(R,U,Ae,"\xB1","\\pm",!0),y(R,U,Ae,"\xD7","\\times",!0),y(R,U,Ae,"\u2229","\\cap",!0),y(R,U,Ae,"\u222A","\\cup",!0),y(R,U,Ae,"\u2216","\\setminus"),y(R,U,Ae,"\u2227","\\land"),y(R,U,Ae,"\u2228","\\lor"),y(R,U,Ae,"\u2227","\\wedge",!0),y(R,U,Ae,"\u2228","\\vee",!0),y(R,U,de,"\u221A","\\surd"),y(R,U,Ee,"(","("),y(R,U,Ee,"[","["),y(R,U,Ee,"\u27E8","\\langle",!0),y(R,U,Ee,"\u2223","\\lvert"),y(R,U,Ee,"\u2225","\\lVert"),y(R,U,Te,")",")"),y(R,U,Te,"]","]"),y(R,U,Te,"?","?"),y(R,U,Te,"!","!"),y(R,U,Te,"\u27E9","\\rangle",!0),y(R,U,Te,"\u2223","\\rvert"),y(R,U,Te,"\u2225","\\rVert"),y(R,U,N,"=","="),y(R,U,N,"<","<"),y(R,U,N,">",">"),y(R,U,N,":",":"),y(R,U,N,"\u2248","\\approx",!0),y(R,U,N,"\u2245","\\cong",!0),y(R,U,N,"\u2265","\\ge"),y(R,U,N,"\u2265","\\geq",!0),y(R,U,N,"\u2190","\\gets"),y(R,U,N,">","\\gt"),y(R,U,N,"\u2208","\\in",!0),y(R,U,N,"\uE020","\\@not"),y(R,U,N,"\u2282","\\subset",!0),y(R,U,N,"\u2283","\\supset",!0),y(R,U,N,"\u2286","\\subseteq",!0),y(R,U,N,"\u2287","\\supseteq",!0),y(R,te,N,"\u2288","\\nsubseteq",!0),y(R,te,N,"\u2289","\\nsupseteq",!0),y(R,U,N,"\u22A8","\\models"),y(R,U,N,"\u2190","\\leftarrow",!0),y(R,U,N,"\u2264","\\le"),y(R,U,N,"\u2264","\\leq",!0),y(R,U,N,"<","\\lt"),y(R,U,N,"\u2192","\\rightarrow",!0),y(R,U,N,"\u2192","\\to"),y(R,te,N,"\u2271","\\ngeq",!0),y(R,te,N,"\u2270","\\nleq",!0),y(R,U,Et,"\xA0","\\ "),y(R,U,Et,"\xA0","~"),y(R,U,Et,"\xA0","\\space"),y(R,U,Et,"\xA0","\\nobreakspace"),y(rt,U,Et,"\xA0","\\ "),y(rt,U,Et,"\xA0","~"),y(rt,U,Et,"\xA0","\\space"),y(rt,U,Et,"\xA0","\\nobreakspace"),y(R,U,Et,null,"\\nobreak"),y(R,U,Et,null,"\\allowbreak"),y(R,U,Ce,",",","),y(R,U,Ce,";",";"),y(R,te,Ae,"\u22BC","\\barwedge",!0),y(R,te,Ae,"\u22BB","\\veebar",!0),y(R,U,Ae,"\u2299","\\odot",!0),y(R,U,Ae,"\u2295","\\oplus",!0),y(R,U,Ae,"\u2297","\\otimes",!0),y(R,U,de,"\u2202","\\partial",!0),y(R,U,Ae,"\u2298","\\oslash",!0),y(R,te,Ae,"\u229A","\\circledcirc",!0),y(R,te,Ae,"\u22A1","\\boxdot",!0),y(R,U,Ae,"\u25B3","\\bigtriangleup"),y(R,U,Ae,"\u25BD","\\bigtriangledown"),y(R,U,Ae,"\u2020","\\dagger"),y(R,U,Ae,"\u22C4","\\diamond"),y(R,U,Ae,"\u22C6","\\star"),y(R,U,Ae,"\u25C3","\\triangleleft"),y(R,U,Ae,"\u25B9","\\triangleright"),y(R,U,Ee,"{","\\{"),y(rt,U,de,"{","\\{"),y(rt,U,de,"{","\\textbraceleft"),y(R,U,Te,"}","\\}"),y(rt,U,de,"}","\\}"),y(rt,U,de,"}","\\textbraceright"),y(R,U,Ee,"{","\\lbrace"),y(R,U,Te,"}","\\rbrace"),y(R,U,Ee,"[","\\lbrack"),y(rt,U,de,"[","\\lbrack"),y(R,U,Te,"]","\\rbrack"),y(rt,U,de,"]","\\rbrack"),y(R,U,Ee,"(","\\lparen"),y(R,U,Te,")","\\rparen"),y(rt,U,de,"<","\\textless"),y(rt,U,de,">","\\textgreater"),y(R,U,Ee,"\u230A","\\lfloor",!0),y(R,U,Te,"\u230B","\\rfloor",!0),y(R,U,Ee,"\u2308","\\lceil",!0),y(R,U,Te,"\u2309","\\rceil",!0),y(R,U,de,"\\","\\backslash"),y(R,U,de,"\u2223","|"),y(R,U,de,"\u2223","\\vert"),y(rt,U,de,"|","\\textbar"),y(R,U,de,"\u2225","\\|"),y(R,U,de,"\u2225","\\Vert"),y(rt,U,de,"\u2225","\\textbardbl"),y(rt,U,de,"~","\\textasciitilde"),y(rt,U,de,"\\","\\textbackslash"),y(rt,U,de,"^","\\textasciicircum"),y(R,U,N,"\u2191","\\uparrow",!0),y(R,U,N,"\u21D1","\\Uparrow",!0),y(R,U,N,"\u2193","\\downarrow",!0),y(R,U,N,"\u21D3","\\Downarrow",!0),y(R,U,N,"\u2195","\\updownarrow",!0),y(R,U,N,"\u21D5","\\Updownarrow",!0),y(R,U,J,"\u2210","\\coprod"),y(R,U,J,"\u22C1","\\bigvee"),y(R,U,J,"\u22C0","\\bigwedge"),y(R,U,J,"\u2A04","\\biguplus"),y(R,U,J,"\u22C2","\\bigcap"),y(R,U,J,"\u22C3","\\bigcup"),y(R,U,J,"\u222B","\\int"),y(R,U,J,"\u222B","\\intop"),y(R,U,J,"\u222C","\\iint"),y(R,U,J,"\u222D","\\iiint"),y(R,U,J,"\u220F","\\prod"),y(R,U,J,"\u2211","\\sum"),y(R,U,J,"\u2A02","\\bigotimes"),y(R,U,J,"\u2A01","\\bigoplus"),y(R,U,J,"\u2A00","\\bigodot"),y(R,U,J,"\u222E","\\oint"),y(R,U,J,"\u222F","\\oiint"),y(R,U,J,"\u2230","\\oiiint"),y(R,U,J,"\u2A06","\\bigsqcup"),y(R,U,J,"\u222B","\\smallint"),y(rt,U,Le,"\u2026","\\textellipsis"),y(R,U,Le,"\u2026","\\mathellipsis"),y(rt,U,Le,"\u2026","\\ldots",!0),y(R,U,Le,"\u2026","\\ldots",!0),y(R,U,Le,"\u22EF","\\@cdots",!0),y(R,U,Le,"\u22F1","\\ddots",!0),y(R,U,de,"\u22EE","\\varvdots"),y(R,U,Zt,"\u02CA","\\acute"),y(R,U,Zt,"\u02CB","\\grave"),y(R,U,Zt,"\xA8","\\ddot"),y(R,U,Zt,"~","\\tilde"),y(R,U,Zt,"\u02C9","\\bar"),y(R,U,Zt,"\u02D8","\\breve"),y(R,U,Zt,"\u02C7","\\check"),y(R,U,Zt,"^","\\hat"),y(R,U,Zt,"\u20D7","\\vec"),y(R,U,Zt,"\u02D9","\\dot"),y(R,U,Zt,"\u02DA","\\mathring"),y(R,U,K,"\u0131","\\imath",!0),y(R,U,K,"\u0237","\\jmath",!0),y(rt,U,de,"\u0131","\\i",!0),y(rt,U,de,"\u0237","\\j",!0),y(rt,U,de,"\xDF","\\ss",!0),y(rt,U,de,"\xE6","\\ae",!0),y(rt,U,de,"\xE6","\\ae",!0),y(rt,U,de,"\u0153","\\oe",!0),y(rt,U,de,"\xF8","\\o",!0),y(rt,U,de,"\xC6","\\AE",!0),y(rt,U,de,"\u0152","\\OE",!0),y(rt,U,de,"\xD8","\\O",!0),y(rt,U,Zt,"\u02CA","\\'"),y(rt,U,Zt,"\u02CB","\\`"),y(rt,U,Zt,"\u02C6","\\^"),y(rt,U,Zt,"\u02DC","\\~"),y(rt,U,Zt,"\u02C9","\\="),y(rt,U,Zt,"\u02D8","\\u"),y(rt,U,Zt,"\u02D9","\\."),y(rt,U,Zt,"\u02DA","\\r"),y(rt,U,Zt,"\u02C7","\\v"),y(rt,U,Zt,"\xA8",'\\"'),y(rt,U,Zt,"\u02DD","\\H"),y(rt,U,Zt,"\u25EF","\\textcircled");var Bt={"--":!0,"---":!0,"``":!0,"''":!0};y(rt,U,de,"\u2013","--"),y(rt,U,de,"\u2013","\\textendash"),y(rt,U,de,"\u2014","---"),y(rt,U,de,"\u2014","\\textemdash"),y(rt,U,de,"\u2018","`"),y(rt,U,de,"\u2018","\\textquoteleft"),y(rt,U,de,"\u2019","'"),y(rt,U,de,"\u2019","\\textquoteright"),y(rt,U,de,"\u201C","``"),y(rt,U,de,"\u201C","\\textquotedblleft"),y(rt,U,de,"\u201D","''"),y(rt,U,de,"\u201D","\\textquotedblright"),y(R,U,de,"\xB0","\\degree",!0),y(rt,U,de,"\xB0","\\degree"),y(rt,U,de,"\xB0","\\textdegree",!0),y(R,U,K,"\xA3","\\pounds"),y(R,U,K,"\xA3","\\mathsterling",!0),y(rt,U,K,"\xA3","\\pounds"),y(rt,U,K,"\xA3","\\textsterling",!0),y(R,te,de,"\u2720","\\maltese"),y(rt,te,de,"\u2720","\\maltese"),y(rt,U,Et,"\xA0","\\ "),y(rt,U,Et,"\xA0"," "),y(rt,U,Et,"\xA0","~");for(var Xt='0123456789/@."',Br=0;Br<Xt.length;Br++){var cn=Xt.charAt(Br);y(R,U,de,cn,cn)}for(var jr='0123456789!@*()-=+[]<>|";:?/.,',vr=0;vr<jr.length;vr++){var xn=jr.charAt(vr);y(rt,U,de,xn,xn)}for(var $n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Jr=0;Jr<$n.length;Jr++){var en=$n.charAt(Jr);y(R,U,K,en,en),y(rt,U,de,en,en)}y(R,te,de,"C","\u2102"),y(rt,te,de,"C","\u2102"),y(R,te,de,"H","\u210D"),y(rt,te,de,"H","\u210D"),y(R,te,de,"N","\u2115"),y(rt,te,de,"N","\u2115"),y(R,te,de,"P","\u2119"),y(rt,te,de,"P","\u2119"),y(R,te,de,"Q","\u211A"),y(rt,te,de,"Q","\u211A"),y(R,te,de,"R","\u211D"),y(rt,te,de,"R","\u211D"),y(R,te,de,"Z","\u2124"),y(rt,te,de,"Z","\u2124"),y(R,U,K,"h","\u210E"),y(rt,U,K,"h","\u210E");for(var $t="",xr=0;xr<$n.length;xr++){var se=$n.charAt(xr);$t=String.fromCharCode(55349,56320+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56372+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56424+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56580+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56736+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56788+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56840+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56944+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),xr<26&&($t=String.fromCharCode(55349,56632+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t),$t=String.fromCharCode(55349,56476+xr),y(R,U,K,se,$t),y(rt,U,de,se,$t))}$t="\u{1D55C}",y(R,U,K,"k",$t),y(rt,U,de,"k",$t);for(var ce=0;ce<10;ce++){var ft=ce.toString();$t=String.fromCharCode(55349,57294+ce),y(R,U,K,ft,$t),y(rt,U,de,ft,$t),$t=String.fromCharCode(55349,57314+ce),y(R,U,K,ft,$t),y(rt,U,de,ft,$t),$t=String.fromCharCode(55349,57324+ce),y(R,U,K,ft,$t),y(rt,U,de,ft,$t),$t=String.fromCharCode(55349,57334+ce),y(R,U,K,ft,$t),y(rt,U,de,ft,$t)}for(var _t="\xC7\xD0\xDE\xE7\xFE",Ct=0;Ct<_t.length;Ct++){var Kt=_t.charAt(Ct);y(R,U,K,Kt,Kt),y(rt,U,de,Kt,Kt)}y(rt,U,de,"\xF0","\xF0"),y(rt,U,de,"\u2013","\u2013"),y(rt,U,de,"\u2014","\u2014"),y(rt,U,de,"\u2018","\u2018"),y(rt,U,de,"\u2019","\u2019"),y(rt,U,de,"\u201C","\u201C"),y(rt,U,de,"\u201D","\u201D");var jt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Wt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ht=function(u,f){var d=u.charCodeAt(0),g=u.charCodeAt(1),w=(d-55296)*1024+(g-56320)+65536,k=f==="math"?0:1;if(119808<=w&&w<120484){var X=Math.floor((w-119808)/26);return[jt[X][2],jt[X][k]]}else if(120782<=w&&w<=120831){var le=Math.floor((w-120782)/10);return[Wt[le][2],Wt[le][k]]}else{if(w===120485||w===120486)return[jt[0][2],jt[0][k]];if(120486<w&&w<120782)return["",""];throw new v("Unsupported character: "+u)}},hr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_r=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Kr=function(u,f){return f.size<2?u:hr[u-1][f.size-1]},Nr=function(){function P(f){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=f.style,this.color=f.color,this.size=f.size||P.BASESIZE,this.textSize=f.textSize||this.size,this.phantom=!!f.phantom,this.font=f.font||"",this.fontFamily=f.fontFamily||"",this.fontWeight=f.fontWeight||"",this.fontShape=f.fontShape||"",this.sizeMultiplier=_r[this.size-1],this.maxSize=f.maxSize,this.minRuleThickness=f.minRuleThickness,this._fontMetrics=void 0}var u=P.prototype;return u.extend=function(d){var g={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var w in d)d.hasOwnProperty(w)&&(g[w]=d[w]);return new P(g)},u.havingStyle=function(d){return this.style===d?this:this.extend({style:d,size:Kr(this.textSize,d)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(d){return this.size===d&&this.textSize===d?this:this.extend({style:this.style.text(),size:d,textSize:d,sizeMultiplier:_r[d-1]})},u.havingBaseStyle=function(d){d=d||this.style.text();var g=Kr(P.BASESIZE,d);return this.size===g&&this.textSize===P.BASESIZE&&this.style===d?this:this.extend({style:d,size:g})},u.havingBaseSizing=function(){var d;switch(this.style.id){case 4:case 5:d=3;break;case 6:case 7:d=1;break;default:d=6}return this.extend({style:this.style.text(),size:d})},u.withColor=function(d){return this.extend({color:d})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(d){return this.extend({font:d})},u.withTextFontFamily=function(d){return this.extend({fontFamily:d,font:""})},u.withTextFontWeight=function(d){return this.extend({fontWeight:d,font:""})},u.withTextFontShape=function(d){return this.extend({fontShape:d,font:""})},u.sizingClasses=function(d){return d.size!==this.size?["sizing","reset-size"+d.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==P.BASESIZE?["sizing","reset-size"+this.size,"size"+P.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=kt(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},P}();Nr.BASESIZE=6;var Qr=Nr,_n={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Zr={ex:!0,em:!0,mu:!0},sn=function(u){return typeof u!="string"&&(u=u.unit),u in _n||u in Zr||u==="ex"},Ie=function(u,f){var d;if(u.unit in _n)d=_n[u.unit]/f.fontMetrics().ptPerEm/f.sizeMultiplier;else if(u.unit==="mu")d=f.fontMetrics().cssEmPerMu;else{var g;if(f.style.isTight()?g=f.havingStyle(f.style.text()):g=f,u.unit==="ex")d=g.fontMetrics().xHeight;else if(u.unit==="em")d=g.fontMetrics().quad;else throw new v("Invalid unit: '"+u.unit+"'");g!==f&&(d*=g.sizeMultiplier/f.sizeMultiplier)}return Math.min(u.number*d,f.maxSize)},Ge=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],lt=function(u,f,d){return ir[d][u]&&ir[d][u].replace&&(u=ir[d][u].replace),{value:u,metrics:bt(u,f,d)}},Ze=function(u,f,d,g,w){var k=lt(u,f,d),X=k.metrics;u=k.value;var le;if(X){var xe=X.italic;(d==="text"||g&&g.font==="mathit")&&(xe=0),le=new we(u,X.height,X.depth,xe,X.skew,X.width,w)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+f+"' and mode '"+d+"'")),le=new we(u,0,0,0,0,0,w);if(g){le.maxFontSize=g.sizeMultiplier,g.style.isTight()&&le.classes.push("mtight");var Ne=g.getColor();Ne&&(le.style.color=Ne)}return le},Je=function(u,f,d,g){return g===void 0&&(g=[]),d.font==="boldsymbol"&<(u,"Main-Bold",f).metrics?Ze(u,"Main-Bold",f,d,g.concat(["mathbf"])):u==="\\"||ir[f][u].font==="main"?Ze(u,"Main-Regular",f,d,g):Ze(u,"AMS-Regular",f,d,g.concat(["amsrm"]))},ut=function(u,f,d,g){return/[0-9]/.test(u.charAt(0))||$.contains(Ge,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},St=function(u,f,d,g){return $.contains(Ge,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},It=function(u,f,d,g){return lt(u,"Math-BoldItalic",f).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Qt=function(u,f,d){var g=u.mode,w=u.text,k=["mord"],X=g==="math"||g==="text"&&f.font,le=X?f.font:f.fontFamily;if(w.charCodeAt(0)===55349){var xe=Ht(w,g),Ne=xe[0],Qe=xe[1];return Ze(w,Ne,g,f,k.concat(Qe))}else if(le){var mt,Lt;if(le==="boldsymbol"||le==="mathnormal"){var zt=le==="boldsymbol"?It(w,g,f,k):St(w,g,f,k);mt=zt.fontName,Lt=[zt.fontClass]}else $.contains(Ge,w)?(mt="Main-Italic",Lt=["mathit"]):X?(mt=pr[le].fontName,Lt=[le]):(mt=tn(le,f.fontWeight,f.fontShape),Lt=[le,f.fontWeight,f.fontShape]);if(lt(w,mt,g).metrics)return Ze(w,mt,g,f,k.concat(Lt));if(Bt.hasOwnProperty(w)&&mt.substr(0,10)==="Typewriter"){for(var sr=[],Ar=0;Ar<w.length;Ar++)sr.push(Ze(w[Ar],mt,g,f,k.concat(Lt)));return Ut(sr)}}if(d==="mathord"){var Rr=ut(w,g,f,k);return Ze(w,Rr.fontName,g,f,k.concat([Rr.fontClass]))}else if(d==="textord"){var Yr=ir[g][w]&&ir[g][w].font;if(Yr==="ams"){var nn=tn("amsrm",f.fontWeight,f.fontShape);return Ze(w,nn,g,f,k.concat("amsrm",f.fontWeight,f.fontShape))}else if(Yr==="main"||!Yr){var Gn=tn("textrm",f.fontWeight,f.fontShape);return Ze(w,Gn,g,f,k.concat(f.fontWeight,f.fontShape))}else{var Pn=tn(Yr,f.fontWeight,f.fontShape);return Ze(w,Pn,g,f,k.concat(Pn,f.fontWeight,f.fontShape))}}else throw new Error("unexpected type: "+d+" in makeOrd")},tr=function(u,f){if(Er(u.classes)!==Er(f.classes)||u.skew!==f.skew||u.maxFontSize!==f.maxFontSize)return!1;for(var d in u.style)if(u.style.hasOwnProperty(d)&&u.style[d]!==f.style[d])return!1;for(var g in f.style)if(f.style.hasOwnProperty(g)&&u.style[g]!==f.style[g])return!1;return!0},cr=function(u){for(var f=0;f<u.length-1;f++){var d=u[f],g=u[f+1];d instanceof we&&g instanceof we&&tr(d,g)&&(d.text+=g.text,d.height=Math.max(d.height,g.height),d.depth=Math.max(d.depth,g.depth),d.italic=g.italic,u.splice(f+1,1),f--)}return u},Vt=function(u){for(var f=0,d=0,g=0,w=0;w<u.children.length;w++){var k=u.children[w];k.height>f&&(f=k.height),k.depth>d&&(d=k.depth),k.maxFontSize>g&&(g=k.maxFontSize)}u.height=f,u.depth=d,u.maxFontSize=g},Ft=function(u,f,d,g){var w=new qe(u,f,d,g);return Vt(w),w},rr=function(u,f,d,g){return new qe(u,f,d,g)},$r=function(u,f,d){var g=Ft([u],[],f);return g.height=Math.max(d||f.fontMetrics().defaultRuleThickness,f.minRuleThickness),g.style.borderBottomWidth=g.height+"em",g.maxFontSize=1,g},Ur=function(u,f,d,g){var w=new ht(u,f,d,g);return Vt(w),w},Ut=function(u){var f=new wt(u);return Vt(f),f},yr=function(u,f){return u instanceof wt?Ft([],[u],f):u},Vr=function(u){if(u.positionType==="individualShift"){for(var f=u.children,d=[f[0]],g=-f[0].shift-f[0].elem.depth,w=g,k=1;k<f.length;k++){var X=-f[k].shift-w-f[k].elem.depth,le=X-(f[k-1].elem.height+f[k-1].elem.depth);w=w+X,d.push({type:"kern",size:le}),d.push(f[k])}return{children:d,depth:g}}var xe;if(u.positionType==="top"){for(var Ne=u.positionData,Qe=0;Qe<u.children.length;Qe++){var mt=u.children[Qe];Ne-=mt.type==="kern"?mt.size:mt.elem.height+mt.elem.depth}xe=Ne}else if(u.positionType==="bottom")xe=-u.positionData;else{var Lt=u.children[0];if(Lt.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")xe=-Lt.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")xe=-Lt.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:xe}},Ir=function(u,f){for(var d=Vr(u),g=d.children,w=d.depth,k=0,X=0;X<g.length;X++){var le=g[X];if(le.type==="elem"){var xe=le.elem;k=Math.max(k,xe.maxFontSize,xe.height)}}k+=2;var Ne=Ft(["pstrut"],[]);Ne.style.height=k+"em";for(var Qe=[],mt=w,Lt=w,zt=w,sr=0;sr<g.length;sr++){var Ar=g[sr];if(Ar.type==="kern")zt+=Ar.size;else{var Rr=Ar.elem,Yr=Ar.wrapperClasses||[],nn=Ar.wrapperStyle||{},Gn=Ft(Yr,[Ne,Rr],void 0,nn);Gn.style.top=-k-zt-Rr.depth+"em",Ar.marginLeft&&(Gn.style.marginLeft=Ar.marginLeft),Ar.marginRight&&(Gn.style.marginRight=Ar.marginRight),Qe.push(Gn),zt+=Rr.height+Rr.depth}mt=Math.min(mt,zt),Lt=Math.max(Lt,zt)}var Pn=Ft(["vlist"],Qe);Pn.style.height=Lt+"em";var Kn;if(mt<0){var Wn=Ft([],[]),Nn=Ft(["vlist"],[Wn]);Nn.style.height=-mt+"em";var Ci=Ft(["vlist-s"],[new we("\u200B")]);Kn=[Ft(["vlist-r"],[Pn,Ci]),Ft(["vlist-r"],[Nn])]}else Kn=[Ft(["vlist-r"],[Pn])];var Yn=Ft(["vlist-t"],Kn);return Kn.length===2&&Yn.classes.push("vlist-t2"),Yn.height=Lt,Yn.depth=-mt,Yn},Cr=function(u,f){var d=Ft(["mspace"],[],f),g=Ie(u,f);return d.style.marginRight=g+"em",d},tn=function(u,f,d){var g="";switch(u){case"amsrm":g="AMS";break;case"textrm":g="Main";break;case"textsf":g="SansSerif";break;case"texttt":g="Typewriter";break;default:g=u}var w;return f==="textbf"&&d==="textit"?w="BoldItalic":f==="textbf"?w="Bold":f==="textit"?w="Italic":w="Regular",g+"-"+w},pr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Lr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},rn=function(u,f){var d=Lr[u],g=d[0],w=d[1],k=d[2],X=new Be(g),le=new $e([X],{width:w+"em",height:k+"em",style:"width:"+w+"em",viewBox:"0 0 "+1e3*w+" "+1e3*k,preserveAspectRatio:"xMinYMin"}),xe=rr(["overlay"],[le],f);return xe.height=k,xe.style.height=k+"em",xe.style.width=w+"em",xe},Ve={fontMap:pr,makeSymbol:Ze,mathsym:Je,makeSpan:Ft,makeSvgSpan:rr,makeLineSpan:$r,makeAnchor:Ur,makeFragment:Ut,wrapFragment:yr,makeVList:Ir,makeOrd:Qt,makeGlue:Cr,staticSvg:rn,svgData:Lr,tryCombineChars:cr};function fr(P,u){var f=Gr(P,u);if(!f)throw new Error("Expected node of type "+u+", but got "+(P?"node of type "+P.type:String(P)));return f}function Gr(P,u){return P&&P.type===u?P:null}function hn(P,u){var f=Tn(P,u);if(!f)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(P?P.type==="atom"?"atom of family "+P.family:"node of type "+P.type:String(P)));return f}function Tn(P,u){return P&&P.type==="atom"&&P.family===u?P:null}function bn(P){var u=yn(P);if(!u)throw new Error("Expected node of symbol group type, but got "+(P?"node of type "+P.type:String(P)));return u}function yn(P){return P&&(P.type==="atom"||qt.hasOwnProperty(P.type))?P:null}var br={number:3,unit:"mu"},gr={number:4,unit:"mu"},gn={number:5,unit:"mu"},an={mord:{mop:br,mbin:gr,mrel:gn,minner:br},mop:{mord:br,mop:br,mrel:gn,minner:br},mbin:{mord:gr,mop:gr,mopen:gr,minner:gr},mrel:{mord:gn,mop:gn,mopen:gn,minner:gn},mopen:{},mclose:{mop:br,mbin:gr,mrel:gn,minner:br},mpunct:{mord:br,mop:br,mrel:gn,mopen:br,mclose:br,mpunct:br,minner:br},minner:{mord:br,mop:br,mbin:gr,mrel:gn,mopen:br,mpunct:br,minner:br}},on={mord:{mop:br},mop:{mord:br,mop:br},mbin:{},mrel:{},mopen:{},mclose:{mop:br},mpunct:{},minner:{mop:br}},Ei={},ei={},An={};function lr(P){for(var u=P.type,f=P.names,d=P.props,g=P.handler,w=P.htmlBuilder,k=P.mathmlBuilder,X={type:u,numArgs:d.numArgs,argTypes:d.argTypes,greediness:d.greediness===void 0?1:d.greediness,allowedInText:!!d.allowedInText,allowedInMath:d.allowedInMath===void 0?!0:d.allowedInMath,numOptionalArgs:d.numOptionalArgs||0,infix:!!d.infix,handler:g},le=0;le<f.length;++le)Ei[f[le]]=X;u&&(w&&(ei[u]=w),k&&(An[u]=k))}function un(P){var u=P.type,f=P.htmlBuilder,d=P.mathmlBuilder;lr({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:f,mathmlBuilder:d})}var fn=function(u){var f=Gr(u,"ordgroup");return f?f.body:[u]},qn=Ve.makeSpan,ai=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ln=["rightmost","mrel","mclose","mpunct"],Un={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT},Rn={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ln=function(u,f,d,g){g===void 0&&(g=[null,null]);for(var w=[],k=0;k<u.length;k++){var X=Hr(u[k],f);if(X instanceof wt){var le=X.children;w.push.apply(w,le)}else w.push(X)}if(!d)return w;var xe=f;if(u.length===1){var Ne=Gr(u[0],"sizing")||Gr(u[0],"styling");Ne&&(Ne.type==="sizing"?xe=f.havingSize(Ne.size):Ne.type==="styling"&&(xe=f.havingStyle(Un[Ne.style])))}var Qe=qn([g[0]||"leftmost"],[],f),mt=qn([g[1]||"rightmost"],[],f);return fi(w,function(Lt,zt){var sr=zt.classes[0],Ar=Lt.classes[0];sr==="mbin"&&$.contains(Ln,Ar)?zt.classes[0]="mord":Ar==="mbin"&&$.contains(ai,sr)&&(Lt.classes[0]="mord")},{node:Qe},mt),fi(w,function(Lt,zt){var sr=oi(zt),Ar=oi(Lt),Rr=sr&&Ar?Lt.hasClass("mtight")?on[sr][Ar]:an[sr][Ar]:null;if(Rr)return Ve.makeGlue(Rr,xe)},{node:Qe},mt),w},fi=function P(u,f,d,g){g&&u.push(g);for(var w=0;w<u.length;w++){var k=u[w],X=Hn(k);if(X){P(X.children,f,d);continue}if(k.classes[0]!=="mspace"){var le=f(k,d.node);le&&(d.insertAfter?d.insertAfter(le):(u.unshift(le),w++)),d.node=k,d.insertAfter=function(xe){return function(Ne){u.splice(xe+1,0,Ne),w++}}(w)}}g&&u.pop()},Hn=function(u){return u instanceof wt||u instanceof ht?u:null},ni=function P(u,f){var d=Hn(u);if(d){var g=d.children;if(g.length){if(f==="right")return P(g[g.length-1],"right");if(f==="left")return P(g[0],"left")}}return u},oi=function(u,f){return u?(f&&(u=ni(u,f)),Rn[u.classes[0]]||null):null},ti=function(u,f){var d=["nulldelimiter"].concat(u.baseSizingClasses());return qn(f.concat(d))},Hr=function(u,f,d){if(!u)return qn();if(ei[u.type]){var g=ei[u.type](u,f);if(d&&f.size!==d.size){g=qn(f.sizingClasses(d),[g],f);var w=f.sizeMultiplier/d.sizeMultiplier;g.height*=w,g.depth*=w}return g}else throw new v("Got group of unknown type: '"+u.type+"'")};function di(P,u){var f=qn(["base"],P,u),d=qn(["strut"]);return d.style.height=f.height+f.depth+"em",d.style.verticalAlign=-f.depth+"em",f.children.unshift(d),f}function pi(P,u){var f=null;P.length===1&&P[0].type==="tag"&&(f=P[0].tag,P=P[0].body);for(var d=ln(P,u,!0),g=[],w=[],k=0;k<d.length;k++)if(w.push(d[k]),d[k].hasClass("mbin")||d[k].hasClass("mrel")||d[k].hasClass("allowbreak")){for(var X=!1;k<d.length-1&&d[k+1].hasClass("mspace")&&!d[k+1].hasClass("newline");)k++,w.push(d[k]),d[k].hasClass("nobreak")&&(X=!0);X||(g.push(di(w,u)),w=[])}else d[k].hasClass("newline")&&(w.pop(),w.length>0&&(g.push(di(w,u)),w=[]),g.push(d[k]));w.length>0&&g.push(di(w,u));var le;f&&(le=di(ln(f,u,!0)),le.classes=["tag"],g.push(le));var xe=qn(["katex-html"],g);if(xe.setAttribute("aria-hidden","true"),le){var Ne=le.children[0];Ne.style.height=xe.height+xe.depth+"em",Ne.style.verticalAlign=-xe.depth+"em"}return xe}function vi(P){return new wt(P)}var jn=function(){function P(f,d){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=f,this.attributes={},this.children=d||[]}var u=P.prototype;return u.setAttribute=function(d,g){this.attributes[d]=g},u.getAttribute=function(d){return this.attributes[d]},u.toNode=function(){var d=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&d.setAttribute(g,this.attributes[g]);for(var w=0;w<this.children.length;w++)d.appendChild(this.children[w].toNode());return d},u.toMarkup=function(){var d="<"+this.type;for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(d+=" "+g+'="',d+=$.escape(this.attributes[g]),d+='"');d+=">";for(var w=0;w<this.children.length;w++)d+=this.children[w].toMarkup();return d+="</"+this.type+">",d},u.toText=function(){return this.children.map(function(d){return d.toText()}).join("")},P}(),Or=function(){function P(f){this.text=void 0,this.text=f}var u=P.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return $.escape(this.toText())},u.toText=function(){return this.text},P}(),Oi=function(){function P(f){this.width=void 0,this.character=void 0,this.width=f,f>=.05555&&f<=.05556?this.character="\u200A":f>=.1666&&f<=.1667?this.character="\u2009":f>=.2222&&f<=.2223?this.character="\u2005":f>=.2777&&f<=.2778?this.character="\u2005\u200A":f>=-.05556&&f<=-.05555?this.character="\u200A\u2063":f>=-.1667&&f<=-.1666?this.character="\u2009\u2063":f>=-.2223&&f<=-.2222?this.character="\u205F\u2063":f>=-.2778&&f<=-.2777?this.character="\u2005\u2063":this.character=null}var u=P.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var d=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return d.setAttribute("width",this.width+"em"),d},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},P}(),Mt={MathNode:jn,TextNode:Or,SpaceNode:Oi,newDocumentFragment:vi},Vn=function(u,f,d){return ir[f][u]&&ir[f][u].replace&&u.charCodeAt(0)!==55349&&!(Bt.hasOwnProperty(u)&&d&&(d.fontFamily&&d.fontFamily.substr(4,2)==="tt"||d.font&&d.font.substr(4,2)==="tt"))&&(u=ir[f][u].replace),new Mt.TextNode(u)},Ri=function(u){return u.length===1?u[0]:new Mt.MathNode("mrow",u)},mi=function(u,f){if(f.fontFamily==="texttt")return"monospace";if(f.fontFamily==="textsf")return f.fontShape==="textit"&&f.fontWeight==="textbf"?"sans-serif-bold-italic":f.fontShape==="textit"?"sans-serif-italic":f.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(f.fontShape==="textit"&&f.fontWeight==="textbf")return"bold-italic";if(f.fontShape==="textit")return"italic";if(f.fontWeight==="textbf")return"bold";var d=f.font;if(!d||d==="mathnormal")return null;var g=u.mode;if(d==="mathit")return"italic";if(d==="boldsymbol")return"bold-italic";if(d==="mathbf")return"bold";if(d==="mathbb")return"double-struck";if(d==="mathfrak")return"fraktur";if(d==="mathscr"||d==="mathcal")return"script";if(d==="mathsf")return"sans-serif";if(d==="mathtt")return"monospace";var w=u.text;if($.contains(["\\imath","\\jmath"],w))return null;ir[g][w]&&ir[g][w].replace&&(w=ir[g][w].replace);var k=Ve.fontMap[d].fontName;return bt(w,k,g)?Ve.fontMap[d].variant:null},Mn=function(u,f,d){if(u.length===1){var g=kr(u[0],f);return d&&g instanceof jn&&g.type==="mo"&&(g.setAttribute("lspace","0em"),g.setAttribute("rspace","0em")),[g]}for(var w=[],k,X=0;X<u.length;X++){var le=kr(u[X],f);if(le instanceof jn&&k instanceof jn){if(le.type==="mtext"&&k.type==="mtext"&&le.getAttribute("mathvariant")===k.getAttribute("mathvariant")){var xe;(xe=k.children).push.apply(xe,le.children);continue}else if(le.type==="mn"&&k.type==="mn"){var Ne;(Ne=k.children).push.apply(Ne,le.children);continue}else if(le.type==="mi"&&le.children.length===1&&k.type==="mn"){var Qe=le.children[0];if(Qe instanceof Or&&Qe.text==="."){var mt;(mt=k.children).push.apply(mt,le.children);continue}}else if(k.type==="mi"&&k.children.length===1){var Lt=k.children[0];if(Lt instanceof Or&&Lt.text==="\u0338"&&(le.type==="mo"||le.type==="mi"||le.type==="mn")){var zt=le.children[0];zt instanceof Or&&zt.text.length>0&&(zt.text=zt.text.slice(0,1)+"\u0338"+zt.text.slice(1),w.pop())}}}w.push(le),k=le}return w},li=function(u,f,d){return Ri(Mn(u,f,d))},kr=function(u,f){if(!u)return new Mt.MathNode("mrow");if(An[u.type]){var d=An[u.type](u,f);return d}else throw new v("Got group of unknown type: '"+u.type+"'")};function Xn(P,u,f,d){var g=Mn(P,f),w;g.length===1&&g[0]instanceof jn&&$.contains(["mrow","mtable"],g[0].type)?w=g[0]:w=new Mt.MathNode("mrow",g);var k=new Mt.MathNode("annotation",[new Mt.TextNode(u)]);k.setAttribute("encoding","application/x-tex");var X=new Mt.MathNode("semantics",[w,k]),le=new Mt.MathNode("math",[X]);le.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var xe=d?"katex":"katex-mathml";return Ve.makeSpan([xe],[le])}var gi=function(u){return new Qr({style:u.displayMode?b.DISPLAY:b.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},ri=function(u,f){if(f.displayMode){var d=["katex-display"];f.leqno&&d.push("leqno"),f.fleqn&&d.push("fleqn"),u=Ve.makeSpan(d,[u])}return u},Dn=function(u,f,d){var g=gi(d),w;if(d.output==="mathml")return Xn(u,f,g,!0);if(d.output==="html"){var k=pi(u,g);w=Ve.makeSpan(["katex"],[k])}else{var X=Xn(u,f,g,!1),le=pi(u,g);w=Ve.makeSpan(["katex"],[X,le])}return ri(w,d)},kn=function(u,f,d){var g=gi(d),w=pi(u,g),k=Ve.makeSpan(["katex"],[w]);return ri(k,d)},Zn=Dn,ii={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},wi=function(u){var f=new Mt.MathNode("mo",[new Mt.TextNode(ii[u.substr(1)])]);return f.setAttribute("stretchy","true"),f},ui={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},zi=function(u){return u.type==="ordgroup"?u.body.length:1},Hi=function(u,f){function d(){var le=4e5,xe=u.label.substr(1);if($.contains(["widehat","widecheck","widetilde","utilde"],xe)){var Ne=u,Qe=zi(Ne.base),mt,Lt,zt;if(Qe>5)xe==="widehat"||xe==="widecheck"?(mt=420,le=2364,zt=.42,Lt=xe+"4"):(mt=312,le=2340,zt=.34,Lt="tilde4");else{var sr=[1,1,2,2,3,3][Qe];xe==="widehat"||xe==="widecheck"?(le=[0,1062,2364,2364,2364][sr],mt=[0,239,300,360,420][sr],zt=[0,.24,.3,.3,.36,.42][sr],Lt=xe+sr):(le=[0,600,1033,2339,2340][sr],mt=[0,260,286,306,312][sr],zt=[0,.26,.286,.3,.306,.34][sr],Lt="tilde"+sr)}var Ar=new Be(Lt),Rr=new $e([Ar],{width:"100%",height:zt+"em",viewBox:"0 0 "+le+" "+mt,preserveAspectRatio:"none"});return{span:Ve.makeSvgSpan([],[Rr],f),minWidth:0,height:zt}}else{var Yr=[],nn=ui[xe],Gn=nn[0],Pn=nn[1],Kn=nn[2],Wn=Kn/1e3,Nn=Gn.length,Ci,Yn;if(Nn===1){var Ke=nn[3];Ci=["hide-tail"],Yn=[Ke]}else if(Nn===2)Ci=["halfarrow-left","halfarrow-right"],Yn=["xMinYMin","xMaxYMin"];else if(Nn===3)Ci=["brace-left","brace-center","brace-right"],Yn=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+Nn+" children.");for(var $i=0;$i<Nn;$i++){var Qi=new Be(Gn[$i]),Zi=new $e([Qi],{width:"400em",height:Wn+"em",viewBox:"0 0 "+le+" "+Kn,preserveAspectRatio:Yn[$i]+" slice"}),ci=Ve.makeSvgSpan([Ci[$i]],[Zi],f);if(Nn===1)return{span:ci,minWidth:Pn,height:Wn};ci.style.height=Wn+"em",Yr.push(ci)}return{span:Ve.makeSpan(["stretchy"],Yr,f),minWidth:Pn,height:Wn}}}var g=d(),w=g.span,k=g.minWidth,X=g.height;return w.height=X,w.style.height=X+"em",k>0&&(w.style.minWidth=k+"em"),w},Mi=function(u,f,d,g){var w,k=u.height+u.depth+2*d;if(/fbox|color/.test(f)){if(w=Ve.makeSpan(["stretchy",f],[],g),f==="fbox"){var X=g.color&&g.getColor();X&&(w.style.borderColor=X)}}else{var le=[];/^[bx]cancel$/.test(f)&&le.push(new nt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(f)&&le.push(new nt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var xe=new $e(le,{width:"100%",height:k+"em"});w=Ve.makeSvgSpan([],[xe],g)}return w.height=k,w.style.height=k+"em",w},_i={encloseSpan:Mi,mathMLnode:wi,svgSpan:Hi},dr=function(u,f){var d,g,w=Gr(u,"supsub"),k;w?(g=fr(w.base,"accent"),d=g.base,w.base=d,k=Ot(Hr(w,f)),w.base=g):(g=fr(u,"accent"),d=g.base);var X=Hr(d,f.havingCrampedStyle()),le=g.isShifty&&$.isCharacterBox(d),xe=0;if(le){var Ne=$.getBaseElem(d),Qe=Hr(Ne,f.havingCrampedStyle());xe=gt(Qe).skew}var mt=Math.min(X.height,f.fontMetrics().xHeight),Lt;if(g.isStretchy)Lt=_i.svgSpan(g,f),Lt=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:X},{type:"elem",elem:Lt,wrapperClasses:["svg-align"],wrapperStyle:xe>0?{width:"calc(100% - "+2*xe+"em)",marginLeft:2*xe+"em"}:void 0}]},f);else{var zt,sr;g.label==="\\vec"?(zt=Ve.staticSvg("vec",f),sr=Ve.svgData.vec[1]):(zt=Ve.makeOrd({mode:g.mode,text:g.label},f,"textord"),zt=gt(zt),zt.italic=0,sr=zt.width),Lt=Ve.makeSpan(["accent-body"],[zt]);var Ar=g.label==="\\textcircled";Ar&&(Lt.classes.push("accent-full"),mt=X.height);var Rr=xe;Ar||(Rr-=sr/2),Lt.style.left=Rr+"em",g.label==="\\textcircled"&&(Lt.style.top=".2em"),Lt=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:X},{type:"kern",size:-mt},{type:"elem",elem:Lt}]},f)}var Yr=Ve.makeSpan(["mord","accent"],[Lt],f);return k?(k.children[0]=Yr,k.height=Math.max(Yr.height,k.height),k.classes[0]="mord",k):Yr},Mr=function(u,f){var d=u.isStretchy?_i.mathMLnode(u.label):new Mt.MathNode("mo",[Vn(u.label,u.mode)]),g=new Mt.MathNode("mover",[kr(u.base,f),d]);return g.setAttribute("accent","true"),g},vn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(P){return"\\"+P}).join("|"));lr({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(u,f){var d=f[0],g=!vn.test(u.funcName),w=!g||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:g,isShifty:w,base:d}},htmlBuilder:dr,mathmlBuilder:Mr}),lr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var d=f[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:d}},htmlBuilder:dr,mathmlBuilder:Mr}),lr({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];return{type:"accentUnder",mode:d.mode,label:g,base:w}},htmlBuilder:function(u,f){var d=Hr(u.base,f),g=_i.svgSpan(u,f),w=u.label==="\\utilde"?.12:0,k=Ve.makeVList({positionType:"bottom",positionData:g.height+w,children:[{type:"elem",elem:g,wrapperClasses:["svg-align"]},{type:"kern",size:w},{type:"elem",elem:d}]},f);return Ve.makeSpan(["mord","accentunder"],[k],f)},mathmlBuilder:function(u,f){var d=_i.mathMLnode(u.label),g=new Mt.MathNode("munder",[kr(u.base,f),d]);return g.setAttribute("accentunder","true"),g}});var zr=function(u){var f=new Mt.MathNode("mpadded",u?[u]:[]);return f.setAttribute("width","+0.6em"),f.setAttribute("lspace","0.3em"),f};lr({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,d){var g=u.parser,w=u.funcName;return{type:"xArrow",mode:g.mode,label:w,body:f[0],below:d[0]}},htmlBuilder:function(u,f){var d=f.style,g=f.havingStyle(d.sup()),w=Ve.wrapFragment(Hr(u.body,g,f),f);w.classes.push("x-arrow-pad");var k;u.below&&(g=f.havingStyle(d.sub()),k=Ve.wrapFragment(Hr(u.below,g,f),f),k.classes.push("x-arrow-pad"));var X=_i.svgSpan(u,f),le=-f.fontMetrics().axisHeight+.5*X.height,xe=-f.fontMetrics().axisHeight-.5*X.height-.111;(w.depth>.25||u.label==="\\xleftequilibrium")&&(xe-=w.depth);var Ne;if(k){var Qe=-f.fontMetrics().axisHeight+k.height+.5*X.height+.111;Ne=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:w,shift:xe},{type:"elem",elem:X,shift:le},{type:"elem",elem:k,shift:Qe}]},f)}else Ne=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:w,shift:xe},{type:"elem",elem:X,shift:le}]},f);return Ne.children[0].children[0].children[1].classes.push("svg-align"),Ve.makeSpan(["mrel","x-arrow"],[Ne],f)},mathmlBuilder:function(u,f){var d=_i.mathMLnode(u.label),g;if(u.body){var w=zr(kr(u.body,f));if(u.below){var k=zr(kr(u.below,f));g=new Mt.MathNode("munderover",[d,k,w])}else g=new Mt.MathNode("mover",[d,w])}else if(u.below){var X=zr(kr(u.below,f));g=new Mt.MathNode("munder",[d,X])}else g=zr(),g=new Mt.MathNode("mover",[d,g]);return g}}),lr({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){for(var d=u.parser,g=fr(f[0],"ordgroup"),w=g.body,k="",X=0;X<w.length;X++){var le=fr(w[X],"textord");k+=le.text}var xe=parseInt(k);if(isNaN(xe))throw new v("\\@char has non-numeric argument "+k);return{type:"textord",mode:d.mode,text:String.fromCharCode(xe)}}});var qr=function(u,f){var d=ln(u.body,f.withColor(u.color),!1);return Ve.makeFragment(d)},xi=function(u,f){var d=Mn(u.body,f.withColor(u.color)),g=new Mt.MathNode("mstyle",d);return g.setAttribute("mathcolor",u.color),g};lr({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,f){var d=u.parser,g=fr(f[0],"color-token").color,w=f[1];return{type:"color",mode:d.mode,color:g,body:fn(w)}},htmlBuilder:qr,mathmlBuilder:xi}),lr({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,f){var d=u.parser,g=u.breakOnTokenText,w=fr(f[0],"color-token").color;d.gullet.macros.set("\\current@color",w);var k=d.parseExpression(!0,g);return{type:"color",mode:d.mode,color:w,body:k}},htmlBuilder:qr,mathmlBuilder:xi}),lr({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f,d){var g=u.parser,w=u.funcName,k=d[0],X=w==="\\cr",le=!1;return X||(g.settings.displayMode&&g.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?le=!1:le=!0),{type:"cr",mode:g.mode,newLine:le,newRow:X,size:k&&fr(k,"size").value}},htmlBuilder:function(u,f){if(u.newRow)throw new v("\\cr valid only within a tabular/array environment");var d=Ve.makeSpan(["mspace"],[],f);return u.newLine&&(d.classes.push("newline"),u.size&&(d.style.marginTop=Ie(u.size,f)+"em")),d},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mspace");return u.newLine&&(d.setAttribute("linebreak","newline"),u.size&&d.setAttribute("height",Ie(u.size,f)+"em")),d}});var Qn=function(u,f,d){var g=ir.math[u]&&ir.math[u].replace,w=bt(g||u,f,d);if(!w)throw new Error("Unsupported symbol "+u+" and font size "+f+".");return w},Ii=function(u,f,d,g){var w=d.havingBaseStyle(f),k=Ve.makeSpan(g.concat(w.sizingClasses(d)),[u],d),X=w.sizeMultiplier/d.sizeMultiplier;return k.height*=X,k.depth*=X,k.maxFontSize=w.sizeMultiplier,k},dn=function(u,f,d){var g=f.havingBaseStyle(d),w=(1-f.sizeMultiplier/g.sizeMultiplier)*f.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=w+"em",u.height-=w,u.depth+=w},Wr=function(u,f,d,g,w,k){var X=Ve.makeSymbol(u,"Main-Regular",w,g),le=Ii(X,f,g,k);return d&&dn(le,g,f),le},In=function(u,f,d,g){return Ve.makeSymbol(u,"Size"+f+"-Regular",d,g)},Bn=function(u,f,d,g,w,k){var X=In(u,f,w,g),le=Ii(Ve.makeSpan(["delimsizing","size"+f],[X],g),b.TEXT,g,k);return d&&dn(le,g,b.TEXT),le},Jn=function(u,f,d){var g;f==="Size1-Regular"?g="delim-size1":g="delim-size4";var w=Ve.makeSpan(["delimsizinginner",g],[Ve.makeSpan([],[Ve.makeSymbol(u,f,d)])]);return{type:"elem",elem:w}},zn={type:"kern",size:-.005},si=function(u,f,d,g,w,k){var X,le,xe,Ne;X=xe=Ne=u,le=null;var Qe="Size1-Regular";u==="\\uparrow"?xe=Ne="\u23D0":u==="\\Uparrow"?xe=Ne="\u2016":u==="\\downarrow"?X=xe="\u23D0":u==="\\Downarrow"?X=xe="\u2016":u==="\\updownarrow"?(X="\\uparrow",xe="\u23D0",Ne="\\downarrow"):u==="\\Updownarrow"?(X="\\Uparrow",xe="\u2016",Ne="\\Downarrow"):u==="["||u==="\\lbrack"?(X="\u23A1",xe="\u23A2",Ne="\u23A3",Qe="Size4-Regular"):u==="]"||u==="\\rbrack"?(X="\u23A4",xe="\u23A5",Ne="\u23A6",Qe="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(xe=X="\u23A2",Ne="\u23A3",Qe="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(X="\u23A1",xe=Ne="\u23A2",Qe="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(xe=X="\u23A5",Ne="\u23A6",Qe="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(X="\u23A4",xe=Ne="\u23A5",Qe="Size4-Regular"):u==="("||u==="\\lparen"?(X="\u239B",xe="\u239C",Ne="\u239D",Qe="Size4-Regular"):u===")"||u==="\\rparen"?(X="\u239E",xe="\u239F",Ne="\u23A0",Qe="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(X="\u23A7",le="\u23A8",Ne="\u23A9",xe="\u23AA",Qe="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(X="\u23AB",le="\u23AC",Ne="\u23AD",xe="\u23AA",Qe="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(X="\u23A7",Ne="\u23A9",xe="\u23AA",Qe="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(X="\u23AB",Ne="\u23AD",xe="\u23AA",Qe="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(X="\u23A7",Ne="\u23AD",xe="\u23AA",Qe="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(X="\u23AB",Ne="\u23A9",xe="\u23AA",Qe="Size4-Regular");var mt=Qn(X,Qe,w),Lt=mt.height+mt.depth,zt=Qn(xe,Qe,w),sr=zt.height+zt.depth,Ar=Qn(Ne,Qe,w),Rr=Ar.height+Ar.depth,Yr=0,nn=1;if(le!==null){var Gn=Qn(le,Qe,w);Yr=Gn.height+Gn.depth,nn=2}var Pn=Lt+Rr+Yr,Kn=Math.max(0,Math.ceil((f-Pn)/(nn*sr))),Wn=Pn+Kn*nn*sr,Nn=g.fontMetrics().axisHeight;d&&(Nn*=g.sizeMultiplier);var Ci=Wn/2-Nn,Yn=(Kn+1)*.005-sr,Ke=[];if(Ke.push(Jn(Ne,Qe,w)),le===null)for(var $i=0;$i<Kn;$i++)Ke.push(zn),Ke.push(Jn(xe,Qe,w));else{for(var Qi=0;Qi<Kn;Qi++)Ke.push(zn),Ke.push(Jn(xe,Qe,w));Ke.push({type:"kern",size:Yn}),Ke.push(Jn(xe,Qe,w)),Ke.push(zn),Ke.push(Jn(le,Qe,w));for(var Zi=0;Zi<Kn;Zi++)Ke.push(zn),Ke.push(Jn(xe,Qe,w))}Ke.push({type:"kern",size:Yn}),Ke.push(Jn(xe,Qe,w)),Ke.push(zn),Ke.push(Jn(X,Qe,w));var ci=g.havingBaseStyle(b.TEXT),ds=Ve.makeVList({positionType:"bottom",positionData:Ci,children:Ke},ci);return Ii(Ve.makeSpan(["delimsizing","mult"],[ds],ci),b.TEXT,g,k)},yi=80,Gi=.08,bi=function(u,f,d,g,w){var k=Nt(u,g,d),X=new Be(u,k),le=new $e([X],{width:"400em",height:f+"em",viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});return Ve.makeSvgSpan(["hide-tail"],[le],w)},_s=function(u,f){var d=f.havingBaseSizing(),g=As("\\surd",u*d.sizeMultiplier,Ks,d),w=d.sizeMultiplier,k=Math.max(0,f.minRuleThickness-f.fontMetrics().sqrtRuleThickness),X,le=0,xe=0,Ne=0,Qe;return g.type==="small"?(Ne=1e3+1e3*k+yi,u<1?w=1:u<1.4&&(w=.7),le=(1+k+Gi)/w,xe=(1+k)/w,X=bi("sqrtMain",le,Ne,k,f),X.style.minWidth="0.853em",Qe=.833/w):g.type==="large"?(Ne=(1e3+yi)*Ts[g.size],xe=(Ts[g.size]+k)/w,le=(Ts[g.size]+k+Gi)/w,X=bi("sqrtSize"+g.size,le,Ne,k,f),X.style.minWidth="1.02em",Qe=1/w):(le=u+k+Gi,xe=u+k,Ne=Math.floor(1e3*u+k)+yi,X=bi("sqrtTall",le,Ne,k,f),X.style.minWidth="0.742em",Qe=1.056),X.height=xe,X.style.height=le+"em",{span:X,advanceWidth:Qe,ruleWidth:(f.fontMetrics().sqrtRuleThickness+k)*w}},cs=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Gs=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],rs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ts=[0,1.2,1.8,2.4,3],Ni=function(u,f,d,g,w){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),$.contains(cs,u)||$.contains(rs,u))return Bn(u,f,!1,d,g,w);if($.contains(Gs,u))return si(u,Ts[f],!1,d,g,w);throw new v("Illegal delimiter: '"+u+"'")},aa=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wa=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"stack"}],Ks=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],oa=function(u){if(u.type==="small")return"Main-Regular";if(u.type==="large")return"Size"+u.size+"-Regular";if(u.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+u.type+"' here.")},As=function(u,f,d,g){for(var w=Math.min(2,3-g.style.size),k=w;k<d.length&&d[k].type!=="stack";k++){var X=Qn(u,oa(d[k]),"math"),le=X.height+X.depth;if(d[k].type==="small"){var xe=g.havingBaseStyle(d[k].style);le*=xe.sizeMultiplier}if(le>f)return d[k]}return d[d.length-1]},ns=function(u,f,d,g,w,k){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var X;$.contains(rs,u)?X=aa:$.contains(cs,u)?X=Ks:X=wa;var le=As(u,f,X,g);return le.type==="small"?Wr(u,le.style,d,g,w,k):le.type==="large"?Bn(u,le.size,d,g,w,k):si(u,f,d,g,w,k)},Ws=function(u,f,d,g,w,k){var X=g.fontMetrics().axisHeight*g.sizeMultiplier,le=901,xe=5/g.fontMetrics().ptPerEm,Ne=Math.max(f-X,d+X),Qe=Math.max(Ne/500*le,2*Ne-xe);return ns(u,Qe,!0,g,w,k)},Ki={sqrtImage:_s,sizedDelim:Ni,customSizedDelim:ns,leftRightDelim:Ws},Hs={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},la=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Li(P,u){var f=yn(P);if(f&&$.contains(la,f.text))return f;throw new v("Invalid delimiter: '"+(f?f.text:JSON.stringify(P))+"' after '"+u.funcName+"'",P)}lr({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(u,f){var d=Li(f[0],u);return{type:"delimsizing",mode:u.parser.mode,size:Hs[u.funcName].size,mclass:Hs[u.funcName].mclass,delim:d.text}},htmlBuilder:function(u,f){return u.delim==="."?Ve.makeSpan([u.mclass]):Ki.sizedDelim(u.delim,u.size,f,u.mode,[u.mclass])},mathmlBuilder:function(u){var f=[];u.delim!=="."&&f.push(Vn(u.delim,u.mode));var d=new Mt.MathNode("mo",f);return u.mclass==="mopen"||u.mclass==="mclose"?d.setAttribute("fence","true"):d.setAttribute("fence","false"),d}});function hs(P){if(!P.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}lr({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,f){var d=u.parser.gullet.macros.get("\\current@color");if(d&&typeof d!="string")throw new v("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:Li(f[0],u).text,color:d}}}),lr({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,f){var d=Li(f[0],u),g=u.parser;++g.leftrightDepth;var w=g.parseExpression(!1);--g.leftrightDepth,g.expect("\\right",!1);var k=fr(g.parseFunction(),"leftright-right");return{type:"leftright",mode:g.mode,body:w,left:d.text,right:k.delim,rightColor:k.color}},htmlBuilder:function(u,f){hs(u);for(var d=ln(u.body,f,!0,["mopen","mclose"]),g=0,w=0,k=!1,X=0;X<d.length;X++)d[X].isMiddle?k=!0:(g=Math.max(d[X].height,g),w=Math.max(d[X].depth,w));g*=f.sizeMultiplier,w*=f.sizeMultiplier;var le;if(u.left==="."?le=ti(f,["mopen"]):le=Ki.leftRightDelim(u.left,g,w,f,u.mode,["mopen"]),d.unshift(le),k)for(var xe=1;xe<d.length;xe++){var Ne=d[xe],Qe=Ne.isMiddle;Qe&&(d[xe]=Ki.leftRightDelim(Qe.delim,g,w,Qe.options,u.mode,[]))}var mt;if(u.right===".")mt=ti(f,["mclose"]);else{var Lt=u.rightColor?f.withColor(u.rightColor):f;mt=Ki.leftRightDelim(u.right,g,w,Lt,u.mode,["mclose"])}return d.push(mt),Ve.makeSpan(["minner"],d,f)},mathmlBuilder:function(u,f){hs(u);var d=Mn(u.body,f);if(u.left!=="."){var g=new Mt.MathNode("mo",[Vn(u.left,u.mode)]);g.setAttribute("fence","true"),d.unshift(g)}if(u.right!=="."){var w=new Mt.MathNode("mo",[Vn(u.right,u.mode)]);w.setAttribute("fence","true"),u.rightColor&&w.setAttribute("mathcolor",u.rightColor),d.push(w)}return Ri(d)}}),lr({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,f){var d=Li(f[0],u);if(!u.parser.leftrightDepth)throw new v("\\middle without preceding \\left",d);return{type:"middle",mode:u.parser.mode,delim:d.text}},htmlBuilder:function(u,f){var d;if(u.delim===".")d=ti(f,[]);else{d=Ki.sizedDelim(u.delim,1,f,u.mode,[]);var g={delim:u.delim,options:f};d.isMiddle=g}return d},mathmlBuilder:function(u,f){var d=u.delim==="\\vert"||u.delim==="|"?Vn("|","text"):Vn(u.delim,u.mode),g=new Mt.MathNode("mo",[d]);return g.setAttribute("fence","true"),g.setAttribute("lspace","0.05em"),g.setAttribute("rspace","0.05em"),g}});var ys=function(u,f){var d=Ve.wrapFragment(Hr(u.body,f),f),g=u.label.substr(1),w=f.sizeMultiplier,k,X=0,le=$.isCharacterBox(u.body);if(g==="sout")k=Ve.makeSpan(["stretchy","sout"]),k.height=f.fontMetrics().defaultRuleThickness/w,X=-.5*f.fontMetrics().xHeight;else{/cancel/.test(g)?le||d.classes.push("cancel-pad"):d.classes.push("boxpad");var xe=0,Ne=0;/box/.test(g)?(Ne=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness),xe=f.fontMetrics().fboxsep+(g==="colorbox"?0:Ne)):xe=le?.2:0,k=_i.encloseSpan(d,g,xe,f),/fbox|boxed|fcolorbox/.test(g)&&(k.style.borderStyle="solid",k.style.borderWidth=Ne+"em"),X=d.depth+xe,u.backgroundColor&&(k.style.backgroundColor=u.backgroundColor,u.borderColor&&(k.style.borderColor=u.borderColor))}var Qe;return u.backgroundColor?Qe=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:k,shift:X},{type:"elem",elem:d,shift:0}]},f):Qe=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:d,shift:0},{type:"elem",elem:k,shift:X,wrapperClasses:/cancel/.test(g)?["svg-align"]:[]}]},f),/cancel/.test(g)&&(Qe.height=d.height,Qe.depth=d.depth),/cancel/.test(g)&&!le?Ve.makeSpan(["mord","cancel-lap"],[Qe],f):Ve.makeSpan(["mord"],[Qe],f)},Ds=function(u,f){var d=0,g=new Mt.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[kr(u.body,f)]);switch(u.label){case"\\cancel":g.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":g.setAttribute("notation","downdiagonalstrike");break;case"\\sout":g.setAttribute("notation","horizontalstrike");break;case"\\fbox":g.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(d=f.fontMetrics().fboxsep*f.fontMetrics().ptPerEm,g.setAttribute("width","+"+2*d+"pt"),g.setAttribute("height","+"+2*d+"pt"),g.setAttribute("lspace",d+"pt"),g.setAttribute("voffset",d+"pt"),u.label==="\\fcolorbox"){var w=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness);g.setAttribute("style","border: "+w+"em solid "+String(u.borderColor))}break;case"\\xcancel":g.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&g.setAttribute("mathbackground",u.backgroundColor),g};lr({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,f,d){var g=u.parser,w=u.funcName,k=fr(f[0],"color-token").color,X=f[1];return{type:"enclose",mode:g.mode,label:w,backgroundColor:k,body:X}},htmlBuilder:ys,mathmlBuilder:Ds}),lr({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,f,d){var g=u.parser,w=u.funcName,k=fr(f[0],"color-token").color,X=fr(f[1],"color-token").color,le=f[2];return{type:"enclose",mode:g.mode,label:w,backgroundColor:X,borderColor:k,body:le}},htmlBuilder:ys,mathmlBuilder:Ds}),lr({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,f){var d=u.parser;return{type:"enclose",mode:d.mode,label:"\\fbox",body:f[0]}}}),lr({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,f,d){var g=u.parser,w=u.funcName,k=f[0];return{type:"enclose",mode:g.mode,label:w,body:k}},htmlBuilder:ys,mathmlBuilder:Ds});var ua={};function ji(P){for(var u=P.type,f=P.names,d=P.props,g=P.handler,w=P.htmlBuilder,k=P.mathmlBuilder,X={type:u,numArgs:d.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:g},le=0;le<f.length;++le)ua[f[le]]=X;w&&(ei[u]=w),k&&(An[u]=k)}function ca(P){var u=[];P.consumeSpaces();for(var f=P.fetch().text;f==="\\hline"||f==="\\hdashline";)P.consume(),u.push(f==="\\hdashline"),P.consumeSpaces(),f=P.fetch().text;return u}function is(P,u,f){var d=u.hskipBeforeAndAfter,g=u.addJot,w=u.cols,k=u.arraystretch,X=u.colSeparationType;if(P.gullet.beginGroup(),P.gullet.macros.set("\\\\","\\cr"),!k){var le=P.gullet.expandMacroAsText("\\arraystretch");if(le==null)k=1;else if(k=parseFloat(le),!k||k<0)throw new v("Invalid \\arraystretch: "+le)}P.gullet.beginGroup();var xe=[],Ne=[xe],Qe=[],mt=[];for(mt.push(ca(P));;){var Lt=P.parseExpression(!1,"\\cr");P.gullet.endGroup(),P.gullet.beginGroup(),Lt={type:"ordgroup",mode:P.mode,body:Lt},f&&(Lt={type:"styling",mode:P.mode,style:f,body:[Lt]}),xe.push(Lt);var zt=P.fetch().text;if(zt==="&")P.consume();else if(zt==="\\end"){xe.length===1&&Lt.type==="styling"&&Lt.body[0].body.length===0&&Ne.pop(),mt.length<Ne.length+1&&mt.push([]);break}else if(zt==="\\cr"){var sr=fr(P.parseFunction(),"cr");Qe.push(sr.size),mt.push(ca(P)),xe=[],Ne.push(xe)}else throw new v("Expected & or \\\\ or \\cr or \\end",P.nextToken)}return P.gullet.endGroup(),P.gullet.endGroup(),{type:"array",mode:P.mode,addJot:g,arraystretch:k,body:Ne,cols:w,rowGaps:Qe,hskipBeforeAndAfter:d,hLinesBeforeRow:mt,colSeparationType:X}}function Cs(P){return P.substr(0,1)==="d"?"display":"text"}var Vi=function(u,f){var d,g,w=u.body.length,k=u.hLinesBeforeRow,X=0,le=new Array(w),xe=[],Ne=Math.max(f.fontMetrics().arrayRuleWidth,f.minRuleThickness),Qe=1/f.fontMetrics().ptPerEm,mt=5*Qe;if(u.colSeparationType&&u.colSeparationType==="small"){var Lt=f.havingStyle(b.SCRIPT).sizeMultiplier;mt=.2778*(Lt/f.sizeMultiplier)}var zt=12*Qe,sr=3*Qe,Ar=u.arraystretch*zt,Rr=.7*Ar,Yr=.3*Ar,nn=0;function Gn(ea){for(var _a=0;_a<ea.length;++_a)_a>0&&(nn+=.25),xe.push({pos:nn,isDashed:ea[_a]})}for(Gn(k[0]),d=0;d<u.body.length;++d){var Pn=u.body[d],Kn=Rr,Wn=Yr;X<Pn.length&&(X=Pn.length);var Nn=new Array(Pn.length);for(g=0;g<Pn.length;++g){var Ci=Hr(Pn[g],f);Wn<Ci.depth&&(Wn=Ci.depth),Kn<Ci.height&&(Kn=Ci.height),Nn[g]=Ci}var Yn=u.rowGaps[d],Ke=0;Yn&&(Ke=Ie(Yn,f),Ke>0&&(Ke+=Yr,Wn<Ke&&(Wn=Ke),Ke=0)),u.addJot&&(Wn+=sr),Nn.height=Kn,Nn.depth=Wn,nn+=Kn,Nn.pos=nn,nn+=Wn+Ke,le[d]=Nn,Gn(k[d+1])}var $i=nn/2+f.fontMetrics().axisHeight,Qi=u.cols||[],Zi=[],ci,ds;for(g=0,ds=0;g<X||ds<Qi.length;++g,++ds){for(var Ji=Qi[ds]||{},lo=!0;Ji.type==="separator";){if(lo||(ci=Ve.makeSpan(["arraycolsep"],[]),ci.style.width=f.fontMetrics().doubleRuleSep+"em",Zi.push(ci)),Ji.separator==="|"||Ji.separator===":"){var Fo=Ji.separator==="|"?"solid":"dashed",Fs=Ve.makeSpan(["vertical-separator"],[],f);Fs.style.height=nn+"em",Fs.style.borderRightWidth=Ne+"em",Fs.style.borderRightStyle=Fo,Fs.style.margin="0 -"+Ne/2+"em",Fs.style.verticalAlign=-(nn-$i)+"em",Zi.push(Fs)}else throw new v("Invalid separator type: "+Ji.separator);ds++,Ji=Qi[ds]||{},lo=!1}if(!(g>=X)){var Ns=void 0;(g>0||u.hskipBeforeAndAfter)&&(Ns=$.deflt(Ji.pregap,mt),Ns!==0&&(ci=Ve.makeSpan(["arraycolsep"],[]),ci.style.width=Ns+"em",Zi.push(ci)));var Yi=[];for(d=0;d<w;++d){var $s=le[d],Js=$s[g];if(Js){var ga=$s.pos-$i;Js.depth=$s.depth,Js.height=$s.height,Yi.push({type:"elem",elem:Js,shift:ga})}}Yi=Ve.makeVList({positionType:"individualShift",children:Yi},f),Yi=Ve.makeSpan(["col-align-"+(Ji.align||"c")],[Yi]),Zi.push(Yi),(g<X-1||u.hskipBeforeAndAfter)&&(Ns=$.deflt(Ji.postgap,mt),Ns!==0&&(ci=Ve.makeSpan(["arraycolsep"],[]),ci.style.width=Ns+"em",Zi.push(ci)))}}if(le=Ve.makeSpan(["mtable"],Zi),xe.length>0){for(var Ui=Ve.makeLineSpan("hline",f,Ne),No=Ve.makeLineSpan("hdashline",f,Ne),va=[{type:"elem",elem:le,shift:0}];xe.length>0;){var Fa=xe.pop(),uo=Fa.pos-$i;Fa.isDashed?va.push({type:"elem",elem:No,shift:uo}):va.push({type:"elem",elem:Ui,shift:uo})}le=Ve.makeVList({positionType:"individualShift",children:va},f)}return Ve.makeSpan(["mord"],[le],f)},js={c:"center ",l:"left ",r:"right "},Sn=function(u,f){var d=new Mt.MathNode("mtable",u.body.map(function(nn){return new Mt.MathNode("mtr",nn.map(function(Gn){return new Mt.MathNode("mtd",[kr(Gn,f)])}))})),g=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);d.setAttribute("rowspacing",g+"em");var w="",k="";if(u.cols){var X=u.cols,le="",xe=!1,Ne=0,Qe=X.length;X[0].type==="separator"&&(w+="top ",Ne=1),X[X.length-1].type==="separator"&&(w+="bottom ",Qe-=1);for(var mt=Ne;mt<Qe;mt++)X[mt].type==="align"?(k+=js[X[mt].align],xe&&(le+="none "),xe=!0):X[mt].type==="separator"&&xe&&(le+=X[mt].separator==="|"?"solid ":"dashed ",xe=!1);d.setAttribute("columnalign",k.trim()),/[sd]/.test(le)&&d.setAttribute("columnlines",le.trim())}if(u.colSeparationType==="align"){for(var Lt=u.cols||[],zt="",sr=1;sr<Lt.length;sr++)zt+=sr%2?"0em ":"1em ";d.setAttribute("columnspacing",zt.trim())}else u.colSeparationType==="alignat"?d.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):d.setAttribute("columnspacing","1em");var Ar="",Rr=u.hLinesBeforeRow;w+=Rr[0].length>0?"left ":"",w+=Rr[Rr.length-1].length>0?"right ":"";for(var Yr=1;Yr<Rr.length-1;Yr++)Ar+=Rr[Yr].length===0?"none ":Rr[Yr][0]?"dashed ":"solid ";return/[sd]/.test(Ar)&&d.setAttribute("rowlines",Ar.trim()),w!==""&&(d=new Mt.MathNode("menclose",[d]),d.setAttribute("notation",w.trim())),u.arraystretch&&u.arraystretch<1&&(d=new Mt.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},wn=function(u,f){var d=[],g=is(u.parser,{cols:d,addJot:!0},"display"),w,k=0,X={type:"ordgroup",mode:u.mode,body:[]},le=Gr(f[0],"ordgroup");if(le){for(var xe="",Ne=0;Ne<le.body.length;Ne++){var Qe=fr(le.body[Ne],"textord");xe+=Qe.text}w=Number(xe),k=w*2}var mt=!k;g.body.forEach(function(Ar){for(var Rr=1;Rr<Ar.length;Rr+=2){var Yr=fr(Ar[Rr],"styling"),nn=fr(Yr.body[0],"ordgroup");nn.body.unshift(X)}if(mt)k<Ar.length&&(k=Ar.length);else{var Gn=Ar.length/2;if(w<Gn)throw new v("Too many math in a row: "+("expected "+w+", but got "+Gn),Ar[0])}});for(var Lt=0;Lt<k;++Lt){var zt="r",sr=0;Lt%2===1?zt="l":Lt>0&&mt&&(sr=1),d[Lt]={type:"align",align:zt,pregap:sr,postgap:0}}return g.colSeparationType=mt?"align":"alignat",g};ji({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,f){var d=yn(f[0]),g=d?[f[0]]:fr(f[0],"ordgroup").body,w=g.map(function(X){var le=bn(X),xe=le.text;if("lcr".indexOf(xe)!==-1)return{type:"align",align:xe};if(xe==="|")return{type:"separator",separator:"|"};if(xe===":")return{type:"separator",separator:":"};throw new v("Unknown column alignment: "+xe,X)}),k={cols:w,hskipBeforeAndAfter:!0};return is(u.parser,k,Cs(u.envName))},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var f={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],d={hskipBeforeAndAfter:!1},g=is(u.parser,d,Cs(u.envName));return f?{type:"leftright",mode:u.mode,body:[g],left:f[0],right:f[1],rightColor:void 0}:g},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var f={arraystretch:.5},d=is(u.parser,f,"script");return d.colSeparationType="small",d},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,f){var d=yn(f[0]),g=d?[f[0]]:fr(f[0],"ordgroup").body,w=g.map(function(X){var le=bn(X),xe=le.text;if("lc".indexOf(xe)!==-1)return{type:"align",align:xe};throw new v("Unknown column alignment: "+xe,X)});if(w.length>1)throw new v("{subarray} can contain only one column");var k={cols:w,hskipBeforeAndAfter:!1,arraystretch:.5};if(k=is(u.parser,k,"script"),k.body[0].length>1)throw new v("{subarray} can contain only one column");return k},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var f={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},d=is(u.parser,f,Cs(u.envName));return{type:"leftright",mode:u.mode,body:[d],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["aligned"],props:{numArgs:0},handler:wn,htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var f={cols:[{type:"align",align:"c"}],addJot:!0};return is(u.parser,f,"display")},htmlBuilder:Vi,mathmlBuilder:Sn}),ji({type:"array",names:["alignedat"],props:{numArgs:1},handler:wn,htmlBuilder:Vi,mathmlBuilder:Sn}),lr({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,f){throw new v(u.funcName+" valid only within array environment")}});var Fn=ua,Si=Fn;lr({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];if(w.type!=="ordgroup")throw new v("Invalid environment name",w);for(var k="",X=0;X<w.body.length;++X)k+=fr(w.body[X],"textord").text;if(g==="\\begin"){if(!Si.hasOwnProperty(k))throw new v("No such environment: "+k,w);var le=Si[k],xe=d.parseArguments("\\begin{"+k+"}",le),Ne=xe.args,Qe=xe.optArgs,mt={mode:d.mode,envName:k,parser:d},Lt=le.handler(mt,Ne,Qe);d.expect("\\end",!1);var zt=d.nextToken,sr=fr(d.parseFunction(),"environment");if(sr.name!==k)throw new v("Mismatch: \\begin{"+k+"} matched by \\end{"+sr.name+"}",zt);return Lt}return{type:"environment",mode:d.mode,name:k,nameGroup:w}}});var Ti=Ve.makeSpan;function bs(P,u){var f=ln(P.body,u,!0);return Ti([P.mclass],f,u)}function Es(P,u){var f,d=Mn(P.body,u);return P.mclass==="minner"?Mt.newDocumentFragment(d):(P.mclass==="mord"?P.isCharacterBox?(f=d[0],f.type="mi"):f=new Mt.MathNode("mi",d):(P.isCharacterBox?(f=d[0],f.type="mo"):f=new Mt.MathNode("mo",d),P.mclass==="mbin"?(f.attributes.lspace="0.22em",f.attributes.rspace="0.22em"):P.mclass==="mpunct"?(f.attributes.lspace="0em",f.attributes.rspace="0.17em"):(P.mclass==="mopen"||P.mclass==="mclose")&&(f.attributes.lspace="0em",f.attributes.rspace="0em")),f)}lr({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];return{type:"mclass",mode:d.mode,mclass:"m"+g.substr(5),body:fn(w),isCharacterBox:$.isCharacterBox(w)}},htmlBuilder:bs,mathmlBuilder:Es});var ss=function(u){var f=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return f.type==="atom"&&(f.family==="bin"||f.family==="rel")?"m"+f.family:"mord"};lr({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,f){var d=u.parser;return{type:"mclass",mode:d.mode,mclass:ss(f[0]),body:[f[1]],isCharacterBox:$.isCharacterBox(f[1])}}}),lr({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[1],k=f[0],X;g!=="\\stackrel"?X=ss(w):X="mrel";var le={type:"op",mode:w.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:g!=="\\stackrel",body:fn(w)},xe={type:"supsub",mode:k.mode,base:le,sup:g==="\\underset"?null:k,sub:g==="\\underset"?k:null};return{type:"mclass",mode:d.mode,mclass:X,body:[xe],isCharacterBox:$.isCharacterBox(xe)}},htmlBuilder:bs,mathmlBuilder:Es});var Vs=function(u,f){var d=u.font,g=f.withFont(d);return Hr(u.body,g)},Rs=function(u,f){var d=u.font,g=f.withFont(d);return kr(u.body,g)},as={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};lr({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0],k=g;return k in as&&(k=as[k]),{type:"font",mode:d.mode,font:k.slice(1),body:w}},htmlBuilder:Vs,mathmlBuilder:Rs}),lr({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,f){var d=u.parser,g=f[0],w=$.isCharacterBox(g);return{type:"mclass",mode:d.mode,mclass:ss(g),body:[{type:"font",mode:d.mode,font:"boldsymbol",body:g}],isCharacterBox:w}}}),lr({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var d=u.parser,g=u.funcName,w=u.breakOnTokenText,k=d.mode,X=d.parseExpression(!0,w),le="math"+g.slice(1);return{type:"font",mode:k,font:le,body:{type:"ordgroup",mode:d.mode,body:X}}},htmlBuilder:Vs,mathmlBuilder:Rs});var Is=function(u,f){var d=f;return u==="display"?d=d.id>=b.SCRIPT.id?d.text():b.DISPLAY:u==="text"&&d.size===b.DISPLAY.size?d=b.TEXT:u==="script"?d=b.SCRIPT:u==="scriptscript"&&(d=b.SCRIPTSCRIPT),d},Ls=function(u,f){var d=Is(u.size,f.style),g=d.fracNum(),w=d.fracDen(),k;k=f.havingStyle(g);var X=Hr(u.numer,k,f);if(u.continued){var le=8.5/f.fontMetrics().ptPerEm,xe=3.5/f.fontMetrics().ptPerEm;X.height=X.height<le?le:X.height,X.depth=X.depth<xe?xe:X.depth}k=f.havingStyle(w);var Ne=Hr(u.denom,k,f),Qe,mt,Lt;u.hasBarLine?(u.barSize?(mt=Ie(u.barSize,f),Qe=Ve.makeLineSpan("frac-line",f,mt)):Qe=Ve.makeLineSpan("frac-line",f),mt=Qe.height,Lt=Qe.height):(Qe=null,mt=0,Lt=f.fontMetrics().defaultRuleThickness);var zt,sr,Ar;d.size===b.DISPLAY.size||u.size==="display"?(zt=f.fontMetrics().num1,mt>0?sr=3*Lt:sr=7*Lt,Ar=f.fontMetrics().denom1):(mt>0?(zt=f.fontMetrics().num2,sr=Lt):(zt=f.fontMetrics().num3,sr=3*Lt),Ar=f.fontMetrics().denom2);var Rr;if(Qe){var nn=f.fontMetrics().axisHeight;zt-X.depth-(nn+.5*mt)<sr&&(zt+=sr-(zt-X.depth-(nn+.5*mt))),nn-.5*mt-(Ne.height-Ar)<sr&&(Ar+=sr-(nn-.5*mt-(Ne.height-Ar)));var Gn=-(nn-.5*mt);Rr=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ne,shift:Ar},{type:"elem",elem:Qe,shift:Gn},{type:"elem",elem:X,shift:-zt}]},f)}else{var Yr=zt-X.depth-(Ne.height-Ar);Yr<sr&&(zt+=.5*(sr-Yr),Ar+=.5*(sr-Yr)),Rr=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ne,shift:Ar},{type:"elem",elem:X,shift:-zt}]},f)}k=f.havingStyle(d),Rr.height*=k.sizeMultiplier/f.sizeMultiplier,Rr.depth*=k.sizeMultiplier/f.sizeMultiplier;var Pn;d.size===b.DISPLAY.size?Pn=f.fontMetrics().delim1:Pn=f.fontMetrics().delim2;var Kn,Wn;return u.leftDelim==null?Kn=ti(f,["mopen"]):Kn=Ki.customSizedDelim(u.leftDelim,Pn,!0,f.havingStyle(d),u.mode,["mopen"]),u.continued?Wn=Ve.makeSpan([]):u.rightDelim==null?Wn=ti(f,["mclose"]):Wn=Ki.customSizedDelim(u.rightDelim,Pn,!0,f.havingStyle(d),u.mode,["mclose"]),Ve.makeSpan(["mord"].concat(k.sizingClasses(f)),[Kn,Ve.makeSpan(["mfrac"],[Rr]),Wn],f)},ks=function(u,f){var d=new Mt.MathNode("mfrac",[kr(u.numer,f),kr(u.denom,f)]);if(!u.hasBarLine)d.setAttribute("linethickness","0px");else if(u.barSize){var g=Ie(u.barSize,f);d.setAttribute("linethickness",g+"em")}var w=Is(u.size,f.style);if(w.size!==f.style.size){d=new Mt.MathNode("mstyle",[d]);var k=w.size===b.DISPLAY.size?"true":"false";d.setAttribute("displaystyle",k),d.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var X=[];if(u.leftDelim!=null){var le=new Mt.MathNode("mo",[new Mt.TextNode(u.leftDelim.replace("\\",""))]);le.setAttribute("fence","true"),X.push(le)}if(X.push(d),u.rightDelim!=null){var xe=new Mt.MathNode("mo",[new Mt.TextNode(u.rightDelim.replace("\\",""))]);xe.setAttribute("fence","true"),X.push(xe)}return Ri(X)}return d};lr({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0],k=f[1],X,le=null,xe=null,Ne="auto";switch(g){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":X=!0;break;case"\\\\atopfrac":X=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":X=!1,le="(",xe=")";break;case"\\\\bracefrac":X=!1,le="\\{",xe="\\}";break;case"\\\\brackfrac":X=!1,le="[",xe="]";break;default:throw new Error("Unrecognized genfrac command")}switch(g){case"\\cfrac":case"\\dfrac":case"\\dbinom":Ne="display";break;case"\\tfrac":case"\\tbinom":Ne="text";break}return{type:"genfrac",mode:d.mode,continued:g==="\\cfrac",numer:w,denom:k,hasBarLine:X,leftDelim:le,rightDelim:xe,size:Ne,barSize:null}},htmlBuilder:Ls,mathmlBuilder:ks}),lr({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var f=u.parser,d=u.funcName,g=u.token,w;switch(d){case"\\over":w="\\frac";break;case"\\choose":w="\\binom";break;case"\\atop":w="\\\\atopfrac";break;case"\\brace":w="\\\\bracefrac";break;case"\\brack":w="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:f.mode,replaceWith:w,token:g}}});var Ai=["display","text","script","scriptscript"],ki=function(u){var f=null;return u.length>0&&(f=u,f=f==="."?null:f),f};lr({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,f){var d=u.parser,g=f[4],w=f[5],k=Gr(f[0],"atom");k&&(k=hn(f[0],"open"));var X=k?ki(k.text):null,le=Gr(f[1],"atom");le&&(le=hn(f[1],"close"));var xe=le?ki(le.text):null,Ne=fr(f[2],"size"),Qe,mt=null;Ne.isBlank?Qe=!0:(mt=Ne.value,Qe=mt.number>0);var Lt="auto",zt=Gr(f[3],"ordgroup");if(zt){if(zt.body.length>0){var sr=fr(zt.body[0],"textord");Lt=Ai[Number(sr.text)]}}else zt=fr(f[3],"textord"),Lt=Ai[Number(zt.text)];return{type:"genfrac",mode:d.mode,numer:g,denom:w,continued:!1,hasBarLine:Qe,barSize:mt,leftDelim:X,rightDelim:xe,size:Lt}},htmlBuilder:Ls,mathmlBuilder:ks}),lr({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,f){var d=u.parser,g=u.funcName,w=u.token;return{type:"infix",mode:d.mode,replaceWith:"\\\\abovefrac",size:fr(f[0],"size").value,token:w}}}),lr({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0],k=q(fr(f[1],"infix").size),X=f[2],le=k.number>0;return{type:"genfrac",mode:d.mode,numer:w,denom:X,continued:!1,hasBarLine:le,barSize:k,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Ls,mathmlBuilder:ks});var Ka=function(u,f){var d=f.style,g,w,k=Gr(u,"supsub");k?(g=k.sup?Hr(k.sup,f.havingStyle(d.sup()),f):Hr(k.sub,f.havingStyle(d.sub()),f),w=fr(k.base,"horizBrace")):w=fr(u,"horizBrace");var X=Hr(w.base,f.havingBaseStyle(b.DISPLAY)),le=_i.svgSpan(w,f),xe;if(w.isOver?(xe=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:X},{type:"kern",size:.1},{type:"elem",elem:le}]},f),xe.children[0].children[0].children[1].classes.push("svg-align")):(xe=Ve.makeVList({positionType:"bottom",positionData:X.depth+.1+le.height,children:[{type:"elem",elem:le},{type:"kern",size:.1},{type:"elem",elem:X}]},f),xe.children[0].children[0].children[0].classes.push("svg-align")),g){var Ne=Ve.makeSpan(["mord",w.isOver?"mover":"munder"],[xe],f);w.isOver?xe=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Ne},{type:"kern",size:.2},{type:"elem",elem:g}]},f):xe=Ve.makeVList({positionType:"bottom",positionData:Ne.depth+.2+g.height+g.depth,children:[{type:"elem",elem:g},{type:"kern",size:.2},{type:"elem",elem:Ne}]},f)}return Ve.makeSpan(["mord",w.isOver?"mover":"munder"],[xe],f)},Tt=function(u,f){var d=_i.mathMLnode(u.label);return new Mt.MathNode(u.isOver?"mover":"munder",[kr(u.base,f),d])};lr({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=u.funcName;return{type:"horizBrace",mode:d.mode,label:g,isOver:/^\\over/.test(g),base:f[0]}},htmlBuilder:Ka,mathmlBuilder:Tt}),lr({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,f){var d=u.parser,g=f[1],w=fr(f[0],"url").url;return d.settings.isTrusted({command:"\\href",url:w})?{type:"href",mode:d.mode,href:w,body:fn(g)}:d.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,f){var d=ln(u.body,f,!1);return Ve.makeAnchor(u.href,[],d,f)},mathmlBuilder:function(u,f){var d=li(u.body,f);return d instanceof jn||(d=new jn("mrow",[d])),d.setAttribute("href",u.href),d}}),lr({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,f){var d=u.parser,g=fr(f[0],"url").url;if(!d.settings.isTrusted({command:"\\url",url:g}))return d.formatUnsupportedCmd("\\url");for(var w=[],k=0;k<g.length;k++){var X=g[k];X==="~"&&(X="\\textasciitilde"),w.push({type:"textord",mode:"text",text:X})}var le={type:"text",mode:d.mode,font:"\\texttt",body:w};return{type:"href",mode:d.mode,href:g,body:fn(le)}}}),lr({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,f){var d=u.parser;return{type:"htmlmathml",mode:d.mode,html:fn(f[0]),mathml:fn(f[1])}},htmlBuilder:function(u,f){var d=ln(u.html,f,!1);return Ve.makeFragment(d)},mathmlBuilder:function(u,f){return li(u.mathml,f)}});var Zs=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var f=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!f)throw new v("Invalid size: '"+u+"' in \\includegraphics");var d={number:+(f[1]+f[2]),unit:f[3]};if(!sn(d))throw new v("Invalid unit: '"+d.unit+"' in \\includegraphics.");return d};lr({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,f,d){var g=u.parser,w={number:0,unit:"em"},k={number:.9,unit:"em"},X={number:0,unit:"em"},le="";if(d[0])for(var xe=fr(d[0],"raw").string,Ne=xe.split(","),Qe=0;Qe<Ne.length;Qe++){var mt=Ne[Qe].split("=");if(mt.length===2){var Lt=mt[1].trim();switch(mt[0].trim()){case"alt":le=Lt;break;case"width":w=Zs(Lt);break;case"height":k=Zs(Lt);break;case"totalheight":X=Zs(Lt);break;default:throw new v("Invalid key: '"+mt[0]+"' in \\includegraphics.")}}}var zt=fr(f[0],"url").url;return le===""&&(le=zt,le=le.replace(/^.*[\\/]/,""),le=le.substring(0,le.lastIndexOf("."))),g.settings.isTrusted({command:"\\includegraphics",url:zt})?{type:"includegraphics",mode:g.mode,alt:le,width:w,height:k,totalheight:X,src:zt}:g.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,f){var d=Ie(u.height,f),g=0;u.totalheight.number>0&&(g=Ie(u.totalheight,f)-d,g=Number(g.toFixed(2)));var w=0;u.width.number>0&&(w=Ie(u.width,f));var k={height:d+g+"em"};w>0&&(k.width=w+"em"),g>0&&(k.verticalAlign=-g+"em");var X=new pt(u.src,u.alt,k);return X.height=d,X.depth=g,X},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mglyph",[]);d.setAttribute("alt",u.alt);var g=Ie(u.height,f),w=0;if(u.totalheight.number>0&&(w=Ie(u.totalheight,f)-g,w=w.toFixed(2),d.setAttribute("valign","-"+w+"em")),d.setAttribute("height",g+w+"em"),u.width.number>0){var k=Ie(u.width,f);d.setAttribute("width",k+"em")}return d.setAttribute("src",u.src),d}}),lr({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f){var d=u.parser,g=u.funcName,w=fr(f[0],"size");if(d.settings.strict){var k=g[1]==="m",X=w.value.unit==="mu";k?(X||d.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" supports only mu units, "+("not "+w.value.unit+" units")),d.mode!=="math"&&d.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" works only in math mode")):X&&d.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" doesn't support mu units")}return{type:"kern",mode:d.mode,dimension:w.value}},htmlBuilder:function(u,f){return Ve.makeGlue(u.dimension,f)},mathmlBuilder:function(u,f){var d=Ie(u.dimension,f);return new Mt.SpaceNode(d)}}),lr({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];return{type:"lap",mode:d.mode,alignment:g.slice(5),body:w}},htmlBuilder:function(u,f){var d;u.alignment==="clap"?(d=Ve.makeSpan([],[Hr(u.body,f)]),d=Ve.makeSpan(["inner"],[d],f)):d=Ve.makeSpan(["inner"],[Hr(u.body,f)]);var g=Ve.makeSpan(["fix"],[]),w=Ve.makeSpan([u.alignment],[d,g],f),k=Ve.makeSpan(["strut"]);return k.style.height=w.height+w.depth+"em",k.style.verticalAlign=-w.depth+"em",w.children.unshift(k),w=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:w}]},f),Ve.makeSpan(["mord"],[w],f)},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mpadded",[kr(u.body,f)]);if(u.alignment!=="rlap"){var g=u.alignment==="llap"?"-1":"-0.5";d.setAttribute("lspace",g+"width")}return d.setAttribute("width","0px"),d}}),lr({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var d=u.funcName,g=u.parser,w=g.mode;g.switchMode("math");var k=d==="\\("?"\\)":"$",X=g.parseExpression(!1,k);return g.expect(k),g.switchMode(w),{type:"styling",mode:g.mode,style:"text",body:X}}}),lr({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){throw new v("Mismatched "+u.funcName)}});var Ta=function(u,f){switch(f.style.size){case b.DISPLAY.size:return u.display;case b.TEXT.size:return u.text;case b.SCRIPT.size:return u.script;case b.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};lr({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,f){var d=u.parser;return{type:"mathchoice",mode:d.mode,display:fn(f[0]),text:fn(f[1]),script:fn(f[2]),scriptscript:fn(f[3])}},htmlBuilder:function(u,f){var d=Ta(u,f),g=ln(d,f,!1);return Ve.makeFragment(g)},mathmlBuilder:function(u,f){var d=Ta(u,f);return li(d,f)}});var Aa=function(u,f,d,g,w,k,X){u=Ve.makeSpan([],[u]);var le,xe;if(f){var Ne=Hr(f,g.havingStyle(w.sup()),g);xe={elem:Ne,kern:Math.max(g.fontMetrics().bigOpSpacing1,g.fontMetrics().bigOpSpacing3-Ne.depth)}}if(d){var Qe=Hr(d,g.havingStyle(w.sub()),g);le={elem:Qe,kern:Math.max(g.fontMetrics().bigOpSpacing2,g.fontMetrics().bigOpSpacing4-Qe.height)}}var mt;if(xe&&le){var Lt=g.fontMetrics().bigOpSpacing5+le.elem.height+le.elem.depth+le.kern+u.depth+X;mt=Ve.makeVList({positionType:"bottom",positionData:Lt,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:le.elem,marginLeft:-k+"em"},{type:"kern",size:le.kern},{type:"elem",elem:u},{type:"kern",size:xe.kern},{type:"elem",elem:xe.elem,marginLeft:k+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else if(le){var zt=u.height-X;mt=Ve.makeVList({positionType:"top",positionData:zt,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:le.elem,marginLeft:-k+"em"},{type:"kern",size:le.kern},{type:"elem",elem:u}]},g)}else if(xe){var sr=u.depth+X;mt=Ve.makeVList({positionType:"bottom",positionData:sr,children:[{type:"elem",elem:u},{type:"kern",size:xe.kern},{type:"elem",elem:xe.elem,marginLeft:k+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else return u;return Ve.makeSpan(["mop","op-limits"],[mt],g)},Wa=["\\smallint"],fs=function(u,f){var d,g,w=!1,k,X=Gr(u,"supsub");X?(d=X.sup,g=X.sub,k=fr(X.base,"op"),w=!0):k=fr(u,"op");var le=f.style,xe=!1;le.size===b.DISPLAY.size&&k.symbol&&!$.contains(Wa,k.name)&&(xe=!0);var Ne;if(k.symbol){var Qe=xe?"Size2-Regular":"Size1-Regular",mt="";if((k.name==="\\oiint"||k.name==="\\oiiint")&&(mt=k.name.substr(1),k.name=mt==="oiint"?"\\iint":"\\iiint"),Ne=Ve.makeSymbol(k.name,Qe,"math",f,["mop","op-symbol",xe?"large-op":"small-op"]),mt.length>0){var Lt=Ne.italic,zt=Ve.staticSvg(mt+"Size"+(xe?"2":"1"),f);Ne=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ne,shift:0},{type:"elem",elem:zt,shift:xe?.08:0}]},f),k.name="\\"+mt,Ne.classes.unshift("mop"),Ne.italic=Lt}}else if(k.body){var sr=ln(k.body,f,!0);sr.length===1&&sr[0]instanceof we?(Ne=sr[0],Ne.classes[0]="mop"):Ne=Ve.makeSpan(["mop"],Ve.tryCombineChars(sr),f)}else{for(var Ar=[],Rr=1;Rr<k.name.length;Rr++)Ar.push(Ve.mathsym(k.name[Rr],k.mode,f));Ne=Ve.makeSpan(["mop"],Ar,f)}var Yr=0,nn=0;return(Ne instanceof we||k.name==="\\oiint"||k.name==="\\oiiint")&&!k.suppressBaseShift&&(Yr=(Ne.height-Ne.depth)/2-f.fontMetrics().axisHeight,nn=Ne.italic),w?Aa(Ne,d,g,f,le,nn,Yr):(Yr&&(Ne.style.position="relative",Ne.style.top=Yr+"em"),Ne)},Ps=function(u,f){var d;if(u.symbol)d=new jn("mo",[Vn(u.name,u.mode)]),$.contains(Wa,u.name)&&d.setAttribute("largeop","false");else if(u.body)d=new jn("mo",Mn(u.body,f));else{d=new jn("mi",[new Or(u.name.slice(1))]);var g=new jn("mo",[Vn("\u2061","text")]);u.parentIsSupSub?d=new jn("mo",[d,g]):d=vi([d,g])}return d},Ao={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};lr({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(u,f){var d=u.parser,g=u.funcName,w=g;return w.length===1&&(w=Ao[w]),{type:"op",mode:d.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:w}},htmlBuilder:fs,mathmlBuilder:Ps}),lr({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=f[0];return{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:fn(g)}},htmlBuilder:fs,mathmlBuilder:Ps});var Do={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};lr({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(u){var f=u.parser,d=u.funcName;return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:d}},htmlBuilder:fs,mathmlBuilder:Ps}),lr({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var f=u.parser,d=u.funcName;return{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:d}},htmlBuilder:fs,mathmlBuilder:Ps}),lr({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var f=u.parser,d=u.funcName,g=d;return g.length===1&&(g=Do[g]),{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:g}},htmlBuilder:fs,mathmlBuilder:Ps});var ha=function(u,f){var d,g,w=!1,k,X=Gr(u,"supsub");X?(d=X.sup,g=X.sub,k=fr(X.base,"operatorname"),w=!0):k=fr(u,"operatorname");var le;if(k.body.length>0){for(var xe=k.body.map(function(Lt){var zt=Lt.text;return typeof zt=="string"?{type:"textord",mode:Lt.mode,text:zt}:Lt}),Ne=ln(xe,f.withFont("mathrm"),!0),Qe=0;Qe<Ne.length;Qe++){var mt=Ne[Qe];mt instanceof we&&(mt.text=mt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}le=Ve.makeSpan(["mop"],Ne,f)}else le=Ve.makeSpan(["mop"],[],f);return w?Aa(le,d,g,f,f.style,0,0):le},Ys=function(u,f){for(var d=Mn(u.body,f.withFont("mathrm")),g=!0,w=0;w<d.length;w++){var k=d[w];if(!(k instanceof Mt.SpaceNode))if(k instanceof Mt.MathNode)switch(k.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var X=k.children[0];k.children.length===1&&X instanceof Mt.TextNode?X.text=X.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):g=!1;break}default:g=!1}else g=!1}if(g){var le=d.map(function(Qe){return Qe.toText()}).join("");d=[new Mt.TextNode(le)]}var xe=new Mt.MathNode("mi",d);xe.setAttribute("mathvariant","normal");var Ne=new Mt.MathNode("mo",[Vn("\u2061","text")]);return u.parentIsSupSub?new Mt.MathNode("mo",[xe,Ne]):Mt.newDocumentFragment([xe,Ne])};lr({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];return{type:"operatorname",mode:d.mode,body:fn(w),alwaysHandleSupSub:g==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ha,mathmlBuilder:Ys}),un({type:"ordgroup",htmlBuilder:function(u,f){return u.semisimple?Ve.makeFragment(ln(u.body,f,!1)):Ve.makeSpan(["mord"],ln(u.body,f,!0),f)},mathmlBuilder:function(u,f){return li(u.body,f,!0)}}),lr({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,f){var d=u.parser,g=f[0];return{type:"overline",mode:d.mode,body:g}},htmlBuilder:function(u,f){var d=Hr(u.body,f.havingCrampedStyle()),g=Ve.makeLineSpan("overline-line",f),w=f.fontMetrics().defaultRuleThickness,k=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:d},{type:"kern",size:3*w},{type:"elem",elem:g},{type:"kern",size:w}]},f);return Ve.makeSpan(["mord","overline"],[k],f)},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mo",[new Mt.TextNode("\u203E")]);d.setAttribute("stretchy","true");var g=new Mt.MathNode("mover",[kr(u.body,f),d]);return g.setAttribute("accent","true"),g}}),lr({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var d=u.parser,g=f[0];return{type:"phantom",mode:d.mode,body:fn(g)}},htmlBuilder:function(u,f){var d=ln(u.body,f.withPhantom(),!1);return Ve.makeFragment(d)},mathmlBuilder:function(u,f){var d=Mn(u.body,f);return new Mt.MathNode("mphantom",d)}}),lr({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var d=u.parser,g=f[0];return{type:"hphantom",mode:d.mode,body:g}},htmlBuilder:function(u,f){var d=Ve.makeSpan([],[Hr(u.body,f.withPhantom())]);if(d.height=0,d.depth=0,d.children)for(var g=0;g<d.children.length;g++)d.children[g].height=0,d.children[g].depth=0;return d=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:d}]},f),Ve.makeSpan(["mord"],[d],f)},mathmlBuilder:function(u,f){var d=Mn(fn(u.body),f),g=new Mt.MathNode("mphantom",d),w=new Mt.MathNode("mpadded",[g]);return w.setAttribute("height","0px"),w.setAttribute("depth","0px"),w}}),lr({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var d=u.parser,g=f[0];return{type:"vphantom",mode:d.mode,body:g}},htmlBuilder:function(u,f){var d=Ve.makeSpan(["inner"],[Hr(u.body,f.withPhantom())]),g=Ve.makeSpan(["fix"],[]);return Ve.makeSpan(["mord","rlap"],[d,g],f)},mathmlBuilder:function(u,f){var d=Mn(fn(u.body),f),g=new Mt.MathNode("mphantom",d),w=new Mt.MathNode("mpadded",[g]);return w.setAttribute("width","0px"),w}}),lr({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,f){var d=u.parser,g=fr(f[0],"size").value,w=f[1];return{type:"raisebox",mode:d.mode,dy:g,body:w}},htmlBuilder:function(u,f){var d=Hr(u.body,f),g=Ie(u.dy,f);return Ve.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]},f)},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mpadded",[kr(u.body,f)]),g=u.dy.number+u.dy.unit;return d.setAttribute("voffset",g),d}}),lr({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,f,d){var g=u.parser,w=d[0],k=fr(f[0],"size"),X=fr(f[1],"size");return{type:"rule",mode:g.mode,shift:w&&fr(w,"size").value,width:k.value,height:X.value}},htmlBuilder:function(u,f){var d=Ve.makeSpan(["mord","rule"],[],f),g=Ie(u.width,f),w=Ie(u.height,f),k=u.shift?Ie(u.shift,f):0;return d.style.borderRightWidth=g+"em",d.style.borderTopWidth=w+"em",d.style.bottom=k+"em",d.width=g,d.height=w+k,d.depth=-k,d.maxFontSize=w*1.125*f.sizeMultiplier,d},mathmlBuilder:function(u,f){var d=Ie(u.width,f),g=Ie(u.height,f),w=u.shift?Ie(u.shift,f):0,k=f.color&&f.getColor()||"black",X=new Mt.MathNode("mspace");X.setAttribute("mathbackground",k),X.setAttribute("width",d+"em"),X.setAttribute("height",g+"em");var le=new Mt.MathNode("mpadded",[X]);return w>=0?le.setAttribute("height","+"+w+"em"):(le.setAttribute("height",w+"em"),le.setAttribute("depth","+"+-w+"em")),le.setAttribute("voffset",w+"em"),le}});function xs(P,u,f){for(var d=ln(P,u,!1),g=u.sizeMultiplier/f.sizeMultiplier,w=0;w<d.length;w++){var k=d[w].classes.indexOf("sizing");k<0?Array.prototype.push.apply(d[w].classes,u.sizingClasses(f)):d[w].classes[k+1]==="reset-size"+u.size&&(d[w].classes[k+1]="reset-size"+f.size),d[w].height*=g,d[w].depth*=g}return Ve.makeFragment(d)}var Ha=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Co=function(u,f){var d=f.havingSize(u.size);return xs(u.body,d,f)};lr({type:"sizing",names:Ha,props:{numArgs:0,allowedInText:!0},handler:function(u,f){var d=u.breakOnTokenText,g=u.funcName,w=u.parser,k=w.parseExpression(!1,d);return{type:"sizing",mode:w.mode,size:Ha.indexOf(g)+1,body:k}},htmlBuilder:Co,mathmlBuilder:function(u,f){var d=f.havingSize(u.size),g=Mn(u.body,d),w=new Mt.MathNode("mstyle",g);return w.setAttribute("mathsize",d.sizeMultiplier+"em"),w}}),lr({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,f,d){var g=u.parser,w=!1,k=!1,X=d[0]&&fr(d[0],"ordgroup");if(X)for(var le="",xe=0;xe<X.body.length;++xe){var Ne=X.body[xe];if(le=Ne.text,le==="t")w=!0;else if(le==="b")k=!0;else{w=!1,k=!1;break}}else w=!0,k=!0;var Qe=f[0];return{type:"smash",mode:g.mode,body:Qe,smashHeight:w,smashDepth:k}},htmlBuilder:function(u,f){var d=Ve.makeSpan([],[Hr(u.body,f)]);if(!u.smashHeight&&!u.smashDepth)return d;if(u.smashHeight&&(d.height=0,d.children))for(var g=0;g<d.children.length;g++)d.children[g].height=0;if(u.smashDepth&&(d.depth=0,d.children))for(var w=0;w<d.children.length;w++)d.children[w].depth=0;var k=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:d}]},f);return Ve.makeSpan(["mord"],[k],f)},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mpadded",[kr(u.body,f)]);return u.smashHeight&&d.setAttribute("height","0px"),u.smashDepth&&d.setAttribute("depth","0px"),d}}),lr({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,d){var g=u.parser,w=d[0],k=f[0];return{type:"sqrt",mode:g.mode,body:k,index:w}},htmlBuilder:function(u,f){var d=Hr(u.body,f.havingCrampedStyle());d.height===0&&(d.height=f.fontMetrics().xHeight),d=Ve.wrapFragment(d,f);var g=f.fontMetrics(),w=g.defaultRuleThickness,k=w;f.style.id<b.TEXT.id&&(k=f.fontMetrics().xHeight);var X=w+k/4,le=d.height+d.depth+X+w,xe=Ki.sqrtImage(le,f),Ne=xe.span,Qe=xe.ruleWidth,mt=xe.advanceWidth,Lt=Ne.height-Qe;Lt>d.height+d.depth+X&&(X=(X+Lt-d.height-d.depth)/2);var zt=Ne.height-d.height-X-Qe;d.style.paddingLeft=mt+"em";var sr=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:d,wrapperClasses:["svg-align"]},{type:"kern",size:-(d.height+zt)},{type:"elem",elem:Ne},{type:"kern",size:Qe}]},f);if(u.index){var Ar=f.havingStyle(b.SCRIPTSCRIPT),Rr=Hr(u.index,Ar,f),Yr=.6*(sr.height-sr.depth),nn=Ve.makeVList({positionType:"shift",positionData:-Yr,children:[{type:"elem",elem:Rr}]},f),Gn=Ve.makeSpan(["root"],[nn]);return Ve.makeSpan(["mord","sqrt"],[Gn,sr],f)}else return Ve.makeSpan(["mord","sqrt"],[sr],f)},mathmlBuilder:function(u,f){var d=u.body,g=u.index;return g?new Mt.MathNode("mroot",[kr(d,f),kr(g,f)]):new Mt.MathNode("msqrt",[kr(d,f)])}});var ja={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT};lr({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var d=u.breakOnTokenText,g=u.funcName,w=u.parser,k=w.parseExpression(!0,d),X=g.slice(1,g.length-5);return{type:"styling",mode:w.mode,style:X,body:k}},htmlBuilder:function(u,f){var d=ja[u.style],g=f.havingStyle(d).withFont("");return xs(u.body,g,f)},mathmlBuilder:function(u,f){var d=ja[u.style],g=f.havingStyle(d),w=Mn(u.body,g),k=new Mt.MathNode("mstyle",w),X={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},le=X[u.style];return k.setAttribute("scriptlevel",le[0]),k.setAttribute("displaystyle",le[1]),k}});var Ro=function(u,f){var d=u.base;if(d)if(d.type==="op"){var g=d.limits&&(f.style.size===b.DISPLAY.size||d.alwaysHandleSupSub);return g?fs:null}else if(d.type==="operatorname"){var w=d.alwaysHandleSupSub&&(f.style.size===b.DISPLAY.size||d.limits);return w?ha:null}else{if(d.type==="accent")return $.isCharacterBox(d.base)?dr:null;if(d.type==="horizBrace"){var k=!u.sub;return k===d.isOver?Ka:null}else return null}else return null};un({type:"supsub",htmlBuilder:function(u,f){var d=Ro(u,f);if(d)return d(u,f);var g=u.base,w=u.sup,k=u.sub,X=Hr(g,f),le,xe,Ne=f.fontMetrics(),Qe=0,mt=0,Lt=g&&$.isCharacterBox(g);if(w){var zt=f.havingStyle(f.style.sup());le=Hr(w,zt,f),Lt||(Qe=X.height-zt.fontMetrics().supDrop*zt.sizeMultiplier/f.sizeMultiplier)}if(k){var sr=f.havingStyle(f.style.sub());xe=Hr(k,sr,f),Lt||(mt=X.depth+sr.fontMetrics().subDrop*sr.sizeMultiplier/f.sizeMultiplier)}var Ar;f.style===b.DISPLAY?Ar=Ne.sup1:f.style.cramped?Ar=Ne.sup3:Ar=Ne.sup2;var Rr=f.sizeMultiplier,Yr=.5/Ne.ptPerEm/Rr+"em",nn=null;if(xe){var Gn=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(X instanceof we||Gn)&&(nn=-X.italic+"em")}var Pn;if(le&&xe){Qe=Math.max(Qe,Ar,le.depth+.25*Ne.xHeight),mt=Math.max(mt,Ne.sub2);var Kn=Ne.defaultRuleThickness,Wn=4*Kn;if(Qe-le.depth-(xe.height-mt)<Wn){mt=Wn-(Qe-le.depth)+xe.height;var Nn=.8*Ne.xHeight-(Qe-le.depth);Nn>0&&(Qe+=Nn,mt-=Nn)}var Ci=[{type:"elem",elem:xe,shift:mt,marginRight:Yr,marginLeft:nn},{type:"elem",elem:le,shift:-Qe,marginRight:Yr}];Pn=Ve.makeVList({positionType:"individualShift",children:Ci},f)}else if(xe){mt=Math.max(mt,Ne.sub1,xe.height-.8*Ne.xHeight);var Yn=[{type:"elem",elem:xe,marginLeft:nn,marginRight:Yr}];Pn=Ve.makeVList({positionType:"shift",positionData:mt,children:Yn},f)}else if(le)Qe=Math.max(Qe,Ar,le.depth+.25*Ne.xHeight),Pn=Ve.makeVList({positionType:"shift",positionData:-Qe,children:[{type:"elem",elem:le,marginRight:Yr}]},f);else throw new Error("supsub must have either sup or sub.");var Ke=oi(X,"right")||"mord";return Ve.makeSpan([Ke],[X,Ve.makeSpan(["msupsub"],[Pn])],f)},mathmlBuilder:function(u,f){var d=!1,g,w,k=Gr(u.base,"horizBrace");k&&(w=!!u.sup,w===k.isOver&&(d=!0,g=k.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var X=[kr(u.base,f)];u.sub&&X.push(kr(u.sub,f)),u.sup&&X.push(kr(u.sup,f));var le;if(d)le=g?"mover":"munder";else if(u.sub)if(u.sup){var Qe=u.base;Qe&&Qe.type==="op"&&Qe.limits&&f.style===b.DISPLAY||Qe&&Qe.type==="operatorname"&&Qe.alwaysHandleSupSub&&(f.style===b.DISPLAY||Qe.limits)?le="munderover":le="msubsup"}else{var Ne=u.base;Ne&&Ne.type==="op"&&Ne.limits&&(f.style===b.DISPLAY||Ne.alwaysHandleSupSub)||Ne&&Ne.type==="operatorname"&&Ne.alwaysHandleSupSub&&(Ne.limits||f.style===b.DISPLAY)?le="munder":le="msub"}else{var xe=u.base;xe&&xe.type==="op"&&xe.limits&&(f.style===b.DISPLAY||xe.alwaysHandleSupSub)||xe&&xe.type==="operatorname"&&xe.alwaysHandleSupSub&&(xe.limits||f.style===b.DISPLAY)?le="mover":le="msup"}var mt=new Mt.MathNode(le,X);return mt}}),un({type:"atom",htmlBuilder:function(u,f){return Ve.mathsym(u.text,u.mode,f,["m"+u.family])},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mo",[Vn(u.text,u.mode)]);if(u.family==="bin"){var g=mi(u,f);g==="bold-italic"&&d.setAttribute("mathvariant",g)}else u.family==="punct"?d.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&d.setAttribute("stretchy","false");return d}});var Da={mi:"italic",mn:"normal",mtext:"normal"};un({type:"mathord",htmlBuilder:function(u,f){return Ve.makeOrd(u,f,"mathord")},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mi",[Vn(u.text,u.mode,f)]),g=mi(u,f)||"italic";return g!==Da[d.type]&&d.setAttribute("mathvariant",g),d}}),un({type:"textord",htmlBuilder:function(u,f){return Ve.makeOrd(u,f,"textord")},mathmlBuilder:function(u,f){var d=Vn(u.text,u.mode,f),g=mi(u,f)||"normal",w;return u.mode==="text"?w=new Mt.MathNode("mtext",[d]):/[0-9]/.test(u.text)?w=new Mt.MathNode("mn",[d]):u.text==="\\prime"?w=new Mt.MathNode("mo",[d]):w=new Mt.MathNode("mi",[d]),g!==Da[w.type]&&w.setAttribute("mathvariant",g),w}});var qs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Os={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};un({type:"spacing",htmlBuilder:function(u,f){if(Os.hasOwnProperty(u.text)){var d=Os[u.text].className||"";if(u.mode==="text"){var g=Ve.makeOrd(u,f,"textord");return g.classes.push(d),g}else return Ve.makeSpan(["mspace",d],[Ve.mathsym(u.text,u.mode,f)],f)}else{if(qs.hasOwnProperty(u.text))return Ve.makeSpan(["mspace",qs[u.text]],[],f);throw new v('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,f){var d;if(Os.hasOwnProperty(u.text))d=new Mt.MathNode("mtext",[new Mt.TextNode("\xA0")]);else{if(qs.hasOwnProperty(u.text))return new Mt.MathNode("mspace");throw new v('Unknown type of space "'+u.text+'"')}return d}});var Ms=function(){var u=new Mt.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};un({type:"tag",mathmlBuilder:function(u,f){var d=new Mt.MathNode("mtable",[new Mt.MathNode("mtr",[Ms(),new Mt.MathNode("mtd",[li(u.body,f)]),Ms(),new Mt.MathNode("mtd",[li(u.tag,f)])])]);return d.setAttribute("width","100%"),d}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ca={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},fa=function(u,f){var d=u.font;return d?Va[d]?f.withTextFontFamily(Va[d]):Ca[d]?f.withTextFontWeight(Ca[d]):f.withTextFontShape(Za[d]):f};lr({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,f){var d=u.parser,g=u.funcName,w=f[0];return{type:"text",mode:d.mode,body:fn(w),font:g}},htmlBuilder:function(u,f){var d=fa(u,f),g=ln(u.body,d,!0);return Ve.makeSpan(["mord","text"],Ve.tryCombineChars(g),d)},mathmlBuilder:function(u,f){var d=fa(u,f);return li(u.body,d)}}),lr({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var d=u.parser;return{type:"underline",mode:d.mode,body:f[0]}},htmlBuilder:function(u,f){var d=Hr(u.body,f),g=Ve.makeLineSpan("underline-line",f),w=f.fontMetrics().defaultRuleThickness,k=Ve.makeVList({positionType:"top",positionData:d.height,children:[{type:"kern",size:w},{type:"elem",elem:g},{type:"kern",size:3*w},{type:"elem",elem:d}]},f);return Ve.makeSpan(["mord","underline"],[k],f)},mathmlBuilder:function(u,f){var d=new Mt.MathNode("mo",[new Mt.TextNode("\u203E")]);d.setAttribute("stretchy","true");var g=new Mt.MathNode("munder",[kr(u.body,f),d]);return g.setAttribute("accentunder","true"),g}}),lr({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,f,d){throw new v("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,f){for(var d=Ya(u),g=[],w=f.havingStyle(f.style.text()),k=0;k<d.length;k++){var X=d[k];X==="~"&&(X="\\textasciitilde"),g.push(Ve.makeSymbol(X,"Typewriter-Regular",u.mode,w,["mord","texttt"]))}return Ve.makeSpan(["mord","text"].concat(w.sizingClasses(f)),Ve.tryCombineChars(g),w)},mathmlBuilder:function(u,f){var d=new Mt.TextNode(Ya(u)),g=new Mt.MathNode("mtext",[d]);return g.setAttribute("mathvariant","monospace"),g}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},da=Ei,Xs=da,Ra=`[ \r
|
|
]`,Ia="\\\\[a-zA-Z@]+",qa="\\\\[^\uD800-\uDFFF]",Io=""+Ia+Ra+"*",Xa=new RegExp("^("+Ia+")"+Ra+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),ka="("+Ra+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Io)+("|"+qa+")"),Qa=function(){function P(f,d){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=f,this.settings=d,this.tokenRegex=new RegExp(ka,"g"),this.catcodes={"%":14}}var u=P.prototype;return u.setCatcode=function(d,g){this.catcodes[d]=g},u.lex=function(){var d=this.input,g=this.tokenRegex.lastIndex;if(g===d.length)return new _e("EOF",new Re(this,g,g));var w=this.tokenRegex.exec(d);if(w===null||w.index!==g)throw new v("Unexpected character: '"+d[g]+"'",new _e(d[g],new Re(this,g,g+1)));var k=w[2]||" ";if(this.catcodes[k]===14){var X=d.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return X===-1?(this.tokenRegex.lastIndex=d.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=X+1,this.lex()}var le=k.match(Xa);return le&&(k=le[1]),new _e(k,new Re(this,g,this.tokenRegex.lastIndex))},P}(),ko=function(){function P(f,d){f===void 0&&(f={}),d===void 0&&(d={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=d,this.builtins=f,this.undefStack=[]}var u=P.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new v("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var d=this.undefStack.pop();for(var g in d)d.hasOwnProperty(g)&&(d[g]===void 0?delete this.current[g]:this.current[g]=d[g])},u.has=function(d){return this.current.hasOwnProperty(d)||this.builtins.hasOwnProperty(d)},u.get=function(d){return this.current.hasOwnProperty(d)?this.current[d]:this.builtins[d]},u.set=function(d,g,w){if(w===void 0&&(w=!1),w){for(var k=0;k<this.undefStack.length;k++)delete this.undefStack[k][d];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][d]=g)}else{var X=this.undefStack[this.undefStack.length-1];X&&!X.hasOwnProperty(d)&&(X[d]=this.current[d])}this.current[d]=g},P}(),Ja={},Po=Ja;function pe(P,u){Ja[P]=u}pe("\\@firstoftwo",function(P){var u=P.consumeArgs(2);return{tokens:u[0],numArgs:0}}),pe("\\@secondoftwo",function(P){var u=P.consumeArgs(2);return{tokens:u[1],numArgs:0}}),pe("\\@ifnextchar",function(P){var u=P.consumeArgs(3),f=P.future();return u[0].length===1&&u[0][0].text===f.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),pe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),pe("\\TextOrMath",function(P){var u=P.consumeArgs(2);return P.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var eo={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};pe("\\char",function(P){var u=P.popToken(),f,d="";if(u.text==="'")f=8,u=P.popToken();else if(u.text==='"')f=16,u=P.popToken();else if(u.text==="`")if(u=P.popToken(),u.text[0]==="\\")d=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new v("\\char` missing argument");d=u.text.charCodeAt(0)}else f=10;if(f){if(d=eo[u.text],d==null||d>=f)throw new v("Invalid base-"+f+" digit "+u.text);for(var g;(g=eo[P.future().text])!=null&&g<f;)d*=f,d+=g,P.popToken()}return"\\@char{"+d+"}"});var Pa=function(u,f){var d=u.consumeArgs(1)[0];if(d.length!==1)throw new v("\\gdef's first argument must be a macro name");var g=d[0].text,w=0;for(d=u.consumeArgs(1)[0];d.length===1&&d[0].text==="#";){if(d=u.consumeArgs(1)[0],d.length!==1)throw new v('Invalid argument number length "'+d.length+'"');if(!/^[1-9]$/.test(d[0].text))throw new v('Invalid argument number "'+d[0].text+'"');if(w++,parseInt(d[0].text)!==w)throw new v('Argument number "'+d[0].text+'" out of order');d=u.consumeArgs(1)[0]}return u.macros.set(g,{tokens:d,numArgs:w},f),""};pe("\\gdef",function(P){return Pa(P,!0)}),pe("\\def",function(P){return Pa(P,!1)}),pe("\\global",function(P){var u=P.consumeArgs(1)[0];if(u.length!==1)throw new v("Invalid command after \\global");var f=u[0].text;if(f==="\\def")return Pa(P,!0);throw new v("Invalid command '"+f+"' after \\global")});var Oa=function(u,f,d){var g=u.consumeArgs(1)[0];if(g.length!==1)throw new v("\\newcommand's first argument must be a macro name");var w=g[0].text,k=u.isDefined(w);if(k&&!f)throw new v("\\newcommand{"+w+"} attempting to redefine "+(w+"; use \\renewcommand"));if(!k&&!d)throw new v("\\renewcommand{"+w+"} when command "+w+" does not yet exist; use \\newcommand");var X=0;if(g=u.consumeArgs(1)[0],g.length===1&&g[0].text==="["){for(var le="",xe=u.expandNextToken();xe.text!=="]"&&xe.text!=="EOF";)le+=xe.text,xe=u.expandNextToken();if(!le.match(/^\s*[0-9]+\s*$/))throw new v("Invalid number of arguments: "+le);X=parseInt(le),g=u.consumeArgs(1)[0]}return u.macros.set(w,{tokens:g,numArgs:X}),""};pe("\\newcommand",function(P){return Oa(P,!1,!0)}),pe("\\renewcommand",function(P){return Oa(P,!0,!1)}),pe("\\providecommand",function(P){return Oa(P,!0,!0)}),pe("\\bgroup","{"),pe("\\egroup","}"),pe("\\lq","`"),pe("\\rq","'"),pe("\\aa","\\r a"),pe("\\AA","\\r A"),pe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),pe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),pe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),pe("\u212C","\\mathscr{B}"),pe("\u2130","\\mathscr{E}"),pe("\u2131","\\mathscr{F}"),pe("\u210B","\\mathscr{H}"),pe("\u2110","\\mathscr{I}"),pe("\u2112","\\mathscr{L}"),pe("\u2133","\\mathscr{M}"),pe("\u211B","\\mathscr{R}"),pe("\u212D","\\mathfrak{C}"),pe("\u210C","\\mathfrak{H}"),pe("\u2128","\\mathfrak{Z}"),pe("\\Bbbk","\\Bbb{k}"),pe("\xB7","\\cdotp"),pe("\\llap","\\mathllap{\\textrm{#1}}"),pe("\\rlap","\\mathrlap{\\textrm{#1}}"),pe("\\clap","\\mathclap{\\textrm{#1}}"),pe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),pe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),pe("\\ne","\\neq"),pe("\u2260","\\neq"),pe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),pe("\u2209","\\notin"),pe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),pe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),pe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),pe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),pe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),pe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),pe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),pe("\u27C2","\\perp"),pe("\u203C","\\mathclose{!\\mkern-0.8mu!}"),pe("\u220C","\\notni"),pe("\u231C","\\ulcorner"),pe("\u231D","\\urcorner"),pe("\u231E","\\llcorner"),pe("\u231F","\\lrcorner"),pe("\xA9","\\copyright"),pe("\xAE","\\textregistered"),pe("\uFE0F","\\textregistered"),pe("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),pe("\u22EE","\\vdots"),pe("\\varGamma","\\mathit{\\Gamma}"),pe("\\varDelta","\\mathit{\\Delta}"),pe("\\varTheta","\\mathit{\\Theta}"),pe("\\varLambda","\\mathit{\\Lambda}"),pe("\\varXi","\\mathit{\\Xi}"),pe("\\varPi","\\mathit{\\Pi}"),pe("\\varSigma","\\mathit{\\Sigma}"),pe("\\varUpsilon","\\mathit{\\Upsilon}"),pe("\\varPhi","\\mathit{\\Phi}"),pe("\\varPsi","\\mathit{\\Psi}"),pe("\\varOmega","\\mathit{\\Omega}"),pe("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),pe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),pe("\\boxed","\\fbox{$\\displaystyle{#1}$}"),pe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),pe("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),pe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var to={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};pe("\\dots",function(P){var u="\\dotso",f=P.expandAfterFuture().text;return f in to?u=to[f]:(f.substr(0,4)==="\\not"||f in ir.math&&$.contains(["bin","rel"],ir.math[f].group))&&(u="\\dotsb"),u});var Bs={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};pe("\\dotso",function(P){var u=P.future().text;return u in Bs?"\\ldots\\,":"\\ldots"}),pe("\\dotsc",function(P){var u=P.future().text;return u in Bs&&u!==","?"\\ldots\\,":"\\ldots"}),pe("\\cdots",function(P){var u=P.future().text;return u in Bs?"\\@cdots\\,":"\\@cdots"}),pe("\\dotsb","\\cdots"),pe("\\dotsm","\\cdots"),pe("\\dotsi","\\!\\cdots"),pe("\\dotsx","\\ldots\\,"),pe("\\DOTSI","\\relax"),pe("\\DOTSB","\\relax"),pe("\\DOTSX","\\relax"),pe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),pe("\\,","\\tmspace+{3mu}{.1667em}"),pe("\\thinspace","\\,"),pe("\\>","\\mskip{4mu}"),pe("\\:","\\tmspace+{4mu}{.2222em}"),pe("\\medspace","\\:"),pe("\\;","\\tmspace+{5mu}{.2777em}"),pe("\\thickspace","\\;"),pe("\\!","\\tmspace-{3mu}{.1667em}"),pe("\\negthinspace","\\!"),pe("\\negmedspace","\\tmspace-{4mu}{.2222em}"),pe("\\negthickspace","\\tmspace-{5mu}{.277em}"),pe("\\enspace","\\kern.5em "),pe("\\enskip","\\hskip.5em\\relax"),pe("\\quad","\\hskip1em\\relax"),pe("\\qquad","\\hskip2em\\relax"),pe("\\tag","\\@ifstar\\tag@literal\\tag@paren"),pe("\\tag@paren","\\tag@literal{({#1})}"),pe("\\tag@literal",function(P){if(P.macros.get("\\df@tag"))throw new v("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),pe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),pe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),pe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),pe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),pe("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),pe("\\\\","\\newline"),pe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ro=yt["Main-Regular"][84][1]-.7*yt["Main-Regular"][65][1]+"em";pe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ro+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),pe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ro+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),pe("\\hspace","\\@ifstar\\@hspacer\\@hspace"),pe("\\@hspace","\\hskip #1\\relax"),pe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),pe("\\ordinarycolon",":"),pe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),pe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),pe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),pe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),pe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),pe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),pe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),pe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),pe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),pe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),pe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),pe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),pe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),pe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),pe("\u2237","\\dblcolon"),pe("\u2239","\\eqcolon"),pe("\u2254","\\coloneqq"),pe("\u2255","\\eqqcolon"),pe("\u2A74","\\Coloneqq"),pe("\\ratio","\\vcentcolon"),pe("\\coloncolon","\\dblcolon"),pe("\\colonequals","\\coloneqq"),pe("\\coloncolonequals","\\Coloneqq"),pe("\\equalscolon","\\eqqcolon"),pe("\\equalscoloncolon","\\Eqqcolon"),pe("\\colonminus","\\coloneq"),pe("\\coloncolonminus","\\Coloneq"),pe("\\minuscolon","\\eqcolon"),pe("\\minuscoloncolon","\\Eqcolon"),pe("\\coloncolonapprox","\\Colonapprox"),pe("\\coloncolonsim","\\Colonsim"),pe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),pe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),pe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),pe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),pe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),pe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),pe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),pe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),pe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),pe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),pe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),pe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),pe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),pe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),pe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),pe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),pe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),pe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),pe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),pe("\u27E6","\\llbracket"),pe("\u27E7","\\rrbracket"),pe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),pe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),pe("\u2983","\\lBrace"),pe("\u2984","\\rBrace"),pe("\\darr","\\downarrow"),pe("\\dArr","\\Downarrow"),pe("\\Darr","\\Downarrow"),pe("\\lang","\\langle"),pe("\\rang","\\rangle"),pe("\\uarr","\\uparrow"),pe("\\uArr","\\Uparrow"),pe("\\Uarr","\\Uparrow"),pe("\\N","\\mathbb{N}"),pe("\\R","\\mathbb{R}"),pe("\\Z","\\mathbb{Z}"),pe("\\alef","\\aleph"),pe("\\alefsym","\\aleph"),pe("\\Alpha","\\mathrm{A}"),pe("\\Beta","\\mathrm{B}"),pe("\\bull","\\bullet"),pe("\\Chi","\\mathrm{X}"),pe("\\clubs","\\clubsuit"),pe("\\cnums","\\mathbb{C}"),pe("\\Complex","\\mathbb{C}"),pe("\\Dagger","\\ddagger"),pe("\\diamonds","\\diamondsuit"),pe("\\empty","\\emptyset"),pe("\\Epsilon","\\mathrm{E}"),pe("\\Eta","\\mathrm{H}"),pe("\\exist","\\exists"),pe("\\harr","\\leftrightarrow"),pe("\\hArr","\\Leftrightarrow"),pe("\\Harr","\\Leftrightarrow"),pe("\\hearts","\\heartsuit"),pe("\\image","\\Im"),pe("\\infin","\\infty"),pe("\\Iota","\\mathrm{I}"),pe("\\isin","\\in"),pe("\\Kappa","\\mathrm{K}"),pe("\\larr","\\leftarrow"),pe("\\lArr","\\Leftarrow"),pe("\\Larr","\\Leftarrow"),pe("\\lrarr","\\leftrightarrow"),pe("\\lrArr","\\Leftrightarrow"),pe("\\Lrarr","\\Leftrightarrow"),pe("\\Mu","\\mathrm{M}"),pe("\\natnums","\\mathbb{N}"),pe("\\Nu","\\mathrm{N}"),pe("\\Omicron","\\mathrm{O}"),pe("\\plusmn","\\pm"),pe("\\rarr","\\rightarrow"),pe("\\rArr","\\Rightarrow"),pe("\\Rarr","\\Rightarrow"),pe("\\real","\\Re"),pe("\\reals","\\mathbb{R}"),pe("\\Reals","\\mathbb{R}"),pe("\\Rho","\\mathrm{P}"),pe("\\sdot","\\cdot"),pe("\\sect","\\S"),pe("\\spades","\\spadesuit"),pe("\\sub","\\subset"),pe("\\sube","\\subseteq"),pe("\\supe","\\supseteq"),pe("\\Tau","\\mathrm{T}"),pe("\\thetasym","\\vartheta"),pe("\\weierp","\\wp"),pe("\\Zeta","\\mathrm{Z}"),pe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),pe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),pe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),pe("\\blue","\\textcolor{##6495ed}{#1}"),pe("\\orange","\\textcolor{##ffa500}{#1}"),pe("\\pink","\\textcolor{##ff00af}{#1}"),pe("\\red","\\textcolor{##df0030}{#1}"),pe("\\green","\\textcolor{##28ae7b}{#1}"),pe("\\gray","\\textcolor{gray}{#1}"),pe("\\purple","\\textcolor{##9d38bd}{#1}"),pe("\\blueA","\\textcolor{##ccfaff}{#1}"),pe("\\blueB","\\textcolor{##80f6ff}{#1}"),pe("\\blueC","\\textcolor{##63d9ea}{#1}"),pe("\\blueD","\\textcolor{##11accd}{#1}"),pe("\\blueE","\\textcolor{##0c7f99}{#1}"),pe("\\tealA","\\textcolor{##94fff5}{#1}"),pe("\\tealB","\\textcolor{##26edd5}{#1}"),pe("\\tealC","\\textcolor{##01d1c1}{#1}"),pe("\\tealD","\\textcolor{##01a995}{#1}"),pe("\\tealE","\\textcolor{##208170}{#1}"),pe("\\greenA","\\textcolor{##b6ffb0}{#1}"),pe("\\greenB","\\textcolor{##8af281}{#1}"),pe("\\greenC","\\textcolor{##74cf70}{#1}"),pe("\\greenD","\\textcolor{##1fab54}{#1}"),pe("\\greenE","\\textcolor{##0d923f}{#1}"),pe("\\goldA","\\textcolor{##ffd0a9}{#1}"),pe("\\goldB","\\textcolor{##ffbb71}{#1}"),pe("\\goldC","\\textcolor{##ff9c39}{#1}"),pe("\\goldD","\\textcolor{##e07d10}{#1}"),pe("\\goldE","\\textcolor{##a75a05}{#1}"),pe("\\redA","\\textcolor{##fca9a9}{#1}"),pe("\\redB","\\textcolor{##ff8482}{#1}"),pe("\\redC","\\textcolor{##f9685d}{#1}"),pe("\\redD","\\textcolor{##e84d39}{#1}"),pe("\\redE","\\textcolor{##bc2612}{#1}"),pe("\\maroonA","\\textcolor{##ffbde0}{#1}"),pe("\\maroonB","\\textcolor{##ff92c6}{#1}"),pe("\\maroonC","\\textcolor{##ed5fa6}{#1}"),pe("\\maroonD","\\textcolor{##ca337c}{#1}"),pe("\\maroonE","\\textcolor{##9e034e}{#1}"),pe("\\purpleA","\\textcolor{##ddd7ff}{#1}"),pe("\\purpleB","\\textcolor{##c6b9fc}{#1}"),pe("\\purpleC","\\textcolor{##aa87ff}{#1}"),pe("\\purpleD","\\textcolor{##7854ab}{#1}"),pe("\\purpleE","\\textcolor{##543b78}{#1}"),pe("\\mintA","\\textcolor{##f5f9e8}{#1}"),pe("\\mintB","\\textcolor{##edf2df}{#1}"),pe("\\mintC","\\textcolor{##e0e5cc}{#1}"),pe("\\grayA","\\textcolor{##f6f7f7}{#1}"),pe("\\grayB","\\textcolor{##f0f1f2}{#1}"),pe("\\grayC","\\textcolor{##e3e5e6}{#1}"),pe("\\grayD","\\textcolor{##d6d8da}{#1}"),pe("\\grayE","\\textcolor{##babec2}{#1}"),pe("\\grayF","\\textcolor{##888d93}{#1}"),pe("\\grayG","\\textcolor{##626569}{#1}"),pe("\\grayH","\\textcolor{##3b3e40}{#1}"),pe("\\grayI","\\textcolor{##21242c}{#1}"),pe("\\kaBlue","\\textcolor{##314453}{#1}"),pe("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},no=function(){function P(f,d,g){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=d,this.expansionCount=0,this.feed(f),this.macros=new ko(Po,d.macros),this.mode=g,this.stack=[]}var u=P.prototype;return u.feed=function(d){this.lexer=new Qa(d,this.settings)},u.switchMode=function(d){this.mode=d},u.beginGroup=function(){this.macros.beginGroup()},u.endGroup=function(){this.macros.endGroup()},u.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},u.popToken=function(){return this.future(),this.stack.pop()},u.pushToken=function(d){this.stack.push(d)},u.pushTokens=function(d){var g;(g=this.stack).push.apply(g,d)},u.consumeSpaces=function(){for(;;){var d=this.future();if(d.text===" ")this.stack.pop();else break}},u.consumeArgs=function(d){for(var g=[],w=0;w<d;++w){this.consumeSpaces();var k=this.popToken();if(k.text==="{"){for(var X=[],le=1;le!==0;){var xe=this.popToken();if(X.push(xe),xe.text==="{")++le;else if(xe.text==="}")--le;else if(xe.text==="EOF")throw new v("End of input in macro argument",k)}X.pop(),X.reverse(),g[w]=X}else{if(k.text==="EOF")throw new v("End of input expecting macro argument");g[w]=[k]}}return g},u.expandOnce=function(){var d=this.popToken(),g=d.text,w=this._getExpansion(g);if(w==null)return this.pushToken(d),d;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new v("Too many expansions: infinite loop or need to increase maxExpand setting");var k=w.tokens;if(w.numArgs){var X=this.consumeArgs(w.numArgs);k=k.slice();for(var le=k.length-1;le>=0;--le){var xe=k[le];if(xe.text==="#"){if(le===0)throw new v("Incomplete placeholder at end of macro body",xe);if(xe=k[--le],xe.text==="#")k.splice(le+1,1);else if(/^[1-9]$/.test(xe.text)){var Ne;(Ne=k).splice.apply(Ne,[le,2].concat(X[+xe.text-1]))}else throw new v("Not a valid argument number",xe)}}}return this.pushTokens(k),k},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var d=this.expandOnce();if(d instanceof _e)if(d.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(d){if(this.macros.get(d)){var g=[],w=this.stack.length;for(this.pushToken(new _e(d));this.stack.length>w;){var k=this.expandOnce();k instanceof _e&&g.push(this.stack.pop())}return g}},u.expandMacroAsText=function(d){var g=this.expandMacro(d);return g&&g.map(function(w){return w.text}).join("")},u._getExpansion=function(d){var g=this.macros.get(d);if(g==null)return g;var w=typeof g=="function"?g(this):g;if(typeof w=="string"){var k=0;if(w.indexOf("#")!==-1)for(var X=w.replace(/##/g,"");X.indexOf("#"+(k+1))!==-1;)++k;for(var le=new Qa(w,this.settings),xe=[],Ne=le.lex();Ne.text!=="EOF";)xe.push(Ne),Ne=le.lex();xe.reverse();var Qe={tokens:xe,numArgs:k};return Qe}return w},u.isDefined=function(d){return this.macros.has(d)||Xs.hasOwnProperty(d)||ir.math.hasOwnProperty(d)||ir.text.hasOwnProperty(d)||Ma.hasOwnProperty(d)},P}(),io={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"}},pa={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Di=function(){function P(f,d){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new no(f,d,this.mode),this.settings=d,this.leftrightDepth=0}var u=P.prototype;return u.expect=function(d,g){if(g===void 0&&(g=!0),this.fetch().text!==d)throw new v("Expected '"+d+"', got '"+this.fetch().text+"'",this.fetch());g&&this.consume()},u.consume=function(){this.nextToken=null},u.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},u.switchMode=function(d){this.mode=d,this.gullet.switchMode(d)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var d=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),d},u.parseExpression=function(d,g){for(var w=[];;){this.mode==="math"&&this.consumeSpaces();var k=this.fetch();if(P.endOfExpression.indexOf(k.text)!==-1||g&&k.text===g||d&&Xs[k.text]&&Xs[k.text].infix)break;var X=this.parseAtom(g);if(!X)break;w.push(X)}return this.mode==="text"&&this.formLigatures(w),this.handleInfixNodes(w)},u.handleInfixNodes=function(d){for(var g=-1,w,k=0;k<d.length;k++){var X=Gr(d[k],"infix");if(X){if(g!==-1)throw new v("only one infix operator per group",X.token);g=k,w=X.replaceWith}}if(g!==-1&&w){var le,xe,Ne=d.slice(0,g),Qe=d.slice(g+1);Ne.length===1&&Ne[0].type==="ordgroup"?le=Ne[0]:le={type:"ordgroup",mode:this.mode,body:Ne},Qe.length===1&&Qe[0].type==="ordgroup"?xe=Qe[0]:xe={type:"ordgroup",mode:this.mode,body:Qe};var mt;return w==="\\\\abovefrac"?mt=this.callFunction(w,[le,d[g],xe],[]):mt=this.callFunction(w,[le,xe],[]),[mt]}else return d},u.handleSupSubscript=function(d){var g=this.fetch(),w=g.text;this.consume();var k=this.parseGroup(d,!1,P.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!k)throw new v("Expected group after '"+w+"'",g);return k},u.formatUnsupportedCmd=function(d){for(var g=[],w=0;w<d.length;w++)g.push({type:"textord",mode:"text",text:d[w]});var k={type:"text",mode:this.mode,body:g},X={type:"color",mode:this.mode,color:this.settings.errorColor,body:[k]};return X},u.parseAtom=function(d){var g=this.parseGroup("atom",!1,null,d);if(this.mode==="text")return g;for(var w,k;;){this.consumeSpaces();var X=this.fetch();if(X.text==="\\limits"||X.text==="\\nolimits"){var le=Gr(g,"op");if(le){var xe=X.text==="\\limits";le.limits=xe,le.alwaysHandleSupSub=!0}else if(le=Gr(g,"operatorname"),le&&le.alwaysHandleSupSub){var Ne=X.text==="\\limits";le.limits=Ne}else throw new v("Limit controls must follow a math operator",X);this.consume()}else if(X.text==="^"){if(w)throw new v("Double superscript",X);w=this.handleSupSubscript("superscript")}else if(X.text==="_"){if(k)throw new v("Double subscript",X);k=this.handleSupSubscript("subscript")}else if(X.text==="'"){if(w)throw new v("Double superscript",X);var Qe={type:"textord",mode:this.mode,text:"\\prime"},mt=[Qe];for(this.consume();this.fetch().text==="'";)mt.push(Qe),this.consume();this.fetch().text==="^"&&mt.push(this.handleSupSubscript("superscript")),w={type:"ordgroup",mode:this.mode,body:mt}}else break}return w||k?{type:"supsub",mode:this.mode,base:g,sup:w,sub:k}:g},u.parseFunction=function(d,g,w){var k=this.fetch(),X=k.text,le=Xs[X];if(!le)return null;if(this.consume(),w!=null&&le.greediness<=w)throw new v("Got function '"+X+"' with no arguments"+(g?" as "+g:""),k);if(this.mode==="text"&&!le.allowedInText)throw new v("Can't use function '"+X+"' in text mode",k);if(this.mode==="math"&&le.allowedInMath===!1)throw new v("Can't use function '"+X+"' in math mode",k);var xe=this.parseArguments(X,le),Ne=xe.args,Qe=xe.optArgs;return this.callFunction(X,Ne,Qe,k,d)},u.callFunction=function(d,g,w,k,X){var le={funcName:d,parser:this,token:k,breakOnTokenText:X},xe=Xs[d];if(xe&&xe.handler)return xe.handler(le,g,w);throw new v("No function handler for "+d)},u.parseArguments=function(d,g){var w=g.numArgs+g.numOptionalArgs;if(w===0)return{args:[],optArgs:[]};for(var k=g.greediness,X=[],le=[],xe=0;xe<w;xe++){var Ne=g.argTypes&&g.argTypes[xe],Qe=xe<g.numOptionalArgs,mt=xe>0&&!Qe||xe===0&&!Qe&&this.mode==="math",Lt=this.parseGroupOfType("argument to '"+d+"'",Ne,Qe,k,mt);if(!Lt){if(Qe){le.push(null);continue}throw new v("Expected group after '"+d+"'",this.fetch())}(Qe?le:X).push(Lt)}return{args:X,optArgs:le}},u.parseGroupOfType=function(d,g,w,k,X){switch(g){case"color":return X&&this.consumeSpaces(),this.parseColorGroup(w);case"size":return X&&this.consumeSpaces(),this.parseSizeGroup(w);case"url":return this.parseUrlGroup(w,X);case"math":case"text":return this.parseGroup(d,w,k,void 0,g,X);case"hbox":{var le=this.parseGroup(d,w,k,void 0,"text",X);if(!le)return le;var xe={type:"styling",mode:le.mode,body:[le],style:"text"};return xe}case"raw":{if(X&&this.consumeSpaces(),w&&this.fetch().text==="{")return null;var Ne=this.parseStringGroup("raw",w,!0);if(Ne)return{type:"raw",mode:"text",string:Ne.text};throw new v("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(d,w,k,void 0,void 0,X);default:throw new v("Unknown group type as "+d,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(d,g,w){var k=g?"[":"{",X=g?"]":"}",le=this.fetch();if(le.text!==k){if(g)return null;if(w&&le.text!=="EOF"&&/[^{}[\]]/.test(le.text))return this.consume(),le}var xe=this.mode;this.mode="text",this.expect(k);for(var Ne="",Qe=this.fetch(),mt=0,Lt=Qe,zt;(zt=this.fetch()).text!==X||w&&mt>0;){switch(zt.text){case"EOF":throw new v("Unexpected end of input in "+d,Qe.range(Lt,Ne));case k:mt++;break;case X:mt--;break}Lt=zt,Ne+=Lt.text,this.consume()}return this.expect(X),this.mode=xe,Qe.range(Lt,Ne)},u.parseRegexGroup=function(d,g){var w=this.mode;this.mode="text";for(var k=this.fetch(),X=k,le="",xe;(xe=this.fetch()).text!=="EOF"&&d.test(le+xe.text);)X=xe,le+=X.text,this.consume();if(le==="")throw new v("Invalid "+g+": '"+k.text+"'",k);return this.mode=w,k.range(X,le)},u.parseColorGroup=function(d){var g=this.parseStringGroup("color",d);if(!g)return null;var w=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(g.text);if(!w)throw new v("Invalid color: '"+g.text+"'",g);var k=w[0];return/^[0-9a-f]{6}$/i.test(k)&&(k="#"+k),{type:"color-token",mode:this.mode,color:k}},u.parseSizeGroup=function(d){var g,w=!1;if(!d&&this.fetch().text!=="{"?g=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):g=this.parseStringGroup("size",d),!g)return null;!d&&g.text.length===0&&(g.text="0pt",w=!0);var k=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(g.text);if(!k)throw new v("Invalid size: '"+g.text+"'",g);var X={number:+(k[1]+k[2]),unit:k[3]};if(!sn(X))throw new v("Invalid unit: '"+X.unit+"'",g);return{type:"size",mode:this.mode,value:X,isBlank:w}},u.parseUrlGroup=function(d,g){this.gullet.lexer.setCatcode("%",13);var w=this.parseStringGroup("url",d,!0);if(this.gullet.lexer.setCatcode("%",14),!w)return null;var k=w.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:k}},u.parseGroup=function(d,g,w,k,X,le){var xe=this.mode;X&&this.switchMode(X),le&&this.consumeSpaces();var Ne=this.fetch(),Qe=Ne.text,mt;if(g?Qe==="[":Qe==="{"||Qe==="\\begingroup"){this.consume();var Lt=P.endOfGroup[Qe];this.gullet.beginGroup();var zt=this.parseExpression(!1,Lt),sr=this.fetch();this.expect(Lt),this.gullet.endGroup(),mt={type:"ordgroup",mode:this.mode,loc:Re.range(Ne,sr),body:zt,semisimple:Qe==="\\begingroup"||void 0}}else if(g)mt=null;else if(mt=this.parseFunction(k,d,w)||this.parseSymbol(),mt==null&&Qe[0]==="\\"&&!Ma.hasOwnProperty(Qe)){if(this.settings.throwOnError)throw new v("Undefined control sequence: "+Qe,Ne);mt=this.formatUnsupportedCmd(Qe),this.consume()}return X&&this.switchMode(xe),mt},u.formLigatures=function(d){for(var g=d.length-1,w=0;w<g;++w){var k=d[w],X=k.text;X==="-"&&d[w+1].text==="-"&&(w+1<g&&d[w+2].text==="-"?(d.splice(w,3,{type:"textord",mode:"text",loc:Re.range(k,d[w+2]),text:"---"}),g-=2):(d.splice(w,2,{type:"textord",mode:"text",loc:Re.range(k,d[w+1]),text:"--"}),g-=1)),(X==="'"||X==="`")&&d[w+1].text===X&&(d.splice(w,2,{type:"textord",mode:"text",loc:Re.range(k,d[w+1]),text:X+X}),g-=1)}},u.parseSymbol=function(){var d=this.fetch(),g=d.text;if(/^\\verb[^a-zA-Z]/.test(g)){this.consume();var w=g.slice(5),k=w.charAt(0)==="*";if(k&&(w=w.slice(1)),w.length<2||w.charAt(0)!==w.slice(-1))throw new v(`\\verb assertion failed --
|
|
please report what input caused this bug`);return w=w.slice(1,-1),{type:"verb",mode:"text",body:w,star:k}}pa.hasOwnProperty(g[0])&&!ir[this.mode][g[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+g[0]+'" used in math mode',d),g=pa[g[0]]+g.substr(1));var X=Lo.exec(g);X&&(g=g.substring(0,X.index),g==="i"?g="\u0131":g==="j"&&(g="\u0237"));var le;if(ir[this.mode][g]){this.settings.strict&&this.mode==="math"&&_t.indexOf(g)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+g[0]+'" used in math mode',d);var xe=ir[this.mode][g].group,Ne=Re.range(d),Qe;if(er.hasOwnProperty(xe)){var mt=xe;Qe={type:"atom",mode:this.mode,family:mt,loc:Ne,text:g}}else Qe={type:xe,mode:this.mode,loc:Ne,text:g};le=Qe}else if(g.charCodeAt(0)>=128)this.settings.strict&&(He(g.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+g[0]+'" used in math mode',d):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+g[0]+'"'+(" ("+g.charCodeAt(0)+")"),d)),le={type:"textord",mode:"text",loc:Re.range(d),text:g};else return null;if(this.consume(),X)for(var Lt=0;Lt<X[0].length;Lt++){var zt=X[0][Lt];if(!io[zt])throw new v("Unknown accent ' "+zt+"'",d);var sr=io[zt][this.mode];if(!sr)throw new v("Accent "+zt+" unsupported in "+this.mode+" mode",d);le={type:"accent",mode:this.mode,loc:Re.range(d),label:sr,isStretchy:!1,isShifty:!0,base:le}}return le},P}();Di.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Di.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Di.SUPSUB_GREEDINESS=1;var Xi=function(u,f){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var d=new Di(u,f);delete d.gullet.macros.current["\\df@tag"];var g=d.parse();if(d.gullet.macros.get("\\df@tag")){if(!f.displayMode)throw new v("\\tag works only in display equations");d.gullet.feed("\\df@tag"),g=[{type:"tag",mode:"text",body:g,tag:d.parse()}]}return g},Qs=Xi,so=function(u,f,d){f.textContent="";var g=Ba(u,d).toNode();f.appendChild(g)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),so=function(){throw new v("KaTeX doesn't work in quirks mode.")});var ma=function(u,f){var d=Ba(u,f).toMarkup();return d},Oo=function(u,f){var d=new A(f);return Qs(u,d)},ao=function(u,f,d){if(d.throwOnError||!(u instanceof v))throw u;var g=Ve.makeSpan(["katex-error"],[new we(f)]);return g.setAttribute("title",u.toString()),g.setAttribute("style","color:"+d.errorColor),g},Ba=function(u,f){var d=new A(f);try{var g=Qs(u,d);return Dn(g,u,d)}catch(w){return ao(w,u,d)}},Mo=function(u,f){var d=new A(f);try{var g=Qs(u,d);return kn(g,u,d)}catch(w){return ao(w,u,d)}},oo={version:"0.11.1",render:so,renderToString:ma,ParseError:v,__parse:Oo,__renderToDomTree:Ba,__renderToHTMLTree:Mo,__setFontMetrics:Gt,__defineSymbol:y,__defineMacro:pe,__domTree:{Span:qe,Anchor:ht,SymbolNode:we,SvgNode:$e,PathNode:Be,LineNode:nt}},Bo=B.default=oo}]).default})},32834:function(Jt){(function(ot,B){Jt.exports=B()})(this,function(){"use strict";function ot(Ae,Te){for(var Le=0;Le<Te.length;Le++){var K=Te[Le];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(Ae,K.key,K)}}function B(Ae,Te,Le){return Te&&ot(Ae.prototype,Te),Le&&ot(Ae,Le),Ae}function I(Ae,Te){if(Ae){if(typeof Ae=="string")return be(Ae,Te);var Le=Object.prototype.toString.call(Ae).slice(8,-1);if(Le==="Object"&&Ae.constructor&&(Le=Ae.constructor.name),Le==="Map"||Le==="Set")return Array.from(Ae);if(Le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Le))return be(Ae,Te)}}function be(Ae,Te){(Te==null||Te>Ae.length)&&(Te=Ae.length);for(var Le=0,K=new Array(Te);Le<Te;Le++)K[Le]=Ae[Le];return K}function Re(Ae,Te){var Le=typeof Symbol!="undefined"&&Ae[Symbol.iterator]||Ae["@@iterator"];if(Le)return(Le=Le.call(Ae)).next.bind(Le);if(Array.isArray(Ae)||(Le=I(Ae))||Te&&Ae&&typeof Ae.length=="number"){Le&&(Ae=Le);var K=0;return function(){return K>=Ae.length?{done:!0}:{done:!1,value:Ae[K++]}}}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 _e={exports:{}};function Z(){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 v(Ae){_e.exports.defaults=Ae}_e.exports={defaults:Z(),getDefaults:Z,changeDefaults:v};var me=/[&<>"']/,ie=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,H=/[<>"']|&(?!#?\w+;)/g,F={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(Te){return F[Te]};function x(Ae,Te){if(Te){if(me.test(Ae))return Ae.replace(ie,E)}else if(l.test(Ae))return Ae.replace(H,E);return Ae}var T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(Ae){return Ae.replace(T,function(Te,Le){return Le=Le.toLowerCase(),Le==="colon"?":":Le.charAt(0)==="#"?Le.charAt(1)==="x"?String.fromCharCode(parseInt(Le.substring(2),16)):String.fromCharCode(+Le.substring(1)):""})}var q=/(^|[^\[])\^/g;function Y(Ae,Te){Ae=Ae.source||Ae,Te=Te||"";var Le={replace:function(J,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(q,"$1"),Ae=Ae.replace(J,Ee),Le},getRegex:function(){return new RegExp(Ae,Te)}};return Le}var $=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(Ae,Te,Le){if(Ae){var K;try{K=decodeURIComponent(L(Le)).replace($,"").toLowerCase()}catch(J){return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}Te&&!A.test(Le)&&(Le=he(Te,Le));try{Le=encodeURI(Le).replace(/%25/g,"%")}catch(J){return null}return Le}var O={},W=/^[^:]+:\/*[^/]*$/,ge=/^([^:]+:)[\s\S]*$/,De=/^([^:]+:\/*[^/]*)[\s\S]*$/;function he(Ae,Te){O[" "+Ae]||(W.test(Ae)?O[" "+Ae]=Ae+"/":O[" "+Ae]=ct(Ae,"/",!0)),Ae=O[" "+Ae];var Le=Ae.indexOf(":")===-1;return Te.substring(0,2)==="//"?Le?Te:Ae.replace(ge,"$1")+Te:Te.charAt(0)==="/"?Le?Te:Ae.replace(De,"$1")+Te:Ae+Te}var Me={exec:function(){}};function Fe(Ae){for(var Te=1,Le,K;Te<arguments.length;Te++){Le=arguments[Te];for(K in Le)Object.prototype.hasOwnProperty.call(Le,K)&&(Ae[K]=Le[K])}return Ae}function ke(Ae,Te){var Le=Ae.replace(/\|/g,function(Ee,Ce,N){for(var Et=!1,de=Ce;--de>=0&&N[de]==="\\";)Et=!Et;return Et?"|":" |"}),K=Le.split(/ \|/),J=0;if(K.length>Te)K.splice(Te);else for(;K.length<Te;)K.push("");for(;J<K.length;J++)K[J]=K[J].trim().replace(/\\\|/g,"|");return K}function ct(Ae,Te,Le){var K=Ae.length;if(K===0)return"";for(var J=0;J<K;){var Ee=Ae.charAt(K-J-1);if(Ee===Te&&!Le)J++;else if(Ee!==Te&&Le)J++;else break}return Ae.substr(0,K-J)}function ae(Ae,Te){if(Ae.indexOf(Te[1])===-1)return-1;for(var Le=Ae.length,K=0,J=0;J<Le;J++)if(Ae[J]==="\\")J++;else if(Ae[J]===Te[0])K++;else if(Ae[J]===Te[1]&&(K--,K<0))return J;return-1}function j(Ae){Ae&&Ae.sanitize&&!Ae.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 ee(Ae,Te){if(Te<1)return"";for(var Le="";Te>1;)Te&1&&(Le+=Ae),Te>>=1,Ae+=Ae;return Le+Ae}var ne={escape:x,unescape:L,edit:Y,cleanUrl:M,resolveUrl:he,noopTest:Me,merge:Fe,splitCells:ke,rtrim:ct,findClosingBracket:ae,checkSanitizeDeprecation:j,repeatString:ee},oe=_e.exports.defaults,re=ne.rtrim,b=ne.splitCells,S=ne.escape,V=ne.findClosingBracket;function ve(Ae,Te,Le){var K=Te.href,J=Te.title?S(Te.title):null,Ee=Ae[1].replace(/\\([\[\]])/g,"$1");return Ae[0].charAt(0)!=="!"?{type:"link",raw:Le,href:K,title:J,text:Ee}:{type:"image",raw:Le,href:K,title:J,text:S(Ee)}}function He(Ae,Te){var Le=Ae.match(/^(\s+)(?:```)/);if(Le===null)return Te;var K=Le[1];return Te.split(`
|
|
`).map(function(J){var Ee=J.match(/^\s+/);if(Ee===null)return J;var Ce=Ee[0];return Ce.length>=K.length?J.slice(K.length):J}).join(`
|
|
`)}var st=function(){function Ae(Le){this.options=Le||oe}var Te=Ae.prototype;return Te.space=function(K){var J=this.rules.block.newline.exec(K);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
`}},Te.code=function(K){var J=this.rules.block.code.exec(K);if(J){var Ee=J[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?Ee:re(Ee,`
|
|
`)}}},Te.fences=function(K){var J=this.rules.block.fences.exec(K);if(J){var Ee=J[0],Ce=He(Ee,J[3]||"");return{type:"code",raw:Ee,lang:J[2]?J[2].trim():J[2],text:Ce}}},Te.heading=function(K){var J=this.rules.block.heading.exec(K);if(J){var Ee=J[2].trim();if(/#$/.test(Ee)){var Ce=re(Ee,"#");(this.options.pedantic||!Ce||/ $/.test(Ce))&&(Ee=Ce.trim())}return{type:"heading",raw:J[0],depth:J[1].length,text:Ee}}},Te.nptable=function(K){var J=this.rules.block.nptable.exec(K);if(J){var Ee={type:"table",header:b(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[],raw:J[0]};if(Ee.header.length===Ee.align.length){var Ce=Ee.align.length,N;for(N=0;N<Ce;N++)/^ *-+: *$/.test(Ee.align[N])?Ee.align[N]="right":/^ *:-+: *$/.test(Ee.align[N])?Ee.align[N]="center":/^ *:-+ *$/.test(Ee.align[N])?Ee.align[N]="left":Ee.align[N]=null;for(Ce=Ee.cells.length,N=0;N<Ce;N++)Ee.cells[N]=b(Ee.cells[N],Ee.header.length);return Ee}}},Te.hr=function(K){var J=this.rules.block.hr.exec(K);if(J)return{type:"hr",raw:J[0]}},Te.blockquote=function(K){var J=this.rules.block.blockquote.exec(K);if(J){var Ee=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:Ee}}},Te.list=function(K){var J=this.rules.block.list.exec(K);if(J){var Ee=J[0],Ce=J[2],N=Ce.length>1,Et={type:"list",raw:Ee,ordered:N,start:N?+Ce.slice(0,-1):"",loose:!1,items:[]},de=J[0].match(this.rules.block.item),Bt=!1,Xt,Br,cn,jr,vr,xn,$n,Jr,en,$t=de.length;cn=this.rules.block.listItemStart.exec(de[0]);for(var xr=0;xr<$t;xr++){if(Xt=de[xr],Ee=Xt,this.options.pedantic||(en=Xt.match(new RegExp("\\n\\s*\\n {0,"+(cn[0].length-1)+"}\\S")),en&&(vr=Xt.length-en.index+de.slice(xr+1).join(`
|
|
`).length,Et.raw=Et.raw.substring(0,Et.raw.length-vr),Xt=Xt.substring(0,en.index),Ee=Xt,$t=xr+1)),xr!==$t-1){if(jr=this.rules.block.listItemStart.exec(de[xr+1]),this.options.pedantic?jr[1].length>cn[1].length:jr[1].length>=cn[0].length||jr[1].length>3){de.splice(xr,2,de[xr]+(!this.options.pedantic&&jr[1].length<cn[0].length&&!de[xr].match(/\n$/)?"":`
|
|
`)+de[xr+1]),xr--,$t--;continue}else(!this.options.pedantic||this.options.smartLists?jr[2][jr[2].length-1]!==Ce[Ce.length-1]:N===(jr[2].length===1))&&(vr=de.slice(xr+1).join(`
|
|
`).length,Et.raw=Et.raw.substring(0,Et.raw.length-vr),xr=$t-1);cn=jr}Br=Xt.length,Xt=Xt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Xt.indexOf(`
|
|
`)&&(Br-=Xt.length,Xt=this.options.pedantic?Xt.replace(/^ {1,4}/gm,""):Xt.replace(new RegExp("^ {1,"+Br+"}","gm"),"")),Xt=re(Xt,`
|
|
`),xr!==$t-1&&(Ee=Ee+`
|
|
`),xn=Bt||/\n\n(?!\s*$)/.test(Ee),xr!==$t-1&&(Bt=Ee.slice(-2)===`
|
|
|
|
`,xn||(xn=Bt)),xn&&(Et.loose=!0),this.options.gfm&&($n=/^\[[ xX]\] /.test(Xt),Jr=void 0,$n&&(Jr=Xt[1]!==" ",Xt=Xt.replace(/^\[[ xX]\] +/,""))),Et.items.push({type:"list_item",raw:Ee,task:$n,checked:Jr,loose:xn,text:Xt})}return Et}},Te.html=function(K){var J=this.rules.block.html.exec(K);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):S(J[0]):J[0]}},Te.def=function(K){var J=this.rules.block.def.exec(K);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var Ee=J[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Ee,raw:J[0],href:J[2],title:J[3]}}},Te.table=function(K){var J=this.rules.block.table.exec(K);if(J){var Ee={type:"table",header:b(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=J[0];var Ce=Ee.align.length,N;for(N=0;N<Ce;N++)/^ *-+: *$/.test(Ee.align[N])?Ee.align[N]="right":/^ *:-+: *$/.test(Ee.align[N])?Ee.align[N]="center":/^ *:-+ *$/.test(Ee.align[N])?Ee.align[N]="left":Ee.align[N]=null;for(Ce=Ee.cells.length,N=0;N<Ce;N++)Ee.cells[N]=b(Ee.cells[N].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},Te.lheading=function(K){var J=this.rules.block.lheading.exec(K);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},Te.paragraph=function(K){var J=this.rules.block.paragraph.exec(K);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
`?J[1].slice(0,-1):J[1]}},Te.text=function(K){var J=this.rules.block.text.exec(K);if(J)return{type:"text",raw:J[0],text:J[0]}},Te.escape=function(K){var J=this.rules.inline.escape.exec(K);if(J)return{type:"escape",raw:J[0],text:S(J[1])}},Te.tag=function(K,J,Ee){var Ce=this.rules.inline.tag.exec(K);if(Ce)return!J&&/^<a /i.test(Ce[0])?J=!0:J&&/^<\/a>/i.test(Ce[0])&&(J=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ce[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ce[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Ce[0],inLink:J,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):S(Ce[0]):Ce[0]}},Te.link=function(K){var J=this.rules.inline.link.exec(K);if(J){var Ee=J[2].trim();if(!this.options.pedantic&&/^</.test(Ee)){if(!/>$/.test(Ee))return;var Ce=re(Ee.slice(0,-1),"\\");if((Ee.length-Ce.length)%2===0)return}else{var N=V(J[2],"()");if(N>-1){var Et=J[0].indexOf("!")===0?5:4,de=Et+J[1].length+N;J[2]=J[2].substring(0,N),J[0]=J[0].substring(0,de).trim(),J[3]=""}}var Bt=J[2],Xt="";if(this.options.pedantic){var Br=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Bt);Br&&(Bt=Br[1],Xt=Br[3])}else Xt=J[3]?J[3].slice(1,-1):"";return Bt=Bt.trim(),/^</.test(Bt)&&(this.options.pedantic&&!/>$/.test(Ee)?Bt=Bt.slice(1):Bt=Bt.slice(1,-1)),ve(J,{href:Bt&&Bt.replace(this.rules.inline._escapes,"$1"),title:Xt&&Xt.replace(this.rules.inline._escapes,"$1")},J[0])}},Te.reflink=function(K,J){var Ee;if((Ee=this.rules.inline.reflink.exec(K))||(Ee=this.rules.inline.nolink.exec(K))){var Ce=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Ce=J[Ce.toLowerCase()],!Ce||!Ce.href){var N=Ee[0].charAt(0);return{type:"text",raw:N,text:N}}return ve(Ee,Ce,Ee[0])}},Te.emStrong=function(K,J,Ee){Ee===void 0&&(Ee="");var Ce=this.rules.inline.emStrong.lDelim.exec(K);if(Ce&&!(Ce[3]&&Ee.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 N=Ce[1]||Ce[2]||"";if(!N||N&&(Ee===""||this.rules.inline.punctuation.exec(Ee))){var Et=Ce[0].length-1,de,Bt,Xt=Et,Br=0,cn=Ce[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(cn.lastIndex=0,J=J.slice(-1*K.length+Et);(Ce=cn.exec(J))!=null;)if(de=Ce[1]||Ce[2]||Ce[3]||Ce[4]||Ce[5]||Ce[6],!!de){if(Bt=de.length,Ce[3]||Ce[4]){Xt+=Bt;continue}else if((Ce[5]||Ce[6])&&Et%3&&!((Et+Bt)%3)){Br+=Bt;continue}if(Xt-=Bt,!(Xt>0))return Bt=Math.min(Bt,Bt+Xt+Br),Math.min(Et,Bt)%2?{type:"em",raw:K.slice(0,Et+Ce.index+Bt+1),text:K.slice(1,Et+Ce.index+Bt)}:{type:"strong",raw:K.slice(0,Et+Ce.index+Bt+1),text:K.slice(2,Et+Ce.index+Bt-1)}}}}},Te.codespan=function(K){var J=this.rules.inline.code.exec(K);if(J){var Ee=J[2].replace(/\n/g," "),Ce=/[^ ]/.test(Ee),N=/^ /.test(Ee)&&/ $/.test(Ee);return Ce&&N&&(Ee=Ee.substring(1,Ee.length-1)),Ee=S(Ee,!0),{type:"codespan",raw:J[0],text:Ee}}},Te.br=function(K){var J=this.rules.inline.br.exec(K);if(J)return{type:"br",raw:J[0]}},Te.del=function(K){var J=this.rules.inline.del.exec(K);if(J)return{type:"del",raw:J[0],text:J[2]}},Te.autolink=function(K,J){var Ee=this.rules.inline.autolink.exec(K);if(Ee){var Ce,N;return Ee[2]==="@"?(Ce=S(this.options.mangle?J(Ee[1]):Ee[1]),N="mailto:"+Ce):(Ce=S(Ee[1]),N=Ce),{type:"link",raw:Ee[0],text:Ce,href:N,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Te.url=function(K,J){var Ee;if(Ee=this.rules.inline.url.exec(K)){var Ce,N;if(Ee[2]==="@")Ce=S(this.options.mangle?J(Ee[0]):Ee[0]),N="mailto:"+Ce;else{var Et;do Et=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Et!==Ee[0]);Ce=S(Ee[0]),Ee[1]==="www."?N="http://"+Ce:N=Ce}return{type:"link",raw:Ee[0],text:Ce,href:N,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Te.inlineText=function(K,J,Ee){var Ce=this.rules.inline.text.exec(K);if(Ce){var N;return J?N=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):S(Ce[0]):Ce[0]:N=S(this.options.smartypants?Ee(Ce[0]):Ce[0]),{type:"text",raw:Ce[0],text:N}}},Ae}(),tt=ne.noopTest,Xe=ne.edit,xt=ne.merge,et={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:tt,table:tt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};et._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,et._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,et.def=Xe(et.def).replace("label",et._label).replace("title",et._title).getRegex(),et.bullet=/(?:[*+-]|\d{1,9}[.)])/,et.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,et.item=Xe(et.item,"gm").replace(/bull/g,et.bullet).getRegex(),et.listItemStart=Xe(/^( *)(bull) */).replace("bull",et.bullet).getRegex(),et.list=Xe(et.list).replace(/bull/g,et.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+et.def.source+")").getRegex(),et._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",et._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,et.html=Xe(et.html,"i").replace("comment",et._comment).replace("tag",et._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),et.paragraph=Xe(et._paragraph).replace("hr",et.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",et._tag).getRegex(),et.blockquote=Xe(et.blockquote).replace("paragraph",et.paragraph).getRegex(),et.normal=xt({},et),et.gfm=xt({},et.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*|$)"}),et.gfm.nptable=Xe(et.gfm.nptable).replace("hr",et.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",et._tag).getRegex(),et.gfm.table=Xe(et.gfm.table).replace("hr",et.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",et._tag).getRegex(),et.pedantic=xt({},et.normal,{html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",et._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:tt,paragraph:Xe(et.normal._paragraph).replace("hr",et.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",et.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:tt,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:tt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Ue._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ue.punctuation=Xe(Ue.punctuation).replace(/punctuation/g,Ue._punctuation).getRegex(),Ue.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ue.escapedEmSt=/\\\*|\\_/g,Ue._comment=Xe(et._comment).replace("(?:-->|$)","-->").getRegex(),Ue.emStrong.lDelim=Xe(Ue.emStrong.lDelim).replace(/punct/g,Ue._punctuation).getRegex(),Ue.emStrong.rDelimAst=Xe(Ue.emStrong.rDelimAst,"g").replace(/punct/g,Ue._punctuation).getRegex(),Ue.emStrong.rDelimUnd=Xe(Ue.emStrong.rDelimUnd,"g").replace(/punct/g,Ue._punctuation).getRegex(),Ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ue._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])?)+(?![-_])/,Ue.autolink=Xe(Ue.autolink).replace("scheme",Ue._scheme).replace("email",Ue._email).getRegex(),Ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ue.tag=Xe(Ue.tag).replace("comment",Ue._comment).replace("attribute",Ue._attribute).getRegex(),Ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ue._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ue.link=Xe(Ue.link).replace("label",Ue._label).replace("href",Ue._href).replace("title",Ue._title).getRegex(),Ue.reflink=Xe(Ue.reflink).replace("label",Ue._label).getRegex(),Ue.reflinkSearch=Xe(Ue.reflinkSearch,"g").replace("reflink",Ue.reflink).replace("nolink",Ue.nolink).getRegex(),Ue.normal=xt({},Ue),Ue.pedantic=xt({},Ue.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:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ue._label).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ue._label).getRegex()}),Ue.gfm=xt({},Ue.normal,{escape:Xe(Ue.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Ue.gfm.url=Xe(Ue.gfm.url,"i").replace("email",Ue.gfm._extended_email).getRegex(),Ue.breaks=xt({},Ue.gfm,{br:Xe(Ue.br).replace("{2,}","*").getRegex(),text:Xe(Ue.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Yt={block:et,inline:Ue},Nt=st,Sr=_e.exports.defaults,wt=Yt.block,Er=Yt.inline,ze=ne.repeatString;function Oe(Ae){return Ae.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 Se(Ae){var Te="",Le,K,J=Ae.length;for(Le=0;Le<J;Le++)K=Ae.charCodeAt(Le),Math.random()>.5&&(K="x"+K.toString(16)),Te+="&#"+K+";";return Te}var qe=function(){function Ae(Le){this.tokens=[],this.tokens.links=Object.create(null),this.options=Le||Sr,this.options.tokenizer=this.options.tokenizer||new Nt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var K={block:wt.normal,inline:Er.normal};this.options.pedantic?(K.block=wt.pedantic,K.inline=Er.pedantic):this.options.gfm&&(K.block=wt.gfm,this.options.breaks?K.inline=Er.breaks:K.inline=Er.gfm),this.tokenizer.rules=K}Ae.lex=function(K,J){var Ee=new Ae(J);return Ee.lex(K)},Ae.lexInline=function(K,J){var Ee=new Ae(J);return Ee.inlineTokens(K)};var Te=Ae.prototype;return Te.lex=function(K){return K=K.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(K,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(K,J,Ee){J===void 0&&(J=[]),Ee===void 0&&(Ee=!0),this.options.pedantic&&(K=K.replace(/^ +$/gm,""));for(var Ce,N,Et,de;K;){if(Ce=this.tokenizer.space(K)){K=K.substring(Ce.raw.length),Ce.type&&J.push(Ce);continue}if(Ce=this.tokenizer.code(K)){K=K.substring(Ce.raw.length),de=J[J.length-1],de&&de.type==="paragraph"?(de.raw+=`
|
|
`+Ce.raw,de.text+=`
|
|
`+Ce.text):J.push(Ce);continue}if(Ce=this.tokenizer.fences(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.heading(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.nptable(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.hr(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.blockquote(K)){K=K.substring(Ce.raw.length),Ce.tokens=this.blockTokens(Ce.text,[],Ee),J.push(Ce);continue}if(Ce=this.tokenizer.list(K)){for(K=K.substring(Ce.raw.length),Et=Ce.items.length,N=0;N<Et;N++)Ce.items[N].tokens=this.blockTokens(Ce.items[N].text,[],!1);J.push(Ce);continue}if(Ce=this.tokenizer.html(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ee&&(Ce=this.tokenizer.def(K))){K=K.substring(Ce.raw.length),this.tokens.links[Ce.tag]||(this.tokens.links[Ce.tag]={href:Ce.href,title:Ce.title});continue}if(Ce=this.tokenizer.table(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.lheading(K)){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ee&&(Ce=this.tokenizer.paragraph(K))){K=K.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.text(K)){K=K.substring(Ce.raw.length),de=J[J.length-1],de&&de.type==="text"?(de.raw+=`
|
|
`+Ce.raw,de.text+=`
|
|
`+Ce.text):J.push(Ce);continue}if(K){var Bt="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return J},Te.inline=function(K){var J,Ee,Ce,N,Et,de,Bt=K.length;for(J=0;J<Bt;J++)switch(de=K[J],de.type){case"paragraph":case"text":case"heading":{de.tokens=[],this.inlineTokens(de.text,de.tokens);break}case"table":{for(de.tokens={header:[],cells:[]},N=de.header.length,Ee=0;Ee<N;Ee++)de.tokens.header[Ee]=[],this.inlineTokens(de.header[Ee],de.tokens.header[Ee]);for(N=de.cells.length,Ee=0;Ee<N;Ee++)for(Et=de.cells[Ee],de.tokens.cells[Ee]=[],Ce=0;Ce<Et.length;Ce++)de.tokens.cells[Ee][Ce]=[],this.inlineTokens(Et[Ce],de.tokens.cells[Ee][Ce]);break}case"blockquote":{this.inline(de.tokens);break}case"list":{for(N=de.items.length,Ee=0;Ee<N;Ee++)this.inline(de.items[Ee].tokens);break}}return K},Te.inlineTokens=function(K,J,Ee,Ce){J===void 0&&(J=[]),Ee===void 0&&(Ee=!1),Ce===void 0&&(Ce=!1);var N,Et,de=K,Bt,Xt,Br;if(this.tokens.links){var cn=Object.keys(this.tokens.links);if(cn.length>0)for(;(Bt=this.tokenizer.rules.inline.reflinkSearch.exec(de))!=null;)cn.includes(Bt[0].slice(Bt[0].lastIndexOf("[")+1,-1))&&(de=de.slice(0,Bt.index)+"["+ze("a",Bt[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Bt=this.tokenizer.rules.inline.blockSkip.exec(de))!=null;)de=de.slice(0,Bt.index)+"["+ze("a",Bt[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Bt=this.tokenizer.rules.inline.escapedEmSt.exec(de))!=null;)de=de.slice(0,Bt.index)+"++"+de.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;K;){if(Xt||(Br=""),Xt=!1,N=this.tokenizer.escape(K)){K=K.substring(N.raw.length),J.push(N);continue}if(N=this.tokenizer.tag(K,Ee,Ce)){K=K.substring(N.raw.length),Ee=N.inLink,Ce=N.inRawBlock;var jr=J[J.length-1];jr&&N.type==="text"&&jr.type==="text"?(jr.raw+=N.raw,jr.text+=N.text):J.push(N);continue}if(N=this.tokenizer.link(K)){K=K.substring(N.raw.length),N.type==="link"&&(N.tokens=this.inlineTokens(N.text,[],!0,Ce)),J.push(N);continue}if(N=this.tokenizer.reflink(K,this.tokens.links)){K=K.substring(N.raw.length);var vr=J[J.length-1];N.type==="link"?(N.tokens=this.inlineTokens(N.text,[],!0,Ce),J.push(N)):vr&&N.type==="text"&&vr.type==="text"?(vr.raw+=N.raw,vr.text+=N.text):J.push(N);continue}if(N=this.tokenizer.emStrong(K,de,Br)){K=K.substring(N.raw.length),N.tokens=this.inlineTokens(N.text,[],Ee,Ce),J.push(N);continue}if(N=this.tokenizer.codespan(K)){K=K.substring(N.raw.length),J.push(N);continue}if(N=this.tokenizer.br(K)){K=K.substring(N.raw.length),J.push(N);continue}if(N=this.tokenizer.del(K)){K=K.substring(N.raw.length),N.tokens=this.inlineTokens(N.text,[],Ee,Ce),J.push(N);continue}if(N=this.tokenizer.autolink(K,Se)){K=K.substring(N.raw.length),J.push(N);continue}if(!Ee&&(N=this.tokenizer.url(K,Se))){K=K.substring(N.raw.length),J.push(N);continue}if(N=this.tokenizer.inlineText(K,Ce,Oe)){K=K.substring(N.raw.length),N.raw.slice(-1)!=="_"&&(Br=N.raw.slice(-1)),Xt=!0,Et=J[J.length-1],Et&&Et.type==="text"?(Et.raw+=N.raw,Et.text+=N.text):J.push(N);continue}if(K){var xn="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(xn);break}else throw new Error(xn)}}return J},B(Ae,null,[{key:"rules",get:function(){return{block:wt,inline:Er}}}]),Ae}(),ht=_e.exports.defaults,pt=ne.cleanUrl,Q=ne.escape,we=function(){function Ae(Le){this.options=Le||ht}var Te=Ae.prototype;return Te.code=function(K,J,Ee){var Ce=(J||"").match(/\S*/)[0];if(this.options.highlight){var N=this.options.highlight(K,Ce);N!=null&&N!==K&&(Ee=!0,K=N)}return K=K.replace(/\n$/,"")+`
|
|
`,Ce?'<pre><code class="'+this.options.langPrefix+Q(Ce,!0)+'">'+(Ee?K:Q(K,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ee?K:Q(K,!0))+`</code></pre>
|
|
`},Te.blockquote=function(K){return`<blockquote>
|
|
`+K+`</blockquote>
|
|
`},Te.html=function(K){return K},Te.heading=function(K,J,Ee,Ce){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+Ce.slug(Ee)+'">'+K+"</h"+J+`>
|
|
`:"<h"+J+">"+K+"</h"+J+`>
|
|
`},Te.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Te.list=function(K,J,Ee){var Ce=J?"ol":"ul",N=J&&Ee!==1?' start="'+Ee+'"':"";return"<"+Ce+N+`>
|
|
`+K+"</"+Ce+`>
|
|
`},Te.listitem=function(K){return"<li>"+K+`</li>
|
|
`},Te.checkbox=function(K){return"<input "+(K?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(K){return"<p>"+K+`</p>
|
|
`},Te.table=function(K,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
<thead>
|
|
`+K+`</thead>
|
|
`+J+`</table>
|
|
`},Te.tablerow=function(K){return`<tr>
|
|
`+K+`</tr>
|
|
`},Te.tablecell=function(K,J){var Ee=J.header?"th":"td",Ce=J.align?"<"+Ee+' align="'+J.align+'">':"<"+Ee+">";return Ce+K+"</"+Ee+`>
|
|
`},Te.strong=function(K){return"<strong>"+K+"</strong>"},Te.em=function(K){return"<em>"+K+"</em>"},Te.codespan=function(K){return"<code>"+K+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(K){return"<del>"+K+"</del>"},Te.link=function(K,J,Ee){if(K=pt(this.options.sanitize,this.options.baseUrl,K),K===null)return Ee;var Ce='<a href="'+Q(K)+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=">"+Ee+"</a>",Ce},Te.image=function(K,J,Ee){if(K=pt(this.options.sanitize,this.options.baseUrl,K),K===null)return Ee;var Ce='<img src="'+K+'" alt="'+Ee+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=this.options.xhtml?"/>":">",Ce},Te.text=function(K){return K},Ae}(),$e=function(){function Ae(){}var Te=Ae.prototype;return Te.strong=function(K){return K},Te.em=function(K){return K},Te.codespan=function(K){return K},Te.del=function(K){return K},Te.html=function(K){return K},Te.text=function(K){return K},Te.link=function(K,J,Ee){return""+Ee},Te.image=function(K,J,Ee){return""+Ee},Te.br=function(){return""},Ae}(),Be=function(){function Ae(){this.seen={}}var Te=Ae.prototype;return Te.serialize=function(K){return K.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Te.getNextSafeSlug=function(K,J){var Ee=K,Ce=0;if(this.seen.hasOwnProperty(Ee)){Ce=this.seen[K];do Ce++,Ee=K+"-"+Ce;while(this.seen.hasOwnProperty(Ee))}return J||(this.seen[K]=Ce,this.seen[Ee]=0),Ee},Te.slug=function(K,J){J===void 0&&(J={});var Ee=this.serialize(K);return this.getNextSafeSlug(Ee,J.dryrun)},Ae}(),nt=we,gt=$e,Ot=Be,yt=_e.exports.defaults,Dt=ne.unescape,vt=function(){function Ae(Le){this.options=Le||yt,this.options.renderer=this.options.renderer||new nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new gt,this.slugger=new Ot}Ae.parse=function(K,J){var Ee=new Ae(J);return Ee.parse(K)},Ae.parseInline=function(K,J){var Ee=new Ae(J);return Ee.parseInline(K)};var Te=Ae.prototype;return Te.parse=function(K,J){J===void 0&&(J=!0);var Ee="",Ce,N,Et,de,Bt,Xt,Br,cn,jr,vr,xn,$n,Jr,en,$t,xr,se,ce,ft=K.length;for(Ce=0;Ce<ft;Ce++)switch(vr=K[Ce],vr.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(vr.tokens),vr.depth,Dt(this.parseInline(vr.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(vr.text,vr.lang,vr.escaped);continue}case"table":{for(cn="",Br="",de=vr.header.length,N=0;N<de;N++)Br+=this.renderer.tablecell(this.parseInline(vr.tokens.header[N]),{header:!0,align:vr.align[N]});for(cn+=this.renderer.tablerow(Br),jr="",de=vr.cells.length,N=0;N<de;N++){for(Xt=vr.tokens.cells[N],Br="",Bt=Xt.length,Et=0;Et<Bt;Et++)Br+=this.renderer.tablecell(this.parseInline(Xt[Et]),{header:!1,align:vr.align[Et]});jr+=this.renderer.tablerow(Br)}Ee+=this.renderer.table(cn,jr);continue}case"blockquote":{jr=this.parse(vr.tokens),Ee+=this.renderer.blockquote(jr);continue}case"list":{for(xn=vr.ordered,$n=vr.start,Jr=vr.loose,de=vr.items.length,jr="",N=0;N<de;N++)$t=vr.items[N],xr=$t.checked,se=$t.task,en="",$t.task&&(ce=this.renderer.checkbox(xr),Jr?$t.tokens.length>0&&$t.tokens[0].type==="text"?($t.tokens[0].text=ce+" "+$t.tokens[0].text,$t.tokens[0].tokens&&$t.tokens[0].tokens.length>0&&$t.tokens[0].tokens[0].type==="text"&&($t.tokens[0].tokens[0].text=ce+" "+$t.tokens[0].tokens[0].text)):$t.tokens.unshift({type:"text",text:ce}):en+=ce),en+=this.parse($t.tokens,Jr),jr+=this.renderer.listitem(en,se,xr);Ee+=this.renderer.list(jr,xn,$n);continue}case"html":{Ee+=this.renderer.html(vr.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(vr.tokens));continue}case"text":{for(jr=vr.tokens?this.parseInline(vr.tokens):vr.text;Ce+1<ft&&K[Ce+1].type==="text";)vr=K[++Ce],jr+=`
|
|
`+(vr.tokens?this.parseInline(vr.tokens):vr.text);Ee+=J?this.renderer.paragraph(jr):jr;continue}default:{var _t='Token with "'+vr.type+'" type was not found.';if(this.options.silent){console.error(_t);return}else throw new Error(_t)}}return Ee},Te.parseInline=function(K,J){J=J||this.renderer;var Ee="",Ce,N,Et=K.length;for(Ce=0;Ce<Et;Ce++)switch(N=K[Ce],N.type){case"escape":{Ee+=J.text(N.text);break}case"html":{Ee+=J.html(N.text);break}case"link":{Ee+=J.link(N.href,N.title,this.parseInline(N.tokens,J));break}case"image":{Ee+=J.image(N.href,N.title,N.text);break}case"strong":{Ee+=J.strong(this.parseInline(N.tokens,J));break}case"em":{Ee+=J.em(this.parseInline(N.tokens,J));break}case"codespan":{Ee+=J.codespan(N.text);break}case"br":{Ee+=J.br();break}case"del":{Ee+=J.del(this.parseInline(N.tokens,J));break}case"text":{Ee+=J.text(N.text);break}default:{var de='Token with "'+N.type+'" type was not found.';if(this.options.silent){console.error(de);return}else throw new Error(de)}}return Ee},Ae}(),Gt=qe,bt=vt,At=st,kt=we,er=$e,qt=Be,Pt=ne.merge,ir=ne.checkSanitizeDeprecation,y=ne.escape,R=_e.exports.getDefaults,rt=_e.exports.changeDefaults,U=_e.exports.defaults;function te(Ae,Te,Le){if(typeof Ae=="undefined"||Ae===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ae!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ae)+", string expected");if(typeof Te=="function"&&(Le=Te,Te=null),Te=Pt({},te.defaults,Te||{}),ir(Te),Le){var K=Te.highlight,J;try{J=Gt.lex(Ae,Te)}catch(Et){return Le(Et)}var Ee=function(de){var Bt;if(!de)try{Te.walkTokens&&te.walkTokens(J,Te.walkTokens),Bt=bt.parse(J,Te)}catch(Xt){de=Xt}return Te.highlight=K,de?Le(de):Le(null,Bt)};if(!K||K.length<3||(delete Te.highlight,!J.length))return Ee();var Ce=0;te.walkTokens(J,function(Et){Et.type==="code"&&(Ce++,setTimeout(function(){K(Et.text,Et.lang,function(de,Bt){if(de)return Ee(de);Bt!=null&&Bt!==Et.text&&(Et.text=Bt,Et.escaped=!0),Ce--,Ce===0&&Ee()})},0))}),Ce===0&&Ee();return}try{var N=Gt.lex(Ae,Te);return Te.walkTokens&&te.walkTokens(N,Te.walkTokens),bt.parse(N,Te)}catch(Et){if(Et.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+y(Et.message+"",!0)+"</pre>";throw Et}}te.options=te.setOptions=function(Ae){return Pt(te.defaults,Ae),rt(te.defaults),te},te.getDefaults=R,te.defaults=U,te.use=function(Ae){var Te=Pt({},Ae);if(Ae.renderer&&function(){var K=te.defaults.renderer||new kt,J=function(N){var Et=K[N];K[N]=function(){for(var de=arguments.length,Bt=new Array(de),Xt=0;Xt<de;Xt++)Bt[Xt]=arguments[Xt];var Br=Ae.renderer[N].apply(K,Bt);return Br===!1&&(Br=Et.apply(K,Bt)),Br}};for(var Ee in Ae.renderer)J(Ee);Te.renderer=K}(),Ae.tokenizer&&function(){var K=te.defaults.tokenizer||new At,J=function(N){var Et=K[N];K[N]=function(){for(var de=arguments.length,Bt=new Array(de),Xt=0;Xt<de;Xt++)Bt[Xt]=arguments[Xt];var Br=Ae.tokenizer[N].apply(K,Bt);return Br===!1&&(Br=Et.apply(K,Bt)),Br}};for(var Ee in Ae.tokenizer)J(Ee);Te.tokenizer=K}(),Ae.walkTokens){var Le=te.defaults.walkTokens;Te.walkTokens=function(K){Ae.walkTokens(K),Le&&Le(K)}}te.setOptions(Te)},te.walkTokens=function(Ae,Te){for(var Le=Re(Ae),K;!(K=Le()).done;){var J=K.value;switch(Te(J),J.type){case"table":{for(var Ee=Re(J.tokens.header),Ce;!(Ce=Ee()).done;){var N=Ce.value;te.walkTokens(N,Te)}for(var Et=Re(J.tokens.cells),de;!(de=Et()).done;)for(var Bt=de.value,Xt=Re(Bt),Br;!(Br=Xt()).done;){var cn=Br.value;te.walkTokens(cn,Te)}break}case"list":{te.walkTokens(J.items,Te);break}default:J.tokens&&te.walkTokens(J.tokens,Te)}}},te.parseInline=function(Ae,Te){if(typeof Ae=="undefined"||Ae===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ae!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ae)+", string expected");Te=Pt({},te.defaults,Te||{}),ir(Te);try{var Le=Gt.lexInline(Ae,Te);return Te.walkTokens&&te.walkTokens(Le,Te.walkTokens),bt.parseInline(Le,Te)}catch(K){if(K.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+y(K.message+"",!0)+"</pre>";throw K}},te.Parser=bt,te.parser=bt.parse,te.Renderer=kt,te.TextRenderer=er,te.Lexer=Gt,te.lexer=Gt.lex,te.Tokenizer=At,te.Slugger=qt,te.parse=te;var Zt=te;return Zt})},11690:function(Jt){const ot=/[&<>"']/,B=/[&<>"']/g,I=/[<>"']|&(?!#?\w+;)/,be=/[<>"']|&(?!#?\w+;)/g,Re={"&":"&","<":"<",">":">",'"':""","'":"'"},_e=he=>Re[he];function Z(he,Me){if(Me){if(ot.test(he))return he.replace(B,_e)}else if(I.test(he))return he.replace(be,_e);return he}const v=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function me(he){return he.replace(v,(Me,Fe)=>(Fe=Fe.toLowerCase(),Fe==="colon"?":":Fe.charAt(0)==="#"?Fe.charAt(1)==="x"?String.fromCharCode(parseInt(Fe.substring(2),16)):String.fromCharCode(+Fe.substring(1)):""))}const ie=/(^|[^\[])\^/g;function l(he,Me){he=he.source||he,Me=Me||"";const Fe={replace:(ke,ct)=>(ct=ct.source||ct,ct=ct.replace(ie,"$1"),he=he.replace(ke,ct),Fe),getRegex:()=>new RegExp(he,Me)};return Fe}const H=/[^\w:]/g,F=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(he,Me,Fe){if(he){let ke;try{ke=decodeURIComponent(me(Fe)).replace(H,"").toLowerCase()}catch(ct){return null}if(ke.indexOf("javascript:")===0||ke.indexOf("vbscript:")===0||ke.indexOf("data:")===0)return null}Me&&!F.test(Fe)&&(Fe=Y(Me,Fe));try{Fe=encodeURI(Fe).replace(/%25/g,"%")}catch(ke){return null}return Fe}const x={},T=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Y(he,Me){x[" "+he]||(T.test(he)?x[" "+he]=he+"/":x[" "+he]=O(he,"/",!0)),he=x[" "+he];const Fe=he.indexOf(":")===-1;return Me.substring(0,2)==="//"?Fe?Me:he.replace(L,"$1")+Me:Me.charAt(0)==="/"?Fe?Me:he.replace(q,"$1")+Me:he+Me}const $={exec:function(){}};function A(he){let Me=1,Fe,ke;for(;Me<arguments.length;Me++){Fe=arguments[Me];for(ke in Fe)Object.prototype.hasOwnProperty.call(Fe,ke)&&(he[ke]=Fe[ke])}return he}function M(he,Me){const Fe=he.replace(/\|/g,(ae,j,ee)=>{let ne=!1,oe=j;for(;--oe>=0&&ee[oe]==="\\";)ne=!ne;return ne?"|":" |"}),ke=Fe.split(/ \|/);let ct=0;if(ke.length>Me)ke.splice(Me);else for(;ke.length<Me;)ke.push("");for(;ct<ke.length;ct++)ke[ct]=ke[ct].trim().replace(/\\\|/g,"|");return ke}function O(he,Me,Fe){const ke=he.length;if(ke===0)return"";let ct=0;for(;ct<ke;){const ae=he.charAt(ke-ct-1);if(ae===Me&&!Fe)ct++;else if(ae!==Me&&Fe)ct++;else break}return he.substr(0,ke-ct)}function W(he,Me){if(he.indexOf(Me[1])===-1)return-1;const Fe=he.length;let ke=0,ct=0;for(;ct<Fe;ct++)if(he[ct]==="\\")ct++;else if(he[ct]===Me[0])ke++;else if(he[ct]===Me[1]&&(ke--,ke<0))return ct;return-1}function ge(he){he&&he.sanitize&&!he.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 De(he,Me){if(Me<1)return"";let Fe="";for(;Me>1;)Me&1&&(Fe+=he),Me>>=1,he+=he;return Fe+he}Jt.exports={escape:Z,unescape:me,edit:l,cleanUrl:E,resolveUrl:Y,noopTest:$,merge:A,splitCells:M,rtrim:O,findClosingBracket:W,checkSanitizeDeprecation:ge,repeatString:De}},75918:function(Jt,ot,B){"use strict";B.d(ot,{Wi:function(){return v},Z0:function(){return me},aU:function(){return Z},eZ:function(){return l},wY:function(){return ie}});var I=B(4348),be=B(69323),Re=B(13268),_e=function(H,F,E,x){function T(L){return L instanceof E?L:new E(function(q){q(L)})}return new(E||(E=Promise))(function(L,q){function Y(M){try{A(x.next(M))}catch(O){q(O)}}function $(M){try{A(x.throw(M))}catch(O){q(O)}}function A(M){M.done?L(M.value):T(M.value).then(Y,$)}A((x=x.apply(H,F||[])).next())})};class Z extends be.JT{constructor(F,E="",x="",T=!0,L){super(),this._onDidChange=this._register(new I.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=F,this._label=E,this._cssClass=x,this._enabled=T,this._actionCallback=L}get id(){return this._id}get label(){return this._label}set label(F){this._setLabel(F)}_setLabel(F){this._label!==F&&(this._label=F,this._onDidChange.fire({label:F}))}get tooltip(){return this._tooltip||""}set tooltip(F){this._setTooltip(F)}_setTooltip(F){this._tooltip!==F&&(this._tooltip=F,this._onDidChange.fire({tooltip:F}))}get class(){return this._cssClass}set class(F){this._setClass(F)}_setClass(F){this._cssClass!==F&&(this._cssClass=F,this._onDidChange.fire({class:F}))}get enabled(){return this._enabled}set enabled(F){this._setEnabled(F)}_setEnabled(F){this._enabled!==F&&(this._enabled=F,this._onDidChange.fire({enabled:F}))}get checked(){return this._checked}set checked(F){this._setChecked(F)}_setChecked(F){this._checked!==F&&(this._checked=F,this._onDidChange.fire({checked:F}))}run(F,E){return _e(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(F))})}}class v extends be.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new I.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new I.Q5),this.onDidRun=this._onDidRun.event}run(F,E){return _e(this,void 0,void 0,function*(){if(!F.enabled)return;this._onBeforeRun.fire({action:F});let x;try{yield this.runAction(F,E)}catch(T){x=T}this._onDidRun.fire({action:F,error:x})})}runAction(F,E){return _e(this,void 0,void 0,function*(){yield F.run(E)})}}class me extends Z{constructor(F){super(me.ID,F,F?"separator text":"separator"),this.checked=!1,this.enabled=!1}}me.ID="vs.actions.separator";class ie{constructor(F,E,x,T){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=F,this.label=E,this.class=T,this._actions=x}get actions(){return this._actions}dispose(){}run(){return _e(this,void 0,void 0,function*(){})}}class l extends Z{constructor(){super(l.ID,Re.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(Jt,ot,B){"use strict";B.d(ot,{ok:function(){return I}});function I(be,Re){if(!be)throw new Error(Re?`Assertion failed (${Re})`:"Assertion Failed")}},52615:function(Jt,ot,B){"use strict";B.d(ot,{CM:function(){return Z},JL:function(){return v},dT:function(){return ie},fK:function(){return _e},lA:function(){return me}});var I=B(4348);class be{constructor(){this._icons=new Map,this._onDidRegister=new I.Q5}add(H){const F=this._icons.get(H.id);F?H.description?F.description=H.description:console.error(`Duplicate registration of codicon ${H.id}`):(this._icons.set(H.id,H),this._onDidRegister.fire(H))}get(H){return this._icons.get(H)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Re=new be,_e=Re;function Z(l,H){return new me(l,H)}function v(l){return l?l.replace(/\$\((.*?)\)/g,(H,F)=>` ${F} `).trim():""}class me{constructor(H,F,E){this.id=H,this.definition=F,this.description=E,Re.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ie;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const H=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function F(T){if(T instanceof me)return["codicon","codicon-"+T.id];const L=H.exec(T.id);if(!L)return F(me.error);let[,q,Y]=L;const $=["codicon","codicon-"+q];return Y&&$.push("codicon-modifier-"+Y.substr(1)),$}l.asClassNameArray=F;function E(T){return F(T).join(" ")}l.asClassName=E;function x(T){return"."+F(T).join(".")}l.asCSSSelector=x})(ie||(ie={})),function(l){l.add=new l("add",{fontCharacter:"\\ea60"}),l.plus=new l("plus",l.add.definition),l.gistNew=new l("gist-new",l.add.definition),l.repoCreate=new l("repo-create",l.add.definition),l.lightbulb=new l("lightbulb",{fontCharacter:"\\ea61"}),l.lightBulb=new l("light-bulb",{fontCharacter:"\\ea61"}),l.repo=new l("repo",{fontCharacter:"\\ea62"}),l.repoDelete=new l("repo-delete",{fontCharacter:"\\ea62"}),l.gistFork=new l("gist-fork",{fontCharacter:"\\ea63"}),l.repoForked=new l("repo-forked",{fontCharacter:"\\ea63"}),l.gitPullRequest=new l("git-pull-request",{fontCharacter:"\\ea64"}),l.gitPullRequestAbandoned=new l("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),l.recordKeys=new l("record-keys",{fontCharacter:"\\ea65"}),l.keyboard=new l("keyboard",{fontCharacter:"\\ea65"}),l.tag=new l("tag",{fontCharacter:"\\ea66"}),l.tagAdd=new l("tag-add",{fontCharacter:"\\ea66"}),l.tagRemove=new l("tag-remove",{fontCharacter:"\\ea66"}),l.person=new l("person",{fontCharacter:"\\ea67"}),l.personFollow=new l("person-follow",{fontCharacter:"\\ea67"}),l.personOutline=new l("person-outline",{fontCharacter:"\\ea67"}),l.personFilled=new l("person-filled",{fontCharacter:"\\ea67"}),l.gitBranch=new l("git-branch",{fontCharacter:"\\ea68"}),l.gitBranchCreate=new l("git-branch-create",{fontCharacter:"\\ea68"}),l.gitBranchDelete=new l("git-branch-delete",{fontCharacter:"\\ea68"}),l.sourceControl=new l("source-control",{fontCharacter:"\\ea68"}),l.mirror=new l("mirror",{fontCharacter:"\\ea69"}),l.mirrorPublic=new l("mirror-public",{fontCharacter:"\\ea69"}),l.star=new l("star",{fontCharacter:"\\ea6a"}),l.starAdd=new l("star-add",{fontCharacter:"\\ea6a"}),l.starDelete=new l("star-delete",{fontCharacter:"\\ea6a"}),l.starEmpty=new l("star-empty",{fontCharacter:"\\ea6a"}),l.comment=new l("comment",{fontCharacter:"\\ea6b"}),l.commentAdd=new l("comment-add",{fontCharacter:"\\ea6b"}),l.alert=new l("alert",{fontCharacter:"\\ea6c"}),l.warning=new l("warning",{fontCharacter:"\\ea6c"}),l.search=new l("search",{fontCharacter:"\\ea6d"}),l.searchSave=new l("search-save",{fontCharacter:"\\ea6d"}),l.logOut=new l("log-out",{fontCharacter:"\\ea6e"}),l.signOut=new l("sign-out",{fontCharacter:"\\ea6e"}),l.logIn=new l("log-in",{fontCharacter:"\\ea6f"}),l.signIn=new l("sign-in",{fontCharacter:"\\ea6f"}),l.eye=new l("eye",{fontCharacter:"\\ea70"}),l.eyeUnwatch=new l("eye-unwatch",{fontCharacter:"\\ea70"}),l.eyeWatch=new l("eye-watch",{fontCharacter:"\\ea70"}),l.circleFilled=new l("circle-filled",{fontCharacter:"\\ea71"}),l.primitiveDot=new l("primitive-dot",{fontCharacter:"\\ea71"}),l.closeDirty=new l("close-dirty",{fontCharacter:"\\ea71"}),l.debugBreakpoint=new l("debug-breakpoint",{fontCharacter:"\\ea71"}),l.debugBreakpointDisabled=new l("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),l.debugHint=new l("debug-hint",{fontCharacter:"\\ea71"}),l.primitiveSquare=new l("primitive-square",{fontCharacter:"\\ea72"}),l.edit=new l("edit",{fontCharacter:"\\ea73"}),l.pencil=new l("pencil",{fontCharacter:"\\ea73"}),l.info=new l("info",{fontCharacter:"\\ea74"}),l.issueOpened=new l("issue-opened",{fontCharacter:"\\ea74"}),l.gistPrivate=new l("gist-private",{fontCharacter:"\\ea75"}),l.gitForkPrivate=new l("git-fork-private",{fontCharacter:"\\ea75"}),l.lock=new l("lock",{fontCharacter:"\\ea75"}),l.mirrorPrivate=new l("mirror-private",{fontCharacter:"\\ea75"}),l.close=new l("close",{fontCharacter:"\\ea76"}),l.removeClose=new l("remove-close",{fontCharacter:"\\ea76"}),l.x=new l("x",{fontCharacter:"\\ea76"}),l.repoSync=new l("repo-sync",{fontCharacter:"\\ea77"}),l.sync=new l("sync",{fontCharacter:"\\ea77"}),l.clone=new l("clone",{fontCharacter:"\\ea78"}),l.desktopDownload=new l("desktop-download",{fontCharacter:"\\ea78"}),l.beaker=new l("beaker",{fontCharacter:"\\ea79"}),l.microscope=new l("microscope",{fontCharacter:"\\ea79"}),l.vm=new l("vm",{fontCharacter:"\\ea7a"}),l.deviceDesktop=new l("device-desktop",{fontCharacter:"\\ea7a"}),l.file=new l("file",{fontCharacter:"\\ea7b"}),l.fileText=new l("file-text",{fontCharacter:"\\ea7b"}),l.more=new l("more",{fontCharacter:"\\ea7c"}),l.ellipsis=new l("ellipsis",{fontCharacter:"\\ea7c"}),l.kebabHorizontal=new l("kebab-horizontal",{fontCharacter:"\\ea7c"}),l.mailReply=new l("mail-reply",{fontCharacter:"\\ea7d"}),l.reply=new l("reply",{fontCharacter:"\\ea7d"}),l.organization=new l("organization",{fontCharacter:"\\ea7e"}),l.organizationFilled=new l("organization-filled",{fontCharacter:"\\ea7e"}),l.organizationOutline=new l("organization-outline",{fontCharacter:"\\ea7e"}),l.newFile=new l("new-file",{fontCharacter:"\\ea7f"}),l.fileAdd=new l("file-add",{fontCharacter:"\\ea7f"}),l.newFolder=new l("new-folder",{fontCharacter:"\\ea80"}),l.fileDirectoryCreate=new l("file-directory-create",{fontCharacter:"\\ea80"}),l.trash=new l("trash",{fontCharacter:"\\ea81"}),l.trashcan=new l("trashcan",{fontCharacter:"\\ea81"}),l.history=new l("history",{fontCharacter:"\\ea82"}),l.clock=new l("clock",{fontCharacter:"\\ea82"}),l.folder=new l("folder",{fontCharacter:"\\ea83"}),l.fileDirectory=new l("file-directory",{fontCharacter:"\\ea83"}),l.symbolFolder=new l("symbol-folder",{fontCharacter:"\\ea83"}),l.logoGithub=new l("logo-github",{fontCharacter:"\\ea84"}),l.markGithub=new l("mark-github",{fontCharacter:"\\ea84"}),l.github=new l("github",{fontCharacter:"\\ea84"}),l.terminal=new l("terminal",{fontCharacter:"\\ea85"}),l.console=new l("console",{fontCharacter:"\\ea85"}),l.repl=new l("repl",{fontCharacter:"\\ea85"}),l.zap=new l("zap",{fontCharacter:"\\ea86"}),l.symbolEvent=new l("symbol-event",{fontCharacter:"\\ea86"}),l.error=new l("error",{fontCharacter:"\\ea87"}),l.stop=new l("stop",{fontCharacter:"\\ea87"}),l.variable=new l("variable",{fontCharacter:"\\ea88"}),l.symbolVariable=new l("symbol-variable",{fontCharacter:"\\ea88"}),l.array=new l("array",{fontCharacter:"\\ea8a"}),l.symbolArray=new l("symbol-array",{fontCharacter:"\\ea8a"}),l.symbolModule=new l("symbol-module",{fontCharacter:"\\ea8b"}),l.symbolPackage=new l("symbol-package",{fontCharacter:"\\ea8b"}),l.symbolNamespace=new l("symbol-namespace",{fontCharacter:"\\ea8b"}),l.symbolObject=new l("symbol-object",{fontCharacter:"\\ea8b"}),l.symbolMethod=new l("symbol-method",{fontCharacter:"\\ea8c"}),l.symbolFunction=new l("symbol-function",{fontCharacter:"\\ea8c"}),l.symbolConstructor=new l("symbol-constructor",{fontCharacter:"\\ea8c"}),l.symbolBoolean=new l("symbol-boolean",{fontCharacter:"\\ea8f"}),l.symbolNull=new l("symbol-null",{fontCharacter:"\\ea8f"}),l.symbolNumeric=new l("symbol-numeric",{fontCharacter:"\\ea90"}),l.symbolNumber=new l("symbol-number",{fontCharacter:"\\ea90"}),l.symbolStructure=new l("symbol-structure",{fontCharacter:"\\ea91"}),l.symbolStruct=new l("symbol-struct",{fontCharacter:"\\ea91"}),l.symbolParameter=new l("symbol-parameter",{fontCharacter:"\\ea92"}),l.symbolTypeParameter=new l("symbol-type-parameter",{fontCharacter:"\\ea92"}),l.symbolKey=new l("symbol-key",{fontCharacter:"\\ea93"}),l.symbolText=new l("symbol-text",{fontCharacter:"\\ea93"}),l.symbolReference=new l("symbol-reference",{fontCharacter:"\\ea94"}),l.goToFile=new l("go-to-file",{fontCharacter:"\\ea94"}),l.symbolEnum=new l("symbol-enum",{fontCharacter:"\\ea95"}),l.symbolValue=new l("symbol-value",{fontCharacter:"\\ea95"}),l.symbolRuler=new l("symbol-ruler",{fontCharacter:"\\ea96"}),l.symbolUnit=new l("symbol-unit",{fontCharacter:"\\ea96"}),l.activateBreakpoints=new l("activate-breakpoints",{fontCharacter:"\\ea97"}),l.archive=new l("archive",{fontCharacter:"\\ea98"}),l.arrowBoth=new l("arrow-both",{fontCharacter:"\\ea99"}),l.arrowDown=new l("arrow-down",{fontCharacter:"\\ea9a"}),l.arrowLeft=new l("arrow-left",{fontCharacter:"\\ea9b"}),l.arrowRight=new l("arrow-right",{fontCharacter:"\\ea9c"}),l.arrowSmallDown=new l("arrow-small-down",{fontCharacter:"\\ea9d"}),l.arrowSmallLeft=new l("arrow-small-left",{fontCharacter:"\\ea9e"}),l.arrowSmallRight=new l("arrow-small-right",{fontCharacter:"\\ea9f"}),l.arrowSmallUp=new l("arrow-small-up",{fontCharacter:"\\eaa0"}),l.arrowUp=new l("arrow-up",{fontCharacter:"\\eaa1"}),l.bell=new l("bell",{fontCharacter:"\\eaa2"}),l.bold=new l("bold",{fontCharacter:"\\eaa3"}),l.book=new l("book",{fontCharacter:"\\eaa4"}),l.bookmark=new l("bookmark",{fontCharacter:"\\eaa5"}),l.debugBreakpointConditionalUnverified=new l("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),l.debugBreakpointConditional=new l("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),l.debugBreakpointConditionalDisabled=new l("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),l.debugBreakpointDataUnverified=new l("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),l.debugBreakpointData=new l("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),l.debugBreakpointDataDisabled=new l("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),l.debugBreakpointLogUnverified=new l("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),l.debugBreakpointLog=new l("debug-breakpoint-log",{fontCharacter:"\\eaab"}),l.debugBreakpointLogDisabled=new l("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),l.briefcase=new l("briefcase",{fontCharacter:"\\eaac"}),l.broadcast=new l("broadcast",{fontCharacter:"\\eaad"}),l.browser=new l("browser",{fontCharacter:"\\eaae"}),l.bug=new l("bug",{fontCharacter:"\\eaaf"}),l.calendar=new l("calendar",{fontCharacter:"\\eab0"}),l.caseSensitive=new l("case-sensitive",{fontCharacter:"\\eab1"}),l.check=new l("check",{fontCharacter:"\\eab2"}),l.checklist=new l("checklist",{fontCharacter:"\\eab3"}),l.chevronDown=new l("chevron-down",{fontCharacter:"\\eab4"}),l.dropDownButton=new l("drop-down-button",l.chevronDown.definition),l.chevronLeft=new l("chevron-left",{fontCharacter:"\\eab5"}),l.chevronRight=new l("chevron-right",{fontCharacter:"\\eab6"}),l.chevronUp=new l("chevron-up",{fontCharacter:"\\eab7"}),l.chromeClose=new l("chrome-close",{fontCharacter:"\\eab8"}),l.chromeMaximize=new l("chrome-maximize",{fontCharacter:"\\eab9"}),l.chromeMinimize=new l("chrome-minimize",{fontCharacter:"\\eaba"}),l.chromeRestore=new l("chrome-restore",{fontCharacter:"\\eabb"}),l.circleOutline=new l("circle-outline",{fontCharacter:"\\eabc"}),l.debugBreakpointUnverified=new l("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),l.circleSlash=new l("circle-slash",{fontCharacter:"\\eabd"}),l.circuitBoard=new l("circuit-board",{fontCharacter:"\\eabe"}),l.clearAll=new l("clear-all",{fontCharacter:"\\eabf"}),l.clippy=new l("clippy",{fontCharacter:"\\eac0"}),l.closeAll=new l("close-all",{fontCharacter:"\\eac1"}),l.cloudDownload=new l("cloud-download",{fontCharacter:"\\eac2"}),l.cloudUpload=new l("cloud-upload",{fontCharacter:"\\eac3"}),l.code=new l("code",{fontCharacter:"\\eac4"}),l.collapseAll=new l("collapse-all",{fontCharacter:"\\eac5"}),l.colorMode=new l("color-mode",{fontCharacter:"\\eac6"}),l.commentDiscussion=new l("comment-discussion",{fontCharacter:"\\eac7"}),l.compareChanges=new l("compare-changes",{fontCharacter:"\\eafd"}),l.creditCard=new l("credit-card",{fontCharacter:"\\eac9"}),l.dash=new l("dash",{fontCharacter:"\\eacc"}),l.dashboard=new l("dashboard",{fontCharacter:"\\eacd"}),l.database=new l("database",{fontCharacter:"\\eace"}),l.debugContinue=new l("debug-continue",{fontCharacter:"\\eacf"}),l.debugDisconnect=new l("debug-disconnect",{fontCharacter:"\\ead0"}),l.debugPause=new l("debug-pause",{fontCharacter:"\\ead1"}),l.debugRestart=new l("debug-restart",{fontCharacter:"\\ead2"}),l.debugStart=new l("debug-start",{fontCharacter:"\\ead3"}),l.debugStepInto=new l("debug-step-into",{fontCharacter:"\\ead4"}),l.debugStepOut=new l("debug-step-out",{fontCharacter:"\\ead5"}),l.debugStepOver=new l("debug-step-over",{fontCharacter:"\\ead6"}),l.debugStop=new l("debug-stop",{fontCharacter:"\\ead7"}),l.debug=new l("debug",{fontCharacter:"\\ead8"}),l.deviceCameraVideo=new l("device-camera-video",{fontCharacter:"\\ead9"}),l.deviceCamera=new l("device-camera",{fontCharacter:"\\eada"}),l.deviceMobile=new l("device-mobile",{fontCharacter:"\\eadb"}),l.diffAdded=new l("diff-added",{fontCharacter:"\\eadc"}),l.diffIgnored=new l("diff-ignored",{fontCharacter:"\\eadd"}),l.diffModified=new l("diff-modified",{fontCharacter:"\\eade"}),l.diffRemoved=new l("diff-removed",{fontCharacter:"\\eadf"}),l.diffRenamed=new l("diff-renamed",{fontCharacter:"\\eae0"}),l.diff=new l("diff",{fontCharacter:"\\eae1"}),l.discard=new l("discard",{fontCharacter:"\\eae2"}),l.editorLayout=new l("editor-layout",{fontCharacter:"\\eae3"}),l.emptyWindow=new l("empty-window",{fontCharacter:"\\eae4"}),l.exclude=new l("exclude",{fontCharacter:"\\eae5"}),l.extensions=new l("extensions",{fontCharacter:"\\eae6"}),l.eyeClosed=new l("eye-closed",{fontCharacter:"\\eae7"}),l.fileBinary=new l("file-binary",{fontCharacter:"\\eae8"}),l.fileCode=new l("file-code",{fontCharacter:"\\eae9"}),l.fileMedia=new l("file-media",{fontCharacter:"\\eaea"}),l.filePdf=new l("file-pdf",{fontCharacter:"\\eaeb"}),l.fileSubmodule=new l("file-submodule",{fontCharacter:"\\eaec"}),l.fileSymlinkDirectory=new l("file-symlink-directory",{fontCharacter:"\\eaed"}),l.fileSymlinkFile=new l("file-symlink-file",{fontCharacter:"\\eaee"}),l.fileZip=new l("file-zip",{fontCharacter:"\\eaef"}),l.files=new l("files",{fontCharacter:"\\eaf0"}),l.filter=new l("filter",{fontCharacter:"\\eaf1"}),l.flame=new l("flame",{fontCharacter:"\\eaf2"}),l.foldDown=new l("fold-down",{fontCharacter:"\\eaf3"}),l.foldUp=new l("fold-up",{fontCharacter:"\\eaf4"}),l.fold=new l("fold",{fontCharacter:"\\eaf5"}),l.folderActive=new l("folder-active",{fontCharacter:"\\eaf6"}),l.folderOpened=new l("folder-opened",{fontCharacter:"\\eaf7"}),l.gear=new l("gear",{fontCharacter:"\\eaf8"}),l.gift=new l("gift",{fontCharacter:"\\eaf9"}),l.gistSecret=new l("gist-secret",{fontCharacter:"\\eafa"}),l.gist=new l("gist",{fontCharacter:"\\eafb"}),l.gitCommit=new l("git-commit",{fontCharacter:"\\eafc"}),l.gitCompare=new l("git-compare",{fontCharacter:"\\eafd"}),l.gitMerge=new l("git-merge",{fontCharacter:"\\eafe"}),l.githubAction=new l("github-action",{fontCharacter:"\\eaff"}),l.githubAlt=new l("github-alt",{fontCharacter:"\\eb00"}),l.globe=new l("globe",{fontCharacter:"\\eb01"}),l.grabber=new l("grabber",{fontCharacter:"\\eb02"}),l.graph=new l("graph",{fontCharacter:"\\eb03"}),l.gripper=new l("gripper",{fontCharacter:"\\eb04"}),l.heart=new l("heart",{fontCharacter:"\\eb05"}),l.home=new l("home",{fontCharacter:"\\eb06"}),l.horizontalRule=new l("horizontal-rule",{fontCharacter:"\\eb07"}),l.hubot=new l("hubot",{fontCharacter:"\\eb08"}),l.inbox=new l("inbox",{fontCharacter:"\\eb09"}),l.issueClosed=new l("issue-closed",{fontCharacter:"\\eba4"}),l.issueReopened=new l("issue-reopened",{fontCharacter:"\\eb0b"}),l.issues=new l("issues",{fontCharacter:"\\eb0c"}),l.italic=new l("italic",{fontCharacter:"\\eb0d"}),l.jersey=new l("jersey",{fontCharacter:"\\eb0e"}),l.json=new l("json",{fontCharacter:"\\eb0f"}),l.kebabVertical=new l("kebab-vertical",{fontCharacter:"\\eb10"}),l.key=new l("key",{fontCharacter:"\\eb11"}),l.law=new l("law",{fontCharacter:"\\eb12"}),l.lightbulbAutofix=new l("lightbulb-autofix",{fontCharacter:"\\eb13"}),l.linkExternal=new l("link-external",{fontCharacter:"\\eb14"}),l.link=new l("link",{fontCharacter:"\\eb15"}),l.listOrdered=new l("list-ordered",{fontCharacter:"\\eb16"}),l.listUnordered=new l("list-unordered",{fontCharacter:"\\eb17"}),l.liveShare=new l("live-share",{fontCharacter:"\\eb18"}),l.loading=new l("loading",{fontCharacter:"\\eb19"}),l.location=new l("location",{fontCharacter:"\\eb1a"}),l.mailRead=new l("mail-read",{fontCharacter:"\\eb1b"}),l.mail=new l("mail",{fontCharacter:"\\eb1c"}),l.markdown=new l("markdown",{fontCharacter:"\\eb1d"}),l.megaphone=new l("megaphone",{fontCharacter:"\\eb1e"}),l.mention=new l("mention",{fontCharacter:"\\eb1f"}),l.milestone=new l("milestone",{fontCharacter:"\\eb20"}),l.mortarBoard=new l("mortar-board",{fontCharacter:"\\eb21"}),l.move=new l("move",{fontCharacter:"\\eb22"}),l.multipleWindows=new l("multiple-windows",{fontCharacter:"\\eb23"}),l.mute=new l("mute",{fontCharacter:"\\eb24"}),l.noNewline=new l("no-newline",{fontCharacter:"\\eb25"}),l.note=new l("note",{fontCharacter:"\\eb26"}),l.octoface=new l("octoface",{fontCharacter:"\\eb27"}),l.openPreview=new l("open-preview",{fontCharacter:"\\eb28"}),l.package_=new l("package",{fontCharacter:"\\eb29"}),l.paintcan=new l("paintcan",{fontCharacter:"\\eb2a"}),l.pin=new l("pin",{fontCharacter:"\\eb2b"}),l.play=new l("play",{fontCharacter:"\\eb2c"}),l.run=new l("run",{fontCharacter:"\\eb2c"}),l.plug=new l("plug",{fontCharacter:"\\eb2d"}),l.preserveCase=new l("preserve-case",{fontCharacter:"\\eb2e"}),l.preview=new l("preview",{fontCharacter:"\\eb2f"}),l.project=new l("project",{fontCharacter:"\\eb30"}),l.pulse=new l("pulse",{fontCharacter:"\\eb31"}),l.question=new l("question",{fontCharacter:"\\eb32"}),l.quote=new l("quote",{fontCharacter:"\\eb33"}),l.radioTower=new l("radio-tower",{fontCharacter:"\\eb34"}),l.reactions=new l("reactions",{fontCharacter:"\\eb35"}),l.references=new l("references",{fontCharacter:"\\eb36"}),l.refresh=new l("refresh",{fontCharacter:"\\eb37"}),l.regex=new l("regex",{fontCharacter:"\\eb38"}),l.remoteExplorer=new l("remote-explorer",{fontCharacter:"\\eb39"}),l.remote=new l("remote",{fontCharacter:"\\eb3a"}),l.remove=new l("remove",{fontCharacter:"\\eb3b"}),l.replaceAll=new l("replace-all",{fontCharacter:"\\eb3c"}),l.replace=new l("replace",{fontCharacter:"\\eb3d"}),l.repoClone=new l("repo-clone",{fontCharacter:"\\eb3e"}),l.repoForcePush=new l("repo-force-push",{fontCharacter:"\\eb3f"}),l.repoPull=new l("repo-pull",{fontCharacter:"\\eb40"}),l.repoPush=new l("repo-push",{fontCharacter:"\\eb41"}),l.report=new l("report",{fontCharacter:"\\eb42"}),l.requestChanges=new l("request-changes",{fontCharacter:"\\eb43"}),l.rocket=new l("rocket",{fontCharacter:"\\eb44"}),l.rootFolderOpened=new l("root-folder-opened",{fontCharacter:"\\eb45"}),l.rootFolder=new l("root-folder",{fontCharacter:"\\eb46"}),l.rss=new l("rss",{fontCharacter:"\\eb47"}),l.ruby=new l("ruby",{fontCharacter:"\\eb48"}),l.saveAll=new l("save-all",{fontCharacter:"\\eb49"}),l.saveAs=new l("save-as",{fontCharacter:"\\eb4a"}),l.save=new l("save",{fontCharacter:"\\eb4b"}),l.screenFull=new l("screen-full",{fontCharacter:"\\eb4c"}),l.screenNormal=new l("screen-normal",{fontCharacter:"\\eb4d"}),l.searchStop=new l("search-stop",{fontCharacter:"\\eb4e"}),l.server=new l("server",{fontCharacter:"\\eb50"}),l.settingsGear=new l("settings-gear",{fontCharacter:"\\eb51"}),l.settings=new l("settings",{fontCharacter:"\\eb52"}),l.shield=new l("shield",{fontCharacter:"\\eb53"}),l.smiley=new l("smiley",{fontCharacter:"\\eb54"}),l.sortPrecedence=new l("sort-precedence",{fontCharacter:"\\eb55"}),l.splitHorizontal=new l("split-horizontal",{fontCharacter:"\\eb56"}),l.splitVertical=new l("split-vertical",{fontCharacter:"\\eb57"}),l.squirrel=new l("squirrel",{fontCharacter:"\\eb58"}),l.starFull=new l("star-full",{fontCharacter:"\\eb59"}),l.starHalf=new l("star-half",{fontCharacter:"\\eb5a"}),l.symbolClass=new l("symbol-class",{fontCharacter:"\\eb5b"}),l.symbolColor=new l("symbol-color",{fontCharacter:"\\eb5c"}),l.symbolConstant=new l("symbol-constant",{fontCharacter:"\\eb5d"}),l.symbolEnumMember=new l("symbol-enum-member",{fontCharacter:"\\eb5e"}),l.symbolField=new l("symbol-field",{fontCharacter:"\\eb5f"}),l.symbolFile=new l("symbol-file",{fontCharacter:"\\eb60"}),l.symbolInterface=new l("symbol-interface",{fontCharacter:"\\eb61"}),l.symbolKeyword=new l("symbol-keyword",{fontCharacter:"\\eb62"}),l.symbolMisc=new l("symbol-misc",{fontCharacter:"\\eb63"}),l.symbolOperator=new l("symbol-operator",{fontCharacter:"\\eb64"}),l.symbolProperty=new l("symbol-property",{fontCharacter:"\\eb65"}),l.wrench=new l("wrench",{fontCharacter:"\\eb65"}),l.wrenchSubaction=new l("wrench-subaction",{fontCharacter:"\\eb65"}),l.symbolSnippet=new l("symbol-snippet",{fontCharacter:"\\eb66"}),l.tasklist=new l("tasklist",{fontCharacter:"\\eb67"}),l.telescope=new l("telescope",{fontCharacter:"\\eb68"}),l.textSize=new l("text-size",{fontCharacter:"\\eb69"}),l.threeBars=new l("three-bars",{fontCharacter:"\\eb6a"}),l.thumbsdown=new l("thumbsdown",{fontCharacter:"\\eb6b"}),l.thumbsup=new l("thumbsup",{fontCharacter:"\\eb6c"}),l.tools=new l("tools",{fontCharacter:"\\eb6d"}),l.triangleDown=new l("triangle-down",{fontCharacter:"\\eb6e"}),l.triangleLeft=new l("triangle-left",{fontCharacter:"\\eb6f"}),l.triangleRight=new l("triangle-right",{fontCharacter:"\\eb70"}),l.triangleUp=new l("triangle-up",{fontCharacter:"\\eb71"}),l.twitter=new l("twitter",{fontCharacter:"\\eb72"}),l.unfold=new l("unfold",{fontCharacter:"\\eb73"}),l.unlock=new l("unlock",{fontCharacter:"\\eb74"}),l.unmute=new l("unmute",{fontCharacter:"\\eb75"}),l.unverified=new l("unverified",{fontCharacter:"\\eb76"}),l.verified=new l("verified",{fontCharacter:"\\eb77"}),l.versions=new l("versions",{fontCharacter:"\\eb78"}),l.vmActive=new l("vm-active",{fontCharacter:"\\eb79"}),l.vmOutline=new l("vm-outline",{fontCharacter:"\\eb7a"}),l.vmRunning=new l("vm-running",{fontCharacter:"\\eb7b"}),l.watch=new l("watch",{fontCharacter:"\\eb7c"}),l.whitespace=new l("whitespace",{fontCharacter:"\\eb7d"}),l.wholeWord=new l("whole-word",{fontCharacter:"\\eb7e"}),l.window=new l("window",{fontCharacter:"\\eb7f"}),l.wordWrap=new l("word-wrap",{fontCharacter:"\\eb80"}),l.zoomIn=new l("zoom-in",{fontCharacter:"\\eb81"}),l.zoomOut=new l("zoom-out",{fontCharacter:"\\eb82"}),l.listFilter=new l("list-filter",{fontCharacter:"\\eb83"}),l.listFlat=new l("list-flat",{fontCharacter:"\\eb84"}),l.listSelection=new l("list-selection",{fontCharacter:"\\eb85"}),l.selection=new l("selection",{fontCharacter:"\\eb85"}),l.listTree=new l("list-tree",{fontCharacter:"\\eb86"}),l.debugBreakpointFunctionUnverified=new l("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),l.debugBreakpointFunction=new l("debug-breakpoint-function",{fontCharacter:"\\eb88"}),l.debugBreakpointFunctionDisabled=new l("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),l.debugStackframeActive=new l("debug-stackframe-active",{fontCharacter:"\\eb89"}),l.debugStackframeDot=new l("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),l.debugStackframe=new l("debug-stackframe",{fontCharacter:"\\eb8b"}),l.debugStackframeFocused=new l("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),l.debugBreakpointUnsupported=new l("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),l.symbolString=new l("symbol-string",{fontCharacter:"\\eb8d"}),l.debugReverseContinue=new l("debug-reverse-continue",{fontCharacter:"\\eb8e"}),l.debugStepBack=new l("debug-step-back",{fontCharacter:"\\eb8f"}),l.debugRestartFrame=new l("debug-restart-frame",{fontCharacter:"\\eb90"}),l.callIncoming=new l("call-incoming",{fontCharacter:"\\eb92"}),l.callOutgoing=new l("call-outgoing",{fontCharacter:"\\eb93"}),l.menu=new l("menu",{fontCharacter:"\\eb94"}),l.expandAll=new l("expand-all",{fontCharacter:"\\eb95"}),l.feedback=new l("feedback",{fontCharacter:"\\eb96"}),l.groupByRefType=new l("group-by-ref-type",{fontCharacter:"\\eb97"}),l.ungroupByRefType=new l("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),l.account=new l("account",{fontCharacter:"\\eb99"}),l.bellDot=new l("bell-dot",{fontCharacter:"\\eb9a"}),l.debugConsole=new l("debug-console",{fontCharacter:"\\eb9b"}),l.library=new l("library",{fontCharacter:"\\eb9c"}),l.output=new l("output",{fontCharacter:"\\eb9d"}),l.runAll=new l("run-all",{fontCharacter:"\\eb9e"}),l.syncIgnored=new l("sync-ignored",{fontCharacter:"\\eb9f"}),l.pinned=new l("pinned",{fontCharacter:"\\eba0"}),l.githubInverted=new l("github-inverted",{fontCharacter:"\\eba1"}),l.debugAlt=new l("debug-alt",{fontCharacter:"\\eb91"}),l.serverProcess=new l("server-process",{fontCharacter:"\\eba2"}),l.serverEnvironment=new l("server-environment",{fontCharacter:"\\eba3"}),l.pass=new l("pass",{fontCharacter:"\\eba4"}),l.stopCircle=new l("stop-circle",{fontCharacter:"\\eba5"}),l.playCircle=new l("play-circle",{fontCharacter:"\\eba6"}),l.record=new l("record",{fontCharacter:"\\eba7"}),l.debugAltSmall=new l("debug-alt-small",{fontCharacter:"\\eba8"}),l.vmConnect=new l("vm-connect",{fontCharacter:"\\eba9"}),l.cloud=new l("cloud",{fontCharacter:"\\ebaa"}),l.merge=new l("merge",{fontCharacter:"\\ebab"}),l.exportIcon=new l("export",{fontCharacter:"\\ebac"}),l.graphLeft=new l("graph-left",{fontCharacter:"\\ebad"}),l.magnet=new l("magnet",{fontCharacter:"\\ebae"}),l.notebook=new l("notebook",{fontCharacter:"\\ebaf"}),l.redo=new l("redo",{fontCharacter:"\\ebb0"}),l.checkAll=new l("check-all",{fontCharacter:"\\ebb1"}),l.pinnedDirty=new l("pinned-dirty",{fontCharacter:"\\ebb2"}),l.passFilled=new l("pass-filled",{fontCharacter:"\\ebb3"}),l.circleLargeFilled=new l("circle-large-filled",{fontCharacter:"\\ebb4"}),l.circleLargeOutline=new l("circle-large-outline",{fontCharacter:"\\ebb5"}),l.combine=new l("combine",{fontCharacter:"\\ebb6"}),l.gather=new l("gather",{fontCharacter:"\\ebb6"}),l.table=new l("table",{fontCharacter:"\\ebb7"}),l.variableGroup=new l("variable-group",{fontCharacter:"\\ebb8"}),l.typeHierarchy=new l("type-hierarchy",{fontCharacter:"\\ebb9"}),l.typeHierarchySub=new l("type-hierarchy-sub",{fontCharacter:"\\ebba"}),l.typeHierarchySuper=new l("type-hierarchy-super",{fontCharacter:"\\ebbb"}),l.gitPullRequestCreate=new l("git-pull-request-create",{fontCharacter:"\\ebbc"}),l.runAbove=new l("run-above",{fontCharacter:"\\ebbd"}),l.runBelow=new l("run-below",{fontCharacter:"\\ebbe"}),l.notebookTemplate=new l("notebook-template",{fontCharacter:"\\ebbf"}),l.debugRerun=new l("debug-rerun",{fontCharacter:"\\ebc0"}),l.workspaceTrusted=new l("workspace-trusted",{fontCharacter:"\\ebc1"}),l.workspaceUntrusted=new l("workspace-untrusted",{fontCharacter:"\\ebc2"}),l.workspaceUnspecified=new l("workspace-unspecified",{fontCharacter:"\\ebc3"}),l.terminalCmd=new l("terminal-cmd",{fontCharacter:"\\ebc4"}),l.terminalDebian=new l("terminal-debian",{fontCharacter:"\\ebc5"}),l.terminalLinux=new l("terminal-linux",{fontCharacter:"\\ebc6"}),l.terminalPowershell=new l("terminal-powershell",{fontCharacter:"\\ebc7"}),l.terminalTmux=new l("terminal-tmux",{fontCharacter:"\\ebc8"}),l.terminalUbuntu=new l("terminal-ubuntu",{fontCharacter:"\\ebc9"}),l.terminalBash=new l("terminal-bash",{fontCharacter:"\\ebca"}),l.arrowSwap=new l("arrow-swap",{fontCharacter:"\\ebcb"}),l.copy=new l("copy",{fontCharacter:"\\ebcc"}),l.personAdd=new l("person-add",{fontCharacter:"\\ebcd"}),l.filterFilled=new l("filter-filled",{fontCharacter:"\\ebce"}),l.wand=new l("wand",{fontCharacter:"\\ebcf"}),l.debugLineByLine=new l("debug-line-by-line",{fontCharacter:"\\ebd0"}),l.inspect=new l("inspect",{fontCharacter:"\\ebd1"}),l.layers=new l("layers",{fontCharacter:"\\ebd2"}),l.layersDot=new l("layers-dot",{fontCharacter:"\\ebd3"}),l.layersActive=new l("layers-active",{fontCharacter:"\\ebd4"}),l.compass=new l("compass",{fontCharacter:"\\ebd5"}),l.compassDot=new l("compass-dot",{fontCharacter:"\\ebd6"}),l.compassActive=new l("compass-active",{fontCharacter:"\\ebd7"}),l.azure=new l("azure",{fontCharacter:"\\ebd8"}),l.issueDraft=new l("issue-draft",{fontCharacter:"\\ebd9"}),l.gitPullRequestClosed=new l("git-pull-request-closed",{fontCharacter:"\\ebda"}),l.gitPullRequestDraft=new l("git-pull-request-draft",{fontCharacter:"\\ebdb"}),l.debugAll=new l("debug-all",{fontCharacter:"\\ebdc"}),l.debugCoverage=new l("debug-coverage",{fontCharacter:"\\ebdd"}),l.runErrors=new l("run-errors",{fontCharacter:"\\ebde"}),l.folderLibrary=new l("folder-library",{fontCharacter:"\\ebdf"}),l.debugContinueSmall=new l("debug-continue-small",{fontCharacter:"\\ebe0"}),l.beakerStop=new l("beaker-stop",{fontCharacter:"\\ebe1"}),l.graphLine=new l("graph-line",{fontCharacter:"\\ebe2"}),l.graphScatter=new l("graph-scatter",{fontCharacter:"\\ebe3"}),l.pieChart=new l("pie-chart",{fontCharacter:"\\ebe4"}),l.bracket=new l("bracket",l.json.definition),l.bracketDot=new l("bracket-dot",{fontCharacter:"\\ebe5"}),l.bracketError=new l("bracket-error",{fontCharacter:"\\ebe6"}),l.lockSmall=new l("lock-small",{fontCharacter:"\\ebe7"}),l.azureDevops=new l("azure-devops",{fontCharacter:"\\ebe8"}),l.verifiedFilled=new l("verified-filled",{fontCharacter:"\\ebe9"})}(me||(me={}))},79881:function(Jt,ot,B){"use strict";B.d(ot,{B8:function(){return F},Cp:function(){return _e},F0:function(){return ie},L6:function(){return H},VV:function(){return me},b1:function(){return l},dL:function(){return Re},ri:function(){return Z}});class I{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(x){setTimeout(()=>{throw x.stack?new Error(x.message+`
|
|
|
|
`+x.stack):x},0)}}emit(x){this.listeners.forEach(T=>{T(x)})}onUnexpectedError(x){this.unexpectedErrorHandler(x),this.emit(x)}onUnexpectedExternalError(x){this.unexpectedErrorHandler(x)}}const be=new I;function Re(E){me(E)||be.onUnexpectedError(E)}function _e(E){me(E)||be.onUnexpectedExternalError(E)}function Z(E){if(E instanceof Error){let{name:x,message:T}=E;const L=E.stacktrace||E.stack;return{$isError:!0,name:x,message:T,stack:L}}return E}const v="Canceled";function me(E){return E instanceof Error&&E.name===v&&E.message===v}function ie(){const E=new Error(v);return E.name=E.message,E}function l(E){return E?new Error(`Illegal argument: ${E}`):new Error("Illegal argument")}function H(E){return E?new Error(`Illegal state: ${E}`):new Error("Illegal state")}class F extends Error{constructor(x){super("NotSupported"),x&&(this.message=x)}}},4348:function(Jt,ot,B){"use strict";B.d(ot,{D0:function(){return F},E7:function(){return E},K3:function(){return H},Q5:function(){return l},ZD:function(){return x},ju:function(){return Z}});var I=B(79881),be=B(69323),Re=B(34502),_e=B(95830),Z;(function(T){T.None=()=>be.JT.None;function L(ee){return(ne,oe=null,re)=>{let b=!1,S;return S=ee(V=>{if(!b)return S?S.dispose():b=!0,ne.call(oe,V)},null,re),b&&S.dispose(),S}}T.once=L;function q(ee,ne){return W((oe,re=null,b)=>ee(S=>oe.call(re,ne(S)),null,b))}T.map=q;function Y(ee,ne){return W((oe,re=null,b)=>ee(S=>{ne(S),oe.call(re,S)},null,b))}T.forEach=Y;function $(ee,ne){return W((oe,re=null,b)=>ee(S=>ne(S)&&oe.call(re,S),null,b))}T.filter=$;function A(ee){return ee}T.signal=A;function M(...ee){return(ne,oe=null,re)=>(0,be.F8)(...ee.map(b=>b(S=>ne.call(oe,S),null,re)))}T.any=M;function O(ee,ne,oe){let re=oe;return q(ee,b=>(re=ne(re,b),re))}T.reduce=O;function W(ee){let ne;const oe=new l({onFirstListenerAdd(){ne=ee(oe.fire,oe)},onLastListenerRemove(){ne.dispose()}});return oe.event}function ge(ee,ne,oe=100,re=!1,b){let S,V,ve,He=0;const st=new l({leakWarningThreshold:b,onFirstListenerAdd(){S=ee(tt=>{He++,V=ne(V,tt),re&&!ve&&(st.fire(V),V=void 0),clearTimeout(ve),ve=setTimeout(()=>{const Xe=V;V=void 0,ve=void 0,(!re||He>1)&&st.fire(Xe),He=0},oe)})},onLastListenerRemove(){S.dispose()}});return st.event}T.debounce=ge;function De(ee,ne=(oe,re)=>oe===re){let oe=!0,re;return $(ee,b=>{const S=oe||!ne(b,re);return oe=!1,re=b,S})}T.latch=De;function he(ee,ne){return[T.filter(ee,ne),T.filter(ee,oe=>!ne(oe))]}T.split=he;function Me(ee,ne=!1,oe=[]){let re=oe.slice(),b=ee(ve=>{re?re.push(ve):V.fire(ve)});const S=()=>{re&&re.forEach(ve=>V.fire(ve)),re=null},V=new l({onFirstListenerAdd(){b||(b=ee(ve=>V.fire(ve)))},onFirstListenerDidAdd(){re&&(ne?setTimeout(S):S())},onLastListenerRemove(){b&&b.dispose(),b=null}});return V.event}T.buffer=Me;class Fe{constructor(ne){this.event=ne}map(ne){return new Fe(q(this.event,ne))}forEach(ne){return new Fe(Y(this.event,ne))}filter(ne){return new Fe($(this.event,ne))}reduce(ne,oe){return new Fe(O(this.event,ne,oe))}latch(){return new Fe(De(this.event))}debounce(ne,oe=100,re=!1,b){return new Fe(ge(this.event,ne,oe,re,b))}on(ne,oe,re){return this.event(ne,oe,re)}once(ne,oe,re){return L(this.event)(ne,oe,re)}}function ke(ee){return new Fe(ee)}T.chain=ke;function ct(ee,ne,oe=re=>re){const re=(...ve)=>V.fire(oe(...ve)),b=()=>ee.on(ne,re),S=()=>ee.removeListener(ne,re),V=new l({onFirstListenerAdd:b,onLastListenerRemove:S});return V.event}T.fromNodeEventEmitter=ct;function ae(ee,ne,oe=re=>re){const re=(...ve)=>V.fire(oe(...ve)),b=()=>ee.addEventListener(ne,re),S=()=>ee.removeEventListener(ne,re),V=new l({onFirstListenerAdd:b,onLastListenerRemove:S});return V.event}T.fromDOMEventEmitter=ae;function j(ee){return new Promise(ne=>L(ee)(ne))}T.toPromise=j})(Z||(Z={}));class v{constructor(L){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${L}_${v._idPool++}`}start(L){this._stopWatch=new _e.G(!0),this._listenerCount=L}stop(){if(this._stopWatch){const L=this._stopWatch.elapsed();this._elapsedOverall+=L,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${L.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}v._idPool=0;let me=-1;class ie{constructor(L,q=Math.random().toString(18).slice(2,5)){this.customThreshold=L,this.name=q,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(L){let q=me;if(typeof this.customThreshold=="number"&&(q=this.customThreshold),q<=0||L<q)return;this._stacks||(this._stacks=new Map);const Y=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),$=this._stacks.get(Y)||0;if(this._stacks.set(Y,$+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=q*.5;let A,M=0;for(const[O,W]of this._stacks)(!A||M<W)&&(A=O,M=W);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${M}):`),console.warn(A)}return()=>{const A=this._stacks.get(Y)||0;this._stacks.set(Y,A-1)}}}class l{constructor(L){var q;this._disposed=!1,this._options=L,this._leakageMon=me>0?new ie(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((q=this._options)===null||q===void 0)&&q._profName?new v(this._options._profName):void 0}get event(){return this._event||(this._event=(L,q,Y)=>{var $;this._listeners||(this._listeners=new Re.S);const A=this._listeners.isEmpty();A&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const M=this._listeners.push(q?[L,q]:L);A&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,L,q);const O=($=this._leakageMon)===null||$===void 0?void 0:$.check(this._listeners.size),W=(0,be.OF)(()=>{O&&O(),this._disposed||(M(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Y instanceof be.SL?Y.add(W):Array.isArray(Y)&&Y.push(W),W}),this._event}fire(L){var q,Y;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Re.S);for(let $ of this._listeners)this._deliveryQueue.push([$,L]);for((q=this._perfMon)===null||q===void 0||q.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[$,A]=this._deliveryQueue.shift();try{typeof $=="function"?$.call(void 0,A):$[0].call($[1],A)}catch(M){(0,I.dL)(M)}}(Y=this._perfMon)===null||Y===void 0||Y.stop()}}dispose(){var L,q,Y,$,A;this._disposed||(this._disposed=!0,(L=this._listeners)===null||L===void 0||L.clear(),(q=this._deliveryQueue)===null||q===void 0||q.clear(),($=(Y=this._options)===null||Y===void 0?void 0:Y.onLastListenerRemove)===null||$===void 0||$.call(Y),(A=this._leakageMon)===null||A===void 0||A.dispose())}}class H extends l{constructor(L){super(L),this._isPaused=0,this._eventQueue=new Re.S,this._mergeFn=L==null?void 0:L.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const L=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(L))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(L){this._listeners&&(this._isPaused!==0?this._eventQueue.push(L):super.fire(L))}}class F extends H{constructor(L){var q;super(L),this._delay=(q=L.delay)!==null&&q!==void 0?q:100}fire(L){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(L)}}class E{constructor(){this.buffers=[]}wrapEvent(L){return(q,Y,$)=>L(A=>{const M=this.buffers[this.buffers.length-1];M?M.push(()=>q.call(Y,A)):q.call(Y,A)},void 0,$)}bufferEvents(L){const q=[];this.buffers.push(q);const Y=L();return this.buffers.pop(),q.forEach($=>$()),Y}}class x{constructor(){this.listening=!1,this.inputEvent=Z.None,this.inputEventListener=be.JT.None,this.emitter=new l({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(L){this.inputEvent=L,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=L(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Jt,ot,B){"use strict";B.d(ot,{I:function(){return I}});function I(be){const Re=this;let _e=!1,Z;return function(){return _e||(_e=!0,Z=be.apply(Re,arguments)),Z}}},88226:function(Jt,ot,B){"use strict";B.d(ot,{$:function(){return I}});var I;(function(be){function Re(M){return M&&typeof M=="object"&&typeof M[Symbol.iterator]=="function"}be.is=Re;const _e=Object.freeze([]);function Z(){return _e}be.empty=Z;function*v(M){yield M}be.single=v;function me(M){return M||_e}be.from=me;function ie(M){return!M||M[Symbol.iterator]().next().done===!0}be.isEmpty=ie;function l(M){return M[Symbol.iterator]().next().value}be.first=l;function H(M,O){for(const W of M)if(O(W))return!0;return!1}be.some=H;function F(M,O){for(const W of M)if(O(W))return W}be.find=F;function*E(M,O){for(const W of M)O(W)&&(yield W)}be.filter=E;function*x(M,O){let W=0;for(const ge of M)yield O(ge,W++)}be.map=x;function*T(...M){for(const O of M)for(const W of O)yield W}be.concat=T;function*L(M){for(const O of M)for(const W of O)yield W}be.concatNested=L;function q(M,O,W){let ge=W;for(const De of M)ge=O(ge,De);return ge}be.reduce=q;function*Y(M,O,W=M.length){for(O<0&&(O+=M.length),W<0?W+=M.length:W>M.length&&(W=M.length);O<W;O++)yield M[O]}be.slice=Y;function $(M,O=Number.POSITIVE_INFINITY){const W=[];if(O===0)return[W,M];const ge=M[Symbol.iterator]();for(let De=0;De<O;De++){const he=ge.next();if(he.done)return[W,be.empty()];W.push(he.value)}return[W,{[Symbol.iterator](){return ge}}]}be.consume=$;function A(M,O,W=(ge,De)=>ge===De){const ge=M[Symbol.iterator](),De=O[Symbol.iterator]();for(;;){const he=ge.next(),Me=De.next();if(he.done!==Me.done)return!1;if(he.done)return!0;if(!W(he.value,Me.value))return!1}}be.equals=A})(I||(I={}))},69323:function(Jt,ot,B){"use strict";B.d(ot,{B9:function(){return x},F8:function(){return T},JT:function(){return Y},Jz:function(){return A},OF:function(){return L},SL:function(){return q},Wf:function(){return E},XK:function(){return $},dk:function(){return H}});var I=B(17845),be=B(88226);const Re=!1;let _e=null;function Z(M){_e=M}if(Re){const M="__is_disposable_tracked__";Z(new class{trackDisposable(O){const W=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[M]||console.log(W)},3e3)}setParent(O,W){if(O&&O!==Y.None)try{O[M]=!0}catch(ge){}}markAsDisposed(O){if(O&&O!==Y.None)try{O[M]=!0}catch(W){}}markAsSingleton(O){}})}function v(M){return _e==null||_e.trackDisposable(M),M}function me(M){_e==null||_e.markAsDisposed(M)}function ie(M,O){_e==null||_e.setParent(M,O)}function l(M,O){if(_e)for(const W of M)_e.setParent(W,O)}function H(M){return _e==null||_e.markAsSingleton(M),M}class F extends Error{constructor(O){super(`Encountered errors while disposing of store. Errors: [${O.join(", ")}]`),this.errors=O}}function E(M){return typeof M.dispose=="function"&&M.dispose.length===0}function x(M){if(be.$.is(M)){let O=[];for(const W of M)if(W)try{W.dispose()}catch(ge){O.push(ge)}if(O.length===1)throw O[0];if(O.length>1)throw new F(O);return Array.isArray(M)?[]:M}else if(M)return M.dispose(),M}function T(...M){const O=L(()=>x(M));return l(M,O),O}function L(M){const O=v({dispose:(0,I.I)(()=>{me(O),M()})});return O}class q{constructor(){this._toDispose=new Set,this._isDisposed=!1,v(this)}dispose(){this._isDisposed||(me(this),this._isDisposed=!0,this.clear())}clear(){try{x(this._toDispose.values())}finally{this._toDispose.clear()}}add(O){if(!O)return O;if(O===this)throw new Error("Cannot register a disposable on itself!");return ie(O,this),this._isDisposed?q.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(O),O}}q.DISABLE_DISPOSED_WARNING=!1;class Y{constructor(){this._store=new q,v(this),ie(this._store,this)}dispose(){me(this),this._store.dispose()}_register(O){if(O===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(O)}}Y.None=Object.freeze({dispose(){}});class ${constructor(){this._isDisposed=!1,v(this)}get value(){return this._isDisposed?void 0:this._value}set value(O){var W;this._isDisposed||O===this._value||((W=this._value)===null||W===void 0||W.dispose(),O&&ie(O,this),this._value=O)}clear(){this.value=void 0}dispose(){var O;this._isDisposed=!0,me(this),(O=this._value)===null||O===void 0||O.dispose(),this._value=void 0}clearAndLeak(){const O=this._value;return this._value=void 0,O&&ie(O,null),O}}class A{constructor(O){this.object=O}dispose(){}}},34502:function(Jt,ot,B){"use strict";B.d(ot,{S:function(){return be}});class I{constructor(_e){this.element=_e,this.next=I.Undefined,this.prev=I.Undefined}}I.Undefined=new I(void 0);class be{constructor(){this._first=I.Undefined,this._last=I.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===I.Undefined}clear(){let _e=this._first;for(;_e!==I.Undefined;){const Z=_e.next;_e.prev=I.Undefined,_e.next=I.Undefined,_e=Z}this._first=I.Undefined,this._last=I.Undefined,this._size=0}unshift(_e){return this._insert(_e,!1)}push(_e){return this._insert(_e,!0)}_insert(_e,Z){const v=new I(_e);if(this._first===I.Undefined)this._first=v,this._last=v;else if(Z){const ie=this._last;this._last=v,v.prev=ie,ie.next=v}else{const ie=this._first;this._first=v,v.next=ie,ie.prev=v}this._size+=1;let me=!1;return()=>{me||(me=!0,this._remove(v))}}shift(){if(this._first!==I.Undefined){const _e=this._first.element;return this._remove(this._first),_e}}pop(){if(this._last!==I.Undefined){const _e=this._last.element;return this._remove(this._last),_e}}_remove(_e){if(_e.prev!==I.Undefined&&_e.next!==I.Undefined){const Z=_e.prev;Z.next=_e.next,_e.next.prev=Z}else _e.prev===I.Undefined&&_e.next===I.Undefined?(this._first=I.Undefined,this._last=I.Undefined):_e.next===I.Undefined?(this._last=this._last.prev,this._last.next=I.Undefined):_e.prev===I.Undefined&&(this._first=this._first.next,this._first.prev=I.Undefined);this._size-=1}*[Symbol.iterator](){let _e=this._first;for(;_e!==I.Undefined;)yield _e.element,_e=_e.next}}},23345:function(Jt,ot,B){"use strict";B.d(ot,{$L:function(){return ge},ED:function(){return A},IJ:function(){return O},OS:function(){return Fe},WE:function(){return he},dz:function(){return M},gn:function(){return De},li:function(){return L},r:function(){return ae},tY:function(){return W},xS:function(){return Me}});var I=B(97671),be;const Re="en";let _e=!1,Z=!1,v=!1,me=!1,ie=!1,l=!1,H=!1,F,E=null,x=null,T;const L=typeof self=="object"?self:typeof B.g=="object"?B.g:{};let q;typeof L.vscode!="undefined"&&typeof L.vscode.process!="undefined"?q=L.vscode.process:typeof I!="undefined"&&(q=I);const Y=typeof((be=q==null?void 0:q.versions)===null||be===void 0?void 0:be.electron)=="string"&&q.type==="renderer";if(typeof navigator=="object"&&!Y)T=navigator.userAgent,_e=T.indexOf("Windows")>=0,Z=T.indexOf("Macintosh")>=0,H=(T.indexOf("Macintosh")>=0||T.indexOf("iPad")>=0||T.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,v=T.indexOf("Linux")>=0,l=!0,F=navigator.language,E=F;else if(typeof q=="object"){_e=q.platform==="win32",Z=q.platform==="darwin",v=q.platform==="linux",me=v&&!!q.env.SNAP&&!!q.env.SNAP_REVISION,F=Re,E=Re;const j=q.env.VSCODE_NLS_CONFIG;if(j)try{const ee=JSON.parse(j),ne=ee.availableLanguages["*"];F=ee.locale,E=ne||Re,x=ee._translationsConfigFile}catch(ee){}ie=!0}else console.error("Unable to resolve platform.");let $=0;Z?$=1:_e?$=3:v&&($=2);const A=_e,M=Z,O=v,W=ie,ge=l,De=H,he=T,Me=function(){if(L.setImmediate)return L.setImmediate.bind(L);if(typeof L.postMessage=="function"&&!L.importScripts){let ne=[];L.addEventListener("message",re=>{if(re.data&&re.data.vscodeSetImmediateId)for(let b=0,S=ne.length;b<S;b++){const V=ne[b];if(V.id===re.data.vscodeSetImmediateId){ne.splice(b,1),V.callback();return}}});let oe=0;return re=>{const b=++oe;ne.push({id:b,callback:re}),L.postMessage({vscodeSetImmediateId:b},"*")}}if(typeof(q==null?void 0:q.nextTick)=="function")return q.nextTick.bind(q);const ee=Promise.resolve();return ne=>ee.then(ne)}(),Fe=Z||H?2:_e?1:3;let ke=!0,ct=!1;function ae(){if(!ct){ct=!0;const j=new Uint8Array(2);j[0]=1,j[1]=2,ke=new Uint16Array(j.buffer)[0]===513}return ke}},95830:function(Jt,ot,B){"use strict";B.d(ot,{G:function(){return Re}});var I=B(23345);const be=I.li.performance&&typeof I.li.performance.now=="function";class Re{constructor(Z){this._highResolution=be&&Z,this._startTime=this._now(),this._stopTime=-1}static create(Z=!0){return new Re(Z)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?I.li.performance.now():Date.now()}}},82983:function(Jt,ot,B){"use strict";B.d(ot,{$i:function(){return He},C8:function(){return et},GF:function(){return F},HO:function(){return oe},IO:function(){return E},K7:function(){return xt},Kw:function(){return Nt},LC:function(){return L},Mh:function(){return Me},P1:function(){return Fe},PJ:function(){return Sr},Qe:function(){return st},R1:function(){return H},RP:function(){return V},S6:function(){return wt},TT:function(){return A},Ut:function(){return b},V8:function(){return q},WU:function(){return Re},YK:function(){return ct},YU:function(){return _e},ZG:function(){return ke},ZH:function(){return j},ab:function(){return tt},c1:function(){return Ue},df:function(){return ge},ec:function(){return Z},fi:function(){return Er},fy:function(){return v},j3:function(){return me},j_:function(){return O},m5:function(){return I},mK:function(){return W},mr:function(){return x},oH:function(){return Se},oL:function(){return ie},ok:function(){return he},ow:function(){return Y},qq:function(){return De},qu:function(){return $},rL:function(){return ae},uS:function(){return Yt},un:function(){return l},uq:function(){return T},vH:function(){return ne},xe:function(){return Xe},zY:function(){return M}});function I(Q){return!Q||typeof Q!="string"?!0:Q.trim().length===0}const be=/{(\d+)}/g;function Re(Q,...we){return we.length===0?Q:Q.replace(be,function($e,Be){const nt=parseInt(Be,10);return isNaN(nt)||nt<0||nt>=we.length?$e:we[nt]})}function _e(Q){return Q.replace(/[<>&]/g,function(we){switch(we){case"<":return"<";case">":return">";case"&":return"&";default:return we}})}function Z(Q){return Q.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function v(Q,we=" "){const $e=me(Q,we);return ie($e,we)}function me(Q,we){if(!Q||!we)return Q;const $e=we.length;if($e===0||Q.length===0)return Q;let Be=0;for(;Q.indexOf(we,Be)===Be;)Be=Be+$e;return Q.substring(Be)}function ie(Q,we){if(!Q||!we)return Q;const $e=we.length,Be=Q.length;if($e===0||Be===0)return Q;let nt=Be,gt=-1;for(;gt=Q.lastIndexOf(we,nt-1),!(gt===-1||gt+$e!==nt);){if(gt===0)return"";nt=gt}return Q.substring(0,nt)}function l(Q){return Q.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function H(Q){return Q.replace(/\*/g,"")}function F(Q,we,$e={}){if(!Q)throw new Error("Cannot create regex from empty string");we||(Q=Z(Q)),$e.wholeWord&&(/\B/.test(Q.charAt(0))||(Q="\\b"+Q),/\B/.test(Q.charAt(Q.length-1))||(Q=Q+"\\b"));let Be="";return $e.global&&(Be+="g"),$e.matchCase||(Be+="i"),$e.multiline&&(Be+="m"),$e.unicode&&(Be+="u"),new RegExp(Q,Be)}function E(Q){return Q.source==="^"||Q.source==="^$"||Q.source==="$"||Q.source==="^\\s*$"?!1:!!(Q.exec("")&&Q.lastIndex===0)}function x(Q){return(Q.global?"g":"")+(Q.ignoreCase?"i":"")+(Q.multiline?"m":"")+(Q.unicode?"u":"")}function T(Q){return Q.split(/\r\n|\r|\n/)}function L(Q){for(let we=0,$e=Q.length;we<$e;we++){const Be=Q.charCodeAt(we);if(Be!==32&&Be!==9)return we}return-1}function q(Q,we=0,$e=Q.length){for(let Be=we;Be<$e;Be++){const nt=Q.charCodeAt(Be);if(nt!==32&&nt!==9)return Q.substring(we,Be)}return Q.substring(we,$e)}function Y(Q,we=Q.length-1){for(let $e=we;$e>=0;$e--){const Be=Q.charCodeAt($e);if(Be!==32&&Be!==9)return $e}return-1}function $(Q,we){return Q<we?-1:Q>we?1:0}function A(Q,we,$e=0,Be=Q.length,nt=0,gt=we.length){for(;$e<Be&&nt<gt;$e++,nt++){let Dt=Q.charCodeAt($e),vt=we.charCodeAt(nt);if(Dt<vt)return-1;if(Dt>vt)return 1}const Ot=Be-$e,yt=gt-nt;return Ot<yt?-1:Ot>yt?1:0}function M(Q,we){return O(Q,we,0,Q.length,0,we.length)}function O(Q,we,$e=0,Be=Q.length,nt=0,gt=we.length){for(;$e<Be&&nt<gt;$e++,nt++){let Dt=Q.charCodeAt($e),vt=we.charCodeAt(nt);if(Dt===vt)continue;if(Dt>=128||vt>=128)return A(Q.toLowerCase(),we.toLowerCase(),$e,Be,nt,gt);W(Dt)&&(Dt-=32),W(vt)&&(vt-=32);const Gt=Dt-vt;if(Gt!==0)return Gt}const Ot=Be-$e,yt=gt-nt;return Ot<yt?-1:Ot>yt?1:0}function W(Q){return Q>=97&&Q<=122}function ge(Q){return Q>=65&&Q<=90}function De(Q,we){return Q.length===we.length&&O(Q,we)===0}function he(Q,we){const $e=we.length;return we.length>Q.length?!1:O(Q,we,0,$e)===0}function Me(Q,we){let $e,Be=Math.min(Q.length,we.length);for($e=0;$e<Be;$e++)if(Q.charCodeAt($e)!==we.charCodeAt($e))return $e;return Be}function Fe(Q,we){let $e,Be=Math.min(Q.length,we.length);const nt=Q.length-1,gt=we.length-1;for($e=0;$e<Be;$e++)if(Q.charCodeAt(nt-$e)!==we.charCodeAt(gt-$e))return $e;return Be}function ke(Q){return 55296<=Q&&Q<=56319}function ct(Q){return 56320<=Q&&Q<=57343}function ae(Q,we){return(Q-55296<<10)+(we-56320)+65536}function j(Q,we,$e){const Be=Q.charCodeAt($e);if(ke(Be)&&$e+1<we){const nt=Q.charCodeAt($e+1);if(ct(nt))return ae(Be,nt)}return Be}function ee(Q,we){const $e=Q.charCodeAt(we-1);if(ct($e)&&we>1){const Be=Q.charCodeAt(we-2);if(ke(Be))return ae(Be,$e)}return $e}function ne(Q,we){const $e=ze.getInstance(),Be=we,nt=Q.length,gt=j(Q,nt,we);we+=gt>=65536?2:1;let Ot=$e.getGraphemeBreakType(gt);for(;we<nt;){const yt=j(Q,nt,we),Dt=$e.getGraphemeBreakType(yt);if(Er(Ot,Dt))break;we+=yt>=65536?2:1,Ot=Dt}return we-Be}function oe(Q,we){const $e=ze.getInstance(),Be=we,nt=ee(Q,we);we-=nt>=65536?2:1;let gt=$e.getGraphemeBreakType(nt);for(;we>0;){const Ot=ee(Q,we),yt=$e.getGraphemeBreakType(Ot);if(Er(yt,gt))break;we-=Ot>=65536?2:1,gt=yt}return Be-we}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 b(Q){return re.test(Q)}const S=/(?:[\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 V(Q){return S.test(Q)}const ve=/^[\t\n\r\x20-\x7E]*$/;function He(Q){return ve.test(Q)}const st=/[\u2028\u2029]/;function tt(Q){return st.test(Q)}function Xe(Q){for(let we=0,$e=Q.length;we<$e;we++)if(xt(Q.charCodeAt(we)))return!0;return!1}function xt(Q){return Q=+Q,Q>=11904&&Q<=55215||Q>=63744&&Q<=64255||Q>=65281&&Q<=65374}function et(Q){return Q>=127462&&Q<=127487||Q===8986||Q===8987||Q===9200||Q===9203||Q>=9728&&Q<=10175||Q===11088||Q===11093||Q>=127744&&Q<=128591||Q>=128640&&Q<=128764||Q>=128992&&Q<=129003||Q>=129280&&Q<=129535||Q>=129648&&Q<=129750}const Ue="\uFEFF";function Yt(Q){return!!(Q&&Q.length>0&&Q.charCodeAt(0)===65279)}function Nt(Q,we=!1){return Q?(we&&(Q=Q.replace(/\\./g,"")),Q.toLowerCase()!==Q):!1}function Sr(Q){return Q=Q%(2*26),Q<26?String.fromCharCode(97+Q):String.fromCharCode(65+Q-26)}function wt(Q){return ze.getInstance().getGraphemeBreakType(Q)}function Er(Q,we){return Q===0?we!==5&&we!==7:Q===2&&we===3?!1:Q===4||Q===2||Q===3||we===4||we===2||we===3?!0:!(Q===8&&(we===8||we===9||we===11||we===12)||(Q===11||Q===9)&&(we===9||we===10)||(Q===12||Q===10)&&we===10||we===5||we===13||we===7||Q===1||Q===13&&we===14||Q===6&&we===6)}class ze{constructor(){this._data=Oe()}static getInstance(){return ze._INSTANCE||(ze._INSTANCE=new ze),ze._INSTANCE}getGraphemeBreakType(we){if(we<32)return we===10?3:we===13?2:4;if(we<127)return 0;const $e=this._data,Be=$e.length/3;let nt=1;for(;nt<=Be;)if(we<$e[3*nt])nt=2*nt;else if(we>$e[3*nt+1])nt=2*nt+1;else return $e[3*nt+2];return 0}}ze._INSTANCE=null;function Oe(){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 Se(Q,we){if(Q===0)return 0;const $e=qe(Q,we);if($e!==void 0)return $e;const Be=ee(we,Q);return Q-=ht(Be),Q}function qe(Q,we){let $e=ee(we,Q);for(Q-=ht($e);pt($e)||$e===65039||$e===8419;){if(Q===0)return;$e=ee(we,Q),Q-=ht($e)}if(et($e)){if(Q>=0){const Be=ee(we,Q);Be===8205&&(Q-=ht(Be))}return Q}}function ht(Q){return Q>=65536?2:1}function pt(Q){return 127995<=Q&&Q<=127999}},72999:function(Jt,ot,B){"use strict";B.d(ot,{$E:function(){return L},$K:function(){return me},D8:function(){return E},HD:function(){return be},IU:function(){return q},Jp:function(){return ie},Kn:function(){return Re},cW:function(){return H},f6:function(){return Y},hj:function(){return _e},jn:function(){return Z},kJ:function(){return I},mf:function(){return F},o8:function(){return v},p_:function(){return l},vE:function(){return $}});function I(A){return Array.isArray(A)}function be(A){return typeof A=="string"}function Re(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)&&!(A instanceof RegExp)&&!(A instanceof Date)}function _e(A){return typeof A=="number"&&!isNaN(A)}function Z(A){return A===!0||A===!1}function v(A){return typeof A=="undefined"}function me(A){return!ie(A)}function ie(A){return v(A)||A===null}function l(A,M){if(!A)throw new Error(M?`Unexpected type, expected '${M}'`:"Unexpected type")}function H(A){if(ie(A))throw new Error("Assertion Failed: argument is undefined or null");return A}function F(A){return typeof A=="function"}function E(A,M){const O=Math.min(A.length,M.length);for(let W=0;W<O;W++)x(A[W],M[W])}function x(A,M){if(be(M)){if(typeof A!==M)throw new Error(`argument does not match constraint: typeof ${M}`)}else if(F(M)){try{if(A instanceof M)return}catch(O){}if(!ie(A)&&A.constructor===M||M.length===1&&M.call(void 0,A)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function T(A){let M=[],O=Object.getPrototypeOf(A);for(;Object.prototype!==O;)M=M.concat(Object.getOwnPropertyNames(O)),O=Object.getPrototypeOf(O);return M}function L(A){const M=[];for(const O of T(A))typeof A[O]=="function"&&M.push(O);return M}function q(A,M){const O=ge=>function(){const De=Array.prototype.slice.call(arguments,0);return M(ge,De)};let W={};for(const ge of A)W[ge]=O(ge);return W}function Y(A){return A===null?void 0:A}function $(A,M="Unreachable"){throw new Error(M)}},13268:function(Jt,ot,B){"use strict";B.d(ot,{N:function(){return be}});function I(Re,_e){let Z;return _e.length===0?Z=Re:Z=Re.replace(/\{(\d+)\}/g,function(v,me){const ie=me[0];return typeof _e[ie]!="undefined"?_e[ie]:v}),Z}function be(Re,_e,...Z){return I(_e,Z)}},96236:function(Jt,ot,B){"use strict";B.d(ot,{BH:function(){return q},NZ:function(){return Y},U8:function(){return $},co:function(){return L},eH:function(){return T},vr:function(){return x}});var I=B(75918),be=B(52615),Re=B(4348),_e=B(88226),Z=B(69323),v=B(34502),me=B(35884),ie=B(90689),l=B(16925),H=B(49055),F=function(A,M,O,W){var ge=arguments.length,De=ge<3?M:W===null?W=Object.getOwnPropertyDescriptor(M,O):W,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")De=Reflect.decorate(A,M,O,W);else for(var Me=A.length-1;Me>=0;Me--)(he=A[Me])&&(De=(ge<3?he(De):ge>3?he(M,O,De):he(M,O))||De);return ge>3&&De&&Object.defineProperty(M,O,De),De},E=function(A,M){return function(O,W){M(O,W,A)}};function x(A){return A.command!==void 0}class T{constructor(M){this.id=T._idPool++,this._debugName=M}}T._idPool=0,T.CommandPalette=new T("CommandPalette"),T.EditorContext=new T("EditorContext"),T.SimpleEditorContext=new T("SimpleEditorContext"),T.EditorContextCopy=new T("EditorContextCopy"),T.EditorContextPeek=new T("EditorContextPeek"),T.MenubarEditMenu=new T("MenubarEditMenu"),T.MenubarCopy=new T("MenubarCopy"),T.MenubarGoMenu=new T("MenubarGoMenu"),T.MenubarSelectionMenu=new T("MenubarSelectionMenu"),T.InlineCompletionsActions=new T("InlineCompletionsActions");const L=(0,l.yh)("menuService"),q=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Re.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:A=>A===T.CommandPalette}}addCommand(A){return this.addCommands(_e.$.single(A))}addCommands(A){for(const M of A)this._commands.set(M.id,M);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,Z.OF)(()=>{let M=!1;for(const O of A)M=this._commands.delete(O.id)||M;M&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(A){return this._commands.get(A)}getCommands(){const A=new Map;return this._commands.forEach((M,O)=>A.set(O,M)),A}appendMenuItem(A,M){return this.appendMenuItems(_e.$.single({id:A,item:M}))}appendMenuItems(A){const M=new Set,O=new v.S;for(const{id:W,item:ge}of A){let De=this._menuItems.get(W);De||(De=new v.S,this._menuItems.set(W,De)),O.push(De.push(ge)),M.add(W)}return this._onDidChangeMenu.fire(M),(0,Z.OF)(()=>{if(O.size>0){for(let W of O)W();this._onDidChangeMenu.fire(M),O.clear()}})}getMenuItems(A){let M;return this._menuItems.has(A)?M=[...this._menuItems.get(A)]:M=[],A===T.CommandPalette&&this._appendImplicitItems(M),M}_appendImplicitItems(A){const M=new Set;for(const O of A)x(O)&&(M.add(O.command.id),O.alt&&M.add(O.alt.id));this._commands.forEach((O,W)=>{M.has(W)||A.push({command:O})})}};class Y extends I.wY{constructor(M,O,W,ge){super(`submenuitem.${M.submenu.id}`,typeof M.title=="string"?M.title:M.title.value,[],"submenu"),this.item=M,this._menuService=O,this._contextKeyService=W,this._options=ge}get actions(){const M=[],O=this._menuService.createMenu(this.item.submenu,this._contextKeyService),W=O.getActions(this._options);O.dispose();for(const[,ge]of W)ge.length>0&&(M.push(...ge),M.push(new I.Z0));return M.length&&M.pop(),M}}let $=class Eu{constructor(M,O,W,ge,De){var he,Me;if(this._commandService=De,this.id=M.id,this.label=W!=null&&W.renderShortTitle&&M.shortTitle?typeof M.shortTitle=="string"?M.shortTitle:M.shortTitle.value:typeof M.title=="string"?M.title:M.title.value,this.tooltip=(Me=typeof M.tooltip=="string"?M.tooltip:(he=M.tooltip)===null||he===void 0?void 0:he.value)!==null&&Me!==void 0?Me:"",this.enabled=!M.precondition||ge.contextMatchesRules(M.precondition),this.checked=void 0,M.toggled){const Fe=M.toggled.condition?M.toggled:{condition:M.toggled};this.checked=ge.contextMatchesRules(Fe.condition),this.checked&&Fe.tooltip&&(this.tooltip=typeof Fe.tooltip=="string"?Fe.tooltip:Fe.tooltip.value),Fe.title&&(this.label=typeof Fe.title=="string"?Fe.title:Fe.title.value)}this.item=M,this.alt=O?new Eu(O,void 0,W,ge,De):void 0,this._options=W,H.kS.isThemeIcon(M.icon)&&(this.class=be.dT.asClassName(M.icon))}dispose(){}run(...M){var O,W;let ge=[];return!((O=this._options)===null||O===void 0)&&O.arg&&(ge=[...ge,this._options.arg]),!((W=this._options)===null||W===void 0)&&W.shouldForwardArgs&&(ge=[...ge,...M]),this._commandService.executeCommand(this.id,...ge)}};$=F([E(3,ie.i6),E(4,me.H)],$)},35884:function(Jt,ot,B){"use strict";B.d(ot,{H:function(){return me},P:function(){return ie}});var I=B(4348),be=B(88226),Re=B(69323),_e=B(34502),Z=B(72999),v=B(16925);const me=(0,v.yh)("commandService"),ie=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new I.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,H){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!H)throw new Error("invalid command");return this.registerCommand({id:l,handler:H})}if(l.description){const L=[];for(let Y of l.description.args)L.push(Y.constraint);const q=l.handler;l.handler=function(Y,...$){return(0,Z.D8)($,L),q(Y,...$)}}const{id:F}=l;let E=this._commands.get(F);E||(E=new _e.S,this._commands.set(F,E));let x=E.unshift(l),T=(0,Re.OF)(()=>{x();const L=this._commands.get(F);L!=null&&L.isEmpty()&&this._commands.delete(F)});return this._onDidRegisterCommand.fire(F),T}registerCommandAlias(l,H){return ie.registerCommand(l,(F,...E)=>F.get(me).executeCommand(H,...E))}getCommand(l){const H=this._commands.get(l);if(!(!H||H.isEmpty()))return be.$.first(H)}getCommands(){const l=new Map;for(const H of this._commands.keys()){const F=this.getCommand(H);F&&l.set(H,F)}return l}};ie.registerCommand("noop",()=>{})},90689:function(Jt,ot,B){"use strict";B.d(ot,{Ao:function(){return me},Eq:function(){return ae},Fb:function(){return ie},K8:function(){return ne},i6:function(){return ct},uy:function(){return ke}});var I=B(23345),be=B(82983),Re=B(16925);let _e=I.WE||"";const Z=new Map;Z.set("false",!1),Z.set("true",!0),Z.set("isMac",I.dz),Z.set("isLinux",I.IJ),Z.set("isWindows",I.ED),Z.set("isWeb",I.$L),Z.set("isMacNative",I.dz&&!I.$L),Z.set("isEdge",_e.indexOf("Edg/")>=0),Z.set("isFirefox",_e.indexOf("Firefox")>=0),Z.set("isChrome",_e.indexOf("Chrome")>=0),Z.set("isSafari",_e.indexOf("Safari")>=0);const v=Object.prototype.hasOwnProperty;class me{static has(b){return E.create(b)}static equals(b,S){return x.create(b,S)}static regex(b,S){return ge.create(b,S)}static not(b){return Y.create(b)}static and(...b){return Me.create(b,null)}static or(...b){return Fe.create(b,null,!0)}static deserialize(b,S=!1){if(b)return this._deserializeOrExpression(b,S)}static _deserializeOrExpression(b,S){let V=b.split("||");return Fe.create(V.map(ve=>this._deserializeAndExpression(ve,S)),null,!0)}static _deserializeAndExpression(b,S){let V=b.split("&&");return Me.create(V.map(ve=>this._deserializeOne(ve,S)),null)}static _deserializeOne(b,S){if(b=b.trim(),b.indexOf("!=")>=0){let V=b.split("!=");return q.create(V[0].trim(),this._deserializeValue(V[1],S))}if(b.indexOf("==")>=0){let V=b.split("==");return x.create(V[0].trim(),this._deserializeValue(V[1],S))}if(b.indexOf("=~")>=0){let V=b.split("=~");return ge.create(V[0].trim(),this._deserializeRegexValue(V[1],S))}if(b.indexOf(" in ")>=0){let V=b.split(" in ");return T.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(b)){const V=b.split(">=");return M.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(b)){const V=b.split(">");return A.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(b)){const V=b.split("<=");return W.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(b)){const V=b.split("<");return O.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(b)?Y.create(b.substr(1).trim()):E.create(b)}static _deserializeValue(b,S){if(b=b.trim(),b==="true")return!0;if(b==="false")return!1;let V=/^'([^']*)'$/.exec(b);return V?V[1].trim():b}static _deserializeRegexValue(b,S){if((0,be.m5)(b)){if(S)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let V=b.indexOf("/"),ve=b.lastIndexOf("/");if(V===ve||V<0){if(S)throw new Error(`bad regexp-value '${b}', missing /-enclosure`);return console.warn(`bad regexp-value '${b}', missing /-enclosure`),null}let He=b.slice(V+1,ve),st=b[ve+1]==="i"?"i":"";try{return new RegExp(He,st)}catch(tt){if(S)throw new Error(`bad regexp-value '${b}', parse error: ${tt}`);return console.warn(`bad regexp-value '${b}', parse error: ${tt}`),null}}}function ie(re,b){const S=re?re.substituteConstants():void 0,V=b?b.substituteConstants():void 0;return!S&&!V?!0:!S||!V?!1:S.equals(V)}function l(re,b){return re.cmp(b)}class H{constructor(){this.type=0}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!1}serialize(){return"false"}keys(){return[]}negate(){return F.INSTANCE}}H.INSTANCE=new H;class F{constructor(){this.type=1}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!0}serialize(){return"true"}keys(){return[]}negate(){return H.INSTANCE}}F.INSTANCE=new F;class E{constructor(b,S){this.key=b,this.negated=S,this.type=2}static create(b,S=null){const V=Z.get(b);return typeof V=="boolean"?V?F.INSTANCE:H.INSTANCE:new E(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:j(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=Z.get(this.key);return typeof b=="boolean"?b?F.INSTANCE:H.INSTANCE:this}evaluate(b){return!!b.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Y.create(this.key,this)),this.negated}}class x{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=4}static create(b,S,V=null){if(typeof S=="boolean")return S?E.create(b,V):Y.create(b,V);const ve=Z.get(b);return typeof ve=="boolean"?S===(ve?"true":"false")?F.INSTANCE:H.INSTANCE:new x(b,S,V)}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=Z.get(this.key);if(typeof b=="boolean"){const S=b?"true":"false";return this.value===S?F.INSTANCE:H.INSTANCE}return this}evaluate(b){return b.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this.key,this.value,this)),this.negated}}class T{constructor(b,S){this.key=b,this.valueKey=S,this.type=10,this.negated=null}static create(b,S){return new T(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.valueKey,b.key,b.valueKey)}equals(b){return b.type===this.type?this.key===b.key&&this.valueKey===b.valueKey:!1}substituteConstants(){return this}evaluate(b){const S=b.getValue(this.valueKey),V=b.getValue(this.key);return Array.isArray(S)?S.indexOf(V)>=0:typeof V=="string"&&typeof S=="object"&&S!==null?v.call(S,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(b){this._actual=b,this.type=11}static create(b){return new L(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class q{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=5}static create(b,S,V=null){if(typeof S=="boolean")return S?Y.create(b,V):E.create(b,V);const ve=Z.get(b);return typeof ve=="boolean"?S===(ve?"true":"false")?H.INSTANCE:F.INSTANCE:new q(b,S,V)}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=Z.get(this.key);if(typeof b=="boolean"){const S=b?"true":"false";return this.value===S?H.INSTANCE:F.INSTANCE}return this}evaluate(b){return b.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 Y{constructor(b,S){this.key=b,this.negated=S,this.type=3}static create(b,S=null){const V=Z.get(b);return typeof V=="boolean"?V?H.INSTANCE:F.INSTANCE:new Y(b,S)}cmp(b){return b.type!==this.type?this.type-b.type:j(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=Z.get(this.key);return typeof b=="boolean"?b?H.INSTANCE:F.INSTANCE:this}evaluate(b){return!b.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function $(re,b){if(typeof re=="string"){const S=parseFloat(re);isNaN(S)||(re=S)}return typeof re=="string"||typeof re=="number"?b(re):H.INSTANCE}class A{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=12}static create(b,S,V=null){return $(S,ve=>new A(b,ve,V))}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class M{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=13}static create(b,S,V=null){return $(S,ve=>new M(b,ve,V))}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class O{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=14}static create(b,S,V=null){return $(S,ve=>new O(b,ve,V))}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class W{constructor(b,S,V){this.key=b,this.value=S,this.negated=V,this.type=15}static create(b,S,V=null){return $(S,ve=>new W(b,ve,V))}cmp(b){return b.type!==this.type?this.type-b.type:ee(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class ge{constructor(b,S){this.key=b,this.regexp=S,this.type=7,this.negated=null}static create(b,S){return new ge(b,S)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.key<b.key)return-1;if(this.key>b.key)return 1;const S=this.regexp?this.regexp.source:"",V=b.regexp?b.regexp.source:"";return S<V?-1:S>V?1:0}equals(b){if(b.type===this.type){const S=this.regexp?this.regexp.source:"",V=b.regexp?b.regexp.source:"";return this.key===b.key&&S===V}return!1}substituteConstants(){return this}evaluate(b){let S=b.getValue(this.key);return this.regexp?this.regexp.test(S):!1}serialize(){const b=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${b}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=De.create(this)),this.negated}}class De{constructor(b){this._actual=b,this.type=8}static create(b){return new De(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function he(re){let b=null;for(let S=0,V=re.length;S<V;S++){const ve=re[S].substituteConstants();if(re[S]!==ve&&b===null){b=[];for(let He=0;He<S;He++)b[He]=re[He]}b!==null&&(b[S]=ve)}return b===null?re:b}class Me{constructor(b,S){this.expr=b,this.negated=S,this.type=6}static create(b,S){return Me._normalizeArr(b,S)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let S=0,V=this.expr.length;S<V;S++){const ve=l(this.expr[S],b.expr[S]);if(ve!==0)return ve}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let S=0,V=this.expr.length;S<V;S++)if(!this.expr[S].equals(b.expr[S]))return!1;return!0}return!1}substituteConstants(){const b=he(this.expr);return b===this.expr?this:Me.create(b,this.negated)}evaluate(b){for(let S=0,V=this.expr.length;S<V;S++)if(!this.expr[S].evaluate(b))return!1;return!0}static _normalizeArr(b,S){const V=[];let ve=!1;for(const He of b)if(He){if(He.type===1){ve=!0;continue}if(He.type===0)return H.INSTANCE;if(He.type===6){V.push(...He.expr);continue}V.push(He)}if(V.length===0&&ve)return F.INSTANCE;if(V.length!==0){if(V.length===1)return V[0];V.sort(l);for(let He=1;He<V.length;He++)V[He-1].equals(V[He])&&(V.splice(He,1),He--);if(V.length===1)return V[0];for(;V.length>1;){const He=V[V.length-1];if(He.type!==9)break;V.pop();const st=V.pop(),tt=V.length===0,Xe=Fe.create(He.expr.map(xt=>Me.create([xt,st],null)),null,tt);Xe&&(V.push(Xe),V.sort(l))}return V.length===1?V[0]:new Me(V,S)}}serialize(){return this.expr.map(b=>b.serialize()).join(" && ")}keys(){const b=[];for(let S of this.expr)b.push(...S.keys());return b}negate(){if(!this.negated){const b=[];for(let S of this.expr)b.push(S.negate());this.negated=Fe.create(b,this,!0)}return this.negated}}class Fe{constructor(b,S){this.expr=b,this.negated=S,this.type=9}static create(b,S,V){return Fe._normalizeArr(b,S,V)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let S=0,V=this.expr.length;S<V;S++){const ve=l(this.expr[S],b.expr[S]);if(ve!==0)return ve}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let S=0,V=this.expr.length;S<V;S++)if(!this.expr[S].equals(b.expr[S]))return!1;return!0}return!1}substituteConstants(){const b=he(this.expr);return b===this.expr?this:Fe.create(b,this.negated,!1)}evaluate(b){for(let S=0,V=this.expr.length;S<V;S++)if(this.expr[S].evaluate(b))return!0;return!1}static _normalizeArr(b,S,V){let ve=[],He=!1;if(b){for(let st=0,tt=b.length;st<tt;st++){const Xe=b[st];if(Xe){if(Xe.type===0){He=!0;continue}if(Xe.type===1)return F.INSTANCE;if(Xe.type===9){ve=ve.concat(Xe.expr);continue}ve.push(Xe)}}if(ve.length===0&&He)return H.INSTANCE;ve.sort(l)}if(ve.length!==0){if(ve.length===1)return ve[0];for(let st=1;st<ve.length;st++)ve[st-1].equals(ve[st])&&(ve.splice(st,1),st--);if(ve.length===1)return ve[0];if(V){for(let st=0;st<ve.length;st++)for(let tt=st+1;tt<ve.length;tt++)ne(ve[st],ve[tt])&&(ve.splice(tt,1),tt--);if(ve.length===1)return ve[0]}return new Fe(ve,S)}}serialize(){return this.expr.map(b=>b.serialize()).join(" || ")}keys(){const b=[];for(let S of this.expr)b.push(...S.keys());return b}negate(){if(!this.negated){let b=[];for(let S of this.expr)b.push(S.negate());for(;b.length>1;){const S=b.shift(),V=b.shift(),ve=[];for(const st of oe(S))for(const tt of oe(V))ve.push(Me.create([st,tt],null));const He=b.length===0;b.unshift(Fe.create(ve,null,He))}this.negated=b[0]}return this.negated}}class ke extends E{constructor(b,S,V){super(b,null),this._defaultValue=S,typeof V=="object"?ke._info.push(Object.assign(Object.assign({},V),{key:b})):V!==!0&&ke._info.push({key:b,description:V,type:S!=null?typeof S:void 0})}static all(){return ke._info.values()}bindTo(b){return b.createKey(this.key,this._defaultValue)}getValue(b){return b.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(b){return x.create(this.key,b)}}ke._info=[];const ct=(0,Re.yh)("contextKeyService"),ae="setContext";function j(re,b){return re<b?-1:re>b?1:0}function ee(re,b,S,V){return re<S?-1:re>S?1:b<V?-1:b>V?1:0}function ne(re,b){if(b.type===6&&re.type!==9&&re.type!==6){for(const ve of b.expr)if(re.equals(ve))return!0}const S=re.negate(),V=oe(S).concat(oe(b));V.sort(l);for(let ve=0;ve<V.length;ve++){const st=V[ve].negate();for(let tt=ve+1;tt<V.length;tt++){const Xe=V[tt];if(st.equals(Xe))return!0}}return!1}function oe(re){return re.type===9?re.expr:[re]}},16925:function(Jt,ot,B){"use strict";B.d(ot,{I8:function(){return I},TG:function(){return be},jt:function(){return Z},yh:function(){return _e}});var I;(function(v){v.serviceIds=new Map,v.DI_TARGET="$di$target",v.DI_DEPENDENCIES="$di$dependencies";function me(ie){return ie[v.DI_DEPENDENCIES]||[]}v.getServiceDependencies=me})(I||(I={}));const be=_e("instantiationService");function Re(v,me,ie,l){me[I.DI_TARGET]===me?me[I.DI_DEPENDENCIES].push({id:v,index:ie,optional:l}):(me[I.DI_DEPENDENCIES]=[{id:v,index:ie,optional:l}],me[I.DI_TARGET]=me)}function _e(v){if(I.serviceIds.has(v))return I.serviceIds.get(v);const me=function(ie,l,H){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Re(me,ie,H,!1)};return me.toString=()=>v,I.serviceIds.set(v,me),me}function Z(v){return function(me,ie,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Re(v,me,l,!0)}}},44650:function(Jt,ot,B){"use strict";B.d(ot,{B:function(){return _e}});var I=B(76068),be=B(72999);class Re{constructor(){this.data=new Map}add(v,me){I.ok(be.HD(v)),I.ok(be.Kn(me)),I.ok(!this.data.has(v),"There is already an extension with this id"),this.data.set(v,me)}as(v){return this.data.get(v)||null}}const _e=new Re},66213:function(Jt,ot,B){"use strict";B.d(ot,{e:function(){return I}});var I;(function(be){be.DARK="dark",be.LIGHT="light",be.HIGH_CONTRAST="hc"})(I||(I={}))},49055:function(Jt,ot,B){"use strict";B.d(ot,{EN:function(){return l},IP:function(){return E},Ic:function(){return L},XE:function(){return me},bB:function(){return q},kS:function(){return H},m6:function(){return F}});var I=B(52615),be=B(4348),Re=B(69323),_e=B(16925),Z=B(44650),v=B(66213);const me=(0,_e.yh)("themeService");var ie;(function(Y){function $(A){return A&&typeof A=="object"&&typeof A.id=="string"}Y.isThemeColor=$})(ie||(ie={}));function l(Y){return{id:Y}}var H;(function(Y){function $(De){return De&&typeof De=="object"&&typeof De.id=="string"&&(typeof De.color=="undefined"||ie.isThemeColor(De.color))}Y.isThemeIcon=$;const A=new RegExp(`^\\$\\((${I.dT.iconNameExpression}(?:${I.dT.iconModifierExpression})?)\\)$`);function M(De){const he=A.exec(De);if(!he)return;let[,Me]=he;return{id:Me}}Y.fromString=M;function O(De,he){let Me=De.id;const Fe=Me.lastIndexOf("~");return Fe!==-1&&(Me=Me.substring(0,Fe)),he&&(Me=`${Me}~${he}`),{id:Me}}Y.modify=O;function W(De,he){var Me,Fe;return De.id===he.id&&((Me=De.color)===null||Me===void 0?void 0:Me.id)===((Fe=he.color)===null||Fe===void 0?void 0:Fe.id)}Y.isEqual=W;function ge(De,he){return{id:De.id,color:he?l(he):void 0}}Y.asThemeIcon=ge,Y.asClassNameArray=I.dT.asClassNameArray,Y.asClassName=I.dT.asClassName,Y.asCSSSelector=I.dT.asCSSSelector})(H||(H={}));function F(Y){switch(Y){case v.e.DARK:return"vs-dark";case v.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const E={ThemingContribution:"base.contributions.theming"};class x{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new be.Q5}onColorThemeChange($){return this.themingParticipants.push($),this.onThemingParticipantAddedEmitter.fire($),(0,Re.OF)(()=>{const A=this.themingParticipants.indexOf($);this.themingParticipants.splice(A,1)})}getThemingParticipants(){return this.themingParticipants}}let T=new x;Z.B.add(E.ThemingContribution,T);function L(Y){return T.onColorThemeChange(Y)}class q extends Re.JT{constructor($){super(),this.themeService=$,this.theme=$.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(A=>this.onThemeChange(A)))}onThemeChange($){this.theme=$,this.updateStyles()}updateStyles(){}}},16632:function(Jt,ot,B){"use strict";var I=B(60499),be=B(85899),Re=B(18642),_e=B(72190),Z=B(42244),v=B(92310),me=B.n(v),ie=B(18929),l=B(59301),H=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],F=(0,l.forwardRef)(function(E,x){var T=E.prefixCls,L=T===void 0?"rc-checkbox":T,q=E.className,Y=E.style,$=E.checked,A=E.disabled,M=E.defaultChecked,O=M===void 0?!1:M,W=E.type,ge=W===void 0?"checkbox":W,De=E.title,he=E.onChange,Me=(0,Z.Z)(E,H),Fe=(0,l.useRef)(null),ke=(0,l.useRef)(null),ct=(0,ie.Z)(O,{value:$}),ae=(0,_e.Z)(ct,2),j=ae[0],ee=ae[1];(0,l.useImperativeHandle)(x,function(){return{focus:function(b){var S;(S=Fe.current)===null||S===void 0||S.focus(b)},blur:function(){var b;(b=Fe.current)===null||b===void 0||b.blur()},input:Fe.current,nativeElement:ke.current}});var ne=me()(L,q,(0,Re.Z)((0,Re.Z)({},"".concat(L,"-checked"),j),"".concat(L,"-disabled"),A)),oe=function(b){A||("checked"in E||ee(b.target.checked),he==null||he({target:(0,be.Z)((0,be.Z)({},E),{},{type:ge,checked:b.target.checked}),stopPropagation:function(){b.stopPropagation()},preventDefault:function(){b.preventDefault()},nativeEvent:b.nativeEvent}))};return l.createElement("span",{className:ne,title:De,style:Y,ref:ke},l.createElement("input",(0,I.Z)({},Me,{className:"".concat(L,"-input"),ref:Fe,onChange:oe,disabled:A,checked:!!j,type:ge})),l.createElement("span",{className:"".concat(L,"-inner")}))});ot.Z=F},96478:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return De}});var I=B(60499),be=B(18642),Re=B(72190),_e=B(42244),Z=B(68196),v=B(92310),me=B.n(v),ie=B(8654),l=B(59301),H=B(10228),F=B(16089),E=H.Z.ESC,x=H.Z.TAB;function T(he){var Me=he.visible,Fe=he.triggerRef,ke=he.onVisibleChange,ct=he.autoFocus,ae=he.overlayRef,j=l.useRef(!1),ee=function(){if(Me){var b,S;(b=Fe.current)===null||b===void 0||(S=b.focus)===null||S===void 0||S.call(b),ke==null||ke(!1)}},ne=function(){var b;return(b=ae.current)!==null&&b!==void 0&&b.focus?(ae.current.focus(),j.current=!0,!0):!1},oe=function(b){switch(b.keyCode){case E:ee();break;case x:{var S=!1;j.current||(S=ne()),S?b.preventDefault():ee();break}}};l.useEffect(function(){return Me?(window.addEventListener("keydown",oe),ct&&(0,F.Z)(ne,3),function(){window.removeEventListener("keydown",oe),j.current=!1}):function(){j.current=!1}},[Me])}var L=(0,l.forwardRef)(function(he,Me){var Fe=he.overlay,ke=he.arrow,ct=he.prefixCls,ae=(0,l.useMemo)(function(){var ee;return typeof Fe=="function"?ee=Fe():ee=Fe,ee},[Fe]),j=(0,ie.sQ)(Me,(0,ie.C4)(ae));return l.createElement(l.Fragment,null,ke&&l.createElement("div",{className:"".concat(ct,"-arrow")}),l.cloneElement(ae,{ref:(0,ie.Yr)(ae)?j:void 0}))}),q=L,Y={adjustX:1,adjustY:1},$=[0,0],A={topLeft:{points:["bl","tl"],overflow:Y,offset:[0,-4],targetOffset:$},top:{points:["bc","tc"],overflow:Y,offset:[0,-4],targetOffset:$},topRight:{points:["br","tr"],overflow:Y,offset:[0,-4],targetOffset:$},bottomLeft:{points:["tl","bl"],overflow:Y,offset:[0,4],targetOffset:$},bottom:{points:["tc","bc"],overflow:Y,offset:[0,4],targetOffset:$},bottomRight:{points:["tr","br"],overflow:Y,offset:[0,4],targetOffset:$}},M=A,O=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function W(he,Me){var Fe,ke=he.arrow,ct=ke===void 0?!1:ke,ae=he.prefixCls,j=ae===void 0?"rc-dropdown":ae,ee=he.transitionName,ne=he.animation,oe=he.align,re=he.placement,b=re===void 0?"bottomLeft":re,S=he.placements,V=S===void 0?M:S,ve=he.getPopupContainer,He=he.showAction,st=he.hideAction,tt=he.overlayClassName,Xe=he.overlayStyle,xt=he.visible,et=he.trigger,Ue=et===void 0?["hover"]:et,Yt=he.autoFocus,Nt=he.overlay,Sr=he.children,wt=he.onVisibleChange,Er=(0,_e.Z)(he,O),ze=l.useState(),Oe=(0,Re.Z)(ze,2),Se=Oe[0],qe=Oe[1],ht="visible"in he?xt:Se,pt=l.useRef(null),Q=l.useRef(null),we=l.useRef(null);l.useImperativeHandle(Me,function(){return pt.current});var $e=function(bt){qe(bt),wt==null||wt(bt)};T({visible:ht,triggerRef:we,onVisibleChange:$e,autoFocus:Yt,overlayRef:Q});var Be=function(bt){var At=he.onOverlayClick;qe(!1),At&&At(bt)},nt=function(){return l.createElement(q,{ref:Q,overlay:Nt,prefixCls:j,arrow:ct})},gt=function(){return typeof Nt=="function"?nt:nt()},Ot=function(){var bt=he.minOverlayWidthMatchTrigger,At=he.alignPoint;return"minOverlayWidthMatchTrigger"in he?bt:!At},yt=function(){var bt=he.openClassName;return bt!==void 0?bt:"".concat(j,"-open")},Dt=l.cloneElement(Sr,{className:me()((Fe=Sr.props)===null||Fe===void 0?void 0:Fe.className,ht&&yt()),ref:(0,ie.Yr)(Sr)?(0,ie.sQ)(we,(0,ie.C4)(Sr)):void 0}),vt=st;return!vt&&Ue.indexOf("contextMenu")!==-1&&(vt=["click"]),l.createElement(Z.Z,(0,I.Z)({builtinPlacements:V},Er,{prefixCls:j,ref:pt,popupClassName:me()(tt,(0,be.Z)({},"".concat(j,"-show-arrow"),ct)),popupStyle:Xe,action:Ue,showAction:He,hideAction:vt,popupPlacement:b,popupAlign:oe,popupTransitionName:ee,popupAnimation:ne,popupVisible:ht,stretch:Ot()?"minWidth":"",popup:gt(),onPopupVisibleChange:$e,onPopupClick:Be,getPopupContainer:ve}),Dt)}var ge=l.forwardRef(W),De=ge},66003:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return me}});var I=B(42244),be=B(85899),Re=B(43749),_e=B(59301),Z=["show"];function v(ie,l){if(!l.max)return!0;var H=l.strategy(ie);return H<=l.max}function me(ie,l){return _e.useMemo(function(){var H={};l&&(H.show=(0,Re.Z)(l)==="object"&&l.formatter?l.formatter:!!l),H=(0,be.Z)((0,be.Z)({},H),ie);var F=H,E=F.show,x=(0,I.Z)(F,Z);return(0,be.Z)((0,be.Z)({},x),{},{show:!!E,showFormatter:typeof E=="function"?E:void 0,strategy:x.strategy||function(T){return T.length}})},[ie,l])}},36901:function(Jt,ot,B){"use strict";B.r(ot),B.d(ot,{BaseInput:function(){return H},default:function(){return M}});var I=B(85899),be=B(60499),Re=B(18642),_e=B(43749),Z=B(92310),v=B.n(Z),me=B(59301),ie=B(30292),l=me.forwardRef(function(O,W){var ge,De,he,Me=O.inputElement,Fe=O.children,ke=O.prefixCls,ct=O.prefix,ae=O.suffix,j=O.addonBefore,ee=O.addonAfter,ne=O.className,oe=O.style,re=O.disabled,b=O.readOnly,S=O.focused,V=O.triggerFocus,ve=O.allowClear,He=O.value,st=O.handleReset,tt=O.hidden,Xe=O.classes,xt=O.classNames,et=O.dataAttrs,Ue=O.styles,Yt=O.components,Nt=O.onClear,Sr=Fe!=null?Fe:Me,wt=(Yt==null?void 0:Yt.affixWrapper)||"span",Er=(Yt==null?void 0:Yt.groupWrapper)||"span",ze=(Yt==null?void 0:Yt.wrapper)||"span",Oe=(Yt==null?void 0:Yt.groupAddon)||"span",Se=(0,me.useRef)(null),qe=function(er){var qt;(qt=Se.current)!==null&&qt!==void 0&&qt.contains(er.target)&&(V==null||V())},ht=(0,ie.X3)(O),pt=(0,me.cloneElement)(Sr,{value:He,className:v()((ge=Sr.props)===null||ge===void 0?void 0:ge.className,!ht&&(xt==null?void 0:xt.variant))||null}),Q=(0,me.useRef)(null);if(me.useImperativeHandle(W,function(){return{nativeElement:Q.current||Se.current}}),ht){var we=null;if(ve){var $e=!re&&!b&&He,Be="".concat(ke,"-clear-icon"),nt=(0,_e.Z)(ve)==="object"&&ve!==null&&ve!==void 0&&ve.clearIcon?ve.clearIcon:"\u2716";we=me.createElement("button",{type:"button",tabIndex:-1,onClick:function(er){st==null||st(er),Nt==null||Nt()},onMouseDown:function(er){return er.preventDefault()},className:v()(Be,(0,Re.Z)((0,Re.Z)({},"".concat(Be,"-hidden"),!$e),"".concat(Be,"-has-suffix"),!!ae))},nt)}var gt="".concat(ke,"-affix-wrapper"),Ot=v()(gt,(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(ke,"-disabled"),re),"".concat(gt,"-disabled"),re),"".concat(gt,"-focused"),S),"".concat(gt,"-readonly"),b),"".concat(gt,"-input-with-clear-btn"),ae&&ve&&He),Xe==null?void 0:Xe.affixWrapper,xt==null?void 0:xt.affixWrapper,xt==null?void 0:xt.variant),yt=(ae||ve)&&me.createElement("span",{className:v()("".concat(ke,"-suffix"),xt==null?void 0:xt.suffix),style:Ue==null?void 0:Ue.suffix},we,ae);pt=me.createElement(wt,(0,be.Z)({className:Ot,style:Ue==null?void 0:Ue.affixWrapper,onClick:qe},et==null?void 0:et.affixWrapper,{ref:Se}),ct&&me.createElement("span",{className:v()("".concat(ke,"-prefix"),xt==null?void 0:xt.prefix),style:Ue==null?void 0:Ue.prefix},ct),pt,yt)}if((0,ie.He)(O)){var Dt="".concat(ke,"-group"),vt="".concat(Dt,"-addon"),Gt="".concat(Dt,"-wrapper"),bt=v()("".concat(ke,"-wrapper"),Dt,Xe==null?void 0:Xe.wrapper,xt==null?void 0:xt.wrapper),At=v()(Gt,(0,Re.Z)({},"".concat(Gt,"-disabled"),re),Xe==null?void 0:Xe.group,xt==null?void 0:xt.groupWrapper);pt=me.createElement(Er,{className:At,ref:Q},me.createElement(ze,{className:bt},j&&me.createElement(Oe,{className:vt},j),pt,ee&&me.createElement(Oe,{className:vt},ee)))}return me.cloneElement(pt,{className:v()((De=pt.props)===null||De===void 0?void 0:De.className,ne)||null,style:(0,I.Z)((0,I.Z)({},(he=pt.props)===null||he===void 0?void 0:he.style),oe),hidden:tt})}),H=l,F=B(77654),E=B(72190),x=B(42244),T=B(18929),L=B(2738),q=B(66003),Y=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],$=(0,me.forwardRef)(function(O,W){var ge=O.autoComplete,De=O.onChange,he=O.onFocus,Me=O.onBlur,Fe=O.onPressEnter,ke=O.onKeyDown,ct=O.onKeyUp,ae=O.prefixCls,j=ae===void 0?"rc-input":ae,ee=O.disabled,ne=O.htmlSize,oe=O.className,re=O.maxLength,b=O.suffix,S=O.showCount,V=O.count,ve=O.type,He=ve===void 0?"text":ve,st=O.classes,tt=O.classNames,Xe=O.styles,xt=O.onCompositionStart,et=O.onCompositionEnd,Ue=(0,x.Z)(O,Y),Yt=(0,me.useState)(!1),Nt=(0,E.Z)(Yt,2),Sr=Nt[0],wt=Nt[1],Er=(0,me.useRef)(!1),ze=(0,me.useRef)(!1),Oe=(0,me.useRef)(null),Se=(0,me.useRef)(null),qe=function(Zt){Oe.current&&(0,ie.nH)(Oe.current,Zt)},ht=(0,T.Z)(O.defaultValue,{value:O.value}),pt=(0,E.Z)(ht,2),Q=pt[0],we=pt[1],$e=Q==null?"":String(Q),Be=(0,me.useState)(null),nt=(0,E.Z)(Be,2),gt=nt[0],Ot=nt[1],yt=(0,q.Z)(V,S),Dt=yt.max||re,vt=yt.strategy($e),Gt=!!Dt&&vt>Dt;(0,me.useImperativeHandle)(W,function(){var te;return{focus:qe,blur:function(){var Ae;(Ae=Oe.current)===null||Ae===void 0||Ae.blur()},setSelectionRange:function(Ae,Te,Le){var K;(K=Oe.current)===null||K===void 0||K.setSelectionRange(Ae,Te,Le)},select:function(){var Ae;(Ae=Oe.current)===null||Ae===void 0||Ae.select()},input:Oe.current,nativeElement:((te=Se.current)===null||te===void 0?void 0:te.nativeElement)||Oe.current}}),(0,me.useEffect)(function(){ze.current&&(ze.current=!1),wt(function(te){return te&&ee?!1:te})},[ee]);var bt=function(Zt,Ae,Te){var Le=Ae;if(!Er.current&&yt.exceedFormatter&&yt.max&&yt.strategy(Ae)>yt.max){if(Le=yt.exceedFormatter(Ae,{max:yt.max}),Ae!==Le){var K,J;Ot([((K=Oe.current)===null||K===void 0?void 0:K.selectionStart)||0,((J=Oe.current)===null||J===void 0?void 0:J.selectionEnd)||0])}}else if(Te.source==="compositionEnd")return;we(Le),Oe.current&&(0,ie.rJ)(Oe.current,Zt,De,Le)};(0,me.useEffect)(function(){if(gt){var te;(te=Oe.current)===null||te===void 0||te.setSelectionRange.apply(te,(0,F.Z)(gt))}},[gt]);var At=function(Zt){bt(Zt,Zt.target.value,{source:"change"})},kt=function(Zt){Er.current=!1,bt(Zt,Zt.currentTarget.value,{source:"compositionEnd"}),et==null||et(Zt)},er=function(Zt){Fe&&Zt.key==="Enter"&&!ze.current&&(ze.current=!0,Fe(Zt)),ke==null||ke(Zt)},qt=function(Zt){Zt.key==="Enter"&&(ze.current=!1),ct==null||ct(Zt)},Pt=function(Zt){wt(!0),he==null||he(Zt)},ir=function(Zt){ze.current&&(ze.current=!1),wt(!1),Me==null||Me(Zt)},y=function(Zt){we(""),qe(),Oe.current&&(0,ie.rJ)(Oe.current,Zt,De)},R=Gt&&"".concat(j,"-out-of-range"),rt=function(){var Zt=(0,L.Z)(O,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return me.createElement("input",(0,be.Z)({autoComplete:ge},Zt,{onChange:At,onFocus:Pt,onBlur:ir,onKeyDown:er,onKeyUp:qt,className:v()(j,(0,Re.Z)({},"".concat(j,"-disabled"),ee),tt==null?void 0:tt.input),style:Xe==null?void 0:Xe.input,ref:Oe,size:ne,type:He,onCompositionStart:function(Te){Er.current=!0,xt==null||xt(Te)},onCompositionEnd:kt}))},U=function(){var Zt=Number(Dt)>0;if(b||yt.show){var Ae=yt.showFormatter?yt.showFormatter({value:$e,count:vt,maxLength:Dt}):"".concat(vt).concat(Zt?" / ".concat(Dt):"");return me.createElement(me.Fragment,null,yt.show&&me.createElement("span",{className:v()("".concat(j,"-show-count-suffix"),(0,Re.Z)({},"".concat(j,"-show-count-has-suffix"),!!b),tt==null?void 0:tt.count),style:(0,I.Z)({},Xe==null?void 0:Xe.count)},Ae),b)}return null};return me.createElement(H,(0,be.Z)({},Ue,{prefixCls:j,className:v()(oe,R),handleReset:y,value:$e,focused:Sr,triggerFocus:qe,suffix:U(),disabled:ee,classes:st,classNames:tt,styles:Xe}),rt())}),A=$,M=A},30292:function(Jt,ot,B){"use strict";B.d(ot,{He:function(){return I},X3:function(){return be},nH:function(){return Z},rJ:function(){return _e}});function I(v){return!!(v.addonBefore||v.addonAfter)}function be(v){return!!(v.prefix||v.suffix||v.allowClear)}function Re(v,me,ie){var l=me.cloneNode(!0),H=Object.create(v,{target:{value:l},currentTarget:{value:l}});return l.value=ie,typeof me.selectionStart=="number"&&typeof me.selectionEnd=="number"&&(l.selectionStart=me.selectionStart,l.selectionEnd=me.selectionEnd),l.setSelectionRange=function(){me.setSelectionRange.apply(me,arguments)},H}function _e(v,me,ie,l){if(ie){var H=me;if(me.type==="click"){H=Re(me,v,""),ie(H);return}if(v.type!=="file"&&l!==void 0){H=Re(me,v,l),ie(H);return}ie(H)}}function Z(v,me){if(v){v.focus(me);var ie=me||{},l=ie.cursor;if(l){var H=v.value.length;switch(l){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(H,H);break;default:v.setSelectionRange(0,H)}}}}},28321:function(Jt,ot,B){"use strict";B.d(ot,{iz:function(){return _t},ck:function(){return Le},BW:function(){return Wt},sN:function(){return Le},Wd:function(){return ce},ZP:function(){return sn},Xl:function(){return Fe}});var I=B(60499),be=B(18642),Re=B(85899),_e=B(77654),Z=B(72190),v=B(42244),me=B(92310),ie=B.n(me),l=B(83836),H=B(18929),F=B(13697),E=B(48736),x=B(59301),T=B(4676),L=x.createContext(null);function q(Ie,Ge){return Ie===void 0?null:"".concat(Ie,"-").concat(Ge)}function Y(Ie){var Ge=x.useContext(L);return q(Ge,Ie)}var $=B(80547),A=["children","locked"],M=x.createContext(null);function O(Ie,Ge){var lt=(0,Re.Z)({},Ie);return Object.keys(Ge).forEach(function(Ze){var Je=Ge[Ze];Je!==void 0&&(lt[Ze]=Je)}),lt}function W(Ie){var Ge=Ie.children,lt=Ie.locked,Ze=(0,v.Z)(Ie,A),Je=x.useContext(M),ut=(0,$.Z)(function(){return O(Je,Ze)},[Je,Ze],function(St,It){return!lt&&(St[0]!==It[0]||!(0,F.Z)(St[1],It[1],!0))});return x.createElement(M.Provider,{value:ut},Ge)}var ge=[],De=x.createContext(null);function he(){return x.useContext(De)}var Me=x.createContext(ge);function Fe(Ie){var Ge=x.useContext(Me);return x.useMemo(function(){return Ie!==void 0?[].concat((0,_e.Z)(Ge),[Ie]):Ge},[Ge,Ie])}var ke=x.createContext(null),ct=x.createContext({}),ae=ct,j=B(29194);function ee(Ie){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,j.Z)(Ie)){var lt=Ie.nodeName.toLowerCase(),Ze=["input","select","textarea","button"].includes(lt)||Ie.isContentEditable||lt==="a"&&!!Ie.getAttribute("href"),Je=Ie.getAttribute("tabindex"),ut=Number(Je),St=null;return Je&&!Number.isNaN(ut)?St=ut:Ze&&St===null&&(St=0),Ze&&Ie.disabled&&(St=null),St!==null&&(St>=0||Ge&&St<0)}return!1}function ne(Ie){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=(0,_e.Z)(Ie.querySelectorAll("*")).filter(function(Ze){return ee(Ze,Ge)});return ee(Ie,Ge)&<.unshift(Ie),lt}var oe=null;function re(){oe=document.activeElement}function b(){oe=null}function S(){if(oe)try{oe.focus()}catch(Ie){}}function V(Ie,Ge){if(Ge.keyCode===9){var lt=ne(Ie),Ze=lt[Ge.shiftKey?0:lt.length-1],Je=Ze===document.activeElement||Ie===document.activeElement;if(Je){var ut=lt[Ge.shiftKey?lt.length-1:0];ut.focus(),Ge.preventDefault()}}}var ve=B(10228),He=B(16089),st=ve.Z.LEFT,tt=ve.Z.RIGHT,Xe=ve.Z.UP,xt=ve.Z.DOWN,et=ve.Z.ENTER,Ue=ve.Z.ESC,Yt=ve.Z.HOME,Nt=ve.Z.END,Sr=[Xe,xt,st,tt];function wt(Ie,Ge,lt,Ze){var Je,ut="prev",St="next",It="children",Qt="parent";if(Ie==="inline"&&Ze===et)return{inlineTrigger:!0};var tr=(0,be.Z)((0,be.Z)({},Xe,ut),xt,St),cr=(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},st,lt?St:ut),tt,lt?ut:St),xt,It),et,It),Vt=(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},Xe,ut),xt,St),et,It),Ue,Qt),st,lt?It:Qt),tt,lt?Qt:It),Ft={inline:tr,horizontal:cr,vertical:Vt,inlineSub:tr,horizontalSub:Vt,verticalSub:Vt},rr=(Je=Ft["".concat(Ie).concat(Ge?"":"Sub")])===null||Je===void 0?void 0:Je[Ze];switch(rr){case ut:return{offset:-1,sibling:!0};case St:return{offset:1,sibling:!0};case Qt:return{offset:-1,sibling:!1};case It:return{offset:1,sibling:!1};default:return null}}function Er(Ie){for(var Ge=Ie;Ge;){if(Ge.getAttribute("data-menu-list"))return Ge;Ge=Ge.parentElement}return null}function ze(Ie,Ge){for(var lt=Ie||document.activeElement;lt;){if(Ge.has(lt))return lt;lt=lt.parentElement}return null}function Oe(Ie,Ge){var lt=ne(Ie,!0);return lt.filter(function(Ze){return Ge.has(Ze)})}function Se(Ie,Ge,lt){var Ze=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ie)return null;var Je=Oe(Ie,Ge),ut=Je.length,St=Je.findIndex(function(It){return lt===It});return Ze<0?St===-1?St=ut-1:St-=1:Ze>0&&(St+=1),St=(St+ut)%ut,Je[St]}var qe=function(Ge,lt){var Ze=new Set,Je=new Map,ut=new Map;return Ge.forEach(function(St){var It=document.querySelector("[data-menu-id='".concat(q(lt,St),"']"));It&&(Ze.add(It),ut.set(It,St),Je.set(St,It))}),{elements:Ze,key2element:Je,element2key:ut}};function ht(Ie,Ge,lt,Ze,Je,ut,St,It,Qt,tr){var cr=x.useRef(),Vt=x.useRef();Vt.current=Ge;var Ft=function(){He.Z.cancel(cr.current)};return x.useEffect(function(){return function(){Ft()}},[]),function(rr){var $r=rr.which;if([].concat(Sr,[et,Ue,Yt,Nt]).includes($r)){var Ur=ut(),Ut=qe(Ur,Ze),yr=Ut,Vr=yr.elements,Ir=yr.key2element,Cr=yr.element2key,tn=Ir.get(Ge),pr=ze(tn,Vr),Lr=Cr.get(pr),rn=wt(Ie,St(Lr,!0).length===1,lt,$r);if(!rn&&$r!==Yt&&$r!==Nt)return;(Sr.includes($r)||[Yt,Nt].includes($r))&&rr.preventDefault();var Ve=function(gr){if(gr){var gn=gr,an=gr.querySelector("a");an!=null&&an.getAttribute("href")&&(gn=an);var on=Cr.get(gr);It(on),Ft(),cr.current=(0,He.Z)(function(){Vt.current===on&&gn.focus()})}};if([Yt,Nt].includes($r)||rn.sibling||!pr){var fr;!pr||Ie==="inline"?fr=Je.current:fr=Er(pr);var Gr,hn=Oe(fr,Vr);$r===Yt?Gr=hn[0]:$r===Nt?Gr=hn[hn.length-1]:Gr=Se(fr,Vr,pr,rn.offset),Ve(Gr)}else if(rn.inlineTrigger)Qt(Lr);else if(rn.offset>0)Qt(Lr,!0),Ft(),cr.current=(0,He.Z)(function(){Ut=qe(Ur,Ze);var br=pr.getAttribute("aria-controls"),gr=document.getElementById(br),gn=Se(gr,Ut.elements);Ve(gn)},5);else if(rn.offset<0){var Tn=St(Lr,!0),bn=Tn[Tn.length-2],yn=Ir.get(bn);Qt(bn,!1),Ve(yn)}}tr==null||tr(rr)}}function pt(Ie){Promise.resolve().then(Ie)}var Q="__RC_UTIL_PATH_SPLIT__",we=function(Ge){return Ge.join(Q)},$e=function(Ge){return Ge.split(Q)},Be="rc-menu-more";function nt(){var Ie=x.useState({}),Ge=(0,Z.Z)(Ie,2),lt=Ge[1],Ze=(0,x.useRef)(new Map),Je=(0,x.useRef)(new Map),ut=x.useState([]),St=(0,Z.Z)(ut,2),It=St[0],Qt=St[1],tr=(0,x.useRef)(0),cr=(0,x.useRef)(!1),Vt=function(){cr.current||lt({})},Ft=(0,x.useCallback)(function(Ir,Cr){var tn=we(Cr);Je.current.set(tn,Ir),Ze.current.set(Ir,tn),tr.current+=1;var pr=tr.current;pt(function(){pr===tr.current&&Vt()})},[]),rr=(0,x.useCallback)(function(Ir,Cr){var tn=we(Cr);Je.current.delete(tn),Ze.current.delete(Ir)},[]),$r=(0,x.useCallback)(function(Ir){Qt(Ir)},[]),Ur=(0,x.useCallback)(function(Ir,Cr){var tn=Ze.current.get(Ir)||"",pr=$e(tn);return Cr&&It.includes(pr[0])&&pr.unshift(Be),pr},[It]),Ut=(0,x.useCallback)(function(Ir,Cr){return Ir.filter(function(tn){return tn!==void 0}).some(function(tn){var pr=Ur(tn,!0);return pr.includes(Cr)})},[Ur]),yr=function(){var Cr=(0,_e.Z)(Ze.current.keys());return It.length&&Cr.push(Be),Cr},Vr=(0,x.useCallback)(function(Ir){var Cr="".concat(Ze.current.get(Ir)).concat(Q),tn=new Set;return(0,_e.Z)(Je.current.keys()).forEach(function(pr){pr.startsWith(Cr)&&tn.add(Je.current.get(pr))}),tn},[]);return x.useEffect(function(){return function(){cr.current=!0}},[]),{registerPath:Ft,unregisterPath:rr,refreshOverflowKeys:$r,isSubPathKey:Ut,getKeyPath:Ur,getKeys:yr,getSubPathKeys:Vr}}function gt(Ie){var Ge=x.useRef(Ie);Ge.current=Ie;var lt=x.useCallback(function(){for(var Ze,Je=arguments.length,ut=new Array(Je),St=0;St<Je;St++)ut[St]=arguments[St];return(Ze=Ge.current)===null||Ze===void 0?void 0:Ze.call.apply(Ze,[Ge].concat(ut))},[]);return Ie?lt:void 0}var Ot=Math.random().toFixed(5).toString().slice(2),yt=0;function Dt(Ie){var Ge=(0,H.Z)(Ie,{value:Ie}),lt=(0,Z.Z)(Ge,2),Ze=lt[0],Je=lt[1];return x.useEffect(function(){yt+=1;var ut="".concat(Ot,"-").concat(yt);Je("rc-menu-uuid-".concat(ut))},[]),Ze}var vt=B(38705),Gt=B(17212),bt=B(39153),At=B(55401),kt=B(2738),er=B(8654);function qt(Ie,Ge,lt,Ze){var Je=x.useContext(M),ut=Je.activeKey,St=Je.onActive,It=Je.onInactive,Qt={active:ut===Ie};return Ge||(Qt.onMouseEnter=function(tr){lt==null||lt({key:Ie,domEvent:tr}),St(Ie)},Qt.onMouseLeave=function(tr){Ze==null||Ze({key:Ie,domEvent:tr}),It(Ie)}),Qt}function Pt(Ie){var Ge=x.useContext(M),lt=Ge.mode,Ze=Ge.rtl,Je=Ge.inlineIndent;if(lt!=="inline")return null;var ut=Ie;return Ze?{paddingRight:ut*Je}:{paddingLeft:ut*Je}}function ir(Ie){var Ge=Ie.icon,lt=Ie.props,Ze=Ie.children,Je;return Ge===null||Ge===!1?null:(typeof Ge=="function"?Je=x.createElement(Ge,(0,Re.Z)({},lt)):typeof Ge!="boolean"&&(Je=Ge),Je||Ze||null)}var y=["item"];function R(Ie){var Ge=Ie.item,lt=(0,v.Z)(Ie,y);return Object.defineProperty(lt,"item",{get:function(){return(0,E.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ge}}),lt}var rt=["title","attribute","elementRef"],U=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],te=["active"],Zt=function(Ie){(0,bt.Z)(lt,Ie);var Ge=(0,At.Z)(lt);function lt(){return(0,vt.Z)(this,lt),Ge.apply(this,arguments)}return(0,Gt.Z)(lt,[{key:"render",value:function(){var Je=this.props,ut=Je.title,St=Je.attribute,It=Je.elementRef,Qt=(0,v.Z)(Je,rt),tr=(0,kt.Z)(Qt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,E.ZP)(!St,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),x.createElement(l.Z.Item,(0,I.Z)({},St,{title:typeof ut=="string"?ut:void 0},tr,{ref:It}))}}]),lt}(x.Component),Ae=x.forwardRef(function(Ie,Ge){var lt=Ie.style,Ze=Ie.className,Je=Ie.eventKey,ut=Ie.warnKey,St=Ie.disabled,It=Ie.itemIcon,Qt=Ie.children,tr=Ie.role,cr=Ie.onMouseEnter,Vt=Ie.onMouseLeave,Ft=Ie.onClick,rr=Ie.onKeyDown,$r=Ie.onFocus,Ur=(0,v.Z)(Ie,U),Ut=Y(Je),yr=x.useContext(M),Vr=yr.prefixCls,Ir=yr.onItemClick,Cr=yr.disabled,tn=yr.overflowDisabled,pr=yr.itemIcon,Lr=yr.selectedKeys,rn=yr.onActive,Ve=x.useContext(ae),fr=Ve._internalRenderMenuItem,Gr="".concat(Vr,"-item"),hn=x.useRef(),Tn=x.useRef(),bn=Cr||St,yn=(0,er.x1)(Ge,Tn),br=Fe(Je),gr=function(Un){return{key:Je,keyPath:(0,_e.Z)(br).reverse(),item:hn.current,domEvent:Un}},gn=It||pr,an=qt(Je,bn,cr,Vt),on=an.active,Ei=(0,v.Z)(an,te),ei=Lr.includes(Je),An=Pt(br.length),lr=function(Un){if(!bn){var Rn=gr(Un);Ft==null||Ft(R(Rn)),Ir(Rn)}},un=function(Un){if(rr==null||rr(Un),Un.which===ve.Z.ENTER){var Rn=gr(Un);Ft==null||Ft(R(Rn)),Ir(Rn)}},fn=function(Un){rn(Je),$r==null||$r(Un)},qn={};Ie.role==="option"&&(qn["aria-selected"]=ei);var ai=x.createElement(Zt,(0,I.Z)({ref:hn,elementRef:yn,role:tr===null?"none":tr||"menuitem",tabIndex:St?null:-1,"data-menu-id":tn&&Ut?null:Ut},(0,kt.Z)(Ur,["extra"]),Ei,qn,{component:"li","aria-disabled":St,style:(0,Re.Z)((0,Re.Z)({},An),lt),className:ie()(Gr,(0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(Gr,"-active"),on),"".concat(Gr,"-selected"),ei),"".concat(Gr,"-disabled"),bn),Ze),onClick:lr,onKeyDown:un,onFocus:fn}),Qt,x.createElement(ir,{props:(0,Re.Z)((0,Re.Z)({},Ie),{},{isSelected:ei}),icon:gn}));return fr&&(ai=fr(ai,Ie,{selected:ei})),ai});function Te(Ie,Ge){var lt=Ie.eventKey,Ze=he(),Je=Fe(lt);return x.useEffect(function(){if(Ze)return Ze.registerPath(lt,Je),function(){Ze.unregisterPath(lt,Je)}},[Je]),Ze?null:x.createElement(Ae,(0,I.Z)({},Ie,{ref:Ge}))}var Le=x.forwardRef(Te),K=["className","children"],J=function(Ge,lt){var Ze=Ge.className,Je=Ge.children,ut=(0,v.Z)(Ge,K),St=x.useContext(M),It=St.prefixCls,Qt=St.mode,tr=St.rtl;return x.createElement("ul",(0,I.Z)({className:ie()(It,tr&&"".concat(It,"-rtl"),"".concat(It,"-sub"),"".concat(It,"-").concat(Qt==="inline"?"inline":"vertical"),Ze),role:"menu"},ut,{"data-menu-list":!0,ref:lt}),Je)},Ee=x.forwardRef(J);Ee.displayName="SubMenuList";var Ce=Ee,N=B(11592);function Et(Ie,Ge){return(0,N.Z)(Ie).map(function(lt,Ze){if(x.isValidElement(lt)){var Je,ut,St=lt.key,It=(Je=(ut=lt.props)===null||ut===void 0?void 0:ut.eventKey)!==null&&Je!==void 0?Je:St,Qt=It==null;Qt&&(It="tmp_key-".concat([].concat((0,_e.Z)(Ge),[Ze]).join("-")));var tr={key:It,eventKey:It};return x.cloneElement(lt,tr)}return lt})}var de=B(68196),Bt={adjustX:1,adjustY:1},Xt={topLeft:{points:["bl","tl"],overflow:Bt},topRight:{points:["br","tr"],overflow:Bt},bottomLeft:{points:["tl","bl"],overflow:Bt},bottomRight:{points:["tr","br"],overflow:Bt},leftTop:{points:["tr","tl"],overflow:Bt},leftBottom:{points:["br","bl"],overflow:Bt},rightTop:{points:["tl","tr"],overflow:Bt},rightBottom:{points:["bl","br"],overflow:Bt}},Br={topLeft:{points:["bl","tl"],overflow:Bt},topRight:{points:["br","tr"],overflow:Bt},bottomLeft:{points:["tl","bl"],overflow:Bt},bottomRight:{points:["tr","br"],overflow:Bt},rightTop:{points:["tr","tl"],overflow:Bt},rightBottom:{points:["br","bl"],overflow:Bt},leftTop:{points:["tl","tr"],overflow:Bt},leftBottom:{points:["bl","br"],overflow:Bt}},cn=null;function jr(Ie,Ge,lt){if(Ge)return Ge;if(lt)return lt[Ie]||lt.other}var vr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function xn(Ie){var Ge=Ie.prefixCls,lt=Ie.visible,Ze=Ie.children,Je=Ie.popup,ut=Ie.popupStyle,St=Ie.popupClassName,It=Ie.popupOffset,Qt=Ie.disabled,tr=Ie.mode,cr=Ie.onVisibleChange,Vt=x.useContext(M),Ft=Vt.getPopupContainer,rr=Vt.rtl,$r=Vt.subMenuOpenDelay,Ur=Vt.subMenuCloseDelay,Ut=Vt.builtinPlacements,yr=Vt.triggerSubMenuAction,Vr=Vt.forceSubMenuRender,Ir=Vt.rootClassName,Cr=Vt.motion,tn=Vt.defaultMotions,pr=x.useState(!1),Lr=(0,Z.Z)(pr,2),rn=Lr[0],Ve=Lr[1],fr=rr?(0,Re.Z)((0,Re.Z)({},Br),Ut):(0,Re.Z)((0,Re.Z)({},Xt),Ut),Gr=vr[tr],hn=jr(tr,Cr,tn),Tn=x.useRef(hn);tr!=="inline"&&(Tn.current=hn);var bn=(0,Re.Z)((0,Re.Z)({},Tn.current),{},{leavedClassName:"".concat(Ge,"-hidden"),removeOnLeave:!1,motionAppear:!0}),yn=x.useRef();return x.useEffect(function(){return yn.current=(0,He.Z)(function(){Ve(lt)}),function(){He.Z.cancel(yn.current)}},[lt]),x.createElement(de.Z,{prefixCls:Ge,popupClassName:ie()("".concat(Ge,"-popup"),(0,be.Z)({},"".concat(Ge,"-rtl"),rr),St,Ir),stretch:tr==="horizontal"?"minWidth":null,getPopupContainer:Ft,builtinPlacements:fr,popupPlacement:Gr,popupVisible:rn,popup:Je,popupStyle:ut,popupAlign:It&&{offset:It},action:Qt?[]:[yr],mouseEnterDelay:$r,mouseLeaveDelay:Ur,onPopupVisibleChange:cr,forceRender:Vr,popupMotion:bn,fresh:!0},Ze)}var $n=B(77900);function Jr(Ie){var Ge=Ie.id,lt=Ie.open,Ze=Ie.keyPath,Je=Ie.children,ut="inline",St=x.useContext(M),It=St.prefixCls,Qt=St.forceSubMenuRender,tr=St.motion,cr=St.defaultMotions,Vt=St.mode,Ft=x.useRef(!1);Ft.current=Vt===ut;var rr=x.useState(!Ft.current),$r=(0,Z.Z)(rr,2),Ur=$r[0],Ut=$r[1],yr=Ft.current?lt:!1;x.useEffect(function(){Ft.current&&Ut(!1)},[Vt]);var Vr=(0,Re.Z)({},jr(ut,tr,cr));Ze.length>1&&(Vr.motionAppear=!1);var Ir=Vr.onVisibleChanged;return Vr.onVisibleChanged=function(Cr){return!Ft.current&&!Cr&&Ut(!0),Ir==null?void 0:Ir(Cr)},Ur?null:x.createElement(W,{mode:ut,locked:!Ft.current},x.createElement($n.default,(0,I.Z)({visible:yr},Vr,{forceRender:Qt,removeOnLeave:!1,leavedClassName:"".concat(It,"-hidden")}),function(Cr){var tn=Cr.className,pr=Cr.style;return x.createElement(Ce,{id:Ge,className:tn,style:pr},Je)}))}var en=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],$t=["active"],xr=x.forwardRef(function(Ie,Ge){var lt=Ie.style,Ze=Ie.className,Je=Ie.title,ut=Ie.eventKey,St=Ie.warnKey,It=Ie.disabled,Qt=Ie.internalPopupClose,tr=Ie.children,cr=Ie.itemIcon,Vt=Ie.expandIcon,Ft=Ie.popupClassName,rr=Ie.popupOffset,$r=Ie.popupStyle,Ur=Ie.onClick,Ut=Ie.onMouseEnter,yr=Ie.onMouseLeave,Vr=Ie.onTitleClick,Ir=Ie.onTitleMouseEnter,Cr=Ie.onTitleMouseLeave,tn=(0,v.Z)(Ie,en),pr=Y(ut),Lr=x.useContext(M),rn=Lr.prefixCls,Ve=Lr.mode,fr=Lr.openKeys,Gr=Lr.disabled,hn=Lr.overflowDisabled,Tn=Lr.activeKey,bn=Lr.selectedKeys,yn=Lr.itemIcon,br=Lr.expandIcon,gr=Lr.onItemClick,gn=Lr.onOpenChange,an=Lr.onActive,on=x.useContext(ae),Ei=on._internalRenderSubMenuItem,ei=x.useContext(ke),An=ei.isSubPathKey,lr=Fe(),un="".concat(rn,"-submenu"),fn=Gr||It,qn=x.useRef(),ai=x.useRef(),Ln=cr!=null?cr:yn,Un=Vt!=null?Vt:br,Rn=fr.includes(ut),ln=!hn&&Rn,fi=An(bn,ut),Hn=qt(ut,fn,Ir,Cr),ni=Hn.active,oi=(0,v.Z)(Hn,$t),ti=x.useState(!1),Hr=(0,Z.Z)(ti,2),di=Hr[0],pi=Hr[1],vi=function(Zn){fn||pi(Zn)},jn=function(Zn){vi(!0),Ut==null||Ut({key:ut,domEvent:Zn})},Or=function(Zn){vi(!1),yr==null||yr({key:ut,domEvent:Zn})},Oi=x.useMemo(function(){return ni||(Ve!=="inline"?di||An([Tn],ut):!1)},[Ve,ni,Tn,di,ut,An]),Mt=Pt(lr.length),Vn=function(Zn){fn||(Vr==null||Vr({key:ut,domEvent:Zn}),Ve==="inline"&&gn(ut,!Rn))},Ri=gt(function(kn){Ur==null||Ur(R(kn)),gr(kn)}),mi=function(Zn){Ve!=="inline"&&gn(ut,Zn)},Mn=function(){an(ut)},li=pr&&"".concat(pr,"-popup"),kr=x.useMemo(function(){return x.createElement(ir,{icon:Ve!=="horizontal"?Un:void 0,props:(0,Re.Z)((0,Re.Z)({},Ie),{},{isOpen:ln,isSubMenu:!0})},x.createElement("i",{className:"".concat(un,"-arrow")}))},[Ve,Un,Ie,ln,un]),Xn=x.createElement("div",(0,I.Z)({role:"menuitem",style:Mt,className:"".concat(un,"-title"),tabIndex:fn?null:-1,ref:qn,title:typeof Je=="string"?Je:null,"data-menu-id":hn&&pr?null:pr,"aria-expanded":ln,"aria-haspopup":!0,"aria-controls":li,"aria-disabled":fn,onClick:Vn,onFocus:Mn},oi),Je,kr),gi=x.useRef(Ve);if(Ve!=="inline"&&lr.length>1?gi.current="vertical":gi.current=Ve,!hn){var ri=gi.current;Xn=x.createElement(xn,{mode:ri,prefixCls:un,visible:!Qt&&ln&&Ve!=="inline",popupClassName:Ft,popupOffset:rr,popupStyle:$r,popup:x.createElement(W,{mode:ri==="horizontal"?"vertical":ri},x.createElement(Ce,{id:li,ref:ai},tr)),disabled:fn,onVisibleChange:mi},Xn)}var Dn=x.createElement(l.Z.Item,(0,I.Z)({ref:Ge,role:"none"},tn,{component:"li",style:lt,className:ie()(un,"".concat(un,"-").concat(Ve),Ze,(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(un,"-open"),ln),"".concat(un,"-active"),Oi),"".concat(un,"-selected"),fi),"".concat(un,"-disabled"),fn)),onMouseEnter:jn,onMouseLeave:Or}),Xn,!hn&&x.createElement(Jr,{id:li,open:ln,keyPath:lr},tr));return Ei&&(Dn=Ei(Dn,Ie,{selected:fi,active:Oi,open:ln,disabled:fn})),x.createElement(W,{onItemClick:Ri,mode:Ve==="horizontal"?"vertical":Ve,itemIcon:Ln,expandIcon:Un},Dn)}),se=x.forwardRef(function(Ie,Ge){var lt=Ie.eventKey,Ze=Ie.children,Je=Fe(lt),ut=Et(Ze,Je),St=he();x.useEffect(function(){if(St)return St.registerPath(lt,Je),function(){St.unregisterPath(lt,Je)}},[Je]);var It;return St?It=ut:It=x.createElement(xr,(0,I.Z)({ref:Ge},Ie),ut),x.createElement(Me.Provider,{value:Je},It)}),ce=se,ft=B(43749);function _t(Ie){var Ge=Ie.className,lt=Ie.style,Ze=x.useContext(M),Je=Ze.prefixCls,ut=he();return ut?null:x.createElement("li",{role:"separator",className:ie()("".concat(Je,"-item-divider"),Ge),style:lt})}var Ct=["className","title","eventKey","children"],Kt=x.forwardRef(function(Ie,Ge){var lt=Ie.className,Ze=Ie.title,Je=Ie.eventKey,ut=Ie.children,St=(0,v.Z)(Ie,Ct),It=x.useContext(M),Qt=It.prefixCls,tr="".concat(Qt,"-item-group");return x.createElement("li",(0,I.Z)({ref:Ge,role:"presentation"},St,{onClick:function(Vt){return Vt.stopPropagation()},className:ie()(tr,lt)}),x.createElement("div",{role:"presentation",className:"".concat(tr,"-title"),title:typeof Ze=="string"?Ze:void 0},Ze),x.createElement("ul",{role:"group",className:"".concat(tr,"-list")},ut))}),jt=x.forwardRef(function(Ie,Ge){var lt=Ie.eventKey,Ze=Ie.children,Je=Fe(lt),ut=Et(Ze,Je),St=he();return St?ut:x.createElement(Kt,(0,I.Z)({ref:Ge},(0,kt.Z)(Ie,["warnKey"])),ut)}),Wt=jt,Ht=["label","children","key","type","extra"];function hr(Ie,Ge,lt){var Ze=Ge.item,Je=Ge.group,ut=Ge.submenu,St=Ge.divider;return(Ie||[]).map(function(It,Qt){if(It&&(0,ft.Z)(It)==="object"){var tr=It,cr=tr.label,Vt=tr.children,Ft=tr.key,rr=tr.type,$r=tr.extra,Ur=(0,v.Z)(tr,Ht),Ut=Ft!=null?Ft:"tmp-".concat(Qt);return Vt||rr==="group"?rr==="group"?x.createElement(Je,(0,I.Z)({key:Ut},Ur,{title:cr}),hr(Vt,Ge,lt)):x.createElement(ut,(0,I.Z)({key:Ut},Ur,{title:cr}),hr(Vt,Ge,lt)):rr==="divider"?x.createElement(St,(0,I.Z)({key:Ut},Ur)):x.createElement(Ze,(0,I.Z)({key:Ut},Ur,{extra:$r}),cr,(!!$r||$r===0)&&x.createElement("span",{className:"".concat(lt,"-item-extra")},$r))}return null}).filter(function(It){return It})}function _r(Ie,Ge,lt,Ze,Je){var ut=Ie,St=(0,Re.Z)({divider:_t,item:Le,group:Wt,submenu:ce},Ze);return Ge&&(ut=hr(Ge,St,Je)),Et(ut,lt)}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"],Nr=[],Qr=x.forwardRef(function(Ie,Ge){var lt,Ze=Ie,Je=Ze.prefixCls,ut=Je===void 0?"rc-menu":Je,St=Ze.rootClassName,It=Ze.style,Qt=Ze.className,tr=Ze.tabIndex,cr=tr===void 0?0:tr,Vt=Ze.items,Ft=Ze.children,rr=Ze.direction,$r=Ze.id,Ur=Ze.mode,Ut=Ur===void 0?"vertical":Ur,yr=Ze.inlineCollapsed,Vr=Ze.disabled,Ir=Ze.disabledOverflow,Cr=Ze.subMenuOpenDelay,tn=Cr===void 0?.1:Cr,pr=Ze.subMenuCloseDelay,Lr=pr===void 0?.1:pr,rn=Ze.forceSubMenuRender,Ve=Ze.defaultOpenKeys,fr=Ze.openKeys,Gr=Ze.activeKey,hn=Ze.defaultActiveFirst,Tn=Ze.selectable,bn=Tn===void 0?!0:Tn,yn=Ze.multiple,br=yn===void 0?!1:yn,gr=Ze.defaultSelectedKeys,gn=Ze.selectedKeys,an=Ze.onSelect,on=Ze.onDeselect,Ei=Ze.inlineIndent,ei=Ei===void 0?24:Ei,An=Ze.motion,lr=Ze.defaultMotions,un=Ze.triggerSubMenuAction,fn=un===void 0?"hover":un,qn=Ze.builtinPlacements,ai=Ze.itemIcon,Ln=Ze.expandIcon,Un=Ze.overflowedIndicator,Rn=Un===void 0?"...":Un,ln=Ze.overflowedIndicatorPopupClassName,fi=Ze.getPopupContainer,Hn=Ze.onClick,ni=Ze.onOpenChange,oi=Ze.onKeyDown,ti=Ze.openAnimation,Hr=Ze.openTransitionName,di=Ze._internalRenderMenuItem,pi=Ze._internalRenderSubMenuItem,vi=Ze._internalComponents,jn=(0,v.Z)(Ze,Kr),Or=x.useMemo(function(){return[_r(Ft,Vt,Nr,vi,ut),_r(Ft,Vt,Nr,{},ut)]},[Ft,Vt,vi]),Oi=(0,Z.Z)(Or,2),Mt=Oi[0],Vn=Oi[1],Ri=x.useState(!1),mi=(0,Z.Z)(Ri,2),Mn=mi[0],li=mi[1],kr=x.useRef(),Xn=Dt($r),gi=rr==="rtl",ri=(0,H.Z)(Ve,{value:fr,postState:function(wn){return wn||Nr}}),Dn=(0,Z.Z)(ri,2),kn=Dn[0],Zn=Dn[1],ii=function(wn){var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Si(){Zn(wn),ni==null||ni(wn)}Fn?(0,T.flushSync)(Si):Si()},wi=x.useState(kn),ui=(0,Z.Z)(wi,2),zi=ui[0],Hi=ui[1],Mi=x.useRef(!1),_i=x.useMemo(function(){return(Ut==="inline"||Ut==="vertical")&&yr?["vertical",yr]:[Ut,!1]},[Ut,yr]),dr=(0,Z.Z)(_i,2),Mr=dr[0],vn=dr[1],zr=Mr==="inline",qr=x.useState(Mr),xi=(0,Z.Z)(qr,2),Qn=xi[0],Ii=xi[1],dn=x.useState(vn),Wr=(0,Z.Z)(dn,2),In=Wr[0],Bn=Wr[1];x.useEffect(function(){Ii(Mr),Bn(vn),Mi.current&&(zr?Zn(zi):ii(Nr))},[Mr,vn]);var Jn=x.useState(0),zn=(0,Z.Z)(Jn,2),si=zn[0],yi=zn[1],Gi=si>=Mt.length-1||Qn!=="horizontal"||Ir;x.useEffect(function(){zr&&Hi(kn)},[kn]),x.useEffect(function(){return Mi.current=!0,function(){Mi.current=!1}},[]);var bi=nt(),_s=bi.registerPath,cs=bi.unregisterPath,Gs=bi.refreshOverflowKeys,rs=bi.isSubPathKey,Ts=bi.getKeyPath,Ni=bi.getKeys,aa=bi.getSubPathKeys,wa=x.useMemo(function(){return{registerPath:_s,unregisterPath:cs}},[_s,cs]),Ks=x.useMemo(function(){return{isSubPathKey:rs}},[rs]);x.useEffect(function(){Gs(Gi?Nr:Mt.slice(si+1).map(function(Sn){return Sn.key}))},[si,Gi]);var oa=(0,H.Z)(Gr||hn&&((lt=Mt[0])===null||lt===void 0?void 0:lt.key),{value:Gr}),As=(0,Z.Z)(oa,2),ns=As[0],Ws=As[1],Ki=gt(function(Sn){Ws(Sn)}),Hs=gt(function(){Ws(void 0)});(0,x.useImperativeHandle)(Ge,function(){return{list:kr.current,focus:function(wn){var Fn,Si=Ni(),Ti=qe(Si,Xn),bs=Ti.elements,Es=Ti.key2element,ss=Ti.element2key,Vs=Oe(kr.current,bs),Rs=ns!=null?ns:Vs[0]?ss.get(Vs[0]):(Fn=Mt.find(function(Ls){return!Ls.props.disabled}))===null||Fn===void 0?void 0:Fn.key,as=Es.get(Rs);if(Rs&&as){var Is;as==null||(Is=as.focus)===null||Is===void 0||Is.call(as,wn)}}}});var la=(0,H.Z)(gr||[],{value:gn,postState:function(wn){return Array.isArray(wn)?wn:wn==null?Nr:[wn]}}),Li=(0,Z.Z)(la,2),hs=Li[0],ys=Li[1],Ds=function(wn){if(bn){var Fn=wn.key,Si=hs.includes(Fn),Ti;br?Si?Ti=hs.filter(function(Es){return Es!==Fn}):Ti=[].concat((0,_e.Z)(hs),[Fn]):Ti=[Fn],ys(Ti);var bs=(0,Re.Z)((0,Re.Z)({},wn),{},{selectedKeys:Ti});Si?on==null||on(bs):an==null||an(bs)}!br&&kn.length&&Qn!=="inline"&&ii(Nr)},ua=gt(function(Sn){Hn==null||Hn(R(Sn)),Ds(Sn)}),ji=gt(function(Sn,wn){var Fn=kn.filter(function(Ti){return Ti!==Sn});if(wn)Fn.push(Sn);else if(Qn!=="inline"){var Si=aa(Sn);Fn=Fn.filter(function(Ti){return!Si.has(Ti)})}(0,F.Z)(kn,Fn,!0)||ii(Fn,!0)}),ca=function(wn,Fn){var Si=Fn!=null?Fn:!kn.includes(wn);ji(wn,Si)},is=ht(Qn,ns,gi,Xn,kr,Ni,Ts,Ws,ca,oi);x.useEffect(function(){li(!0)},[]);var Cs=x.useMemo(function(){return{_internalRenderMenuItem:di,_internalRenderSubMenuItem:pi}},[di,pi]),Vi=Qn!=="horizontal"||Ir?Mt:Mt.map(function(Sn,wn){return x.createElement(W,{key:Sn.key,overflowDisabled:wn>si},Sn)}),js=x.createElement(l.Z,(0,I.Z)({id:$r,ref:kr,prefixCls:"".concat(ut,"-overflow"),component:"ul",itemComponent:Le,className:ie()(ut,"".concat(ut,"-root"),"".concat(ut,"-").concat(Qn),Qt,(0,be.Z)((0,be.Z)({},"".concat(ut,"-inline-collapsed"),In),"".concat(ut,"-rtl"),gi),St),dir:rr,style:It,role:"menu",tabIndex:cr,data:Vi,renderRawItem:function(wn){return wn},renderRawRest:function(wn){var Fn=wn.length,Si=Fn?Mt.slice(-Fn):null;return x.createElement(ce,{eventKey:Be,title:Rn,disabled:Gi,internalPopupClose:Fn===0,popupClassName:ln},Si)},maxCount:Qn!=="horizontal"||Ir?l.Z.INVALIDATE:l.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(wn){yi(wn)},onKeyDown:is},jn));return x.createElement(ae.Provider,{value:Cs},x.createElement(L.Provider,{value:Xn},x.createElement(W,{prefixCls:ut,rootClassName:St,mode:Qn,openKeys:kn,rtl:gi,disabled:Vr,motion:Mn?An:null,defaultMotions:Mn?lr:null,activeKey:ns,onActive:Ki,onInactive:Hs,selectedKeys:hs,inlineIndent:ei,subMenuOpenDelay:tn,subMenuCloseDelay:Lr,forceSubMenuRender:rn,builtinPlacements:qn,triggerSubMenuAction:fn,getPopupContainer:fi,itemIcon:ai,expandIcon:Ln,onItemClick:ua,onOpenChange:ji},x.createElement(ke.Provider,{value:Ks},js),x.createElement("div",{style:{display:"none"},"aria-hidden":!0},x.createElement(De.Provider,{value:wa},Vn)))))}),_n=Qr,Zr=_n;Zr.Item=Le,Zr.SubMenu=ce,Zr.ItemGroup=Wt,Zr.Divider=_t;var sn=Zr},83836:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return re}});var I=B(60499),be=B(85899),Re=B(72190),_e=B(42244),Z=B(59301),v=B(92310),me=B.n(v),ie=B(29301),l=B(34280),H=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],F=void 0;function E(b,S){var V=b.prefixCls,ve=b.invalidate,He=b.item,st=b.renderItem,tt=b.responsive,Xe=b.responsiveDisabled,xt=b.registerSize,et=b.itemKey,Ue=b.className,Yt=b.style,Nt=b.children,Sr=b.display,wt=b.order,Er=b.component,ze=Er===void 0?"div":Er,Oe=(0,_e.Z)(b,H),Se=tt&&!Sr;function qe($e){xt(et,$e)}Z.useEffect(function(){return function(){qe(null)}},[]);var ht=st&&He!==F?st(He,{index:wt}):Nt,pt;ve||(pt={opacity:Se?0:1,height:Se?0:F,overflowY:Se?"hidden":F,order:tt?wt:F,pointerEvents:Se?"none":F,position:Se?"absolute":F});var Q={};Se&&(Q["aria-hidden"]=!0);var we=Z.createElement(ze,(0,I.Z)({className:me()(!ve&&V,Ue),style:(0,be.Z)((0,be.Z)({},pt),Yt)},Q,Oe,{ref:S}),ht);return tt&&(we=Z.createElement(ie.Z,{onResize:function(Be){var nt=Be.offsetWidth;qe(nt)},disabled:Xe},we)),we}var x=Z.forwardRef(E);x.displayName="Item";var T=x,L=B(6089),q=B(4676),Y=B(16089);function $(b){if(typeof MessageChannel=="undefined")(0,Y.Z)(b);else{var S=new MessageChannel;S.port1.onmessage=function(){return b()},S.port2.postMessage(void 0)}}function A(){var b=Z.useRef(null),S=function(ve){b.current||(b.current=[],$(function(){(0,q.unstable_batchedUpdates)(function(){b.current.forEach(function(He){He()}),b.current=null})})),b.current.push(ve)};return S}function M(b,S){var V=Z.useState(S),ve=(0,Re.Z)(V,2),He=ve[0],st=ve[1],tt=(0,L.Z)(function(Xe){b(function(){st(Xe)})});return[He,tt]}var O=Z.createContext(null),W=["component"],ge=["className"],De=["className"],he=function(S,V){var ve=Z.useContext(O);if(!ve){var He=S.component,st=He===void 0?"div":He,tt=(0,_e.Z)(S,W);return Z.createElement(st,(0,I.Z)({},tt,{ref:V}))}var Xe=ve.className,xt=(0,_e.Z)(ve,ge),et=S.className,Ue=(0,_e.Z)(S,De);return Z.createElement(O.Provider,{value:null},Z.createElement(T,(0,I.Z)({ref:V,className:me()(Xe,et)},xt,Ue)))},Me=Z.forwardRef(he);Me.displayName="RawItem";var Fe=Me,ke=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],ct="responsive",ae="invalidate";function j(b){return"+ ".concat(b.length," ...")}function ee(b,S){var V=b.prefixCls,ve=V===void 0?"rc-overflow":V,He=b.data,st=He===void 0?[]:He,tt=b.renderItem,Xe=b.renderRawItem,xt=b.itemKey,et=b.itemWidth,Ue=et===void 0?10:et,Yt=b.ssr,Nt=b.style,Sr=b.className,wt=b.maxCount,Er=b.renderRest,ze=b.renderRawRest,Oe=b.prefix,Se=b.suffix,qe=b.component,ht=qe===void 0?"div":qe,pt=b.itemComponent,Q=b.onVisibleChange,we=(0,_e.Z)(b,ke),$e=Yt==="full",Be=A(),nt=M(Be,null),gt=(0,Re.Z)(nt,2),Ot=gt[0],yt=gt[1],Dt=Ot||0,vt=M(Be,new Map),Gt=(0,Re.Z)(vt,2),bt=Gt[0],At=Gt[1],kt=M(Be,0),er=(0,Re.Z)(kt,2),qt=er[0],Pt=er[1],ir=M(Be,0),y=(0,Re.Z)(ir,2),R=y[0],rt=y[1],U=M(Be,0),te=(0,Re.Z)(U,2),Zt=te[0],Ae=te[1],Te=M(Be,0),Le=(0,Re.Z)(Te,2),K=Le[0],J=Le[1],Ee=(0,Z.useState)(null),Ce=(0,Re.Z)(Ee,2),N=Ce[0],Et=Ce[1],de=(0,Z.useState)(null),Bt=(0,Re.Z)(de,2),Xt=Bt[0],Br=Bt[1],cn=Z.useMemo(function(){return Xt===null&&$e?Number.MAX_SAFE_INTEGER:Xt||0},[Xt,Ot]),jr=(0,Z.useState)(!1),vr=(0,Re.Z)(jr,2),xn=vr[0],$n=vr[1],Jr="".concat(ve,"-item"),en=Math.max(qt,R),$t=wt===ct,xr=st.length&&$t,se=wt===ae,ce=xr||typeof wt=="number"&&st.length>wt,ft=(0,Z.useMemo)(function(){var Je=st;return xr?Ot===null&&$e?Je=st:Je=st.slice(0,Math.min(st.length,Dt/Ue)):typeof wt=="number"&&(Je=st.slice(0,wt)),Je},[st,Ue,Ot,wt,xr]),_t=(0,Z.useMemo)(function(){return xr?st.slice(cn+1):st.slice(ft.length)},[st,ft,xr,cn]),Ct=(0,Z.useCallback)(function(Je,ut){var St;return typeof xt=="function"?xt(Je):(St=xt&&(Je==null?void 0:Je[xt]))!==null&&St!==void 0?St:ut},[xt]),Kt=(0,Z.useCallback)(tt||function(Je){return Je},[tt]);function jt(Je,ut,St){Xt===Je&&(ut===void 0||ut===N)||(Br(Je),St||($n(Je<st.length-1),Q==null||Q(Je)),ut!==void 0&&Et(ut))}function Wt(Je,ut){yt(ut.clientWidth)}function Ht(Je,ut){At(function(St){var It=new Map(St);return ut===null?It.delete(Je):It.set(Je,ut),It})}function hr(Je,ut){rt(ut),Pt(R)}function _r(Je,ut){Ae(ut)}function Kr(Je,ut){J(ut)}function Nr(Je){return bt.get(Ct(ft[Je],Je))}(0,l.Z)(function(){if(Dt&&typeof en=="number"&&ft){var Je=Zt+K,ut=ft.length,St=ut-1;if(!ut){jt(0,null);return}for(var It=0;It<ut;It+=1){var Qt=Nr(It);if($e&&(Qt=Qt||0),Qt===void 0){jt(It-1,void 0,!0);break}if(Je+=Qt,St===0&&Je<=Dt||It===St-1&&Je+Nr(St)<=Dt){jt(St,null);break}else if(Je+en>Dt){jt(It-1,Je-Qt-K+R);break}}Se&&Nr(0)+K>Dt&&Et(null)}},[Dt,bt,R,Zt,K,Ct,ft]);var Qr=xn&&!!_t.length,_n={};N!==null&&xr&&(_n={position:"absolute",left:N,top:0});var Zr={prefixCls:Jr,responsive:xr,component:pt,invalidate:se},sn=Xe?function(Je,ut){var St=Ct(Je,ut);return Z.createElement(O.Provider,{key:St,value:(0,be.Z)((0,be.Z)({},Zr),{},{order:ut,item:Je,itemKey:St,registerSize:Ht,display:ut<=cn})},Xe(Je,ut))}:function(Je,ut){var St=Ct(Je,ut);return Z.createElement(T,(0,I.Z)({},Zr,{order:ut,key:St,item:Je,renderItem:Kt,itemKey:St,registerSize:Ht,display:ut<=cn}))},Ie={order:Qr?cn:Number.MAX_SAFE_INTEGER,className:"".concat(Jr,"-rest"),registerSize:hr,display:Qr},Ge=Er||j,lt=ze?Z.createElement(O.Provider,{value:(0,be.Z)((0,be.Z)({},Zr),Ie)},ze(_t)):Z.createElement(T,(0,I.Z)({},Zr,Ie),typeof Ge=="function"?Ge(_t):Ge),Ze=Z.createElement(ht,(0,I.Z)({className:me()(!se&&ve,Sr),style:Nt,ref:S},we),Oe&&Z.createElement(T,(0,I.Z)({},Zr,{responsive:$t,responsiveDisabled:!xr,order:-1,className:"".concat(Jr,"-prefix"),registerSize:_r,display:!0}),Oe),ft.map(sn),ce?lt:null,Se&&Z.createElement(T,(0,I.Z)({},Zr,{responsive:$t,responsiveDisabled:!xr,order:cn,className:"".concat(Jr,"-suffix"),registerSize:Kr,display:!0,style:_n}),Se));return $t?Z.createElement(ie.Z,{onResize:Wt,disabled:!xr},Ze):Ze}var ne=Z.forwardRef(ee);ne.displayName="Overflow",ne.Item=Fe,ne.RESPONSIVE=ct,ne.INVALIDATE=ae;var oe=ne,re=oe},29301:function(Jt,ot,B){"use strict";B.d(ot,{Z:function(){return ae}});var I=B(60499),be=B(59301),Re=B(11592),_e=B(48736),Z=B(85899),v=B(43749),me=B(76846),ie=B(8654),l=be.createContext(null);function H(j){var ee=j.children,ne=j.onBatchResize,oe=be.useRef(0),re=be.useRef([]),b=be.useContext(l),S=be.useCallback(function(V,ve,He){oe.current+=1;var st=oe.current;re.current.push({size:V,element:ve,data:He}),Promise.resolve().then(function(){st===oe.current&&(ne==null||ne(re.current),re.current=[])}),b==null||b(V,ve,He)},[ne,b]);return be.createElement(l.Provider,{value:S},ee)}var F=B(76374),E=new Map;function x(j){j.forEach(function(ee){var ne,oe=ee.target;(ne=E.get(oe))===null||ne===void 0||ne.forEach(function(re){return re(oe)})})}var T=new F.Z(x),L=null,q=null;function Y(j,ee){E.has(j)||(E.set(j,new Set),T.observe(j)),E.get(j).add(ee)}function $(j,ee){E.has(j)&&(E.get(j).delete(ee),E.get(j).size||(T.unobserve(j),E.delete(j)))}var A=B(38705),M=B(17212),O=B(39153),W=B(55401),ge=function(j){(0,O.Z)(ne,j);var ee=(0,W.Z)(ne);function ne(){return(0,A.Z)(this,ne),ee.apply(this,arguments)}return(0,M.Z)(ne,[{key:"render",value:function(){return this.props.children}}]),ne}(be.Component);function De(j,ee){var ne=j.children,oe=j.disabled,re=be.useRef(null),b=be.useRef(null),S=be.useContext(l),V=typeof ne=="function",ve=V?ne(re):ne,He=be.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),st=!V&&be.isValidElement(ve)&&(0,ie.Yr)(ve),tt=st?(0,ie.C4)(ve):null,Xe=(0,ie.x1)(tt,re),xt=function(){var Nt;return(0,me.ZP)(re.current)||(re.current&&(0,v.Z)(re.current)==="object"?(0,me.ZP)((Nt=re.current)===null||Nt===void 0?void 0:Nt.nativeElement):null)||(0,me.ZP)(b.current)};be.useImperativeHandle(ee,function(){return xt()});var et=be.useRef(j);et.current=j;var Ue=be.useCallback(function(Yt){var Nt=et.current,Sr=Nt.onResize,wt=Nt.data,Er=Yt.getBoundingClientRect(),ze=Er.width,Oe=Er.height,Se=Yt.offsetWidth,qe=Yt.offsetHeight,ht=Math.floor(ze),pt=Math.floor(Oe);if(He.current.width!==ht||He.current.height!==pt||He.current.offsetWidth!==Se||He.current.offsetHeight!==qe){var Q={width:ht,height:pt,offsetWidth:Se,offsetHeight:qe};He.current=Q;var we=Se===Math.round(ze)?ze:Se,$e=qe===Math.round(Oe)?Oe:qe,Be=(0,Z.Z)((0,Z.Z)({},Q),{},{offsetWidth:we,offsetHeight:$e});S==null||S(Be,Yt,wt),Sr&&Promise.resolve().then(function(){Sr(Be,Yt)})}},[]);return be.useEffect(function(){var Yt=xt();return Yt&&!oe&&Y(Yt,Ue),function(){return $(Yt,Ue)}},[re.current,oe]),be.createElement(ge,{ref:b},st?be.cloneElement(ve,{ref:Xe}):ve)}var he=be.forwardRef(De),Me=he,Fe="rc-observer-key";function ke(j,ee){var ne=j.children,oe=typeof ne=="function"?[ne]:(0,Re.Z)(ne);return oe.map(function(re,b){var S=(re==null?void 0:re.key)||"".concat(Fe,"-").concat(b);return be.createElement(Me,(0,I.Z)({},j,{key:S,ref:b===0?ee:void 0}),re)})}var ct=be.forwardRef(ke);ct.Collection=H;var ae=ct},29125:function(Jt,ot,B){"use strict";B.d(ot,{G:function(){return _e},Z:function(){return $}});var I=B(92310),be=B.n(I),Re=B(59301);function _e(A){var M=A.children,O=A.prefixCls,W=A.id,ge=A.overlayInnerStyle,De=A.bodyClassName,he=A.className,Me=A.style;return Re.createElement("div",{className:be()("".concat(O,"-content"),he),style:Me},Re.createElement("div",{className:be()("".concat(O,"-inner"),De),id:W,role:"tooltip",style:ge},typeof M=="function"?M():M))}var Z=B(60499),v=B(85899),me=B(42244),ie=B(68196),l={shiftX:64,adjustY:1},H={adjustX:1,shiftY:!0},F=[0,0],E={left:{points:["cr","cl"],overflow:H,offset:[-4,0],targetOffset:F},right:{points:["cl","cr"],overflow:H,offset:[4,0],targetOffset:F},top:{points:["bc","tc"],overflow:l,offset:[0,-4],targetOffset:F},bottom:{points:["tc","bc"],overflow:l,offset:[0,4],targetOffset:F},topLeft:{points:["bl","tl"],overflow:l,offset:[0,-4],targetOffset:F},leftTop:{points:["tr","tl"],overflow:H,offset:[-4,0],targetOffset:F},topRight:{points:["br","tr"],overflow:l,offset:[0,-4],targetOffset:F},rightTop:{points:["tl","tr"],overflow:H,offset:[4,0],targetOffset:F},bottomRight:{points:["tr","br"],overflow:l,offset:[0,4],targetOffset:F},rightBottom:{points:["bl","br"],overflow:H,offset:[4,0],targetOffset:F},bottomLeft:{points:["tl","bl"],overflow:l,offset:[0,4],targetOffset:F},leftBottom:{points:["br","bl"],overflow:H,offset:[-4,0],targetOffset:F}},x=null,T=B(80402),L=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],q=function(M,O){var W=M.overlayClassName,ge=M.trigger,De=ge===void 0?["hover"]:ge,he=M.mouseEnterDelay,Me=he===void 0?0:he,Fe=M.mouseLeaveDelay,ke=Fe===void 0?.1:Fe,ct=M.overlayStyle,ae=M.prefixCls,j=ae===void 0?"rc-tooltip":ae,ee=M.children,ne=M.onVisibleChange,oe=M.afterVisibleChange,re=M.transitionName,b=M.animation,S=M.motion,V=M.placement,ve=V===void 0?"right":V,He=M.align,st=He===void 0?{}:He,tt=M.destroyTooltipOnHide,Xe=tt===void 0?!1:tt,xt=M.defaultVisible,et=M.getTooltipContainer,Ue=M.overlayInnerStyle,Yt=M.arrowContent,Nt=M.overlay,Sr=M.id,wt=M.showArrow,Er=wt===void 0?!0:wt,ze=M.classNames,Oe=M.styles,Se=(0,me.Z)(M,L),qe=(0,T.Z)(Sr),ht=(0,Re.useRef)(null);(0,Re.useImperativeHandle)(O,function(){return ht.current});var pt=(0,v.Z)({},Se);"visible"in M&&(pt.popupVisible=M.visible);var Q=function(){return Re.createElement(_e,{key:"content",prefixCls:j,id:qe,bodyClassName:ze==null?void 0:ze.body,overlayInnerStyle:(0,v.Z)((0,v.Z)({},Ue),Oe==null?void 0:Oe.body)},Nt)},we=function(){var Be=Re.Children.only(ee),nt=(Be==null?void 0:Be.props)||{},gt=(0,v.Z)((0,v.Z)({},nt),{},{"aria-describedby":Nt?qe:null});return Re.cloneElement(ee,gt)};return Re.createElement(ie.Z,(0,Z.Z)({popupClassName:be()(W,ze==null?void 0:ze.root),prefixCls:j,popup:Q,action:De,builtinPlacements:E,popupPlacement:ve,ref:ht,popupAlign:st,getPopupContainer:et,onPopupVisibleChange:ne,afterPopupVisibleChange:oe,popupTransitionName:re,popupAnimation:b,popupMotion:S,defaultPopupVisible:xt,autoDestroy:Xe,mouseLeaveDelay:ke,popupStyle:(0,v.Z)((0,v.Z)({},ct),Oe==null?void 0:Oe.root),mouseEnterDelay:Me,arrow:Er},pt),we())},Y=(0,Re.forwardRef)(q),$=Y},49658:function(Jt,ot){"use strict";ot.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var B=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(B)||/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(B==null?void 0:B.substr(0,4))}},83145:function(Jt,ot,B){"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.CopyToClipboard=void 0;var I=Re(B(59301)),be=Re(B(25769));function Re(A){return A&&A.__esModule?A:{default:A}}function _e(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_e=function(O){return typeof O}:_e=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},_e(A)}function Z(A,M){var O=Object.keys(A);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(A);M&&(W=W.filter(function(ge){return Object.getOwnPropertyDescriptor(A,ge).enumerable})),O.push.apply(O,W)}return O}function v(A){for(var M=1;M<arguments.length;M++){var O=arguments[M]!=null?arguments[M]:{};M%2?Z(O,!0).forEach(function(W){Y(A,W,O[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(O)):Z(O).forEach(function(W){Object.defineProperty(A,W,Object.getOwnPropertyDescriptor(O,W))})}return A}function me(A,M){if(A==null)return{};var O=ie(A,M),W,ge;if(Object.getOwnPropertySymbols){var De=Object.getOwnPropertySymbols(A);for(ge=0;ge<De.length;ge++)W=De[ge],!(M.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(A,W)&&(O[W]=A[W])}return O}function ie(A,M){if(A==null)return{};var O={},W=Object.keys(A),ge,De;for(De=0;De<W.length;De++)ge=W[De],!(M.indexOf(ge)>=0)&&(O[ge]=A[ge]);return O}function l(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function H(A,M){for(var O=0;O<M.length;O++){var W=M[O];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(A,W.key,W)}}function F(A,M,O){return M&&H(A.prototype,M),O&&H(A,O),A}function E(A,M){return M&&(_e(M)==="object"||typeof M=="function")?M:T(A)}function x(A){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},x(A)}function T(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function L(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),M&&q(A,M)}function q(A,M){return q=Object.setPrototypeOf||function(W,ge){return W.__proto__=ge,W},q(A,M)}function Y(A,M,O){return M in A?Object.defineProperty(A,M,{value:O,enumerable:!0,configurable:!0,writable:!0}):A[M]=O,A}var $=function(A){L(M,A);function M(){var O,W;l(this,M);for(var ge=arguments.length,De=new Array(ge),he=0;he<ge;he++)De[he]=arguments[he];return W=E(this,(O=x(M)).call.apply(O,[this].concat(De))),Y(T(W),"onClick",function(Me){var Fe=W.props,ke=Fe.text,ct=Fe.onCopy,ae=Fe.children,j=Fe.options,ee=I.default.Children.only(ae),ne=(0,be.default)(ke,j);ct&&ct(ke,ne),ee&&ee.props&&typeof ee.props.onClick=="function"&&ee.props.onClick(Me)}),W}return F(M,[{key:"render",value:function(){var W=this.props,ge=W.text,De=W.onCopy,he=W.options,Me=W.children,Fe=me(W,["text","onCopy","options","children"]),ke=I.default.Children.only(Me);return I.default.cloneElement(ke,v({},Fe,{onClick:this.onClick}))}}]),M}(I.default.PureComponent);ot.CopyToClipboard=$,Y($,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Jt,ot,B){"use strict";var I=B(83145),be=I.CopyToClipboard;be.CopyToClipboard=be,Jt.exports=be},76374:function(Jt,ot,B){"use strict";var I=function(){if(typeof Map!="undefined")return Map;function ae(j,ee){var ne=-1;return j.some(function(oe,re){return oe[0]===ee?(ne=re,!0):!1}),ne}return function(){function j(){this.__entries__=[]}return Object.defineProperty(j.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),j.prototype.get=function(ee){var ne=ae(this.__entries__,ee),oe=this.__entries__[ne];return oe&&oe[1]},j.prototype.set=function(ee,ne){var oe=ae(this.__entries__,ee);~oe?this.__entries__[oe][1]=ne:this.__entries__.push([ee,ne])},j.prototype.delete=function(ee){var ne=this.__entries__,oe=ae(ne,ee);~oe&&ne.splice(oe,1)},j.prototype.has=function(ee){return!!~ae(this.__entries__,ee)},j.prototype.clear=function(){this.__entries__.splice(0)},j.prototype.forEach=function(ee,ne){ne===void 0&&(ne=null);for(var oe=0,re=this.__entries__;oe<re.length;oe++){var b=re[oe];ee.call(ne,b[1],b[0])}},j}()}(),be=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Re=function(){return typeof B.g!="undefined"&&B.g.Math===Math?B.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_e=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Re):function(ae){return setTimeout(function(){return ae(Date.now())},1e3/60)}}(),Z=2;function v(ae,j){var ee=!1,ne=!1,oe=0;function re(){ee&&(ee=!1,ae()),ne&&S()}function b(){_e(re)}function S(){var V=Date.now();if(ee){if(V-oe<Z)return;ne=!0}else ee=!0,ne=!1,setTimeout(b,j);oe=V}return S}var me=20,ie=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",H=function(){function ae(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=v(this.refresh.bind(this),me)}return ae.prototype.addObserver=function(j){~this.observers_.indexOf(j)||this.observers_.push(j),this.connected_||this.connect_()},ae.prototype.removeObserver=function(j){var ee=this.observers_,ne=ee.indexOf(j);~ne&&ee.splice(ne,1),!ee.length&&this.connected_&&this.disconnect_()},ae.prototype.refresh=function(){var j=this.updateObservers_();j&&this.refresh()},ae.prototype.updateObservers_=function(){var j=this.observers_.filter(function(ee){return ee.gatherActive(),ee.hasActive()});return j.forEach(function(ee){return ee.broadcastActive()}),j.length>0},ae.prototype.connect_=function(){!be||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(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)},ae.prototype.disconnect_=function(){!be||!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)},ae.prototype.onTransitionEnd_=function(j){var ee=j.propertyName,ne=ee===void 0?"":ee,oe=ie.some(function(re){return!!~ne.indexOf(re)});oe&&this.refresh()},ae.getInstance=function(){return this.instance_||(this.instance_=new ae),this.instance_},ae.instance_=null,ae}(),F=function(ae,j){for(var ee=0,ne=Object.keys(j);ee<ne.length;ee++){var oe=ne[ee];Object.defineProperty(ae,oe,{value:j[oe],enumerable:!1,writable:!1,configurable:!0})}return ae},E=function(ae){var j=ae&&ae.ownerDocument&&ae.ownerDocument.defaultView;return j||Re},x=ge(0,0,0,0);function T(ae){return parseFloat(ae)||0}function L(ae){for(var j=[],ee=1;ee<arguments.length;ee++)j[ee-1]=arguments[ee];return j.reduce(function(ne,oe){var re=ae["border-"+oe+"-width"];return ne+T(re)},0)}function q(ae){for(var j=["top","right","bottom","left"],ee={},ne=0,oe=j;ne<oe.length;ne++){var re=oe[ne],b=ae["padding-"+re];ee[re]=T(b)}return ee}function Y(ae){var j=ae.getBBox();return ge(0,0,j.width,j.height)}function $(ae){var j=ae.clientWidth,ee=ae.clientHeight;if(!j&&!ee)return x;var ne=E(ae).getComputedStyle(ae),oe=q(ne),re=oe.left+oe.right,b=oe.top+oe.bottom,S=T(ne.width),V=T(ne.height);if(ne.boxSizing==="border-box"&&(Math.round(S+re)!==j&&(S-=L(ne,"left","right")+re),Math.round(V+b)!==ee&&(V-=L(ne,"top","bottom")+b)),!M(ae)){var ve=Math.round(S+re)-j,He=Math.round(V+b)-ee;Math.abs(ve)!==1&&(S-=ve),Math.abs(He)!==1&&(V-=He)}return ge(oe.left,oe.top,S,V)}var A=function(){return typeof SVGGraphicsElement!="undefined"?function(ae){return ae instanceof E(ae).SVGGraphicsElement}:function(ae){return ae instanceof E(ae).SVGElement&&typeof ae.getBBox=="function"}}();function M(ae){return ae===E(ae).document.documentElement}function O(ae){return be?A(ae)?Y(ae):$(ae):x}function W(ae){var j=ae.x,ee=ae.y,ne=ae.width,oe=ae.height,re=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,b=Object.create(re.prototype);return F(b,{x:j,y:ee,width:ne,height:oe,top:ee,right:j+ne,bottom:oe+ee,left:j}),b}function ge(ae,j,ee,ne){return{x:ae,y:j,width:ee,height:ne}}var De=function(){function ae(j){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ge(0,0,0,0),this.target=j}return ae.prototype.isActive=function(){var j=O(this.target);return this.contentRect_=j,j.width!==this.broadcastWidth||j.height!==this.broadcastHeight},ae.prototype.broadcastRect=function(){var j=this.contentRect_;return this.broadcastWidth=j.width,this.broadcastHeight=j.height,j},ae}(),he=function(){function ae(j,ee){var ne=W(ee);F(this,{target:j,contentRect:ne})}return ae}(),Me=function(){function ae(j,ee,ne){if(this.activeObservations_=[],this.observations_=new I,typeof j!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=j,this.controller_=ee,this.callbackCtx_=ne}return ae.prototype.observe=function(j){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(j instanceof E(j).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(j)||(ee.set(j,new De(j)),this.controller_.addObserver(this),this.controller_.refresh())}},ae.prototype.unobserve=function(j){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(j instanceof E(j).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(j)&&(ee.delete(j),ee.size||this.controller_.removeObserver(this))}},ae.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ae.prototype.gatherActive=function(){var j=this;this.clearActive(),this.observations_.forEach(function(ee){ee.isActive()&&j.activeObservations_.push(ee)})},ae.prototype.broadcastActive=function(){if(this.hasActive()){var j=this.callbackCtx_,ee=this.activeObservations_.map(function(ne){return new he(ne.target,ne.broadcastRect())});this.callback_.call(j,ee,j),this.clearActive()}},ae.prototype.clearActive=function(){this.activeObservations_.splice(0)},ae.prototype.hasActive=function(){return this.activeObservations_.length>0},ae}(),Fe=typeof WeakMap!="undefined"?new WeakMap:new I,ke=function(){function ae(j){if(!(this instanceof ae))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ee=H.getInstance(),ne=new Me(j,ee,this);Fe.set(this,ne)}return ae}();["observe","unobserve","disconnect"].forEach(function(ae){ke.prototype[ae]=function(){var j;return(j=Fe.get(this))[ae].apply(j,arguments)}});var ct=function(){return typeof Re.ResizeObserver!="undefined"?Re.ResizeObserver:ke}();ot.Z=ct},98040:function(Jt){Jt.exports=function(){var ot=document.getSelection();if(!ot.rangeCount)return function(){};for(var B=document.activeElement,I=[],be=0;be<ot.rangeCount;be++)I.push(ot.getRangeAt(be));switch(B.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":B.blur();break;default:B=null;break}return ot.removeAllRanges(),function(){ot.type==="Caret"&&ot.removeAllRanges(),ot.rangeCount||I.forEach(function(Re){ot.addRange(Re)}),B&&B.focus()}}},18645:function(Jt,ot,B){"use strict";Jt.exports=B.p+"static/detailbg1.e67ff29c.png"},76296:function(Jt){"use strict";Jt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABMCAYAAADZXmGYAAAAAXNSR0IArs4c6QAAHBJJREFUeF7NfAl4HcWV7l/V2719Fy2WLMnyChiMjU2MMeAAIcALMCwBMoEBEhiWB4nDkgmZlwQSiF54IYTAgJkAIQnwWEISEwgEwhAY9h2zGIPB4AULG1myduluvVW971R3X13JMpaMMa/59Mm6t7uqzl//+c85VdUwfI6XlFIHUO0A1SWguwroZ4yJz2NIbGd3KqWkPlMA6jygGoAWj0ECrg902UAXY8zbmWPbaUBIKU0ANS4wgXlIbsNIYRjoQQhIfmcA8pkCEc1+2gEmcg9ZAHycRknDAAHRAWDgs3SbzwQImv1CAXW6jgnMhIntJDk9ZkTISQnX99Fl25+N2+wwIKSUNNtVDjAhmv1y29uJw6jkMYAgMNCb2MFu86mBkFImikCd5qLWZ+UJHKcHbNftMhDIB0V0LFmCgZaWTxdttgsIKSUpfbXrop6ZsD0P29XOdpk/ykPkNvDQmUqhe3ujzbgMkFKmikVM0HXUeADlAP9fXRIItNBtOhljhfEMbptAUNKTy6EGJuo5QwL4fGd/jMbJQDj5oGh1VFerJE1u67lRgahIeurzHqpYRdKzrQZ35PfeGMONAcinuwozujzMrDW13LyqxPI6XeY9GFwz4KSBTkC5jb+18Q0DgsJePo9aw1DCt62kZ1w2j9WocTUKYG2uZN+8rvCDrMWPnpHS+aSkAQHWYTH88vAG82nPC3MXchvLMHr6NqFr0qQt3UYBQeLnANOD7Uh6PisDxwIIMeH4ZzsuTyfZ8buldexZZWJmyoIrJVbmvGKDzs8+qjG5enhbhuQCuYyFdsbYQPxdDITZVfDm0oe2EaYwn6eBYwHB84AHNuYaLl/R8+Be9YbeZOuYlTExM2PCERLvDrhoHfAf/fXeTZf6FRmtAQ9kog1DwMBbcbZaBmJTwZtLjYdghIDsHDAMSTPrweODPvS8E9iarouEkMVM0vAlIH1F78o8Mxznt57dsP9/dRRv3G2igRpLw8SEholJDYGQ+Ljg46NBtvqZL6b/xTdTnKbXMAyV6ERzHQBY8YlAxDNi2/SgR2BtU3VHzmIM6ghaVvxJM2PI+1p793yn4B3tCTafIZhmcW7onCGp84KlaWszXL46J209snfG3liEN6xW+T8v9+x+04rue7INBrJJjqTOkOAMgQT6HAHhstfW/tOEb8G2uW0YI20YOxDxqA0DLHQZTw4ZGFcBYyHy0D3EsiQg7mrNz32+v3gx55ib1RjPGAxpgyOlcVgag8GZitO+ZCgJuEyI5+ZXJZbMzRgbieqG4clrH+2ZcdX9m++EYDb/sg1NZ2AMEAHgOwzHNFs/ffiYqX/fygjHD8QQIAYzDY/pniHIoO2pIXyAXbq8++zNvn9OtQ6zytKQNbgCIa3Tj2IDTMagkVESKAmJQU+g32f99Qb/xdET7CdOPL/1a28O5M4XOZliWaMg9+MZmAzqR+dyRpXxt+Vfa7wym0ySwaNd2w9EKKKAbRssBVCWIgqj+8BWaXLmyx0/zgtxYl2CocrUkIlBMDiyOkdG50jpXFFc5xTRoMQv7wv0uAIdThA8trSw5vVf5/fQJ6PjyCOTPz/hjNpVv3pq82mbIfZKJNjglxqNR+4+avLT5HqfwNdPB0Rlw8wAtxmYrhuBF7rNVjNVCu8nPdOxuMMNzp1oM1RbIQvIFeh3VmeoMjRUmxrSGoetM+jEc4RA5HyBPi9ARynAxryHF+4pvnb517P/fsS+VXkTBk+iINDfDRhJCbuqrIg7BYiYISYDtw1wqSPwvC2FlaLCZW/1LnyoLXdjU5prExIcGZMjGRlMLlFlcNSYIRDEDGKFwUKVLgUS+SAEotMJsLkUIOez/sVTEqd9oTq7Gcb4xRzAjmPESLQDBs02wHQJ4QLlRdjBYlE77Mnu3+m6mNeQ0hQbSAdI5W2NKW0gNyEgak2OKl1DSmcwGAuBII3wBQb9AE4g4Qig2xHQwO/733Nqr9zO+mf7gEjqCIq+p7W73CbBm2xq+aREUGRDi69lhhjgJoOmSwSugeAHL3Qt/MvG/M0NacbqbQ1ZkyOhMZhaCATNPgFRS6ywNMUOcpkQCAm3Yl27EAh0uwHaiwE2FfzSuVNSJy5qylItMd5rfEAkDUO83luqfaRj4JuBpn8po8kJaYNxS9d6zCB4eW42cceuSaODjahKKRHiDFpVEmyfv264vM0NjqmzOWqToVuYnMHUoUJlWgsjR7XJUU16YWiwI8G0NXIhBk9IDPgC/V4QukhJoK0oMNWUV105v+ne7WDF2IEgEK5e1XHIulJwWbXJa2tNhjpLxwSTBsrgg6HLCQYtqV197MTkIyPBiLJUOeOe1gcTKUyuTXFYBlPGmxqUGFoa6QFDKooaISAaGhOa6ofuIbEsBgK5QGDAFQqQHidARzGAzoxH75nNf4Kqus+GESRwSz7oX/Bq3rmhPoEECdgES8OkpI6mhK4EjTK4LjfAunzgJ5i49IxpVf8dpsND1/Pt+ezpj7X/DTZPT6zS0JzWYBKIgkgP5R7kJjTzVSbHFFtXfVAkoTyCwiexIRbMvB9FEEeoCJJh2rt/mmtc4FXX9RkhK7e5xhKNbmyMaM/55rnLu+5tTMlm2wjje31CwzTbQHPSUDQmIDodH60FD6sGg74zpqROnJO0BvRIxalaue3dnqbvPzv4ANKakU5xVCeYco3qBFdZoBtIJHSGJgLYJpHksMhtOIcW5REEBP0Ug5AZBV9iml/AqYleNKcT0k7ZeTC2Brq5xKtuXkGZ8BjosW0giA2LX+38yvuuf1VDEsqf0wZDXULH1KSO5pSOqogRFM42FDysy/noXufdbTztrNyQkbUDnpjo5mRdYLBU167iYGQ0Tbc1VCW5KuqoniA2NKU0BbByFc4UCJRek1DyKHwGgpL7EAyKGPP8PnzXaIORrgIyNUA6G8bZwa6CEPJiPn32sjEwY9tAkDbs//cPf6ZZOLbaCjM8ivmk6A2J8IeoS4zoJQUv+WgvBFj2nIvumzxgTwfQKe8UQMCBg3WgRgPSGpIJhpRJbTJwDkxJ66hNcPU35Q0aC7/TSXCico+CBrkSlaJCCNzgvYnmTBJIpIDsBCBdEzoEJVTdG1Z78w49bRtZJRFm20AQI/a8r/XmVBXbL22GvkoCRwJJfkyhjpQ8gETek+h3A/Q4Ah+878r8zz2fVUmPZXifLnlnfcpYt+kId1FgyUakOViSI2EyWDoD14ApqRAIMppAIBZQf/R3yG9GC0cqKSHgm908bpUvg5HxhgWkqgA7EzKiMAB0bgic5jknWDP32rQN99g2EMSIOX9Yt6SYEgdnE2EVqBGVGZQ/J+KsjwGOHwrZIKl5P9ZcXpO96NCF6d66tO4ZBqRueHLBjRsu2TDgn4QUB2wOWAwGJUwEREZHEhK97Q4apiRhmtRf7BayDAYVX7TOsIvTh7v8Z4GqGkDTAd0CDNpWpcEUgf7N0p2xz4nm7P037hAgDvjDmgs+lOLsVIYp0VLDo8JOFXdD/ksDJN/NOxL1gfHA6ydN/1nRG75ucPlz3XPueLX3dliSKyASTO3lMZ1hckbH5mU9cDZ4qJuSxdRDU6qai8oMZQtNtvIyqkT7Sni+dB/q6zMhI4hWsQ85JSA30Okf8+0T9Eyt86mBoAZufK1vxtVv9vwR1dC1aJZoVZxFI4xjpIBEEABBgclTp6XPu+rAuje3HICHvW/cuKSv5B4IiwSHfI3AYDDyHrx3BoBuHfUHZFE/1wotp58oahDYjivQ+UEO+XVFXNywCtfu+j6QygB6tL0S+EB+UKJ26jXeVxf/KQqln4TFtl2DnqZqce5vW1s6PO+ryISDDnlasWClpoqKAaAG+nPLz2j63tC27dAYSHOueKFr1s3P9d4KXSYUCAQICerKHPkXmJvA5JOrFPsqeyF36G8tYfDtAqTvAw0G9Ck2fmm+0Xcxe90EZ7YakpA51E25Df988Z1jCJ1jE8u4oQ+6S8kT/9y2JCflPrAlELmiAoNAIEwdIBXwD353XMPiA5vt/tEGQUXYW4OD9dcsy7WUpFiUSHD4LvDBKw7aXxkEkgESh2RgT9dVNkZuSMdJ3H4PubdzEGsIbR04wFJAcMlKZ81K/9vvd+lbK1Yt25P6FLP2fVdOnd07BibEQxwbI+K7P8z55tn3bjrvwx73ZGkwGxo5MPXMwHzpNGbNh35z7MT/XNhs5UZbj/AZ+DWre76Vlzi1xmQ2FVZUYVImSRV760YHtz/ci82764oNFFKlK+GvyUN86AIDGrCLBcy2ACbABXNO3C1z2V8Or34Shj3GyR/1tvEBEbqJIe5+q7PhwXfy+63p96dLxtiMlL7hiL1SyxbvU7WxOCKtjrslEH74dtfPGJdHZQ2oGoLS84ZEmJDFKXZrzsOVr/Tgo14feM8D1pdCZZxgAKQZdNAoULnMpjPmpFt+c9DE1+Ol6E+BxPiBiDsjX08anlr+KnoGHXLa+oqURHDh291ndwv/QgKB1hyoVplqG5ic1NXaAzVEUajPF3i+vYAll2+C/7EAJgBYYAANmgKEcz4wc4L1t1v/R+1tB05MDewAEManEeNFW5XeAO8UYkGbG5zT8mb3/KwpdUqlaZU6BmKKbURASFVdUjW5Lu/irr/24OMNDjBTQ21ax5w6C4dMT+G4Xau6Giz5f5OcP5zQddKh8gG08Y6x4v7tZ8TWOiUABIO+2fMP6xPy1EIQzHu1o4R71+dQZ4e1A2WiyjWSYXVJGSoxIsE58kGAtqKPtpyPn8ytU9llTDVVTjKAMw5D49065AMZrt1naWgH5SvRbs12ALLjgNANQxQDP7nRcY/qD+TpRSGmB0IoIx5Ym8OLXQ6qLEq+KKUO3aPG5Ki1wiqTgKD1B0rVe0oCq3pdLNlvolqfCP8Lo3VcW6s0nKpSxgom8Jil4c6MEOthGOM9pLZjXEOTCHJBUPuRECf2+uJfikLUi0CEoU/NHnD/qhye6CypspuSMNICtTRH65RGWGpTiKwzaaYZcp7A2l4fvz+oQYFTZkKcZEcUiUEhcHWNewbnLyWluDMDsRzh8v1YSvDtB4KEUhqQ3Y5oWldyT+n35XHFQFTTykmcDlOxRCYQEE+0FnDP+zmkM1yBQMMLK0soV1GJk2RosDlSBlPFW29OYOnhTaquUWl2xAi6ldosl2GRqSHw1BaXlsbfMILgzzWW/gwVq2MAZPyuQQxoC/xd1jvB6T1ucJQT0B6tAKeaIzo8SQAwVZOEg+4pBrj0H12QVRy6onpEcVLTiDn0Ca1HZEyG7oLA/CoLV+wXLrnFXB/pHsSE8jJUBUsUQziXOmOtJsRdWY5/6LpOx4e25jZjA4IEkBLJ1W4wd33JOavXZ4uKnmdSvaGMl+HMEx04fUa/IxAUKzhw20t9eLm9BKSj2jpOnsnvZbhUV5/S1cJP72CAu7/SiBkZo1yCK3ArNEJxovz3iO8q7tM1Wt/gnQZwf4aJv1i63jVKpPlkIOIQ+F7JWbS+JL7R4/oLHS+IbA47D6vRcFAaDVaGLCCGKI1QvTJVml/9aBe6fREWWlQfxR5MAiElDItD+MB5c7I4Z3ZVNNthO7HhsQsMY0kFKPH3ZeeJQKHJMXVtwIB8JM21pUkN62NibnVhpqvg7VXyoS8bKB32kSv+tcf193D8gNgeGhnNeAhAyAYV5uLfMjReUTeqUun7wZLALU/04KNufzgYVFK6QCLBcN6iGpyyR7Zc6qv1D2VMNOsVs13pGuUQW6EZ9P0WgHCuDlgkdO2phBB3Zk3t3ai+HX4+4rW2NttJVP/0pe7Sae1OMNn3gyFDozAWGx4CE/qpmgkSvshp4/ivyTD4xStNkkss/8jBsg8K2NjtQ/oSls0xd4qF0/apwuxaS+16V4bJeHEm1JzQ7VQojWc7npAogajUEvpIMbWyYI6oYOpaYDL+VgL+rVnDuIUxpnbL1fNH/6Ft2scFb83xC1PCTsJoL/qMBlae9YpOyyyo0IPRWBK7TSimIUsoGqg2o8+o9wZLVztfQ6IbMqFSD8psjKJSWScq9GK0JCwWXRWMo3sNzuRmx5ev9JYKX8gEkw6qrx8sA3HsHR9PffidfCvTpNxvr4T/tQVpXhCB1uvSssuQyoczPKTaZZbEA4zAiWeTBDPWDCWuEaDqsyh6NCZ0tbtVbjdyNbp/OENCgGIgY/esZMJIcY11jAylVfGcL+TLvUWs6CuxwQC5Xy1oamyMXoNQ7Sgg3i60qt0UWnZIQB4yPym+Mtdmfb7PB9wwV4hDY4y+GkycRMXiWQYl+o4MjilN4loGJGQK7WXQFl8ZsApKD2NPrHKRdgwBEjNuSMBjd6LfpM8lKeUbPSW82ldCrxOoxRQGnrt+/0mjALEiAqIiac9kmTxioS0X7ppgmx2P0U50bHjljITARLoRUz8S2LKWxAIbsUQJomRoTOpqsyhOmCqBjTVI3VuW+y2Zolwn6jcW2HBPhMl3+ovsxW5HdhQ9FtBER27HGcvdtKh5OBBH/37dtEdWyvWq6FdvGtEVPyRRXcfl1w9KY/pEjW12fLW/MERzAiccSMiaCkDKoMSJ11AUiO+n9YlqYoRaKa+Y1YiBKhJVRg9qU/U/PLGK71HZLWNYm3PxbGdRrs+7jMYbWxXPM9d4/tZFzQ3DXOOkpVL724q133GL/FLpy0a1ELnFoRuJ5im6PP6LKUysYayzFKjlyljkyou6XFYo9ghQKrUkijgERE3kGirsRkIaa4jSjjIow0Nque8IFNKBj51APtmRx5oBl7mk+JWpC/1bU+ez1mUN9uM/7T/pz/E57WFAnfdQ26x3OsRDL650mhDIlNKMkRcDZu9hyiP3TTDaaKKdrjChimYoDq2x6EUjiWes7PcRKI12JJaVIW+E+IbsidsfcpMwZ6HzYww0Mc91FeWK3hKjvdGRDCDKJjXuzrT1Jy29dOr182f0VZqm7r9tTWGKL73/yZmoTev6Td/+Y1dxsIddETjyZAQBZdrDL6KaDrlgnokjFyZYCUKdcYoHGydhauhRdl12pWiG4ohDaxO0lRjPnHKzOFdRj5NRFTtgkZtQuwRA0ZN4vrOAl7uL6uRdePeQW9Pfmq7nMkzcvqg+8fM90taXXcmODnzxYO3M6odPZsxVfV//Xs+lAcP+lskuumCXmtZKi6sv27h3Ludf6TvsSAh/xKoQRRim9lj239fEl75gIS8CFCJBjQW0EoDKpIymkmahWQFRUXZX7JuEoIQ5SCimoTbQDhll7S91lvBcR0FtN0qi5ZD9YQ2kaW6GY2mTxloeOHzq2ti2p6TU3/+g94iiZCcGMnje1Nlf2Q2rV1sDpeqzfIF5lqlffcmeNZSPly+a/OxlHx1U6AuuDRy+LxAMAR7fJYGEDXz5QBMLZpno9QN4gsYSR5mhKnWI4mGhphhhauVVqcowPYxhKlMNQXmj28HjmwroKPhlKYudWOUOnMuUwf8xSZOXPH7EjOVb+nf4yc9f75gXJK1rMkxeWXalq1fmGrvdwoV+gEHDLN5y1bxpvcMaWCo185XWU7yidol0xRzIUV7YlRLV9QyHHmhh9xka+lwBClnlkDssPQ+NarbDsxZbyyPKm8MSeH/Aw399nMf6QU8tcof1a5yHKgRgm/yViQZalh01/R/hUdAtr0tfW99U4PaFFjBQI/Sbf7Rvbf8WmnLx8s3z8yWxWABPfmX/hntPjnLxuLlJLW12d5//baeIH8BHQwhIxMmYnhJomsJx5CEm6uqZAiTWADXjcdUKYJKto7YcNUIBKafbLFzv3JD38fcNebzT64AigYpQysSoX07HlvmHdSZa9t6l+Kd758xRfj/yOvOpDxN6InGWzvhe1RquvWphw7r4ni2AUM1Lyc58sf1o15cn6zy46a6Dp7wystFsy4baUrf8vluQ30VAOw9kLDVXuVomMXUXjqMOs5BMQy3HVaa9ZM9kYoTFo9wgig60w8gZuooEQAGvdTrqWOEwh40qMJOzrjqLXbVnOv2bx45sHP2tYSnZN15oPyoQ8tSUod1y66KGF0baMyoQ8U0tr7XZb/aKb/mMNdsWbrj34OaPRjYw8Serd+3tTlzileQ3EQRW+H1FUkYJmiYxd56OAw8woCUlSpThRCl5ZdSgZIhyATow9vjHeby0qYQ8ic0Wl4oEg2lN/nZWKvurV45voDeFR71OeGrjF3yfnWNw/sbefNVdLYceOurrTJ8IRNzySU90NXc7hX93Jd9gd3ff8tgZe2+BvH3x+vnOoP7LoCQPgxwZYUKi6Caw7wE69ltgwOFCvRGvXEMdRmHqeNAzbUU8s6GAwdKIs+Sx9+mGa2ny/km2dvm6r+864u2cISyOe6itrlcT/2Zw5jb53f95z7HzhmveCNjGBET8zKEPty7o93GBxvhDx7w5+YEtXjqVYInvth7m5XBV4Mh9txDUyHMowiw6yMS8vQ213E+HTl/d7OC/1+UxUNjK+2dcE5auPd1o4n+1nj7zja0x4KSlK83VeupcjfPZjbq89u/HTivrwNaeqeTwJ90z7LsWKfm997ee4gbyoGTg3bHi1N230I8vt0j9hc3rv+kX9B9Jx99j1PdeBFBVx7Df4TreyhewuZ8OLavFzOFaQ6vUprYsa2hX9Jy528Of9OrinkvXHyMYOy6lyaVvfG36k2M2qsKZx/OMuverD67KrMhb57sCNTUmrlt58oz2kY3MaVmZXtOWXOzmtR9KX0wYVsMQO8j9Z3hAU/zmRyy2qigA13lrysIVDcV1d6+56OitnoDZ/fb3Z+V143sm56/ua+Tvuvfk0aPGDmXEyMZm37F2anvAvs9l0LoX1296+qwZpZH3TPp+W11Xr/sDNy/PRyDtMkNISKe7QGPkDooMnNL33kSCX5X0+n7Tc9EB5TfxRrY76473JnQE1vcMLoNJcuC65WfNH1Y/jGd2x6URn9Rw/a1rDyp57HRTike7Fu/2QBzpK5+p/96G3Xp62GVBwTsFQpgq0k71gIZIGDUtb5n8dxMziV9tOGdq29b6+6dHVlsvfijPZJo+J2nzmzedMf298Rg92r07DAhqfMEtrxmrRe0prht8qVrD9e0XzFw5Wqf2d9YudAa0XwRFeRgmOwxNzNN09lBNVruk67xdP9iaUZTuVy9Ze5jPcJqliT/3fGfm41GF9Wlx2LJa/dQtAtjthtXZtoB9VwTMrjbFf7RfNHPL1wikZKlvrz/SzQZnJqdp1w1cMGML0a0cS+b6dXt4rrjY0OWrDTruXnPRzG2dmhuXKTuUESN7zlz73u6ua5yvSblqYpN++/pR9GNbo538Hxtquxz3QjDBq238elRQt9XIGL7/TIGI+0//Ys1hviu/KXXtj86Pd3l8DOPCgluksapj9Td8pn/RMPl1uR9+eh34TKPGWIyie+YsXWmufdc6LQj4Isvk1+cu27ph6ZZ1X3IDnGPo7J7cT2c8NprwjrXfsd63UxgxzNeveb/O6dHPh+AskdBvGGiZQv+bJXVlWtbu7jp8MWSwdrd9dv3typPD1aOdce10IIaM/nBWKccu1ph8sSoVPNKb088FY+malHVdR0vj5p1hfGUfnxsQ8SCsH310BEo4wbBxU+7Kqe/sbADi/v4f+lz97xYENYMAAAAASUVORK5CYII="},30757:function(Jt){"use strict";Jt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABMCAYAAADUQBHfAAAAAXNSR0IArs4c6QAAH5JJREFUeF7FfAl0nUeV5q2qf3/7k2QtlmzLTkxsZbdJCAFis44hhGZJSJpu0j0zjc+wZBrmsHRPM4hzukP3YQ8wEGAG0jTQOExDSA8hIZAQZ2FJIAlxdjveLUuy3v7+terO3Prfk2XHi+Qoye9jS++9f6n71b3f/e6tembwIh+IyG/dWy9yjJylI73TY4xFL+aQ2Iv58Jsen8qVc5lSS8VWCCGYAWJPv1u9IJerMsbkizG2FwWQO555xlFGrgfQcLpGhwBQAIAAABzDTmq2U9lUhgZjDF9IYF5QQO64A41oTbNsRDIHNgCP2LOeXw8BshYiIRVxK7TRPfTyEea/UKC8IICMjyO/5OpqnjNW8gUT9gKsU0QyMmrlVvQdWs9YvIBLT+nU5x2QWycw48lKDze4OXeEUcSYZeFxw+HozxMflC9Y7Q3DeeIXdUrWzuOi5w2QbdvQOuBOloSbd6OwxizbPiEXcLISjw/QrC1SJWCVqxuXQAtg8fll0QHZgijK+xpFmyUZzlwWhQGDDnVa6GhQIhYc97l0zok+p+vpHBk1I4m9lY2jjHh40Y5FAwQR2S1Pz+QyHhQU5+JYI1wsQLr3VgjIQbRy+3O19esXh18WBZB796Drw6EyN8QRPLFo03aSG2UsW7bqYeNXK4r18efIL88JkC3btlkrR9bmVey7R4+Z8uSz3pwnQse7tvv+0Z93X3OFCcRebf2QTtOnpF9OCRDKhA/urObDfDFrMJ/P087n/TQdQkHAQmEGtcZE7Y2nn056b0HHwgBBZA8dBK8h2gUUzDhVD1jQCE/x5BYCmu24ddFwvraQMmDegJDcdr0VBcP0F6KrTtGcxbmM4kYokApb9du/0tsaHz+5fjkpINfff7957up1eRb7Hg2TMzjpNYtjzuLdhYCxExUlYaZ2sjLguMaNI/JLK5BL0M9xALbYQFC8k8kFFxS0U+Np4IwBC5+H59H96ZlBJINXDmRJ7R6zDDgGIMju33/ABbNQSDgTxBM0QLvD2mEAzHZSY+ayPZ1DpWr3s+PNr61QPdmK7S2P1If31uJlu+q4gmGSAyHw/AGzVbLZrpGsufOVq0p7CoaKBGfHJO3umOaO52Q+1b2m1W5jf6an+cDt0LziiiPbDEcAcv/9aGYGGnnHypnYmcGTPWQ+n3se4FS7xa75+cEzt01HlycIGxWDYUR0BeO65OUcYKzXBlMwNDjzBce9BUv8fLTIf/wfVxf+qLwM8vbihqv0QOVa0B4YYK2uHUcA8je/2dtzXjY21/eu0B5A7jsfg090jlSgNv9i+9hvD0QfTgA2Gpw5HHD2xpylrlewOawsWsRRYHCuATIFOYcKbMFuO73X/exfrnIfDznjHmSe07BoglpUCWWA7azOGPBUeWLjRpZom+femQCRtaZdcBw8d8TDNZ6HjGVOCRTysN9Mzljv/+X0f2nF8v2CQU57glZMqNGm3wkAsns0b4NjMDAEgMHoJwPOEEw6gTEwBTSyFvvyX53Z+5UBy01OdbK6nj8hfKNSDw2JiLndpf3HByRupmm1DTBYdvC1I8sVzcdCBkAP/cYf9xU+/0DtOgX89YZQjOKCalkCQb/QfsEgZzHo9wS4hgBySEGAcNCAGJyB0B7D6EK0OEPB4NZNQ4VrLh7ONxYyJvKK6XaLhYzxQ1FoVBqRIDAylq0O3L7jwObN6zXJPttDuoAQJm2AvOPg6T0eru/tw+w8Qgg9wG/8el/hCw/UvyURXk52k5Gck1ek/iiUBEvF0JP3oNVsQT7raVdRiYKenAtZm4EfIOQ8RpkBQpl6Ut7mBAi6Fr/7dcvz/+ni3vmBQhPkM2DTsW/ur9d04ek4DkAQQGzZqlLZcWDz+nkAMhtObQAKowuHXdWfyQD9IW4QXE+4TmeUlunnPU/tdzbfW/taomCTDhHNEQgMEeLpvVAo5cG2bWj7AfT1FKHaiqDgmcCQQSuWMFxyYefuGKZ3JLD0XAtGe02YaktyEBjOm/DwzoNwweoBzNri1uVO8L41vW44Wiyr1Y4nm3N0UndMxJZS+Ma+etVoNTjv9gpyeRspK1YhgOiuffvm5SFHM5ehHCw6Hr5hmas8zCK57NHZ6GX/+sR/qwTqI6iUzh9cxhAf2Al8aCUAKii4hg4JSeFiIkSKQ8YAoJtNVBIo5QW0Awb1qoQlAwYMZATo+zAAz+TQjhX0ZQwouEIpFX95fz385mOTqpixzOgdp+cnN5+daQJkoc2AyahttAQzEh6mQAQAU2HISEfkLMQAHLBswOmZ7fsX5iFzkWkDRErhBUt71FifhwRM9+P/fNv2M+/ZH9+UEVHOkCHUqk1IvB6ARAFYJlgCIe8AuAaAYMQXXBNolEgwDQHTLQU5l8Pe6QRQIZQLBki/CetGe8ExOTBAiBWAYzJ6TeFTO6NgvrVXmE997f6DSx+ZSFbmXVb/xw3Dj5y3ErF1jL4MARNUKWYCaDc4dwwpp7fu339KHnIELm2AZcWyOr8XcXnfErVrCvhlNz72TYXqUvPQNDR2NoAv80Dl+zR3cEOALQCKDoGhUsIUHKJYwXQthP6yA4lkkDU57JyO4PRBF3IWh0QqKLoCHINrLyF2pyA0BEPKQBzUz8Y3LL862wS44emKe+1t+ze0fez/2Jt7/v01y5gPxBVHHRqUgP4GoNDB5tbtzx2Q7jMi5eBYyVVfuK9+7hOHkh8rmTi8WYdkfx1gpAxge8B0Ck0zRsYC8AylDa3MtKDck4NQcSi7DDwjVSghAizPmZCxuXauhh/B3pkWnLu8DIpSFTKNi2Uw5Bzay3P8sj9fU3w0EdyYDIC/46u7NvntePRf3rPs+qV5VNExkkEaQgHM+IhDBwf3nTztzkP6UOhMNhzrN7uavbur7IOKiXdRpsC6BIgRwGYAWZ4yK6T6QnAGDouAcQ5BAlDyOFiCQDJ0GM20IihlTBjtcbq6BNsRsihRGgTyFETSJqhBtgVXrgnf/Miryp9shsyg5/zyyab9N9+ZGB/pt2++6X29dzdDLo4Jis4yBZV70p2HDjkJIF5sq399stH3zAQMD/fB5O66+d1YypdoeUGBTgsFNDxi0I6nEyxKSoBaHdzeAsl0yFsMbJPCgYHNOUy3E1hasGAob+qw4hxQKcpgCL/ffhBWD5XBc8xU0QqtZtEQ/Kkrx7KbBnKWVpuUYTZ9fudl7RqsuWO8/x85uCwOGZ/bvO42sxNlK+O5AmIohT94hA1t3x2ctXal9TvbEe4j+9TWBJUu+1LJNVfmdAojvw1AbVdkwG0BSzIURggWhRTnYHEG1XYCy8oulD1Dcw7TAkYxpQBm2jINO1uASY6XCjjkAP4ZJf6mt68b3h4Gvk7/7/76rgue2pu846d/O/QRz3WZjYBhELDkqGLRULZKngsgBMa/PZT0Pv4Mu/T0VfYt71prTnz7cX/D/hr7nlRKz2SX+AiW2aUWUliNOkAml4YQZ5C1GBTtdM2J6pYwUVCrtGHN8jLkLANcM+UdMlwqBD9G2DfTAIMhrBoopumYA5oMVH+eb77q7J5bDQZcoY+bPjf5lnZdrX3wn0b/oRGAFmO6L4KAcRjybgglCpUxVNq/kR2vlpmjVI8VNcQb190k/9LLwuPXbMrcY3GfXbcV/rQRi886QoHJEfwENT9oQMhf4iiVvXaOUgwwi3iAOAWg1yOjFXDOIIhTfdKfNSBvpZnFNlJGJFAoEg+1KSUrGMhZnVSsvUT1uvzjm88v35BwEA/siMz3fmvPtX095s9+9bFlt3UBORYohkL16IGFKtUOMiTMvn9/a+SZp+MP/cnr7I+tzrDIyFvy+ntb10gw/9YVqA0lr6iECJFE7SzYoFARALaVFkU8rWtsjpC304KOmKZSaYKdcaGcNcEWAhzBwDZEWssQNxA9JQoafgBRuw1jK5akzia4Knns7z988fD11cDnb/3MrjdNVJO3/dPV/e/fdHo2CI/KMnM9RTk2Prrj0QVK9y4ghiW/8KP2ZaGP5378ne4n25gYhmHJH/whel+sxMcTKdMQQQCf3D9EwOp06hmGCRT43SKPvIIAtATXmYdMrrZjyLoGFByuq1wChTyDsg95UFoFcy3xW+0ARvtymmeE4Cpv499/9JLer13+P3ev3/Zk8omz17h/952rhx6J06L6WUcXFD/wQT1ZPnBKadcwYvnFH7KrohiWX3uF86kpTAyMpbr5SeNdvhSfQSV1rBNdKKWgESloT04B5Ht0tunWNgaXOlzmpmJkCPV6AD1FD3I2B1fQ+WnI6VYAZxokQwiIpYJQKrBUAkNlDzjjqi/D/vstdzWe2TOR/N3AMvszt75/5BfHA2MuOi3fx1MHRCn86u1wfmVSvvfdb7LeM1BCJJK96QljQyth31VSaTNpwHTUqxUIjZzOvKYgl0+LPNkpgGjGtWATDOJEQlirw+BQjzbc4rwTKgiCc32ObgWw1KMQFdz3y6fhwktGoZCx1IOPBVsP7I57Viw3/uGm9624ez5g0BifEyB0g4f3oPWzrfFXMwX2vf/6lsxtEHF+185o2YEWuxMBnUSSDlAQxRKm9uyG4tJhHSaEFAGRUE7sgEI+QMbqYk9RycOg6AK4ptCGUzqmcwmAFBDqkaSedrCdwHQzBgcEVCakUk38+YaXZcc/e1n/3vmCsSiAkCD7yp3++VMHkmuLS2D8vZdm7ztQU9avdqifc4CXkMEKGLSCEBoRp91AOvYpHZOHaEAUQqK9BNMij3OQQQCYxNCrBZtuI4GjwyZVpAQIhY1NfRNgsGMqhsndkQZrdIXz9AdfV9j00oFsuNDVgefsIYQqxrb6X7c3XjlzEP6HlYEfrz/P/fZ0pD6kFH+vUqir15m9k5AZ6NHG0iyTWNOhQn0RSTyjNNdo0zkDSZIfAMoZEmSpUKPOmkPhonuNAEEEMFNVUJlM9+P1DxkwOmjjUJZff91rln1iZ+RbC10yWRRANCiWrW66qzXy1FPwEUzUardXPNGz1HirYTBjcucUtJ+ahsK6EXBzrt7Woj0ElQaFgJCKAEnTNBkeBwEI04RyhmR52lOlQk9GDGo1Bf6MgjhCcAscBpYa0F8wtbI1BEQXDGWuvGb1kq1Vs21GjPFGCMKd5zrrogFCoJBIC4Qlg332VTsOJdf+7rG2GxARCAkYtcEYzEE2JzQX6MqdQoZSMwNIJJEreY0CVAziWg1otdgxXYgDBUmLgaSSVCC4eQ65EoOekgDPot4rZfDUg84fsvB968u7FPLPWUr9KEhUHHMmaE1pPuGTICj/4d9MbNy48Thd95Mo1W7KCgNLXrzUW3JaT/avXcO4HFDmHpkO4f0/OQjTBxPQ/byOJiHhrImV/knb7mkYETLaXTrFD1WwFgczg2BlATIeB5dSsME119D9SIdQiFFsWIaAT7yqB4bzFt1SKcDfcRSfiiPr1zwDrBX6pl5oO0EvOAXEPcEyxEkAacZSjTie85rRnqsyhvEBBBykFEjzT2P+3qMNuOGhOkSSZDwZzHTvw49SMiXjCSdFupOnRMsFg2hmCkTGg1w+C5YGQIHOQuRdjGvVmmYlkvFkIYMrz8zD29bkdGgR/1ABCIyFqNRPODc+HfjhLt8UFtU3xxJn9N4pA0LhkQQBu/LMVRvKtvlRBDhLKZVi32na0O8UBtfeewju3x9oLiCeoPfiJM0qdG7KHenPSKGW44EvQVgCsnaqMyjMBE+zkPaKOVmHPOT8IRc+9vJefe7ctYMuJzHGp6SU3xCMfaseybaKmHGsHTwLBoTql1ak1GtWlc5YnrE+agj+WoWKljr1QFJuSEv+tOTg0E4S+ORd0/DoVJoWI+0VqGdQZxoiVECotWII2/ShVinAohCs3pz2BvISahyR15FXhAmDICJ9o+DsIQeuf/OwbjqnR3cER/oB7YJGgMfjGD8bg3Mr1btHa5QFcQjxxFlDXt/63vxmy+BXKyVz+vEsldTaPQ43P2ZnioxoRwo+/etD8Lt9qaeQ8NLCTKbeUWvH0K5FaRlLdh2sAsw0AVYPUh4GYXEQujuGIClNU7gBg1etysDn37SU1miAI2mS9P10B3j6uuu03X3SjLEEAbZGMXy6geqPGQDW5ZWTA1Jr2k1TqmW5ovXqkdzlOcv6a6nUcCoaUp448fatdMlAx6dC+MGjNfjho039O/VHCRjqe0zOBGk3Xgc/pR0EaCUAeVNnltmJp6IHqXXI4D0XleEDL+vr1Dg0nJQcCGiaJL0SrDtm3YWA7jpc2qMRwFoxqh9FkfqiZOwAtQpOCMgH791TxqRhX7py5OLhrPgoAlunFK2YHL0V4GgXTV/PZpKO5+qlSwawoxLBP/+xBvfvCyFMEJpBApUqfQuk014jkglIv1PTVAEYnVU++tVkcPGqDHz4kn44Z4k7WweloZp6BAFBeNI4iXNSEQhpV6gz+lQU6uVR5AwnY4lfr0Txd0MQjfiR304eM+3+Ymf1/IG89QnO2SZUSL2+jnroREPHO+jGqfEpN6RDO2phtGOrLt0767pPV0K4dXsLfvpEA5454Ovw0Uc3RZCnMATDABgomPCq1Tm46pwynNPvzGbwY2WLudOjJ6HTbzmaX7qOo7N/h1/8WH1G7nf+ZWws/Z5Ox6fGOYyvNe76q9f+JG9br7I4d5DWFjXZdW7b+fXZ31/oPvYwr3SletrHONIEeunHEnbWIth+KIBnZmKoByREELKWgBUlA1b12LCqaEPeMfWKHo0j5awOf3VKgdQbUuXbbRXMjrjbeOkQbpfqusFEgCQKwwMtf8qPog2vXd6/owMIsos+d6MzFQxkv/zusZstwdYbwOOSbXKDcxMVdSpQ5/5nHZ276/qTiohOBu6Sfrqw1HECqmES2gGndOmuQZNKG6wr2o5GSwVbmpHoUtIhGccC17a6fqhvSCGQ7pSg6w/zBvEKXUc8ku4y6DDeEWuuKKf8qD3RDM0EsG0hv+hNq/qe1IBsGB83JqxXFKQwl3zuyrXfzVrGeRQIElFmOI9ztk2ikMZ75KEx6JLsYefsgqFnpJOESJBFcdLZSYsaFOISSseRlu7pA6hVyFDp2KduPCUOAiyWEmzTgCWFDDWDnj0xs6CnH3VDVL848jNshHG4r+FDW6KFoLhgbEbMAoKMXT6+xdpRWNkz06qNfPHPzv561ubn0MgpvGkyGWBUtm2Vtw2bJqVLrzQPR4fD7EiP2EPMIEySTtqkrKJ0E7oRIfhSdkgybREQAASKwQU4XIFBswxMg0bzXPAc6Mt6aYh03JH4THYJvRNaGocuEGmhjL6UyUQ9kNUwMRkgZRcg3wfGZhjwl79lZd8TMI5cA7K73LdkoslGvvSuM7+etfiZ1P7TPEfNHr3AjMrmPBrOutw2uKkOe2MnHrpTcThSZ7mGEkgitRjT7osIrVhBM5TQVmRKil5XcBJ12YKDzRRYnZvEmg1podyGwUIWEqV0yu0eBBD1V+igLE2hQmmeDgWYTLeiuBokhkRlxLSA3Fkfph0ynPFKEMFFV5xxFCDVJi6/9PzB17/6jL6/cG22TEtt/SCK93RdBBQkeceMhrKOJRjTCwSHs0unWNPYHHaR7rXk9mlGUlpoBVTfJLS0kHKGXqWjMEQAU9cxlE4praZjoOp2pJTTPVWtazspPZ2KNP0Sb6QcoiW0qvhRNNGKWCyVpf1hTtuBQFGMVabb0fW/373nU19648vq4+PjnI2Nb7GcwkBP3U+WcRD9+ZzR886XLn3d2sHcpYxhjgZDKlErRWSQUDZHjJdmPdXnWVanx9OZrHTW5pYXNBn6UqpbEqlnV2+hUVL3XqkNS+5Li08ax85Mdxe46K2MY0JPxk2bTXMYpFNIzb7XyUIYShlPNEPViqUpEQRxmL5Oz6kGLp5uRvfd8eT0db/ZMXNP6PiVp695YwgECGy4wzjrDa0cOrmBOMIBDliQCTgvWZoffPv6gbf15uwLk0Tqr33QbOp4pcYNonIED1flMzzvGPRlMe2Ix0vL3ZmkDBMrpZvKFJq65dgJgbQeShOoSTximbq/St2zuV+26qbYuSUMZUGqPw+1o3gmiA1ENOl+JIYJhFQkMmyGyTNbd1S//aM/7LmHmTjRx70Jux7W7xynfohO8sBOu+4pq2DXclGj0RsjKykJRY7cA4b2hjN6xzas6XmnY/KVUXepck4oRRKTgYwdnVHOmQZjWswdwamzvjPHe2bDP9UQdAF1v7ppMg2VVK12SpS0s3ZE0XD4FWdMNcI4mm5HPJTK7F6m70Gkq8cLlccONn/03d/uvflQzZ90M0bFFGzaSYzmfR96ObWi9LC7XMzGtjxqOjv2u6FZyINSpVCGRcF5HmPlOS7PvPm8wUvOHM5dxpkqEZ8QiaWd8tQZBYd4TSmnhnIOaZduNaK9qbsXtdt9PzpvkrG07JCaeGRQ6JLgONUT5aUYVXioFUIzlhY5WHflsLOzjVw22lsNtv7wwYnv/H5n/RnPlTVHmBWJSb1Y2xncOf4XtMF59qFHyovLUQyN/bs9mB30IuHnYwklJbHIOGRRSndZOdf3xvN739qfty5WqKxQN91SEUShROFZtI34rHIOSq5lSUS9z2yuZO7G8iwoHWupm34szzoM3mFYtPACiBthEjWi2EZEQ7ckOyfTeAzOVcVPnvrF45Ub/u3hvb8zuVk1XVbxuFGV5qS/snRpeONR27rneMiRc7Zh/A5jqm/KYdayTNxqF1nMyyB5HjhkpUrsdaM9q1+xunRFxhZnkNFafaZJVRsfSSWX5d3o7L6CYRvCILVLMrvrwt2dibNJmjKL9pDUP+YWbR0u1Hfv5DTVljJohrGhEE2pUO84ID+iLh3dJUSc/v2exo3fv3fvTxuJmjY8XrWSpOZElWZQXBo8sHldcrxvdB5Djx+eu7HxLWb2tGWOP+Pn49AqJjIp0zIql8w1hHA3nrPkFS8ZzPyJIbCPshDdjAiz01lHg0Fybl8heUmZ9vzNDaNuQyntqNF1h3VFmjp1iuyk0c6IMFYqaoRSRUraqNSsZKWwJf6RCOH2Q/7W798/ccND+6q7Miavcdua4dJuDooD/i0zv41hfPyE3/k9ESDpOMaRb1h+pxVWbK8l40KUyLJSUGTCyCJKp7/glV53du9l/SV7o1LSoVSqW6edJYZEIfY4ZviywTL0Z2xb6c5yenSDQNcsc9LTbF3WRQIwrodJ7EtlccZILTOpl03TliQwoab9+NGbH5r85588ePAB0+U1y1YzDnPqItrVvu8+iODGK+b1nyucHJDOoLphJPhSj7VVsa2ghFFcNAyRkQrtsRXFVReuyr0z6xprk5hmTyvctIuVFmtytOhFFw2WhGdya26FSo/QDek5R4dPpJ9gGEppxEqZSqKu5RjnKpGJXtwIE5y8b1ftB9ffvetnfhLPeLZZccGo+uVaszzy+vDOzqb+o4n8eK/nDUh6A2Rj4zeaYXmZk2NJNghYWWJcAmA5Q2LGEMy9cG3PhacPZt4mGA50dwLQLNJmFwkMDUB5wWApPLsv53BgtKNE88ZcQMi5EsQoJN2jiCcU1yt+HTnOOSPpEj451b7tG3fv3fLEZGOX52DdM+xKYhuNWjgZPP2BTVGnrzhfLGa9dkEX6JMv3yJWjPWZmXzoWVYuF4ZJWSZYBFR5jswpZJ3SxWt7Ni0pWq9FJT0Sp1qid4RoggqLtog2jPTiioJnKYW8sykGJUISKkX4mSReycXCWOpqO9ZCnsmpZvTwD39/4IafPHzwIdcWddPFiozNWh7Av69+UQjz+G7dInnIUbfZgmJd5QFbhe2MillJh1GiCgZClkTd6EBudN1p+be7pjhHAgpdDzFqGqfNjigBuarkRq9Z3idKtiECqWKJKBjxxGFBQlmMsGGNMDlw5/aZ733z7t2/DKJoxvWgKnhxJhI13zFy4Ymyx3xnfYEhc8zbsrHxbWZY3uX0s4FsJW6XZKKKCFhgyDyB4Jx3enHd6IB3ucFhaVpJd0WdSsOIQ3zVGUPRQMbJEGRUXXdaz5p7pcLgoYnmT794x/Ybdx1s7c+4rCYcc4a3/NYSLw5uuWZTtFj/McJiANLJRuN8BSy3cktOc402z4dxUlbAC4iK9ItTcEV+3Rk9ry9njf/AQOVoI25HtVNWkn+6ZigcyXmebgkCUINKV4H7a8Efvv3rvf/7lm2Tjxser3kKqlKk4fGG/x8e8/nq6Xy9o5v5FnL+yc/dskWsq7i2OlTIsIJRaPpRicLJBFptTeyBcm5obDTzDs+GlypEQ5fhCuSfrR0Ol2Ztj0ASnONMEO3+v9smv/P1rbvvVoaa8UynylhUlaHfLresMC3GFv9YPA85cmxs3fXXG83qgGNkBzPgB+UkSkrIeZ4xzAgw7TXLvLOWD3pXCAErpET152PD4XDW8RLA+m931W7+3B07/s/eWnAw77EqMF5te9Aw9uwPt41fHi9WeBwLzucLkCPCqFg412FyptBKrKKKk5JhshyCcjOumTlrtPjqct5847vXDpkK2YNf2rr723c+NrkjY0PV4qqCgteKRQju3LUhei7ZY76+9PwC0h3F5VvE0JhrZ7NZz7JUIU54SfmsxIXyQDGzXPJ61i0t5W7bdvBBAFmzMuaMCbLOba+VO9CInq/weOE95KgwgvE7xFgfOCoSOUPKgh9AUdiWh1HIkJnNfE7UILFqTj5oBokTPLB5PfHEiYvg+U79PM97YTzkiMEgO+26W6ysdF1mFLzAb2QswRkmSdvEpJHrN8I7d/0qOlkRNk/7FnzaiwBIZ4zj43xT+QJz94xrQh9A3xQkfWun4huvmF8RtmBL53nB/wMjwfnDaT4WWAAAAABJRU5ErkJggg=="},16471:function(Jt,ot,B){"use strict";B.d(ot,{ZP:function(){return zs}});const I=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},be=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=Re},Re=Number.MAX_SAFE_INTEGER||9007199254740991;let _e=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),Z=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),v=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var me={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ie={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class l{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 H{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 l(e),this.fast_=new l(t),this.defaultTTFB_=n,this.ttfb_=new l(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new l(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new l(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new l(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,i=r/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}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 F(a,e,t){return(e=q(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function E(){return E=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},E.apply(null,arguments)}function x(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,r)}return t}function T(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?x(Object(t),!0).forEach(function(r){F(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function L(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function q(a){var e=L(a,"string");return typeof e=="symbol"?e:e+""}class Y{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=$,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 $=function(){},A={trace:$,debug:$,log:$,warn:$,info:$,error:$};function M(){return E({},A)}function O(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):$}function W(a,e,t){return e[a]?e[a].bind(e):O(a,t)}const ge=M();function De(a,e,t){const r=M();if(typeof console=="object"&&a===!0||typeof a=="object"){const n=["debug","log","info","warn","error"];n.forEach(i=>{r[i]=W(i,a,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return M()}n.forEach(i=>{ge[i]=W(i,a)})}else E(ge,r);return r}const he=ge;function Me(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Fe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function ke(a,e){const t=Object.keys(a),r=Object.keys(e),n=t.length,i=r.length;return!n||!i||n===i&&!t.some(s=>r.indexOf(s)===-1)}function ct(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const p=c.indexOf("\0");return p!==-1?c.substring(0,p):c}return c.replace(/\0/g,"")}const t=a.length;let r,n,i,s="",o=0;for(;o<t;){if(r=a[o++],r===0&&e)return s;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:s+=String.fromCharCode(r);break;case 12:case 13:n=a[o++],s+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=a[o++],i=a[o++],s+=String.fromCharCode((r&15)<<12|(n&63)<<6|(i&63)<<0);break}}return s}function ae(a){let e="";for(let t=0;t<a.length;t++){let r=a[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}function j(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function ee(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ne={exports:{}},oe;function re(){return oe||(oe=1,function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(h,c,p){if(p=p||{},h=h.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return h;var m=o.parseURL(h);if(!m)throw new Error("Error trying to parse base URL.");return m.path=o.normalizePath(m.path),o.buildURLFromParts(m)}var _=o.parseURL(c);if(!_)throw new Error("Error trying to parse relative URL.");if(_.scheme)return p.alwaysNormalize?(_.path=o.normalizePath(_.path),o.buildURLFromParts(_)):c;var D=o.parseURL(h);if(!D)throw new Error("Error trying to parse base URL.");if(!D.netLoc&&D.path&&D.path[0]!=="/"){var C=n.exec(D.path);D.netLoc=C[1],D.path=C[2]}D.netLoc&&!D.path&&(D.path="/");var G={scheme:D.scheme,netLoc:_.netLoc,path:null,params:_.params,query:_.query,fragment:_.fragment};if(!_.netLoc&&(G.netLoc=D.netLoc,_.path[0]!=="/"))if(!_.path)G.path=D.path,_.params||(G.params=D.params,_.query||(G.query=D.query));else{var z=D.path,ue=z.substring(0,z.lastIndexOf("/")+1)+_.path;G.path=o.normalizePath(ue)}return G.path===null&&(G.path=p.alwaysNormalize?o.normalizePath(_.path):_.path),o.buildURLFromParts(G)},parseURL:function(h){var c=r.exec(h);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(i,"");h.length!==(h=h.replace(s,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};a.exports=o})()}(ne)),ne.exports}var b=re();class S{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 V={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ve{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,xt(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={[V.AUDIO]:null,[V.VIDEO]:null,[V.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 S),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=b.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[V.AUDIO]=null,e[V.VIDEO]=null,e[V.AUDIOVIDEO]=null}}function He(a){return a.sn!=="initSegment"}class st extends ve{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.length){const e=this.byteRange[0],t=this.byteRange[1];if(I(e)&&I(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(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const r=Object.keys(t);if(r.length===1){const n=this._decryptdata=t[r[0]]||null;n&&(this._decryptdata=n.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=I(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){var t;const r=Object.keys(this.levelkeys),n=r.length;if(n>1||n===1&&(t=this.levelkeys[r[0]])!=null&&t.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(!I(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return He(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){const t=this.levelkeys;if(t){var r;const n=t[e];n&&!((r=this._decryptdata)!=null&&r.keyId)&&(this._decryptdata=n.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,i,s=!1){const{elementaryStreams:o}=this,h=o[e];if(!h){o[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:s};return}h.startPTS=Math.min(h.startPTS,t),h.endPTS=Math.max(h.endPTS,r),h.startDTS=Math.min(h.startDTS,n),h.endDTS=Math.max(h.endDTS,i)}}class tt extends ve{constructor(e,t,r,n,i){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 s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.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 Xe(a,e){const t=Object.getPrototypeOf(a);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||Xe(t,e)}}function xt(a,e){const t=Xe(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const et=Math.pow(2,32)-1,Ue=[].push,Yt={video:1,audio:2,id3:3,text:4};function Nt(a){return String.fromCharCode.apply(null,a)}function Sr(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function wt(a,e){const t=ze(a,e);return t<0?4294967296+t:t}function Er(a,e){let t=wt(a,e);return t*=Math.pow(2,32),t+=wt(a,e+4),t}function ze(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Oe(a){const e=a.byteLength;for(let t=0;t<e;){const r=wt(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function Se(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=wt(a,n),s=Nt(a.subarray(n+4,n+8)),o=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,o));else{const h=Se(a.subarray(n+8,o),e.slice(1));h.length&&Ue.apply(t,h)}n=o}return t}function qe(a){const e=[],t=a[0];let r=8;const n=wt(a,r);r+=4;let i=0,s=0;t===0?(i=wt(a,r),s=wt(a,r+4),r+=8):(i=Er(a,r),s=Er(a,r+8),r+=16),r+=2;let o=a.length+s;const h=Sr(a,r);r+=2;for(let c=0;c<h;c++){let p=r;const m=wt(a,p);p+=4;const _=m&2147483647;if((m&2147483648)>>>31===1)return he.warn("SIDX has hierarchical references (not supported)"),null;const C=wt(a,p);p+=4,e.push({referenceSize:_,subsegmentDuration:C,info:{duration:C/n,start:o,end:o+_-1}}),o+=_,p+=4,r=p}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:h,references:e}}function ht(a){const e=[],t=Se(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=Se(i,["tkhd"])[0];if(s){let o=s[0];const h=wt(s,o===0?12:20),c=Se(i,["mdia","mdhd"])[0];if(c){o=c[0];const p=wt(c,o===0?12:20),m=Se(i,["mdia","hdlr"])[0];if(m){const _=Nt(m.subarray(8,12)),D={soun:V.AUDIO,vide:V.VIDEO}[_],C=Se(i,["mdia","minf","stbl","stsd"])[0],G=pt(C);D?(e[h]={timescale:p,type:D,stsd:G},e[D]=T({timescale:p,id:h},G)):e[h]={timescale:p,type:_,stsd:G}}}}}return Se(a,["moov","mvex","trex"]).forEach(n=>{const i=wt(n,4),s=e[i];s&&(s.default={duration:wt(n,12),flags:wt(n,20)})}),e}function pt(a){const e=a.subarray(8),t=e.subarray(86),r=Nt(e.subarray(4,8));let n=r,i;const s=r==="enca"||r==="encv";if(s){const c=Se(e,[r])[0].subarray(r==="enca"?28:78);Se(c,["sinf"]).forEach(m=>{const _=Se(m,["schm"])[0];if(_){const D=Nt(_.subarray(4,8));if(D==="cbcs"||D==="cenc"){const C=Se(m,["frma"])[0];C&&(n=Nt(C))}}})}const o=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const h=Se(t,["avcC"])[0];h&&h.length>3&&(n+="."+Be(h[1])+Be(h[2])+Be(h[3]),i=Q(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const h=Se(e,[r])[0],c=Se(h.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=$e(c,p),p+=2;const m=c[p++];if(m&128&&(p+=2),m&64&&(p+=c[p++]),c[p++]!==4)break;p=$e(c,p);const _=c[p++];if(_===64)n+="."+Be(_);else break;if(p+=12,c[p++]!==5)break;p=$e(c,p);const D=c[p++];let C=(D&248)>>3;C===31&&(C+=1+((D&7)<<3)+((c[p]&224)>>5)),n+="."+C}break}case"hvc1":case"hev1":{const h=Se(t,["hvcC"])[0];if(h&&h.length>12){const c=h[1],p=["","A","B","C"][c>>6],m=c&31,_=wt(h,2),D=(c&32)>>5?"H":"L",C=h[12],G=h.subarray(6,12);n+="."+p+m,n+="."+we(_).toString(16).toUpperCase(),n+="."+D+C;let z="";for(let ue=G.length;ue--;){const fe=G[ue];(fe||z)&&(z="."+fe.toString(16).toUpperCase()+z)}n+=z}i=Q(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=Q(n,t)||n;break}case"vp09":{const h=Se(t,["vpcC"])[0];if(h&&h.length>6){const c=h[4],p=h[5],m=h[6]>>4&15;n+="."+nt(c)+"."+nt(p)+"."+nt(m)}break}case"av01":{const h=Se(t,["av1C"])[0];if(h&&h.length>2){const c=h[1]>>>5,p=h[1]&31,m=h[2]>>>7?"H":"M",_=(h[2]&64)>>6,D=(h[2]&32)>>5,C=c===2&&_?D?12:10:_?10:8,G=(h[2]&16)>>4,z=(h[2]&8)>>3,ue=(h[2]&4)>>2,fe=h[2]&3;n+="."+c+"."+nt(p)+m+"."+nt(C)+"."+G+"."+z+ue+fe+"."+nt(1)+"."+nt(1)+"."+nt(1)+"."+0,i=Q("dav1",t)}break}}return{codec:n,encrypted:s,supplemental:i}}function Q(a,e){const t=Se(e,["dvvC"]),r=t.length?t[0]:Se(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,i=r[2]<<5&32|r[3]>>3&31;return a+"."+nt(n)+"."+nt(i)}}function we(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function $e(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Be(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function nt(a){return(a<10?"0":"")+a}function gt(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&yt(a,(r,n)=>{const i=r.subarray(8,24);i.some(s=>s!==0)||(he.log(`[eme] Patching keyId in 'enc${n?"a":"v"}>sinf>>tenc' box: ${ae(i)} -> ${ae(t)}`),r.set(t,8))})}function Ot(a){const e=[];return yt(a,t=>e.push(t.subarray(8,24))),e}function yt(a,e){Se(a,["moov","trak"]).forEach(r=>{const n=Se(r,["mdia","minf","stbl","stsd"])[0];if(!n)return;const i=n.subarray(8);let s=Se(i,["enca"]);const o=s.length>0;o||(s=Se(i,["encv"])),s.forEach(h=>{const c=o?h.subarray(28):h.subarray(78);Se(c,["sinf"]).forEach(m=>{const _=Dt(m);_&&e(_,o)})})})}function Dt(a){const e=Se(a,["schm"])[0];if(e){const t=Nt(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const r=Se(a,["schi","tenc"])[0];if(r)return r}}}function vt(a,e,t){const r={},n=Se(a,["moof","traf"]);for(let i=0;i<n.length;i++){const s=n[i],o=Se(s,["tfhd"])[0],h=wt(o,4),c=e[h];if(!c)continue;r[h]||(r[h]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=r[h],m=Se(s,["tfdt"])[0];if(m){const ye=m[0];let Pe=wt(m,4);ye===1&&(Pe===et?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Pe*=et+1,Pe+=wt(m,8))),I(Pe)&&(!I(p.start)||Pe<p.start)&&(p.start=Pe)}const _=c.default,D=wt(o,0)|(_==null?void 0:_.flags);let C=(_==null?void 0:_.duration)||0;D&8&&(D&2?C=wt(o,12):C=wt(o,8));const G=Se(s,["trun"]);let z=p.start||0,ue=0,fe=C;for(let ye=0;ye<G.length;ye++){const Pe=G[ye],We=wt(Pe,4),dt=p.sampleCount;p.sampleCount+=We;const je=Pe[3]&1,at=Pe[3]&4,it=Pe[2]&1,Ye=Pe[2]&2,Rt=Pe[2]&4,ur=Pe[2]&8;let wr=8,Fr=We;for(je&&(wr+=4),at&&We&&(!(Pe[wr+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=dt),wr+=4,it?(fe=wt(Pe,wr),wr+=4):fe=C,Ye&&(wr+=4),ur&&(wr+=4),z+=fe,ue+=fe,Fr--);Fr--;)it?(fe=wt(Pe,wr),wr+=4):fe=C,Ye&&(wr+=4),Rt&&(Pe[wr+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(Fr+1),p.keyFrameStart=z),wr+=4),ur&&(wr+=4),z+=fe,ue+=fe;!ue&&C&&(ue+=C*We)}p.duration+=ue}if(!Object.keys(r).some(i=>r[i].duration)){let i=1/0,s=0;const o=Se(a,["sidx"]);for(let h=0;h<o.length;h++){const c=qe(o[h]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((m,_)=>m+_.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&I(s)&&Object.keys(r).forEach(h=>{r[h].duration||(r[h].duration=s*r[h].timescale-r[h].start)})}return r}function Gt(a){const e={valid:null,remainder:null},t=Se(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=a.slice(0,r.byteOffset-8),e.remainder=a.slice(r.byteOffset-8),e}function bt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function At(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return Se(r,["moof"]).map(h=>{const c=h.byteOffset-8;Se(h,["traf"]).map(m=>{const _=Se(m,["tfdt"]).map(D=>{const C=D[0];let G=wt(D,4);return C===1&&(G*=Math.pow(2,32),G+=wt(D,8)),G/n})[0];return _!==void 0&&(a=_),Se(m,["tfhd"]).map(D=>{const C=wt(D,4),G=wt(D,0)&16777215,z=(G&1)!==0,ue=(G&2)!==0,fe=(G&8)!==0;let ye=0;const Pe=(G&16)!==0;let We=0;const dt=(G&32)!==0;let je=8;C===i&&(z&&(je+=8),ue&&(je+=4),fe&&(ye=wt(D,je),je+=4),Pe&&(We=wt(D,je),je+=4),dt&&(je+=4),e.type==="video"&&(s=kt(e.codec)),Se(m,["trun"]).map(at=>{const it=at[0],Ye=wt(at,0)&16777215,Rt=(Ye&1)!==0;let ur=0;const wr=(Ye&4)!==0,Fr=(Ye&256)!==0;let Tr=0;const nr=(Ye&512)!==0;let Dr=0;const mr=(Ye&1024)!==0,Pr=(Ye&2048)!==0;let Xr=0;const ar=wt(at,4);let or=8;Rt&&(ur=wt(at,or),or+=4),wr&&(or+=4);let pn=ur+c;for(let On=0;On<ar;On++){if(Fr?(Tr=wt(at,or),or+=4):Tr=ye,nr?(Dr=wt(at,or),or+=4):Dr=We,mr&&(or+=4),Pr&&(it===0?Xr=wt(at,or):Xr=ze(at,or),or+=4),e.type===V.VIDEO){let mn=0;for(;mn<Dr;){const En=wt(r,pn);if(pn+=4,er(s,r[pn])){const Bi=r.subarray(pn,pn+En);qt(Bi,s?2:1,a+Xr/n,t)}pn+=En,mn+=En+4}}a+=Tr/n}}))})})}),t}function kt(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function er(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function qt(a,e,t,r){const n=Pt(a);let i=0;i+=e;let s=0,o=0,h=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;h=n[i++],s+=h}while(h===255);o=0;do{if(i>=n.length)break;h=n[i++],o+=h}while(h===255);const c=n.length-i;let p=i;if(o<c)i+=o;else if(o>c){he.error(`Malformed SEI payload. ${o} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(n[p++]===181){const _=Sr(n,p);if(p+=2,_===49){const D=wt(n,p);if(p+=4,D===1195456820){const C=n[p++];if(C===3){const G=n[p++],z=31&G,ue=64&G,fe=ue?2+z*3:0,ye=new Uint8Array(fe);if(ue){ye[0]=G;for(let Pe=1;Pe<fe;Pe++)ye[Pe]=n[p++]}r.push({type:C,payloadType:s,pts:t,bytes:ye})}}}}}else if(s===5&&o>16){const m=[];for(let C=0;C<16;C++){const G=n[p++].toString(16);m.push(G.length==1?"0"+G:G),(C===3||C===5||C===7||C===9)&&m.push("-")}const _=o-16,D=new Uint8Array(_);for(let C=0;C<_;C++)D[C]=n[p++];r.push({payloadType:s,pts:t,uuid:m.join(""),userData:ct(D),userDataBytes:D})}}}function Pt(a){const e=a.byteLength,t=[];let r=1;for(;r<e-2;)a[r]===0&&a[r+1]===0&&a[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return a;const n=e-t.length,i=new Uint8Array(n);let s=0;for(r=0;r<n;s++,r++)s===t[0]&&(s++,t.shift()),i[r]=a[s];return i}function ir(a){const e=a[0];let t="",r="",n=0,i=0,s=0,o=0,h=0,c=0;if(e===0){for(;Nt(a.subarray(c,c+1))!=="\0";)t+=Nt(a.subarray(c,c+1)),c+=1;for(t+=Nt(a.subarray(c,c+1)),c+=1;Nt(a.subarray(c,c+1))!=="\0";)r+=Nt(a.subarray(c,c+1)),c+=1;r+=Nt(a.subarray(c,c+1)),c+=1,n=wt(a,12),i=wt(a,16),o=wt(a,20),h=wt(a,24),c=28}else if(e===1){c+=4,n=wt(a,c),c+=4;const m=wt(a,c);c+=4;const _=wt(a,c);for(c+=4,s=bu(2,32)*m+_,be(s)||(s=Number.MAX_SAFE_INTEGER,he.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=wt(a,c),c+=4,h=wt(a,c),c+=4;Nt(a.subarray(c,c+1))!=="\0";)t+=Nt(a.subarray(c,c+1)),c+=1;for(t+=Nt(a.subarray(c,c+1)),c+=1;Nt(a.subarray(c,c+1))!=="\0";)r+=Nt(a.subarray(c,c+1)),c+=1;r+=Nt(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:o,id:h,payload:p}}function y(a,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const i=new Uint8Array(r);for(i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(a,4),n=0,r=8;n<t;n++)i.set(e[n],r),r+=e[n].byteLength;return i}function R(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let i;r>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),y([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t)}function rt(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let r=0;for(;r+32<t;){const n=new DataView(a,r),i=U(n);e.push(i),r+=i.size}}return e}function U(a){const e=a.getUint32(0),t=a.byteOffset,r=a.byteLength;if(r<e)return{offset:t,size:r};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,o=ae(new Uint8Array(s,t+12,16));let h=null,c=null,p=0;if(i===0)p=28;else{const _=a.getUint32(28);if(!_||r<32+_*16)return{offset:t,size:e};h=[];for(let D=0;D<_;D++)h.push(new Uint8Array(s,t+32+D*16,16));p=32+_*16}if(!p)return{offset:t,size:e};const m=a.getUint32(p);return e-32<m?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,m),{version:i,systemId:o,kids:h,data:c,offset:t,size:e})}const te=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Zt={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 Ae(a,e){const t=Zt[e];return!!t&&!!t[a.slice(0,4)]}function Te(a,e,t=!0){return!a.split(",").some(r=>!Le(r,e,t))}function Le(a,e,t=!0){var r;const n=Me(t);return(r=n==null?void 0:n.isTypeSupported(K(a,e)))!=null?r:!1}function K(a,e){return`${e}/mp4;codecs=${a}`}function J(a){if(a){const e=a.substring(0,4);return Zt.video[e]}return 2}function Ee(a){const e=te();return a.split(",").reduce((t,r)=>{const i=e&&kt(r)?9:Zt.video[r];return i?(i*2+t)/(t?3:2):(Zt.audio[r]+t)/(t?2:1)},0)}const Ce={};function N(a,e=!0){if(Ce[a])return Ce[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let n=0;n<t.length;n++){var r;if(Le(t[n],"audio",e))return Ce[a]=t[n],t[n];if(t[n]==="mp3"&&(r=Me(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return a}const Et=/flac|opus|mp4a\.40\.34/i;function de(a,e=!0){return a.replace(Et,t=>N(t.toLowerCase(),e))}function Bt(a,e){const t=[];if(a){const r=a.split(",");for(let n=0;n<r.length;n++)Ae(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function Xt(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Br(a,"audio")||Br(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let r=t.length;r--;)if(t[r].substring(0,4)===a.substring(0,4))return t[r]}return t[0]}}return e||a}function Br(a,e){return Ae(a,e)&&Le(a,e)}function cn(a){const e=a.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 jr(a){if(a.startsWith("av01.")){const e=a.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 a}function vr(a){const e=Me(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function xn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const $n={supported:!0,powerEfficient:!0,smooth:!0},Jr={supported:!1,smooth:!1,powerEfficient:!1},en={supported:!0,configurations:[],decodingInfoResults:[$n]};function $t(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Jr],error:a}}function xr(a,e,t,r,n,i){const s=a.videoCodec,o=a.audioCodec?a.audioGroups:null,h=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):h?1/0:2;let m=null;if(o!=null&&o.length)try{o.length===1&&o[0]?m=e.groups[o[0]].channels:m=o.reduce((_,D)=>{if(D){const C=e.groups[D];if(!C)throw new Error(`Audio track group ${D} not found`);Object.keys(C.channels).forEach(G=>{_[G]=(_[G]||0)+C.channels[G]})}return _},{2:0})}catch(_){return!0}return s!==void 0&&(s.split(",").some(_=>kt(_))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(r,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(n,8e6))||!!m&&I(p)&&Object.keys(m).some(_=>parseInt(_)>p)}function se(a,e,t,r={}){const n=a.videoCodec;if(!n&&!a.audioCodec||!t)return Promise.resolve(en);const i=[],s=ce(a),o=s.length,h=ft(a,e,o>0),c=h.length;for(let p=o||1*c||1;p--;){const m={type:"media-source"};if(o&&(m.video=s[p%o]),c){m.audio=h[p%c];const _=m.audio.bitrate;m.video&&_&&(m.video.bitrate-=_)}i.push(m)}if(n){const p=navigator.userAgent;if(n.split(",").some(m=>kt(m))&&te())return Promise.resolve($t(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const m=Kt(p);return r[m]||(r[m]=t.decodingInfo(p))})).then(p=>({supported:!p.some(m=>!m.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function ce(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),r=Ct(a),n=a.width||640,i=a.height||480,s=a.frameRate||30,o=a.videoRange.toLowerCase();return t?t.map(h=>{const c={contentType:K(jr(h),"video"),width:n,height:i,bitrate:r,framerate:s};return o!=="sdr"&&(c.transferFunction=o),c}):[]}function ft(a,e,t){var r;const n=(r=a.audioCodec)==null?void 0:r.split(","),i=Ct(a);return n&&a.audioGroups?a.audioGroups.reduce((s,o)=>{var h;const c=o?(h=e.groups[o])==null?void 0:h.tracks:null;return c?c.reduce((p,m)=>{if(m.groupId===o){const _=parseFloat(m.channels||"");n.forEach(D=>{const C={contentType:K(D,"audio"),bitrate:t?_t(D,i):i};_&&(C.channels=""+_),p.push(C)})}return p},s):s},[]):[]}function _t(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function Ct(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Kt(a){let e="";const{audio:t,video:r}=a;if(r){const n=xn(r.contentType);e+=`${n}_r${r.height}x${r.width}f${Math.ceil(r.framerate)}${r.transferFunction||"sd"}_${Math.ceil(r.bitrate/1e5)}`}if(t){const n=xn(t.contentType);e+=`${r?"_":""}${n}_c${t.channels}`}return e}const jt=["NONE","TYPE-0","TYPE-1",null];function Wt(a){return jt.indexOf(a)>-1}const Ht=["SDR","PQ","HLG"];function hr(a){return!!a&&Ht.indexOf(a)>-1}var _r={No:"",Yes:"YES",v2:"v2"};function Kr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?_r.v2:_r.Yes:_r.No}class Nr{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 Qr{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 _n(this._audioGroups,e)}hasSubtitleGroup(e){return _n(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 _n(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Zr(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function sn(a,e){let t=!1,r=[];if(a&&(t=a!=="SDR",r=[a]),e){r=e.allowedVideoRanges||Ht.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&Zr(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const Ie=a=>{const e=new WeakSet;return(t,r)=>{if(a&&(r=a(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},Ge=(a,e)=>JSON.stringify(a,Ie(e));function lt(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,o=r==null?void 0:r.audioCodec,h=n==null?void 0:n.videoCodec,c=s&&parseInt(s)===2;let p=!1,m=!1,_=1/0,D=1/0,C=1/0,G=1/0,z=0,ue=[];const{preferHDR:fe,allowedVideoRanges:ye}=sn(e,n);for(let at=i.length;at--;){const it=a[i[at]];p||(p=it.channels[2]>0),_=Math.min(_,it.minHeight),D=Math.min(D,it.minFramerate),C=Math.min(C,it.minBitrate),ye.filter(Rt=>it.videoRanges[Rt]>0).length>0&&(m=!0)}_=I(_)?_:0,D=I(D)?D:0;const Pe=Math.max(1080,_),We=Math.max(30,D);C=I(C)?C:t,t=Math.max(C,t),m||(e=void 0);const dt=i.length>1;return{codecSet:i.reduce((at,it)=>{const Ye=a[it];if(it===at)return at;if(ue=m?ye.filter(Rt=>Ye.videoRanges[Rt]>0):[],dt){if(Ye.minBitrate>t)return Ze(it,`min bitrate of ${Ye.minBitrate} > current estimate of ${t}`),at;if(!Ye.hasDefaultAudio)return Ze(it,"no renditions with default or auto-select sound found"),at;if(o&&it.indexOf(o.substring(0,4))%5!==0)return Ze(it,`audio codec preference "${o}" not found`),at;if(s&&!c){if(!Ye.channels[s])return Ze(it,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Ye.channels)})`),at}else if((!o||c)&&p&&Ye.channels[2]===0)return Ze(it,"no renditions with stereo sound found"),at;if(Ye.minHeight>Pe)return Ze(it,`min resolution of ${Ye.minHeight} > maximum of ${Pe}`),at;if(Ye.minFramerate>We)return Ze(it,`min framerate of ${Ye.minFramerate} > maximum of ${We}`),at;if(!ue.some(Rt=>Ye.videoRanges[Rt]>0))return Ze(it,`no variants with VIDEO-RANGE of ${Ge(ue)} found`),at;if(h&&it.indexOf(h.substring(0,4))%5!==0)return Ze(it,`video codec preference "${h}" not found`),at;if(Ye.maxScore<z)return Ze(it,`max score of ${Ye.maxScore} < selected max of ${z}`),at}return at&&(Ee(it)>=Ee(at)||Ye.fragmentError>a[at].fragmentError)?at:(G=Ye.minIndex,z=Ye.maxScore,it)},void 0),videoRanges:ue,preferHDR:fe,minFramerate:D,minBitrate:C,minIndex:G}}function Ze(a,e){he.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Je(a){return a.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 ut(a,e,t,r){return a.slice(t,r+1).reduce((n,i,s)=>{if(!i.codecSet)return n;const o=i.audioGroups;let h=n[i.codecSet];h||(n[i.codecSet]=h={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),h.minBitrate=Math.min(h.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return h.minHeight=Math.min(h.minHeight,c),h.minFramerate=Math.min(h.minFramerate,i.frameRate),h.minIndex=Math.min(h.minIndex,s),h.maxScore=Math.max(h.maxScore,i.score),h.fragmentError+=i.fragmentError,h.videoRanges[i.videoRange]=(h.videoRanges[i.videoRange]||0)+1,o&&o.forEach(p=>{if(!p)return;const m=e.groups[p];m&&(h.hasDefaultAudio=h.hasDefaultAudio||e.hasDefaultAudio?m.hasDefault:m.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(m.channels).forEach(_=>{h.channels[_]=(h.channels[_]||0)+m.channels[_]}))}),n},{})}function St(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}}function It(a,e,t){if("attrs"in a){const r=e.indexOf(a);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(Qt(a,n,t))return r}return-1}function Qt(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:o}=a,h=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||tr(i,e.lang))&&(i===void 0||e.assocLang===s)&&(o===void 0||e.default===o)&&(h===void 0||e.forced===h)&&(!("characteristics"in a)||cr(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function tr(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function cr(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function Vt(a,e){const{audioCodec:t,channels:r}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function Ft(a,e,t,r,n){const i=e[r],o=e.reduce((_,D,C)=>{const G=D.uri;return(_[G]||(_[G]=[])).push(C),_},{})[i.uri];o.length>1&&(r=Math.max.apply(Math,o));const h=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),m=rr(e,r,_=>{if(_.videoRange!==h||_.frameRate!==c||_.codecSet.substring(0,4)!==p)return!1;const D=_.audioGroups,C=t.filter(G=>!D||D.indexOf(G.groupId)!==-1);return It(a,C,n)>-1});return m>-1?m:rr(e,r,_=>{const D=_.audioGroups,C=t.filter(G=>!D||D.indexOf(G.groupId)!==-1);return It(a,C,n)>-1})}function rr(a,e,t){for(let r=e;r>-1;r--)if(t(a[r]))return r;for(let r=e+1;r<a.length;r++)if(t(a[r]))return r;return-1}function $r(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Ur extends Y{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.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:i,hls:s}=this,{autoLevelEnabled:o,media:h}=s;if(!n||!h)return;const c=performance.now(),p=i?i.stats:n.stats,m=i?i.duration:n.duration,_=c-p.loading.start,D=s.minAutoLevel,C=n.level,G=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||C<=D){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const z=G>-1&&G!==C,ue=!!t||z;if(!ue&&(h.paused||!h.playbackRate||!h.readyState))return;const fe=s.mainForwardBufferInfo;if(!ue&&fe===null)return;const ye=this.bwEstimator.getEstimateTTFB(),Pe=Math.abs(h.playbackRate);if(_<=Math.max(ye,1e3*(m/(Pe*2))))return;const We=fe?fe.len/Pe:0,dt=p.loading.first?p.loading.first-p.loading.start:-1,je=p.loaded&&dt>-1,at=this.getBwEstimate(),it=s.levels,Ye=it[C],Rt=Math.max(p.loaded,Math.round(m*(n.bitrate||Ye.averageBitrate)/8));let ur=je?_-dt:_;ur<1&&je&&(ur=Math.min(_,p.loaded*8/at));const wr=je?p.loaded*1e3/ur:0,Fr=ye/1e3,Tr=wr?(Rt-p.loaded)/wr:Rt*8/at+Fr;if(Tr<=We)return;const nr=wr?wr*8:at,Dr=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,mr=this.hls.config.abrBandWidthUpFactor;let Pr=Number.POSITIVE_INFINITY,Xr;for(Xr=C-1;Xr>D;Xr--){const On=it[Xr].maxBitrate,mn=!it[Xr].details||Dr;if(Pr=this.getTimeToLoadFrag(Fr,nr,m*On,mn),Pr<Math.min(We,m+Fr))break}if(Pr>=Tr||Pr>m*10)return;je?this.bwEstimator.sample(_-Math.min(ye,dt),p.loaded):this.bwEstimator.sampleTTFB(_);const ar=it[Xr].maxBitrate;this.getBwEstimate()*mr>ar&&this.resetEstimator(ar);const or=this.findBestLevel(ar,D,Xr,0,We,1,1);or>-1&&(Xr=or),this.warn(`Fragment ${n.sn}${i?" part "+i.index:""} of level ${C} is loading too slowly;
|
|
Fragment duration: ${n.duration.toFixed(3)}
|
|
Time to underbuffer: ${We.toFixed(3)} s
|
|
Estimated load time for current fragment: ${Tr.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${Pr.toFixed(3)} s
|
|
TTFB estimate: ${dt|0} ms
|
|
Current BW estimate: ${I(at)?at|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${Xr} @ ${ar|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Xr,this.clearTimer();const pn=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Xr&&Xr>0){const On=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Xr>0?"and switching down":""}
|
|
Fragment duration: ${n.duration.toFixed(3)} s
|
|
Time to underbuffer: ${On.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Xr>D){let mn=this.findBestLevel(this.hls.levels[D].bitrate,D,Xr,0,On,1,1);mn===-1&&(mn=D),this.hls.nextLoadLevel=this.hls.nextAutoLevel=mn,this.resetEstimator(this.hls.levels[mn].bitrate)}}};z||Tr>Pr*2?pn():this.timer=self.setInterval(pn,Pr*1e3),s.trigger(v.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:i,stats:p})},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 H(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(v.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},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 Z.BUFFER_ADD_CODEC_ERROR:case Z.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case Z.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:i}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const s=performance.now(),o=i?i.stats:r.stats,h=s-o.loading.start,c=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&c>-1){const m=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(h-Math.min(m,c),o.loaded)}else this.bwEstimator.sampleTTFB(h)}break}}}getTimeToLoadFrag(e,t,r,n){const i=e+r/t,s=n?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,i=n.end-n.first;I(i)&&(this.lastLevelLoadSec=i/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===ie.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 i=r?r.duration:t.duration,s=this.hls.levels[t.level],o=(s.loaded?s.loaded.bytes:0)+n.loaded,h=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:o,duration:h},s.realBitrate=Math.round(8*o/h)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(v.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,i=n!=null&&n.stats.loaded?n.stats:r.stats;if(i.aborted||this.ignoreFragment(r))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ie.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,i=this.findBestLevel(r,t,e,0,n,1,1);if(i>-1)return i;const s=this.hls.firstLevel,o=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${o}`),o}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 i=r&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}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:i,minAutoLevel:s}=r,o=t?t.duration:e?e.duration:0,h=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,m=i.abrBandWidthUpFactor;if(c){const z=this.findBestLevel(h,s,n,c,0,p,m);if(z>=0)return this.rebufferNotice=-1,z}let _=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const z=this.bitrateTestDelay;z&&(_=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-z,this.info(`bitrate test took ${Math.round(1e3*z)}ms, set first fragment max fetchDuration to ${Math.round(1e3*_)} ms`),p=m=1)}const D=this.findBestLevel(h,s,n,c,_,p,m);if(this.rebufferNotice!==D&&(this.rebufferNotice=D,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${D}`)),D>-1)return D;const C=r.levels[s],G=r.loadLevelObj;return G&&(C==null?void 0:C.bitrate)<G.bitrate?s: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,i,s,o){var h;const c=n+i,p=this.lastLoadedFragLevel,m=p===-1?this.hls.firstLevel:p,{fragCurrent:_,partCurrent:D}=this,{levels:C,allAudioTracks:G,loadLevel:z,config:ue}=this.hls;if(C.length===1)return 0;const fe=C[m],ye=!!((h=this.hls.latestLevelDetails)!=null&&h.live),Pe=z===-1||p===-1;let We,dt="SDR",je=(fe==null?void 0:fe.frameRate)||0;const{audioPreference:at,videoPreference:it}=ue,Ye=this.audioTracksByGroup||(this.audioTracksByGroup=Je(G));let Rt=-1;if(Pe){if(this.firstSelection!==-1)return this.firstSelection;const nr=this.codecTiers||(this.codecTiers=ut(C,Ye,t,r)),Dr=lt(nr,dt,e,at,it),{codecSet:mr,videoRanges:Pr,minFramerate:Xr,minBitrate:ar,minIndex:or,preferHDR:pn}=Dr;Rt=or,We=mr,dt=pn?Pr[Pr.length-1]:Pr[0],je=Xr,e=Math.max(e,ar),this.log(`picked start tier ${Ge(Dr)}`)}else We=fe==null?void 0:fe.codecSet,dt=fe==null?void 0:fe.videoRange;const ur=D?D.duration:_?_.duration:0,wr=this.bwEstimator.getEstimateTTFB()/1e3,Fr=[];for(let nr=r;nr>=t;nr--){var Tr;const Dr=C[nr],mr=nr>m;if(!Dr)continue;if(ue.useMediaCapabilities&&!Dr.supportedResult&&!Dr.supportedPromise){const mn=navigator.mediaCapabilities;typeof(mn==null?void 0:mn.decodingInfo)=="function"&&xr(Dr,Ye,dt,je,e,at)?(Dr.supportedPromise=se(Dr,Ye,mn,this.supportedCache),Dr.supportedPromise.then(En=>{if(!this.hls)return;Dr.supportedResult=En;const Bi=this.hls.levels,Pi=Bi.indexOf(Dr);En.error?this.warn(`MediaCapabilities decodingInfo error: "${En.error}" for level ${Pi} ${Ge(En)}`):En.supported?En.decodingInfoResults.some(es=>es.smooth===!1||es.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Pi} not smooth or powerEfficient: ${Ge(En)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Pi} ${Ge(En)}`),Pi>-1&&Bi.length>1&&(this.log(`Removing unsupported level ${Pi}`),this.hls.removeLevel(Pi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(En=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${En}`)})):Dr.supportedResult=en}if((We&&Dr.codecSet!==We||dt&&Dr.videoRange!==dt||mr&&je>Dr.frameRate||!mr&&je>0&&je<Dr.frameRate||(Tr=Dr.supportedResult)!=null&&(Tr=Tr.decodingInfoResults)!=null&&Tr.some(mn=>mn.smooth===!1))&&(!Pe||nr!==Rt)){Fr.push(nr);continue}const Pr=Dr.details,Xr=(D?Pr==null?void 0:Pr.partTarget:Pr==null?void 0:Pr.averagetargetduration)||ur;let ar;mr?ar=o*e:ar=s*e;const or=ur&&n>=ur*2&&i===0?Dr.averageBitrate:Dr.maxBitrate,pn=this.getTimeToLoadFrag(wr,ar,or*Xr,Pr===void 0);if(ar>=or&&(nr===p||Dr.loadError===0&&Dr.fragmentError===0)&&(pn<=wr||!I(pn)||ye&&!this.bitrateTestDelay||pn<c)){const mn=this.forcedAutoLevel;return nr!==z&&(mn===-1||mn!==z)&&(Fr.length&&this.trace(`Skipped level(s) ${Fr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${C[Fr[0]].codecs}" ${C[Fr[0]].videoRange}; not compatible with "${We}" ${dt}`),this.info(`switch candidate:${m}->${nr} adjustedbw(${Math.round(ar)})-bitrate=${Math.round(ar-or)} ttfb:${wr.toFixed(1)} avgDuration:${Xr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${pn.toFixed(1)} firstSelection:${Pe} codecSet:${Dr.codecSet} videoRange:${Dr.videoRange} hls.loadLevel:${z}`)),Pe&&(this.firstSelection=nr),nr}}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 Ut={search:function(a,e){let t=0,r=a.length-1,n=null,i=null;for(;t<=r;){n=(t+r)/2|0,i=a[n];const s=e(i);if(s>0)t=n+1;else if(s<0)r=n-1;else return i}return null}};function yr(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!I(e))return null;const r=a[0].programDateTime;if(e<(r||0))return null;const n=a[a.length-1].endProgramDateTime;if(e>=(n||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(tn(e,t,s))return s}return null}function Vr(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const o=a.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Cr(t,r,i)===0||Ir(i,a,Math.min(n,r))))return i;const s=Ut.search(e,Cr.bind(null,t,r));return s&&(s!==a||!i)?s:i}function Ir(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,i)=>(i[0]==="INF"&&(n+=parseFloat(i[1])),n),t);return a.start<=r}return!1}function Cr(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=a?1:t.start-r>a&&t.start?-1:0}function tn(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function pr(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let r=a.fragments;const{fragmentHint:n}=a;n&&(r=r.concat(n));let i;return Ut.search(r,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Lr(a){switch(a.details){case Z.FRAG_LOAD_TIMEOUT:case Z.KEY_LOAD_TIMEOUT:case Z.LEVEL_LOAD_TIMEOUT:case Z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function rn(a){return a.details.startsWith("key")}function Ve(a){return rn(a)&&!!a.frag&&!a.frag.decryptdata}function fr(a,e){const t=Lr(e);return a.default[`${t?"timeout":"error"}Retry`]}function Gr(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function hn(a){return T(T({},a),{errorRetry:null,timeoutRetry:null})}function Tn(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(bn(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function bn(a){return yn(a)||!!a&&(a<400||a>499)}function yn(a){return a===0&&navigator.onLine===!1}var br={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},gr={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class gn extends Y{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(v.ERROR,this.onError,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.ERROR,this.onError,this),e.off(v.ERROR,this.onErrorOut,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===ie.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,r=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||r===-1?t.loadLevel:r}variantHasKey(e,t){if(e){var r;if((r=e.details)!=null&&r.hasKey(t))return!0;const n=e.audioGroups;if(n)return this.hls.allAudioTracks.filter(s=>n.indexOf(s.groupId)>=0).some(s=>{var o;return(o=s.details)==null?void 0:o.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var r;if(t.fatal)return;const n=this.hls,i=t.context;switch(t.details){case Z.FRAG_LOAD_ERROR:case Z.FRAG_LOAD_TIMEOUT:case Z.KEY_LOAD_ERROR:case Z.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case Z.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=an();return}case Z.FRAG_GAP:case Z.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=br.SendAlternateToPenaltyBox;return}case Z.LEVEL_EMPTY_ERROR:case Z.LEVEL_PARSING_ERROR:{var s;const h=t.parent===ie.MAIN?t.level:n.loadLevel;t.details===Z.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,h):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,h))}return;case Z.LEVEL_LOAD_ERROR:case Z.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case Z.AUDIO_TRACK_LOAD_ERROR:case Z.AUDIO_TRACK_LOAD_TIMEOUT:case Z.SUBTITLE_LOAD_ERROR:case Z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const h=n.loadLevelObj;if(h&&(i.type===me.AUDIO_TRACK&&h.hasAudioGroup(i.groupId)||i.type===me.SUBTITLE_TRACK&&h.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=br.SendAlternateToPenaltyBox,t.errorAction.flags=gr.MoveAllAlternatesMatchingHost;return}}return;case Z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:br.SendAlternateToPenaltyBox,flags:gr.MoveAllAlternatesMatchingHDCP};return;case Z.KEY_SYSTEM_SESSION_UPDATE_FAILED:case Z.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case Z.KEY_SYSTEM_NO_SESSION:t.errorAction={action:br.SendAlternateToPenaltyBox,flags:gr.MoveAllAlternatesMatchingKey};return;case Z.BUFFER_ADD_CODEC_ERROR:case Z.REMUX_ALLOC_ERROR:case Z.BUFFER_APPEND_ERROR:if(!t.errorAction){var o;t.errorAction=this.getLevelSwitchAction(t,(o=t.level)!=null?o:n.loadLevel)}return;case Z.INTERNAL_EXCEPTION:case Z.BUFFER_APPENDING_ERROR:case Z.BUFFER_FULL_ERROR:case Z.LEVEL_SWITCH_ERROR:case Z.BUFFER_STALLED_ERROR:case Z.BUFFER_SEEK_OVER_HOLE:case Z.BUFFER_NUDGE_ON_STALL:t.errorAction=an();return}t.type===_e.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=an())}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,n=fr(r.config.playlistLoadPolicy,e),i=this.playlistError++;if(Tn(n,i,Lr(e),e.response))return{action:br.RetryRequest,flags:gr.None,retryConfig:n,retryCount:i};const o=this.getLevelSwitchAction(e,t);return n&&(o.retryConfig=n,o.retryCount=i),o}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,o=fr(rn(e)?s:i,e),h=t.levels.reduce((p,m)=>p+m.fragmentError,0);if(n&&(e.details!==Z.FRAG_GAP&&n.fragmentError++,!Ve(e)&&Tn(o,h,Lr(e),e.response)))return{action:br.RetryRequest,flags:gr.None,retryConfig:o,retryCount:h};const c=this.getLevelSwitchAction(e,r);return o&&(c.retryConfig=o,c.retryCount=h),c}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var i,s;const c=e.details;n.loadError++,c===Z.BUFFER_APPEND_ERROR&&n.fragmentError++;let p=-1;const{levels:m,loadLevel:_,minAutoLevel:D,maxAutoLevel:C}=r;!r.autoLevelEnabled&&!r.config.preserveManualLevelOnError&&(r.loadLevel=-1);const G=(i=e.frag)==null?void 0:i.type,ue=(G===ie.AUDIO&&c===Z.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===Z.BUFFER_ADD_CODEC_ERROR||c===Z.BUFFER_APPEND_ERROR))&&m.some(({audioCodec:dt})=>n.audioCodec!==dt),ye=e.sourceBufferName==="video"&&(c===Z.BUFFER_ADD_CODEC_ERROR||c===Z.BUFFER_APPEND_ERROR)&&m.some(({codecSet:dt,audioCodec:je})=>n.codecSet!==dt&&n.audioCodec===je),{type:Pe,groupId:We}=(s=e.context)!=null?s:{};for(let dt=m.length;dt--;){const je=(dt+_)%m.length;if(je!==_&&je>=D&&je<=C&&m[je].loadError===0){var o,h;const at=m[je];if(c===Z.FRAG_GAP&&G===ie.MAIN&&e.frag){const it=m[je].details;if(it){const Ye=Vr(e.frag,it.fragments,e.frag.start);if(Ye!=null&&Ye.gap)continue}}else{if(Pe===me.AUDIO_TRACK&&at.hasAudioGroup(We)||Pe===me.SUBTITLE_TRACK&&at.hasSubtitleGroup(We))continue;if(G===ie.AUDIO&&(o=n.audioGroups)!=null&&o.some(it=>at.hasAudioGroup(it))||G===ie.SUBTITLE&&(h=n.subtitleGroups)!=null&&h.some(it=>at.hasSubtitleGroup(it))||ue&&n.audioCodec===at.audioCodec||ye&&n.codecSet===at.codecSet||!ue&&n.codecSet!==at.codecSet)continue}p=je;break}}if(p>-1&&r.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:br.SendAlternateToPenaltyBox,flags:gr.None,nextAutoLevel:p}}return{action:br.SendAlternateToPenaltyBox,flags:gr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case br.DoNothing:break;case br.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==Z.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 br.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n}=r,i=r.nextAutoLevel;switch(n){case gr.None:this.switchLevel(e,i);break;case gr.MoveAllAlternatesMatchingHDCP:{const h=this.getVariantLevelIndex(e.frag),c=t.levels[h],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(r.hdcpLevel=p,p==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(p){t.maxHdcpLevel=jt[jt.indexOf(p)-1],r.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case gr.MoveAllAlternatesMatchingKey:{const h=e.decryptdata;if(h){const c=this.hls.levels,p=c.length;for(let _=p;_--;)if(this.variantHasKey(c[_],h)){var s,o;this.log(`Banned key found in level ${_} (${c[_].bitrate}bps) or audio group "${(s=c[_].audioGroups)==null?void 0:s.join(",")}" (${(o=e.frag)==null?void 0:o.type} fragment) ${ae(h.keyId||[])}`),c[_].fragmentError++,c[_].loadError++,this.log(`Removing level ${_} with key error (${e.error})`),this.hls.removeLevel(_)}const m=e.frag;if(this.hls.levels.length<p)r.resolved=!0;else if(m&&m.type!==ie.MAIN){const _=m.decryptdata;_&&!h.matches(_)&&(r.resolved=!0)}}break}}r.resolved||this.switchLevel(e,i)}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===Z.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=xn(e.mimeType),n=this.hls.levels;for(let i=n.length;i--;)n[i][`${e.sourceBufferName}Codec`]===r&&(this.log(`Removing level ${i} for ${e.details} ("${r}" not supported)`),this.hls.removeLevel(i))}}}function an(a){const e={action:br.DoNothing,flags:gr.None};return a&&(e.resolved=!0),e}var on={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Ei{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&&(e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.BUFFER_APPENDED,this.onBufferAppended,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=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 i=r[n];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,r){const{fragments:n}=this,i=Object.keys(n);for(let s=i.length;s--;){const o=n[i[s]];if((o==null?void 0:o.body.type)===t&&(!r||o.buffered)){const h=o.body;if(h.start<=e&&e<=h.end)return h}}return null}detectEvictedFragments(e,t,r,n,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const h=this.fragments[o];if(!h||s>=h.body.sn)return;if(!h.buffered&&(!h.loaded||i)){h.body.type===r&&this.removeFragment(h.body);return}const c=h.range[e];if(c){if(c.time.length===0){this.removeFragment(h.body);return}c.time.some(p=>{const m=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return m&&this.removeFragment(h.body),m})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=An(r),i=this.fragments[n];if(!i||i.buffered&&r.gap)return;const s=!r.relurl;Object.keys(t).forEach(o=>{const h=r.elementaryStreams[o];if(!h)return;const c=t[o],p=s||h.partial===!0;i.range[o]=this.getBufferedTimes(r,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,r),ei(i)||this.removeParts(r.sn-1,r.type)):this.removeFragment(i.body)}bufferedEnd(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=lr(r,n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=An(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,this.bufferedEnd(n,e))}getBufferedTimes(e,t,r,n){const i={time:[],partial:r},s=e.start,o=e.end,h=e.minEndPTS||o,c=e.maxStartPTS||s;for(let p=0;p<n.length;p++){const m=n.start(p)-this.bufferPadding,_=n.end(p)+this.bufferPadding;if(c>=m&&h<=_){i.time.push({startPTS:Math.max(s,n.start(p)),endPTS:Math.min(o,n.end(p))});break}else if(s<_&&o>m){const D=Math.max(s,n.start(p)),C=Math.min(o,n.end(p));C>D&&(i.partial=!0,i.time.push({startPTS:D,endPTS:C}))}else if(o<=m)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:o,fragments:h}=this;return Object.keys(h).forEach(c=>{const p=h[c];p&&ei(p)&&(n=p.body.start-o,i=p.body.end+o,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=p.body,s=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||ei(t))}getState(e){const t=An(e),r=this.fragments[t];return r?r.buffered?ei(r)?on.PARTIAL:on.OK:on.APPENDING:on.NOT_LOADED}isTimeBuffered(e,t,r){let n,i;for(let s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,i=r.end(s)+this.bufferPadding,e>=n&&t<=i)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,i=An(r);this.fragments[i]={body:r,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:i,type:s}=t;if(r.sn==="initSegment")return;const o=r.type;if(n){let c=this.activePartLists[o];c||(this.activePartLists[o]=c=[]),c.push(n)}this.timeRanges=i;const h=i[s];this.detectEvictedFragments(s,h,o,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=An(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 i=t[r[n]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,i){n&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const o=this.fragments[s];if(!o)return;const h=o.body;h.type!==r||n&&!h.gap||h.start<t&&h.end>e&&(o.buffered||i)&&this.removeFragment(h)})}removeFragment(e){const t=An(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=lr(r,i=>i.fragment.sn!==n)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(r=>r.clearElementaryStreamInfo())}}function ei(a){var e,t,r;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(r=a.range.audiovideo)!=null&&r.partial)}function An(a){return`${a.type}_${a.level}_${a.sn}`}function lr(a,e){return a.filter(t=>{const r=e(t);return r||t.clearElementaryStreamInfo(),r})}var un={cbc:0,ctr:1};class fn{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 un.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case un.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 qn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class ai{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],i=r[1],s=r[2],o=r[3],h=this.invSubMix,c=h[0],p=h[1],m=h[2],_=h[3],D=new Uint32Array(256);let C=0,G=0,z=0;for(z=0;z<256;z++)z<128?D[z]=z<<1:D[z]=z<<1^283;for(z=0;z<256;z++){let ue=G^G<<1^G<<2^G<<3^G<<4;ue=ue>>>8^ue&255^99,e[C]=ue,t[ue]=C;const fe=D[C],ye=D[fe],Pe=D[ye];let We=D[ue]*257^ue*16843008;n[C]=We<<24|We>>>8,i[C]=We<<16|We>>>16,s[C]=We<<8|We>>>24,o[C]=We,We=Pe*16843009^ye*65537^fe*257^C*16843008,c[ue]=We<<24|We>>>8,p[ue]=We<<16|We>>>16,m[ue]=We<<8|We>>>24,_[ue]=We,C?(C=fe^D[D[D[Pe^fe]]],G^=D[D[G]]):C=G=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 i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let o,h;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),m=this.sBox,_=this.rcon,D=this.invSubMix,C=D[0],G=D[1],z=D[2],ue=D[3];let fe,ye;for(o=0;o<s;o++){if(o<i){fe=c[o]=t[o];continue}ye=fe,o%i===0?(ye=ye<<8|ye>>>24,ye=m[ye>>>24]<<24|m[ye>>>16&255]<<16|m[ye>>>8&255]<<8|m[ye&255],ye^=_[o/i|0]<<24):i>6&&o%i===4&&(ye=m[ye>>>24]<<24|m[ye>>>16&255]<<16|m[ye>>>8&255]<<8|m[ye&255]),c[o]=fe=(c[o-i]^ye)>>>0}for(h=0;h<s;h++)o=s-h,h&3?ye=c[o]:ye=c[o-4],h<4||o<=4?p[h]=ye:p[h]=C[m[ye>>>24]]^G[m[ye>>>16&255]]^z[m[ye>>>8&255]]^ue[m[ye&255]],p[h]=p[h]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,o=this.invSubMix,h=o[0],c=o[1],p=o[2],m=o[3],_=this.uint8ArrayToUint32Array_(r);let D=_[0],C=_[1],G=_[2],z=_[3];const ue=new Int32Array(e),fe=new Int32Array(ue.length);let ye,Pe,We,dt,je,at,it,Ye,Rt,ur,wr,Fr,Tr,nr;const Dr=this.networkToHostOrderSwap;for(;t<ue.length;){for(Rt=Dr(ue[t]),ur=Dr(ue[t+1]),wr=Dr(ue[t+2]),Fr=Dr(ue[t+3]),je=Rt^i[0],at=Fr^i[1],it=wr^i[2],Ye=ur^i[3],Tr=4,nr=1;nr<n;nr++)ye=h[je>>>24]^c[at>>16&255]^p[it>>8&255]^m[Ye&255]^i[Tr],Pe=h[at>>>24]^c[it>>16&255]^p[Ye>>8&255]^m[je&255]^i[Tr+1],We=h[it>>>24]^c[Ye>>16&255]^p[je>>8&255]^m[at&255]^i[Tr+2],dt=h[Ye>>>24]^c[je>>16&255]^p[at>>8&255]^m[it&255]^i[Tr+3],je=ye,at=Pe,it=We,Ye=dt,Tr=Tr+4;ye=s[je>>>24]<<24^s[at>>16&255]<<16^s[it>>8&255]<<8^s[Ye&255]^i[Tr],Pe=s[at>>>24]<<24^s[it>>16&255]<<16^s[Ye>>8&255]<<8^s[je&255]^i[Tr+1],We=s[it>>>24]<<24^s[Ye>>16&255]<<16^s[je>>8&255]<<8^s[at&255]^i[Tr+2],dt=s[Ye>>>24]<<24^s[je>>16&255]<<16^s[at>>8&255]<<8^s[it&255]^i[Tr+3],fe[t]=Dr(ye^D),fe[t+1]=Dr(dt^C),fe[t+2]=Dr(We^G),fe[t+3]=Dr(Pe^z),D=Rt,C=ur,G=wr,z=Fr,t=t+4}return fe.buffer}}class Ln{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=Un(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Un(a){switch(a){case un.cbc:return"AES-CBC";case un.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Rn=16;class ln{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?qn(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((i,s)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,t,r,n);const h=this.flush();h?i(h.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r,n)}softwareDecrypt(e,t,r,n){const{currentIV:i,currentResult:s,remainderData:o}=this;if(n!==un.cbc||t.byteLength!==16)return he.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=bt(o,e),this.remainderData=null);const h=this.getValidChunk(e);if(!h.length)return null;i&&(r=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new ai),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(h.buffer,0,r),this.currentIV=h.slice(-16).buffer,p||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 Ln(this.subtle,t,n)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new fn(this.subtle,new Uint8Array(r),n).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(he.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,r,n)))}onWebCryptoError(e,t,r,n){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,n);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%Rn;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t}logOnce(e){this.logEnabled&&(he.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const fi=Math.pow(2,17);class Hn{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 Hr({type:_e.NETWORK_ERROR,details:Z.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,i=n.fLoader,s=n.loader;return new Promise((o,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(C=>C[0]==="GAP")){h(oi(e));return}else e.gap=!1;const c=this.loader=i?new i(n):new s(n),p=ni(e);e.loader=c;const m=hn(n.fragLoadPolicy.default),_={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:fi};e.stats=c.stats;const D={onSuccess:(C,G,z,ue)=>{this.resetLoader(e,c);let fe=C.data;z.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(fe.slice(0,16)),fe=fe.slice(16)),o({frag:e,part:null,payload:fe,networkDetails:ue})},onError:(C,G,z,ue)=>{this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:T({url:r,data:void 0},C),error:new Error(`HTTP Error ${C.code} ${C.text}`),networkDetails:z,stats:ue}))},onAbort:(C,G,z)=>{this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:z,stats:C}))},onTimeout:(C,G,z)=>{this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${_.timeout}ms`),networkDetails:z,stats:C}))}};t&&(D.onProgress=(C,G,z,ue)=>t({frag:e,part:null,payload:z,networkDetails:ue})),c.load(p,_,D)})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((o,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(oi(e,t));return}const c=this.loader=i?new i(n):new s(n),p=ni(e,t);e.loader=c;const m=hn(n.fragLoadPolicy.default),_={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:fi};t.stats=c.stats,c.load(p,_,{onSuccess:(D,C,G,z)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const ue={frag:e,part:t,payload:D.data,networkDetails:z};r(ue),o(ue)},onError:(D,C,G,z)=>{this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:T({url:p.url,data:void 0},D),error:new Error(`HTTP Error ${D.code} ${D.text}`),networkDetails:G,stats:z}))},onAbort:(D,C,G)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:G,stats:D}))},onTimeout:(D,C,G)=>{this.resetLoader(e,c),h(new Hr({type:_e.NETWORK_ERROR,details:Z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${_.timeout}ms`),networkDetails:G,stats:D}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){const h=Math.round(e.duration/t.duration),c=Math.min(Math.round(r.loaded/i),h),m=(h-c)*Math.round(r.loaded/c);r.total=r.loaded+m}else r.total=Math.max(r.loaded,r.total);const s=r.loading,o=n.loading;s.start?s.first+=o.first-o.start:(s.start=o.start,s.first=o.first),s.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function ni(a,e=null){const t=e||a,r={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(I(n)&&I(i)){var s;let o=n,h=i;if(a.sn==="initSegment"&&ti((s=a.decryptdata)==null?void 0:s.method)){const c=i-n;c%16&&(h=i+(16-c%16)),n!==0&&(r.resetIV=!0,o=n-16)}r.rangeStart=o,r.rangeEnd=h}return r}function oi(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:_e.MEDIA_ERROR,details:Z.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new Hr(r)}function ti(a){return a==="AES-128"||a==="AES-256"}class Hr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class di extends Y{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 pi{constructor(e,t,r,n=0,i=-1,s=!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=vi(),this.buffering={audio:vi(),video:vi(),audiovideo:vi()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function vi(){return{start:0,executeStart:0,executeEnd:0,end:0}}const jn={length:0,start:()=>0,end:()=>0};class Or{static isBuffered(e,t){if(e){const r=Or.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=Or.getBuffered(e);return Or.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=Or.bufferedRanges(e);if(n.length)return Or.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((p,m)=>p.start-m.start||m.end-p.end);let n=-1,i=[];if(r)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(n=p);const m=i.length;if(m){const _=i[m-1].end;e[p].start-_<r?e[p].end>_&&(i[m-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,o,h=t,c=t;for(let p=0;p<i.length;p++){const m=i[p].start,_=i[p].end;if(n===-1&&t>=m&&t<=_&&(n=p),t+r>=m&&t<_)h=m,c=_,s=c-t;else if(t+r<m){o=m;break}}return{len:s,start:h||0,end:c||0,nextStart:o,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||jn}catch(t){return he.log("failed to get media.buffered",t),jn}}}const Oi=/\{\$([a-zA-Z0-9-_]+)\}/g;function Mt(a){return Oi.test(a)}function Vn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Oi,r=>{const n=r.substring(2,r.length-1),i=t==null?void 0:t[n];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):i})}return e}function Ri(a,e,t){let r=a.variableList;r||(a.variableList=r={});let n,i;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(n))i=s.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else n=e.NAME,i=e.VALUE;n in r?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=i||""}function mi(a,e,t){const r=e.IMPORT;if(t&&r in t){let n=a.variableList;n||(a.variableList=n={}),n[r]=t[r]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const Mn=/^(\d+)x(\d+)$/,li=/(.+?)=(".*?"|.*?)(?:,|$)/g;class kr{constructor(e,t){typeof e=="string"&&(e=kr.parseAttrList(e,t)),E(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,i)=>(n[i.toLowerCase()]=!0,n),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Mn.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={},i='"';for(li.lastIndex=0;(r=li.exec(e))!==null;){const s=r[1].trim();let o=r[2];const h=o.indexOf(i)===0&&o.lastIndexOf(i)===o.length-1;let c=!1;if(h)o=o.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(h||c))o=Vn(t,o);else if(!c&&!h)switch(s){case"CLOSED-CAPTIONS":if(o==="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":he.warn(`${e}: attribute ${s} is missing quotes`)}n[s]=o}return n}}const Xn="com.apple.hls.interstitial";function gi(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function ri(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Dn{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 i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){he.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=E(new kr({}),i,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 i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);I(i.getTime())&&(this._endDate=i)}}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?(he.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(I(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&&I(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 kn=10;class Zn{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}hasKey(e){return this.encryptedFragments.some(t=>{let r=t.decryptdata;return r||(t.setKeyFormat(e.keyFormat),r=t.decryptdata),!!r&&e.matches(r)})}get hasProgramDateTime(){return this.fragments.length?I(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||kn}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(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.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 ii(a,e){return a.length===e.length?!a.some((t,r)=>t!==e[r]):!1}function wi(a,e){return!a&&!e?!0:!a||!e?!1:ii(a,e)}function ui(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function zi(a){switch(a){case"AES-128":case"AES-256":return un.cbc;case"AES-256-CTR":return un.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function Hi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Mi(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function _i(a){const e=Mi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function dr(a){const e=function(r,n,i){const s=r[n];r[n]=r[i],r[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Mr(a){const e=a.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 i=n[0]==="base64",s=n[1];i?(r.splice(-1,1),t=Hi(s)):t=_i(s)}}return t}const vn=typeof self!="undefined"?self:void 0;var zr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},qr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function xi(a){switch(a){case qr.FAIRPLAY:return zr.FAIRPLAY;case qr.PLAYREADY:return zr.PLAYREADY;case qr.WIDEVINE:return zr.WIDEVINE;case qr.CLEARKEY:return zr.CLEARKEY}}function Qn(a){switch(a){case zr.FAIRPLAY:return qr.FAIRPLAY;case zr.PLAYREADY:return qr.PLAYREADY;case zr.WIDEVINE:return qr.WIDEVINE;case zr.CLEARKEY:return qr.CLEARKEY}}function Ii(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[zr.FAIRPLAY,zr.WIDEVINE,zr.PLAYREADY,zr.CLEARKEY].filter(n=>!!e[n]):[];return!r[zr.WIDEVINE]&&t&&r.push(zr.WIDEVINE),r}const dn=function(a){return vn!=null&&(a=vn.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Wr(a,e,t,r){let n;switch(a){case zr.FAIRPLAY:n=["cenc","sinf"];break;case zr.WIDEVINE:case zr.PLAYREADY:n=["cenc"];break;case zr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return In(n,e,t,r)}function In(a,e,t,r){return[{initDataTypes:a,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function Bn(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Jn(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(s){const o=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(o){const h=Hi(o).subarray(0,16);return dr(h),h}}return null}let zn={};class si{static clearKeyUriToKeyIdMap(){zn={}}static setKeyIdForUri(e,t){zn[e]=t}static addKeyIdForUri(e){const t=Object.keys(zn).length%Number.MAX_SAFE_INTEGER,r=new Uint8Array(16);return new DataView(r.buffer,12,4).setUint32(0,t),zn[e]=r,r}constructor(e,t,r,n=[1],i=null,s){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=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!ui(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(j(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ii(e.keyFormatVersions,this.keyFormatVersions)&&wi(e.iv,this.iv)&&wi(e.keyId,this.keyId)}isSupported(){if(this.method){if(ui(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case qr.FAIRPLAY:case qr.WIDEVINE:case qr.PLAYREADY:case qr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(ui(this.method)){let i=this.iv;return i||(typeof e!="number"&&(he.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=bi(e)),new si(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=zn[this.uri];if(i&&!ii(this.keyId,i)&&si.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const r=Mr(this.uri);if(r)switch(this.keyFormat){case qr.WIDEVINE:if(this.pssh=r,!this.keyId){const i=rt(r.buffer);if(i.length){var n;const s=i[0];this.keyId=(n=s.kids)!=null&&n.length?s.kids[0]:null}}this.keyId||(this.keyId=Gi(t));break;case qr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=R(i,null,r),this.keyId=Jn(r);break}default:{let i=r.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i;i=yi(t),i||(i=Gi(t),i||(i=zn[this.uri])),i&&(this.keyId=i,si.setKeyIdForUri(this.uri,i))}return this}}function yi(a){const e=a==null?void 0:a[qr.WIDEVINE];return e?e.keyId:null}function Gi(a){const e=a==null?void 0:a[qr.PLAYREADY];if(e){const t=Mr(e.uri);if(t)return Jn(t)}return null}function bi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const _s=/#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,cs=/#EXT-X-MEDIA:(.*)/g,Gs=/^#EXT(?:INF|-X-TARGETDURATION):/m,rs=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Ts=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 Ni{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 b.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Gs.test(e)}static parseMasterPlaylist(e,t){const r=Mt(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},i=[];if(_s.lastIndex=0,!e.startsWith("#EXTM3U"))return n.playlistParsingError=new Error("no EXTM3U delimiter"),n;let s;for(;(s=_s.exec(e))!=null;)if(s[1]){var o;const c=new kr(s[1],n),p=Vn(n,s[2]),m={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ni.resolve(p,t)},_=c.decimalResolution("RESOLUTION");_&&(m.width=_.width,m.height=_.height),As(c.CODECS,m);const D=c["SUPPLEMENTAL-CODECS"];D&&(m.supplemental={},As(D,m.supplemental)),(o=m.unknownCodecs)!=null&&o.length||i.push(m),n.levels.push(m)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const m=new kr(p,n),_=m["DATA-ID"];_&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[_]=m);break}case"SESSION-KEY":{const m=Ks(p,t,n);m.encrypted&&m.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(m)):he.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const m=new kr(p,n);Ri(n,m,t)}break}case"CONTENT-STEERING":{const m=new kr(p,n);n.contentSteering={uri:Ni.resolve(m["SERVER-URI"],t),pathwayId:m["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=oa(p);break}}}const h=i.length>0&&i.length<n.levels.length;return n.levels=h?i:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const i={},s=r.levels,o={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let h=0;for(cs.lastIndex=0;(n=cs.exec(e))!==null;){const c=new kr(n[1],r),p=c.TYPE;if(p){const m=o[p],_=i[p]||[];i[p]=_;const D=c.LANGUAGE,C=c["ASSOC-LANGUAGE"],G=c.CHANNELS,z=c.CHARACTERISTICS,ue=c["INSTREAM-ID"],fe={attrs:c,bitrate:0,id:h++,groupId:c["GROUP-ID"]||"",name:c.NAME||D||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:D,url:c.URI?Ni.resolve(c.URI,t):""};if(C&&(fe.assocLang=C),G&&(fe.channels=G),z&&(fe.characteristics=z),ue&&(fe.instreamId=ue),m!=null&&m.length){const ye=Ni.findGroup(m,fe.groupId)||m[0];ns(fe,ye,"audioCodec"),ns(fe,ye,"textCodec")}_.push(fe)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){var o;const h={url:t},c=new Zn(t),p=c.fragments,m=[];let _=null,D=0,C=0,G=0,z=0,ue=0,fe=null,ye=new st(n,h),Pe,We,dt,je=-1,at=!1,it=null,Ye;if(rs.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Mt(e),((o=rs.exec(e))==null?void 0:o[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(Pe=rs.exec(e))!==null;){at&&(at=!1,ye=new st(n,h),ye.playlistOffset=G,ye.setStart(G),ye.sn=D,ye.cc=z,ue&&(ye.bitrate=ue),ye.level=r,_&&(ye.initSegment=_,_.rawProgramDateTime&&(ye.rawProgramDateTime=_.rawProgramDateTime,_.rawProgramDateTime=null),it&&(ye.setByteRange(it),it=null)));const Fr=Pe[1];if(Fr){ye.duration=parseFloat(Fr);const Tr=(" "+Pe[2]).slice(1);ye.title=Tr||null,ye.tagList.push(Tr?["INF",Fr,Tr]:["INF",Fr])}else if(Pe[3]){if(I(ye.duration)){ye.playlistOffset=G,ye.setStart(G),dt&&la(ye,dt,c),ye.sn=D,ye.level=r,ye.cc=z,p.push(ye);const Tr=(" "+Pe[3]).slice(1);ye.relurl=Vn(c,Tr),Ki(ye,fe,m),fe=ye,G+=ye.duration,D++,C=0,at=!0}}else{if(Pe=Pe[0].match(Ts),!Pe){he.warn("No matches on slow regex match for level playlist!");continue}for(We=1;We<Pe.length&&Pe[We]===void 0;We++);const Tr=(" "+Pe[We]).slice(1),nr=(" "+Pe[We+1]).slice(1),Dr=Pe[We+2]?(" "+Pe[We+2]).slice(1):null;switch(Tr){case"BYTERANGE":fe?ye.setByteRange(nr,fe):ye.setByteRange(nr);break;case"PROGRAM-DATE-TIME":ye.rawProgramDateTime=nr,ye.tagList.push(["PROGRAM-DATE-TIME",nr]),je===-1&&(je=p.length);break;case"PLAYLIST-TYPE":c.type&&Li(c,Tr,Pe),c.type=nr.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?Li(c,Tr,Pe):p.length>0&&hs(c,Tr,Pe),D=c.startSN=parseInt(nr);break;case"SKIP":{c.skippedSegments&&Li(c,Tr,Pe);const mr=new kr(nr,c),Pr=mr.decimalInteger("SKIPPED-SEGMENTS");if(I(Pr)){c.skippedSegments+=Pr;for(let ar=Pr;ar--;)p.push(null);D+=Pr}const Xr=mr.enumeratedString("RECENTLY-REMOVED-DATERANGES");Xr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Xr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&Li(c,Tr,Pe),c.targetduration=Math.max(parseInt(nr),1);break;case"VERSION":c.version!==null&&Li(c,Tr,Pe),c.version=parseInt(nr);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||Li(c,Tr,Pe),c.live=!1;break;case"#":(nr||Dr)&&ye.tagList.push(Dr?[nr,Dr]:[nr]);break;case"DISCONTINUITY":z++,ye.tagList.push(["DIS"]);break;case"GAP":ye.gap=!0,ye.tagList.push([Tr]);break;case"BITRATE":ye.tagList.push([Tr,nr]),ue=parseInt(nr)*1e3,I(ue)?ye.bitrate=ue:ue=0;break;case"DATERANGE":{const mr=new kr(nr,c),Pr=new Dn(mr,c.dateRanges[mr.ID],c.dateRangeTagCount);c.dateRangeTagCount++,Pr.isValid||c.skippedSegments?c.dateRanges[Pr.id]=Pr:he.warn(`Ignoring invalid DATERANGE tag: "${nr}"`),ye.tagList.push(["EXT-X-DATERANGE",nr]);break}case"DEFINE":{{const mr=new kr(nr,c);"IMPORT"in mr?mi(c,mr,s):Ri(c,mr,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?Li(c,Tr,Pe):p.length>0&&hs(c,Tr,Pe),c.startCC=z=parseInt(nr);break;case"KEY":{const mr=Ks(nr,t,c);if(mr.isSupported()){if(mr.method==="NONE"){dt=void 0;break}dt||(dt={});const Pr=dt[mr.keyFormat];Pr!=null&&Pr.matches(mr)||(Pr&&(dt=E({},dt)),dt[mr.keyFormat]=mr)}else he.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${nr}"`);break}case"START":c.startTimeOffset=oa(nr);break;case"MAP":{const mr=new kr(nr,c);if(ye.duration){const Pr=new st(n,h);Hs(Pr,mr,r,dt),_=Pr,ye.initSegment=_,_.rawProgramDateTime&&!ye.rawProgramDateTime&&(ye.rawProgramDateTime=_.rawProgramDateTime)}else{const Pr=ye.byteRangeEndOffset;if(Pr){const Xr=ye.byteRangeStartOffset;it=`${Pr-Xr}@${Xr}`}else it=null;Hs(ye,mr,r,dt),_=ye,at=!0}_.cc=z;break}case"SERVER-CONTROL":{Ye&&Li(c,Tr,Pe),Ye=new kr(nr),c.canBlockReload=Ye.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Ye.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Ye.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Ye.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Ye.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&Li(c,Tr,Pe);const mr=new kr(nr);c.partTarget=mr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let mr=c.partList;mr||(mr=c.partList=[]);const Pr=C>0?mr[mr.length-1]:void 0,Xr=C++,ar=new kr(nr,c),or=new tt(ar,ye,h,Xr,Pr);mr.push(or),ye.duration+=or.duration;break}case"PRELOAD-HINT":{const mr=new kr(nr,c);c.preloadHint=mr;break}case"RENDITION-REPORT":{const mr=new kr(nr,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(mr);break}default:he.warn(`line parsed but not handled: ${Pe}`);break}}}fe&&!fe.relurl?(p.pop(),G-=fe.duration,c.partList&&(c.fragmentHint=fe)):c.partList&&(Ki(ye,fe,m),ye.cc=z,c.fragmentHint=ye,dt&&la(ye,dt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const Rt=p.length,ur=p[0],wr=p[Rt-1];if(G+=c.skippedSegments*c.targetduration,G>0&&Rt&&wr){c.averagetargetduration=G/Rt;const Fr=wr.sn;c.endSN=Fr!=="initSegment"?Fr:0,c.live||(wr.endList=!0),je>0&&(Ws(p,je),ur&&m.unshift(ur))}return c.fragmentHint&&(G+=c.fragmentHint.duration),c.totalduration=G,m.length&&c.dateRangeTagCount&&ur&&aa(m,c),c.endCC=z,c}}function aa(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const o=e.fragments[e.fragments.length-1];a.push(o),t++}else return;const r=a[t-1],n=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let o=i.length;o--;){const h=e.dateRanges[i[o]],c=h.startDate.getTime();h.tagAnchor=r.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const m=wa(e,c,a,p,n);if(m!==-1){h.tagAnchor=e.fragments[m].ref;break}}}}function wa(a,e,t,r,n){const i=t[r];if(i){const o=i.programDateTime;if(e>=o||r===0){var s;const h=(((s=t[r+1])==null?void 0:s.start)||n)-i.start;if(e<=o+h*1e3){const c=t[r].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const _=(t[r+1]||p[p.length-1]).sn-a.startSN;for(let D=_;D>c;D--){const C=p[D].programDateTime;if(e>=C&&e<C+p[D].duration*1e3)return D}}return c}}}return-1}function Ks(a,e,t){var r,n;const i=new kr(a,t),s=(r=i.METHOD)!=null?r:"",o=i.URI,h=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(n=i.KEYFORMAT)!=null?n:"identity";o&&i.IV&&!h&&he.error(`Invalid IV: ${i.IV}`);const m=o?Ni.resolve(o,e):"",_=(c||"1").split("/").map(Number).filter(Number.isFinite);return new si(s,m,p,_,h,i.KEYID)}function oa(a){const t=new kr(a).decimalFloatingPoint("TIME-OFFSET");return I(t)?t:null}function As(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Ae(i,r));n.length&&(e[`${r}Codec`]=n.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function ns(a,e,t){const r=e[t];r&&(a[t]=r)}function Ws(a,e){let t=a[e];for(let r=e;r--;){const n=a[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function Ki(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function Hs(a,e,t,r){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",r&&(a.levelkeys=r),a.initSegment=null}function la(a,e,t){a.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(a)}function Li(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function hs(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function ys(a,e){const t=e.startPTS;if(I(t)){let r=0,n;e.sn>a.sn?(r=t-a.start,n=a):(r=a.start-t,n=e),n.duration!==r&&n.setDuration(r)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function Ds(a,e,t,r,n,i,s){r-t<=0&&(s.warn("Fragment should have a positive duration",e),r=t+e.duration,i=n+e.duration);let h=t,c=r;const p=e.startPTS,m=e.endPTS;if(I(p)){const ue=Math.abs(p-t);a&&ue>a.totalduration?s.warn(`media timestamps and playlist times differ by ${ue}s for level ${e.level} ${a.url}`):I(e.deltaPTS)?e.deltaPTS=Math.max(ue,e.deltaPTS):e.deltaPTS=ue,h=Math.max(t,p),t=Math.min(t,p),n=e.startDTS!==void 0?Math.min(n,e.startDTS):n,c=Math.min(r,m),r=Math.max(r,m),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const _=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(r-e.start),e.startPTS=t,e.maxStartPTS=h,e.startDTS=n,e.endPTS=r,e.minEndPTS=c,e.endDTS=i;const D=e.sn;if(!a||D<a.startSN||D>a.endSN)return 0;let C;const G=D-a.startSN,z=a.fragments;for(z[G]=e,C=G;C>0;C--)ys(z[C],z[C-1]);for(C=G;C<z.length-1;C++)ys(z[C],z[C+1]);return a.fragmentHint&&ys(z[z.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,_}function ua(a,e,t){if(a===e)return;let r=null;const n=a.fragments;for(let p=n.length-1;p>=0;p--){const m=n[p].initSegment;if(m){r=m;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;is(a,e,(p,m,_,D)=>{if((!e.startCC||e.skippedSegments)&&m.cc!==p.cc){const C=p.cc-m.cc;for(let G=_;G<D.length;G++)D[G].cc+=C;e.endCC=D[D.length-1].cc}I(p.startPTS)&&I(p.endPTS)&&(m.setStart(m.startPTS=p.startPTS),m.startDTS=p.startDTS,m.maxStartPTS=p.maxStartPTS,m.endPTS=p.endPTS,m.endDTS=p.endDTS,m.minEndPTS=p.minEndPTS,m.setDuration(p.endPTS-p.startPTS),m.duration&&(i=m),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(m.elementaryStreams=p.elementaryStreams),m.loader=p.loader,p.hasStats&&(m.stats=p.stats),p.initSegment&&(m.initSegment=p.initSegment,r=p.initSegment)});const s=e.fragments,o=e.fragmentHint?s.concat(e.fragmentHint):s;if(r&&o.forEach(p=>{var m;p&&(!p.initSegment||p.initSegment.relurl===((m=r)==null?void 0:m.relurl))&&(p.initSegment=r)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(p=>!p),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=ji(a.dateRanges,e,t));const p=a.fragments.filter(m=>m.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let m=1;m<o.length;m++)o[m].programDateTime===null&&Ki(o[m],o[m-1],p);aa(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var h;const p=wn(a,e.startSN-1);e.startCC=(h=p==null?void 0:p.cc)!=null?h:s[0].cc}ca(a.partList,e.partList,(p,m)=>{m.elementaryStreams=p.elementaryStreams,m.stats=p.stats}),i?Ds(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):Vi(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const p=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=p),e.driftEndTime=c,e.driftEnd=p}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function ji(a,e,t){const{dateRanges:r,recentlyRemovedDateranges:n}=e,i=E({},a);n&&n.forEach(h=>{delete i[h]});const o=Object.keys(i).length;return o?(Object.keys(r).forEach(h=>{const c=i[h],p=new Dn(r[h].attr,c);p.isValid?(i[h]=p,c||(p.tagOrder+=o)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Ge(r[h].attr)}"`)}),i):r}function ca(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],o=e[n+r];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?t(s,o):r--}}}function is(a,e,t){const r=e.skippedSegments,n=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(r?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,h=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=n;c<=i;c++){const p=h[s+c];let m=o[c];if(r&&!m&&p&&(m=e.fragments[c]=p),p&&m){t(p,m,c,o);const _=p.relurl,D=m.relurl;if(_&&bs(_,D)){e.playlistParsingError=Cs(`media sequence mismatch ${m.sn}:`,a,e,p,m);return}else if(p.cc!==m.cc){e.playlistParsingError=Cs(`discontinuity sequence mismatch (${p.cc}!=${m.cc})`,a,e,p,m);return}}}}function Cs(a,e,t,r,n){return new Error(`${a} ${n.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function Vi(a,e,t=!0){const r=e.startSN+e.skippedSegments-a.startSN,n=a.fragments,i=r>=0;let s=0;if(i&&r<n.length)s=n[r].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;js(e,s)}function js(a,e){if(e){const t=a.fragments;for(let r=a.skippedSegments;r<t.length;r++)t[r].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Sn(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const r=a.fragments;if(r.length&&t*4>e){const i=r[r.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function wn(a,e,t){if(!a)return null;let r=a.fragments[e-a.startSN];return r||(r=a.fragmentHint,r&&r.sn===e)?r:e<a.startSN&&t&&t.sn===e?t:null}function Fn(a,e,t){return a?Si(a.partList,e,t):null}function Si(a,e,t){if(a)for(let r=a.length;r--;){const n=a[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function Ti(a){a.forEach((e,t)=>{var r;(r=e.details)==null||r.fragments.forEach(n=>{n.level=t,n.initSegment&&(n.initSegment.level=t)})})}function bs(a,e){return a!==e&&e?Es(a)!==Es(e):!1}function Es(a){return a.replace(/\?[^?]*$/,"")}function ss(a,e){for(let r=0,n=a.length;r<n;r++){var t;if(((t=a[r])==null?void 0:t.cc)===e)return a[r]}return null}function Vs(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Rs(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function as(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Rs(t[r],a);e.fragmentHint&&Rs(e.fragmentHint,a),e.alignedSliding=!0}function Is(a,e){a&&(Ls(e,a),e.alignedSliding||ks(e,a),!e.alignedSliding&&!e.skippedSegments&&Vi(a,e,!1))}function Ls(a,e){if(!Vs(e,a))return;const t=Math.min(e.endCC,a.endCC),r=ss(e.fragments,t),n=ss(a.fragments,t);if(!r||!n)return;he.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=r.start-n.start;as(i,a)}function ks(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(n=ss(r,s),i=ss(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=ss(t,n.cc)||t[Math.floor(t.length/2)]);const o=n.programDateTime,h=i.programDateTime;if(!o||!h)return;const c=(h-o)/1e3-(i.start-n.start);as(c,a)}function Ai(a,e,t){ki(a,e,t),a.addEventListener(e,t)}function ki(a,e,t){a.removeEventListener(e,t)}const Ka={toString:function(a){let e="";const t=a.length;for(let r=0;r<t;r++)e+=`[${a.start(r).toFixed(3)}-${a.end(r).toFixed(3)}]`;return e}},Tt={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 Zs extends di{constructor(e,t,r,n,i){super(n,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Tt.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:s,fragCurrent:o,media:h,mediaBuffer:c,state:p}=this,m=h?h.currentTime:0,_=Or.bufferInfo(c||h,m,s.maxBufferHole),D=!_.len;if(this.log(`Media seeking to ${I(m)?m.toFixed(3):m}, state: ${p}, ${D?"out of":"in"} buffer`),this.state===Tt.ENDED)this.resetLoadingState();else if(o){const C=s.maxFragLookUpTolerance,G=o.start-C,z=o.start+o.duration+C;if(D||z<_.start||G>_.end){const ue=m>z;(m<G||ue)&&(ue&&o.loader&&(this.log(`Cancelling fragment load for seek (sn: ${o.sn})`),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(h){this.fragmentTracker.removeFragmentsInRange(m,1/0,this.playlistType,!0);const C=this.lastCurrentTime;if(m>C&&(this.lastCurrentTime=m),!this.loadingParts){const G=Math.max(_.end,m),z=this.shouldLoadParts(this.getLevelDetails(),G);z&&(this.log(`LL-Part loading ON after seeking to ${m.toFixed(2)} with buffer @${G.toFixed(2)}`),this.loadingParts=z)}}this.hls.hasEnoughToStart||(this.log(`Setting ${D?"startPosition":"nextLoadPosition"} to ${m} for seek without enough to start`),this.nextLoadPosition=m,D&&(this.startPosition=m)),D&&this.state===Tt.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Hn(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new ln(e.config)}registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Tt.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=Tt.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 i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=Or.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>n&&s<t.edge||this.media.currentTime<e.start)return!1;const h=t.partList;if(h!=null&&h.length){const p=h[h.length-1];return Or.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.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;Ai(r,"seeking",this.onMediaSeeking),Ai(r,"ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===Tt.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),ki(n,"seeking",this.onMediaSeeking),ki(n,"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=Tt.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=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,r,n).then(i=>{if(!i)return;const s=this.state,o=i.frag;if(this.fragContextChanged(o)){(s===Tt.FRAG_LOADING||!this.fragCurrent&&s===Tt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=Tt.IDLE);return}"payload"in i&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(v.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Tt.STOPPED||this.state===Tt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===on.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),o=Math.max(e.duration,s?s.len:this.config.maxBufferLength),h=this.backtrackFragment;((h?e.sn-h.sn:0)===1||this.reduceMaxBufferLength(o,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)===on.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(v.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:i,payload:s}=r,o=i.decryptdata;if(s&&s.byteLength>0&&o!=null&&o.key&&o.iv&&ui(o.method)){const h=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),o.key.buffer,o.iv.buffer,zi(o.method)).catch(c=>{throw n.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return n.trigger(v.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:h,tdecrypt:p}}),r.payload=c,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===Tt.STOPPED||this.state===Tt.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!==Tt.STOPPED&&(this.state=Tt.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()}unhandledEncryptionError(e,t){var r,n;const i=e.tracks;if(i&&!t.encrypted&&((r=i.audio)!=null&&r.encrypted||(n=i.video)!=null&&n.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,o=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(o.message),!s||s.mediaKeys?!1:(this.hls.trigger(v.ERROR,{type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_NO_KEYS,fatal:!1,error:o,frag:t}),this.resetTransmuxer(),!0)}return!1}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?Ka.toString(Or.getBuffered(r)):"(detached)"})`),He(e)){var n;if(e.type!==ie.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(o=>!!s[o])){this.state=Tt.IDLE;return}}const i=(n=this.levels)==null?void 0:n[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Tt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:i}=e,s=!i||i.length===0||i.some(h=>!h),o=new pi(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let o=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Tt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(_=>{if(!this.fragContextChanged(_.frag))return this.hls.trigger(v.KEY_LOADED,_),this.state===Tt.KEY_LOADING&&(this.state=Tt.IDLE),_}),this.hls.trigger(v.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(o=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),o&&this.log("[eme] blocking frag load until media-keys acquired"));const h=this.fragPrevious;if(He(e)&&(!h||e.sn!==h.sn)){const _=this.shouldLoadParts(t.details,e.end);_!==this.loadingParts&&(this.log(`LL-Part loading ${_?"ON":"OFF"} loading sn ${h==null?void 0:h.sn}->${e.sn}`),this.loadingParts=_)}if(r=Math.max(e.start,r||0),this.loadingParts&&He(e)){const _=s.partList;if(_&&n){r>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const D=this.getNextPart(_,e,r);if(D>-1){const C=_[D];e=this.fragCurrent=C.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${C.index} (${D}/${_.length-1}) of ${this.fragInfo(e,!1,C)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=C.start+C.duration,this.state=Tt.FRAG_LOADING;let G;return o?G=o.then(z=>!z||this.fragContextChanged(z.frag)?null:this.doFragPartsLoad(e,C,t,n)).catch(z=>this.handleFragLoadError(z)):G=this.doFragPartsLoad(e,C,t,n).catch(z=>this.handleFragLoadError(z)),this.hls.trigger(v.FRAG_LOADING,{frag:e,part:C,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):G}else if(!e.url||this.loadedEndOfParts(_,r))return Promise.resolve(null)}}if(He(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.filter(_=>_.loaded).map(_=>`[${_.start}-${_.end}]`)}`),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} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(r.toFixed(3))}`),I(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Tt.FRAG_LOADING;const p=this.config.progressive&&e.type!==ie.SUBTITLE;let m;return p&&o?m=o.then(_=>!_||this.fragContextChanged(_.frag)?null:this.fragmentLoader.load(e,n)).catch(_=>this.handleFragLoadError(_)):m=Promise.all([this.fragmentLoader.load(e,p?n:void 0),o]).then(([_])=>(!p&&n&&n(_),_)).catch(_=>this.handleFragLoadError(_)),this.hls.trigger(v.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var o;const h=[],c=(o=r.details)==null?void 0:o.partList,p=m=>{this.fragmentLoader.loadPart(e,m,n).then(_=>{h[m.index]=_;const D=_.part;this.hls.trigger(v.FRAG_LOADED,_);const C=Fn(r.details,e.sn,m.index+1)||Si(c,e.sn,m.index+1);if(C)p(C);else return i({frag:e,part:D,partsLoaded:h})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===Z.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===_e.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(v.ERROR,t)}else this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Tt.PARSING){!this.fragCurrent&&this.state!==Tt.STOPPED&&this.state!==Tt.ERROR&&(this.state=Tt.IDLE);return}const{frag:r,part:n,level:i}=t,s=self.performance.now();r.stats.parsing.end=s,n&&(n.stats.parsing.end=s);const o=this.getLevelDetails(),c=o&&r.sn>o.endSN||this.shouldLoadParts(o,r.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(r,n,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var r;const i=e.partList[0];if(i.fragment.type===ie.SUBTITLE)return!1;const s=i.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(t>=s){var n;if((this.hls.hasEnoughToStart?((n=this.media)==null?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:i,part:s}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${n}. The current chunk will not be buffered.`),null;const o=t[n],h=o.details,c=s>-1?Fn(h,i,s):null,p=c?c.fragment:wn(h,i,r);return p?(r&&r!==p&&(p.stats=r.stats),{frag:p,part:c,level:o}):null}bufferFragmentData(e,t,r,n,i){if(this.state!==Tt.PARSING)return;const{data1:s,data2:o}=e;let h=s;if(o&&(h=bt(s,o)),!h.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,m={type:e.type,frag:t,part:r,chunkMeta:n,offset:p,parent:t.type,data:h};if(this.hls.trigger(v.BUFFER_APPENDING,m),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Or.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=Or.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),o=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-o>s&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!I(n))return null;const s=this.lastCurrentTime>n||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,s)}getFwdBufferInfoAtPos(e,t,r,n){const i=Or.bufferInfo(e,t,n);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,r);if(s&&(i.nextStart<=s.end||s.gap)){const o=Math.max(Math.min(i.nextStart,s.end)-t,n);return Or.bufferInfo(e,t,o)}}return i}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),i=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return i>=n?(r.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=ie.MAIN){const r=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:i}=this,s=r[0].start,o=i.lowLatencyMode&&!!t.partList;let h=null;if(t.live){const m=i.initialLiveManifestSize;if(n<m)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${m})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),h=this.getInitialLiveFragment(t);const _=this.hls.startPosition,D=this.hls.liveSyncPosition,C=h?(_!==-1&&_>=s?_:D)||h.start:e;this.log(`Setting startPosition to ${C} to match start frag at live edge. mainStart: ${_} liveSyncPosition: ${D} frag.start: ${(c=h)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=C}}else e<=s&&(h=r[0]);if(!h){const m=this.loadingParts?t.partEnd:t.fragmentEnd;h=this.getFragmentAtPosition(e,m,t)}let p=this.filterReplacedPrimary(h,t);if(!p&&h){const m=h.sn-t.startSN;p=this.filterReplacedPrimary(r[m+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===on.OK||r===on.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&r.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(o!==null&&r.len+o.len>=i){const h=s.sn;return this.loopSn!==h&&(this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${h}`),this.loopSn=h),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Ta(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ta(this.config)&&e.type!==ie.SUBTITLE){const r=this.hls.interstitialsManager,n=r==null?void 0:r.bufferingItem;if(n){const s=n.event;if(s){if(s.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 i=r==null?void 0:r.playerQueue;if(i)for(let s=i.length;s--;){const o=i[s].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,i=!1,s=!0;for(let o=0,h=e.length;o<h;o++){const c=e[o];if(s=s&&!c.independent,n>-1&&r<c.start)break;const p=c.loaded;p?n=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${r} but next unloaded part starts at ${c.start}`),n=o),i=p}return n}loadedEndOfParts(e,t){let r;for(let n=e.length;n--;){if(r=e[n],!r.loaded)return!1;if(t>r.start)return!0}return!1}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=yr(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const i=r.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];r.cc===s.cc&&(n=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=pr(e,r.cc,r.end),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(n=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:i}=this,{fragments:s,endSN:o}=r;const{fragmentHint:h}=r,{maxFragLookUpTolerance:c}=n,p=r.partList,m=!!(this.loadingParts&&p!=null&&p.length&&h);m&&!this.bitrateTest&&p[p.length-1].fragment.sn===h.sn&&(s=s.concat(h),o=h.sn);let _;if(e<t){var D;const G=e<this.lastCurrentTime||e>t-c||(D=this.media)!=null&&D.paused||!this.startFragRequested?0:c;_=Vr(i,s,e,G)}else _=s[s.length-1];if(_){const C=_.sn-r.startSN,G=this.fragmentTracker.getState(_);if((G===on.OK||G===on.PARTIAL&&_.gap)&&(i=_),i&&_.sn===i.sn&&(!m||p[0].fragment.sn>_.sn||!r.live)&&_.level===i.level){const ue=s[C+1];_.sn<o&&this.fragmentTracker.getState(ue)!==on.OK?_=ue:_=null}}return _}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,o=e.alignedSliding&&I(i);if(s||!o&&!i){Is(r,e);const h=e.fragmentStart;return this.log(`Live playlist sliding: ${h.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${n}`),h}return i}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 i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&I(s)?(r=t+s,s<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${s} found in ${i?"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&&He(e)&&e.stats.aborted&&(this.log(`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!==Tt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Tt.IDLE)}onFragmentOrKeyLoadError(e,t){var r;if(t.chunkMeta&&!t.frag){const ue=this.getCurrentContext(t.chunkMeta);ue&&(t.frag=ue.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var i;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===Z.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const o=t.errorAction;if(!o){this.state=Tt.ERROR;return}const{action:h,flags:c,retryCount:p=0,retryConfig:m}=o,_=!!m,D=_&&h===br.RetryRequest,C=_&&!o.resolved&&c===gr.MoveAllAlternatesMatchingHost,G=(r=this.hls.latestLevelDetails)==null?void 0:r.live;if(!D&&C&&He(n)&&!n.endList&&G&&!Ve(t))this.resetFragmentErrors(e),this.treatAsGap(n),o.resolved=!0;else if((D||C)&&p<m.maxNumRetry){var z;const ue=yn((z=t.response)==null?void 0:z.code),fe=Gr(m,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+fe,this.state=Tt.FRAG_LOADING_WAITING_RETRY,o.resolved=!0,ue){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${p+1}/${m.maxNumRetry} in ${fe}ms`)}else if(m)if(this.resetFragmentErrors(e),p<m.maxNumRetry)!s&&h!==br.RemoveAlternatePermanently&&(o.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else h===br.SendAlternateToPenaltyBox?this.state=Tt.WAITING_LEVEL:this.state=Tt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,r=t===1/0;(!t||e>=t||r&&!yn(0))&&(r&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Tt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Tt.PARSING||this.state===Tt.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),i=n&&n.len>.5;i&&this.reduceMaxBufferLength(n.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===ie.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Tt.STOPPED&&(this.state=Tt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=Or.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===Tt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Tt.STOPPED&&(this.state=Tt.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,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.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,n){const i=r.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((h,c)=>{const p=e.elementaryStreams[c];if(p){const m=p.endPTS-p.startPTS;if(m<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${m})`),h||!1;const _=n?0:Ds(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(v.LEVEL_PTS_UPDATED,{details:i,level:r,drift:_,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return h},!1)){var o;const h=((o=this.transmuxer)==null?void 0:o.error)===null;if((r.fragmentError===0||h&&(r.fragmentError<2||e.endList))&&this.treatAsGap(e,r),h){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Tt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(v.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ie.MAIN?"level":"track"}fragInfo(e,t=!0,r){var n,i;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((n=t&&!r?e.startPTS:(r||e).start)!=null?n:NaN).toFixed(3)}-${((i=t&&!r?e.endPTS:(r||e).end)!=null?i: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.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ta(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Aa{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=Wa(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function Wa(a,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<a.length;n++){const i=a[n];t.set(i,r),r+=i.length}return t}var fs={exports:{}},Ps;function Ao(){return Ps||(Ps=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(h,c,p){this.fn=h,this.context=c,this.once=p||!1}function i(h,c,p,m,_){if(typeof p!="function")throw new TypeError("The listener must be a function");var D=new n(p,m||h,_),C=t?t+c:c;return h._events[C]?h._events[C].fn?h._events[C]=[h._events[C],D]:h._events[C].push(D):(h._events[C]=D,h._eventsCount++),h}function s(h,c){--h._eventsCount===0?h._events=new r:delete h._events[c]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],p,m;if(this._eventsCount===0)return c;for(m in p=this._events)e.call(p,m)&&c.push(t?m.slice(1):m);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},o.prototype.listeners=function(c){var p=t?t+c:c,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var _=0,D=m.length,C=new Array(D);_<D;_++)C[_]=m[_].fn;return C},o.prototype.listenerCount=function(c){var p=t?t+c:c,m=this._events[p];return m?m.fn?1:m.length:0},o.prototype.emit=function(c,p,m,_,D,C){var G=t?t+c:c;if(!this._events[G])return!1;var z=this._events[G],ue=arguments.length,fe,ye;if(z.fn){switch(z.once&&this.removeListener(c,z.fn,void 0,!0),ue){case 1:return z.fn.call(z.context),!0;case 2:return z.fn.call(z.context,p),!0;case 3:return z.fn.call(z.context,p,m),!0;case 4:return z.fn.call(z.context,p,m,_),!0;case 5:return z.fn.call(z.context,p,m,_,D),!0;case 6:return z.fn.call(z.context,p,m,_,D,C),!0}for(ye=1,fe=new Array(ue-1);ye<ue;ye++)fe[ye-1]=arguments[ye];z.fn.apply(z.context,fe)}else{var Pe=z.length,We;for(ye=0;ye<Pe;ye++)switch(z[ye].once&&this.removeListener(c,z[ye].fn,void 0,!0),ue){case 1:z[ye].fn.call(z[ye].context);break;case 2:z[ye].fn.call(z[ye].context,p);break;case 3:z[ye].fn.call(z[ye].context,p,m);break;case 4:z[ye].fn.call(z[ye].context,p,m,_);break;default:if(!fe)for(We=1,fe=new Array(ue-1);We<ue;We++)fe[We-1]=arguments[We];z[ye].fn.apply(z[ye].context,fe)}}return!0},o.prototype.on=function(c,p,m){return i(this,c,p,m,!1)},o.prototype.once=function(c,p,m){return i(this,c,p,m,!0)},o.prototype.removeListener=function(c,p,m,_){var D=t?t+c:c;if(!this._events[D])return this;if(!p)return s(this,D),this;var C=this._events[D];if(C.fn)C.fn===p&&(!_||C.once)&&(!m||C.context===m)&&s(this,D);else{for(var G=0,z=[],ue=C.length;G<ue;G++)(C[G].fn!==p||_&&!C[G].once||m&&C[G].context!==m)&&z.push(C[G]);z.length?this._events[D]=z.length===1?z[0]:z:s(this,D)}return this},o.prototype.removeAllListeners=function(c){var p;return c?(p=t?t+c:c,this._events[p]&&s(this,p)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,a.exports=o}(fs)),fs.exports}var Do=Ao(),ha=ee(Do);const Ys="1.6.15",xs={};function Ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Co(){const a=xs[Ys];if(a)return a.clientCount++,a;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 xs[Ys]=n,n}function ja(a){const e=xs[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return xs[a]=n,n}function Ro(a){const e=xs[a||Ys];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete xs[a||Ys],n&&self.URL.revokeObjectURL(n),r.terminate()}}function Da(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function qs(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Os(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function Ms(a,e){const t=e;let r=0;for(;qs(a,e);){r+=10;const n=Os(a,e+6);r+=n,Da(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)}function Va(a,e,t,r){const n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const D=new Error(`invalid ADTS sampling index:${s}`);a.emit(v.ERROR,v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_PARSING_ERROR,fatal:!0,error:D,reason:D.message});return}const o=(i>>6&3)+1,h=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+o,p=n[s];let m=s;(o===5||o===29)&&(m-=3);const _=[o<<3|(m&14)>>1,(m&1)<<7|h<<3];return he.log(`manifest codec:${r}, parsed codec:${c}, channels:${h}, rate:${p} (ADTS object type:${o} sampling index:${s})`),{config:_,samplerate:p,channelCount:h,codec:c,parsedCodec:c,manifestCodec:r}}function Ca(a,e){return a[e]===255&&(a[e+1]&246)===240}function Za(a,e){return a[e+1]&1?7:9}function fa(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ya(a,e){return e+5<a.length}function da(a,e){return e+1<a.length&&Ca(a,e)}function Xs(a,e){return Ya(a,e)&&Ca(a,e)&&fa(a,e)<=a.length-e}function Ra(a,e){if(da(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const r=fa(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||da(a,n)}return!1}function Ia(a,e,t,r,n){if(!a.samplerate){const i=Va(e,t,r,n);if(!i)return;E(a,i)}}function qa(a){return 1024*9e4/a}function Io(a,e){const t=Za(a,e);if(e+t<=a.length){const r=fa(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function Xa(a,e,t,r,n){const i=qa(a.samplerate),s=r+n*i,o=Io(e,t);let h;if(o){const{frameLength:m,headerLength:_}=o,D=_+m,C=Math.max(0,t+D-e.length);C?(h=new Uint8Array(D-_),h.set(e.subarray(t+_,e.length),0)):h=e.subarray(t+_,t+D);const G={unit:h,pts:s};return C||a.samples.push(G),{sample:G,length:D,missing:C}}const c=e.length-t;return h=new Uint8Array(c),h.set(e.subarray(t,e.length),0),{sample:{unit:h,pts:s},length:c,missing:-1}}function La(a,e){return qs(a,e)&&Os(a,e+6)+10<=a.length-e}function Lo(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function ka(a,e=0,t=1/0){return Qa(a,e,t,Uint8Array)}function Qa(a,e,t,r){const n=ko(a);let i=1;"BYTES_PER_ELEMENT"in r&&(i=r.BYTES_PER_ELEMENT);const s=Ja(a)?a.byteOffset:0,o=(s+a.byteLength)/i,h=(s+e)/i,c=Math.floor(Math.max(0,Math.min(h,o))),p=Math.floor(Math.min(c+Math.max(t,0),o));return new r(n,c,p-c)}function ko(a){return a instanceof ArrayBuffer?a:a.buffer}function Ja(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function Po(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const r=a.data.subarray(1).indexOf(0);if(r===-1)return;const n=ct(ka(a.data,1,r)),i=a.data[2+r],s=a.data.subarray(3+r).indexOf(0);if(s===-1)return;const o=ct(ka(a.data,3+r,s));let h;return n==="-->"?h=ct(ka(a.data,4+r+s)):h=Lo(a.data.subarray(4+r+s)),e.mimeType=n,e.pictureType=i,e.description=o,e.data=h,e}function pe(a){if(a.size<2)return;const e=ct(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function eo(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=ct(a.data.subarray(t),!0);t+=r.length+1;const n=ct(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=ct(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Pa(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=ct(a.data.subarray(t),!0);t+=r.length+1;const n=ct(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=ct(a.data);return{key:a.type,info:"",data:e}}function Oa(a){return a.type==="PRIV"?pe(a):a.type[0]==="W"?Pa(a):a.type==="APIC"?Po(a):eo(a)}function to(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Os(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}}const Bs=10,ro=10;function Ma(a){let e=0;const t=[];for(;qs(a,e);){const r=Os(a,e+6);a[e+5]>>6&1&&(e+=Bs),e+=Bs;const n=e+r;for(;e+ro<n;){const i=to(a.subarray(e)),s=Oa(i);s&&t.push(s),e+=i.size+Bs}Da(a,e)&&(e+=Bs)}return t}function no(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function io(a){if(a.data.byteLength===8){const e=new Uint8Array(a.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 pa(a){const e=Ma(a);for(let t=0;t<e.length;t++){const r=e[t];if(no(r))return io(r)}}let Di=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function Xi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Qs{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=bt(this.cachedData,e),this.cachedData=null);let r=Ms(e,0),n=r?r.length:0,i;const s=this._audioTrack,o=this._id3Track,h=r?pa(r):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&I(h))&&(this.basePTS=so(h,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Di.audioId3,duration:Number.POSITIVE_INFINITY});n<c;){if(this.canParse(e,n)){const p=this.appendFrame(s,e,n);p?(this.frameIndex++,this.lastPTS=p.sample.pts,n+=p.length,i=n):n=c}else La(e,n)?(r=Ms(e,n),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Di.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,i=n):n++;if(n===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=bt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Xi(),id3Track:o,textTrack:Xi()}}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:Xi(),id3Track:this._id3Track,textTrack:Xi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(I(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let ma=null;const Oo=[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],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ba=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Mo=[0,1,1,4];function oo(a,e,t,r,n){if(t+24>e.length)return;const i=Bo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,o=r+n*s,h={unit:e.subarray(t,t+i.frameLength),pts:o,dts:o};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(h),{sample:h,length:i.frameLength,missing:0}}}function Bo(a,e){const t=a[e+1]>>3&3,r=a[e+1]>>1&3,n=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&i!==3){const s=a[e+2]>>1&1,o=a[e+3]>>6,h=t===3?3-r:r===3?3:4,c=Oo[h*14+n-1]*1e3,m=ao[(t===3?0:t===2?1:2)*3+i],_=o===3?1:2,D=Ba[t][r],C=Mo[r],G=D*8*C,z=Math.floor(D*c/m+s)*C;if(ma===null){const ye=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ma=ye?parseInt(ye[1]):0}return!!ma&&ma<=87&&r===2&&c>=224e3&&o===0&&(a[e+3]=a[e+3]|128),{sampleRate:m,channelCount:_,frameLength:z,samplesPerFrame:G}}}function P(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function u(a,e){return e+1<a.length&&P(a,e)}function f(a,e){return P(a,e)&&4<=a.length-e}function d(a,e){if(e+1<a.length&&P(a,e)){const r=Bo(a,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const i=e+n;return i===a.length||u(a,i)}return!1}class g extends Qs{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=Ms(e,0);let n=(r==null?void 0:r.length)||0;if(d(e,n))return!1;for(let i=e.length;n<i;n++)if(Ra(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Xs(e,t)}appendFrame(e,t,r){Ia(e,this.observer,t,r,e.manifestCodec);const n=Xa(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const w=(a,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;r>0;){s[0]=a[e];const o=Math.min(r,8),h=8-o;i[0]=4278190080>>>24+h<<h,n[0]=(s[0]&i[0])>>h,t=t?t<<o|n[0]:n[0],e+=1,r-=o}return t};class k extends Qs{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=X(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=Ms(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&pa(t)!==void 0&&w(e,r)<16}}function X(a,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const o=[48e3,44100,32e3][i],h=e[t+4]&63,p=[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][h*3+i]*2;if(t+p>e.length)return-1;const m=e[t+6]>>5;let _=0;m===2?_+=2:(m&1&&m!==1&&(_+=2),m&4&&(_+=2));const D=(e[t+6]<<8|e[t+7])>>12-_&1,G=[2,1,2,3,3,4,4,5][m]+D,z=e[t+5]>>3,ue=e[t+5]&7,fe=new Uint8Array([i<<6|z<<1|ue>>2,(ue&3)<<6|m<<3|D<<2|h>>4,h<<4&224]),ye=1536/o*9e4,Pe=r+n*ye,We=e.subarray(t,t+p);return a.config=fe,a.channelCount=G,a.samplerate=o,a.samples.push({unit:We,pts:Pe}),p}class le extends Qs{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=Ms(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&pa(t)!==void 0&&w(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(d(e,r))return he.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return f(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return oo(e,t,r,this.basePTS,this.frameIndex)}}const xe=/\/emsg[-/]ID3/i;class Ne{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 i=this.videoTrack=Xi("video",1),s=this.audioTrack=Xi("audio",1),o=this.txtTrack=Xi("text",1);if(this.id3Track=Xi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=ht(e);if(h.video){const{id:c,timescale:p,codec:m,supplemental:_}=h.video;i.id=c,i.timescale=o.timescale=p,i.codec=m,i.supplemental=_}if(h.audio){const{id:c,timescale:p,codec:m}=h.audio;s.id=c,s.timescale=p,s.codec=m}o.id=Yt.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return Oe(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=bt(this.remainderData,e));const o=Gt(r);this.remainderData=o.remainder,n.samples=o.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=At(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:s,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=At(e,t),{videoTrack:t,audioTrack:Xi(),id3Track:n,textTrack:Xi()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=Se(e.samples,["emsg"]);n&&n.forEach(i=>{const s=ir(i);if(xe.test(s.schemeIdUri)){const o=Qe(s,t);let h=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;h<=.001&&(h=Number.POSITIVE_INFINITY);const c=s.payload;r.samples.push({data:c,len:c.byteLength,dts:o,pts:o,type:Di.emsg,duration:h})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=Qe(s,t);r.samples.push({data:s.payload,len:s.payload.byteLength,dts:o,pts:o,type:Di.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 Qe(a,e){return I(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class mt{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new ln(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,un.cbc)}decryptAacSample(e,t,r){const n=e[t].unit;if(n.length<=16)return;const i=n.subarray(16,n.length-n.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(o=>{const h=new Uint8Array(o);n.set(h,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)}).catch(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 i=32;i<e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)e.set(r.subarray(n,n+16),i);return e}decryptAvcSample(e,t,r,n,i){const s=Pt(i.data),o=this.getAvcEncryptedData(s);this.decryptBuffer(o.buffer).then(h=>{i.data=this.getAvcDecryptedUnit(s,h),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)}).catch(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 i=e[t].units;for(;!(r>=i.length);r++){const s=i[r];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,r,n,s),!this.decrypter.isSync()))return}}}}class Lt{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 i=r.units;n=i[i.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 i=r[n-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,r){const n=t.byteLength;let i=e.naluState||0;const s=i,o=[];let h=0,c,p,m,_=-1,D=0;for(i===-1&&(_=0,D=this.getNALuType(t,0),i=0,h=1);h<n;){if(c=t[h++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=h-i-1,_>=0){const C={data:t.subarray(_,p),type:D};o.push(C)}else{const C=this.getLastNalUnit(e.samples);C&&(s&&h<=4-s&&C.state&&(C.data=C.data.subarray(0,C.data.byteLength-s)),p>0&&(C.data=bt(C.data,t.subarray(0,p)),C.state=0))}h<n?(m=this.getNALuType(t,h),_=h,D=m,i=0):i=-1}else i=0}if(_>=0&&i>=0){const C={data:t.subarray(_,n),type:D,state:i};o.push(C)}if(o.length===0){const C=this.getLastNalUnit(e.samples);C&&(C.data=bt(C.data,t))}return e.naluState=i,o}}class zt{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),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}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&&he.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 sr extends Lt{parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,o,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,m;switch(c.type){case 1:{let G=!1;o=!0;const z=c.data;if(h&&z.length>4){const ue=this.readSliceType(z);(ue===2||ue===4||ue===7||ue===9)&&(G=!0)}if(G){var _;(_=s)!=null&&_.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.frame=!0,s.key=G;break}case 5:o=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 6:{o=!0,qt(c.data,1,r.pts,t.samples);break}case 7:{var D,C;o=!0,h=!0;const G=c.data,z=this.readSPS(G);if(!e.sps||e.width!==z.width||e.height!==z.height||((D=e.pixelRatio)==null?void 0:D[0])!==z.pixelRatio[0]||((C=e.pixelRatio)==null?void 0:C[1])!==z.pixelRatio[1]){e.width=z.width,e.height=z.height,e.pixelRatio=z.pixelRatio,e.sps=[G];const ue=G.subarray(1,4);let fe="avc1.";for(let ye=0;ye<3;ye++){let Pe=ue[ye].toString(16);Pe.length<2&&(Pe="0"+Pe),fe+=Pe}e.codec=fe}break}case 8:o=!0,e.pps=[c.data];break;case 9:o=!0,e.audFound=!0,(m=s)!=null&&m.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:o=!0;break;default:o=!1;break}s&&o&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new zt(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let r=8,n=8,i;for(let s=0;s<e;s++)n!==0&&(i=t.readEG(),n=(r+i+256)%256),r=n===0?r:n}readSPS(e){const t=new zt(e);let r=0,n=0,i=0,s=0,o,h,c;const p=t.readUByte.bind(t),m=t.readBits.bind(t),_=t.readUEG.bind(t),D=t.readBoolean.bind(t),C=t.skipBits.bind(t),G=t.skipEG.bind(t),z=t.skipUEG.bind(t),ue=this.skipScalingList.bind(this);p();const fe=p();if(m(5),C(3),p(),z(),fe===100||fe===110||fe===122||fe===244||fe===44||fe===83||fe===86||fe===118||fe===128){const at=_();if(at===3&&C(1),z(),z(),C(1),D())for(h=at!==3?8:12,c=0;c<h;c++)D()&&(c<6?ue(16,t):ue(64,t))}z();const ye=_();if(ye===0)_();else if(ye===1)for(C(1),G(),G(),o=_(),c=0;c<o;c++)G();z(),C(1);const Pe=_(),We=_(),dt=m(1);dt===0&&C(1),C(1),D()&&(r=_(),n=_(),i=_(),s=_());let je=[1,1];if(D()&&D())switch(p()){case 1:je=[1,1];break;case 2:je=[12,11];break;case 3:je=[10,11];break;case 4:je=[16,11];break;case 5:je=[40,33];break;case 6:je=[24,11];break;case 7:je=[20,11];break;case 8:je=[32,11];break;case 9:je=[80,33];break;case 10:je=[18,11];break;case 11:je=[15,11];break;case 12:je=[64,33];break;case 13:je=[160,99];break;case 14:je=[4,3];break;case 15:je=[3,2];break;case 16:je=[2,1];break;case 255:{je=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((Pe+1)*16-r*2-n*2),height:(2-dt)*(We+1)*16-(dt?2:4)*(i+s),pixelRatio:je}}}class Ar extends Lt{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,o,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,m;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,h){var _;(_=s)!=null&&_.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:o=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 39:o=!0,qt(c.data,2,r.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=E(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(o=!0,h=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const D=this.readSPS(c.data);e.width=D.width,e.height=D.height,e.pixelRatio=D.pixelRatio,e.codec=D.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const C in D.params)e.params[C]=D.params[C]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const D=this.readPPS(c.data);for(const C in D)e.params[C]=D[C]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(m=s)!=null&&m.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:o=!1;break}s&&o&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,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 zt(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 zt(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const r=t.readBits(3);t.readBoolean();const n=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),o=t.readUByte(),h=t.readUByte(),c=t.readUByte(),p=t.readUByte(),m=t.readUByte(),_=t.readUByte(),D=t.readUByte(),C=t.readUByte(),G=t.readUByte(),z=t.readUByte(),ue=t.readUByte(),fe=[],ye=[];for(let Cn=0;Cn<r;Cn++)fe.push(t.readBoolean()),ye.push(t.readBoolean());if(r>0)for(let Cn=r;Cn<8;Cn++)t.readBits(2);for(let Cn=0;Cn<r;Cn++)fe[Cn]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),ye[Cn]&&t.readUByte();t.readUEG();const Pe=t.readUEG();Pe==3&&t.skipBits(1);const We=t.readUEG(),dt=t.readUEG(),je=t.readBoolean();let at=0,it=0,Ye=0,Rt=0;je&&(at+=t.readUEG(),it+=t.readUEG(),Ye+=t.readUEG(),Rt+=t.readUEG());const ur=t.readUEG(),wr=t.readUEG(),Fr=t.readUEG(),Tr=t.readBoolean();for(let Cn=Tr?0:r;Cn<=r;Cn++)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 Fi=0;Fi<4;Fi++)for(let ts=0;ts<(Fi===3?2:6);ts++)if(!t.readBoolean())t.readUEG();else{const us=Math.min(64,1<<4+(Fi<<1));Fi>1&&t.readEG();for(let Sa=0;Sa<us;Sa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const mr=t.readUEG();let Pr=0;for(let Cn=0;Cn<mr;Cn++){let Fi=!1;if(Cn!==0&&(Fi=t.readBoolean()),Fi){Cn===mr&&t.readUEG(),t.readBoolean(),t.readUEG();let ts=0;for(let ia=0;ia<=Pr;ia++){const us=t.readBoolean();let Sa=!1;us||(Sa=t.readBoolean()),(us||Sa)&&ts++}Pr=ts}else{const ts=t.readUEG(),ia=t.readUEG();Pr=ts+ia;for(let us=0;us<ts;us++)t.readUEG(),t.readBoolean();for(let us=0;us<ia;us++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Cn=t.readUEG();for(let Fi=0;Fi<Cn;Fi++){for(let ts=0;ts<Fr+4;ts++)t.readBits(1);t.readBits(1)}}let ar=0,or=1,pn=1,On=!0,mn=1,En=0;t.readBoolean(),t.readBoolean();let Bi=!1;if(t.readBoolean()){if(t.readBoolean()){const sa=t.readUByte(),mu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],To=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];sa>0&&sa<16?(or=mu[sa-1],pn=To[sa-1]):sa===255&&(or=t.readBits(16),pn=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(),Bi=t.readBoolean(),Bi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(mn=t.readBits(32),En=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const To=t.readBoolean(),gu=t.readBoolean();let za=!1;(To||gu)&&(za=t.readBoolean(),za&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),za&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=r;vu++){On=t.readBoolean();const Kc=On||t.readBoolean();let _u=!1;Kc?t.readEG():_u=t.readBoolean();const yu=_u?1:t.readUEG()+1;if(To)for(let Ga=0;Ga<yu;Ga++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let Ga=0;Ga<yu;Ga++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),ar=t.readUEG())}let es=We,vs=dt;if(je){let Cn=1,Fi=1;Pe===1?Cn=Fi=2:Pe==2&&(Cn=2),es=We-Cn*it-Cn*at,vs=dt-Fi*Rt-Fi*Ye}const na=n?["A","B","C"][n]:"",Gc=o<<24|h<<16|c<<8|p;let fl=0;for(let Cn=0;Cn<32;Cn++)fl=(fl|(Gc>>Cn&1)<<31-Cn)>>>0;let dl=fl.toString(16);return s===1&&dl==="2"&&(dl="6"),{codecString:`hvc1.${na}${s}.${dl}.${i?"H":"L"}${ue}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:n,general_profile_compatibility_flags:[o,h,c,p],general_constraint_indicator_flags:[m,_,D,C,G,z],general_level_idc:ue,bit_depth:ur+8,bit_depth_luma_minus8:ur,bit_depth_chroma_minus8:wr,min_spatial_segmentation_idc:ar,chroma_format_idc:Pe,frame_rate:{fixed:On,fps:En/mn}},width:es,height:vs,pixelRatio:[or,pn]}}readPPS(e){const t=new zt(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(),i=t.readBoolean();let s=1;return i&&n?s=0:i?s=3:n&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Rr=188;class Yr{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=Yr.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(Rr*5,t-Rr)+1,n=0;for(;n<r;){let i=!1,s=-1,o=0;for(let h=n;h<t;h+=Rr)if(e[h]===71&&(t-h===Rr||e[h+Rr]===71)){if(o++,s===-1&&(s=h,s!==0&&(r=Math.min(s+Rr*99,e.length-Rr)+1)),i||(i=nn(e,h)===0),i&&o>1&&(s===0&&o>2||h+Rr>r))return s}else{if(o)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Yt[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=Yr.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=Yr.createTrack("audio",n),this._id3Track=Yr.createTrack("id3"),this._txtTrack=Yr.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,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 i;const s=this._videoTrack,o=this._audioTrack,h=this._id3Track,c=this._txtTrack;let p=s.pid,m=s.pesData,_=o.pid,D=h.pid,C=o.pesData,G=h.pesData,z=null,ue=this.pmtParsed,fe=this._pmtId,ye=e.length;if(this.remainderData&&(e=bt(this.remainderData,e),ye=e.length,this.remainderData=null),ye<Rr&&!n)return this.remainderData=e,{audioTrack:o,videoTrack:s,id3Track:h,textTrack:c};const Pe=Math.max(0,Yr.syncOffset(e));ye-=(ye-Pe)%Rr,ye<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,ye,e.buffer.byteLength-ye));let We=0;for(let je=Pe;je<ye;je+=Rr)if(e[je]===71){const at=!!(e[je+1]&64),it=nn(e,je),Ye=(e[je+3]&48)>>4;let Rt;if(Ye>1){if(Rt=je+5+e[je+4],Rt===je+Rr)continue}else Rt=je+4;switch(it){case p:at&&(m&&(i=Nn(m,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),m={data:[],size:0}),m&&(m.data.push(e.subarray(Rt,je+Rr)),m.size+=je+Rr-Rt);break;case _:if(at){if(C&&(i=Nn(C,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,i);break;case"mp3":this.parseMPEGPES(o,i);break;case"ac3":this.parseAC3PES(o,i);break}C={data:[],size:0}}C&&(C.data.push(e.subarray(Rt,je+Rr)),C.size+=je+Rr-Rt);break;case D:at&&(G&&(i=Nn(G,this.logger))&&this.parseID3PES(h,i),G={data:[],size:0}),G&&(G.data.push(e.subarray(Rt,je+Rr)),G.size+=je+Rr-Rt);break;case 0:at&&(Rt+=e[Rt]+1),fe=this._pmtId=Gn(e,Rt);break;case fe:{at&&(Rt+=e[Rt]+1);const ur=Pn(e,Rt,this.typeSupported,r,this.observer,this.logger);p=ur.videoPid,p>0&&(s.pid=p,s.segmentCodec=ur.segmentVideoCodec),_=ur.audioPid,_>0&&(o.pid=_,o.segmentCodec=ur.segmentAudioCodec),D=ur.id3Pid,D>0&&(h.pid=D),z!==null&&!ue&&(this.logger.warn(`MPEG-TS PMT found at ${je} after unknown PID '${z}'. Backtracking to sync byte @${Pe} to parse all TS packets.`),z=null,je=Pe-188),ue=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=it;break}}else We++;We>0&&Kn(this.observer,new Error(`Found ${We} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=m,o.pesData=C,h.pesData=G;const dt={audioTrack:o,videoTrack:s,id3Track:h,textTrack:c};return n&&this.extractRemainingSamples(dt),dt}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:i}=e,s=r.pesData,o=t.pesData,h=n.pesData;let c;if(s&&(c=Nn(s,this.logger))?(this.readyVideoParser(r.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(r,i,c,!0),r.pesData=null)):r.pesData=s,o&&(c=Nn(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;h&&(c=Nn(h,this.logger))?(this.parseID3PES(n,c),n.pesData=null):n.pesData=h}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new mt(this.observer,this.config,t);return this.decrypt(n,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new sr:e==="hevc"&&(this.videoParser=new Ar))}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:i}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{r(e)}):r(e)}):i.samples&&t.decryptAvcSamples(i.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 i=t.data;if(n){this.aacOverFlow=null;const m=n.missing,_=n.sample.unit.byteLength;if(m===-1)i=bt(n.sample.unit,i);else{const D=_-m;n.sample.unit.set(i.subarray(0,m),D),e.samples.push(n.sample),r=n.missing}}let s,o;for(s=r,o=i.length;s<o-1&&!da(i,s);s++);if(s!==r){let m;const _=s<o-1;if(_?m=`AAC PES did not start with ADTS header,offset:${s}`:m="No ADTS header found in AAC PES",Kn(this.observer,new Error(m),_,this.logger),!_)return}Ia(e,this.observer,i,s,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(n){const m=qa(e.samplerate);h=n.sample.pts+m}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<o;)if(p=Xa(e,i,s,h,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<o-1&&!da(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(u(r,s)){const h=oo(e,r,s,o,i);if(h)s+=h.length,i++;else break}else s++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,o=0,h;for(;o<i&&(h=X(e,r,o,n,s++))>0;)o+=h}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=E({},t,{type:this._videoTrack?Di.emsg:Di.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function nn(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Gn(a,e){return(a[e+10]&31)<<8|a[e+11]}function Pn(a,e,t,r,n,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(a[e+1]&15)<<8|a[e+2],h=e+3+o-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<h;){const p=nn(a,e),m=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){Wn("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=p);break;case 21:s.id3Pid===-1&&(s.id3Pid=p);break;case 219:if(!r){Wn("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=p);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="mp3");break;case 193:if(!r){Wn("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&m>0){let _=e+5,D=m;for(;D>2;){switch(a[_]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=p,s.segmentAudioCodec="ac3");break}const G=a[_+1]+2;_+=G,D-=G}}break;case 194:case 135:return Kn(n,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=p,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=m+5}return s}function Kn(a,e,t,r){r.warn(`parsing error: ${e.message}`),a.emit(v.ERROR,v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Wn(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Nn(a,e){let t=0,r,n,i,s,o;const h=a.data;if(!a||a.size===0)return null;for(;h[0].length<19&&h.length>1;)h[0]=bt(h[0],h[1]),h.splice(1,1);if(r=h[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>a.size-6)return null;const p=r[7];p&192&&(s=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,p&64?(o=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,s-o>60*9e4&&(e.warn(`${Math.round((s-o)/9e4)}s delta between PTS and DTS, align them`),s=o)):o=s),i=r[8];let m=i+9;if(a.size<=m)return null;a.size-=m;const _=new Uint8Array(a.size);for(let D=0,C=h.length;D<C;D++){r=h[D];let G=r.byteLength;if(m)if(m>G){m-=G;continue}else r=r.subarray(m),G-=m,m=0;_.set(r,t),t+=G}return n&&(n-=i+3),{data:_,pts:s,dts:o,len:n}}return null}class Ci{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 Yn=Math.pow(2,32)-1;class Ke{static init(){Ke.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 Ke.types)Ke.types.hasOwnProperty(e)&&(Ke.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]);Ke.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]),i=new Uint8Array([0,0,0,0,0,0,0,0]);Ke.STTS=Ke.STSC=Ke.STCO=i,Ke.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ke.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ke.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ke.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);Ke.FTYP=Ke.box(Ke.types.ftyp,s,h,s,o),Ke.DINF=Ke.box(Ke.types.dinf,Ke.box(Ke.types.dref,n))}static box(e,...t){let r=8,n=t.length;const i=n;for(;n--;)r+=t[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(e,4),n=0,r=8;n<i;n++)s.set(t[n],r),r+=t[n].byteLength;return s}static hdlr(e){return Ke.box(Ke.types.hdlr,Ke.HDLR_TYPES[e])}static mdat(e){return Ke.box(Ke.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(Yn+1)),n=Math.floor(t%(Yn+1));return Ke.box(Ke.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 Ke.box(Ke.types.mdia,Ke.mdhd(e.timescale||0,e.duration||0),Ke.hdlr(e.type),Ke.minf(e))}static mfhd(e){return Ke.box(Ke.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"?Ke.box(Ke.types.minf,Ke.box(Ke.types.smhd,Ke.SMHD),Ke.DINF,Ke.stbl(e)):Ke.box(Ke.types.minf,Ke.box(Ke.types.vmhd,Ke.VMHD),Ke.DINF,Ke.stbl(e))}static moof(e,t,r){return Ke.box(Ke.types.moof,Ke.mfhd(e),Ke.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=Ke.trak(e[t]);return Ke.box.apply(null,[Ke.types.moov,Ke.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(Ke.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=Ke.trex(e[t]);return Ke.box.apply(null,[Ke.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(Yn+1)),n=Math.floor(t%(Yn+1)),i=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 Ke.box(Ke.types.mvhd,i)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,i;for(n=0;n<t.length;n++)i=t[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return Ke.box(Ke.types.sdtp,r)}static stbl(e){return Ke.box(Ke.types.stbl,Ke.stsd(e),Ke.box(Ke.types.stts,Ke.STTS),Ke.box(Ke.types.stsc,Ke.STSC),Ke.box(Ke.types.stsz,Ke.STSZ),Ke.box(Ke.types.stco,Ke.STCO))}static avc1(e){let t=[],r=[],n,i,s;for(n=0;n<e.sps.length;n++)i=e.sps[n],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(n=0;n<e.pps.length;n++)i=e.pps[n],s=i.byteLength,r.push(s>>>8&255),r.push(s&255),r=r.concat(Array.prototype.slice.call(i));const o=Ke.box(Ke.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),h=e.width,c=e.height,p=e.pixelRatio[0],m=e.pixelRatio[1];return Ke.box(Ke.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,h>>8&255,h&255,c>>8&255,c&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,Ke.box(Ke.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ke.box(Ke.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,m>>24,m>>16&255,m>>8&255,m&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 Ke.box(Ke.types.mp4a,Ke.audioStsd(e),Ke.box(Ke.types.esds,Ke.esds(e)))}static mp3(e){return Ke.box(Ke.types[".mp3"],Ke.audioStsd(e))}static ac3(e){return Ke.box(Ke.types["ac-3"],Ke.audioStsd(e),Ke.box(Ke.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Ke.box(Ke.types.stsd,Ke.STSD,Ke.mp4a(e));if(t==="ac3"&&e.config)return Ke.box(Ke.types.stsd,Ke.STSD,Ke.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Ke.box(Ke.types.stsd,Ke.STSD,Ke.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Ke.box(Ke.types.stsd,Ke.STSD,Ke.avc1(e));if(t==="hevc"&&e.vps)return Ke.box(Ke.types.stsd,Ke.STSD,Ke.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,i=e.height||0,s=Math.floor(r/(Yn+1)),o=Math.floor(r%(Yn+1));return Ke.box(Ke.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,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&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,i>>8&255,i&255,0,0]))}static traf(e,t){const r=Ke.sdtp(e),n=e.id,i=Math.floor(t/(Yn+1)),s=Math.floor(t%(Yn+1));return Ke.box(Ke.types.traf,Ke.box(Ke.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),Ke.box(Ke.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),Ke.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,Ke.box(Ke.types.trak,Ke.tkhd(e),Ke.mdia(e))}static trex(e){const t=e.id;return Ke.box(Ke.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,i=12+16*n,s=new Uint8Array(i);let o,h,c,p,m,_;for(t+=8+i,s.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),o=0;o<n;o++)h=r[o],c=h.duration,p=h.size,m=h.flags,_=h.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255,m.isLeading<<2|m.dependsOn,m.isDependedOn<<6|m.hasRedundancy<<4|m.paddingValue<<1|m.isNonSync,m.degradPrio&61440,m.degradPrio&15,_>>>24&255,_>>>16&255,_>>>8&255,_&255],12+16*o);return Ke.box(Ke.types.trun,s)}static initSegment(e){Ke.types||Ke.init();const t=Ke.moov(e);return bt(Ke.FTYP,t)}static hvc1(e){const t=e.params,r=[e.vps,e.sps,e.pps],n=4,i=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 s=i.length;for(let C=0;C<r.length;C+=1){s+=3;for(let G=0;G<r[C].length;G+=1)s+=2+r[C][G].length}const o=new Uint8Array(s);o.set(i,0),s=i.length;const h=r.length-1;for(let C=0;C<r.length;C+=1){o.set(new Uint8Array([32+C|(C===h?128:0),0,r[C].length]),s),s+=3;for(let G=0;G<r[C].length;G+=1)o.set(new Uint8Array([r[C][G].length>>8,r[C][G].length&255]),s),s+=2,o.set(r[C][G],s),s+=r[C][G].length}const c=Ke.box(Ke.types.hvcC,o),p=e.width,m=e.height,_=e.pixelRatio[0],D=e.pixelRatio[1];return Ke.box(Ke.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,p>>8&255,p&255,m>>8&255,m&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]),c,Ke.box(Ke.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ke.box(Ke.types.pasp,new Uint8Array([_>>24,_>>16&255,_>>8&255,_&255,D>>24,D>>16&255,D>>8&255,D&255])))}}Ke.types=void 0,Ke.HDLR_TYPES=void 0,Ke.STTS=void 0,Ke.STSC=void 0,Ke.STCO=void 0,Ke.STSZ=void 0,Ke.VMHD=void 0,Ke.SMHD=void 0,Ke.STSD=void 0,Ke.FTYP=void 0,Ke.DINF=void 0;const $i=9e4;function Qi(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function Zi(a,e,t=1,r=!1){return Qi(a,e,1/t,r)}function ci(a,e=!1){return Qi(a,1e3,1/$i,e)}function ds(a,e=1){return Qi(a,$i,1/e)}function Ji(a){const{baseTime:e,timescale:t,trackId:r}=a;return`${e/t} (${e}/${t}) trackId: ${r}`}const lo=10*1e3,Fo=1024,Fs=1152,Ns=1536;let Yi=null,$s=null;function Js(a,e,t,r){return{duration:e,size:t,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class ga extends Y{constructor(e,t,r,n){if(super("mp4-remuxer",n),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.ISGenerated=!1,Yi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Yi=s?parseInt(s[1]):0}if($s===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);$s=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log(`Reset initPTS: ${t&&Ji(t)} > ${e&&Ji(e)}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((i,s)=>{let o=s.pts,h=o-i;return h<-4294967296&&(t=!0,o=Ui(o,r),h=o-i),h>0?i:o},r);return t&&this.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,o,h){let c,p,m,_,D,C,G=i,z=i;const ue=e.pid>-1,fe=t.pid>-1,ye=t.samples.length,Pe=e.samples.length>0,We=o&&ye>0||ye>1;if((!ue||Pe)&&(!fe||We)||this.ISGenerated||o){if(this.ISGenerated){var je,at,it,Ye;const Fr=this.videoTrackConfig;(Fr&&(t.width!==Fr.width||t.height!==Fr.height||((je=t.pixelRatio)==null?void 0:je[0])!==((at=Fr.pixelRatio)==null?void 0:at[0])||((it=t.pixelRatio)==null?void 0:it[1])!==((Ye=Fr.pixelRatio)==null?void 0:Ye[1]))||!Fr&&We||this.nextAudioTs===null&&Pe)&&this.resetInitSegment()}this.ISGenerated||(m=this.generateIS(e,t,i,s));const Rt=this.isVideoContiguous;let ur=-1,wr;if(We&&(ur=No(t.samples),!Rt&&this.config.forceKeyFrameOnDiscontinuity))if(C=!0,ur>0){this.warn(`Dropped ${ur} out of ${ye} video samples due to a missing keyframe`);const Fr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(ur),t.dropped+=ur,z+=(t.samples[0].pts-Fr)/t.inputTimeScale,wr=z}else ur===-1&&(this.warn(`No keyframe found out of ${ye} video samples`),C=!1);if(this.ISGenerated){if(Pe&&We){const Fr=this.getVideoStartPts(t.samples),nr=(Ui(e.samples[0].pts,Fr)-Fr)/t.inputTimeScale;G+=Math.max(0,nr),z+=Math.max(0,-nr)}if(Pe){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),m=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,G,this.isAudioContiguous,s,fe||We||h===ie.AUDIO?z:void 0),We){const Fr=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),m=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,z,Rt,Fr)}}else We&&(c=this.remuxVideo(t,z,Rt,0));c&&(c.firstKeyFrame=ur,c.independent=ur!==-1,c.firstKeyFramePTS=wr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(D=va(r,i,this._initPTS,this._initDTS)),n.samples.length&&(_=Fa(n,i,this._initPTS))),{audio:p,video:c,initSegment:m,independent:C,text:_,id3:D}}computeInitPts(e,t,r,n){const i=Math.round(r*t);let s=Ui(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${n}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,r,n){const i=e.samples,s=t.samples,o=this.typeSupported,h={},c=this._initPTS;let p=!c||n,m="audio/mp4",_,D,C,G=-1;if(p&&(_=D=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(m="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}h.audio={id:"audio",container:m,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):Ke.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(G=e.id,C=e.inputTimeScale,!c||C!==c.timescale?_=D=this.computeInitPts(i[0].pts,C,r,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Ke.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(G=t.id,C=t.inputTimeScale,!c||C!==c.timescale){const z=this.getVideoStartPts(s),ue=Ui(s[0].dts,z),fe=this.computeInitPts(ue,C,r,"video"),ye=this.computeInitPts(z,C,r,"video");D=Math.min(D,fe),_=Math.min(_,ye)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${n?"":"~"}${r} ${_/C} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${r} offset: ${_/C} (${_}/${C}) trackId: ${G}`),this._initPTS={baseTime:_,timescale:C,trackId:G},this._initDTS={baseTime:D,timescale:C,trackId:G}):_=C=void 0,{tracks:h,initPTS:_,timescale:C,trackId:G}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,o=[],h=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let m=this.nextVideoTs,_=8,D=this.videoSampleDuration,C,G,z=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,fe=!1;if(!r||m===null){const ar=p+t*i,or=s[0].pts-Ui(s[0].dts,s[0].pts);Yi&&m!==null&&Math.abs(ar-or-(m+p))<15e3?r=!0:m=ar-or-p}const ye=m+p;for(let ar=0;ar<h;ar++){const or=s[ar];or.pts=Ui(or.pts,ye),or.dts=Ui(or.dts,ye),or.dts<s[ar>0?ar-1:ar].dts&&(fe=!0)}fe&&s.sort(function(ar,or){const pn=ar.dts-or.dts,On=ar.pts-or.pts;return pn||On}),C=s[0].dts,G=s[s.length-1].dts;const Pe=G-C,We=Pe?Math.round(Pe/(h-1)):D||e.inputTimeScale/30;if(r){const ar=C-ye,or=ar>We,pn=ar<-1;if((or||pn)&&(or?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ci(ar,!0)} ms (${ar}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ci(-ar,!0)} ms (${ar}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!pn||ye>=s[0].pts||Yi)){C=ye;const On=s[0].pts-ar;if(or)s[0].dts=C,s[0].pts=On;else{let mn=!0;for(let En=0;En<s.length&&!(s[En].dts>On&&mn);En++){const Bi=s[En].pts;if(s[En].dts-=ar,s[En].pts-=ar,En<s.length-1){const Pi=s[En+1].pts,es=s[En].pts,vs=Pi<=es,na=Pi<=Bi;mn=vs==na}}}this.log(`Video: Initial PTS/DTS adjusted: ${ci(On,!0)}/${ci(C,!0)}, delta: ${ci(ar,!0)} ms`)}}C=Math.max(0,C);let dt=0,je=0,at=C;for(let ar=0;ar<h;ar++){const or=s[ar],pn=or.units,On=pn.length;let mn=0;for(let En=0;En<On;En++)mn+=pn[En].data.length;je+=mn,dt+=On,or.length=mn,or.dts<at?(or.dts=at,at+=We/4|0||1):at=or.dts,z=Math.min(or.pts,z),ue=Math.max(or.pts,ue)}G=s[h-1].dts;const it=je+4*dt+8;let Ye;try{Ye=new Uint8Array(it)}catch(ar){this.observer.emit(v.ERROR,v.ERROR,{type:_e.MUX_ERROR,details:Z.REMUX_ALLOC_ERROR,fatal:!1,error:ar,bytes:it,reason:`fail allocating video mdat ${it}`});return}const Rt=new DataView(Ye.buffer);Rt.setUint32(0,it),Ye.set(Ke.types.mdat,4);let ur=!1,wr=Number.POSITIVE_INFINITY,Fr=Number.POSITIVE_INFINITY,Tr=Number.NEGATIVE_INFINITY,nr=Number.NEGATIVE_INFINITY;for(let ar=0;ar<h;ar++){const or=s[ar],pn=or.units;let On=0;for(let Bi=0,Pi=pn.length;Bi<Pi;Bi++){const es=pn[Bi],vs=es.data,na=es.data.byteLength;Rt.setUint32(_,na),_+=4,Ye.set(vs,_),_+=na,On+=4+na}let mn;if(ar<h-1)D=s[ar+1].dts-or.dts,mn=s[ar+1].pts-or.pts;else{const Bi=this.config,Pi=ar>0?or.dts-s[ar-1].dts:We;if(mn=ar>0?or.pts-s[ar-1].pts:We,Bi.stretchShortVideoTrack&&this.nextAudioTs!==null){const es=Math.floor(Bi.maxBufferHole*i),vs=(n?z+n*i:this.nextAudioTs+p)-or.pts;vs>es?(D=vs-Pi,D<0?D=Pi:ur=!0,this.log(`It is approximately ${vs/90} ms to the next segment; using duration ${D/90} ms for the last video frame.`)):D=Pi}else D=Pi}const En=Math.round(or.pts-or.dts);wr=Math.min(wr,D),Tr=Math.max(Tr,D),Fr=Math.min(Fr,mn),nr=Math.max(nr,mn),o.push(Js(or.key,D,On,En))}if(o.length){if(Yi){if(Yi<70){const ar=o[0].flags;ar.dependsOn=2,ar.isNonSync=0}}else if($s&&nr-Fr<Tr-wr&&We/Tr<.025&&o[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let ar=C;for(let or=0,pn=o.length;or<pn;or++){const On=ar+o[or].duration,mn=ar+o[or].cts;if(or<pn-1){const En=On+o[or+1].cts;o[or].duration=En-mn}else o[or].duration=or?o[or-1].duration:We;o[or].cts=0,ar=On}}}D=ur||!D?We:D;const Dr=G+D;this.nextVideoTs=m=Dr-p,this.videoSampleDuration=D,this.isVideoContiguous=!0;const Xr={data1:Ke.moof(e.sequenceNumber++,C,E(e,{samples:o})),data2:Ye,startPTS:(z-p)/i,endPTS:(ue+D-p)/i,startDTS:(C-p)/i,endDTS:m/i,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Xr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Fs;case"ac3":return Ns;default:return Fo}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,o=e.samplerate?e.samplerate:s,h=s/o,c=this.getSamplesPerFrame(e),p=c*h,m=this._initPTS,_=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,D=[],C=i!==void 0;let G=e.samples,z=_?0:8,ue=this.nextAudioTs||-1;const fe=m.baseTime*s/m.timescale,ye=fe+t*s;if(this.isAudioContiguous=r=r||G.length&&ue>0&&(n&&Math.abs(ye-(ue+fe))<9e3||Math.abs(Ui(G[0].pts,ye)-(ue+fe))<20*p),G.forEach(function(nr){nr.pts=Ui(nr.pts,ye)}),!r||ue<0){const nr=G.length;if(G=G.filter(Dr=>Dr.pts>=0),nr!==G.length&&this.warn(`Removed ${G.length-nr} of ${nr} samples (initPTS ${fe} / ${s})`),!G.length)return;i===0?ue=0:n&&!C?ue=Math.max(0,ye-fe):ue=G[0].pts-fe}if(e.segmentCodec==="aac"){const nr=this.config.maxAudioFramesDrift;for(let Dr=0,mr=ue+fe;Dr<G.length;Dr++){const Pr=G[Dr],Xr=Pr.pts,ar=Xr-mr,or=Math.abs(1e3*ar/s);if(ar<=-nr*p&&C)Dr===0&&(this.warn(`Audio frame @ ${(Xr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*ar/s)} ms.`),this.nextAudioTs=ue=Xr-fe,mr=Xr);else if(ar>=nr*p&&or<lo&&C){let pn=Math.round(ar/p);for(mr=Xr-pn*p;mr<0&&pn&&p;)pn--,mr+=p;Dr===0&&(this.nextAudioTs=ue=mr-fe),this.warn(`Injecting ${pn} audio frames @ ${((mr-fe)/s).toFixed(3)}s due to ${Math.round(1e3*ar/s)} ms gap.`);for(let On=0;On<pn;On++){let mn=Ci.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);mn||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),mn=Pr.unit.subarray()),G.splice(Dr,0,{unit:mn,pts:mr}),mr+=p,Dr++}}Pr.pts=mr,mr+=p}}let Pe=null,We=null,dt,je=0,at=G.length;for(;at--;)je+=G[at].unit.byteLength;for(let nr=0,Dr=G.length;nr<Dr;nr++){const mr=G[nr],Pr=mr.unit;let Xr=mr.pts;if(We!==null){const or=D[nr-1];or.duration=Math.round((Xr-We)/h)}else if(r&&e.segmentCodec==="aac"&&(Xr=ue+fe),Pe=Xr,je>0){je+=z;try{dt=new Uint8Array(je)}catch(or){this.observer.emit(v.ERROR,v.ERROR,{type:_e.MUX_ERROR,details:Z.REMUX_ALLOC_ERROR,fatal:!1,error:or,bytes:je,reason:`fail allocating audio mdat ${je}`});return}_||(new DataView(dt.buffer).setUint32(0,je),dt.set(Ke.types.mdat,4))}else return;dt.set(Pr,z);const ar=Pr.byteLength;z+=ar,D.push(Js(!0,c,ar,0)),We=Xr}const it=D.length;if(!it)return;const Ye=D[D.length-1];ue=We-fe,this.nextAudioTs=ue+h*Ye.duration;const Rt=_?new Uint8Array(0):Ke.moof(e.sequenceNumber++,Pe/h,E({},e,{samples:D}));e.samples=[];const ur=(Pe-fe)/s,wr=this.nextAudioTs/s,Tr={data1:Rt,data2:dt,startPTS:ur,endPTS:wr,startDTS:ur,endDTS:wr,type:"audio",hasAudio:!0,hasVideo:!1,nb:it};return this.isAudioContiguous=!0,Tr}}function Ui(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function No(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function va(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let o=0;o<n;o++){const h=a.samples[o];h.pts=Ui(h.pts-t.baseTime*i/t.timescale,e*i)/i,h.dts=Ui(h.dts-r.baseTime*i/r.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Fa(a,e,t){const r=a.samples.length;if(!r)return;const n=a.inputTimeScale;for(let s=0;s<r;s++){const o=a.samples[s];o.pts=Ui(o.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,o)=>s.pts-o.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends Y{constructor(e,t,r,n){super("passthrough-remuxer",n),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}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,r,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(e,n),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:r,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=ht(e);if(t)gt(e,t);else{const h=i||s;h!=null&&h.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${h.codec}")!`)}i&&(r=pl(i,V.AUDIO,this)),s&&(n=pl(s,V.VIDEO,this));const o={};i&&s?o.audiovideo={container:"video/mp4",codec:r+","+n,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?o.audio={container:"audio/mp4",codec:r,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?o.video={container:"video/mp4",codec:n,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=o}remux(e,t,r,n,i,s){var o,h;let{initPTS:c,lastEndTime:p}=this;const m={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};I(p)||(p=this.lastEndTime=i||0);const _=t.samples;if(!_.length)return m;const D={initPTS:void 0,timescale:void 0,trackId:void 0};let C=this.initData;if((o=C)!=null&&o.length||(this.generateInitSegment(_),C=this.initData),!((h=C)!=null&&h.length))return this.warn("Failed to generate initSegment."),m;this.emitInitSegment&&(D.tracks=this.initTracks,this.emitInitSegment=!1);const G=vt(_,C,this),z=C.audio?G[C.audio.id]:null,ue=C.video?G[C.video.id]:null,fe=ea(ue,1/0),ye=ea(z,1/0),Pe=ea(ue,0,!0),We=ea(z,0,!0);let dt=i,je=0;const at=z&&(!ue||!c&&ye<fe||c&&c.trackId===C.audio.id),it=at?z:ue;if(it){const mr=it.timescale,Pr=it.start-i*mr,Xr=at?C.audio.id:C.video.id;dt=it.start/mr,je=at?We-ye:Pe-fe,(s||!c)&&(_a(c,dt,i,je)||mr!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${Pr/mr} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${dt-i} (${Pr}/${mr}) trackId: ${Xr}`),c=null,D.initPTS=Pr,D.timescale=mr,D.trackId=Xr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(D.initPTS=c.baseTime,D.timescale=c.timescale,D.trackId=c.trackId):((!D.timescale||D.trackId===void 0||D.initPTS===void 0)&&(this.warn("Could not set initPTS"),D.initPTS=dt,D.timescale=1,D.trackId=-1),this.initPTS=c={baseTime:D.initPTS,timescale:D.timescale,trackId:D.trackId});const Ye=dt-c.baseTime/c.timescale,Rt=Ye+je;je>0?this.lastEndTime=Rt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const ur=!!C.audio,wr=!!C.video;let Fr="";ur&&(Fr+="audio"),wr&&(Fr+="video");const Tr=(C.audio?C.audio.encrypted:!1)||(C.video?C.video.encrypted:!1),nr={data1:_,startPTS:Ye,startDTS:Ye,endPTS:Rt,endDTS:Rt,type:Fr,hasAudio:ur,hasVideo:wr,nb:1,dropped:0,encrypted:Tr};m.audio=ur&&!wr?nr:void 0,m.video=wr?nr:void 0;const Dr=ue==null?void 0:ue.sampleCount;if(Dr){const mr=ue.keyFrameIndex,Pr=mr!==-1;nr.nb=Dr,nr.dropped=mr===0||this.isVideoContiguous?0:Pr?mr:Dr,nr.independent=Pr,nr.firstKeyFrame=mr,Pr&&ue.keyFrameStart&&(nr.firstKeyFramePTS=(ue.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(m.independent=Pr),this.isVideoContiguous||(this.isVideoContiguous=Pr),nr.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${mr}/${Dr} dropped: ${nr.dropped} start: ${nr.firstKeyFramePTS||"NA"}`)}return m.initSegment=D,m.id3=va(r,i,c,c),n.samples.length&&(m.text=Fa(n,i,c)),m}}function ea(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function _a(a,e,t,r){if(a===null)return!0;const n=Math.max(r,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>n}function pl(a,e,t){const r=a.codec;return r&&r.length>4?r:e===V.AUDIO?r==="ec-3"||r==="ac-3"||r==="alac"?r:r==="fLaC"||r==="Opus"?de(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 Ss;try{Ss=self.performance.now.bind(self.performance)}catch(a){Ss=Date.now}const co=[{demux:Ne,remux:uo},{demux:Yr,remux:ga},{demux:g,remux:ga},{demux:le,remux:ga}];co.splice(2,0,{demux:k,remux:ga});class ml{constructor(e,t,r,n,i,s){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=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const i=r.transmuxing;i.executeStart=Ss();let s=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:h}=this;n&&(this.currentTransmuxState=n);const{contiguous:c,discontinuity:p,trackSwitch:m,accurateTimeOffset:_,timeOffset:D,initSegmentChange:C}=n||o,{audioCodec:G,videoCodec:z,defaultInitPts:ue,duration:fe,initSegmentData:ye}=h,Pe=xu(s,t);if(Pe&&ui(Pe.method)){const at=this.getDecrypter(),it=zi(Pe.method);if(at.isSync()){let Ye=at.softwareDecrypt(s,Pe.key.buffer,Pe.iv.buffer,it);if(r.part>-1){const ur=at.flush();Ye=ur&&ur.buffer}if(!Ye)return i.executeEnd=Ss(),$o(r);s=new Uint8Array(Ye)}else return this.asyncResult=!0,this.decryptionPromise=at.webCryptoDecrypt(s,Pe.key.buffer,Pe.iv.buffer,it).then(Ye=>{const Rt=this.push(Ye,null,r);return this.decryptionPromise=null,Rt}),this.decryptionPromise}const We=this.needsProbing(p,m);if(We){const at=this.configureTransmuxer(s);if(at)return this.logger.warn(`[transmuxer] ${at.message}`),this.observer.emit(v.ERROR,v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_PARSING_ERROR,fatal:!1,error:at,reason:at.message}),i.executeEnd=Ss(),$o(r)}(p||m||C||We)&&this.resetInitSegment(ye,G,z,fe,t),(p||C||We)&&this.resetInitialTimestamp(ue),c||this.resetContiguity();const dt=this.transmux(s,Pe,D,_,r);this.asyncResult=Na(dt);const je=this.currentTransmuxState;return je.contiguous=!0,je.discontinuity=!1,je.trackSwitch=!1,i.executeEnd=Ss(),dt}flush(e){const t=e.transmuxing;t.executeStart=Ss();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:o}=n;if(r){const m=r.flush();m&&s.push(this.push(m.buffer,null,e))}const{demuxer:h,remuxer:c}=this;if(!h||!c){t.executeEnd=Ss();const m=[$o(e)];return this.asyncResult?Promise.resolve(m):m}const p=h.flush(o);return Na(p)?(this.asyncResult=!0,p.then(m=>(this.flushRemux(s,m,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:o}=t,{accurateTimeOffset:h,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===ie.MAIN?"level":"track"} ${r.level}`);const p=this.remuxer.remux(n,i,s,o,c,h,!0,this.id);e.push({remuxResult:p,chunkMeta:r}),r.transmuxing.executeEnd=Ss()}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,i){const{demuxer:s,remuxer:o}=this;!s||!o||(s.resetInitSegment(e,t,r,n),o.resetInitSegment(e,t,r,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,r,n,i):s=this.transmuxUnencrypted(e,r,n,i),s}transmuxUnencrypted(e,t,r,n){const{audioTrack:i,videoTrack:s,id3Track:o,textTrack:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,o,h,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,i){return this.demuxer.demuxSampleAes(e,t,r).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,r,n,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n}=this;let i;for(let m=0,_=co.length;m<_;m++){var s;if((s=co[m].demux)!=null&&s.probe(e,this.logger)){i=co[m];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,h=this.remuxer,c=i.remux,p=i.demux;(!h||!(h instanceof c))&&(this.remuxer=new c(r,t,n,this.logger)),(!o||!(o instanceof p))&&(this.demuxer=new p(r,t,n,this.logger),this.probe=p.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new ln(this.config)),e}}function xu(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const $o=a=>({remuxResult:{},chunkMeta:a});function Na(a){return"then"in a&&a.then instanceof Function}class Su{constructor(e,t,r,n,i){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=i||null}}class wu{constructor(e,t,r,n,i,s){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=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=gl++,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=h=>{const c=h.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var m;const _=(m=this.workerContext)==null?void 0:m.objectURL;_&&self.URL.revokeObjectURL(_);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{p.logger[c.data.logType]&&p.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,p.trigger(c.event,c.data);break}}},this.onWorkerError=h=>{if(!this.hls)return;const c=new Error(`${h.message} (${h.filename}:${h.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const s=(h,c)=>{c=c||{},c.frag=this.frag||void 0,h===v.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(h,c)};this.observer=new ha,this.observer.on(v.FRAG_DECRYPTED,s),this.observer.on(v.ERROR,s);const o=vr(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const h=this.hls.logger;if(i.workerPath||Ha()){try{i.workerPath?(h.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=ja(i.workerPath)):(h.log(`injecting Web Worker for "${t}"`),this.workerContext=Co());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:Ge(i)})}catch(p){h.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new ml(this.observer,o,i,"",t,e.logger)}return}}this.transmuxer=new ml(this.observer,o,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=gl++;const t=this.hls.config,r=vr(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:Ge(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Ro(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,i,s,o,h,c,p){var m,_;c.transmuxing.start=self.performance.now();const{instanceNo:D,transmuxer:C}=this,G=s?s.start:i.start,z=i.decryptdata,ue=this.frag,fe=!(ue&&i.cc===ue.cc),ye=!(ue&&c.level===ue.level),Pe=ue?c.sn-ue.sn:-1,We=this.part?c.part-this.part.index:-1,dt=Pe===0&&c.id>1&&c.id===(ue==null?void 0:ue.stats.chunkCount),je=!ye&&(Pe===1||Pe===0&&(We===1||dt&&We<=0)),at=self.performance.now();(ye||Pe||i.stats.parsing.start===0)&&(i.stats.parsing.start=at),s&&(We||!je)&&(s.stats.parsing.start=at);const it=!(ue&&((m=i.initSegment)==null?void 0:m.url)===((_=ue.initSegment)==null?void 0:_.url)),Ye=new wu(fe,je,h,ye,G,it);if(!je||fe||it){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===ie.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${fe}
|
|
trackSwitch: ${ye}
|
|
contiguous: ${je}
|
|
accurateTimeOffset: ${h}
|
|
timeOffset: ${G}
|
|
initSegmentChange: ${it}`);const Rt=new Su(r,n,t,o,p);this.configureTransmuxer(Rt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:D,cmd:"demux",data:e,decryptdata:z,chunkMeta:c,state:Ye},e instanceof ArrayBuffer?[e]:[]);else if(C){const Rt=C.push(e,z,c,Ye);Na(Rt)?Rt.then(ur=>{this.handleTransmuxComplete(ur)}).catch(ur=>{this.transmuxerError(ur,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Rt)}}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);Na(n)?n.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(n,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.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 _l=100;class Tu extends Zs{constructor(e,t,r){super(e,t,r,"audio-stream-controller",ie.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(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){if(r===ie.MAIN){const o=t.cc,h=this.fragCurrent;if(this.initPTS[o]={baseTime:n,timescale:i,trackId:s},this.log(`InitPTS for cc: ${o} found from main: ${n/i} (${n}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Tt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==o)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&h&&h.cc!==o?(h.abortRequests(),this.syncWithAnchor(t,h)):this.state===Tt.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 i=(n||e).cc,s=this.getLevelDetails(),o=this.getLoadPosition(),h=pr(s,i,o);h&&(this.log(`Syncing with main frag at ${h.start} cc ${h.cc}`),this.startFragRequested=!1,this.nextLoadPosition=h.start,this.resetLoadingState(),this.state===Tt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Tt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(_l),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=Tt.IDLE):this.state=Tt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Tt.IDLE:this.doTickIdle();break;case Tt.WAITING_TRACK:{const{levels:e,trackId:t}=this,r=e==null?void 0:e[t],n=r==null?void 0:r.details;if(n&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(n))break;this.state=Tt.WAITING_INIT_PTS}break}case Tt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Tt.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:r,cache:n,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=Tt.FRAG_LOADING;const o=n.flush().buffer,h={frag:t,part:r,payload:o,networkDetails:null};this._handleFragmentLoadProgress(h),i&&super._handleFragmentLoadComplete(h)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Tt.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:i}=this,s=t.config;if(!this.buffering||!n&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(r!=null&&r[i]))return;const o=r[i],h=o.details;if(!h||this.waitForLive(o)||this.waitForCdnTuneIn(h)){this.state=Tt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,V.AUDIO,ie.AUDIO));const p=this.getFwdBufferInfo(c,ie.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,h)){t.trigger(v.BUFFER_EOS,{type:"audio"}),this.state=Tt.ENDED;return}const m=p.len,_=t.maxBufferLength,D=h.fragments,C=D[0].start,G=this.getLoadPosition(),z=this.flushing?G:p.end;if(this.switchingTrack&&n){const ye=G;h.PTSKnown&&ye<C&&(p.end>C||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=C+.05)}if(m>=_&&!this.switchingTrack&&z<D[D.length-1].start)return;let ue=this.getNextFragment(z,h);if(ue&&this.isLoopLoading(ue,z)&&(ue=this.getNextFragmentLoopLoading(ue,h,p,ie.MAIN,_)),!ue){this.bufferFlushed=!0;return}let fe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&fe&&He(ue)&&!ue.endList&&(!h.live||!this.loadingParts&&z<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(fe)===on.OK&&(this.mainFragLoading=fe=null),fe&&He(fe))){if(ue.start>fe.end){const Pe=this.fragmentTracker.getFragAtPos(z,ie.MAIN);Pe&&Pe.end>fe.end&&(fe=Pe,this.mainFragLoading={frag:Pe,targetBufferTime:null})}if(ue.start>fe.end)return}this.loadFragment(ue,o,z)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new Qr(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!==Tt.STOPPED&&(this.setInterval(_l),this.state=Tt.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(v.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:i,id:s,groupId:o,track:h}=t;if(!n){this.warn(`Audio tracks reset while loading track ${s} "${h.name}" of "${o}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Tt.STOPPED&&(this.state=Tt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${h.name}" of "${o}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=n[s];let m=0;if(i.live||(r=p.details)!=null&&r.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var _;m=this.alignPlaylists(i,p.details,(_=this.levelLastLoaded)==null?void 0:_.details)}i.alignedSliding||(Ls(i,c),i.alignedSliding||ks(i,c),m=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,m),this.hls.trigger(v.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Tt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Tt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{config:s,trackId:o,levels:h}=this;if(!h){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 c=h[o];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const m=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let _=this.transmuxer;_||(_=this.transmuxer=new vl(this.hls,ie.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const D=this.initPTS[r.cc],C=(t=r.initSegment)==null?void 0:t.data;if(D!==void 0){const z=n?n.index:-1,ue=z!==-1,fe=new pi(r.level,r.sn,r.stats.chunkCount,i.byteLength,z,ue);_.push(i,C,m,"",r,n,p.totalduration,!1,fe,D)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${p.startSN} ,${p.endSN}],track ${o}`);const{cache:G}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Aa,complete:!1};G.push(new Uint8Array(i)),this.state!==Tt.STOPPED&&(this.state=Tt.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===ie.MAIN&&He(t.frag)&&(this.mainFragLoading=t,this.state===Tt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==ie.AUDIO){!this.audioOnly&&r.type===ie.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(He(r)){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(v.AUDIO_TRACK_SWITCHED,T({},i)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=Tt.ERROR;return}switch(t.details){case Z.FRAG_GAP:case Z.FRAG_PARSING_ERROR:case Z.FRAG_DECRYPT_ERROR:case Z.FRAG_LOAD_ERROR:case Z.FRAG_LOAD_TIMEOUT:case Z.KEY_LOAD_ERROR:case Z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.AUDIO,t);break;case Z.AUDIO_TRACK_LOAD_ERROR:case Z.AUDIO_TRACK_LOAD_TIMEOUT:case Z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Tt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===me.AUDIO_TRACK&&(this.state=Tt.IDLE);break;case Z.BUFFER_ADD_CODEC_ERROR:case Z.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case Z.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case Z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==V.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==V.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Tt.ENDED&&(this.state=Tt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,ie.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,o=this.getCurrentContext(s);if(!o){this.resetWhenMissingContext(s);return}const{frag:h,part:c,level:p}=o,{details:m}=p,{audio:_,text:D,id3:C,initSegment:G}=i;if(this.fragContextChanged(h)||!m){this.fragmentTracker.removeFragment(h);return}if(this.state=Tt.PARSING,this.switchingTrack&&_&&this.completeAudioSwitch(this.switchingTrack),G!=null&&G.tracks){const z=h.initSegment||h;if(this.unhandledEncryptionError(G,h))return;this._bufferInitSegment(p,G.tracks,z,s),n.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:r,tracks:G.tracks})}if(_){const{startPTS:z,endPTS:ue,startDTS:fe,endDTS:ye}=_;c&&(c.elementaryStreams[V.AUDIO]={startPTS:z,endPTS:ue,startDTS:fe,endDTS:ye}),h.setElementaryStreamInfo(V.AUDIO,z,ue,fe,ye),this.bufferFragmentData(_,h,c,s)}if(C!=null&&(t=C.samples)!=null&&t.length){const z=E({id:r,frag:h,details:m},C);n.trigger(v.FRAG_PARSING_METADATA,z)}if(D){const z=E({id:r,frag:h,details:m},D);n.trigger(v.FRAG_PARSING_USERDATA,z)}}_bufferInitSegment(e,t,r,n){if(this.state!==Tt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ie.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(v.BUFFER_CODECS,t);const o=i.initSegment;if(o!=null&&o.byteLength){const h={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:o};this.hls.trigger(v.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===on.NOT_LOADED||n===on.PARTIAL){var i;if(!He(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.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=Tt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&ks(t.details,s)}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:i,audioCodec:s,channels:o}=this.bufferedTrack;Qt({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:o},e,Vt)||($r(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(v.AUDIO_TRACK_SWITCHED,T({},e))}}class Uo extends Y{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 i=-1;for(let s=0;s<n.length;s++){const o=n[s];let h;try{h=new self.URL(o.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),h=o.URI||""}if(h===e){i=s;break}else h===e.substring(0,h.length)&&(i=s)}if(i!==-1){const s=n[i],o=parseInt(s["LAST-MSN"])||t.lastPartSn;let h=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&p>t.partTarget&&(h+=1)}const c=r&&Kr(r);return new Nr(o,h>=0?h:void 0,c)}}}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:i}=t,s=self.performance.now(),o=i.loading.first?Math.max(0,s-i.loading.first):0;n.advancedDateTime=Date.now()-o;const h=this.hls.config.timelineOffset;if(h!==n.appliedTimelineOffset){const p=Math.max(h||0,0);n.appliedTimelineOffset=p,n.fragments.forEach(m=>{m.setStart(m.playlistOffset+p)})}if(n.live||r!=null&&r.live){const p="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(r),r&&n.fragments.length>0){ua(r,n,this);const fe=n.playlistParsingError;if(fe){this.warn(fe);const ye=this.hls;if(!ye.config.ignorePlaylistParsingErrors){var c;const{networkDetails:Pe}=t;ye.trigger(v.ERROR,{type:_e.NETWORK_ERROR,details:Z.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:fe,reason:fe.message,level:t.level||void 0,parent:(c=n.fragments[0])==null?void 0:c.type,networkDetails:Pe,stats:i});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=i.loading.start);const m=this.hls.mainForwardBufferInfo,_=m?m.end-m.len:0,D=(n.edge-_)*1e3,C=Sn(n,D);if(n.requestScheduled+C<s?n.requestScheduled=s:n.requestScheduled+=C,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let G,z,ue;if(n.canBlockReload&&n.endSN&&n.advanced){const fe=this.hls.config.lowLatencyMode,ye=n.lastPartSn,Pe=n.endSN,We=n.lastPartIndex,dt=We!==-1,je=ye===Pe;dt?je?(z=Pe+1,ue=fe?0:We):(z=ye,ue=fe?We+1:n.maxPartIndex):z=Pe+1;const at=n.age,it=at+n.ageHeader;let Ye=Math.min(it-n.partTarget,n.targetduration*1.5);if(Ye>0){if(it>n.targetduration*3)this.log(`Playlist last advanced ${at.toFixed(2)}s ago. Omitting segment and part directives.`),z=void 0,ue=void 0;else if(r!=null&&r.tuneInGoal&&it-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Ye} with playlist age: ${n.age}`),Ye=0;else{const Rt=Math.floor(Ye/n.targetduration);if(z+=Rt,ue!==void 0){const ur=Math.round(Ye%n.targetduration/n.partTarget);ue+=ur}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${at.toFixed(2)}s goal: ${Ye} skip sn ${Rt} to part ${ue}`)}n.tuneInGoal=Ye}if(G=this.getDeliveryDirectives(n,t.deliveryDirectives,z,ue),fe||!je){n.requestScheduled=s,this.loadingPlaylist(p,G);return}}else(n.canBlockReload||n.canSkipUntil)&&(G=this.getDeliveryDirectives(n,t.deliveryDirectives,z,ue));G&&z!==void 0&&n.canBlockReload&&(n.requestScheduled=i.loading.first+Math.max(C-o*2,C/2)),this.scheduleLoading(p,G,n)}else this.clearTimer()}scheduleLoading(e,t,r){const n=r||e.details;if(!n){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=n.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const o=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),o)}getDeliveryDirectives(e,t,r,n){let i=Kr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=_r.No),new Nr(r,n,i)}checkRetry(e){const t=e.details,r=Lr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:o}=n||{},h=!!n&&!!o&&(i===br.RetryRequest||!n.resolved&&i===br.SendAlternateToPenaltyBox);if(h){var c;if(s>=o.maxNumRetry)return!1;if(r&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=Gr(o,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" in ${p}ms`)}e.levelRetry=!0,n.resolved=!0}return h}}function yl(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!$a(a[t].attrs,e[t].attrs))return!1;return!0}function $a(a,e,t){const r=a["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>a[n]!==e[n])}function zo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Au extends Uo{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.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:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const o=s.details;s.details=t.details,this.log(`Audio track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,o)}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 i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(o=>(n==null?void 0:n.indexOf(o))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(_=>!r||r.indexOf(_.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(_=>_.default)&&(this.selectDefaultTrack=!1),o.forEach((_,D)=>{_.id=D});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const h=this.hls.config.audioPreference;if(!i&&h){const _=It(h,o,Vt);if(_>-1)i=o[_];else{const D=It(h,this.tracks);i=this.tracks[D]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(v.AUDIO_TRACKS_UPDATED,p);const m=this.trackId;if(c!==-1&&m===-1)this.setAudioTrack(c);else if(o.length&&m===-1){var s;const _=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${o.length}`);this.warn(_.message),this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:_})}}}onError(e,t){t.fatal||!t.context||t.context.type===me.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&&Qt(e,n,Vt))return n;const i=It(e,this.tracksInGroup,Vt);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(n){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const o=Ft(e,t.levels,r,s,Vt);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const s=It(e,r);if(s>-1)return r[s]}}}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],i=n.details&&!n.details.live;if(e===this.trackId&&n===r&&i||(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(v.AUDIO_TRACK_SWITCHING,T({},n)),i))return;const s=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||Qt(e,n,Vt)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:o,channels:h}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Qt({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:o,channels:h},p,Vt))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&$r(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,o=s==null?void 0:s.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:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(v.AUDIO_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}}class Du{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(i){var r;if(n.onError(i),this.queues===null||this.tracks===null)return;const s=(r=this.tracks[e])==null?void 0:r.buffer;s!=null&&s.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 bl=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,El="HlsJsTrackRemovedError";class Cu extends Error{constructor(e){super(e),this.name=El}}class Ru extends Y{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:i}=this;r&&this.log("Media source opened"),!(!n||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(v.MEDIA_ATTACHED,{media:n,mediaSource:i}),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=Fe(Me(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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_APPENDING,this.onBufferAppending,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.BUFFER_EOS,this.onBufferEos,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.FRAG_PARSED,this.onFragParsed,this),e.on(v.FRAG_CHANGED,this.onFragChanged,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_APPENDING,this.onBufferAppending,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.BUFFER_EOS,this.onBufferEos,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.FRAG_PARSED,this.onFragParsed,this),e.off(v.FRAG_CHANGED,this.onFragChanged,this),e.off(v.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const n=this.transferData;return!this.sourceBufferCount&&n&&n.mediaSource===t?E(r,n.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(r[s]=E({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[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;this.transferData=this.overrides=void 0;const n=Me(this.appendSource);if(n){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(s),i)this._objectUrl=r.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const h=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||h&&s instanceof h,xl(r),Iu(r,o),r.load()}catch(h){r.src=o}else r.src=o}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,i=n?Object.keys(n):null,s=i?i.length:0,o=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(n&&i&&s){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: ${Ge(r,(h,c)=>h==="initSegment"?void 0:c)};
|
|
transfer tracks: ${Ge(n,(h,c)=>h==="initSegment"?void 0:c)}}`),!ke(n,r)){t.mediaSource=null,t.tracks=void 0;const h=e.currentTime,c=this.details,p=Math.max(h,(c==null?void 0:c.fragments[0].start)||0);if(p-h>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${h} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(n)}"->"${Object.keys(r)}") start time: ${p} currentTime: ${h}`),this.onMediaDetaching(v.MEDIA_DETACHING,{}),this.onMediaAttaching(v.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(h=>{const c=h,p=n[c];if(p){const m=p.buffer;if(m){const _=this.fragmentTracker,D=p.id;if(_.hasFragments(D)||_.hasParts(D)){const z=Or.getBuffered(m);_.detectEvictedFragments(c,z,D,null,!0)}const C=Go(c),G=[c,m];this.sourceBuffers[C]=G,m.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}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:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=i.readyState==="open";try{const h=i.sourceBuffers;for(let c=h.length;c--;)o&&h[c].abort(),i.removeSourceBuffer(h[c]);o&&i.endOfStream()}catch(h){this.warn(`onMediaDetaching: ${h.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),r||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(n.removeAttribute("src"),this.appendSource&&xl(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(v.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(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Go(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Du(this.tracks)}onBufferCodecs(e,t){var r;const n=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),o=!s&&this.sourceBufferCount&&this.media&&i.some(h=>!n[h]);if(s||o){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${i}" SourceBuffers`);return}i.forEach(h=>{var c,p;const m=t[h],{id:_,codec:D,levelCodec:C,container:G,metadata:z,supplemental:ue}=m;let fe=n[h];const ye=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[h],Pe=ye!=null&&ye.buffer?ye:fe,We=(Pe==null?void 0:Pe.pendingCodec)||(Pe==null?void 0:Pe.codec),dt=Pe==null?void 0:Pe.levelCodec;fe||(fe=n[h]={buffer:void 0,listeners:[],codec:D,supplemental:ue,container:G,levelCodec:C,metadata:z,id:_});const je=Xt(We,dt),at=je==null?void 0:je.replace(bl,"$1");let it=Xt(D,C);const Ye=(p=it)==null?void 0:p.replace(bl,"$1");it&&je&&at!==Ye&&(h.slice(0,5)==="audio"&&(it=de(it,this.appendSource)),this.log(`switching codec ${We} to ${it}`),it!==(fe.pendingCodec||fe.codec)&&(fe.pendingCodec=it),fe.container=G,this.appendChangeType(h,G,it))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((r=t.audio)==null?void 0:r.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),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}`,i={label:`change-type=${n}`,execute:()=>{const s=this.tracks[e];if(s){const o=s.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),o.changeType(n),s.codec=r,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,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,ie.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var o;const h=this.tracks.video;(this.lastVideoAppendEnd>n||h!=null&&h.buffer&&Or.isBuffered(h.buffer,n)||((o=this.fragmentTracker.getAppendedFrag(n,ie.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"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:i,parent:s,frag:o,part:h,chunkMeta:c,offset:p}=t,m=c.buffering[i],{sn:_,cc:D}=o,C=self.performance.now();m.start=C;const G=o.stats.buffering,z=h?h.stats.buffering:null;G.start===0&&(G.start=C),z&&z.start===0&&(z.start=C);const ue=r.audio;let fe=!1;i==="audio"&&(ue==null?void 0:ue.container)==="audio/mpeg"&&(fe=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const ye=r.video,Pe=ye==null?void 0:ye.buffer;if(Pe&&_!=="initSegment"){const je=h||o,at=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(ye.ending||ye.ended)){const Ye=je.start+je.duration*.05,Rt=Pe.buffered,ur=this.currentOp("video");!Rt.length&&!ur?this.blockAudio(je):!ur&&!Or.isBuffered(Pe,Ye)&&this.lastVideoAppendEnd<Ye&&this.blockAudio(je)}else if(i==="video"){const it=je.end;if(at){const Ye=at.frag.start;(it>Ye||it<this.lastVideoAppendEnd||Or.isBuffered(Pe,Ye))&&this.unblockAudio()}this.lastVideoAppendEnd=it}}const We=(h||o).start,dt={label:`append-${i}`,execute:()=>{var je;m.executeStart=self.performance.now();const at=(je=this.tracks[i])==null?void 0:je.buffer;at&&(fe?this.updateTimestampOffset(at,We,.1,i,_,D):p!==void 0&&I(p)&&this.updateTimestampOffset(at,p,1e-6,i,_,D)),this.appendExecutor(n,i)},onStart:()=>{},onComplete:()=>{const je=self.performance.now();m.executeEnd=m.end=je,G.first===0&&(G.first=je),z&&z.first===0&&(z.first=je);const at={};this.sourceBuffers.forEach(([it,Ye])=>{it&&(at[it]=Or.getBuffered(Ye))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(v.BUFFER_APPENDED,{type:i,frag:o,part:h,chunkMeta:c,parent:o.type,timeRanges:at})},onError:je=>{var at;const it={type:_e.MEDIA_ERROR,parent:o.type,details:Z.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:o,part:h,chunkMeta:c,error:je,err:je,fatal:!1},Ye=(at=this.media)==null?void 0:at.error;if(je.code===DOMException.QUOTA_EXCEEDED_ERR||je.name=="QuotaExceededError"||"quota"in je)it.details=Z.BUFFER_FULL_ERROR;else if(je.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Ye)it.errorAction=an(!0);else if(je.name===El&&this.sourceBufferCount===0)it.errorAction=an(!0);else{const Rt=++this.appendErrors[i];this.warn(`Failed ${Rt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Ye||"no media error"})`),(Rt>=this.hls.config.appendErrorMaxRetry||Ye)&&(it.fatal=!0)}this.hls.trigger(v.ERROR,it)}};this.log(`queuing "${i}" append sn: ${_}${h?" p: "+h.index:""} of ${o.type===ie.MAIN?"level":"track"} ${o.level} cc: ${D}`),this.append(dt,i,this.isPending(this.tracks[i]))}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(v.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:i}=t;r?this.append(this.getFlushOp(r,n,i),r):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,n,i),s)})}onFragParsed(e,t){const{frag:r,part:n}=t,i=[],s=n?n.elementaryStreams:r.elementaryStreams;s[V.AUDIOVIDEO]?i.push("audiovideo"):(s[V.AUDIO]&&i.push("audio"),s[V.VIDEO]&&i.push("video"));const o=()=>{const h=self.performance.now();r.stats.buffering.end=h,n&&(n.stats.buffering.end=h);const c=n?n.stats:r.stats;this.hls.trigger(v.FRAG_BUFFERED,{frag:r,part:n,stats:c,id:r.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(o,i).catch(h=>{this.warn(`Fragment buffered callback ${h}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var r;this.sourceBuffers.forEach(([s])=>{if(s){const o=this.tracks[s];(!t.type||t.type===s)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${s} buffer reached EOS`)))}});const n=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var o;return s&&!((o=this.tracks[s])!=null&&o.ended)})?n?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(v.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(v.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}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(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===Z.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;I(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,i=r.currentTime,s=t.levelTargetDuration,o=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(I(o)&&o>=0){const c=Math.max(o,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const h=n.frontBufferFlushThreshold;if(I(h)&&h>0){const c=Math.max(n.maxBufferLength,h),p=Math.max(c,s),m=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,m)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const o=Or.getBuffered(i);if(o.length>0&&r>o.start(0)){var s;this.hls.trigger(v.BACK_BUFFER_REACHED,{bufferEnd:r});const h=this.tracks[n];if((s=this.details)!=null&&s.live)this.hls.trigger(v.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(h!=null&&h.ended){this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const s=Or.getBuffered(i),o=s.length;if(o<2)return;const h=s.start(o-1),c=s.end(o-1);if(r>h||e>=h&&e<=c)return;this.hls.trigger(v.BUFFER_FLUSHING,{startOffset:h,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&&r.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,n);return{duration:1/0,start:c,end:p}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return I(i)?{duration:i}:null;const s=this.media.duration,o=I(r.duration)?r.duration:0;return n>o&&n>s||!I(s)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&(I(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}) ${Ge(r)}`),this.tracksReady){var n;const i=(n=this.transferData)==null?void 0:n.tracks;i&&Object.keys(i).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(v.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(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.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 i in e){const s=i,o=e[s];if(this.isPending(o)){const h=this.getTrackCodec(o,s),c=`${o.container};codecs=${h}`;o.codec=h,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${Ge(o)}`);try{const p=r.addSourceBuffer(c),m=Go(s),_=[s,p];t[m]=_,o.buffer=p}catch(p){var n;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(n=this.operationQueue)==null||n.removeBlockers(),delete this.tracks[s],this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,parent:o.id});return}this.trackSourceBuffer(s,o)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&Te(r,"video")&&(n=Bt(n,r));const i=Xt(n,e.levelCodec);return i?t.slice(0,5)==="audio"?de(i,this.appendSource):i:""}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",(i,s)=>{const o=s.removedRanges;o!=null&&o.length&&this.hls.trigger(v.BUFFER_FLUSHED,{type:i})})}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(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.currentOp(e);i&&i.onError(n)}updateTimestampOffset(e,t,r,n,i,s){const o=t-e.timestampOffset;Math.abs(o)>=r&&(this.log(`Updating ${n} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,r){const{media:n,mediaSource:i}=this,s=this.tracks[e],o=s==null?void 0:s.buffer;if(!n||!i||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const h=I(n.duration)?n.duration:1/0,c=I(i.duration)?i.duration:1/0,p=Math.max(0,t),m=Math.min(r,h,c);m>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${m}] from the ${e} SourceBuffer`),o.remove(p,m)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Cu(`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(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then(s=>{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 i=n.buffer;if(!i)return;const s=r.bind(this,e);n.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}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 xl(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Iu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Go(a){return a==="audio"?1:0}class Ko{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(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.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&&I(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,i)=>this.isLevelAllowed(n)&&i<=e);return this.clientRect=null,Ko.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=(o,h)=>h?o.width!==h.width||o.height!==h.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let o=0;o<e.length;o+=1){const h=e[o];if((h.width>=s||h.height>=s)&&n(h,e[o+1])){i=o;break}}return i}}const Wi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Lu={HLS:"h"};class ps{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof ps?r:new ps(r))),this.value=e,this.params=t}}const ku="Dict";function Pu(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function Ou(a,e,t,r){return new Error(`failed to ${a} "${Pu(e)}" as ${t}`,{cause:r})}function ms(a,e,t){return Ou("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Mu="Boolean";function Bu(a){if(typeof a!="boolean")throw ms(a,Mu);return a?"?1":"?0"}function Fu(a){return btoa(String.fromCharCode(...a))}const Nu="Byte Sequence";function $u(a){if(ArrayBuffer.isView(a)===!1)throw ms(a,Nu);return`:${Fu(a)}:`}const Uu="Integer";function zu(a){return a<-999999999999999||999999999999999<a}function Tl(a){if(zu(a))throw ms(a,Uu);return a.toString()}function Gu(a){return`@${Tl(a.getTime()/1e3)}`}function Al(a,e){if(a<0)return-Al(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const n=Math.floor(a*t);return(n%2===0?n:n+1)/t}else return Math.round(a*t)/t}const Ku="Decimal";function Wu(a){const e=Al(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw ms(a,Ku);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Hu="String",ju=/[\x00-\x1f\x7f]+/;function Vu(a){if(ju.test(a))throw ms(a,Hu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Zu(a){return a.description||a.toString().slice(7,-1)}const Yu="Token";function Dl(a){const e=Zu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ms(e,Yu);return e}function Wo(a){switch(typeof a){case"number":if(!I(a))throw ms(a,wl);return Number.isInteger(a)?Tl(a):Wu(a);case"string":return Vu(a);case"symbol":return Dl(a);case"boolean":return Bu(a);case"object":if(a instanceof Date)return Gu(a);if(a instanceof Uint8Array)return $u(a);if(a instanceof Sl)return Dl(a);default:throw ms(a,wl)}}const qu="Key";function Ho(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw ms(a,qu);return a}function jo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ho(e)}`:`;${Ho(e)}=${Wo(t)}`).join("")}function Cl(a){return a instanceof ps?`${Wo(a.value)}${jo(a.params)}`:Wo(a)}function Xu(a){return`(${a.value.map(Cl).join(" ")})${jo(a.params)}`}function Qu(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw ms(a,ku);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof ps||(i=new ps(i));let s=Ho(n);return i.value===!0?s+=jo(i.params):(s+="=",Array.isArray(i.value)?s+=Xu(i):s+=Cl(i)),s}).join(`,${r}`)}function Rl(a,e){return Qu(a,e)}const gs="CMCD-Object",hi="CMCD-Request",ta="CMCD-Session",Us="CMCD-Status",Ju={br:gs,ab:gs,d:gs,ot:gs,tb:gs,tpb:gs,lb:gs,tab:gs,lab:gs,url:gs,pb:hi,bl:hi,tbl:hi,dl:hi,ltc:hi,mtp:hi,nor:hi,nrr:hi,rc:hi,sn:hi,sta:hi,su:hi,ttfb:hi,ttfbb:hi,ttlb:hi,cmsdd:hi,cmsds:hi,smrt:hi,df:hi,cs:hi,ts:hi,cid:ta,pr:ta,sf:ta,sid:ta,st:ta,v:ta,msd:ta,bs:Us,bsd:Us,cdn:Us,rtp:Us,bg:Us,pt:Us,ec:Us,e:Us},e0={REQUEST:hi};function t0(a){return Object.keys(a).reduce((e,t)=>{var r;return(r=a[t])===null||r===void 0||r.forEach(n=>e[n]=t),e},{})}function r0(a,e){const t={};if(!a)return t;const r=Object.keys(a),n=e?t0(e):{};return r.reduce((i,s)=>{var o;const h=Ju[s]||n[s]||e0.REQUEST,c=(o=i[h])!==null&&o!==void 0?o:i[h]={};return c[s]=a[s],i},t)}function n0(a){return["ot","sf","st","e","sta"].includes(a)}function i0(a){return typeof a=="number"?I(a):a!=null&&a!==""&&a!==!1}const Il="event";function s0(a,e){const t=new URL(a),r=new URL(e);if(t.origin!==r.origin)return a;const n=t.pathname.split("/").slice(1),i=r.pathname.split("/").slice(1,-1);for(;n[0]===i[0];)n.shift(),i.shift();for(;i.length;)i.shift(),n.unshift("..");return n.join("/")+t.search+t.hash}const ho=a=>Math.round(a),Vo=(a,e)=>Array.isArray(a)?a.map(t=>Vo(t,e)):a instanceof ps&&typeof a.value=="string"?new ps(Vo(a.value,e),a.params):(e.baseUrl&&(a=s0(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fo=a=>ho(a/100)*100,a0={br:ho,d:ho,bl:fo,dl:fo,mtp:fo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof ps&&typeof a.value=="string"?t=new ps([a]):typeof a=="string"&&(t=[a])),Vo(t,e)},rtp:fo,tb:ho},Ll="request",kl="response",Zo=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],o0=["e"],l0=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function po(a){return l0.test(a)}function u0(a){return Zo.includes(a)||o0.includes(a)||po(a)}const Pl=["d","dl","nor","ot","rtp","su"];function c0(a){return Zo.includes(a)||Pl.includes(a)||po(a)}const h0=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function f0(a){return Zo.includes(a)||Pl.includes(a)||h0.includes(a)||po(a)}const d0=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function p0(a){return d0.includes(a)||po(a)}const m0={[kl]:f0,[Il]:u0,[Ll]:c0};function Ol(a,e={}){const t={};if(a==null||typeof a!="object")return t;const r=e.version||a.v||1,n=e.reportingMode||Ll,i=r===1?p0:m0[n];let s=Object.keys(a).filter(i);const o=e.filter;typeof o=="function"&&(s=s.filter(o));const h=n===kl||n===Il;h&&!s.includes("ts")&&s.push("ts"),r>1&&!s.includes("v")&&s.push("v");const c=E({},a0,e.formatters),p={version:r,reportingMode:n,baseUrl:e.baseUrl};return s.sort().forEach(m=>{let _=a[m];const D=c[m];if(typeof D=="function"&&(_=D(_,p)),m==="v"){if(r===1)return;_=r}m=="pr"&&_===1||(h&&m==="ts"&&!I(_)&&(_=Date.now()),i0(_)&&(n0(m)&&typeof _=="string"&&(_=new Sl(_)),t[m]=_))}),t}function g0(a,e={}){const t={};if(!a)return t;const r=Ol(a,e),n=r0(r,e==null?void 0:e.customHeaderMap);return Object.entries(n).reduce((i,[s,o])=>{const h=Rl(o,{whitespace:!1});return h&&(i[s]=h),i},t)}function v0(a,e,t){return E(a,g0(e,t))}const _0="CMCD";function y0(a,e={}){return a?Rl(Ol(a,e),{whitespace:!1}):""}function b0(a,e={}){if(!a)return"";const t=y0(a,e);return encodeURIComponent(t)}function E0(a,e={}){if(!a)return"";const t=b0(a,e);return`${_0}=${t}`}const Ml=/CMCD=[^&#]+/;function x0(a,e,t){const r=E0(e,t);if(!r)return a;if(Ml.test(a))return a.replace(Ml,r);const n=a.includes("?")?"&":"?";return`${a}${n}${r}`}class S0{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:Wi.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=n=>{try{const{frag:i,part:s}=n,o=this.hls.levels[i.level],h=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:h};(h===Wi.VIDEO||h===Wi.AUDIO||h==Wi.MUXED)&&(c.br=o.bitrate/1e3,c.tb=this.getTopBandwidth(h)/1e3,c.bl=this.getBufferLength(h));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(n,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},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(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHED,this.onMediaDetached,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHED,this.onMediaDetached,this),e.off(v.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:Lu.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){E(t,this.createData());const r=t.ot===Wi.INIT||t.ot===Wi.VIDEO||t.ot===Wi.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((s,o)=>(n.includes(o)&&(s[o]=t[o]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),v0(e.headers,t,i)):e.url=x0(e.url,t,i)}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;const{index:r,fragment:n}=e,i=(t=this.hls.levels[n.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=n;for(let o=i.length-1;o>=0;o--){const h=i[o];if(h.index===r&&h.fragment.sn===s)return i[o+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Wi.TIMED_TEXT;if(e.sn==="initSegment")return Wi.INIT;if(t==="audio")return Wi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Wi.VIDEO:Wi.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===Wi.AUDIO)r=n.audioTracks;else{const i=n.maxAutoLevel,s=i>-1?i+1:n.levels.length;r=n.levels.slice(0,s)}return r.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,r=e===Wi.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:Or.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(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,o){t(i),this.loader.load(i,s,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,o){t(i),this.loader.load(i,s,o)}}}}const w0=3e5;class T0 extends Y{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.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)===br.SendAlternateToPenaltyBox&&r.flags===gr.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:o,pathwayId:h,type:c}=t.context;o&&n?s=this.getPathwayForGroupId(o,c,s):h&&(s=h)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&n&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),r.resolved=this.pathwayId!==s),t.details===Z.BUFFER_APPEND_ERROR&&!t.fatal?r.resolved=!0:r.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${n&&n.length} priorities: ${Ge(i)} penalized: ${Ge(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(i=>{n-r[i]>w0&&delete r[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in r)continue;if(s===this.pathwayId)return;const o=this.hls.nextLoadLevel,h=this.hls.levels[o];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Ti(t),this.hls.trigger(v.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[o];h&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==h.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==h.bitrate&&this.log(`Unstable Pathways change from bitrate ${h.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===me.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===me.SUBTITLE_TRACK&&n[i].hasSubtitleGroup(e))return n[i].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(i=>{const{ID:s,"BASE-ID":o,"URI-REPLACEMENT":h}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(o).map(p=>{const m=new kr(p.attrs);m["PATHWAY-ID"]=s;const _=m.AUDIO&&`${m.AUDIO}_clone_${s}`,D=m.SUBTITLES&&`${m.SUBTITLES}_clone_${s}`;_&&(r[m.AUDIO]=_,m.AUDIO=_),D&&(n[m.SUBTITLES]=D,m.SUBTITLES=D);const C=Fl(p.uri,m["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),G=new Qr({attrs:m,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:C,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let z=1;z<p.audioGroups.length;z++)G.addGroupId("audio",`${p.audioGroups[z]}_clone_${s}`);if(p.subtitleGroups)for(let z=1;z<p.subtitleGroups.length;z++)G.addGroupId("text",`${p.subtitleGroups[z]}_clone_${s}`);return G});t.push(...c),Bl(this.audioTracks,r,h,s),Bl(this.subtitleTracks,n,h,s)})}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(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:n.href},s=t.steeringManifestLoadPolicy.default,o=s.errorRetry||s.timeoutRetry||{},h={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},c={onSuccess:(p,m,_,D)=>{this.log(`Loaded steering manifest: "${n}"`);const C=p.data;if((C==null?void 0:C.VERSION)!==1){this.log(`Steering VERSION ${C.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=C.TTL;const{"RELOAD-URI":G,"PATHWAY-CLONES":z,"PATHWAY-PRIORITY":ue}=C;if(G)try{this.uri=new self.URL(G,n).href}catch(ye){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${G}`);return}this.scheduleRefresh(this.uri||_.url),z&&this.clonePathways(z);const fe={steeringManifest:C,url:n.toString()};this.hls.trigger(v.STEERING_MANIFEST_LOADED,fe),ue&&this.updatePathwayPriority(ue)},onError:(p,m,_,D)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${m.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${m.url} no longer available`);return}let C=this.timeToLoad*1e3;if(p.code===429){const G=this.loader;if(typeof(G==null?void 0:G.getResponseHeader)=="function"){const z=G.getResponseHeader("Retry-After");z&&(C=parseFloat(z)*1e3)}this.log(`Steering manifest ${m.url} rate limited`);return}this.scheduleRefresh(this.uri||m.url,C)},onTimeout:(p,m,_)=>{this.log(`Timeout loading steering manifest (${m.url})`),this.scheduleRefresh(this.uri||m.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(i,h,c)}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 Bl(a,e,t,r){a&&Object.keys(e).forEach(n=>{const i=a.filter(s=>s.groupId===n).map(s=>{const o=E({},s);return o.details=void 0,o.attrs=new kr(o.attrs),o.url=o.attrs.URI=Fl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[n],o.attrs["PATHWAY-ID"]=r,o});a.push(...i)})}function Fl(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let o;e&&(o=s==null?void 0:s[e],o&&(a=o));const h=new self.URL(a);return n&&!o&&(h.host=n),i&&Object.keys(i).sort().forEach(c=>{c&&h.searchParams.set(c,i[c])}),h.href}class ya extends Y{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=ya.CDMCleanupPromise?[ya.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,i=`"${t.type}" event: init data type: "${r}"`;if(this.debug(i),n!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=Ii(this.config));const o=s.map(Qn).filter(h=>!!h);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(s=>{const o=xi(s);if(r!=="sinf"||o!==zr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${r}" for selected key-system ${o}`);return}let h;try{const D=Nt(new Uint8Array(n)),C=Hi(JSON.parse(D).sinf),G=Dt(C);if(!G)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");h=new Uint8Array(G.subarray(8,24))}catch(D){this.warn(`${i} Failed to parse sinf: ${D}`);return}const c=ae(h),{keyIdToKeySessionPromise:p,mediaKeySessions:m}=this;let _=p[c];for(let D=0;D<m.length;D++){const C=m[D],G=C.decryptdata;if(!G.keyId)continue;const z=ae(G.keyId);if(ii(h,G.keyId)||G.uri.replace(/-/g,"").indexOf(c)!==-1){if(_=p[z],!_)continue;if(G.pssh)break;delete p[z],G.pssh=new Uint8Array(n),G.keyId=h,_=p[c]=_.then(()=>this.generateRequestWithPreferredKeySession(C,r,n,"encrypted-event-key-match")),_.catch(ue=>this.handleError(ue));break}}_||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${m.length}.`))}).catch(s=>this.handleError(s))}},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(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(v.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(v.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t==null?void 0:t[e];if(n)return n.licenseUrl;if(e===zr.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==null?void 0:t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(s,o,h)=>!!s&&h.indexOf(s)===o,n=t.map(s=>s.audioCodec).filter(r),i=t.map(s=>s.videoCodec).filter(r);return n.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,o)=>{const h=c=>{const p=c.shift();this.getMediaKeysPromise(p,n,i).then(m=>s({keySystem:p,mediaKeys:m})).catch(m=>{c.length?h(c):m instanceof qi?o(m):o(new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_NO_ACCESS,error:m,fatal:!0},m.message))})};h(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return dn===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){var n;const i=Wr(e,t,r,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],o=(n=s)==null?void 0:n.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Ge(i)}`),o=this.requestMediaKeySystemAccess(e,i);const h=s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),o.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const m=h.mediaKeys=c.createMediaKeys().then(_=>(this.log(`Media-keys created for "${e}"`),h.hasMediaKeys=!0,p.then(D=>D?this.setMediaKeysServerCertificate(_,e,D):_)));return m.catch(_=>{this.error(`Failed to create media-keys for "${e}"}: ${_}`)}),m})}return o.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${ae(e.keyId||[])} keyUri: ${e.uri}`);const n=r.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=mo(t),i="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyId ${ae(e.decryptdata.keyId||[])}
|
|
} (data length: ${t.byteLength})`),r.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>Qn(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 i=Qn(n);i?t(i):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=Ii(this.config),r=e.map(xi).filter(n=>!!n&&t.indexOf(n)!==-1);return this.selectKeySystem(r)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let r=0;r<t.length;r++){const n=A0(e,t[r]);if(n)return n}}loadKey(e){const t=e.keyInfo.decryptdata,r=mo(t),n=this.bannedKeyIds[r];if(n||this.getKeyStatus(t)==="internal-error"){const o=Nl(n||"internal-error",t);return this.handleError(o,e.frag),Promise.reject(o)}const i=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[r];if(!s){const o=this.getKeySystemForKeyPromise(t).then(({keySystem:h,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(h,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:h,mediaKeys:c,decryptdata:t}))))).then(h=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(h,c,p,"playlist-key")});return o.catch(h=>this.handleError(h,e.frag)),this.keyIdToKeySessionPromise[r]=o,o}return s.catch(o=>{if(o instanceof qi){const h=T({},o.data);this.getKeyStatus(t)==="internal-error"&&(h.decryptdata=t);const c=new qi(h,o.message);this.handleError(c,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof qi){t&&(e.data.frag=t);const r=e.data.decryptdata;this.error(`${e.message}${r?` (${ae(r.keyId||[])})`:""}`),this.hls.trigger(v.ERROR,e.data)}else this.error(e.message),this.hls.trigger(v.ERROR,{type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=mo(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=xi(e.keyFormat),i=n?[n]:Ii(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=Ii(this.config)),e.length===0)throw new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Ge({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>this.media?this.media.setMediaKeys(t):new Promise((i,s)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return s(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=t,this.media.setMediaKeys(t).then(i).catch(s)}}));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(i=>r.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const C=s.call(this.hls,t,r,e);if(!C)throw new Error("Invalid response from configured generateRequest filter");t=C.initDataType,r=C.initData?C.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(C){if(this.warn(C.message),this.hls&&this.hls.config.debug)throw C}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const o=mo(e.decryptdata),h=e.decryptdata.uri;this.log(`Generating key-session request for "${n}" keyId: ${o} URI: ${h} (init data type: ${t} length: ${r.byteLength})`);const c=new ha,p=e._onmessage=C=>{const G=e.mediaKeysSession;if(!G){c.emit("error",new Error("invalid state"));return}const{messageType:z,message:ue}=C;this.log(`"${z}" message event for session "${G.sessionId}" message size: ${ue.byteLength}`),z==="license-request"||z==="license-renewal"?this.renewLicense(e,ue).catch(fe=>{c.eventNames().length?c.emit("error",fe):this.handleError(fe)}):z==="license-release"?e.keySystem===zr.FAIRPLAY&&this.updateKeySession(e,Mi("acknowledged")).then(()=>this.removeSession(e)).catch(fe=>this.handleError(fe)):this.warn(`unhandled media key message type "${z}"`)},m=(C,G)=>{G.keyStatus=C;let z;C.startsWith("usable")?c.emit("resolved"):C==="internal-error"||C==="output-restricted"||C==="output-downscaled"?z=Nl(C,G.decryptdata):C==="expired"?z=new Error(`key expired (keyId: ${o})`):C==="released"?z=new Error("key released"):C==="status-pending"||this.warn(`unhandled key status change "${C}" (keyId: ${o})`),z&&(c.eventNames().length?c.emit("error",z):this.handleError(z))},_=e._onkeystatuseschange=C=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const z=this.getKeyStatuses(e);if(!Object.keys(z).some(Pe=>z[Pe]!=="status-pending"))return;if(z[o]==="expired"){this.log(`Expired key ${Ge(z)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let fe=z[o];if(fe)m(fe,e);else{var ye;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(ye=e.keyStatusTimeouts)[o]||(ye[o]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const We=this.getKeyStatus(e.decryptdata);if(We&&We!=="status-pending")return this.log(`No status for keyId ${o} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${We} from other session.`),m(We,e);this.log(`key status for ${o} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),fe="internal-error",m(fe,e)},1e3)),this.log(`No status for keyId ${o} (${Ge(z)}).`)}};Ai(e.mediaKeysSession,"message",p),Ai(e.mediaKeysSession,"keystatuseschange",_);const D=new Promise((C,G)=>{c.on("error",G),c.on("resolved",C)});return e.mediaKeysSession.generateRequest(t,r).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${o} URI: ${h}`)}).catch(C=>{throw new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_NO_SESSION,error:C,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${C}`)}).then(()=>D).catch(C=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw C}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((r,n)=>{if(typeof n=="string"&&typeof r=="object"){const o=n;n=r,r=o}const i="buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n);if(e.keySystem===zr.PLAYREADY&&i.length===16){const o=ae(i);t[o]=r,dr(i)}const s=ae(i);r==="internal-error"&&(this.bannedKeyIds[s]=r),this.log(`key status change "${r}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=r}),t}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,o)=>{const h={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(_,D,C,G)=>{s(_.data)},onError:(_,D,C,G)=>{o(new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:C,response:T({url:h.url,data:void 0},_)},`"${e}" certificate request failed (${i}). Status: ${_.code} (${_.text})`))},onTimeout:(_,D,C)=>{o(new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:C,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(_,D,C)=>{o(new Error("aborted"))}};n.load(h,p,m)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,i)=>{e.setServerCertificate(r).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${r.byteLength}) on "${t}"`),n(e)}).catch(s=>{i(new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:n,fatal:!1},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"),i=n.querySelectorAll("HttpHeader");if(i.length>0){let p;for(let m=0,_=i.length;m<_;m++){var s,o;p=i[m];const D=(s=p.querySelector("name"))==null?void 0:s.textContent,C=(o=p.querySelector("value"))==null?void 0:o.textContent;D&&C&&e.setRequestHeader(D,C)}}const h=n.querySelector("Challenge"),c=h==null?void 0:h.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Mi(atob(c))}setupLicenseXHR(e,t,r,n){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,r,n)}).catch(s=>{if(!r.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,r,n)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||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,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let h=o.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const c=this.config.licenseResponseCallback;if(c)try{h=c.call(this.hls,o,s,e)}catch(p){this.error(p)}n(h)}else{const h=r.errorRetry,c=h?h.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||o.status>=400&&o.status<500)i(new qi({type:_e.KEY_SYSTEM_ERROR,details:Z.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:o,response:{url:s,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${s}). Status: ${o.status} (${o.statusText})`));else{const p=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${p} attempts left`),this.requestLicense(e,t).then(n,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,s,e,t).then(({xhr:h,licenseChallenge:c})=>{e.keySystem==zr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(h,c)),h.send(c)}).catch(i)})}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);const n=this.mediaResolved;n?n():this.mediaKeys=r.mediaKeys}onMediaDetached(){const e=this.media;e&&(ki(e,"encrypted",this.onMediaEncrypted),ki(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const r=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,si.clearKeyUriToKeyIdMap();const i=n.length;ya.CDMCleanupPromise=Promise.all(n.map(s=>this.removeSession(s)).concat((r==null||(e=r.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))||Promise.resolve())).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`),this.hls&&this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{i&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,i)=>(n.indexOf(i.keyFormat)===-1&&n.push(i.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r,decryptdata:n}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${ae((n==null?void 0:n.keyId)||[])}`),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 i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(c=>self.clearTimeout(s[c]));const{drmSystemOptions:o}=this.config;return(Bn(o)?new Promise((c,p)=>{self.setTimeout(()=>p(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(c).catch(p)}):Promise.resolve()).catch(c=>{this.log(`Could not remove session: ${c}`),this.hls&&this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${c}`)})}).then(()=>t.close()).catch(c=>{this.log(`Could not close session: ${c}`),this.hls&&this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}ya.CDMCleanupPromise=void 0;function mo(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return ae(a.keyId)}function A0(a,e){if(a.keyId&&e.mediaKeysSession.keyStatuses.has(a.keyId))return e.mediaKeysSession.keyStatuses.get(a.keyId);if(a.matches(e.decryptdata))return e.keyStatus}class qi 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}}function Nl(a,e){const t=a==="output-restricted",r=t?Z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:Z.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new qi({type:_e.KEY_SYSTEM_ERROR,details:r,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class D0{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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(v.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(v.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 i=n-this.lastTime,s=r-this.lastDroppedFrames,o=t-this.lastDecodedFrames,h=1e3*s/i,c=this.hls;if(c.trigger(v.FPS_DROP,{currentDropped:s,currentDecoded:o,totalDroppedFrames:r}),h>0&&s>c.config.fpsDroppedMonitoringThreshold*o){let p=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=p)&&(p=p-1,c.trigger(v.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,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 $l(a,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Ul(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){he.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,a.addCue(n)}catch(n){he.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(a.mode=t)}function ba(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let r=a.cues.length;r--;)e&&a.cues[r].removeEventListener("enter",e),a.removeCue(a.cues[r]);t==="disabled"&&(a.mode=t)}function Yo(a,e,t,r){const n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=R0(a.cues,e,t);for(let s=0;s<i.length;s++)(!r||r(i[s]))&&a.removeCue(i[s])}n==="disabled"&&(a.mode=n)}function C0(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let r=0,n=t,i;for(;r<=n;)if(i=Math.floor((n+r)/2),e<a[i].startTime)n=i-1;else if(e>a[i].startTime&&r<t)r=i+1;else return i;return a[r].startTime-e<e-a[n].startTime?r:n}function R0(a,e,t){const r=[],n=C0(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const o=a[i];if(o.startTime>=e&&o.endTime<=t)r.push(o);else if(o.startTime>t)return r}return r}function go(a){const e=[];for(let t=0;t<a.length;t++){const r=a[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(a[t])}return e}class I0 extends Uo{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=go(this.media.textTracks);for(let i=0;i<r.length;i++)if(r[i].mode==="hidden")t=r[i];else if(r[i].mode==="showing"){t=r[i];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(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.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;go(r.textTracks).forEach(s=>{ba(s)})}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:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const o=s.details;s.details=t.details,this.log(`Subtitle track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,o)}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 i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(s=>(n==null?void 0:n.indexOf(s))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(p=>!r||r.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,m)=>{p.id=m});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const o=this.hls.config.subtitlePreference;if(!i&&o){this.selectDefaultTrack=!1;const p=It(o,s);if(p>-1)i=s[p];else{const m=It(o,this.tracks);i=this.tracks[m]}}let h=this.findTrackId(i);h===-1&&i&&(h=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(v.SUBTITLE_TRACKS_UPDATED,c),h!==-1&&this.trackId===-1&&this.setSubtitleTrack(h)}}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const i=t[n];if(!(r&&!i.default||!r&&!e)&&(!e||Qt(i,e)))return n}if(e){for(let n=0;n<t.length;n++){const i=t[n];if($a(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if($a(e.attrs,i.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(zo(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===me.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&&Qt(e,r))return r;const n=It(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=It(e,t);if(i>-1)return t[i]}}}}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,i=this.getUrlWithDirectives(e.url,t),s=e.details,o=s==null?void 0:s.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:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(v.SUBTITLE_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=go(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(i=>zo(r,i))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==n&&(i.mode="disabled")}),n){const i=this.subtitleDisplay?"showing":"hidden";n.mode!==i&&(n.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!I(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(v.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&i)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:s,groupId:o="",name:h,type:c,url:p}=n;this.hls.trigger(v.SUBTITLE_TRACK_SWITCH,{id:s,groupId:o,name:h,type:c,url:p});const m=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(m)}}function L0(){try{return crypto.randomUUID()}catch(a){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 i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?i:i&3|8).toString(16)})}}}function Ua(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Ea=.025;let vo=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function k0(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class P0{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 qo(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=qo(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=I(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 qo(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)<Ea))}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"?vo.Range:vo.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 O0(this)}}function qo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Ea)?e.start:e.start+e.duration}function zl(a,e,t){const r=new self.URL(a,t);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function Xo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function O0(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function xa(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class M0{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&&this.hls.trigger(v.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=r,this.assetItem=n;const s=()=>{this.hasDetails=!0};i.once(v.LEVEL_LOADED,s),i.once(v.AUDIO_TRACK_LOADED,s),i.once(v.SUBTITLE_TRACK_LOADED,s),i.on(v.MEDIA_ATTACHING,(o,{media:h})=>{this.removeMediaListeners(),this.mediaAttached=h,this.interstitial.playoutLimit&&(h.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(v.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(v.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=zl(t,e.config.primarySessionId||"").href}catch(r){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const r=Math.min(this._bufferedEosTime||1/0,this.duration),n=this.timelineOffset,i=Or.bufferInfo(e,n,0);return this.getAssetTime(i.end)>=r-.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=Or.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;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const r=t-this.startOffset;if(r>0&&r<e)return r}return e}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&&this.hls){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&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&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){var n;(n=this.hls)==null||n.on(e,t)}once(e,t,r){var n;(n=this.hls)==null||n.once(e,t)}off(e,t,r){var n;(n=this.hls)==null||n.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${xa(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Gl=.033;class B0 extends Y{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&&(i=n[r])!=null&&i.event;){var i;r--}return r}findItemIndexAtTime(e,t){const r=this.items;if(r)for(let n=0;n<r.length;n++){let i=r[n];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return n}return-1}findJumpRestrictedIndex(e,t){const r=this.items;if(r)for(let n=e;n<=t&&r[n];n++){const i=r[n].event;if(i!=null&&i.restrictions.jump&&!i.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 i=0;i<n;i++){const s=r[i];if(!s.error){const o=s.timelineStart;if(t===o||t>o&&(t<o+(s.duration||0)||i===n-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const r=t.assetList,n=r[r.length-1];if(n)return n.identifier}return null}parseInterstitialDateRanges(e,t){const r=e.main.details,{dateRanges:n}=r,i=this.events,s=this.parseDateRanges(n,{url:r.url},t),o=Object.keys(n),h=i?i.filter(c=>!o.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const m=c.cue.pre,_=c.cue.post,D=p.cue.pre,C=p.cue.post;if(m&&!D)return-1;if(D&&!m||_&&!C)return 1;if(C&&!_)return-1;if(!m&&!D&&!_&&!C){const G=c.startTime,z=p.startTime;if(G!==z)return G-z}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,h.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,h)}updateSchedule(e,t=[],r=!1){const n=this.events||[];if(n.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(n,e);(r||t.length||(i==null?void 0:i.length)!==s.length||s.some((h,c)=>Math.abs(h.playout.start-i[c].playout.start)>.005||Math.abs(h.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,r){const n=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const o=i[s],h=e[o];if(h.isInterstitial){let c=this.eventMap[o];c?c.setDateRange(h):(c=new P0(h,t),this.eventMap[o]=c,r===!1&&(c.appendInPlace=r)),n.push(c)}}return n}parseSchedule(e,t){const r=[],n=t.main.details,i=n.live?1/0:n.edge;let s=0;if(e=e.filter(h=>!h.error&&!(h.cue.once&&h.hasPlayed)),e.length){this.resolveOffsets(e,t);let h=0,c=0;if(e.forEach((p,m)=>{const _=p.cue.pre,D=p.cue.post,C=e[m-1]||null,G=p.appendInPlace,z=D?i:p.startOffset,ue=p.duration,fe=p.timelineOccupancy===vo.Range?ue:0,ye=p.resumptionOffset,Pe=(C==null?void 0:C.startTime)===z,We=z+p.cumulativeDuration;let dt=G?We+ue:z+ye;if(_||!D&&z<=0){const at=c;c+=fe,p.timelineStart=We;const it=s;s+=ue,r.push({event:p,start:We,end:dt,playout:{start:it,end:s},integrated:{start:at,end:c}})}else if(z<=i){if(!Pe){const Ye=z-h;if(Ye>Gl){const Rt=h,ur=c;c+=Ye;const wr=s;s+=Ye;const Fr={previousEvent:e[m-1]||null,nextEvent:p,start:Rt,end:Rt+Ye,playout:{start:wr,end:s},integrated:{start:ur,end:c}};r.push(Fr)}else Ye>0&&C&&(C.cumulativeDuration+=Ye,r[r.length-1].end=z)}D&&(dt=We),p.timelineStart=We;const at=c;c+=fe;const it=s;s+=ue,r.push({event:p,start:We,end:dt,playout:{start:it,end:s},integrated:{start:at,end:c}})}else return;const je=p.resumeTime;D||je>i?h=i:h=je}),h<i){var o;const p=h,m=c,_=i-h;c+=_;const D=s;s+=_,r.push({previousEvent:((o=r[r.length-1])==null?void 0:o.event)||null,nextEvent:null,start:h,end:p+_,playout:{start:D,end:s},integrated:{start:m,end:c}})}this.setDurations(i,s,c)}else r.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);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 i=0,s=-1;e.forEach((o,h)=>{const c=o.cue.pre,p=o.cue.post,m=c?0:p?n:o.startTime;this.updateAssetDurations(o),s===m?o.cumulativeDuration=i:(i=0,s=m),!p&&o.snapOptions.in&&(o.resumeAnchor=Vr(null,r.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&h+1<e.length&&e[h+1].startTime-e[h].resumeTime<Gl&&(e[h+1].appendInPlace=!1,e[h+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const D=I(o.resumeOffset)?o.resumeOffset:o.duration;i+=D})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>Ea?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):!Object.keys(t).some(s=>{const o=t[s].details,h=o.edge;if(r>=h)return this.log(`"${e.identifier}" resumption ${r} past ${s} playlist end ${h}`),!1;const c=Vr(null,o.fragments,r);if(!c)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${s} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-r)<Ea+p||Math.abs(c.end-r)<Ea+p?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let r=0,n=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const o=e.assetList[s],h=t+r;o.startOffset=r,o.timelineStart=h,n||(n=o.duration===null),i||(i=!!o.error);const c=o.error?0:o.duration||0;r+=c}n&&!i?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function os(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class F0{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const r=e.assetListUrl;let n;try{n=zl(r,this.hls.sessionId,e.baseUrl)}catch(_){const D=this.assignAssetListError(e,Z.ASSET_LIST_LOAD_ERROR,_,r);this.hls.trigger(v.ERROR,D);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,o=new s(i),h={responseType:"json",url:n.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(_,D,C,G)=>{const z=_.data,ue=z==null?void 0:z.ASSETS;if(!Array.isArray(ue)){const fe=this.assignAssetListError(e,Z.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),C.url,D,G);this.hls.trigger(v.ERROR,fe);return}e.assetListResponse=z,this.hls.trigger(v.ASSET_LIST_LOADED,{event:e,assetListResponse:z,networkDetails:G})},onError:(_,D,C,G)=>{const z=this.assignAssetListError(e,Z.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${_.code} ${_.text} (${D.url})`),D.url,G,C);this.hls.trigger(v.ERROR,z)},onTimeout:(_,D,C)=>{const G=this.assignAssetListError(e,Z.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${D.url})`),D.url,_,C);this.hls.trigger(v.ERROR,G)}};return o.load(h,p,m),this.hls.trigger(v.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,r,n,i,s){return e.error=r,{type:_e.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:s,stats:i}}}function Kl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function _o(a,e){return`[${a}] Advancing timeline position to ${e}`}class N0 extends Y{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||!this.schedule)return;const n=r-this.timelinePos;if(Math.abs(n)<1/7056e5)return;const s=n<=-.01;this.timelinePos=r,this.bufferedPos=r;const o=this.playingItem;if(!o){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(!0),this.checkBuffer(),s&&r<o.start||r>=o.end){var h;const D=this.findItemIndex(o);let C=this.schedule.findItemIndexAtTime(r);if(C===-1&&(C=D+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${r} (resolving from ${D} to ${C})`)),!this.isInterstitial(o)&&(h=this.media)!=null&&h.paused&&(this.shouldPlay=!1),!s&&C>D){const G=this.schedule.findJumpRestrictedIndex(D+1,C);if(G>D){this.setSchedulePosition(G);return}}this.setSchedulePosition(C);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(o)){const D=o.event.assetList[0];D&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,D))}return}const p=c.timelineStart,m=c.duration||0;if(s&&r<p||r>=p+m){var _;(_=o.event)!=null&&_.appendInPlace&&(this.clearAssetPlayers(o.event,o),this.flushFrontBuffer(r)),this.setScheduleToAssetAtTime(r,c)}},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 o=this.findItemIndex(n);this.setSchedulePosition(o+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);r>=s&&this.setScheduleToAssetAtTime(r,i)},this.onScheduleUpdate=(r,n)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,o=i.events||[],h=i.items||[],c=i.durations,p=r.map(G=>G.identifier),m=!!(o.length||p.length);(m||n)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
|
|
Schedule: ${h.map(G=>os(G))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let _=null,D=null;s&&(_=this.updateItem(s,this.timelinePos),this.itemsMatch(s,_)?this.playingItem=_:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const C=this.bufferingItem;if(C&&(D=this.updateItem(C,this.bufferedPos),this.itemsMatch(C,D)?this.bufferingItem=D:C.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(C.event,null))),r.forEach(G=>{G.assetList.forEach(z=>{this.clearAssetPlayer(z.identifier,null)})}),this.playerQueue.forEach(G=>{if(G.interstitial.appendInPlace){const z=G.assetItem.timelineStart,ue=G.timelineOffset-z;if(ue)try{G.timelineOffset=z}catch(fe){Math.abs(ue)>Ea&&this.warn(`${fe} ("${G.assetId}" ${G.timelineOffset}->${z})`)}}}),m||n){if(this.hls.trigger(v.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:h.slice(0),durations:c,removedIds:p}),this.isInterstitial(s)&&p.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(_,s),C&&D!==_&&this.trimInPlace(D,C),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new F0(e),this.schedule=new B0(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(v.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(v.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(v.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(v.MEDIA_ENDED,this.onMediaEnded,this),e.on(v.ERROR,this.onError,this),e.on(v.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(v.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(v.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(v.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.BUFFER_APPENDED,this.onBufferAppended,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(v.MEDIA_ENDED,this.onMediaEnded,this),e.off(v.ERROR,this.onError,this),e.off(v.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.schedule=this.manager=null,this.hls=this.HlsPlayerClass=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){ki(e,"play",this.onPlay),ki(e,"pause",this.onPause),ki(e,"seeking",this.onSeeking),ki(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 i=this.findItemIndex(r);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),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 i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,r=m=>m&&e.getAssetPlayer(m.identifier),n=(m,_,D,C,G)=>{if(m){let z=m[_].start;const ue=m.event;if(ue){if(_==="playout"||ue.timelineOccupancy!==vo.Point){const fe=r(D);(fe==null?void 0:fe.interstitial)===ue&&(z+=fe.assetItem.startOffset+fe[G])}}else{const fe=C==="bufferedPos"?s():e[C];z+=fe-m.start}return z}return 0},i=(m,_)=>{var D;if(m!==0&&_!=="primary"&&(D=e.schedule)!=null&&D.length){var C;const G=e.schedule.findItemIndexAtTime(m),z=(C=e.schedule.items)==null?void 0:C[G];if(z){const ue=z[_].start-z.start;return m+ue}}return m},s=()=>{const m=e.bufferedPos;return m===Number.MAX_VALUE?o("primary"):Math.max(m,0)},o=m=>{var _,D;return(_=e.primaryDetails)!=null&&_.live?e.primaryDetails.edge:((D=e.schedule)==null?void 0:D.durations[m])||0},h=(m,_)=>{var D,C;const G=e.effectivePlayingItem;if(G!=null&&(D=G.event)!=null&&D.restrictions.skip||!e.schedule)return;e.log(`seek to ${m} "${_}"`);const z=e.effectivePlayingItem,ue=e.schedule.findItemIndexAtTime(m,_),fe=(C=e.schedule.items)==null?void 0:C[ue],ye=e.getBufferingPlayer(),Pe=ye==null?void 0:ye.interstitial,We=Pe==null?void 0:Pe.appendInPlace,dt=z&&e.itemsMatch(z,fe);if(z&&(We||dt)){const je=r(e.playingAsset),at=(je==null?void 0:je.media)||e.primaryMedia;if(at){const it=_==="primary"?at.currentTime:n(z,_,e.playingAsset,"timelinePos","currentTime"),Ye=m-it,Rt=(We?it:at.currentTime)+Ye;if(Rt>=0&&(!je||We||Rt<=je.duration)){at.currentTime=Rt;return}}}if(fe){let je=m;if(_!=="primary"){const it=fe[_].start,Ye=m-it;je=fe.start+Ye}const at=!e.isInterstitial(fe);if((!e.isInterstitial(z)||z.event.appendInPlace)&&(at||fe.event.appendInPlace)){const it=e.media||(We?ye==null?void 0:ye.media:null);it&&(it.currentTime=je)}else if(z){const it=e.findItemIndex(z);if(ue>it){const Rt=e.schedule.findJumpRestrictedIndex(it+1,ue);if(Rt>it){e.setSchedulePosition(Rt);return}}let Ye=0;if(at)e.timelinePos=je,e.checkBuffer();else{const Rt=fe.event.assetList,ur=m-(fe[_]||fe).start;for(let wr=Rt.length;wr--;){const Fr=Rt[wr];if(Fr.duration&&ur>=Fr.startOffset&&ur<Fr.startOffset+Fr.duration){Ye=wr;break}}}e.setSchedulePosition(ue,Ye)}}},c=()=>{const m=e.effectivePlayingItem;if(e.isInterstitial(m))return m;const _=t();return e.isInterstitial(_)?_:null},p={get bufferedEnd(){const m=t(),_=e.bufferingItem;if(_&&_===m){var D;return n(_,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-_.playout.start||((D=e.bufferingAsset)==null?void 0:D.startOffset)||0}return 0},get currentTime(){const m=c(),_=e.effectivePlayingItem;return _&&_===m?n(_,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-_.playout.start:0},set currentTime(m){const _=c(),D=e.effectivePlayingItem;D&&D===_&&h(m+D.playout.start,"playout")},get duration(){const m=c();return m?m.playout.end-m.playout.start:0},get assetPlayers(){var m;const _=(m=c())==null?void 0:m.event.assetList;return _?_.map(D=>e.getAssetPlayer(D.identifier)):[]},get playingIndex(){var m;const _=(m=c())==null?void 0:m.event;return _&&e.effectivePlayingAsset?_.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var m;return((m=e.schedule)==null||(m=m.events)==null?void 0:m.slice(0))||[]},get schedule(){var m;return((m=e.schedule)==null||(m=m.items)==null?void 0:m.slice(0))||[]},get interstitialPlayer(){return c()?p:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const m=t();return e.findItemIndex(m)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const m=e.effectivePlayingItem;return e.findItemIndex(m)},primary:{get bufferedEnd(){return s()},get currentTime(){const m=e.timelinePos;return m>0?m:0},set currentTime(m){h(m,"primary")},get duration(){return o("primary")},get seekableStart(){var m;return((m=e.primaryDetails)==null?void 0:m.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(m){h(m,"integrated")},get duration(){return o("integrated")},get seekableStart(){var m;return i(((m=e.primaryDetails)==null?void 0:m.fragmentStart)||0,"integrated")}},skip:()=>{const m=e.effectivePlayingItem,_=m==null?void 0:m.event;if(_&&!_.restrictions.skip){const D=e.findItemIndex(m);if(_.appendInPlace){const C=m.playout.start+m.event.duration;h(C+.001,"playout")}else e.advanceAfterAssetEnded(_,D,1/0)}}}}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;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let n=this.media;!n&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(n=this.primaryMedia);const i=(t=n)==null?void 0:t.currentTime;if(!(i===void 0||!I(i)))return i}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 i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Ge(i)}`),this.detachedData=i}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}transferMediaTo(e,t){var r,n;if(e.media===t)return;let i=null;const s=this.hls,o=e!==s,h=o&&e.interstitial.appendInPlace,c=(r=this.detachedData)==null?void 0:r.mediaSource;let p;if(s.media)h&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const C=this.getBufferingPlayer();C?(i=C.transferMedia(),p=`${C}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${Ge(i)}`);else if(!this.detachedData||s.media===t){const C=this.playerQueue;C.length>1&&C.forEach(G=>{if(o&&G.interstitial.appendInPlace!==h){const z=G.interstitial;this.clearInterstitial(G.interstitial,null),z.appendInPlace=!1,z.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${z}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const m=i&&"mediaSource"in i&&((n=i.mediaSource)==null?void 0:n.readyState)!=="closed",_=m&&i?i:t;this.log(`${m?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const D=this.schedule;if(_===i&&D){const C=o&&e.assetId===D.assetIdAtEnd;_.overrides={duration:D.duration,endOfStream:!o||C,cueRemoval:!o}}e.attachMedia(_)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0: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 i=this.hls.startPosition;if(this.log(_o("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,o=e.findItemIndexAtTime(s);this.setSchedulePosition(o)}}else if(n&&!this.playingItem){const i=e.findItemIndex(n);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const r=e.event,n=r.findAssetIndex(t),i=Xo(r,n);if(!r.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const o=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];o&&this.bufferedToItem(o)}}advanceAfterAssetEnded(e,t,r){const n=Xo(e,r);if(e.isAssetPastPlayoutLimit(n)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,o=i.length;if(s>=o){this.setSchedulePosition(-1);return}const h=e.resumeTime;this.timelinePos<h&&(this.log(_o("advanceAfterAssetEnded",h)),this.timelinePos=h,e.appendInPlace&&this.advanceInPlace(h),this.checkBuffer(this.bufferedPos<h)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[n];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,n)}}setScheduleToAssetAtTime(e,t){const r=this.schedule;if(!r)return;const n=t.parentIdentifier,i=r.getEvent(n);if(i){const s=r.findEventIndex(n),o=r.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,o-1)}}setSchedulePosition(e,t){var r;const n=(r=this.schedule)==null?void 0:r.items;if(!n||this.playbackDisabled)return;const i=e>=0?n[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&os(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,o=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,m=this.playingAsset,_=m==null?void 0:m.identifier,D=_?this.getAssetPlayer(_):null;if(D&&_&&(!this.eventItemsMatch(s,i)||t!==void 0&&_!==p.assetList[t].identifier)){var h;const C=p.findAssetIndex(m);if(this.log(`INTERSTITIAL_ASSET_ENDED ${C+1}/${p.assetList.length} ${xa(m)}`),this.endedAsset=m,this.playingAsset=null,this.hls.trigger(v.INTERSTITIAL_ASSET_ENDED,{asset:m,assetListIndex:C,event:p,schedule:n.slice(0),scheduleIndex:e,player:D}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),C);return}this.retreiveMediaSource(_,i),D.media&&!((h=this.detachedData)!=null&&h.mediaSource)&&D.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${os(s)}`),p.hasPlayed=!0,this.hls.trigger(v.INTERSTITIAL_ENDED,{event:p,schedule:n.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const C=(c=this.schedule)==null?void 0:c.items;if(i&&C){const G=this.findItemIndex(i);this.advanceSchedule(G,C,t,s,o)}return}}this.advanceSchedule(e,n,t,s,o)}advanceSchedule(e,t,r,n,i){const s=this.schedule;if(!s)return;const o=t[e]||null,h=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const m=p.interstitial,_=s.findEventIndex(m.identifier);(_<e||_>e+1)&&this.clearInterstitial(m,o)}),this.isInterstitial(o)){this.timelinePos=Math.min(Math.max(this.timelinePos,o.start),o.end);const p=o.event;if(r===void 0){r=s.findAssetIndex(p,this.timelinePos);const C=Xo(p,r-1);if(p.isAssetPastPlayoutLimit(C)||p.appendInPlace&&this.timelinePos===o.end){this.advanceAfterAssetEnded(p,e,r);return}r=C}const m=this.waitingItem;this.assetsBuffered(o,h)||this.setBufferingItem(o);let _=this.preloadAssets(p,r);if(this.eventItemsMatch(o,m||n)||(this.waitingItem=o,this.log(`INTERSTITIAL_STARTED ${os(o)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(v.INTERSTITIAL_STARTED,{event:p,schedule:t.slice(0),scheduleIndex:e})),!p.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${p}`);return}if(p.assetListLoader&&(p.assetListLoader.destroy(),p.assetListLoader=void 0),!h){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=o;const D=p.assetList[r];if(!D){this.advanceAfterAssetEnded(p,e,r||0);return}if(_||(_=this.getAssetPlayer(D.identifier)),_===null||_.destroyed){const C=p.assetList.length;this.warn(`asset ${r+1}/${C} player destroyed ${p}`),_=this.createAssetPlayer(p,D,r),_.loadSource()}if(!this.eventItemsMatch(o,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(D))return;this.startAssetPlayer(_,r,t,e,h),this.shouldPlay&&Kl(_.media)}else o?(this.resumePrimary(o,e,n),this.shouldPlay&&Kl(this.hls.media)):i&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,r){var n,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${os(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let o=this.timelinePos;(o<e.start||o>=e.end)&&(o=this.getPrimaryResumption(e,t),this.log(_o("resumePrimary",o)),this.timelinePos=o),this.attachPrimary(o,e)}if(!r)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${os(e)}`),this.hls.trigger(v.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:Or.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 i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,n),r&&this.startLoadingPrimaryAt(e,r)),r||(this.log(_o("attachPrimary",e)),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(){var e;this.stopLoad(),(e=this.schedule)==null||e.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(v.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(v.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const r=this.hls.levels[t.level];if(!r.details)return;const n=T(T({},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=T(T({},this.altSelection),{},{audio:r});return}const i=T(T({},n),{},{audio:r});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=T(T({},this.altSelection),{},{subtitles:r});return}const i=T(T({},n),{},{subtitles:r});this.mediaSelection=i}onAudioTrackSwitching(e,t){const r=St(t);this.playerQueue.forEach(({hls:n})=>n&&(n.setAudioOption(t)||n.setAudioOption(r)))}onSubtitleTrackSwitch(e,t){const r=St(t);this.playerQueue.forEach(({hls:n})=>n&&(n.setSubtitleOption(t)||t.id!==-1&&n.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){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let n=0;n<t.length;n++){const i=t[n];if(i.cue.post){var r;const s=this.schedule.findEventIndex(i.identifier),o=(r=this.schedule.items)==null?void 0:r[s];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,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){var r;const n=(r=this.schedule)==null?void 0:r.items;if(e&&n){const i=this.findItemIndex(e,t);return n[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const r=e.end+.25,n=Or.bufferInfo(this.primaryMedia,r,0);(n.end>r||(n.nextStart||0)>r)&&(this.log(`trim buffered interstitial ${os(e)} (was ${os(t)})`),this.attachPrimary(r,null,!0),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?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const r=this.mediaSelection;r&&((t=this.schedule)==null||t.updateSchedule(r,[],e))}checkBuffer(e){var t;const r=(t=this.schedule)==null?void 0:t.items;if(!r)return;const n=Or.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,r,e)}updateBufferedPos(e,t,r){const n=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!n)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,o=this.findItemIndex(s);let h=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),m=Math.min(p+1,t.length-1),_=t[m];if((h===-1&&i&&e>=i.end||(c=_.event)!=null&&c.appendInPlace&&e+.01>=_.start)&&(h=m),this.isInterstitial(i)){const D=i.event;if(m-o>1&&D.appendInPlace===!1||D.assetList.length===0&&D.assetListLoader)return}if(this.bufferedPos=e,h>p&&h>o)this.bufferedToItem(_);else{const D=this.primaryDetails;this.primaryLive&&D&&e>D.edge-D.targetduration&&_.start<D.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(_)&&this.preloadAssets(_.event,0)}}else r&&s&&!this.itemsMatch(s,i)&&(h===o?this.bufferedToItem(s):h===o+1&&this.bufferedToItem(t[h]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(n=>{const i=this.getAssetPlayer(n.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,r=this.schedule;if(!this.itemsMatch(e,t)&&r){const{items:n,events:i}=r;if(!n||!i)return t;const s=this.isInterstitial(e),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const h=o?o.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${os(e)}`+(t?` (${h.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=r.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,m)=>{const _=this.getAssetPlayer(p.identifier);_&&(m===c&&_.loadSource(),_.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(v.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);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,i=r.cue.once;if(n||!i){const s=this.preloadAssets(r,t);if(s!=null&&s.interstitial.appendInPlace){const o=this.primaryMedia;o&&this.bufferAssetPlayer(s,o)}}}preloadAssets(e,t){const r=e.assetUrl,n=e.assetList.length,i=n===0&&!e.assetListLoader,s=e.cue.once;if(i){const h=e.timelineStart;if(e.appendInPlace){var o;const _=this.playingItem;!this.isInterstitial(_)&&(_==null||(o=_.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(h+.25)}let c,p=0;if(!this.playingItem&&this.primaryLive&&(p=this.hls.startPosition,p===-1&&(p=this.hls.liveSyncPosition||0)),p&&!(e.cue.pre||e.cue.post)){const _=p-h;_>0&&(c=Math.round(_*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${r?1:n} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),r)return this.createAsset(e,0,0,h,e.duration,r);const m=this.assetListLoader.loadAssetList(e,c);m&&(e.assetListLoader=m)}else if(!s&&n){for(let c=t;c<n;c++){const p=e.assetList[c],m=this.getAssetPlayerQueueIndex(p.identifier);(m===-1||this.playerQueue[m].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const h=e.assetList[t];if(h){const c=this.getAssetPlayer(h.identifier);return c&&c.loadSource(),c}}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(v.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,i,s){const o={parentIdentifier:e.identifier,identifier:k0(e,s,t),duration:i,startOffset:r,timelineStart:n,uri:s};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,r){const n=this.hls,i=n.userConfig;let s=i.videoPreference;const o=n.loadLevelObj||n.levels[n.currentLevel];(s||o)&&(s=E({},s),o.videoCodec&&(s.videoCodec=o.videoCodec),o.videoRange&&(s.allowedVideoRanges=[o.videoRange]));const h=n.audioTracks[n.audioTrack],c=n.subtitleTracks[n.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const Pe=this.timelinePos-t.timelineStart;if(Pe>1){const We=t.duration;We&&Pe<We&&(p=Pe)}}const m=t.identifier,_=T(T({},i),{},{maxMaxBufferLength:Math.min(180,n.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:m,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:h||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(_.timelineOffset=t.timelineStart));const D=_.cmcd;D!=null&&D.sessionId&&D.contentId&&(_.cmcd=E({},D,{contentId:Ua(t.uri)})),this.getAssetPlayer(m)&&this.warn(`Duplicate date range identifier ${e} and asset ${m}`);const C=new M0(this.HlsPlayerClass,_,e,t);this.playerQueue.push(C),e.assetList[r]=t;let G=!0;const z=Pe=>{if(Pe.live){var We;const at=new Error(`Interstitials MUST be VOD assets ${e}`),it={fatal:!0,type:_e.OTHER_ERROR,details:Z.INTERSTITIAL_ASSET_ITEM_ERROR,error:at},Ye=((We=this.schedule)==null?void 0:We.findEventIndex(e.identifier))||-1;this.handleAssetItemError(it,e,Ye,r,at.message);return}const dt=Pe.edge-Pe.fragmentStart,je=t.duration;(G||je===null||dt>je)&&(G=!1,this.log(`Interstitial asset "${m}" duration change ${je} > ${dt}`),t.duration=dt,this.updateSchedule())};C.on(v.LEVEL_UPDATED,(Pe,{details:We})=>z(We)),C.on(v.LEVEL_PTS_UPDATED,(Pe,{details:We})=>z(We)),C.on(v.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const ue=(Pe,We)=>{const dt=this.getAssetPlayer(m);if(dt&&We.tracks){dt.off(v.BUFFER_CODECS,ue),dt.tracks=We.tracks;const je=this.primaryMedia;this.bufferingAsset===dt.assetItem&&je&&!dt.media&&this.bufferAssetPlayer(dt,je)}};C.on(v.BUFFER_CODECS,ue);const fe=()=>{var Pe;const We=this.getAssetPlayer(m);if(this.log(`buffered to end of asset ${We}`),!We||!this.schedule)return;const dt=this.schedule.findEventIndex(e.identifier),je=(Pe=this.schedule.items)==null?void 0:Pe[dt];this.isInterstitial(je)&&this.advanceAssetBuffering(je,t)};C.on(v.BUFFERED_TO_END,fe);const ye=Pe=>()=>{if(!this.getAssetPlayer(m)||!this.schedule)return;this.shouldPlay=!0;const dt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,dt,Pe)};return C.once(v.MEDIA_ENDED,ye(r)),C.once(v.PLAYOUT_LIMIT_REACHED,ye(1/0)),C.on(v.ERROR,(Pe,We)=>{if(!this.schedule)return;const dt=this.getAssetPlayer(m);if(We.details===Z.BUFFER_STALLED_ERROR){if(dt!=null&&dt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(We,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${We.error} ${e}`)}),C.on(v.DESTROYING,()=>{if(!this.getAssetPlayer(m)||!this.schedule)return;const We=new Error(`Asset player destroyed unexpectedly ${m}`),dt={fatal:!0,type:_e.OTHER_ERROR,details:Z.INTERSTITIAL_ASSET_ITEM_ERROR,error:We};this.handleAssetItemError(dt,e,this.schedule.findEventIndex(e.identifier),r,We.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${xa(t)}`),this.hls.trigger(v.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:C}),C}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,t)})}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){const n=this.playerQueue[r];this.log(`clear ${n} toSegment: ${t&&os(t)}`),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,i){const{interstitial:s,assetItem:o,assetId:h}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!p||p.identifier!==h)&&(p&&(this.clearAssetPlayer(p.identifier,r[n]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${xa(o)}`),this.hls.trigger(v.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:s,schedule:r.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var r,n;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,o=this.schedule.findEventIndex(i.identifier),h=(r=this.schedule.items)==null?void 0:r[o];if(!h)return;e.loadSource(),this.setBufferingItem(h),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const p=i.appendInPlace;if(p&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const m=(c==null?void 0:c.tracks)||((n=this.detachedData)==null?void 0:n.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(m&&!ke(m,e.tracks)){const _=new Error(`Asset ${xa(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(m)}')`),D={fatal:!0,type:_e.OTHER_ERROR,details:Z.INTERSTITIAL_ASSET_ITEM_ERROR,error:_},C=i.findAssetIndex(s);this.handleAssetItemError(D,i,o,C,_.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,r=this.primaryMedia;if(!t||!r)return;const n=r.currentTime,i=t.findAssetIndex(e,n),s=e.assetList[i];if(s){const o=this.getAssetPlayer(s.identifier);if(o){const h=o.currentTime||n-s.timelineStart,c=o.duration-h;if(this.warn(`Stalled at ${h} of ${h+c} in ${o} ${e} (media.currentTime: ${n})`),h&&(c/r.playbackRate<.5||o.bufferedInPlaceToEnd(r))&&o.hls){const p=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,p,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,r,n,i){if(e.details===Z.BUFFER_STALLED_ERROR)return;const s=t.assetList[n]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&xa(s)} ${e.error}`),!this.schedule)return;const o=(s==null?void 0:s.identifier)||"",h=this.getAssetPlayerQueueIndex(o),c=this.playerQueue[h]||null,p=this.schedule.items,m=E({},e,{fatal:!1,errorAction:an(!0),asset:s,assetListIndex:n,event:t,schedule:p,scheduleIndex:r,player:c});if(this.hls.trigger(v.INTERSTITIAL_ASSET_ERROR,m),!e.fatal)return;const _=this.playingAsset,D=this.bufferingAsset,C=new Error(i);if(s&&(this.clearAssetPlayer(o,null),s.error=C),!t.assetList.some(G=>!G.error))t.error=C;else for(let G=n;G<t.assetList.length;G++)this.resetAssetPlayer(t.assetList[G].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):_&&_.identifier===o?this.advanceAfterAssetEnded(t,r,n):D&&D.identifier===o&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,D)}primaryFallback(e){const t=e.timelineStart,r=this.effectivePlayingItem;let n=this.timelinePos;if(r){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${n} playing: ${os(r)} error: ${e.error}`),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))}else if(n===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(i)}onAssetListLoaded(e,t){var r,n;const i=t.event,s=i.identifier,o=t.assetListResponse.ASSETS;if(!((r=this.schedule)!=null&&r.hasEvent(s)))return;const h=i.timelineStart,c=i.duration;let p=0;o.forEach((G,z)=>{const ue=parseFloat(G.DURATION);this.createAsset(i,z,p,h+p,ue,G.URI),p+=ue}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const m=this.waitingItem,_=(m==null?void 0:m.event.identifier)===s;this.updateSchedule();const D=(n=this.bufferingItem)==null?void 0:n.event;if(_){var C;const G=this.schedule.findEventIndex(s),z=(C=this.schedule.items)==null?void 0:C[G];if(z){if(!this.playingItem&&this.timelinePos>z.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==G){i.error=new Error(`Interstitial ${o.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(z)}this.setSchedulePosition(G)}else if((D==null?void 0:D.identifier)===s){const G=i.assetList[0];if(G){const z=this.getAssetPlayer(G.identifier);if(D.appendInPlace){const ue=this.primaryMedia;z&&ue&&this.bufferAssetPlayer(z,ue)}else z&&z.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case Z.ASSET_LIST_PARSING_ERROR:case Z.ASSET_LIST_LOAD_ERROR:case Z.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&(this.updateSchedule(!0),this.primaryFallback(r));break}case Z.BUFFER_STALLED_ERROR:{const r=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&r.event.appendInPlace){this.handleInPlaceStall(r.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Wl=500;class $0 extends Zs{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",ie.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(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Tt.IDLE,this.setInterval(Wl),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(this.fragContextChanged(r)||(He(r)&&(this.fragPrevious=r),this.state=Tt.IDLE),!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const o=r.start;for(let c=0;c<i.length;c++)if(o>=i[c].start&&o<=i[c].end){s=i[c];break}const h=r.start+r.duration;s?s.end=h:(s={start:o,end:h},i.push(s)),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 i=n-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let o=0;o<s.length;){if(s[o].end<=i){s.shift();continue}else if(s[o].start<i)s[o].start=i;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(r,i,ie.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===ie.SUBTITLE&&(t.details===Z.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Tt.STOPPED&&(this.state=Tt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&yl(this.levels,t)){this.levels=t.map(r=>new Qr(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new Qr(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ie.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!==Tt.STOPPED&&this.setInterval(Wl)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:o}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const h=i[o];if(o>=i.length||!h)return;this.log(`Subtitle track ${o} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(r=h.details)!=null&&r.live){if(s.deltaUpdateFailed)return;const m=this.mainDetails;if(!m){this.startFragRequested=!1;return}const _=m.fragments[0];if(!h.details)s.hasProgramDateTime&&m.hasProgramDateTime?(ks(s,m),c=s.fragmentStart):_&&(c=_.start,js(s,c));else{var p;c=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&_&&(c=_.start,js(s,c))}m&&!this.startFragRequested&&this.setStartPosition(m,c)}h.details=s,this.levelLastLoaded=h,o===n&&(this.hls.trigger(v.SUBTITLE_TRACK_UPDATED,{details:s,id:o,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Tt.IDLE&&(Vr(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&ui(n.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,zi(n.method)).catch(o=>{throw i.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const h=performance.now();i.trigger(v.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:s,tdecrypt:h}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=Tt.IDLE})}}doTick(){if(!this.media){this.state=Tt.IDLE;return}if(this.state===Tt.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,i=this.getLoadPosition(),s=Or.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:o,len:h}=s,c=r.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(h>p)return;const m=c.fragments,_=m.length,D=c.edge;let C=null;const G=this.fragPrevious;if(o<D){const fe=n.maxFragLookUpTolerance,ye=o>D-fe?0:fe;C=Vr(G,m,Math.max(m[0].start,o),ye),!C&&G&&G.start<m[0].start&&(C=m[0])}else C=m[_-1];if(C=this.filterReplacedPrimary(C,r.details),!C)return;const z=C.sn-c.startSN,ue=m[z-1];if(ue&&ue.cc===C.cc&&this.fragmentTracker.getState(ue)===on.NOT_LOADED&&(C=ue),this.fragmentTracker.getState(C)===on.NOT_LOADED){const fe=this.mapToInitFragWhenRequired(C);fe&&this.loadFragment(fe,r,o)}}}loadFragment(e,t,r){He(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new U0(this.tracksBuffered[this.currentTrackId]||[])}}class U0{constructor(e){this.buffered=void 0;const t=(r,n,i)=>{if(n=n>>>0,n>i-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${i})`);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 z0={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},Hl=a=>String.fromCharCode(z0[a]||a),ls=15,ws=100,G0={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},K0={17:2,18:4,21:6,22:8,23:10,19:13,20:15},W0={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},H0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},j0=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class V0{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;he.log(`${this.time} [${e}] ${r}`)}}}const ra=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class jl{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 Z0{constructor(){this.uchar=" ",this.penState=new jl}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 Y0{constructor(e){this.chars=[],this.pos=0,this.currPenState=new jl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ws;t++)this.chars.push(new Z0);this.logger=e}equals(e){for(let t=0;t<ws;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ws;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ws;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>ws&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ws)}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=Hl(e);if(this.pos>=ws){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<ws;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<ws;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 Qo{constructor(e){this.rows=[],this.currRow=ls-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ls;t++)this.rows.push(new Y0(e));this.logger=e}reset(){for(let e=0;e<ls;e++)this.rows[e].clear();this.currRow=ls-1}equals(e){let t=!0;for(let r=0;r<ls;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<ls;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ls;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 = "+Ge(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<ls;o++)this.rows[o].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const o=s.rows[i].cueStartTime,h=this.logger.time;if(o!==null&&h!==null&&o<h)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);r.setCursor(e.indent),e.color=r.chars[s].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 = "+Ge(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 i=0;i<ls;i++){const s=this.rows[i].getTextString();s&&(n=i+1,e?t.push("Row "+n+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
|
|
`)),r}getTextAndFormat(){return this.rows}}class Vl{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 Qo(r),this.nonDisplayedMemory=new Qo(r),this.lastOutputScreen=new Qo(r),this.currRollUpRow=this.displayedMemory.rows[ls-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[ls-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: "+Ge(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 Zl{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=X0(),this.logger=void 0;const n=this.logger=new V0;this.channels=[null,new Vl(e,t,n),new Vl(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,i=t[r+1]&127;let s=!1,o=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+ra([t[r],t[r+1]])+"] -> ("+ra([n,i])+")");const h=this.cmdHistory;if(n>=16&&n<=31){if(q0(n,i,h)){yo(null,null,h),this.logger.log(3,()=>"Repeated command ("+ra([n,i])+") is dropped");continue}yo(n,i,this.cmdHistory),s=this.parseCmd(n,i),s||(s=this.parseMidrow(n,i)),s||(s=this.parsePAC(n,i)),s||(s=this.parseBackgroundAttributes(n,i))}else yo(null,null,h);if(!s&&(o=this.parseChars(n,i),o)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+ra([n,i])+" orig: "+ra([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 i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!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 ("+ra([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,i=(e===16||e===24)&&t>=64&&t<=95;if(!(n||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?r=s===1?G0[e]:W0[e]:r=s===1?K0[e]:H0[e];const o=this.channels[s];return o?(o.setPAC(this.interpretPAC(r,t)),this.currentChannel=s,!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,i=null;if(e>=25?(r=2,i=e-8):(r=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+Hl(s)+"' in channel "+r),n=[s]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+ra(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 i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=j0[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}yo(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 yo(a,e,t){t.a=a,t.b=e}function q0(a,e,t){return t.a===a&&t.b===e}function X0(){return{a:null,b:null}}var Jo=function(){if(vn!=null&&vn.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,h){if(typeof h!="string"||!Array.isArray(o))return!1;const c=h.toLowerCase();return~o.indexOf(c)?c:!1}function r(o){return t(a,o)}function n(o){return t(e,o)}function i(o,...h){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const m in p)o[m]=p[m]}return o}function s(o,h,c){const p=this,m={enumerable:!0};p.hasBeenReset=!1;let _="",D=!1,C=o,G=h,z=c,ue=null,fe="",ye=!0,Pe="auto",We="start",dt=50,je="middle",at=50,it="middle";Object.defineProperty(p,"id",i({},m,{get:function(){return _},set:function(Ye){_=""+Ye}})),Object.defineProperty(p,"pauseOnExit",i({},m,{get:function(){return D},set:function(Ye){D=!!Ye}})),Object.defineProperty(p,"startTime",i({},m,{get:function(){return C},set:function(Ye){if(typeof Ye!="number")throw new TypeError("Start time must be set to a number.");C=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},m,{get:function(){return G},set:function(Ye){if(typeof Ye!="number")throw new TypeError("End time must be set to a number.");G=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},m,{get:function(){return z},set:function(Ye){z=""+Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},m,{get:function(){return ue},set:function(Ye){ue=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},m,{get:function(){return fe},set:function(Ye){const Rt=r(Ye);if(Rt===!1)throw new SyntaxError("An invalid or illegal string was specified.");fe=Rt,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},m,{get:function(){return ye},set:function(Ye){ye=!!Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},m,{get:function(){return Pe},set:function(Ye){if(typeof Ye!="number"&&Ye!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Pe=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},m,{get:function(){return We},set:function(Ye){const Rt=n(Ye);if(!Rt)throw new SyntaxError("An invalid or illegal string was specified.");We=Rt,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},m,{get:function(){return dt},set:function(Ye){if(Ye<0||Ye>100)throw new Error("Position must be between 0 and 100.");dt=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},m,{get:function(){return je},set:function(Ye){const Rt=n(Ye);if(!Rt)throw new SyntaxError("An invalid or illegal string was specified.");je=Rt,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},m,{get:function(){return at},set:function(Ye){if(Ye<0||Ye>100)throw new Error("Size must be between 0 and 100.");at=Ye,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},m,{get:function(){return it},set:function(Ye){const Rt=n(Ye);if(!Rt)throw new SyntaxError("An invalid or illegal string was specified.");it=Rt,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class Q0{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Yl(a){function e(r,n,i,s){return(r|0)*3600+(n|0)*60+(i|0)+parseFloat(s||0)}const t=a.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 J0{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 ql(a,e,t,r){const n=r?a.split(r):[a];for(const i in n){if(typeof n[i]!="string")continue;const s=n[i].split(t);if(s.length!==2)continue;const o=s[0],h=s[1];e(o,h)}}const el=new Jo(0,0,""),bo=el.align==="middle"?"middle":"center";function ec(a,e,t){const r=a;function n(){const o=Yl(a);if(o===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),o}function i(o,h){const c=new J0;ql(o,function(_,D){let C;switch(_){case"region":for(let G=t.length-1;G>=0;G--)if(t[G].id===D){c.set(_,t[G].region);break}break;case"vertical":c.alt(_,D,["rl","lr"]);break;case"line":C=D.split(","),c.integer(_,C[0]),c.percent(_,C[0])&&c.set("snapToLines",!1),c.alt(_,C[0],["auto"]),C.length===2&&c.alt("lineAlign",C[1],["start",bo,"end"]);break;case"position":C=D.split(","),c.percent(_,C[0]),C.length===2&&c.alt("positionAlign",C[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(_,D);break;case"align":c.alt(_,D,["start",bo,"end","left","right"]);break}},/:/,/\s/),h.region=c.get("region",null),h.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),h.line=p,h.lineAlign=c.get("lineAlign","start"),h.snapToLines=c.get("snapToLines",!0),h.size=c.get("size",100),h.align=c.get("align",bo);let m=c.get("position","auto");m==="auto"&&el.position===50&&(m=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.position=m}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);a=a.slice(3),s(),e.endTime=n(),s(),i(a,e)}function Xl(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class tc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Q0,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 i=t.buffer,s=0;for(i=Xl(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
`;)++s;const o=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
`&&++s,t.buffer=i.slice(s),o}function n(i){ql(i,function(s,o){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const o=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=r(),t.state){case"HEADER":/:/.test(i)?n(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Jo(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{ec(i,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=i.indexOf("-->")!==-1;if(!i||o&&(s=!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+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){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 rc=/\r\n|\n\r|\n|\r/g,tl=function(e,t,r=0){return e.slice(r,r+t.length)===t},nc=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!I(t)||!I(r)||!I(n)||!I(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*i,t};function rl(a,e,t){return Ua(a.toString())+Ua(e.toString())+Ua(t)}const ic=function(e,t,r){let n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=n.start-i.start,n.new=!1,n=i,i=e[n.prevCC]}e.presentationOffset=r};function sc(a,e,t,r,n,i,s){const o=new tc,h=ct(new Uint8Array(a)).trim().replace(rc,`
|
|
`).split(`
|
|
`),c=[],p=e?ds(e.baseTime,e.timescale):0;let m="00:00.000",_=0,D=0,C,G=!0;o.oncue=function(z){const ue=t[r];let fe=t.ccOffset;const ye=(_-p)/9e4;if(ue!=null&&ue.new&&(D!==void 0?fe=t.ccOffset=ue.start:ic(t,r,ye)),ye){if(!e){C=new Error("Missing initPTS for VTT MPEGTS");return}fe=ye-t.presentationOffset}const Pe=z.endTime-z.startTime,We=Ui((z.startTime+fe-D)*9e4,n*9e4)/9e4;z.startTime=Math.max(We,0),z.endTime=Math.max(We+Pe,0);const dt=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(dt)),z.id||(z.id=rl(z.startTime,z.endTime,dt)),z.endTime>0&&c.push(z)},o.onparsingerror=function(z){C=z},o.onflush=function(){if(C){s(C);return}i(c)},h.forEach(z=>{if(G)if(tl(z,"X-TIMESTAMP-MAP=")){G=!1,z.slice(16).split(",").forEach(ue=>{tl(ue,"LOCAL:")?m=ue.slice(6):tl(ue,"MPEGTS:")&&(_=parseInt(ue.slice(7)))});try{D=nc(m)/1e3}catch(ue){C=ue}return}else z===""&&(G=!1);o.parse(z+`
|
|
`)}),o.flush()}const nl="stpp.ttml.im1t",Ql=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Jl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ac={left:"start",center:"center",right:"end",start:"start",end:"end"};function eu(a,e,t,r){const n=Se(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(o=>ct(o)),s=Zi(e.baseTime,1,e.timescale);try{i.forEach(o=>t(oc(o,s)))}catch(o){r(o)}}function oc(a,e){const n=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((m,_)=>(m[_]=n.getAttribute(`ttp:${_}`)||i[_],m),{}),o=n.getAttribute("xml:space")!=="preserve",h=tu(il(n,"styling","style")),c=tu(il(n,"layout","region")),p=il(n,"body","[begin]");return[].map.call(p,m=>{const _=ru(m,o);if(!_||!m.hasAttribute("begin"))return null;const D=al(m.getAttribute("begin"),s),C=al(m.getAttribute("dur"),s);let G=al(m.getAttribute("end"),s);if(D===null)throw nu(m);if(G===null){if(C===null)throw nu(m);G=D+C}const z=new Jo(D-e,G-e,_);z.id=rl(z.startTime,z.endTime,z.text);const ue=c[m.getAttribute("region")],fe=h[m.getAttribute("style")],ye=lc(ue,fe,h),{textAlign:Pe}=ye;if(Pe){const We=ac[Pe];We&&(z.lineAlign=We),z.align=Pe}return E(z,ye),z}).filter(m=>m!==null)}function il(a,e,t){const r=a.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function ru(a,e){return[].slice.call(a.childNodes).reduce((t,r,n)=>{var i;return r.nodeName==="br"&&n?t+`
|
|
`:(i=r.childNodes)!=null&&i.length?ru(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function lc(a,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(n=t[s]),i.reduce((o,h)=>{const c=sl(e,r,h)||sl(a,r,h)||sl(n,r,h);return c&&(o[h]=c),o},{})}function sl(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function nu(a){return new Error(`Could not parse ttml timestamp ${a}`)}function al(a,e){if(!a)return null;let t=Yl(a);return t===null&&(Ql.test(a)?t=uc(a,e):Jl.test(a)&&(t=cc(a,e))),t}function uc(a,e){const t=Ql.exec(a),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 cc(a,e){const t=Jl.exec(a),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 Eo{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 hc{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=au(),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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Eo(this,"textTrack1"),t=new Eo(this,"textTrack2"),r=new Eo(this,"textTrack3"),n=new Eo(this,"textTrack4");this.cea608Parser1=new Zl(1,e,t),this.cea608Parser2=new Zl(3,r,n)}addCues(e,t,r,n,i){let s=!1;for(let o=i.length;o--;){const h=i[o],c=fc(h[0],h[1],t,r);if(c>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],r),s=!0,c/(r-t)>.5))return}if(s||i.push([t,r]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,r,n)}else{const o=this.Cues.newCue(null,t,r,n);this.hls.trigger(v.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){const{unparsedVttFrags:o}=this;r===ie.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:i,trackId:s}),o.length&&(this.unparsedVttFrags=[],o.forEach(h=>{this.initPTS[h.frag.cc]?this.onFragLoaded(v.FRAG_LOADED,h):this.hls.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(su(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}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:i,languageCode:s}=t[e],o=this.getExistingTrack(i,s);if(o)r[e]=o,ba(r[e]),$l(r[e],n);else{const h=this.createTextTrack("captions",i,s);h&&(h[e]=!0,r[e]=h)}}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(v.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(i=>{ba(n[i]),delete n[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=au(),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++)ba(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(i=>i.textCodec===nl);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(yl(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const s=this.media,o=s?go(s.textTracks):null;if(this.tracks.forEach((h,c)=>{let p;if(o){let m=null;for(let _=0;_<o.length;_++)if(o[_]&&su(o[_],h)){m=o[_],o[_]=null;break}m&&(p=m)}if(p)ba(p);else{const m=iu(h);p=this.createTextTrack(m,h.name,h.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),o!=null&&o.length){const h=o.filter(c=>c!==null).map(c=>c.label);h.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${h.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(v.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}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 i=`textTrack${n[1]}`,s=this.captionsProperties[i];s&&(s.label=r.name,r.lang&&(s.languageCode=r.lang),s.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===ie.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:o}=this,{cc:h,sn:c}=t.frag,p=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(c!==o+1||c===o&&p!==this.lastPartIndex+1||h!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=h,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===ie.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const o=this.tracks[r.level],h=this.vttCCs;h[r.cc]||(h[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),o&&o.textCodec===nl?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;eu(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,o=i.length-1;if(!i[r.cc]&&o===-1){s.push(e);return}const h=this.hls,c=(t=r.initSegment)!=null&&t.data?bt(r.initSegment.data,new Uint8Array(n)).buffer:n;sc(c,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,p=>{this._appendCues(p,r.level),h.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},p=>{const m=p.message==="Missing initPTS for VTT MPEGTS";m?s.push(e):this._fallbackToIMSC1(r,n),h.logger.log(`Failed to parse VTT cue: ${p}`),!(m&&o>r.cc)&&h.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:p})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||eu(t,this.initPTS[e.cc],()=>{r.textCodec=nl,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(i=>Ul(n,i))}else{const n=this.tracks[t];if(!n)return;const i=n.default?"default":"subtitles"+t;r.trigger(v.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===ie.SUBTITLE&&this.onFragLoaded(v.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===ie.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let i=0;i<n.length;i++){const s=n[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(s);this.cea608Parser1.addData(n[i].pts,o[0]),this.cea608Parser2.addData(n[i].pts,o[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:i}){const{media:s}=this;if(!(!s||s.currentTime<r)){if(!i||i==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(h=>Yo(o[h],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(h=>Yo(o[h],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let i=0;i<r;i++){const s=e[n++],o=127&e[n++],h=127&e[n++];if(o===0&&h===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(o),t[p].push(h))}}return t}}function iu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function su(a,e){return!!a&&a.kind===iu(e)&&zo(e,a)}function fc(a,e,t,r){return Math.min(e,r)-Math.max(a,t)}function au(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const dc=/\s/,pc={newCue(a,e,t,r){const n=[];let i,s,o,h,c;const p=self.VTTCue||self.TextTrackCue;for(let _=0;_<r.rows.length;_++)if(i=r.rows[_],o=!0,h=0,c="",!i.isEmpty()){var m;for(let G=0;G<i.chars.length;G++)dc.test(i.chars[G].uchar)&&o?h++:(c+=i.chars[G].uchar,o=!1);i.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const D=Xl(c.trim()),C=rl(e,t,D);a!=null&&(m=a.cues)!=null&&m.getCueById(C)||(s=new p(e,t,D),s.id=C,s.line=_+1,s.align="left",s.position=10+Math.min(80,Math.floor(h*8/32)*10),n.push(s))}return a&&n.length&&(n.sort((_,D)=>_.line==="auto"||D.line==="auto"?0:_.line>8&&D.line>8?D.line-_.line:_.line-D.line),n.forEach(_=>Ul(a,_))),n}};function mc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const gc=/(\d+)-(\d+)\/(\d+)/;class ou{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||bc,this.controller=new self.AbortController,this.stats=new S}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 i=vc(e,this.controller.signal),s=e.responseType==="arraybuffer",o=s?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=h&&I(h)?h:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},t.timeout),(Na(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(m=>{var _;this.response=this.loader=m;const D=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},c-(D-n.loading.start)),!m.ok){const{status:G,statusText:z}=m;throw new Ec(z||"fetch, bad network response",G,m)}n.loading.first=D,n.total=yc(m.headers)||n.total;const C=(_=this.callbacks)==null?void 0:_.onProgress;return C&&I(t.highWaterMark)?this.loadProgressively(m,n,e,t.highWaterMark,C):s?m.arrayBuffer():e.responseType==="json"?m.json():m.text()}).then(m=>{var _,D;const C=this.response;if(!C)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const G=m[o];G&&(n.loaded=n.total=G);const z={url:C.url,data:m,code:C.status},ue=(_=this.callbacks)==null?void 0:_.onProgress;ue&&!I(t.highWaterMark)&&ue(n,e,m,C),(D=this.callbacks)==null||D.onSuccess(z,n,e,C)}).catch(m=>{var _;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const D=m&&m.code||0,C=m?m.message:null;(_=this.callbacks)==null||_.onError({code:D,text:C},e,m?m.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,i){const s=new Aa,o=e.body.getReader(),h=()=>o.read().then(c=>{if(c.done)return s.dataLength&&i(t,r,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,m=p.length;return t.loaded+=m,m<n||s.dataLength?(s.push(p),s.dataLength>=n&&i(t,r,s.flush().buffer,e)):i(t,r,p.buffer,e),h()}).catch(()=>Promise.reject());return h()}}function vc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(E({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function _c(a){const e=gc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function yc(a){const e=a.get("Content-Range");if(e){const r=_c(e);if(I(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function bc(a,e){return new self.Request(a.url,e)}class Ec extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const xc=/^age:\s*[\d.]+\s*$/im;class lu{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 S,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 i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return i(r,t.url)}).catch(s=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),i(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(s=>{var o;(o=this.callbacks)==null||o.onError({code:r.status,text:s.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:i,maxLoadTimeMs:s}=r.loadPolicy;if(n)for(const o in n)e.setRequestHeader(o,n[o]);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=i&&I(i)?i:s,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,i=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const C=p!=null?p:t.response;if(C!=null){var s,o;r.loading.end=Math.max(self.performance.now(),r.loading.first);const G=t.responseType==="arraybuffer"?C.byteLength:C.length;r.loaded=r.total=G,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const z=(s=this.callbacks)==null?void 0:s.onProgress;z&&z(r,e,C,t);const ue={url:t.responseURL,data:C,code:c};(o=this.callbacks)==null||o.onSuccess(ue,r,e,t);return}}const m=i.loadPolicy.errorRetry,_=r.retry,D={url:e.url,data:void 0,code:c};if(Tn(m,_,!1,D))this.retry(m);else{var h;he.error(`${c} while loading ${e.url}`),(h=this.callbacks)==null||h.onError({code:c,text:t.statusText},e,t,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Tn(e,t,!0))this.retry(e);else{var r;he.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=Gr(e,r.retry),r.retry++,he.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&&xc.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 Sc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},wc=T(T({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:lu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Ur,bufferController:Ru,capLevelController:Ko,errorController:gn,fpsController:D0,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:dn,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:Sc},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},Tc()),{},{subtitleStreamController:$0,subtitleTrackController:I0,timelineController:hc,audioStreamController:Tu,audioTrackController:Au,emeController:ya,cmcdController:S0,contentSteeringController:T0,interstitialsController:N0});function Tc(){return{cueHandler:pc,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 Ac(a,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=ol(a),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(s=>{const o=`${s==="level"?"playlist":s}LoadPolicy`,h=e[o]===void 0,c=[];i.forEach(p=>{const m=`${s}Loading${p}`,_=e[m];if(_!==void 0&&h){c.push(m);const D=r[o].default;switch(e[o]={default:D},p){case"TimeOut":D.maxLoadTimeMs=_,D.maxTimeToFirstByteMs=_;break;case"MaxRetry":D.errorRetry.maxNumRetry=_,D.timeoutRetry.maxNumRetry=_;break;case"RetryDelay":D.errorRetry.retryDelayMs=_,D.timeoutRetry.retryDelayMs=_;break;case"MaxRetryTimeout":D.errorRetry.maxRetryDelayMs=_,D.timeoutRetry.maxRetryDelayMs=_;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${o}": ${Ge(e[o])}`)}),T(T({},r),e)}function ol(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(ol):Object.keys(a).reduce((e,t)=>(e[t]=ol(a[t]),e),{}):a}function Dc(a,e){const t=a.loader;t!==ou&&t!==lu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):mc()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const xo=2,Cc=.1,Rc=.05,Ic=100;class Lc extends di{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,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(v.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.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(Ic),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&&(ki(r,"playing",this.onMediaPlaying),ki(r,"waiting",this.onMediaWaiting),ki(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 i=(r=this.hls)==null?void 0:r.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:o}=s,h=this.seeking&&!o,c=!this.seeking&&o,p=s.paused&&!o||s.ended||s.playbackRate===0;if(this.seeking=o,e!==t){t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||h){h&&this.stallResolved(e);return}if(p){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(v.MEDIA_ENDED,{stalled:!1}));return}if(!Or.getBuffered(s).length){this.nudgeRetry=0;return}const m=Or.bufferInfo(s,e,0),_=m.nextStart||0,D=this.fragmentTracker;if(o&&D&&this.hls){const dt=uu(this.hls.inFlightFragments,e),je=m.len>xo,at=!_||dt||_-e>xo&&!D.getPartialFragment(e);if(je||at)return;this.moved=!1}const C=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&D){if(!(m.len>0)&&!_)return;const je=Math.max(_,m.start||0)-e,it=!!(C!=null&&C.live)?C.targetduration*2:xo,Ye=So(e,D);if(je>0&&(je<=it||Ye)){s.paused||this._trySkipBufferHole(Ye);return}}const G=i.detectStallWithCurrentTimeMs,z=self.performance.now(),ue=this.waiting;let fe=this.stalled;if(fe===null)if(ue>0&&z-ue<G)fe=this.stalled=ue;else{this.stalled=z;return}const ye=z-fe;if(!o&&(ye>=G||ue)&&this.hls){var Pe;if(((Pe=this.mediaSource)==null?void 0:Pe.readyState)==="ended"&&!(C!=null&&C.live)&&Math.abs(e-((C==null?void 0:C.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(v.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(m),!this.media||!this.hls)return}const We=Or.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(We,ye,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(v.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 i=Or.bufferedInfo(Or.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=Or.timeRangesToArray(n),o=Or.bufferedInfo(s,t,0).bufferedIndex;if(o>-1&&o<s.length-1){const h=Or.bufferedInfo(s,e,0).bufferedIndex,c=s[o].end,p=s[o+1].start;if((h===-1||h>o)&&p-c<1&&e-c<2){const m=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${h}`);this.warn(m.message),this.media.currentTime+=1e-6;let _=So(e,this.fragmentTracker);_&&"fragment"in _?_=_.fragment:_||(_=void 0);const D=Or.bufferInfo(this.media,e,0);this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:m,reason:m.message,frag:_,buffer:D.len,bufferInfo:D})}}}}}_tryFixBufferStall(e,t,r){var n,i;const{fragmentTracker:s,media:o}=this,h=(n=this.hls)==null?void 0:n.config;if(!o||!s||!h)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=So(r,s);if((p||c!=null&&c.live&&r<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const m=e.buffered,_=this.adjacentTraversal(e,r);(m&&m.length>1&&e.len>h.maxBufferHole||e.nextStart&&(e.nextStart-r<h.maxBufferHole||_))&&(t>h.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 i=r.getFragAtPos(t,ie.MAIN),s=r.getFragAtPos(n,ie.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:r,stallReported:n,stalled:i}=this;if(!n&&i!==null&&r&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${Ge(e)})`);this.warn(s.message),t.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:r,media:n}=this,i=(t=this.hls)==null?void 0:t.config;if(!n||!r||!i)return 0;const s=n.currentTime,o=Or.bufferInfo(n,s,0),h=s<o.start?o.start:o.nextStart;if(h&&this.hls){const p=o.len<=i.maxBufferHole,m=o.len>0&&o.len<1&&n.readyState<3,_=h-s;if(_>0&&(p||m)){if(_>i.maxBufferHole){let C=!1;if(s===0){const G=r.getAppendedFrag(0,ie.MAIN);G&&h<G.end&&(C=!0)}if(!C&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,h))return 0;let z=!1,ue=e.end;for(;ue<h;){const fe=So(ue,r);if(fe)ue+=fe.duration;else{z=!0;break}}if(z)return 0}}const D=Math.max(h+Rc,s+Cc);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${D}`),this.moved=!0,n.currentTime=D,!(e!=null&&e.gap)){const C=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${D}`),G={type:_e.MEDIA_ERROR,details:Z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:C,reason:C.message,buffer:o.len,bufferInfo:o};e&&("fragment"in e?G.part=e:G.frag=e),this.hls.trigger(v.ERROR,G)}return D}}return 0}_tryNudgeBuffer(e){const{hls:t,media:r,nudgeRetry:n}=this,i=t==null?void 0:t.config;if(!r||!i)return 0;const s=r.currentTime;if(this.nudgeRetry++,n<i.nudgeMaxRetry){const o=s+(n+1)*i.nudgeOffset,h=new Error(`Nudging 'currentTime' from ${s} to ${o}`);this.warn(h.message),r.currentTime=o,t.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_NUDGE_ON_STALL,error:h,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function uu(a,e){const t=cu(a.main);if(t&&t.start<=e)return t;const r=cu(a.audio);return r&&r.start<=e?r:null}function cu(a){if(!a)return null;switch(a.state){case Tt.IDLE:case Tt.STOPPED:case Tt.ENDED:case Tt.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,ie.MAIN)||e.getPartialFragment(a)}const kc=.25;function ll(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ul(a,e,t,r,n){let i=new a(e,t,"");try{i.value=r,n&&(i.type=n)}catch(s){i=new a(e,t,Ge(n?T({type:n},r):r))}return i}const wo=(()=>{const a=ll();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Pc{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(v.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&&(e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.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(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ba(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 $l(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:r,enableID3MetadataCues:n}=this.hls.config;if(!r&&!n)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=ll();if(s)for(let o=0;o<i.length;o++){const h=i[o].type;if(h===Di.emsg&&!r||!n)continue;const c=Ma(i[o].data),p=i[o].pts;let m=p+i[o].duration;m>wo&&(m=wo),m-p<=0&&(m=p+kc);for(let D=0;D<c.length;D++){const C=c[D];if(!no(C)){this.updateId3CueEnds(p,h);const G=ul(s,p,m,C,h);G&&this.id3Track.addCue(G)}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let i=n.length;i--;){const s=n[i];s.type===t&&s.startTime<e&&s.endTime===wo&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:h}}=s;if(i&&(o||h)){let c;n==="audio"?c=p=>p.type===Di.audioId3&&h:n==="video"?c=p=>p.type===Di.emsg&&o:c=p=>p.type===Di.audioId3&&h||p.type===Di.emsg&&o,Yo(i,t,r,c)}}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.hls||!this.media)return;const{assetPlayerId:r,timelineOffset:n,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const o=ll();if(r&&n&&!s){const{fragmentStart:G,fragmentEnd:z}=e;let ue=this.assetCue;ue?(ue.startTime=G,ue.endTime=z):o&&(ue=this.assetCue=ul(o,G,z,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),ue&&(ue.id=r,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(ue),ue.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:h}=this,{dateRanges:c}=e,p=Object.keys(c);let m=this.dateRangeCuesAppended;if(h&&t){var _;if((_=h.cues)!=null&&_.length){const G=Object.keys(m).filter(z=>!p.includes(z));for(let z=G.length;z--;){var D;const ue=G[z],fe=(D=m[ue])==null?void 0:D.cues;delete m[ue],fe&&Object.keys(fe).forEach(ye=>{const Pe=fe[ye];if(Pe){Pe.removeEventListener("enter",this.onEventCueEnter);try{h.removeCue(Pe)}catch(We){}}})}}else m=this.dateRangeCuesAppended={}}const C=e.fragments[e.fragments.length-1];if(!(p.length===0||!I(C==null?void 0:C.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let G=0;G<p.length;G++){const z=p[G],ue=c[z],fe=ue.startTime,ye=m[z],Pe=(ye==null?void 0:ye.cues)||{};let We=(ye==null?void 0:ye.durationKnown)||!1,dt=wo;const{duration:je,endDate:at}=ue;if(at&&je!==null)dt=fe+je,We=!0;else if(ue.endOnNext&&!We){const Ye=p.reduce((Rt,ur)=>{if(ur!==ue.id){const wr=c[ur];if(wr.class===ue.class&&wr.startDate>ue.startDate&&(!Rt||ue.startDate<Rt.startDate))return wr}return Rt},null);Ye&&(dt=Ye.startTime,We=!0)}const it=Object.keys(ue.attr);for(let Ye=0;Ye<it.length;Ye++){const Rt=it[Ye];if(!gi(Rt))continue;const ur=Pe[Rt];if(ur)We&&!(ye!=null&&ye.durationKnown)?ur.endTime=dt:Math.abs(ur.startTime-fe)>.01&&(ur.startTime=fe,ur.endTime=dt);else if(o){let wr=ue.attr[Rt];ri(Rt)&&(wr=j(wr));const Tr=ul(o,fe,dt,{key:Rt,data:wr},Di.dateRange);Tr&&(Tr.id=z,this.id3Track.addCue(Tr),Pe[Rt]=Tr,s&&(Rt==="X-ASSET-LIST"||Rt==="X-ASSET-URL")&&Tr.addEventListener("enter",this.onEventCueEnter))}}m[z]={cues:Pe,dateRange:ue,durationKnown:We}}}}}class Oc{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:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!r.live)return;const o=this.targetLatency;if(o===null)return;const h=n-o,c=Math.min(this.maxLatency,o+r.targetduration);if(h<c&&h>.05&&this.forwardBufferLength>1){const m=Math.min(2,Math.max(1,s)),_=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20,D=Math.min(m,Math.max(1,_));this.changeMediaPlaybackRate(t,D)}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:i,liveSyncDurationCount:s,lowLatencyMode:o}=this.config,h=this.hls.userConfig;let c=o&&r||t;(this._targetLatencyUpdated||h.liveSyncDuration||h.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*n);const p=n;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,p)}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,i=e-t-this.edgeStalled,s=n-r.totalduration,o=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),o)}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(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.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===Z.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 Mc extends Uo{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.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=[],i={},s={};let o=!1,h=!1,c=!1;t.levels.forEach(p=>{const m=p.attrs;let{audioCodec:_,videoCodec:D}=p;_&&(p.audioCodec=_=de(_,r)||void 0),D&&(D=p.videoCodec=cn(D));const{width:C,height:G,unknownCodecs:z}=p,ue=(z==null?void 0:z.length)||0;if(o||(o=!!(C&&G)),h||(h=!!D),c||(c=!!_),ue||_&&!this.isAudioSupported(_)||D&&!this.isVideoSupported(D)){this.log(`Some or all CODECS not supported "${m.CODECS}"`);return}const{CODECS:fe,"FRAME-RATE":ye,"HDCP-LEVEL":Pe,"PATHWAY-ID":We,RESOLUTION:dt,"VIDEO-RANGE":je}=m,it=`${`${We||"."}-`}${p.bitrate}-${dt}-${ye}-${fe}-${je}-${Pe}`;if(i[it])if(i[it].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Ye=s[it]+=1;p.attrs["PATHWAY-ID"]=new Array(Ye+1).join(".");const Rt=this.createLevel(p);i[it]=Rt,n.push(Rt)}else i[it].addGroupId("audio",m.AUDIO),i[it].addGroupId("text",m.SUBTITLES);else{const Ye=this.createLevel(p);i[it]=Ye,s[it]=1,n.push(Ye)}}),this.filterAndSortMediaOptions(n,t,o,h,c)}createLevel(e){const t=new Qr(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=$t(n,[])}return t}isAudioSupported(e){return Te(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Te(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,i){var s;let o=[],h=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((r||n)&&i&&(c=c.filter(({videoCodec:fe,videoRange:ye,width:Pe,height:We})=>(!!fe||!!(Pe&&We))&&hr(ye))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let fe="no level with compatible codecs found in manifest",ye=fe;t.levels.length&&(ye=`one or more CODECS in variant not supported: ${Ge(t.levels.map(We=>We.attrs.CODECS).filter((We,dt,je)=>je.indexOf(We)===dt))}`,this.warn(ye),fe+=` (${ye})`);const Pe=new Error(fe);this.hls.trigger(v.ERROR,{type:_e.MEDIA_ERROR,details:Z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Pe,reason:ye})}}),p.end=performance.now();return}t.audioTracks&&(o=t.audioTracks.filter(fe=>!fe.audioCodec||this.isAudioSupported(fe.audioCodec)),hu(o)),t.subtitles&&(h=t.subtitles,hu(h));const m=c.slice(0);c.sort((fe,ye)=>{if(fe.attrs["HDCP-LEVEL"]!==ye.attrs["HDCP-LEVEL"])return(fe.attrs["HDCP-LEVEL"]||"")>(ye.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&fe.height!==ye.height)return fe.height-ye.height;if(fe.frameRate!==ye.frameRate)return fe.frameRate-ye.frameRate;if(fe.videoRange!==ye.videoRange)return Ht.indexOf(fe.videoRange)-Ht.indexOf(ye.videoRange);if(fe.videoCodec!==ye.videoCodec){const Pe=J(fe.videoCodec),We=J(ye.videoCodec);if(Pe!==We)return We-Pe}if(fe.uri===ye.uri&&fe.codecSet!==ye.codecSet){const Pe=Ee(fe.codecSet),We=Ee(ye.codecSet);if(Pe!==We)return We-Pe}return fe.averageBitrate!==ye.averageBitrate?fe.averageBitrate-ye.averageBitrate:0});let _=m[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==m.length)){for(let fe=0;fe<m.length;fe++)if(m[fe].pathwayId===c[0].pathwayId){_=m[fe];break}}this._levels=c;for(let fe=0;fe<c.length;fe++)if(c[fe]===_){var D;this._firstLevel=fe;const ye=_.bitrate,Pe=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${ye}`),((D=this.hls.userConfig)==null?void 0:D.abrEwmaDefaultEstimate)===void 0){const We=Math.min(ye,this.hls.config.abrEwmaDefaultEstimateMax);We>Pe&&Pe===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=We)}break}const C=i&&!n,G=this.hls.config,z=!!(G.audioStreamController&&G.audioTrackController),ue={levels:c,audioTracks:o,subtitleTracks:h,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:z&&!C&&o.some(fe=>!!fe.url)};p.end=performance.now(),this.hls.trigger(v.MANIFEST_PARSED,ue)}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 p=new Error("invalid level idx"),m=e<0;if(this.hls.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.LEVEL_SWITCH_ERROR,level:e,fatal:m,error:p,reason:p.message}),m)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,i=n?n.attrs["PATHWAY-ID"]:void 0,s=t[e],o=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&n&&i===o)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${o?" with Pathway "+o:""} from level ${r}${i?" with Pathway "+i:""}`);const h={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(v.LEVEL_SWITCHING,h);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,n==null?void 0:n.details,c);this.loadPlaylist(p)}}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===me.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ie.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(i=>!!r[i]))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:i}=t,s=t.levelInfo;if(!s){var o;this.warn(`Invalid level index ${n}`),(o=t.deliveryDirectives)!=null&&o.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let h=s.details;h===t.details&&h.advanced&&(h=void 0),this.playlistLoaded(n,t,h)}else(r=t.deliveryDirectives)!=null&&r.skip&&(i.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,i=e.attrs["PATHWAY-ID"],s=e.details,o=s==null?void 0:s.age;this.log(`Loading level index ${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${r}`),this.hls.trigger(v.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((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(o=>o.level=-1)),!1));Ti(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(v.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(v.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function hu(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function fu(){return self.SourceBuffer||self.WebKitSourceBuffer}function du(){if(!Me())return!1;const e=fu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Bc(){if(!du())return!1;const a=Me();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(K(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(K(e,"audio"))))}function Fc(){var a;const e=fu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Nc=100;class $c extends Zs{constructor(e,t,r){super(e,t,r,"stream-controller",ie.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,i=n?n.currentTime:null;if(i===null||!I(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(n,i,ie.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.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(Nc),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.firstAutoLevel),n.nextLoadLevel=i,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=Tt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Tt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Tt.WAITING_LEVEL:{const{levels:e,level:t}=this,r=e==null?void 0:e[t],n=r==null?void 0:r.details;if(n&&(!n.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(n))break;this.state=Tt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Tt.IDLE;break}break}case Tt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Tt.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 i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[i]))return;const s=r[i],o=this.getMainFwdBufferInfo();if(o===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(o,h)){const G={};this.altAudio===2&&(G.type="video"),this.hls.trigger(v.BUFFER_EOS,G),this.state=Tt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const c=s.details;if(!c||this.state===Tt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Tt.WAITING_LEVEL,this.startFragRequested=!1;return}const p=o.len,m=this.getMaxBufferLength(s.maxBitrate);if(p>=m)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const _=this.backtrackFragment?this.backtrackFragment.start:o.end;let D=this.getNextFragment(_,c);if(this.couldBacktrack&&!this.fragPrevious&&D&&He(D)&&this.fragmentTracker.getState(D)!==on.OK){var C;const z=((C=this.backtrackFragment)!=null?C:D).sn-c.startSN,ue=c.fragments[z-1];ue&&D.cc===ue.cc&&(D=ue,this.fragmentTracker.removeFragment(ue))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(D&&this.isLoopLoading(D,_)){if(!D.gap){const z=this.audioOnly&&!this.altAudio?V.AUDIO:V.VIDEO,ue=(z===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ue&&this.afterBufferFlushed(ue,z,ie.MAIN)}D=this.getNextFragmentLoopLoading(D,c,o,ie.MAIN,m)}D&&(D.initSegment&&!D.initSegment.data&&!this.bitrateTest&&(D=D.initSegment),this.loadFragment(D,s,_))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===on.NOT_LOADED||n===on.PARTIAL?He(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,ie.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 i=this.getLevelDetails();if(i!=null&&i.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<i.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,h=e[o],c=this.fragLastKbps;c&&this.fragCurrent?r=this.fragCurrent.duration*h.maxBitrate/(1e3*c)+1:r=0}else r=0;const s=this.getBufferedFrag(t.currentTime+r);if(s){const o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();const h=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,p=Math.max(s.end,h+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,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 Tt.KEY_LOADING:case Tt.FRAG_LOADING:case Tt.FRAG_LOADING_WAITING_RETRY:case Tt.PARSING:case Tt.PARSED:this.state=Tt.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&&(ki(r,"playing",this.onMediaPlaying),ki(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(v.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;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(r=r||s.indexOf("mp4a.40.2")!==-1,n=n||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=r&&n&&!Fc(),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!==Tt.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=Tt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:i}=this,s=t.level,o=t.details,h=o.totalduration;if(!n){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${h}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Tt.FRAG_LOADING||this.state===Tt.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let m=0;if(o.live||(r=c.details)!=null&&r.live){var _;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;m=this.alignPlaylists(o,c.details,(_=this.levelLastLoaded)==null?void 0:_.details)}if(c.details=o,this.levelLastLoaded=c,i||this.setStartPosition(o,m),this.hls.trigger(v.LEVEL_UPDATED,{details:o,level:s}),this.state===Tt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=Tt.IDLE}i&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,o=e.edge,h=i>=s-t.maxFragLookUpTolerance&&i<=o;if(n!==null&&r.duration>n&&(i<n||!h)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!h&&r.readyState<4||i<o-p)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),r.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${n.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const m=Or.bufferInfo(r,n,0);if(!((c=m.buffered)!=null&&c.length)){r.currentTime=n;return}if(m.start<=i){r.currentTime=n;return}const{nextStart:D}=Or.bufferedInfo(m.buffered,i,0);D&&(r.currentTime=D)}else r.currentTime=n}}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const o=s[r.level];if(!o){this.warn(`Level ${r.level} not found on progress`);return}const h=o.details;if(!h){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const c=o.videoCodec,p=h.PTSKnown||!h.live,m=(t=r.initSegment)==null?void 0:t.data,_=this._getAudioCodec(o),D=this.transmuxer=this.transmuxer||new vl(this.hls,ie.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),C=n?n.index:-1,G=C!==-1,z=new pi(r.level,r.sn,r.stats.chunkCount,i.byteLength,C,G),ue=this.initPTS[r.cc];D.push(i,m,_,c,r,n,h.totalduration,p,z,ue)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio!==0;if($r(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 s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n){this.altAudio=0,this.fragmentTracker.removeAllFragments(),r.once(v.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(v.AUDIO_TRACK_SWITCHED,t)}),r.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(v.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=$r(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,i,s=!1;for(const o in r){const h=r[o];if(h.id==="main"){if(i=o,n=h,o==="video"){const c=r[o];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&n?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t,i=r.type===ie.MAIN;if(i){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===Tt.PARSED&&(this.state=Tt.IDLE);return}const o=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),He(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const s=this.media;s&&(!this._hasEnoughToStart&&Or.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var r;if(t.fatal){this.state=Tt.ERROR;return}switch(t.details){case Z.FRAG_GAP:case Z.FRAG_PARSING_ERROR:case Z.FRAG_DECRYPT_ERROR:case Z.FRAG_LOAD_ERROR:case Z.FRAG_LOAD_TIMEOUT:case Z.KEY_LOAD_ERROR:case Z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.MAIN,t);break;case Z.LEVEL_LOAD_ERROR:case Z.LEVEL_LOAD_TIMEOUT:case Z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Tt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===me.LEVEL&&(this.state=Tt.IDLE);break;case Z.BUFFER_ADD_CODEC_ERROR:case Z.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case Z.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case Z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Tt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==V.AUDIO||!this.altAudio){const r=(t===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,ie.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 i=this.getLevelDetails(),s=Or.getBuffered(e),o=s.length?s.start(0):0,h=o-r,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||h>0&&(h<c||this.loadingParts&&h<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${h} to match buffer start`),r+=h,this.startPosition=r),t<r&&(this.log(`seek to target start position ${r} from current time ${t} buffer start ${o}`),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,i=r==null?void 0:r.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Tt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),n.trigger(v.FRAG_LOADED,r),i.bitrateTest=!1}).catch(r=>{this.state===Tt.STOPPED||this.state===Tt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:r}=this,{remuxResult:n,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:o,part:h,level:c}=s,{video:p,text:m,id3:_,initSegment:D}=n,{details:C}=c,G=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o)){this.fragmentTracker.removeFragment(o);return}if(this.state=Tt.PARSING,D){const z=D.tracks;if(z){const Pe=o.initSegment||o;if(this.unhandledEncryptionError(D,o))return;this._bufferInitSegment(c,z,Pe,i),r.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:Pe,id:t,tracks:z})}const ue=D.initPTS,fe=D.timescale,ye=this.initPTS[o.cc];if(I(ue)&&(!ye||ye.baseTime!==ue||ye.timescale!==fe)){const Pe=D.trackId;this.initPTS[o.cc]={baseTime:ue,timescale:fe,trackId:Pe},r.trigger(v.INIT_PTS_FOUND,{frag:o,id:t,initPTS:ue,timescale:fe,trackId:Pe})}}if(p&&C){G&&p.type==="audiovideo"&&this.logMuxedErr(o);const z=C.fragments[o.sn-1-C.startSN],ue=o.sn===C.startSN,fe=!z||o.cc>z.cc;if(n.independent!==!1){const{startPTS:ye,endPTS:Pe,startDTS:We,endDTS:dt}=p;if(h)h.elementaryStreams[p.type]={startPTS:ye,endPTS:Pe,startDTS:We,endDTS:dt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!fe&&(this.couldBacktrack=!0),p.dropped&&p.independent){const je=this.getMainFwdBufferInfo(),at=(je?je.end:this.getLoadPosition())+this.config.maxBufferHole,it=p.firstKeyFramePTS?p.firstKeyFramePTS:ye;if(!ue&&at<it-this.config.maxBufferHole&&!fe){this.backtrack(o);return}else fe&&(o.gap=!0);o.setElementaryStreamInfo(p.type,o.start,Pe,o.start,dt,!0)}else ue&&ye-(C.appliedTimelineOffset||0)>xo&&(o.gap=!0);o.setElementaryStreamInfo(p.type,ye,Pe,We,dt),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(p,o,h,i,ue||fe)}else if(ue||fe)o.gap=!0;else{this.backtrack(o);return}}if(G){const{startPTS:z,endPTS:ue,startDTS:fe,endDTS:ye}=G;h&&(h.elementaryStreams[V.AUDIO]={startPTS:z,endPTS:ue,startDTS:fe,endDTS:ye}),o.setElementaryStreamInfo(V.AUDIO,z,ue,fe,ye),this.bufferFragmentData(G,o,h,i)}if(C&&_!=null&&_.samples.length){const z={id:t,frag:o,details:C,samples:_.samples};r.trigger(v.FRAG_PARSING_METADATA,z)}if(C&&m){const z={id:t,frag:o,details:C,samples:m.samples};r.trigger(v.FRAG_PARSING_USERDATA,z)}}logMuxedErr(e){this.warn(`${He(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,r,n){if(this.state!==Tt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(r));const{audio:i,video:s,audiovideo:o}=t;if(i){const c=e.audioCodec;let p=Xt(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const m=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const _=i.metadata;_&&"channelCount"in _&&(_.channelCount||1)!==1&&m.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&m.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(p="mp4a.40.2",this.log(`Android: force audio codec to ${p}`)),c&&c!==p&&this.log(`Swapping manifest audio codec "${c}" for "${p}"`),i.levelCodec=p,i.id=ie.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${p||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=ie.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const h=Object.keys(t);if(h.length){if(this.hls.trigger(v.BUFFER_CODECS,t),!this.hls)return;h.forEach(c=>{const m=t[c].initSegment;m!=null&&m.byteLength&&this.hls.trigger(v.BUFFER_APPENDING,{type:c,data:m,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,ie.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=Tt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(Or.isBuffered(e,r)?t=this.getAppendedFrag(r):Or.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,i=t.level;(!n||t.sn!==n.sn||n.level!==i)&&(this.fragPlaying=t,this.hls.trigger(v.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(v.LEVEL_SWITCHED,{level:i}))}}}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 I(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(I(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?Vr(null,r.fragments,t):null);if(n){const i=n.programDateTime;if(i!==null){const s=i+(t-n.start)*1e3;return new Date(s)}}}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 Uc extends Y{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyIdToKeyInfo){const n=this.keyIdToKeyInfo[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.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=Z.KEY_LOAD_ERROR,r,n,i){return new Hr({type:_e.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:r,networkDetails:n})}loadClear(e,t,r){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let n=0,i=t.length;n<i;n++){const s=t[n];if(e.cc<=s.cc&&(!He(e)||!He(s)||e.sn<s.sn)||!r&&n==i-1)return this.emeController.selectKeySystemFormat(s).then(o=>{if(!this.emeController)return;s.setKeyFormat(o);const h=xi(o);if(h)return this.emeController.getKeySystemAccess([h])})}if(this.config.requireKeySystemAccessOnStart){const n=Ii(this.config);if(n.length)return this.emeController.getKeySystemAccess(n)}}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 i=e.decryptdata;if(!i){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,Z.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,Z.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const o=cl(i);let h=this.keyIdToKeyInfo[o];if((r=h)!=null&&r.decryptdata.key)return i.key=h.decryptdata.key,Promise.resolve({frag:e,keyInfo:h});if(this.emeController&&(n=h)!=null&&n.keyLoadPromise)switch(this.emeController.getKeyStatus(h.decryptdata)){case"usable":case"usable-in-future":return h.keyLoadPromise.then(p=>{const{keyInfo:m}=p;return i.key=m.decryptdata.key,{frag:e,keyInfo:m}})}switch(this.log(`${this.keyIdToKeyInfo[o]?"Rel":"L"}oading${i.keyId?" keyId: "+ae(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),h=this.keyIdToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(h,e):this.loadKeyEME(h,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(h,e);default:return Promise.reject(this.createKeyLoadError(e,Z.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var n;if(!e.decryptdata.keyId&&(n=t.initSegment)!=null&&n.data){const s=Ot(t.initSegment.data);if(s.length){let o=s[0];o.some(h=>h!==0)?(this.log(`Using keyId found in init segment ${ae(o)}`),si.setKeyIdForUri(e.decryptdata.uri,o)):(o=si.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${ae(o)}`)),e.decryptdata.keyId=o}}if(!e.decryptdata.keyId&&!He(t))return Promise.resolve(r);const i=this.emeController.loadKey(r);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,r))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,i=new n(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,o)=>{const h={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=r.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(_,D,C,G)=>{const{frag:z,keyInfo:ue}=C,fe=cl(ue.decryptdata);if(!z.decryptdata||ue!==this.keyIdToKeyInfo[fe])return o(this.createKeyLoadError(z,Z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),G));ue.decryptdata.key=z.decryptdata.key=new Uint8Array(_.data),z.keyLoader=null,ue.loader=null,s({frag:z,keyInfo:ue})},onError:(_,D,C,G)=>{this.resetLoader(D),o(this.createKeyLoadError(t,Z.KEY_LOAD_ERROR,new Error(`HTTP Error ${_.code} loading key ${_.text}`),C,T({url:h.url,data:void 0},_)))},onTimeout:(_,D,C)=>{this.resetLoader(D),o(this.createKeyLoadError(t,Z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),C))},onAbort:(_,D,C)=>{this.resetLoader(D),o(this.createKeyLoadError(t,Z.INTERNAL_ABORTED,new Error("key loading aborted"),C))}};i.load(h,p,m)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,i=r.loader;t.keyLoader===i&&(t.keyLoader=null,r.loader=null);const s=cl(r.decryptdata)||n;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==qr.FAIRPLAY){const e=a.keyId;if(e)return ae(e)}return a.uri}function pu(a){const{type:e}=a;switch(e){case me.AUDIO_TRACK:return ie.AUDIO;case me.SUBTITLE_TRACK:return ie.SUBTITLE;default:return ie.MAIN}}function hl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class zc{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,i=r||n,s=new i(t);return this.loaders[e.type]=s,s}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:me.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:o,levelInfo:h}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:me.LEVEL,url:s,deliveryDirectives:o,levelOrTrack:h})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:o}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:me.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:o}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:me.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onLevelsUpdated(e,t){const r=this.loaders[me.LEVEL];if(r){const n=r.context;n&&!t.levels.some(i=>i===n.levelOrTrack)&&(r.abort(),delete this.loaders[me.LEVEL])}}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const c=this.hls.logger,p=n.context;if(p&&p.levelOrTrack===e.levelOrTrack&&(p.url===e.url||p.deliveryDirectives&&!e.deliveryDirectives)){p.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${p.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===me.MANIFEST?i=r.manifestLoadPolicy.default:i=E({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),I((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===me.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===me.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===me.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,m=c.targetduration;if(p&&m){const _=Math.max(p*3,m*.8)*1e3;i=E({},i,{maxTimeToFirstByteMs:Math.min(_,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(_,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},h={onSuccess:(c,p,m,_)=>{const D=this.getInternalLoader(m);this.resetInternalLoader(m.type);const C=c.data;p.parsing.start=performance.now(),Ni.isMediaPlaylist(C)||m.type!==me.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,m,_||null,D):this.handleMasterPlaylist(c,p,m,_)},onError:(c,p,m,_)=>{this.handleNetworkError(p,m,!1,c,_)},onTimeout:(c,p,m)=>{this.handleNetworkError(p,m,!0,void 0,c)}};n.load(e,o,h)}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 i=this.hls,s=e.data,o=hl(e,r),h=Ni.parseMasterPlaylist(s,o);if(h.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,r,h.playlistParsingError,n,t);return}const{contentSteering:c,levels:p,sessionData:m,sessionKeys:_,startTimeOffset:D,variableList:C}=h;this.variableList=C,p.forEach(fe=>{const{unknownCodecs:ye}=fe;if(ye){const{preferManagedMediaSource:Pe}=this.hls.config;let{audioCodec:We,videoCodec:dt}=fe;for(let je=ye.length;je--;){const at=ye[je];Te(at,"audio",Pe)?(fe.audioCodec=We=We?`${We},${at}`:at,Zt.audio[We.substring(0,4)]=2,ye.splice(je,1)):Te(at,"video",Pe)&&(fe.videoCodec=dt=dt?`${dt},${at}`:at,Zt.video[dt.substring(0,4)]=2,ye.splice(je,1))}}});const{AUDIO:G=[],SUBTITLES:z,"CLOSED-CAPTIONS":ue}=Ni.parseMasterPlaylistMedia(s,o,h);G.length&&!G.some(ye=>!ye.url)&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),G.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new kr({}),bitrate:0,url:""})),i.trigger(v.MANIFEST_LOADED,{levels:p,audioTracks:G,subtitles:z,captions:ue,contentSteering:c,url:o,stats:t,networkDetails:n,sessionData:m,sessionKeys:_,startTimeOffset:D,variableList:C})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:o,level:h,type:c}=r,p=hl(e,r),m=I(h)?h:I(o)?o:0,_=pu(r),D=Ni.parseLevelPlaylist(e.data,p,m,_,0,this.variableList);if(c===me.MANIFEST){const C={attrs:new kr({}),bitrate:0,details:D,name:"",url:p};D.requestScheduled=t.loading.start+Sn(D,0),s.trigger(v.MANIFEST_LOADED,{levels:[C],audioTracks:[],url:p,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=D,this.handlePlaylistLoaded(D,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(v.ERROR,{type:_e.NETWORK_ERROR,details:Z.MANIFEST_PARSING_ERROR,fatal:t.type===me.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:i})}handleNetworkError(e,t,r=!1,n,i){let s=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===me.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===me.AUDIO_TRACK||e.type===me.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let h=Z.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case me.MANIFEST:h=r?Z.MANIFEST_LOAD_TIMEOUT:Z.MANIFEST_LOAD_ERROR,c=!0;break;case me.LEVEL:h=r?Z.LEVEL_LOAD_TIMEOUT:Z.LEVEL_LOAD_ERROR,c=!1;break;case me.AUDIO_TRACK:h=r?Z.AUDIO_TRACK_LOAD_TIMEOUT:Z.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case me.SUBTITLE_TRACK:h=r?Z.SUBTITLE_TRACK_LOAD_TIMEOUT:Z.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const m={type:_e.NETWORK_ERROR,details:h,fatal:c,url:e.url,loader:p,context:e,error:o,networkDetails:t,stats:i};if(n){const _=(t==null?void 0:t.url)||e.url;m.response=T({url:_,data:void 0},n)}this.hls.trigger(v.ERROR,m)}handlePlaylistLoaded(e,t,r,n,i,s){const o=this.hls,{type:h,level:c,levelOrTrack:p,id:m,groupId:_,deliveryDirectives:D}=n,C=hl(t,n),G=pu(n);let z=typeof n.level=="number"&&G===ie.MAIN?c:void 0;const ue=e.playlistParsingError;if(ue){if(this.hls.logger.warn(`${ue} ${e.url}`),!o.config.ignorePlaylistParsingErrors){o.trigger(v.ERROR,{type:_e.NETWORK_ERROR,details:Z.LEVEL_PARSING_ERROR,fatal:!1,url:C,error:ue,reason:ue.message,response:t,context:n,level:z,parent:G,networkDetails:i,stats:r});return}e.playlistParsingError=null}if(!e.fragments.length){const fe=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(v.ERROR,{type:_e.NETWORK_ERROR,details:Z.LEVEL_EMPTY_ERROR,fatal:!1,url:C,error:fe,reason:fe.message,response:t,context:n,level:z,parent:G,networkDetails:i,stats:r});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),h){case me.MANIFEST:case me.LEVEL:if(z){if(!p)z=0;else if(p!==o.levels[z]){const fe=o.levels.indexOf(p);fe>-1&&(z=fe)}}o.trigger(v.LEVEL_LOADED,{details:e,levelInfo:p||o.levels[0],level:z||0,id:m||0,stats:r,networkDetails:i,deliveryDirectives:D,withoutMultiVariant:h===me.MANIFEST});break;case me.AUDIO_TRACK:o.trigger(v.AUDIO_TRACK_LOADED,{details:e,track:p,id:m||0,groupId:_||"",stats:r,networkDetails:i,deliveryDirectives:D});break;case me.SUBTITLE_TRACK:o.trigger(v.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:m||0,groupId:_||"",stats:r,networkDetails:i,deliveryDirectives:D});break}}}class zs{static get version(){return Ys}static isMSESupported(){return du()}static isSupported(){return Bc()}static getMediaSource(){return Me()}static get Events(){return v}static get MetadataSchema(){return Di}static get ErrorTypes(){return _e}static get ErrorDetails(){return Z}static get DefaultConfig(){return zs.defaultConfig?zs.defaultConfig:wc}static set DefaultConfig(e){zs.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 ha,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=De(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=Ac(zs.DefaultConfig,e,t);this.userConfig=e,r.progressive&&Dc(r,t);const{abrController:n,bufferController:i,capLevelController:s,errorController:o,fpsController:h}=r,c=new o(this),p=this.abrController=new n(this),m=new Ei(this),_=r.interstitialsController,D=_?this.interstitialsController=new _(this,zs):null,C=this.bufferController=new i(this,m),G=this.capLevelController=new s(this),z=new h(this),ue=new zc(this),fe=r.contentSteeringController,ye=fe?new fe(this):null,Pe=this.levelController=new Mc(this,ye),We=new Pc(this),dt=new Uc(this.config,this.logger),je=this.streamController=new $c(this,m,dt),at=this.gapController=new Lc(this,m);G.setStreamController(je),z.setStreamController(je);const it=[ue,Pe,je];D&&it.splice(1,0,D),ye&&it.splice(1,0,ye),this.networkControllers=it;const Ye=[p,C,at,G,z,We,m];this.audioTrackController=this.createController(r.audioTrackController,it);const Rt=r.audioStreamController;Rt&&it.push(this.audioStreamController=new Rt(this,m,dt)),this.subtitleTrackController=this.createController(r.subtitleTrackController,it);const ur=r.subtitleStreamController;ur&&it.push(this.subtititleStreamController=new ur(this,m,dt)),this.createController(r.timelineController,Ye),dt.emeController=this.emeController=this.createController(r.emeController,Ye),this.cmcdController=this.createController(r.cmcdController,Ye),this.latencyController=this.createController(Oc,Ye),this.coreComponents=Ye,it.push(c);const wr=c.onErrorOut;typeof wr=="function"&&this.on(v.ERROR,wr,c),this.on(v.MANIFEST_LOADED,ue.onManifestLoaded,ue)}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===v.ERROR;this.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.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(v.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 i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(v.ERROR,{type:_e.OTHER_ERROR,details:Z.ATTACH_MEDIA_ERROR,fatal:!0,error:i});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(v.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(v.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(v.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=b.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(v.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={[ie.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ie.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ie.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=L0()),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){Wt(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 i=n;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=r)return i}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=Je(t);return se(e,r,navigator.mediaCapabilities)}}zs.defaultConfig=void 0}}]);
|
|
}()); |