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.
1304 lines
1.4 MiB
1304 lines
1.4 MiB
!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5148],{70557:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={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"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},40001:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},18785:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={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"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},73331:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},15277:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},33853:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},15075:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},43531:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},47472:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});var y=S(60499),ue=S(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},pe=xe,H=S(7657),m=function(K,M){return ue.createElement(H.Z,(0,y.Z)({},K,{ref:M,icon:pe}))},ie=ue.forwardRef(m),q=ie},68196:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return st}});var y=S(85899),ue=S(72190),xe=S(42244),pe=S(43403),H=S(92310),m=S.n(H),ie=S(29301),q=S(76846),o=S(96452),K=S(6089),M=S(80402),b=S(34280),E=S(49658),C=S(59301),P=S(60499),ne=S(77900),te=S(8654);function V(Re){var we=Re.prefixCls,ce=Re.align,He=Re.arrow,Ie=Re.arrowPos,De=He||{},L=De.className,J=De.content,me=Ie.x,Le=me===void 0?0:me,We=Ie.y,Je=We===void 0?0:We,et=C.useRef();if(!ce||!ce.points)return null;var nt={position:"absolute"};if(ce.autoArrow!==!1){var pt=ce.points[0],gt=ce.points[1],mt=pt[0],St=pt[1],Tt=gt[0],Ye=gt[1];mt===Tt||!["t","b"].includes(mt)?nt.top=Je:mt==="t"?nt.top=0:nt.bottom=0,St===Ye||!["l","r"].includes(St)?nt.left=Le:St==="l"?nt.left=0:nt.right=0}return C.createElement("div",{ref:et,className:m()("".concat(we,"-arrow"),L),style:nt},J)}function D(Re){var we=Re.prefixCls,ce=Re.open,He=Re.zIndex,Ie=Re.mask,De=Re.motion;return Ie?C.createElement(ne.default,(0,P.Z)({},De,{motionAppear:!0,visible:ce,removeOnLeave:!0}),function(L){var J=L.className;return C.createElement("div",{style:{zIndex:He},className:m()("".concat(we,"-mask"),J)})}):null}var j=C.memo(function(Re){var we=Re.children;return we},function(Re,we){return we.cache}),O=j,F=C.forwardRef(function(Re,we){var ce=Re.popup,He=Re.className,Ie=Re.prefixCls,De=Re.style,L=Re.target,J=Re.onVisibleChanged,me=Re.open,Le=Re.keepDom,We=Re.fresh,Je=Re.onClick,et=Re.mask,nt=Re.arrow,pt=Re.arrowPos,gt=Re.align,mt=Re.motion,St=Re.maskMotion,Tt=Re.forceRender,Ye=Re.getPopupContainer,vt=Re.autoDestroy,dt=Re.portal,ve=Re.zIndex,Ge=Re.onMouseEnter,_=Re.onMouseLeave,w=Re.onPointerEnter,ye=Re.onPointerDownCapture,B=Re.ready,X=Re.offsetX,lt=Re.offsetY,Se=Re.offsetR,Ne=Re.offsetB,ze=Re.onAlign,z=Re.onPrepare,Z=Re.stretch,be=Re.targetWidth,ke=Re.targetHeight,G=typeof ce=="function"?ce():ce,ht=me||Le,de=(Ye==null?void 0:Ye.length)>0,At=C.useState(!Ye||!de),$t=(0,ue.Z)(At,2),Kt=$t[0],ar=$t[1];if((0,b.Z)(function(){!Kt&&de&&L&&ar(!0)},[Kt,de,L]),!Kt)return null;var Qt="auto",Zt={left:"-1000vw",top:"-1000vh",right:Qt,bottom:Qt};if(B||!me){var Sr,Nr=gt.points,Yt=gt.dynamicInset||((Sr=gt._experimental)===null||Sr===void 0?void 0:Sr.dynamicInset),wr=Yt&&Nr[0][1]==="r",zt=Yt&&Nr[0][0]==="b";wr?(Zt.right=Se,Zt.left=Qt):(Zt.left=X,Zt.right=Qt),zt?(Zt.bottom=Ne,Zt.top=Qt):(Zt.top=lt,Zt.bottom=Qt)}var Rt={};return Z&&(Z.includes("height")&&ke?Rt.height=ke:Z.includes("minHeight")&&ke&&(Rt.minHeight=ke),Z.includes("width")&&be?Rt.width=be:Z.includes("minWidth")&&be&&(Rt.minWidth=be)),me||(Rt.pointerEvents="none"),C.createElement(dt,{open:Tt||ht,getContainer:Ye&&function(){return Ye(L)},autoDestroy:vt},C.createElement(D,{prefixCls:Ie,open:me,zIndex:ve,mask:et,motion:St}),C.createElement(ie.Z,{onResize:ze,disabled:!me},function(kt){return C.createElement(ne.default,(0,P.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Tt,leavedClassName:"".concat(Ie,"-hidden")},mt,{onAppearPrepare:z,onEnterPrepare:z,visible:me,onVisibleChanged:function(or){var Dr;mt==null||(Dr=mt.onVisibleChanged)===null||Dr===void 0||Dr.call(mt,or),J(or)}}),function(qt,or){var Dr=qt.className,nn=qt.style,tn=m()(Ie,Dr,He);return C.createElement("div",{ref:(0,te.sQ)(kt,we,or),className:tn,style:(0,y.Z)((0,y.Z)((0,y.Z)((0,y.Z)({"--arrow-x":"".concat(pt.x||0,"px"),"--arrow-y":"".concat(pt.y||0,"px")},Zt),Rt),nn),{},{boxSizing:"border-box",zIndex:ve},De),onMouseEnter:Ge,onMouseLeave:_,onPointerEnter:w,onClick:Je,onPointerDownCapture:ye},nt&&C.createElement(V,{prefixCls:Ie,arrow:nt,arrowPos:pt,align:gt}),C.createElement(O,{cache:!me&&!We},G))})}))}),se=F,Ee=C.forwardRef(function(Re,we){var ce=Re.children,He=Re.getTriggerDOMNode,Ie=(0,te.Yr)(ce),De=C.useCallback(function(J){(0,te.mH)(we,He?He(J):J)},[He]),L=(0,te.x1)(De,(0,te.C4)(ce));return Ie?C.cloneElement(ce,{ref:L}):ce}),he=Ee,Ce=C.createContext(null),Pe=Ce;function _e(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function tt(Re,we,ce,He){return C.useMemo(function(){var Ie=_e(ce!=null?ce:we),De=_e(He!=null?He:we),L=new Set(Ie),J=new Set(De);return Re&&(L.has("hover")&&(L.delete("hover"),L.add("click")),J.has("hover")&&(J.delete("hover"),J.add("click"))),[L,J]},[Re,we,ce,He])}var Q=S(29194);function N(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ce=arguments.length>2?arguments[2]:void 0;return ce?Re[0]===we[0]:Re[0]===we[0]&&Re[1]===we[1]}function Y(Re,we,ce,He){for(var Ie=ce.points,De=Object.keys(Re),L=0;L<De.length;L+=1){var J,me=De[L];if(N((J=Re[me])===null||J===void 0?void 0:J.points,Ie,He))return"".concat(we,"-placement-").concat(me)}return""}function oe(Re,we,ce,He){return we||(ce?{motionName:"".concat(Re,"-").concat(ce)}:He?{motionName:He}:null)}function ae(Re){return Re.ownerDocument.defaultView}function le(Re){for(var we=[],ce=Re==null?void 0:Re.parentElement,He=["hidden","scroll","clip","auto"];ce;){var Ie=ae(ce).getComputedStyle(ce),De=Ie.overflowX,L=Ie.overflowY,J=Ie.overflow;[De,L,J].some(function(me){return He.includes(me)})&&we.push(ce),ce=ce.parentElement}return we}function x(Re){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?we:Re}function A(Re){return x(parseFloat(Re),0)}function W(Re,we){var ce=(0,y.Z)({},Re);return(we||[]).forEach(function(He){if(!(He instanceof HTMLBodyElement||He instanceof HTMLHtmlElement)){var Ie=ae(He).getComputedStyle(He),De=Ie.overflow,L=Ie.overflowClipMargin,J=Ie.borderTopWidth,me=Ie.borderBottomWidth,Le=Ie.borderLeftWidth,We=Ie.borderRightWidth,Je=He.getBoundingClientRect(),et=He.offsetHeight,nt=He.clientHeight,pt=He.offsetWidth,gt=He.clientWidth,mt=A(J),St=A(me),Tt=A(Le),Ye=A(We),vt=x(Math.round(Je.width/pt*1e3)/1e3),dt=x(Math.round(Je.height/et*1e3)/1e3),ve=(pt-gt-Tt-Ye)*vt,Ge=(et-nt-mt-St)*dt,_=mt*dt,w=St*dt,ye=Tt*vt,B=Ye*vt,X=0,lt=0;if(De==="clip"){var Se=A(L);X=Se*vt,lt=Se*dt}var Ne=Je.x+ye-X,ze=Je.y+_-lt,z=Ne+Je.width+2*X-ye-B-ve,Z=ze+Je.height+2*lt-_-w-Ge;ce.left=Math.max(ce.left,Ne),ce.top=Math.max(ce.top,ze),ce.right=Math.min(ce.right,z),ce.bottom=Math.min(ce.bottom,Z)}}),ce}function ge(Re){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ce="".concat(we),He=ce.match(/^(.*)\%$/);return He?Re*(parseFloat(He[1])/100):parseFloat(ce)}function Be(Re,we){var ce=we||[],He=(0,ue.Z)(ce,2),Ie=He[0],De=He[1];return[ge(Re.width,Ie),ge(Re.height,De)]}function Xe(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function Ve(Re,we){var ce=we[0],He=we[1],Ie,De;return ce==="t"?De=Re.y:ce==="b"?De=Re.y+Re.height:De=Re.y+Re.height/2,He==="l"?Ie=Re.x:He==="r"?Ie=Re.x+Re.width:Ie=Re.x+Re.width/2,{x:Ie,y:De}}function Ze(Re,we){var ce={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(He,Ie){return Ie===we?ce[He]||"c":He}).join("")}function $e(Re,we,ce,He,Ie,De,L){var J=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ie[He]||{}}),me=(0,ue.Z)(J,2),Le=me[0],We=me[1],Je=C.useRef(0),et=C.useMemo(function(){return we?le(we):[]},[we]),nt=C.useRef({}),pt=function(){nt.current={}};Re||pt();var gt=(0,K.Z)(function(){if(we&&ce&&Re){let Fn=function(Xn,Qn){var Si=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vn,pi=ht.x+Xn,ji=ht.y+Qn,Xi=pi+zt,Mi=ji+wr,mi=Math.max(pi,Si.left),ir=Math.max(ji,Si.top),Er=Math.min(Xi,Si.right),hn=Math.min(Mi,Si.bottom);return Math.max(0,(Er-mi)*(hn-ir))},An=function(){kn=ht.y+Ir,xn=kn+wr,gr=ht.x+_r,Ur=gr+zt};var Tt,Ye,vt,dt,ve=we,Ge=ve.ownerDocument,_=ae(ve),w=_.getComputedStyle(ve),ye=w.position,B=ve.style.left,X=ve.style.top,lt=ve.style.right,Se=ve.style.bottom,Ne=ve.style.overflow,ze=(0,y.Z)((0,y.Z)({},Ie[He]),De),z=Ge.createElement("div");(Tt=ve.parentElement)===null||Tt===void 0||Tt.appendChild(z),z.style.left="".concat(ve.offsetLeft,"px"),z.style.top="".concat(ve.offsetTop,"px"),z.style.position=ye,z.style.height="".concat(ve.offsetHeight,"px"),z.style.width="".concat(ve.offsetWidth,"px"),ve.style.left="0",ve.style.top="0",ve.style.right="auto",ve.style.bottom="auto",ve.style.overflow="hidden";var Z;if(Array.isArray(ce))Z={x:ce[0],y:ce[1],width:0,height:0};else{var be,ke,G=ce.getBoundingClientRect();G.x=(be=G.x)!==null&&be!==void 0?be:G.left,G.y=(ke=G.y)!==null&&ke!==void 0?ke:G.top,Z={x:G.x,y:G.y,width:G.width,height:G.height}}var ht=ve.getBoundingClientRect(),de=_.getComputedStyle(ve),At=de.height,$t=de.width;ht.x=(Ye=ht.x)!==null&&Ye!==void 0?Ye:ht.left,ht.y=(vt=ht.y)!==null&&vt!==void 0?vt:ht.top;var Kt=Ge.documentElement,ar=Kt.clientWidth,Qt=Kt.clientHeight,Zt=Kt.scrollWidth,Sr=Kt.scrollHeight,Nr=Kt.scrollTop,Yt=Kt.scrollLeft,wr=ht.height,zt=ht.width,Rt=Z.height,kt=Z.width,qt={left:0,top:0,right:ar,bottom:Qt},or={left:-Yt,top:-Nr,right:Zt-Yt,bottom:Sr-Nr},Dr=ze.htmlRegion,nn="visible",tn="visibleFirst";Dr!=="scroll"&&Dr!==tn&&(Dr=nn);var Yr=Dr===tn,Xr=W(or,et),Tr=W(qt,et),vn=Dr===nn?Tr:Xr,Gr=Yr?Tr:vn;ve.style.left="auto",ve.style.top="auto",ve.style.right="0",ve.style.bottom="0";var Mn=ve.getBoundingClientRect();ve.style.left=B,ve.style.top=X,ve.style.right=lt,ve.style.bottom=Se,ve.style.overflow=Ne,(dt=ve.parentElement)===null||dt===void 0||dt.removeChild(z);var ln=x(Math.round(zt/parseFloat($t)*1e3)/1e3),Rr=x(Math.round(wr/parseFloat(At)*1e3)/1e3);if(ln===0||Rr===0||(0,q.Sh)(ce)&&!(0,Q.Z)(ce))return;var $r=ze.offset,Br=ze.targetOffset,fn=Be(ht,$r),at=(0,ue.Z)(fn,2),xt=at[0],Bt=at[1],Dt=Be(Z,Br),Lt=(0,ue.Z)(Dt,2),Mt=Lt[0],jt=Lt[1];Z.x-=Mt,Z.y-=jt;var Vt=ze.points||[],Ar=(0,ue.Z)(Vt,2),Cr=Ar[0],pn=Ar[1],vr=Xe(pn),cr=Xe(Cr),Or=Ve(Z,vr),Vr=Ve(ht,cr),qr=(0,y.Z)({},ze),_r=Or.x-Vr.x+xt,Ir=Or.y-Vr.y+Bt,Zr=Fn(_r,Ir),jr=Fn(_r,Ir,Tr),Fr=Ve(Z,["t","l"]),sn=Ve(ht,["t","l"]),Wr=Ve(Z,["b","r"]),Qr=Ve(ht,["b","r"]),Rn=ze.overflow||{},bt=Rn.adjustX,pr=Rn.adjustY,Kr=Rn.shiftX,wn=Rn.shiftY,Bn=function(Qn){return typeof Qn=="boolean"?Qn:Qn>=0},kn,xn,gr,Ur;An();var Tn=Bn(pr),an=cr[0]===vr[0];if(Tn&&cr[0]==="t"&&(xn>Gr.bottom||nt.current.bt)){var Jr=Ir;an?Jr-=wr-Rt:Jr=Fr.y-Qr.y-Bt;var ci=Fn(_r,Jr),jn=Fn(_r,Jr,Tr);ci>Zr||ci===Zr&&(!Yr||jn>=jr)?(nt.current.bt=!0,Ir=Jr,Bt=-Bt,qr.points=[Ze(cr,0),Ze(vr,0)]):nt.current.bt=!1}if(Tn&&cr[0]==="b"&&(kn<Gr.top||nt.current.tb)){var Ln=Ir;an?Ln+=wr-Rt:Ln=Wr.y-sn.y-Bt;var nr=Fn(_r,Ln),un=Fn(_r,Ln,Tr);nr>Zr||nr===Zr&&(!Yr||un>=jr)?(nt.current.tb=!0,Ir=Ln,Bt=-Bt,qr.points=[Ze(cr,0),Ze(vr,0)]):nt.current.tb=!1}var on=Bn(bt),Kn=cr[1]===vr[1];if(on&&cr[1]==="l"&&(Ur>Gr.right||nt.current.rl)){var Jn=_r;Kn?Jn-=zt-kt:Jn=Fr.x-Qr.x-xt;var ei=Fn(Jn,Ir),Pn=Fn(Jn,Ir,Tr);ei>Zr||ei===Zr&&(!Yr||Pn>=jr)?(nt.current.rl=!0,_r=Jn,xt=-xt,qr.points=[Ze(cr,1),Ze(vr,1)]):nt.current.rl=!1}if(on&&cr[1]==="r"&&(gr<Gr.left||nt.current.lr)){var Hn=_r;Kn?Hn+=zt-kt:Hn=Wr.x-sn.x-xt;var cn=Fn(Hn,Ir),hi=Fn(Hn,Ir,Tr);cn>Zr||cn===Zr&&(!Yr||hi>=jr)?(nt.current.lr=!0,_r=Hn,xt=-xt,qr.points=[Ze(cr,1),Ze(vr,1)]):nt.current.lr=!1}An();var Un=Kr===!0?0:Kr;typeof Un=="number"&&(gr<Tr.left&&(_r-=gr-Tr.left-xt,Z.x+kt<Tr.left+Un&&(_r+=Z.x-Tr.left+kt-Un)),Ur>Tr.right&&(_r-=Ur-Tr.right-xt,Z.x>Tr.right-Un&&(_r+=Z.x-Tr.right+Un)));var Yn=wn===!0?0:wn;typeof Yn=="number"&&(kn<Tr.top&&(Ir-=kn-Tr.top-Bt,Z.y+Rt<Tr.top+Yn&&(Ir+=Z.y-Tr.top+Rt-Yn)),xn>Tr.bottom&&(Ir-=xn-Tr.bottom-Bt,Z.y>Tr.bottom-Yn&&(Ir+=Z.y-Tr.bottom+Yn)));var ti=ht.x+_r,ri=ti+zt,Pr=ht.y+Ir,di=Pr+wr,fi=Z.x,ii=fi+kt,Nn=Z.y,br=Nn+Rt,Ii=Math.max(ti,fi),Ht=Math.min(ri,ii),$n=(Ii+Ht)/2,Ri=$n-ti,Ei=Math.max(Pr,Nn),zn=Math.min(di,br),qn=(Ei+zn)/2,xr=qn-Pr;L==null||L(we,qr);var Gn=Mn.right-ht.x-(_r+ht.width),si=Mn.bottom-ht.y-(Ir+ht.height);ln===1&&(_r=Math.floor(_r),Gn=Math.floor(Gn)),Rr===1&&(Ir=Math.floor(Ir),si=Math.floor(si));var Li={ready:!0,offsetX:_r/ln,offsetY:Ir/Rr,offsetR:Gn/ln,offsetB:si/Rr,arrowX:Ri/ln,arrowY:xr/Rr,scaleX:ln,scaleY:Rr,align:qr};We(Li)}}),mt=function(){Je.current+=1;var Ye=Je.current;Promise.resolve().then(function(){Je.current===Ye&>()})},St=function(){We(function(Ye){return(0,y.Z)((0,y.Z)({},Ye),{},{ready:!1})})};return(0,b.Z)(St,[He]),(0,b.Z)(function(){Re||St()},[Re]),[Le.ready,Le.offsetX,Le.offsetY,Le.offsetR,Le.offsetB,Le.arrowX,Le.arrowY,Le.scaleX,Le.scaleY,Le.align,mt]}var qe=S(77654);function je(Re,we,ce,He,Ie){(0,b.Z)(function(){if(Re&&we&&ce){let Je=function(){He(),Ie()};var De=we,L=ce,J=le(De),me=le(L),Le=ae(L),We=new Set([Le].concat((0,qe.Z)(J),(0,qe.Z)(me)));return We.forEach(function(et){et.addEventListener("scroll",Je,{passive:!0})}),Le.addEventListener("resize",Je,{passive:!0}),He(),function(){We.forEach(function(et){et.removeEventListener("scroll",Je),Le.removeEventListener("resize",Je)})}}},[Re,we,ce])}var Et=S(48736);function Qe(Re,we,ce,He,Ie,De,L,J){var me=C.useRef(Re);me.current=Re;var Le=C.useRef(!1);C.useEffect(function(){if(we&&He&&(!Ie||De)){var Je=function(){Le.current=!1},et=function(vt){var dt;me.current&&!L(((dt=vt.composedPath)===null||dt===void 0||(dt=dt.call(vt))===null||dt===void 0?void 0:dt[0])||vt.target)&&!Le.current&&J(!1)},nt=ae(He);nt.addEventListener("pointerdown",Je,!0),nt.addEventListener("mousedown",et,!0),nt.addEventListener("contextmenu",et,!0);var pt=(0,o.A)(ce);if(pt&&(pt.addEventListener("mousedown",et,!0),pt.addEventListener("contextmenu",et,!0)),0)var gt,mt,St,Tt;return function(){nt.removeEventListener("pointerdown",Je,!0),nt.removeEventListener("mousedown",et,!0),nt.removeEventListener("contextmenu",et,!0),pt&&(pt.removeEventListener("mousedown",et,!0),pt.removeEventListener("contextmenu",et,!0))}}},[we,ce,He,Ie,De]);function We(){Le.current=!0}return We}var wt=["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 Fe(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe.Z,we=C.forwardRef(function(ce,He){var Ie=ce.prefixCls,De=Ie===void 0?"rc-trigger-popup":Ie,L=ce.children,J=ce.action,me=J===void 0?"hover":J,Le=ce.showAction,We=ce.hideAction,Je=ce.popupVisible,et=ce.defaultPopupVisible,nt=ce.onPopupVisibleChange,pt=ce.afterPopupVisibleChange,gt=ce.mouseEnterDelay,mt=ce.mouseLeaveDelay,St=mt===void 0?.1:mt,Tt=ce.focusDelay,Ye=ce.blurDelay,vt=ce.mask,dt=ce.maskClosable,ve=dt===void 0?!0:dt,Ge=ce.getPopupContainer,_=ce.forceRender,w=ce.autoDestroy,ye=ce.destroyPopupOnHide,B=ce.popup,X=ce.popupClassName,lt=ce.popupStyle,Se=ce.popupPlacement,Ne=ce.builtinPlacements,ze=Ne===void 0?{}:Ne,z=ce.popupAlign,Z=ce.zIndex,be=ce.stretch,ke=ce.getPopupClassNameFromAlign,G=ce.fresh,ht=ce.alignPoint,de=ce.onPopupClick,At=ce.onPopupAlign,$t=ce.arrow,Kt=ce.popupMotion,ar=ce.maskMotion,Qt=ce.popupTransitionName,Zt=ce.popupAnimation,Sr=ce.maskTransitionName,Nr=ce.maskAnimation,Yt=ce.className,wr=ce.getTriggerDOMNode,zt=(0,xe.Z)(ce,wt),Rt=w||ye||!1,kt=C.useState(!1),qt=(0,ue.Z)(kt,2),or=qt[0],Dr=qt[1];(0,b.Z)(function(){Dr((0,E.Z)())},[]);var nn=C.useRef({}),tn=C.useContext(Pe),Yr=C.useMemo(function(){return{registerSubPopup:function(Er,hn){nn.current[Er]=hn,tn==null||tn.registerSubPopup(Er,hn)}}},[tn]),Xr=(0,M.Z)(),Tr=C.useState(null),vn=(0,ue.Z)(Tr,2),Gr=vn[0],Mn=vn[1],ln=C.useRef(null),Rr=(0,K.Z)(function(ir){ln.current=ir,(0,q.Sh)(ir)&&Gr!==ir&&Mn(ir),tn==null||tn.registerSubPopup(Xr,ir)}),$r=C.useState(null),Br=(0,ue.Z)($r,2),fn=Br[0],at=Br[1],xt=C.useRef(null),Bt=(0,K.Z)(function(ir){(0,q.Sh)(ir)&&fn!==ir&&(at(ir),xt.current=ir)}),Dt=C.Children.only(L),Lt=(Dt==null?void 0:Dt.props)||{},Mt={},jt=(0,K.Z)(function(ir){var Er,hn,Lr=fn;return(Lr==null?void 0:Lr.contains(ir))||((Er=(0,o.A)(Lr))===null||Er===void 0?void 0:Er.host)===ir||ir===Lr||(Gr==null?void 0:Gr.contains(ir))||((hn=(0,o.A)(Gr))===null||hn===void 0?void 0:hn.host)===ir||ir===Gr||Object.values(nn.current).some(function(zr){return(zr==null?void 0:zr.contains(ir))||ir===zr})}),Vt=oe(De,Kt,Zt,Qt),Ar=oe(De,ar,Nr,Sr),Cr=C.useState(et||!1),pn=(0,ue.Z)(Cr,2),vr=pn[0],cr=pn[1],Or=Je!=null?Je:vr,Vr=(0,K.Z)(function(ir){Je===void 0&&cr(ir)});(0,b.Z)(function(){cr(Je||!1)},[Je]);var qr=C.useRef(Or);qr.current=Or;var _r=C.useRef([]);_r.current=[];var Ir=(0,K.Z)(function(ir){var Er;Vr(ir),((Er=_r.current[_r.current.length-1])!==null&&Er!==void 0?Er:Or)!==ir&&(_r.current.push(ir),nt==null||nt(ir))}),Zr=C.useRef(),jr=function(){clearTimeout(Zr.current)},Fr=function(Er){var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;jr(),hn===0?Ir(Er):Zr.current=setTimeout(function(){Ir(Er)},hn*1e3)};C.useEffect(function(){return jr},[]);var sn=C.useState(!1),Wr=(0,ue.Z)(sn,2),Qr=Wr[0],Rn=Wr[1];(0,b.Z)(function(ir){(!ir||Or)&&Rn(!0)},[Or]);var bt=C.useState(null),pr=(0,ue.Z)(bt,2),Kr=pr[0],wn=pr[1],Bn=C.useState(null),kn=(0,ue.Z)(Bn,2),xn=kn[0],gr=kn[1],Ur=function(Er){gr([Er.clientX,Er.clientY])},Tn=$e(Or,Gr,ht&&xn!==null?xn:fn,Se,ze,z,At),an=(0,ue.Z)(Tn,11),Jr=an[0],ci=an[1],jn=an[2],Ln=an[3],nr=an[4],un=an[5],on=an[6],Kn=an[7],Jn=an[8],ei=an[9],Pn=an[10],Hn=tt(or,me,Le,We),cn=(0,ue.Z)(Hn,2),hi=cn[0],Un=cn[1],Yn=hi.has("click"),ti=Un.has("click")||Un.has("contextMenu"),ri=(0,K.Z)(function(){Qr||Pn()}),Pr=function(){qr.current&&ht&&ti&&Fr(!1)};je(Or,fn,Gr,ri,Pr),(0,b.Z)(function(){ri()},[xn,Se]),(0,b.Z)(function(){Or&&!(ze!=null&&ze[Se])&&ri()},[JSON.stringify(z)]);var di=C.useMemo(function(){var ir=Y(ze,De,ei,ht);return m()(ir,ke==null?void 0:ke(ei))},[ei,ke,ze,De,ht]);C.useImperativeHandle(He,function(){return{nativeElement:xt.current,popupElement:ln.current,forceAlign:ri}});var fi=C.useState(0),ii=(0,ue.Z)(fi,2),Nn=ii[0],br=ii[1],Ii=C.useState(0),Ht=(0,ue.Z)(Ii,2),$n=Ht[0],Ri=Ht[1],Ei=function(){if(be&&fn){var Er=fn.getBoundingClientRect();br(Er.width),Ri(Er.height)}},zn=function(){Ei(),ri()},qn=function(Er){Rn(!1),Pn(),pt==null||pt(Er)},xr=function(){return new Promise(function(Er){Ei(),wn(function(){return Er})})};(0,b.Z)(function(){Kr&&(Pn(),Kr(),wn(null))},[Kr]);function Gn(ir,Er,hn,Lr){Mt[ir]=function(zr){var wi;Lr==null||Lr(zr),Fr(Er,hn);for(var Wn=arguments.length,ki=new Array(Wn>1?Wn-1:0),Ki=1;Ki<Wn;Ki++)ki[Ki-1]=arguments[Ki];(wi=Lt[ir])===null||wi===void 0||wi.call.apply(wi,[Lt,zr].concat(ki))}}(Yn||ti)&&(Mt.onClick=function(ir){var Er;qr.current&&ti?Fr(!1):!qr.current&&Yn&&(Ur(ir),Fr(!0));for(var hn=arguments.length,Lr=new Array(hn>1?hn-1:0),zr=1;zr<hn;zr++)Lr[zr-1]=arguments[zr];(Er=Lt.onClick)===null||Er===void 0||Er.call.apply(Er,[Lt,ir].concat(Lr))});var si=Qe(Or,ti,fn,Gr,vt,ve,jt,Fr),Li=hi.has("hover"),Fn=Un.has("hover"),An,Xn;Li&&(Gn("onMouseEnter",!0,gt,function(ir){Ur(ir)}),Gn("onPointerEnter",!0,gt,function(ir){Ur(ir)}),An=function(Er){(Or||Qr)&&Gr!==null&&Gr!==void 0&&Gr.contains(Er.target)&&Fr(!0,gt)},ht&&(Mt.onMouseMove=function(ir){var Er;(Er=Lt.onMouseMove)===null||Er===void 0||Er.call(Lt,ir)})),Fn&&(Gn("onMouseLeave",!1,St),Gn("onPointerLeave",!1,St),Xn=function(){Fr(!1,St)}),hi.has("focus")&&Gn("onFocus",!0,Tt),Un.has("focus")&&Gn("onBlur",!1,Ye),hi.has("contextMenu")&&(Mt.onContextMenu=function(ir){var Er;qr.current&&Un.has("contextMenu")?Fr(!1):(Ur(ir),Fr(!0)),ir.preventDefault();for(var hn=arguments.length,Lr=new Array(hn>1?hn-1:0),zr=1;zr<hn;zr++)Lr[zr-1]=arguments[zr];(Er=Lt.onContextMenu)===null||Er===void 0||Er.call.apply(Er,[Lt,ir].concat(Lr))}),Yt&&(Mt.className=m()(Lt.className,Yt));var Qn=C.useRef(!1);Qn.current||(Qn.current=_||Or||Qr);var Si=(0,y.Z)((0,y.Z)({},Lt),Mt),pi={},ji=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ji.forEach(function(ir){zt[ir]&&(pi[ir]=function(){for(var Er,hn=arguments.length,Lr=new Array(hn),zr=0;zr<hn;zr++)Lr[zr]=arguments[zr];(Er=Si[ir])===null||Er===void 0||Er.call.apply(Er,[Si].concat(Lr)),zt[ir].apply(zt,Lr)})});var Xi=C.cloneElement(Dt,(0,y.Z)((0,y.Z)({},Si),pi)),Mi={x:un,y:on},mi=$t?(0,y.Z)({},$t!==!0?$t:{}):null;return C.createElement(C.Fragment,null,C.createElement(ie.Z,{disabled:!Or,ref:Bt,onResize:zn},C.createElement(he,{getTriggerDOMNode:wr},Xi)),Qn.current&&C.createElement(Pe.Provider,{value:Yr},C.createElement(se,{portal:Re,ref:Rr,prefixCls:De,popup:B,className:m()(X,di),style:lt,target:fn,onMouseEnter:An,onMouseLeave:Xn,onPointerEnter:An,zIndex:Z,open:Or,keepDom:Qr,fresh:G,onClick:de,onPointerDownCapture:si,mask:vt,motion:Vt,maskMotion:Ar,onVisibleChanged:qn,onPrepare:xr,forceRender:_,autoDestroy:Rt,getPopupContainer:Ge,align:ei,arrow:mi,arrowPos:Mi,ready:Jr,offsetX:ci,offsetY:jn,offsetR:Ln,offsetB:nr,onAlign:ri,stretch:be,targetWidth:Nn/Kn,targetHeight:$n/Jn})))});return we}var st=Fe(pe.Z)},46214:function(){"use strict"},90736:function(Gt,it,S){"use strict";var y=S(59301),ue=S(4977),xe=S(7939),pe=Object.defineProperty,H=Object.defineProperties,m=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,K=(C,P,ne)=>P in C?pe(C,P,{enumerable:!0,configurable:!0,writable:!0,value:ne}):C[P]=ne,M=(C,P)=>{for(var ne in P||(P={}))q.call(P,ne)&&K(C,ne,P[ne]);if(ie)for(var ne of ie(P))o.call(P,ne)&&K(C,ne,P[ne]);return C},b=(C,P)=>H(C,m(P));const E=({img:C,buttonProps:P={},styles:ne={},customText:te,ButtonText:V,ButtonClick:D,Buttonclass:j,ButtonTwo:O,imgStyles:F,loading:se=!1,className:Ee=""})=>y.createElement("section",{className:`tc animated fadeIn ${Ee}`,style:M({color:"#999",margin:"100px auto",visibility:se?"hidden":"visible"},ne)},y.createElement("img",{src:C||ue,style:b(M({},F),{pointerEvents:"none",userSelect:"none"})}),y.createElement("p",{className:"mt20 font14"},te||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),V&&y.createElement(xe.ZP,M({className:j,onClick:D},P),V),O&&O);it.Z=E},86974:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return j}});var y=S(59301),ue={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},xe=S(7939),pe=S(70557),H=S(34728),m=S(25399),ie=S(76406),q=S(84849),o=S(90736),K=S(14185),M=S(52078),b=S(59301),E=Object.defineProperty,C=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,te=(O,F,se)=>F in O?E(O,F,{enumerable:!0,configurable:!0,writable:!0,value:se}):O[F]=se,V=(O,F)=>{for(var se in F||(F={}))P.call(F,se)&&te(O,se,F[se]);if(C)for(var se of C(F))ne.call(F,se)&&te(O,se,F[se]);return O},D=(O,F,se)=>new Promise((Ee,he)=>{var Ce=tt=>{try{_e(se.next(tt))}catch(Q){he(Q)}},Pe=tt=>{try{_e(se.throw(tt))}catch(Q){he(Q)}},_e=tt=>tt.done?Ee(tt.value):Promise.resolve(tt.value).then(Ce,Pe);_e((se=se.apply(O,F)).next())}),j=({editOffice:O="view",data:F,issaver:se,onSaver:Ee,theme:he,type:Ce,filename:Pe,monacoEditor:_e,className:tt,style:Q,close:N,onClose:Y,hasMask:oe,disabledDownload:ae,onImgDimensions:le,showNodata:x,recordInfo:A})=>{const[W,ge]=(0,y.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Be,Xe]=(0,y.useState)(""),[Ve,Ze]=(0,y.useState)(),$e=window.ENV==="build"?"/react/build":"",qe=location.host.startsWith("localhost")?K.Z.PROXY_SERVER:K.Z.API_SERVER,Et=10*(1024*1024),Qe=(0,y.useRef)();F!=null&&F.startsWith("/api")&&Ce!=="txt"&&(F=K.Z.API_SERVER+F);const wt=He=>He.substring(He.lastIndexOf("/")+1).split(".").pop();Pe&&_e&&(_e.filename=Pe),(0,y.useEffect)(()=>{var He,Ie;const De=(Ie=(He=document.cookie)==null?void 0:He.replace(/\s/g,""))==null?void 0:Ie.split(";");De==null||De.map(L=>{let J=L.split("=");J[0]==="_educoder_session"&&Xe(J[1])})},[]),(0,y.useEffect)(()=>{Ce==="office"&&(F.indexOf("bigfilescdn.")>-1||F.indexOf("bigfiles1")>-1?Ze({url:F,fileType:wt(F),model:F.indexOf("model=edit")?"edit":"view"}):F.indexOf("coze")>-1?Ze({url:F,fileType:"doc",model:"view"}):st())},[Ce,F]);function Fe(He){return D(this,null,function*(){He.data.type==="pdfdata"&&(Ee(He.data.data),window.removeEventListener("message",Fe,!1)),console.log("mess---:",He.data)})}const st=()=>D(void 0,null,function*(){console.log("data:",F);let He=F;F.startsWith("http")||(He=location.origin+He);let Ie=new URL(He).pathname.split("/").pop();const De=yield(0,q.gJ)({attachment_id:Ie});De.url=qe+De.url,Ze(De)}),Re=()=>{if(F.startsWith("http")||F.startsWith("blob:")){we();return}(0,ie.Sv)(Pe||"educoder",F,Pe)},we=()=>{A&&(0,M.fc)({id:A==null?void 0:A.id,watch_type:1,course_id:A==null?void 0:A.course_id}),(0,ie.Nd)(Pe||"educoder",decodeURIComponent(F))};(0,y.useEffect)(()=>(window.addEventListener("message",ce),()=>{window.removeEventListener("message",ce)}),[]);const ce=He=>{var Ie;((Ie=He==null?void 0:He.data)==null?void 0:Ie.type)==="closePop"&&Y()};return b.createElement("div",{style:V({},Q||{}),className:`${oe&&ue.bgBlack} ${Ce?ue.wrp:"hide"}`},!!Ce&&N&&b.createElement("div",{id:"closePop",className:ue.close,ref:Qe},!!le&&b.createElement(m.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Qe.current},b.createElement("span",{onClick:()=>{Y(),le()}},b.createElement("i",{className:"icon-yulanpizhu"}))),!ae&&window.parent===window&&b.createElement(m.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Qe.current},b.createElement("span",{onClick:we},b.createElement("i",{className:"icon-quxiaozhiding"}))),se&&b.createElement(m.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Qe.current},b.createElement("span",{className:"",onClick:()=>{const He=document.getElementById("pdfiframe");window.addEventListener("message",Fe,!1),setTimeout(()=>{He.contentWindow.postMessage("getData","*")},300)}},b.createElement("i",{className:"icon-baocun"}))),b.createElement(m.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Qe.current},b.createElement("span",{className:"",onClick:()=>{Y()}},b.createElement("i",{className:"icon-guanbi1"})))),b.createElement("div",{className:`${ue[tt]} ${tt} ${ue.monaco} ${Ce==="txt"?"show":"hide"}`},Ce==="txt"&&b.createElement(b.Fragment,null,b.createElement(H.ZP,V({},_e)))),Ce==="audio"&&b.createElement("audio",{controls:!0,src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${F}`,autoPlay:!0}),Ce==="video"&&b.createElement(b.Fragment,null,(F==null?void 0:F.indexOf("http"))>-1?b.createElement("video",{controls:!0,src:`${F}`,autoPlay:!0}):b.createElement("video",{controls:!0,src:`data:video/mp4;base64,${F}`,autoPlay:!0})),Ce==="office"&&Ve&&b.createElement("iframe",{src:`${$e}/office.html?key=${Ve.key}&url=${btoa(Ve.url)}&callbackUrl=${qe+(Ve.callbackUrl||"")}&fileType=${Ve.fileType}&title=${Ve.title||""}&model=${O}&officeServer=${K.Z.ONLYOFFICE}&disabledDownload=${!!ae}`}),Ce==="html"&&b.createElement("iframe",{src:F+"&disposition=inline"}),Ce==="pdf"&&b.createElement("iframe",{id:"pdfiframe",src:`${$e}/js/pdf/index.html?filename=${Pe||"educoder.pdf"}&url=${encodeURIComponent(F)}&disabledDownload=${!!ae}&model=${O}`}),Ce==="image"&&b.createElement("img",{src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:image/png;base64,"}${F}`}),(Ce==="other"||Ce==="download")&&b.createElement(b.Fragment,null,x?b.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:b.createElement(xe.ZP,{icon:b.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Re,disabled:ae},"\u4E0B\u8F7D")}):b.createElement(xe.ZP,{type:"primary",size:"middle",onClick:Re,disabled:ae},b.createElement(pe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ce==="flowChart"&&b.createElement("div",{className:"embed"},b.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${F||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Gt,it,S){"use strict";S.d(it,{z:function(){return _e},Z:function(){return tt}});var y=S(59301),ue=S(46214),xe=S(20047),pe=S(64018),H=S(16471),m=S(14185),ie=S(76406),q=S(15342),o=S(44104),K=S(7939),M=S(1012),b=S(86974),E=S(59301),P=({html:Q})=>{const N=(0,y.useRef)(null),Y=(0,y.useRef)(null),oe=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,y.useEffect)(()=>{const ae=N.current.attachShadow({mode:"open"});Y.current=document.createElement("div"),Y.current.className="markdown-body",Y.current.innerHTML=Q,ae.appendChild(Y.current);const le=document.createElement("style");return le.textContent=oe,ae.appendChild(le),()=>{ae.innerHTML=""}},[]),(0,y.useEffect)(()=>{Y.current&&(Y.current.innerHTML=Q)},[Q]),E.createElement("div",{ref:N})};function ne(Q){const N=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Y=new RegExp(`\\b(${N.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),oe=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return Q.replace(Y,"").replace(oe,"").trim()}var te={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},V=Object.defineProperty,D=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,F=(Q,N,Y)=>N in Q?V(Q,N,{enumerable:!0,configurable:!0,writable:!0,value:Y}):Q[N]=Y,se=(Q,N)=>{for(var Y in N||(N={}))j.call(N,Y)&&F(Q,Y,N[Y]);if(D)for(var Y of D(N))O.call(N,Y)&&F(Q,Y,N[Y]);return Q};const Ee="@\u2581\u2581@",he="@\u2581@",Ce=/<pre[^>]*>/g;function Pe(Q){let N=document.createElement("div");return N.innerHTML=Q,N.childNodes.length===0?"":N.childNodes[0].nodeValue}const _e=(Q,N)=>{Q=Q||"";const Y=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,oe=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ae=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,le=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return N?Q.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Y,(x,A,W,ge,Be,Xe,Ve)=>{const Ze=A||ge||Xe,$e=W||Be||Ve||"?";return m.Z.API_SERVER+"/api/attachments/"+Ze+$e+"&t="+(0,ie.Jn)(Ze,Date.now())+(x.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Q=Q.replace(le,(x,A,W,ge,Be,Xe,Ve)=>{const Ze=A||ge||Xe,$e=W||Be||Ve||"?";return m.Z.API_SERVER+"/attachments/download/"+Ze+$e+"&t="+(0,ie.Jn)(Ze,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(Y,(x,A,W,ge,Be,Xe,Ve)=>{const Ze=A||ge||Xe,$e=W||Be||Ve||"?";return m.Z.API_SERVER+"/api/attachments/"+Ze+$e+"&t="+(0,ie.Jn)(Ze,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(oe,(x,A,W,ge,Be)=>{const Xe=A||ge,Ve=W||Be||"";return'"'+m.Z.API_SERVER+"/api/attachments/"+Xe+Ve+Xe+Ve+"&t="+(0,ie.Jn)(Xe,Date.now())}).replace(ae,(x,A,W,ge,Be)=>{const Xe=A||ge,Ve=W||Be||"";return"("+m.Z.API_SERVER+"/files/uploads/"+Xe+Ve+Xe+Ve+"&t="+(0,ie.Jn)(Xe,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Q)};var tt=({value:Q="",edit:N=!1,className:Y,showTextOnly:oe,showLines:ae,style:le={},stylesPrev:x={},highlightKeywords:A,showProgramFill:W,isProgramFill:ge,disabledFill:Be=!1,programFillValue:Xe,openEditor:Ve=()=>{},onFillChange:Ze=je=>{},onFillBlur:$e=()=>{},onFillFocus:qe=()=>{}})=>{let je=ne(String(Q||""));const Et=(0,y.useRef)(),Qe=(0,y.useRef)(),[wt,Fe]=(0,y.useState)(""),[st,Re]=(0,y.useState)("office"),[we,ce]=(0,y.useState)([]),He=(0,y.useRef)("a"+(0,M.Z)()),Ie={},De=Ye=>/<style[\s\S]*?>/i.test(Ye||""),L=(Ye,vt,dt)=>{const ve=document.createElement(Ye===he?"input":"textarea");ve.style.width="100%",ve.style.height=Ye===he?"40px":"151px",ve.rows=5,ve.spellcheck=!1,ve.name="edu-program-fill",ve.placeholder="\u8BF7\u8F93\u5165",ve.dataset.id=vt;const Ge=Object.keys(Ie).length;return Ie[Ge]=ve,`<span class="edu-program-fill-wrap ${Ye===he?"":"show"}" style="width:${Ye===he?"600px":"100%"}" title=${dt||""}><span>${ve.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function J(Ye){return Ye=Ye.replace(/!\[.*?\]\(.*?\)/g,""),Ye=Ye.replace(/\[.*?\]\(.*?\)/g,""),Ye=Ye.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ye=Ye.replace(/<embed.*?>/g,""),Ye=Ye.replace(/<img.*?>/g,""),Ye=Ye.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ye=Ye.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ye=Ye.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ye=Ye.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ye}const me=Ye=>!oe&&De(je)?Ye:Ye.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(vt,dt){let ve=dt.replace(/(\n|\r)/g,"").split("}"),Ge=[];return ve.map(_=>{_!=""&&Ge.push(`.${He.current} ${_}`)}),`<style>${Ge.join("}")}</style>`}),Le=(0,y.useMemo)(()=>{(0,xe.Iy)();try{const ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ge=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,w=/\(\/attachments\/download\//g;je=je.replace(w,"("+m.Z.API_SERVER+"/attachments/download/").replace(ve,"("+m.Z.API_SERVER+"/api/attachments/").replace(Ge,'"'+m.Z.API_SERVER+"/api/attachments/").replace(_,'"'+m.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Et.current.style.display="none"}catch(ve){}if(W){let ve=-1;return je=je.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ge,_,w){var ye;return++ve,L(Ge,ve,(ye=Xe==null?void 0:Xe[ve])==null?void 0:ye.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${me(je||"")}</pre>`}let Ye=me(je);Ye=(0,xe.ZP)(Ye);const vt=(0,xe.ez)();je.match(/\[TOC\]/)&&(Ye=Ye.replace("<p>[TOC]</p>",(0,xe.Qv)()),(0,xe.Iy)()),Ye=Ye.replace(/(__special_katext_id_\d+__)/g,(ve,Ge)=>{const{type:_,expression:w}=vt[Ge];return(0,q.renderToString)(Pe(w)||"",{displayMode:_==="block",throwOnError:!1,output:"html"})}),Ye=Ye.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,xe.AL)();const dt=document.createElement("div");if(dt.innerHTML=Ye,oe)return dt.innerText;if(A){const ve=A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return nt(dt,ve),dt.innerHTML}return setTimeout(()=>mt(),500),dt.innerHTML},[je,A]);(0,y.useEffect)(()=>{pt.current&&pt.current.querySelectorAll(["input","textarea"]).forEach(vt=>{vt.oninput=We,vt.onblur=Je,vt.onfocus=et})},[we]),(0,y.useEffect)(()=>{var Ye,vt,dt,ve,Ge;if(Xe!=null&&Xe.length)try{const _=pt.current.querySelectorAll(".edu-program-fill-score"),w=pt.current.querySelectorAll('[name="edu-program-fill"]');for(const[ye,B]of w.entries())B.value=((Ye=Xe==null?void 0:Xe[ye])==null?void 0:Ye.value)||"",((vt=Xe==null?void 0:Xe[ye])==null?void 0:vt.type)==="warning"?B.className="program-fill-warning":((dt=Xe==null?void 0:Xe[ye])==null?void 0:dt.type)==="success"?B.className="program-fill-success":B.className="";for(const[ye,B]of _.entries())B.innerHTML=(ve=Xe==null?void 0:Xe[ye])!=null&&ve.score?`${(Ge=Xe==null?void 0:Xe[ye])==null?void 0:Ge.score}\u5206`:"";ce(Xe)}catch(_){console.log(_,"error")}},[Xe]);const We=Ye=>{we[Ye.target.dataset.id]=we[Ye.target.dataset.id]||{},we[Ye.target.dataset.id].value=Ye.target.value,ce([...we]),Ze(we,Ye.target.dataset.id)},Je=Ye=>{we[Ye.target.dataset.id]=we[Ye.target.dataset.id]||{},we[Ye.target.dataset.id].value=Ye.target.value,ce([...we]),$e(we,Ye.target.dataset.id)},et=Ye=>{we[Ye.target.dataset.id]=we[Ye.target.dataset.id]||{},we[Ye.target.dataset.id].value=Ye.target.value,ce([...we]),qe(we,Ye.target.dataset.id)};function nt(Ye,vt){return Ye.childNodes.forEach(dt=>{var ve;if(dt.childNodes.length>0)nt(dt,vt);else if(dt.nodeName!=="IMG")if(dt.innerHTML)dt.innerHTML=(ve=dt.innerHTML)==null?void 0:ve.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ge=document.createElement("span");Ge.innerHTML=dt.textContent.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dt.replaceWith(Ge)}})}const pt=(0,y.useRef)();xe.jb.WebkitLineClamp=ae,ae&&(le=se(se({},le),xe.jb));function gt(Ye){let vt=Ye.target;if(vt.tagName.toUpperCase()==="A"){let dt=vt.getAttribute("href");if(dt.indexOf("office")>-1)Ye.preventDefault(),Fe(dt),Re("office");else if(dt.indexOf("application/pdf")>-1)Ye.preventDefault(),Fe(dt),Re("pdf");else if(dt.indexOf("text/html")>-1)Ye.preventDefault(),Fe(dt),Re("html");else if(dt.startsWith("#")){Ye.preventDefault();let ve=document.getElementById(dt.replace("#",""));ve&&ve.scrollIntoView(!0)}}}const mt=()=>{var Ye;const vt=(Ye=pt.current)==null?void 0:Ye.querySelectorAll("video");vt==null||vt.forEach(dt=>{if(dt.oncontextmenu=()=>!1,dt.src.indexOf(".m3u8")>-1&&!dt.canPlayType("application/vnd.apple.mpegurl")){if(H.ZP.isSupported()){var ve=new H.ZP;ve.loadSource(dt.src),ve.attachMedia(dt)}}})};(0,y.useEffect)(()=>{if(pt.current&&Le&&Le.match(Ce)&&window.PR.prettyPrint(),pt.current)return pt.current.addEventListener("click",gt),()=>{var Ye;(Ye=pt.current)==null||Ye.removeEventListener("click",gt),(0,xe.AL)(),(0,xe.Iy)()}},[Le,pt.current,gt]);const St=Ye=>{Ye.target.nodeName==="IMG"&&Ye.target.className.indexOf("draw-flowchart")>-1?(Et.current.style.zIndex=1,Et.current.style.display="flex",Et.current.style.width=Ye.target.clientWidth+"px",Et.current.style.height=Ye.target.clientHeight+"px",Et.current.style.top=Ye.target.offsetTop+"px",Et.current.style.left=Ye.target.offsetLeft+"px",Ye.target.id&&(Qe.current=Ye.target.id)):Et.current.style.display="none"},Tt=()=>{Et.current.style.display="none"};return(0,y.useEffect)(()=>{var Ye;const vt=dt=>{dt.preventDefault(),dt.clipboardData.setData("text",window.getSelection().toString())};return(Ye=pt.current)==null||Ye.addEventListener("copy",vt),()=>{var dt;(dt=pt.current)==null||dt.removeEventListener("copy",vt)}},[pt.current]),y.createElement("div",{style:{position:"relative"},onMouseLeave:Tt},oe&&y.createElement("div",{ref:pt,className:`${te.mdBody} `},Le),!oe&&!De(Le)&&y.createElement("div",{ref:pt,style:se({},le),onMouseOver:St,className:`${Y||""} ${Be?"disabled-fill":""} markdown-body ${te.mdBody} ${He.current}`,dangerouslySetInnerHTML:{__html:Le}}),!oe&&De(Le)&&y.createElement(P,{html:Le}),y.createElement("div",{ref:Et,className:`${te.button} ${N?"":te.previewFlowChart}`},y.createElement(o.Z,null,y.createElement(K.ZP,{onClick:()=>{N?Ve(Qe.current):(Fe(Qe.current),Re("flowChart"))}},N?"\u7F16\u8F91":"\u9884\u89C8"))),y.createElement(b.Z,{close:!0,data:wt,type:wt!=null&&wt.length?st:"",style:se({},x),onClose:()=>Fe("")}))}},34728:function(Gt,it,S){"use strict";S.d(it,{SV:function(){return Et},ZP:function(){return je}});var y=S(59301),ue=S(76374);const xe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},pe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},H={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std",content:["using namespace std"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},m={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},ie={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var q=S(53184),o=S.n(q),K=(Qe,wt,Fe)=>new Promise((st,Re)=>{var we=Ie=>{try{He(Fe.next(Ie))}catch(De){Re(De)}},ce=Ie=>{try{He(Fe.throw(Ie))}catch(De){Re(De)}},He=Ie=>Ie.done?st(Ie.value):Promise.resolve(Ie.value).then(we,ce);He((Fe=Fe.apply(Qe,wt)).next())});const M={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},b=(Qe,wt,Fe,st)=>{const Re=wt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Fe.lineNumber,endColumn:Fe.column});return Array.from(new Set(Re.match(/\b\w{2,}\b/g)||[])).map(ce=>({label:ce,kind:Qe.languages.CompletionItemKind.Text,insertText:ce,range:st}))},E=(Qe,wt,Fe,st)=>{Qe.languages.registerCompletionItemProvider(wt,{provideCompletionItems(Re,we){const ce=Re.getWordUntilPosition(we),He={startLineNumber:we.lineNumber,endLineNumber:we.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},Ie=Re.getLineContent(we.lineNumber).substring(ce.startColumn-2,ce.endColumn);return{suggestions:[...b(Qe,Re,we,He),...Fe.map(L=>({label:L,kind:Qe.languages.CompletionItemKind.Keyword,documentation:L,insertText:L,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He})),...st.map(L=>({label:L.label,kind:Qe.languages.CompletionItemKind.Snippet,documentation:L.content,insertText:Ie.startsWith("#")?L.content.replace(/#/,""):L.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}))]}}})};var C=Qe=>{M.languages.forEach(wt=>{Qe.languages.registerDocumentFormattingEditProvider(wt,{provideDocumentFormattingEdits(Fe){return K(this,null,function*(){const st=o()(Fe.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Fe.getFullModelRange(),text:st}]})}})}),E(Qe,"java",pe.keywords,pe.quickKey),E(Qe,"cpp",H.keywords,H.quickKey),E(Qe,"c",xe.keywords,[]),E(Qe,"python",m.keywords,m.quickKey),E(Qe,"scala",ie.keywords,ie.quickKey)};const P="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ne=Object.defineProperty,te=(Qe,wt,Fe)=>wt in Qe?ne(Qe,wt,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Qe[wt]=Fe,V=(Qe,wt,Fe)=>te(Qe,typeof wt!="symbol"?wt+"":wt,Fe);const D=class xu{constructor(wt,Fe,st){this.placeholder=wt,this.editor=Fe,this.monaco=st,Fe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return xu.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};V(D,"ID","editor.widget.placeholderHint");var O=D,F=S(96236),se=S(6767),Ee=S(25399),he=S(78267),Ce=S(33156),Pe=S(56102),_e=Object.defineProperty,tt=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ae=(Qe,wt,Fe)=>wt in Qe?_e(Qe,wt,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Qe[wt]=Fe,le=(Qe,wt)=>{for(var Fe in wt||(wt={}))Y.call(wt,Fe)&&ae(Qe,Fe,wt[Fe]);if(N)for(var Fe of N(wt))oe.call(wt,Fe)&&ae(Qe,Fe,wt[Fe]);return Qe},x=(Qe,wt)=>tt(Qe,Q(wt)),A=(Qe,wt)=>{var Fe={};for(var st in Qe)Y.call(Qe,st)&&wt.indexOf(st)<0&&(Fe[st]=Qe[st]);if(Qe!=null&&N)for(var st of N(Qe))wt.indexOf(st)<0&&oe.call(Qe,st)&&(Fe[st]=Qe[st]);return Fe},W=(Qe,wt,Fe)=>new Promise((st,Re)=>{var we=Ie=>{try{He(Fe.next(Ie))}catch(De){Re(De)}},ce=Ie=>{try{He(Fe.throw(Ie))}catch(De){Re(De)}},He=Ie=>Ie.done?st(Ie.value):Promise.resolve(Ie.value).then(we,ce);He((Fe=Fe.apply(Qe,wt)).next())});function ge(Qe){return/^\d+$/.test(Qe)?`${Qe}px`:Qe}function Be(){}let Xe=!1;const Ve={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ze(Qe=[]){let wt=Qe;if(Array.isArray(Qe)){for(let Fe=0;Fe<Qe.length;Fe++){let st=Ve[Qe[Fe]];if(st)return st}return wt[0]}return Ve[wt]||wt}let $e=null;const qe=()=>W(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Qe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Qe)}});var je=Qe=>{var wt=Qe,{width:Fe="100%",height:st="100%",value:Re,language:we="javascript",style:ce={},options:He={},overrideServices:Ie={},theme:De="vs-dark",onEditBlur:L,isCopy:J=!1,onSave:me,autoHeight:Le=!1,forbidCopy:We=!1,forbidCopyTips:Je,onChange:et=Be,editorDidMount:nt=Be,onFocus:pt=Be,onBreakPoint:gt=Be,breakPointValue:mt=[],filename:St="educoder.txt",errorLine:Tt,errorContent:Ye="",highlightLine:vt,openBreakPoint:dt=!1,placeholder:ve="",showMiniMap:Ge=!0}=wt,_=A(wt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const w=(0,y.useRef)(),ye=(0,y.useRef)({}),B=(0,y.useRef)(),X=(0,y.useRef)(),lt=(0,y.useRef)([]),Se=(0,y.useRef)(!1),Ne=(0,y.useRef)(),ze=(0,y.useRef)(),z=(0,y.useRef)(!1),[Z,be]=(0,y.useState)(!1);function ke(){let Rt;return w.current&&(Rt=new ue.Z(kt=>{for(let qt of kt)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&ye.current.instance.layout()}),Rt.observe(w.current)),Rt}function G(){se.ZP.warning({content:decodeURIComponent(Je||P),key:"monaco-editor-tip"})}const ht=()=>{let Rt=ye.current.instance;if(Re!=null&&Rt&&Z){const kt=Rt.getModel();kt&&Re!==kt.getValue()&&(Xe=!0,kt.setValue(Re),Rt.layout(),Xe=!1)}};(0,y.useEffect)(()=>{const Rt=Ce.Z.subscribe("formatDocument",kt=>{var qt;let or=ye.current.instance;(qt=or==null?void 0:or.getAction)==null||qt.call(or,"editor.action.formatDocument").run()});return window.updateMonacoValue=kt=>{et(kt)},Rt},[]),(0,y.useEffect)(()=>{var Rt;let kt=ye.current.instance;X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{ht()},500),Re&&(Re!=null&&Re.length)&&((Rt=kt==null?void 0:kt.updateOptions)==null||Rt.call(kt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Re.split(/\r\n|\r|\n/g).length))+3,5)}))},[Re,Z,ye.current]),(0,y.useEffect)(()=>{if(Tt&&ye.current&&ye.current.instance){let kt=ye.current.instance;kt.changeViewZones(function(qt){var or=document.createElement("div");or.style.padding="10px 20px",or.style.width="calc(100% - 20px)",or.className="my-error-line-wrp",or.innerHTML=Ye,qt.addZone({afterLineNumber:Tt||11,heightInLines:3,domNode:or})});var Rt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};kt.addOverlayWidget(Rt),kt.revealPositionInCenter({lineNumber:20,column:1})}},[Tt,ye.current,Z]);const de=(Rt="",kt)=>{if(!Rt||Rt.trim()==="")return!0;const or=ye.current.instance.getModel().getLineTokens(kt);let Dr=!1;for(let nn=0;nn<2;nn++)or.getStandardTokenType(nn)===1&&(Dr=!0);return Dr};(0,y.useEffect)(()=>{var Rt;const kt=(Rt=ye.current)==null?void 0:Rt.instance;if(kt&&Z&&We){const qt=kt.onDidBlurEditorWidget(()=>{z.current=!1}),or=kt.onDidFocusEditorText(()=>{z.current=!0});return()=>{qt.dispose(),or.dispose()}}},[ye.current,Z,We]),(0,y.useEffect)(()=>{var Rt;if((Rt=ye.current)!=null&&Rt.instance&&Z&&dt){let kt=ye.current.instance,qt=kt.getModel();if(!qt)return;(()=>{var Rr;let $r=[],Br=[];const fn=qt.getAllDecorations();for(let xt of fn)xt.options.className==="highlighted-line"&&($r.push((Rr=xt==null?void 0:xt.range)==null?void 0:Rr.startLineNumber),Br.push(xt==null?void 0:xt.id));if(vt===$r[0])return;qt.deltaDecorations(Br,[]);const at=qt.getLineCount();vt&&vt<=at&&(kt.deltaDecorations([],[{range:new $e.Range(vt,1,vt,qt.getLineMaxColumn(vt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),kt.revealLineInCenter(vt))})();const Dr=(Rr=!1)=>{var $r;let Br=[],fn=[];const at=qt.getAllDecorations();for(let xt of at)xt.options.linesDecorationsClassName==="breakpoints-select"&&(Br.push(($r=xt==null?void 0:xt.range)==null?void 0:$r.startLineNumber),fn.push(xt==null?void 0:xt.id));if(Rr)return{lines:Br,ids:fn};gt(Br)},nn=Rr=>W(void 0,null,function*(){let $r={range:new $e.Range(Rr,1,Rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[$r]),Dr()}),tn=Rr=>W(void 0,null,function*(){let $r=[];const Br=kt.getLineDecorations(Rr);for(let fn of Br)fn.options.linesDecorationsClassName==="breakpoints-select"&&$r.push(fn.id);yield qt.deltaDecorations($r,[]),Dr()}),Yr=Rr=>{let $r=kt.getLineDecorations(Rr);for(let Br of $r)if(Br.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,he.isEqual)(mt,Dr(!0).lines)){qt.deltaDecorations(Dr(!0).ids,[]);const Rr=mt.map($r=>({range:new $e.Range($r,1,$r,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],Rr)}const Xr=kt.onDidChangeModelContent(Rr=>{let $r=kt.getPosition();if($r){let Br=$r.lineNumber;clearTimeout(ze.current),ze.current=setTimeout(()=>{de(qt.getLineContent(Br),Br)?tn(Br):Yr(Br)?(tn(Br),nn(Br)):Dr()},100)}}),Tr=kt.onMouseDown(Rr=>{var $r,Br,fn;if(Rr.target.detail&&((fn=(Br=($r=Rr.target)==null?void 0:$r.element)==null?void 0:Br.className)!=null&&fn.includes("line-numbers"))){let at=Rr.target.position.lineNumber;if(de(qt.getLineContent(at),at))return;Yr(at)?tn(at):nn(at)}}),vn=Rr=>{let $r={range:new $e.Range(Rr,1,Rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};lt.current=kt.deltaDecorations(lt.current,[$r])},Gr=()=>{lt.current=kt.deltaDecorations(lt.current,[])},Mn=kt.onMouseMove(Rr=>{var $r,Br,fn;if(Gr(),Rr.target.detail&&((fn=(Br=($r=Rr.target)==null?void 0:$r.element)==null?void 0:Br.className)!=null&&fn.includes("line-numbers"))){let at=Rr.target.position.lineNumber;if(de(qt.getLineContent(at),at))return;vn(at)}}),ln=kt.onMouseLeave(()=>{Gr()});return()=>{Xr.dispose(),Tr.dispose(),Mn.dispose(),ln.dispose()}}},[ye.current,Z,mt,vt,dt,we]),(0,y.useEffect)(()=>{var Rt;(Rt=ye.current)!=null&&Rt.instance&&dt&&ye.current.instance.setPosition({lineNumber:0,column:0})},[vt]);function At(){let Rt=ye.current.instance;if(Rt){const kt=Rt.getSelection(),qt=ye.current.pastePos||{},or=new $e.Range(qt.startLineNumber||kt.endLineNumber,qt.startColumn||kt.endColumn,qt.endLineNumber||kt.endLineNumber,qt.endColumn||kt.endColumn);setTimeout(()=>{Rt.executeEdits("",[{range:or,text:""}])},300)}}function $t(Rt){(window.navigator.platform.match("Mac")?Rt.metaKey:Rt.ctrlKey)&&Rt.keyCode==83&&(Rt.preventDefault(),me())}const Kt=()=>{if(Le&&ye.current.instance){const Rt=ye.current.instance.getContentHeight();wr(Rt<st?st:Rt)}else wr(st)};function ar(Rt){var kt=document.createEvent("MouseEvents");kt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Rt.dispatchEvent(kt)}const Qt=Rt=>{if(!z.current)return;const{keyCode:kt,ctrlKey:qt,metaKey:or,target:Dr,type:nn}=Rt;return(nn==="paste"||(kt===67||kt===86)&&(or||qt))&&Dr.nodeName==="TEXTAREA"&&(G(),Rt.preventDefault()),!1};function Zt(Rt,kt){var qt=window.URL||window.webkitURL||window,or=new Blob([kt]),Dr=document.createElementNS("http://www.w3.org/1999/xhtml","a");Dr.href=qt.createObjectURL(or),Dr.download=Rt,ar(Dr)}(0,y.useEffect)(()=>{Kt()},[Kt]),(0,y.useEffect)(()=>{w.current&&!Z&&Promise.all([S.e(8909),S.e(5977)]).then(S.bind(S,71448)).then(Rt=>{try{$e=Rt,ye.current.instance=$e.editor.create(w.current,{value:Re,language:Ze(we),theme:De,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ge||!1}},Ie);const kt=ye.current.instance;let Dr=[...F.BH._menuItems].find(Xr=>Xr[0]._debugName=="EditorContext")[1],nn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],tn=(Xr,Tr)=>{var vn,Gr;let Mn=Xr._first;do Tr.includes((Gr=(vn=Mn.element)==null?void 0:vn.command)==null?void 0:Gr.id)&&Xr._remove(Mn);while(Mn=Mn.next)};if(nt(kt,$e),setTimeout(()=>{Kt(),ye.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Zt(St||"educoder.txt",kt.getValue())}})},500),ye.current.subscription=kt.onDidChangeModelContent(Xr=>{Se.current?clearTimeout(Ne.current):(Kt(),et(kt.getValue(),Xr)),Ne.current=setTimeout(()=>{Se.current=!1},500)}),window.Monaco||C($e,Ze(we)),We&&(tn(Dr,nn),w.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Qt),window.removeEventListener("paste",Qt),window.addEventListener("keydown",Qt),window.addEventListener("paste",Qt)),window.Monaco=$e,L&&kt.onDidBlurEditorWidget(()=>{L(kt.getValue())}),pt&&kt.onDidFocusEditorText(()=>{We&&qe(),pt(kt.getValue())}),We){qe();try{kt.onDidPaste(Xr=>{const Tr=kt.getSelection(),vn=ye.current.pastePos||{},Gr=new $e.Range(vn.startLineNumber||Tr.endLineNumber,vn.startColumn||Tr.endColumn,vn.endLineNumber||Tr.endLineNumber,vn.endColumn||Tr.endColumn);kt.executeEdits("",[{range:Xr.range,text:""}])})}catch(Xr){}}let Yr=ke();return ve&&typeof ve=="string"&&new O(ve,kt,$e),be(!0),()=>{const Xr=ye.current.instance;Xr.dispose();const Tr=Xr.getModel();Tr&&Tr.dispose(),ye.current.subscription&&ye.current.subscription.dispose(),Yr.unobserve(w.current)}}catch(kt){}})},[]),(0,y.useEffect)(()=>{if(ye.current.instance&&Z)return document.addEventListener("keydown",$t,!1),()=>{document.removeEventListener("keydown",$t)}},[me,Z]),(0,y.useEffect)(()=>{let Rt=ye.current.instance;if(Rt&&Z){let kt=Ze(we);$e.editor.setModelLanguage(Rt.getModel(),kt)}},[we,Z]),(0,y.useEffect)(()=>{ye.current.instance&&Z&&$e.editor.setTheme(De)},[De,Z]),(0,y.useEffect)(()=>{let Rt=ye.current.instance;B.current=He,Rt&&Z&&(Rt.updateOptions(le({},He)),setTimeout(()=>{Rt.getModel().updateOptions(le({},He))},200))},[JSON.stringify(He),Z]),(0,y.useEffect)(()=>{let Rt=ye.current.instance;Rt&&Z&&Rt.layout()},[Fe,st,Z]);const[Sr,Nr]=(0,y.useState)(ge(Fe)),[Yt,wr]=(0,y.useState)(ge(st)),zt=x(le({},ce),{width:Sr,height:Yt,position:"relative"});return y.createElement("div",{className:"my-monaco-editor",ref:w,style:zt,onFocus:()=>{We&&qe()}},J&&y.createElement(Pe.CopyToClipboard,{text:Re,onCopy:()=>se.ZP.success("\u590D\u5236\u6210\u529F")},y.createElement(Ee.Z,{title:"\u590D\u5236\u4EE3\u7801"},y.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},y.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Et({width:Qe="100%",height:wt="100%",original:Fe,modified:st,language:Re,options:we={}}){const ce=(0,y.useRef)(),[He,Ie]=(0,y.useState)(null);function De(Le){let We;return ce.current&&(We=new ue.Z(Je=>{for(let et of Je)(et.target.offsetHeight>0||et.target.offsetWidth>0)&&Le.layout()}),We.observe(ce.current)),We}(0,y.useEffect)(()=>(ce.current&&Promise.all([S.e(8909),S.e(9404)]).then(S.bind(S,2550)).then(Le=>{$e=Le;const We=$e.editor.createDiffEditor(ce.current,x(le({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},we),{wordWrap:!0}));Ie(We);let Je=De(We);return()=>{We.dispose();const et=We.getModel();et&&et.dispose(),Je.unobserve(ce.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,y.useEffect)(()=>{He&&He.setModel({original:$e.editor.createModel(Fe,Re),modified:$e.editor.createModel(st,Re)})},[Fe,st,Re,He]);const L=ge(Qe),J=ge(wt),me={width:L,height:J};return y.createElement("div",{className:"my-diff-editor",ref:ce,style:me})}},58772:function(Gt,it,S){"use strict";S.r(it),S.d(it,{checkedOtherName:function(){return Be},default:function(){return Ze}});var y=S(59301),ue=S(44283),xe=S(93041),pe=S(24404),H=S(62957),m=S(6767),ie=S(77019),q=S(5269),o=S(89787),K=S(45685),M=S(25399),b={flex_box_center:"flex_box_center___iNvBA",flex_space_between:"flex_space_between___btrNY",flex_box_vertical_center:"flex_box_vertical_center___jNwqd",flex_box_center_end:"flex_box_center_end___yhhzS",flex_box_column:"flex_box_column___XCG9Z",bg:"bg___pkT5R",title:"title___txwwg",questionIcons:"questionIcons___bUmrp",green:"green___pU_n6",orange:"orange___WqPTj",greenTip:"greenTip___xA46L",redTip:"redTip___cLZrd",orangeTip:"orangeTip___IYw_9",pollDesc:"pollDesc___k8j8U",answered:"answered___Wv6LV",unanswer:"unanswer___HFr5V",anchor:"anchor___wiaGO",answerFlag:"answerFlag___Son3q",answerActive:"answerActive___vadIk",redactivie:"redactivie___lv5Yx",questionItem:"questionItem___eheF5",answerWrap:"answerWrap___q0vMa",answerSubjective:"answerSubjective___g0GxR",otherInput:"otherInput___lNi1t",submitButton:"submitButton___Kwl_S",flexRow:"flexRow___CzS9_",header_style:"header_style___IO875",header_content:"header_content___rvYNy",header_title:"header_title___vaUUE",header_button:"header_button___pO_DR",answerInfo:"answerInfo___pUCTt",answerProgress:"answerProgress___u6eCf",dottedLineWrapper:"dottedLineWrapper___OntUi",leftHalfCircle:"leftHalfCircle___W0Nay",dottedLine:"dottedLine___KvX72",rightHalfCircle:"rightHalfCircle___NshfJ",answerSheetWrap:"answerSheetWrap___slZzY",answerSheetQuestionTitle:"answerSheetQuestionTitle___VK50d",user_info:"user_info___nyGwf",user_label:"user_label___bAPw8",user_value:"user_value___pZ4rK",tag:"tag___yWlIO"},E=S(76406),C=S(77996),P=S(15267),ne=S(47889),te=S(37568),D=({itemData:$e,answerData:qe,onSave:je=()=>{}})=>{var Et,Qe,wt,Fe;const[st,Re]=(0,y.useState)([]),[we,ce]=(0,y.useState)(),[He,Ie]=(0,y.useState)();(0,y.useEffect)(()=>{var J;Re(((J=$e==null?void 0:$e.question)==null?void 0:J.answers)||[])},[(Et=$e==null?void 0:$e.question)==null?void 0:Et.answers]),(0,y.useEffect)(()=>{var J,me;ce((me=(J=$e==null?void 0:$e.question)==null?void 0:J.poll_answer_ids)==null?void 0:me[0])},[(Qe=$e==null?void 0:$e.question)==null?void 0:Qe.poll_answer_ids]),(0,y.useEffect)(()=>{var J;Ie((J=$e==null?void 0:$e.question)==null?void 0:J.poll_vote_texts)},[(wt=$e==null?void 0:$e.question)==null?void 0:wt.poll_vote_texts]);const De=(J,me)=>{var Le;ce(J);const We=(Le=st.find(Je=>Be(Je.answer_text)))==null?void 0:Le.answer_id;J===We?je(me,J,He):je(me,J,"")},L=J=>{var me;if(!we)return;const Le=(me=st.find(We=>Be(We.answer_text)))==null?void 0:me.answer_id;we===Le?je(J,we,He):je(J,we,"")};return y.createElement(ne.ZP.Group,{disabled:(0,P.GJ)()||(0,P.dE)()&&((Fe=qe==null?void 0:qe.poll)==null?void 0:Fe.user_poll_status)===1,value:we,onChange:J=>{var me;De(J.target.value,(me=$e==null?void 0:$e.question)==null?void 0:me.id)}},st.map((J,me)=>{var Le;return y.createElement("div",{className:`${b.answerWrap} ${b.flexRow}`,key:me},y.createElement(ne.ZP,{value:J==null?void 0:J.answer_id},J==null?void 0:J.answer_text),Be(J==null?void 0:J.answer_text)&&(J==null?void 0:J.answer_id)==we&&y.createElement("div",{style:{marginTop:"10px"}},y.createElement(te.default.TextArea,{disabled:(0,P.GJ)()||(0,P.dE)()&&((Le=qe==null?void 0:qe.poll)==null?void 0:Le.user_poll_status)===1,className:b.otherInput,value:He,onChange:We=>Ie(We.target.value),onBlur:We=>{var Je;return L((Je=$e==null?void 0:$e.question)==null?void 0:Je.id)}})))}))},j=S(62673),F=({itemData:$e,answerData:qe,onSave:je=()=>{}})=>{var Et,Qe,wt,Fe;const[st,Re]=(0,y.useState)([]),[we,ce]=(0,y.useState)(),[He,Ie]=(0,y.useState)();(0,y.useEffect)(()=>{var J;Re(((J=$e==null?void 0:$e.question)==null?void 0:J.answers)||[])},[(Et=$e==null?void 0:$e.question)==null?void 0:Et.answers]),(0,y.useEffect)(()=>{var J;ce((J=$e==null?void 0:$e.question)==null?void 0:J.poll_answer_ids)},[(Qe=$e==null?void 0:$e.question)==null?void 0:Qe.poll_answer_ids]),(0,y.useEffect)(()=>{var J;Ie((J=$e==null?void 0:$e.question)==null?void 0:J.poll_vote_texts)},[(wt=$e==null?void 0:$e.question)==null?void 0:wt.poll_vote_texts]);const De=(J,me)=>{var Le;ce(J);const We=(Le=st.find(Je=>Be(Je.answer_text)))==null?void 0:Le.answer_id;J.includes(We)?je(me,J,He):je(me,J,"")},L=J=>{var me;if(!(we!=null&&we.length))return;const Le=(me=st.find(We=>Be(We.answer_text)))==null?void 0:me.answer_id;we.includes(Le)?je(J,we,He):je(J,we,"")};return y.createElement(j.default.Group,{style:{display:"block"},disabled:(0,P.GJ)()||(0,P.dE)()&&((Fe=qe==null?void 0:qe.poll)==null?void 0:Fe.user_poll_status)===1,value:we,onChange:J=>{var me;De(J,(me=$e==null?void 0:$e.question)==null?void 0:me.id)}},st==null?void 0:st.map((J,me)=>{var Le;return y.createElement("div",{className:`${b.answerWrap} ${b.flexRow}`},y.createElement(j.default,{value:J==null?void 0:J.answer_id},J==null?void 0:J.answer_text),Be(J==null?void 0:J.answer_text)&&(we==null?void 0:we.includes(J==null?void 0:J.answer_id))&&y.createElement("div",{style:{marginTop:"10px"}},y.createElement(te.default.TextArea,{disabled:(0,P.GJ)()||(0,P.dE)()&&((Le=qe==null?void 0:qe.poll)==null?void 0:Le.user_poll_status)===1,className:b.otherInput,value:He,onChange:We=>Ie(We.target.value),onBlur:We=>{var Je;return L((Je=$e==null?void 0:$e.question)==null?void 0:Je.id)}})))}))},Ee=({itemData:$e,answerData:qe,onSave:je=()=>{}})=>{var Et,Qe;const[wt,Fe]=(0,y.useState)();return(0,y.useEffect)(()=>{var st;Fe((st=$e==null?void 0:$e.question)==null?void 0:st.poll_vote_texts)},[(Et=$e==null?void 0:$e.question)==null?void 0:Et.poll_vote_texts]),y.createElement("div",null,y.createElement("textarea",{className:b.answerSubjective,placeholder:"\u5728\u6B64\u586B\u5165\u7B54\u6848",disabled:(0,P.GJ)()||(0,P.dE)()&&((Qe=qe==null?void 0:qe.poll)==null?void 0:Qe.user_poll_status)===1,value:wt,onChange:st=>Fe(st.target.value),onBlur:st=>{var Re;return je((Re=$e==null?void 0:$e.question)==null?void 0:Re.id,null,wt)}}))},he=S(35883),Ce=S(15075),Pe=S(43531),_e=S(59301),tt=Object.defineProperty,Q=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,oe=($e,qe,je)=>qe in $e?tt($e,qe,{enumerable:!0,configurable:!0,writable:!0,value:je}):$e[qe]=je,ae=($e,qe)=>{for(var je in qe||(qe={}))N.call(qe,je)&&oe($e,je,qe[je]);if(Q)for(var je of Q(qe))Y.call(qe,je)&&oe($e,je,qe[je]);return $e},le=($e,qe)=>{var je={};for(var Et in $e)N.call($e,Et)&&qe.indexOf(Et)<0&&(je[Et]=$e[Et]);if($e!=null&&Q)for(var Et of Q($e))qe.indexOf(Et)<0&&Y.call($e,Et)&&(je[Et]=$e[Et]);return je},x=($e,qe,je)=>new Promise((Et,Qe)=>{var wt=Re=>{try{st(je.next(Re))}catch(we){Qe(we)}},Fe=Re=>{try{st(je.throw(Re))}catch(we){Qe(we)}},st=Re=>Re.done?Et(Re.value):Promise.resolve(Re.value).then(wt,Fe);st((je=je.apply($e,qe)).next())});const{SubMenu:A}=xe.default,{Content:W,Sider:ge}=pe.default,Be=$e=>$e==="\u5176\u4ED6"||$e==="\u5176\u5B83",Xe={1:"\u5355\u9009",2:"\u591A\u9009",3:"\u95EE\u7B54"},Ve=$e=>{var qe=$e,{globalSetting:je,loading:Et,user:Qe,dispatch:wt}=qe,Fe=le(qe,["globalSetting","loading","user","dispatch"]),st,Re,we,ce,He,Ie,De,L,J,me,Le,We,Je,et,nt,pt;const gt=(0,ue.useParams)(),[mt,St]=(0,y.useState)({}),[Tt,Ye]=(0,y.useState)(!1),[vt,dt]=(0,y.useState)([{id:1,name:"\u5355\u9009\u9898",open:!0},{id:2,name:"\u591A\u9009\u9898",open:!0},{id:3,name:"\u95EE\u7B54\u9898",open:!0}]);(0,y.useEffect)(()=>{ve()},[gt.categoryId]),(0,y.useEffect)(()=>(wt({type:"globalSetting/headerToggle",payload:!1}),wt({type:"globalSetting/footerToggle",payload:!1}),()=>{wt({type:"globalSetting/headerToggle",payload:!0}),wt({type:"globalSetting/footerToggle",payload:!0})}),[]);const ve=()=>x(void 0,null,function*(){var ye,B,X;const lt=yield(0,C.i7)(ae({},gt));lt&&(St(lt),dt([{id:1,name:"\u5355\u9009\u9898",open:!0,countSize:(ye=lt==null?void 0:lt.question_types)==null?void 0:ye.q_singles},{id:2,name:"\u591A\u9009\u9898",open:!0,countSize:(B=lt==null?void 0:lt.question_types)==null?void 0:B.q_doubles},{id:3,name:"\u95EE\u7B54\u9898",open:!0,countSize:(X=lt==null?void 0:lt.question_types)==null?void 0:X.q_mains}]))}),Ge=(ye,B,X)=>x(void 0,null,function*(){if(!ye){console.error("handleSave no questionId params");return}const lt=yield(0,C.ID)({questionId:ye,poll_answer_id:B,vote_text:X});lt!=null&<.poll_vote&&(mt.question_answered.find(Se=>Se.ques_id===ye).ques_status=lt.poll_vote.question_status,St(ae({},mt)))}),_=()=>{var ye;let B=0,X=0,lt=[],Se=[];if((ye=mt==null?void 0:mt.question_answered)==null||ye.map((Ne,ze)=>{var z,Z,be;(Ne==null?void 0:Ne.ques_status)===0&&(((be=(Z=(z=mt==null?void 0:mt.questions)==null?void 0:z.find(G=>{var ht;return((ht=G==null?void 0:G.question)==null?void 0:ht.id)===Ne.ques_id}))==null?void 0:Z.question)==null?void 0:be.is_necessary)===1?(lt.push(ze),B++):(Se.push(ze),X++))}),B>0){H.default.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",onOk:()=>{Ye(!0);const Ne=`Anchor_${lt[0]}`,Z=document.getElementById(Ne).getBoundingClientRect().top+window.pageYOffset+-100;window.scrollTo({top:Z,behavior:"smooth"})},content:_e.createElement("div",{className:"tc font16 c-black-333"},"\u6709 ",B," \u9898\u5FC5\u7B54\u9898\u672A\u7B54\uFF0C\u65E0\u6CD5\u63D0\u4EA4 ",_e.createElement("br",null),"\u8BF7\u5B8C\u6210\u5168\u90E8\u5FC5\u7B54\u9898\u540E\u518D\u63D0\u4EA4")});return}H.default.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:_e.createElement("div",{className:"tc font16 c-black-333"},X>0&&_e.createElement(_e.Fragment,null,"\u6709 ",X," \u9898\u672A\u7B54 ",_e.createElement("br",null)),"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:()=>{w();const Ne=`Anchor_${Se[0]}`,Z=document.getElementById(Ne).getBoundingClientRect().top+window.pageYOffset+-100;window.scrollTo({top:Z,behavior:"smooth"})}})},w=()=>x(void 0,null,function*(){const ye=yield(0,C.Ns)({categoryId:gt.categoryId});(ye==null?void 0:ye.status)===0&&(m.ZP.success(ye==null?void 0:ye.message),ue.history.push(`/classrooms/${gt.coursesId}/poll/${gt.categoryId}/detail?tabs=0`))});return _e.createElement("div",null,_e.createElement("section",{className:"edu-container"},_e.createElement("div",{style:{height:"64px"}}),((st=mt==null?void 0:mt.poll)==null?void 0:st.un_anonymous)===!1&&_e.createElement("div",{className:b.tag},_e.createElement("i",{className:"iconfont icon-weixiada"}),"\u5F53\u524D\u95EE\u5377\u4E3A\u533F\u540D\u95EE\u5377\uFF0C\u95EE\u5377\u63D0\u4EA4\u65F6\u5C06\u5BF9\u6BCF\u4E2A\u5B66\u751F\u7684\u59D3\u540D\u548C\u5B66\u53F7\u8FDB\u884C\u533F\u540D\u5904\u7406\uFF0C\u6559\u5E08\u65E0\u6CD5\u67E5\u770B\u5B66\u751F\u59D3\u540D\u548C\u5B66\u53F7\u3002"),_e.createElement("section",{className:"animated fadeIn"},((Re=mt==null?void 0:mt.poll)==null?void 0:Re.polls_description)&&_e.createElement(he.Z,{className:b.pollDesc,value:(we=mt==null?void 0:mt.poll)==null?void 0:we.polls_description})),_e.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},_e.createElement("div",{style:{margin:"20px 20px 20px 0",width:280,maxHeight:"60%"}},_e.createElement("div",{className:b.user_info},_e.createElement("div",{className:b.user_label,style:{lineHeight:"60px"}},"\u59D3\u540D",_e.createElement("span",{className:b.user_value},(ce=mt==null?void 0:mt.poll)==null?void 0:ce.real_name)),_e.createElement("div",{className:b.user_label,style:{lineHeight:"40px"}},"\u5B66\u53F7",_e.createElement("span",{className:b.user_value},(He=mt==null?void 0:mt.poll)==null?void 0:He.student_id))),_e.createElement("div",{style:{background:"#fff"}},_e.createElement("aside",{className:b.answerInfo},_e.createElement(ie.Z,{justify:"space-between"},_e.createElement(q.Z,null,"\u7B54\u9898\u8FDB\u5EA6"),_e.createElement(q.Z,{className:b.answerProgress},_e.createElement("span",{style:{color:"#165DFF"}},(De=(Ie=mt==null?void 0:mt.question_answered)==null?void 0:Ie.filter(ye=>(ye==null?void 0:ye.ques_status)===1))==null?void 0:De.length),_e.createElement("span",{style:{color:"#999999"}},"/",(L=mt==null?void 0:mt.question_types)==null?void 0:L.q_counts))),_e.createElement(ie.Z,null,_e.createElement(o.Z,{strokeColor:"#165dffa6",trailColor:"#0000000d",percent:((me=(J=mt==null?void 0:mt.question_answered)==null?void 0:J.filter(ye=>(ye==null?void 0:ye.ques_status)==1))==null?void 0:me.length)/((Le=mt==null?void 0:mt.question_types)==null?void 0:Le.q_counts)*100,showInfo:!1}))),_e.createElement(ie.Z,{className:b.dottedLineWrapper,align:"middle"},_e.createElement(q.Z,{className:b.leftHalfCircle}),_e.createElement(q.Z,{flex:1,className:b.dottedLine}),_e.createElement(q.Z,{className:b.rightHalfCircle})),_e.createElement("div",{className:b.answerSheetWrap},vt==null?void 0:vt.map((ye,B)=>{var X;let lt=0;return _e.createElement("div",{key:B},(ye==null?void 0:ye.countSize)>0&&_e.createElement("div",{className:b.answerSheetQuestionTitle,onClick:()=>{vt[B].open=!(ye!=null&&ye.open),dt([...vt])}},ye!=null&&ye.open?_e.createElement(Ce.Z,null):_e.createElement(Pe.Z,null),_e.createElement("span",{className:"ml5 c-grey-666"},ye==null?void 0:ye.name)),(ye==null?void 0:ye.open)&&_e.createElement("div",null,(X=mt==null?void 0:mt.questions)==null?void 0:X.map((Se,Ne)=>{var ze,z,Z;if(((ze=Se==null?void 0:Se.question)==null?void 0:ze.question_type)==(ye==null?void 0:ye.id))return _e.createElement(K.default.Link,{className:`${b.answerFlag} ${((Z=(z=mt==null?void 0:mt.question_answered)==null?void 0:z[Ne])==null?void 0:Z.ques_status)==1?b.answerActive:Tt&&Se.question.is_necessary===1?b.redactivie:""}`,href:`#Anchor_${Ne}`,title:++lt})})),_e.createElement("div",{style:{clear:"both"}}))})))),_e.createElement("section",{style:{width:900},className:[b.bg,"pt10","pl30","pr30","pb30","mt20","mb50"].join(" ")},_e.createElement("div",null,(We=mt==null?void 0:mt.questions)==null?void 0:We.map((ye,B)=>{var X,lt,Se,Ne,ze;return _e.createElement("div",{className:b.questionItem,id:`Anchor_${B}`},_e.createElement("div",{className:"mt20"},_e.createElement("span",{className:"font16",style:{display:"flex",alignItems:"center",marginBottom:"20px"}},((X=ye==null?void 0:ye.question)==null?void 0:X.is_necessary)!==0&&_e.createElement("span",{style:{color:"red",fontSize:"14px"}},"*"),_e.createElement("span",{className:"c-blue font16"},"\u3010",Xe[ye.question.question_type],"\u3011"),_e.createElement(M.Z,{title:ye.question.question_title},_e.createElement("div",{className:b.title},(lt=ye==null?void 0:ye.question)==null?void 0:lt.question_number,"\u3001",ye.question.question_title)),ye.question.question_type===2&&((Se=ye==null?void 0:ye.question)==null?void 0:Se.min_choices)&&_e.createElement("div",{className:"ml10",style:{fontWeight:400,color:"#666666"}},"(\u53EF\u9009",(Ne=ye==null?void 0:ye.question)==null?void 0:Ne.min_choices,"-",(ze=ye==null?void 0:ye.question)==null?void 0:ze.max_choices,"\u9879)"))),ye.question.question_type==1&&_e.createElement(D,{answerData:mt,itemData:ye,onSave:Ge}),ye.question.question_type==2&&_e.createElement(F,{answerData:mt,itemData:ye,onSave:Ge}),ye.question.question_type==3&&_e.createElement(Ee,{answerData:mt,itemData:ye,onSave:Ge}))}))))),_e.createElement("div",{className:b.header_style},_e.createElement("div",{className:b.header_content},_e.createElement(E.VV,{status:[E.L4[(Je=mt==null?void 0:mt.poll)==null?void 0:Je.poll_status]]}),_e.createElement(M.Z,{title:(et=mt==null?void 0:mt.poll)==null?void 0:et.polls_name},_e.createElement("div",{className:b.header_title},(nt=mt==null?void 0:mt.poll)==null?void 0:nt.polls_name)),(0,P.dE)()&&((pt=mt==null?void 0:mt.poll)==null?void 0:pt.user_poll_status)===0&&_e.createElement("div",{className:b.header_button,onClick:_},"\u63D0\u4EA4\u95EE\u5377"))))};var Ze=(0,ue.connect)(({loading:$e,user:qe,globalSetting:je})=>({globalSetting:je,user:qe,loading:$e.effects}))(Ve)},20047:function(Gt,it,S){"use strict";S.d(it,{AL:function(){return O},Iy:function(){return M},Qv:function(){return C},ez:function(){return j},jb:function(){return b}});var y=S(32834),ue=S.n(y),xe=S(11690),pe=S.n(xe);let H=1;function m(Ce,Pe){const _e=Ce.match(/^(\s+)(?:```)/);if(_e===null)return Pe;const tt=_e[1];return Pe.split(`
|
|
`).map(Q=>{const N=Q.match(/^\s+/);if(N===null)return Q;const[Y]=N;return Y.length>=tt.length?Q.slice(tt.length):Q}).join(`
|
|
`)}let ie=[],q=["<ul>"];const o=new(ue()).Renderer,K=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function M(){ie.length=0,q=["<ul>"]}const b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(Ce,Pe,_e,tt){if(Pe>=Ce.length||Ce[Pe].level<=_e)return Pe;var Q=Ce[Pe];tt.push("<li><a href='#"+H+Q.anchor+"'>"+Q.text+"</a>"),Pe++;var N=[];return Pe=E(Ce,Pe,Q.level,N),N.length>0&&(tt.push("<ul>"),N.forEach(function(Y){tt.push(Y)}),tt.push("</ul>")),tt.push("</li>"),Pe=E(Ce,Pe,_e,tt),Pe}function C(){return E(ie,0,0,q),q.push("</ul>"),q.join("")}const P={heading(Ce){const Pe=K.exec(Ce);if(H+=1,Pe)return{type:"heading",raw:Pe[0],depth:Pe[1].length,text:Pe[2]}},fences(Ce){const Pe=this.rules.block.fences.exec(Ce);if(Pe){const _e=Pe[0];let tt=m(_e,Pe[3]||"");const Q=Pe[2]?Pe[2].trim():Pe[2];if(["latex","katex","math"].indexOf(Q)>=0){const N=V(),Y=tt;tt=N,D[N]={type:"block",expression:Y}}return{type:"code",raw:_e,lang:Q,text:tt}}}},ne=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let te=0;const V=()=>`__special_katext_id_${te++}__`;let D={};function j(){return D}function O(){te=0,D={}}function F(Ce){return Ce=Ce.replace(ne,(Pe,_e)=>{const tt=V();return D[tt]={type:"inline",expression:_e},tt}),Ce}const se=o.listitem;o.listitem=function(Ce){return se(F(Ce))};const Ee=o.paragraph;o.paragraph=function(Ce){return Ee(F(Ce))};const he=o.tablecell;o.tablecell=function(Ce,Pe){return he(F(Ce),Pe)},o.code=function(Ce,Pe,_e){const tt=(Pe||"").match(/\S*/)[0];return tt?["latex","katex","math"].indexOf(tt)>=0?`<p class='editormd-tex'>${Ce}</p>`:`<pre class="prettyprint linenums"><code class="language-${Pe}">${_e?Ce:(0,xe.escape)(Ce,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(_e?Ce:(0,xe.escape)(Ce,!0))+"</code></pre>"},o.heading=function(Ce,Pe,_e){let tt=this.options.headerPrefix+_e.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:tt,level:Pe,text:Ce}),"<h"+Pe+' id="'+H+tt+'">'+Ce+"</h"+Pe+">"},ue().setOptions({silent:!0,gfm:!0,pedantic:!1}),ue().use({tokenizer:P,renderer:o}),it.ZP=ue()},29509:function(Gt,it,S){"use strict";S.d(it,{o2:function(){return H},yT:function(){return m}});var y=S(77654),ue=S(34998);const xe=ue.i.map(ie=>`${ie}-inverse`),pe=["success","processing","error","default","warning"];function H(ie){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,y.Z)(xe),(0,y.Z)(ue.i)).includes(ie):ue.i.includes(ie)}function m(ie){return pe.includes(ie)}},99402:function(Gt,it,S){"use strict";S.d(it,{T:function(){return ue},n:function(){return y}});function y(xe){return["small","middle","large"].includes(xe)}function ue(xe){return xe?typeof xe=="number"&&!Number.isNaN(xe):!1}},86013:function(Gt,it,S){"use strict";var y=S(59301),ue=S(19248);const xe=pe=>{let H;return typeof pe=="object"&&(pe!=null&&pe.clearIcon)?H=pe:pe&&(H={clearIcon:y.createElement(ue.Z,null)}),H};it.Z=xe},97224:function(Gt,it,S){"use strict";S.d(it,{F:function(){return y}});function y(xe){return xe!=null&&xe===xe.window}const ue=xe=>{var pe,H;if(typeof window=="undefined")return 0;let m=0;return y(xe)?m=xe.pageYOffset:xe instanceof Document?m=xe.documentElement.scrollTop:(xe instanceof HTMLElement||xe)&&(m=xe.scrollTop),xe&&!y(xe)&&typeof m!="number"&&(m=(H=((pe=xe.ownerDocument)!==null&&pe!==void 0?pe:xe).documentElement)===null||H===void 0?void 0:H.scrollTop),m};it.Z=ue},52838:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return m}});var y=S(37645);function ue(ie,q,o,K){if(K===!1)return{adjustX:!1,adjustY:!1};const M=K&&typeof K=="object"?K:{},b={};switch(ie){case"top":case"bottom":b.shiftX=q.arrowOffsetHorizontal*2+o,b.shiftY=!0,b.adjustY=!0;break;case"left":case"right":b.shiftY=q.arrowOffsetVertical*2+o,b.shiftX=!0,b.adjustX=!0;break}const E=Object.assign(Object.assign({},b),M);return E.shiftX||(E.adjustX=!0),E.shiftY||(E.adjustY=!0),E}const xe={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"]}},pe={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"]}},H=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function m(ie){const{arrowWidth:q,autoAdjustOverflow:o,arrowPointAtCenter:K,offset:M,borderRadius:b,visibleFirst:E}=ie,C=q/2,P={};return Object.keys(xe).forEach(ne=>{const te=K&&pe[ne]||xe[ne],V=Object.assign(Object.assign({},te),{offset:[0,0],dynamicInset:!0});switch(P[ne]=V,H.has(ne)&&(V.autoArrow=!1),ne){case"top":case"topLeft":case"topRight":V.offset[1]=-C-M;break;case"bottom":case"bottomLeft":case"bottomRight":V.offset[1]=C+M;break;case"left":case"leftTop":case"leftBottom":V.offset[0]=-C-M;break;case"right":case"rightTop":case"rightBottom":V.offset[0]=C+M;break}const D=(0,y.wZ)({contentRadius:b,limitVerticalRadius:!0});if(K)switch(ne){case"topLeft":case"bottomLeft":V.offset[0]=-D.arrowOffsetHorizontal-C;break;case"topRight":case"bottomRight":V.offset[0]=D.arrowOffsetHorizontal+C;break;case"leftTop":case"rightTop":V.offset[1]=-D.arrowOffsetHorizontal*2+C;break;case"leftBottom":case"rightBottom":V.offset[1]=D.arrowOffsetHorizontal*2-C;break}V.overflow=ue(ne,D,q,o),E&&(V.htmlRegion="visibleFirst")}),P}},83010:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return pe}});var y=S(16089);function ue(H,m,ie,q){const o=ie-m;return H/=q/2,H<1?o/2*H*H*H+m:o/2*((H-=2)*H*H+2)+m}var xe=S(97224);function pe(H){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ie=()=>window,callback:q,duration:o=450}=m,K=ie(),M=(0,xe.Z)(K),b=Date.now(),E=()=>{const P=Date.now()-b,ne=ue(P>o?o:P,M,H,o);(0,xe.F)(K)?K.scrollTo(window.pageXOffset,ne):K instanceof Document||K.constructor.name==="HTMLDocument"?K.documentElement.scrollTop=ne:K.scrollTop=ne,P<o?(0,y.Z)(E):typeof q=="function"&&q()};(0,y.Z)(E)}},82855:function(Gt,it,S){"use strict";S.d(it,{F:function(){return H},Z:function(){return pe}});var y=S(92310),ue=S.n(y);const xe=null;function pe(m,ie,q){return ue()({[`${m}-status-success`]:ie==="success",[`${m}-status-warning`]:ie==="warning",[`${m}-status-error`]:ie==="error",[`${m}-status-validating`]:ie==="validating",[`${m}-has-feedback`]:q})}const H=(m,ie)=>ie||m},41780:function(Gt,it,S){"use strict";var y=S(77654),ue=S(16089);function xe(pe){let H;const m=q=>()=>{H=null,pe.apply(void 0,(0,y.Z)(q))},ie=function(){if(H==null){for(var q=arguments.length,o=new Array(q),K=0;K<q;K++)o[K]=arguments[K];H=(0,ue.Z)(m(o))}};return ie.cancel=()=>{ue.Z.cancel(H),H=null},ie}it.Z=xe},48608:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return j}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(29301),H=S(41780),m=S(48755),ie=S(16931);const q=O=>{const{componentCls:F}=O;return{[F]:{position:"fixed",zIndex:O.zIndexPopup}}},o=O=>({zIndexPopup:O.zIndexBase+10});var K=(0,ie.I$)("Affix",q,o);function M(O){return O!==window?O.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function b(O,F,se){if(se!==void 0&&Math.round(F.top)>Math.round(O.top)-se)return se+F.top}function E(O,F,se){if(se!==void 0&&Math.round(F.bottom)<Math.round(O.bottom)+se){const Ee=window.innerHeight-F.bottom;return se+Ee}}var C=function(O,F){var se={};for(var Ee in O)Object.prototype.hasOwnProperty.call(O,Ee)&&F.indexOf(Ee)<0&&(se[Ee]=O[Ee]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ee=Object.getOwnPropertySymbols(O);he<Ee.length;he++)F.indexOf(Ee[he])<0&&Object.prototype.propertyIsEnumerable.call(O,Ee[he])&&(se[Ee[he]]=O[Ee[he]]);return se};const P=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function ne(){return typeof window!="undefined"?window:null}const te=0,V=1;var j=y.forwardRef((O,F)=>{var se;const{style:Ee,offsetTop:he,offsetBottom:Ce,prefixCls:Pe,className:_e,rootClassName:tt,children:Q,target:N,onChange:Y,onTestUpdatePosition:oe}=O,ae=C(O,["style","offsetTop","offsetBottom","prefixCls","className","rootClassName","children","target","onChange","onTestUpdatePosition"]),{getPrefixCls:le,getTargetContainer:x}=y.useContext(m.E_),A=le("affix",Pe),[W,ge]=y.useState(!1),[Be,Xe]=y.useState(),[Ve,Ze]=y.useState(),$e=y.useRef(te),qe=y.useRef(null),je=y.useRef(null),Et=y.useRef(null),Qe=y.useRef(null),wt=y.useRef(null),Fe=(se=N!=null?N:x)!==null&&se!==void 0?se:ne,st=Ce===void 0&&he===void 0?0:he,Re=()=>{if($e.current!==V||!Qe.current||!Et.current||!Fe)return;const Je=Fe();if(Je){const et={status:te},nt=M(Et.current);if(nt.top===0&&nt.left===0&&nt.width===0&&nt.height===0)return;const pt=M(Je),gt=b(nt,pt,st),mt=E(nt,pt,Ce);gt!==void 0?(et.affixStyle={position:"fixed",top:gt,width:nt.width,height:nt.height},et.placeholderStyle={width:nt.width,height:nt.height}):mt!==void 0&&(et.affixStyle={position:"fixed",bottom:mt,width:nt.width,height:nt.height},et.placeholderStyle={width:nt.width,height:nt.height}),et.lastAffix=!!et.affixStyle,W!==et.lastAffix&&(Y==null||Y(et.lastAffix)),$e.current=et.status,Xe(et.affixStyle),Ze(et.placeholderStyle),ge(et.lastAffix)}},we=()=>{$e.current=V,Re()},ce=(0,H.Z)(()=>{we()}),He=(0,H.Z)(()=>{if(Fe&&Be){const Je=Fe();if(Je&&Et.current){const et=M(Je),nt=M(Et.current),pt=b(nt,et,st),gt=E(nt,et,Ce);if(pt!==void 0&&Be.top===pt||gt!==void 0&&Be.bottom===gt)return}}we()}),Ie=()=>{const Je=Fe==null?void 0:Fe();Je&&(P.forEach(et=>{var nt;je.current&&((nt=qe.current)===null||nt===void 0||nt.removeEventListener(et,je.current)),Je==null||Je.addEventListener(et,He)}),qe.current=Je,je.current=He)},De=()=>{wt.current&&(clearTimeout(wt.current),wt.current=null);const Je=Fe==null?void 0:Fe();P.forEach(et=>{var nt;Je==null||Je.removeEventListener(et,He),je.current&&((nt=qe.current)===null||nt===void 0||nt.removeEventListener(et,je.current))}),ce.cancel(),He.cancel()};y.useImperativeHandle(F,()=>({updatePosition:ce})),y.useEffect(()=>(wt.current=setTimeout(Ie),()=>De()),[]),y.useEffect(()=>{Ie()},[N,Be,W]),y.useEffect(()=>{ce()},[N,he,Ce]);const[L,J,me]=K(A),Le=xe()(tt,J,A,me),We=xe()({[Le]:Be});return L(y.createElement(pe.Z,{onResize:ce},y.createElement("div",Object.assign({style:Ee,className:_e,ref:Et},ae),Be&&y.createElement("div",{style:Ve,"aria-hidden":"true"}),y.createElement("div",{className:We,ref:Qe,style:Be},y.createElement(pe.Z,{onResize:ce},Q)))))})},45685:function(Gt,it,S){"use strict";S.d(it,{default:function(){return Q}});var y=S(77654),ue=S(59301),xe=S(92310),pe=S.n(xe),H=S(6089),m=S(16722),ie=S(97224),q=S(83010),o=S(48608),K=S(48755),M=S(83397),E=ue.createContext(void 0),P=N=>{const{href:Y,title:oe,prefixCls:ae,children:le,className:x,target:A,replace:W}=N,ge=ue.useContext(E),{registerLink:Be,unregisterLink:Xe,scrollTo:Ve,onClick:Ze,activeLink:$e,direction:qe}=ge||{};ue.useEffect(()=>(Be==null||Be(Y),()=>{Xe==null||Xe(Y)}),[Y]);const je=Re=>{Ze==null||Ze(Re,{title:oe,href:Y}),Ve==null||Ve(Y),W&&(Re.preventDefault(),window.location.replace(Y))},{getPrefixCls:Et}=ue.useContext(K.E_),Qe=Et("anchor",ae),wt=$e===Y,Fe=pe()(`${Qe}-link`,x,{[`${Qe}-link-active`]:wt}),st=pe()(`${Qe}-link-title`,{[`${Qe}-link-title-active`]:wt});return ue.createElement("div",{className:Fe},ue.createElement("a",{className:st,href:Y,title:typeof oe=="string"?oe:"",target:A,onClick:je},oe),qe!=="horizontal"?le:null)},ne=S(36237),te=S(63356),V=S(16931),D=S(51636);const j=N=>{const{componentCls:Y,holderOffsetBlock:oe,motionDurationSlow:ae,lineWidthBold:le,colorPrimary:x,lineType:A,colorSplit:W,calc:ge}=N;return{[`${Y}-wrapper`]:{marginBlockStart:ge(oe).mul(-1).equal(),paddingBlockStart:oe,[Y]:Object.assign(Object.assign({},(0,te.Wf)(N)),{position:"relative",paddingInlineStart:le,[`${Y}-link`]:{paddingBlock:N.linkPaddingBlock,paddingInline:`${(0,ne.unit)(N.linkPaddingInlineStart)} 0`,"&-title":Object.assign(Object.assign({},te.vS),{position:"relative",display:"block",marginBlockEnd:N.anchorTitleBlock,color:N.colorText,transition:`all ${N.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${Y}-link-title`]:{color:N.colorPrimary},[`${Y}-link`]:{paddingBlock:N.anchorPaddingBlockSecondary}}}),[`&:not(${Y}-wrapper-horizontal)`]:{[Y]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${(0,ne.unit)(le)} ${A} ${W}`,content:'" "'},[`${Y}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${ae} ease-in-out`,width:le,backgroundColor:x,[`&${Y}-ink-visible`]:{display:"inline-block"}}}},[`${Y}-fixed ${Y}-ink ${Y}-ink`]:{display:"none"}}}},O=N=>{const{componentCls:Y,motionDurationSlow:oe,lineWidthBold:ae,colorPrimary:le}=N;return{[`${Y}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`${(0,ne.unit)(N.lineWidth)} ${N.lineType} ${N.colorSplit}`,content:'" "'},[Y]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${Y}-link:first-of-type`]:{paddingInline:0},[`${Y}-ink`]:{position:"absolute",bottom:0,transition:`left ${oe} ease-in-out, width ${oe} ease-in-out`,height:ae,backgroundColor:le}}}}},F=N=>({linkPaddingBlock:N.paddingXXS,linkPaddingInlineStart:N.padding});var se=(0,V.I$)("Anchor",N=>{const{fontSize:Y,fontSizeLG:oe,paddingXXS:ae,calc:le}=N,x=(0,D.mergeToken)(N,{holderOffsetBlock:ae,anchorPaddingBlockSecondary:le(ae).div(2).equal(),anchorTitleBlock:le(Y).div(14).mul(3).equal(),anchorBallSize:le(oe).div(2).equal()});return[j(x),O(x)]},F);function Ee(){return window}function he(N,Y){if(!N.getClientRects().length)return 0;const oe=N.getBoundingClientRect();return oe.width||oe.height?Y===window?oe.top-N.ownerDocument.documentElement.clientTop:oe.top-Y.getBoundingClientRect().top:oe.top}const Ce=/#([\S ]+)$/;var _e=N=>{var Y;const{rootClassName:oe,prefixCls:ae,className:le,style:x,offsetTop:A,affix:W=!0,showInkInFixed:ge=!1,children:Be,items:Xe,direction:Ve="vertical",bounds:Ze,targetOffset:$e,onClick:qe,onChange:je,getContainer:Et,getCurrentAnchor:Qe,replace:wt}=N,[Fe,st]=ue.useState([]),[Re,we]=ue.useState(null),ce=ue.useRef(Re),He=ue.useRef(null),Ie=ue.useRef(null),De=ue.useRef(!1),{direction:L,getPrefixCls:J,className:me,style:Le}=(0,K.dj)("anchor"),{getTargetContainer:We}=ue.useContext(K.E_),Je=J("anchor",ae),et=(0,M.Z)(Je),[nt,pt,gt]=se(Je,et),mt=(Y=Et!=null?Et:We)!==null&&Y!==void 0?Y:Ee,St=JSON.stringify(Fe),Tt=(0,H.Z)(z=>{Fe.includes(z)||st(Z=>[].concat((0,y.Z)(Z),[z]))}),Ye=(0,H.Z)(z=>{Fe.includes(z)&&st(Z=>Z.filter(be=>be!==z))}),vt=()=>{var z;const Z=(z=He.current)===null||z===void 0?void 0:z.querySelector(`.${Je}-link-title-active`);if(Z&&Ie.current){const{style:be}=Ie.current,ke=Ve==="horizontal";be.top=ke?"":`${Z.offsetTop+Z.clientHeight/2}px`,be.height=ke?"":`${Z.clientHeight}px`,be.left=ke?`${Z.offsetLeft}px`:"",be.width=ke?`${Z.clientWidth}px`:"",ke&&(0,m.Z)(Z,{scrollMode:"if-needed",block:"nearest"})}},dt=function(z){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5;const ke=[],G=mt();return z.forEach(ht=>{const de=Ce.exec(ht==null?void 0:ht.toString());if(!de)return;const At=document.getElementById(de[1]);if(At){const $t=he(At,G);$t<=Z+be&&ke.push({link:ht,top:$t})}}),ke.length?ke.reduce((de,At)=>At.top>de.top?At:de).link:""},ve=(0,H.Z)(z=>{if(ce.current===z)return;const Z=typeof Qe=="function"?Qe(z):z;we(Z),ce.current=Z,je==null||je(z)}),Ge=ue.useCallback(()=>{if(De.current)return;const z=dt(Fe,$e!==void 0?$e:A||0,Ze);ve(z)},[St,$e,A]),_=ue.useCallback(z=>{ve(z);const Z=Ce.exec(z);if(!Z)return;const be=document.getElementById(Z[1]);if(!be)return;const ke=mt(),G=(0,ie.Z)(ke),ht=he(be,ke);let de=G+ht;de-=$e!==void 0?$e:A||0,De.current=!0,(0,q.Z)(de,{getContainer:mt,callback(){De.current=!1}})},[$e,A]),w=pe()(pt,gt,et,oe,`${Je}-wrapper`,{[`${Je}-wrapper-horizontal`]:Ve==="horizontal",[`${Je}-rtl`]:L==="rtl"},le,me),ye=pe()(Je,{[`${Je}-fixed`]:!W&&!ge}),B=pe()(`${Je}-ink`,{[`${Je}-ink-visible`]:Re}),X=Object.assign(Object.assign({maxHeight:A?`calc(100vh - ${A}px)`:"100vh"},Le),x),lt=z=>Array.isArray(z)?z.map(Z=>ue.createElement(P,Object.assign({replace:wt},Z,{key:Z.key}),Ve==="vertical"&<(Z.children))):null,Se=ue.createElement("div",{ref:He,className:w,style:X},ue.createElement("div",{className:ye},ue.createElement("span",{className:B,ref:Ie}),"items"in N?lt(Xe):Be));ue.useEffect(()=>{const z=mt();return Ge(),z==null||z.addEventListener("scroll",Ge),()=>{z==null||z.removeEventListener("scroll",Ge)}},[St]),ue.useEffect(()=>{typeof Qe=="function"&&ve(Qe(ce.current||""))},[Qe]),ue.useEffect(()=>{vt()},[Ve,Qe,St,Re]);const Ne=ue.useMemo(()=>({registerLink:Tt,unregisterLink:Ye,scrollTo:_,activeLink:Re,onClick:qe,direction:Ve}),[Re,qe,_,Ve]),ze=W&&typeof W=="object"?W:void 0;return nt(ue.createElement(E.Provider,{value:Ne},W?ue.createElement(o.Z,Object.assign({offsetTop:A,target:mt},ze),Se):Se))};const tt=_e;tt.Link=P;var Q=tt},62673:function(Gt,it,S){"use strict";S.d(it,{default:function(){return Ce}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(16632),H=S(8654),m=S(12919),ie=S(63872),q=S(48755),o=S(2171),K=S(83397),M=S(56553),E=y.createContext(null),C=S(36170),P=S(74632),ne=function(Pe,_e){var tt={};for(var Q in Pe)Object.prototype.hasOwnProperty.call(Pe,Q)&&_e.indexOf(Q)<0&&(tt[Q]=Pe[Q]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,Q=Object.getOwnPropertySymbols(Pe);N<Q.length;N++)_e.indexOf(Q[N])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Q[N])&&(tt[Q[N]]=Pe[Q[N]]);return tt};const te=(Pe,_e)=>{var tt;const{prefixCls:Q,className:N,rootClassName:Y,children:oe,indeterminate:ae=!1,style:le,onMouseEnter:x,onMouseLeave:A,skipGroup:W=!1,disabled:ge}=Pe,Be=ne(Pe,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Xe,direction:Ve,checkbox:Ze}=y.useContext(q.E_),$e=y.useContext(E),{isFormItemInput:qe}=y.useContext(M.aM),je=y.useContext(o.Z),Et=(tt=($e==null?void 0:$e.disabled)||ge)!==null&&tt!==void 0?tt:je,Qe=y.useRef(Be.value),wt=y.useRef(null),Fe=(0,H.sQ)(_e,wt);y.useEffect(()=>{$e==null||$e.registerValue(Be.value)},[]),y.useEffect(()=>{if(!W)return Be.value!==Qe.current&&($e==null||$e.cancelValue(Qe.current),$e==null||$e.registerValue(Be.value),Qe.current=Be.value),()=>$e==null?void 0:$e.cancelValue(Be.value)},[Be.value]),y.useEffect(()=>{var Le;!((Le=wt.current)===null||Le===void 0)&&Le.input&&(wt.current.input.indeterminate=ae)},[ae]);const st=Xe("checkbox",Q),Re=(0,K.Z)(st),[we,ce,He]=(0,C.ZP)(st,Re),Ie=Object.assign({},Be);$e&&!W&&(Ie.onChange=function(){Be.onChange&&Be.onChange.apply(Be,arguments),$e.toggleOption&&$e.toggleOption({label:oe,value:Be.value})},Ie.name=$e.name,Ie.checked=$e.value.includes(Be.value));const De=xe()(`${st}-wrapper`,{[`${st}-rtl`]:Ve==="rtl",[`${st}-wrapper-checked`]:Ie.checked,[`${st}-wrapper-disabled`]:Et,[`${st}-wrapper-in-form-item`]:qe},Ze==null?void 0:Ze.className,N,Y,He,Re,ce),L=xe()({[`${st}-indeterminate`]:ae},ie.A,ce),[J,me]=(0,P.Z)(Ie.onClick);return we(y.createElement(m.Z,{component:"Checkbox",disabled:Et},y.createElement("label",{className:De,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),le),onMouseEnter:x,onMouseLeave:A,onClick:J},y.createElement(pe.Z,Object.assign({},Ie,{onClick:me,prefixCls:st,className:L,disabled:Et,ref:Fe})),oe!==void 0&&y.createElement("span",{className:`${st}-label`},oe))))};var D=y.forwardRef(te),j=S(77654),O=S(2738),F=function(Pe,_e){var tt={};for(var Q in Pe)Object.prototype.hasOwnProperty.call(Pe,Q)&&_e.indexOf(Q)<0&&(tt[Q]=Pe[Q]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,Q=Object.getOwnPropertySymbols(Pe);N<Q.length;N++)_e.indexOf(Q[N])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Q[N])&&(tt[Q[N]]=Pe[Q[N]]);return tt},Ee=y.forwardRef((Pe,_e)=>{const{defaultValue:tt,children:Q,options:N=[],prefixCls:Y,className:oe,rootClassName:ae,style:le,onChange:x}=Pe,A=F(Pe,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:W,direction:ge}=y.useContext(q.E_),[Be,Xe]=y.useState(A.value||tt||[]),[Ve,Ze]=y.useState([]);y.useEffect(()=>{"value"in A&&Xe(A.value||[])},[A.value]);const $e=y.useMemo(()=>N.map(L=>typeof L=="string"||typeof L=="number"?{label:L,value:L}:L),[N]),qe=L=>{Ze(J=>J.filter(me=>me!==L))},je=L=>{Ze(J=>[].concat((0,j.Z)(J),[L]))},Et=L=>{const J=Be.indexOf(L.value),me=(0,j.Z)(Be);J===-1?me.push(L.value):me.splice(J,1),"value"in A||Xe(me),x==null||x(me.filter(Le=>Ve.includes(Le)).sort((Le,We)=>{const Je=$e.findIndex(nt=>nt.value===Le),et=$e.findIndex(nt=>nt.value===We);return Je-et}))},Qe=W("checkbox",Y),wt=`${Qe}-group`,Fe=(0,K.Z)(Qe),[st,Re,we]=(0,C.ZP)(Qe,Fe),ce=(0,O.Z)(A,["value","disabled"]),He=N.length?$e.map(L=>y.createElement(D,{prefixCls:Qe,key:L.value.toString(),disabled:"disabled"in L?L.disabled:A.disabled,value:L.value,checked:Be.includes(L.value),onChange:L.onChange,className:`${wt}-item`,style:L.style,title:L.title,id:L.id,required:L.required},L.label)):Q,Ie={toggleOption:Et,value:Be,disabled:A.disabled,name:A.name,registerValue:je,cancelValue:qe},De=xe()(wt,{[`${wt}-rtl`]:ge==="rtl"},oe,ae,we,Fe,Re);return st(y.createElement("div",Object.assign({className:De,style:le},ce,{ref:_e}),y.createElement(E.Provider,{value:Ie},He)))});const he=D;he.Group=Ee,he.__ANT_CHECKBOX=!0;var Ce=he},36170:function(Gt,it,S){"use strict";S.d(it,{C2:function(){return m}});var y=S(36237),ue=S(63356),xe=S(51636),pe=S(16931);const H=ie=>{const{checkboxCls:q}=ie,o=`${q}-wrapper`;return[{[`${q}-group`]:Object.assign(Object.assign({},(0,ue.Wf)(ie)),{display:"inline-flex",flexWrap:"wrap",columnGap:ie.marginXS,[`> ${ie.antCls}-row`]:{flex:1}}),[o]:Object.assign(Object.assign({},(0,ue.Wf)(ie)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${o}`]:{marginInlineStart:0},[`&${o}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[q]:Object.assign(Object.assign({},(0,ue.Wf)(ie)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ie.borderRadiusSM,alignSelf:"center",[`${q}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${q}-inner`]:Object.assign({},(0,ue.oN)(ie))},[`${q}-inner`]:{boxSizing:"border-box",display:"block",width:ie.checkboxSize,height:ie.checkboxSize,direction:"ltr",backgroundColor:ie.colorBgContainer,border:`${(0,y.unit)(ie.lineWidth)} ${ie.lineType} ${ie.colorBorder}`,borderRadius:ie.borderRadiusSM,borderCollapse:"separate",transition:`all ${ie.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:ie.calc(ie.checkboxSize).div(14).mul(5).equal(),height:ie.calc(ie.checkboxSize).div(14).mul(8).equal(),border:`${(0,y.unit)(ie.lineWidthBold)} solid ${ie.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ie.motionDurationFast} ${ie.motionEaseInBack}, opacity ${ie.motionDurationFast}`}},"& + span":{paddingInlineStart:ie.paddingXS,paddingInlineEnd:ie.paddingXS}})},{[`
|
|
${o}:not(${o}-disabled),
|
|
${q}:not(${q}-disabled)
|
|
`]:{[`&:hover ${q}-inner`]:{borderColor:ie.colorPrimary}},[`${o}:not(${o}-disabled)`]:{[`&:hover ${q}-checked:not(${q}-disabled) ${q}-inner`]:{backgroundColor:ie.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${q}-checked:not(${q}-disabled):after`]:{borderColor:ie.colorPrimaryHover}}},{[`${q}-checked`]:{[`${q}-inner`]:{backgroundColor:ie.colorPrimary,borderColor:ie.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ie.motionDurationMid} ${ie.motionEaseOutBack} ${ie.motionDurationFast}`}}},[`
|
|
${o}-checked:not(${o}-disabled),
|
|
${q}-checked:not(${q}-disabled)
|
|
`]:{[`&:hover ${q}-inner`]:{backgroundColor:ie.colorPrimaryHover,borderColor:"transparent"}}},{[q]:{"&-indeterminate":{[`${q}-inner`]:{backgroundColor:`${ie.colorBgContainer} !important`,borderColor:`${ie.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:ie.calc(ie.fontSizeLG).div(2).equal(),height:ie.calc(ie.fontSizeLG).div(2).equal(),backgroundColor:ie.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${q}-inner`]:{backgroundColor:`${ie.colorBgContainer} !important`,borderColor:`${ie.colorPrimary} !important`}}}},{[`${o}-disabled`]:{cursor:"not-allowed"},[`${q}-disabled`]:{[`&, ${q}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${q}-inner`]:{background:ie.colorBgContainerDisabled,borderColor:ie.colorBorder,"&:after":{borderColor:ie.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ie.colorTextDisabled},[`&${q}-indeterminate ${q}-inner::after`]:{background:ie.colorTextDisabled}}}]};function m(ie,q){const o=(0,xe.mergeToken)(q,{checkboxCls:`.${ie}`,checkboxSize:q.controlInteractiveSize});return[H(o)]}it.ZP=(0,pe.I$)("Checkbox",(ie,q)=>{let{prefixCls:o}=q;return[m(o,ie)]})},74632:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return xe}});var y=S(59301),ue=S(16089);function xe(pe){const H=y.useRef(null),m=()=>{ue.Z.cancel(H.current),H.current=null};return[()=>{m(),H.current=(0,ue.Z)(()=>{H.current=null})},o=>{H.current&&(o.stopPropagation(),m()),pe==null||pe(o)}]}},24971:function(Gt,it,S){"use strict";var y=S(59301),ue=S(56553),xe=S(48755);const pe=function(H,m){let ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var q,o;const{variant:K,[H]:M}=y.useContext(xe.E_),b=y.useContext(ue.pg),E=M==null?void 0:M.variant;let C;typeof m!="undefined"?C=m:ie===!1?C="borderless":C=(o=(q=b!=null?b:E)!==null&&q!==void 0?q:K)!==null&&o!==void 0?o:"outlined";const P=xe.tr.includes(C);return[C,P]};it.Z=pe},49397:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return O}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(36901),H=S(8654),m=S(62487),ie=S(86013),q=S(82855),o=S(48755),K=S(2171),M=S(83397),b=S(31756),E=S(56553),C=S(24971),P=S(70045),ne=S(23826),te=S(53075);function V(F){return!!(F.prefix||F.suffix||F.allowClear||F.showCount)}var D=function(F,se){var Ee={};for(var he in F)Object.prototype.hasOwnProperty.call(F,he)&&se.indexOf(he)<0&&(Ee[he]=F[he]);if(F!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ce=0,he=Object.getOwnPropertySymbols(F);Ce<he.length;Ce++)se.indexOf(he[Ce])<0&&Object.prototype.propertyIsEnumerable.call(F,he[Ce])&&(Ee[he[Ce]]=F[he[Ce]]);return Ee},O=(0,y.forwardRef)((F,se)=>{const{prefixCls:Ee,bordered:he=!0,status:Ce,size:Pe,disabled:_e,onBlur:tt,onFocus:Q,suffix:N,allowClear:Y,addonAfter:oe,addonBefore:ae,className:le,style:x,styles:A,rootClassName:W,onChange:ge,classNames:Be,variant:Xe}=F,Ve=D(F,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:Ze,direction:$e,allowClear:qe,autoComplete:je,className:Et,style:Qe,classNames:wt,styles:Fe}=(0,o.dj)("input"),st=Ze("input",Ee),Re=(0,y.useRef)(null),we=(0,M.Z)(st),[ce,He,Ie]=(0,te.TI)(st,W),[De]=(0,te.ZP)(st,we),{compactSize:L,compactItemClassnames:J}=(0,P.ri)(st,$e),me=(0,b.Z)(w=>{var ye;return(ye=Pe!=null?Pe:L)!==null&&ye!==void 0?ye:w}),Le=y.useContext(K.Z),We=_e!=null?_e:Le,{status:Je,hasFeedback:et,feedbackIcon:nt}=(0,y.useContext)(E.aM),pt=(0,q.F)(Je,Ce),gt=V(F)||!!et,mt=(0,y.useRef)(gt),St=(0,ne.Z)(Re,!0),Tt=w=>{St(),tt==null||tt(w)},Ye=w=>{St(),Q==null||Q(w)},vt=w=>{St(),ge==null||ge(w)},dt=(et||N)&&y.createElement(y.Fragment,null,N,et&&nt),ve=(0,ie.Z)(Y!=null?Y:qe),[Ge,_]=(0,C.Z)("input",Xe,he);return ce(De(y.createElement(pe.default,Object.assign({ref:(0,H.sQ)(se,Re),prefixCls:st,autoComplete:je},Ve,{disabled:We,onBlur:Tt,onFocus:Ye,style:Object.assign(Object.assign({},Qe),x),styles:Object.assign(Object.assign({},Fe),A),suffix:dt,allowClear:ve,className:xe()(le,W,Ie,we,J,Et),onChange:vt,addonBefore:ae&&y.createElement(m.Z,{form:!0,space:!0},ae),addonAfter:oe&&y.createElement(m.Z,{form:!0,space:!0},oe),classNames:Object.assign(Object.assign(Object.assign({},Be),wt),{input:xe()({[`${st}-sm`]:me==="small",[`${st}-lg`]:me==="large",[`${st}-rtl`]:$e==="rtl"},Be==null?void 0:Be.input,wt.input,He),variant:xe()({[`${st}-${Ge}`]:_},(0,q.Z)(st,pt)),affixWrapper:xe()({[`${st}-affix-wrapper-sm`]:me==="small",[`${st}-affix-wrapper-lg`]:me==="large",[`${st}-affix-wrapper-rtl`]:$e==="rtl"},He),wrapper:xe()({[`${st}-group-rtl`]:$e==="rtl"},He),groupWrapper:xe()({[`${st}-group-wrapper-sm`]:me==="small",[`${st}-group-wrapper-lg`]:me==="large",[`${st}-group-wrapper-rtl`]:$e==="rtl",[`${st}-group-wrapper-${Ge}`]:_},(0,q.Z)(`${st}-group-wrapper`,pt,et),He)})}))))})},79809:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return se}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(22711),H=S(86013),m=S(82855),ie=S(48755),q=S(2171),o=S(83397),K=S(31756),M=S(56553),b=S(24971),E=S(70045),C=S(30292),P=S(53075),ne=S(16931),te=S(51636),V=S(64910);const D=Ee=>{const{componentCls:he,paddingLG:Ce}=Ee,Pe=`${he}-textarea`;return{[`textarea${he}`]:{maxWidth:"100%",height:"auto",minHeight:Ee.controlHeight,lineHeight:Ee.lineHeight,verticalAlign:"bottom",transition:`all ${Ee.motionDurationSlow}`,resize:"vertical",[`&${he}-mouse-active`]:{transition:`all ${Ee.motionDurationSlow}, height 0s, width 0s`}},[`${he}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Pe]:{position:"relative","&-show-count":{[`> ${he}`]:{height:"100%"},[`${he}-data-count`]:{position:"absolute",bottom:Ee.calc(Ee.fontSize).mul(Ee.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:Ee.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
&-allow-clear > ${he},
|
|
&-affix-wrapper${Pe}-has-feedback ${he}
|
|
`]:{paddingInlineEnd:Ce},[`&-affix-wrapper${he}-affix-wrapper`]:{padding:0,[`> textarea${he}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:Ee.calc(Ee.controlHeight).sub(Ee.calc(Ee.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${he}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${he}-clear-icon`]:{position:"absolute",insetInlineEnd:Ee.paddingInline,insetBlockStart:Ee.paddingXS},[`${Pe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ee.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${he}-affix-wrapper-sm`]:{[`${he}-suffix`]:{[`${he}-clear-icon`]:{insetInlineEnd:Ee.paddingInlineSM}}}}}};var j=(0,ne.I$)(["Input","TextArea"],Ee=>{const he=(0,te.mergeToken)(Ee,(0,V.e)(Ee));return[D(he)]},V.T,{resetFont:!1}),O=function(Ee,he){var Ce={};for(var Pe in Ee)Object.prototype.hasOwnProperty.call(Ee,Pe)&&he.indexOf(Pe)<0&&(Ce[Pe]=Ee[Pe]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Pe=Object.getOwnPropertySymbols(Ee);_e<Pe.length;_e++)he.indexOf(Pe[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Pe[_e])&&(Ce[Pe[_e]]=Ee[Pe[_e]]);return Ce},se=(0,y.forwardRef)((Ee,he)=>{var Ce;const{prefixCls:Pe,bordered:_e=!0,size:tt,disabled:Q,status:N,allowClear:Y,classNames:oe,rootClassName:ae,className:le,style:x,styles:A,variant:W,showCount:ge,onMouseDown:Be,onResize:Xe}=Ee,Ve=O(Ee,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:Ze,direction:$e,allowClear:qe,autoComplete:je,className:Et,style:Qe,classNames:wt,styles:Fe}=(0,ie.dj)("textArea"),st=y.useContext(q.Z),Re=Q!=null?Q:st,{status:we,hasFeedback:ce,feedbackIcon:He}=y.useContext(M.aM),Ie=(0,m.F)(we,N),De=y.useRef(null);y.useImperativeHandle(he,()=>{var _;return{resizableTextArea:(_=De.current)===null||_===void 0?void 0:_.resizableTextArea,focus:w=>{var ye,B;(0,C.nH)((B=(ye=De.current)===null||ye===void 0?void 0:ye.resizableTextArea)===null||B===void 0?void 0:B.textArea,w)},blur:()=>{var w;return(w=De.current)===null||w===void 0?void 0:w.blur()}}});const L=Ze("input",Pe),J=(0,o.Z)(L),[me,Le,We]=(0,P.TI)(L,ae),[Je]=j(L,J),{compactSize:et,compactItemClassnames:nt}=(0,E.ri)(L,$e),pt=(0,K.Z)(_=>{var w;return(w=tt!=null?tt:et)!==null&&w!==void 0?w:_}),[gt,mt]=(0,b.Z)("textArea",W,_e),St=(0,H.Z)(Y!=null?Y:qe),[Tt,Ye]=y.useState(!1),[vt,dt]=y.useState(!1),ve=_=>{Ye(!0),Be==null||Be(_);const w=()=>{Ye(!1),document.removeEventListener("mouseup",w)};document.addEventListener("mouseup",w)},Ge=_=>{var w,ye;if(Xe==null||Xe(_),Tt&&typeof getComputedStyle=="function"){const B=(ye=(w=De.current)===null||w===void 0?void 0:w.nativeElement)===null||ye===void 0?void 0:ye.querySelector("textarea");B&&getComputedStyle(B).resize==="both"&&dt(!0)}};return me(Je(y.createElement(pe.default,Object.assign({autoComplete:je},Ve,{style:Object.assign(Object.assign({},Qe),x),styles:Object.assign(Object.assign({},Fe),A),disabled:Re,allowClear:St,className:xe()(We,J,le,ae,nt,Et,vt&&`${L}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},oe),wt),{textarea:xe()({[`${L}-sm`]:pt==="small",[`${L}-lg`]:pt==="large"},Le,oe==null?void 0:oe.textarea,wt.textarea,Tt&&`${L}-mouse-active`),variant:xe()({[`${L}-${gt}`]:mt},(0,m.Z)(L,Ie)),affixWrapper:xe()(`${L}-textarea-affix-wrapper`,{[`${L}-affix-wrapper-rtl`]:$e==="rtl",[`${L}-affix-wrapper-sm`]:pt==="small",[`${L}-affix-wrapper-lg`]:pt==="large",[`${L}-textarea-show-count`]:ge||((Ce=Ee.count)===null||Ce===void 0?void 0:Ce.show)},Le)}),prefixCls:L,suffix:ce&&y.createElement("span",{className:`${L}-textarea-suffix`},He),showCount:ge,ref:De,onResize:Ge,onMouseDown:ve}))))})},23826:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return ue}});var y=S(59301);function ue(xe,pe){const H=(0,y.useRef)([]),m=()=>{H.current.push(setTimeout(()=>{var ie,q,o,K;!((ie=xe.current)===null||ie===void 0)&&ie.input&&((q=xe.current)===null||q===void 0?void 0:q.input.getAttribute("type"))==="password"&&(!((o=xe.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((K=xe.current)===null||K===void 0||K.input.removeAttribute("value"))}))};return(0,y.useEffect)(()=>(pe&&m(),()=>H.current.forEach(ie=>{ie&&clearTimeout(ie)})),[]),m}},37568:function(Gt,it,S){"use strict";S.d(it,{default:function(){return wt}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(48755),H=S(56553),m=S(53075),q=Fe=>{const{getPrefixCls:st,direction:Re}=(0,y.useContext)(pe.E_),{prefixCls:we,className:ce}=Fe,He=st("input-group",we),Ie=st("input"),[De,L,J]=(0,m.ZP)(Ie),me=xe()(He,J,{[`${He}-lg`]:Fe.size==="large",[`${He}-sm`]:Fe.size==="small",[`${He}-compact`]:Fe.compact,[`${He}-rtl`]:Re==="rtl"},L,ce),Le=(0,y.useContext)(H.aM),We=(0,y.useMemo)(()=>Object.assign(Object.assign({},Le),{isFormItemInput:!1}),[Le]);return De(y.createElement("span",{className:me,style:Fe.style,onMouseEnter:Fe.onMouseEnter,onMouseLeave:Fe.onMouseLeave,onFocus:Fe.onFocus,onBlur:Fe.onBlur},y.createElement(H.aM.Provider,{value:We},Fe.children)))},o=S(49397),K=S(77654),M=S(6089),b=S(26112),E=S(82855),C=S(31756),P=S(16931),ne=S(51636),te=S(64910);const V=Fe=>{const{componentCls:st,paddingXS:Re}=Fe;return{[st]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Re,"&-rtl":{direction:"rtl"},[`${st}-input`]:{textAlign:"center",paddingInline:Fe.paddingXXS},[`&${st}-sm ${st}-input`]:{paddingInline:Fe.calc(Fe.paddingXXS).div(2).equal()},[`&${st}-lg ${st}-input`]:{paddingInline:Fe.paddingXS}}}};var D=(0,P.I$)(["Input","OTP"],Fe=>{const st=(0,ne.mergeToken)(Fe,(0,te.e)(Fe));return[V(st)]},te.T),j=S(16089),O=function(Fe,st){var Re={};for(var we in Fe)Object.prototype.hasOwnProperty.call(Fe,we)&&st.indexOf(we)<0&&(Re[we]=Fe[we]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,we=Object.getOwnPropertySymbols(Fe);ce<we.length;ce++)st.indexOf(we[ce])<0&&Object.prototype.propertyIsEnumerable.call(Fe,we[ce])&&(Re[we[ce]]=Fe[we[ce]]);return Re},se=y.forwardRef((Fe,st)=>{const{value:Re,onChange:we,onActiveChange:ce,index:He,mask:Ie}=Fe,De=O(Fe,["value","onChange","onActiveChange","index","mask"]),L=Re&&typeof Ie=="string"?Ie:Re,J=et=>{we(He,et.target.value)},me=y.useRef(null);y.useImperativeHandle(st,()=>me.current);const Le=()=>{(0,j.Z)(()=>{var et;const nt=(et=me.current)===null||et===void 0?void 0:et.input;document.activeElement===nt&&nt&&nt.select()})},We=et=>{const{key:nt,ctrlKey:pt,metaKey:gt}=et;nt==="ArrowLeft"?ce(He-1):nt==="ArrowRight"?ce(He+1):nt==="z"&&(pt||gt)&&et.preventDefault(),Le()},Je=et=>{et.key==="Backspace"&&!Re&&ce(He-1),Le()};return y.createElement(o.Z,Object.assign({type:Ie===!0?"password":"text"},De,{ref:me,value:L,onInput:J,onFocus:Le,onKeyDown:We,onKeyUp:Je,onMouseDown:Le,onMouseUp:Le}))}),Ee=function(Fe,st){var Re={};for(var we in Fe)Object.prototype.hasOwnProperty.call(Fe,we)&&st.indexOf(we)<0&&(Re[we]=Fe[we]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,we=Object.getOwnPropertySymbols(Fe);ce<we.length;ce++)st.indexOf(we[ce])<0&&Object.prototype.propertyIsEnumerable.call(Fe,we[ce])&&(Re[we[ce]]=Fe[we[ce]]);return Re};function he(Fe){return(Fe||"").split("")}const Ce=Fe=>{const{index:st,prefixCls:Re,separator:we}=Fe,ce=typeof we=="function"?we(st):we;return ce?y.createElement("span",{className:`${Re}-separator`},ce):null};var _e=y.forwardRef((Fe,st)=>{const{prefixCls:Re,length:we=6,size:ce,defaultValue:He,value:Ie,onChange:De,formatter:L,separator:J,variant:me,disabled:Le,status:We,autoFocus:Je,mask:et,type:nt,onInput:pt,inputMode:gt}=Fe,mt=Ee(Fe,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:St,direction:Tt}=y.useContext(pe.E_),Ye=St("otp",Re),vt=(0,b.Z)(mt,{aria:!0,data:!0,attr:!0}),[dt,ve,Ge]=D(Ye),_=(0,C.Z)(ht=>ce!=null?ce:ht),w=y.useContext(H.aM),ye=(0,E.F)(w.status,We),B=y.useMemo(()=>Object.assign(Object.assign({},w),{status:ye,hasFeedback:!1,feedbackIcon:null}),[w,ye]),X=y.useRef(null),lt=y.useRef({});y.useImperativeHandle(st,()=>({focus:()=>{var ht;(ht=lt.current[0])===null||ht===void 0||ht.focus()},blur:()=>{var ht;for(let de=0;de<we;de+=1)(ht=lt.current[de])===null||ht===void 0||ht.blur()},nativeElement:X.current}));const Se=ht=>L?L(ht):ht,[Ne,ze]=y.useState(()=>he(Se(He||"")));y.useEffect(()=>{Ie!==void 0&&ze(he(Ie))},[Ie]);const z=(0,M.Z)(ht=>{ze(ht),pt&&pt(ht),De&&ht.length===we&&ht.every(de=>de)&&ht.some((de,At)=>Ne[At]!==de)&&De(ht.join(""))}),Z=(0,M.Z)((ht,de)=>{let At=(0,K.Z)(Ne);for(let Kt=0;Kt<ht;Kt+=1)At[Kt]||(At[Kt]="");de.length<=1?At[ht]=de:At=At.slice(0,ht).concat(he(de)),At=At.slice(0,we);for(let Kt=At.length-1;Kt>=0&&!At[Kt];Kt-=1)At.pop();const $t=Se(At.map(Kt=>Kt||" ").join(""));return At=he($t).map((Kt,ar)=>Kt===" "&&!At[ar]?At[ar]:Kt),At}),be=(ht,de)=>{var At;const $t=Z(ht,de),Kt=Math.min(ht+de.length,we-1);Kt!==ht&&$t[ht]!==void 0&&((At=lt.current[Kt])===null||At===void 0||At.focus()),z($t)},ke=ht=>{var de;(de=lt.current[ht])===null||de===void 0||de.focus()},G={variant:me,disabled:Le,status:ye,mask:et,type:nt,inputMode:gt};return dt(y.createElement("div",Object.assign({},vt,{ref:X,className:xe()(Ye,{[`${Ye}-sm`]:_==="small",[`${Ye}-lg`]:_==="large",[`${Ye}-rtl`]:Tt==="rtl"},Ge,ve)}),y.createElement(H.aM.Provider,{value:B},Array.from({length:we}).map((ht,de)=>{const At=`otp-${de}`,$t=Ne[de]||"";return y.createElement(y.Fragment,{key:At},y.createElement(se,Object.assign({ref:Kt=>{lt.current[de]=Kt},index:de,size:_,htmlSize:1,className:`${Ye}-input`,onChange:be,value:$t,onActiveChange:ke,autoFocus:de===0&&Je},G)),de<we-1&&y.createElement(Ce,{separator:J,index:de,prefixCls:Ye}))}))))}),tt=S(73331),Q=S(15277),N=S(2738),Y=S(8654),oe=S(2171),ae=S(23826),le=function(Fe,st){var Re={};for(var we in Fe)Object.prototype.hasOwnProperty.call(Fe,we)&&st.indexOf(we)<0&&(Re[we]=Fe[we]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,we=Object.getOwnPropertySymbols(Fe);ce<we.length;ce++)st.indexOf(we[ce])<0&&Object.prototype.propertyIsEnumerable.call(Fe,we[ce])&&(Re[we[ce]]=Fe[we[ce]]);return Re};const x=Fe=>Fe?y.createElement(Q.Z,null):y.createElement(tt.Z,null),A={click:"onClick",hover:"onMouseOver"};var ge=y.forwardRef((Fe,st)=>{const{disabled:Re,action:we="click",visibilityToggle:ce=!0,iconRender:He=x}=Fe,Ie=y.useContext(oe.Z),De=Re!=null?Re:Ie,L=typeof ce=="object"&&ce.visible!==void 0,[J,me]=(0,y.useState)(()=>L?ce.visible:!1),Le=(0,y.useRef)(null);y.useEffect(()=>{L&&me(ce.visible)},[L,ce]);const We=(0,ae.Z)(Le),Je=()=>{var _;if(De)return;J&&We();const w=!J;me(w),typeof ce=="object"&&((_=ce.onVisibleChange)===null||_===void 0||_.call(ce,w))},et=_=>{const w=A[we]||"",ye=He(J),B={[w]:Je,className:`${_}-icon`,key:"passwordIcon",onMouseDown:X=>{X.preventDefault()},onMouseUp:X=>{X.preventDefault()}};return y.cloneElement(y.isValidElement(ye)?ye:y.createElement("span",null,ye),B)},{className:nt,prefixCls:pt,inputPrefixCls:gt,size:mt}=Fe,St=le(Fe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Tt}=y.useContext(pe.E_),Ye=Tt("input",gt),vt=Tt("input-password",pt),dt=ce&&et(vt),ve=xe()(vt,nt,{[`${vt}-${mt}`]:!!mt}),Ge=Object.assign(Object.assign({},(0,N.Z)(St,["suffix","iconRender","visibilityToggle"])),{type:J?"text":"password",className:ve,prefixCls:Ye,suffix:dt});return mt&&(Ge.size=mt),y.createElement(o.Z,Object.assign({ref:(0,Y.sQ)(st,Le)},Ge))}),Be=S(47472),Xe=S(22703),Ve=S(7939),Ze=S(70045),$e=function(Fe,st){var Re={};for(var we in Fe)Object.prototype.hasOwnProperty.call(Fe,we)&&st.indexOf(we)<0&&(Re[we]=Fe[we]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,we=Object.getOwnPropertySymbols(Fe);ce<we.length;ce++)st.indexOf(we[ce])<0&&Object.prototype.propertyIsEnumerable.call(Fe,we[ce])&&(Re[we[ce]]=Fe[we[ce]]);return Re},je=y.forwardRef((Fe,st)=>{const{prefixCls:Re,inputPrefixCls:we,className:ce,size:He,suffix:Ie,enterButton:De=!1,addonAfter:L,loading:J,disabled:me,onSearch:Le,onChange:We,onCompositionStart:Je,onCompositionEnd:et}=Fe,nt=$e(Fe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:pt,direction:gt}=y.useContext(pe.E_),mt=y.useRef(!1),St=pt("input-search",Re),Tt=pt("input",we),{compactSize:Ye}=(0,Ze.ri)(St,gt),vt=(0,C.Z)(be=>{var ke;return(ke=He!=null?He:Ye)!==null&&ke!==void 0?ke:be}),dt=y.useRef(null),ve=be=>{be!=null&&be.target&&be.type==="click"&&Le&&Le(be.target.value,be,{source:"clear"}),We==null||We(be)},Ge=be=>{var ke;document.activeElement===((ke=dt.current)===null||ke===void 0?void 0:ke.input)&&be.preventDefault()},_=be=>{var ke,G;Le&&Le((G=(ke=dt.current)===null||ke===void 0?void 0:ke.input)===null||G===void 0?void 0:G.value,be,{source:"input"})},w=be=>{mt.current||J||_(be)},ye=typeof De=="boolean"?y.createElement(Be.Z,null):null,B=`${St}-button`;let X;const lt=De||{},Se=lt.type&<.type.__ANT_BUTTON===!0;Se||lt.type==="button"?X=(0,Xe.Tm)(lt,Object.assign({onMouseDown:Ge,onClick:be=>{var ke,G;(G=(ke=lt==null?void 0:lt.props)===null||ke===void 0?void 0:ke.onClick)===null||G===void 0||G.call(ke,be),_(be)},key:"enterButton"},Se?{className:B,size:vt}:{})):X=y.createElement(Ve.ZP,{className:B,type:De?"primary":void 0,size:vt,disabled:me,key:"enterButton",onMouseDown:Ge,onClick:_,loading:J,icon:ye},De),L&&(X=[X,(0,Xe.Tm)(L,{key:"addonAfter"})]);const Ne=xe()(St,{[`${St}-rtl`]:gt==="rtl",[`${St}-${vt}`]:!!vt,[`${St}-with-button`]:!!De},ce),ze=Object.assign(Object.assign({},nt),{className:Ne,prefixCls:Tt,type:"search"}),z=be=>{mt.current=!0,Je==null||Je(be)},Z=be=>{mt.current=!1,et==null||et(be)};return y.createElement(o.Z,Object.assign({ref:(0,Y.sQ)(dt,st),onPressEnter:w},ze,{size:vt,onCompositionStart:z,onCompositionEnd:Z,addonAfter:X,suffix:Ie,onChange:ve,disabled:me}))}),Et=S(79809);const Qe=o.Z;Qe.Group=q,Qe.Search=je,Qe.TextArea=Et.Z,Qe.Password=ge,Qe.OTP=_e;var wt=Qe},53075:function(Gt,it,S){"use strict";S.d(it,{TI:function(){return j},ik:function(){return b},nz:function(){return q},s7:function(){return E},x0:function(){return M}});var y=S(36237),ue=S(63356),xe=S(56119),pe=S(16931),H=S(51636),m=S(64910),ie=S(39082);const q=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0,backgroundColor:O.activeBg}),K=O=>{const{paddingBlockLG:F,lineHeightLG:se,borderRadiusLG:Ee,paddingInlineLG:he}=O;return{padding:`${(0,y.unit)(F)} ${(0,y.unit)(he)}`,fontSize:O.inputFontSizeLG,lineHeight:se,borderRadius:Ee}},M=O=>({padding:`${(0,y.unit)(O.paddingBlockSM)} ${(0,y.unit)(O.paddingInlineSM)}`,fontSize:O.inputFontSizeSM,borderRadius:O.borderRadiusSM}),b=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,y.unit)(O.paddingBlock)} ${(0,y.unit)(O.paddingInline)}`,color:O.colorText,fontSize:O.inputFontSize,lineHeight:O.lineHeight,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},q(O.colorTextPlaceholder)),{"&-lg":Object.assign({},K(O)),"&-sm":Object.assign({},M(O)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),E=O=>{const{componentCls:F,antCls:se}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${F}, &-lg > ${F}-group-addon`]:Object.assign({},K(O)),[`&-sm ${F}, &-sm > ${F}-group-addon`]:Object.assign({},M(O)),[`&-lg ${se}-select-single ${se}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${se}-select-single ${se}-select-selector`]:{height:O.controlHeightSM},[`> ${F}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${F}-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,y.unit)(O.paddingInline)}`,color:O.colorText,fontWeight:"normal",fontSize:O.inputFontSize,textAlign:"center",borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${se}-select`]:{margin:`${(0,y.unit)(O.calc(O.paddingBlock).add(1).mul(-1).equal())} ${(0,y.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,[`&${se}-select-single:not(${se}-select-customize-input):not(${se}-pagination-size-changer)`]:{[`${se}-select-selector`]:{backgroundColor:"inherit",border:`${(0,y.unit)(O.lineWidth)} ${O.lineType} transparent`,boxShadow:"none"}}},[`${se}-cascader-picker`]:{margin:`-9px ${(0,y.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${se}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[F]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${F}-search-with-button &`]:{zIndex:0}}},[`> ${F}:first-child, ${F}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${se}-select ${se}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${F}-affix-wrapper`]:{[`&:not(:first-child) ${F}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${F}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${F}:last-child, ${F}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${se}-select ${se}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${F}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${F}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${F}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${F}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ue.dF)()),{[`${F}-group-addon, ${F}-group-wrap, > ${F}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
& > ${F}-affix-wrapper,
|
|
& > ${F}-number-affix-wrapper,
|
|
& > ${se}-picker-range
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderInlineEndWidth:O.lineWidth},[F]:{float:"none"},[`& > ${se}-select > ${se}-select-selector,
|
|
& > ${se}-select-auto-complete ${F},
|
|
& > ${se}-cascader-picker ${F},
|
|
& > ${F}-group-wrapper ${F}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${se}-select-focused`]:{zIndex:1},[`& > ${se}-select > ${se}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${se}-select:first-child > ${se}-select-selector,
|
|
& > ${se}-select-auto-complete:first-child ${F},
|
|
& > ${se}-cascader-picker:first-child ${F}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
|
|
& > ${se}-select:last-child > ${se}-select-selector,
|
|
& > ${se}-cascader-picker:last-child ${F},
|
|
& > ${se}-cascader-picker-focused:last-child ${F}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${se}-select-auto-complete ${F}`]:{verticalAlign:"top"},[`${F}-group-wrapper + ${F}-group-wrapper`]:{marginInlineStart:O.calc(O.lineWidth).mul(-1).equal(),[`${F}-affix-wrapper`]:{borderRadius:0}},[`${F}-group-wrapper:not(:last-child)`]:{[`&${F}-search > ${F}-group`]:{[`& > ${F}-group-addon > ${F}-search-button`]:{borderRadius:0},[`& > ${F}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},C=O=>{const{componentCls:F,controlHeightSM:se,lineWidth:Ee,calc:he}=O,Pe=he(se).sub(he(Ee).mul(2)).sub(16).div(2).equal();return{[F]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ue.Wf)(O)),b(O)),(0,ie.qG)(O)),(0,ie.H8)(O)),(0,ie.Mu)(O)),(0,ie.vc)(O)),{'&[type="color"]':{height:O.controlHeight,[`&${F}-lg`]:{height:O.controlHeightLG},[`&${F}-sm`]:{height:se,paddingTop:Pe,paddingBottom:Pe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},P=O=>{const{componentCls:F}=O;return{[`${F}-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,y.unit)(O.inputAffixPadding)}`}}}},ne=O=>{const{componentCls:F,inputAffixPadding:se,colorTextDescription:Ee,motionDurationSlow:he,colorIcon:Ce,colorIconHover:Pe,iconCls:_e}=O,tt=`${F}-affix-wrapper`,Q=`${F}-affix-wrapper-disabled`;return{[tt]:Object.assign(Object.assign(Object.assign(Object.assign({},b(O)),{display:"inline-flex",[`&:not(${F}-disabled):hover`]:{zIndex:1,[`${F}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${F}`]:{padding:0},[`> input${F}, > textarea${F}`]:{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"'},[F]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:Ee},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:se},"&-suffix":{marginInlineStart:se}}}),P(O)),{[`${_e}${F}-password-icon`]:{color:Ce,cursor:"pointer",transition:`all ${he}`,"&:hover":{color:Pe}}}),[`${F}-underlined`]:{borderRadius:0},[Q]:{[`${_e}${F}-password-icon`]:{color:Ce,cursor:"not-allowed","&:hover":{color:Ce}}}}},te=O=>{const{componentCls:F,borderRadiusLG:se,borderRadiusSM:Ee}=O;return{[`${F}-group`]:Object.assign(Object.assign(Object.assign({},(0,ue.Wf)(O)),E(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${F}-group-addon`]:{borderRadius:se,fontSize:O.inputFontSizeLG}},"&-sm":{[`${F}-group-addon`]:{borderRadius:Ee}}},(0,ie.ir)(O)),(0,ie.S5)(O)),{[`&:not(${F}-compact-first-item):not(${F}-compact-last-item)${F}-compact-item`]:{[`${F}, ${F}-group-addon`]:{borderRadius:0}},[`&:not(${F}-compact-last-item)${F}-compact-first-item`]:{[`${F}, ${F}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${F}-compact-first-item)${F}-compact-last-item`]:{[`${F}, ${F}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${F}-compact-last-item)${F}-compact-item`]:{[`${F}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${F}-compact-first-item)${F}-compact-item`]:{[`${F}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},V=O=>{const{componentCls:F,antCls:se}=O,Ee=`${F}-search`;return{[Ee]:{[F]:{"&:hover, &:focus":{[`+ ${F}-group-addon ${Ee}-button:not(${se}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${F}-affix-wrapper`]:{height:O.controlHeight,borderRadius:0},[`${F}-lg`]:{lineHeight:O.calc(O.lineHeightLG).sub(2e-4).equal()},[`> ${F}-group`]:{[`> ${F}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ee}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${Ee}-button:not(${se}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${se}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ee}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${F}-affix-wrapper, ${Ee}-button`]:{height:O.controlHeightLG}},"&-small":{[`${F}-affix-wrapper, ${Ee}-button`]:{height:O.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${F}-compact-item`]:{[`&:not(${F}-compact-last-item)`]:{[`${F}-group-addon`]:{[`${F}-search-button`]:{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${F}-compact-first-item)`]:{[`${F},${F}-affix-wrapper`]:{borderRadius:0}},[`> ${F}-group-addon ${F}-search-button,
|
|
> ${F},
|
|
${F}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${F}-affix-wrapper-focused`]:{zIndex:2}}}}},D=O=>{const{componentCls:F}=O;return{[`${F}-out-of-range`]:{[`&, & input, & textarea, ${F}-show-count-suffix, ${F}-data-count`]:{color:O.colorError}}}},j=(0,pe.I$)(["Input","Shared"],O=>{const F=(0,H.mergeToken)(O,(0,m.e)(O));return[C(F),ne(F)]},m.T,{resetFont:!1});it.ZP=(0,pe.I$)(["Input","Component"],O=>{const F=(0,H.mergeToken)(O,(0,m.e)(O));return[te(F),V(F),D(F),(0,xe.c)(F)]},m.T,{resetFont:!1})},64910:function(Gt,it,S){"use strict";S.d(it,{T:function(){return xe},e:function(){return ue}});var y=S(51636);function ue(pe){return(0,y.mergeToken)(pe,{inputAffixPadding:pe.paddingXXS})}const xe=pe=>{const{controlHeight:H,fontSize:m,lineHeight:ie,lineWidth:q,controlHeightSM:o,controlHeightLG:K,fontSizeLG:M,lineHeightLG:b,paddingSM:E,controlPaddingHorizontalSM:C,controlPaddingHorizontal:P,colorFillAlter:ne,colorPrimaryHover:te,colorPrimary:V,controlOutlineWidth:D,controlOutline:j,colorErrorOutline:O,colorWarningOutline:F,colorBgContainer:se,inputFontSize:Ee,inputFontSizeLG:he,inputFontSizeSM:Ce}=pe,Pe=Ee||m,_e=Ce||Pe,tt=he||M,Q=Math.round((H-Pe*ie)/2*10)/10-q,N=Math.round((o-_e*ie)/2*10)/10-q,Y=Math.ceil((K-tt*b)/2*10)/10-q;return{paddingBlock:Math.max(Q,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(Y,0),paddingInline:E-q,paddingInlineSM:C-q,paddingInlineLG:P-q,addonBg:ne,activeBorderColor:V,hoverBorderColor:te,activeShadow:`0 0 0 ${D}px ${j}`,errorActiveShadow:`0 0 0 ${D}px ${O}`,warningActiveShadow:`0 0 0 ${D}px ${F}`,hoverBg:se,activeBg:se,inputFontSize:Pe,inputFontSizeLG:tt,inputFontSizeSM:_e}}},39082:function(Gt,it,S){"use strict";S.d(it,{$U:function(){return H},H8:function(){return E},Mu:function(){return K},S5:function(){return P},Xy:function(){return pe},ir:function(){return o},qG:function(){return ie},vc:function(){return V}});var y=S(36237),ue=S(51636);const xe=D=>({borderColor:D.hoverBorderColor,backgroundColor:D.hoverBg}),pe=D=>({color:D.colorTextDisabled,backgroundColor:D.colorBgContainerDisabled,borderColor:D.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},xe((0,ue.mergeToken)(D,{hoverBorderColor:D.colorBorder,hoverBg:D.colorBgContainerDisabled})))}),H=(D,j)=>({background:D.colorBgContainer,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:j.borderColor,"&:hover":{borderColor:j.hoverBorderColor,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:j.activeBorderColor,boxShadow:j.activeShadow,outline:0,backgroundColor:D.activeBg}}),m=(D,j)=>({[`&${D.componentCls}-status-${j.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},H(D,j)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:j.affixColor}}),[`&${D.componentCls}-status-${j.status}${D.componentCls}-disabled`]:{borderColor:j.borderColor}}),ie=(D,j)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},pe(D))}),m(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),m(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),j)}),q=(D,j)=>({[`&${D.componentCls}-group-wrapper-status-${j.status}`]:{[`${D.componentCls}-group-addon`]:{borderColor:j.addonBorderColor,color:j.addonColor}}}),o=D=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.addonBg,border:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},q(D,{status:"error",addonBorderColor:D.colorError,addonColor:D.colorErrorText})),q(D,{status:"warning",addonBorderColor:D.colorWarning,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group-addon`]:Object.assign({},pe(D))}})}),K=(D,j)=>{const{componentCls:O}=D;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${O}-disabled, &[disabled]`]:{color:D.colorTextDisabled,cursor:"not-allowed"},[`&${O}-status-error`]:{"&, & input, & textarea":{color:D.colorError}},[`&${O}-status-warning`]:{"&, & input, & textarea":{color:D.colorWarning}}},j)}},M=(D,j)=>{var O;return{background:j.bg,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(O=j==null?void 0:j.inputColor)!==null&&O!==void 0?O:"unset"},"&:hover":{background:j.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:j.activeBorderColor,backgroundColor:D.activeBg}}},b=(D,j)=>({[`&${D.componentCls}-status-${j.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},M(D,j)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:j.affixColor}})}),E=(D,j)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M(D,{bg:D.colorFillTertiary,hoverBg:D.colorFillSecondary,activeBorderColor:D.activeBorderColor})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},pe(D))}),b(D,{status:"error",bg:D.colorErrorBg,hoverBg:D.colorErrorBgHover,activeBorderColor:D.colorError,inputColor:D.colorErrorText,affixColor:D.colorError})),b(D,{status:"warning",bg:D.colorWarningBg,hoverBg:D.colorWarningBgHover,activeBorderColor:D.colorWarning,inputColor:D.colorWarningText,affixColor:D.colorWarning})),j)}),C=(D,j)=>({[`&${D.componentCls}-group-wrapper-status-${j.status}`]:{[`${D.componentCls}-group-addon`]:{background:j.addonBg,color:j.addonColor}}}),P=D=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.colorFillTertiary},[`${D.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`}}}},C(D,{status:"error",addonBg:D.colorErrorBg,addonColor:D.colorErrorText})),C(D,{status:"warning",addonBg:D.colorWarningBg,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group`]:{"&-addon":{background:D.colorFillTertiary,color:D.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,y.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`}}}})}),ne=(D,j)=>({background:D.colorBgContainer,borderWidth:`${(0,y.unit)(D.lineWidth)} 0`,borderStyle:`${D.lineType} none`,borderColor:`transparent transparent ${j.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${j.borderColor} transparent`,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${j.borderColor} transparent`,outline:0,backgroundColor:D.activeBg}}),te=(D,j)=>({[`&${D.componentCls}-status-${j.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},ne(D,j)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:j.affixColor}}),[`&${D.componentCls}-status-${j.status}${D.componentCls}-disabled`]:{borderColor:`transparent transparent ${j.borderColor} transparent`}}),V=(D,j)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ne(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:{color:D.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${D.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),te(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),te(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),j)})},24303:function(Gt,it,S){"use strict";S.d(it,{D:function(){return Ee},Z:function(){return Pe}});var y=S(59301),ue=S(60499),xe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},pe=xe,H=S(7657),m=function(tt,Q){return y.createElement(H.Z,(0,ue.Z)({},tt,{ref:Q,icon:pe}))},ie=y.forwardRef(m),q=ie,o=S(33853),K=S(38819),M=S(92310),b=S.n(M),E=S(2738),C=S(48755),P=S(6989),ne=S(36237),te=S(48923),V=S(16931);const D=_e=>{const{componentCls:tt,siderBg:Q,motionDurationMid:N,motionDurationSlow:Y,antCls:oe,triggerHeight:ae,triggerColor:le,triggerBg:x,headerHeight:A,zeroTriggerWidth:W,zeroTriggerHeight:ge,borderRadiusLG:Be,lightSiderBg:Xe,lightTriggerColor:Ve,lightTriggerBg:Ze,bodyBg:$e}=_e;return{[tt]:{position:"relative",minWidth:0,background:Q,transition:`all ${N}, background 0s`,"&-has-trigger":{paddingBottom:ae},"&-right":{order:1},[`${tt}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${oe}-menu${oe}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${tt}-children`]:{overflow:"hidden"},[`${tt}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:ae,color:le,lineHeight:(0,ne.unit)(ae),textAlign:"center",background:x,cursor:"pointer",transition:`all ${N}`},[`${tt}-zero-width-trigger`]:{position:"absolute",top:A,insetInlineEnd:_e.calc(W).mul(-1).equal(),zIndex:1,width:W,height:ge,color:le,fontSize:_e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Q,borderRadius:`0 ${(0,ne.unit)(Be)} ${(0,ne.unit)(Be)} 0`,cursor:"pointer",transition:`background ${Y} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Y}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:_e.calc(W).mul(-1).equal(),borderRadius:`${(0,ne.unit)(Be)} 0 0 ${(0,ne.unit)(Be)}`}},"&-light":{background:Xe,[`${tt}-trigger`]:{color:Ve,background:Ze},[`${tt}-zero-width-trigger`]:{color:Ve,background:Ze,border:`1px solid ${$e}`,borderInlineStart:0}}}}};var j=(0,V.I$)(["Layout","Sider"],_e=>[D(_e)],te.eh,{deprecatedTokens:te.jn}),O=function(_e,tt){var Q={};for(var N in _e)Object.prototype.hasOwnProperty.call(_e,N)&&tt.indexOf(N)<0&&(Q[N]=_e[N]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,N=Object.getOwnPropertySymbols(_e);Y<N.length;Y++)tt.indexOf(N[Y])<0&&Object.prototype.propertyIsEnumerable.call(_e,N[Y])&&(Q[N[Y]]=_e[N[Y]]);return Q};const F={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},se=_e=>!Number.isNaN(Number.parseFloat(_e))&&isFinite(_e),Ee=y.createContext({}),he=(()=>{let _e=0;return function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return _e+=1,`${tt}${_e}`}})();var Pe=y.forwardRef((_e,tt)=>{const{prefixCls:Q,className:N,trigger:Y,children:oe,defaultCollapsed:ae=!1,theme:le="dark",style:x={},collapsible:A=!1,reverseArrow:W=!1,width:ge=200,collapsedWidth:Be=80,zeroWidthTriggerStyle:Xe,breakpoint:Ve,onCollapse:Ze,onBreakpoint:$e}=_e,qe=O(_e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:je}=(0,y.useContext)(P.V),[Et,Qe]=(0,y.useState)("collapsed"in _e?_e.collapsed:ae),[wt,Fe]=(0,y.useState)(!1);(0,y.useEffect)(()=>{"collapsed"in _e&&Qe(_e.collapsed)},[_e.collapsed]);const st=(vt,dt)=>{"collapsed"in _e||Qe(vt),Ze==null||Ze(vt,dt)},{getPrefixCls:Re,direction:we}=(0,y.useContext)(C.E_),ce=Re("layout-sider",Q),[He,Ie,De]=j(ce),L=(0,y.useRef)(null);L.current=vt=>{Fe(vt.matches),$e==null||$e(vt.matches),Et!==vt.matches&&st(vt.matches,"responsive")},(0,y.useEffect)(()=>{function vt(ve){return L.current(ve)}let dt;if(typeof window!="undefined"){const{matchMedia:ve}=window;if(ve&&Ve&&Ve in F){dt=ve(`screen and (max-width: ${F[Ve]})`);try{dt.addEventListener("change",vt)}catch(Ge){dt.addListener(vt)}vt(dt)}}return()=>{try{dt==null||dt.removeEventListener("change",vt)}catch(ve){dt==null||dt.removeListener(vt)}}},[Ve]),(0,y.useEffect)(()=>{const vt=he("ant-sider-");return je.addSider(vt),()=>je.removeSider(vt)},[]);const J=()=>{st(!Et,"clickTrigger")},me=(0,E.Z)(qe,["collapsed"]),Le=Et?Be:ge,We=se(Le)?`${Le}px`:String(Le),Je=parseFloat(String(Be||0))===0?y.createElement("span",{onClick:J,className:b()(`${ce}-zero-width-trigger`,`${ce}-zero-width-trigger-${W?"right":"left"}`),style:Xe},Y||y.createElement(q,null)):null,et=we==="rtl"==!W,gt={expanded:et?y.createElement(K.Z,null):y.createElement(o.Z,null),collapsed:et?y.createElement(o.Z,null):y.createElement(K.Z,null)}[Et?"collapsed":"expanded"],mt=Y!==null?Je||y.createElement("div",{className:`${ce}-trigger`,onClick:J,style:{width:We}},Y||gt):null,St=Object.assign(Object.assign({},x),{flex:`0 0 ${We}`,maxWidth:We,minWidth:We,width:We}),Tt=b()(ce,`${ce}-${le}`,{[`${ce}-collapsed`]:!!Et,[`${ce}-has-trigger`]:A&&Y!==null&&!Je,[`${ce}-below`]:!!wt,[`${ce}-zero-width`]:parseFloat(We)===0},N,Ie,De),Ye=y.useMemo(()=>({siderCollapsed:Et}),[Et]);return He(y.createElement(Ee.Provider,{value:Ye},y.createElement("aside",Object.assign({className:Tt},me,{style:St,ref:tt}),y.createElement("div",{className:`${ce}-children`},oe),A||wt&&Je?mt:null)))})},6989:function(Gt,it,S){"use strict";S.d(it,{V:function(){return ue}});var y=S(59301);const ue=y.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},24404:function(Gt,it,S){"use strict";S.d(it,{default:function(){return F}});var y=S(77654),ue=S(59301),xe=S(92310),pe=S.n(xe),H=S(2738),m=S(48755),ie=S(6989),q=S(11592),o=S(24303);function K(se,Ee,he){return typeof he=="boolean"?he:se.length?!0:(0,q.Z)(Ee).some(Pe=>Pe.type===o.Z)}var M=S(48923),b=function(se,Ee){var he={};for(var Ce in se)Object.prototype.hasOwnProperty.call(se,Ce)&&Ee.indexOf(Ce)<0&&(he[Ce]=se[Ce]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Ce=Object.getOwnPropertySymbols(se);Pe<Ce.length;Pe++)Ee.indexOf(Ce[Pe])<0&&Object.prototype.propertyIsEnumerable.call(se,Ce[Pe])&&(he[Ce[Pe]]=se[Ce[Pe]]);return he};function E(se){let{suffixCls:Ee,tagName:he,displayName:Ce}=se;return Pe=>ue.forwardRef((tt,Q)=>ue.createElement(Pe,Object.assign({ref:Q,suffixCls:Ee,tagName:he},tt)))}const C=ue.forwardRef((se,Ee)=>{const{prefixCls:he,suffixCls:Ce,className:Pe,tagName:_e}=se,tt=b(se,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Q}=ue.useContext(m.E_),N=Q("layout",he),[Y,oe,ae]=(0,M.ZP)(N),le=Ce?`${N}-${Ce}`:N;return Y(ue.createElement(_e,Object.assign({className:pe()(he||le,Pe,oe,ae),ref:Ee},tt)))}),P=ue.forwardRef((se,Ee)=>{const{direction:he}=ue.useContext(m.E_),[Ce,Pe]=ue.useState([]),{prefixCls:_e,className:tt,rootClassName:Q,children:N,hasSider:Y,tagName:oe,style:ae}=se,le=b(se,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,H.Z)(le,["suffixCls"]),{getPrefixCls:A,className:W,style:ge}=(0,m.dj)("layout"),Be=A("layout",_e),Xe=K(Ce,N,Y),[Ve,Ze,$e]=(0,M.ZP)(Be),qe=pe()(Be,{[`${Be}-has-sider`]:Xe,[`${Be}-rtl`]:he==="rtl"},W,tt,Q,Ze,$e),je=ue.useMemo(()=>({siderHook:{addSider:Et=>{Pe(Qe=>[].concat((0,y.Z)(Qe),[Et]))},removeSider:Et=>{Pe(Qe=>Qe.filter(wt=>wt!==Et))}}}),[]);return Ve(ue.createElement(ie.V.Provider,{value:je},ue.createElement(oe,Object.assign({ref:Ee,className:qe,style:Object.assign(Object.assign({},ge),ae)},x),N)))}),ne=E({tagName:"div",displayName:"Layout"})(P),te=E({suffixCls:"header",tagName:"header",displayName:"Header"})(C),V=E({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(C),D=E({suffixCls:"content",tagName:"main",displayName:"Content"})(C);var j=ne;const O=j;O.Header=te,O.Footer=V,O.Content=D,O.Sider=o.Z,O._InternalSiderContext=o.D;var F=O},48923:function(Gt,it,S){"use strict";S.d(it,{eh:function(){return pe},jn:function(){return H}});var y=S(36237),ue=S(16931);const xe=m=>{const{antCls:ie,componentCls:q,colorText:o,footerBg:K,headerHeight:M,headerPadding:b,headerColor:E,footerPadding:C,fontSize:P,bodyBg:ne,headerBg:te}=m;return{[q]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:ne,"&, *":{boxSizing:"border-box"},[`&${q}-has-sider`]:{flexDirection:"row",[`> ${q}, > ${q}-content`]:{width:0}},[`${q}-header, &${q}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${q}-header`]:{height:M,padding:b,color:E,lineHeight:(0,y.unit)(M),background:te,[`${ie}-menu`]:{lineHeight:"inherit"}},[`${q}-footer`]:{padding:C,color:o,fontSize:P,background:K},[`${q}-content`]:{flex:"auto",color:o,minHeight:0}}},pe=m=>{const{colorBgLayout:ie,controlHeight:q,controlHeightLG:o,colorText:K,controlHeightSM:M,marginXXS:b,colorTextLightSolid:E,colorBgContainer:C}=m,P=o*1.25;return{colorBgHeader:"#001529",colorBgBody:ie,colorBgTrigger:"#002140",bodyBg:ie,headerBg:"#001529",headerHeight:q*2,headerPadding:`0 ${P}px`,headerColor:K,footerPadding:`${M}px ${P}px`,footerBg:ie,siderBg:"#001529",triggerHeight:o+b*2,triggerBg:"#002140",triggerColor:E,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:C,lightTriggerBg:C,lightTriggerColor:K}},H=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];it.ZP=(0,ue.I$)("Layout",m=>[xe(m)],pe,{deprecatedTokens:H})},78857:function(Gt,it,S){"use strict";S.d(it,{J:function(){return m}});var y=S(59301),ue=S(8654),xe=S(62487),pe=function(ie,q){var o={};for(var K in ie)Object.prototype.hasOwnProperty.call(ie,K)&&q.indexOf(K)<0&&(o[K]=ie[K]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,K=Object.getOwnPropertySymbols(ie);M<K.length;M++)q.indexOf(K[M])<0&&Object.prototype.propertyIsEnumerable.call(ie,K[M])&&(o[K[M]]=ie[K[M]]);return o};const H=y.createContext(null),m=y.forwardRef((ie,q)=>{const{children:o}=ie,K=pe(ie,["children"]),M=y.useContext(H),b=y.useMemo(()=>Object.assign(Object.assign({},M),K),[M,K.prefixCls,K.mode,K.selectable,K.rootClassName]),E=(0,ue.t4)(o),C=(0,ue.x1)(q,E?(0,ue.C4)(o):null);return y.createElement(H.Provider,{value:b},y.createElement(xe.Z,{space:!0},E?y.cloneElement(o,{ref:C}):o))});it.Z=H},93041:function(Gt,it,S){"use strict";S.d(it,{default:function(){return He}});var y=S(59301),ue=S(28321),xe=S(24303),pe=S(18785),H=S(92310),m=S.n(H),ie=S(6089),q=S(2738),o=S(86641),K=S(22703),M=S(48755),b=S(83397),C=(0,y.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),P=function(Ie,De){var L={};for(var J in Ie)Object.prototype.hasOwnProperty.call(Ie,J)&&De.indexOf(J)<0&&(L[J]=Ie[J]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,J=Object.getOwnPropertySymbols(Ie);me<J.length;me++)De.indexOf(J[me])<0&&Object.prototype.propertyIsEnumerable.call(Ie,J[me])&&(L[J[me]]=Ie[J[me]]);return L},te=Ie=>{const{prefixCls:De,className:L,dashed:J}=Ie,me=P(Ie,["prefixCls","className","dashed"]),{getPrefixCls:Le}=y.useContext(M.E_),We=Le("menu",De),Je=m()({[`${We}-item-divider-dashed`]:!!J},L);return y.createElement(ue.iz,Object.assign({className:Je},me))},V=S(11592),D=S(25399),O=Ie=>{var De;const{className:L,children:J,icon:me,title:Le,danger:We,extra:Je}=Ie,{prefixCls:et,firstLevel:nt,direction:pt,disableMenuItemTitleTooltip:gt,inlineCollapsed:mt}=y.useContext(C),St=Ge=>{const _=J==null?void 0:J[0],w=y.createElement("span",{className:m()(`${et}-title-content`,{[`${et}-title-content-with-extra`]:!!Je||Je===0})},J);return(!me||y.isValidElement(J)&&J.type==="span")&&J&&Ge&&nt&&typeof _=="string"?y.createElement("div",{className:`${et}-inline-collapsed-noicon`},_.charAt(0)):w},{siderCollapsed:Tt}=y.useContext(xe.D);let Ye=Le;typeof Le=="undefined"?Ye=nt?J:"":Le===!1&&(Ye="");const vt={title:Ye};!Tt&&!mt&&(vt.title=null,vt.open=!1);const dt=(0,V.Z)(J).length;let ve=y.createElement(ue.ck,Object.assign({},(0,q.Z)(Ie,["title","icon","danger"]),{className:m()({[`${et}-item-danger`]:We,[`${et}-item-only-child`]:(me?dt+1:dt)===1},L),title:typeof Le=="string"?Le:void 0}),(0,K.Tm)(me,{className:m()(y.isValidElement(me)?(De=me.props)===null||De===void 0?void 0:De.className:"",`${et}-item-icon`)}),St(mt));return gt||(ve=y.createElement(D.Z,Object.assign({},vt,{placement:pt==="rtl"?"left":"right",classNames:{root:`${et}-inline-collapsed-tooltip`}}),ve)),ve},F=S(78857),se=S(36237),Ee=S(17835),he=S(63356),Ce=S(34961),Pe=S(46e3),_e=S(34925),tt=S(16931),Q=S(51636),Y=Ie=>{const{componentCls:De,motionDurationSlow:L,horizontalLineHeight:J,colorSplit:me,lineWidth:Le,lineType:We,itemPaddingInline:Je}=Ie;return{[`${De}-horizontal`]:{lineHeight:J,border:0,borderBottom:`${(0,se.unit)(Le)} ${We} ${me}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${De}-item, ${De}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Je},[`> ${De}-item:hover,
|
|
> ${De}-item-active,
|
|
> ${De}-submenu ${De}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${De}-item, ${De}-submenu-title`]:{transition:[`border-color ${L}`,`background ${L}`].join(",")},[`${De}-submenu-arrow`]:{display:"none"}}}},ae=Ie=>{let{componentCls:De,menuArrowOffset:L,calc:J}=Ie;return{[`${De}-rtl`]:{direction:"rtl"},[`${De}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${De}-rtl${De}-vertical,
|
|
${De}-submenu-rtl ${De}-vertical`]:{[`${De}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,se.unit)(J(L).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,se.unit)(L)})`}}}}};const le=Ie=>Object.assign({},(0,he.oN)(Ie));var A=(Ie,De)=>{const{componentCls:L,itemColor:J,itemSelectedColor:me,subMenuItemSelectedColor:Le,groupTitleColor:We,itemBg:Je,subMenuItemBg:et,itemSelectedBg:nt,activeBarHeight:pt,activeBarWidth:gt,activeBarBorderWidth:mt,motionDurationSlow:St,motionEaseInOut:Tt,motionEaseOut:Ye,itemPaddingInline:vt,motionDurationMid:dt,itemHoverColor:ve,lineType:Ge,colorSplit:_,itemDisabledColor:w,dangerItemColor:ye,dangerItemHoverColor:B,dangerItemSelectedColor:X,dangerItemActiveBg:lt,dangerItemSelectedBg:Se,popupBg:Ne,itemHoverBg:ze,itemActiveBg:z,menuSubMenuBg:Z,horizontalItemSelectedColor:be,horizontalItemSelectedBg:ke,horizontalItemBorderRadius:G,horizontalItemHoverBg:ht}=Ie;return{[`${L}-${De}, ${L}-${De} > ${L}`]:{color:J,background:Je,[`&${L}-root:focus-visible`]:Object.assign({},le(Ie)),[`${L}-item`]:{"&-group-title, &-extra":{color:We}},[`${L}-submenu-selected > ${L}-submenu-title`]:{color:Le},[`${L}-item, ${L}-submenu-title`]:{color:J,[`&:not(${L}-item-disabled):focus-visible`]:Object.assign({},le(Ie))},[`${L}-item-disabled, ${L}-submenu-disabled`]:{color:`${w} !important`},[`${L}-item:not(${L}-item-selected):not(${L}-submenu-selected)`]:{[`&:hover, > ${L}-submenu-title:hover`]:{color:ve}},[`&:not(${L}-horizontal)`]:{[`${L}-item:not(${L}-item-selected)`]:{"&:hover":{backgroundColor:ze},"&:active":{backgroundColor:z}},[`${L}-submenu-title`]:{"&:hover":{backgroundColor:ze},"&:active":{backgroundColor:z}}},[`${L}-item-danger`]:{color:ye,[`&${L}-item:hover`]:{[`&:not(${L}-item-selected):not(${L}-submenu-selected)`]:{color:B}},[`&${L}-item:active`]:{background:lt}},[`${L}-item a`]:{"&, &:hover":{color:"inherit"}},[`${L}-item-selected`]:{color:me,[`&${L}-item-danger`]:{color:X},"a, a:hover":{color:"inherit"}},[`& ${L}-item-selected`]:{backgroundColor:nt,[`&${L}-item-danger`]:{backgroundColor:Se}},[`&${L}-submenu > ${L}`]:{backgroundColor:Z},[`&${L}-popup > ${L}`]:{backgroundColor:Ne},[`&${L}-submenu-popup > ${L}`]:{backgroundColor:Ne},[`&${L}-horizontal`]:Object.assign(Object.assign({},De==="dark"?{borderBottom:0}:{}),{[`> ${L}-item, > ${L}-submenu`]:{top:mt,marginTop:Ie.calc(mt).mul(-1).equal(),marginBottom:0,borderRadius:G,"&::after":{position:"absolute",insetInline:vt,bottom:0,borderBottom:`${(0,se.unit)(pt)} solid transparent`,transition:`border-color ${St} ${Tt}`,content:'""'},"&:hover, &-active, &-open":{background:ht,"&::after":{borderBottomWidth:pt,borderBottomColor:be}},"&-selected":{color:be,backgroundColor:ke,"&:hover":{backgroundColor:ke},"&::after":{borderBottomWidth:pt,borderBottomColor:be}}}}),[`&${L}-root`]:{[`&${L}-inline, &${L}-vertical`]:{borderInlineEnd:`${(0,se.unit)(mt)} ${Ge} ${_}`}},[`&${L}-inline`]:{[`${L}-sub${L}-inline`]:{background:et},[`${L}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,se.unit)(gt)} solid ${me}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${dt} ${Ye}`,`opacity ${dt} ${Ye}`].join(","),content:'""'},[`&${L}-item-danger`]:{"&::after":{borderInlineEndColor:X}}},[`${L}-selected, ${L}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${dt} ${Tt}`,`opacity ${dt} ${Tt}`].join(",")}}}}}};const W=Ie=>{const{componentCls:De,itemHeight:L,itemMarginInline:J,padding:me,menuArrowSize:Le,marginXS:We,itemMarginBlock:Je,itemWidth:et,itemPaddingInline:nt}=Ie,pt=Ie.calc(Le).add(me).add(We).equal();return{[`${De}-item`]:{position:"relative",overflow:"hidden"},[`${De}-item, ${De}-submenu-title`]:{height:L,lineHeight:(0,se.unit)(L),paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:J,marginBlock:Je,width:et},[`> ${De}-item,
|
|
> ${De}-submenu > ${De}-submenu-title`]:{height:L,lineHeight:(0,se.unit)(L)},[`${De}-item-group-list ${De}-submenu-title,
|
|
${De}-submenu-title`]:{paddingInlineEnd:pt}}};var Be=Ie=>{const{componentCls:De,iconCls:L,itemHeight:J,colorTextLightSolid:me,dropdownWidth:Le,controlHeightLG:We,motionEaseOut:Je,paddingXL:et,itemMarginInline:nt,fontSizeLG:pt,motionDurationFast:gt,motionDurationSlow:mt,paddingXS:St,boxShadowSecondary:Tt,collapsedWidth:Ye,collapsedIconSize:vt}=Ie,dt={height:J,lineHeight:(0,se.unit)(J),listStylePosition:"inside",listStyleType:"disc"};return[{[De]:{"&-inline, &-vertical":Object.assign({[`&${De}-root`]:{boxShadow:"none"}},W(Ie))},[`${De}-submenu-popup`]:{[`${De}-vertical`]:Object.assign(Object.assign({},W(Ie)),{boxShadow:Tt})}},{[`${De}-submenu-popup ${De}-vertical${De}-sub`]:{minWidth:Le,maxHeight:`calc(100vh - ${(0,se.unit)(Ie.calc(We).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${De}-inline`]:{width:"100%",[`&${De}-root`]:{[`${De}-item, ${De}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${mt}`,`background ${mt}`,`padding ${gt} ${Je}`].join(","),[`> ${De}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${De}-sub${De}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${De}-submenu > ${De}-submenu-title`]:dt,[`& ${De}-item-group-title`]:{paddingInlineStart:et}},[`${De}-item`]:dt}},{[`${De}-inline-collapsed`]:{width:Ye,[`&${De}-root`]:{[`${De}-item, ${De}-submenu ${De}-submenu-title`]:{[`> ${De}-inline-collapsed-noicon`]:{fontSize:pt,textAlign:"center"}}},[`> ${De}-item,
|
|
> ${De}-item-group > ${De}-item-group-list > ${De}-item,
|
|
> ${De}-item-group > ${De}-item-group-list > ${De}-submenu > ${De}-submenu-title,
|
|
> ${De}-submenu > ${De}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,se.unit)(Ie.calc(vt).div(2).equal())} - ${(0,se.unit)(nt)})`,textOverflow:"clip",[`
|
|
${De}-submenu-arrow,
|
|
${De}-submenu-expand-icon
|
|
`]:{opacity:0},[`${De}-item-icon, ${L}`]:{margin:0,fontSize:vt,lineHeight:(0,se.unit)(J),"+ span":{display:"inline-block",opacity:0}}},[`${De}-item-icon, ${L}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${De}-item-icon, ${L}`]:{display:"none"},"a, a:hover":{color:me}},[`${De}-item-group-title`]:Object.assign(Object.assign({},he.vS),{paddingInline:St})}}]};const Xe=Ie=>{const{componentCls:De,motionDurationSlow:L,motionDurationMid:J,motionEaseInOut:me,motionEaseOut:Le,iconCls:We,iconSize:Je,iconMarginInlineEnd:et}=Ie;return{[`${De}-item, ${De}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${L}`,`background ${L}`,`padding calc(${L} + 0.1s) ${me}`].join(","),[`${De}-item-icon, ${We}`]:{minWidth:Je,fontSize:Je,transition:[`font-size ${J} ${Le}`,`margin ${L} ${me}`,`color ${L}`].join(","),"+ span":{marginInlineStart:et,opacity:1,transition:[`opacity ${L} ${me}`,`margin ${L}`,`color ${L}`].join(",")}},[`${De}-item-icon`]:Object.assign({},(0,he.Ro)()),[`&${De}-item-only-child`]:{[`> ${We}, > ${De}-item-icon`]:{marginInlineEnd:0}}},[`${De}-item-disabled, ${De}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${De}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Ve=Ie=>{const{componentCls:De,motionDurationSlow:L,motionEaseInOut:J,borderRadius:me,menuArrowSize:Le,menuArrowOffset:We}=Ie;return{[`${De}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ie.margin,width:Le,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${L} ${J}, opacity ${L}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ie.calc(Le).mul(.6).equal(),height:Ie.calc(Le).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:me,transition:[`background ${L} ${J}`,`transform ${L} ${J}`,`top ${L} ${J}`,`color ${L} ${J}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,se.unit)(Ie.calc(We).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,se.unit)(We)})`}}}}},Ze=Ie=>{const{antCls:De,componentCls:L,fontSize:J,motionDurationSlow:me,motionDurationMid:Le,motionEaseInOut:We,paddingXS:Je,padding:et,colorSplit:nt,lineWidth:pt,zIndexPopup:gt,borderRadiusLG:mt,subMenuItemBorderRadius:St,menuArrowSize:Tt,menuArrowOffset:Ye,lineType:vt,groupTitleLineHeight:dt,groupTitleFontSize:ve}=Ie;return[{"":{[L]:Object.assign(Object.assign({},(0,he.dF)()),{"&-hidden":{display:"none"}})},[`${L}-submenu-hidden`]:{display:"none"}},{[L]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(Ie)),(0,he.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:J,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${me} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${L}-item`]:{flex:"none"}},[`${L}-item, ${L}-submenu, ${L}-submenu-title`]:{borderRadius:Ie.itemBorderRadius},[`${L}-item-group-title`]:{padding:`${(0,se.unit)(Je)} ${(0,se.unit)(et)}`,fontSize:ve,lineHeight:dt,transition:`all ${me}`},[`&-horizontal ${L}-submenu`]:{transition:[`border-color ${me} ${We}`,`background ${me} ${We}`].join(",")},[`${L}-submenu, ${L}-submenu-inline`]:{transition:[`border-color ${me} ${We}`,`background ${me} ${We}`,`padding ${Le} ${We}`].join(",")},[`${L}-submenu ${L}-sub`]:{cursor:"initial",transition:[`background ${me} ${We}`,`padding ${me} ${We}`].join(",")},[`${L}-title-content`]:{transition:`color ${me}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${De}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${L}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Ie.padding}},[`${L}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${L}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:nt,borderStyle:vt,borderWidth:0,borderTopWidth:pt,marginBlock:pt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Xe(Ie)),{[`${L}-item-group`]:{[`${L}-item-group-list`]:{margin:0,padding:0,[`${L}-item, ${L}-submenu-title`]:{paddingInline:`${(0,se.unit)(Ie.calc(J).mul(2).equal())} ${(0,se.unit)(et)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:gt,borderRadius:mt,boxShadow:"none",transformOrigin:"0 0",[`&${L}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${L}`]:Object.assign(Object.assign(Object.assign({borderRadius:mt},Xe(Ie)),Ve(Ie)),{[`${L}-item, ${L}-submenu > ${L}-submenu-title`]:{borderRadius:St},[`${L}-submenu-title::after`]:{transition:`transform ${me} ${We}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Ie.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ie.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ie.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ie.paddingXS}}}),Ve(Ie)),{[`&-inline-collapsed ${L}-submenu-arrow,
|
|
&-inline ${L}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,se.unit)(Ye)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,se.unit)(Ie.calc(Ye).mul(-1).equal())})`}},[`${L}-submenu-open${L}-submenu-inline > ${L}-submenu-title > ${L}-submenu-arrow`]:{transform:`translateY(${(0,se.unit)(Ie.calc(Tt).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,se.unit)(Ie.calc(Ye).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,se.unit)(Ye)})`}}})},{[`${De}-layout-header`]:{[L]:{lineHeight:"inherit"}}}]},$e=Ie=>{var De,L,J;const{colorPrimary:me,colorError:Le,colorTextDisabled:We,colorErrorBg:Je,colorText:et,colorTextDescription:nt,colorBgContainer:pt,colorFillAlter:gt,colorFillContent:mt,lineWidth:St,lineWidthBold:Tt,controlItemBgActive:Ye,colorBgTextHover:vt,controlHeightLG:dt,lineHeight:ve,colorBgElevated:Ge,marginXXS:_,padding:w,fontSize:ye,controlHeightSM:B,fontSizeLG:X,colorTextLightSolid:lt,colorErrorHover:Se}=Ie,Ne=(De=Ie.activeBarWidth)!==null&&De!==void 0?De:0,ze=(L=Ie.activeBarBorderWidth)!==null&&L!==void 0?L:St,z=(J=Ie.itemMarginInline)!==null&&J!==void 0?J:Ie.marginXXS,Z=new Ee.FastColor(lt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ie.zIndexPopupBase+50,radiusItem:Ie.borderRadiusLG,itemBorderRadius:Ie.borderRadiusLG,radiusSubMenuItem:Ie.borderRadiusSM,subMenuItemBorderRadius:Ie.borderRadiusSM,colorItemText:et,itemColor:et,colorItemTextHover:et,itemHoverColor:et,colorItemTextHoverHorizontal:me,horizontalItemHoverColor:me,colorGroupTitle:nt,groupTitleColor:nt,colorItemTextSelected:me,itemSelectedColor:me,subMenuItemSelectedColor:me,colorItemTextSelectedHorizontal:me,horizontalItemSelectedColor:me,colorItemBg:pt,itemBg:pt,colorItemBgHover:vt,itemHoverBg:vt,colorItemBgActive:mt,itemActiveBg:Ye,colorSubItemBg:gt,subMenuItemBg:gt,colorItemBgSelected:Ye,itemSelectedBg:Ye,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:Ne,colorActiveBarHeight:Tt,activeBarHeight:Tt,colorActiveBarBorderSize:St,activeBarBorderWidth:ze,colorItemTextDisabled:We,itemDisabledColor:We,colorDangerItemText:Le,dangerItemColor:Le,colorDangerItemTextHover:Le,dangerItemHoverColor:Le,colorDangerItemTextSelected:Le,dangerItemSelectedColor:Le,colorDangerItemBgActive:Je,dangerItemActiveBg:Je,colorDangerItemBgSelected:Je,dangerItemSelectedBg:Je,itemMarginInline:z,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:dt,groupTitleLineHeight:ve,collapsedWidth:dt*2,popupBg:Ge,itemMarginBlock:_,itemPaddingInline:w,horizontalLineHeight:`${dt*1.15}px`,iconSize:ye,iconMarginInlineEnd:B-ye,collapsedIconSize:X,groupTitleFontSize:ye,darkItemDisabledColor:new Ee.FastColor(lt).setA(.25).toRgbString(),darkItemColor:Z,darkDangerItemColor:Le,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:lt,darkItemSelectedBg:me,darkDangerItemSelectedBg:Le,darkItemHoverBg:"transparent",darkGroupTitleColor:Z,darkItemHoverColor:lt,darkDangerItemHoverColor:Se,darkDangerItemSelectedColor:lt,darkDangerItemActiveBg:Le,itemWidth:Ne?`calc(100% + ${ze}px)`:`calc(100% - ${z*2}px)`}};var qe=function(Ie){let De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ie,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,tt.I$)("Menu",me=>{const{colorBgElevated:Le,controlHeightLG:We,fontSize:Je,darkItemColor:et,darkDangerItemColor:nt,darkItemBg:pt,darkSubMenuItemBg:gt,darkItemSelectedColor:mt,darkItemSelectedBg:St,darkDangerItemSelectedBg:Tt,darkItemHoverBg:Ye,darkGroupTitleColor:vt,darkItemHoverColor:dt,darkItemDisabledColor:ve,darkDangerItemHoverColor:Ge,darkDangerItemSelectedColor:_,darkDangerItemActiveBg:w,popupBg:ye,darkPopupBg:B}=me,X=me.calc(Je).div(7).mul(5).equal(),lt=(0,Q.mergeToken)(me,{menuArrowSize:X,menuHorizontalHeight:me.calc(We).mul(1.15).equal(),menuArrowOffset:me.calc(X).mul(.25).equal(),menuSubMenuBg:Le,calc:me.calc,popupBg:ye}),Se=(0,Q.mergeToken)(lt,{itemColor:et,itemHoverColor:dt,groupTitleColor:vt,itemSelectedColor:mt,subMenuItemSelectedColor:mt,itemBg:pt,popupBg:B,subMenuItemBg:gt,itemActiveBg:"transparent",itemSelectedBg:St,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Ye,itemDisabledColor:ve,dangerItemColor:nt,dangerItemHoverColor:Ge,dangerItemSelectedColor:_,dangerItemActiveBg:w,dangerItemSelectedBg:Tt,menuSubMenuBg:gt,horizontalItemSelectedColor:mt,horizontalItemSelectedBg:St});return[Ze(lt),Y(lt),Be(lt),A(lt,"light"),A(Se,"dark"),ae(lt),(0,Ce.Z)(lt),(0,Pe.oN)(lt,"slide-up"),(0,Pe.oN)(lt,"slide-down"),(0,_e._y)(lt,"zoom-big")]},$e,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:L,unitless:{groupTitleLineHeight:!0}})(Ie,De)},je=S(75030),Qe=Ie=>{var De;const{popupClassName:L,icon:J,title:me,theme:Le}=Ie,We=y.useContext(C),{prefixCls:Je,inlineCollapsed:et,theme:nt}=We,pt=(0,ue.Xl)();let gt;if(!J)gt=et&&!pt.length&&me&&typeof me=="string"?y.createElement("div",{className:`${Je}-inline-collapsed-noicon`},me.charAt(0)):y.createElement("span",{className:`${Je}-title-content`},me);else{const Tt=y.isValidElement(me)&&me.type==="span";gt=y.createElement(y.Fragment,null,(0,K.Tm)(J,{className:m()(y.isValidElement(J)?(De=J.props)===null||De===void 0?void 0:De.className:"",`${Je}-item-icon`)}),Tt?me:y.createElement("span",{className:`${Je}-title-content`},me))}const mt=y.useMemo(()=>Object.assign(Object.assign({},We),{firstLevel:!1}),[We]),[St]=(0,je.Cn)("Menu");return y.createElement(C.Provider,{value:mt},y.createElement(ue.Wd,Object.assign({},(0,q.Z)(Ie,["icon"]),{title:gt,popupClassName:m()(Je,L,`${Je}-${Le||nt}`),popupStyle:Object.assign({zIndex:St},Ie.popupStyle)})))},wt=function(Ie,De){var L={};for(var J in Ie)Object.prototype.hasOwnProperty.call(Ie,J)&&De.indexOf(J)<0&&(L[J]=Ie[J]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,J=Object.getOwnPropertySymbols(Ie);me<J.length;me++)De.indexOf(J[me])<0&&Object.prototype.propertyIsEnumerable.call(Ie,J[me])&&(L[J[me]]=Ie[J[me]]);return L};function Fe(Ie){return Ie===null||Ie===!1}const st={item:O,submenu:Qe,divider:te};var we=(0,y.forwardRef)((Ie,De)=>{var L;const J=y.useContext(F.Z),me=J||{},{getPrefixCls:Le,getPopupContainer:We,direction:Je,menu:et}=y.useContext(M.E_),nt=Le(),{prefixCls:pt,className:gt,style:mt,theme:St="light",expandIcon:Tt,_internalDisableMenuItemTitleTooltip:Ye,inlineCollapsed:vt,siderCollapsed:dt,rootClassName:ve,mode:Ge,selectable:_,onClick:w,overflowedIndicatorPopupClassName:ye}=Ie,B=wt(Ie,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),X=(0,q.Z)(B,["collapsedWidth"]);(L=me.validator)===null||L===void 0||L.call(me,{mode:Ge});const lt=(0,ie.Z)(function(){var Kt;w==null||w.apply(void 0,arguments),(Kt=me.onClick)===null||Kt===void 0||Kt.call(me)}),Se=me.mode||Ge,Ne=_!=null?_:me.selectable,ze=vt!=null?vt:dt,z={horizontal:{motionName:`${nt}-slide-up`},inline:(0,o.Z)(nt),other:{motionName:`${nt}-zoom-big`}},Z=Le("menu",pt||me.prefixCls),be=(0,b.Z)(Z),[ke,G,ht]=qe(Z,be,!J),de=m()(`${Z}-${St}`,et==null?void 0:et.className,gt),At=y.useMemo(()=>{var Kt,ar;if(typeof Tt=="function"||Fe(Tt))return Tt||null;if(typeof me.expandIcon=="function"||Fe(me.expandIcon))return me.expandIcon||null;if(typeof(et==null?void 0:et.expandIcon)=="function"||Fe(et==null?void 0:et.expandIcon))return(et==null?void 0:et.expandIcon)||null;const Qt=(Kt=Tt!=null?Tt:me==null?void 0:me.expandIcon)!==null&&Kt!==void 0?Kt:et==null?void 0:et.expandIcon;return(0,K.Tm)(Qt,{className:m()(`${Z}-submenu-expand-icon`,y.isValidElement(Qt)?(ar=Qt.props)===null||ar===void 0?void 0:ar.className:void 0)})},[Tt,me==null?void 0:me.expandIcon,et==null?void 0:et.expandIcon,Z]),$t=y.useMemo(()=>({prefixCls:Z,inlineCollapsed:ze||!1,direction:Je,firstLevel:!0,theme:St,mode:Se,disableMenuItemTitleTooltip:Ye}),[Z,ze,Je,Ye,St]);return ke(y.createElement(F.Z.Provider,{value:null},y.createElement(C.Provider,{value:$t},y.createElement(ue.ZP,Object.assign({getPopupContainer:We,overflowedIndicator:y.createElement(pe.Z,null),overflowedIndicatorPopupClassName:m()(Z,`${Z}-${St}`,ye),mode:Se,selectable:Ne,onClick:lt},X,{inlineCollapsed:ze,style:Object.assign(Object.assign({},et==null?void 0:et.style),mt),className:de,prefixCls:Z,direction:Je,defaultMotions:z,expandIcon:At,ref:De,rootClassName:m()(ve,G,me.rootClassName,ht,be),_internalComponents:st})))))});const ce=(0,y.forwardRef)((Ie,De)=>{const L=(0,y.useRef)(null),J=y.useContext(xe.D);return(0,y.useImperativeHandle)(De,()=>({menu:L.current,focus:me=>{var Le;(Le=L.current)===null||Le===void 0||Le.focus(me)}})),y.createElement(we,Object.assign({ref:L},Ie,J))});ce.Item=O,ce.SubMenu=Qe,ce.Divider=te,ce.ItemGroup=ue.BW;var He=ce},89787:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return dt}});var y=S(59301),ue=S(17835),xe=S(29679),pe=S(40001),H=S(19248),m=S(99267),ie=S(92310),q=S.n(ie),o=S(2738),K=S(48755),M=S(60499),b=S(85899),E=S(42244),C={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},P=function(){var Ge=(0,y.useRef)([]),_=(0,y.useRef)(null);return(0,y.useEffect)(function(){var w=Date.now(),ye=!1;Ge.current.forEach(function(B){if(B){ye=!0;var X=B.style;X.transitionDuration=".3s, .3s, .3s, .06s",_.current&&w-_.current<100&&(X.transitionDuration="0s, 0s")}}),ye&&(_.current=Date.now())}),Ge.current},ne=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],te=function(Ge){var _=(0,b.Z)((0,b.Z)({},C),Ge),w=_.className,ye=_.percent,B=_.prefixCls,X=_.strokeColor,lt=_.strokeLinecap,Se=_.strokeWidth,Ne=_.style,ze=_.trailColor,z=_.trailWidth,Z=_.transition,be=(0,E.Z)(_,ne);delete be.gapPosition;var ke=Array.isArray(ye)?ye:[ye],G=Array.isArray(X)?X:[X],ht=P(),de=Se/2,At=100-Se/2,$t="M ".concat(lt==="round"?de:0,",").concat(de,`
|
|
L `).concat(lt==="round"?At:100,",").concat(de),Kt="0 0 100 ".concat(Se),ar=0;return y.createElement("svg",(0,M.Z)({className:q()("".concat(B,"-line"),w),viewBox:Kt,preserveAspectRatio:"none",style:Ne},be),y.createElement("path",{className:"".concat(B,"-line-trail"),d:$t,strokeLinecap:lt,stroke:ze,strokeWidth:z||Se,fillOpacity:"0"}),ke.map(function(Qt,Zt){var Sr=1;switch(lt){case"round":Sr=1-Se/100;break;case"square":Sr=1-Se/2/100;break;default:Sr=1;break}var Nr={strokeDasharray:"".concat(Qt*Sr,"px, 100px"),strokeDashoffset:"-".concat(ar,"px"),transition:Z||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Yt=G[Zt]||G[G.length-1];return ar+=Qt,y.createElement("path",{key:Zt,className:"".concat(B,"-line-path"),d:$t,strokeLinecap:lt,stroke:Yt,strokeWidth:Se,fillOpacity:"0",ref:function(zt){ht[Zt]=zt},style:Nr})}))},V=te,D=S(43749),j=S(72190),O=S(47273),F=0,se=(0,O.Z)();function Ee(){var ve;return se?(ve=F,F+=1):ve="TEST_OR_SSR",ve}var he=function(ve){var Ge=y.useState(),_=(0,j.Z)(Ge,2),w=_[0],ye=_[1];return y.useEffect(function(){ye("rc_progress_".concat(Ee()))},[]),ve||w},Ce=function(Ge){var _=Ge.bg,w=Ge.children;return y.createElement("div",{style:{width:"100%",height:"100%",background:_}},w)};function Pe(ve,Ge){return Object.keys(ve).map(function(_){var w=parseFloat(_),ye="".concat(Math.floor(w*Ge),"%");return"".concat(ve[_]," ").concat(ye)})}var _e=y.forwardRef(function(ve,Ge){var _=ve.prefixCls,w=ve.color,ye=ve.gradientId,B=ve.radius,X=ve.style,lt=ve.ptg,Se=ve.strokeLinecap,Ne=ve.strokeWidth,ze=ve.size,z=ve.gapDegree,Z=w&&(0,D.Z)(w)==="object",be=Z?"#FFF":void 0,ke=ze/2,G=y.createElement("circle",{className:"".concat(_,"-circle-path"),r:B,cx:ke,cy:ke,stroke:be,strokeLinecap:Se,strokeWidth:Ne,opacity:lt===0?0:1,style:X,ref:Ge});if(!Z)return G;var ht="".concat(ye,"-conic"),de=z?"".concat(180+z/2,"deg"):"0deg",At=Pe(w,(360-z)/360),$t=Pe(w,1),Kt="conic-gradient(from ".concat(de,", ").concat(At.join(", "),")"),ar="linear-gradient(to ".concat(z?"bottom":"top",", ").concat($t.join(", "),")");return y.createElement(y.Fragment,null,y.createElement("mask",{id:ht},G),y.createElement("foreignObject",{x:0,y:0,width:ze,height:ze,mask:"url(#".concat(ht,")")},y.createElement(Ce,{bg:ar},y.createElement(Ce,{bg:Kt}))))}),tt=_e,Q=100,N=function(Ge,_,w,ye,B,X,lt,Se,Ne,ze){var z=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Z=w/100*360*((360-X)/360),be=X===0?0:{bottom:0,top:180,left:90,right:-90}[lt],ke=(100-ye)/100*_;Ne==="round"&&ye!==100&&(ke+=ze/2,ke>=_&&(ke=_-.01));var G=Q/2;return{stroke:typeof Se=="string"?Se:void 0,strokeDasharray:"".concat(_,"px ").concat(Ge),strokeDashoffset:ke+z,transform:"rotate(".concat(B+Z+be,"deg)"),transformOrigin:"".concat(G,"px ").concat(G,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Y=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function oe(ve){var Ge=ve!=null?ve:[];return Array.isArray(Ge)?Ge:[Ge]}var ae=function(Ge){var _=(0,b.Z)((0,b.Z)({},C),Ge),w=_.id,ye=_.prefixCls,B=_.steps,X=_.strokeWidth,lt=_.trailWidth,Se=_.gapDegree,Ne=Se===void 0?0:Se,ze=_.gapPosition,z=_.trailColor,Z=_.strokeLinecap,be=_.style,ke=_.className,G=_.strokeColor,ht=_.percent,de=(0,E.Z)(_,Y),At=Q/2,$t=he(w),Kt="".concat($t,"-gradient"),ar=At-X/2,Qt=Math.PI*2*ar,Zt=Ne>0?90+Ne/2:-90,Sr=Qt*((360-Ne)/360),Nr=(0,D.Z)(B)==="object"?B:{count:B,gap:2},Yt=Nr.count,wr=Nr.gap,zt=oe(ht),Rt=oe(G),kt=Rt.find(function(Xr){return Xr&&(0,D.Z)(Xr)==="object"}),qt=kt&&(0,D.Z)(kt)==="object",or=qt?"butt":Z,Dr=N(Qt,Sr,0,100,Zt,Ne,ze,z,or,X),nn=P(),tn=function(){var Tr=0;return zt.map(function(vn,Gr){var Mn=Rt[Gr]||Rt[Rt.length-1],ln=N(Qt,Sr,Tr,vn,Zt,Ne,ze,Mn,or,X);return Tr+=vn,y.createElement(tt,{key:Gr,color:Mn,ptg:vn,radius:ar,prefixCls:ye,gradientId:Kt,style:ln,strokeLinecap:or,strokeWidth:X,gapDegree:Ne,ref:function($r){nn[Gr]=$r},size:Q})}).reverse()},Yr=function(){var Tr=Math.round(Yt*(zt[0]/100)),vn=100/Yt,Gr=0;return new Array(Yt).fill(null).map(function(Mn,ln){var Rr=ln<=Tr-1?Rt[0]:z,$r=Rr&&(0,D.Z)(Rr)==="object"?"url(#".concat(Kt,")"):void 0,Br=N(Qt,Sr,Gr,vn,Zt,Ne,ze,Rr,"butt",X,wr);return Gr+=(Sr-Br.strokeDashoffset+wr)*100/Sr,y.createElement("circle",{key:ln,className:"".concat(ye,"-circle-path"),r:ar,cx:At,cy:At,stroke:$r,strokeWidth:X,opacity:1,style:Br,ref:function(at){nn[ln]=at}})})};return y.createElement("svg",(0,M.Z)({className:q()("".concat(ye,"-circle"),ke),viewBox:"0 0 ".concat(Q," ").concat(Q),style:be,id:w,role:"presentation"},de),!Yt&&y.createElement("circle",{className:"".concat(ye,"-circle-trail"),r:ar,cx:At,cy:At,stroke:z,strokeLinecap:or,strokeWidth:lt||X,style:Dr}),Yt?Yr():tn())},le=ae,x={Line:V,Circle:le},A=S(25399),W=S(68361);function ge(ve){return!ve||ve<0?0:ve>100?100:ve}function Be(ve){let{success:Ge,successPercent:_}=ve,w=_;return Ge&&"progress"in Ge&&(w=Ge.progress),Ge&&"percent"in Ge&&(w=Ge.percent),w}const Xe=ve=>{let{percent:Ge,success:_,successPercent:w}=ve;const ye=ge(Be({success:_,successPercent:w}));return[ye,ge(ge(Ge)-ye)]},Ve=ve=>{let{success:Ge={},strokeColor:_}=ve;const{strokeColor:w}=Ge;return[w||W.presetPrimaryColors.green,_||null]},Ze=(ve,Ge,_)=>{var w,ye,B,X;let lt=-1,Se=-1;if(Ge==="step"){const Ne=_.steps,ze=_.strokeWidth;typeof ve=="string"||typeof ve=="undefined"?(lt=ve==="small"?2:14,Se=ze!=null?ze:8):typeof ve=="number"?[lt,Se]=[ve,ve]:[lt=14,Se=8]=Array.isArray(ve)?ve:[ve.width,ve.height],lt*=Ne}else if(Ge==="line"){const Ne=_==null?void 0:_.strokeWidth;typeof ve=="string"||typeof ve=="undefined"?Se=Ne||(ve==="small"?6:8):typeof ve=="number"?[lt,Se]=[ve,ve]:[lt=-1,Se=8]=Array.isArray(ve)?ve:[ve.width,ve.height]}else(Ge==="circle"||Ge==="dashboard")&&(typeof ve=="string"||typeof ve=="undefined"?[lt,Se]=ve==="small"?[60,60]:[120,120]:typeof ve=="number"?[lt,Se]=[ve,ve]:Array.isArray(ve)&&(lt=(ye=(w=ve[0])!==null&&w!==void 0?w:ve[1])!==null&&ye!==void 0?ye:120,Se=(X=(B=ve[0])!==null&&B!==void 0?B:ve[1])!==null&&X!==void 0?X:120));return[lt,Se]},$e=3,qe=ve=>$e/ve*100;var Et=ve=>{const{prefixCls:Ge,trailColor:_=null,strokeLinecap:w="round",gapPosition:ye,gapDegree:B,width:X=120,type:lt,children:Se,success:Ne,size:ze=X,steps:z}=ve,[Z,be]=Ze(ze,"circle");let{strokeWidth:ke}=ve;ke===void 0&&(ke=Math.max(qe(Z),6));const G={width:Z,height:be,fontSize:Z*.15+6},ht=y.useMemo(()=>{if(B||B===0)return B;if(lt==="dashboard")return 75},[B,lt]),de=Xe(ve),At=ye||lt==="dashboard"&&"bottom"||void 0,$t=Object.prototype.toString.call(ve.strokeColor)==="[object Object]",Kt=Ve({success:Ne,strokeColor:ve.strokeColor}),ar=q()(`${Ge}-inner`,{[`${Ge}-circle-gradient`]:$t}),Qt=y.createElement(le,{steps:z,percent:z?de[1]:de,strokeWidth:ke,trailWidth:ke,strokeColor:z?Kt[1]:Kt,strokeLinecap:w,trailColor:_,prefixCls:Ge,gapDegree:ht,gapPosition:At}),Zt=Z<=20,Sr=y.createElement("div",{className:ar,style:G},Qt,!Zt&&Se);return Zt?y.createElement(A.Z,{title:Se},Sr):Sr},Qe=S(36237),wt=S(63356),Fe=S(16931),st=S(51636);const Re="--progress-line-stroke-color",we="--progress-percent",ce=ve=>{const Ge=ve?"100%":"-100%";return new Qe.Keyframes(`antProgress${ve?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Ge}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Ge}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},He=ve=>{const{componentCls:Ge,iconCls:_}=ve;return{[Ge]:Object.assign(Object.assign({},(0,wt.Wf)(ve)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:ve.fontSize},[`${Ge}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Ge}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:ve.remainingColor,borderRadius:ve.lineBorderRadius},[`${Ge}-inner:not(${Ge}-circle-gradient)`]:{[`${Ge}-circle-path`]:{stroke:ve.defaultColor}},[`${Ge}-success-bg, ${Ge}-bg`]:{position:"relative",background:ve.defaultColor,borderRadius:ve.lineBorderRadius,transition:`all ${ve.motionDurationSlow} ${ve.motionEaseInOutCirc}`},[`${Ge}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Ge}-text`]:{width:"max-content",marginInlineStart:0,marginTop:ve.marginXXS}},[`${Ge}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Re})`]},height:"100%",width:`calc(1 / var(${we}) * 100%)`,display:"block"},[`&${Ge}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Ge}-text-inner`]:{color:ve.colorWhite,[`&${Ge}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Ge}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:ve.colorSuccess},[`${Ge}-text`]:{display:"inline-block",marginInlineStart:ve.marginXS,color:ve.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[_]:{fontSize:ve.fontSize},[`&${Ge}-text-outer`]:{width:"max-content"},[`&${Ge}-text-outer${Ge}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:ve.marginXS}},[`${Ge}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,Qe.unit)(ve.paddingXXS)}`,[`&${Ge}-text-start`]:{justifyContent:"start"},[`&${Ge}-text-end`]:{justifyContent:"end"}},[`&${Ge}-status-active`]:{[`${Ge}-bg::before`]:{position:"absolute",inset:0,backgroundColor:ve.colorBgContainer,borderRadius:ve.lineBorderRadius,opacity:0,animationName:ce(),animationDuration:ve.progressActiveMotionDuration,animationTimingFunction:ve.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Ge}-rtl${Ge}-status-active`]:{[`${Ge}-bg::before`]:{animationName:ce(!0)}},[`&${Ge}-status-exception`]:{[`${Ge}-bg`]:{backgroundColor:ve.colorError},[`${Ge}-text`]:{color:ve.colorError}},[`&${Ge}-status-exception ${Ge}-inner:not(${Ge}-circle-gradient)`]:{[`${Ge}-circle-path`]:{stroke:ve.colorError}},[`&${Ge}-status-success`]:{[`${Ge}-bg`]:{backgroundColor:ve.colorSuccess},[`${Ge}-text`]:{color:ve.colorSuccess}},[`&${Ge}-status-success ${Ge}-inner:not(${Ge}-circle-gradient)`]:{[`${Ge}-circle-path`]:{stroke:ve.colorSuccess}}})}},Ie=ve=>{const{componentCls:Ge,iconCls:_}=ve;return{[Ge]:{[`${Ge}-circle-trail`]:{stroke:ve.remainingColor},[`&${Ge}-circle ${Ge}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Ge}-circle ${Ge}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:ve.circleTextColor,fontSize:ve.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[_]:{fontSize:ve.circleIconFontSize}},[`${Ge}-circle&-status-exception`]:{[`${Ge}-text`]:{color:ve.colorError}},[`${Ge}-circle&-status-success`]:{[`${Ge}-text`]:{color:ve.colorSuccess}}},[`${Ge}-inline-circle`]:{lineHeight:1,[`${Ge}-inner`]:{verticalAlign:"bottom"}}}},De=ve=>{const{componentCls:Ge}=ve;return{[Ge]:{[`${Ge}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:ve.progressStepMinWidth,marginInlineEnd:ve.progressStepMarginInlineEnd,backgroundColor:ve.remainingColor,transition:`all ${ve.motionDurationSlow}`,"&-active":{backgroundColor:ve.defaultColor}}}}}},L=ve=>{const{componentCls:Ge,iconCls:_}=ve;return{[Ge]:{[`${Ge}-small&-line, ${Ge}-small&-line ${Ge}-text ${_}`]:{fontSize:ve.fontSizeSM}}}},J=ve=>({circleTextColor:ve.colorText,defaultColor:ve.colorInfo,remainingColor:ve.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${ve.fontSize/ve.fontSizeSM}em`});var me=(0,Fe.I$)("Progress",ve=>{const Ge=ve.calc(ve.marginXXS).div(2).equal(),_=(0,st.mergeToken)(ve,{progressStepMarginInlineEnd:Ge,progressStepMinWidth:Ge,progressActiveMotionDuration:"2.4s"});return[He(_),Ie(_),De(_),L(_)]},J),Le=function(ve,Ge){var _={};for(var w in ve)Object.prototype.hasOwnProperty.call(ve,w)&&Ge.indexOf(w)<0&&(_[w]=ve[w]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,w=Object.getOwnPropertySymbols(ve);ye<w.length;ye++)Ge.indexOf(w[ye])<0&&Object.prototype.propertyIsEnumerable.call(ve,w[ye])&&(_[w[ye]]=ve[w[ye]]);return _};const We=ve=>{let Ge=[];return Object.keys(ve).forEach(_=>{const w=parseFloat(_.replace(/%/g,""));Number.isNaN(w)||Ge.push({key:w,value:ve[_]})}),Ge=Ge.sort((_,w)=>_.key-w.key),Ge.map(_=>{let{key:w,value:ye}=_;return`${ye} ${w}%`}).join(", ")},Je=(ve,Ge)=>{const{from:_=W.presetPrimaryColors.blue,to:w=W.presetPrimaryColors.blue,direction:ye=Ge==="rtl"?"to left":"to right"}=ve,B=Le(ve,["from","to","direction"]);if(Object.keys(B).length!==0){const lt=We(B),Se=`linear-gradient(${ye}, ${lt})`;return{background:Se,[Re]:Se}}const X=`linear-gradient(${ye}, ${_}, ${w})`;return{background:X,[Re]:X}};var nt=ve=>{const{prefixCls:Ge,direction:_,percent:w,size:ye,strokeWidth:B,strokeColor:X,strokeLinecap:lt="round",children:Se,trailColor:Ne=null,percentPosition:ze,success:z}=ve,{align:Z,type:be}=ze,ke=X&&typeof X!="string"?Je(X,_):{[Re]:X,background:X},G=lt==="square"||lt==="butt"?0:void 0,ht=ye!=null?ye:[-1,B||(ye==="small"?6:8)],[de,At]=Ze(ht,"line",{strokeWidth:B}),$t={backgroundColor:Ne||void 0,borderRadius:G},Kt=Object.assign(Object.assign({width:`${ge(w)}%`,height:At,borderRadius:G},ke),{[we]:ge(w)/100}),ar=Be(ve),Qt={width:`${ge(ar)}%`,height:At,borderRadius:G,backgroundColor:z==null?void 0:z.strokeColor},Zt={width:de<0?"100%":de},Sr=y.createElement("div",{className:`${Ge}-inner`,style:$t},y.createElement("div",{className:q()(`${Ge}-bg`,`${Ge}-bg-${be}`),style:Kt},be==="inner"&&Se),ar!==void 0&&y.createElement("div",{className:`${Ge}-success-bg`,style:Qt})),Nr=be==="outer"&&Z==="start",Yt=be==="outer"&&Z==="end";return be==="outer"&&Z==="center"?y.createElement("div",{className:`${Ge}-layout-bottom`},Sr,Se):y.createElement("div",{className:`${Ge}-outer`,style:Zt},Nr&&Se,Sr,Yt&&Se)},gt=ve=>{const{size:Ge,steps:_,rounding:w=Math.round,percent:ye=0,strokeWidth:B=8,strokeColor:X,trailColor:lt=null,prefixCls:Se,children:Ne}=ve,ze=w(_*(ye/100)),z=Ge==="small"?2:14,Z=Ge!=null?Ge:[z,B],[be,ke]=Ze(Z,"step",{steps:_,strokeWidth:B}),G=be/_,ht=Array.from({length:_});for(let de=0;de<_;de++){const At=Array.isArray(X)?X[de]:X;ht[de]=y.createElement("div",{key:de,className:q()(`${Se}-steps-item`,{[`${Se}-steps-item-active`]:de<=ze-1}),style:{backgroundColor:de<=ze-1?At:lt,width:G,height:ke}})}return y.createElement("div",{className:`${Se}-steps-outer`},ht,Ne)},mt=function(ve,Ge){var _={};for(var w in ve)Object.prototype.hasOwnProperty.call(ve,w)&&Ge.indexOf(w)<0&&(_[w]=ve[w]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,w=Object.getOwnPropertySymbols(ve);ye<w.length;ye++)Ge.indexOf(w[ye])<0&&Object.prototype.propertyIsEnumerable.call(ve,w[ye])&&(_[w[ye]]=ve[w[ye]]);return _};const St=null,Tt=["normal","exception","active","success"];var vt=y.forwardRef((ve,Ge)=>{const{prefixCls:_,className:w,rootClassName:ye,steps:B,strokeColor:X,percent:lt=0,size:Se="default",showInfo:Ne=!0,type:ze="line",status:z,format:Z,style:be,percentPosition:ke={}}=ve,G=mt(ve,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:ht="end",type:de="outer"}=ke,At=Array.isArray(X)?X[0]:X,$t=typeof X=="string"||Array.isArray(X)?X:void 0,Kt=y.useMemo(()=>{if(At){const tn=typeof At=="string"?At:Object.values(At)[0];return new ue.FastColor(tn).isLight()}return!1},[X]),ar=y.useMemo(()=>{var tn,Yr;const Xr=Be(ve);return parseInt(Xr!==void 0?(tn=Xr!=null?Xr:0)===null||tn===void 0?void 0:tn.toString():(Yr=lt!=null?lt:0)===null||Yr===void 0?void 0:Yr.toString(),10)},[lt,ve.success,ve.successPercent]),Qt=y.useMemo(()=>!Tt.includes(z)&&ar>=100?"success":z||"normal",[z,ar]),{getPrefixCls:Zt,direction:Sr,progress:Nr}=y.useContext(K.E_),Yt=Zt("progress",_),[wr,zt,Rt]=me(Yt),kt=ze==="line",qt=kt&&!B,or=y.useMemo(()=>{if(!Ne)return null;const tn=Be(ve);let Yr;const Xr=Z||(vn=>`${vn}%`),Tr=kt&&Kt&&de==="inner";return de==="inner"||Z||Qt!=="exception"&&Qt!=="success"?Yr=Xr(ge(lt),ge(tn)):Qt==="exception"?Yr=kt?y.createElement(H.Z,null):y.createElement(m.Z,null):Qt==="success"&&(Yr=kt?y.createElement(xe.Z,null):y.createElement(pe.Z,null)),y.createElement("span",{className:q()(`${Yt}-text`,{[`${Yt}-text-bright`]:Tr,[`${Yt}-text-${ht}`]:qt,[`${Yt}-text-${de}`]:qt}),title:typeof Yr=="string"?Yr:void 0},Yr)},[Ne,lt,ar,Qt,ze,Yt,Z]);let Dr;ze==="line"?Dr=B?y.createElement(gt,Object.assign({},ve,{strokeColor:$t,prefixCls:Yt,steps:typeof B=="object"?B.count:B}),or):y.createElement(nt,Object.assign({},ve,{strokeColor:At,prefixCls:Yt,direction:Sr,percentPosition:{align:ht,type:de}}),or):(ze==="circle"||ze==="dashboard")&&(Dr=y.createElement(Et,Object.assign({},ve,{strokeColor:At,prefixCls:Yt,progressStatus:Qt}),or));const nn=q()(Yt,`${Yt}-status-${Qt}`,{[`${Yt}-${ze==="dashboard"&&"circle"||ze}`]:ze!=="line",[`${Yt}-inline-circle`]:ze==="circle"&&Ze(Se,"circle")[0]<=20,[`${Yt}-line`]:qt,[`${Yt}-line-align-${ht}`]:qt,[`${Yt}-line-position-${de}`]:qt,[`${Yt}-steps`]:B,[`${Yt}-show-info`]:Ne,[`${Yt}-${Se}`]:typeof Se=="string",[`${Yt}-rtl`]:Sr==="rtl"},Nr==null?void 0:Nr.className,w,ye,zt,Rt);return wr(y.createElement("div",Object.assign({ref:Ge,style:Object.assign(Object.assign({},Nr==null?void 0:Nr.style),be),className:nn,role:"progressbar","aria-valuenow":ar,"aria-valuemin":0,"aria-valuemax":100},(0,o.Z)(G,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Dr))}),dt=vt},47889:function(Gt,it,S){"use strict";S.d(it,{ZP:function(){return Xe}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(18929),H=S(26112),m=S(48755),ie=S(83397),q=S(31756);const o=y.createContext(null),K=o.Provider;var M=o;const b=y.createContext(null),E=b.Provider;var C=S(16632),P=S(8654),ne=S(12919),te=S(63872),V=S(74632),D=S(2171),j=S(56553),O=S(36237),F=S(63356),se=S(16931),Ee=S(51636);const he=Ve=>{const{componentCls:Ze,antCls:$e}=Ve,qe=`${Ze}-group`;return{[qe]:Object.assign(Object.assign({},(0,F.Wf)(Ve)),{display:"inline-block",fontSize:0,[`&${qe}-rtl`]:{direction:"rtl"},[`&${qe}-block`]:{display:"flex"},[`${$e}-badge ${$e}-badge-count`]:{zIndex:1},[`> ${$e}-badge:not(:first-child) > ${$e}-button-wrapper`]:{borderInlineStart:"none"}})}},Ce=Ve=>{const{componentCls:Ze,wrapperMarginInlineEnd:$e,colorPrimary:qe,radioSize:je,motionDurationSlow:Et,motionDurationMid:Qe,motionEaseInOutCirc:wt,colorBgContainer:Fe,colorBorder:st,lineWidth:Re,colorBgContainerDisabled:we,colorTextDisabled:ce,paddingXS:He,dotColorDisabled:Ie,lineType:De,radioColor:L,radioBgColor:J,calc:me}=Ve,Le=`${Ze}-inner`,Je=me(je).sub(me(4).mul(2)),et=me(1).mul(je).equal({unit:!0});return{[`${Ze}-wrapper`]:Object.assign(Object.assign({},(0,F.Wf)(Ve)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:$e,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${Ze}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ve.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${Ze}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,O.unit)(Re)} ${De} ${qe}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[Ze]:Object.assign(Object.assign({},(0,F.Wf)(Ve)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Ze}-wrapper:hover &,
|
|
&:hover ${Le}`]:{borderColor:qe},[`${Ze}-input:focus-visible + ${Le}`]:Object.assign({},(0,F.oN)(Ve)),[`${Ze}:hover::after, ${Ze}-wrapper:hover &::after`]:{visibility:"visible"},[`${Ze}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:et,height:et,marginBlockStart:me(1).mul(je).div(-2).equal({unit:!0}),marginInlineStart:me(1).mul(je).div(-2).equal({unit:!0}),backgroundColor:L,borderBlockStart:0,borderInlineStart:0,borderRadius:et,transform:"scale(0)",opacity:0,transition:`all ${Et} ${wt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:et,height:et,backgroundColor:Fe,borderColor:st,borderStyle:"solid",borderWidth:Re,borderRadius:"50%",transition:`all ${Qe}`},[`${Ze}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Ze}-checked`]:{[Le]:{borderColor:qe,backgroundColor:J,"&::after":{transform:`scale(${Ve.calc(Ve.dotSize).div(je).equal()})`,opacity:1,transition:`all ${Et} ${wt}`}}},[`${Ze}-disabled`]:{cursor:"not-allowed",[Le]:{backgroundColor:we,borderColor:st,cursor:"not-allowed","&::after":{backgroundColor:Ie}},[`${Ze}-input`]:{cursor:"not-allowed"},[`${Ze}-disabled + span`]:{color:ce,cursor:"not-allowed"},[`&${Ze}-checked`]:{[Le]:{"&::after":{transform:`scale(${me(Je).div(je).equal()})`}}}},[`span${Ze} + *`]:{paddingInlineStart:He,paddingInlineEnd:He}})}},Pe=Ve=>{const{buttonColor:Ze,controlHeight:$e,componentCls:qe,lineWidth:je,lineType:Et,colorBorder:Qe,motionDurationSlow:wt,motionDurationMid:Fe,buttonPaddingInline:st,fontSize:Re,buttonBg:we,fontSizeLG:ce,controlHeightLG:He,controlHeightSM:Ie,paddingXS:De,borderRadius:L,borderRadiusSM:J,borderRadiusLG:me,buttonCheckedBg:Le,buttonSolidCheckedColor:We,colorTextDisabled:Je,colorBgContainerDisabled:et,buttonCheckedBgDisabled:nt,buttonCheckedColorDisabled:pt,colorPrimary:gt,colorPrimaryHover:mt,colorPrimaryActive:St,buttonSolidCheckedBg:Tt,buttonSolidCheckedHoverBg:Ye,buttonSolidCheckedActiveBg:vt,calc:dt}=Ve;return{[`${qe}-button-wrapper`]:{position:"relative",display:"inline-block",height:$e,margin:0,paddingInline:st,paddingBlock:0,color:Ze,fontSize:Re,lineHeight:(0,O.unit)(dt($e).sub(dt(je).mul(2)).equal()),background:we,border:`${(0,O.unit)(je)} ${Et} ${Qe}`,borderBlockStartWidth:dt(je).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:je,cursor:"pointer",transition:[`color ${Fe}`,`background ${Fe}`,`box-shadow ${Fe}`].join(","),a:{color:Ze},[`> ${qe}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:dt(je).mul(-1).equal(),insetInlineStart:dt(je).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:je,paddingInline:0,backgroundColor:Qe,transition:`background-color ${wt}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,O.unit)(je)} ${Et} ${Qe}`,borderStartStartRadius:L,borderEndStartRadius:L},"&:last-child":{borderStartEndRadius:L,borderEndEndRadius:L},"&:first-child:last-child":{borderRadius:L},[`${qe}-group-large &`]:{height:He,fontSize:ce,lineHeight:(0,O.unit)(dt(He).sub(dt(je).mul(2)).equal()),"&:first-child":{borderStartStartRadius:me,borderEndStartRadius:me},"&:last-child":{borderStartEndRadius:me,borderEndEndRadius:me}},[`${qe}-group-small &`]:{height:Ie,paddingInline:dt(De).sub(je).equal(),paddingBlock:0,lineHeight:(0,O.unit)(dt(Ie).sub(dt(je).mul(2)).equal()),"&:first-child":{borderStartStartRadius:J,borderEndStartRadius:J},"&:last-child":{borderStartEndRadius:J,borderEndEndRadius:J}},"&:hover":{position:"relative",color:gt},"&:has(:focus-visible)":Object.assign({},(0,F.oN)(Ve)),[`${qe}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${qe}-button-wrapper-disabled)`]:{zIndex:1,color:gt,background:Le,borderColor:gt,"&::before":{backgroundColor:gt},"&:first-child":{borderColor:gt},"&:hover":{color:mt,borderColor:mt,"&::before":{backgroundColor:mt}},"&:active":{color:St,borderColor:St,"&::before":{backgroundColor:St}}},[`${qe}-group-solid &-checked:not(${qe}-button-wrapper-disabled)`]:{color:We,background:Tt,borderColor:Tt,"&:hover":{color:We,background:Ye,borderColor:Ye},"&:active":{color:We,background:vt,borderColor:vt}},"&-disabled":{color:Je,backgroundColor:et,borderColor:Qe,cursor:"not-allowed","&:first-child, &:hover":{color:Je,backgroundColor:et,borderColor:Qe}},[`&-disabled${qe}-button-wrapper-checked`]:{color:pt,backgroundColor:nt,borderColor:Qe,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},_e=Ve=>{const{wireframe:Ze,padding:$e,marginXS:qe,lineWidth:je,fontSizeLG:Et,colorText:Qe,colorBgContainer:wt,colorTextDisabled:Fe,controlItemBgActiveDisabled:st,colorTextLightSolid:Re,colorPrimary:we,colorPrimaryHover:ce,colorPrimaryActive:He,colorWhite:Ie}=Ve,De=4,L=Et,J=Ze?L-De*2:L-(De+je)*2;return{radioSize:L,dotSize:J,dotColorDisabled:Fe,buttonSolidCheckedColor:Re,buttonSolidCheckedBg:we,buttonSolidCheckedHoverBg:ce,buttonSolidCheckedActiveBg:He,buttonBg:wt,buttonCheckedBg:wt,buttonColor:Qe,buttonCheckedBgDisabled:st,buttonCheckedColorDisabled:Fe,buttonPaddingInline:$e-je,wrapperMarginInlineEnd:qe,radioColor:Ze?we:Ie,radioBgColor:Ze?wt:we}};var tt=(0,se.I$)("Radio",Ve=>{const{controlOutline:Ze,controlOutlineWidth:$e}=Ve,qe=`0 0 0 ${(0,O.unit)($e)} ${Ze}`,je=qe,Et=(0,Ee.mergeToken)(Ve,{radioFocusShadow:qe,radioButtonFocusShadow:je});return[he(Et),Ce(Et),Pe(Et)]},_e,{unitless:{radioSize:!0,dotSize:!0}}),Q=function(Ve,Ze){var $e={};for(var qe in Ve)Object.prototype.hasOwnProperty.call(Ve,qe)&&Ze.indexOf(qe)<0&&($e[qe]=Ve[qe]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,qe=Object.getOwnPropertySymbols(Ve);je<qe.length;je++)Ze.indexOf(qe[je])<0&&Object.prototype.propertyIsEnumerable.call(Ve,qe[je])&&($e[qe[je]]=Ve[qe[je]]);return $e};const N=(Ve,Ze)=>{var $e,qe;const je=y.useContext(M),Et=y.useContext(b),{getPrefixCls:Qe,direction:wt,radio:Fe}=y.useContext(m.E_),st=y.useRef(null),Re=(0,P.sQ)(Ze,st),{isFormItemInput:we}=y.useContext(j.aM),ce=ve=>{var Ge,_;(Ge=Ve.onChange)===null||Ge===void 0||Ge.call(Ve,ve),(_=je==null?void 0:je.onChange)===null||_===void 0||_.call(je,ve)},{prefixCls:He,className:Ie,rootClassName:De,children:L,style:J,title:me}=Ve,Le=Q(Ve,["prefixCls","className","rootClassName","children","style","title"]),We=Qe("radio",He),Je=((je==null?void 0:je.optionType)||Et)==="button",et=Je?`${We}-button`:We,nt=(0,ie.Z)(We),[pt,gt,mt]=tt(We,nt),St=Object.assign({},Le),Tt=y.useContext(D.Z);je&&(St.name=je.name,St.onChange=ce,St.checked=Ve.value===je.value,St.disabled=($e=St.disabled)!==null&&$e!==void 0?$e:je.disabled),St.disabled=(qe=St.disabled)!==null&&qe!==void 0?qe:Tt;const Ye=xe()(`${et}-wrapper`,{[`${et}-wrapper-checked`]:St.checked,[`${et}-wrapper-disabled`]:St.disabled,[`${et}-wrapper-rtl`]:wt==="rtl",[`${et}-wrapper-in-form-item`]:we,[`${et}-wrapper-block`]:!!(je!=null&&je.block)},Fe==null?void 0:Fe.className,Ie,De,gt,mt,nt),[vt,dt]=(0,V.Z)(St.onClick);return pt(y.createElement(ne.Z,{component:"Radio",disabled:St.disabled},y.createElement("label",{className:Ye,style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),J),onMouseEnter:Ve.onMouseEnter,onMouseLeave:Ve.onMouseLeave,title:me,onClick:vt},y.createElement(C.Z,Object.assign({},St,{className:xe()(St.className,{[te.A]:!Je}),type:"radio",prefixCls:et,ref:Re,onClick:dt})),L!==void 0?y.createElement("span",{className:`${et}-label`},L):null)))};var oe=y.forwardRef(N),ae=S(80402);const le=y.forwardRef((Ve,Ze)=>{const{getPrefixCls:$e,direction:qe}=y.useContext(m.E_),je=(0,ae.Z)(),{prefixCls:Et,className:Qe,rootClassName:wt,options:Fe,buttonStyle:st="outline",disabled:Re,children:we,size:ce,style:He,id:Ie,optionType:De,name:L=je,defaultValue:J,value:me,block:Le=!1,onChange:We,onMouseEnter:Je,onMouseLeave:et,onFocus:nt,onBlur:pt}=Ve,[gt,mt]=(0,pe.Z)(J,{value:me}),St=y.useCallback(X=>{const lt=gt,Se=X.target.value;"value"in Ve||mt(Se),Se!==lt&&(We==null||We(X))},[gt,mt,We]),Tt=$e("radio",Et),Ye=`${Tt}-group`,vt=(0,ie.Z)(Tt),[dt,ve,Ge]=tt(Tt,vt);let _=we;Fe&&Fe.length>0&&(_=Fe.map(X=>typeof X=="string"||typeof X=="number"?y.createElement(oe,{key:X.toString(),prefixCls:Tt,disabled:Re,value:X,checked:gt===X},X):y.createElement(oe,{key:`radio-group-value-options-${X.value}`,prefixCls:Tt,disabled:X.disabled||Re,value:X.value,checked:gt===X.value,title:X.title,style:X.style,id:X.id,required:X.required},X.label)));const w=(0,q.Z)(ce),ye=xe()(Ye,`${Ye}-${st}`,{[`${Ye}-${w}`]:w,[`${Ye}-rtl`]:qe==="rtl",[`${Ye}-block`]:Le},Qe,wt,ve,Ge,vt),B=y.useMemo(()=>({onChange:St,value:gt,disabled:Re,name:L,optionType:De,block:Le}),[St,gt,Re,L,De,Le]);return dt(y.createElement("div",Object.assign({},(0,H.Z)(Ve,{aria:!0,data:!0}),{className:ye,style:He,onMouseEnter:Je,onMouseLeave:et,onFocus:nt,onBlur:pt,id:Ie,ref:Ze}),y.createElement(K,{value:B},_)))});var x=y.memo(le),A=function(Ve,Ze){var $e={};for(var qe in Ve)Object.prototype.hasOwnProperty.call(Ve,qe)&&Ze.indexOf(qe)<0&&($e[qe]=Ve[qe]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,qe=Object.getOwnPropertySymbols(Ve);je<qe.length;je++)Ze.indexOf(qe[je])<0&&Object.prototype.propertyIsEnumerable.call(Ve,qe[je])&&($e[qe[je]]=Ve[qe[je]]);return $e};const W=(Ve,Ze)=>{const{getPrefixCls:$e}=y.useContext(m.E_),{prefixCls:qe}=Ve,je=A(Ve,["prefixCls"]),Et=$e("radio",qe);return y.createElement(E,{value:"button"},y.createElement(oe,Object.assign({prefixCls:Et},je,{type:"radio",ref:Ze})))};var ge=y.forwardRef(W);const Be=oe;Be.Button=ge,Be.Group=x,Be.__ANT_RADIO=!0;var Xe=Be},44104:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return ne}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(11592),H=S(99402),m=S(48755),ie=S(70045);const q=y.createContext({latestIndex:0}),o=q.Provider;var M=te=>{let{className:V,index:D,children:j,split:O,style:F}=te;const{latestIndex:se}=y.useContext(q);return j==null?null:y.createElement(y.Fragment,null,y.createElement("div",{className:V,style:F},j),D<se&&O&&y.createElement("span",{className:`${V}-split`},O))},b=S(31547),E=function(te,V){var D={};for(var j in te)Object.prototype.hasOwnProperty.call(te,j)&&V.indexOf(j)<0&&(D[j]=te[j]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var O=0,j=Object.getOwnPropertySymbols(te);O<j.length;O++)V.indexOf(j[O])<0&&Object.prototype.propertyIsEnumerable.call(te,j[O])&&(D[j[O]]=te[j[O]]);return D};const P=y.forwardRef((te,V)=>{var D;const{getPrefixCls:j,direction:O,size:F,className:se,style:Ee,classNames:he,styles:Ce}=(0,m.dj)("space"),{size:Pe=F!=null?F:"small",align:_e,className:tt,rootClassName:Q,children:N,direction:Y="horizontal",prefixCls:oe,split:ae,style:le,wrap:x=!1,classNames:A,styles:W}=te,ge=E(te,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Be,Xe]=Array.isArray(Pe)?Pe:[Pe,Pe],Ve=(0,H.n)(Xe),Ze=(0,H.n)(Be),$e=(0,H.T)(Xe),qe=(0,H.T)(Be),je=(0,pe.Z)(N,{keepEmpty:!0}),Et=_e===void 0&&Y==="horizontal"?"center":_e,Qe=j("space",oe),[wt,Fe,st]=(0,b.Z)(Qe),Re=xe()(Qe,se,Fe,`${Qe}-${Y}`,{[`${Qe}-rtl`]:O==="rtl",[`${Qe}-align-${Et}`]:Et,[`${Qe}-gap-row-${Xe}`]:Ve,[`${Qe}-gap-col-${Be}`]:Ze},tt,Q,st),we=xe()(`${Qe}-item`,(D=A==null?void 0:A.item)!==null&&D!==void 0?D:he.item);let ce=0;const He=je.map((L,J)=>{var me;L!=null&&(ce=J);const Le=(L==null?void 0:L.key)||`${we}-${J}`;return y.createElement(M,{className:we,key:Le,index:J,split:ae,style:(me=W==null?void 0:W.item)!==null&&me!==void 0?me:Ce.item},L)}),Ie=y.useMemo(()=>({latestIndex:ce}),[ce]);if(je.length===0)return null;const De={};return x&&(De.flexWrap="wrap"),!Ze&&qe&&(De.columnGap=Be),!Ve&&$e&&(De.rowGap=Xe),wt(y.createElement("div",Object.assign({ref:V,className:Re,style:Object.assign(Object.assign(Object.assign({},De),Ee),le)},ge),y.createElement(o,{value:Ie},He)))});P.Compact=ie.ZP;var ne=P},46e3:function(Gt,it,S){"use strict";S.d(it,{Qt:function(){return H},Uw:function(){return pe},fJ:function(){return xe},ly:function(){return m},oN:function(){return b}});var y=S(36237),ue=S(48746);const xe=new y.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),pe=new y.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),H=new y.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),m=new y.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ie=new y.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),q=new y.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new y.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),K=new y.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),M={"slide-up":{inKeyframes:xe,outKeyframes:pe},"slide-down":{inKeyframes:H,outKeyframes:m},"slide-left":{inKeyframes:ie,outKeyframes:q},"slide-right":{inKeyframes:o,outKeyframes:K}},b=(E,C)=>{const{antCls:P}=E,ne=`${P}-${C}`,{inKeyframes:te,outKeyframes:V}=M[C];return[(0,ue.R)(ne,te,V,E.motionDurationMid),{[`
|
|
${ne}-enter,
|
|
${ne}-appear
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:E.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${ne}-leave`]:{animationTimingFunction:E.motionEaseInQuint}}]}},37645:function(Gt,it,S){"use strict";S.d(it,{ZP:function(){return m},qN:function(){return xe},wZ:function(){return pe}});var y=S(36237),ue=S(36305);const xe=8;function pe(ie){const{contentRadius:q,limitVerticalRadius:o}=ie,K=q>12?q+2:12;return{arrowOffsetHorizontal:K,arrowOffsetVertical:o?xe:K}}function H(ie,q){return ie?q:{}}function m(ie,q,o){const{componentCls:K,boxShadowPopoverArrow:M,arrowOffsetVertical:b,arrowOffsetHorizontal:E}=ie,{arrowDistance:C=0,arrowPlacement:P={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[K]:Object.assign(Object.assign(Object.assign(Object.assign({[`${K}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ue.W)(ie,q,M)),{"&:before":{background:q}})]},H(!!P.top,{[[`&-placement-top > ${K}-arrow`,`&-placement-topLeft > ${K}-arrow`,`&-placement-topRight > ${K}-arrow`].join(",")]:{bottom:C,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${K}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":E,[`> ${K}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(E)})`,[`> ${K}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),H(!!P.bottom,{[[`&-placement-bottom > ${K}-arrow`,`&-placement-bottomLeft > ${K}-arrow`,`&-placement-bottomRight > ${K}-arrow`].join(",")]:{top:C,transform:"translateY(-100%)"},[`&-placement-bottom > ${K}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":E,[`> ${K}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(E)})`,[`> ${K}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),H(!!P.left,{[[`&-placement-left > ${K}-arrow`,`&-placement-leftTop > ${K}-arrow`,`&-placement-leftBottom > ${K}-arrow`].join(",")]:{right:{_skip_check_:!0,value:C},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${K}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${K}-arrow`]:{top:b},[`&-placement-leftBottom > ${K}-arrow`]:{bottom:b}})),H(!!P.right,{[[`&-placement-right > ${K}-arrow`,`&-placement-rightTop > ${K}-arrow`,`&-placement-rightBottom > ${K}-arrow`].join(",")]:{left:{_skip_check_:!0,value:C},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${K}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${K}-arrow`]:{top:b},[`&-placement-rightBottom > ${K}-arrow`]:{bottom:b}}))}}},36305:function(Gt,it,S){"use strict";S.d(it,{W:function(){return xe},w:function(){return ue}});var y=S(36237);function ue(pe){const{sizePopupArrow:H,borderRadiusXS:m,borderRadiusOuter:ie}=pe,q=H/2,o=0,K=q,M=ie*1/Math.sqrt(2),b=q-ie*(1-1/Math.sqrt(2)),E=q-m*(1/Math.sqrt(2)),C=ie*(Math.sqrt(2)-1)+m*(1/Math.sqrt(2)),P=2*q-E,ne=C,te=2*q-M,V=b,D=2*q-o,j=K,O=q*Math.sqrt(2)+ie*(Math.sqrt(2)-2),F=ie*(Math.sqrt(2)-1),se=`polygon(${F}px 100%, 50% ${F}px, ${2*q-F}px 100%, ${F}px 100%)`,Ee=`path('M ${o} ${K} A ${ie} ${ie} 0 0 0 ${M} ${b} L ${E} ${C} A ${m} ${m} 0 0 1 ${P} ${ne} L ${te} ${V} A ${ie} ${ie} 0 0 0 ${D} ${j} Z')`;return{arrowShadowWidth:O,arrowPath:Ee,arrowPolygon:se}}const xe=(pe,H,m)=>{const{sizePopupArrow:ie,arrowPolygon:q,arrowPath:o,arrowShadowWidth:K,borderRadiusXS:M,calc:b}=pe;return{pointerEvents:"none",width:ie,height:ie,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:ie,height:b(ie).div(2).equal(),background:H,clipPath:{_multi_value_:!0,value:[q,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:K,height:K,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,y.unit)(M)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:m,zIndex:0,background:"transparent"}}}},93427:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return ue}});var y=S(34998);function ue(xe,pe){return y.i.reduce((H,m)=>{const ie=xe[`${m}1`],q=xe[`${m}3`],o=xe[`${m}6`],K=xe[`${m}7`];return Object.assign(Object.assign({},H),pe(m,{lightColor:ie,lightBorderColor:q,darkColor:o,textColor:K}))},{})}},25399:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return oe}});var y=S(59301),ue=S(92310),xe=S.n(ue),pe=S(29125),H=S(18929),m=S(62487),ie=S(75030),q=S(86641),o=S(52838),K=S(22703),M=S(32383),b=S(55743),E=S(57700),C=S(48755),P=S(36237),ne=S(63356),te=S(34925),V=S(37645),D=S(36305),j=S(93427),O=S(51636),F=S(16931);const se=ae=>{const{calc:le,componentCls:x,tooltipMaxWidth:A,tooltipColor:W,tooltipBg:ge,tooltipBorderRadius:Be,zIndexPopup:Xe,controlHeight:Ve,boxShadowSecondary:Ze,paddingSM:$e,paddingXS:qe,arrowOffsetHorizontal:je,sizePopupArrow:Et}=ae,Qe=le(Be).add(Et).add(je).equal(),wt=le(Be).mul(2).add(Et).equal();return[{[x]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ne.Wf)(ae)),{position:"absolute",zIndex:Xe,display:"block",width:"max-content",maxWidth:A,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":ge,[`${x}-inner`]:{minWidth:wt,minHeight:Ve,padding:`${(0,P.unit)(ae.calc($e).div(2).equal())} ${(0,P.unit)(qe)}`,color:W,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ge,borderRadius:Be,boxShadow:Ze,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:Qe},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${x}-inner`]:{borderRadius:ae.min(Be,V.qN)}},[`${x}-content`]:{position:"relative"}}),(0,j.Z)(ae,(Fe,st)=>{let{darkColor:Re}=st;return{[`&${x}-${Fe}`]:{[`${x}-inner`]:{backgroundColor:Re},[`${x}-arrow`]:{"--antd-arrow-background-color":Re}}}})),{"&-rtl":{direction:"rtl"}})},(0,V.ZP)(ae,"var(--antd-arrow-background-color)"),{[`${x}-pure`]:{position:"relative",maxWidth:"none",margin:ae.sizePopupArrow}}]},Ee=ae=>Object.assign(Object.assign({zIndexPopup:ae.zIndexPopupBase+70},(0,V.wZ)({contentRadius:ae.borderRadius,limitVerticalRadius:!0})),(0,D.w)((0,O.mergeToken)(ae,{borderRadiusOuter:Math.min(ae.borderRadiusOuter,4)})));var he=function(ae){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,F.I$)("Tooltip",A=>{const{borderRadius:W,colorTextLightSolid:ge,colorBgSpotlight:Be}=A,Xe=(0,O.mergeToken)(A,{tooltipMaxWidth:250,tooltipColor:ge,tooltipBorderRadius:W,tooltipBg:Be});return[se(Xe),(0,te._y)(A,"zoom-big-fast")]},Ee,{resetStyle:!1,injectStyle:le})(ae)},Ce=S(29509);function Pe(ae,le){const x=(0,Ce.o2)(le),A=xe()({[`${ae}-${le}`]:le&&x}),W={},ge={};return le&&!x&&(W.background=le,ge["--antd-arrow-background-color"]=le),{className:A,overlayStyle:W,arrowStyle:ge}}var tt=ae=>{const{prefixCls:le,className:x,placement:A="top",title:W,color:ge,overlayInnerStyle:Be}=ae,{getPrefixCls:Xe}=y.useContext(C.E_),Ve=Xe("tooltip",le),[Ze,$e,qe]=he(Ve),je=Pe(Ve,ge),Et=je.arrowStyle,Qe=Object.assign(Object.assign({},Be),je.overlayStyle),wt=xe()($e,qe,Ve,`${Ve}-pure`,`${Ve}-placement-${A}`,x,je.className);return Ze(y.createElement("div",{className:wt,style:Et},y.createElement("div",{className:`${Ve}-arrow`}),y.createElement(pe.G,Object.assign({},ae,{className:$e,prefixCls:Ve,overlayInnerStyle:Qe}),W)))},Q=function(ae,le){var x={};for(var A in ae)Object.prototype.hasOwnProperty.call(ae,A)&&le.indexOf(A)<0&&(x[A]=ae[A]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,A=Object.getOwnPropertySymbols(ae);W<A.length;W++)le.indexOf(A[W])<0&&Object.prototype.propertyIsEnumerable.call(ae,A[W])&&(x[A[W]]=ae[A[W]]);return x};const Y=y.forwardRef((ae,le)=>{var x,A;const{prefixCls:W,openClassName:ge,getTooltipContainer:Be,color:Xe,overlayInnerStyle:Ve,children:Ze,afterOpenChange:$e,afterVisibleChange:qe,destroyTooltipOnHide:je,arrow:Et=!0,title:Qe,overlay:wt,builtinPlacements:Fe,arrowPointAtCenter:st=!1,autoAdjustOverflow:Re=!0,motion:we,getPopupContainer:ce,placement:He="top",mouseEnterDelay:Ie=.1,mouseLeaveDelay:De=.1,overlayStyle:L,rootClassName:J,overlayClassName:me,styles:Le,classNames:We}=ae,Je=Q(ae,["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"]),et=!!Et,[,nt]=(0,E.ZP)(),{getPopupContainer:pt,getPrefixCls:gt,direction:mt,className:St,style:Tt,classNames:Ye,styles:vt}=(0,C.dj)("tooltip"),dt=(0,M.ln)("Tooltip"),ve=y.useRef(null),Ge=()=>{var Yt;(Yt=ve.current)===null||Yt===void 0||Yt.forceAlign()};y.useImperativeHandle(le,()=>{var Yt,wr;return{forceAlign:Ge,forcePopupAlign:()=>{dt.deprecated(!1,"forcePopupAlign","forceAlign"),Ge()},nativeElement:(Yt=ve.current)===null||Yt===void 0?void 0:Yt.nativeElement,popupElement:(wr=ve.current)===null||wr===void 0?void 0:wr.popupElement}});const[_,w]=(0,H.Z)(!1,{value:(x=ae.open)!==null&&x!==void 0?x:ae.visible,defaultValue:(A=ae.defaultOpen)!==null&&A!==void 0?A:ae.defaultVisible}),ye=!Qe&&!wt&&Qe!==0,B=Yt=>{var wr,zt;w(ye?!1:Yt),ye||((wr=ae.onOpenChange)===null||wr===void 0||wr.call(ae,Yt),(zt=ae.onVisibleChange)===null||zt===void 0||zt.call(ae,Yt))},X=y.useMemo(()=>{var Yt,wr;let zt=st;return typeof Et=="object"&&(zt=(wr=(Yt=Et.pointAtCenter)!==null&&Yt!==void 0?Yt:Et.arrowPointAtCenter)!==null&&wr!==void 0?wr:st),Fe||(0,o.Z)({arrowPointAtCenter:zt,autoAdjustOverflow:Re,arrowWidth:et?nt.sizePopupArrow:0,borderRadius:nt.borderRadius,offset:nt.marginXXS,visibleFirst:!0})},[st,Et,Fe,nt]),lt=y.useMemo(()=>Qe===0?Qe:wt||Qe||"",[wt,Qe]),Se=y.createElement(m.Z,{space:!0},typeof lt=="function"?lt():lt),Ne=gt("tooltip",W),ze=gt(),z=ae["data-popover-inject"];let Z=_;!("open"in ae)&&!("visible"in ae)&&ye&&(Z=!1);const be=y.isValidElement(Ze)&&!(0,K.M2)(Ze)?Ze:y.createElement("span",null,Ze),ke=be.props,G=!ke.className||typeof ke.className=="string"?xe()(ke.className,ge||`${Ne}-open`):ke.className,[ht,de,At]=he(Ne,!z),$t=Pe(Ne,Xe),Kt=$t.arrowStyle,ar=xe()(me,{[`${Ne}-rtl`]:mt==="rtl"},$t.className,J,de,At,St,Ye.root,We==null?void 0:We.root),Qt=xe()(Ye.body,We==null?void 0:We.body),[Zt,Sr]=(0,ie.Cn)("Tooltip",Je.zIndex),Nr=y.createElement(pe.Z,Object.assign({},Je,{zIndex:Zt,showArrow:et,placement:He,mouseEnterDelay:Ie,mouseLeaveDelay:De,prefixCls:Ne,classNames:{root:ar,body:Qt},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),vt.root),Tt),L),Le==null?void 0:Le.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},vt.body),Ve),Le==null?void 0:Le.body),$t.overlayStyle)},getTooltipContainer:ce||Be||pt,ref:ve,builtinPlacements:X,overlay:Se,visible:Z,onVisibleChange:B,afterVisibleChange:$e!=null?$e:qe,arrowContent:y.createElement("span",{className:`${Ne}-arrow-content`}),motion:{motionName:(0,q.m)(ze,"zoom-big-fast",ae.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!je}),Z?(0,K.Tm)(be,{className:G}):be);return ht(y.createElement(b.Z.Provider,{value:Sr},Nr))});Y._InternalPanelDoNotUseOrYouWillBeFired=tt;var oe=Y},64018:function(){var Gt,it,S,y=!1,ue,xe;window.PR_SHOULD_USE_CONTINUATION=!0;var pe,H;(function(){var m=window,ie=["break,continue,do,else,for,if,return,while"],q=[ie,"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"],o=[q,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],K=[o,"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"],M=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],b=[o,"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"],E="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",C=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],P="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",ne=[ie,"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"],te=[ie,"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"],V=[ie,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],D=[K,b,M,C,P,ne,te,V],j=/^(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",F="kwd",se="com",Ee="typ",he="lit",Ce="pun",Pe="pln",_e="tag",tt="dec",Q="src",N="atn",Y="atv",oe="nocode",ae="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function le(we){for(var ce=0,He=!1,Ie=!1,De=0,L=we.length;De<L;++De){var J=we[De];if(J.ignoreCase)Ie=!0;else if(/[a-z]/i.test(J.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){He=!0,Ie=!1;break}}var me={b:8,t:9,n:10,v:11,f:12,r:13};function Le(pt){var gt=pt.charCodeAt(0);if(gt!==92)return gt;var mt=pt.charAt(1);return gt=me[mt],gt||("0"<=mt&&mt<="7"?parseInt(pt.substring(1),8):mt==="u"||mt==="x"?parseInt(pt.substring(2),16):pt.charCodeAt(1))}function We(pt){if(pt<32)return(pt<16?"\\x0":"\\x")+pt.toString(16);var gt=String.fromCharCode(pt);return gt==="\\"||gt==="-"||gt==="]"||gt==="^"?"\\"+gt:gt}function Je(pt){var gt=pt.substring(1,pt.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")),mt=[],St=gt[0]==="^",Tt=["["];St&&Tt.push("^");for(var Ye=St?1:0,vt=gt.length;Ye<vt;++Ye){var dt=gt[Ye];if(/\\[bdsw]/i.test(dt))Tt.push(dt);else{var ve=Le(dt),Ge;Ye+2<vt&>[Ye+1]==="-"?(Ge=Le(gt[Ye+2]),Ye+=2):Ge=ve,mt.push([ve,Ge]),Ge<65||ve>122||(Ge<65||ve>90||mt.push([Math.max(65,ve)|32,Math.min(Ge,90)|32]),Ge<97||ve>122||mt.push([Math.max(97,ve)&-33,Math.min(Ge,122)&-33]))}}mt.sort(function(B,X){return B[0]-X[0]||X[1]-B[1]});for(var _=[],w=[],Ye=0;Ye<mt.length;++Ye){var ye=mt[Ye];ye[0]<=w[1]+1?w[1]=Math.max(w[1],ye[1]):_.push(w=ye)}for(var Ye=0;Ye<_.length;++Ye){var ye=_[Ye];Tt.push(We(ye[0])),ye[1]>ye[0]&&(ye[1]+1>ye[0]&&Tt.push("-"),Tt.push(We(ye[1])))}return Tt.push("]"),Tt.join("")}function et(pt){for(var gt=pt.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")),mt=gt.length,St=[],Tt=0,Ye=0;Tt<mt;++Tt){var vt=gt[Tt];if(vt==="(")++Ye;else if(vt.charAt(0)==="\\"){var dt=+vt.substring(1);dt&&(dt<=Ye?St[dt]=-1:gt[Tt]=We(dt))}}for(var Tt=1;Tt<St.length;++Tt)St[Tt]===-1&&(St[Tt]=++ce);for(var Tt=0,Ye=0;Tt<mt;++Tt){var vt=gt[Tt];if(vt==="(")++Ye,St[Ye]||(gt[Tt]="(?:");else if(vt.charAt(0)==="\\"){var dt=+vt.substring(1);dt&&dt<=Ye&&(gt[Tt]="\\"+St[dt])}}for(var Tt=0;Tt<mt;++Tt)gt[Tt]==="^"&>[Tt+1]!=="^"&&(gt[Tt]="");if(pt.ignoreCase&&He)for(var Tt=0;Tt<mt;++Tt){var vt=gt[Tt],ve=vt.charAt(0);vt.length>=2&&ve==="["?gt[Tt]=Je(vt):ve!=="\\"&&(gt[Tt]=vt.replace(/[a-zA-Z]/g,function(w){var ye=w.charCodeAt(0);return"["+String.fromCharCode(ye&-33,ye|32)+"]"}))}return gt.join("")}for(var nt=[],De=0,L=we.length;De<L;++De){var J=we[De];if(J.global||J.multiline)throw new Error(""+J);nt.push("(?:"+et(J)+")")}return new RegExp(nt.join("|"),Ie?"gi":"g")}function x(we,ce){var He=/(?:^|\s)nocode(?:\s|$)/,Ie=[],De=0,L=[],J=0;function me(Le){var We=Le.nodeType;if(We==1){if(He.test(Le.className))return;for(var Je=Le.firstChild;Je;Je=Je.nextSibling)me(Je);var et=Le.nodeName.toLowerCase();(et==="br"||et==="li")&&(Ie[J]=`
|
|
`,L[J<<1]=De++,L[J++<<1|1]=Le)}else if(We==3||We==4){var nt=Le.nodeValue;nt.length&&(ce?nt=nt.replace(/\r\n?/g,`
|
|
`):nt=nt.replace(/[ \t\r\n]+/g," "),Ie[J]=nt,L[J<<1]=De,De+=nt.length,L[J++<<1|1]=Le)}}return me(we),{sourceCode:Ie.join("").replace(/\n$/,""),spans:L}}function A(we,ce,He,Ie,De){if(He){var L={sourceNode:we,pre:1,langExtension:null,numberLines:null,sourceCode:He,spans:null,basePos:ce,decorations:null};Ie(L),De.push.apply(De,L.decorations)}}var W=/\S/;function ge(we){for(var ce=void 0,He=we.firstChild;He;He=He.nextSibling){var Ie=He.nodeType;ce=Ie===1?ce?we:He:Ie===3&&W.test(He.nodeValue)?we:ce}return ce===we?void 0:ce}function Be(we,ce){var He={},Ie;(function(){for(var J=we.concat(ce),me=[],Le={},We=0,Je=J.length;We<Je;++We){var et=J[We],nt=et[3];if(nt)for(var pt=nt.length;--pt>=0;)He[nt.charAt(pt)]=et;var gt=et[1],mt=""+gt;Le.hasOwnProperty(mt)||(me.push(gt),Le[mt]=null)}me.push(/[\0-\uffff]/),Ie=le(me)})();var De=ce.length,L=function(J){for(var me=J.sourceCode,Le=J.basePos,We=J.sourceNode,Je=[Le,Pe],et=0,nt=me.match(Ie)||[],pt={},gt=0,mt=nt.length;gt<mt;++gt){var St=nt[gt],Tt=pt[St],Ye=void 0,vt;if(typeof Tt=="string")vt=!1;else{var dt=He[St.charAt(0)];if(dt)Ye=St.match(dt[1]),Tt=dt[0];else{for(var ve=0;ve<De;++ve)if(dt=ce[ve],Ye=St.match(dt[1]),Ye){Tt=dt[0];break}Ye||(Tt=Pe)}vt=Tt.length>=5&&Tt.substring(0,5)==="lang-",vt&&!(Ye&&typeof Ye[1]=="string")&&(vt=!1,Tt=Q),vt||(pt[St]=Tt)}var Ge=et;if(et+=St.length,!vt)Je.push(Le+Ge,Tt);else{var _=Ye[1],w=St.indexOf(_),ye=w+_.length;Ye[2]&&(ye=St.length-Ye[2].length,w=ye-_.length);var B=Tt.substring(5);A(We,Le+Ge,St.substring(0,w),L,Je),A(We,Le+Ge+w,_,Et(B,_),Je),A(We,Le+Ge+ye,St.substring(ye),L,Je)}}J.decorations=Je};return L}function Xe(we){var ce=[],He=[];we.tripleQuotedStrings?ce.push([O,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):we.multiLineStrings?ce.push([O,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ce.push([O,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),we.verbatimStrings&&He.push([O,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=we.hashComments;Ie&&(we.cStyleComments?(Ie>1?ce.push([se,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ce.push([se,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),He.push([O,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ce.push([se,/^#[^\r\n]*/,null,"#"])),we.cStyleComments&&(He.push([se,/^\/\/[^\r\n]*/,null]),He.push([se,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var De=we.regexLiterals;if(De){var L=De>1?"":`
|
|
\r`,J=L?".":"[\\S\\s]",me="/(?=[^/*"+L+"])(?:[^/\\x5B\\x5C"+L+"]|\\x5C"+J+"|\\x5B(?:[^\\x5C\\x5D"+L+"]|\\x5C"+J+")*(?:\\x5D|$))+/";He.push(["lang-regex",RegExp("^"+ae+"("+me+")")])}var Le=we.types;Le&&He.push([Ee,Le]);var We=(""+we.keywords).replace(/^ | $/g,"");We.length&&He.push([F,new RegExp("^(?:"+We.replace(/[\s,]+/g,"|")+")\\b"),null]),ce.push([Pe,/^\s+/,null,` \r
|
|
\xA0`]);var Je="^.[^\\s\\w.$@'\"`/\\\\]*";return we.regexLiterals&&(Je+="(?!s*/)"),He.push([he,/^@[a-z_$][a-z_$@0-9]*/i,null],[Ee,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Pe,/^[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"],[Pe,/^\\[\s\S]?/,null],[Ce,new RegExp(Je),null]),Be(ce,He)}var Ve=Xe({keywords:D,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ze(we,ce,He){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,De=/\r\n?|\n/,L=we.ownerDocument,J=L.createElement("li");we.firstChild;)J.appendChild(we.firstChild);var me=[J];function Le(gt){var mt=gt.nodeType;if(mt==1&&!Ie.test(gt.className))if(gt.nodeName==="br")We(gt),gt.parentNode&>.parentNode.removeChild(gt);else for(var St=gt.firstChild;St;St=St.nextSibling)Le(St);else if((mt==3||mt==4)&&He){var Tt=gt.nodeValue,Ye=Tt.match(De);if(Ye){var vt=Tt.substring(0,Ye.index);gt.nodeValue=vt;var dt=Tt.substring(Ye.index+Ye[0].length);if(dt){var ve=gt.parentNode;ve.insertBefore(L.createTextNode(dt),gt.nextSibling)}We(gt),vt||gt.parentNode.removeChild(gt)}}}function We(gt){for(;!gt.nextSibling;)if(gt=gt.parentNode,!gt)return;function mt(Ye,vt){var dt=vt?Ye.cloneNode(!1):Ye,ve=Ye.parentNode;if(ve){var Ge=mt(ve,1),_=Ye.nextSibling;Ge.appendChild(dt);for(var w=_;w;w=_)_=w.nextSibling,Ge.appendChild(w)}return dt}for(var St=mt(gt.nextSibling,0),Tt;(Tt=St.parentNode)&&Tt.nodeType===1;)St=Tt;me.push(St)}for(var Je=0;Je<me.length;++Je)Le(me[Je]);ce===(ce|0)&&me[0].setAttribute("value",ce);var et=L.createElement("ol");et.className="linenums";for(var nt=Math.max(0,ce-1|0)||0,Je=0,pt=me.length;Je<pt;++Je)J=me[Je],J.className="L"+(Je+nt)%10,J.firstChild||J.appendChild(L.createTextNode("\xA0")),et.appendChild(J);we.appendChild(et)}function $e(we){var ce=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ce=ce&&+ce[1]<=8;var He=/\n/g,Ie=we.sourceCode,De=Ie.length,L=0,J=we.spans,me=J.length,Le=0,We=we.decorations,Je=We.length,et=0;We[Je]=De;var nt,pt;for(pt=nt=0;pt<Je;)We[pt]!==We[pt+2]?(We[nt++]=We[pt++],We[nt++]=We[pt++]):pt+=2;for(Je=nt,pt=nt=0;pt<Je;){for(var gt=We[pt],mt=We[pt+1],St=pt+2;St+2<=Je&&We[St+1]===mt;)St+=2;We[nt++]=gt,We[nt++]=mt,pt=St}Je=We.length=nt;var Tt=we.sourceNode,Ye="";Tt&&(Ye=Tt.style.display,Tt.style.display="none");try{for(var vt=null;Le<me;){var dt=J[Le],ve=J[Le+2]||De,Ge=We[et+2]||De,St=Math.min(ve,Ge),_=J[Le+1],w;if(_.nodeType!==1&&(w=Ie.substring(L,St))){ce&&(w=w.replace(He,"\r")),_.nodeValue=w;var ye=_.ownerDocument,B=ye.createElement("span");B.className=We[et+1];var X=_.parentNode;X.replaceChild(B,_),B.appendChild(_),L<ve&&(J[Le+1]=_=ye.createTextNode(Ie.substring(St,ve)),X.insertBefore(_,B.nextSibling))}L=St,L>=ve&&(Le+=2),L>=Ge&&(et+=2)}}finally{Tt&&(Tt.style.display=Ye)}}var qe={};function je(we,ce){for(var He=ce.length;--He>=0;){var Ie=ce[He];qe.hasOwnProperty(Ie)?m.console&&console.warn("cannot override language handler %s",Ie):qe[Ie]=we}}function Et(we,ce){return we&&qe.hasOwnProperty(we)||(we=/^\s*</.test(ce)?"default-markup":"default-code"),qe[we]}je(Ve,["default-code"]),je(Be([],[[Pe,/^[^<?]+/],[tt,/^<!\w[^>]*(?:>|$)/],[se,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Ce,/^(?:<[%?]|[%?]>)/],["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"]),je(Be([[Pe,/^[\s]+/,null,` \r
|
|
`],[Y,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[_e,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Ce,/^[=<>\/]+/],["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"]),je(Be([],[[Y,/^[\s\S]+/]]),["uq.val"]),je(Xe({keywords:K,hashComments:!0,cStyleComments:!0,types:j}),["c","cc","cpp","cxx","cyc","m"]),je(Xe({keywords:"null,true,false"}),["json"]),je(Xe({keywords:b,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:j}),["cs"]),je(Xe({keywords:M,cStyleComments:!0}),["java"]),je(Xe({keywords:V,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),je(Xe({keywords:ne,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),je(Xe({keywords:P,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),je(Xe({keywords:te,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),je(Xe({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),je(Xe({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),je(Be([],[[O,/^[\s\S]+/]]),["regex"]);function Qe(we){var ce=we.langExtension;try{var He=x(we.sourceNode,we.pre),Ie=He.sourceCode;we.sourceCode=Ie,we.spans=He.spans,we.basePos=0,Et(ce,Ie)(we),$e(we)}catch(De){m.console&&console.log(De&&De.stack||De)}}function wt(we,ce,He){var Ie=He||!1,De=ce||null,L=document.createElement("div");L.innerHTML="<pre>"+we+"</pre>",L=L.firstChild,Ie&&Ze(L,Ie,!0);var J={langExtension:De,numberLines:Ie,sourceNode:L,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Qe(J),L.innerHTML}function Fe(we,ce){var He=ce||document.body,Ie=He.ownerDocument||document;function De(dt){return He.getElementsByTagName(dt)}for(var L=[De("pre"),De("code"),De("xmp")],J=[],me=0;me<L.length;++me)for(var Le=0,We=L[me].length;Le<We;++Le)J.push(L[me][Le]);L=null;var Je=Date;Je.now||(Je={now:function(){return+new Date}});var et=0,nt=/\blang(?:uage)?-([\w.]+)(?!\S)/,pt=/\bprettyprint\b/,gt=/\bprettyprinted\b/,mt=/pre|xmp/i,St=/^code$/i,Tt=/^(?:pre|code|xmp)$/i,Ye={};function vt(){for(var dt=m.PR_SHOULD_USE_CONTINUATION?Je.now()+250:1/0;et<J.length&&Je.now()<dt;et++){for(var ve=J[et],Ge=Ye,_=ve;_=_.previousSibling;){var w=_.nodeType,ye=(w===7||w===8)&&_.nodeValue;if(ye?!/^\??prettify\b/.test(ye):w!==3||/\S/.test(_.nodeValue))break;if(ye){Ge={},ye.replace(/\b(\w+)=([\w:.%+-]+)/g,function(de,At,$t){Ge[At]=$t});break}}var B=ve.className;if((Ge!==Ye||pt.test(B))&&!gt.test(B)){for(var X=!1,lt=ve.parentNode;lt;lt=lt.parentNode){var Se=lt.tagName;if(Tt.test(Se)&<.className&&pt.test(lt.className)){X=!0;break}}if(!X){ve.className+=" prettyprinted";var Ne=Ge.lang;if(!Ne){Ne=B.match(nt);var ze;!Ne&&(ze=ge(ve))&&St.test(ze.tagName)&&(Ne=ze.className.match(nt)),Ne&&(Ne=Ne[1])}var z;if(mt.test(ve.tagName))z=1;else{var Z=ve.currentStyle,be=Ie.defaultView,ke=Z?Z.whiteSpace:be&&be.getComputedStyle?be.getComputedStyle(ve,null).getPropertyValue("white-space"):0;z=ke&&ke.substring(0,3)==="pre"}var G=Ge.linenums;(G=G==="true"||+G)||(G=B.match(/\blinenums\b(?::(\d+))?/),G=G?G[1]&&G[1].length?+G[1]:!0:!1),G&&Ze(ve,G,z);var ht={langExtension:Ne,sourceNode:ve,numberLines:G,pre:z,sourceCode:null,basePos:null,spans:null,decorations:null};Qe(ht)}}}et<J.length?m.setTimeout(vt,250):typeof we=="function"&&we()}vt()}var st=m.PR={createSimpleLexer:Be,registerLangHandler:je,sourceDecorator:Xe,PR_ATTRIB_NAME:N,PR_ATTRIB_VALUE:Y,PR_COMMENT:se,PR_DECLARATION:tt,PR_KEYWORD:F,PR_LITERAL:he,PR_NOCODE:oe,PR_PLAIN:Pe,PR_PUNCTUATION:Ce,PR_SOURCE:Q,PR_STRING:O,PR_TAG:_e,PR_TYPE:Ee,prettyPrintOne:y?m.prettyPrintOne=wt:pe=wt,prettyPrint:H=y?m.prettyPrint=Fe:H=Fe},Re=m.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return st})})()},25769:function(Gt,it,S){"use strict";var y=S(98040),ue={"text/plain":"Text","text/html":"Url",default:"Text"},xe="Copy to clipboard: #{key}, Enter";function pe(m){var ie=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,ie)}function H(m,ie){var q,o,K,M,b,E,C=!1;ie||(ie={}),q=ie.debug||!1;try{K=y(),M=document.createRange(),b=document.getSelection(),E=document.createElement("span"),E.textContent=m,E.ariaHidden="true",E.style.all="unset",E.style.position="fixed",E.style.top=0,E.style.clip="rect(0, 0, 0, 0)",E.style.whiteSpace="pre",E.style.webkitUserSelect="text",E.style.MozUserSelect="text",E.style.msUserSelect="text",E.style.userSelect="text",E.addEventListener("copy",function(ne){if(ne.stopPropagation(),ie.format)if(ne.preventDefault(),typeof ne.clipboardData=="undefined"){q&&console.warn("unable to use e.clipboardData"),q&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var te=ue[ie.format]||ue.default;window.clipboardData.setData(te,m)}else ne.clipboardData.clearData(),ne.clipboardData.setData(ie.format,m);ie.onCopy&&(ne.preventDefault(),ie.onCopy(ne.clipboardData))}),document.body.appendChild(E),M.selectNodeContents(E),b.addRange(M);var P=document.execCommand("copy");if(!P)throw new Error("copy command was unsuccessful");C=!0}catch(ne){q&&console.error("unable to copy using execCommand: ",ne),q&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ie.format||"text",m),ie.onCopy&&ie.onCopy(window.clipboardData),C=!0}catch(te){q&&console.error("unable to copy using clipboardData: ",te),q&&console.error("falling back to prompt"),o=pe("message"in ie?ie.message:xe),window.prompt(o,m)}}finally{b&&(typeof b.removeRange=="function"?b.removeRange(M):b.removeAllRanges()),E&&document.body.removeChild(E),K()}return C}Gt.exports=H},53184:function(Gt,it,S){"use strict";var y,ue;function xe(pe,H,m){var ie=function(q,o){return pe.js_beautify(q,o)};return ie.js=pe.js_beautify,ie.css=H.css_beautify,ie.html=m.html_beautify,ie.js_beautify=pe.js_beautify,ie.css_beautify=H.css_beautify,ie.html_beautify=m.html_beautify,ie}y=[S(58553),S(87804),S(40998)],ue=function(pe,H,m){return xe(pe,H,m)}.apply(it,y),ue!==void 0&&(Gt.exports=ue)},87804:function(Gt,it){var S,y;(function(){var ue;(function(){"use strict";var pe=[,,function(q){function o(b){this.__parent=b,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=[]}o.prototype.clone_empty=function(){var b=new o(this.__parent);return b.set_indent(this.__indent_count,this.__alignment_count),b},o.prototype.item=function(b){return b<0?this.__items[this.__items.length+b]:this.__items[b]},o.prototype.has_match=function(b){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(b))return!0;return!1},o.prototype.set_indent=function(b,E){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=E||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.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)},o.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},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(b){this.__items.push(b);var E=b.lastIndexOf(`
|
|
`);E!==-1?this.__character_count=b.length-E:this.__character_count+=b.length},o.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function K(b,E){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),E=E||"",b.indent_level>0&&(E=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}K.prototype.get_indent_size=function(b,E){var C=this.__base_string_length;return E=E||0,b<0&&(C=0),C+=b*this.__indent_size,C+=E,C},K.prototype.get_indent_string=function(b,E){var C=this.__base_string;return E=E||0,b<0&&(b=0,C=""),E+=b*this.__indent_size,this.__ensure_cache(E),C+=this.__cache[E],C},K.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},K.prototype.__add_column=function(){var b=this.__cache.length,E=0,C="";this.__indent_size&&b>=this.__indent_size&&(E=Math.floor(b/this.__indent_size),b-=E*this.__indent_size,C=new Array(E+1).join(this.__indent_string)),b&&(C+=new Array(b+1).join(" ")),this.__cache.push(C)};function M(b,E){this.__indent_cache=new K(b,E),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}M.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},M.prototype.get_line_number=function(){return this.__lines.length},M.prototype.get_indent_string=function(b,E){return this.__indent_cache.get_indent_string(b,E)},M.prototype.get_indent_size=function(b,E){return this.__indent_cache.get_indent_size(b,E)},M.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},M.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},M.prototype.get_code=function(b){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
|
|
`);return b!==`
|
|
`&&(C=C.replace(/[\n]/g,b)),C},M.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},M.prototype.set_indent=function(b,E){return b=b||0,E=E||0,this.next_line.set_indent(b,E),this.__lines.length>1?(this.current_line.set_indent(b,E),!0):(this.current_line.set_indent(),!1)},M.prototype.add_raw_token=function(b){for(var E=0;E<b.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(b.whitespace_before),this.current_line.push(b.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},M.prototype.add_token=function(b){this.__add_space_before_token(),this.current_line.push(b),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},M.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(" "))},M.prototype.remove_indent=function(b){for(var E=this.__lines.length;b<E;)this.__lines[b]._remove_indent(),b++;this.current_line._remove_wrap_indent()},M.prototype.trim=function(b){for(b=b===void 0?!1:b,this.current_line.trim();b&&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},M.prototype.just_added_newline=function(){return this.current_line.is_empty()},M.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},M.prototype.ensure_empty_line_above=function(b,E){for(var C=this.__lines.length-2;C>=0;){var P=this.__lines[C];if(P.is_empty())break;if(P.item(0).indexOf(b)!==0&&P.item(-1)!==E){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},q.exports.Output=M},,,,function(q){function o(b,E){this.raw_options=K(b,E),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"])}o.prototype._get_array=function(b,E){var C=this.raw_options[b],P=E||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(P=C.concat()):typeof C=="string"&&(P=C.split(/[^a-zA-Z0-9_\/\-]+/)),P},o.prototype._get_boolean=function(b,E){var C=this.raw_options[b],P=C===void 0?!!E:!!C;return P},o.prototype._get_characters=function(b,E){var C=this.raw_options[b],P=E||"";return typeof C=="string"&&(P=C.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),P},o.prototype._get_number=function(b,E){var C=this.raw_options[b];E=parseInt(E,10),isNaN(E)&&(E=0);var P=parseInt(C,10);return isNaN(P)&&(P=E),P},o.prototype._get_selection=function(b,E,C){var P=this._get_selection_list(b,E,C);if(P.length!==1)throw new Error("Invalid Option Value: The option '"+b+`' can only be one of the following values:
|
|
`+E+`
|
|
You passed in: '`+this.raw_options[b]+"'");return P[0]},o.prototype._get_selection_list=function(b,E,C){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[E[0]],!this._is_valid_selection(C,E))throw new Error("Invalid Default Value!");var P=this._get_array(b,C);if(!this._is_valid_selection(P,E))throw new Error("Invalid Option Value: The option '"+b+`' can contain only the following values:
|
|
`+E+`
|
|
You passed in: '`+this.raw_options[b]+"'");return P},o.prototype._is_valid_selection=function(b,E){return b.length&&E.length&&!b.some(function(C){return E.indexOf(C)===-1})};function K(b,E){var C={};b=M(b);var P;for(P in b)P!==E&&(C[P]=b[P]);if(E&&b[E])for(P in b[E])C[P]=b[E][P];return C}function M(b){var E={},C;for(C in b){var P=C.replace(/-/g,"_");E[P]=b[C]}return E}q.exports.Options=o,q.exports.normalizeOpts=M,q.exports.mergeOpts=K},,function(q){var o=RegExp.prototype.hasOwnProperty("sticky");function K(M){this.__input=M||"",this.__input_length=this.__input.length,this.__position=0}K.prototype.restart=function(){this.__position=0},K.prototype.back=function(){this.__position>0&&(this.__position-=1)},K.prototype.hasNext=function(){return this.__position<this.__input_length},K.prototype.next=function(){var M=null;return this.hasNext()&&(M=this.__input.charAt(this.__position),this.__position+=1),M},K.prototype.peek=function(M){var b=null;return M=M||0,M+=this.__position,M>=0&&M<this.__input_length&&(b=this.__input.charAt(M)),b},K.prototype.__match=function(M,b){M.lastIndex=b;var E=M.exec(this.__input);return E&&!(o&&M.sticky)&&E.index!==b&&(E=null),E},K.prototype.test=function(M,b){return b=b||0,b+=this.__position,b>=0&&b<this.__input_length?!!this.__match(M,b):!1},K.prototype.testChar=function(M,b){var E=this.peek(b);return M.lastIndex=0,E!==null&&M.test(E)},K.prototype.match=function(M){var b=this.__match(M,this.__position);return b?this.__position+=b[0].length:b=null,b},K.prototype.read=function(M,b,E){var C="",P;return M&&(P=this.match(M),P&&(C+=P[0])),b&&(P||!M)&&(C+=this.readUntil(b,E)),C},K.prototype.readUntil=function(M,b){var E="",C=this.__position;M.lastIndex=this.__position;var P=M.exec(this.__input);return P?(C=P.index,b&&(C+=P[0].length)):C=this.__input_length,E=this.__input.substring(this.__position,C),this.__position=C,E},K.prototype.readUntilAfter=function(M){return this.readUntil(M,!0)},K.prototype.get_regexp=function(M,b){var E=null,C="g";return b&&o&&(C="y"),typeof M=="string"&&M!==""?E=new RegExp(M,C):M&&(E=new RegExp(M.source,C)),E},K.prototype.get_literal_regexp=function(M){return RegExp(M.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},K.prototype.peekUntilAfter=function(M){var b=this.__position,E=this.readUntilAfter(M);return this.__position=b,E},K.prototype.lookBack=function(M){var b=this.__position-1;return b>=M.length&&this.__input.substring(b-M.length,b).toLowerCase()===M},q.exports.InputScanner=K},,,,,function(q){function o(K,M){K=typeof K=="string"?K:K.source,M=typeof M=="string"?M:M.source,this.__directives_block_pattern=new RegExp(K+/ beautify( \w+[:]\w+)+ /.source+M,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(K+/\sbeautify\signore:end\s/.source+M,"g")}o.prototype.get_directives=function(K){if(!K.match(this.__directives_block_pattern))return null;var M={};this.__directive_pattern.lastIndex=0;for(var b=this.__directive_pattern.exec(K);b;)M[b[1]]=b[2],b=this.__directive_pattern.exec(K);return M},o.prototype.readIgnored=function(K){return K.readUntilAfter(this.__directives_end_ignore_pattern)},q.exports.Directives=o},,function(q,o,K){var M=K(16).Beautifier,b=K(17).Options;function E(C,P){var ne=new M(C,P);return ne.beautify()}q.exports=E,q.exports.defaultOptions=function(){return new b}},function(q,o,K){var M=K(17).Options,b=K(2).Output,E=K(8).InputScanner,C=K(13).Directives,P=new C(/\/\*/,/\*\//),ne=/\r\n|[\r\n]/,te=/\r\n|[\r\n]/g,V=/\s/,D=/(?:\s|\n)+/g,j=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,O=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function F(se,Ee){this._source_text=se||"",this._options=new M(Ee),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"]}F.prototype.eatString=function(se){var Ee="";for(this._ch=this._input.next();this._ch;){if(Ee+=this._ch,this._ch==="\\")Ee+=this._input.next();else if(se.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return Ee},F.prototype.eatWhitespace=function(se){for(var Ee=V.test(this._input.peek()),he=0;V.test(this._input.peek());)this._ch=this._input.next(),se&&this._ch===`
|
|
`&&(he===0||he<this._options.max_preserve_newlines)&&(he++,this._output.add_new_line(!0));return Ee},F.prototype.foundNestedPseudoClass=function(){for(var se=0,Ee=1,he=this._input.peek(Ee);he;){if(he==="{")return!0;if(he==="(")se+=1;else if(he===")"){if(se===0)return!1;se-=1}else if(he===";"||he==="}")return!1;Ee++,he=this._input.peek(Ee)}return!1},F.prototype.print_string=function(se){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(se)},F.prototype.preserveSingleSpace=function(se){se&&(this._output.space_before_token=!0)},F.prototype.indent=function(){this._indentLevel++},F.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},F.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var se=this._source_text,Ee=this._options.eol;Ee==="auto"&&(Ee=`
|
|
`,se&&ne.test(se||"")&&(Ee=se.match(ne)[0])),se=se.replace(te,`
|
|
`);var he=se.match(/^[\t ]*/)[0];this._output=new b(this._options,he),this._input=new E(se),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Ce=0,Pe=!1,_e=!1,tt=!1,Q=!1,N=!1,Y=this._ch,oe=!1,ae,le,x;ae=this._input.read(D),le=ae!=="",x=Y,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Y=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var A=this._input.read(j),W=P.get_directives(A);W&&W.ignore==="start"&&(A+=P.readIgnored(this._input)),this.print_string(A),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(le),this.print_string(this._ch);var ge=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ge.match(/[ :]$/)&&(ge=this.eatString(": ").replace(/\s+$/,""),this.print_string(ge),this._output.space_before_token=!0),Ce===0&&ge.indexOf(":")!==-1&&(_e=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(le),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Be.match(/[ :]$/)&&(Be=this.eatString(": ").replace(/\s+$/,""),this.print_string(Be),this._output.space_before_token=!0),Ce===0&&Be.indexOf(":")!==-1?(_e=!0,this.indent()):Be in this.NESTED_AT_RULE?(this._nestedLevel+=1,Be in this.CONDITIONAL_GROUP_RULE&&(tt=!0)):Ce===0&&!_e&&(Q=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(le),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")_e&&(_e=!1,this.outdent()),Q=!1,tt?(tt=!1,Pe=this._indentLevel>=this._nestedLevel):Pe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Pe&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(x==="("?this._output.space_before_token=!1:x!==","&&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(),x==="{"&&this._output.trim(!0),_e&&(this.outdent(),_e=!1),this.print_string(this._ch),Pe=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Xe=0;Xe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Xe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Xe])){oe=!0;break}(Pe||tt)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Q&&Ce===0?(this.print_string(":"),_e||(_e=!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 Ve=x==='"'||x==="'";this.preserveSingleSpace(Ve||le),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")oe=!1,Ce===0?(_e&&(this.outdent(),_e=!1),Q=!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(),Ce++,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(")")),Ce&&(Ce--,this.outdent()));else{var Ze=!1;this._input.lookBack("with")&&(Ze=!0),this.preserveSingleSpace(le||Ze),this.print_string(this._ch),_e&&x==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),N=!0):(this.eatWhitespace(),Ce++,this.indent())}else if(this._ch===")")Ce&&(Ce--,this.outdent()),N&&this._input.peek()===";"&&this._options.selector_separator_newline&&(N=!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&&(!_e||N)&&Ce===0&&!Q?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!_e&&Ce===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&&V.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(le),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),V.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 $e=x==='"'||x==="'";this.preserveSingleSpace($e||le),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&oe&&this._output.add_new_line()}var qe=this._output.get_code(Ee);return qe},q.exports.Beautifier=F},function(q,o,K){var M=K(6).Options;function b(E){M.call(this,E,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var C=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||C;var P=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var ne=0;ne<P.length;ne++)P[ne]!=="expand"?this.brace_style="collapse":this.brace_style=P[ne]}b.prototype=new M,q.exports.Options=b}],H={};function m(q){var o=H[q];if(o!==void 0)return o.exports;var K=H[q]={exports:{}};return pe[q](K,K.exports,m),K.exports}var ie=m(15);ue=ie})();var xe=ue;S=[],y=function(){return{css_beautify:xe}}.apply(it,S),y!==void 0&&(Gt.exports=y)})()},40998:function(Gt,it,S){var y,ue;(function(){var xe;(function(){"use strict";var ie=[,,function(M){function b(P){this.__parent=P,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=[]}b.prototype.clone_empty=function(){var P=new b(this.__parent);return P.set_indent(this.__indent_count,this.__alignment_count),P},b.prototype.item=function(P){return P<0?this.__items[this.__items.length+P]:this.__items[P]},b.prototype.has_match=function(P){for(var ne=this.__items.length-1;ne>=0;ne--)if(this.__items[ne].match(P))return!0;return!1},b.prototype.set_indent=function(P,ne){this.is_empty()&&(this.__indent_count=P||0,this.__alignment_count=ne||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var P=this.__parent.current_line;return P.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),P.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),P.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,P.__items[0]===" "&&(P.__items.splice(0,1),P.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(P){this.__items.push(P);var ne=P.lastIndexOf(`
|
|
`);ne!==-1?this.__character_count=P.length-ne:this.__character_count+=P.length},b.prototype.pop=function(){var P=null;return this.is_empty()||(P=this.__items.pop(),this.__character_count-=P.length),P},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var P="";return this.is_empty()?this.__parent.indent_empty_lines&&(P=this.__parent.get_indent_string(this.__indent_count)):(P=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),P+=this.__items.join("")),P};function E(P,ne){this.__cache=[""],this.__indent_size=P.indent_size,this.__indent_string=P.indent_char,P.indent_with_tabs||(this.__indent_string=new Array(P.indent_size+1).join(P.indent_char)),ne=ne||"",P.indent_level>0&&(ne=new Array(P.indent_level+1).join(this.__indent_string)),this.__base_string=ne,this.__base_string_length=ne.length}E.prototype.get_indent_size=function(P,ne){var te=this.__base_string_length;return ne=ne||0,P<0&&(te=0),te+=P*this.__indent_size,te+=ne,te},E.prototype.get_indent_string=function(P,ne){var te=this.__base_string;return ne=ne||0,P<0&&(P=0,te=""),ne+=P*this.__indent_size,this.__ensure_cache(ne),te+=this.__cache[ne],te},E.prototype.__ensure_cache=function(P){for(;P>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var P=this.__cache.length,ne=0,te="";this.__indent_size&&P>=this.__indent_size&&(ne=Math.floor(P/this.__indent_size),P-=ne*this.__indent_size,te=new Array(ne+1).join(this.__indent_string)),P&&(te+=new Array(P+1).join(" ")),this.__cache.push(te)};function C(P,ne){this.__indent_cache=new E(P,ne),this.raw=!1,this._end_with_newline=P.end_with_newline,this.indent_size=P.indent_size,this.wrap_line_length=P.wrap_line_length,this.indent_empty_lines=P.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(P,ne){return this.__indent_cache.get_indent_string(P,ne)},C.prototype.get_indent_size=function(P,ne){return this.__indent_cache.get_indent_size(P,ne)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(P){return this.is_empty()||!P&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(P){this.trim(!0);var ne=this.current_line.pop();ne&&(ne[ne.length-1]===`
|
|
`&&(ne=ne.replace(/\n+$/g,"")),this.current_line.push(ne)),this._end_with_newline&&this.__add_outputline();var te=this.__lines.join(`
|
|
`);return P!==`
|
|
`&&(te=te.replace(/[\n]/g,P)),te},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(P,ne){return P=P||0,ne=ne||0,this.next_line.set_indent(P,ne),this.__lines.length>1?(this.current_line.set_indent(P,ne),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(P){for(var ne=0;ne<P.newlines;ne++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(P.whitespace_before),this.current_line.push(P.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(P){this.__add_space_before_token(),this.current_line.push(P),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(P){for(var ne=this.__lines.length;P<ne;)this.__lines[P]._remove_indent(),P++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(P){for(P=P===void 0?!1:P,this.current_line.trim();P&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(P,ne){for(var te=this.__lines.length-2;te>=0;){var V=this.__lines[te];if(V.is_empty())break;if(V.item(0).indexOf(P)!==0&&V.item(-1)!==ne){this.__lines.splice(te+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}te--}},M.exports.Output=C},function(M){function b(E,C,P,ne){this.type=E,this.text=C,this.comments_before=null,this.newlines=P||0,this.whitespace_before=ne||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}M.exports.Token=b},,,function(M){function b(P,ne){this.raw_options=E(P,ne),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"])}b.prototype._get_array=function(P,ne){var te=this.raw_options[P],V=ne||[];return typeof te=="object"?te!==null&&typeof te.concat=="function"&&(V=te.concat()):typeof te=="string"&&(V=te.split(/[^a-zA-Z0-9_\/\-]+/)),V},b.prototype._get_boolean=function(P,ne){var te=this.raw_options[P],V=te===void 0?!!ne:!!te;return V},b.prototype._get_characters=function(P,ne){var te=this.raw_options[P],V=ne||"";return typeof te=="string"&&(V=te.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),V},b.prototype._get_number=function(P,ne){var te=this.raw_options[P];ne=parseInt(ne,10),isNaN(ne)&&(ne=0);var V=parseInt(te,10);return isNaN(V)&&(V=ne),V},b.prototype._get_selection=function(P,ne,te){var V=this._get_selection_list(P,ne,te);if(V.length!==1)throw new Error("Invalid Option Value: The option '"+P+`' can only be one of the following values:
|
|
`+ne+`
|
|
You passed in: '`+this.raw_options[P]+"'");return V[0]},b.prototype._get_selection_list=function(P,ne,te){if(!ne||ne.length===0)throw new Error("Selection list cannot be empty.");if(te=te||[ne[0]],!this._is_valid_selection(te,ne))throw new Error("Invalid Default Value!");var V=this._get_array(P,te);if(!this._is_valid_selection(V,ne))throw new Error("Invalid Option Value: The option '"+P+`' can contain only the following values:
|
|
`+ne+`
|
|
You passed in: '`+this.raw_options[P]+"'");return V},b.prototype._is_valid_selection=function(P,ne){return P.length&&ne.length&&!P.some(function(te){return ne.indexOf(te)===-1})};function E(P,ne){var te={};P=C(P);var V;for(V in P)V!==ne&&(te[V]=P[V]);if(ne&&P[ne])for(V in P[ne])te[V]=P[ne][V];return te}function C(P){var ne={},te;for(te in P){var V=te.replace(/-/g,"_");ne[V]=P[te]}return ne}M.exports.Options=b,M.exports.normalizeOpts=C,M.exports.mergeOpts=E},,function(M){var b=RegExp.prototype.hasOwnProperty("sticky");function E(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},E.prototype.peek=function(C){var P=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(P=this.__input.charAt(C)),P},E.prototype.__match=function(C,P){C.lastIndex=P;var ne=C.exec(this.__input);return ne&&!(b&&C.sticky)&&ne.index!==P&&(ne=null),ne},E.prototype.test=function(C,P){return P=P||0,P+=this.__position,P>=0&&P<this.__input_length?!!this.__match(C,P):!1},E.prototype.testChar=function(C,P){var ne=this.peek(P);return C.lastIndex=0,ne!==null&&C.test(ne)},E.prototype.match=function(C){var P=this.__match(C,this.__position);return P?this.__position+=P[0].length:P=null,P},E.prototype.read=function(C,P,ne){var te="",V;return C&&(V=this.match(C),V&&(te+=V[0])),P&&(V||!C)&&(te+=this.readUntil(P,ne)),te},E.prototype.readUntil=function(C,P){var ne="",te=this.__position;C.lastIndex=this.__position;var V=C.exec(this.__input);return V?(te=V.index,P&&(te+=V[0].length)):te=this.__input_length,ne=this.__input.substring(this.__position,te),this.__position=te,ne},E.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},E.prototype.get_regexp=function(C,P){var ne=null,te="g";return P&&b&&(te="y"),typeof C=="string"&&C!==""?ne=new RegExp(C,te):C&&(ne=new RegExp(C.source,te)),ne},E.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(C){var P=this.__position,ne=this.readUntilAfter(C);return this.__position=P,ne},E.prototype.lookBack=function(C){var P=this.__position-1;return P>=C.length&&this.__input.substring(P-C.length,P).toLowerCase()===C},M.exports.InputScanner=E},function(M,b,E){var C=E(8).InputScanner,P=E(3).Token,ne=E(10).TokenStream,te=E(11).WhitespacePattern,V={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},D=function(j,O){this._input=new C(j),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new te(this._input)};D.prototype.tokenize=function(){this._input.restart(),this.__tokens=new ne,this._reset();for(var j,O=new P(V.START,""),F=null,se=[],Ee=new ne;O.type!==V.EOF;){for(j=this._get_next_token(O,F);this._is_comment(j);)Ee.add(j),j=this._get_next_token(O,F);Ee.isEmpty()||(j.comments_before=Ee,Ee=new ne),j.parent=F,this._is_opening(j)?(se.push(F),F=j):F&&this._is_closing(j,F)&&(j.opened=F,F.closed=j,F=se.pop(),j.parent=F),j.previous=O,O.next=j,this.__tokens.add(j),O=j}return this.__tokens},D.prototype._is_first_token=function(){return this.__tokens.isEmpty()},D.prototype._reset=function(){},D.prototype._get_next_token=function(j,O){this._readWhitespace();var F=this._input.read(/.+/g);return F?this._create_token(V.RAW,F):this._create_token(V.EOF,"")},D.prototype._is_comment=function(j){return!1},D.prototype._is_opening=function(j){return!1},D.prototype._is_closing=function(j,O){return!1},D.prototype._create_token=function(j,O){var F=new P(j,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return F},D.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},M.exports.Tokenizer=D,M.exports.TOKEN=V},function(M){function b(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__tokens[this.__position],this.__position+=1),E},b.prototype.peek=function(E){var C=null;return E=E||0,E+=this.__position,E>=0&&E<this.__tokens_length&&(C=this.__tokens[E]),C},b.prototype.add=function(E){this.__parent_token&&(E.parent=this.__parent_token),this.__tokens.push(E),this.__tokens_length+=1},M.exports.TokenStream=b},function(M,b,E){var C=E(12).Pattern;function P(ne,te){C.call(this,ne,te),te?this._line_regexp=this._input.get_regexp(te._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}P.prototype=new C,P.prototype.__set_whitespace_patterns=function(ne,te){ne+="\\t ",te+="\\n\\r",this._match_pattern=this._input.get_regexp("["+ne+te+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+te+"]")},P.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var ne=this._input.read(this._match_pattern);if(ne===" ")this.whitespace_before_token=" ";else if(ne){var te=this.__split(this._newline_regexp,ne);this.newline_count=te.length-1,this.whitespace_before_token=te[this.newline_count]}return ne},P.prototype.matching=function(ne,te){var V=this._create();return V.__set_whitespace_patterns(ne,te),V._update(),V},P.prototype._create=function(){return new P(this._input,this)},P.prototype.__split=function(ne,te){ne.lastIndex=0;for(var V=0,D=[],j=ne.exec(te);j;)D.push(te.substring(V,j.index)),V=j.index+j[0].length,j=ne.exec(te);return V<te.length?D.push(te.substring(V,te.length)):D.push(""),D},M.exports.WhitespacePattern=P},function(M){function b(E,C){this._input=E,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,C&&(this._starting_pattern=this._input.get_regexp(C._starting_pattern,!0),this._match_pattern=this._input.get_regexp(C._match_pattern,!0),this._until_pattern=this._input.get_regexp(C._until_pattern),this._until_after=C._until_after)}b.prototype.read=function(){var E=this._input.read(this._starting_pattern);return(!this._starting_pattern||E)&&(E+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),E},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(E){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(E),C._update(),C},b.prototype.until=function(E){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(E),C._update(),C},b.prototype.starting_with=function(E){var C=this._create();return C._starting_pattern=this._input.get_regexp(E,!0),C._update(),C},b.prototype.matching=function(E){var C=this._create();return C._match_pattern=this._input.get_regexp(E,!0),C._update(),C},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},M.exports.Pattern=b},function(M){function b(E,C){E=typeof E=="string"?E:E.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+C,"g")}b.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var P=this.__directive_pattern.exec(E);P;)C[P[1]]=P[2],P=this.__directive_pattern.exec(E);return C},b.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=b},function(M,b,E){var C=E(12).Pattern,P={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function ne(te,V){C.call(this,te,V),this.__template_pattern=null,this._disabled=Object.assign({},P),this._excluded=Object.assign({},P),V&&(this.__template_pattern=this._input.get_regexp(V.__template_pattern),this._excluded=Object.assign(this._excluded,V._excluded),this._disabled=Object.assign(this._disabled,V._disabled));var D=new C(te);this.__patterns={handlebars_comment:D.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:D.starting_with(/{{{/).until_after(/}}}/),handlebars:D.starting_with(/{{/).until_after(/}}/),php:D.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:D.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:D.starting_with(/{%/).until_after(/%}/),django_value:D.starting_with(/{{/).until_after(/}}/),django_comment:D.starting_with(/{#/).until_after(/#}/),smarty:D.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:D.starting_with(/{\*/).until_after(/\*}/),smarty_literal:D.starting_with(/{literal}/).until_after(/{\/literal}/)}}ne.prototype=new C,ne.prototype._create=function(){return new ne(this._input,this)},ne.prototype._update=function(){this.__set_templated_pattern()},ne.prototype.disable=function(te){var V=this._create();return V._disabled[te]=!0,V._update(),V},ne.prototype.read_options=function(te){var V=this._create();for(var D in P)V._disabled[D]=te.templating.indexOf(D)===-1;return V._update(),V},ne.prototype.exclude=function(te){var V=this._create();return V._excluded[te]=!0,V._update(),V},ne.prototype.read=function(){var te="";this._match_pattern?te=this._input.read(this._starting_pattern):te=this._input.read(this._starting_pattern,this.__template_pattern);for(var V=this._read_template();V;)this._match_pattern?V+=this._input.read(this._match_pattern):V+=this._input.readUntil(this.__template_pattern),te+=V,V=this._read_template();return this._until_after&&(te+=this._input.readUntilAfter(this._until_pattern)),te},ne.prototype.__set_templated_pattern=function(){var te=[];this._disabled.php||te.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||te.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||te.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||te.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(te.push(this.__patterns.django._starting_pattern.source),te.push(this.__patterns.django_value._starting_pattern.source),te.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||te.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&te.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+te.join("|")+")")},ne.prototype._read_template=function(){var te="",V=this._input.peek();if(V==="<"){var D=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&D==="?"&&(te=te||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&D==="%"&&(te=te||this.__patterns.erb.read())}else V==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(te=te||this.__patterns.handlebars_comment.read(),te=te||this.__patterns.handlebars_unescaped.read(),te=te||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(te=te||this.__patterns.django_value.read()),this._excluded.django||(te=te||this.__patterns.django_comment.read(),te=te||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(te=te||this.__patterns.smarty_comment.read(),te=te||this.__patterns.smarty_literal.read(),te=te||this.__patterns.smarty.read()));return te},M.exports.TemplatablePattern=ne},,,,function(M,b,E){var C=E(19).Beautifier,P=E(20).Options;function ne(te,V,D,j){var O=new C(te,V,D,j);return O.beautify()}M.exports=ne,M.exports.defaultOptions=function(){return new P}},function(M,b,E){var C=E(20).Options,P=E(2).Output,ne=E(21).Tokenizer,te=E(21).TOKEN,V=/\r\n|[\r\n]/,D=/\r\n|[\r\n]/g,j=function(Q,N){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Q.max_preserve_newlines,this.preserve_newlines=Q.preserve_newlines,this._output=new P(Q,N)};j.prototype.current_line_has_match=function(Q){return this._output.current_line.has_match(Q)},j.prototype.set_space_before_token=function(Q,N){this._output.space_before_token=Q,this._output.non_breaking_space=N},j.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},j.prototype.add_raw_token=function(Q){this._output.add_raw_token(Q)},j.prototype.print_preserved_newlines=function(Q){var N=0;Q.type!==te.TEXT&&Q.previous.type!==te.TEXT&&(N=Q.newlines?1:0),this.preserve_newlines&&(N=Q.newlines<this.max_preserve_newlines+1?Q.newlines:this.max_preserve_newlines+1);for(var Y=0;Y<N;Y++)this.print_newline(Y>0);return N!==0},j.prototype.traverse_whitespace=function(Q){return Q.whitespace_before||Q.newlines?(this.print_preserved_newlines(Q)||(this._output.space_before_token=!0),!0):!1},j.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},j.prototype.print_newline=function(Q){this._output.add_new_line(Q)},j.prototype.print_token=function(Q){Q.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Q.text))},j.prototype.indent=function(){this.indent_level++},j.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},j.prototype.get_full_indent=function(Q){return Q=this.indent_level+(Q||0),Q<1?"":this._output.get_indent_string(Q)};var O=function(Q){for(var N=null,Y=Q.next;Y.type!==te.EOF&&Q.closed!==Y;){if(Y.type===te.ATTRIBUTE&&Y.text==="type"){Y.next&&Y.next.type===te.EQUALS&&Y.next.next&&Y.next.next.type===te.VALUE&&(N=Y.next.next.text);break}Y=Y.next}return N},F=function(Q,N){var Y=null,oe=null;return N.closed?(Q==="script"?Y="text/javascript":Q==="style"&&(Y="text/css"),Y=O(N)||Y,Y.search("text/css")>-1?oe="css":Y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?oe="javascript":Y.search(/(text|application|dojo)\/(x-)?(html)/)>-1?oe="html":Y.search(/test\/null/)>-1&&(oe="null"),oe):null};function se(Q,N){return N.indexOf(Q)!==-1}function Ee(Q,N,Y){this.parent=Q||null,this.tag=N?N.tag_name:"",this.indent_level=Y||0,this.parser_token=N||null}function he(Q){this._printer=Q,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(Q){var N=new Ee(this._current_frame,Q,this._printer.indent_level);this._current_frame=N},he.prototype._try_pop_frame=function(Q){var N=null;return Q&&(N=Q.parser_token,this._printer.indent_level=Q.indent_level,this._current_frame=Q.parent),N},he.prototype._get_frame=function(Q,N){for(var Y=this._current_frame;Y&&Q.indexOf(Y.tag)===-1;){if(N&&N.indexOf(Y.tag)!==-1){Y=null;break}Y=Y.parent}return Y},he.prototype.try_pop=function(Q,N){var Y=this._get_frame([Q],N);return this._try_pop_frame(Y)},he.prototype.indent_to_tag=function(Q){var N=this._get_frame(Q);N&&(this._printer.indent_level=N.indent_level)};function Ce(Q,N,Y,oe){this._source_text=Q||"",N=N||{},this._js_beautify=Y,this._css_beautify=oe,this._tag_stack=null;var ae=new C(N,"html");this._options=ae,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"}Ce.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Q=this._source_text,N=this._options.eol;this._options.eol==="auto"&&(N=`
|
|
`,Q&&V.test(Q)&&(N=Q.match(V)[0])),Q=Q.replace(D,`
|
|
`);var Y=Q.match(/^[\t ]*/)[0],oe={text:"",type:""},ae=new Pe(this._options),le=new j(this._options,Y),x=new ne(Q,this._options).tokenize();this._tag_stack=new he(le);for(var A=null,W=x.next();W.type!==te.EOF;)W.type===te.TAG_OPEN||W.type===te.COMMENT?(A=this._handle_tag_open(le,W,ae,oe,x),ae=A):W.type===te.ATTRIBUTE||W.type===te.EQUALS||W.type===te.VALUE||W.type===te.TEXT&&!ae.tag_complete?A=this._handle_inside_tag(le,W,ae,oe):W.type===te.TAG_CLOSE?A=this._handle_tag_close(le,W,ae):W.type===te.TEXT?A=this._handle_text(le,W,ae):W.type===te.CONTROL_FLOW_OPEN?A=this._handle_control_flow_open(le,W):W.type===te.CONTROL_FLOW_CLOSE?A=this._handle_control_flow_close(le,W):le.add_raw_token(W),oe=A,W=x.next();var ge=le._output.get_code(N);return ge},Ce.prototype._handle_control_flow_open=function(Q,N){var Y={text:N.text,type:N.type};return Q.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),N.newlines?Q.print_preserved_newlines(N):Q.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),Q.print_token(N),Q.indent(),Y},Ce.prototype._handle_control_flow_close=function(Q,N){var Y={text:N.text,type:N.type};return Q.deindent(),N.newlines?Q.print_preserved_newlines(N):Q.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),Q.print_token(N),Y},Ce.prototype._handle_tag_close=function(Q,N,Y){var oe={text:N.text,type:N.type};return Q.alignment_size=0,Y.tag_complete=!0,Q.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),Y.is_unformatted?Q.add_raw_token(N):(Y.tag_start_char==="<"&&(Q.set_space_before_token(N.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&Y.has_wrapped_attrs&&Q.print_newline(!1)),Q.print_token(N)),Y.indent_content&&!(Y.is_unformatted||Y.is_content_unformatted)&&(Q.indent(),Y.indent_content=!1),!Y.is_inline_element&&!(Y.is_unformatted||Y.is_content_unformatted)&&Q.set_wrap_point(),oe},Ce.prototype._handle_inside_tag=function(Q,N,Y,oe){var ae=Y.has_wrapped_attrs,le={text:N.text,type:N.type};return Q.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),Y.is_unformatted?Q.add_raw_token(N):Y.tag_start_char==="{"&&N.type===te.TEXT?Q.print_preserved_newlines(N)?(N.newlines=0,Q.add_raw_token(N)):Q.print_token(N):(N.type===te.ATTRIBUTE?Q.set_space_before_token(!0):(N.type===te.EQUALS||N.type===te.VALUE&&N.previous.type===te.EQUALS)&&Q.set_space_before_token(!1),N.type===te.ATTRIBUTE&&Y.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Q.traverse_whitespace(N),ae=ae||N.newlines!==0),this._is_wrap_attributes_force&&Y.attr_count>=this._options.wrap_attributes_min_attrs&&(oe.type!==te.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Q.print_newline(!1),ae=!0)),Q.print_token(N),ae=ae||Q.previous_token_wrapped(),Y.has_wrapped_attrs=ae),le},Ce.prototype._handle_text=function(Q,N,Y){var oe={text:N.text,type:"TK_CONTENT"};return Y.custom_beautifier_name?this._print_custom_beatifier_text(Q,N,Y):Y.is_unformatted||Y.is_content_unformatted?Q.add_raw_token(N):(Q.traverse_whitespace(N),Q.print_token(N)),oe},Ce.prototype._print_custom_beatifier_text=function(Q,N,Y){var oe=this;if(N.text!==""){var ae=N.text,le,x=1,A="",W="";Y.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?le=this._js_beautify:Y.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?le=this._css_beautify:Y.custom_beautifier_name==="html"&&(le=function($e,qe){var je=new Ce($e,qe,oe._js_beautify,oe._css_beautify);return je.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-Q.indent_level);var ge=Q.get_full_indent(x);if(ae=ae.replace(/\n[ \t]*$/,""),Y.custom_beautifier_name!=="html"&&ae[0]==="<"&&ae.match(/^(<!--|<!\[CDATA\[)/)){var Be=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ae);if(!Be){Q.add_raw_token(N);return}A=ge+Be[1]+`
|
|
`,ae=Be[4],Be[5]&&(W=ge+Be[5]),ae=ae.replace(/\n[ \t]*$/,""),(Be[2]||Be[3].indexOf(`
|
|
`)!==-1)&&(Be=Be[3].match(/[ \t]+$/),Be&&(N.whitespace_before=Be[0]))}if(ae)if(le){var Xe=function(){this.eol=`
|
|
`};Xe.prototype=this._options.raw_options;var Ve=new Xe;ae=le(ge+ae,Ve)}else{var Ze=N.whitespace_before;Ze&&(ae=ae.replace(new RegExp(`
|
|
(`+Ze+")?","g"),`
|
|
`)),ae=ge+ae.replace(/\n/g,`
|
|
`+ge)}A&&(ae?ae=A+ae+`
|
|
`+W:ae=A+W),Q.print_newline(!1),ae&&(N.text=ae,N.whitespace_before="",N.newlines=0,Q.add_raw_token(N),Q.print_newline(!0))}},Ce.prototype._handle_tag_open=function(Q,N,Y,oe,ae){var le=this._get_tag_open_token(N);if((Y.is_unformatted||Y.is_content_unformatted)&&!Y.is_empty_element&&N.type===te.TAG_OPEN&&!le.is_start_tag?(Q.add_raw_token(N),le.start_tag_token=this._tag_stack.try_pop(le.tag_name)):(Q.traverse_whitespace(N),this._set_tag_position(Q,N,le,Y,oe),le.is_inline_element||Q.set_wrap_point(),Q.print_token(N)),le.is_start_tag&&this._is_wrap_attributes_force){var x=0,A;do A=ae.peek(x),A.type===te.ATTRIBUTE&&(le.attr_count+=1),x+=1;while(A.type!==te.EOF&&A.type!==te.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(le.alignment_size=N.text.length+1),!le.tag_complete&&!le.is_unformatted&&(Q.alignment_size=le.alignment_size),le};var Pe=function(Q,N,Y){if(this.parent=N||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="",!Y)this.tag_complete=!0;else{var oe;this.tag_start_char=Y.text[0],this.text=Y.text,this.tag_start_char==="<"?(oe=Y.text.match(/^<([^\s>]*)/),this.tag_check=oe?oe[1]:""):(oe=Y.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=oe?oe[1]:"",(Y.text.startsWith("{{#>")||Y.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&Y.next!==null?this.tag_check=Y.next.text.split(" ")[0]:this.tag_check=Y.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),Y.type===te.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||Y.closed&&Y.closed.text==="/>";var ae=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ae=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Q.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ae)))}};Ce.prototype._get_tag_open_token=function(Q){var N=new Pe(this._options,this._tag_stack.get_parser_token(),Q);return N.alignment_size=this._options.wrap_attributes_indent_size,N.is_end_tag=N.is_end_tag||se(N.tag_check,this._options.void_elements),N.is_empty_element=N.tag_complete||N.is_start_tag&&N.is_end_tag,N.is_unformatted=!N.tag_complete&&se(N.tag_check,this._options.unformatted),N.is_content_unformatted=!N.is_empty_element&&se(N.tag_check,this._options.content_unformatted),N.is_inline_element=se(N.tag_name,this._options.inline)||this._options.inline_custom_elements&&N.tag_name.includes("-")||N.tag_start_char==="{",N},Ce.prototype._set_tag_position=function(Q,N,Y,oe,ae){if(Y.is_empty_element||(Y.is_end_tag?Y.start_tag_token=this._tag_stack.try_pop(Y.tag_name):(this._do_optional_end_element(Y)&&(Y.is_inline_element||Q.print_newline(!1)),this._tag_stack.record_tag(Y),(Y.tag_name==="script"||Y.tag_name==="style")&&!(Y.is_unformatted||Y.is_content_unformatted)&&(Y.custom_beautifier_name=F(Y.tag_check,N)))),se(Y.tag_check,this._options.extra_liners)&&(Q.print_newline(!1),Q._output.just_added_blankline()||Q.print_newline(!0)),Y.is_empty_element){if(Y.tag_start_char==="{"&&Y.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),Y.indent_content=!0;var le=Q.current_line_has_match(/{{#if/);le||Q.print_newline(!1)}Y.tag_name==="!--"&&ae.type===te.TAG_CLOSE&&oe.is_end_tag&&Y.text.indexOf(`
|
|
`)===-1||(Y.is_inline_element||Y.is_unformatted||Q.print_newline(!1),this._calcluate_parent_multiline(Q,Y))}else if(Y.is_end_tag){var x=!1;x=Y.start_tag_token&&Y.start_tag_token.multiline_content,x=x||!Y.is_inline_element&&!(oe.is_inline_element||oe.is_unformatted)&&!(ae.type===te.TAG_CLOSE&&Y.start_tag_token===oe)&&ae.type!=="TK_CONTENT",(Y.is_content_unformatted||Y.is_unformatted)&&(x=!1),x&&Q.print_newline(!1)}else Y.indent_content=!Y.custom_beautifier_name,Y.tag_start_char==="<"&&(Y.tag_name==="html"?Y.indent_content=this._options.indent_inner_html:Y.tag_name==="head"?Y.indent_content=this._options.indent_head_inner_html:Y.tag_name==="body"&&(Y.indent_content=this._options.indent_body_inner_html)),!(Y.is_inline_element||Y.is_unformatted)&&(ae.type!=="TK_CONTENT"||Y.is_content_unformatted)&&Q.print_newline(!1),this._calcluate_parent_multiline(Q,Y)},Ce.prototype._calcluate_parent_multiline=function(Q,N){N.parent&&Q._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.parent.multiline_content=!0)};var _e=["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"],tt=["a","audio","del","ins","map","noscript","video"];Ce.prototype._do_optional_end_element=function(Q){var N=null;if(!(Q.is_empty_element||!Q.is_start_tag||!Q.parent)){if(Q.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(Q.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Q.tag_name==="dd"||Q.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(Q.parent.tag_name==="p"&&_e.indexOf(Q.tag_name)!==-1){var Y=Q.parent.parent;(!Y||tt.indexOf(Y.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else Q.tag_name==="rp"||Q.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):Q.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):Q.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Q.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):Q.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):Q.tag_name==="tbody"||Q.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):Q.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Q.tag_name==="th"||Q.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Q.parent=this._tag_stack.get_parser_token(),N}},M.exports.Beautifier=Ce},function(M,b,E){var C=E(6).Options;function P(ne){C.call(this,ne,"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"])}P.prototype=new C,M.exports.Options=P},function(M,b,E){var C=E(9).Tokenizer,P=E(9).TOKEN,ne=E(13).Directives,te=E(14).TemplatablePattern,V=E(12).Pattern,D={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:P.START,RAW:P.RAW,EOF:P.EOF},j=new ne(/<\!--/,/-->/),O=function(F,se){C.call(this,F,se),this._current_tag_name="";var Ee=new te(this._input).read_options(this._options),he=new V(this._input);if(this.__patterns={word:Ee.until(/[\n\r\t <]/),word_control_flow_close_excluded:Ee.until(/[\n\r\t <}]/),single_quote:Ee.until_after(/'/),double_quote:Ee.until_after(/"/),attribute:Ee.until(/[\n\r\t =>]|\/>/),element_name:Ee.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 Ce=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=he.matching(Ce).until_after(Ce)}};O.prototype=new C,O.prototype._is_comment=function(F){return!1},O.prototype._is_opening=function(F){return F.type===D.TAG_OPEN||F.type===D.CONTROL_FLOW_OPEN},O.prototype._is_closing=function(F,se){return F.type===D.TAG_CLOSE&&se&&((F.text===">"||F.text==="/>")&&se.text[0]==="<"||F.text==="}}"&&se.text[0]==="{"&&se.text[1]==="{")||F.type===D.CONTROL_FLOW_CLOSE&&F.text==="}"&&se.text.endsWith("{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(F,se){var Ee=null;this._readWhitespace();var he=this._input.peek();return he===null?this._create_token(D.EOF,""):(Ee=Ee||this._read_open_handlebars(he,se),Ee=Ee||this._read_attribute(he,F,se),Ee=Ee||this._read_close(he,se),Ee=Ee||this._read_script_and_style(he,F),Ee=Ee||this._read_control_flows(he,se),Ee=Ee||this._read_raw_content(he,F,se),Ee=Ee||this._read_content_word(he,se),Ee=Ee||this._read_comment_or_cdata(he),Ee=Ee||this._read_processing(he),Ee=Ee||this._read_open(he,se),Ee=Ee||this._create_token(D.UNKNOWN,this._input.next()),Ee)},O.prototype._read_comment_or_cdata=function(F){var se=null,Ee=null,he=null;if(F==="<"){var Ce=this._input.peek(1);Ce==="!"&&(Ee=this.__patterns.comment.read(),Ee?(he=j.get_directives(Ee),he&&he.ignore==="start"&&(Ee+=j.readIgnored(this._input))):Ee=this.__patterns.cdata.read()),Ee&&(se=this._create_token(D.COMMENT,Ee),se.directives=he)}return se},O.prototype._read_processing=function(F){var se=null,Ee=null,he=null;if(F==="<"){var Ce=this._input.peek(1);(Ce==="!"||Ce==="?")&&(Ee=this.__patterns.conditional_comment.read(),Ee=Ee||this.__patterns.processing.read()),Ee&&(se=this._create_token(D.COMMENT,Ee),se.directives=he)}return se},O.prototype._read_open=function(F,se){var Ee=null,he=null;return(!se||se.type===D.CONTROL_FLOW_OPEN)&&F==="<"&&(Ee=this._input.next(),this._input.peek()==="/"&&(Ee+=this._input.next()),Ee+=this.__patterns.element_name.read(),he=this._create_token(D.TAG_OPEN,Ee)),he},O.prototype._read_open_handlebars=function(F,se){var Ee=null,he=null;return(!se||se.type===D.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&F==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(Ee=this.__patterns.handlebars_comment.read(),Ee=Ee||this.__patterns.handlebars.read(),he=this._create_token(D.COMMENT,Ee)):(Ee=this.__patterns.handlebars_open.read(),he=this._create_token(D.TAG_OPEN,Ee))),he},O.prototype._read_control_flows=function(F,se){var Ee="",he=null;if(!this._options.templating.includes("angular"))return he;if(F==="@"){if(Ee=this.__patterns.angular_control_flow_start.read(),Ee==="")return he;for(var Ce=Ee.endsWith("(")?1:0,Pe=0;!(Ee.endsWith("{")&&Ce===Pe);){var _e=this._input.next();if(_e===null)break;_e==="("?Ce++:_e===")"&&Pe++,Ee+=_e}he=this._create_token(D.CONTROL_FLOW_OPEN,Ee)}else F==="}"&&se&&se.type===D.CONTROL_FLOW_OPEN&&(Ee=this._input.next(),he=this._create_token(D.CONTROL_FLOW_CLOSE,Ee));return he},O.prototype._read_close=function(F,se){var Ee=null,he=null;return se&&se.type===D.TAG_OPEN&&(se.text[0]==="<"&&(F===">"||F==="/"&&this._input.peek(1)===">")?(Ee=this._input.next(),F==="/"&&(Ee+=this._input.next()),he=this._create_token(D.TAG_CLOSE,Ee)):se.text[0]==="{"&&F==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),he=this._create_token(D.TAG_CLOSE,"}}"))),he},O.prototype._read_attribute=function(F,se,Ee){var he=null,Ce="";if(Ee&&Ee.text[0]==="<")if(F==="=")he=this._create_token(D.EQUALS,this._input.next());else if(F==='"'||F==="'"){var Pe=this._input.next();F==='"'?Pe+=this.__patterns.double_quote.read():Pe+=this.__patterns.single_quote.read(),he=this._create_token(D.VALUE,Pe)}else Ce=this.__patterns.attribute.read(),Ce&&(se.type===D.EQUALS?he=this._create_token(D.VALUE,Ce):he=this._create_token(D.ATTRIBUTE,Ce));return he},O.prototype._is_content_unformatted=function(F){return this._options.void_elements.indexOf(F)===-1&&(this._options.content_unformatted.indexOf(F)!==-1||this._options.unformatted.indexOf(F)!==-1)},O.prototype._read_raw_content=function(F,se,Ee){var he="";if(Ee&&Ee.text[0]==="{")he=this.__patterns.handlebars_raw_close.read();else if(se.type===D.TAG_CLOSE&&se.opened.text[0]==="<"&&se.text[0]!=="/"){var Ce=se.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Ce)&&(he=this._input.readUntil(new RegExp("</"+Ce+"[\\n\\r\\t ]*?>","ig")))}return he?this._create_token(D.TEXT,he):null},O.prototype._read_script_and_style=function(F,se){if(se.type===D.TAG_CLOSE&&se.opened.text[0]==="<"&&se.text[0]!=="/"){var Ee=se.opened.text.substr(1).toLowerCase();if(Ee==="script"||Ee==="style"){var he=this._read_comment_or_cdata(F);if(he)return he.type=D.TEXT,he;var Ce=this._input.readUntil(new RegExp("</"+Ee+"[\\n\\r\\t ]*?>","ig"));if(Ce)return this._create_token(D.TEXT,Ce)}}return null},O.prototype._read_content_word=function(F,se){var Ee="";return this._options.unformatted_content_delimiter&&F===this._options.unformatted_content_delimiter[0]&&(Ee=this.__patterns.unformatted_content_delimiter.read()),Ee||(Ee=se&&se.type===D.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),Ee?this._create_token(D.TEXT,Ee):null},M.exports.Tokenizer=O,M.exports.TOKEN=D}],q={};function o(M){var b=q[M];if(b!==void 0)return b.exports;var E=q[M]={exports:{}};return ie[M](E,E.exports,o),E.exports}var K=o(18);xe=K})();var pe=xe;if(1)y=[S,S(58553),S(87804)],ue=function(ie){var q=S(58553),o=S(87804);return{html_beautify:function(K,M){return pe(K,M,q.js_beautify,o.css_beautify)}}}.apply(it,y),ue!==void 0&&(Gt.exports=ue);else var H,m})()},58553:function(Gt,it){var S,y;(function(){var ue;(function(){"use strict";var pe=[function(q,o,K){var M=K(1).Beautifier,b=K(5).Options;function E(C,P){var ne=new M(C,P);return ne.beautify()}q.exports=E,q.exports.defaultOptions=function(){return new b}},function(q,o,K){var M=K(2).Output,b=K(3).Token,E=K(4),C=K(5).Options,P=K(7).Tokenizer,ne=K(7).line_starters,te=K(7).positionable_operators,V=K(7).TOKEN;function D(A,W){return W.indexOf(A)!==-1}function j(A){return A.replace(/^\s+/g,"")}function O(A){for(var W={},ge=0;ge<A.length;ge++)W[A[ge].replace(/-/g,"_")]=A[ge];return W}function F(A,W){return A&&A.type===V.RESERVED&&A.text===W}function se(A,W){return A&&A.type===V.RESERVED&&D(A.text,W)}var Ee=["case","return","do","if","throw","else","await","break","continue","async"],he=["before-newline","after-newline","preserve-newline"],Ce=O(he),Pe=[Ce.before_newline,Ce.preserve_newline],_e={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function tt(A,W){W.multiline_frame||W.mode===_e.ForInitializer||W.mode===_e.Conditional||A.remove_indent(W.start_line_index)}function Q(A){A=A.replace(E.allLineBreaks,`
|
|
`);for(var W=[],ge=A.indexOf(`
|
|
`);ge!==-1;)W.push(A.substring(0,ge)),A=A.substring(ge+1),ge=A.indexOf(`
|
|
`);return A.length&&W.push(A),W}function N(A){return A===_e.ArrayLiteral}function Y(A){return D(A,[_e.Expression,_e.ForInitializer,_e.Conditional])}function oe(A,W){for(var ge=0;ge<A.length;ge++){var Be=A[ge].trim();if(Be.charAt(0)!==W)return!1}return!0}function ae(A,W){for(var ge=0,Be=A.length,Xe;ge<Be;ge++)if(Xe=A[ge],Xe&&Xe.indexOf(W)!==0)return!1;return!0}function le(A,W){W=W||{},this._source_text=A||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new C(W)}le.prototype.create_flags=function(A,W){var ge=0;A&&(ge=A.indentation_level,!this._output.just_added_newline()&&A.line_indent_level>ge&&(ge=A.line_indent_level));var Be={mode:W,parent:A,last_token:A?A.last_token:new b(V.START_BLOCK,""),last_word:A?A.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:ge,alignment:0,line_indent_level:A?A.line_indent_level:ge,start_line_index:this._output.get_line_number(),ternary_depth:0};return Be},le.prototype._reset=function(A){var W=A.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new M(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(_e.BlockStatement);var ge=new P(A,this._options);return this._tokens=ge.tokenize(),A},le.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A,W=this._reset(this._source_text),ge=this._options.eol;this._options.eol==="auto"&&(ge=`
|
|
`,W&&E.lineBreak.test(W||"")&&(ge=W.match(E.lineBreak)[0]));for(var Be=this._tokens.next();Be;)this.handle_token(Be),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Be,Be=this._tokens.next();return A=this._output.get_code(ge),A},le.prototype.handle_token=function(A,W){A.type===V.START_EXPR?this.handle_start_expr(A):A.type===V.END_EXPR?this.handle_end_expr(A):A.type===V.START_BLOCK?this.handle_start_block(A):A.type===V.END_BLOCK?this.handle_end_block(A):A.type===V.WORD?this.handle_word(A):A.type===V.RESERVED?this.handle_word(A):A.type===V.SEMICOLON?this.handle_semicolon(A):A.type===V.STRING?this.handle_string(A):A.type===V.EQUALS?this.handle_equals(A):A.type===V.OPERATOR?this.handle_operator(A):A.type===V.COMMA?this.handle_comma(A):A.type===V.BLOCK_COMMENT?this.handle_block_comment(A,W):A.type===V.COMMENT?this.handle_comment(A,W):A.type===V.DOT?this.handle_dot(A):A.type===V.EOF?this.handle_eof(A):A.type===V.UNKNOWN?this.handle_unknown(A,W):this.handle_unknown(A,W)},le.prototype.handle_whitespace_and_comments=function(A,W){var ge=A.newlines,Be=this._options.keep_array_indentation&&N(this._flags.mode);if(A.comments_before)for(var Xe=A.comments_before.next();Xe;)this.handle_whitespace_and_comments(Xe,W),this.handle_token(Xe,W),Xe=A.comments_before.next();if(Be)for(var Ve=0;Ve<ge;Ve+=1)this.print_newline(Ve>0,W);else if(this._options.max_preserve_newlines&&ge>this._options.max_preserve_newlines&&(ge=this._options.max_preserve_newlines),this._options.preserve_newlines&&ge>1){this.print_newline(!1,W);for(var Ze=1;Ze<ge;Ze+=1)this.print_newline(!0,W)}};var x=["async","break","continue","return","throw","yield"];le.prototype.allow_wrap_or_preserved_newline=function(A,W){if(W=W===void 0?!1:W,!this._output.just_added_newline()){var ge=this._options.preserve_newlines&&A.newlines||W,Be=D(this._flags.last_token.text,te)||D(A.text,te);if(Be){var Xe=D(this._flags.last_token.text,te)&&D(this._options.operator_position,Pe)||D(A.text,te);ge=ge&&Xe}if(ge)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(se(this._flags.last_token,x))return;this._output.set_wrap_point()}}},le.prototype.print_newline=function(A,W){if(!W&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==V.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ge=this._tokens.peek();this._flags.mode===_e.Statement&&!(this._flags.if_block&&F(ge,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(A)&&(this._flags.multiline_frame=!0)},le.prototype.print_token_line_indentation=function(A){this._output.just_added_newline()&&(this._options.keep_array_indentation&&A.newlines&&(A.text==="["||N(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(A.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))},le.prototype.print_token=function(A){if(this._output.raw){this._output.add_raw_token(A);return}if(this._options.comma_first&&A.previous&&A.previous.type===V.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var W=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(W),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(A),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(A),this._output.non_breaking_space=!0,this._output.add_token(A.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},le.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},le.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))},le.prototype.set_mode=function(A){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,A),this._flags=this.create_flags(this._previous_flags,A),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},le.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===_e.Statement&&tt(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},le.prototype.start_of_object_property=function(){return this._flags.parent.mode===_e.ObjectLiteral&&this._flags.mode===_e.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||se(this._flags.last_token,["get","set"]))},le.prototype.start_of_statement=function(A){var W=!1;return W=W||se(this._flags.last_token,["var","let","const"])&&A.type===V.WORD,W=W||F(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===_e.ObjectLiteral&&this._flags.mode===_e.Statement)&&se(this._flags.last_token,x)&&!A.newlines,W=W||F(this._flags.last_token,"else")&&!(F(A,"if")&&!A.comments_before),W=W||this._flags.last_token.type===V.END_EXPR&&(this._previous_flags.mode===_e.ForInitializer||this._previous_flags.mode===_e.Conditional),W=W||this._flags.last_token.type===V.WORD&&this._flags.mode===_e.BlockStatement&&!this._flags.in_case&&!(A.text==="--"||A.text==="++")&&this._last_last_text!=="function"&&A.type!==V.WORD&&A.type!==V.RESERVED,W=W||this._flags.mode===_e.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||se(this._flags.last_token,["get","set"])),W?(this.set_mode(_e.Statement),this.indent(),this.handle_whitespace_and_comments(A,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A,se(A,["do","for","if","while"])),!0):!1},le.prototype.handle_start_expr=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A);var W=_e.Expression;if(A.text==="["){if(this._flags.last_token.type===V.WORD||this._flags.last_token.text===")"){se(this._flags.last_token,ne)&&(this._output.space_before_token=!0),this.print_token(A),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=_e.ArrayLiteral,N(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()),D(this._flags.last_token.type,[V.START_EXPR,V.END_EXPR,V.WORD,V.OPERATOR,V.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===V.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=_e.ForInitializer):D(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=_e.Conditional):D(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&A.whitespace_before===""?this._output.space_before_token=!1:(D(this._flags.last_token.text,ne)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===V.EQUALS||this._flags.last_token.type===V.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A);else if(this._flags.last_token.type===V.WORD){this._output.space_before_token=!1;var ge=this._tokens.peek(-3);if(this._options.space_after_named_function&&ge){var Be=this._tokens.peek(-4);se(ge,["async","function"])||ge.text==="*"&&se(Be,["async","function"])?this._output.space_before_token=!0:this._flags.mode===_e.ObjectLiteral?(ge.text==="{"||ge.text===","||ge.text==="*"&&(Be.text==="{"||Be.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(A);(this._flags.last_token.type===V.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===_e.ObjectLiteral&&D(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===V.START_BLOCK?this.print_newline():(this._flags.last_token.type===V.END_EXPR||this._flags.last_token.type===V.START_EXPR||this._flags.last_token.type===V.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===V.COMMA)&&this.allow_wrap_or_preserved_newline(A,A.newlines),this.print_token(A),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},le.prototype.handle_end_expr=function(A){for(;this._flags.mode===_e.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(A,A.text==="]"&&N(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===V.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(A),this.restore_mode(),tt(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===_e.Conditional&&(this._previous_flags.mode=_e.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},le.prototype.handle_start_block=function(A){this.handle_whitespace_and_comments(A);var W=this._tokens.peek(),ge=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===V.END_EXPR?(this.set_mode(_e.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(_e.BlockStatement):ge&&(D(ge.text,[":",","])&&D(W.type,[V.STRING,V.WORD,V.RESERVED])||D(W.text,["get","set","..."])&&D(ge.type,[V.WORD,V.RESERVED]))?D(this._last_last_text,["class","interface"])&&!D(ge.text,[":",","])?this.set_mode(_e.BlockStatement):this.set_mode(_e.ObjectLiteral):this._flags.last_token.type===V.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(_e.BlockStatement):D(this._flags.last_token.type,[V.EQUALS,V.START_EXPR,V.COMMA,V.OPERATOR])||se(this._flags.last_token,["return","throw","import","default"])?this.set_mode(_e.ObjectLiteral):this.set_mode(_e.BlockStatement),this._flags.last_token&&se(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Be=!W.comments_before&&W.text==="}",Xe=Be&&this._flags.last_word==="function"&&this._flags.last_token.type===V.END_EXPR;if(this._options.brace_preserve_inline){var Ve=0,Ze=null;this._flags.inline_frame=!0;do if(Ve+=1,Ze=this._tokens.peek(Ve-1),Ze.newlines){this._flags.inline_frame=!1;break}while(Ze.type!==V.EOF&&!(Ze.type===V.END_BLOCK&&Ze.opened===A))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==V.OPERATOR&&(Xe||this._flags.last_token.type===V.EQUALS||se(this._flags.last_token,Ee)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(N(this._previous_flags.mode)&&(this._flags.last_token.type===V.START_EXPR||this._flags.last_token.type===V.COMMA)&&((this._flags.last_token.type===V.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===V.COMMA||this._flags.last_token.type===V.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(A),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==V.OPERATOR&&this._flags.last_token.type!==V.START_EXPR&&(D(this._flags.last_token.type,[V.START_BLOCK,V.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(A),this.indent(),!Be&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},le.prototype.handle_end_block=function(A){for(this.handle_whitespace_and_comments(A);this._flags.mode===_e.Statement;)this.restore_mode();var W=this._flags.last_token.type===V.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(N(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(A)},le.prototype.handle_word=function(A){if(A.type===V.RESERVED){if(D(A.text,["set","get"])&&this._flags.mode!==_e.ObjectLiteral)A.type=V.WORD;else if(A.text==="import"&&D(this._tokens.peek().text,["(","."]))A.type=V.WORD;else if(D(A.text,["as","from"])&&!this._flags.import_block)A.type=V.WORD;else if(this._flags.mode===_e.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(A.type=V.WORD)}}if(this.start_of_statement(A)?se(this._flags.last_token,["var","let","const"])&&A.type===V.WORD&&(this._flags.declaration_statement=!0):A.newlines&&!Y(this._flags.mode)&&(this._flags.last_token.type!==V.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==V.EQUALS&&(this._options.preserve_newlines||!se(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(A),this.print_newline()):this.handle_whitespace_and_comments(A),this._flags.do_block&&!this._flags.do_while)if(F(A,"while")){this._output.space_before_token=!0,this.print_token(A),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&&F(A,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===_e.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&se(A,["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(A),this._flags.in_case=!0;return}if((this._flags.last_token.type===V.COMMA||this._flags.last_token.type===V.START_EXPR||this._flags.last_token.type===V.EQUALS||this._flags.last_token.type===V.OPERATOR)&&!this.start_of_object_property()&&!(D(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===_e.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(A),F(A,"function")){(D(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(D(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===V.OPERATOR))&&!this._output.just_added_blankline()&&!A.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===V.RESERVED||this._flags.last_token.type===V.WORD?se(this._flags.last_token,["get","set","new","export"])||se(this._flags.last_token,x)?this._output.space_before_token=!0:F(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===V.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Y(this._flags.mode)||N(this._flags.mode))||this.print_newline(),this.print_token(A),this._flags.last_word=A.text;return}var ge="NONE";if(this._flags.last_token.type===V.END_BLOCK?this._previous_flags.inline_frame?ge="SPACE":se(A,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines?ge="NEWLINE":(ge="SPACE",this._output.space_before_token=!0):ge="NEWLINE":this._flags.last_token.type===V.SEMICOLON&&this._flags.mode===_e.BlockStatement?ge="NEWLINE":this._flags.last_token.type===V.SEMICOLON&&Y(this._flags.mode)?ge="SPACE":this._flags.last_token.type===V.STRING?ge="NEWLINE":this._flags.last_token.type===V.RESERVED||this._flags.last_token.type===V.WORD||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===_e.ObjectLiteral&&D(this._last_last_text,["{",","]))?ge="SPACE":this._flags.last_token.type===V.START_BLOCK?this._flags.inline_frame?ge="SPACE":ge="NEWLINE":this._flags.last_token.type===V.END_EXPR&&(this._output.space_before_token=!0,ge="NEWLINE"),se(A,ne)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ge="SPACE":ge="NEWLINE"),se(A,["else","catch","finally"]))if((!(this._flags.last_token.type===V.END_BLOCK&&this._previous_flags.mode===_e.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Be=this._output.current_line;Be.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ge==="NEWLINE"?se(this._flags.last_token,Ee)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&se(A,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==V.END_EXPR?(this._flags.last_token.type!==V.START_EXPR||!se(A,["var","let","const"]))&&this._flags.last_token.text!==":"&&(F(A,"if")&&F(A.previous,"else")?this._output.space_before_token=!0:this.print_newline()):se(A,ne)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&N(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ge==="SPACE"&&(this._output.space_before_token=!0);A.previous&&(A.previous.type===V.WORD||A.previous.type===V.RESERVED)&&(this._output.space_before_token=!0),this.print_token(A),this._flags.last_word=A.text,A.type===V.RESERVED&&(A.text==="do"?this._flags.do_block=!0:A.text==="if"?this._flags.if_block=!0:A.text==="import"?this._flags.import_block=!0:this._flags.import_block&&F(A,"from")&&(this._flags.import_block=!1))},le.prototype.handle_semicolon=function(A){this.start_of_statement(A)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(A);for(var W=this._tokens.peek();this._flags.mode===_e.Statement&&!(this._flags.if_block&&F(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(A)},le.prototype.handle_string=function(A){A.text.startsWith("`")&&A.newlines===0&&A.whitespace_before===""&&(A.previous.text===")"||this._flags.last_token.type===V.WORD)||(this.start_of_statement(A)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(A),this._flags.last_token.type===V.RESERVED||this._flags.last_token.type===V.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===V.COMMA||this._flags.last_token.type===V.START_EXPR||this._flags.last_token.type===V.EQUALS||this._flags.last_token.type===V.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A):A.text.startsWith("`")&&this._flags.last_token.type===V.END_EXPR&&(A.previous.text==="]"||A.previous.text===")")&&A.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(A)},le.prototype.handle_equals=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0},le.prototype.handle_comma=function(A){this.handle_whitespace_and_comments(A,!0),this.print_token(A),this._output.space_before_token=!0,this._flags.declaration_statement?(Y(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(A)):this._flags.mode===_e.ObjectLiteral||this._flags.mode===_e.Statement&&this._flags.parent.mode===_e.ObjectLiteral?(this._flags.mode===_e.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(A)},le.prototype.handle_operator=function(A){var W=A.text==="*"&&(se(this._flags.last_token,["function","yield"])||D(this._flags.last_token.type,[V.START_BLOCK,V.COMMA,V.END_BLOCK,V.SEMICOLON])),ge=D(A.text,["-","+"])&&(D(this._flags.last_token.type,[V.START_BLOCK,V.START_EXPR,V.EQUALS,V.OPERATOR])||D(this._flags.last_token.text,ne)||this._flags.last_token.text===",");if(!this.start_of_statement(A)){var Be=!W;this.handle_whitespace_and_comments(A,Be)}if(A.text==="*"&&this._flags.last_token.type===V.DOT){this.print_token(A);return}if(A.text==="::"){this.print_token(A);return}if(D(A.text,["-","+"])&&this.start_of_object_property()){this.print_token(A);return}if(this._flags.last_token.type===V.OPERATOR&&D(this._options.operator_position,Pe)&&this.allow_wrap_or_preserved_newline(A),A.text===":"&&this._flags.in_case){this.print_token(A),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==V.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 Xe=!0,Ve=!0,Ze=!1;if(A.text===":"?this._flags.ternary_depth===0?Xe=!1:(this._flags.ternary_depth-=1,Ze=!0):A.text==="?"&&(this._flags.ternary_depth+=1),!ge&&!W&&this._options.preserve_newlines&&D(A.text,te)){var $e=A.text===":",qe=$e&&Ze,je=$e&&!Ze;switch(this._options.operator_position){case Ce.before_newline:this._output.space_before_token=!je,this.print_token(A),(!$e||qe)&&this.allow_wrap_or_preserved_newline(A),this._output.space_before_token=!0;return;case Ce.after_newline:this._output.space_before_token=!0,!$e||qe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(A):this._output.space_before_token=!1,this.print_token(A),this._output.space_before_token=!0;return;case Ce.preserve_newline:je||this.allow_wrap_or_preserved_newline(A),Xe=!(this._output.just_added_newline()||je),this._output.space_before_token=Xe,this.print_token(A),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(A),Xe=!1;var Et=this._tokens.peek();Ve=Et&&D(Et.type,[V.WORD,V.RESERVED])}else if(A.text==="...")this.allow_wrap_or_preserved_newline(A),Xe=this._flags.last_token.type===V.START_BLOCK,Ve=!1;else if(D(A.text,["--","++","!","~"])||ge){if((this._flags.last_token.type===V.COMMA||this._flags.last_token.type===V.START_EXPR)&&this.allow_wrap_or_preserved_newline(A),Xe=!1,Ve=!1,A.newlines&&(A.text==="--"||A.text==="++"||A.text==="~")){var Qe=se(this._flags.last_token,Ee)&&A.newlines;Qe&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Qe,!0)}this._flags.last_token.text===";"&&Y(this._flags.mode)&&(Xe=!0),this._flags.last_token.type===V.RESERVED?Xe=!0:this._flags.last_token.type===V.END_EXPR?Xe=!(this._flags.last_token.text==="]"&&(A.text==="--"||A.text==="++")):this._flags.last_token.type===V.OPERATOR&&(Xe=D(A.text,["--","-","++","+"])&&D(this._flags.last_token.text,["--","-","++","+"]),D(A.text,["+","-"])&&D(this._flags.last_token.text,["--","++"])&&(Ve=!0)),(this._flags.mode===_e.BlockStatement&&!this._flags.inline_frame||this._flags.mode===_e.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Xe,this.print_token(A),this._output.space_before_token=Ve},le.prototype.handle_block_comment=function(A,W){if(this._output.raw){this._output.add_raw_token(A),A.directives&&A.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(A.directives){this.print_newline(!1,W),this.print_token(A),A.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!E.newline.test(A.text)&&!A.newlines){this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0;return}else this.print_block_commment(A,W)},le.prototype.print_block_commment=function(A,W){var ge=Q(A.text),Be,Xe=!1,Ve=!1,Ze=A.whitespace_before,$e=Ze.length;if(this.print_newline(!1,W),this.print_token_line_indentation(A),this._output.add_token(ge[0]),this.print_newline(!1,W),ge.length>1){for(ge=ge.slice(1),Xe=oe(ge,"*"),Ve=ae(ge,Ze),Xe&&(this._flags.alignment=1),Be=0;Be<ge.length;Be++)Xe?(this.print_token_line_indentation(A),this._output.add_token(j(ge[Be]))):Ve&&ge[Be]?(this.print_token_line_indentation(A),this._output.add_token(ge[Be].substring($e))):(this._output.current_line.set_indent(-1),this._output.add_token(ge[Be])),this.print_newline(!1,W);this._flags.alignment=0}},le.prototype.handle_comment=function(A,W){A.newlines?this.print_newline(!1,W):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(A),this.print_newline(!1,W)},le.prototype.handle_dot=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),se(this._flags.last_token,Ee)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(A,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(A)},le.prototype.handle_unknown=function(A,W){this.print_token(A),A.text[A.text.length-1]===`
|
|
`&&this.print_newline(!1,W)},le.prototype.handle_eof=function(A){for(;this._flags.mode===_e.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A)},q.exports.Beautifier=le},function(q){function o(b){this.__parent=b,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=[]}o.prototype.clone_empty=function(){var b=new o(this.__parent);return b.set_indent(this.__indent_count,this.__alignment_count),b},o.prototype.item=function(b){return b<0?this.__items[this.__items.length+b]:this.__items[b]},o.prototype.has_match=function(b){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(b))return!0;return!1},o.prototype.set_indent=function(b,E){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=E||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.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)},o.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},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(b){this.__items.push(b);var E=b.lastIndexOf(`
|
|
`);E!==-1?this.__character_count=b.length-E:this.__character_count+=b.length},o.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function K(b,E){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),E=E||"",b.indent_level>0&&(E=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}K.prototype.get_indent_size=function(b,E){var C=this.__base_string_length;return E=E||0,b<0&&(C=0),C+=b*this.__indent_size,C+=E,C},K.prototype.get_indent_string=function(b,E){var C=this.__base_string;return E=E||0,b<0&&(b=0,C=""),E+=b*this.__indent_size,this.__ensure_cache(E),C+=this.__cache[E],C},K.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},K.prototype.__add_column=function(){var b=this.__cache.length,E=0,C="";this.__indent_size&&b>=this.__indent_size&&(E=Math.floor(b/this.__indent_size),b-=E*this.__indent_size,C=new Array(E+1).join(this.__indent_string)),b&&(C+=new Array(b+1).join(" ")),this.__cache.push(C)};function M(b,E){this.__indent_cache=new K(b,E),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}M.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},M.prototype.get_line_number=function(){return this.__lines.length},M.prototype.get_indent_string=function(b,E){return this.__indent_cache.get_indent_string(b,E)},M.prototype.get_indent_size=function(b,E){return this.__indent_cache.get_indent_size(b,E)},M.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},M.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},M.prototype.get_code=function(b){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
|
|
`);return b!==`
|
|
`&&(C=C.replace(/[\n]/g,b)),C},M.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},M.prototype.set_indent=function(b,E){return b=b||0,E=E||0,this.next_line.set_indent(b,E),this.__lines.length>1?(this.current_line.set_indent(b,E),!0):(this.current_line.set_indent(),!1)},M.prototype.add_raw_token=function(b){for(var E=0;E<b.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(b.whitespace_before),this.current_line.push(b.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},M.prototype.add_token=function(b){this.__add_space_before_token(),this.current_line.push(b),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},M.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(" "))},M.prototype.remove_indent=function(b){for(var E=this.__lines.length;b<E;)this.__lines[b]._remove_indent(),b++;this.current_line._remove_wrap_indent()},M.prototype.trim=function(b){for(b=b===void 0?!1:b,this.current_line.trim();b&&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},M.prototype.just_added_newline=function(){return this.current_line.is_empty()},M.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},M.prototype.ensure_empty_line_above=function(b,E){for(var C=this.__lines.length-2;C>=0;){var P=this.__lines[C];if(P.is_empty())break;if(P.item(0).indexOf(b)!==0&&P.item(-1)!==E){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},q.exports.Output=M},function(q){function o(K,M,b,E){this.type=K,this.text=M,this.comments_before=null,this.newlines=b||0,this.whitespace_before=E||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}q.exports.Token=o},function(q,o){var K="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",M="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\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",E="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",C="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",P="(?:"+C+"|["+K+b+"])",ne="(?:"+C+"|["+M+b+E+"])*";o.identifier=new RegExp(P+ne,"g"),o.identifierStart=new RegExp(P),o.identifierMatch=new RegExp("(?:"+C+"|["+M+b+E+"])+");var te=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(q,o,K){var M=K(6).Options,b=["before-newline","after-newline","preserve-newline"];function E(C){M.call(this,C,"js");var P=this.raw_options.brace_style||null;P==="expand-strict"?this.raw_options.brace_style="expand":P==="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 ne=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var te=0;te<ne.length;te++)ne[te]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=ne[te];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",b),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}E.prototype=new M,q.exports.Options=E},function(q){function o(b,E){this.raw_options=K(b,E),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"])}o.prototype._get_array=function(b,E){var C=this.raw_options[b],P=E||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(P=C.concat()):typeof C=="string"&&(P=C.split(/[^a-zA-Z0-9_\/\-]+/)),P},o.prototype._get_boolean=function(b,E){var C=this.raw_options[b],P=C===void 0?!!E:!!C;return P},o.prototype._get_characters=function(b,E){var C=this.raw_options[b],P=E||"";return typeof C=="string"&&(P=C.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),P},o.prototype._get_number=function(b,E){var C=this.raw_options[b];E=parseInt(E,10),isNaN(E)&&(E=0);var P=parseInt(C,10);return isNaN(P)&&(P=E),P},o.prototype._get_selection=function(b,E,C){var P=this._get_selection_list(b,E,C);if(P.length!==1)throw new Error("Invalid Option Value: The option '"+b+`' can only be one of the following values:
|
|
`+E+`
|
|
You passed in: '`+this.raw_options[b]+"'");return P[0]},o.prototype._get_selection_list=function(b,E,C){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[E[0]],!this._is_valid_selection(C,E))throw new Error("Invalid Default Value!");var P=this._get_array(b,C);if(!this._is_valid_selection(P,E))throw new Error("Invalid Option Value: The option '"+b+`' can contain only the following values:
|
|
`+E+`
|
|
You passed in: '`+this.raw_options[b]+"'");return P},o.prototype._is_valid_selection=function(b,E){return b.length&&E.length&&!b.some(function(C){return E.indexOf(C)===-1})};function K(b,E){var C={};b=M(b);var P;for(P in b)P!==E&&(C[P]=b[P]);if(E&&b[E])for(P in b[E])C[P]=b[E][P];return C}function M(b){var E={},C;for(C in b){var P=C.replace(/-/g,"_");E[P]=b[C]}return E}q.exports.Options=o,q.exports.normalizeOpts=M,q.exports.mergeOpts=K},function(q,o,K){var M=K(8).InputScanner,b=K(9).Tokenizer,E=K(9).TOKEN,C=K(13).Directives,P=K(4),ne=K(12).Pattern,te=K(14).TemplatablePattern;function V(oe,ae){return ae.indexOf(oe)!==-1}var D={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:E.START,RAW:E.RAW,EOF:E.EOF},j=new C(/\/\*/,/\*\//),O=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,F=/[0-9]/,se=/[^\d\.]/,Ee=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),he=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";he=he.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),he="\\?\\.(?!\\d) "+he,he=he.replace(/ /g,"|");var Ce=new RegExp(he),Pe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),_e=Pe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),tt=new RegExp("^(?:"+_e.join("|")+")$"),Q,N=function(oe,ae){b.call(this,oe,ae),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var le=new ne(this._input),x=new te(this._input).read_options(this._options);this.__patterns={template:x,identifier:x.starting_with(P.identifier).matching(P.identifierMatch),number:le.matching(O),punct:le.matching(Ce),comment:le.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:le.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:le.matching(/<!--/),html_comment_end:le.matching(/-->/),include:le.starting_with(/#include/).until_after(P.lineBreak),shebang:le.starting_with(/#!/).until_after(P.lineBreak),xml:le.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:x.until(/['\\\n\r\u2028\u2029]/),double_quote:x.until(/["\\\n\r\u2028\u2029]/),template_text:x.until(/[`\\$]/),template_expression:x.until(/[`}\\]/)}};N.prototype=new b,N.prototype._is_comment=function(oe){return oe.type===D.COMMENT||oe.type===D.BLOCK_COMMENT||oe.type===D.UNKNOWN},N.prototype._is_opening=function(oe){return oe.type===D.START_BLOCK||oe.type===D.START_EXPR},N.prototype._is_closing=function(oe,ae){return(oe.type===D.END_BLOCK||oe.type===D.END_EXPR)&&ae&&(oe.text==="]"&&ae.text==="["||oe.text===")"&&ae.text==="("||oe.text==="}"&&ae.text==="{")},N.prototype._reset=function(){Q=!1},N.prototype._get_next_token=function(oe,ae){var le=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(D.EOF,""):(le=le||this._read_non_javascript(x),le=le||this._read_string(x),le=le||this._read_pair(x,this._input.peek(1)),le=le||this._read_word(oe),le=le||this._read_singles(x),le=le||this._read_comment(x),le=le||this._read_regexp(x,oe),le=le||this._read_xml(x,oe),le=le||this._read_punctuation(),le=le||this._create_token(D.UNKNOWN,this._input.next()),le)},N.prototype._read_word=function(oe){var ae;if(ae=this.__patterns.identifier.read(),ae!=="")return ae=ae.replace(P.allLineBreaks,`
|
|
`),!(oe.type===D.DOT||oe.type===D.RESERVED&&(oe.text==="set"||oe.text==="get"))&&tt.test(ae)?(ae==="in"||ae==="of")&&(oe.type===D.WORD||oe.type===D.STRING)?this._create_token(D.OPERATOR,ae):this._create_token(D.RESERVED,ae):this._create_token(D.WORD,ae);if(ae=this.__patterns.number.read(),ae!=="")return this._create_token(D.WORD,ae)},N.prototype._read_singles=function(oe){var ae=null;return oe==="("||oe==="["?ae=this._create_token(D.START_EXPR,oe):oe===")"||oe==="]"?ae=this._create_token(D.END_EXPR,oe):oe==="{"?ae=this._create_token(D.START_BLOCK,oe):oe==="}"?ae=this._create_token(D.END_BLOCK,oe):oe===";"?ae=this._create_token(D.SEMICOLON,oe):oe==="."&&se.test(this._input.peek(1))?ae=this._create_token(D.DOT,oe):oe===","&&(ae=this._create_token(D.COMMA,oe)),ae&&this._input.next(),ae},N.prototype._read_pair=function(oe,ae){var le=null;return oe==="#"&&ae==="{"&&(le=this._create_token(D.START_BLOCK,oe+ae)),le&&(this._input.next(),this._input.next()),le},N.prototype._read_punctuation=function(){var oe=this.__patterns.punct.read();if(oe!=="")return oe==="="?this._create_token(D.EQUALS,oe):oe==="?."?this._create_token(D.DOT,oe):this._create_token(D.OPERATOR,oe)},N.prototype._read_non_javascript=function(oe){var ae="";if(oe==="#"){if(this._is_first_token()&&(ae=this.__patterns.shebang.read(),ae))return this._create_token(D.UNKNOWN,ae.trim()+`
|
|
`);if(ae=this.__patterns.include.read(),ae)return this._create_token(D.UNKNOWN,ae.trim()+`
|
|
`);oe=this._input.next();var le="#";if(this._input.hasNext()&&this._input.testChar(F)){do oe=this._input.next(),le+=oe;while(this._input.hasNext()&&oe!=="#"&&oe!=="=");return oe==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(le+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(le+="{}",this._input.next(),this._input.next())),this._create_token(D.WORD,le)}this._input.back()}else if(oe==="<"&&this._is_first_token()){if(ae=this.__patterns.html_comment_start.read(),ae){for(;this._input.hasNext()&&!this._input.testChar(P.newline);)ae+=this._input.next();return Q=!0,this._create_token(D.COMMENT,ae)}}else if(Q&&oe==="-"&&(ae=this.__patterns.html_comment_end.read(),ae))return Q=!1,this._create_token(D.COMMENT,ae);return null},N.prototype._read_comment=function(oe){var ae=null;if(oe==="/"){var le="";if(this._input.peek(1)==="*"){le=this.__patterns.block_comment.read();var x=j.get_directives(le);x&&x.ignore==="start"&&(le+=j.readIgnored(this._input)),le=le.replace(P.allLineBreaks,`
|
|
`),ae=this._create_token(D.BLOCK_COMMENT,le),ae.directives=x}else this._input.peek(1)==="/"&&(le=this.__patterns.comment.read(),ae=this._create_token(D.COMMENT,le))}return ae},N.prototype._read_string=function(oe){if(oe==="`"||oe==="'"||oe==='"'){var ae=this._input.next();return this.has_char_escapes=!1,oe==="`"?ae+=this._read_string_recursive("`",!0,"${"):ae+=this._read_string_recursive(oe),this.has_char_escapes&&this._options.unescape_strings&&(ae=Y(ae)),this._input.peek()===oe&&(ae+=this._input.next()),ae=ae.replace(P.allLineBreaks,`
|
|
`),this._create_token(D.STRING,ae)}return null},N.prototype._allow_regexp_or_xml=function(oe){return oe.type===D.RESERVED&&V(oe.text,["return","case","throw","else","do","typeof","yield"])||oe.type===D.END_EXPR&&oe.text===")"&&oe.opened.previous.type===D.RESERVED&&V(oe.opened.previous.text,["if","while","for"])||V(oe.type,[D.COMMENT,D.START_EXPR,D.START_BLOCK,D.START,D.END_BLOCK,D.OPERATOR,D.EQUALS,D.EOF,D.SEMICOLON,D.COMMA])},N.prototype._read_regexp=function(oe,ae){if(oe==="/"&&this._allow_regexp_or_xml(ae)){for(var le=this._input.next(),x=!1,A=!1;this._input.hasNext()&&(x||A||this._input.peek()!==oe)&&!this._input.testChar(P.newline);)le+=this._input.peek(),x?x=!1:(x=this._input.peek()==="\\",this._input.peek()==="["?A=!0:this._input.peek()==="]"&&(A=!1)),this._input.next();return this._input.peek()===oe&&(le+=this._input.next(),le+=this._input.read(P.identifier)),this._create_token(D.STRING,le)}return null},N.prototype._read_xml=function(oe,ae){if(this._options.e4x&&oe==="<"&&this._allow_regexp_or_xml(ae)){var le="",x=this.__patterns.xml.read_match();if(x){for(var A=x[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=A.indexOf("{")===0,ge=0;x;){var Be=!!x[1],Xe=x[2],Ve=!!x[x.length-1]||Xe.slice(0,8)==="![CDATA[";if(!Ve&&(Xe===A||W&&Xe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Be?--ge:++ge),le+=x[0],ge<=0)break;x=this.__patterns.xml.read_match()}return x||(le+=this._input.match(/[\s\S]*/g)[0]),le=le.replace(P.allLineBreaks,`
|
|
`),this._create_token(D.STRING,le)}}return null};function Y(oe){for(var ae="",le=0,x=new M(oe),A=null;x.hasNext();)if(A=x.match(/([\s]|[^\\]|\\\\)+/g),A&&(ae+=A[0]),x.peek()==="\\"){if(x.next(),x.peek()==="x")A=x.match(/x([0-9A-Fa-f]{2})/g);else if(x.peek()==="u")A=x.match(/u([0-9A-Fa-f]{4})/g),A||(A=x.match(/u\{([0-9A-Fa-f]+)\}/g));else{ae+="\\",x.hasNext()&&(ae+=x.next());continue}if(!A||(le=parseInt(A[1],16),le>126&&le<=255&&A[0].indexOf("x")===0))return oe;le>=0&&le<32||le>1114111?ae+="\\"+A[0]:le===34||le===39||le===92?ae+="\\"+String.fromCharCode(le):ae+=String.fromCharCode(le)}return ae}N.prototype._read_string_recursive=function(oe,ae,le){var x,A;oe==="'"?A=this.__patterns.single_quote:oe==='"'?A=this.__patterns.double_quote:oe==="`"?A=this.__patterns.template_text:oe==="}"&&(A=this.__patterns.template_expression);for(var W=A.read(),ge="";this._input.hasNext();){if(ge=this._input.next(),ge===oe||!ae&&P.newline.test(ge)){this._input.back();break}else ge==="\\"&&this._input.hasNext()?(x=this._input.peek(),x==="x"||x==="u"?this.has_char_escapes=!0:x==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ge+=this._input.next()):le&&(le==="${"&&ge==="$"&&this._input.peek()==="{"&&(ge+=this._input.next()),le===ge&&(oe==="`"?ge+=this._read_string_recursive("}",ae,"`"):ge+=this._read_string_recursive("`",ae,"${"),this._input.hasNext()&&(ge+=this._input.next())));ge+=A.read(),W+=ge}return W},q.exports.Tokenizer=N,q.exports.TOKEN=D,q.exports.positionable_operators=Ee.slice(),q.exports.line_starters=Pe.slice()},function(q){var o=RegExp.prototype.hasOwnProperty("sticky");function K(M){this.__input=M||"",this.__input_length=this.__input.length,this.__position=0}K.prototype.restart=function(){this.__position=0},K.prototype.back=function(){this.__position>0&&(this.__position-=1)},K.prototype.hasNext=function(){return this.__position<this.__input_length},K.prototype.next=function(){var M=null;return this.hasNext()&&(M=this.__input.charAt(this.__position),this.__position+=1),M},K.prototype.peek=function(M){var b=null;return M=M||0,M+=this.__position,M>=0&&M<this.__input_length&&(b=this.__input.charAt(M)),b},K.prototype.__match=function(M,b){M.lastIndex=b;var E=M.exec(this.__input);return E&&!(o&&M.sticky)&&E.index!==b&&(E=null),E},K.prototype.test=function(M,b){return b=b||0,b+=this.__position,b>=0&&b<this.__input_length?!!this.__match(M,b):!1},K.prototype.testChar=function(M,b){var E=this.peek(b);return M.lastIndex=0,E!==null&&M.test(E)},K.prototype.match=function(M){var b=this.__match(M,this.__position);return b?this.__position+=b[0].length:b=null,b},K.prototype.read=function(M,b,E){var C="",P;return M&&(P=this.match(M),P&&(C+=P[0])),b&&(P||!M)&&(C+=this.readUntil(b,E)),C},K.prototype.readUntil=function(M,b){var E="",C=this.__position;M.lastIndex=this.__position;var P=M.exec(this.__input);return P?(C=P.index,b&&(C+=P[0].length)):C=this.__input_length,E=this.__input.substring(this.__position,C),this.__position=C,E},K.prototype.readUntilAfter=function(M){return this.readUntil(M,!0)},K.prototype.get_regexp=function(M,b){var E=null,C="g";return b&&o&&(C="y"),typeof M=="string"&&M!==""?E=new RegExp(M,C):M&&(E=new RegExp(M.source,C)),E},K.prototype.get_literal_regexp=function(M){return RegExp(M.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},K.prototype.peekUntilAfter=function(M){var b=this.__position,E=this.readUntilAfter(M);return this.__position=b,E},K.prototype.lookBack=function(M){var b=this.__position-1;return b>=M.length&&this.__input.substring(b-M.length,b).toLowerCase()===M},q.exports.InputScanner=K},function(q,o,K){var M=K(8).InputScanner,b=K(3).Token,E=K(10).TokenStream,C=K(11).WhitespacePattern,P={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},ne=function(te,V){this._input=new M(te),this._options=V||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new C(this._input)};ne.prototype.tokenize=function(){this._input.restart(),this.__tokens=new E,this._reset();for(var te,V=new b(P.START,""),D=null,j=[],O=new E;V.type!==P.EOF;){for(te=this._get_next_token(V,D);this._is_comment(te);)O.add(te),te=this._get_next_token(V,D);O.isEmpty()||(te.comments_before=O,O=new E),te.parent=D,this._is_opening(te)?(j.push(D),D=te):D&&this._is_closing(te,D)&&(te.opened=D,D.closed=te,D=j.pop(),te.parent=D),te.previous=V,V.next=te,this.__tokens.add(te),V=te}return this.__tokens},ne.prototype._is_first_token=function(){return this.__tokens.isEmpty()},ne.prototype._reset=function(){},ne.prototype._get_next_token=function(te,V){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(P.RAW,D):this._create_token(P.EOF,"")},ne.prototype._is_comment=function(te){return!1},ne.prototype._is_opening=function(te){return!1},ne.prototype._is_closing=function(te,V){return!1},ne.prototype._create_token=function(te,V){var D=new b(te,V,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},ne.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},q.exports.Tokenizer=ne,q.exports.TOKEN=P},function(q){function o(K){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=K}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var K=null;return this.hasNext()&&(K=this.__tokens[this.__position],this.__position+=1),K},o.prototype.peek=function(K){var M=null;return K=K||0,K+=this.__position,K>=0&&K<this.__tokens_length&&(M=this.__tokens[K]),M},o.prototype.add=function(K){this.__parent_token&&(K.parent=this.__parent_token),this.__tokens.push(K),this.__tokens_length+=1},q.exports.TokenStream=o},function(q,o,K){var M=K(12).Pattern;function b(E,C){M.call(this,E,C),C?this._line_regexp=this._input.get_regexp(C._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}b.prototype=new M,b.prototype.__set_whitespace_patterns=function(E,C){E+="\\t ",C+="\\n\\r",this._match_pattern=this._input.get_regexp("["+E+C+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+C+"]")},b.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var E=this._input.read(this._match_pattern);if(E===" ")this.whitespace_before_token=" ";else if(E){var C=this.__split(this._newline_regexp,E);this.newline_count=C.length-1,this.whitespace_before_token=C[this.newline_count]}return E},b.prototype.matching=function(E,C){var P=this._create();return P.__set_whitespace_patterns(E,C),P._update(),P},b.prototype._create=function(){return new b(this._input,this)},b.prototype.__split=function(E,C){E.lastIndex=0;for(var P=0,ne=[],te=E.exec(C);te;)ne.push(C.substring(P,te.index)),P=te.index+te[0].length,te=E.exec(C);return P<C.length?ne.push(C.substring(P,C.length)):ne.push(""),ne},q.exports.WhitespacePattern=b},function(q){function o(K,M){this._input=K,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,M&&(this._starting_pattern=this._input.get_regexp(M._starting_pattern,!0),this._match_pattern=this._input.get_regexp(M._match_pattern,!0),this._until_pattern=this._input.get_regexp(M._until_pattern),this._until_after=M._until_after)}o.prototype.read=function(){var K=this._input.read(this._starting_pattern);return(!this._starting_pattern||K)&&(K+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),K},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(K){var M=this._create();return M._until_after=!0,M._until_pattern=this._input.get_regexp(K),M._update(),M},o.prototype.until=function(K){var M=this._create();return M._until_after=!1,M._until_pattern=this._input.get_regexp(K),M._update(),M},o.prototype.starting_with=function(K){var M=this._create();return M._starting_pattern=this._input.get_regexp(K,!0),M._update(),M},o.prototype.matching=function(K){var M=this._create();return M._match_pattern=this._input.get_regexp(K,!0),M._update(),M},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},q.exports.Pattern=o},function(q){function o(K,M){K=typeof K=="string"?K:K.source,M=typeof M=="string"?M:M.source,this.__directives_block_pattern=new RegExp(K+/ beautify( \w+[:]\w+)+ /.source+M,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(K+/\sbeautify\signore:end\s/.source+M,"g")}o.prototype.get_directives=function(K){if(!K.match(this.__directives_block_pattern))return null;var M={};this.__directive_pattern.lastIndex=0;for(var b=this.__directive_pattern.exec(K);b;)M[b[1]]=b[2],b=this.__directive_pattern.exec(K);return M},o.prototype.readIgnored=function(K){return K.readUntilAfter(this.__directives_end_ignore_pattern)},q.exports.Directives=o},function(q,o,K){var M=K(12).Pattern,b={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function E(C,P){M.call(this,C,P),this.__template_pattern=null,this._disabled=Object.assign({},b),this._excluded=Object.assign({},b),P&&(this.__template_pattern=this._input.get_regexp(P.__template_pattern),this._excluded=Object.assign(this._excluded,P._excluded),this._disabled=Object.assign(this._disabled,P._disabled));var ne=new M(C);this.__patterns={handlebars_comment:ne.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:ne.starting_with(/{{{/).until_after(/}}}/),handlebars:ne.starting_with(/{{/).until_after(/}}/),php:ne.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:ne.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:ne.starting_with(/{%/).until_after(/%}/),django_value:ne.starting_with(/{{/).until_after(/}}/),django_comment:ne.starting_with(/{#/).until_after(/#}/),smarty:ne.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:ne.starting_with(/{\*/).until_after(/\*}/),smarty_literal:ne.starting_with(/{literal}/).until_after(/{\/literal}/)}}E.prototype=new M,E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){this.__set_templated_pattern()},E.prototype.disable=function(C){var P=this._create();return P._disabled[C]=!0,P._update(),P},E.prototype.read_options=function(C){var P=this._create();for(var ne in b)P._disabled[ne]=C.templating.indexOf(ne)===-1;return P._update(),P},E.prototype.exclude=function(C){var P=this._create();return P._excluded[C]=!0,P._update(),P},E.prototype.read=function(){var C="";this._match_pattern?C=this._input.read(this._starting_pattern):C=this._input.read(this._starting_pattern,this.__template_pattern);for(var P=this._read_template();P;)this._match_pattern?P+=this._input.read(this._match_pattern):P+=this._input.readUntil(this.__template_pattern),C+=P,P=this._read_template();return this._until_after&&(C+=this._input.readUntilAfter(this._until_pattern)),C},E.prototype.__set_templated_pattern=function(){var C=[];this._disabled.php||C.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||C.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(C.push(this.__patterns.django._starting_pattern.source),C.push(this.__patterns.django_value._starting_pattern.source),C.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||C.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&C.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+C.join("|")+")")},E.prototype._read_template=function(){var C="",P=this._input.peek();if(P==="<"){var ne=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&ne==="?"&&(C=C||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&ne==="%"&&(C=C||this.__patterns.erb.read())}else P==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(C=C||this.__patterns.handlebars_comment.read(),C=C||this.__patterns.handlebars_unescaped.read(),C=C||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(C=C||this.__patterns.django_value.read()),this._excluded.django||(C=C||this.__patterns.django_comment.read(),C=C||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(C=C||this.__patterns.smarty_comment.read(),C=C||this.__patterns.smarty_literal.read(),C=C||this.__patterns.smarty.read()));return C},q.exports.TemplatablePattern=E}],H={};function m(q){var o=H[q];if(o!==void 0)return o.exports;var K=H[q]={exports:{}};return pe[q](K,K.exports,m),K.exports}var ie=m(0);ue=ie})();var xe=ue;S=[],y=function(){return{js_beautify:xe}}.apply(it,S),y!==void 0&&(Gt.exports=y)})()},15342:function(Gt){(function(S,y){Gt.exports=y()})(typeof self!="undefined"?self:this,function(){return function(it){var S={};function y(ue){if(S[ue])return S[ue].exports;var xe=S[ue]={i:ue,l:!1,exports:{}};return it[ue].call(xe.exports,xe,xe.exports,y),xe.l=!0,xe.exports}return y.m=it,y.c=S,y.d=function(ue,xe,pe){y.o(ue,xe)||Object.defineProperty(ue,xe,{enumerable:!0,get:pe})},y.r=function(ue){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ue,"__esModule",{value:!0})},y.t=function(ue,xe){if(xe&1&&(ue=y(ue)),xe&8||xe&4&&typeof ue=="object"&&ue&&ue.__esModule)return ue;var pe=Object.create(null);if(y.r(pe),Object.defineProperty(pe,"default",{enumerable:!0,value:ue}),xe&2&&typeof ue!="string")for(var H in ue)y.d(pe,H,function(m){return ue[m]}.bind(null,H));return pe},y.n=function(ue){var xe=ue&&ue.__esModule?function(){return ue.default}:function(){return ue};return y.d(xe,"a",xe),xe},y.o=function(ue,xe){return Object.prototype.hasOwnProperty.call(ue,xe)},y.p="",y(y.s=1)}([function(it,S,y){},function(it,S,y){"use strict";y.r(S);var ue=y(0),xe=function(){function U(u,d,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=d,this.end=f}return U.range=function(d,f){return f?!d||!d.loc||!f.loc||d.loc.lexer!==f.loc.lexer?null:new U(d.loc.lexer,d.loc.start,f.loc.end):d&&d.loc},U}(),pe=function(){function U(d,f){this.text=void 0,this.loc=void 0,this.text=d,this.loc=f}var u=U.prototype;return u.range=function(f,v){return new U(v,xe.range(this,f))},U}(),H=function U(u,d){this.position=void 0;var f="KaTeX parse error: "+u,v,I=d&&d.loc;if(I&&I.start<=I.end){var $=I.lexer.input;v=I.start;var fe=I.end;v===$.length?f+=" at end of input: ":f+=" at position "+(v+1)+": ";var Te=$.slice(v,fe).replace(/[^]/g,"$&\u0332"),Ke;v>15?Ke="\u2026"+$.slice(v-15,v):Ke=$.slice(0,v);var ot;fe+15<$.length?ot=$.slice(fe,fe+15)+"\u2026":ot=$.slice(fe),f+=Ke+Te+ot}var yt=new Error(f);return yt.name="ParseError",yt.__proto__=U.prototype,yt.position=v,yt};H.prototype.__proto__=Error.prototype;var m=H,ie=function(u,d){return u.indexOf(d)!==-1},q=function(u,d){return u===void 0?d:u},o=/([A-Z])/g,K=function(u){return u.replace(o,"-$1").toLowerCase()},M={"&":"&",">":">","<":"<",'"':""","'":"'"},b=/[&><"']/g;function E(U){return String(U).replace(b,function(u){return M[u]})}var C=function U(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?U(u.body[0]):u:u.type==="font"?U(u.body):u},P=function(u){var d=C(u);return d.type==="mathord"||d.type==="textord"||d.type==="atom"},ne=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},te=function(u){var d=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return d!=null?d[1]:"_relative"},V={contains:ie,deflt:q,escape:E,hyphenate:K,getBaseElem:C,isCharacterBox:P,protocolFromUrl:te},D=function(){function U(d){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,d=d||{},this.displayMode=V.deflt(d.displayMode,!1),this.output=V.deflt(d.output,"htmlAndMathml"),this.leqno=V.deflt(d.leqno,!1),this.fleqn=V.deflt(d.fleqn,!1),this.throwOnError=V.deflt(d.throwOnError,!0),this.errorColor=V.deflt(d.errorColor,"#cc0000"),this.macros=d.macros||{},this.minRuleThickness=Math.max(0,V.deflt(d.minRuleThickness,0)),this.colorIsTextColor=V.deflt(d.colorIsTextColor,!1),this.strict=V.deflt(d.strict,"warn"),this.trust=V.deflt(d.trust,!1),this.maxSize=Math.max(0,V.deflt(d.maxSize,1/0)),this.maxExpand=Math.max(0,V.deflt(d.maxExpand,1e3))}var u=U.prototype;return u.reportNonstrict=function(f,v,I){var $=this.strict;if(typeof $=="function"&&($=$(f,v,I)),!(!$||$==="ignore")){if($===!0||$==="error")throw new m("LaTeX-incompatible input and strict mode is set to 'error': "+(v+" ["+f+"]"),I);$==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+$+"': "+v+" ["+f+"]"))}},u.useStrictBehavior=function(f,v,I){var $=this.strict;if(typeof $=="function")try{$=$(f,v,I)}catch(fe){$="error"}return!$||$==="ignore"?!1:$===!0||$==="error"?!0:$==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+$+"': "+v+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=V.protocolFromUrl(f.url));var v=typeof this.trust=="function"?this.trust(f):this.trust;return!!v},U}(),j=function(){function U(d,f,v){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=d,this.size=f,this.cramped=v}var u=U.prototype;return u.sup=function(){return tt[Q[this.id]]},u.sub=function(){return tt[N[this.id]]},u.fracNum=function(){return tt[Y[this.id]]},u.fracDen=function(){return tt[oe[this.id]]},u.cramp=function(){return tt[ae[this.id]]},u.text=function(){return tt[le[this.id]]},u.isTight=function(){return this.size>=2},U}(),O=0,F=1,se=2,Ee=3,he=4,Ce=5,Pe=6,_e=7,tt=[new j(O,0,!1),new j(F,0,!0),new j(se,1,!1),new j(Ee,1,!0),new j(he,2,!1),new j(Ce,2,!0),new j(Pe,3,!1),new j(_e,3,!0)],Q=[he,Ce,he,Ce,Pe,_e,Pe,_e],N=[Ce,Ce,Ce,Ce,_e,_e,_e,_e],Y=[se,Ee,he,Ce,Pe,_e,Pe,_e],oe=[Ee,Ee,Ce,Ce,_e,_e,_e,_e],ae=[F,F,Ee,Ee,Ce,Ce,_e,_e],le=[O,F,se,Ee,se,Ee,se,Ee],x={DISPLAY:tt[O],TEXT:tt[se],SCRIPT:tt[he],SCRIPTSCRIPT:tt[Pe]},A=[{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 W(U){for(var u=0;u<A.length;u++)for(var d=A[u],f=0;f<d.blocks.length;f++){var v=d.blocks[f];if(U>=v[0]&&U<=v[1])return d.name}return null}var ge=[];A.forEach(function(U){return U.blocks.forEach(function(u){return ge.push.apply(ge,u)})});function Be(U){for(var u=0;u<ge.length;u+=2)if(U>=ge[u]&&U<=ge[u+1])return!0;return!1}var Xe=80,Ve=function(u,d){return"M95,"+(622+u+d)+`
|
|
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)+" "+d+"h400000v"+(40+u)+"h-400000z"},Ze=function(u,d){return"M263,"+(601+u+d)+`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)+" "+d+"h400000v"+(40+u)+"h-400000z"},$e=function(u,d){return"M983 "+(10+u+d)+`
|
|
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)+" "+d+"h400000v"+(40+u)+"h-400000z"},qe=function(u,d){return"M424,"+(2398+u+d)+`
|
|
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)+" "+d+`
|
|
h400000v`+(40+u)+"h-400000z"},je=function(u,d){return"M473,"+(2713+u+d)+`
|
|
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)+" "+d+"h400000v"+(40+u)+"H1017.7z"},Et=function(u,d,f){var v=f-54-d-u;return"M702 "+(u+d)+"H400000"+(40+u)+`
|
|
H742v`+v+`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 `+d+"H400000v"+(40+u)+"H742z"},Qe=function(u,d,f){d=1e3*d;var v="";switch(u){case"sqrtMain":v=Ve(d,Xe);break;case"sqrtSize1":v=Ze(d,Xe);break;case"sqrtSize2":v=$e(d,Xe);break;case"sqrtSize3":v=qe(d,Xe);break;case"sqrtSize4":v=je(d,Xe);break;case"sqrtTall":v=Et(d,Xe,f)}return v},wt={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`},Fe=function(){function U(d){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=d,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=U.prototype;return u.hasClass=function(f){return V.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),v=0;v<this.children.length;v++)f.appendChild(this.children[v].toNode());return f},u.toMarkup=function(){for(var f="",v=0;v<this.children.length;v++)f+=this.children[v].toMarkup();return f},u.toText=function(){var f=function(I){return I.toText()};return this.children.map(f).join("")},U}(),st=function(u){return u.filter(function(d){return d}).join(" ")},Re=function(u,d,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},d){d.style.isTight()&&this.classes.push("mtight");var v=d.getColor();v&&(this.style.color=v)}},we=function(u){var d=document.createElement(u);d.className=st(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(d.style[f]=this.style[f]);for(var v in this.attributes)this.attributes.hasOwnProperty(v)&&d.setAttribute(v,this.attributes[v]);for(var I=0;I<this.children.length;I++)d.appendChild(this.children[I].toNode());return d},ce=function(u){var d="<"+u;this.classes.length&&(d+=' class="'+V.escape(st(this.classes))+'"');var f="";for(var v in this.style)this.style.hasOwnProperty(v)&&(f+=V.hyphenate(v)+":"+this.style[v]+";");f&&(d+=' style="'+V.escape(f)+'"');for(var I in this.attributes)this.attributes.hasOwnProperty(I)&&(d+=" "+I+'="'+V.escape(this.attributes[I])+'"');d+=">";for(var $=0;$<this.children.length;$++)d+=this.children[$].toMarkup();return d+="</"+u+">",d},He=function(){function U(d,f,v,I){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,Re.call(this,d,v,I),this.children=f||[]}var u=U.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return V.contains(this.classes,f)},u.toNode=function(){return we.call(this,"span")},u.toMarkup=function(){return ce.call(this,"span")},U}(),Ie=function(){function U(d,f,v,I){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,Re.call(this,f,I),this.children=v||[],this.setAttribute("href",d)}var u=U.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return V.contains(this.classes,f)},u.toNode=function(){return we.call(this,"a")},u.toMarkup=function(){return ce.call(this,"a")},U}(),De=function(){function U(d,f,v){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=f,this.src=d,this.classes=["mord"],this.style=v}var u=U.prototype;return u.hasClass=function(f){return V.contains(this.classes,f)},u.toNode=function(){var f=document.createElement("img");f.src=this.src,f.alt=this.alt,f.className="mord";for(var v in this.style)this.style.hasOwnProperty(v)&&(f.style[v]=this.style[v]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",v="";for(var I in this.style)this.style.hasOwnProperty(I)&&(v+=V.hyphenate(I)+":"+this.style[I]+";");return v&&(f+=' style="'+V.escape(v)+'"'),f+="'/>",f},U}(),L={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},J=function(){function U(d,f,v,I,$,fe,Te,Ke){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=d,this.height=f||0,this.depth=v||0,this.italic=I||0,this.skew=$||0,this.width=fe||0,this.classes=Te||[],this.style=Ke||{},this.maxFontSize=0;var ot=W(this.text.charCodeAt(0));ot&&this.classes.push(ot+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=L[this.text])}var u=U.prototype;return u.hasClass=function(f){return V.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),v=null;this.italic>0&&(v=document.createElement("span"),v.style.marginRight=this.italic+"em"),this.classes.length>0&&(v=v||document.createElement("span"),v.className=st(this.classes));for(var I in this.style)this.style.hasOwnProperty(I)&&(v=v||document.createElement("span"),v.style[I]=this.style[I]);return v?(v.appendChild(f),v):f},u.toMarkup=function(){var f=!1,v="<span";this.classes.length&&(f=!0,v+=' class="',v+=V.escape(st(this.classes)),v+='"');var I="";this.italic>0&&(I+="margin-right:"+this.italic+"em;");for(var $ in this.style)this.style.hasOwnProperty($)&&(I+=V.hyphenate($)+":"+this.style[$]+";");I&&(f=!0,v+=' style="'+V.escape(I)+'"');var fe=V.escape(this.text);return f?(v+=">",v+=fe,v+="</span>",v):fe},U}(),me=function(){function U(d,f){this.children=void 0,this.attributes=void 0,this.children=d||[],this.attributes=f||{}}var u=U.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"svg");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&v.setAttribute(I,this.attributes[I]);for(var $=0;$<this.children.length;$++)v.appendChild(this.children[$].toNode());return v},u.toMarkup=function(){var f="<svg";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");f+=">";for(var I=0;I<this.children.length;I++)f+=this.children[I].toMarkup();return f+="</svg>",f},U}(),Le=function(){function U(d,f){this.pathName=void 0,this.alternate=void 0,this.pathName=d,this.alternate=f}var u=U.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"path");return this.alternate?v.setAttribute("d",this.alternate):v.setAttribute("d",wt[this.pathName]),v},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+wt[this.pathName]+"'/>"},U}(),We=function(){function U(d){this.attributes=void 0,this.attributes=d||{}}var u=U.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"line");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&v.setAttribute(I,this.attributes[I]);return v},u.toMarkup=function(){var f="<line";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");return f+="/>",f},U}();function Je(U){if(U instanceof J)return U;throw new Error("Expected symbolNode but got "+String(U)+".")}function et(U){if(U instanceof He)return U;throw new Error("Expected span<HtmlDomNode> but got "+String(U)+".")}var nt={"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]}},pt={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]},gt={\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 mt(U,u){nt[U]=u}function St(U,u,d){if(!nt[u])throw new Error("Font metrics not found for font: "+u+".");var f=U.charCodeAt(0),v=nt[u][f];if(!v&&U[0]in gt&&(f=gt[U[0]].charCodeAt(0),v=nt[u][f]),!v&&d==="text"&&Be(f)&&(v=nt[u][77]),v)return{depth:v[0],height:v[1],italic:v[2],skew:v[3],width:v[4]}}var Tt={};function Ye(U){var u;if(U>=5?u=0:U>=3?u=1:u=2,!Tt[u]){var d=Tt[u]={cssEmPerMu:pt.quad[u]/18};for(var f in pt)pt.hasOwnProperty(f)&&(d[f]=pt[f][u])}return Tt[u]}var vt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},dt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ve={math:{},text:{}},Ge=ve;function _(U,u,d,f,v,I){ve[U][v]={font:u,group:d,replace:f},I&&f&&(ve[U][f]=ve[U][v])}var w="math",ye="text",B="main",X="ams",lt="accent-token",Se="bin",Ne="close",ze="inner",z="mathord",Z="op-token",be="open",ke="punct",G="rel",ht="spacing",de="textord";_(w,B,G,"\u2261","\\equiv",!0),_(w,B,G,"\u227A","\\prec",!0),_(w,B,G,"\u227B","\\succ",!0),_(w,B,G,"\u223C","\\sim",!0),_(w,B,G,"\u22A5","\\perp"),_(w,B,G,"\u2AAF","\\preceq",!0),_(w,B,G,"\u2AB0","\\succeq",!0),_(w,B,G,"\u2243","\\simeq",!0),_(w,B,G,"\u2223","\\mid",!0),_(w,B,G,"\u226A","\\ll",!0),_(w,B,G,"\u226B","\\gg",!0),_(w,B,G,"\u224D","\\asymp",!0),_(w,B,G,"\u2225","\\parallel"),_(w,B,G,"\u22C8","\\bowtie",!0),_(w,B,G,"\u2323","\\smile",!0),_(w,B,G,"\u2291","\\sqsubseteq",!0),_(w,B,G,"\u2292","\\sqsupseteq",!0),_(w,B,G,"\u2250","\\doteq",!0),_(w,B,G,"\u2322","\\frown",!0),_(w,B,G,"\u220B","\\ni",!0),_(w,B,G,"\u221D","\\propto",!0),_(w,B,G,"\u22A2","\\vdash",!0),_(w,B,G,"\u22A3","\\dashv",!0),_(w,B,G,"\u220B","\\owns"),_(w,B,ke,".","\\ldotp"),_(w,B,ke,"\u22C5","\\cdotp"),_(w,B,de,"#","\\#"),_(ye,B,de,"#","\\#"),_(w,B,de,"&","\\&"),_(ye,B,de,"&","\\&"),_(w,B,de,"\u2135","\\aleph",!0),_(w,B,de,"\u2200","\\forall",!0),_(w,B,de,"\u210F","\\hbar",!0),_(w,B,de,"\u2203","\\exists",!0),_(w,B,de,"\u2207","\\nabla",!0),_(w,B,de,"\u266D","\\flat",!0),_(w,B,de,"\u2113","\\ell",!0),_(w,B,de,"\u266E","\\natural",!0),_(w,B,de,"\u2663","\\clubsuit",!0),_(w,B,de,"\u2118","\\wp",!0),_(w,B,de,"\u266F","\\sharp",!0),_(w,B,de,"\u2662","\\diamondsuit",!0),_(w,B,de,"\u211C","\\Re",!0),_(w,B,de,"\u2661","\\heartsuit",!0),_(w,B,de,"\u2111","\\Im",!0),_(w,B,de,"\u2660","\\spadesuit",!0),_(ye,B,de,"\xA7","\\S",!0),_(ye,B,de,"\xB6","\\P",!0),_(w,B,de,"\u2020","\\dag"),_(ye,B,de,"\u2020","\\dag"),_(ye,B,de,"\u2020","\\textdagger"),_(w,B,de,"\u2021","\\ddag"),_(ye,B,de,"\u2021","\\ddag"),_(ye,B,de,"\u2021","\\textdaggerdbl"),_(w,B,Ne,"\u23B1","\\rmoustache",!0),_(w,B,be,"\u23B0","\\lmoustache",!0),_(w,B,Ne,"\u27EF","\\rgroup",!0),_(w,B,be,"\u27EE","\\lgroup",!0),_(w,B,Se,"\u2213","\\mp",!0),_(w,B,Se,"\u2296","\\ominus",!0),_(w,B,Se,"\u228E","\\uplus",!0),_(w,B,Se,"\u2293","\\sqcap",!0),_(w,B,Se,"\u2217","\\ast"),_(w,B,Se,"\u2294","\\sqcup",!0),_(w,B,Se,"\u25EF","\\bigcirc"),_(w,B,Se,"\u2219","\\bullet"),_(w,B,Se,"\u2021","\\ddagger"),_(w,B,Se,"\u2240","\\wr",!0),_(w,B,Se,"\u2A3F","\\amalg"),_(w,B,Se,"&","\\And"),_(w,B,G,"\u27F5","\\longleftarrow",!0),_(w,B,G,"\u21D0","\\Leftarrow",!0),_(w,B,G,"\u27F8","\\Longleftarrow",!0),_(w,B,G,"\u27F6","\\longrightarrow",!0),_(w,B,G,"\u21D2","\\Rightarrow",!0),_(w,B,G,"\u27F9","\\Longrightarrow",!0),_(w,B,G,"\u2194","\\leftrightarrow",!0),_(w,B,G,"\u27F7","\\longleftrightarrow",!0),_(w,B,G,"\u21D4","\\Leftrightarrow",!0),_(w,B,G,"\u27FA","\\Longleftrightarrow",!0),_(w,B,G,"\u21A6","\\mapsto",!0),_(w,B,G,"\u27FC","\\longmapsto",!0),_(w,B,G,"\u2197","\\nearrow",!0),_(w,B,G,"\u21A9","\\hookleftarrow",!0),_(w,B,G,"\u21AA","\\hookrightarrow",!0),_(w,B,G,"\u2198","\\searrow",!0),_(w,B,G,"\u21BC","\\leftharpoonup",!0),_(w,B,G,"\u21C0","\\rightharpoonup",!0),_(w,B,G,"\u2199","\\swarrow",!0),_(w,B,G,"\u21BD","\\leftharpoondown",!0),_(w,B,G,"\u21C1","\\rightharpoondown",!0),_(w,B,G,"\u2196","\\nwarrow",!0),_(w,B,G,"\u21CC","\\rightleftharpoons",!0),_(w,X,G,"\u226E","\\nless",!0),_(w,X,G,"\uE010","\\@nleqslant"),_(w,X,G,"\uE011","\\@nleqq"),_(w,X,G,"\u2A87","\\lneq",!0),_(w,X,G,"\u2268","\\lneqq",!0),_(w,X,G,"\uE00C","\\@lvertneqq"),_(w,X,G,"\u22E6","\\lnsim",!0),_(w,X,G,"\u2A89","\\lnapprox",!0),_(w,X,G,"\u2280","\\nprec",!0),_(w,X,G,"\u22E0","\\npreceq",!0),_(w,X,G,"\u22E8","\\precnsim",!0),_(w,X,G,"\u2AB9","\\precnapprox",!0),_(w,X,G,"\u2241","\\nsim",!0),_(w,X,G,"\uE006","\\@nshortmid"),_(w,X,G,"\u2224","\\nmid",!0),_(w,X,G,"\u22AC","\\nvdash",!0),_(w,X,G,"\u22AD","\\nvDash",!0),_(w,X,G,"\u22EA","\\ntriangleleft"),_(w,X,G,"\u22EC","\\ntrianglelefteq",!0),_(w,X,G,"\u228A","\\subsetneq",!0),_(w,X,G,"\uE01A","\\@varsubsetneq"),_(w,X,G,"\u2ACB","\\subsetneqq",!0),_(w,X,G,"\uE017","\\@varsubsetneqq"),_(w,X,G,"\u226F","\\ngtr",!0),_(w,X,G,"\uE00F","\\@ngeqslant"),_(w,X,G,"\uE00E","\\@ngeqq"),_(w,X,G,"\u2A88","\\gneq",!0),_(w,X,G,"\u2269","\\gneqq",!0),_(w,X,G,"\uE00D","\\@gvertneqq"),_(w,X,G,"\u22E7","\\gnsim",!0),_(w,X,G,"\u2A8A","\\gnapprox",!0),_(w,X,G,"\u2281","\\nsucc",!0),_(w,X,G,"\u22E1","\\nsucceq",!0),_(w,X,G,"\u22E9","\\succnsim",!0),_(w,X,G,"\u2ABA","\\succnapprox",!0),_(w,X,G,"\u2246","\\ncong",!0),_(w,X,G,"\uE007","\\@nshortparallel"),_(w,X,G,"\u2226","\\nparallel",!0),_(w,X,G,"\u22AF","\\nVDash",!0),_(w,X,G,"\u22EB","\\ntriangleright"),_(w,X,G,"\u22ED","\\ntrianglerighteq",!0),_(w,X,G,"\uE018","\\@nsupseteqq"),_(w,X,G,"\u228B","\\supsetneq",!0),_(w,X,G,"\uE01B","\\@varsupsetneq"),_(w,X,G,"\u2ACC","\\supsetneqq",!0),_(w,X,G,"\uE019","\\@varsupsetneqq"),_(w,X,G,"\u22AE","\\nVdash",!0),_(w,X,G,"\u2AB5","\\precneqq",!0),_(w,X,G,"\u2AB6","\\succneqq",!0),_(w,X,G,"\uE016","\\@nsubseteqq"),_(w,X,Se,"\u22B4","\\unlhd"),_(w,X,Se,"\u22B5","\\unrhd"),_(w,X,G,"\u219A","\\nleftarrow",!0),_(w,X,G,"\u219B","\\nrightarrow",!0),_(w,X,G,"\u21CD","\\nLeftarrow",!0),_(w,X,G,"\u21CF","\\nRightarrow",!0),_(w,X,G,"\u21AE","\\nleftrightarrow",!0),_(w,X,G,"\u21CE","\\nLeftrightarrow",!0),_(w,X,G,"\u25B3","\\vartriangle"),_(w,X,de,"\u210F","\\hslash"),_(w,X,de,"\u25BD","\\triangledown"),_(w,X,de,"\u25CA","\\lozenge"),_(w,X,de,"\u24C8","\\circledS"),_(w,X,de,"\xAE","\\circledR"),_(ye,X,de,"\xAE","\\circledR"),_(w,X,de,"\u2221","\\measuredangle",!0),_(w,X,de,"\u2204","\\nexists"),_(w,X,de,"\u2127","\\mho"),_(w,X,de,"\u2132","\\Finv",!0),_(w,X,de,"\u2141","\\Game",!0),_(w,X,de,"\u2035","\\backprime"),_(w,X,de,"\u25B2","\\blacktriangle"),_(w,X,de,"\u25BC","\\blacktriangledown"),_(w,X,de,"\u25A0","\\blacksquare"),_(w,X,de,"\u29EB","\\blacklozenge"),_(w,X,de,"\u2605","\\bigstar"),_(w,X,de,"\u2222","\\sphericalangle",!0),_(w,X,de,"\u2201","\\complement",!0),_(w,X,de,"\xF0","\\eth",!0),_(w,X,de,"\u2571","\\diagup"),_(w,X,de,"\u2572","\\diagdown"),_(w,X,de,"\u25A1","\\square"),_(w,X,de,"\u25A1","\\Box"),_(w,X,de,"\u25CA","\\Diamond"),_(w,X,de,"\xA5","\\yen",!0),_(ye,X,de,"\xA5","\\yen",!0),_(w,X,de,"\u2713","\\checkmark",!0),_(ye,X,de,"\u2713","\\checkmark"),_(w,X,de,"\u2136","\\beth",!0),_(w,X,de,"\u2138","\\daleth",!0),_(w,X,de,"\u2137","\\gimel",!0),_(w,X,de,"\u03DD","\\digamma",!0),_(w,X,de,"\u03F0","\\varkappa"),_(w,X,be,"\u250C","\\ulcorner",!0),_(w,X,Ne,"\u2510","\\urcorner",!0),_(w,X,be,"\u2514","\\llcorner",!0),_(w,X,Ne,"\u2518","\\lrcorner",!0),_(w,X,G,"\u2266","\\leqq",!0),_(w,X,G,"\u2A7D","\\leqslant",!0),_(w,X,G,"\u2A95","\\eqslantless",!0),_(w,X,G,"\u2272","\\lesssim",!0),_(w,X,G,"\u2A85","\\lessapprox",!0),_(w,X,G,"\u224A","\\approxeq",!0),_(w,X,Se,"\u22D6","\\lessdot"),_(w,X,G,"\u22D8","\\lll",!0),_(w,X,G,"\u2276","\\lessgtr",!0),_(w,X,G,"\u22DA","\\lesseqgtr",!0),_(w,X,G,"\u2A8B","\\lesseqqgtr",!0),_(w,X,G,"\u2251","\\doteqdot"),_(w,X,G,"\u2253","\\risingdotseq",!0),_(w,X,G,"\u2252","\\fallingdotseq",!0),_(w,X,G,"\u223D","\\backsim",!0),_(w,X,G,"\u22CD","\\backsimeq",!0),_(w,X,G,"\u2AC5","\\subseteqq",!0),_(w,X,G,"\u22D0","\\Subset",!0),_(w,X,G,"\u228F","\\sqsubset",!0),_(w,X,G,"\u227C","\\preccurlyeq",!0),_(w,X,G,"\u22DE","\\curlyeqprec",!0),_(w,X,G,"\u227E","\\precsim",!0),_(w,X,G,"\u2AB7","\\precapprox",!0),_(w,X,G,"\u22B2","\\vartriangleleft"),_(w,X,G,"\u22B4","\\trianglelefteq"),_(w,X,G,"\u22A8","\\vDash",!0),_(w,X,G,"\u22AA","\\Vvdash",!0),_(w,X,G,"\u2323","\\smallsmile"),_(w,X,G,"\u2322","\\smallfrown"),_(w,X,G,"\u224F","\\bumpeq",!0),_(w,X,G,"\u224E","\\Bumpeq",!0),_(w,X,G,"\u2267","\\geqq",!0),_(w,X,G,"\u2A7E","\\geqslant",!0),_(w,X,G,"\u2A96","\\eqslantgtr",!0),_(w,X,G,"\u2273","\\gtrsim",!0),_(w,X,G,"\u2A86","\\gtrapprox",!0),_(w,X,Se,"\u22D7","\\gtrdot"),_(w,X,G,"\u22D9","\\ggg",!0),_(w,X,G,"\u2277","\\gtrless",!0),_(w,X,G,"\u22DB","\\gtreqless",!0),_(w,X,G,"\u2A8C","\\gtreqqless",!0),_(w,X,G,"\u2256","\\eqcirc",!0),_(w,X,G,"\u2257","\\circeq",!0),_(w,X,G,"\u225C","\\triangleq",!0),_(w,X,G,"\u223C","\\thicksim"),_(w,X,G,"\u2248","\\thickapprox"),_(w,X,G,"\u2AC6","\\supseteqq",!0),_(w,X,G,"\u22D1","\\Supset",!0),_(w,X,G,"\u2290","\\sqsupset",!0),_(w,X,G,"\u227D","\\succcurlyeq",!0),_(w,X,G,"\u22DF","\\curlyeqsucc",!0),_(w,X,G,"\u227F","\\succsim",!0),_(w,X,G,"\u2AB8","\\succapprox",!0),_(w,X,G,"\u22B3","\\vartriangleright"),_(w,X,G,"\u22B5","\\trianglerighteq"),_(w,X,G,"\u22A9","\\Vdash",!0),_(w,X,G,"\u2223","\\shortmid"),_(w,X,G,"\u2225","\\shortparallel"),_(w,X,G,"\u226C","\\between",!0),_(w,X,G,"\u22D4","\\pitchfork",!0),_(w,X,G,"\u221D","\\varpropto"),_(w,X,G,"\u25C0","\\blacktriangleleft"),_(w,X,G,"\u2234","\\therefore",!0),_(w,X,G,"\u220D","\\backepsilon"),_(w,X,G,"\u25B6","\\blacktriangleright"),_(w,X,G,"\u2235","\\because",!0),_(w,X,G,"\u22D8","\\llless"),_(w,X,G,"\u22D9","\\gggtr"),_(w,X,Se,"\u22B2","\\lhd"),_(w,X,Se,"\u22B3","\\rhd"),_(w,X,G,"\u2242","\\eqsim",!0),_(w,B,G,"\u22C8","\\Join"),_(w,X,G,"\u2251","\\Doteq",!0),_(w,X,Se,"\u2214","\\dotplus",!0),_(w,X,Se,"\u2216","\\smallsetminus"),_(w,X,Se,"\u22D2","\\Cap",!0),_(w,X,Se,"\u22D3","\\Cup",!0),_(w,X,Se,"\u2A5E","\\doublebarwedge",!0),_(w,X,Se,"\u229F","\\boxminus",!0),_(w,X,Se,"\u229E","\\boxplus",!0),_(w,X,Se,"\u22C7","\\divideontimes",!0),_(w,X,Se,"\u22C9","\\ltimes",!0),_(w,X,Se,"\u22CA","\\rtimes",!0),_(w,X,Se,"\u22CB","\\leftthreetimes",!0),_(w,X,Se,"\u22CC","\\rightthreetimes",!0),_(w,X,Se,"\u22CF","\\curlywedge",!0),_(w,X,Se,"\u22CE","\\curlyvee",!0),_(w,X,Se,"\u229D","\\circleddash",!0),_(w,X,Se,"\u229B","\\circledast",!0),_(w,X,Se,"\u22C5","\\centerdot"),_(w,X,Se,"\u22BA","\\intercal",!0),_(w,X,Se,"\u22D2","\\doublecap"),_(w,X,Se,"\u22D3","\\doublecup"),_(w,X,Se,"\u22A0","\\boxtimes",!0),_(w,X,G,"\u21E2","\\dashrightarrow",!0),_(w,X,G,"\u21E0","\\dashleftarrow",!0),_(w,X,G,"\u21C7","\\leftleftarrows",!0),_(w,X,G,"\u21C6","\\leftrightarrows",!0),_(w,X,G,"\u21DA","\\Lleftarrow",!0),_(w,X,G,"\u219E","\\twoheadleftarrow",!0),_(w,X,G,"\u21A2","\\leftarrowtail",!0),_(w,X,G,"\u21AB","\\looparrowleft",!0),_(w,X,G,"\u21CB","\\leftrightharpoons",!0),_(w,X,G,"\u21B6","\\curvearrowleft",!0),_(w,X,G,"\u21BA","\\circlearrowleft",!0),_(w,X,G,"\u21B0","\\Lsh",!0),_(w,X,G,"\u21C8","\\upuparrows",!0),_(w,X,G,"\u21BF","\\upharpoonleft",!0),_(w,X,G,"\u21C3","\\downharpoonleft",!0),_(w,X,G,"\u22B8","\\multimap",!0),_(w,X,G,"\u21AD","\\leftrightsquigarrow",!0),_(w,X,G,"\u21C9","\\rightrightarrows",!0),_(w,X,G,"\u21C4","\\rightleftarrows",!0),_(w,X,G,"\u21A0","\\twoheadrightarrow",!0),_(w,X,G,"\u21A3","\\rightarrowtail",!0),_(w,X,G,"\u21AC","\\looparrowright",!0),_(w,X,G,"\u21B7","\\curvearrowright",!0),_(w,X,G,"\u21BB","\\circlearrowright",!0),_(w,X,G,"\u21B1","\\Rsh",!0),_(w,X,G,"\u21CA","\\downdownarrows",!0),_(w,X,G,"\u21BE","\\upharpoonright",!0),_(w,X,G,"\u21C2","\\downharpoonright",!0),_(w,X,G,"\u21DD","\\rightsquigarrow",!0),_(w,X,G,"\u21DD","\\leadsto"),_(w,X,G,"\u21DB","\\Rrightarrow",!0),_(w,X,G,"\u21BE","\\restriction"),_(w,B,de,"\u2018","`"),_(w,B,de,"$","\\$"),_(ye,B,de,"$","\\$"),_(ye,B,de,"$","\\textdollar"),_(w,B,de,"%","\\%"),_(ye,B,de,"%","\\%"),_(w,B,de,"_","\\_"),_(ye,B,de,"_","\\_"),_(ye,B,de,"_","\\textunderscore"),_(w,B,de,"\u2220","\\angle",!0),_(w,B,de,"\u221E","\\infty",!0),_(w,B,de,"\u2032","\\prime"),_(w,B,de,"\u25B3","\\triangle"),_(w,B,de,"\u0393","\\Gamma",!0),_(w,B,de,"\u0394","\\Delta",!0),_(w,B,de,"\u0398","\\Theta",!0),_(w,B,de,"\u039B","\\Lambda",!0),_(w,B,de,"\u039E","\\Xi",!0),_(w,B,de,"\u03A0","\\Pi",!0),_(w,B,de,"\u03A3","\\Sigma",!0),_(w,B,de,"\u03A5","\\Upsilon",!0),_(w,B,de,"\u03A6","\\Phi",!0),_(w,B,de,"\u03A8","\\Psi",!0),_(w,B,de,"\u03A9","\\Omega",!0),_(w,B,de,"A","\u0391"),_(w,B,de,"B","\u0392"),_(w,B,de,"E","\u0395"),_(w,B,de,"Z","\u0396"),_(w,B,de,"H","\u0397"),_(w,B,de,"I","\u0399"),_(w,B,de,"K","\u039A"),_(w,B,de,"M","\u039C"),_(w,B,de,"N","\u039D"),_(w,B,de,"O","\u039F"),_(w,B,de,"P","\u03A1"),_(w,B,de,"T","\u03A4"),_(w,B,de,"X","\u03A7"),_(w,B,de,"\xAC","\\neg",!0),_(w,B,de,"\xAC","\\lnot"),_(w,B,de,"\u22A4","\\top"),_(w,B,de,"\u22A5","\\bot"),_(w,B,de,"\u2205","\\emptyset"),_(w,X,de,"\u2205","\\varnothing"),_(w,B,z,"\u03B1","\\alpha",!0),_(w,B,z,"\u03B2","\\beta",!0),_(w,B,z,"\u03B3","\\gamma",!0),_(w,B,z,"\u03B4","\\delta",!0),_(w,B,z,"\u03F5","\\epsilon",!0),_(w,B,z,"\u03B6","\\zeta",!0),_(w,B,z,"\u03B7","\\eta",!0),_(w,B,z,"\u03B8","\\theta",!0),_(w,B,z,"\u03B9","\\iota",!0),_(w,B,z,"\u03BA","\\kappa",!0),_(w,B,z,"\u03BB","\\lambda",!0),_(w,B,z,"\u03BC","\\mu",!0),_(w,B,z,"\u03BD","\\nu",!0),_(w,B,z,"\u03BE","\\xi",!0),_(w,B,z,"\u03BF","\\omicron",!0),_(w,B,z,"\u03C0","\\pi",!0),_(w,B,z,"\u03C1","\\rho",!0),_(w,B,z,"\u03C3","\\sigma",!0),_(w,B,z,"\u03C4","\\tau",!0),_(w,B,z,"\u03C5","\\upsilon",!0),_(w,B,z,"\u03D5","\\phi",!0),_(w,B,z,"\u03C7","\\chi",!0),_(w,B,z,"\u03C8","\\psi",!0),_(w,B,z,"\u03C9","\\omega",!0),_(w,B,z,"\u03B5","\\varepsilon",!0),_(w,B,z,"\u03D1","\\vartheta",!0),_(w,B,z,"\u03D6","\\varpi",!0),_(w,B,z,"\u03F1","\\varrho",!0),_(w,B,z,"\u03C2","\\varsigma",!0),_(w,B,z,"\u03C6","\\varphi",!0),_(w,B,Se,"\u2217","*"),_(w,B,Se,"+","+"),_(w,B,Se,"\u2212","-"),_(w,B,Se,"\u22C5","\\cdot",!0),_(w,B,Se,"\u2218","\\circ"),_(w,B,Se,"\xF7","\\div",!0),_(w,B,Se,"\xB1","\\pm",!0),_(w,B,Se,"\xD7","\\times",!0),_(w,B,Se,"\u2229","\\cap",!0),_(w,B,Se,"\u222A","\\cup",!0),_(w,B,Se,"\u2216","\\setminus"),_(w,B,Se,"\u2227","\\land"),_(w,B,Se,"\u2228","\\lor"),_(w,B,Se,"\u2227","\\wedge",!0),_(w,B,Se,"\u2228","\\vee",!0),_(w,B,de,"\u221A","\\surd"),_(w,B,be,"(","("),_(w,B,be,"[","["),_(w,B,be,"\u27E8","\\langle",!0),_(w,B,be,"\u2223","\\lvert"),_(w,B,be,"\u2225","\\lVert"),_(w,B,Ne,")",")"),_(w,B,Ne,"]","]"),_(w,B,Ne,"?","?"),_(w,B,Ne,"!","!"),_(w,B,Ne,"\u27E9","\\rangle",!0),_(w,B,Ne,"\u2223","\\rvert"),_(w,B,Ne,"\u2225","\\rVert"),_(w,B,G,"=","="),_(w,B,G,"<","<"),_(w,B,G,">",">"),_(w,B,G,":",":"),_(w,B,G,"\u2248","\\approx",!0),_(w,B,G,"\u2245","\\cong",!0),_(w,B,G,"\u2265","\\ge"),_(w,B,G,"\u2265","\\geq",!0),_(w,B,G,"\u2190","\\gets"),_(w,B,G,">","\\gt"),_(w,B,G,"\u2208","\\in",!0),_(w,B,G,"\uE020","\\@not"),_(w,B,G,"\u2282","\\subset",!0),_(w,B,G,"\u2283","\\supset",!0),_(w,B,G,"\u2286","\\subseteq",!0),_(w,B,G,"\u2287","\\supseteq",!0),_(w,X,G,"\u2288","\\nsubseteq",!0),_(w,X,G,"\u2289","\\nsupseteq",!0),_(w,B,G,"\u22A8","\\models"),_(w,B,G,"\u2190","\\leftarrow",!0),_(w,B,G,"\u2264","\\le"),_(w,B,G,"\u2264","\\leq",!0),_(w,B,G,"<","\\lt"),_(w,B,G,"\u2192","\\rightarrow",!0),_(w,B,G,"\u2192","\\to"),_(w,X,G,"\u2271","\\ngeq",!0),_(w,X,G,"\u2270","\\nleq",!0),_(w,B,ht,"\xA0","\\ "),_(w,B,ht,"\xA0","~"),_(w,B,ht,"\xA0","\\space"),_(w,B,ht,"\xA0","\\nobreakspace"),_(ye,B,ht,"\xA0","\\ "),_(ye,B,ht,"\xA0","~"),_(ye,B,ht,"\xA0","\\space"),_(ye,B,ht,"\xA0","\\nobreakspace"),_(w,B,ht,null,"\\nobreak"),_(w,B,ht,null,"\\allowbreak"),_(w,B,ke,",",","),_(w,B,ke,";",";"),_(w,X,Se,"\u22BC","\\barwedge",!0),_(w,X,Se,"\u22BB","\\veebar",!0),_(w,B,Se,"\u2299","\\odot",!0),_(w,B,Se,"\u2295","\\oplus",!0),_(w,B,Se,"\u2297","\\otimes",!0),_(w,B,de,"\u2202","\\partial",!0),_(w,B,Se,"\u2298","\\oslash",!0),_(w,X,Se,"\u229A","\\circledcirc",!0),_(w,X,Se,"\u22A1","\\boxdot",!0),_(w,B,Se,"\u25B3","\\bigtriangleup"),_(w,B,Se,"\u25BD","\\bigtriangledown"),_(w,B,Se,"\u2020","\\dagger"),_(w,B,Se,"\u22C4","\\diamond"),_(w,B,Se,"\u22C6","\\star"),_(w,B,Se,"\u25C3","\\triangleleft"),_(w,B,Se,"\u25B9","\\triangleright"),_(w,B,be,"{","\\{"),_(ye,B,de,"{","\\{"),_(ye,B,de,"{","\\textbraceleft"),_(w,B,Ne,"}","\\}"),_(ye,B,de,"}","\\}"),_(ye,B,de,"}","\\textbraceright"),_(w,B,be,"{","\\lbrace"),_(w,B,Ne,"}","\\rbrace"),_(w,B,be,"[","\\lbrack"),_(ye,B,de,"[","\\lbrack"),_(w,B,Ne,"]","\\rbrack"),_(ye,B,de,"]","\\rbrack"),_(w,B,be,"(","\\lparen"),_(w,B,Ne,")","\\rparen"),_(ye,B,de,"<","\\textless"),_(ye,B,de,">","\\textgreater"),_(w,B,be,"\u230A","\\lfloor",!0),_(w,B,Ne,"\u230B","\\rfloor",!0),_(w,B,be,"\u2308","\\lceil",!0),_(w,B,Ne,"\u2309","\\rceil",!0),_(w,B,de,"\\","\\backslash"),_(w,B,de,"\u2223","|"),_(w,B,de,"\u2223","\\vert"),_(ye,B,de,"|","\\textbar"),_(w,B,de,"\u2225","\\|"),_(w,B,de,"\u2225","\\Vert"),_(ye,B,de,"\u2225","\\textbardbl"),_(ye,B,de,"~","\\textasciitilde"),_(ye,B,de,"\\","\\textbackslash"),_(ye,B,de,"^","\\textasciicircum"),_(w,B,G,"\u2191","\\uparrow",!0),_(w,B,G,"\u21D1","\\Uparrow",!0),_(w,B,G,"\u2193","\\downarrow",!0),_(w,B,G,"\u21D3","\\Downarrow",!0),_(w,B,G,"\u2195","\\updownarrow",!0),_(w,B,G,"\u21D5","\\Updownarrow",!0),_(w,B,Z,"\u2210","\\coprod"),_(w,B,Z,"\u22C1","\\bigvee"),_(w,B,Z,"\u22C0","\\bigwedge"),_(w,B,Z,"\u2A04","\\biguplus"),_(w,B,Z,"\u22C2","\\bigcap"),_(w,B,Z,"\u22C3","\\bigcup"),_(w,B,Z,"\u222B","\\int"),_(w,B,Z,"\u222B","\\intop"),_(w,B,Z,"\u222C","\\iint"),_(w,B,Z,"\u222D","\\iiint"),_(w,B,Z,"\u220F","\\prod"),_(w,B,Z,"\u2211","\\sum"),_(w,B,Z,"\u2A02","\\bigotimes"),_(w,B,Z,"\u2A01","\\bigoplus"),_(w,B,Z,"\u2A00","\\bigodot"),_(w,B,Z,"\u222E","\\oint"),_(w,B,Z,"\u222F","\\oiint"),_(w,B,Z,"\u2230","\\oiiint"),_(w,B,Z,"\u2A06","\\bigsqcup"),_(w,B,Z,"\u222B","\\smallint"),_(ye,B,ze,"\u2026","\\textellipsis"),_(w,B,ze,"\u2026","\\mathellipsis"),_(ye,B,ze,"\u2026","\\ldots",!0),_(w,B,ze,"\u2026","\\ldots",!0),_(w,B,ze,"\u22EF","\\@cdots",!0),_(w,B,ze,"\u22F1","\\ddots",!0),_(w,B,de,"\u22EE","\\varvdots"),_(w,B,lt,"\u02CA","\\acute"),_(w,B,lt,"\u02CB","\\grave"),_(w,B,lt,"\xA8","\\ddot"),_(w,B,lt,"~","\\tilde"),_(w,B,lt,"\u02C9","\\bar"),_(w,B,lt,"\u02D8","\\breve"),_(w,B,lt,"\u02C7","\\check"),_(w,B,lt,"^","\\hat"),_(w,B,lt,"\u20D7","\\vec"),_(w,B,lt,"\u02D9","\\dot"),_(w,B,lt,"\u02DA","\\mathring"),_(w,B,z,"\u0131","\\imath",!0),_(w,B,z,"\u0237","\\jmath",!0),_(ye,B,de,"\u0131","\\i",!0),_(ye,B,de,"\u0237","\\j",!0),_(ye,B,de,"\xDF","\\ss",!0),_(ye,B,de,"\xE6","\\ae",!0),_(ye,B,de,"\xE6","\\ae",!0),_(ye,B,de,"\u0153","\\oe",!0),_(ye,B,de,"\xF8","\\o",!0),_(ye,B,de,"\xC6","\\AE",!0),_(ye,B,de,"\u0152","\\OE",!0),_(ye,B,de,"\xD8","\\O",!0),_(ye,B,lt,"\u02CA","\\'"),_(ye,B,lt,"\u02CB","\\`"),_(ye,B,lt,"\u02C6","\\^"),_(ye,B,lt,"\u02DC","\\~"),_(ye,B,lt,"\u02C9","\\="),_(ye,B,lt,"\u02D8","\\u"),_(ye,B,lt,"\u02D9","\\."),_(ye,B,lt,"\u02DA","\\r"),_(ye,B,lt,"\u02C7","\\v"),_(ye,B,lt,"\xA8",'\\"'),_(ye,B,lt,"\u02DD","\\H"),_(ye,B,lt,"\u25EF","\\textcircled");var At={"--":!0,"---":!0,"``":!0,"''":!0};_(ye,B,de,"\u2013","--"),_(ye,B,de,"\u2013","\\textendash"),_(ye,B,de,"\u2014","---"),_(ye,B,de,"\u2014","\\textemdash"),_(ye,B,de,"\u2018","`"),_(ye,B,de,"\u2018","\\textquoteleft"),_(ye,B,de,"\u2019","'"),_(ye,B,de,"\u2019","\\textquoteright"),_(ye,B,de,"\u201C","``"),_(ye,B,de,"\u201C","\\textquotedblleft"),_(ye,B,de,"\u201D","''"),_(ye,B,de,"\u201D","\\textquotedblright"),_(w,B,de,"\xB0","\\degree",!0),_(ye,B,de,"\xB0","\\degree"),_(ye,B,de,"\xB0","\\textdegree",!0),_(w,B,z,"\xA3","\\pounds"),_(w,B,z,"\xA3","\\mathsterling",!0),_(ye,B,z,"\xA3","\\pounds"),_(ye,B,z,"\xA3","\\textsterling",!0),_(w,X,de,"\u2720","\\maltese"),_(ye,X,de,"\u2720","\\maltese"),_(ye,B,ht,"\xA0","\\ "),_(ye,B,ht,"\xA0"," "),_(ye,B,ht,"\xA0","~");for(var $t='0123456789/@."',Kt=0;Kt<$t.length;Kt++){var ar=$t.charAt(Kt);_(w,B,de,ar,ar)}for(var Qt='0123456789!@*()-=+[]<>|";:?/.,',Zt=0;Zt<Qt.length;Zt++){var Sr=Qt.charAt(Zt);_(ye,B,de,Sr,Sr)}for(var Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Yt=0;Yt<Nr.length;Yt++){var wr=Nr.charAt(Yt);_(w,B,z,wr,wr),_(ye,B,de,wr,wr)}_(w,X,de,"C","\u2102"),_(ye,X,de,"C","\u2102"),_(w,X,de,"H","\u210D"),_(ye,X,de,"H","\u210D"),_(w,X,de,"N","\u2115"),_(ye,X,de,"N","\u2115"),_(w,X,de,"P","\u2119"),_(ye,X,de,"P","\u2119"),_(w,X,de,"Q","\u211A"),_(ye,X,de,"Q","\u211A"),_(w,X,de,"R","\u211D"),_(ye,X,de,"R","\u211D"),_(w,X,de,"Z","\u2124"),_(ye,X,de,"Z","\u2124"),_(w,B,z,"h","\u210E"),_(ye,B,z,"h","\u210E");for(var zt="",Rt=0;Rt<Nr.length;Rt++){var kt=Nr.charAt(Rt);zt=String.fromCharCode(55349,56320+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56372+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56424+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56580+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56736+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56788+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56840+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56944+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),Rt<26&&(zt=String.fromCharCode(55349,56632+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt),zt=String.fromCharCode(55349,56476+Rt),_(w,B,z,kt,zt),_(ye,B,de,kt,zt))}zt="\u{1D55C}",_(w,B,z,"k",zt),_(ye,B,de,"k",zt);for(var qt=0;qt<10;qt++){var or=qt.toString();zt=String.fromCharCode(55349,57294+qt),_(w,B,z,or,zt),_(ye,B,de,or,zt),zt=String.fromCharCode(55349,57314+qt),_(w,B,z,or,zt),_(ye,B,de,or,zt),zt=String.fromCharCode(55349,57324+qt),_(w,B,z,or,zt),_(ye,B,de,or,zt),zt=String.fromCharCode(55349,57334+qt),_(w,B,z,or,zt),_(ye,B,de,or,zt)}for(var Dr="\xC7\xD0\xDE\xE7\xFE",nn=0;nn<Dr.length;nn++){var tn=Dr.charAt(nn);_(w,B,z,tn,tn),_(ye,B,de,tn,tn)}_(ye,B,de,"\xF0","\xF0"),_(ye,B,de,"\u2013","\u2013"),_(ye,B,de,"\u2014","\u2014"),_(ye,B,de,"\u2018","\u2018"),_(ye,B,de,"\u2019","\u2019"),_(ye,B,de,"\u201C","\u201C"),_(ye,B,de,"\u201D","\u201D");var Yr=[["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"]],Xr=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Tr=function(u,d){var f=u.charCodeAt(0),v=u.charCodeAt(1),I=(f-55296)*1024+(v-56320)+65536,$=d==="math"?0:1;if(119808<=I&&I<120484){var fe=Math.floor((I-119808)/26);return[Yr[fe][2],Yr[fe][$]]}else if(120782<=I&&I<=120831){var Te=Math.floor((I-120782)/10);return[Xr[Te][2],Xr[Te][$]]}else{if(I===120485||I===120486)return[Yr[0][2],Yr[0][$]];if(120486<I&&I<120782)return["",""];throw new m("Unsupported character: "+u)}},vn=[[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]],Gr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Mn=function(u,d){return d.size<2?u:vn[u-1][d.size-1]},ln=function(){function U(d){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=d.style,this.color=d.color,this.size=d.size||U.BASESIZE,this.textSize=d.textSize||this.size,this.phantom=!!d.phantom,this.font=d.font||"",this.fontFamily=d.fontFamily||"",this.fontWeight=d.fontWeight||"",this.fontShape=d.fontShape||"",this.sizeMultiplier=Gr[this.size-1],this.maxSize=d.maxSize,this.minRuleThickness=d.minRuleThickness,this._fontMetrics=void 0}var u=U.prototype;return u.extend=function(f){var v={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 I in f)f.hasOwnProperty(I)&&(v[I]=f[I]);return new U(v)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:Mn(this.textSize,f)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(f){return this.size===f&&this.textSize===f?this:this.extend({style:this.style.text(),size:f,textSize:f,sizeMultiplier:Gr[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var v=Mn(U.BASESIZE,f);return this.size===v&&this.textSize===U.BASESIZE&&this.style===f?this:this.extend({style:f,size:v})},u.havingBaseSizing=function(){var f;switch(this.style.id){case 4:case 5:f=3;break;case 6:case 7:f=1;break;default:f=6}return this.extend({style:this.style.text(),size:f})},u.withColor=function(f){return this.extend({color:f})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(f){return this.extend({font:f})},u.withTextFontFamily=function(f){return this.extend({fontFamily:f,font:""})},u.withTextFontWeight=function(f){return this.extend({fontWeight:f,font:""})},u.withTextFontShape=function(f){return this.extend({fontShape:f,font:""})},u.sizingClasses=function(f){return f.size!==this.size?["sizing","reset-size"+f.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==U.BASESIZE?["sizing","reset-size"+this.size,"size"+U.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Ye(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},U}();ln.BASESIZE=6;var Rr=ln,$r={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},Br={ex:!0,em:!0,mu:!0},fn=function(u){return typeof u!="string"&&(u=u.unit),u in $r||u in Br||u==="ex"},at=function(u,d){var f;if(u.unit in $r)f=$r[u.unit]/d.fontMetrics().ptPerEm/d.sizeMultiplier;else if(u.unit==="mu")f=d.fontMetrics().cssEmPerMu;else{var v;if(d.style.isTight()?v=d.havingStyle(d.style.text()):v=d,u.unit==="ex")f=v.fontMetrics().xHeight;else if(u.unit==="em")f=v.fontMetrics().quad;else throw new m("Invalid unit: '"+u.unit+"'");v!==d&&(f*=v.sizeMultiplier/d.sizeMultiplier)}return Math.min(u.number*f,d.maxSize)},xt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Bt=function(u,d,f){return Ge[f][u]&&Ge[f][u].replace&&(u=Ge[f][u].replace),{value:u,metrics:St(u,d,f)}},Dt=function(u,d,f,v,I){var $=Bt(u,d,f),fe=$.metrics;u=$.value;var Te;if(fe){var Ke=fe.italic;(f==="text"||v&&v.font==="mathit")&&(Ke=0),Te=new J(u,fe.height,fe.depth,Ke,fe.skew,fe.width,I)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+d+"' and mode '"+f+"'")),Te=new J(u,0,0,0,0,0,I);if(v){Te.maxFontSize=v.sizeMultiplier,v.style.isTight()&&Te.classes.push("mtight");var ot=v.getColor();ot&&(Te.style.color=ot)}return Te},Lt=function(u,d,f,v){return v===void 0&&(v=[]),f.font==="boldsymbol"&&Bt(u,"Main-Bold",d).metrics?Dt(u,"Main-Bold",d,f,v.concat(["mathbf"])):u==="\\"||Ge[d][u].font==="main"?Dt(u,"Main-Regular",d,f,v):Dt(u,"AMS-Regular",d,f,v.concat(["amsrm"]))},Mt=function(u,d,f,v){return/[0-9]/.test(u.charAt(0))||V.contains(xt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},jt=function(u,d,f,v){return V.contains(xt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Vt=function(u,d,f,v){return Bt(u,"Math-BoldItalic",d).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Ar=function(u,d,f){var v=u.mode,I=u.text,$=["mord"],fe=v==="math"||v==="text"&&d.font,Te=fe?d.font:d.fontFamily;if(I.charCodeAt(0)===55349){var Ke=Tr(I,v),ot=Ke[0],yt=Ke[1];return Dt(I,ot,v,d,$.concat(yt))}else if(Te){var Ot,Ut;if(Te==="boldsymbol"||Te==="mathnormal"){var Wt=Te==="boldsymbol"?Vt(I,v,d,$):jt(I,v,d,$);Ot=Wt.fontName,Ut=[Wt.fontClass]}else V.contains(xt,I)?(Ot="Main-Italic",Ut=["mathit"]):fe?(Ot=Wr[Te].fontName,Ut=[Te]):(Ot=sn(Te,d.fontWeight,d.fontShape),Ut=[Te,d.fontWeight,d.fontShape]);if(Bt(I,Ot,v).metrics)return Dt(I,Ot,v,d,$.concat(Ut));if(At.hasOwnProperty(I)&&Ot.substr(0,10)==="Typewriter"){for(var Jt=[],hr=0;hr<I.length;hr++)Jt.push(Dt(I[hr],Ot,v,d,$.concat(Ut)));return _r(Jt)}}if(f==="mathord"){var fr=Mt(I,v,d,$);return Dt(I,fr.fontName,v,d,$.concat([fr.fontClass]))}else if(f==="textord"){var kr=Ge[v][I]&&Ge[v][I].font;if(kr==="ams"){var Hr=sn("amsrm",d.fontWeight,d.fontShape);return Dt(I,Hr,v,d,$.concat("amsrm",d.fontWeight,d.fontShape))}else if(kr==="main"||!kr){var Cn=sn("textrm",d.fontWeight,d.fontShape);return Dt(I,Cn,v,d,$.concat(d.fontWeight,d.fontShape))}else{var yn=sn(kr,d.fontWeight,d.fontShape);return Dt(I,yn,v,d,$.concat(yn,d.fontWeight,d.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},Cr=function(u,d){if(st(u.classes)!==st(d.classes)||u.skew!==d.skew||u.maxFontSize!==d.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==d.style[f])return!1;for(var v in d.style)if(d.style.hasOwnProperty(v)&&u.style[v]!==d.style[v])return!1;return!0},pn=function(u){for(var d=0;d<u.length-1;d++){var f=u[d],v=u[d+1];f instanceof J&&v instanceof J&&Cr(f,v)&&(f.text+=v.text,f.height=Math.max(f.height,v.height),f.depth=Math.max(f.depth,v.depth),f.italic=v.italic,u.splice(d+1,1),d--)}return u},vr=function(u){for(var d=0,f=0,v=0,I=0;I<u.children.length;I++){var $=u.children[I];$.height>d&&(d=$.height),$.depth>f&&(f=$.depth),$.maxFontSize>v&&(v=$.maxFontSize)}u.height=d,u.depth=f,u.maxFontSize=v},cr=function(u,d,f,v){var I=new He(u,d,f,v);return vr(I),I},Or=function(u,d,f,v){return new He(u,d,f,v)},Vr=function(u,d,f){var v=cr([u],[],d);return v.height=Math.max(f||d.fontMetrics().defaultRuleThickness,d.minRuleThickness),v.style.borderBottomWidth=v.height+"em",v.maxFontSize=1,v},qr=function(u,d,f,v){var I=new Ie(u,d,f,v);return vr(I),I},_r=function(u){var d=new Fe(u);return vr(d),d},Ir=function(u,d){return u instanceof Fe?cr([],[u],d):u},Zr=function(u){if(u.positionType==="individualShift"){for(var d=u.children,f=[d[0]],v=-d[0].shift-d[0].elem.depth,I=v,$=1;$<d.length;$++){var fe=-d[$].shift-I-d[$].elem.depth,Te=fe-(d[$-1].elem.height+d[$-1].elem.depth);I=I+fe,f.push({type:"kern",size:Te}),f.push(d[$])}return{children:f,depth:v}}var Ke;if(u.positionType==="top"){for(var ot=u.positionData,yt=0;yt<u.children.length;yt++){var Ot=u.children[yt];ot-=Ot.type==="kern"?Ot.size:Ot.elem.height+Ot.elem.depth}Ke=ot}else if(u.positionType==="bottom")Ke=-u.positionData;else{var Ut=u.children[0];if(Ut.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Ke=-Ut.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Ke=-Ut.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Ke}},jr=function(u,d){for(var f=Zr(u),v=f.children,I=f.depth,$=0,fe=0;fe<v.length;fe++){var Te=v[fe];if(Te.type==="elem"){var Ke=Te.elem;$=Math.max($,Ke.maxFontSize,Ke.height)}}$+=2;var ot=cr(["pstrut"],[]);ot.style.height=$+"em";for(var yt=[],Ot=I,Ut=I,Wt=I,Jt=0;Jt<v.length;Jt++){var hr=v[Jt];if(hr.type==="kern")Wt+=hr.size;else{var fr=hr.elem,kr=hr.wrapperClasses||[],Hr=hr.wrapperStyle||{},Cn=cr(kr,[ot,fr],void 0,Hr);Cn.style.top=-$-Wt-fr.depth+"em",hr.marginLeft&&(Cn.style.marginLeft=hr.marginLeft),hr.marginRight&&(Cn.style.marginRight=hr.marginRight),yt.push(Cn),Wt+=fr.height+fr.depth}Ot=Math.min(Ot,Wt),Ut=Math.max(Ut,Wt)}var yn=cr(["vlist"],yt);yn.style.height=Ut+"em";var Dn;if(Ot<0){var In=cr([],[]),Sn=cr(["vlist"],[In]);Sn.style.height=-Ot+"em";var ui=cr(["vlist-s"],[new J("\u200B")]);Dn=[cr(["vlist-r"],[yn,ui]),cr(["vlist-r"],[Sn])]}else Dn=[cr(["vlist-r"],[yn])];var On=cr(["vlist-t"],Dn);return Dn.length===2&&On.classes.push("vlist-t2"),On.height=Ut,On.depth=-Ot,On},Fr=function(u,d){var f=cr(["mspace"],[],d),v=at(u,d);return f.style.marginRight=v+"em",f},sn=function(u,d,f){var v="";switch(u){case"amsrm":v="AMS";break;case"textrm":v="Main";break;case"textsf":v="SansSerif";break;case"texttt":v="Typewriter";break;default:v=u}var I;return d==="textbf"&&f==="textit"?I="BoldItalic":d==="textbf"?I="Bold":d==="textit"?I="Italic":I="Regular",v+"-"+I},Wr={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"}},Qr={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,d){var f=Qr[u],v=f[0],I=f[1],$=f[2],fe=new Le(v),Te=new me([fe],{width:I+"em",height:$+"em",style:"width:"+I+"em",viewBox:"0 0 "+1e3*I+" "+1e3*$,preserveAspectRatio:"xMinYMin"}),Ke=Or(["overlay"],[Te],d);return Ke.height=$,Ke.style.height=$+"em",Ke.style.width=I+"em",Ke},bt={fontMap:Wr,makeSymbol:Dt,mathsym:Lt,makeSpan:cr,makeSvgSpan:Or,makeLineSpan:Vr,makeAnchor:qr,makeFragment:_r,wrapFragment:Ir,makeVList:jr,makeOrd:Ar,makeGlue:Fr,staticSvg:Rn,svgData:Qr,tryCombineChars:pn};function pr(U,u){var d=Kr(U,u);if(!d)throw new Error("Expected node of type "+u+", but got "+(U?"node of type "+U.type:String(U)));return d}function Kr(U,u){return U&&U.type===u?U:null}function wn(U,u){var d=Bn(U,u);if(!d)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(U?U.type==="atom"?"atom of family "+U.family:"node of type "+U.type:String(U)));return d}function Bn(U,u){return U&&U.type==="atom"&&U.family===u?U:null}function kn(U){var u=xn(U);if(!u)throw new Error("Expected node of symbol group type, but got "+(U?"node of type "+U.type:String(U)));return u}function xn(U){return U&&(U.type==="atom"||dt.hasOwnProperty(U.type))?U:null}var gr={number:3,unit:"mu"},Ur={number:4,unit:"mu"},Tn={number:5,unit:"mu"},an={mord:{mop:gr,mbin:Ur,mrel:Tn,minner:gr},mop:{mord:gr,mop:gr,mrel:Tn,minner:gr},mbin:{mord:Ur,mop:Ur,mopen:Ur,minner:Ur},mrel:{mord:Tn,mop:Tn,mopen:Tn,minner:Tn},mopen:{},mclose:{mop:gr,mbin:Ur,mrel:Tn,minner:gr},mpunct:{mord:gr,mop:gr,mrel:Tn,mopen:gr,mclose:gr,mpunct:gr,minner:gr},minner:{mord:gr,mop:gr,mbin:Ur,mrel:Tn,mopen:gr,mpunct:gr,minner:gr}},Jr={mord:{mop:gr},mop:{mord:gr,mop:gr},mbin:{},mrel:{},mopen:{},mclose:{mop:gr},mpunct:{},minner:{mop:gr}},ci={},jn={},Ln={};function nr(U){for(var u=U.type,d=U.names,f=U.props,v=U.handler,I=U.htmlBuilder,$=U.mathmlBuilder,fe={type:u,numArgs:f.numArgs,argTypes:f.argTypes,greediness:f.greediness===void 0?1:f.greediness,allowedInText:!!f.allowedInText,allowedInMath:f.allowedInMath===void 0?!0:f.allowedInMath,numOptionalArgs:f.numOptionalArgs||0,infix:!!f.infix,handler:v},Te=0;Te<d.length;++Te)ci[d[Te]]=fe;u&&(I&&(jn[u]=I),$&&(Ln[u]=$))}function un(U){var u=U.type,d=U.htmlBuilder,f=U.mathmlBuilder;nr({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:d,mathmlBuilder:f})}var on=function(u){var d=Kr(u,"ordgroup");return d?d.body:[u]},Kn=bt.makeSpan,Jn=["leftmost","mbin","mopen","mrel","mop","mpunct"],ei=["rightmost","mrel","mclose","mpunct"],Pn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},Hn={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},cn=function(u,d,f,v){v===void 0&&(v=[null,null]);for(var I=[],$=0;$<u.length;$++){var fe=Pr(u[$],d);if(fe instanceof Fe){var Te=fe.children;I.push.apply(I,Te)}else I.push(fe)}if(!f)return I;var Ke=d;if(u.length===1){var ot=Kr(u[0],"sizing")||Kr(u[0],"styling");ot&&(ot.type==="sizing"?Ke=d.havingSize(ot.size):ot.type==="styling"&&(Ke=d.havingStyle(Pn[ot.style])))}var yt=Kn([v[0]||"leftmost"],[],d),Ot=Kn([v[1]||"rightmost"],[],d);return hi(I,function(Ut,Wt){var Jt=Wt.classes[0],hr=Ut.classes[0];Jt==="mbin"&&V.contains(ei,hr)?Wt.classes[0]="mord":hr==="mbin"&&V.contains(Jn,Jt)&&(Ut.classes[0]="mord")},{node:yt},Ot),hi(I,function(Ut,Wt){var Jt=ti(Wt),hr=ti(Ut),fr=Jt&&hr?Ut.hasClass("mtight")?Jr[Jt][hr]:an[Jt][hr]:null;if(fr)return bt.makeGlue(fr,Ke)},{node:yt},Ot),I},hi=function U(u,d,f,v){v&&u.push(v);for(var I=0;I<u.length;I++){var $=u[I],fe=Un($);if(fe){U(fe.children,d,f);continue}if($.classes[0]!=="mspace"){var Te=d($,f.node);Te&&(f.insertAfter?f.insertAfter(Te):(u.unshift(Te),I++)),f.node=$,f.insertAfter=function(Ke){return function(ot){u.splice(Ke+1,0,ot),I++}}(I)}}v&&u.pop()},Un=function(u){return u instanceof Fe||u instanceof Ie?u:null},Yn=function U(u,d){var f=Un(u);if(f){var v=f.children;if(v.length){if(d==="right")return U(v[v.length-1],"right");if(d==="left")return U(v[0],"left")}}return u},ti=function(u,d){return u?(d&&(u=Yn(u,d)),Hn[u.classes[0]]||null):null},ri=function(u,d){var f=["nulldelimiter"].concat(u.baseSizingClasses());return Kn(d.concat(f))},Pr=function(u,d,f){if(!u)return Kn();if(jn[u.type]){var v=jn[u.type](u,d);if(f&&d.size!==f.size){v=Kn(d.sizingClasses(f),[v],d);var I=d.sizeMultiplier/f.sizeMultiplier;v.height*=I,v.depth*=I}return v}else throw new m("Got group of unknown type: '"+u.type+"'")};function di(U,u){var d=Kn(["base"],U,u),f=Kn(["strut"]);return f.style.height=d.height+d.depth+"em",f.style.verticalAlign=-d.depth+"em",d.children.unshift(f),d}function fi(U,u){var d=null;U.length===1&&U[0].type==="tag"&&(d=U[0].tag,U=U[0].body);for(var f=cn(U,u,!0),v=[],I=[],$=0;$<f.length;$++)if(I.push(f[$]),f[$].hasClass("mbin")||f[$].hasClass("mrel")||f[$].hasClass("allowbreak")){for(var fe=!1;$<f.length-1&&f[$+1].hasClass("mspace")&&!f[$+1].hasClass("newline");)$++,I.push(f[$]),f[$].hasClass("nobreak")&&(fe=!0);fe||(v.push(di(I,u)),I=[])}else f[$].hasClass("newline")&&(I.pop(),I.length>0&&(v.push(di(I,u)),I=[]),v.push(f[$]));I.length>0&&v.push(di(I,u));var Te;d&&(Te=di(cn(d,u,!0)),Te.classes=["tag"],v.push(Te));var Ke=Kn(["katex-html"],v);if(Ke.setAttribute("aria-hidden","true"),Te){var ot=Te.children[0];ot.style.height=Ke.height+Ke.depth+"em",ot.style.verticalAlign=-Ke.depth+"em"}return Ke}function ii(U){return new Fe(U)}var Nn=function(){function U(d,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=d,this.attributes={},this.children=f||[]}var u=U.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.getAttribute=function(f){return this.attributes[f]},u.toNode=function(){var f=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&f.setAttribute(v,this.attributes[v]);for(var I=0;I<this.children.length;I++)f.appendChild(this.children[I].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+'="',f+=V.escape(this.attributes[v]),f+='"');f+=">";for(var I=0;I<this.children.length;I++)f+=this.children[I].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},U}(),br=function(){function U(d){this.text=void 0,this.text=d}var u=U.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return V.escape(this.toText())},u.toText=function(){return this.text},U}(),Ii=function(){function U(d){this.width=void 0,this.character=void 0,this.width=d,d>=.05555&&d<=.05556?this.character="\u200A":d>=.1666&&d<=.1667?this.character="\u2009":d>=.2222&&d<=.2223?this.character="\u2005":d>=.2777&&d<=.2778?this.character="\u2005\u200A":d>=-.05556&&d<=-.05555?this.character="\u200A\u2063":d>=-.1667&&d<=-.1666?this.character="\u2009\u2063":d>=-.2223&&d<=-.2222?this.character="\u205F\u2063":d>=-.2778&&d<=-.2777?this.character="\u2005\u2063":this.character=null}var u=U.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var f=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return f.setAttribute("width",this.width+"em"),f},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},U}(),Ht={MathNode:Nn,TextNode:br,SpaceNode:Ii,newDocumentFragment:ii},$n=function(u,d,f){return Ge[d][u]&&Ge[d][u].replace&&u.charCodeAt(0)!==55349&&!(At.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Ge[d][u].replace),new Ht.TextNode(u)},Ri=function(u){return u.length===1?u[0]:new Ht.MathNode("mrow",u)},Ei=function(u,d){if(d.fontFamily==="texttt")return"monospace";if(d.fontFamily==="textsf")return d.fontShape==="textit"&&d.fontWeight==="textbf"?"sans-serif-bold-italic":d.fontShape==="textit"?"sans-serif-italic":d.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(d.fontShape==="textit"&&d.fontWeight==="textbf")return"bold-italic";if(d.fontShape==="textit")return"italic";if(d.fontWeight==="textbf")return"bold";var f=d.font;if(!f||f==="mathnormal")return null;var v=u.mode;if(f==="mathit")return"italic";if(f==="boldsymbol")return"bold-italic";if(f==="mathbf")return"bold";if(f==="mathbb")return"double-struck";if(f==="mathfrak")return"fraktur";if(f==="mathscr"||f==="mathcal")return"script";if(f==="mathsf")return"sans-serif";if(f==="mathtt")return"monospace";var I=u.text;if(V.contains(["\\imath","\\jmath"],I))return null;Ge[v][I]&&Ge[v][I].replace&&(I=Ge[v][I].replace);var $=bt.fontMap[f].fontName;return St(I,$,v)?bt.fontMap[f].variant:null},zn=function(u,d,f){if(u.length===1){var v=xr(u[0],d);return f&&v instanceof Nn&&v.type==="mo"&&(v.setAttribute("lspace","0em"),v.setAttribute("rspace","0em")),[v]}for(var I=[],$,fe=0;fe<u.length;fe++){var Te=xr(u[fe],d);if(Te instanceof Nn&&$ instanceof Nn){if(Te.type==="mtext"&&$.type==="mtext"&&Te.getAttribute("mathvariant")===$.getAttribute("mathvariant")){var Ke;(Ke=$.children).push.apply(Ke,Te.children);continue}else if(Te.type==="mn"&&$.type==="mn"){var ot;(ot=$.children).push.apply(ot,Te.children);continue}else if(Te.type==="mi"&&Te.children.length===1&&$.type==="mn"){var yt=Te.children[0];if(yt instanceof br&&yt.text==="."){var Ot;(Ot=$.children).push.apply(Ot,Te.children);continue}}else if($.type==="mi"&&$.children.length===1){var Ut=$.children[0];if(Ut instanceof br&&Ut.text==="\u0338"&&(Te.type==="mo"||Te.type==="mi"||Te.type==="mn")){var Wt=Te.children[0];Wt instanceof br&&Wt.text.length>0&&(Wt.text=Wt.text.slice(0,1)+"\u0338"+Wt.text.slice(1),I.pop())}}}I.push(Te),$=Te}return I},qn=function(u,d,f){return Ri(zn(u,d,f))},xr=function(u,d){if(!u)return new Ht.MathNode("mrow");if(Ln[u.type]){var f=Ln[u.type](u,d);return f}else throw new m("Got group of unknown type: '"+u.type+"'")};function Gn(U,u,d,f){var v=zn(U,d),I;v.length===1&&v[0]instanceof Nn&&V.contains(["mrow","mtable"],v[0].type)?I=v[0]:I=new Ht.MathNode("mrow",v);var $=new Ht.MathNode("annotation",[new Ht.TextNode(u)]);$.setAttribute("encoding","application/x-tex");var fe=new Ht.MathNode("semantics",[I,$]),Te=new Ht.MathNode("math",[fe]);Te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ke=f?"katex":"katex-mathml";return bt.makeSpan([Ke],[Te])}var si=function(u){return new Rr({style:u.displayMode?x.DISPLAY:x.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},Li=function(u,d){if(d.displayMode){var f=["katex-display"];d.leqno&&f.push("leqno"),d.fleqn&&f.push("fleqn"),u=bt.makeSpan(f,[u])}return u},Fn=function(u,d,f){var v=si(f),I;if(f.output==="mathml")return Gn(u,d,v,!0);if(f.output==="html"){var $=fi(u,v);I=bt.makeSpan(["katex"],[$])}else{var fe=Gn(u,d,v,!1),Te=fi(u,v);I=bt.makeSpan(["katex"],[fe,Te])}return Li(I,f)},An=function(u,d,f){var v=si(f),I=fi(u,v),$=bt.makeSpan(["katex"],[I]);return Li($,f)},Xn=Fn,Qn={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"},Si=function(u){var d=new Ht.MathNode("mo",[new Ht.TextNode(Qn[u.substr(1)])]);return d.setAttribute("stretchy","true"),d},pi={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]},ji=function(u){return u.type==="ordgroup"?u.body.length:1},Xi=function(u,d){function f(){var Te=4e5,Ke=u.label.substr(1);if(V.contains(["widehat","widecheck","widetilde","utilde"],Ke)){var ot=u,yt=ji(ot.base),Ot,Ut,Wt;if(yt>5)Ke==="widehat"||Ke==="widecheck"?(Ot=420,Te=2364,Wt=.42,Ut=Ke+"4"):(Ot=312,Te=2340,Wt=.34,Ut="tilde4");else{var Jt=[1,1,2,2,3,3][yt];Ke==="widehat"||Ke==="widecheck"?(Te=[0,1062,2364,2364,2364][Jt],Ot=[0,239,300,360,420][Jt],Wt=[0,.24,.3,.3,.36,.42][Jt],Ut=Ke+Jt):(Te=[0,600,1033,2339,2340][Jt],Ot=[0,260,286,306,312][Jt],Wt=[0,.26,.286,.3,.306,.34][Jt],Ut="tilde"+Jt)}var hr=new Le(Ut),fr=new me([hr],{width:"100%",height:Wt+"em",viewBox:"0 0 "+Te+" "+Ot,preserveAspectRatio:"none"});return{span:bt.makeSvgSpan([],[fr],d),minWidth:0,height:Wt}}else{var kr=[],Hr=pi[Ke],Cn=Hr[0],yn=Hr[1],Dn=Hr[2],In=Dn/1e3,Sn=Cn.length,ui,On;if(Sn===1){var ut=Hr[3];ui=["hide-tail"],On=[ut]}else if(Sn===2)ui=["halfarrow-left","halfarrow-right"],On=["xMinYMin","xMaxYMin"];else if(Sn===3)ui=["brace-left","brace-center","brace-right"],On=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+Sn+" children.");for(var Ci=0;Ci<Sn;Ci++){var Wi=new Le(Cn[Ci]),Ui=new me([Wi],{width:"400em",height:In+"em",viewBox:"0 0 "+Te+" "+Dn,preserveAspectRatio:On[Ci]+" slice"}),Vn=bt.makeSvgSpan([ui[Ci]],[Ui],d);if(Sn===1)return{span:Vn,minWidth:yn,height:In};Vn.style.height=In+"em",kr.push(Vn)}return{span:bt.makeSpan(["stretchy"],kr,d),minWidth:yn,height:In}}}var v=f(),I=v.span,$=v.minWidth,fe=v.height;return I.height=fe,I.style.height=fe+"em",$>0&&(I.style.minWidth=$+"em"),I},Mi=function(u,d,f,v){var I,$=u.height+u.depth+2*f;if(/fbox|color/.test(d)){if(I=bt.makeSpan(["stretchy",d],[],v),d==="fbox"){var fe=v.color&&v.getColor();fe&&(I.style.borderColor=fe)}}else{var Te=[];/^[bx]cancel$/.test(d)&&Te.push(new We({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(d)&&Te.push(new We({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ke=new me(Te,{width:"100%",height:$+"em"});I=bt.makeSvgSpan([],[Ke],v)}return I.height=$,I.style.height=$+"em",I},mi={encloseSpan:Mi,mathMLnode:Si,svgSpan:Xi},ir=function(u,d){var f,v,I=Kr(u,"supsub"),$;I?(v=pr(I.base,"accent"),f=v.base,I.base=f,$=et(Pr(I,d)),I.base=v):(v=pr(u,"accent"),f=v.base);var fe=Pr(f,d.havingCrampedStyle()),Te=v.isShifty&&V.isCharacterBox(f),Ke=0;if(Te){var ot=V.getBaseElem(f),yt=Pr(ot,d.havingCrampedStyle());Ke=Je(yt).skew}var Ot=Math.min(fe.height,d.fontMetrics().xHeight),Ut;if(v.isStretchy)Ut=mi.svgSpan(v,d),Ut=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"elem",elem:Ut,wrapperClasses:["svg-align"],wrapperStyle:Ke>0?{width:"calc(100% - "+2*Ke+"em)",marginLeft:2*Ke+"em"}:void 0}]},d);else{var Wt,Jt;v.label==="\\vec"?(Wt=bt.staticSvg("vec",d),Jt=bt.svgData.vec[1]):(Wt=bt.makeOrd({mode:v.mode,text:v.label},d,"textord"),Wt=Je(Wt),Wt.italic=0,Jt=Wt.width),Ut=bt.makeSpan(["accent-body"],[Wt]);var hr=v.label==="\\textcircled";hr&&(Ut.classes.push("accent-full"),Ot=fe.height);var fr=Ke;hr||(fr-=Jt/2),Ut.style.left=fr+"em",v.label==="\\textcircled"&&(Ut.style.top=".2em"),Ut=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"kern",size:-Ot},{type:"elem",elem:Ut}]},d)}var kr=bt.makeSpan(["mord","accent"],[Ut],d);return $?($.children[0]=kr,$.height=Math.max(kr.height,$.height),$.classes[0]="mord",$):kr},Er=function(u,d){var f=u.isStretchy?mi.mathMLnode(u.label):new Ht.MathNode("mo",[$n(u.label,u.mode)]),v=new Ht.MathNode("mover",[xr(u.base,d),f]);return v.setAttribute("accent","true"),v},hn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(U){return"\\"+U}).join("|"));nr({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,d){var f=d[0],v=!hn.test(u.funcName),I=!v||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:v,isShifty:I,base:f}},htmlBuilder:ir,mathmlBuilder:Er}),nr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=d[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:ir,mathmlBuilder:Er}),nr({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];return{type:"accentUnder",mode:f.mode,label:v,base:I}},htmlBuilder:function(u,d){var f=Pr(u.base,d),v=mi.svgSpan(u,d),I=u.label==="\\utilde"?.12:0,$=bt.makeVList({positionType:"bottom",positionData:v.height+I,children:[{type:"elem",elem:v,wrapperClasses:["svg-align"]},{type:"kern",size:I},{type:"elem",elem:f}]},d);return bt.makeSpan(["mord","accentunder"],[$],d)},mathmlBuilder:function(u,d){var f=mi.mathMLnode(u.label),v=new Ht.MathNode("munder",[xr(u.base,d),f]);return v.setAttribute("accentunder","true"),v}});var Lr=function(u){var d=new Ht.MathNode("mpadded",u?[u]:[]);return d.setAttribute("width","+0.6em"),d.setAttribute("lspace","0.3em"),d};nr({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,d,f){var v=u.parser,I=u.funcName;return{type:"xArrow",mode:v.mode,label:I,body:d[0],below:f[0]}},htmlBuilder:function(u,d){var f=d.style,v=d.havingStyle(f.sup()),I=bt.wrapFragment(Pr(u.body,v,d),d);I.classes.push("x-arrow-pad");var $;u.below&&(v=d.havingStyle(f.sub()),$=bt.wrapFragment(Pr(u.below,v,d),d),$.classes.push("x-arrow-pad"));var fe=mi.svgSpan(u,d),Te=-d.fontMetrics().axisHeight+.5*fe.height,Ke=-d.fontMetrics().axisHeight-.5*fe.height-.111;(I.depth>.25||u.label==="\\xleftequilibrium")&&(Ke-=I.depth);var ot;if($){var yt=-d.fontMetrics().axisHeight+$.height+.5*fe.height+.111;ot=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Ke},{type:"elem",elem:fe,shift:Te},{type:"elem",elem:$,shift:yt}]},d)}else ot=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Ke},{type:"elem",elem:fe,shift:Te}]},d);return ot.children[0].children[0].children[1].classes.push("svg-align"),bt.makeSpan(["mrel","x-arrow"],[ot],d)},mathmlBuilder:function(u,d){var f=mi.mathMLnode(u.label),v;if(u.body){var I=Lr(xr(u.body,d));if(u.below){var $=Lr(xr(u.below,d));v=new Ht.MathNode("munderover",[f,$,I])}else v=new Ht.MathNode("mover",[f,I])}else if(u.below){var fe=Lr(xr(u.below,d));v=new Ht.MathNode("munder",[f,fe])}else v=Lr(),v=new Ht.MathNode("mover",[f,v]);return v}}),nr({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){for(var f=u.parser,v=pr(d[0],"ordgroup"),I=v.body,$="",fe=0;fe<I.length;fe++){var Te=pr(I[fe],"textord");$+=Te.text}var Ke=parseInt($);if(isNaN(Ke))throw new m("\\@char has non-numeric argument "+$);return{type:"textord",mode:f.mode,text:String.fromCharCode(Ke)}}});var zr=function(u,d){var f=cn(u.body,d.withColor(u.color),!1);return bt.makeFragment(f)},wi=function(u,d){var f=zn(u.body,d.withColor(u.color)),v=new Ht.MathNode("mstyle",f);return v.setAttribute("mathcolor",u.color),v};nr({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,d){var f=u.parser,v=pr(d[0],"color-token").color,I=d[1];return{type:"color",mode:f.mode,color:v,body:on(I)}},htmlBuilder:zr,mathmlBuilder:wi}),nr({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,d){var f=u.parser,v=u.breakOnTokenText,I=pr(d[0],"color-token").color;f.gullet.macros.set("\\current@color",I);var $=f.parseExpression(!0,v);return{type:"color",mode:f.mode,color:I,body:$}},htmlBuilder:zr,mathmlBuilder:wi}),nr({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d,f){var v=u.parser,I=u.funcName,$=f[0],fe=I==="\\cr",Te=!1;return fe||(v.settings.displayMode&&v.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Te=!1:Te=!0),{type:"cr",mode:v.mode,newLine:Te,newRow:fe,size:$&&pr($,"size").value}},htmlBuilder:function(u,d){if(u.newRow)throw new m("\\cr valid only within a tabular/array environment");var f=bt.makeSpan(["mspace"],[],d);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=at(u.size,d)+"em")),f},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",at(u.size,d)+"em")),f}});var Wn=function(u,d,f){var v=Ge.math[u]&&Ge.math[u].replace,I=St(v||u,d,f);if(!I)throw new Error("Unsupported symbol "+u+" and font size "+d+".");return I},ki=function(u,d,f,v){var I=f.havingBaseStyle(d),$=bt.makeSpan(v.concat(I.sizingClasses(f)),[u],f),fe=I.sizeMultiplier/f.sizeMultiplier;return $.height*=fe,$.depth*=fe,$.maxFontSize=I.sizeMultiplier,$},Ki=function(u,d,f){var v=d.havingBaseStyle(f),I=(1-d.sizeMultiplier/v.sizeMultiplier)*d.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=I+"em",u.height-=I,u.depth+=I},ra=function(u,d,f,v,I,$){var fe=bt.makeSymbol(u,"Main-Regular",I,v),Te=ki(fe,d,v,$);return f&&Ki(Te,v,d),Te},Ea=function(u,d,f,v){return bt.makeSymbol(u,"Size"+d+"-Regular",f,v)},na=function(u,d,f,v,I,$){var fe=Ea(u,d,I,v),Te=ki(bt.makeSpan(["delimsizing","size"+d],[fe],v),x.TEXT,v,$);return f&&Ki(Te,v,x.TEXT),Te},Bi=function(u,d,f){var v;d==="Size1-Regular"?v="delim-size1":v="delim-size4";var I=bt.makeSpan(["delimsizinginner",v],[bt.makeSpan([],[bt.makeSymbol(u,d,f)])]);return{type:"elem",elem:I}},Ti={type:"kern",size:-.005},yi=function(u,d,f,v,I,$){var fe,Te,Ke,ot;fe=Ke=ot=u,Te=null;var yt="Size1-Regular";u==="\\uparrow"?Ke=ot="\u23D0":u==="\\Uparrow"?Ke=ot="\u2016":u==="\\downarrow"?fe=Ke="\u23D0":u==="\\Downarrow"?fe=Ke="\u2016":u==="\\updownarrow"?(fe="\\uparrow",Ke="\u23D0",ot="\\downarrow"):u==="\\Updownarrow"?(fe="\\Uparrow",Ke="\u2016",ot="\\Downarrow"):u==="["||u==="\\lbrack"?(fe="\u23A1",Ke="\u23A2",ot="\u23A3",yt="Size4-Regular"):u==="]"||u==="\\rbrack"?(fe="\u23A4",Ke="\u23A5",ot="\u23A6",yt="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Ke=fe="\u23A2",ot="\u23A3",yt="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(fe="\u23A1",Ke=ot="\u23A2",yt="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Ke=fe="\u23A5",ot="\u23A6",yt="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(fe="\u23A4",Ke=ot="\u23A5",yt="Size4-Regular"):u==="("||u==="\\lparen"?(fe="\u239B",Ke="\u239C",ot="\u239D",yt="Size4-Regular"):u===")"||u==="\\rparen"?(fe="\u239E",Ke="\u239F",ot="\u23A0",yt="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(fe="\u23A7",Te="\u23A8",ot="\u23A9",Ke="\u23AA",yt="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(fe="\u23AB",Te="\u23AC",ot="\u23AD",Ke="\u23AA",yt="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(fe="\u23A7",ot="\u23A9",Ke="\u23AA",yt="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(fe="\u23AB",ot="\u23AD",Ke="\u23AA",yt="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(fe="\u23A7",ot="\u23AD",Ke="\u23AA",yt="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(fe="\u23AB",ot="\u23A9",Ke="\u23AA",yt="Size4-Regular");var Ot=Wn(fe,yt,I),Ut=Ot.height+Ot.depth,Wt=Wn(Ke,yt,I),Jt=Wt.height+Wt.depth,hr=Wn(ot,yt,I),fr=hr.height+hr.depth,kr=0,Hr=1;if(Te!==null){var Cn=Wn(Te,yt,I);kr=Cn.height+Cn.depth,Hr=2}var yn=Ut+fr+kr,Dn=Math.max(0,Math.ceil((d-yn)/(Hr*Jt))),In=yn+Dn*Hr*Jt,Sn=v.fontMetrics().axisHeight;f&&(Sn*=v.sizeMultiplier);var ui=In/2-Sn,On=(Dn+1)*.005-Jt,ut=[];if(ut.push(Bi(ot,yt,I)),Te===null)for(var Ci=0;Ci<Dn;Ci++)ut.push(Ti),ut.push(Bi(Ke,yt,I));else{for(var Wi=0;Wi<Dn;Wi++)ut.push(Ti),ut.push(Bi(Ke,yt,I));ut.push({type:"kern",size:On}),ut.push(Bi(Ke,yt,I)),ut.push(Ti),ut.push(Bi(Te,yt,I));for(var Ui=0;Ui<Dn;Ui++)ut.push(Ti),ut.push(Bi(Ke,yt,I))}ut.push({type:"kern",size:On}),ut.push(Bi(Ke,yt,I)),ut.push(Ti),ut.push(Bi(fe,yt,I));var Vn=v.havingBaseStyle(x.TEXT),os=bt.makeVList({positionType:"bottom",positionData:ui,children:ut},Vn);return ki(bt.makeSpan(["delimsizing","mult"],[os],Vn),x.TEXT,v,$)},Fs=80,is=.08,Fi=function(u,d,f,v,I){var $=Qe(u,v,f),fe=new Le(u,$),Te=new me([fe],{width:"400em",height:d+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return bt.makeSvgSpan(["hide-tail"],[Te],I)},Ns=function(u,d){var f=d.havingBaseSizing(),v=xs("\\surd",u*f.sizeMultiplier,$s,f),I=f.sizeMultiplier,$=Math.max(0,d.minRuleThickness-d.fontMetrics().sqrtRuleThickness),fe,Te=0,Ke=0,ot=0,yt;return v.type==="small"?(ot=1e3+1e3*$+Fs,u<1?I=1:u<1.4&&(I=.7),Te=(1+$+is)/I,Ke=(1+$)/I,fe=Fi("sqrtMain",Te,ot,$,d),fe.style.minWidth="0.853em",yt=.833/I):v.type==="large"?(ot=(1e3+Fs)*bs[v.size],Ke=(bs[v.size]+$)/I,Te=(bs[v.size]+$+is)/I,fe=Fi("sqrtSize"+v.size,Te,ot,$,d),fe.style.minWidth="1.02em",yt=1/I):(Te=u+$+is,Ke=u+$,ot=Math.floor(1e3*u+$)+Fs,fe=Fi("sqrtTall",Te,ot,$,d),fe.style.minWidth="0.742em",yt=1.056),fe.height=Ke,fe.style.height=Te+"em",{span:fe,advanceWidth:yt,ruleWidth:(d.fontMetrics().sqrtRuleThickness+$)*I}},ys=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Sa=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],ds=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bs=[0,1.2,1.8,2.4,3],Ai=function(u,d,f,v,I){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),V.contains(ys,u)||V.contains(ds,u))return na(u,d,!1,f,v,I);if(V.contains(Sa,u))return yi(u,bs[d],!1,f,v,I);throw new m("Illegal delimiter: '"+u+"'")},ia=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wa=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],$s=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],sa=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.")},xs=function(u,d,f,v){for(var I=Math.min(2,3-v.style.size),$=I;$<f.length&&f[$].type!=="stack";$++){var fe=Wn(u,sa(f[$]),"math"),Te=fe.height+fe.depth;if(f[$].type==="small"){var Ke=v.havingBaseStyle(f[$].style);Te*=Ke.sizeMultiplier}if(Te>d)return f[$]}return f[f.length-1]},qi=function(u,d,f,v,I,$){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var fe;V.contains(ds,u)?fe=ia:V.contains(ys,u)?fe=$s:fe=wa;var Te=xs(u,d,fe,v);return Te.type==="small"?ra(u,Te.style,f,v,I,$):Te.type==="large"?na(u,Te.size,f,v,I,$):yi(u,d,f,v,I,$)},Us=function(u,d,f,v,I,$){var fe=v.fontMetrics().axisHeight*v.sizeMultiplier,Te=901,Ke=5/v.fontMetrics().ptPerEm,ot=Math.max(d-fe,f+fe),yt=Math.max(ot/500*Te,2*ot-Ke);return qi(u,yt,!0,v,I,$)},Pi={sqrtImage:Ns,sizedDelim:Ai,customSizedDelim:qi,leftRightDelim:Us},zs={"\\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}},aa=["(","\\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 gi(U,u){var d=xn(U);if(d&&V.contains(aa,d.text))return d;throw new m("Invalid delimiter: '"+(d?d.text:JSON.stringify(U))+"' after '"+u.funcName+"'",U)}nr({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,d){var f=gi(d[0],u);return{type:"delimsizing",mode:u.parser.mode,size:zs[u.funcName].size,mclass:zs[u.funcName].mclass,delim:f.text}},htmlBuilder:function(u,d){return u.delim==="."?bt.makeSpan([u.mclass]):Pi.sizedDelim(u.delim,u.size,d,u.mode,[u.mclass])},mathmlBuilder:function(u){var d=[];u.delim!=="."&&d.push($n(u.delim,u.mode));var f=new Ht.MathNode("mo",d);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function ss(U){if(!U.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}nr({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,d){var f=u.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new m("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:gi(d[0],u).text,color:f}}}),nr({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,d){var f=gi(d[0],u),v=u.parser;++v.leftrightDepth;var I=v.parseExpression(!1);--v.leftrightDepth,v.expect("\\right",!1);var $=pr(v.parseFunction(),"leftright-right");return{type:"leftright",mode:v.mode,body:I,left:f.text,right:$.delim,rightColor:$.color}},htmlBuilder:function(u,d){ss(u);for(var f=cn(u.body,d,!0,["mopen","mclose"]),v=0,I=0,$=!1,fe=0;fe<f.length;fe++)f[fe].isMiddle?$=!0:(v=Math.max(f[fe].height,v),I=Math.max(f[fe].depth,I));v*=d.sizeMultiplier,I*=d.sizeMultiplier;var Te;if(u.left==="."?Te=ri(d,["mopen"]):Te=Pi.leftRightDelim(u.left,v,I,d,u.mode,["mopen"]),f.unshift(Te),$)for(var Ke=1;Ke<f.length;Ke++){var ot=f[Ke],yt=ot.isMiddle;yt&&(f[Ke]=Pi.leftRightDelim(yt.delim,v,I,yt.options,u.mode,[]))}var Ot;if(u.right===".")Ot=ri(d,["mclose"]);else{var Ut=u.rightColor?d.withColor(u.rightColor):d;Ot=Pi.leftRightDelim(u.right,v,I,Ut,u.mode,["mclose"])}return f.push(Ot),bt.makeSpan(["minner"],f,d)},mathmlBuilder:function(u,d){ss(u);var f=zn(u.body,d);if(u.left!=="."){var v=new Ht.MathNode("mo",[$n(u.left,u.mode)]);v.setAttribute("fence","true"),f.unshift(v)}if(u.right!=="."){var I=new Ht.MathNode("mo",[$n(u.right,u.mode)]);I.setAttribute("fence","true"),u.rightColor&&I.setAttribute("mathcolor",u.rightColor),f.push(I)}return Ri(f)}}),nr({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,d){var f=gi(d[0],u);if(!u.parser.leftrightDepth)throw new m("\\middle without preceding \\left",f);return{type:"middle",mode:u.parser.mode,delim:f.text}},htmlBuilder:function(u,d){var f;if(u.delim===".")f=ri(d,[]);else{f=Pi.sizedDelim(u.delim,1,d,u.mode,[]);var v={delim:u.delim,options:d};f.isMiddle=v}return f},mathmlBuilder:function(u,d){var f=u.delim==="\\vert"||u.delim==="|"?$n("|","text"):$n(u.delim,u.mode),v=new Ht.MathNode("mo",[f]);return v.setAttribute("fence","true"),v.setAttribute("lspace","0.05em"),v.setAttribute("rspace","0.05em"),v}});var fs=function(u,d){var f=bt.wrapFragment(Pr(u.body,d),d),v=u.label.substr(1),I=d.sizeMultiplier,$,fe=0,Te=V.isCharacterBox(u.body);if(v==="sout")$=bt.makeSpan(["stretchy","sout"]),$.height=d.fontMetrics().defaultRuleThickness/I,fe=-.5*d.fontMetrics().xHeight;else{/cancel/.test(v)?Te||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Ke=0,ot=0;/box/.test(v)?(ot=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness),Ke=d.fontMetrics().fboxsep+(v==="colorbox"?0:ot)):Ke=Te?.2:0,$=mi.encloseSpan(f,v,Ke,d),/fbox|boxed|fcolorbox/.test(v)&&($.style.borderStyle="solid",$.style.borderWidth=ot+"em"),fe=f.depth+Ke,u.backgroundColor&&($.style.backgroundColor=u.backgroundColor,u.borderColor&&($.style.borderColor=u.borderColor))}var yt;return u.backgroundColor?yt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:$,shift:fe},{type:"elem",elem:f,shift:0}]},d):yt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:$,shift:fe,wrapperClasses:/cancel/.test(v)?["svg-align"]:[]}]},d),/cancel/.test(v)&&(yt.height=f.height,yt.depth=f.depth),/cancel/.test(v)&&!Te?bt.makeSpan(["mord","cancel-lap"],[yt],d):bt.makeSpan(["mord"],[yt],d)},Es=function(u,d){var f=0,v=new Ht.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[xr(u.body,d)]);switch(u.label){case"\\cancel":v.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":v.setAttribute("notation","downdiagonalstrike");break;case"\\sout":v.setAttribute("notation","horizontalstrike");break;case"\\fbox":v.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=d.fontMetrics().fboxsep*d.fontMetrics().ptPerEm,v.setAttribute("width","+"+2*f+"pt"),v.setAttribute("height","+"+2*f+"pt"),v.setAttribute("lspace",f+"pt"),v.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var I=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness);v.setAttribute("style","border: "+I+"em solid "+String(u.borderColor))}break;case"\\xcancel":v.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&v.setAttribute("mathbackground",u.backgroundColor),v};nr({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,d,f){var v=u.parser,I=u.funcName,$=pr(d[0],"color-token").color,fe=d[1];return{type:"enclose",mode:v.mode,label:I,backgroundColor:$,body:fe}},htmlBuilder:fs,mathmlBuilder:Es}),nr({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,d,f){var v=u.parser,I=u.funcName,$=pr(d[0],"color-token").color,fe=pr(d[1],"color-token").color,Te=d[2];return{type:"enclose",mode:v.mode,label:I,backgroundColor:fe,borderColor:$,body:Te}},htmlBuilder:fs,mathmlBuilder:Es}),nr({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:d[0]}}}),nr({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,d,f){var v=u.parser,I=u.funcName,$=d[0];return{type:"enclose",mode:v.mode,label:I,body:$}},htmlBuilder:fs,mathmlBuilder:Es});var oa={};function Ni(U){for(var u=U.type,d=U.names,f=U.props,v=U.handler,I=U.htmlBuilder,$=U.mathmlBuilder,fe={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:v},Te=0;Te<d.length;++Te)oa[d[Te]]=fe;I&&(jn[u]=I),$&&(Ln[u]=$)}function la(U){var u=[];U.consumeSpaces();for(var d=U.fetch().text;d==="\\hline"||d==="\\hdashline";)U.consume(),u.push(d==="\\hdashline"),U.consumeSpaces(),d=U.fetch().text;return u}function Qi(U,u,d){var f=u.hskipBeforeAndAfter,v=u.addJot,I=u.cols,$=u.arraystretch,fe=u.colSeparationType;if(U.gullet.beginGroup(),U.gullet.macros.set("\\\\","\\cr"),!$){var Te=U.gullet.expandMacroAsText("\\arraystretch");if(Te==null)$=1;else if($=parseFloat(Te),!$||$<0)throw new m("Invalid \\arraystretch: "+Te)}U.gullet.beginGroup();var Ke=[],ot=[Ke],yt=[],Ot=[];for(Ot.push(la(U));;){var Ut=U.parseExpression(!1,"\\cr");U.gullet.endGroup(),U.gullet.beginGroup(),Ut={type:"ordgroup",mode:U.mode,body:Ut},d&&(Ut={type:"styling",mode:U.mode,style:d,body:[Ut]}),Ke.push(Ut);var Wt=U.fetch().text;if(Wt==="&")U.consume();else if(Wt==="\\end"){Ke.length===1&&Ut.type==="styling"&&Ut.body[0].body.length===0&&ot.pop(),Ot.length<ot.length+1&&Ot.push([]);break}else if(Wt==="\\cr"){var Jt=pr(U.parseFunction(),"cr");yt.push(Jt.size),Ot.push(la(U)),Ke=[],ot.push(Ke)}else throw new m("Expected & or \\\\ or \\cr or \\end",U.nextToken)}return U.gullet.endGroup(),U.gullet.endGroup(),{type:"array",mode:U.mode,addJot:v,arraystretch:$,body:ot,cols:I,rowGaps:yt,hskipBeforeAndAfter:f,hLinesBeforeRow:Ot,colSeparationType:fe}}function Ss(U){return U.substr(0,1)==="d"?"display":"text"}var $i=function(u,d){var f,v,I=u.body.length,$=u.hLinesBeforeRow,fe=0,Te=new Array(I),Ke=[],ot=Math.max(d.fontMetrics().arrayRuleWidth,d.minRuleThickness),yt=1/d.fontMetrics().ptPerEm,Ot=5*yt;if(u.colSeparationType&&u.colSeparationType==="small"){var Ut=d.havingStyle(x.SCRIPT).sizeMultiplier;Ot=.2778*(Ut/d.sizeMultiplier)}var Wt=12*yt,Jt=3*yt,hr=u.arraystretch*Wt,fr=.7*hr,kr=.3*hr,Hr=0;function Cn(Xs){for(var ga=0;ga<Xs.length;++ga)ga>0&&(Hr+=.25),Ke.push({pos:Hr,isDashed:Xs[ga]})}for(Cn($[0]),f=0;f<u.body.length;++f){var yn=u.body[f],Dn=fr,In=kr;fe<yn.length&&(fe=yn.length);var Sn=new Array(yn.length);for(v=0;v<yn.length;++v){var ui=Pr(yn[v],d);In<ui.depth&&(In=ui.depth),Dn<ui.height&&(Dn=ui.height),Sn[v]=ui}var On=u.rowGaps[f],ut=0;On&&(ut=at(On,d),ut>0&&(ut+=kr,In<ut&&(In=ut),ut=0)),u.addJot&&(In+=Jt),Sn.height=Dn,Sn.depth=In,Hr+=Dn,Sn.pos=Hr,Hr+=In+ut,Te[f]=Sn,Cn($[f+1])}var Ci=Hr/2+d.fontMetrics().axisHeight,Wi=u.cols||[],Ui=[],Vn,os;for(v=0,os=0;v<fe||os<Wi.length;++v,++os){for(var Vi=Wi[os]||{},lo=!0;Vi.type==="separator";){if(lo||(Vn=bt.makeSpan(["arraycolsep"],[]),Vn.style.width=d.fontMetrics().doubleRuleSep+"em",Ui.push(Vn)),Vi.separator==="|"||Vi.separator===":"){var Fo=Vi.separator==="|"?"solid":"dashed",ks=bt.makeSpan(["vertical-separator"],[],d);ks.style.height=Hr+"em",ks.style.borderRightWidth=ot+"em",ks.style.borderRightStyle=Fo,ks.style.margin="0 -"+ot/2+"em",ks.style.verticalAlign=-(Hr-Ci)+"em",Ui.push(ks)}else throw new m("Invalid separator type: "+Vi.separator);os++,Vi=Wi[os]||{},lo=!1}if(!(v>=fe)){var Ps=void 0;(v>0||u.hskipBeforeAndAfter)&&(Ps=V.deflt(Vi.pregap,Ot),Ps!==0&&(Vn=bt.makeSpan(["arraycolsep"],[]),Vn.style.width=Ps+"em",Ui.push(Vn)));var zi=[];for(f=0;f<I;++f){var Os=Te[f],Ys=Os[v];if(Ys){var pa=Os.pos-Ci;Ys.depth=Os.depth,Ys.height=Os.height,zi.push({type:"elem",elem:Ys,shift:pa})}}zi=bt.makeVList({positionType:"individualShift",children:zi},d),zi=bt.makeSpan(["col-align-"+(Vi.align||"c")],[zi]),Ui.push(zi),(v<fe-1||u.hskipBeforeAndAfter)&&(Ps=V.deflt(Vi.postgap,Ot),Ps!==0&&(Vn=bt.makeSpan(["arraycolsep"],[]),Vn.style.width=Ps+"em",Ui.push(Vn)))}}if(Te=bt.makeSpan(["mtable"],Ui),Ke.length>0){for(var Di=bt.makeLineSpan("hline",d,ot),No=bt.makeLineSpan("hdashline",d,ot),ma=[{type:"elem",elem:Te,shift:0}];Ke.length>0;){var Fa=Ke.pop(),uo=Fa.pos-Ci;Fa.isDashed?ma.push({type:"elem",elem:No,shift:uo}):ma.push({type:"elem",elem:Di,shift:uo})}Te=bt.makeVList({positionType:"individualShift",children:ma},d)}return bt.makeSpan(["mord"],[Te],d)},Gs={c:"center ",l:"left ",r:"right "},mn=function(u,d){var f=new Ht.MathNode("mtable",u.body.map(function(Hr){return new Ht.MathNode("mtr",Hr.map(function(Cn){return new Ht.MathNode("mtd",[xr(Cn,d)])}))})),v=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",v+"em");var I="",$="";if(u.cols){var fe=u.cols,Te="",Ke=!1,ot=0,yt=fe.length;fe[0].type==="separator"&&(I+="top ",ot=1),fe[fe.length-1].type==="separator"&&(I+="bottom ",yt-=1);for(var Ot=ot;Ot<yt;Ot++)fe[Ot].type==="align"?($+=Gs[fe[Ot].align],Ke&&(Te+="none "),Ke=!0):fe[Ot].type==="separator"&&Ke&&(Te+=fe[Ot].separator==="|"?"solid ":"dashed ",Ke=!1);f.setAttribute("columnalign",$.trim()),/[sd]/.test(Te)&&f.setAttribute("columnlines",Te.trim())}if(u.colSeparationType==="align"){for(var Ut=u.cols||[],Wt="",Jt=1;Jt<Ut.length;Jt++)Wt+=Jt%2?"0em ":"1em ";f.setAttribute("columnspacing",Wt.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var hr="",fr=u.hLinesBeforeRow;I+=fr[0].length>0?"left ":"",I+=fr[fr.length-1].length>0?"right ":"";for(var kr=1;kr<fr.length-1;kr++)hr+=fr[kr].length===0?"none ":fr[kr][0]?"dashed ":"solid ";return/[sd]/.test(hr)&&f.setAttribute("rowlines",hr.trim()),I!==""&&(f=new Ht.MathNode("menclose",[f]),f.setAttribute("notation",I.trim())),u.arraystretch&&u.arraystretch<1&&(f=new Ht.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},gn=function(u,d){var f=[],v=Qi(u.parser,{cols:f,addJot:!0},"display"),I,$=0,fe={type:"ordgroup",mode:u.mode,body:[]},Te=Kr(d[0],"ordgroup");if(Te){for(var Ke="",ot=0;ot<Te.body.length;ot++){var yt=pr(Te.body[ot],"textord");Ke+=yt.text}I=Number(Ke),$=I*2}var Ot=!$;v.body.forEach(function(hr){for(var fr=1;fr<hr.length;fr+=2){var kr=pr(hr[fr],"styling"),Hr=pr(kr.body[0],"ordgroup");Hr.body.unshift(fe)}if(Ot)$<hr.length&&($=hr.length);else{var Cn=hr.length/2;if(I<Cn)throw new m("Too many math in a row: "+("expected "+I+", but got "+Cn),hr[0])}});for(var Ut=0;Ut<$;++Ut){var Wt="r",Jt=0;Ut%2===1?Wt="l":Ut>0&&Ot&&(Jt=1),f[Ut]={type:"align",align:Wt,pregap:Jt,postgap:0}}return v.colSeparationType=Ot?"align":"alignat",v};Ni({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,d){var f=xn(d[0]),v=f?[d[0]]:pr(d[0],"ordgroup").body,I=v.map(function(fe){var Te=kn(fe),Ke=Te.text;if("lcr".indexOf(Ke)!==-1)return{type:"align",align:Ke};if(Ke==="|")return{type:"separator",separator:"|"};if(Ke===":")return{type:"separator",separator:":"};throw new m("Unknown column alignment: "+Ke,fe)}),$={cols:I,hskipBeforeAndAfter:!0};return Qi(u.parser,$,Ss(u.envName))},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var d={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},v=Qi(u.parser,f,Ss(u.envName));return d?{type:"leftright",mode:u.mode,body:[v],left:d[0],right:d[1],rightColor:void 0}:v},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var d={arraystretch:.5},f=Qi(u.parser,d,"script");return f.colSeparationType="small",f},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,d){var f=xn(d[0]),v=f?[d[0]]:pr(d[0],"ordgroup").body,I=v.map(function(fe){var Te=kn(fe),Ke=Te.text;if("lc".indexOf(Ke)!==-1)return{type:"align",align:Ke};throw new m("Unknown column alignment: "+Ke,fe)});if(I.length>1)throw new m("{subarray} can contain only one column");var $={cols:I,hskipBeforeAndAfter:!1,arraystretch:.5};if($=Qi(u.parser,$,"script"),$.body[0].length>1)throw new m("{subarray} can contain only one column");return $},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var d={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=Qi(u.parser,d,Ss(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["aligned"],props:{numArgs:0},handler:gn,htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var d={cols:[{type:"align",align:"c"}],addJot:!0};return Qi(u.parser,d,"display")},htmlBuilder:$i,mathmlBuilder:mn}),Ni({type:"array",names:["alignedat"],props:{numArgs:1},handler:gn,htmlBuilder:$i,mathmlBuilder:mn}),nr({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,d){throw new m(u.funcName+" valid only within array environment")}});var En=oa,ni=En;nr({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];if(I.type!=="ordgroup")throw new m("Invalid environment name",I);for(var $="",fe=0;fe<I.body.length;++fe)$+=pr(I.body[fe],"textord").text;if(v==="\\begin"){if(!ni.hasOwnProperty($))throw new m("No such environment: "+$,I);var Te=ni[$],Ke=f.parseArguments("\\begin{"+$+"}",Te),ot=Ke.args,yt=Ke.optArgs,Ot={mode:f.mode,envName:$,parser:f},Ut=Te.handler(Ot,ot,yt);f.expect("\\end",!1);var Wt=f.nextToken,Jt=pr(f.parseFunction(),"environment");if(Jt.name!==$)throw new m("Mismatch: \\begin{"+$+"} matched by \\end{"+Jt.name+"}",Wt);return Ut}return{type:"environment",mode:f.mode,name:$,nameGroup:I}}});var ai=bt.makeSpan;function ps(U,u){var d=cn(U.body,u,!0);return ai([U.mclass],d,u)}function ms(U,u){var d,f=zn(U.body,u);return U.mclass==="minner"?Ht.newDocumentFragment(f):(U.mclass==="mord"?U.isCharacterBox?(d=f[0],d.type="mi"):d=new Ht.MathNode("mi",f):(U.isCharacterBox?(d=f[0],d.type="mo"):d=new Ht.MathNode("mo",f),U.mclass==="mbin"?(d.attributes.lspace="0.22em",d.attributes.rspace="0.22em"):U.mclass==="mpunct"?(d.attributes.lspace="0em",d.attributes.rspace="0.17em"):(U.mclass==="mopen"||U.mclass==="mclose")&&(d.attributes.lspace="0em",d.attributes.rspace="0em")),d)}nr({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];return{type:"mclass",mode:f.mode,mclass:"m"+v.substr(5),body:on(I),isCharacterBox:V.isCharacterBox(I)}},htmlBuilder:ps,mathmlBuilder:ms});var Ji=function(u){var d=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return d.type==="atom"&&(d.family==="bin"||d.family==="rel")?"m"+d.family:"mord"};nr({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,d){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:Ji(d[0]),body:[d[1]],isCharacterBox:V.isCharacterBox(d[1])}}}),nr({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[1],$=d[0],fe;v!=="\\stackrel"?fe=Ji(I):fe="mrel";var Te={type:"op",mode:I.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:v!=="\\stackrel",body:on(I)},Ke={type:"supsub",mode:$.mode,base:Te,sup:v==="\\underset"?null:$,sub:v==="\\underset"?$:null};return{type:"mclass",mode:f.mode,mclass:fe,body:[Ke],isCharacterBox:V.isCharacterBox(Ke)}},htmlBuilder:ps,mathmlBuilder:ms});var js=function(u,d){var f=u.font,v=d.withFont(f);return Pr(u.body,v)},ws=function(u,d){var f=u.font,v=d.withFont(f);return xr(u.body,v)},es={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};nr({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0],$=v;return $ in es&&($=es[$]),{type:"font",mode:f.mode,font:$.slice(1),body:I}},htmlBuilder:js,mathmlBuilder:ws}),nr({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,v=d[0],I=V.isCharacterBox(v);return{type:"mclass",mode:f.mode,mclass:Ji(v),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:v}],isCharacterBox:I}}}),nr({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.parser,v=u.funcName,I=u.breakOnTokenText,$=f.mode,fe=f.parseExpression(!0,I),Te="math"+v.slice(1);return{type:"font",mode:$,font:Te,body:{type:"ordgroup",mode:f.mode,body:fe}}},htmlBuilder:js,mathmlBuilder:ws});var Ts=function(u,d){var f=d;return u==="display"?f=f.id>=x.SCRIPT.id?f.text():x.DISPLAY:u==="text"&&f.size===x.DISPLAY.size?f=x.TEXT:u==="script"?f=x.SCRIPT:u==="scriptscript"&&(f=x.SCRIPTSCRIPT),f},As=function(u,d){var f=Ts(u.size,d.style),v=f.fracNum(),I=f.fracDen(),$;$=d.havingStyle(v);var fe=Pr(u.numer,$,d);if(u.continued){var Te=8.5/d.fontMetrics().ptPerEm,Ke=3.5/d.fontMetrics().ptPerEm;fe.height=fe.height<Te?Te:fe.height,fe.depth=fe.depth<Ke?Ke:fe.depth}$=d.havingStyle(I);var ot=Pr(u.denom,$,d),yt,Ot,Ut;u.hasBarLine?(u.barSize?(Ot=at(u.barSize,d),yt=bt.makeLineSpan("frac-line",d,Ot)):yt=bt.makeLineSpan("frac-line",d),Ot=yt.height,Ut=yt.height):(yt=null,Ot=0,Ut=d.fontMetrics().defaultRuleThickness);var Wt,Jt,hr;f.size===x.DISPLAY.size||u.size==="display"?(Wt=d.fontMetrics().num1,Ot>0?Jt=3*Ut:Jt=7*Ut,hr=d.fontMetrics().denom1):(Ot>0?(Wt=d.fontMetrics().num2,Jt=Ut):(Wt=d.fontMetrics().num3,Jt=3*Ut),hr=d.fontMetrics().denom2);var fr;if(yt){var Hr=d.fontMetrics().axisHeight;Wt-fe.depth-(Hr+.5*Ot)<Jt&&(Wt+=Jt-(Wt-fe.depth-(Hr+.5*Ot))),Hr-.5*Ot-(ot.height-hr)<Jt&&(hr+=Jt-(Hr-.5*Ot-(ot.height-hr)));var Cn=-(Hr-.5*Ot);fr=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ot,shift:hr},{type:"elem",elem:yt,shift:Cn},{type:"elem",elem:fe,shift:-Wt}]},d)}else{var kr=Wt-fe.depth-(ot.height-hr);kr<Jt&&(Wt+=.5*(Jt-kr),hr+=.5*(Jt-kr)),fr=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ot,shift:hr},{type:"elem",elem:fe,shift:-Wt}]},d)}$=d.havingStyle(f),fr.height*=$.sizeMultiplier/d.sizeMultiplier,fr.depth*=$.sizeMultiplier/d.sizeMultiplier;var yn;f.size===x.DISPLAY.size?yn=d.fontMetrics().delim1:yn=d.fontMetrics().delim2;var Dn,In;return u.leftDelim==null?Dn=ri(d,["mopen"]):Dn=Pi.customSizedDelim(u.leftDelim,yn,!0,d.havingStyle(f),u.mode,["mopen"]),u.continued?In=bt.makeSpan([]):u.rightDelim==null?In=ri(d,["mclose"]):In=Pi.customSizedDelim(u.rightDelim,yn,!0,d.havingStyle(f),u.mode,["mclose"]),bt.makeSpan(["mord"].concat($.sizingClasses(d)),[Dn,bt.makeSpan(["mfrac"],[fr]),In],d)},Cs=function(u,d){var f=new Ht.MathNode("mfrac",[xr(u.numer,d),xr(u.denom,d)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var v=at(u.barSize,d);f.setAttribute("linethickness",v+"em")}var I=Ts(u.size,d.style);if(I.size!==d.style.size){f=new Ht.MathNode("mstyle",[f]);var $=I.size===x.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",$),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var fe=[];if(u.leftDelim!=null){var Te=new Ht.MathNode("mo",[new Ht.TextNode(u.leftDelim.replace("\\",""))]);Te.setAttribute("fence","true"),fe.push(Te)}if(fe.push(f),u.rightDelim!=null){var Ke=new Ht.MathNode("mo",[new Ht.TextNode(u.rightDelim.replace("\\",""))]);Ke.setAttribute("fence","true"),fe.push(Ke)}return Ri(fe)}return f};nr({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0],$=d[1],fe,Te=null,Ke=null,ot="auto";switch(v){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":fe=!0;break;case"\\\\atopfrac":fe=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":fe=!1,Te="(",Ke=")";break;case"\\\\bracefrac":fe=!1,Te="\\{",Ke="\\}";break;case"\\\\brackfrac":fe=!1,Te="[",Ke="]";break;default:throw new Error("Unrecognized genfrac command")}switch(v){case"\\cfrac":case"\\dfrac":case"\\dbinom":ot="display";break;case"\\tfrac":case"\\tbinom":ot="text";break}return{type:"genfrac",mode:f.mode,continued:v==="\\cfrac",numer:I,denom:$,hasBarLine:fe,leftDelim:Te,rightDelim:Ke,size:ot,barSize:null}},htmlBuilder:As,mathmlBuilder:Cs}),nr({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var d=u.parser,f=u.funcName,v=u.token,I;switch(f){case"\\over":I="\\frac";break;case"\\choose":I="\\binom";break;case"\\atop":I="\\\\atopfrac";break;case"\\brace":I="\\\\bracefrac";break;case"\\brack":I="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:d.mode,replaceWith:I,token:v}}});var oi=["display","text","script","scriptscript"],vi=function(u){var d=null;return u.length>0&&(d=u,d=d==="."?null:d),d};nr({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,d){var f=u.parser,v=d[4],I=d[5],$=Kr(d[0],"atom");$&&($=wn(d[0],"open"));var fe=$?vi($.text):null,Te=Kr(d[1],"atom");Te&&(Te=wn(d[1],"close"));var Ke=Te?vi(Te.text):null,ot=pr(d[2],"size"),yt,Ot=null;ot.isBlank?yt=!0:(Ot=ot.value,yt=Ot.number>0);var Ut="auto",Wt=Kr(d[3],"ordgroup");if(Wt){if(Wt.body.length>0){var Jt=pr(Wt.body[0],"textord");Ut=oi[Number(Jt.text)]}}else Wt=pr(d[3],"textord"),Ut=oi[Number(Wt.text)];return{type:"genfrac",mode:f.mode,numer:v,denom:I,continued:!1,hasBarLine:yt,barSize:Ot,leftDelim:fe,rightDelim:Ke,size:Ut}},htmlBuilder:As,mathmlBuilder:Cs}),nr({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,d){var f=u.parser,v=u.funcName,I=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:pr(d[0],"size").value,token:I}}}),nr({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0],$=ne(pr(d[1],"infix").size),fe=d[2],Te=$.number>0;return{type:"genfrac",mode:f.mode,numer:I,denom:fe,continued:!1,hasBarLine:Te,barSize:$,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:As,mathmlBuilder:Cs});var ja=function(u,d){var f=d.style,v,I,$=Kr(u,"supsub");$?(v=$.sup?Pr($.sup,d.havingStyle(f.sup()),d):Pr($.sub,d.havingStyle(f.sub()),d),I=pr($.base,"horizBrace")):I=pr(u,"horizBrace");var fe=Pr(I.base,d.havingBaseStyle(x.DISPLAY)),Te=mi.svgSpan(I,d),Ke;if(I.isOver?(Ke=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"kern",size:.1},{type:"elem",elem:Te}]},d),Ke.children[0].children[0].children[1].classes.push("svg-align")):(Ke=bt.makeVList({positionType:"bottom",positionData:fe.depth+.1+Te.height,children:[{type:"elem",elem:Te},{type:"kern",size:.1},{type:"elem",elem:fe}]},d),Ke.children[0].children[0].children[0].classes.push("svg-align")),v){var ot=bt.makeSpan(["mord",I.isOver?"mover":"munder"],[Ke],d);I.isOver?Ke=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ot},{type:"kern",size:.2},{type:"elem",elem:v}]},d):Ke=bt.makeVList({positionType:"bottom",positionData:ot.depth+.2+v.height+v.depth,children:[{type:"elem",elem:v},{type:"kern",size:.2},{type:"elem",elem:ot}]},d)}return bt.makeSpan(["mord",I.isOver?"mover":"munder"],[Ke],d)},Ft=function(u,d){var f=mi.mathMLnode(u.label);return new Ht.MathNode(u.isOver?"mover":"munder",[xr(u.base,d),f])};nr({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=u.funcName;return{type:"horizBrace",mode:f.mode,label:v,isOver:/^\\over/.test(v),base:d[0]}},htmlBuilder:ja,mathmlBuilder:Ft}),nr({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,d){var f=u.parser,v=d[1],I=pr(d[0],"url").url;return f.settings.isTrusted({command:"\\href",url:I})?{type:"href",mode:f.mode,href:I,body:on(v)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,d){var f=cn(u.body,d,!1);return bt.makeAnchor(u.href,[],f,d)},mathmlBuilder:function(u,d){var f=qn(u.body,d);return f instanceof Nn||(f=new Nn("mrow",[f])),f.setAttribute("href",u.href),f}}),nr({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,d){var f=u.parser,v=pr(d[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:v}))return f.formatUnsupportedCmd("\\url");for(var I=[],$=0;$<v.length;$++){var fe=v[$];fe==="~"&&(fe="\\textasciitilde"),I.push({type:"textord",mode:"text",text:fe})}var Te={type:"text",mode:f.mode,font:"\\texttt",body:I};return{type:"href",mode:f.mode,href:v,body:on(Te)}}}),nr({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"htmlmathml",mode:f.mode,html:on(d[0]),mathml:on(d[1])}},htmlBuilder:function(u,d){var f=cn(u.html,d,!1);return bt.makeFragment(f)},mathmlBuilder:function(u,d){return qn(u.mathml,d)}});var Ks=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var d=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!d)throw new m("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(d[1]+d[2]),unit:d[3]};if(!fn(f))throw new m("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};nr({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,d,f){var v=u.parser,I={number:0,unit:"em"},$={number:.9,unit:"em"},fe={number:0,unit:"em"},Te="";if(f[0])for(var Ke=pr(f[0],"raw").string,ot=Ke.split(","),yt=0;yt<ot.length;yt++){var Ot=ot[yt].split("=");if(Ot.length===2){var Ut=Ot[1].trim();switch(Ot[0].trim()){case"alt":Te=Ut;break;case"width":I=Ks(Ut);break;case"height":$=Ks(Ut);break;case"totalheight":fe=Ks(Ut);break;default:throw new m("Invalid key: '"+Ot[0]+"' in \\includegraphics.")}}}var Wt=pr(d[0],"url").url;return Te===""&&(Te=Wt,Te=Te.replace(/^.*[\\/]/,""),Te=Te.substring(0,Te.lastIndexOf("."))),v.settings.isTrusted({command:"\\includegraphics",url:Wt})?{type:"includegraphics",mode:v.mode,alt:Te,width:I,height:$,totalheight:fe,src:Wt}:v.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,d){var f=at(u.height,d),v=0;u.totalheight.number>0&&(v=at(u.totalheight,d)-f,v=Number(v.toFixed(2)));var I=0;u.width.number>0&&(I=at(u.width,d));var $={height:f+v+"em"};I>0&&($.width=I+"em"),v>0&&($.verticalAlign=-v+"em");var fe=new De(u.src,u.alt,$);return fe.height=f,fe.depth=v,fe},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var v=at(u.height,d),I=0;if(u.totalheight.number>0&&(I=at(u.totalheight,d)-v,I=I.toFixed(2),f.setAttribute("valign","-"+I+"em")),f.setAttribute("height",v+I+"em"),u.width.number>0){var $=at(u.width,d);f.setAttribute("width",$+"em")}return f.setAttribute("src",u.src),f}}),nr({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d){var f=u.parser,v=u.funcName,I=pr(d[0],"size");if(f.settings.strict){var $=v[1]==="m",fe=I.value.unit==="mu";$?(fe||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" supports only mu units, "+("not "+I.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" works only in math mode")):fe&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:I.value}},htmlBuilder:function(u,d){return bt.makeGlue(u.dimension,d)},mathmlBuilder:function(u,d){var f=at(u.dimension,d);return new Ht.SpaceNode(f)}}),nr({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];return{type:"lap",mode:f.mode,alignment:v.slice(5),body:I}},htmlBuilder:function(u,d){var f;u.alignment==="clap"?(f=bt.makeSpan([],[Pr(u.body,d)]),f=bt.makeSpan(["inner"],[f],d)):f=bt.makeSpan(["inner"],[Pr(u.body,d)]);var v=bt.makeSpan(["fix"],[]),I=bt.makeSpan([u.alignment],[f,v],d),$=bt.makeSpan(["strut"]);return $.style.height=I.height+I.depth+"em",$.style.verticalAlign=-I.depth+"em",I.children.unshift($),I=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:I}]},d),bt.makeSpan(["mord"],[I],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[xr(u.body,d)]);if(u.alignment!=="rlap"){var v=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",v+"width")}return f.setAttribute("width","0px"),f}}),nr({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=u.funcName,v=u.parser,I=v.mode;v.switchMode("math");var $=f==="\\("?"\\)":"$",fe=v.parseExpression(!1,$);return v.expect($),v.switchMode(I),{type:"styling",mode:v.mode,style:"text",body:fe}}}),nr({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){throw new m("Mismatched "+u.funcName)}});var Ta=function(u,d){switch(d.style.size){case x.DISPLAY.size:return u.display;case x.TEXT.size:return u.text;case x.SCRIPT.size:return u.script;case x.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};nr({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,d){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:on(d[0]),text:on(d[1]),script:on(d[2]),scriptscript:on(d[3])}},htmlBuilder:function(u,d){var f=Ta(u,d),v=cn(f,d,!1);return bt.makeFragment(v)},mathmlBuilder:function(u,d){var f=Ta(u,d);return qn(f,d)}});var Aa=function(u,d,f,v,I,$,fe){u=bt.makeSpan([],[u]);var Te,Ke;if(d){var ot=Pr(d,v.havingStyle(I.sup()),v);Ke={elem:ot,kern:Math.max(v.fontMetrics().bigOpSpacing1,v.fontMetrics().bigOpSpacing3-ot.depth)}}if(f){var yt=Pr(f,v.havingStyle(I.sub()),v);Te={elem:yt,kern:Math.max(v.fontMetrics().bigOpSpacing2,v.fontMetrics().bigOpSpacing4-yt.height)}}var Ot;if(Ke&&Te){var Ut=v.fontMetrics().bigOpSpacing5+Te.elem.height+Te.elem.depth+Te.kern+u.depth+fe;Ot=bt.makeVList({positionType:"bottom",positionData:Ut,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-$+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u},{type:"kern",size:Ke.kern},{type:"elem",elem:Ke.elem,marginLeft:$+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else if(Te){var Wt=u.height-fe;Ot=bt.makeVList({positionType:"top",positionData:Wt,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-$+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u}]},v)}else if(Ke){var Jt=u.depth+fe;Ot=bt.makeVList({positionType:"bottom",positionData:Jt,children:[{type:"elem",elem:u},{type:"kern",size:Ke.kern},{type:"elem",elem:Ke.elem,marginLeft:$+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else return u;return bt.makeSpan(["mop","op-limits"],[Ot],v)},Ka=["\\smallint"],as=function(u,d){var f,v,I=!1,$,fe=Kr(u,"supsub");fe?(f=fe.sup,v=fe.sub,$=pr(fe.base,"op"),I=!0):$=pr(u,"op");var Te=d.style,Ke=!1;Te.size===x.DISPLAY.size&&$.symbol&&!V.contains(Ka,$.name)&&(Ke=!0);var ot;if($.symbol){var yt=Ke?"Size2-Regular":"Size1-Regular",Ot="";if(($.name==="\\oiint"||$.name==="\\oiiint")&&(Ot=$.name.substr(1),$.name=Ot==="oiint"?"\\iint":"\\iiint"),ot=bt.makeSymbol($.name,yt,"math",d,["mop","op-symbol",Ke?"large-op":"small-op"]),Ot.length>0){var Ut=ot.italic,Wt=bt.staticSvg(Ot+"Size"+(Ke?"2":"1"),d);ot=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ot,shift:0},{type:"elem",elem:Wt,shift:Ke?.08:0}]},d),$.name="\\"+Ot,ot.classes.unshift("mop"),ot.italic=Ut}}else if($.body){var Jt=cn($.body,d,!0);Jt.length===1&&Jt[0]instanceof J?(ot=Jt[0],ot.classes[0]="mop"):ot=bt.makeSpan(["mop"],bt.tryCombineChars(Jt),d)}else{for(var hr=[],fr=1;fr<$.name.length;fr++)hr.push(bt.mathsym($.name[fr],$.mode,d));ot=bt.makeSpan(["mop"],hr,d)}var kr=0,Hr=0;return(ot instanceof J||$.name==="\\oiint"||$.name==="\\oiiint")&&!$.suppressBaseShift&&(kr=(ot.height-ot.depth)/2-d.fontMetrics().axisHeight,Hr=ot.italic),I?Aa(ot,f,v,d,Te,Hr,kr):(kr&&(ot.style.position="relative",ot.style.top=kr+"em"),ot)},Ds=function(u,d){var f;if(u.symbol)f=new Nn("mo",[$n(u.name,u.mode)]),V.contains(Ka,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Nn("mo",zn(u.body,d));else{f=new Nn("mi",[new br(u.name.slice(1))]);var v=new Nn("mo",[$n("\u2061","text")]);u.parentIsSupSub?f=new Nn("mo",[f,v]):f=ii([f,v])}return f},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"};nr({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,d){var f=u.parser,v=u.funcName,I=v;return I.length===1&&(I=Ao[I]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:I}},htmlBuilder:as,mathmlBuilder:Ds}),nr({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=d[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:on(v)}},htmlBuilder:as,mathmlBuilder:Ds});var Co={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};nr({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 d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),nr({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),nr({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName,v=f;return v.length===1&&(v=Co[v]),{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:v}},htmlBuilder:as,mathmlBuilder:Ds});var ua=function(u,d){var f,v,I=!1,$,fe=Kr(u,"supsub");fe?(f=fe.sup,v=fe.sub,$=pr(fe.base,"operatorname"),I=!0):$=pr(u,"operatorname");var Te;if($.body.length>0){for(var Ke=$.body.map(function(Ut){var Wt=Ut.text;return typeof Wt=="string"?{type:"textord",mode:Ut.mode,text:Wt}:Ut}),ot=cn(Ke,d.withFont("mathrm"),!0),yt=0;yt<ot.length;yt++){var Ot=ot[yt];Ot instanceof J&&(Ot.text=Ot.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Te=bt.makeSpan(["mop"],ot,d)}else Te=bt.makeSpan(["mop"],[],d);return I?Aa(Te,f,v,d,d.style,0,0):Te},Hs=function(u,d){for(var f=zn(u.body,d.withFont("mathrm")),v=!0,I=0;I<f.length;I++){var $=f[I];if(!($ instanceof Ht.SpaceNode))if($ instanceof Ht.MathNode)switch($.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var fe=$.children[0];$.children.length===1&&fe instanceof Ht.TextNode?fe.text=fe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):v=!1;break}default:v=!1}else v=!1}if(v){var Te=f.map(function(yt){return yt.toText()}).join("");f=[new Ht.TextNode(Te)]}var Ke=new Ht.MathNode("mi",f);Ke.setAttribute("mathvariant","normal");var ot=new Ht.MathNode("mo",[$n("\u2061","text")]);return u.parentIsSupSub?new Ht.MathNode("mo",[Ke,ot]):Ht.newDocumentFragment([Ke,ot])};nr({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];return{type:"operatorname",mode:f.mode,body:on(I),alwaysHandleSupSub:v==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ua,mathmlBuilder:Hs}),un({type:"ordgroup",htmlBuilder:function(u,d){return u.semisimple?bt.makeFragment(cn(u.body,d,!1)):bt.makeSpan(["mord"],cn(u.body,d,!0),d)},mathmlBuilder:function(u,d){return qn(u.body,d,!0)}}),nr({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,d){var f=u.parser,v=d[0];return{type:"overline",mode:f.mode,body:v}},htmlBuilder:function(u,d){var f=Pr(u.body,d.havingCrampedStyle()),v=bt.makeLineSpan("overline-line",d),I=d.fontMetrics().defaultRuleThickness,$=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*I},{type:"elem",elem:v},{type:"kern",size:I}]},d);return bt.makeSpan(["mord","overline"],[$],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new Ht.MathNode("mover",[xr(u.body,d),f]);return v.setAttribute("accent","true"),v}}),nr({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,v=d[0];return{type:"phantom",mode:f.mode,body:on(v)}},htmlBuilder:function(u,d){var f=cn(u.body,d.withPhantom(),!1);return bt.makeFragment(f)},mathmlBuilder:function(u,d){var f=zn(u.body,d);return new Ht.MathNode("mphantom",f)}}),nr({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,v=d[0];return{type:"hphantom",mode:f.mode,body:v}},htmlBuilder:function(u,d){var f=bt.makeSpan([],[Pr(u.body,d.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var v=0;v<f.children.length;v++)f.children[v].height=0,f.children[v].depth=0;return f=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d),bt.makeSpan(["mord"],[f],d)},mathmlBuilder:function(u,d){var f=zn(on(u.body),d),v=new Ht.MathNode("mphantom",f),I=new Ht.MathNode("mpadded",[v]);return I.setAttribute("height","0px"),I.setAttribute("depth","0px"),I}}),nr({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,v=d[0];return{type:"vphantom",mode:f.mode,body:v}},htmlBuilder:function(u,d){var f=bt.makeSpan(["inner"],[Pr(u.body,d.withPhantom())]),v=bt.makeSpan(["fix"],[]);return bt.makeSpan(["mord","rlap"],[f,v],d)},mathmlBuilder:function(u,d){var f=zn(on(u.body),d),v=new Ht.MathNode("mphantom",f),I=new Ht.MathNode("mpadded",[v]);return I.setAttribute("width","0px"),I}}),nr({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser,v=pr(d[0],"size").value,I=d[1];return{type:"raisebox",mode:f.mode,dy:v,body:I}},htmlBuilder:function(u,d){var f=Pr(u.body,d),v=at(u.dy,d);return bt.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:f}]},d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[xr(u.body,d)]),v=u.dy.number+u.dy.unit;return f.setAttribute("voffset",v),f}}),nr({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,d,f){var v=u.parser,I=f[0],$=pr(d[0],"size"),fe=pr(d[1],"size");return{type:"rule",mode:v.mode,shift:I&&pr(I,"size").value,width:$.value,height:fe.value}},htmlBuilder:function(u,d){var f=bt.makeSpan(["mord","rule"],[],d),v=at(u.width,d),I=at(u.height,d),$=u.shift?at(u.shift,d):0;return f.style.borderRightWidth=v+"em",f.style.borderTopWidth=I+"em",f.style.bottom=$+"em",f.width=v,f.height=I+$,f.depth=-$,f.maxFontSize=I*1.125*d.sizeMultiplier,f},mathmlBuilder:function(u,d){var f=at(u.width,d),v=at(u.height,d),I=u.shift?at(u.shift,d):0,$=d.color&&d.getColor()||"black",fe=new Ht.MathNode("mspace");fe.setAttribute("mathbackground",$),fe.setAttribute("width",f+"em"),fe.setAttribute("height",v+"em");var Te=new Ht.MathNode("mpadded",[fe]);return I>=0?Te.setAttribute("height","+"+I+"em"):(Te.setAttribute("height",I+"em"),Te.setAttribute("depth","+"+-I+"em")),Te.setAttribute("voffset",I+"em"),Te}});function gs(U,u,d){for(var f=cn(U,u,!1),v=u.sizeMultiplier/d.sizeMultiplier,I=0;I<f.length;I++){var $=f[I].classes.indexOf("sizing");$<0?Array.prototype.push.apply(f[I].classes,u.sizingClasses(d)):f[I].classes[$+1]==="reset-size"+u.size&&(f[I].classes[$+1]="reset-size"+d.size),f[I].height*=v,f[I].depth*=v}return bt.makeFragment(f)}var Ha=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Do=function(u,d){var f=d.havingSize(u.size);return gs(u.body,f,d)};nr({type:"sizing",names:Ha,props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,v=u.funcName,I=u.parser,$=I.parseExpression(!1,f);return{type:"sizing",mode:I.mode,size:Ha.indexOf(v)+1,body:$}},htmlBuilder:Do,mathmlBuilder:function(u,d){var f=d.havingSize(u.size),v=zn(u.body,f),I=new Ht.MathNode("mstyle",v);return I.setAttribute("mathsize",f.sizeMultiplier+"em"),I}}),nr({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,d,f){var v=u.parser,I=!1,$=!1,fe=f[0]&&pr(f[0],"ordgroup");if(fe)for(var Te="",Ke=0;Ke<fe.body.length;++Ke){var ot=fe.body[Ke];if(Te=ot.text,Te==="t")I=!0;else if(Te==="b")$=!0;else{I=!1,$=!1;break}}else I=!0,$=!0;var yt=d[0];return{type:"smash",mode:v.mode,body:yt,smashHeight:I,smashDepth:$}},htmlBuilder:function(u,d){var f=bt.makeSpan([],[Pr(u.body,d)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var v=0;v<f.children.length;v++)f.children[v].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var I=0;I<f.children.length;I++)f.children[I].depth=0;var $=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d);return bt.makeSpan(["mord"],[$],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[xr(u.body,d)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),nr({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,d,f){var v=u.parser,I=f[0],$=d[0];return{type:"sqrt",mode:v.mode,body:$,index:I}},htmlBuilder:function(u,d){var f=Pr(u.body,d.havingCrampedStyle());f.height===0&&(f.height=d.fontMetrics().xHeight),f=bt.wrapFragment(f,d);var v=d.fontMetrics(),I=v.defaultRuleThickness,$=I;d.style.id<x.TEXT.id&&($=d.fontMetrics().xHeight);var fe=I+$/4,Te=f.height+f.depth+fe+I,Ke=Pi.sqrtImage(Te,d),ot=Ke.span,yt=Ke.ruleWidth,Ot=Ke.advanceWidth,Ut=ot.height-yt;Ut>f.height+f.depth+fe&&(fe=(fe+Ut-f.height-f.depth)/2);var Wt=ot.height-f.height-fe-yt;f.style.paddingLeft=Ot+"em";var Jt=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+Wt)},{type:"elem",elem:ot},{type:"kern",size:yt}]},d);if(u.index){var hr=d.havingStyle(x.SCRIPTSCRIPT),fr=Pr(u.index,hr,d),kr=.6*(Jt.height-Jt.depth),Hr=bt.makeVList({positionType:"shift",positionData:-kr,children:[{type:"elem",elem:fr}]},d),Cn=bt.makeSpan(["root"],[Hr]);return bt.makeSpan(["mord","sqrt"],[Cn,Jt],d)}else return bt.makeSpan(["mord","sqrt"],[Jt],d)},mathmlBuilder:function(u,d){var f=u.body,v=u.index;return v?new Ht.MathNode("mroot",[xr(f,d),xr(v,d)]):new Ht.MathNode("msqrt",[xr(f,d)])}});var Wa={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};nr({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,v=u.funcName,I=u.parser,$=I.parseExpression(!0,f),fe=v.slice(1,v.length-5);return{type:"styling",mode:I.mode,style:fe,body:$}},htmlBuilder:function(u,d){var f=Wa[u.style],v=d.havingStyle(f).withFont("");return gs(u.body,v,d)},mathmlBuilder:function(u,d){var f=Wa[u.style],v=d.havingStyle(f),I=zn(u.body,v),$=new Ht.MathNode("mstyle",I),fe={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Te=fe[u.style];return $.setAttribute("scriptlevel",Te[0]),$.setAttribute("displaystyle",Te[1]),$}});var Io=function(u,d){var f=u.base;if(f)if(f.type==="op"){var v=f.limits&&(d.style.size===x.DISPLAY.size||f.alwaysHandleSupSub);return v?as:null}else if(f.type==="operatorname"){var I=f.alwaysHandleSupSub&&(d.style.size===x.DISPLAY.size||f.limits);return I?ua:null}else{if(f.type==="accent")return V.isCharacterBox(f.base)?ir:null;if(f.type==="horizBrace"){var $=!u.sub;return $===f.isOver?ja:null}else return null}else return null};un({type:"supsub",htmlBuilder:function(u,d){var f=Io(u,d);if(f)return f(u,d);var v=u.base,I=u.sup,$=u.sub,fe=Pr(v,d),Te,Ke,ot=d.fontMetrics(),yt=0,Ot=0,Ut=v&&V.isCharacterBox(v);if(I){var Wt=d.havingStyle(d.style.sup());Te=Pr(I,Wt,d),Ut||(yt=fe.height-Wt.fontMetrics().supDrop*Wt.sizeMultiplier/d.sizeMultiplier)}if($){var Jt=d.havingStyle(d.style.sub());Ke=Pr($,Jt,d),Ut||(Ot=fe.depth+Jt.fontMetrics().subDrop*Jt.sizeMultiplier/d.sizeMultiplier)}var hr;d.style===x.DISPLAY?hr=ot.sup1:d.style.cramped?hr=ot.sup3:hr=ot.sup2;var fr=d.sizeMultiplier,kr=.5/ot.ptPerEm/fr+"em",Hr=null;if(Ke){var Cn=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(fe instanceof J||Cn)&&(Hr=-fe.italic+"em")}var yn;if(Te&&Ke){yt=Math.max(yt,hr,Te.depth+.25*ot.xHeight),Ot=Math.max(Ot,ot.sub2);var Dn=ot.defaultRuleThickness,In=4*Dn;if(yt-Te.depth-(Ke.height-Ot)<In){Ot=In-(yt-Te.depth)+Ke.height;var Sn=.8*ot.xHeight-(yt-Te.depth);Sn>0&&(yt+=Sn,Ot-=Sn)}var ui=[{type:"elem",elem:Ke,shift:Ot,marginRight:kr,marginLeft:Hr},{type:"elem",elem:Te,shift:-yt,marginRight:kr}];yn=bt.makeVList({positionType:"individualShift",children:ui},d)}else if(Ke){Ot=Math.max(Ot,ot.sub1,Ke.height-.8*ot.xHeight);var On=[{type:"elem",elem:Ke,marginLeft:Hr,marginRight:kr}];yn=bt.makeVList({positionType:"shift",positionData:Ot,children:On},d)}else if(Te)yt=Math.max(yt,hr,Te.depth+.25*ot.xHeight),yn=bt.makeVList({positionType:"shift",positionData:-yt,children:[{type:"elem",elem:Te,marginRight:kr}]},d);else throw new Error("supsub must have either sup or sub.");var ut=ti(fe,"right")||"mord";return bt.makeSpan([ut],[fe,bt.makeSpan(["msupsub"],[yn])],d)},mathmlBuilder:function(u,d){var f=!1,v,I,$=Kr(u.base,"horizBrace");$&&(I=!!u.sup,I===$.isOver&&(f=!0,v=$.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var fe=[xr(u.base,d)];u.sub&&fe.push(xr(u.sub,d)),u.sup&&fe.push(xr(u.sup,d));var Te;if(f)Te=v?"mover":"munder";else if(u.sub)if(u.sup){var yt=u.base;yt&&yt.type==="op"&&yt.limits&&d.style===x.DISPLAY||yt&&yt.type==="operatorname"&&yt.alwaysHandleSupSub&&(d.style===x.DISPLAY||yt.limits)?Te="munderover":Te="msubsup"}else{var ot=u.base;ot&&ot.type==="op"&&ot.limits&&(d.style===x.DISPLAY||ot.alwaysHandleSupSub)||ot&&ot.type==="operatorname"&&ot.alwaysHandleSupSub&&(ot.limits||d.style===x.DISPLAY)?Te="munder":Te="msub"}else{var Ke=u.base;Ke&&Ke.type==="op"&&Ke.limits&&(d.style===x.DISPLAY||Ke.alwaysHandleSupSub)||Ke&&Ke.type==="operatorname"&&Ke.alwaysHandleSupSub&&(Ke.limits||d.style===x.DISPLAY)?Te="mover":Te="msup"}var Ot=new Ht.MathNode(Te,fe);return Ot}}),un({type:"atom",htmlBuilder:function(u,d){return bt.mathsym(u.text,u.mode,d,["m"+u.family])},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[$n(u.text,u.mode)]);if(u.family==="bin"){var v=Ei(u,d);v==="bold-italic"&&f.setAttribute("mathvariant",v)}else u.family==="punct"?f.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&f.setAttribute("stretchy","false");return f}});var Ca={mi:"italic",mn:"normal",mtext:"normal"};un({type:"mathord",htmlBuilder:function(u,d){return bt.makeOrd(u,d,"mathord")},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mi",[$n(u.text,u.mode,d)]),v=Ei(u,d)||"italic";return v!==Ca[f.type]&&f.setAttribute("mathvariant",v),f}}),un({type:"textord",htmlBuilder:function(u,d){return bt.makeOrd(u,d,"textord")},mathmlBuilder:function(u,d){var f=$n(u.text,u.mode,d),v=Ei(u,d)||"normal",I;return u.mode==="text"?I=new Ht.MathNode("mtext",[f]):/[0-9]/.test(u.text)?I=new Ht.MathNode("mn",[f]):u.text==="\\prime"?I=new Ht.MathNode("mo",[f]):I=new Ht.MathNode("mi",[f]),v!==Ca[I.type]&&I.setAttribute("mathvariant",v),I}});var Ws={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Is={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};un({type:"spacing",htmlBuilder:function(u,d){if(Is.hasOwnProperty(u.text)){var f=Is[u.text].className||"";if(u.mode==="text"){var v=bt.makeOrd(u,d,"textord");return v.classes.push(f),v}else return bt.makeSpan(["mspace",f],[bt.mathsym(u.text,u.mode,d)],d)}else{if(Ws.hasOwnProperty(u.text))return bt.makeSpan(["mspace",Ws[u.text]],[],d);throw new m('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,d){var f;if(Is.hasOwnProperty(u.text))f=new Ht.MathNode("mtext",[new Ht.TextNode("\xA0")]);else{if(Ws.hasOwnProperty(u.text))return new Ht.MathNode("mspace");throw new m('Unknown type of space "'+u.text+'"')}return f}});var Rs=function(){var u=new Ht.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};un({type:"tag",mathmlBuilder:function(u,d){var f=new Ht.MathNode("mtable",[new Ht.MathNode("mtr",[Rs(),new Ht.MathNode("mtd",[qn(u.body,d)]),Rs(),new Ht.MathNode("mtd",[qn(u.tag,d)])])]);return f.setAttribute("width","100%"),f}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Da={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},ca=function(u,d){var f=u.font;return f?Va[f]?d.withTextFontFamily(Va[f]):Da[f]?d.withTextFontWeight(Da[f]):d.withTextFontShape(Za[f]):d};nr({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,d){var f=u.parser,v=u.funcName,I=d[0];return{type:"text",mode:f.mode,body:on(I),font:v}},htmlBuilder:function(u,d){var f=ca(u,d),v=cn(u.body,f,!0);return bt.makeSpan(["mord","text"],bt.tryCombineChars(v),f)},mathmlBuilder:function(u,d){var f=ca(u,d);return qn(u.body,f)}}),nr({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"underline",mode:f.mode,body:d[0]}},htmlBuilder:function(u,d){var f=Pr(u.body,d),v=bt.makeLineSpan("underline-line",d),I=d.fontMetrics().defaultRuleThickness,$=bt.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:I},{type:"elem",elem:v},{type:"kern",size:3*I},{type:"elem",elem:f}]},d);return bt.makeSpan(["mord","underline"],[$],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new Ht.MathNode("munder",[xr(u.body,d),f]);return v.setAttribute("accentunder","true"),v}}),nr({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,d,f){throw new m("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,d){for(var f=Ya(u),v=[],I=d.havingStyle(d.style.text()),$=0;$<f.length;$++){var fe=f[$];fe==="~"&&(fe="\\textasciitilde"),v.push(bt.makeSymbol(fe,"Typewriter-Regular",u.mode,I,["mord","texttt"]))}return bt.makeSpan(["mord","text"].concat(I.sizingClasses(d)),bt.tryCombineChars(v),I)},mathmlBuilder:function(u,d){var f=new Ht.TextNode(Ya(u)),v=new Ht.MathNode("mtext",[f]);return v.setAttribute("mathvariant","monospace"),v}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},ha=ci,Vs=ha,Ia=`[ \r
|
|
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Ia+"*",qa=new RegExp("^("+Ra+")"+Ia+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),ka="("+Ia+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Xa+")"),Qa=function(){function U(d,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=d,this.settings=f,this.tokenRegex=new RegExp(ka,"g"),this.catcodes={"%":14}}var u=U.prototype;return u.setCatcode=function(f,v){this.catcodes[f]=v},u.lex=function(){var f=this.input,v=this.tokenRegex.lastIndex;if(v===f.length)return new pe("EOF",new xe(this,v,v));var I=this.tokenRegex.exec(f);if(I===null||I.index!==v)throw new m("Unexpected character: '"+f[v]+"'",new pe(f[v],new xe(this,v,v+1)));var $=I[2]||" ";if(this.catcodes[$]===14){var fe=f.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return fe===-1?(this.tokenRegex.lastIndex=f.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=fe+1,this.lex()}var Te=$.match(qa);return Te&&($=Te[1]),new pe($,new xe(this,v,this.tokenRegex.lastIndex))},U}(),ko=function(){function U(d,f){d===void 0&&(d={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=d,this.undefStack=[]}var u=U.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new m("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var v in f)f.hasOwnProperty(v)&&(f[v]===void 0?delete this.current[v]:this.current[v]=f[v])},u.has=function(f){return this.current.hasOwnProperty(f)||this.builtins.hasOwnProperty(f)},u.get=function(f){return this.current.hasOwnProperty(f)?this.current[f]:this.builtins[f]},u.set=function(f,v,I){if(I===void 0&&(I=!1),I){for(var $=0;$<this.undefStack.length;$++)delete this.undefStack[$][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=v)}else{var fe=this.undefStack[this.undefStack.length-1];fe&&!fe.hasOwnProperty(f)&&(fe[f]=this.current[f])}this.current[f]=v},U}(),Ja={},Po=Ja;function Me(U,u){Ja[U]=u}Me("\\@firstoftwo",function(U){var u=U.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Me("\\@secondoftwo",function(U){var u=U.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Me("\\@ifnextchar",function(U){var u=U.consumeArgs(3),d=U.future();return u[0].length===1&&u[0][0].text===d.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),Me("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Me("\\TextOrMath",function(U){var u=U.consumeArgs(2);return U.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};Me("\\char",function(U){var u=U.popToken(),d,f="";if(u.text==="'")d=8,u=U.popToken();else if(u.text==='"')d=16,u=U.popToken();else if(u.text==="`")if(u=U.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new m("\\char` missing argument");f=u.text.charCodeAt(0)}else d=10;if(d){if(f=eo[u.text],f==null||f>=d)throw new m("Invalid base-"+d+" digit "+u.text);for(var v;(v=eo[U.future().text])!=null&&v<d;)f*=d,f+=v,U.popToken()}return"\\@char{"+f+"}"});var Pa=function(u,d){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new m("\\gdef's first argument must be a macro name");var v=f[0].text,I=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new m('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new m('Invalid argument number "'+f[0].text+'"');if(I++,parseInt(f[0].text)!==I)throw new m('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(v,{tokens:f,numArgs:I},d),""};Me("\\gdef",function(U){return Pa(U,!0)}),Me("\\def",function(U){return Pa(U,!1)}),Me("\\global",function(U){var u=U.consumeArgs(1)[0];if(u.length!==1)throw new m("Invalid command after \\global");var d=u[0].text;if(d==="\\def")return Pa(U,!0);throw new m("Invalid command '"+d+"' after \\global")});var Oa=function(u,d,f){var v=u.consumeArgs(1)[0];if(v.length!==1)throw new m("\\newcommand's first argument must be a macro name");var I=v[0].text,$=u.isDefined(I);if($&&!d)throw new m("\\newcommand{"+I+"} attempting to redefine "+(I+"; use \\renewcommand"));if(!$&&!f)throw new m("\\renewcommand{"+I+"} when command "+I+" does not yet exist; use \\newcommand");var fe=0;if(v=u.consumeArgs(1)[0],v.length===1&&v[0].text==="["){for(var Te="",Ke=u.expandNextToken();Ke.text!=="]"&&Ke.text!=="EOF";)Te+=Ke.text,Ke=u.expandNextToken();if(!Te.match(/^\s*[0-9]+\s*$/))throw new m("Invalid number of arguments: "+Te);fe=parseInt(Te),v=u.consumeArgs(1)[0]}return u.macros.set(I,{tokens:v,numArgs:fe}),""};Me("\\newcommand",function(U){return Oa(U,!1,!0)}),Me("\\renewcommand",function(U){return Oa(U,!0,!1)}),Me("\\providecommand",function(U){return Oa(U,!0,!0)}),Me("\\bgroup","{"),Me("\\egroup","}"),Me("\\lq","`"),Me("\\rq","'"),Me("\\aa","\\r a"),Me("\\AA","\\r A"),Me("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Me("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Me("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Me("\u212C","\\mathscr{B}"),Me("\u2130","\\mathscr{E}"),Me("\u2131","\\mathscr{F}"),Me("\u210B","\\mathscr{H}"),Me("\u2110","\\mathscr{I}"),Me("\u2112","\\mathscr{L}"),Me("\u2133","\\mathscr{M}"),Me("\u211B","\\mathscr{R}"),Me("\u212D","\\mathfrak{C}"),Me("\u210C","\\mathfrak{H}"),Me("\u2128","\\mathfrak{Z}"),Me("\\Bbbk","\\Bbb{k}"),Me("\xB7","\\cdotp"),Me("\\llap","\\mathllap{\\textrm{#1}}"),Me("\\rlap","\\mathrlap{\\textrm{#1}}"),Me("\\clap","\\mathclap{\\textrm{#1}}"),Me("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Me("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Me("\\ne","\\neq"),Me("\u2260","\\neq"),Me("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Me("\u2209","\\notin"),Me("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Me("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Me("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Me("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Me("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Me("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Me("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Me("\u27C2","\\perp"),Me("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Me("\u220C","\\notni"),Me("\u231C","\\ulcorner"),Me("\u231D","\\urcorner"),Me("\u231E","\\llcorner"),Me("\u231F","\\lrcorner"),Me("\xA9","\\copyright"),Me("\xAE","\\textregistered"),Me("\uFE0F","\\textregistered"),Me("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Me("\u22EE","\\vdots"),Me("\\varGamma","\\mathit{\\Gamma}"),Me("\\varDelta","\\mathit{\\Delta}"),Me("\\varTheta","\\mathit{\\Theta}"),Me("\\varLambda","\\mathit{\\Lambda}"),Me("\\varXi","\\mathit{\\Xi}"),Me("\\varPi","\\mathit{\\Pi}"),Me("\\varSigma","\\mathit{\\Sigma}"),Me("\\varUpsilon","\\mathit{\\Upsilon}"),Me("\\varPhi","\\mathit{\\Phi}"),Me("\\varPsi","\\mathit{\\Psi}"),Me("\\varOmega","\\mathit{\\Omega}"),Me("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Me("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Me("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Me("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Me("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Me("\\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"};Me("\\dots",function(U){var u="\\dotso",d=U.expandAfterFuture().text;return d in to?u=to[d]:(d.substr(0,4)==="\\not"||d in Ge.math&&V.contains(["bin","rel"],Ge.math[d].group))&&(u="\\dotsb"),u});var Ls={")":!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};Me("\\dotso",function(U){var u=U.future().text;return u in Ls?"\\ldots\\,":"\\ldots"}),Me("\\dotsc",function(U){var u=U.future().text;return u in Ls&&u!==","?"\\ldots\\,":"\\ldots"}),Me("\\cdots",function(U){var u=U.future().text;return u in Ls?"\\@cdots\\,":"\\@cdots"}),Me("\\dotsb","\\cdots"),Me("\\dotsm","\\cdots"),Me("\\dotsi","\\!\\cdots"),Me("\\dotsx","\\ldots\\,"),Me("\\DOTSI","\\relax"),Me("\\DOTSB","\\relax"),Me("\\DOTSX","\\relax"),Me("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Me("\\,","\\tmspace+{3mu}{.1667em}"),Me("\\thinspace","\\,"),Me("\\>","\\mskip{4mu}"),Me("\\:","\\tmspace+{4mu}{.2222em}"),Me("\\medspace","\\:"),Me("\\;","\\tmspace+{5mu}{.2777em}"),Me("\\thickspace","\\;"),Me("\\!","\\tmspace-{3mu}{.1667em}"),Me("\\negthinspace","\\!"),Me("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Me("\\negthickspace","\\tmspace-{5mu}{.277em}"),Me("\\enspace","\\kern.5em "),Me("\\enskip","\\hskip.5em\\relax"),Me("\\quad","\\hskip1em\\relax"),Me("\\qquad","\\hskip2em\\relax"),Me("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Me("\\tag@paren","\\tag@literal{({#1})}"),Me("\\tag@literal",function(U){if(U.macros.get("\\df@tag"))throw new m("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Me("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Me("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Me("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Me("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Me("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Me("\\\\","\\newline"),Me("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ro=nt["Main-Regular"][84][1]-.7*nt["Main-Regular"][65][1]+"em";Me("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ro+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Me("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ro+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Me("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Me("\\@hspace","\\hskip #1\\relax"),Me("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Me("\\ordinarycolon",":"),Me("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Me("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Me("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Me("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Me("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Me("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Me("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Me("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Me("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Me("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Me("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Me("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Me("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Me("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Me("\u2237","\\dblcolon"),Me("\u2239","\\eqcolon"),Me("\u2254","\\coloneqq"),Me("\u2255","\\eqqcolon"),Me("\u2A74","\\Coloneqq"),Me("\\ratio","\\vcentcolon"),Me("\\coloncolon","\\dblcolon"),Me("\\colonequals","\\coloneqq"),Me("\\coloncolonequals","\\Coloneqq"),Me("\\equalscolon","\\eqqcolon"),Me("\\equalscoloncolon","\\Eqqcolon"),Me("\\colonminus","\\coloneq"),Me("\\coloncolonminus","\\Coloneq"),Me("\\minuscolon","\\eqcolon"),Me("\\minuscoloncolon","\\Eqcolon"),Me("\\coloncolonapprox","\\Colonapprox"),Me("\\coloncolonsim","\\Colonsim"),Me("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Me("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Me("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Me("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Me("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Me("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Me("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Me("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Me("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Me("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Me("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Me("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Me("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Me("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Me("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Me("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Me("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Me("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Me("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Me("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Me("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Me("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Me("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Me("\u27E6","\\llbracket"),Me("\u27E7","\\rrbracket"),Me("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Me("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Me("\u2983","\\lBrace"),Me("\u2984","\\rBrace"),Me("\\darr","\\downarrow"),Me("\\dArr","\\Downarrow"),Me("\\Darr","\\Downarrow"),Me("\\lang","\\langle"),Me("\\rang","\\rangle"),Me("\\uarr","\\uparrow"),Me("\\uArr","\\Uparrow"),Me("\\Uarr","\\Uparrow"),Me("\\N","\\mathbb{N}"),Me("\\R","\\mathbb{R}"),Me("\\Z","\\mathbb{Z}"),Me("\\alef","\\aleph"),Me("\\alefsym","\\aleph"),Me("\\Alpha","\\mathrm{A}"),Me("\\Beta","\\mathrm{B}"),Me("\\bull","\\bullet"),Me("\\Chi","\\mathrm{X}"),Me("\\clubs","\\clubsuit"),Me("\\cnums","\\mathbb{C}"),Me("\\Complex","\\mathbb{C}"),Me("\\Dagger","\\ddagger"),Me("\\diamonds","\\diamondsuit"),Me("\\empty","\\emptyset"),Me("\\Epsilon","\\mathrm{E}"),Me("\\Eta","\\mathrm{H}"),Me("\\exist","\\exists"),Me("\\harr","\\leftrightarrow"),Me("\\hArr","\\Leftrightarrow"),Me("\\Harr","\\Leftrightarrow"),Me("\\hearts","\\heartsuit"),Me("\\image","\\Im"),Me("\\infin","\\infty"),Me("\\Iota","\\mathrm{I}"),Me("\\isin","\\in"),Me("\\Kappa","\\mathrm{K}"),Me("\\larr","\\leftarrow"),Me("\\lArr","\\Leftarrow"),Me("\\Larr","\\Leftarrow"),Me("\\lrarr","\\leftrightarrow"),Me("\\lrArr","\\Leftrightarrow"),Me("\\Lrarr","\\Leftrightarrow"),Me("\\Mu","\\mathrm{M}"),Me("\\natnums","\\mathbb{N}"),Me("\\Nu","\\mathrm{N}"),Me("\\Omicron","\\mathrm{O}"),Me("\\plusmn","\\pm"),Me("\\rarr","\\rightarrow"),Me("\\rArr","\\Rightarrow"),Me("\\Rarr","\\Rightarrow"),Me("\\real","\\Re"),Me("\\reals","\\mathbb{R}"),Me("\\Reals","\\mathbb{R}"),Me("\\Rho","\\mathrm{P}"),Me("\\sdot","\\cdot"),Me("\\sect","\\S"),Me("\\spades","\\spadesuit"),Me("\\sub","\\subset"),Me("\\sube","\\subseteq"),Me("\\supe","\\supseteq"),Me("\\Tau","\\mathrm{T}"),Me("\\thetasym","\\vartheta"),Me("\\weierp","\\wp"),Me("\\Zeta","\\mathrm{Z}"),Me("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Me("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Me("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Me("\\blue","\\textcolor{##6495ed}{#1}"),Me("\\orange","\\textcolor{##ffa500}{#1}"),Me("\\pink","\\textcolor{##ff00af}{#1}"),Me("\\red","\\textcolor{##df0030}{#1}"),Me("\\green","\\textcolor{##28ae7b}{#1}"),Me("\\gray","\\textcolor{gray}{#1}"),Me("\\purple","\\textcolor{##9d38bd}{#1}"),Me("\\blueA","\\textcolor{##ccfaff}{#1}"),Me("\\blueB","\\textcolor{##80f6ff}{#1}"),Me("\\blueC","\\textcolor{##63d9ea}{#1}"),Me("\\blueD","\\textcolor{##11accd}{#1}"),Me("\\blueE","\\textcolor{##0c7f99}{#1}"),Me("\\tealA","\\textcolor{##94fff5}{#1}"),Me("\\tealB","\\textcolor{##26edd5}{#1}"),Me("\\tealC","\\textcolor{##01d1c1}{#1}"),Me("\\tealD","\\textcolor{##01a995}{#1}"),Me("\\tealE","\\textcolor{##208170}{#1}"),Me("\\greenA","\\textcolor{##b6ffb0}{#1}"),Me("\\greenB","\\textcolor{##8af281}{#1}"),Me("\\greenC","\\textcolor{##74cf70}{#1}"),Me("\\greenD","\\textcolor{##1fab54}{#1}"),Me("\\greenE","\\textcolor{##0d923f}{#1}"),Me("\\goldA","\\textcolor{##ffd0a9}{#1}"),Me("\\goldB","\\textcolor{##ffbb71}{#1}"),Me("\\goldC","\\textcolor{##ff9c39}{#1}"),Me("\\goldD","\\textcolor{##e07d10}{#1}"),Me("\\goldE","\\textcolor{##a75a05}{#1}"),Me("\\redA","\\textcolor{##fca9a9}{#1}"),Me("\\redB","\\textcolor{##ff8482}{#1}"),Me("\\redC","\\textcolor{##f9685d}{#1}"),Me("\\redD","\\textcolor{##e84d39}{#1}"),Me("\\redE","\\textcolor{##bc2612}{#1}"),Me("\\maroonA","\\textcolor{##ffbde0}{#1}"),Me("\\maroonB","\\textcolor{##ff92c6}{#1}"),Me("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Me("\\maroonD","\\textcolor{##ca337c}{#1}"),Me("\\maroonE","\\textcolor{##9e034e}{#1}"),Me("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Me("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Me("\\purpleC","\\textcolor{##aa87ff}{#1}"),Me("\\purpleD","\\textcolor{##7854ab}{#1}"),Me("\\purpleE","\\textcolor{##543b78}{#1}"),Me("\\mintA","\\textcolor{##f5f9e8}{#1}"),Me("\\mintB","\\textcolor{##edf2df}{#1}"),Me("\\mintC","\\textcolor{##e0e5cc}{#1}"),Me("\\grayA","\\textcolor{##f6f7f7}{#1}"),Me("\\grayB","\\textcolor{##f0f1f2}{#1}"),Me("\\grayC","\\textcolor{##e3e5e6}{#1}"),Me("\\grayD","\\textcolor{##d6d8da}{#1}"),Me("\\grayE","\\textcolor{##babec2}{#1}"),Me("\\grayF","\\textcolor{##888d93}{#1}"),Me("\\grayG","\\textcolor{##626569}{#1}"),Me("\\grayH","\\textcolor{##3b3e40}{#1}"),Me("\\grayI","\\textcolor{##21242c}{#1}"),Me("\\kaBlue","\\textcolor{##314453}{#1}"),Me("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},no=function(){function U(d,f,v){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=f,this.expansionCount=0,this.feed(d),this.macros=new ko(Po,f.macros),this.mode=v,this.stack=[]}var u=U.prototype;return u.feed=function(f){this.lexer=new Qa(f,this.settings)},u.switchMode=function(f){this.mode=f},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(f){this.stack.push(f)},u.pushTokens=function(f){var v;(v=this.stack).push.apply(v,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var v=[],I=0;I<f;++I){this.consumeSpaces();var $=this.popToken();if($.text==="{"){for(var fe=[],Te=1;Te!==0;){var Ke=this.popToken();if(fe.push(Ke),Ke.text==="{")++Te;else if(Ke.text==="}")--Te;else if(Ke.text==="EOF")throw new m("End of input in macro argument",$)}fe.pop(),fe.reverse(),v[I]=fe}else{if($.text==="EOF")throw new m("End of input expecting macro argument");v[I]=[$]}}return v},u.expandOnce=function(){var f=this.popToken(),v=f.text,I=this._getExpansion(v);if(I==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new m("Too many expansions: infinite loop or need to increase maxExpand setting");var $=I.tokens;if(I.numArgs){var fe=this.consumeArgs(I.numArgs);$=$.slice();for(var Te=$.length-1;Te>=0;--Te){var Ke=$[Te];if(Ke.text==="#"){if(Te===0)throw new m("Incomplete placeholder at end of macro body",Ke);if(Ke=$[--Te],Ke.text==="#")$.splice(Te+1,1);else if(/^[1-9]$/.test(Ke.text)){var ot;(ot=$).splice.apply(ot,[Te,2].concat(fe[+Ke.text-1]))}else throw new m("Not a valid argument number",Ke)}}}return this.pushTokens($),$},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof pe)if(f.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(f){if(this.macros.get(f)){var v=[],I=this.stack.length;for(this.pushToken(new pe(f));this.stack.length>I;){var $=this.expandOnce();$ instanceof pe&&v.push(this.stack.pop())}return v}},u.expandMacroAsText=function(f){var v=this.expandMacro(f);return v&&v.map(function(I){return I.text}).join("")},u._getExpansion=function(f){var v=this.macros.get(f);if(v==null)return v;var I=typeof v=="function"?v(this):v;if(typeof I=="string"){var $=0;if(I.indexOf("#")!==-1)for(var fe=I.replace(/##/g,"");fe.indexOf("#"+($+1))!==-1;)++$;for(var Te=new Qa(I,this.settings),Ke=[],ot=Te.lex();ot.text!=="EOF";)Ke.push(ot),ot=Te.lex();Ke.reverse();var yt={tokens:Ke,numArgs:$};return yt}return I},u.isDefined=function(f){return this.macros.has(f)||Vs.hasOwnProperty(f)||Ge.math.hasOwnProperty(f)||Ge.text.hasOwnProperty(f)||Ma.hasOwnProperty(f)},U}(),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"}},da={\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"},li=function(){function U(d,f){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(d,f,this.mode),this.settings=f,this.leftrightDepth=0}var u=U.prototype;return u.expect=function(f,v){if(v===void 0&&(v=!0),this.fetch().text!==f)throw new m("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());v&&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(f){this.mode=f,this.gullet.switchMode(f)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var f=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),f},u.parseExpression=function(f,v){for(var I=[];;){this.mode==="math"&&this.consumeSpaces();var $=this.fetch();if(U.endOfExpression.indexOf($.text)!==-1||v&&$.text===v||f&&Vs[$.text]&&Vs[$.text].infix)break;var fe=this.parseAtom(v);if(!fe)break;I.push(fe)}return this.mode==="text"&&this.formLigatures(I),this.handleInfixNodes(I)},u.handleInfixNodes=function(f){for(var v=-1,I,$=0;$<f.length;$++){var fe=Kr(f[$],"infix");if(fe){if(v!==-1)throw new m("only one infix operator per group",fe.token);v=$,I=fe.replaceWith}}if(v!==-1&&I){var Te,Ke,ot=f.slice(0,v),yt=f.slice(v+1);ot.length===1&&ot[0].type==="ordgroup"?Te=ot[0]:Te={type:"ordgroup",mode:this.mode,body:ot},yt.length===1&&yt[0].type==="ordgroup"?Ke=yt[0]:Ke={type:"ordgroup",mode:this.mode,body:yt};var Ot;return I==="\\\\abovefrac"?Ot=this.callFunction(I,[Te,f[v],Ke],[]):Ot=this.callFunction(I,[Te,Ke],[]),[Ot]}else return f},u.handleSupSubscript=function(f){var v=this.fetch(),I=v.text;this.consume();var $=this.parseGroup(f,!1,U.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!$)throw new m("Expected group after '"+I+"'",v);return $},u.formatUnsupportedCmd=function(f){for(var v=[],I=0;I<f.length;I++)v.push({type:"textord",mode:"text",text:f[I]});var $={type:"text",mode:this.mode,body:v},fe={type:"color",mode:this.mode,color:this.settings.errorColor,body:[$]};return fe},u.parseAtom=function(f){var v=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return v;for(var I,$;;){this.consumeSpaces();var fe=this.fetch();if(fe.text==="\\limits"||fe.text==="\\nolimits"){var Te=Kr(v,"op");if(Te){var Ke=fe.text==="\\limits";Te.limits=Ke,Te.alwaysHandleSupSub=!0}else if(Te=Kr(v,"operatorname"),Te&&Te.alwaysHandleSupSub){var ot=fe.text==="\\limits";Te.limits=ot}else throw new m("Limit controls must follow a math operator",fe);this.consume()}else if(fe.text==="^"){if(I)throw new m("Double superscript",fe);I=this.handleSupSubscript("superscript")}else if(fe.text==="_"){if($)throw new m("Double subscript",fe);$=this.handleSupSubscript("subscript")}else if(fe.text==="'"){if(I)throw new m("Double superscript",fe);var yt={type:"textord",mode:this.mode,text:"\\prime"},Ot=[yt];for(this.consume();this.fetch().text==="'";)Ot.push(yt),this.consume();this.fetch().text==="^"&&Ot.push(this.handleSupSubscript("superscript")),I={type:"ordgroup",mode:this.mode,body:Ot}}else break}return I||$?{type:"supsub",mode:this.mode,base:v,sup:I,sub:$}:v},u.parseFunction=function(f,v,I){var $=this.fetch(),fe=$.text,Te=Vs[fe];if(!Te)return null;if(this.consume(),I!=null&&Te.greediness<=I)throw new m("Got function '"+fe+"' with no arguments"+(v?" as "+v:""),$);if(this.mode==="text"&&!Te.allowedInText)throw new m("Can't use function '"+fe+"' in text mode",$);if(this.mode==="math"&&Te.allowedInMath===!1)throw new m("Can't use function '"+fe+"' in math mode",$);var Ke=this.parseArguments(fe,Te),ot=Ke.args,yt=Ke.optArgs;return this.callFunction(fe,ot,yt,$,f)},u.callFunction=function(f,v,I,$,fe){var Te={funcName:f,parser:this,token:$,breakOnTokenText:fe},Ke=Vs[f];if(Ke&&Ke.handler)return Ke.handler(Te,v,I);throw new m("No function handler for "+f)},u.parseArguments=function(f,v){var I=v.numArgs+v.numOptionalArgs;if(I===0)return{args:[],optArgs:[]};for(var $=v.greediness,fe=[],Te=[],Ke=0;Ke<I;Ke++){var ot=v.argTypes&&v.argTypes[Ke],yt=Ke<v.numOptionalArgs,Ot=Ke>0&&!yt||Ke===0&&!yt&&this.mode==="math",Ut=this.parseGroupOfType("argument to '"+f+"'",ot,yt,$,Ot);if(!Ut){if(yt){Te.push(null);continue}throw new m("Expected group after '"+f+"'",this.fetch())}(yt?Te:fe).push(Ut)}return{args:fe,optArgs:Te}},u.parseGroupOfType=function(f,v,I,$,fe){switch(v){case"color":return fe&&this.consumeSpaces(),this.parseColorGroup(I);case"size":return fe&&this.consumeSpaces(),this.parseSizeGroup(I);case"url":return this.parseUrlGroup(I,fe);case"math":case"text":return this.parseGroup(f,I,$,void 0,v,fe);case"hbox":{var Te=this.parseGroup(f,I,$,void 0,"text",fe);if(!Te)return Te;var Ke={type:"styling",mode:Te.mode,body:[Te],style:"text"};return Ke}case"raw":{if(fe&&this.consumeSpaces(),I&&this.fetch().text==="{")return null;var ot=this.parseStringGroup("raw",I,!0);if(ot)return{type:"raw",mode:"text",string:ot.text};throw new m("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,I,$,void 0,void 0,fe);default:throw new m("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,v,I){var $=v?"[":"{",fe=v?"]":"}",Te=this.fetch();if(Te.text!==$){if(v)return null;if(I&&Te.text!=="EOF"&&/[^{}[\]]/.test(Te.text))return this.consume(),Te}var Ke=this.mode;this.mode="text",this.expect($);for(var ot="",yt=this.fetch(),Ot=0,Ut=yt,Wt;(Wt=this.fetch()).text!==fe||I&&Ot>0;){switch(Wt.text){case"EOF":throw new m("Unexpected end of input in "+f,yt.range(Ut,ot));case $:Ot++;break;case fe:Ot--;break}Ut=Wt,ot+=Ut.text,this.consume()}return this.expect(fe),this.mode=Ke,yt.range(Ut,ot)},u.parseRegexGroup=function(f,v){var I=this.mode;this.mode="text";for(var $=this.fetch(),fe=$,Te="",Ke;(Ke=this.fetch()).text!=="EOF"&&f.test(Te+Ke.text);)fe=Ke,Te+=fe.text,this.consume();if(Te==="")throw new m("Invalid "+v+": '"+$.text+"'",$);return this.mode=I,$.range(fe,Te)},u.parseColorGroup=function(f){var v=this.parseStringGroup("color",f);if(!v)return null;var I=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(v.text);if(!I)throw new m("Invalid color: '"+v.text+"'",v);var $=I[0];return/^[0-9a-f]{6}$/i.test($)&&($="#"+$),{type:"color-token",mode:this.mode,color:$}},u.parseSizeGroup=function(f){var v,I=!1;if(!f&&this.fetch().text!=="{"?v=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):v=this.parseStringGroup("size",f),!v)return null;!f&&v.text.length===0&&(v.text="0pt",I=!0);var $=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(v.text);if(!$)throw new m("Invalid size: '"+v.text+"'",v);var fe={number:+($[1]+$[2]),unit:$[3]};if(!fn(fe))throw new m("Invalid unit: '"+fe.unit+"'",v);return{type:"size",mode:this.mode,value:fe,isBlank:I}},u.parseUrlGroup=function(f,v){this.gullet.lexer.setCatcode("%",13);var I=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!I)return null;var $=I.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:$}},u.parseGroup=function(f,v,I,$,fe,Te){var Ke=this.mode;fe&&this.switchMode(fe),Te&&this.consumeSpaces();var ot=this.fetch(),yt=ot.text,Ot;if(v?yt==="[":yt==="{"||yt==="\\begingroup"){this.consume();var Ut=U.endOfGroup[yt];this.gullet.beginGroup();var Wt=this.parseExpression(!1,Ut),Jt=this.fetch();this.expect(Ut),this.gullet.endGroup(),Ot={type:"ordgroup",mode:this.mode,loc:xe.range(ot,Jt),body:Wt,semisimple:yt==="\\begingroup"||void 0}}else if(v)Ot=null;else if(Ot=this.parseFunction($,f,I)||this.parseSymbol(),Ot==null&&yt[0]==="\\"&&!Ma.hasOwnProperty(yt)){if(this.settings.throwOnError)throw new m("Undefined control sequence: "+yt,ot);Ot=this.formatUnsupportedCmd(yt),this.consume()}return fe&&this.switchMode(Ke),Ot},u.formLigatures=function(f){for(var v=f.length-1,I=0;I<v;++I){var $=f[I],fe=$.text;fe==="-"&&f[I+1].text==="-"&&(I+1<v&&f[I+2].text==="-"?(f.splice(I,3,{type:"textord",mode:"text",loc:xe.range($,f[I+2]),text:"---"}),v-=2):(f.splice(I,2,{type:"textord",mode:"text",loc:xe.range($,f[I+1]),text:"--"}),v-=1)),(fe==="'"||fe==="`")&&f[I+1].text===fe&&(f.splice(I,2,{type:"textord",mode:"text",loc:xe.range($,f[I+1]),text:fe+fe}),v-=1)}},u.parseSymbol=function(){var f=this.fetch(),v=f.text;if(/^\\verb[^a-zA-Z]/.test(v)){this.consume();var I=v.slice(5),$=I.charAt(0)==="*";if($&&(I=I.slice(1)),I.length<2||I.charAt(0)!==I.slice(-1))throw new m(`\\verb assertion failed --
|
|
please report what input caused this bug`);return I=I.slice(1,-1),{type:"verb",mode:"text",body:I,star:$}}da.hasOwnProperty(v[0])&&!Ge[this.mode][v[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+v[0]+'" used in math mode',f),v=da[v[0]]+v.substr(1));var fe=Lo.exec(v);fe&&(v=v.substring(0,fe.index),v==="i"?v="\u0131":v==="j"&&(v="\u0237"));var Te;if(Ge[this.mode][v]){this.settings.strict&&this.mode==="math"&&Dr.indexOf(v)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+v[0]+'" used in math mode',f);var Ke=Ge[this.mode][v].group,ot=xe.range(f),yt;if(vt.hasOwnProperty(Ke)){var Ot=Ke;yt={type:"atom",mode:this.mode,family:Ot,loc:ot,text:v}}else yt={type:Ke,mode:this.mode,loc:ot,text:v};Te=yt}else if(v.charCodeAt(0)>=128)this.settings.strict&&(Be(v.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+v[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+v[0]+'"'+(" ("+v.charCodeAt(0)+")"),f)),Te={type:"textord",mode:"text",loc:xe.range(f),text:v};else return null;if(this.consume(),fe)for(var Ut=0;Ut<fe[0].length;Ut++){var Wt=fe[0][Ut];if(!io[Wt])throw new m("Unknown accent ' "+Wt+"'",f);var Jt=io[Wt][this.mode];if(!Jt)throw new m("Accent "+Wt+" unsupported in "+this.mode+" mode",f);Te={type:"accent",mode:this.mode,loc:xe.range(f),label:Jt,isStretchy:!1,isShifty:!0,base:Te}}return Te},U}();li.endOfExpression=["}","\\endgroup","\\end","\\right","&"],li.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},li.SUPSUB_GREEDINESS=1;var Hi=function(u,d){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new li(u,d);delete f.gullet.macros.current["\\df@tag"];var v=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!d.displayMode)throw new m("\\tag works only in display equations");f.gullet.feed("\\df@tag"),v=[{type:"tag",mode:"text",body:v,tag:f.parse()}]}return v},Zs=Hi,so=function(u,d,f){d.textContent="";var v=Ba(u,f).toNode();d.appendChild(v)};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 m("KaTeX doesn't work in quirks mode.")});var fa=function(u,d){var f=Ba(u,d).toMarkup();return f},Oo=function(u,d){var f=new D(d);return Zs(u,f)},ao=function(u,d,f){if(f.throwOnError||!(u instanceof m))throw u;var v=bt.makeSpan(["katex-error"],[new J(d)]);return v.setAttribute("title",u.toString()),v.setAttribute("style","color:"+f.errorColor),v},Ba=function(u,d){var f=new D(d);try{var v=Zs(u,f);return Fn(v,u,f)}catch(I){return ao(I,u,f)}},Mo=function(u,d){var f=new D(d);try{var v=Zs(u,f);return An(v,u,f)}catch(I){return ao(I,u,f)}},oo={version:"0.11.1",render:so,renderToString:fa,ParseError:m,__parse:Oo,__renderToDomTree:Ba,__renderToHTMLTree:Mo,__setFontMetrics:mt,__defineSymbol:_,__defineMacro:Me,__domTree:{Span:He,Anchor:Ie,SymbolNode:J,SvgNode:me,PathNode:Le,LineNode:We}},Bo=S.default=oo}]).default})},32834:function(Gt){(function(it,S){Gt.exports=S()})(this,function(){"use strict";function it(Se,Ne){for(var ze=0;ze<Ne.length;ze++){var z=Ne[ze];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(Se,z.key,z)}}function S(Se,Ne,ze){return Ne&&it(Se.prototype,Ne),ze&&it(Se,ze),Se}function y(Se,Ne){if(Se){if(typeof Se=="string")return ue(Se,Ne);var ze=Object.prototype.toString.call(Se).slice(8,-1);if(ze==="Object"&&Se.constructor&&(ze=Se.constructor.name),ze==="Map"||ze==="Set")return Array.from(Se);if(ze==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ze))return ue(Se,Ne)}}function ue(Se,Ne){(Ne==null||Ne>Se.length)&&(Ne=Se.length);for(var ze=0,z=new Array(Ne);ze<Ne;ze++)z[ze]=Se[ze];return z}function xe(Se,Ne){var ze=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(ze)return(ze=ze.call(Se)).next.bind(ze);if(Array.isArray(Se)||(ze=y(Se))||Ne&&Se&&typeof Se.length=="number"){ze&&(Se=ze);var z=0;return function(){return z>=Se.length?{done:!0}:{done:!1,value:Se[z++]}}}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 pe={exports:{}};function H(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function m(Se){pe.exports.defaults=Se}pe.exports={defaults:H(),getDefaults:H,changeDefaults:m};var ie=/[&<>"']/,q=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,K=/[<>"']|&(?!#?\w+;)/g,M={"&":"&","<":"<",">":">",'"':""","'":"'"},b=function(Ne){return M[Ne]};function E(Se,Ne){if(Ne){if(ie.test(Se))return Se.replace(q,b)}else if(o.test(Se))return Se.replace(K,b);return Se}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(Se){return Se.replace(C,function(Ne,ze){return ze=ze.toLowerCase(),ze==="colon"?":":ze.charAt(0)==="#"?ze.charAt(1)==="x"?String.fromCharCode(parseInt(ze.substring(2),16)):String.fromCharCode(+ze.substring(1)):""})}var ne=/(^|[^\[])\^/g;function te(Se,Ne){Se=Se.source||Se,Ne=Ne||"";var ze={replace:function(Z,be){return be=be.source||be,be=be.replace(ne,"$1"),Se=Se.replace(Z,be),ze},getRegex:function(){return new RegExp(Se,Ne)}};return ze}var V=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function j(Se,Ne,ze){if(Se){var z;try{z=decodeURIComponent(P(ze)).replace(V,"").toLowerCase()}catch(Z){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}Ne&&!D.test(ze)&&(ze=he(Ne,ze));try{ze=encodeURI(ze).replace(/%25/g,"%")}catch(Z){return null}return ze}var O={},F=/^[^:]+:\/*[^/]*$/,se=/^([^:]+:)[\s\S]*$/,Ee=/^([^:]+:\/*[^/]*)[\s\S]*$/;function he(Se,Ne){O[" "+Se]||(F.test(Se)?O[" "+Se]=Se+"/":O[" "+Se]=tt(Se,"/",!0)),Se=O[" "+Se];var ze=Se.indexOf(":")===-1;return Ne.substring(0,2)==="//"?ze?Ne:Se.replace(se,"$1")+Ne:Ne.charAt(0)==="/"?ze?Ne:Se.replace(Ee,"$1")+Ne:Se+Ne}var Ce={exec:function(){}};function Pe(Se){for(var Ne=1,ze,z;Ne<arguments.length;Ne++){ze=arguments[Ne];for(z in ze)Object.prototype.hasOwnProperty.call(ze,z)&&(Se[z]=ze[z])}return Se}function _e(Se,Ne){var ze=Se.replace(/\|/g,function(be,ke,G){for(var ht=!1,de=ke;--de>=0&&G[de]==="\\";)ht=!ht;return ht?"|":" |"}),z=ze.split(/ \|/),Z=0;if(z.length>Ne)z.splice(Ne);else for(;z.length<Ne;)z.push("");for(;Z<z.length;Z++)z[Z]=z[Z].trim().replace(/\\\|/g,"|");return z}function tt(Se,Ne,ze){var z=Se.length;if(z===0)return"";for(var Z=0;Z<z;){var be=Se.charAt(z-Z-1);if(be===Ne&&!ze)Z++;else if(be!==Ne&&ze)Z++;else break}return Se.substr(0,z-Z)}function Q(Se,Ne){if(Se.indexOf(Ne[1])===-1)return-1;for(var ze=Se.length,z=0,Z=0;Z<ze;Z++)if(Se[Z]==="\\")Z++;else if(Se[Z]===Ne[0])z++;else if(Se[Z]===Ne[1]&&(z--,z<0))return Z;return-1}function N(Se){Se&&Se.sanitize&&!Se.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 Y(Se,Ne){if(Ne<1)return"";for(var ze="";Ne>1;)Ne&1&&(ze+=Se),Ne>>=1,Se+=Se;return ze+Se}var oe={escape:E,unescape:P,edit:te,cleanUrl:j,resolveUrl:he,noopTest:Ce,merge:Pe,splitCells:_e,rtrim:tt,findClosingBracket:Q,checkSanitizeDeprecation:N,repeatString:Y},ae=pe.exports.defaults,le=oe.rtrim,x=oe.splitCells,A=oe.escape,W=oe.findClosingBracket;function ge(Se,Ne,ze){var z=Ne.href,Z=Ne.title?A(Ne.title):null,be=Se[1].replace(/\\([\[\]])/g,"$1");return Se[0].charAt(0)!=="!"?{type:"link",raw:ze,href:z,title:Z,text:be}:{type:"image",raw:ze,href:z,title:Z,text:A(be)}}function Be(Se,Ne){var ze=Se.match(/^(\s+)(?:```)/);if(ze===null)return Ne;var z=ze[1];return Ne.split(`
|
|
`).map(function(Z){var be=Z.match(/^\s+/);if(be===null)return Z;var ke=be[0];return ke.length>=z.length?Z.slice(z.length):Z}).join(`
|
|
`)}var Xe=function(){function Se(ze){this.options=ze||ae}var Ne=Se.prototype;return Ne.space=function(z){var Z=this.rules.block.newline.exec(z);if(Z)return Z[0].length>1?{type:"space",raw:Z[0]}:{raw:`
|
|
`}},Ne.code=function(z){var Z=this.rules.block.code.exec(z);if(Z){var be=Z[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:Z[0],codeBlockStyle:"indented",text:this.options.pedantic?be:le(be,`
|
|
`)}}},Ne.fences=function(z){var Z=this.rules.block.fences.exec(z);if(Z){var be=Z[0],ke=Be(be,Z[3]||"");return{type:"code",raw:be,lang:Z[2]?Z[2].trim():Z[2],text:ke}}},Ne.heading=function(z){var Z=this.rules.block.heading.exec(z);if(Z){var be=Z[2].trim();if(/#$/.test(be)){var ke=le(be,"#");(this.options.pedantic||!ke||/ $/.test(ke))&&(be=ke.trim())}return{type:"heading",raw:Z[0],depth:Z[1].length,text:be}}},Ne.nptable=function(z){var Z=this.rules.block.nptable.exec(z);if(Z){var be={type:"table",header:x(Z[1].replace(/^ *| *\| *$/g,"")),align:Z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Z[3]?Z[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Z[0]};if(be.header.length===be.align.length){var ke=be.align.length,G;for(G=0;G<ke;G++)/^ *-+: *$/.test(be.align[G])?be.align[G]="right":/^ *:-+: *$/.test(be.align[G])?be.align[G]="center":/^ *:-+ *$/.test(be.align[G])?be.align[G]="left":be.align[G]=null;for(ke=be.cells.length,G=0;G<ke;G++)be.cells[G]=x(be.cells[G],be.header.length);return be}}},Ne.hr=function(z){var Z=this.rules.block.hr.exec(z);if(Z)return{type:"hr",raw:Z[0]}},Ne.blockquote=function(z){var Z=this.rules.block.blockquote.exec(z);if(Z){var be=Z[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Z[0],text:be}}},Ne.list=function(z){var Z=this.rules.block.list.exec(z);if(Z){var be=Z[0],ke=Z[2],G=ke.length>1,ht={type:"list",raw:be,ordered:G,start:G?+ke.slice(0,-1):"",loose:!1,items:[]},de=Z[0].match(this.rules.block.item),At=!1,$t,Kt,ar,Qt,Zt,Sr,Nr,Yt,wr,zt=de.length;ar=this.rules.block.listItemStart.exec(de[0]);for(var Rt=0;Rt<zt;Rt++){if($t=de[Rt],be=$t,this.options.pedantic||(wr=$t.match(new RegExp("\\n\\s*\\n {0,"+(ar[0].length-1)+"}\\S")),wr&&(Zt=$t.length-wr.index+de.slice(Rt+1).join(`
|
|
`).length,ht.raw=ht.raw.substring(0,ht.raw.length-Zt),$t=$t.substring(0,wr.index),be=$t,zt=Rt+1)),Rt!==zt-1){if(Qt=this.rules.block.listItemStart.exec(de[Rt+1]),this.options.pedantic?Qt[1].length>ar[1].length:Qt[1].length>=ar[0].length||Qt[1].length>3){de.splice(Rt,2,de[Rt]+(!this.options.pedantic&&Qt[1].length<ar[0].length&&!de[Rt].match(/\n$/)?"":`
|
|
`)+de[Rt+1]),Rt--,zt--;continue}else(!this.options.pedantic||this.options.smartLists?Qt[2][Qt[2].length-1]!==ke[ke.length-1]:G===(Qt[2].length===1))&&(Zt=de.slice(Rt+1).join(`
|
|
`).length,ht.raw=ht.raw.substring(0,ht.raw.length-Zt),Rt=zt-1);ar=Qt}Kt=$t.length,$t=$t.replace(/^ *([*+-]|\d+[.)]) ?/,""),~$t.indexOf(`
|
|
`)&&(Kt-=$t.length,$t=this.options.pedantic?$t.replace(/^ {1,4}/gm,""):$t.replace(new RegExp("^ {1,"+Kt+"}","gm"),"")),$t=le($t,`
|
|
`),Rt!==zt-1&&(be=be+`
|
|
`),Sr=At||/\n\n(?!\s*$)/.test(be),Rt!==zt-1&&(At=be.slice(-2)===`
|
|
|
|
`,Sr||(Sr=At)),Sr&&(ht.loose=!0),this.options.gfm&&(Nr=/^\[[ xX]\] /.test($t),Yt=void 0,Nr&&(Yt=$t[1]!==" ",$t=$t.replace(/^\[[ xX]\] +/,""))),ht.items.push({type:"list_item",raw:be,task:Nr,checked:Yt,loose:Sr,text:$t})}return ht}},Ne.html=function(z){var Z=this.rules.block.html.exec(z);if(Z)return{type:this.options.sanitize?"paragraph":"html",raw:Z[0],pre:!this.options.sanitizer&&(Z[1]==="pre"||Z[1]==="script"||Z[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Z[0]):A(Z[0]):Z[0]}},Ne.def=function(z){var Z=this.rules.block.def.exec(z);if(Z){Z[3]&&(Z[3]=Z[3].substring(1,Z[3].length-1));var be=Z[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:be,raw:Z[0],href:Z[2],title:Z[3]}}},Ne.table=function(z){var Z=this.rules.block.table.exec(z);if(Z){var be={type:"table",header:x(Z[1].replace(/^ *| *\| *$/g,"")),align:Z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Z[3]?Z[3].replace(/\n$/,"").split(`
|
|
`):[]};if(be.header.length===be.align.length){be.raw=Z[0];var ke=be.align.length,G;for(G=0;G<ke;G++)/^ *-+: *$/.test(be.align[G])?be.align[G]="right":/^ *:-+: *$/.test(be.align[G])?be.align[G]="center":/^ *:-+ *$/.test(be.align[G])?be.align[G]="left":be.align[G]=null;for(ke=be.cells.length,G=0;G<ke;G++)be.cells[G]=x(be.cells[G].replace(/^ *\| *| *\| *$/g,""),be.header.length);return be}}},Ne.lheading=function(z){var Z=this.rules.block.lheading.exec(z);if(Z)return{type:"heading",raw:Z[0],depth:Z[2].charAt(0)==="="?1:2,text:Z[1]}},Ne.paragraph=function(z){var Z=this.rules.block.paragraph.exec(z);if(Z)return{type:"paragraph",raw:Z[0],text:Z[1].charAt(Z[1].length-1)===`
|
|
`?Z[1].slice(0,-1):Z[1]}},Ne.text=function(z){var Z=this.rules.block.text.exec(z);if(Z)return{type:"text",raw:Z[0],text:Z[0]}},Ne.escape=function(z){var Z=this.rules.inline.escape.exec(z);if(Z)return{type:"escape",raw:Z[0],text:A(Z[1])}},Ne.tag=function(z,Z,be){var ke=this.rules.inline.tag.exec(z);if(ke)return!Z&&/^<a /i.test(ke[0])?Z=!0:Z&&/^<\/a>/i.test(ke[0])&&(Z=!1),!be&&/^<(pre|code|kbd|script)(\s|>)/i.test(ke[0])?be=!0:be&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ke[0])&&(be=!1),{type:this.options.sanitize?"text":"html",raw:ke[0],inLink:Z,inRawBlock:be,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ke[0]):A(ke[0]):ke[0]}},Ne.link=function(z){var Z=this.rules.inline.link.exec(z);if(Z){var be=Z[2].trim();if(!this.options.pedantic&&/^</.test(be)){if(!/>$/.test(be))return;var ke=le(be.slice(0,-1),"\\");if((be.length-ke.length)%2===0)return}else{var G=W(Z[2],"()");if(G>-1){var ht=Z[0].indexOf("!")===0?5:4,de=ht+Z[1].length+G;Z[2]=Z[2].substring(0,G),Z[0]=Z[0].substring(0,de).trim(),Z[3]=""}}var At=Z[2],$t="";if(this.options.pedantic){var Kt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(At);Kt&&(At=Kt[1],$t=Kt[3])}else $t=Z[3]?Z[3].slice(1,-1):"";return At=At.trim(),/^</.test(At)&&(this.options.pedantic&&!/>$/.test(be)?At=At.slice(1):At=At.slice(1,-1)),ge(Z,{href:At&&At.replace(this.rules.inline._escapes,"$1"),title:$t&&$t.replace(this.rules.inline._escapes,"$1")},Z[0])}},Ne.reflink=function(z,Z){var be;if((be=this.rules.inline.reflink.exec(z))||(be=this.rules.inline.nolink.exec(z))){var ke=(be[2]||be[1]).replace(/\s+/g," ");if(ke=Z[ke.toLowerCase()],!ke||!ke.href){var G=be[0].charAt(0);return{type:"text",raw:G,text:G}}return ge(be,ke,be[0])}},Ne.emStrong=function(z,Z,be){be===void 0&&(be="");var ke=this.rules.inline.emStrong.lDelim.exec(z);if(ke&&!(ke[3]&&be.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 G=ke[1]||ke[2]||"";if(!G||G&&(be===""||this.rules.inline.punctuation.exec(be))){var ht=ke[0].length-1,de,At,$t=ht,Kt=0,ar=ke[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ar.lastIndex=0,Z=Z.slice(-1*z.length+ht);(ke=ar.exec(Z))!=null;)if(de=ke[1]||ke[2]||ke[3]||ke[4]||ke[5]||ke[6],!!de){if(At=de.length,ke[3]||ke[4]){$t+=At;continue}else if((ke[5]||ke[6])&&ht%3&&!((ht+At)%3)){Kt+=At;continue}if($t-=At,!($t>0))return At=Math.min(At,At+$t+Kt),Math.min(ht,At)%2?{type:"em",raw:z.slice(0,ht+ke.index+At+1),text:z.slice(1,ht+ke.index+At)}:{type:"strong",raw:z.slice(0,ht+ke.index+At+1),text:z.slice(2,ht+ke.index+At-1)}}}}},Ne.codespan=function(z){var Z=this.rules.inline.code.exec(z);if(Z){var be=Z[2].replace(/\n/g," "),ke=/[^ ]/.test(be),G=/^ /.test(be)&&/ $/.test(be);return ke&&G&&(be=be.substring(1,be.length-1)),be=A(be,!0),{type:"codespan",raw:Z[0],text:be}}},Ne.br=function(z){var Z=this.rules.inline.br.exec(z);if(Z)return{type:"br",raw:Z[0]}},Ne.del=function(z){var Z=this.rules.inline.del.exec(z);if(Z)return{type:"del",raw:Z[0],text:Z[2]}},Ne.autolink=function(z,Z){var be=this.rules.inline.autolink.exec(z);if(be){var ke,G;return be[2]==="@"?(ke=A(this.options.mangle?Z(be[1]):be[1]),G="mailto:"+ke):(ke=A(be[1]),G=ke),{type:"link",raw:be[0],text:ke,href:G,tokens:[{type:"text",raw:ke,text:ke}]}}},Ne.url=function(z,Z){var be;if(be=this.rules.inline.url.exec(z)){var ke,G;if(be[2]==="@")ke=A(this.options.mangle?Z(be[0]):be[0]),G="mailto:"+ke;else{var ht;do ht=be[0],be[0]=this.rules.inline._backpedal.exec(be[0])[0];while(ht!==be[0]);ke=A(be[0]),be[1]==="www."?G="http://"+ke:G=ke}return{type:"link",raw:be[0],text:ke,href:G,tokens:[{type:"text",raw:ke,text:ke}]}}},Ne.inlineText=function(z,Z,be){var ke=this.rules.inline.text.exec(z);if(ke){var G;return Z?G=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ke[0]):A(ke[0]):ke[0]:G=A(this.options.smartypants?be(ke[0]):ke[0]),{type:"text",raw:ke[0],text:G}}},Se}(),Ve=oe.noopTest,Ze=oe.edit,$e=oe.merge,qe={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:Ve,table:Ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};qe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,qe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,qe.def=Ze(qe.def).replace("label",qe._label).replace("title",qe._title).getRegex(),qe.bullet=/(?:[*+-]|\d{1,9}[.)])/,qe.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,qe.item=Ze(qe.item,"gm").replace(/bull/g,qe.bullet).getRegex(),qe.listItemStart=Ze(/^( *)(bull) */).replace("bull",qe.bullet).getRegex(),qe.list=Ze(qe.list).replace(/bull/g,qe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+qe.def.source+")").getRegex(),qe._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",qe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,qe.html=Ze(qe.html,"i").replace("comment",qe._comment).replace("tag",qe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qe.paragraph=Ze(qe._paragraph).replace("hr",qe.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",qe._tag).getRegex(),qe.blockquote=Ze(qe.blockquote).replace("paragraph",qe.paragraph).getRegex(),qe.normal=$e({},qe),qe.gfm=$e({},qe.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*|$)"}),qe.gfm.nptable=Ze(qe.gfm.nptable).replace("hr",qe.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",qe._tag).getRegex(),qe.gfm.table=Ze(qe.gfm.table).replace("hr",qe.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",qe._tag).getRegex(),qe.pedantic=$e({},qe.normal,{html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qe._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:Ve,paragraph:Ze(qe.normal._paragraph).replace("hr",qe.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",qe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var je={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ve,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:Ve,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};je._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",je.punctuation=Ze(je.punctuation).replace(/punctuation/g,je._punctuation).getRegex(),je.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,je.escapedEmSt=/\\\*|\\_/g,je._comment=Ze(qe._comment).replace("(?:-->|$)","-->").getRegex(),je.emStrong.lDelim=Ze(je.emStrong.lDelim).replace(/punct/g,je._punctuation).getRegex(),je.emStrong.rDelimAst=Ze(je.emStrong.rDelimAst,"g").replace(/punct/g,je._punctuation).getRegex(),je.emStrong.rDelimUnd=Ze(je.emStrong.rDelimUnd,"g").replace(/punct/g,je._punctuation).getRegex(),je._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,je._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,je._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])?)+(?![-_])/,je.autolink=Ze(je.autolink).replace("scheme",je._scheme).replace("email",je._email).getRegex(),je._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,je.tag=Ze(je.tag).replace("comment",je._comment).replace("attribute",je._attribute).getRegex(),je._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,je._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,je._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,je.link=Ze(je.link).replace("label",je._label).replace("href",je._href).replace("title",je._title).getRegex(),je.reflink=Ze(je.reflink).replace("label",je._label).getRegex(),je.reflinkSearch=Ze(je.reflinkSearch,"g").replace("reflink",je.reflink).replace("nolink",je.nolink).getRegex(),je.normal=$e({},je),je.pedantic=$e({},je.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:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",je._label).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",je._label).getRegex()}),je.gfm=$e({},je.normal,{escape:Ze(je.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),je.gfm.url=Ze(je.gfm.url,"i").replace("email",je.gfm._extended_email).getRegex(),je.breaks=$e({},je.gfm,{br:Ze(je.br).replace("{2,}","*").getRegex(),text:Ze(je.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Et={block:qe,inline:je},Qe=Xe,wt=pe.exports.defaults,Fe=Et.block,st=Et.inline,Re=oe.repeatString;function we(Se){return Se.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 ce(Se){var Ne="",ze,z,Z=Se.length;for(ze=0;ze<Z;ze++)z=Se.charCodeAt(ze),Math.random()>.5&&(z="x"+z.toString(16)),Ne+="&#"+z+";";return Ne}var He=function(){function Se(ze){this.tokens=[],this.tokens.links=Object.create(null),this.options=ze||wt,this.options.tokenizer=this.options.tokenizer||new Qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:Fe.normal,inline:st.normal};this.options.pedantic?(z.block=Fe.pedantic,z.inline=st.pedantic):this.options.gfm&&(z.block=Fe.gfm,this.options.breaks?z.inline=st.breaks:z.inline=st.gfm),this.tokenizer.rules=z}Se.lex=function(z,Z){var be=new Se(Z);return be.lex(z)},Se.lexInline=function(z,Z){var be=new Se(Z);return be.inlineTokens(z)};var Ne=Se.prototype;return Ne.lex=function(z){return z=z.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},Ne.blockTokens=function(z,Z,be){Z===void 0&&(Z=[]),be===void 0&&(be=!0),this.options.pedantic&&(z=z.replace(/^ +$/gm,""));for(var ke,G,ht,de;z;){if(ke=this.tokenizer.space(z)){z=z.substring(ke.raw.length),ke.type&&Z.push(ke);continue}if(ke=this.tokenizer.code(z)){z=z.substring(ke.raw.length),de=Z[Z.length-1],de&&de.type==="paragraph"?(de.raw+=`
|
|
`+ke.raw,de.text+=`
|
|
`+ke.text):Z.push(ke);continue}if(ke=this.tokenizer.fences(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.heading(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.nptable(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.hr(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.blockquote(z)){z=z.substring(ke.raw.length),ke.tokens=this.blockTokens(ke.text,[],be),Z.push(ke);continue}if(ke=this.tokenizer.list(z)){for(z=z.substring(ke.raw.length),ht=ke.items.length,G=0;G<ht;G++)ke.items[G].tokens=this.blockTokens(ke.items[G].text,[],!1);Z.push(ke);continue}if(ke=this.tokenizer.html(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(be&&(ke=this.tokenizer.def(z))){z=z.substring(ke.raw.length),this.tokens.links[ke.tag]||(this.tokens.links[ke.tag]={href:ke.href,title:ke.title});continue}if(ke=this.tokenizer.table(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.lheading(z)){z=z.substring(ke.raw.length),Z.push(ke);continue}if(be&&(ke=this.tokenizer.paragraph(z))){z=z.substring(ke.raw.length),Z.push(ke);continue}if(ke=this.tokenizer.text(z)){z=z.substring(ke.raw.length),de=Z[Z.length-1],de&&de.type==="text"?(de.raw+=`
|
|
`+ke.raw,de.text+=`
|
|
`+ke.text):Z.push(ke);continue}if(z){var At="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return Z},Ne.inline=function(z){var Z,be,ke,G,ht,de,At=z.length;for(Z=0;Z<At;Z++)switch(de=z[Z],de.type){case"paragraph":case"text":case"heading":{de.tokens=[],this.inlineTokens(de.text,de.tokens);break}case"table":{for(de.tokens={header:[],cells:[]},G=de.header.length,be=0;be<G;be++)de.tokens.header[be]=[],this.inlineTokens(de.header[be],de.tokens.header[be]);for(G=de.cells.length,be=0;be<G;be++)for(ht=de.cells[be],de.tokens.cells[be]=[],ke=0;ke<ht.length;ke++)de.tokens.cells[be][ke]=[],this.inlineTokens(ht[ke],de.tokens.cells[be][ke]);break}case"blockquote":{this.inline(de.tokens);break}case"list":{for(G=de.items.length,be=0;be<G;be++)this.inline(de.items[be].tokens);break}}return z},Ne.inlineTokens=function(z,Z,be,ke){Z===void 0&&(Z=[]),be===void 0&&(be=!1),ke===void 0&&(ke=!1);var G,ht,de=z,At,$t,Kt;if(this.tokens.links){var ar=Object.keys(this.tokens.links);if(ar.length>0)for(;(At=this.tokenizer.rules.inline.reflinkSearch.exec(de))!=null;)ar.includes(At[0].slice(At[0].lastIndexOf("[")+1,-1))&&(de=de.slice(0,At.index)+"["+Re("a",At[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(At=this.tokenizer.rules.inline.blockSkip.exec(de))!=null;)de=de.slice(0,At.index)+"["+Re("a",At[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(At=this.tokenizer.rules.inline.escapedEmSt.exec(de))!=null;)de=de.slice(0,At.index)+"++"+de.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;z;){if($t||(Kt=""),$t=!1,G=this.tokenizer.escape(z)){z=z.substring(G.raw.length),Z.push(G);continue}if(G=this.tokenizer.tag(z,be,ke)){z=z.substring(G.raw.length),be=G.inLink,ke=G.inRawBlock;var Qt=Z[Z.length-1];Qt&&G.type==="text"&&Qt.type==="text"?(Qt.raw+=G.raw,Qt.text+=G.text):Z.push(G);continue}if(G=this.tokenizer.link(z)){z=z.substring(G.raw.length),G.type==="link"&&(G.tokens=this.inlineTokens(G.text,[],!0,ke)),Z.push(G);continue}if(G=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(G.raw.length);var Zt=Z[Z.length-1];G.type==="link"?(G.tokens=this.inlineTokens(G.text,[],!0,ke),Z.push(G)):Zt&&G.type==="text"&&Zt.type==="text"?(Zt.raw+=G.raw,Zt.text+=G.text):Z.push(G);continue}if(G=this.tokenizer.emStrong(z,de,Kt)){z=z.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],be,ke),Z.push(G);continue}if(G=this.tokenizer.codespan(z)){z=z.substring(G.raw.length),Z.push(G);continue}if(G=this.tokenizer.br(z)){z=z.substring(G.raw.length),Z.push(G);continue}if(G=this.tokenizer.del(z)){z=z.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],be,ke),Z.push(G);continue}if(G=this.tokenizer.autolink(z,ce)){z=z.substring(G.raw.length),Z.push(G);continue}if(!be&&(G=this.tokenizer.url(z,ce))){z=z.substring(G.raw.length),Z.push(G);continue}if(G=this.tokenizer.inlineText(z,ke,we)){z=z.substring(G.raw.length),G.raw.slice(-1)!=="_"&&(Kt=G.raw.slice(-1)),$t=!0,ht=Z[Z.length-1],ht&&ht.type==="text"?(ht.raw+=G.raw,ht.text+=G.text):Z.push(G);continue}if(z){var Sr="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(Sr);break}else throw new Error(Sr)}}return Z},S(Se,null,[{key:"rules",get:function(){return{block:Fe,inline:st}}}]),Se}(),Ie=pe.exports.defaults,De=oe.cleanUrl,L=oe.escape,J=function(){function Se(ze){this.options=ze||Ie}var Ne=Se.prototype;return Ne.code=function(z,Z,be){var ke=(Z||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(z,ke);G!=null&&G!==z&&(be=!0,z=G)}return z=z.replace(/\n$/,"")+`
|
|
`,ke?'<pre><code class="'+this.options.langPrefix+L(ke,!0)+'">'+(be?z:L(z,!0))+`</code></pre>
|
|
`:"<pre><code>"+(be?z:L(z,!0))+`</code></pre>
|
|
`},Ne.blockquote=function(z){return`<blockquote>
|
|
`+z+`</blockquote>
|
|
`},Ne.html=function(z){return z},Ne.heading=function(z,Z,be,ke){return this.options.headerIds?"<h"+Z+' id="'+this.options.headerPrefix+ke.slug(be)+'">'+z+"</h"+Z+`>
|
|
`:"<h"+Z+">"+z+"</h"+Z+`>
|
|
`},Ne.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Ne.list=function(z,Z,be){var ke=Z?"ol":"ul",G=Z&&be!==1?' start="'+be+'"':"";return"<"+ke+G+`>
|
|
`+z+"</"+ke+`>
|
|
`},Ne.listitem=function(z){return"<li>"+z+`</li>
|
|
`},Ne.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ne.paragraph=function(z){return"<p>"+z+`</p>
|
|
`},Ne.table=function(z,Z){return Z&&(Z="<tbody>"+Z+"</tbody>"),`<table>
|
|
<thead>
|
|
`+z+`</thead>
|
|
`+Z+`</table>
|
|
`},Ne.tablerow=function(z){return`<tr>
|
|
`+z+`</tr>
|
|
`},Ne.tablecell=function(z,Z){var be=Z.header?"th":"td",ke=Z.align?"<"+be+' align="'+Z.align+'">':"<"+be+">";return ke+z+"</"+be+`>
|
|
`},Ne.strong=function(z){return"<strong>"+z+"</strong>"},Ne.em=function(z){return"<em>"+z+"</em>"},Ne.codespan=function(z){return"<code>"+z+"</code>"},Ne.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ne.del=function(z){return"<del>"+z+"</del>"},Ne.link=function(z,Z,be){if(z=De(this.options.sanitize,this.options.baseUrl,z),z===null)return be;var ke='<a href="'+L(z)+'"';return Z&&(ke+=' title="'+Z+'"'),ke+=">"+be+"</a>",ke},Ne.image=function(z,Z,be){if(z=De(this.options.sanitize,this.options.baseUrl,z),z===null)return be;var ke='<img src="'+z+'" alt="'+be+'"';return Z&&(ke+=' title="'+Z+'"'),ke+=this.options.xhtml?"/>":">",ke},Ne.text=function(z){return z},Se}(),me=function(){function Se(){}var Ne=Se.prototype;return Ne.strong=function(z){return z},Ne.em=function(z){return z},Ne.codespan=function(z){return z},Ne.del=function(z){return z},Ne.html=function(z){return z},Ne.text=function(z){return z},Ne.link=function(z,Z,be){return""+be},Ne.image=function(z,Z,be){return""+be},Ne.br=function(){return""},Se}(),Le=function(){function Se(){this.seen={}}var Ne=Se.prototype;return Ne.serialize=function(z){return z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ne.getNextSafeSlug=function(z,Z){var be=z,ke=0;if(this.seen.hasOwnProperty(be)){ke=this.seen[z];do ke++,be=z+"-"+ke;while(this.seen.hasOwnProperty(be))}return Z||(this.seen[z]=ke,this.seen[be]=0),be},Ne.slug=function(z,Z){Z===void 0&&(Z={});var be=this.serialize(z);return this.getNextSafeSlug(be,Z.dryrun)},Se}(),We=J,Je=me,et=Le,nt=pe.exports.defaults,pt=oe.unescape,gt=function(){function Se(ze){this.options=ze||nt,this.options.renderer=this.options.renderer||new We,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Je,this.slugger=new et}Se.parse=function(z,Z){var be=new Se(Z);return be.parse(z)},Se.parseInline=function(z,Z){var be=new Se(Z);return be.parseInline(z)};var Ne=Se.prototype;return Ne.parse=function(z,Z){Z===void 0&&(Z=!0);var be="",ke,G,ht,de,At,$t,Kt,ar,Qt,Zt,Sr,Nr,Yt,wr,zt,Rt,kt,qt,or=z.length;for(ke=0;ke<or;ke++)switch(Zt=z[ke],Zt.type){case"space":continue;case"hr":{be+=this.renderer.hr();continue}case"heading":{be+=this.renderer.heading(this.parseInline(Zt.tokens),Zt.depth,pt(this.parseInline(Zt.tokens,this.textRenderer)),this.slugger);continue}case"code":{be+=this.renderer.code(Zt.text,Zt.lang,Zt.escaped);continue}case"table":{for(ar="",Kt="",de=Zt.header.length,G=0;G<de;G++)Kt+=this.renderer.tablecell(this.parseInline(Zt.tokens.header[G]),{header:!0,align:Zt.align[G]});for(ar+=this.renderer.tablerow(Kt),Qt="",de=Zt.cells.length,G=0;G<de;G++){for($t=Zt.tokens.cells[G],Kt="",At=$t.length,ht=0;ht<At;ht++)Kt+=this.renderer.tablecell(this.parseInline($t[ht]),{header:!1,align:Zt.align[ht]});Qt+=this.renderer.tablerow(Kt)}be+=this.renderer.table(ar,Qt);continue}case"blockquote":{Qt=this.parse(Zt.tokens),be+=this.renderer.blockquote(Qt);continue}case"list":{for(Sr=Zt.ordered,Nr=Zt.start,Yt=Zt.loose,de=Zt.items.length,Qt="",G=0;G<de;G++)zt=Zt.items[G],Rt=zt.checked,kt=zt.task,wr="",zt.task&&(qt=this.renderer.checkbox(Rt),Yt?zt.tokens.length>0&&zt.tokens[0].type==="text"?(zt.tokens[0].text=qt+" "+zt.tokens[0].text,zt.tokens[0].tokens&&zt.tokens[0].tokens.length>0&&zt.tokens[0].tokens[0].type==="text"&&(zt.tokens[0].tokens[0].text=qt+" "+zt.tokens[0].tokens[0].text)):zt.tokens.unshift({type:"text",text:qt}):wr+=qt),wr+=this.parse(zt.tokens,Yt),Qt+=this.renderer.listitem(wr,kt,Rt);be+=this.renderer.list(Qt,Sr,Nr);continue}case"html":{be+=this.renderer.html(Zt.text);continue}case"paragraph":{be+=this.renderer.paragraph(this.parseInline(Zt.tokens));continue}case"text":{for(Qt=Zt.tokens?this.parseInline(Zt.tokens):Zt.text;ke+1<or&&z[ke+1].type==="text";)Zt=z[++ke],Qt+=`
|
|
`+(Zt.tokens?this.parseInline(Zt.tokens):Zt.text);be+=Z?this.renderer.paragraph(Qt):Qt;continue}default:{var Dr='Token with "'+Zt.type+'" type was not found.';if(this.options.silent){console.error(Dr);return}else throw new Error(Dr)}}return be},Ne.parseInline=function(z,Z){Z=Z||this.renderer;var be="",ke,G,ht=z.length;for(ke=0;ke<ht;ke++)switch(G=z[ke],G.type){case"escape":{be+=Z.text(G.text);break}case"html":{be+=Z.html(G.text);break}case"link":{be+=Z.link(G.href,G.title,this.parseInline(G.tokens,Z));break}case"image":{be+=Z.image(G.href,G.title,G.text);break}case"strong":{be+=Z.strong(this.parseInline(G.tokens,Z));break}case"em":{be+=Z.em(this.parseInline(G.tokens,Z));break}case"codespan":{be+=Z.codespan(G.text);break}case"br":{be+=Z.br();break}case"del":{be+=Z.del(this.parseInline(G.tokens,Z));break}case"text":{be+=Z.text(G.text);break}default:{var de='Token with "'+G.type+'" type was not found.';if(this.options.silent){console.error(de);return}else throw new Error(de)}}return be},Se}(),mt=He,St=gt,Tt=Xe,Ye=J,vt=me,dt=Le,ve=oe.merge,Ge=oe.checkSanitizeDeprecation,_=oe.escape,w=pe.exports.getDefaults,ye=pe.exports.changeDefaults,B=pe.exports.defaults;function X(Se,Ne,ze){if(typeof Se=="undefined"||Se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");if(typeof Ne=="function"&&(ze=Ne,Ne=null),Ne=ve({},X.defaults,Ne||{}),Ge(Ne),ze){var z=Ne.highlight,Z;try{Z=mt.lex(Se,Ne)}catch(ht){return ze(ht)}var be=function(de){var At;if(!de)try{Ne.walkTokens&&X.walkTokens(Z,Ne.walkTokens),At=St.parse(Z,Ne)}catch($t){de=$t}return Ne.highlight=z,de?ze(de):ze(null,At)};if(!z||z.length<3||(delete Ne.highlight,!Z.length))return be();var ke=0;X.walkTokens(Z,function(ht){ht.type==="code"&&(ke++,setTimeout(function(){z(ht.text,ht.lang,function(de,At){if(de)return be(de);At!=null&&At!==ht.text&&(ht.text=At,ht.escaped=!0),ke--,ke===0&&be()})},0))}),ke===0&&be();return}try{var G=mt.lex(Se,Ne);return Ne.walkTokens&&X.walkTokens(G,Ne.walkTokens),St.parse(G,Ne)}catch(ht){if(ht.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ne.silent)return"<p>An error occurred:</p><pre>"+_(ht.message+"",!0)+"</pre>";throw ht}}X.options=X.setOptions=function(Se){return ve(X.defaults,Se),ye(X.defaults),X},X.getDefaults=w,X.defaults=B,X.use=function(Se){var Ne=ve({},Se);if(Se.renderer&&function(){var z=X.defaults.renderer||new Ye,Z=function(G){var ht=z[G];z[G]=function(){for(var de=arguments.length,At=new Array(de),$t=0;$t<de;$t++)At[$t]=arguments[$t];var Kt=Se.renderer[G].apply(z,At);return Kt===!1&&(Kt=ht.apply(z,At)),Kt}};for(var be in Se.renderer)Z(be);Ne.renderer=z}(),Se.tokenizer&&function(){var z=X.defaults.tokenizer||new Tt,Z=function(G){var ht=z[G];z[G]=function(){for(var de=arguments.length,At=new Array(de),$t=0;$t<de;$t++)At[$t]=arguments[$t];var Kt=Se.tokenizer[G].apply(z,At);return Kt===!1&&(Kt=ht.apply(z,At)),Kt}};for(var be in Se.tokenizer)Z(be);Ne.tokenizer=z}(),Se.walkTokens){var ze=X.defaults.walkTokens;Ne.walkTokens=function(z){Se.walkTokens(z),ze&&ze(z)}}X.setOptions(Ne)},X.walkTokens=function(Se,Ne){for(var ze=xe(Se),z;!(z=ze()).done;){var Z=z.value;switch(Ne(Z),Z.type){case"table":{for(var be=xe(Z.tokens.header),ke;!(ke=be()).done;){var G=ke.value;X.walkTokens(G,Ne)}for(var ht=xe(Z.tokens.cells),de;!(de=ht()).done;)for(var At=de.value,$t=xe(At),Kt;!(Kt=$t()).done;){var ar=Kt.value;X.walkTokens(ar,Ne)}break}case"list":{X.walkTokens(Z.items,Ne);break}default:Z.tokens&&X.walkTokens(Z.tokens,Ne)}}},X.parseInline=function(Se,Ne){if(typeof Se=="undefined"||Se===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");Ne=ve({},X.defaults,Ne||{}),Ge(Ne);try{var ze=mt.lexInline(Se,Ne);return Ne.walkTokens&&X.walkTokens(ze,Ne.walkTokens),St.parseInline(ze,Ne)}catch(z){if(z.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ne.silent)return"<p>An error occurred:</p><pre>"+_(z.message+"",!0)+"</pre>";throw z}},X.Parser=St,X.parser=St.parse,X.Renderer=Ye,X.TextRenderer=vt,X.Lexer=mt,X.lexer=mt.lex,X.Tokenizer=Tt,X.Slugger=dt,X.parse=X;var lt=X;return lt})},11690:function(Gt){const it=/[&<>"']/,S=/[&<>"']/g,y=/[<>"']|&(?!#?\w+;)/,ue=/[<>"']|&(?!#?\w+;)/g,xe={"&":"&","<":"<",">":">",'"':""","'":"'"},pe=he=>xe[he];function H(he,Ce){if(Ce){if(it.test(he))return he.replace(S,pe)}else if(y.test(he))return he.replace(ue,pe);return he}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ie(he){return he.replace(m,(Ce,Pe)=>(Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""))}const q=/(^|[^\[])\^/g;function o(he,Ce){he=he.source||he,Ce=Ce||"";const Pe={replace:(_e,tt)=>(tt=tt.source||tt,tt=tt.replace(q,"$1"),he=he.replace(_e,tt),Pe),getRegex:()=>new RegExp(he,Ce)};return Pe}const K=/[^\w:]/g,M=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(he,Ce,Pe){if(he){let _e;try{_e=decodeURIComponent(ie(Pe)).replace(K,"").toLowerCase()}catch(tt){return null}if(_e.indexOf("javascript:")===0||_e.indexOf("vbscript:")===0||_e.indexOf("data:")===0)return null}Ce&&!M.test(Pe)&&(Pe=te(Ce,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(_e){return null}return Pe}const E={},C=/^[^:]+:\/*[^/]*$/,P=/^([^:]+:)[\s\S]*$/,ne=/^([^:]+:\/*[^/]*)[\s\S]*$/;function te(he,Ce){E[" "+he]||(C.test(he)?E[" "+he]=he+"/":E[" "+he]=O(he,"/",!0)),he=E[" "+he];const Pe=he.indexOf(":")===-1;return Ce.substring(0,2)==="//"?Pe?Ce:he.replace(P,"$1")+Ce:Ce.charAt(0)==="/"?Pe?Ce:he.replace(ne,"$1")+Ce:he+Ce}const V={exec:function(){}};function D(he){let Ce=1,Pe,_e;for(;Ce<arguments.length;Ce++){Pe=arguments[Ce];for(_e in Pe)Object.prototype.hasOwnProperty.call(Pe,_e)&&(he[_e]=Pe[_e])}return he}function j(he,Ce){const Pe=he.replace(/\|/g,(Q,N,Y)=>{let oe=!1,ae=N;for(;--ae>=0&&Y[ae]==="\\";)oe=!oe;return oe?"|":" |"}),_e=Pe.split(/ \|/);let tt=0;if(_e.length>Ce)_e.splice(Ce);else for(;_e.length<Ce;)_e.push("");for(;tt<_e.length;tt++)_e[tt]=_e[tt].trim().replace(/\\\|/g,"|");return _e}function O(he,Ce,Pe){const _e=he.length;if(_e===0)return"";let tt=0;for(;tt<_e;){const Q=he.charAt(_e-tt-1);if(Q===Ce&&!Pe)tt++;else if(Q!==Ce&&Pe)tt++;else break}return he.substr(0,_e-tt)}function F(he,Ce){if(he.indexOf(Ce[1])===-1)return-1;const Pe=he.length;let _e=0,tt=0;for(;tt<Pe;tt++)if(he[tt]==="\\")tt++;else if(he[tt]===Ce[0])_e++;else if(he[tt]===Ce[1]&&(_e--,_e<0))return tt;return-1}function se(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 Ee(he,Ce){if(Ce<1)return"";let Pe="";for(;Ce>1;)Ce&1&&(Pe+=he),Ce>>=1,he+=he;return Pe+he}Gt.exports={escape:H,unescape:ie,edit:o,cleanUrl:b,resolveUrl:te,noopTest:V,merge:D,splitCells:j,rtrim:O,findClosingBracket:F,checkSanitizeDeprecation:se,repeatString:Ee}},75918:function(Gt,it,S){"use strict";S.d(it,{Wi:function(){return m},Z0:function(){return ie},aU:function(){return H},eZ:function(){return o},wY:function(){return q}});var y=S(4348),ue=S(69323),xe=S(13268),pe=function(K,M,b,E){function C(P){return P instanceof b?P:new b(function(ne){ne(P)})}return new(b||(b=Promise))(function(P,ne){function te(j){try{D(E.next(j))}catch(O){ne(O)}}function V(j){try{D(E.throw(j))}catch(O){ne(O)}}function D(j){j.done?P(j.value):C(j.value).then(te,V)}D((E=E.apply(K,M||[])).next())})};class H extends ue.JT{constructor(M,b="",E="",C=!0,P){super(),this._onDidChange=this._register(new y.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=M,this._label=b,this._cssClass=E,this._enabled=C,this._actionCallback=P}get id(){return this._id}get label(){return this._label}set label(M){this._setLabel(M)}_setLabel(M){this._label!==M&&(this._label=M,this._onDidChange.fire({label:M}))}get tooltip(){return this._tooltip||""}set tooltip(M){this._setTooltip(M)}_setTooltip(M){this._tooltip!==M&&(this._tooltip=M,this._onDidChange.fire({tooltip:M}))}get class(){return this._cssClass}set class(M){this._setClass(M)}_setClass(M){this._cssClass!==M&&(this._cssClass=M,this._onDidChange.fire({class:M}))}get enabled(){return this._enabled}set enabled(M){this._setEnabled(M)}_setEnabled(M){this._enabled!==M&&(this._enabled=M,this._onDidChange.fire({enabled:M}))}get checked(){return this._checked}set checked(M){this._setChecked(M)}_setChecked(M){this._checked!==M&&(this._checked=M,this._onDidChange.fire({checked:M}))}run(M,b){return pe(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(M))})}}class m extends ue.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new y.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new y.Q5),this.onDidRun=this._onDidRun.event}run(M,b){return pe(this,void 0,void 0,function*(){if(!M.enabled)return;this._onBeforeRun.fire({action:M});let E;try{yield this.runAction(M,b)}catch(C){E=C}this._onDidRun.fire({action:M,error:E})})}runAction(M,b){return pe(this,void 0,void 0,function*(){yield M.run(b)})}}class ie extends H{constructor(M){super(ie.ID,M,M?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ie.ID="vs.actions.separator";class q{constructor(M,b,E,C){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=M,this.label=b,this.class=C,this._actions=E}get actions(){return this._actions}dispose(){}run(){return pe(this,void 0,void 0,function*(){})}}class o extends H{constructor(){super(o.ID,xe.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Gt,it,S){"use strict";S.d(it,{ok:function(){return y}});function y(ue,xe){if(!ue)throw new Error(xe?`Assertion failed (${xe})`:"Assertion Failed")}},52615:function(Gt,it,S){"use strict";S.d(it,{CM:function(){return H},JL:function(){return m},dT:function(){return q},fK:function(){return pe},lA:function(){return ie}});var y=S(4348);class ue{constructor(){this._icons=new Map,this._onDidRegister=new y.Q5}add(K){const M=this._icons.get(K.id);M?K.description?M.description=K.description:console.error(`Duplicate registration of codicon ${K.id}`):(this._icons.set(K.id,K),this._onDidRegister.fire(K))}get(K){return this._icons.get(K)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const xe=new ue,pe=xe;function H(o,K){return new ie(o,K)}function m(o){return o?o.replace(/\$\((.*?)\)/g,(K,M)=>` ${M} `).trim():""}class ie{constructor(K,M,b){this.id=K,this.definition=M,this.description=b,xe.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var q;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const K=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function M(C){if(C instanceof ie)return["codicon","codicon-"+C.id];const P=K.exec(C.id);if(!P)return M(ie.error);let[,ne,te]=P;const V=["codicon","codicon-"+ne];return te&&V.push("codicon-modifier-"+te.substr(1)),V}o.asClassNameArray=M;function b(C){return M(C).join(" ")}o.asClassName=b;function E(C){return"."+M(C).join(".")}o.asCSSSelector=E})(q||(q={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(ie||(ie={}))},79881:function(Gt,it,S){"use strict";S.d(it,{B8:function(){return M},Cp:function(){return pe},F0:function(){return q},L6:function(){return K},VV:function(){return ie},b1:function(){return o},dL:function(){return xe},ri:function(){return H}});class y{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(()=>{throw E.stack?new Error(E.message+`
|
|
|
|
`+E.stack):E},0)}}emit(E){this.listeners.forEach(C=>{C(E)})}onUnexpectedError(E){this.unexpectedErrorHandler(E),this.emit(E)}onUnexpectedExternalError(E){this.unexpectedErrorHandler(E)}}const ue=new y;function xe(b){ie(b)||ue.onUnexpectedError(b)}function pe(b){ie(b)||ue.onUnexpectedExternalError(b)}function H(b){if(b instanceof Error){let{name:E,message:C}=b;const P=b.stacktrace||b.stack;return{$isError:!0,name:E,message:C,stack:P}}return b}const m="Canceled";function ie(b){return b instanceof Error&&b.name===m&&b.message===m}function q(){const b=new Error(m);return b.name=b.message,b}function o(b){return b?new Error(`Illegal argument: ${b}`):new Error("Illegal argument")}function K(b){return b?new Error(`Illegal state: ${b}`):new Error("Illegal state")}class M extends Error{constructor(E){super("NotSupported"),E&&(this.message=E)}}},4348:function(Gt,it,S){"use strict";S.d(it,{D0:function(){return M},E7:function(){return b},K3:function(){return K},Q5:function(){return o},ZD:function(){return E},ju:function(){return H}});var y=S(79881),ue=S(69323),xe=S(34502),pe=S(95830),H;(function(C){C.None=()=>ue.JT.None;function P(Y){return(oe,ae=null,le)=>{let x=!1,A;return A=Y(W=>{if(!x)return A?A.dispose():x=!0,oe.call(ae,W)},null,le),x&&A.dispose(),A}}C.once=P;function ne(Y,oe){return F((ae,le=null,x)=>Y(A=>ae.call(le,oe(A)),null,x))}C.map=ne;function te(Y,oe){return F((ae,le=null,x)=>Y(A=>{oe(A),ae.call(le,A)},null,x))}C.forEach=te;function V(Y,oe){return F((ae,le=null,x)=>Y(A=>oe(A)&&ae.call(le,A),null,x))}C.filter=V;function D(Y){return Y}C.signal=D;function j(...Y){return(oe,ae=null,le)=>(0,ue.F8)(...Y.map(x=>x(A=>oe.call(ae,A),null,le)))}C.any=j;function O(Y,oe,ae){let le=ae;return ne(Y,x=>(le=oe(le,x),le))}C.reduce=O;function F(Y){let oe;const ae=new o({onFirstListenerAdd(){oe=Y(ae.fire,ae)},onLastListenerRemove(){oe.dispose()}});return ae.event}function se(Y,oe,ae=100,le=!1,x){let A,W,ge,Be=0;const Xe=new o({leakWarningThreshold:x,onFirstListenerAdd(){A=Y(Ve=>{Be++,W=oe(W,Ve),le&&!ge&&(Xe.fire(W),W=void 0),clearTimeout(ge),ge=setTimeout(()=>{const Ze=W;W=void 0,ge=void 0,(!le||Be>1)&&Xe.fire(Ze),Be=0},ae)})},onLastListenerRemove(){A.dispose()}});return Xe.event}C.debounce=se;function Ee(Y,oe=(ae,le)=>ae===le){let ae=!0,le;return V(Y,x=>{const A=ae||!oe(x,le);return ae=!1,le=x,A})}C.latch=Ee;function he(Y,oe){return[C.filter(Y,oe),C.filter(Y,ae=>!oe(ae))]}C.split=he;function Ce(Y,oe=!1,ae=[]){let le=ae.slice(),x=Y(ge=>{le?le.push(ge):W.fire(ge)});const A=()=>{le&&le.forEach(ge=>W.fire(ge)),le=null},W=new o({onFirstListenerAdd(){x||(x=Y(ge=>W.fire(ge)))},onFirstListenerDidAdd(){le&&(oe?setTimeout(A):A())},onLastListenerRemove(){x&&x.dispose(),x=null}});return W.event}C.buffer=Ce;class Pe{constructor(oe){this.event=oe}map(oe){return new Pe(ne(this.event,oe))}forEach(oe){return new Pe(te(this.event,oe))}filter(oe){return new Pe(V(this.event,oe))}reduce(oe,ae){return new Pe(O(this.event,oe,ae))}latch(){return new Pe(Ee(this.event))}debounce(oe,ae=100,le=!1,x){return new Pe(se(this.event,oe,ae,le,x))}on(oe,ae,le){return this.event(oe,ae,le)}once(oe,ae,le){return P(this.event)(oe,ae,le)}}function _e(Y){return new Pe(Y)}C.chain=_e;function tt(Y,oe,ae=le=>le){const le=(...ge)=>W.fire(ae(...ge)),x=()=>Y.on(oe,le),A=()=>Y.removeListener(oe,le),W=new o({onFirstListenerAdd:x,onLastListenerRemove:A});return W.event}C.fromNodeEventEmitter=tt;function Q(Y,oe,ae=le=>le){const le=(...ge)=>W.fire(ae(...ge)),x=()=>Y.addEventListener(oe,le),A=()=>Y.removeEventListener(oe,le),W=new o({onFirstListenerAdd:x,onLastListenerRemove:A});return W.event}C.fromDOMEventEmitter=Q;function N(Y){return new Promise(oe=>P(Y)(oe))}C.toPromise=N})(H||(H={}));class m{constructor(P){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${P}_${m._idPool++}`}start(P){this._stopWatch=new pe.G(!0),this._listenerCount=P}stop(){if(this._stopWatch){const P=this._stopWatch.elapsed();this._elapsedOverall+=P,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${P.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let ie=-1;class q{constructor(P,ne=Math.random().toString(18).slice(2,5)){this.customThreshold=P,this.name=ne,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(P){let ne=ie;if(typeof this.customThreshold=="number"&&(ne=this.customThreshold),ne<=0||P<ne)return;this._stacks||(this._stacks=new Map);const te=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),V=this._stacks.get(te)||0;if(this._stacks.set(te,V+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=ne*.5;let D,j=0;for(const[O,F]of this._stacks)(!D||j<F)&&(D=O,j=F);console.warn(`[${this.name}] potential listener LEAK detected, having ${P} listeners already. MOST frequent listener (${j}):`),console.warn(D)}return()=>{const D=this._stacks.get(te)||0;this._stacks.set(te,D-1)}}}class o{constructor(P){var ne;this._disposed=!1,this._options=P,this._leakageMon=ie>0?new q(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((ne=this._options)===null||ne===void 0)&&ne._profName?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(P,ne,te)=>{var V;this._listeners||(this._listeners=new xe.S);const D=this._listeners.isEmpty();D&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const j=this._listeners.push(ne?[P,ne]:P);D&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,P,ne);const O=(V=this._leakageMon)===null||V===void 0?void 0:V.check(this._listeners.size),F=(0,ue.OF)(()=>{O&&O(),this._disposed||(j(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return te instanceof ue.SL?te.add(F):Array.isArray(te)&&te.push(F),F}),this._event}fire(P){var ne,te;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new xe.S);for(let V of this._listeners)this._deliveryQueue.push([V,P]);for((ne=this._perfMon)===null||ne===void 0||ne.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[V,D]=this._deliveryQueue.shift();try{typeof V=="function"?V.call(void 0,D):V[0].call(V[1],D)}catch(j){(0,y.dL)(j)}}(te=this._perfMon)===null||te===void 0||te.stop()}}dispose(){var P,ne,te,V,D;this._disposed||(this._disposed=!0,(P=this._listeners)===null||P===void 0||P.clear(),(ne=this._deliveryQueue)===null||ne===void 0||ne.clear(),(V=(te=this._options)===null||te===void 0?void 0:te.onLastListenerRemove)===null||V===void 0||V.call(te),(D=this._leakageMon)===null||D===void 0||D.dispose())}}class K extends o{constructor(P){super(P),this._isPaused=0,this._eventQueue=new xe.S,this._mergeFn=P==null?void 0:P.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const P=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(P))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(P){this._listeners&&(this._isPaused!==0?this._eventQueue.push(P):super.fire(P))}}class M extends K{constructor(P){var ne;super(P),this._delay=(ne=P.delay)!==null&&ne!==void 0?ne:100}fire(P){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(P)}}class b{constructor(){this.buffers=[]}wrapEvent(P){return(ne,te,V)=>P(D=>{const j=this.buffers[this.buffers.length-1];j?j.push(()=>ne.call(te,D)):ne.call(te,D)},void 0,V)}bufferEvents(P){const ne=[];this.buffers.push(ne);const te=P();return this.buffers.pop(),ne.forEach(V=>V()),te}}class E{constructor(){this.listening=!1,this.inputEvent=H.None,this.inputEventListener=ue.JT.None,this.emitter=new o({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(P){this.inputEvent=P,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=P(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Gt,it,S){"use strict";S.d(it,{I:function(){return y}});function y(ue){const xe=this;let pe=!1,H;return function(){return pe||(pe=!0,H=ue.apply(xe,arguments)),H}}},88226:function(Gt,it,S){"use strict";S.d(it,{$:function(){return y}});var y;(function(ue){function xe(j){return j&&typeof j=="object"&&typeof j[Symbol.iterator]=="function"}ue.is=xe;const pe=Object.freeze([]);function H(){return pe}ue.empty=H;function*m(j){yield j}ue.single=m;function ie(j){return j||pe}ue.from=ie;function q(j){return!j||j[Symbol.iterator]().next().done===!0}ue.isEmpty=q;function o(j){return j[Symbol.iterator]().next().value}ue.first=o;function K(j,O){for(const F of j)if(O(F))return!0;return!1}ue.some=K;function M(j,O){for(const F of j)if(O(F))return F}ue.find=M;function*b(j,O){for(const F of j)O(F)&&(yield F)}ue.filter=b;function*E(j,O){let F=0;for(const se of j)yield O(se,F++)}ue.map=E;function*C(...j){for(const O of j)for(const F of O)yield F}ue.concat=C;function*P(j){for(const O of j)for(const F of O)yield F}ue.concatNested=P;function ne(j,O,F){let se=F;for(const Ee of j)se=O(se,Ee);return se}ue.reduce=ne;function*te(j,O,F=j.length){for(O<0&&(O+=j.length),F<0?F+=j.length:F>j.length&&(F=j.length);O<F;O++)yield j[O]}ue.slice=te;function V(j,O=Number.POSITIVE_INFINITY){const F=[];if(O===0)return[F,j];const se=j[Symbol.iterator]();for(let Ee=0;Ee<O;Ee++){const he=se.next();if(he.done)return[F,ue.empty()];F.push(he.value)}return[F,{[Symbol.iterator](){return se}}]}ue.consume=V;function D(j,O,F=(se,Ee)=>se===Ee){const se=j[Symbol.iterator](),Ee=O[Symbol.iterator]();for(;;){const he=se.next(),Ce=Ee.next();if(he.done!==Ce.done)return!1;if(he.done)return!0;if(!F(he.value,Ce.value))return!1}}ue.equals=D})(y||(y={}))},69323:function(Gt,it,S){"use strict";S.d(it,{B9:function(){return E},F8:function(){return C},JT:function(){return te},Jz:function(){return D},OF:function(){return P},SL:function(){return ne},Wf:function(){return b},XK:function(){return V},dk:function(){return K}});var y=S(17845),ue=S(88226);const xe=!1;let pe=null;function H(j){pe=j}if(xe){const j="__is_disposable_tracked__";H(new class{trackDisposable(O){const F=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[j]||console.log(F)},3e3)}setParent(O,F){if(O&&O!==te.None)try{O[j]=!0}catch(se){}}markAsDisposed(O){if(O&&O!==te.None)try{O[j]=!0}catch(F){}}markAsSingleton(O){}})}function m(j){return pe==null||pe.trackDisposable(j),j}function ie(j){pe==null||pe.markAsDisposed(j)}function q(j,O){pe==null||pe.setParent(j,O)}function o(j,O){if(pe)for(const F of j)pe.setParent(F,O)}function K(j){return pe==null||pe.markAsSingleton(j),j}class M extends Error{constructor(O){super(`Encountered errors while disposing of store. Errors: [${O.join(", ")}]`),this.errors=O}}function b(j){return typeof j.dispose=="function"&&j.dispose.length===0}function E(j){if(ue.$.is(j)){let O=[];for(const F of j)if(F)try{F.dispose()}catch(se){O.push(se)}if(O.length===1)throw O[0];if(O.length>1)throw new M(O);return Array.isArray(j)?[]:j}else if(j)return j.dispose(),j}function C(...j){const O=P(()=>E(j));return o(j,O),O}function P(j){const O=m({dispose:(0,y.I)(()=>{ie(O),j()})});return O}class ne{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(ie(this),this._isDisposed=!0,this.clear())}clear(){try{E(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 q(O,this),this._isDisposed?ne.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}}ne.DISABLE_DISPOSED_WARNING=!1;class te{constructor(){this._store=new ne,m(this),q(this._store,this)}dispose(){ie(this),this._store.dispose()}_register(O){if(O===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(O)}}te.None=Object.freeze({dispose(){}});class V{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(O){var F;this._isDisposed||O===this._value||((F=this._value)===null||F===void 0||F.dispose(),O&&q(O,this),this._value=O)}clear(){this.value=void 0}dispose(){var O;this._isDisposed=!0,ie(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&&q(O,null),O}}class D{constructor(O){this.object=O}dispose(){}}},34502:function(Gt,it,S){"use strict";S.d(it,{S:function(){return ue}});class y{constructor(pe){this.element=pe,this.next=y.Undefined,this.prev=y.Undefined}}y.Undefined=new y(void 0);class ue{constructor(){this._first=y.Undefined,this._last=y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===y.Undefined}clear(){let pe=this._first;for(;pe!==y.Undefined;){const H=pe.next;pe.prev=y.Undefined,pe.next=y.Undefined,pe=H}this._first=y.Undefined,this._last=y.Undefined,this._size=0}unshift(pe){return this._insert(pe,!1)}push(pe){return this._insert(pe,!0)}_insert(pe,H){const m=new y(pe);if(this._first===y.Undefined)this._first=m,this._last=m;else if(H){const q=this._last;this._last=m,m.prev=q,q.next=m}else{const q=this._first;this._first=m,m.next=q,q.prev=m}this._size+=1;let ie=!1;return()=>{ie||(ie=!0,this._remove(m))}}shift(){if(this._first!==y.Undefined){const pe=this._first.element;return this._remove(this._first),pe}}pop(){if(this._last!==y.Undefined){const pe=this._last.element;return this._remove(this._last),pe}}_remove(pe){if(pe.prev!==y.Undefined&&pe.next!==y.Undefined){const H=pe.prev;H.next=pe.next,pe.next.prev=H}else pe.prev===y.Undefined&&pe.next===y.Undefined?(this._first=y.Undefined,this._last=y.Undefined):pe.next===y.Undefined?(this._last=this._last.prev,this._last.next=y.Undefined):pe.prev===y.Undefined&&(this._first=this._first.next,this._first.prev=y.Undefined);this._size-=1}*[Symbol.iterator](){let pe=this._first;for(;pe!==y.Undefined;)yield pe.element,pe=pe.next}}},23345:function(Gt,it,S){"use strict";S.d(it,{$L:function(){return se},ED:function(){return D},IJ:function(){return O},OS:function(){return Pe},WE:function(){return he},dz:function(){return j},gn:function(){return Ee},li:function(){return P},r:function(){return Q},tY:function(){return F},xS:function(){return Ce}});var y=S(97671),ue;const xe="en";let pe=!1,H=!1,m=!1,ie=!1,q=!1,o=!1,K=!1,M,b=null,E=null,C;const P=typeof self=="object"?self:typeof S.g=="object"?S.g:{};let ne;typeof P.vscode!="undefined"&&typeof P.vscode.process!="undefined"?ne=P.vscode.process:typeof y!="undefined"&&(ne=y);const te=typeof((ue=ne==null?void 0:ne.versions)===null||ue===void 0?void 0:ue.electron)=="string"&&ne.type==="renderer";if(typeof navigator=="object"&&!te)C=navigator.userAgent,pe=C.indexOf("Windows")>=0,H=C.indexOf("Macintosh")>=0,K=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=C.indexOf("Linux")>=0,o=!0,M=navigator.language,b=M;else if(typeof ne=="object"){pe=ne.platform==="win32",H=ne.platform==="darwin",m=ne.platform==="linux",ie=m&&!!ne.env.SNAP&&!!ne.env.SNAP_REVISION,M=xe,b=xe;const N=ne.env.VSCODE_NLS_CONFIG;if(N)try{const Y=JSON.parse(N),oe=Y.availableLanguages["*"];M=Y.locale,b=oe||xe,E=Y._translationsConfigFile}catch(Y){}q=!0}else console.error("Unable to resolve platform.");let V=0;H?V=1:pe?V=3:m&&(V=2);const D=pe,j=H,O=m,F=q,se=o,Ee=K,he=C,Ce=function(){if(P.setImmediate)return P.setImmediate.bind(P);if(typeof P.postMessage=="function"&&!P.importScripts){let oe=[];P.addEventListener("message",le=>{if(le.data&&le.data.vscodeSetImmediateId)for(let x=0,A=oe.length;x<A;x++){const W=oe[x];if(W.id===le.data.vscodeSetImmediateId){oe.splice(x,1),W.callback();return}}});let ae=0;return le=>{const x=++ae;oe.push({id:x,callback:le}),P.postMessage({vscodeSetImmediateId:x},"*")}}if(typeof(ne==null?void 0:ne.nextTick)=="function")return ne.nextTick.bind(ne);const Y=Promise.resolve();return oe=>Y.then(oe)}(),Pe=H||K?2:pe?1:3;let _e=!0,tt=!1;function Q(){if(!tt){tt=!0;const N=new Uint8Array(2);N[0]=1,N[1]=2,_e=new Uint16Array(N.buffer)[0]===513}return _e}},95830:function(Gt,it,S){"use strict";S.d(it,{G:function(){return xe}});var y=S(23345);const ue=y.li.performance&&typeof y.li.performance.now=="function";class xe{constructor(H){this._highResolution=ue&&H,this._startTime=this._now(),this._stopTime=-1}static create(H=!0){return new xe(H)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?y.li.performance.now():Date.now()}}},82983:function(Gt,it,S){"use strict";S.d(it,{$i:function(){return Be},C8:function(){return qe},GF:function(){return M},HO:function(){return ae},IO:function(){return b},K7:function(){return $e},Kw:function(){return Qe},LC:function(){return P},Mh:function(){return Ce},P1:function(){return Pe},PJ:function(){return wt},Qe:function(){return Xe},R1:function(){return K},RP:function(){return W},S6:function(){return Fe},TT:function(){return D},Ut:function(){return x},V8:function(){return ne},WU:function(){return xe},YK:function(){return tt},YU:function(){return pe},ZG:function(){return _e},ZH:function(){return N},ab:function(){return Ve},c1:function(){return je},df:function(){return se},ec:function(){return H},fi:function(){return st},fy:function(){return m},j3:function(){return ie},j_:function(){return O},m5:function(){return y},mK:function(){return F},mr:function(){return E},oH:function(){return ce},oL:function(){return q},ok:function(){return he},ow:function(){return te},qq:function(){return Ee},qu:function(){return V},rL:function(){return Q},uS:function(){return Et},un:function(){return o},uq:function(){return C},vH:function(){return oe},xe:function(){return Ze},zY:function(){return j}});function y(L){return!L||typeof L!="string"?!0:L.trim().length===0}const ue=/{(\d+)}/g;function xe(L,...J){return J.length===0?L:L.replace(ue,function(me,Le){const We=parseInt(Le,10);return isNaN(We)||We<0||We>=J.length?me:J[We]})}function pe(L){return L.replace(/[<>&]/g,function(J){switch(J){case"<":return"<";case">":return">";case"&":return"&";default:return J}})}function H(L){return L.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(L,J=" "){const me=ie(L,J);return q(me,J)}function ie(L,J){if(!L||!J)return L;const me=J.length;if(me===0||L.length===0)return L;let Le=0;for(;L.indexOf(J,Le)===Le;)Le=Le+me;return L.substring(Le)}function q(L,J){if(!L||!J)return L;const me=J.length,Le=L.length;if(me===0||Le===0)return L;let We=Le,Je=-1;for(;Je=L.lastIndexOf(J,We-1),!(Je===-1||Je+me!==We);){if(Je===0)return"";We=Je}return L.substring(0,We)}function o(L){return L.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function K(L){return L.replace(/\*/g,"")}function M(L,J,me={}){if(!L)throw new Error("Cannot create regex from empty string");J||(L=H(L)),me.wholeWord&&(/\B/.test(L.charAt(0))||(L="\\b"+L),/\B/.test(L.charAt(L.length-1))||(L=L+"\\b"));let Le="";return me.global&&(Le+="g"),me.matchCase||(Le+="i"),me.multiline&&(Le+="m"),me.unicode&&(Le+="u"),new RegExp(L,Le)}function b(L){return L.source==="^"||L.source==="^$"||L.source==="$"||L.source==="^\\s*$"?!1:!!(L.exec("")&&L.lastIndex===0)}function E(L){return(L.global?"g":"")+(L.ignoreCase?"i":"")+(L.multiline?"m":"")+(L.unicode?"u":"")}function C(L){return L.split(/\r\n|\r|\n/)}function P(L){for(let J=0,me=L.length;J<me;J++){const Le=L.charCodeAt(J);if(Le!==32&&Le!==9)return J}return-1}function ne(L,J=0,me=L.length){for(let Le=J;Le<me;Le++){const We=L.charCodeAt(Le);if(We!==32&&We!==9)return L.substring(J,Le)}return L.substring(J,me)}function te(L,J=L.length-1){for(let me=J;me>=0;me--){const Le=L.charCodeAt(me);if(Le!==32&&Le!==9)return me}return-1}function V(L,J){return L<J?-1:L>J?1:0}function D(L,J,me=0,Le=L.length,We=0,Je=J.length){for(;me<Le&&We<Je;me++,We++){let pt=L.charCodeAt(me),gt=J.charCodeAt(We);if(pt<gt)return-1;if(pt>gt)return 1}const et=Le-me,nt=Je-We;return et<nt?-1:et>nt?1:0}function j(L,J){return O(L,J,0,L.length,0,J.length)}function O(L,J,me=0,Le=L.length,We=0,Je=J.length){for(;me<Le&&We<Je;me++,We++){let pt=L.charCodeAt(me),gt=J.charCodeAt(We);if(pt===gt)continue;if(pt>=128||gt>=128)return D(L.toLowerCase(),J.toLowerCase(),me,Le,We,Je);F(pt)&&(pt-=32),F(gt)&&(gt-=32);const mt=pt-gt;if(mt!==0)return mt}const et=Le-me,nt=Je-We;return et<nt?-1:et>nt?1:0}function F(L){return L>=97&&L<=122}function se(L){return L>=65&&L<=90}function Ee(L,J){return L.length===J.length&&O(L,J)===0}function he(L,J){const me=J.length;return J.length>L.length?!1:O(L,J,0,me)===0}function Ce(L,J){let me,Le=Math.min(L.length,J.length);for(me=0;me<Le;me++)if(L.charCodeAt(me)!==J.charCodeAt(me))return me;return Le}function Pe(L,J){let me,Le=Math.min(L.length,J.length);const We=L.length-1,Je=J.length-1;for(me=0;me<Le;me++)if(L.charCodeAt(We-me)!==J.charCodeAt(Je-me))return me;return Le}function _e(L){return 55296<=L&&L<=56319}function tt(L){return 56320<=L&&L<=57343}function Q(L,J){return(L-55296<<10)+(J-56320)+65536}function N(L,J,me){const Le=L.charCodeAt(me);if(_e(Le)&&me+1<J){const We=L.charCodeAt(me+1);if(tt(We))return Q(Le,We)}return Le}function Y(L,J){const me=L.charCodeAt(J-1);if(tt(me)&&J>1){const Le=L.charCodeAt(J-2);if(_e(Le))return Q(Le,me)}return me}function oe(L,J){const me=Re.getInstance(),Le=J,We=L.length,Je=N(L,We,J);J+=Je>=65536?2:1;let et=me.getGraphemeBreakType(Je);for(;J<We;){const nt=N(L,We,J),pt=me.getGraphemeBreakType(nt);if(st(et,pt))break;J+=nt>=65536?2:1,et=pt}return J-Le}function ae(L,J){const me=Re.getInstance(),Le=J,We=Y(L,J);J-=We>=65536?2:1;let Je=me.getGraphemeBreakType(We);for(;J>0;){const et=Y(L,J),nt=me.getGraphemeBreakType(et);if(st(nt,Je))break;J-=et>=65536?2:1,Je=nt}return Le-J}const le=/(?:[\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 x(L){return le.test(L)}const A=/(?:[\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 W(L){return A.test(L)}const ge=/^[\t\n\r\x20-\x7E]*$/;function Be(L){return ge.test(L)}const Xe=/[\u2028\u2029]/;function Ve(L){return Xe.test(L)}function Ze(L){for(let J=0,me=L.length;J<me;J++)if($e(L.charCodeAt(J)))return!0;return!1}function $e(L){return L=+L,L>=11904&&L<=55215||L>=63744&&L<=64255||L>=65281&&L<=65374}function qe(L){return L>=127462&&L<=127487||L===8986||L===8987||L===9200||L===9203||L>=9728&&L<=10175||L===11088||L===11093||L>=127744&&L<=128591||L>=128640&&L<=128764||L>=128992&&L<=129003||L>=129280&&L<=129535||L>=129648&&L<=129750}const je="\uFEFF";function Et(L){return!!(L&&L.length>0&&L.charCodeAt(0)===65279)}function Qe(L,J=!1){return L?(J&&(L=L.replace(/\\./g,"")),L.toLowerCase()!==L):!1}function wt(L){return L=L%(2*26),L<26?String.fromCharCode(97+L):String.fromCharCode(65+L-26)}function Fe(L){return Re.getInstance().getGraphemeBreakType(L)}function st(L,J){return L===0?J!==5&&J!==7:L===2&&J===3?!1:L===4||L===2||L===3||J===4||J===2||J===3?!0:!(L===8&&(J===8||J===9||J===11||J===12)||(L===11||L===9)&&(J===9||J===10)||(L===12||L===10)&&J===10||J===5||J===13||J===7||L===1||L===13&&J===14||L===6&&J===6)}class Re{constructor(){this._data=we()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(J){if(J<32)return J===10?3:J===13?2:4;if(J<127)return 0;const me=this._data,Le=me.length/3;let We=1;for(;We<=Le;)if(J<me[3*We])We=2*We;else if(J>me[3*We+1])We=2*We+1;else return me[3*We+2];return 0}}Re._INSTANCE=null;function we(){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 ce(L,J){if(L===0)return 0;const me=He(L,J);if(me!==void 0)return me;const Le=Y(J,L);return L-=Ie(Le),L}function He(L,J){let me=Y(J,L);for(L-=Ie(me);De(me)||me===65039||me===8419;){if(L===0)return;me=Y(J,L),L-=Ie(me)}if(qe(me)){if(L>=0){const Le=Y(J,L);Le===8205&&(L-=Ie(Le))}return L}}function Ie(L){return L>=65536?2:1}function De(L){return 127995<=L&&L<=127999}},72999:function(Gt,it,S){"use strict";S.d(it,{$E:function(){return P},$K:function(){return ie},D8:function(){return b},HD:function(){return ue},IU:function(){return ne},Jp:function(){return q},Kn:function(){return xe},cW:function(){return K},f6:function(){return te},hj:function(){return pe},jn:function(){return H},kJ:function(){return y},mf:function(){return M},o8:function(){return m},p_:function(){return o},vE:function(){return V}});function y(D){return Array.isArray(D)}function ue(D){return typeof D=="string"}function xe(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&!(D instanceof RegExp)&&!(D instanceof Date)}function pe(D){return typeof D=="number"&&!isNaN(D)}function H(D){return D===!0||D===!1}function m(D){return typeof D=="undefined"}function ie(D){return!q(D)}function q(D){return m(D)||D===null}function o(D,j){if(!D)throw new Error(j?`Unexpected type, expected '${j}'`:"Unexpected type")}function K(D){if(q(D))throw new Error("Assertion Failed: argument is undefined or null");return D}function M(D){return typeof D=="function"}function b(D,j){const O=Math.min(D.length,j.length);for(let F=0;F<O;F++)E(D[F],j[F])}function E(D,j){if(ue(j)){if(typeof D!==j)throw new Error(`argument does not match constraint: typeof ${j}`)}else if(M(j)){try{if(D instanceof j)return}catch(O){}if(!q(D)&&D.constructor===j||j.length===1&&j.call(void 0,D)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function C(D){let j=[],O=Object.getPrototypeOf(D);for(;Object.prototype!==O;)j=j.concat(Object.getOwnPropertyNames(O)),O=Object.getPrototypeOf(O);return j}function P(D){const j=[];for(const O of C(D))typeof D[O]=="function"&&j.push(O);return j}function ne(D,j){const O=se=>function(){const Ee=Array.prototype.slice.call(arguments,0);return j(se,Ee)};let F={};for(const se of D)F[se]=O(se);return F}function te(D){return D===null?void 0:D}function V(D,j="Unreachable"){throw new Error(j)}},13268:function(Gt,it,S){"use strict";S.d(it,{N:function(){return ue}});function y(xe,pe){let H;return pe.length===0?H=xe:H=xe.replace(/\{(\d+)\}/g,function(m,ie){const q=ie[0];return typeof pe[q]!="undefined"?pe[q]:m}),H}function ue(xe,pe,...H){return y(pe,H)}},96236:function(Gt,it,S){"use strict";S.d(it,{BH:function(){return ne},NZ:function(){return te},U8:function(){return V},co:function(){return P},eH:function(){return C},vr:function(){return E}});var y=S(75918),ue=S(52615),xe=S(4348),pe=S(88226),H=S(69323),m=S(34502),ie=S(35884),q=S(90689),o=S(16925),K=S(49055),M=function(D,j,O,F){var se=arguments.length,Ee=se<3?j:F===null?F=Object.getOwnPropertyDescriptor(j,O):F,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ee=Reflect.decorate(D,j,O,F);else for(var Ce=D.length-1;Ce>=0;Ce--)(he=D[Ce])&&(Ee=(se<3?he(Ee):se>3?he(j,O,Ee):he(j,O))||Ee);return se>3&&Ee&&Object.defineProperty(j,O,Ee),Ee},b=function(D,j){return function(O,F){j(O,F,D)}};function E(D){return D.command!==void 0}class C{constructor(j){this.id=C._idPool++,this._debugName=j}}C._idPool=0,C.CommandPalette=new C("CommandPalette"),C.EditorContext=new C("EditorContext"),C.SimpleEditorContext=new C("SimpleEditorContext"),C.EditorContextCopy=new C("EditorContextCopy"),C.EditorContextPeek=new C("EditorContextPeek"),C.MenubarEditMenu=new C("MenubarEditMenu"),C.MenubarCopy=new C("MenubarCopy"),C.MenubarGoMenu=new C("MenubarGoMenu"),C.MenubarSelectionMenu=new C("MenubarSelectionMenu"),C.InlineCompletionsActions=new C("InlineCompletionsActions");const P=(0,o.yh)("menuService"),ne=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new xe.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:D=>D===C.CommandPalette}}addCommand(D){return this.addCommands(pe.$.single(D))}addCommands(D){for(const j of D)this._commands.set(j.id,j);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,H.OF)(()=>{let j=!1;for(const O of D)j=this._commands.delete(O.id)||j;j&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(D){return this._commands.get(D)}getCommands(){const D=new Map;return this._commands.forEach((j,O)=>D.set(O,j)),D}appendMenuItem(D,j){return this.appendMenuItems(pe.$.single({id:D,item:j}))}appendMenuItems(D){const j=new Set,O=new m.S;for(const{id:F,item:se}of D){let Ee=this._menuItems.get(F);Ee||(Ee=new m.S,this._menuItems.set(F,Ee)),O.push(Ee.push(se)),j.add(F)}return this._onDidChangeMenu.fire(j),(0,H.OF)(()=>{if(O.size>0){for(let F of O)F();this._onDidChangeMenu.fire(j),O.clear()}})}getMenuItems(D){let j;return this._menuItems.has(D)?j=[...this._menuItems.get(D)]:j=[],D===C.CommandPalette&&this._appendImplicitItems(j),j}_appendImplicitItems(D){const j=new Set;for(const O of D)E(O)&&(j.add(O.command.id),O.alt&&j.add(O.alt.id));this._commands.forEach((O,F)=>{j.has(F)||D.push({command:O})})}};class te extends y.wY{constructor(j,O,F,se){super(`submenuitem.${j.submenu.id}`,typeof j.title=="string"?j.title:j.title.value,[],"submenu"),this.item=j,this._menuService=O,this._contextKeyService=F,this._options=se}get actions(){const j=[],O=this._menuService.createMenu(this.item.submenu,this._contextKeyService),F=O.getActions(this._options);O.dispose();for(const[,se]of F)se.length>0&&(j.push(...se),j.push(new y.Z0));return j.length&&j.pop(),j}}let V=class Eu{constructor(j,O,F,se,Ee){var he,Ce;if(this._commandService=Ee,this.id=j.id,this.label=F!=null&&F.renderShortTitle&&j.shortTitle?typeof j.shortTitle=="string"?j.shortTitle:j.shortTitle.value:typeof j.title=="string"?j.title:j.title.value,this.tooltip=(Ce=typeof j.tooltip=="string"?j.tooltip:(he=j.tooltip)===null||he===void 0?void 0:he.value)!==null&&Ce!==void 0?Ce:"",this.enabled=!j.precondition||se.contextMatchesRules(j.precondition),this.checked=void 0,j.toggled){const Pe=j.toggled.condition?j.toggled:{condition:j.toggled};this.checked=se.contextMatchesRules(Pe.condition),this.checked&&Pe.tooltip&&(this.tooltip=typeof Pe.tooltip=="string"?Pe.tooltip:Pe.tooltip.value),Pe.title&&(this.label=typeof Pe.title=="string"?Pe.title:Pe.title.value)}this.item=j,this.alt=O?new Eu(O,void 0,F,se,Ee):void 0,this._options=F,K.kS.isThemeIcon(j.icon)&&(this.class=ue.dT.asClassName(j.icon))}dispose(){}run(...j){var O,F;let se=[];return!((O=this._options)===null||O===void 0)&&O.arg&&(se=[...se,this._options.arg]),!((F=this._options)===null||F===void 0)&&F.shouldForwardArgs&&(se=[...se,...j]),this._commandService.executeCommand(this.id,...se)}};V=M([b(3,q.i6),b(4,ie.H)],V)},35884:function(Gt,it,S){"use strict";S.d(it,{H:function(){return ie},P:function(){return q}});var y=S(4348),ue=S(88226),xe=S(69323),pe=S(34502),H=S(72999),m=S(16925);const ie=(0,m.yh)("commandService"),q=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new y.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,K){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!K)throw new Error("invalid command");return this.registerCommand({id:o,handler:K})}if(o.description){const P=[];for(let te of o.description.args)P.push(te.constraint);const ne=o.handler;o.handler=function(te,...V){return(0,H.D8)(V,P),ne(te,...V)}}const{id:M}=o;let b=this._commands.get(M);b||(b=new pe.S,this._commands.set(M,b));let E=b.unshift(o),C=(0,xe.OF)(()=>{E();const P=this._commands.get(M);P!=null&&P.isEmpty()&&this._commands.delete(M)});return this._onDidRegisterCommand.fire(M),C}registerCommandAlias(o,K){return q.registerCommand(o,(M,...b)=>M.get(ie).executeCommand(K,...b))}getCommand(o){const K=this._commands.get(o);if(!(!K||K.isEmpty()))return ue.$.first(K)}getCommands(){const o=new Map;for(const K of this._commands.keys()){const M=this.getCommand(K);M&&o.set(K,M)}return o}};q.registerCommand("noop",()=>{})},90689:function(Gt,it,S){"use strict";S.d(it,{Ao:function(){return ie},Eq:function(){return Q},Fb:function(){return q},K8:function(){return oe},i6:function(){return tt},uy:function(){return _e}});var y=S(23345),ue=S(82983),xe=S(16925);let pe=y.WE||"";const H=new Map;H.set("false",!1),H.set("true",!0),H.set("isMac",y.dz),H.set("isLinux",y.IJ),H.set("isWindows",y.ED),H.set("isWeb",y.$L),H.set("isMacNative",y.dz&&!y.$L),H.set("isEdge",pe.indexOf("Edg/")>=0),H.set("isFirefox",pe.indexOf("Firefox")>=0),H.set("isChrome",pe.indexOf("Chrome")>=0),H.set("isSafari",pe.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class ie{static has(x){return b.create(x)}static equals(x,A){return E.create(x,A)}static regex(x,A){return se.create(x,A)}static not(x){return te.create(x)}static and(...x){return Ce.create(x,null)}static or(...x){return Pe.create(x,null,!0)}static deserialize(x,A=!1){if(x)return this._deserializeOrExpression(x,A)}static _deserializeOrExpression(x,A){let W=x.split("||");return Pe.create(W.map(ge=>this._deserializeAndExpression(ge,A)),null,!0)}static _deserializeAndExpression(x,A){let W=x.split("&&");return Ce.create(W.map(ge=>this._deserializeOne(ge,A)),null)}static _deserializeOne(x,A){if(x=x.trim(),x.indexOf("!=")>=0){let W=x.split("!=");return ne.create(W[0].trim(),this._deserializeValue(W[1],A))}if(x.indexOf("==")>=0){let W=x.split("==");return E.create(W[0].trim(),this._deserializeValue(W[1],A))}if(x.indexOf("=~")>=0){let W=x.split("=~");return se.create(W[0].trim(),this._deserializeRegexValue(W[1],A))}if(x.indexOf(" in ")>=0){let W=x.split(" in ");return C.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(x)){const W=x.split(">=");return j.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(x)){const W=x.split(">");return D.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(x)){const W=x.split("<=");return F.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(x)){const W=x.split("<");return O.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(x)?te.create(x.substr(1).trim()):b.create(x)}static _deserializeValue(x,A){if(x=x.trim(),x==="true")return!0;if(x==="false")return!1;let W=/^'([^']*)'$/.exec(x);return W?W[1].trim():x}static _deserializeRegexValue(x,A){if((0,ue.m5)(x)){if(A)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=x.indexOf("/"),ge=x.lastIndexOf("/");if(W===ge||W<0){if(A)throw new Error(`bad regexp-value '${x}', missing /-enclosure`);return console.warn(`bad regexp-value '${x}', missing /-enclosure`),null}let Be=x.slice(W+1,ge),Xe=x[ge+1]==="i"?"i":"";try{return new RegExp(Be,Xe)}catch(Ve){if(A)throw new Error(`bad regexp-value '${x}', parse error: ${Ve}`);return console.warn(`bad regexp-value '${x}', parse error: ${Ve}`),null}}}function q(le,x){const A=le?le.substituteConstants():void 0,W=x?x.substituteConstants():void 0;return!A&&!W?!0:!A||!W?!1:A.equals(W)}function o(le,x){return le.cmp(x)}class K{constructor(){this.type=0}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!1}serialize(){return"false"}keys(){return[]}negate(){return M.INSTANCE}}K.INSTANCE=new K;class M{constructor(){this.type=1}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!0}serialize(){return"true"}keys(){return[]}negate(){return K.INSTANCE}}M.INSTANCE=new M;class b{constructor(x,A){this.key=x,this.negated=A,this.type=2}static create(x,A=null){const W=H.get(x);return typeof W=="boolean"?W?M.INSTANCE:K.INSTANCE:new b(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:N(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=H.get(this.key);return typeof x=="boolean"?x?M.INSTANCE:K.INSTANCE:this}evaluate(x){return!!x.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=te.create(this.key,this)),this.negated}}class E{constructor(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=4}static create(x,A,W=null){if(typeof A=="boolean")return A?b.create(x,W):te.create(x,W);const ge=H.get(x);return typeof ge=="boolean"?A===(ge?"true":"false")?M.INSTANCE:K.INSTANCE:new E(x,A,W)}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=H.get(this.key);if(typeof x=="boolean"){const A=x?"true":"false";return this.value===A?M.INSTANCE:K.INSTANCE}return this}evaluate(x){return x.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ne.create(this.key,this.value,this)),this.negated}}class C{constructor(x,A){this.key=x,this.valueKey=A,this.type=10,this.negated=null}static create(x,A){return new C(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.valueKey,x.key,x.valueKey)}equals(x){return x.type===this.type?this.key===x.key&&this.valueKey===x.valueKey:!1}substituteConstants(){return this}evaluate(x){const A=x.getValue(this.valueKey),W=x.getValue(this.key);return Array.isArray(A)?A.indexOf(W)>=0:typeof W=="string"&&typeof A=="object"&&A!==null?m.call(A,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=P.create(this)),this.negated}}class P{constructor(x){this._actual=x,this.type=11}static create(x){return new P(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class ne{constructor(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=5}static create(x,A,W=null){if(typeof A=="boolean")return A?te.create(x,W):b.create(x,W);const ge=H.get(x);return typeof ge=="boolean"?A===(ge?"true":"false")?K.INSTANCE:M.INSTANCE:new ne(x,A,W)}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=H.get(this.key);if(typeof x=="boolean"){const A=x?"true":"false";return this.value===A?K.INSTANCE:M.INSTANCE}return this}evaluate(x){return x.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class te{constructor(x,A){this.key=x,this.negated=A,this.type=3}static create(x,A=null){const W=H.get(x);return typeof W=="boolean"?W?K.INSTANCE:M.INSTANCE:new te(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:N(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=H.get(this.key);return typeof x=="boolean"?x?K.INSTANCE:M.INSTANCE:this}evaluate(x){return!x.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this)),this.negated}}function V(le,x){if(typeof le=="string"){const A=parseFloat(le);isNaN(A)||(le=A)}return typeof le=="string"||typeof le=="number"?x(le):K.INSTANCE}class D{constructor(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=12}static create(x,A,W=null){return V(A,ge=>new D(x,ge,W))}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}class j{constructor(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=13}static create(x,A,W=null){return V(A,ge=>new j(x,ge,W))}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.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(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=14}static create(x,A,W=null){return V(A,ge=>new O(x,ge,W))}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this.value,this)),this.negated}}class F{constructor(x,A,W){this.key=x,this.value=A,this.negated=W,this.type=15}static create(x,A,W=null){return V(A,ge=>new F(x,ge,W))}cmp(x){return x.type!==this.type?this.type-x.type:Y(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class se{constructor(x,A){this.key=x,this.regexp=A,this.type=7,this.negated=null}static create(x,A){return new se(x,A)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.key<x.key)return-1;if(this.key>x.key)return 1;const A=this.regexp?this.regexp.source:"",W=x.regexp?x.regexp.source:"";return A<W?-1:A>W?1:0}equals(x){if(x.type===this.type){const A=this.regexp?this.regexp.source:"",W=x.regexp?x.regexp.source:"";return this.key===x.key&&A===W}return!1}substituteConstants(){return this}evaluate(x){let A=x.getValue(this.key);return this.regexp?this.regexp.test(A):!1}serialize(){const x=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${x}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ee.create(this)),this.negated}}class Ee{constructor(x){this._actual=x,this.type=8}static create(x){return new Ee(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function he(le){let x=null;for(let A=0,W=le.length;A<W;A++){const ge=le[A].substituteConstants();if(le[A]!==ge&&x===null){x=[];for(let Be=0;Be<A;Be++)x[Be]=le[Be]}x!==null&&(x[A]=ge)}return x===null?le:x}class Ce{constructor(x,A){this.expr=x,this.negated=A,this.type=6}static create(x,A){return Ce._normalizeArr(x,A)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let A=0,W=this.expr.length;A<W;A++){const ge=o(this.expr[A],x.expr[A]);if(ge!==0)return ge}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let A=0,W=this.expr.length;A<W;A++)if(!this.expr[A].equals(x.expr[A]))return!1;return!0}return!1}substituteConstants(){const x=he(this.expr);return x===this.expr?this:Ce.create(x,this.negated)}evaluate(x){for(let A=0,W=this.expr.length;A<W;A++)if(!this.expr[A].evaluate(x))return!1;return!0}static _normalizeArr(x,A){const W=[];let ge=!1;for(const Be of x)if(Be){if(Be.type===1){ge=!0;continue}if(Be.type===0)return K.INSTANCE;if(Be.type===6){W.push(...Be.expr);continue}W.push(Be)}if(W.length===0&&ge)return M.INSTANCE;if(W.length!==0){if(W.length===1)return W[0];W.sort(o);for(let Be=1;Be<W.length;Be++)W[Be-1].equals(W[Be])&&(W.splice(Be,1),Be--);if(W.length===1)return W[0];for(;W.length>1;){const Be=W[W.length-1];if(Be.type!==9)break;W.pop();const Xe=W.pop(),Ve=W.length===0,Ze=Pe.create(Be.expr.map($e=>Ce.create([$e,Xe],null)),null,Ve);Ze&&(W.push(Ze),W.sort(o))}return W.length===1?W[0]:new Ce(W,A)}}serialize(){return this.expr.map(x=>x.serialize()).join(" && ")}keys(){const x=[];for(let A of this.expr)x.push(...A.keys());return x}negate(){if(!this.negated){const x=[];for(let A of this.expr)x.push(A.negate());this.negated=Pe.create(x,this,!0)}return this.negated}}class Pe{constructor(x,A){this.expr=x,this.negated=A,this.type=9}static create(x,A,W){return Pe._normalizeArr(x,A,W)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let A=0,W=this.expr.length;A<W;A++){const ge=o(this.expr[A],x.expr[A]);if(ge!==0)return ge}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let A=0,W=this.expr.length;A<W;A++)if(!this.expr[A].equals(x.expr[A]))return!1;return!0}return!1}substituteConstants(){const x=he(this.expr);return x===this.expr?this:Pe.create(x,this.negated,!1)}evaluate(x){for(let A=0,W=this.expr.length;A<W;A++)if(this.expr[A].evaluate(x))return!0;return!1}static _normalizeArr(x,A,W){let ge=[],Be=!1;if(x){for(let Xe=0,Ve=x.length;Xe<Ve;Xe++){const Ze=x[Xe];if(Ze){if(Ze.type===0){Be=!0;continue}if(Ze.type===1)return M.INSTANCE;if(Ze.type===9){ge=ge.concat(Ze.expr);continue}ge.push(Ze)}}if(ge.length===0&&Be)return K.INSTANCE;ge.sort(o)}if(ge.length!==0){if(ge.length===1)return ge[0];for(let Xe=1;Xe<ge.length;Xe++)ge[Xe-1].equals(ge[Xe])&&(ge.splice(Xe,1),Xe--);if(ge.length===1)return ge[0];if(W){for(let Xe=0;Xe<ge.length;Xe++)for(let Ve=Xe+1;Ve<ge.length;Ve++)oe(ge[Xe],ge[Ve])&&(ge.splice(Ve,1),Ve--);if(ge.length===1)return ge[0]}return new Pe(ge,A)}}serialize(){return this.expr.map(x=>x.serialize()).join(" || ")}keys(){const x=[];for(let A of this.expr)x.push(...A.keys());return x}negate(){if(!this.negated){let x=[];for(let A of this.expr)x.push(A.negate());for(;x.length>1;){const A=x.shift(),W=x.shift(),ge=[];for(const Xe of ae(A))for(const Ve of ae(W))ge.push(Ce.create([Xe,Ve],null));const Be=x.length===0;x.unshift(Pe.create(ge,null,Be))}this.negated=x[0]}return this.negated}}class _e extends b{constructor(x,A,W){super(x,null),this._defaultValue=A,typeof W=="object"?_e._info.push(Object.assign(Object.assign({},W),{key:x})):W!==!0&&_e._info.push({key:x,description:W,type:A!=null?typeof A:void 0})}static all(){return _e._info.values()}bindTo(x){return x.createKey(this.key,this._defaultValue)}getValue(x){return x.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(x){return E.create(this.key,x)}}_e._info=[];const tt=(0,xe.yh)("contextKeyService"),Q="setContext";function N(le,x){return le<x?-1:le>x?1:0}function Y(le,x,A,W){return le<A?-1:le>A?1:x<W?-1:x>W?1:0}function oe(le,x){if(x.type===6&&le.type!==9&&le.type!==6){for(const ge of x.expr)if(le.equals(ge))return!0}const A=le.negate(),W=ae(A).concat(ae(x));W.sort(o);for(let ge=0;ge<W.length;ge++){const Xe=W[ge].negate();for(let Ve=ge+1;Ve<W.length;Ve++){const Ze=W[Ve];if(Xe.equals(Ze))return!0}}return!1}function ae(le){return le.type===9?le.expr:[le]}},16925:function(Gt,it,S){"use strict";S.d(it,{I8:function(){return y},TG:function(){return ue},jt:function(){return H},yh:function(){return pe}});var y;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function ie(q){return q[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=ie})(y||(y={}));const ue=pe("instantiationService");function xe(m,ie,q,o){ie[y.DI_TARGET]===ie?ie[y.DI_DEPENDENCIES].push({id:m,index:q,optional:o}):(ie[y.DI_DEPENDENCIES]=[{id:m,index:q,optional:o}],ie[y.DI_TARGET]=ie)}function pe(m){if(y.serviceIds.has(m))return y.serviceIds.get(m);const ie=function(q,o,K){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");xe(ie,q,K,!1)};return ie.toString=()=>m,y.serviceIds.set(m,ie),ie}function H(m){return function(ie,q,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");xe(m,ie,o,!0)}}},44650:function(Gt,it,S){"use strict";S.d(it,{B:function(){return pe}});var y=S(76068),ue=S(72999);class xe{constructor(){this.data=new Map}add(m,ie){y.ok(ue.HD(m)),y.ok(ue.Kn(ie)),y.ok(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,ie)}as(m){return this.data.get(m)||null}}const pe=new xe},66213:function(Gt,it,S){"use strict";S.d(it,{e:function(){return y}});var y;(function(ue){ue.DARK="dark",ue.LIGHT="light",ue.HIGH_CONTRAST="hc"})(y||(y={}))},49055:function(Gt,it,S){"use strict";S.d(it,{EN:function(){return o},IP:function(){return b},Ic:function(){return P},XE:function(){return ie},bB:function(){return ne},kS:function(){return K},m6:function(){return M}});var y=S(52615),ue=S(4348),xe=S(69323),pe=S(16925),H=S(44650),m=S(66213);const ie=(0,pe.yh)("themeService");var q;(function(te){function V(D){return D&&typeof D=="object"&&typeof D.id=="string"}te.isThemeColor=V})(q||(q={}));function o(te){return{id:te}}var K;(function(te){function V(Ee){return Ee&&typeof Ee=="object"&&typeof Ee.id=="string"&&(typeof Ee.color=="undefined"||q.isThemeColor(Ee.color))}te.isThemeIcon=V;const D=new RegExp(`^\\$\\((${y.dT.iconNameExpression}(?:${y.dT.iconModifierExpression})?)\\)$`);function j(Ee){const he=D.exec(Ee);if(!he)return;let[,Ce]=he;return{id:Ce}}te.fromString=j;function O(Ee,he){let Ce=Ee.id;const Pe=Ce.lastIndexOf("~");return Pe!==-1&&(Ce=Ce.substring(0,Pe)),he&&(Ce=`${Ce}~${he}`),{id:Ce}}te.modify=O;function F(Ee,he){var Ce,Pe;return Ee.id===he.id&&((Ce=Ee.color)===null||Ce===void 0?void 0:Ce.id)===((Pe=he.color)===null||Pe===void 0?void 0:Pe.id)}te.isEqual=F;function se(Ee,he){return{id:Ee.id,color:he?o(he):void 0}}te.asThemeIcon=se,te.asClassNameArray=y.dT.asClassNameArray,te.asClassName=y.dT.asClassName,te.asCSSSelector=y.dT.asCSSSelector})(K||(K={}));function M(te){switch(te){case m.e.DARK:return"vs-dark";case m.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const b={ThemingContribution:"base.contributions.theming"};class E{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ue.Q5}onColorThemeChange(V){return this.themingParticipants.push(V),this.onThemingParticipantAddedEmitter.fire(V),(0,xe.OF)(()=>{const D=this.themingParticipants.indexOf(V);this.themingParticipants.splice(D,1)})}getThemingParticipants(){return this.themingParticipants}}let C=new E;H.B.add(b.ThemingContribution,C);function P(te){return C.onColorThemeChange(te)}class ne extends xe.JT{constructor(V){super(),this.themeService=V,this.theme=V.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(D=>this.onThemeChange(D)))}onThemeChange(V){this.theme=V,this.updateStyles()}updateStyles(){}}},16632:function(Gt,it,S){"use strict";var y=S(60499),ue=S(85899),xe=S(18642),pe=S(72190),H=S(42244),m=S(92310),ie=S.n(m),q=S(18929),o=S(59301),K=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],M=(0,o.forwardRef)(function(b,E){var C=b.prefixCls,P=C===void 0?"rc-checkbox":C,ne=b.className,te=b.style,V=b.checked,D=b.disabled,j=b.defaultChecked,O=j===void 0?!1:j,F=b.type,se=F===void 0?"checkbox":F,Ee=b.title,he=b.onChange,Ce=(0,H.Z)(b,K),Pe=(0,o.useRef)(null),_e=(0,o.useRef)(null),tt=(0,q.Z)(O,{value:V}),Q=(0,pe.Z)(tt,2),N=Q[0],Y=Q[1];(0,o.useImperativeHandle)(E,function(){return{focus:function(x){var A;(A=Pe.current)===null||A===void 0||A.focus(x)},blur:function(){var x;(x=Pe.current)===null||x===void 0||x.blur()},input:Pe.current,nativeElement:_e.current}});var oe=ie()(P,ne,(0,xe.Z)((0,xe.Z)({},"".concat(P,"-checked"),N),"".concat(P,"-disabled"),D)),ae=function(x){D||("checked"in b||Y(x.target.checked),he==null||he({target:(0,ue.Z)((0,ue.Z)({},b),{},{type:se,checked:x.target.checked}),stopPropagation:function(){x.stopPropagation()},preventDefault:function(){x.preventDefault()},nativeEvent:x.nativeEvent}))};return o.createElement("span",{className:oe,title:Ee,style:te,ref:_e},o.createElement("input",(0,y.Z)({},Ce,{className:"".concat(P,"-input"),ref:Pe,onChange:ae,disabled:D,checked:!!N,type:se})),o.createElement("span",{className:"".concat(P,"-inner")}))});it.Z=M},66003:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return ie}});var y=S(42244),ue=S(85899),xe=S(43749),pe=S(59301),H=["show"];function m(q,o){if(!o.max)return!0;var K=o.strategy(q);return K<=o.max}function ie(q,o){return pe.useMemo(function(){var K={};o&&(K.show=(0,xe.Z)(o)==="object"&&o.formatter?o.formatter:!!o),K=(0,ue.Z)((0,ue.Z)({},K),q);var M=K,b=M.show,E=(0,y.Z)(M,H);return(0,ue.Z)((0,ue.Z)({},E),{},{show:!!b,showFormatter:typeof b=="function"?b:void 0,strategy:E.strategy||function(C){return C.length}})},[q,o])}},36901:function(Gt,it,S){"use strict";S.r(it),S.d(it,{BaseInput:function(){return K},default:function(){return j}});var y=S(85899),ue=S(60499),xe=S(18642),pe=S(43749),H=S(92310),m=S.n(H),ie=S(59301),q=S(30292),o=ie.forwardRef(function(O,F){var se,Ee,he,Ce=O.inputElement,Pe=O.children,_e=O.prefixCls,tt=O.prefix,Q=O.suffix,N=O.addonBefore,Y=O.addonAfter,oe=O.className,ae=O.style,le=O.disabled,x=O.readOnly,A=O.focused,W=O.triggerFocus,ge=O.allowClear,Be=O.value,Xe=O.handleReset,Ve=O.hidden,Ze=O.classes,$e=O.classNames,qe=O.dataAttrs,je=O.styles,Et=O.components,Qe=O.onClear,wt=Pe!=null?Pe:Ce,Fe=(Et==null?void 0:Et.affixWrapper)||"span",st=(Et==null?void 0:Et.groupWrapper)||"span",Re=(Et==null?void 0:Et.wrapper)||"span",we=(Et==null?void 0:Et.groupAddon)||"span",ce=(0,ie.useRef)(null),He=function(vt){var dt;(dt=ce.current)!==null&&dt!==void 0&&dt.contains(vt.target)&&(W==null||W())},Ie=(0,q.X3)(O),De=(0,ie.cloneElement)(wt,{value:Be,className:m()((se=wt.props)===null||se===void 0?void 0:se.className,!Ie&&($e==null?void 0:$e.variant))||null}),L=(0,ie.useRef)(null);if(ie.useImperativeHandle(F,function(){return{nativeElement:L.current||ce.current}}),Ie){var J=null;if(ge){var me=!le&&!x&&Be,Le="".concat(_e,"-clear-icon"),We=(0,pe.Z)(ge)==="object"&&ge!==null&&ge!==void 0&&ge.clearIcon?ge.clearIcon:"\u2716";J=ie.createElement("button",{type:"button",tabIndex:-1,onClick:function(vt){Xe==null||Xe(vt),Qe==null||Qe()},onMouseDown:function(vt){return vt.preventDefault()},className:m()(Le,(0,xe.Z)((0,xe.Z)({},"".concat(Le,"-hidden"),!me),"".concat(Le,"-has-suffix"),!!Q))},We)}var Je="".concat(_e,"-affix-wrapper"),et=m()(Je,(0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(_e,"-disabled"),le),"".concat(Je,"-disabled"),le),"".concat(Je,"-focused"),A),"".concat(Je,"-readonly"),x),"".concat(Je,"-input-with-clear-btn"),Q&&ge&&Be),Ze==null?void 0:Ze.affixWrapper,$e==null?void 0:$e.affixWrapper,$e==null?void 0:$e.variant),nt=(Q||ge)&&ie.createElement("span",{className:m()("".concat(_e,"-suffix"),$e==null?void 0:$e.suffix),style:je==null?void 0:je.suffix},J,Q);De=ie.createElement(Fe,(0,ue.Z)({className:et,style:je==null?void 0:je.affixWrapper,onClick:He},qe==null?void 0:qe.affixWrapper,{ref:ce}),tt&&ie.createElement("span",{className:m()("".concat(_e,"-prefix"),$e==null?void 0:$e.prefix),style:je==null?void 0:je.prefix},tt),De,nt)}if((0,q.He)(O)){var pt="".concat(_e,"-group"),gt="".concat(pt,"-addon"),mt="".concat(pt,"-wrapper"),St=m()("".concat(_e,"-wrapper"),pt,Ze==null?void 0:Ze.wrapper,$e==null?void 0:$e.wrapper),Tt=m()(mt,(0,xe.Z)({},"".concat(mt,"-disabled"),le),Ze==null?void 0:Ze.group,$e==null?void 0:$e.groupWrapper);De=ie.createElement(st,{className:Tt,ref:L},ie.createElement(Re,{className:St},N&&ie.createElement(we,{className:gt},N),De,Y&&ie.createElement(we,{className:gt},Y)))}return ie.cloneElement(De,{className:m()((Ee=De.props)===null||Ee===void 0?void 0:Ee.className,oe)||null,style:(0,y.Z)((0,y.Z)({},(he=De.props)===null||he===void 0?void 0:he.style),ae),hidden:Ve})}),K=o,M=S(77654),b=S(72190),E=S(42244),C=S(18929),P=S(2738),ne=S(66003),te=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],V=(0,ie.forwardRef)(function(O,F){var se=O.autoComplete,Ee=O.onChange,he=O.onFocus,Ce=O.onBlur,Pe=O.onPressEnter,_e=O.onKeyDown,tt=O.onKeyUp,Q=O.prefixCls,N=Q===void 0?"rc-input":Q,Y=O.disabled,oe=O.htmlSize,ae=O.className,le=O.maxLength,x=O.suffix,A=O.showCount,W=O.count,ge=O.type,Be=ge===void 0?"text":ge,Xe=O.classes,Ve=O.classNames,Ze=O.styles,$e=O.onCompositionStart,qe=O.onCompositionEnd,je=(0,E.Z)(O,te),Et=(0,ie.useState)(!1),Qe=(0,b.Z)(Et,2),wt=Qe[0],Fe=Qe[1],st=(0,ie.useRef)(!1),Re=(0,ie.useRef)(!1),we=(0,ie.useRef)(null),ce=(0,ie.useRef)(null),He=function(lt){we.current&&(0,q.nH)(we.current,lt)},Ie=(0,C.Z)(O.defaultValue,{value:O.value}),De=(0,b.Z)(Ie,2),L=De[0],J=De[1],me=L==null?"":String(L),Le=(0,ie.useState)(null),We=(0,b.Z)(Le,2),Je=We[0],et=We[1],nt=(0,ne.Z)(W,A),pt=nt.max||le,gt=nt.strategy(me),mt=!!pt&>>pt;(0,ie.useImperativeHandle)(F,function(){var X;return{focus:He,blur:function(){var Se;(Se=we.current)===null||Se===void 0||Se.blur()},setSelectionRange:function(Se,Ne,ze){var z;(z=we.current)===null||z===void 0||z.setSelectionRange(Se,Ne,ze)},select:function(){var Se;(Se=we.current)===null||Se===void 0||Se.select()},input:we.current,nativeElement:((X=ce.current)===null||X===void 0?void 0:X.nativeElement)||we.current}}),(0,ie.useEffect)(function(){Re.current&&(Re.current=!1),Fe(function(X){return X&&Y?!1:X})},[Y]);var St=function(lt,Se,Ne){var ze=Se;if(!st.current&&nt.exceedFormatter&&nt.max&&nt.strategy(Se)>nt.max){if(ze=nt.exceedFormatter(Se,{max:nt.max}),Se!==ze){var z,Z;et([((z=we.current)===null||z===void 0?void 0:z.selectionStart)||0,((Z=we.current)===null||Z===void 0?void 0:Z.selectionEnd)||0])}}else if(Ne.source==="compositionEnd")return;J(ze),we.current&&(0,q.rJ)(we.current,lt,Ee,ze)};(0,ie.useEffect)(function(){if(Je){var X;(X=we.current)===null||X===void 0||X.setSelectionRange.apply(X,(0,M.Z)(Je))}},[Je]);var Tt=function(lt){St(lt,lt.target.value,{source:"change"})},Ye=function(lt){st.current=!1,St(lt,lt.currentTarget.value,{source:"compositionEnd"}),qe==null||qe(lt)},vt=function(lt){Pe&<.key==="Enter"&&!Re.current&&(Re.current=!0,Pe(lt)),_e==null||_e(lt)},dt=function(lt){lt.key==="Enter"&&(Re.current=!1),tt==null||tt(lt)},ve=function(lt){Fe(!0),he==null||he(lt)},Ge=function(lt){Re.current&&(Re.current=!1),Fe(!1),Ce==null||Ce(lt)},_=function(lt){J(""),He(),we.current&&(0,q.rJ)(we.current,lt,Ee)},w=mt&&"".concat(N,"-out-of-range"),ye=function(){var lt=(0,P.Z)(O,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ie.createElement("input",(0,ue.Z)({autoComplete:se},lt,{onChange:Tt,onFocus:ve,onBlur:Ge,onKeyDown:vt,onKeyUp:dt,className:m()(N,(0,xe.Z)({},"".concat(N,"-disabled"),Y),Ve==null?void 0:Ve.input),style:Ze==null?void 0:Ze.input,ref:we,size:oe,type:Be,onCompositionStart:function(Ne){st.current=!0,$e==null||$e(Ne)},onCompositionEnd:Ye}))},B=function(){var lt=Number(pt)>0;if(x||nt.show){var Se=nt.showFormatter?nt.showFormatter({value:me,count:gt,maxLength:pt}):"".concat(gt).concat(lt?" / ".concat(pt):"");return ie.createElement(ie.Fragment,null,nt.show&&ie.createElement("span",{className:m()("".concat(N,"-show-count-suffix"),(0,xe.Z)({},"".concat(N,"-show-count-has-suffix"),!!x),Ve==null?void 0:Ve.count),style:(0,y.Z)({},Ze==null?void 0:Ze.count)},Se),x)}return null};return ie.createElement(K,(0,ue.Z)({},je,{prefixCls:N,className:m()(ae,w),handleReset:_,value:me,focused:wt,triggerFocus:He,suffix:B(),disabled:Y,classes:Xe,classNames:Ve,styles:Ze}),ye())}),D=V,j=D},30292:function(Gt,it,S){"use strict";S.d(it,{He:function(){return y},X3:function(){return ue},nH:function(){return H},rJ:function(){return pe}});function y(m){return!!(m.addonBefore||m.addonAfter)}function ue(m){return!!(m.prefix||m.suffix||m.allowClear)}function xe(m,ie,q){var o=ie.cloneNode(!0),K=Object.create(m,{target:{value:o},currentTarget:{value:o}});return o.value=q,typeof ie.selectionStart=="number"&&typeof ie.selectionEnd=="number"&&(o.selectionStart=ie.selectionStart,o.selectionEnd=ie.selectionEnd),o.setSelectionRange=function(){ie.setSelectionRange.apply(ie,arguments)},K}function pe(m,ie,q,o){if(q){var K=ie;if(ie.type==="click"){K=xe(ie,m,""),q(K);return}if(m.type!=="file"&&o!==void 0){K=xe(ie,m,o),q(K);return}q(K)}}function H(m,ie){if(m){m.focus(ie);var q=ie||{},o=q.cursor;if(o){var K=m.value.length;switch(o){case"start":m.setSelectionRange(0,0);break;case"end":m.setSelectionRange(K,K);break;default:m.setSelectionRange(0,K)}}}}},28321:function(Gt,it,S){"use strict";S.d(it,{iz:function(){return Dr},ck:function(){return ze},BW:function(){return Xr},sN:function(){return ze},Wd:function(){return qt},ZP:function(){return fn},Xl:function(){return Pe}});var y=S(60499),ue=S(18642),xe=S(85899),pe=S(77654),H=S(72190),m=S(42244),ie=S(92310),q=S.n(ie),o=S(83836),K=S(18929),M=S(13697),b=S(48736),E=S(59301),C=S(4676),P=E.createContext(null);function ne(at,xt){return at===void 0?null:"".concat(at,"-").concat(xt)}function te(at){var xt=E.useContext(P);return ne(xt,at)}var V=S(80547),D=["children","locked"],j=E.createContext(null);function O(at,xt){var Bt=(0,xe.Z)({},at);return Object.keys(xt).forEach(function(Dt){var Lt=xt[Dt];Lt!==void 0&&(Bt[Dt]=Lt)}),Bt}function F(at){var xt=at.children,Bt=at.locked,Dt=(0,m.Z)(at,D),Lt=E.useContext(j),Mt=(0,V.Z)(function(){return O(Lt,Dt)},[Lt,Dt],function(jt,Vt){return!Bt&&(jt[0]!==Vt[0]||!(0,M.Z)(jt[1],Vt[1],!0))});return E.createElement(j.Provider,{value:Mt},xt)}var se=[],Ee=E.createContext(null);function he(){return E.useContext(Ee)}var Ce=E.createContext(se);function Pe(at){var xt=E.useContext(Ce);return E.useMemo(function(){return at!==void 0?[].concat((0,pe.Z)(xt),[at]):xt},[xt,at])}var _e=E.createContext(null),tt=E.createContext({}),Q=tt,N=S(29194);function Y(at){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,N.Z)(at)){var Bt=at.nodeName.toLowerCase(),Dt=["input","select","textarea","button"].includes(Bt)||at.isContentEditable||Bt==="a"&&!!at.getAttribute("href"),Lt=at.getAttribute("tabindex"),Mt=Number(Lt),jt=null;return Lt&&!Number.isNaN(Mt)?jt=Mt:Dt&&jt===null&&(jt=0),Dt&&at.disabled&&(jt=null),jt!==null&&(jt>=0||xt&&jt<0)}return!1}function oe(at){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bt=(0,pe.Z)(at.querySelectorAll("*")).filter(function(Dt){return Y(Dt,xt)});return Y(at,xt)&&Bt.unshift(at),Bt}var ae=null;function le(){ae=document.activeElement}function x(){ae=null}function A(){if(ae)try{ae.focus()}catch(at){}}function W(at,xt){if(xt.keyCode===9){var Bt=oe(at),Dt=Bt[xt.shiftKey?0:Bt.length-1],Lt=Dt===document.activeElement||at===document.activeElement;if(Lt){var Mt=Bt[xt.shiftKey?Bt.length-1:0];Mt.focus(),xt.preventDefault()}}}var ge=S(10228),Be=S(16089),Xe=ge.Z.LEFT,Ve=ge.Z.RIGHT,Ze=ge.Z.UP,$e=ge.Z.DOWN,qe=ge.Z.ENTER,je=ge.Z.ESC,Et=ge.Z.HOME,Qe=ge.Z.END,wt=[Ze,$e,Xe,Ve];function Fe(at,xt,Bt,Dt){var Lt,Mt="prev",jt="next",Vt="children",Ar="parent";if(at==="inline"&&Dt===qe)return{inlineTrigger:!0};var Cr=(0,ue.Z)((0,ue.Z)({},Ze,Mt),$e,jt),pn=(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({},Xe,Bt?jt:Mt),Ve,Bt?Mt:jt),$e,Vt),qe,Vt),vr=(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({},Ze,Mt),$e,jt),qe,Vt),je,Ar),Xe,Bt?Vt:Ar),Ve,Bt?Ar:Vt),cr={inline:Cr,horizontal:pn,vertical:vr,inlineSub:Cr,horizontalSub:vr,verticalSub:vr},Or=(Lt=cr["".concat(at).concat(xt?"":"Sub")])===null||Lt===void 0?void 0:Lt[Dt];switch(Or){case Mt:return{offset:-1,sibling:!0};case jt:return{offset:1,sibling:!0};case Ar:return{offset:-1,sibling:!1};case Vt:return{offset:1,sibling:!1};default:return null}}function st(at){for(var xt=at;xt;){if(xt.getAttribute("data-menu-list"))return xt;xt=xt.parentElement}return null}function Re(at,xt){for(var Bt=at||document.activeElement;Bt;){if(xt.has(Bt))return Bt;Bt=Bt.parentElement}return null}function we(at,xt){var Bt=oe(at,!0);return Bt.filter(function(Dt){return xt.has(Dt)})}function ce(at,xt,Bt){var Dt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!at)return null;var Lt=we(at,xt),Mt=Lt.length,jt=Lt.findIndex(function(Vt){return Bt===Vt});return Dt<0?jt===-1?jt=Mt-1:jt-=1:Dt>0&&(jt+=1),jt=(jt+Mt)%Mt,Lt[jt]}var He=function(xt,Bt){var Dt=new Set,Lt=new Map,Mt=new Map;return xt.forEach(function(jt){var Vt=document.querySelector("[data-menu-id='".concat(ne(Bt,jt),"']"));Vt&&(Dt.add(Vt),Mt.set(Vt,jt),Lt.set(jt,Vt))}),{elements:Dt,key2element:Lt,element2key:Mt}};function Ie(at,xt,Bt,Dt,Lt,Mt,jt,Vt,Ar,Cr){var pn=E.useRef(),vr=E.useRef();vr.current=xt;var cr=function(){Be.Z.cancel(pn.current)};return E.useEffect(function(){return function(){cr()}},[]),function(Or){var Vr=Or.which;if([].concat(wt,[qe,je,Et,Qe]).includes(Vr)){var qr=Mt(),_r=He(qr,Dt),Ir=_r,Zr=Ir.elements,jr=Ir.key2element,Fr=Ir.element2key,sn=jr.get(xt),Wr=Re(sn,Zr),Qr=Fr.get(Wr),Rn=Fe(at,jt(Qr,!0).length===1,Bt,Vr);if(!Rn&&Vr!==Et&&Vr!==Qe)return;(wt.includes(Vr)||[Et,Qe].includes(Vr))&&Or.preventDefault();var bt=function(Ur){if(Ur){var Tn=Ur,an=Ur.querySelector("a");an!=null&&an.getAttribute("href")&&(Tn=an);var Jr=Fr.get(Ur);Vt(Jr),cr(),pn.current=(0,Be.Z)(function(){vr.current===Jr&&Tn.focus()})}};if([Et,Qe].includes(Vr)||Rn.sibling||!Wr){var pr;!Wr||at==="inline"?pr=Lt.current:pr=st(Wr);var Kr,wn=we(pr,Zr);Vr===Et?Kr=wn[0]:Vr===Qe?Kr=wn[wn.length-1]:Kr=ce(pr,Zr,Wr,Rn.offset),bt(Kr)}else if(Rn.inlineTrigger)Ar(Qr);else if(Rn.offset>0)Ar(Qr,!0),cr(),pn.current=(0,Be.Z)(function(){_r=He(qr,Dt);var gr=Wr.getAttribute("aria-controls"),Ur=document.getElementById(gr),Tn=ce(Ur,_r.elements);bt(Tn)},5);else if(Rn.offset<0){var Bn=jt(Qr,!0),kn=Bn[Bn.length-2],xn=jr.get(kn);Ar(kn,!1),bt(xn)}}Cr==null||Cr(Or)}}function De(at){Promise.resolve().then(at)}var L="__RC_UTIL_PATH_SPLIT__",J=function(xt){return xt.join(L)},me=function(xt){return xt.split(L)},Le="rc-menu-more";function We(){var at=E.useState({}),xt=(0,H.Z)(at,2),Bt=xt[1],Dt=(0,E.useRef)(new Map),Lt=(0,E.useRef)(new Map),Mt=E.useState([]),jt=(0,H.Z)(Mt,2),Vt=jt[0],Ar=jt[1],Cr=(0,E.useRef)(0),pn=(0,E.useRef)(!1),vr=function(){pn.current||Bt({})},cr=(0,E.useCallback)(function(jr,Fr){var sn=J(Fr);Lt.current.set(sn,jr),Dt.current.set(jr,sn),Cr.current+=1;var Wr=Cr.current;De(function(){Wr===Cr.current&&vr()})},[]),Or=(0,E.useCallback)(function(jr,Fr){var sn=J(Fr);Lt.current.delete(sn),Dt.current.delete(jr)},[]),Vr=(0,E.useCallback)(function(jr){Ar(jr)},[]),qr=(0,E.useCallback)(function(jr,Fr){var sn=Dt.current.get(jr)||"",Wr=me(sn);return Fr&&Vt.includes(Wr[0])&&Wr.unshift(Le),Wr},[Vt]),_r=(0,E.useCallback)(function(jr,Fr){return jr.filter(function(sn){return sn!==void 0}).some(function(sn){var Wr=qr(sn,!0);return Wr.includes(Fr)})},[qr]),Ir=function(){var Fr=(0,pe.Z)(Dt.current.keys());return Vt.length&&Fr.push(Le),Fr},Zr=(0,E.useCallback)(function(jr){var Fr="".concat(Dt.current.get(jr)).concat(L),sn=new Set;return(0,pe.Z)(Lt.current.keys()).forEach(function(Wr){Wr.startsWith(Fr)&&sn.add(Lt.current.get(Wr))}),sn},[]);return E.useEffect(function(){return function(){pn.current=!0}},[]),{registerPath:cr,unregisterPath:Or,refreshOverflowKeys:Vr,isSubPathKey:_r,getKeyPath:qr,getKeys:Ir,getSubPathKeys:Zr}}function Je(at){var xt=E.useRef(at);xt.current=at;var Bt=E.useCallback(function(){for(var Dt,Lt=arguments.length,Mt=new Array(Lt),jt=0;jt<Lt;jt++)Mt[jt]=arguments[jt];return(Dt=xt.current)===null||Dt===void 0?void 0:Dt.call.apply(Dt,[xt].concat(Mt))},[]);return at?Bt:void 0}var et=Math.random().toFixed(5).toString().slice(2),nt=0;function pt(at){var xt=(0,K.Z)(at,{value:at}),Bt=(0,H.Z)(xt,2),Dt=Bt[0],Lt=Bt[1];return E.useEffect(function(){nt+=1;var Mt="".concat(et,"-").concat(nt);Lt("rc-menu-uuid-".concat(Mt))},[]),Dt}var gt=S(38705),mt=S(17212),St=S(39153),Tt=S(55401),Ye=S(2738),vt=S(8654);function dt(at,xt,Bt,Dt){var Lt=E.useContext(j),Mt=Lt.activeKey,jt=Lt.onActive,Vt=Lt.onInactive,Ar={active:Mt===at};return xt||(Ar.onMouseEnter=function(Cr){Bt==null||Bt({key:at,domEvent:Cr}),jt(at)},Ar.onMouseLeave=function(Cr){Dt==null||Dt({key:at,domEvent:Cr}),Vt(at)}),Ar}function ve(at){var xt=E.useContext(j),Bt=xt.mode,Dt=xt.rtl,Lt=xt.inlineIndent;if(Bt!=="inline")return null;var Mt=at;return Dt?{paddingRight:Mt*Lt}:{paddingLeft:Mt*Lt}}function Ge(at){var xt=at.icon,Bt=at.props,Dt=at.children,Lt;return xt===null||xt===!1?null:(typeof xt=="function"?Lt=E.createElement(xt,(0,xe.Z)({},Bt)):typeof xt!="boolean"&&(Lt=xt),Lt||Dt||null)}var _=["item"];function w(at){var xt=at.item,Bt=(0,m.Z)(at,_);return Object.defineProperty(Bt,"item",{get:function(){return(0,b.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),xt}}),Bt}var ye=["title","attribute","elementRef"],B=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],X=["active"],lt=function(at){(0,St.Z)(Bt,at);var xt=(0,Tt.Z)(Bt);function Bt(){return(0,gt.Z)(this,Bt),xt.apply(this,arguments)}return(0,mt.Z)(Bt,[{key:"render",value:function(){var Lt=this.props,Mt=Lt.title,jt=Lt.attribute,Vt=Lt.elementRef,Ar=(0,m.Z)(Lt,ye),Cr=(0,Ye.Z)(Ar,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,b.ZP)(!jt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E.createElement(o.Z.Item,(0,y.Z)({},jt,{title:typeof Mt=="string"?Mt:void 0},Cr,{ref:Vt}))}}]),Bt}(E.Component),Se=E.forwardRef(function(at,xt){var Bt=at.style,Dt=at.className,Lt=at.eventKey,Mt=at.warnKey,jt=at.disabled,Vt=at.itemIcon,Ar=at.children,Cr=at.role,pn=at.onMouseEnter,vr=at.onMouseLeave,cr=at.onClick,Or=at.onKeyDown,Vr=at.onFocus,qr=(0,m.Z)(at,B),_r=te(Lt),Ir=E.useContext(j),Zr=Ir.prefixCls,jr=Ir.onItemClick,Fr=Ir.disabled,sn=Ir.overflowDisabled,Wr=Ir.itemIcon,Qr=Ir.selectedKeys,Rn=Ir.onActive,bt=E.useContext(Q),pr=bt._internalRenderMenuItem,Kr="".concat(Zr,"-item"),wn=E.useRef(),Bn=E.useRef(),kn=Fr||jt,xn=(0,vt.x1)(xt,Bn),gr=Pe(Lt),Ur=function(Pn){return{key:Lt,keyPath:(0,pe.Z)(gr).reverse(),item:wn.current,domEvent:Pn}},Tn=Vt||Wr,an=dt(Lt,kn,pn,vr),Jr=an.active,ci=(0,m.Z)(an,X),jn=Qr.includes(Lt),Ln=ve(gr.length),nr=function(Pn){if(!kn){var Hn=Ur(Pn);cr==null||cr(w(Hn)),jr(Hn)}},un=function(Pn){if(Or==null||Or(Pn),Pn.which===ge.Z.ENTER){var Hn=Ur(Pn);cr==null||cr(w(Hn)),jr(Hn)}},on=function(Pn){Rn(Lt),Vr==null||Vr(Pn)},Kn={};at.role==="option"&&(Kn["aria-selected"]=jn);var Jn=E.createElement(lt,(0,y.Z)({ref:wn,elementRef:xn,role:Cr===null?"none":Cr||"menuitem",tabIndex:jt?null:-1,"data-menu-id":sn&&_r?null:_r},(0,Ye.Z)(qr,["extra"]),ci,Kn,{component:"li","aria-disabled":jt,style:(0,xe.Z)((0,xe.Z)({},Ln),Bt),className:q()(Kr,(0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat(Kr,"-active"),Jr),"".concat(Kr,"-selected"),jn),"".concat(Kr,"-disabled"),kn),Dt),onClick:nr,onKeyDown:un,onFocus:on}),Ar,E.createElement(Ge,{props:(0,xe.Z)((0,xe.Z)({},at),{},{isSelected:jn}),icon:Tn}));return pr&&(Jn=pr(Jn,at,{selected:jn})),Jn});function Ne(at,xt){var Bt=at.eventKey,Dt=he(),Lt=Pe(Bt);return E.useEffect(function(){if(Dt)return Dt.registerPath(Bt,Lt),function(){Dt.unregisterPath(Bt,Lt)}},[Lt]),Dt?null:E.createElement(Se,(0,y.Z)({},at,{ref:xt}))}var ze=E.forwardRef(Ne),z=["className","children"],Z=function(xt,Bt){var Dt=xt.className,Lt=xt.children,Mt=(0,m.Z)(xt,z),jt=E.useContext(j),Vt=jt.prefixCls,Ar=jt.mode,Cr=jt.rtl;return E.createElement("ul",(0,y.Z)({className:q()(Vt,Cr&&"".concat(Vt,"-rtl"),"".concat(Vt,"-sub"),"".concat(Vt,"-").concat(Ar==="inline"?"inline":"vertical"),Dt),role:"menu"},Mt,{"data-menu-list":!0,ref:Bt}),Lt)},be=E.forwardRef(Z);be.displayName="SubMenuList";var ke=be,G=S(11592);function ht(at,xt){return(0,G.Z)(at).map(function(Bt,Dt){if(E.isValidElement(Bt)){var Lt,Mt,jt=Bt.key,Vt=(Lt=(Mt=Bt.props)===null||Mt===void 0?void 0:Mt.eventKey)!==null&&Lt!==void 0?Lt:jt,Ar=Vt==null;Ar&&(Vt="tmp_key-".concat([].concat((0,pe.Z)(xt),[Dt]).join("-")));var Cr={key:Vt,eventKey:Vt};return E.cloneElement(Bt,Cr)}return Bt})}var de=S(68196),At={adjustX:1,adjustY:1},$t={topLeft:{points:["bl","tl"],overflow:At},topRight:{points:["br","tr"],overflow:At},bottomLeft:{points:["tl","bl"],overflow:At},bottomRight:{points:["tr","br"],overflow:At},leftTop:{points:["tr","tl"],overflow:At},leftBottom:{points:["br","bl"],overflow:At},rightTop:{points:["tl","tr"],overflow:At},rightBottom:{points:["bl","br"],overflow:At}},Kt={topLeft:{points:["bl","tl"],overflow:At},topRight:{points:["br","tr"],overflow:At},bottomLeft:{points:["tl","bl"],overflow:At},bottomRight:{points:["tr","br"],overflow:At},rightTop:{points:["tr","tl"],overflow:At},rightBottom:{points:["br","bl"],overflow:At},leftTop:{points:["tl","tr"],overflow:At},leftBottom:{points:["bl","br"],overflow:At}},ar=null;function Qt(at,xt,Bt){if(xt)return xt;if(Bt)return Bt[at]||Bt.other}var Zt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Sr(at){var xt=at.prefixCls,Bt=at.visible,Dt=at.children,Lt=at.popup,Mt=at.popupStyle,jt=at.popupClassName,Vt=at.popupOffset,Ar=at.disabled,Cr=at.mode,pn=at.onVisibleChange,vr=E.useContext(j),cr=vr.getPopupContainer,Or=vr.rtl,Vr=vr.subMenuOpenDelay,qr=vr.subMenuCloseDelay,_r=vr.builtinPlacements,Ir=vr.triggerSubMenuAction,Zr=vr.forceSubMenuRender,jr=vr.rootClassName,Fr=vr.motion,sn=vr.defaultMotions,Wr=E.useState(!1),Qr=(0,H.Z)(Wr,2),Rn=Qr[0],bt=Qr[1],pr=Or?(0,xe.Z)((0,xe.Z)({},Kt),_r):(0,xe.Z)((0,xe.Z)({},$t),_r),Kr=Zt[Cr],wn=Qt(Cr,Fr,sn),Bn=E.useRef(wn);Cr!=="inline"&&(Bn.current=wn);var kn=(0,xe.Z)((0,xe.Z)({},Bn.current),{},{leavedClassName:"".concat(xt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),xn=E.useRef();return E.useEffect(function(){return xn.current=(0,Be.Z)(function(){bt(Bt)}),function(){Be.Z.cancel(xn.current)}},[Bt]),E.createElement(de.Z,{prefixCls:xt,popupClassName:q()("".concat(xt,"-popup"),(0,ue.Z)({},"".concat(xt,"-rtl"),Or),jt,jr),stretch:Cr==="horizontal"?"minWidth":null,getPopupContainer:cr,builtinPlacements:pr,popupPlacement:Kr,popupVisible:Rn,popup:Lt,popupStyle:Mt,popupAlign:Vt&&{offset:Vt},action:Ar?[]:[Ir],mouseEnterDelay:Vr,mouseLeaveDelay:qr,onPopupVisibleChange:pn,forceRender:Zr,popupMotion:kn,fresh:!0},Dt)}var Nr=S(77900);function Yt(at){var xt=at.id,Bt=at.open,Dt=at.keyPath,Lt=at.children,Mt="inline",jt=E.useContext(j),Vt=jt.prefixCls,Ar=jt.forceSubMenuRender,Cr=jt.motion,pn=jt.defaultMotions,vr=jt.mode,cr=E.useRef(!1);cr.current=vr===Mt;var Or=E.useState(!cr.current),Vr=(0,H.Z)(Or,2),qr=Vr[0],_r=Vr[1],Ir=cr.current?Bt:!1;E.useEffect(function(){cr.current&&_r(!1)},[vr]);var Zr=(0,xe.Z)({},Qt(Mt,Cr,pn));Dt.length>1&&(Zr.motionAppear=!1);var jr=Zr.onVisibleChanged;return Zr.onVisibleChanged=function(Fr){return!cr.current&&!Fr&&_r(!0),jr==null?void 0:jr(Fr)},qr?null:E.createElement(F,{mode:Mt,locked:!cr.current},E.createElement(Nr.default,(0,y.Z)({visible:Ir},Zr,{forceRender:Ar,removeOnLeave:!1,leavedClassName:"".concat(Vt,"-hidden")}),function(Fr){var sn=Fr.className,Wr=Fr.style;return E.createElement(ke,{id:xt,className:sn,style:Wr},Lt)}))}var wr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],zt=["active"],Rt=E.forwardRef(function(at,xt){var Bt=at.style,Dt=at.className,Lt=at.title,Mt=at.eventKey,jt=at.warnKey,Vt=at.disabled,Ar=at.internalPopupClose,Cr=at.children,pn=at.itemIcon,vr=at.expandIcon,cr=at.popupClassName,Or=at.popupOffset,Vr=at.popupStyle,qr=at.onClick,_r=at.onMouseEnter,Ir=at.onMouseLeave,Zr=at.onTitleClick,jr=at.onTitleMouseEnter,Fr=at.onTitleMouseLeave,sn=(0,m.Z)(at,wr),Wr=te(Mt),Qr=E.useContext(j),Rn=Qr.prefixCls,bt=Qr.mode,pr=Qr.openKeys,Kr=Qr.disabled,wn=Qr.overflowDisabled,Bn=Qr.activeKey,kn=Qr.selectedKeys,xn=Qr.itemIcon,gr=Qr.expandIcon,Ur=Qr.onItemClick,Tn=Qr.onOpenChange,an=Qr.onActive,Jr=E.useContext(Q),ci=Jr._internalRenderSubMenuItem,jn=E.useContext(_e),Ln=jn.isSubPathKey,nr=Pe(),un="".concat(Rn,"-submenu"),on=Kr||Vt,Kn=E.useRef(),Jn=E.useRef(),ei=pn!=null?pn:xn,Pn=vr!=null?vr:gr,Hn=pr.includes(Mt),cn=!wn&&Hn,hi=Ln(kn,Mt),Un=dt(Mt,on,jr,Fr),Yn=Un.active,ti=(0,m.Z)(Un,zt),ri=E.useState(!1),Pr=(0,H.Z)(ri,2),di=Pr[0],fi=Pr[1],ii=function(Xn){on||fi(Xn)},Nn=function(Xn){ii(!0),_r==null||_r({key:Mt,domEvent:Xn})},br=function(Xn){ii(!1),Ir==null||Ir({key:Mt,domEvent:Xn})},Ii=E.useMemo(function(){return Yn||(bt!=="inline"?di||Ln([Bn],Mt):!1)},[bt,Yn,Bn,di,Mt,Ln]),Ht=ve(nr.length),$n=function(Xn){on||(Zr==null||Zr({key:Mt,domEvent:Xn}),bt==="inline"&&Tn(Mt,!Hn))},Ri=Je(function(An){qr==null||qr(w(An)),Ur(An)}),Ei=function(Xn){bt!=="inline"&&Tn(Mt,Xn)},zn=function(){an(Mt)},qn=Wr&&"".concat(Wr,"-popup"),xr=E.useMemo(function(){return E.createElement(Ge,{icon:bt!=="horizontal"?Pn:void 0,props:(0,xe.Z)((0,xe.Z)({},at),{},{isOpen:cn,isSubMenu:!0})},E.createElement("i",{className:"".concat(un,"-arrow")}))},[bt,Pn,at,cn,un]),Gn=E.createElement("div",(0,y.Z)({role:"menuitem",style:Ht,className:"".concat(un,"-title"),tabIndex:on?null:-1,ref:Kn,title:typeof Lt=="string"?Lt:null,"data-menu-id":wn&&Wr?null:Wr,"aria-expanded":cn,"aria-haspopup":!0,"aria-controls":qn,"aria-disabled":on,onClick:$n,onFocus:zn},ti),Lt,xr),si=E.useRef(bt);if(bt!=="inline"&&nr.length>1?si.current="vertical":si.current=bt,!wn){var Li=si.current;Gn=E.createElement(Sr,{mode:Li,prefixCls:un,visible:!Ar&&cn&&bt!=="inline",popupClassName:cr,popupOffset:Or,popupStyle:Vr,popup:E.createElement(F,{mode:Li==="horizontal"?"vertical":Li},E.createElement(ke,{id:qn,ref:Jn},Cr)),disabled:on,onVisibleChange:Ei},Gn)}var Fn=E.createElement(o.Z.Item,(0,y.Z)({ref:xt,role:"none"},sn,{component:"li",style:Bt,className:q()(un,"".concat(un,"-").concat(bt),Dt,(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat(un,"-open"),cn),"".concat(un,"-active"),Ii),"".concat(un,"-selected"),hi),"".concat(un,"-disabled"),on)),onMouseEnter:Nn,onMouseLeave:br}),Gn,!wn&&E.createElement(Yt,{id:qn,open:cn,keyPath:nr},Cr));return ci&&(Fn=ci(Fn,at,{selected:hi,active:Ii,open:cn,disabled:on})),E.createElement(F,{onItemClick:Ri,mode:bt==="horizontal"?"vertical":bt,itemIcon:ei,expandIcon:Pn},Fn)}),kt=E.forwardRef(function(at,xt){var Bt=at.eventKey,Dt=at.children,Lt=Pe(Bt),Mt=ht(Dt,Lt),jt=he();E.useEffect(function(){if(jt)return jt.registerPath(Bt,Lt),function(){jt.unregisterPath(Bt,Lt)}},[Lt]);var Vt;return jt?Vt=Mt:Vt=E.createElement(Rt,(0,y.Z)({ref:xt},at),Mt),E.createElement(Ce.Provider,{value:Lt},Vt)}),qt=kt,or=S(43749);function Dr(at){var xt=at.className,Bt=at.style,Dt=E.useContext(j),Lt=Dt.prefixCls,Mt=he();return Mt?null:E.createElement("li",{role:"separator",className:q()("".concat(Lt,"-item-divider"),xt),style:Bt})}var nn=["className","title","eventKey","children"],tn=E.forwardRef(function(at,xt){var Bt=at.className,Dt=at.title,Lt=at.eventKey,Mt=at.children,jt=(0,m.Z)(at,nn),Vt=E.useContext(j),Ar=Vt.prefixCls,Cr="".concat(Ar,"-item-group");return E.createElement("li",(0,y.Z)({ref:xt,role:"presentation"},jt,{onClick:function(vr){return vr.stopPropagation()},className:q()(Cr,Bt)}),E.createElement("div",{role:"presentation",className:"".concat(Cr,"-title"),title:typeof Dt=="string"?Dt:void 0},Dt),E.createElement("ul",{role:"group",className:"".concat(Cr,"-list")},Mt))}),Yr=E.forwardRef(function(at,xt){var Bt=at.eventKey,Dt=at.children,Lt=Pe(Bt),Mt=ht(Dt,Lt),jt=he();return jt?Mt:E.createElement(tn,(0,y.Z)({ref:xt},(0,Ye.Z)(at,["warnKey"])),Mt)}),Xr=Yr,Tr=["label","children","key","type","extra"];function vn(at,xt,Bt){var Dt=xt.item,Lt=xt.group,Mt=xt.submenu,jt=xt.divider;return(at||[]).map(function(Vt,Ar){if(Vt&&(0,or.Z)(Vt)==="object"){var Cr=Vt,pn=Cr.label,vr=Cr.children,cr=Cr.key,Or=Cr.type,Vr=Cr.extra,qr=(0,m.Z)(Cr,Tr),_r=cr!=null?cr:"tmp-".concat(Ar);return vr||Or==="group"?Or==="group"?E.createElement(Lt,(0,y.Z)({key:_r},qr,{title:pn}),vn(vr,xt,Bt)):E.createElement(Mt,(0,y.Z)({key:_r},qr,{title:pn}),vn(vr,xt,Bt)):Or==="divider"?E.createElement(jt,(0,y.Z)({key:_r},qr)):E.createElement(Dt,(0,y.Z)({key:_r},qr,{extra:Vr}),pn,(!!Vr||Vr===0)&&E.createElement("span",{className:"".concat(Bt,"-item-extra")},Vr))}return null}).filter(function(Vt){return Vt})}function Gr(at,xt,Bt,Dt,Lt){var Mt=at,jt=(0,xe.Z)({divider:Dr,item:ze,group:Xr,submenu:qt},Dt);return xt&&(Mt=vn(xt,jt,Lt)),ht(Mt,Bt)}var Mn=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ln=[],Rr=E.forwardRef(function(at,xt){var Bt,Dt=at,Lt=Dt.prefixCls,Mt=Lt===void 0?"rc-menu":Lt,jt=Dt.rootClassName,Vt=Dt.style,Ar=Dt.className,Cr=Dt.tabIndex,pn=Cr===void 0?0:Cr,vr=Dt.items,cr=Dt.children,Or=Dt.direction,Vr=Dt.id,qr=Dt.mode,_r=qr===void 0?"vertical":qr,Ir=Dt.inlineCollapsed,Zr=Dt.disabled,jr=Dt.disabledOverflow,Fr=Dt.subMenuOpenDelay,sn=Fr===void 0?.1:Fr,Wr=Dt.subMenuCloseDelay,Qr=Wr===void 0?.1:Wr,Rn=Dt.forceSubMenuRender,bt=Dt.defaultOpenKeys,pr=Dt.openKeys,Kr=Dt.activeKey,wn=Dt.defaultActiveFirst,Bn=Dt.selectable,kn=Bn===void 0?!0:Bn,xn=Dt.multiple,gr=xn===void 0?!1:xn,Ur=Dt.defaultSelectedKeys,Tn=Dt.selectedKeys,an=Dt.onSelect,Jr=Dt.onDeselect,ci=Dt.inlineIndent,jn=ci===void 0?24:ci,Ln=Dt.motion,nr=Dt.defaultMotions,un=Dt.triggerSubMenuAction,on=un===void 0?"hover":un,Kn=Dt.builtinPlacements,Jn=Dt.itemIcon,ei=Dt.expandIcon,Pn=Dt.overflowedIndicator,Hn=Pn===void 0?"...":Pn,cn=Dt.overflowedIndicatorPopupClassName,hi=Dt.getPopupContainer,Un=Dt.onClick,Yn=Dt.onOpenChange,ti=Dt.onKeyDown,ri=Dt.openAnimation,Pr=Dt.openTransitionName,di=Dt._internalRenderMenuItem,fi=Dt._internalRenderSubMenuItem,ii=Dt._internalComponents,Nn=(0,m.Z)(Dt,Mn),br=E.useMemo(function(){return[Gr(cr,vr,ln,ii,Mt),Gr(cr,vr,ln,{},Mt)]},[cr,vr,ii]),Ii=(0,H.Z)(br,2),Ht=Ii[0],$n=Ii[1],Ri=E.useState(!1),Ei=(0,H.Z)(Ri,2),zn=Ei[0],qn=Ei[1],xr=E.useRef(),Gn=pt(Vr),si=Or==="rtl",Li=(0,K.Z)(bt,{value:pr,postState:function(gn){return gn||ln}}),Fn=(0,H.Z)(Li,2),An=Fn[0],Xn=Fn[1],Qn=function(gn){var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ni(){Xn(gn),Yn==null||Yn(gn)}En?(0,C.flushSync)(ni):ni()},Si=E.useState(An),pi=(0,H.Z)(Si,2),ji=pi[0],Xi=pi[1],Mi=E.useRef(!1),mi=E.useMemo(function(){return(_r==="inline"||_r==="vertical")&&Ir?["vertical",Ir]:[_r,!1]},[_r,Ir]),ir=(0,H.Z)(mi,2),Er=ir[0],hn=ir[1],Lr=Er==="inline",zr=E.useState(Er),wi=(0,H.Z)(zr,2),Wn=wi[0],ki=wi[1],Ki=E.useState(hn),ra=(0,H.Z)(Ki,2),Ea=ra[0],na=ra[1];E.useEffect(function(){ki(Er),na(hn),Mi.current&&(Lr?Xn(ji):Qn(ln))},[Er,hn]);var Bi=E.useState(0),Ti=(0,H.Z)(Bi,2),yi=Ti[0],Fs=Ti[1],is=yi>=Ht.length-1||Wn!=="horizontal"||jr;E.useEffect(function(){Lr&&Xi(An)},[An]),E.useEffect(function(){return Mi.current=!0,function(){Mi.current=!1}},[]);var Fi=We(),Ns=Fi.registerPath,ys=Fi.unregisterPath,Sa=Fi.refreshOverflowKeys,ds=Fi.isSubPathKey,bs=Fi.getKeyPath,Ai=Fi.getKeys,ia=Fi.getSubPathKeys,wa=E.useMemo(function(){return{registerPath:Ns,unregisterPath:ys}},[Ns,ys]),$s=E.useMemo(function(){return{isSubPathKey:ds}},[ds]);E.useEffect(function(){Sa(is?ln:Ht.slice(yi+1).map(function(mn){return mn.key}))},[yi,is]);var sa=(0,K.Z)(Kr||wn&&((Bt=Ht[0])===null||Bt===void 0?void 0:Bt.key),{value:Kr}),xs=(0,H.Z)(sa,2),qi=xs[0],Us=xs[1],Pi=Je(function(mn){Us(mn)}),zs=Je(function(){Us(void 0)});(0,E.useImperativeHandle)(xt,function(){return{list:xr.current,focus:function(gn){var En,ni=Ai(),ai=He(ni,Gn),ps=ai.elements,ms=ai.key2element,Ji=ai.element2key,js=we(xr.current,ps),ws=qi!=null?qi:js[0]?Ji.get(js[0]):(En=Ht.find(function(As){return!As.props.disabled}))===null||En===void 0?void 0:En.key,es=ms.get(ws);if(ws&&es){var Ts;es==null||(Ts=es.focus)===null||Ts===void 0||Ts.call(es,gn)}}}});var aa=(0,K.Z)(Ur||[],{value:Tn,postState:function(gn){return Array.isArray(gn)?gn:gn==null?ln:[gn]}}),gi=(0,H.Z)(aa,2),ss=gi[0],fs=gi[1],Es=function(gn){if(kn){var En=gn.key,ni=ss.includes(En),ai;gr?ni?ai=ss.filter(function(ms){return ms!==En}):ai=[].concat((0,pe.Z)(ss),[En]):ai=[En],fs(ai);var ps=(0,xe.Z)((0,xe.Z)({},gn),{},{selectedKeys:ai});ni?Jr==null||Jr(ps):an==null||an(ps)}!gr&&An.length&&Wn!=="inline"&&Qn(ln)},oa=Je(function(mn){Un==null||Un(w(mn)),Es(mn)}),Ni=Je(function(mn,gn){var En=An.filter(function(ai){return ai!==mn});if(gn)En.push(mn);else if(Wn!=="inline"){var ni=ia(mn);En=En.filter(function(ai){return!ni.has(ai)})}(0,M.Z)(An,En,!0)||Qn(En,!0)}),la=function(gn,En){var ni=En!=null?En:!An.includes(gn);Ni(gn,ni)},Qi=Ie(Wn,qi,si,Gn,xr,Ai,bs,Us,la,ti);E.useEffect(function(){qn(!0)},[]);var Ss=E.useMemo(function(){return{_internalRenderMenuItem:di,_internalRenderSubMenuItem:fi}},[di,fi]),$i=Wn!=="horizontal"||jr?Ht:Ht.map(function(mn,gn){return E.createElement(F,{key:mn.key,overflowDisabled:gn>yi},mn)}),Gs=E.createElement(o.Z,(0,y.Z)({id:Vr,ref:xr,prefixCls:"".concat(Mt,"-overflow"),component:"ul",itemComponent:ze,className:q()(Mt,"".concat(Mt,"-root"),"".concat(Mt,"-").concat(Wn),Ar,(0,ue.Z)((0,ue.Z)({},"".concat(Mt,"-inline-collapsed"),Ea),"".concat(Mt,"-rtl"),si),jt),dir:Or,style:Vt,role:"menu",tabIndex:pn,data:$i,renderRawItem:function(gn){return gn},renderRawRest:function(gn){var En=gn.length,ni=En?Ht.slice(-En):null;return E.createElement(qt,{eventKey:Le,title:Hn,disabled:is,internalPopupClose:En===0,popupClassName:cn},ni)},maxCount:Wn!=="horizontal"||jr?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(gn){Fs(gn)},onKeyDown:Qi},Nn));return E.createElement(Q.Provider,{value:Ss},E.createElement(P.Provider,{value:Gn},E.createElement(F,{prefixCls:Mt,rootClassName:jt,mode:Wn,openKeys:An,rtl:si,disabled:Zr,motion:zn?Ln:null,defaultMotions:zn?nr:null,activeKey:qi,onActive:Pi,onInactive:zs,selectedKeys:ss,inlineIndent:jn,subMenuOpenDelay:sn,subMenuCloseDelay:Qr,forceSubMenuRender:Rn,builtinPlacements:Kn,triggerSubMenuAction:on,getPopupContainer:hi,itemIcon:Jn,expandIcon:ei,onItemClick:oa,onOpenChange:Ni},E.createElement(_e.Provider,{value:$s},Gs),E.createElement("div",{style:{display:"none"},"aria-hidden":!0},E.createElement(Ee.Provider,{value:wa},$n)))))}),$r=Rr,Br=$r;Br.Item=ze,Br.SubMenu=qt,Br.ItemGroup=Xr,Br.Divider=Dr;var fn=Br},83836:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return le}});var y=S(60499),ue=S(85899),xe=S(72190),pe=S(42244),H=S(59301),m=S(92310),ie=S.n(m),q=S(29301),o=S(34280),K=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],M=void 0;function b(x,A){var W=x.prefixCls,ge=x.invalidate,Be=x.item,Xe=x.renderItem,Ve=x.responsive,Ze=x.responsiveDisabled,$e=x.registerSize,qe=x.itemKey,je=x.className,Et=x.style,Qe=x.children,wt=x.display,Fe=x.order,st=x.component,Re=st===void 0?"div":st,we=(0,pe.Z)(x,K),ce=Ve&&!wt;function He(me){$e(qe,me)}H.useEffect(function(){return function(){He(null)}},[]);var Ie=Xe&&Be!==M?Xe(Be,{index:Fe}):Qe,De;ge||(De={opacity:ce?0:1,height:ce?0:M,overflowY:ce?"hidden":M,order:Ve?Fe:M,pointerEvents:ce?"none":M,position:ce?"absolute":M});var L={};ce&&(L["aria-hidden"]=!0);var J=H.createElement(Re,(0,y.Z)({className:ie()(!ge&&W,je),style:(0,ue.Z)((0,ue.Z)({},De),Et)},L,we,{ref:A}),Ie);return Ve&&(J=H.createElement(q.Z,{onResize:function(Le){var We=Le.offsetWidth;He(We)},disabled:Ze},J)),J}var E=H.forwardRef(b);E.displayName="Item";var C=E,P=S(6089),ne=S(4676),te=S(16089);function V(x){if(typeof MessageChannel=="undefined")(0,te.Z)(x);else{var A=new MessageChannel;A.port1.onmessage=function(){return x()},A.port2.postMessage(void 0)}}function D(){var x=H.useRef(null),A=function(ge){x.current||(x.current=[],V(function(){(0,ne.unstable_batchedUpdates)(function(){x.current.forEach(function(Be){Be()}),x.current=null})})),x.current.push(ge)};return A}function j(x,A){var W=H.useState(A),ge=(0,xe.Z)(W,2),Be=ge[0],Xe=ge[1],Ve=(0,P.Z)(function(Ze){x(function(){Xe(Ze)})});return[Be,Ve]}var O=H.createContext(null),F=["component"],se=["className"],Ee=["className"],he=function(A,W){var ge=H.useContext(O);if(!ge){var Be=A.component,Xe=Be===void 0?"div":Be,Ve=(0,pe.Z)(A,F);return H.createElement(Xe,(0,y.Z)({},Ve,{ref:W}))}var Ze=ge.className,$e=(0,pe.Z)(ge,se),qe=A.className,je=(0,pe.Z)(A,Ee);return H.createElement(O.Provider,{value:null},H.createElement(C,(0,y.Z)({ref:W,className:ie()(Ze,qe)},$e,je)))},Ce=H.forwardRef(he);Ce.displayName="RawItem";var Pe=Ce,_e=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],tt="responsive",Q="invalidate";function N(x){return"+ ".concat(x.length," ...")}function Y(x,A){var W=x.prefixCls,ge=W===void 0?"rc-overflow":W,Be=x.data,Xe=Be===void 0?[]:Be,Ve=x.renderItem,Ze=x.renderRawItem,$e=x.itemKey,qe=x.itemWidth,je=qe===void 0?10:qe,Et=x.ssr,Qe=x.style,wt=x.className,Fe=x.maxCount,st=x.renderRest,Re=x.renderRawRest,we=x.prefix,ce=x.suffix,He=x.component,Ie=He===void 0?"div":He,De=x.itemComponent,L=x.onVisibleChange,J=(0,pe.Z)(x,_e),me=Et==="full",Le=D(),We=j(Le,null),Je=(0,xe.Z)(We,2),et=Je[0],nt=Je[1],pt=et||0,gt=j(Le,new Map),mt=(0,xe.Z)(gt,2),St=mt[0],Tt=mt[1],Ye=j(Le,0),vt=(0,xe.Z)(Ye,2),dt=vt[0],ve=vt[1],Ge=j(Le,0),_=(0,xe.Z)(Ge,2),w=_[0],ye=_[1],B=j(Le,0),X=(0,xe.Z)(B,2),lt=X[0],Se=X[1],Ne=j(Le,0),ze=(0,xe.Z)(Ne,2),z=ze[0],Z=ze[1],be=(0,H.useState)(null),ke=(0,xe.Z)(be,2),G=ke[0],ht=ke[1],de=(0,H.useState)(null),At=(0,xe.Z)(de,2),$t=At[0],Kt=At[1],ar=H.useMemo(function(){return $t===null&&me?Number.MAX_SAFE_INTEGER:$t||0},[$t,et]),Qt=(0,H.useState)(!1),Zt=(0,xe.Z)(Qt,2),Sr=Zt[0],Nr=Zt[1],Yt="".concat(ge,"-item"),wr=Math.max(dt,w),zt=Fe===tt,Rt=Xe.length&&zt,kt=Fe===Q,qt=Rt||typeof Fe=="number"&&Xe.length>Fe,or=(0,H.useMemo)(function(){var Lt=Xe;return Rt?et===null&&me?Lt=Xe:Lt=Xe.slice(0,Math.min(Xe.length,pt/je)):typeof Fe=="number"&&(Lt=Xe.slice(0,Fe)),Lt},[Xe,je,et,Fe,Rt]),Dr=(0,H.useMemo)(function(){return Rt?Xe.slice(ar+1):Xe.slice(or.length)},[Xe,or,Rt,ar]),nn=(0,H.useCallback)(function(Lt,Mt){var jt;return typeof $e=="function"?$e(Lt):(jt=$e&&(Lt==null?void 0:Lt[$e]))!==null&&jt!==void 0?jt:Mt},[$e]),tn=(0,H.useCallback)(Ve||function(Lt){return Lt},[Ve]);function Yr(Lt,Mt,jt){$t===Lt&&(Mt===void 0||Mt===G)||(Kt(Lt),jt||(Nr(Lt<Xe.length-1),L==null||L(Lt)),Mt!==void 0&&ht(Mt))}function Xr(Lt,Mt){nt(Mt.clientWidth)}function Tr(Lt,Mt){Tt(function(jt){var Vt=new Map(jt);return Mt===null?Vt.delete(Lt):Vt.set(Lt,Mt),Vt})}function vn(Lt,Mt){ye(Mt),ve(w)}function Gr(Lt,Mt){Se(Mt)}function Mn(Lt,Mt){Z(Mt)}function ln(Lt){return St.get(nn(or[Lt],Lt))}(0,o.Z)(function(){if(pt&&typeof wr=="number"&&or){var Lt=lt+z,Mt=or.length,jt=Mt-1;if(!Mt){Yr(0,null);return}for(var Vt=0;Vt<Mt;Vt+=1){var Ar=ln(Vt);if(me&&(Ar=Ar||0),Ar===void 0){Yr(Vt-1,void 0,!0);break}if(Lt+=Ar,jt===0&&Lt<=pt||Vt===jt-1&&Lt+ln(jt)<=pt){Yr(jt,null);break}else if(Lt+wr>pt){Yr(Vt-1,Lt-Ar-z+w);break}}ce&&ln(0)+z>pt&&ht(null)}},[pt,St,w,lt,z,nn,or]);var Rr=Sr&&!!Dr.length,$r={};G!==null&&Rt&&($r={position:"absolute",left:G,top:0});var Br={prefixCls:Yt,responsive:Rt,component:De,invalidate:kt},fn=Ze?function(Lt,Mt){var jt=nn(Lt,Mt);return H.createElement(O.Provider,{key:jt,value:(0,ue.Z)((0,ue.Z)({},Br),{},{order:Mt,item:Lt,itemKey:jt,registerSize:Tr,display:Mt<=ar})},Ze(Lt,Mt))}:function(Lt,Mt){var jt=nn(Lt,Mt);return H.createElement(C,(0,y.Z)({},Br,{order:Mt,key:jt,item:Lt,renderItem:tn,itemKey:jt,registerSize:Tr,display:Mt<=ar}))},at={order:Rr?ar:Number.MAX_SAFE_INTEGER,className:"".concat(Yt,"-rest"),registerSize:vn,display:Rr},xt=st||N,Bt=Re?H.createElement(O.Provider,{value:(0,ue.Z)((0,ue.Z)({},Br),at)},Re(Dr)):H.createElement(C,(0,y.Z)({},Br,at),typeof xt=="function"?xt(Dr):xt),Dt=H.createElement(Ie,(0,y.Z)({className:ie()(!kt&&ge,wt),style:Qe,ref:A},J),we&&H.createElement(C,(0,y.Z)({},Br,{responsive:zt,responsiveDisabled:!Rt,order:-1,className:"".concat(Yt,"-prefix"),registerSize:Gr,display:!0}),we),or.map(fn),qt?Bt:null,ce&&H.createElement(C,(0,y.Z)({},Br,{responsive:zt,responsiveDisabled:!Rt,order:ar,className:"".concat(Yt,"-suffix"),registerSize:Mn,display:!0,style:$r}),ce));return zt?H.createElement(q.Z,{onResize:Xr,disabled:!Rt},Dt):Dt}var oe=H.forwardRef(Y);oe.displayName="Overflow",oe.Item=Pe,oe.RESPONSIVE=tt,oe.INVALIDATE=Q;var ae=oe,le=ae},29301:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return Q}});var y=S(60499),ue=S(59301),xe=S(11592),pe=S(48736),H=S(85899),m=S(43749),ie=S(76846),q=S(8654),o=ue.createContext(null);function K(N){var Y=N.children,oe=N.onBatchResize,ae=ue.useRef(0),le=ue.useRef([]),x=ue.useContext(o),A=ue.useCallback(function(W,ge,Be){ae.current+=1;var Xe=ae.current;le.current.push({size:W,element:ge,data:Be}),Promise.resolve().then(function(){Xe===ae.current&&(oe==null||oe(le.current),le.current=[])}),x==null||x(W,ge,Be)},[oe,x]);return ue.createElement(o.Provider,{value:A},Y)}var M=S(76374),b=new Map;function E(N){N.forEach(function(Y){var oe,ae=Y.target;(oe=b.get(ae))===null||oe===void 0||oe.forEach(function(le){return le(ae)})})}var C=new M.Z(E),P=null,ne=null;function te(N,Y){b.has(N)||(b.set(N,new Set),C.observe(N)),b.get(N).add(Y)}function V(N,Y){b.has(N)&&(b.get(N).delete(Y),b.get(N).size||(C.unobserve(N),b.delete(N)))}var D=S(38705),j=S(17212),O=S(39153),F=S(55401),se=function(N){(0,O.Z)(oe,N);var Y=(0,F.Z)(oe);function oe(){return(0,D.Z)(this,oe),Y.apply(this,arguments)}return(0,j.Z)(oe,[{key:"render",value:function(){return this.props.children}}]),oe}(ue.Component);function Ee(N,Y){var oe=N.children,ae=N.disabled,le=ue.useRef(null),x=ue.useRef(null),A=ue.useContext(o),W=typeof oe=="function",ge=W?oe(le):oe,Be=ue.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Xe=!W&&ue.isValidElement(ge)&&(0,q.Yr)(ge),Ve=Xe?(0,q.C4)(ge):null,Ze=(0,q.x1)(Ve,le),$e=function(){var Qe;return(0,ie.ZP)(le.current)||(le.current&&(0,m.Z)(le.current)==="object"?(0,ie.ZP)((Qe=le.current)===null||Qe===void 0?void 0:Qe.nativeElement):null)||(0,ie.ZP)(x.current)};ue.useImperativeHandle(Y,function(){return $e()});var qe=ue.useRef(N);qe.current=N;var je=ue.useCallback(function(Et){var Qe=qe.current,wt=Qe.onResize,Fe=Qe.data,st=Et.getBoundingClientRect(),Re=st.width,we=st.height,ce=Et.offsetWidth,He=Et.offsetHeight,Ie=Math.floor(Re),De=Math.floor(we);if(Be.current.width!==Ie||Be.current.height!==De||Be.current.offsetWidth!==ce||Be.current.offsetHeight!==He){var L={width:Ie,height:De,offsetWidth:ce,offsetHeight:He};Be.current=L;var J=ce===Math.round(Re)?Re:ce,me=He===Math.round(we)?we:He,Le=(0,H.Z)((0,H.Z)({},L),{},{offsetWidth:J,offsetHeight:me});A==null||A(Le,Et,Fe),wt&&Promise.resolve().then(function(){wt(Le,Et)})}},[]);return ue.useEffect(function(){var Et=$e();return Et&&!ae&&te(Et,je),function(){return V(Et,je)}},[le.current,ae]),ue.createElement(se,{ref:x},Xe?ue.cloneElement(ge,{ref:Ze}):ge)}var he=ue.forwardRef(Ee),Ce=he,Pe="rc-observer-key";function _e(N,Y){var oe=N.children,ae=typeof oe=="function"?[oe]:(0,xe.Z)(oe);return ae.map(function(le,x){var A=(le==null?void 0:le.key)||"".concat(Pe,"-").concat(x);return ue.createElement(Ce,(0,y.Z)({},N,{key:A,ref:x===0?Y:void 0}),le)})}var tt=ue.forwardRef(_e);tt.Collection=K;var Q=tt},22711:function(Gt,it,S){"use strict";S.r(it),S.d(it,{ResizableTextArea:function(){return tt},default:function(){return oe}});var y=S(60499),ue=S(18642),xe=S(85899),pe=S(77654),H=S(72190),m=S(42244),ie=S(92310),q=S.n(ie),o=S(36901),K=S(66003),M=S(30292),b=S(18929),E=S(59301),C=S(43749),P=S(29301),ne=S(34280),te=S(16089),V=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,D=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],j={},O;function F(ae){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=ae.getAttribute("id")||ae.getAttribute("data-reactid")||ae.getAttribute("name");if(le&&j[x])return j[x];var A=window.getComputedStyle(ae),W=A.getPropertyValue("box-sizing")||A.getPropertyValue("-moz-box-sizing")||A.getPropertyValue("-webkit-box-sizing"),ge=parseFloat(A.getPropertyValue("padding-bottom"))+parseFloat(A.getPropertyValue("padding-top")),Be=parseFloat(A.getPropertyValue("border-bottom-width"))+parseFloat(A.getPropertyValue("border-top-width")),Xe=D.map(function(Ze){return"".concat(Ze,":").concat(A.getPropertyValue(Ze))}).join(";"),Ve={sizingStyle:Xe,paddingSize:ge,borderSize:Be,boxSizing:W};return le&&x&&(j[x]=Ve),Ve}function se(ae){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;O||(O=document.createElement("textarea"),O.setAttribute("tab-index","-1"),O.setAttribute("aria-hidden","true"),O.setAttribute("name","hiddenTextarea"),document.body.appendChild(O)),ae.getAttribute("wrap")?O.setAttribute("wrap",ae.getAttribute("wrap")):O.removeAttribute("wrap");var W=F(ae,le),ge=W.paddingSize,Be=W.borderSize,Xe=W.boxSizing,Ve=W.sizingStyle;O.setAttribute("style","".concat(Ve,";").concat(V)),O.value=ae.value||ae.placeholder||"";var Ze=void 0,$e=void 0,qe,je=O.scrollHeight;if(Xe==="border-box"?je+=Be:Xe==="content-box"&&(je-=ge),x!==null||A!==null){O.value=" ";var Et=O.scrollHeight-ge;x!==null&&(Ze=Et*x,Xe==="border-box"&&(Ze=Ze+ge+Be),je=Math.max(Ze,je)),A!==null&&($e=Et*A,Xe==="border-box"&&($e=$e+ge+Be),qe=je>$e?"":"hidden",je=Math.min($e,je))}var Qe={height:je,overflowY:qe,resize:"none"};return Ze&&(Qe.minHeight=Ze),$e&&(Qe.maxHeight=$e),Qe}var Ee=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],he=0,Ce=1,Pe=2,_e=E.forwardRef(function(ae,le){var x=ae,A=x.prefixCls,W=x.defaultValue,ge=x.value,Be=x.autoSize,Xe=x.onResize,Ve=x.className,Ze=x.style,$e=x.disabled,qe=x.onChange,je=x.onInternalAutoSize,Et=(0,m.Z)(x,Ee),Qe=(0,b.Z)(W,{value:ge,postState:function(Ge){return Ge!=null?Ge:""}}),wt=(0,H.Z)(Qe,2),Fe=wt[0],st=wt[1],Re=function(Ge){st(Ge.target.value),qe==null||qe(Ge)},we=E.useRef();E.useImperativeHandle(le,function(){return{textArea:we.current}});var ce=E.useMemo(function(){return Be&&(0,C.Z)(Be)==="object"?[Be.minRows,Be.maxRows]:[]},[Be]),He=(0,H.Z)(ce,2),Ie=He[0],De=He[1],L=!!Be,J=function(){try{if(document.activeElement===we.current){var Ge=we.current,_=Ge.selectionStart,w=Ge.selectionEnd,ye=Ge.scrollTop;we.current.setSelectionRange(_,w),we.current.scrollTop=ye}}catch(B){}},me=E.useState(Pe),Le=(0,H.Z)(me,2),We=Le[0],Je=Le[1],et=E.useState(),nt=(0,H.Z)(et,2),pt=nt[0],gt=nt[1],mt=function(){Je(he)};(0,ne.Z)(function(){L&&mt()},[ge,Ie,De,L]),(0,ne.Z)(function(){if(We===he)Je(Ce);else if(We===Ce){var ve=se(we.current,!1,Ie,De);Je(Pe),gt(ve)}else J()},[We]);var St=E.useRef(),Tt=function(){te.Z.cancel(St.current)},Ye=function(Ge){We===Pe&&(Xe==null||Xe(Ge),Be&&(Tt(),St.current=(0,te.Z)(function(){mt()})))};E.useEffect(function(){return Tt},[]);var vt=L?pt:null,dt=(0,xe.Z)((0,xe.Z)({},Ze),vt);return(We===he||We===Ce)&&(dt.overflowY="hidden",dt.overflowX="hidden"),E.createElement(P.Z,{onResize:Ye,disabled:!(Be||Xe)},E.createElement("textarea",(0,y.Z)({},Et,{ref:we,style:dt,className:q()(A,Ve,(0,ue.Z)({},"".concat(A,"-disabled"),$e)),disabled:$e,value:Fe,onChange:Re})))}),tt=_e,Q=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],N=E.forwardRef(function(ae,le){var x,A=ae.defaultValue,W=ae.value,ge=ae.onFocus,Be=ae.onBlur,Xe=ae.onChange,Ve=ae.allowClear,Ze=ae.maxLength,$e=ae.onCompositionStart,qe=ae.onCompositionEnd,je=ae.suffix,Et=ae.prefixCls,Qe=Et===void 0?"rc-textarea":Et,wt=ae.showCount,Fe=ae.count,st=ae.className,Re=ae.style,we=ae.disabled,ce=ae.hidden,He=ae.classNames,Ie=ae.styles,De=ae.onResize,L=ae.onClear,J=ae.onPressEnter,me=ae.readOnly,Le=ae.autoSize,We=ae.onKeyDown,Je=(0,m.Z)(ae,Q),et=(0,b.Z)(A,{value:W,defaultValue:A}),nt=(0,H.Z)(et,2),pt=nt[0],gt=nt[1],mt=pt==null?"":String(pt),St=E.useState(!1),Tt=(0,H.Z)(St,2),Ye=Tt[0],vt=Tt[1],dt=E.useRef(!1),ve=E.useState(null),Ge=(0,H.Z)(ve,2),_=Ge[0],w=Ge[1],ye=(0,E.useRef)(null),B=(0,E.useRef)(null),X=function(){var kt;return(kt=B.current)===null||kt===void 0?void 0:kt.textArea},lt=function(){X().focus()};(0,E.useImperativeHandle)(le,function(){var Rt;return{resizableTextArea:B.current,focus:lt,blur:function(){X().blur()},nativeElement:((Rt=ye.current)===null||Rt===void 0?void 0:Rt.nativeElement)||X()}}),(0,E.useEffect)(function(){vt(function(Rt){return!we&&Rt})},[we]);var Se=E.useState(null),Ne=(0,H.Z)(Se,2),ze=Ne[0],z=Ne[1];E.useEffect(function(){if(ze){var Rt;(Rt=X()).setSelectionRange.apply(Rt,(0,pe.Z)(ze))}},[ze]);var Z=(0,K.Z)(Fe,wt),be=(x=Z.max)!==null&&x!==void 0?x:Ze,ke=Number(be)>0,G=Z.strategy(mt),ht=!!be&&G>be,de=function(kt,qt){var or=qt;!dt.current&&Z.exceedFormatter&&Z.max&&Z.strategy(qt)>Z.max&&(or=Z.exceedFormatter(qt,{max:Z.max}),qt!==or&&z([X().selectionStart||0,X().selectionEnd||0])),gt(or),(0,M.rJ)(kt.currentTarget,kt,Xe,or)},At=function(kt){dt.current=!0,$e==null||$e(kt)},$t=function(kt){dt.current=!1,de(kt,kt.currentTarget.value),qe==null||qe(kt)},Kt=function(kt){de(kt,kt.target.value)},ar=function(kt){kt.key==="Enter"&&J&&J(kt),We==null||We(kt)},Qt=function(kt){vt(!0),ge==null||ge(kt)},Zt=function(kt){vt(!1),Be==null||Be(kt)},Sr=function(kt){gt(""),lt(),(0,M.rJ)(X(),kt,Xe)},Nr=je,Yt;Z.show&&(Z.showFormatter?Yt=Z.showFormatter({value:mt,count:G,maxLength:be}):Yt="".concat(G).concat(ke?" / ".concat(be):""),Nr=E.createElement(E.Fragment,null,Nr,E.createElement("span",{className:q()("".concat(Qe,"-data-count"),He==null?void 0:He.count),style:Ie==null?void 0:Ie.count},Yt)));var wr=function(kt){var qt;De==null||De(kt),(qt=X())!==null&&qt!==void 0&&qt.style.height&&w(!0)},zt=!Le&&!wt&&!Ve;return E.createElement(o.BaseInput,{ref:ye,value:mt,allowClear:Ve,handleReset:Sr,suffix:Nr,prefixCls:Qe,classNames:(0,xe.Z)((0,xe.Z)({},He),{},{affixWrapper:q()(He==null?void 0:He.affixWrapper,(0,ue.Z)((0,ue.Z)({},"".concat(Qe,"-show-count"),wt),"".concat(Qe,"-textarea-allow-clear"),Ve))}),disabled:we,focused:Ye,className:q()(st,ht&&"".concat(Qe,"-out-of-range")),style:(0,xe.Z)((0,xe.Z)({},Re),_&&!zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Yt=="string"?Yt:void 0}},hidden:ce,readOnly:me,onClear:L},E.createElement(tt,(0,y.Z)({},Je,{autoSize:Le,maxLength:Ze,onKeyDown:ar,onChange:Kt,onFocus:Qt,onBlur:Zt,onCompositionStart:At,onCompositionEnd:$t,className:q()(He==null?void 0:He.textarea),style:(0,xe.Z)((0,xe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:Re==null?void 0:Re.resize}),disabled:we,prefixCls:Qe,onResize:wr,ref:B,readOnly:me})))}),Y=N,oe=Y},29125:function(Gt,it,S){"use strict";S.d(it,{G:function(){return pe},Z:function(){return V}});var y=S(92310),ue=S.n(y),xe=S(59301);function pe(D){var j=D.children,O=D.prefixCls,F=D.id,se=D.overlayInnerStyle,Ee=D.bodyClassName,he=D.className,Ce=D.style;return xe.createElement("div",{className:ue()("".concat(O,"-content"),he),style:Ce},xe.createElement("div",{className:ue()("".concat(O,"-inner"),Ee),id:F,role:"tooltip",style:se},typeof j=="function"?j():j))}var H=S(60499),m=S(85899),ie=S(42244),q=S(68196),o={shiftX:64,adjustY:1},K={adjustX:1,shiftY:!0},M=[0,0],b={left:{points:["cr","cl"],overflow:K,offset:[-4,0],targetOffset:M},right:{points:["cl","cr"],overflow:K,offset:[4,0],targetOffset:M},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:M},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:M},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:M},leftTop:{points:["tr","tl"],overflow:K,offset:[-4,0],targetOffset:M},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:M},rightTop:{points:["tl","tr"],overflow:K,offset:[4,0],targetOffset:M},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:M},rightBottom:{points:["bl","br"],overflow:K,offset:[4,0],targetOffset:M},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:M},leftBottom:{points:["br","bl"],overflow:K,offset:[-4,0],targetOffset:M}},E=null,C=S(80402),P=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],ne=function(j,O){var F=j.overlayClassName,se=j.trigger,Ee=se===void 0?["hover"]:se,he=j.mouseEnterDelay,Ce=he===void 0?0:he,Pe=j.mouseLeaveDelay,_e=Pe===void 0?.1:Pe,tt=j.overlayStyle,Q=j.prefixCls,N=Q===void 0?"rc-tooltip":Q,Y=j.children,oe=j.onVisibleChange,ae=j.afterVisibleChange,le=j.transitionName,x=j.animation,A=j.motion,W=j.placement,ge=W===void 0?"right":W,Be=j.align,Xe=Be===void 0?{}:Be,Ve=j.destroyTooltipOnHide,Ze=Ve===void 0?!1:Ve,$e=j.defaultVisible,qe=j.getTooltipContainer,je=j.overlayInnerStyle,Et=j.arrowContent,Qe=j.overlay,wt=j.id,Fe=j.showArrow,st=Fe===void 0?!0:Fe,Re=j.classNames,we=j.styles,ce=(0,ie.Z)(j,P),He=(0,C.Z)(wt),Ie=(0,xe.useRef)(null);(0,xe.useImperativeHandle)(O,function(){return Ie.current});var De=(0,m.Z)({},ce);"visible"in j&&(De.popupVisible=j.visible);var L=function(){return xe.createElement(pe,{key:"content",prefixCls:N,id:He,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,m.Z)((0,m.Z)({},je),we==null?void 0:we.body)},Qe)},J=function(){var Le=xe.Children.only(Y),We=(Le==null?void 0:Le.props)||{},Je=(0,m.Z)((0,m.Z)({},We),{},{"aria-describedby":Qe?He:null});return xe.cloneElement(Y,Je)};return xe.createElement(q.Z,(0,H.Z)({popupClassName:ue()(F,Re==null?void 0:Re.root),prefixCls:N,popup:L,action:Ee,builtinPlacements:b,popupPlacement:ge,ref:Ie,popupAlign:Xe,getPopupContainer:qe,onPopupVisibleChange:oe,afterPopupVisibleChange:ae,popupTransitionName:le,popupAnimation:x,popupMotion:A,defaultPopupVisible:$e,autoDestroy:Ze,mouseLeaveDelay:_e,popupStyle:(0,m.Z)((0,m.Z)({},tt),we==null?void 0:we.root),mouseEnterDelay:Ce,arrow:st},De),J())},te=(0,xe.forwardRef)(ne),V=te},49658:function(Gt,it){"use strict";it.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var S=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(S)||/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(S==null?void 0:S.substr(0,4))}},83145:function(Gt,it,S){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.CopyToClipboard=void 0;var y=xe(S(59301)),ue=xe(S(25769));function xe(D){return D&&D.__esModule?D:{default:D}}function pe(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(O){return typeof O}:pe=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},pe(D)}function H(D,j){var O=Object.keys(D);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(D);j&&(F=F.filter(function(se){return Object.getOwnPropertyDescriptor(D,se).enumerable})),O.push.apply(O,F)}return O}function m(D){for(var j=1;j<arguments.length;j++){var O=arguments[j]!=null?arguments[j]:{};j%2?H(O,!0).forEach(function(F){te(D,F,O[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(O)):H(O).forEach(function(F){Object.defineProperty(D,F,Object.getOwnPropertyDescriptor(O,F))})}return D}function ie(D,j){if(D==null)return{};var O=q(D,j),F,se;if(Object.getOwnPropertySymbols){var Ee=Object.getOwnPropertySymbols(D);for(se=0;se<Ee.length;se++)F=Ee[se],!(j.indexOf(F)>=0)&&Object.prototype.propertyIsEnumerable.call(D,F)&&(O[F]=D[F])}return O}function q(D,j){if(D==null)return{};var O={},F=Object.keys(D),se,Ee;for(Ee=0;Ee<F.length;Ee++)se=F[Ee],!(j.indexOf(se)>=0)&&(O[se]=D[se]);return O}function o(D,j){if(!(D instanceof j))throw new TypeError("Cannot call a class as a function")}function K(D,j){for(var O=0;O<j.length;O++){var F=j[O];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(D,F.key,F)}}function M(D,j,O){return j&&K(D.prototype,j),O&&K(D,O),D}function b(D,j){return j&&(pe(j)==="object"||typeof j=="function")?j:C(D)}function E(D){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},E(D)}function C(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function P(D,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(j&&j.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),j&&ne(D,j)}function ne(D,j){return ne=Object.setPrototypeOf||function(F,se){return F.__proto__=se,F},ne(D,j)}function te(D,j,O){return j in D?Object.defineProperty(D,j,{value:O,enumerable:!0,configurable:!0,writable:!0}):D[j]=O,D}var V=function(D){P(j,D);function j(){var O,F;o(this,j);for(var se=arguments.length,Ee=new Array(se),he=0;he<se;he++)Ee[he]=arguments[he];return F=b(this,(O=E(j)).call.apply(O,[this].concat(Ee))),te(C(F),"onClick",function(Ce){var Pe=F.props,_e=Pe.text,tt=Pe.onCopy,Q=Pe.children,N=Pe.options,Y=y.default.Children.only(Q),oe=(0,ue.default)(_e,N);tt&&tt(_e,oe),Y&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(Ce)}),F}return M(j,[{key:"render",value:function(){var F=this.props,se=F.text,Ee=F.onCopy,he=F.options,Ce=F.children,Pe=ie(F,["text","onCopy","options","children"]),_e=y.default.Children.only(Ce);return y.default.cloneElement(_e,m({},Pe,{onClick:this.onClick}))}}]),j}(y.default.PureComponent);it.CopyToClipboard=V,te(V,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Gt,it,S){"use strict";var y=S(83145),ue=y.CopyToClipboard;ue.CopyToClipboard=ue,Gt.exports=ue},76374:function(Gt,it,S){"use strict";var y=function(){if(typeof Map!="undefined")return Map;function Q(N,Y){var oe=-1;return N.some(function(ae,le){return ae[0]===Y?(oe=le,!0):!1}),oe}return function(){function N(){this.__entries__=[]}return Object.defineProperty(N.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),N.prototype.get=function(Y){var oe=Q(this.__entries__,Y),ae=this.__entries__[oe];return ae&&ae[1]},N.prototype.set=function(Y,oe){var ae=Q(this.__entries__,Y);~ae?this.__entries__[ae][1]=oe:this.__entries__.push([Y,oe])},N.prototype.delete=function(Y){var oe=this.__entries__,ae=Q(oe,Y);~ae&&oe.splice(ae,1)},N.prototype.has=function(Y){return!!~Q(this.__entries__,Y)},N.prototype.clear=function(){this.__entries__.splice(0)},N.prototype.forEach=function(Y,oe){oe===void 0&&(oe=null);for(var ae=0,le=this.__entries__;ae<le.length;ae++){var x=le[ae];Y.call(oe,x[1],x[0])}},N}()}(),ue=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,xe=function(){return typeof S.g!="undefined"&&S.g.Math===Math?S.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),pe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(xe):function(Q){return setTimeout(function(){return Q(Date.now())},1e3/60)}}(),H=2;function m(Q,N){var Y=!1,oe=!1,ae=0;function le(){Y&&(Y=!1,Q()),oe&&A()}function x(){pe(le)}function A(){var W=Date.now();if(Y){if(W-ae<H)return;oe=!0}else Y=!0,oe=!1,setTimeout(x,N);ae=W}return A}var ie=20,q=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",K=function(){function Q(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=m(this.refresh.bind(this),ie)}return Q.prototype.addObserver=function(N){~this.observers_.indexOf(N)||this.observers_.push(N),this.connected_||this.connect_()},Q.prototype.removeObserver=function(N){var Y=this.observers_,oe=Y.indexOf(N);~oe&&Y.splice(oe,1),!Y.length&&this.connected_&&this.disconnect_()},Q.prototype.refresh=function(){var N=this.updateObservers_();N&&this.refresh()},Q.prototype.updateObservers_=function(){var N=this.observers_.filter(function(Y){return Y.gatherActive(),Y.hasActive()});return N.forEach(function(Y){return Y.broadcastActive()}),N.length>0},Q.prototype.connect_=function(){!ue||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(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)},Q.prototype.disconnect_=function(){!ue||!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)},Q.prototype.onTransitionEnd_=function(N){var Y=N.propertyName,oe=Y===void 0?"":Y,ae=q.some(function(le){return!!~oe.indexOf(le)});ae&&this.refresh()},Q.getInstance=function(){return this.instance_||(this.instance_=new Q),this.instance_},Q.instance_=null,Q}(),M=function(Q,N){for(var Y=0,oe=Object.keys(N);Y<oe.length;Y++){var ae=oe[Y];Object.defineProperty(Q,ae,{value:N[ae],enumerable:!1,writable:!1,configurable:!0})}return Q},b=function(Q){var N=Q&&Q.ownerDocument&&Q.ownerDocument.defaultView;return N||xe},E=se(0,0,0,0);function C(Q){return parseFloat(Q)||0}function P(Q){for(var N=[],Y=1;Y<arguments.length;Y++)N[Y-1]=arguments[Y];return N.reduce(function(oe,ae){var le=Q["border-"+ae+"-width"];return oe+C(le)},0)}function ne(Q){for(var N=["top","right","bottom","left"],Y={},oe=0,ae=N;oe<ae.length;oe++){var le=ae[oe],x=Q["padding-"+le];Y[le]=C(x)}return Y}function te(Q){var N=Q.getBBox();return se(0,0,N.width,N.height)}function V(Q){var N=Q.clientWidth,Y=Q.clientHeight;if(!N&&!Y)return E;var oe=b(Q).getComputedStyle(Q),ae=ne(oe),le=ae.left+ae.right,x=ae.top+ae.bottom,A=C(oe.width),W=C(oe.height);if(oe.boxSizing==="border-box"&&(Math.round(A+le)!==N&&(A-=P(oe,"left","right")+le),Math.round(W+x)!==Y&&(W-=P(oe,"top","bottom")+x)),!j(Q)){var ge=Math.round(A+le)-N,Be=Math.round(W+x)-Y;Math.abs(ge)!==1&&(A-=ge),Math.abs(Be)!==1&&(W-=Be)}return se(ae.left,ae.top,A,W)}var D=function(){return typeof SVGGraphicsElement!="undefined"?function(Q){return Q instanceof b(Q).SVGGraphicsElement}:function(Q){return Q instanceof b(Q).SVGElement&&typeof Q.getBBox=="function"}}();function j(Q){return Q===b(Q).document.documentElement}function O(Q){return ue?D(Q)?te(Q):V(Q):E}function F(Q){var N=Q.x,Y=Q.y,oe=Q.width,ae=Q.height,le=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,x=Object.create(le.prototype);return M(x,{x:N,y:Y,width:oe,height:ae,top:Y,right:N+oe,bottom:ae+Y,left:N}),x}function se(Q,N,Y,oe){return{x:Q,y:N,width:Y,height:oe}}var Ee=function(){function Q(N){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=se(0,0,0,0),this.target=N}return Q.prototype.isActive=function(){var N=O(this.target);return this.contentRect_=N,N.width!==this.broadcastWidth||N.height!==this.broadcastHeight},Q.prototype.broadcastRect=function(){var N=this.contentRect_;return this.broadcastWidth=N.width,this.broadcastHeight=N.height,N},Q}(),he=function(){function Q(N,Y){var oe=F(Y);M(this,{target:N,contentRect:oe})}return Q}(),Ce=function(){function Q(N,Y,oe){if(this.activeObservations_=[],this.observations_=new y,typeof N!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=N,this.controller_=Y,this.callbackCtx_=oe}return Q.prototype.observe=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof b(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var Y=this.observations_;Y.has(N)||(Y.set(N,new Ee(N)),this.controller_.addObserver(this),this.controller_.refresh())}},Q.prototype.unobserve=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof b(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var Y=this.observations_;Y.has(N)&&(Y.delete(N),Y.size||this.controller_.removeObserver(this))}},Q.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Q.prototype.gatherActive=function(){var N=this;this.clearActive(),this.observations_.forEach(function(Y){Y.isActive()&&N.activeObservations_.push(Y)})},Q.prototype.broadcastActive=function(){if(this.hasActive()){var N=this.callbackCtx_,Y=this.activeObservations_.map(function(oe){return new he(oe.target,oe.broadcastRect())});this.callback_.call(N,Y,N),this.clearActive()}},Q.prototype.clearActive=function(){this.activeObservations_.splice(0)},Q.prototype.hasActive=function(){return this.activeObservations_.length>0},Q}(),Pe=typeof WeakMap!="undefined"?new WeakMap:new y,_e=function(){function Q(N){if(!(this instanceof Q))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var Y=K.getInstance(),oe=new Ce(N,Y,this);Pe.set(this,oe)}return Q}();["observe","unobserve","disconnect"].forEach(function(Q){_e.prototype[Q]=function(){var N;return(N=Pe.get(this))[Q].apply(N,arguments)}});var tt=function(){return typeof xe.ResizeObserver!="undefined"?xe.ResizeObserver:_e}();it.Z=tt},98040:function(Gt){Gt.exports=function(){var it=document.getSelection();if(!it.rangeCount)return function(){};for(var S=document.activeElement,y=[],ue=0;ue<it.rangeCount;ue++)y.push(it.getRangeAt(ue));switch(S.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":S.blur();break;default:S=null;break}return it.removeAllRanges(),function(){it.type==="Caret"&&it.removeAllRanges(),it.rangeCount||y.forEach(function(xe){it.addRange(xe)}),S&&S.focus()}}},4977:function(Gt){"use strict";Gt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16471:function(Gt,it,S){"use strict";S.d(it,{ZP:function(){return Bs}});const y=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ue=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=xe},xe=Number.MAX_SAFE_INTEGER||9007199254740991;let pe=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}({}),H=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}({}),m=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 ie={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},q={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{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 K{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 o(e),this.fast_=new o(t),this.defaultTTFB_=n,this.ttfb_=new o(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new o(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new o(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(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 M(a,e,t){return(e=ne(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function b(){return b=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},b.apply(null,arguments)}function E(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 C(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?E(Object(t),!0).forEach(function(r){M(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function P(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 ne(a){var e=P(a,"string");return typeof e=="symbol"?e:e+""}class te{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=V,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 V=function(){},D={trace:V,debug:V,log:V,warn:V,info:V,error:V};function j(){return b({},D)}function O(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):V}function F(a,e,t){return e[a]?e[a].bind(e):O(a,t)}const se=j();function Ee(a,e,t){const r=j();if(typeof console=="object"&&a===!0||typeof a=="object"){const n=["debug","log","info","warn","error"];n.forEach(i=>{r[i]=F(i,a,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return j()}n.forEach(i=>{se[i]=F(i,a)})}else b(se,r);return r}const he=se;function Ce(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Pe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function _e(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 tt(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="",l=0;for(;l<t;){if(r=a[l++],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[l++],s+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=a[l++],i=a[l++],s+=String.fromCharCode((r&15)<<12|(n&63)<<6|(i&63)<<0);break}}return s}function Q(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 N(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function Y(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var oe={exports:{}},ae;function le(){return ae||(ae=1,function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(h,c,p){if(p=p||{},h=h.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return h;var g=l.parseURL(h);if(!g)throw new Error("Error trying to parse base URL.");return g.path=l.normalizePath(g.path),l.buildURLFromParts(g)}var T=l.parseURL(c);if(!T)throw new Error("Error trying to parse relative URL.");if(T.scheme)return p.alwaysNormalize?(T.path=l.normalizePath(T.path),l.buildURLFromParts(T)):c;var R=l.parseURL(h);if(!R)throw new Error("Error trying to parse base URL.");if(!R.netLoc&&R.path&&R.path[0]!=="/"){var k=n.exec(R.path);R.netLoc=k[1],R.path=k[2]}R.netLoc&&!R.path&&(R.path="/");var re={scheme:R.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(re.netLoc=R.netLoc,T.path[0]!=="/"))if(!T.path)re.path=R.path,T.params||(re.params=R.params,T.query||(re.query=R.query));else{var ee=R.path,Ae=ee.substring(0,ee.lastIndexOf("/")+1)+T.path;re.path=l.normalizePath(Ae)}return re.path===null&&(re.path=p.alwaysNormalize?l.normalizePath(T.path):T.path),l.buildURLFromParts(re)},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=l})()}(oe)),oe.exports}var x=le();class A{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 W={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ge{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,$e(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={[W.AUDIO]:null,[W.VIDEO]:null,[W.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 A),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=x.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[W.AUDIO]=null,e[W.VIDEO]=null,e[W.AUDIOVIDEO]=null}}function Be(a){return a.sn!=="initSegment"}class Xe extends ge{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(y(e)&&y(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=y(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(!y(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Be(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:l}=this,h=l[e];if(!h){l[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 Ve extends ge{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 Ze(a,e){const t=Object.getPrototypeOf(a);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||Ze(t,e)}}function $e(a,e){const t=Ze(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const qe=Math.pow(2,32)-1,je=[].push,Et={video:1,audio:2,id3:3,text:4};function Qe(a){return String.fromCharCode.apply(null,a)}function wt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Fe(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function st(a,e){let t=Fe(a,e);return t*=Math.pow(2,32),t+=Fe(a,e+4),t}function Re(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function we(a){const e=a.byteLength;for(let t=0;t<e;){const r=Fe(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 ce(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=Fe(a,n),s=Qe(a.subarray(n+4,n+8)),l=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,l));else{const h=ce(a.subarray(n+8,l),e.slice(1));h.length&&je.apply(t,h)}n=l}return t}function He(a){const e=[],t=a[0];let r=8;const n=Fe(a,r);r+=4;let i=0,s=0;t===0?(i=Fe(a,r),s=Fe(a,r+4),r+=8):(i=st(a,r),s=st(a,r+8),r+=16),r+=2;let l=a.length+s;const h=wt(a,r);r+=2;for(let c=0;c<h;c++){let p=r;const g=Fe(a,p);p+=4;const T=g&2147483647;if((g&2147483648)>>>31===1)return he.warn("SIDX has hierarchical references (not supported)"),null;const k=Fe(a,p);p+=4,e.push({referenceSize:T,subsegmentDuration:k,info:{duration:k/n,start:l,end:l+T-1}}),l+=T,p+=4,r=p}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:h,references:e}}function Ie(a){const e=[],t=ce(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=ce(i,["tkhd"])[0];if(s){let l=s[0];const h=Fe(s,l===0?12:20),c=ce(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=Fe(c,l===0?12:20),g=ce(i,["mdia","hdlr"])[0];if(g){const T=Qe(g.subarray(8,12)),R={soun:W.AUDIO,vide:W.VIDEO}[T],k=ce(i,["mdia","minf","stbl","stsd"])[0],re=De(k);R?(e[h]={timescale:p,type:R,stsd:re},e[R]=C({timescale:p,id:h},re)):e[h]={timescale:p,type:T,stsd:re}}}}}return ce(a,["moov","mvex","trex"]).forEach(n=>{const i=Fe(n,4),s=e[i];s&&(s.default={duration:Fe(n,12),flags:Fe(n,20)})}),e}function De(a){const e=a.subarray(8),t=e.subarray(86),r=Qe(e.subarray(4,8));let n=r,i;const s=r==="enca"||r==="encv";if(s){const c=ce(e,[r])[0].subarray(r==="enca"?28:78);ce(c,["sinf"]).forEach(g=>{const T=ce(g,["schm"])[0];if(T){const R=Qe(T.subarray(4,8));if(R==="cbcs"||R==="cenc"){const k=ce(g,["frma"])[0];k&&(n=Qe(k))}}})}const l=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const h=ce(t,["avcC"])[0];h&&h.length>3&&(n+="."+Le(h[1])+Le(h[2])+Le(h[3]),i=L(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const h=ce(e,[r])[0],c=ce(h.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=me(c,p),p+=2;const g=c[p++];if(g&128&&(p+=2),g&64&&(p+=c[p++]),c[p++]!==4)break;p=me(c,p);const T=c[p++];if(T===64)n+="."+Le(T);else break;if(p+=12,c[p++]!==5)break;p=me(c,p);const R=c[p++];let k=(R&248)>>3;k===31&&(k+=1+((R&7)<<3)+((c[p]&224)>>5)),n+="."+k}break}case"hvc1":case"hev1":{const h=ce(t,["hvcC"])[0];if(h&&h.length>12){const c=h[1],p=["","A","B","C"][c>>6],g=c&31,T=Fe(h,2),R=(c&32)>>5?"H":"L",k=h[12],re=h.subarray(6,12);n+="."+p+g,n+="."+J(T).toString(16).toUpperCase(),n+="."+R+k;let ee="";for(let Ae=re.length;Ae--;){const Oe=re[Ae];(Oe||ee)&&(ee="."+Oe.toString(16).toUpperCase()+ee)}n+=ee}i=L(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=L(n,t)||n;break}case"vp09":{const h=ce(t,["vpcC"])[0];if(h&&h.length>6){const c=h[4],p=h[5],g=h[6]>>4&15;n+="."+We(c)+"."+We(p)+"."+We(g)}break}case"av01":{const h=ce(t,["av1C"])[0];if(h&&h.length>2){const c=h[1]>>>5,p=h[1]&31,g=h[2]>>>7?"H":"M",T=(h[2]&64)>>6,R=(h[2]&32)>>5,k=c===2&&T?R?12:10:T?10:8,re=(h[2]&16)>>4,ee=(h[2]&8)>>3,Ae=(h[2]&4)>>2,Oe=h[2]&3;n+="."+c+"."+We(p)+g+"."+We(k)+"."+re+"."+ee+Ae+Oe+"."+We(1)+"."+We(1)+"."+We(1)+"."+0,i=L("dav1",t)}break}}return{codec:n,encrypted:s,supplemental:i}}function L(a,e){const t=ce(e,["dvvC"]),r=t.length?t[0]:ce(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,i=r[2]<<5&32|r[3]>>3&31;return a+"."+We(n)+"."+We(i)}}function J(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function me(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Le(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function We(a){return(a<10?"0":"")+a}function Je(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&nt(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: ${Q(i)} -> ${Q(t)}`),r.set(t,8))})}function et(a){const e=[];return nt(a,t=>e.push(t.subarray(8,24))),e}function nt(a,e){ce(a,["moov","trak"]).forEach(r=>{const n=ce(r,["mdia","minf","stbl","stsd"])[0];if(!n)return;const i=n.subarray(8);let s=ce(i,["enca"]);const l=s.length>0;l||(s=ce(i,["encv"])),s.forEach(h=>{const c=l?h.subarray(28):h.subarray(78);ce(c,["sinf"]).forEach(g=>{const T=pt(g);T&&e(T,l)})})})}function pt(a){const e=ce(a,["schm"])[0];if(e){const t=Qe(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const r=ce(a,["schi","tenc"])[0];if(r)return r}}}function gt(a,e,t){const r={},n=ce(a,["moof","traf"]);for(let i=0;i<n.length;i++){const s=n[i],l=ce(s,["tfhd"])[0],h=Fe(l,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],g=ce(s,["tfdt"])[0];if(g){const Ue=g[0];let rt=Fe(g,4);Ue===1&&(rt===qe?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(rt*=qe+1,rt+=Fe(g,8))),y(rt)&&(!y(p.start)||rt<p.start)&&(p.start=rt)}const T=c.default,R=Fe(l,0)|(T==null?void 0:T.flags);let k=(T==null?void 0:T.duration)||0;R&8&&(R&2?k=Fe(l,12):k=Fe(l,8));const re=ce(s,["trun"]);let ee=p.start||0,Ae=0,Oe=k;for(let Ue=0;Ue<re.length;Ue++){const rt=re[Ue],ct=Fe(rt,4),Pt=p.sampleCount;p.sampleCount+=ct;const ft=rt[3]&1,It=rt[3]&4,Ct=rt[2]&1,_t=rt[2]&2,Nt=rt[2]&4,rr=rt[2]&8;let lr=8,yr=ct;for(ft&&(lr+=4),It&&ct&&(!(rt[lr+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=Pt),lr+=4,Ct?(Oe=Fe(rt,lr),lr+=4):Oe=k,_t&&(lr+=4),rr&&(lr+=4),ee+=Oe,Ae+=Oe,yr--);yr--;)Ct?(Oe=Fe(rt,lr),lr+=4):Oe=k,_t&&(lr+=4),Nt&&(rt[lr+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(yr+1),p.keyFrameStart=ee),lr+=4),rr&&(lr+=4),ee+=Oe,Ae+=Oe;!Ae&&k&&(Ae+=k*ct)}p.duration+=Ae}if(!Object.keys(r).some(i=>r[i].duration)){let i=1/0,s=0;const l=ce(a,["sidx"]);for(let h=0;h<l.length;h++){const c=He(l[h]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((g,T)=>g+T.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&y(s)&&Object.keys(r).forEach(h=>{r[h].duration||(r[h].duration=s*r[h].timescale-r[h].start)})}return r}function mt(a){const e={valid:null,remainder:null},t=ce(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 St(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Tt(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return ce(r,["moof"]).map(h=>{const c=h.byteOffset-8;ce(h,["traf"]).map(g=>{const T=ce(g,["tfdt"]).map(R=>{const k=R[0];let re=Fe(R,4);return k===1&&(re*=Math.pow(2,32),re+=Fe(R,8)),re/n})[0];return T!==void 0&&(a=T),ce(g,["tfhd"]).map(R=>{const k=Fe(R,4),re=Fe(R,0)&16777215,ee=(re&1)!==0,Ae=(re&2)!==0,Oe=(re&8)!==0;let Ue=0;const rt=(re&16)!==0;let ct=0;const Pt=(re&32)!==0;let ft=8;k===i&&(ee&&(ft+=8),Ae&&(ft+=4),Oe&&(Ue=Fe(R,ft),ft+=4),rt&&(ct=Fe(R,ft),ft+=4),Pt&&(ft+=4),e.type==="video"&&(s=Ye(e.codec)),ce(g,["trun"]).map(It=>{const Ct=It[0],_t=Fe(It,0)&16777215,Nt=(_t&1)!==0;let rr=0;const lr=(_t&4)!==0,yr=(_t&256)!==0;let ur=0;const Xt=(_t&512)!==0;let dr=0;const sr=(_t&1024)!==0,mr=(_t&2048)!==0;let Mr=0;const er=Fe(It,4);let tr=8;Nt&&(rr=Fe(It,tr),tr+=4),lr&&(tr+=4);let en=rr+c;for(let bn=0;bn<er;bn++){if(yr?(ur=Fe(It,tr),tr+=4):ur=Ue,Xt?(dr=Fe(It,tr),tr+=4):dr=ct,sr&&(tr+=4),mr&&(Ct===0?Mr=Fe(It,tr):Mr=Re(It,tr),tr+=4),e.type===W.VIDEO){let rn=0;for(;rn<dr;){const dn=Fe(r,en);if(en+=4,vt(s,r[en])){const bi=r.subarray(en,en+dn);dt(bi,s?2:1,a+Mr/n,t)}en+=dn,rn+=dn+4}}a+=ur/n}}))})})}),t}function Ye(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function vt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function dt(a,e,t,r){const n=ve(a);let i=0;i+=e;let s=0,l=0,h=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;h=n[i++],s+=h}while(h===255);l=0;do{if(i>=n.length)break;h=n[i++],l+=h}while(h===255);const c=n.length-i;let p=i;if(l<c)i+=l;else if(l>c){he.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(n[p++]===181){const T=wt(n,p);if(p+=2,T===49){const R=Fe(n,p);if(p+=4,R===1195456820){const k=n[p++];if(k===3){const re=n[p++],ee=31&re,Ae=64&re,Oe=Ae?2+ee*3:0,Ue=new Uint8Array(Oe);if(Ae){Ue[0]=re;for(let rt=1;rt<Oe;rt++)Ue[rt]=n[p++]}r.push({type:k,payloadType:s,pts:t,bytes:Ue})}}}}}else if(s===5&&l>16){const g=[];for(let k=0;k<16;k++){const re=n[p++].toString(16);g.push(re.length==1?"0"+re:re),(k===3||k===5||k===7||k===9)&&g.push("-")}const T=l-16,R=new Uint8Array(T);for(let k=0;k<T;k++)R[k]=n[p++];r.push({payloadType:s,pts:t,uuid:g.join(""),userData:tt(R),userDataBytes:R})}}}function ve(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 Ge(a){const e=a[0];let t="",r="",n=0,i=0,s=0,l=0,h=0,c=0;if(e===0){for(;Qe(a.subarray(c,c+1))!=="\0";)t+=Qe(a.subarray(c,c+1)),c+=1;for(t+=Qe(a.subarray(c,c+1)),c+=1;Qe(a.subarray(c,c+1))!=="\0";)r+=Qe(a.subarray(c,c+1)),c+=1;r+=Qe(a.subarray(c,c+1)),c+=1,n=Fe(a,12),i=Fe(a,16),l=Fe(a,20),h=Fe(a,24),c=28}else if(e===1){c+=4,n=Fe(a,c),c+=4;const g=Fe(a,c);c+=4;const T=Fe(a,c);for(c+=4,s=bu(2,32)*g+T,ue(s)||(s=Number.MAX_SAFE_INTEGER,he.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Fe(a,c),c+=4,h=Fe(a,c),c+=4;Qe(a.subarray(c,c+1))!=="\0";)t+=Qe(a.subarray(c,c+1)),c+=1;for(t+=Qe(a.subarray(c,c+1)),c+=1;Qe(a.subarray(c,c+1))!=="\0";)r+=Qe(a.subarray(c,c+1)),c+=1;r+=Qe(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:l,id:h,payload:p}}function _(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 w(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),_([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t)}function ye(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=B(n);e.push(i),r+=i.size}}return e}function B(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,l=Q(new Uint8Array(s,t+12,16));let h=null,c=null,p=0;if(i===0)p=28;else{const T=a.getUint32(28);if(!T||r<32+T*16)return{offset:t,size:e};h=[];for(let R=0;R<T;R++)h.push(new Uint8Array(s,t+32+R*16,16));p=32+T*16}if(!p)return{offset:t,size:e};const g=a.getUint32(p);return e-32<g?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,g),{version:i,systemId:l,kids:h,data:c,offset:t,size:e})}const X=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),lt={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 Se(a,e){const t=lt[e];return!!t&&!!t[a.slice(0,4)]}function Ne(a,e,t=!0){return!a.split(",").some(r=>!ze(r,e,t))}function ze(a,e,t=!0){var r;const n=Ce(t);return(r=n==null?void 0:n.isTypeSupported(z(a,e)))!=null?r:!1}function z(a,e){return`${e}/mp4;codecs=${a}`}function Z(a){if(a){const e=a.substring(0,4);return lt.video[e]}return 2}function be(a){const e=X();return a.split(",").reduce((t,r)=>{const i=e&&Ye(r)?9:lt.video[r];return i?(i*2+t)/(t?3:2):(lt.audio[r]+t)/(t?2:1)},0)}const ke={};function G(a,e=!0){if(ke[a])return ke[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(ze(t[n],"audio",e))return ke[a]=t[n],t[n];if(t[n]==="mp3"&&(r=Ce(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return a}const ht=/flac|opus|mp4a\.40\.34/i;function de(a,e=!0){return a.replace(ht,t=>G(t.toLowerCase(),e))}function At(a,e){const t=[];if(a){const r=a.split(",");for(let n=0;n<r.length;n++)Se(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function $t(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Kt(a,"audio")||Kt(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 Kt(a,e){return Se(a,e)&&ze(a,e)}function ar(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 Qt(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 Zt(a){const e=Ce(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 Sr(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Nr={supported:!0,powerEfficient:!0,smooth:!0},Yt={supported:!1,smooth:!1,powerEfficient:!1},wr={supported:!0,configurations:[],decodingInfoResults:[Nr]};function zt(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Yt],error:a}}function Rt(a,e,t,r,n,i){const s=a.videoCodec,l=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 g=null;if(l!=null&&l.length)try{l.length===1&&l[0]?g=e.groups[l[0]].channels:g=l.reduce((T,R)=>{if(R){const k=e.groups[R];if(!k)throw new Error(`Audio track group ${R} not found`);Object.keys(k.channels).forEach(re=>{T[re]=(T[re]||0)+k.channels[re]})}return T},{2:0})}catch(T){return!0}return s!==void 0&&(s.split(",").some(T=>Ye(T))||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))||!!g&&y(p)&&Object.keys(g).some(T=>parseInt(T)>p)}function kt(a,e,t,r={}){const n=a.videoCodec;if(!n&&!a.audioCodec||!t)return Promise.resolve(wr);const i=[],s=qt(a),l=s.length,h=or(a,e,l>0),c=h.length;for(let p=l||1*c||1;p--;){const g={type:"media-source"};if(l&&(g.video=s[p%l]),c){g.audio=h[p%c];const T=g.audio.bitrate;g.video&&T&&(g.video.bitrate-=T)}i.push(g)}if(n){const p=navigator.userAgent;if(n.split(",").some(g=>Ye(g))&&X())return Promise.resolve(zt(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const g=tn(p);return r[g]||(r[g]=t.decodingInfo(p))})).then(p=>({supported:!p.some(g=>!g.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function qt(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),r=nn(a),n=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(h=>{const c={contentType:z(Qt(h),"video"),width:n,height:i,bitrate:r,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function or(a,e,t){var r;const n=(r=a.audioCodec)==null?void 0:r.split(","),i=nn(a);return n&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var h;const c=l?(h=e.groups[l])==null?void 0:h.tracks:null;return c?c.reduce((p,g)=>{if(g.groupId===l){const T=parseFloat(g.channels||"");n.forEach(R=>{const k={contentType:z(R,"audio"),bitrate:t?Dr(R,i):i};T&&(k.channels=""+T),p.push(k)})}return p},s):s},[]):[]}function Dr(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 nn(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function tn(a){let e="";const{audio:t,video:r}=a;if(r){const n=Sr(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=Sr(t.contentType);e+=`${r?"_":""}${n}_c${t.channels}`}return e}const Yr=["NONE","TYPE-0","TYPE-1",null];function Xr(a){return Yr.indexOf(a)>-1}const Tr=["SDR","PQ","HLG"];function vn(a){return!!a&&Tr.indexOf(a)>-1}var Gr={No:"",Yes:"YES",v2:"v2"};function Mn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?Gr.v2:Gr.Yes:Gr.No}class ln{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 Rr{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 $r(this._audioGroups,e)}hasSubtitleGroup(e){return $r(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 $r(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Br(){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 fn(a,e){let t=!1,r=[];if(a&&(t=a!=="SDR",r=[a]),e){r=e.allowedVideoRanges||Tr.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&Br(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const at=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}},xt=(a,e)=>JSON.stringify(a,at(e));function Bt(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,l=r==null?void 0:r.audioCodec,h=n==null?void 0:n.videoCodec,c=s&&parseInt(s)===2;let p=!1,g=!1,T=1/0,R=1/0,k=1/0,re=1/0,ee=0,Ae=[];const{preferHDR:Oe,allowedVideoRanges:Ue}=fn(e,n);for(let It=i.length;It--;){const Ct=a[i[It]];p||(p=Ct.channels[2]>0),T=Math.min(T,Ct.minHeight),R=Math.min(R,Ct.minFramerate),k=Math.min(k,Ct.minBitrate),Ue.filter(Nt=>Ct.videoRanges[Nt]>0).length>0&&(g=!0)}T=y(T)?T:0,R=y(R)?R:0;const rt=Math.max(1080,T),ct=Math.max(30,R);k=y(k)?k:t,t=Math.max(k,t),g||(e=void 0);const Pt=i.length>1;return{codecSet:i.reduce((It,Ct)=>{const _t=a[Ct];if(Ct===It)return It;if(Ae=g?Ue.filter(Nt=>_t.videoRanges[Nt]>0):[],Pt){if(_t.minBitrate>t)return Dt(Ct,`min bitrate of ${_t.minBitrate} > current estimate of ${t}`),It;if(!_t.hasDefaultAudio)return Dt(Ct,"no renditions with default or auto-select sound found"),It;if(l&&Ct.indexOf(l.substring(0,4))%5!==0)return Dt(Ct,`audio codec preference "${l}" not found`),It;if(s&&!c){if(!_t.channels[s])return Dt(Ct,`no renditions with ${s} channel sound found (channels options: ${Object.keys(_t.channels)})`),It}else if((!l||c)&&p&&_t.channels[2]===0)return Dt(Ct,"no renditions with stereo sound found"),It;if(_t.minHeight>rt)return Dt(Ct,`min resolution of ${_t.minHeight} > maximum of ${rt}`),It;if(_t.minFramerate>ct)return Dt(Ct,`min framerate of ${_t.minFramerate} > maximum of ${ct}`),It;if(!Ae.some(Nt=>_t.videoRanges[Nt]>0))return Dt(Ct,`no variants with VIDEO-RANGE of ${xt(Ae)} found`),It;if(h&&Ct.indexOf(h.substring(0,4))%5!==0)return Dt(Ct,`video codec preference "${h}" not found`),It;if(_t.maxScore<ee)return Dt(Ct,`max score of ${_t.maxScore} < selected max of ${ee}`),It}return It&&(be(Ct)>=be(It)||_t.fragmentError>a[It].fragmentError)?It:(re=_t.minIndex,ee=_t.maxScore,Ct)},void 0),videoRanges:Ae,preferHDR:Oe,minFramerate:R,minBitrate:k,minIndex:re}}function Dt(a,e){he.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Lt(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 Mt(a,e,t,r){return a.slice(t,r+1).reduce((n,i,s)=>{if(!i.codecSet)return n;const l=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:!l,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,l&&l.forEach(p=>{if(!p)return;const g=e.groups[p];g&&(h.hasDefaultAudio=h.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(T=>{h.channels[T]=(h.channels[T]||0)+g.channels[T]}))}),n},{})}function jt(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 Vt(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(Ar(a,n,t))return r}return-1}function Ar(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:l}=a,h=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||Cr(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(h===void 0||e.forced===h)&&(!("characteristics"in a)||pn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Cr(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function pn(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function vr(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 cr(a,e,t,r,n){const i=e[r],l=e.reduce((T,R,k)=>{const re=R.uri;return(T[re]||(T[re]=[])).push(k),T},{})[i.uri];l.length>1&&(r=Math.max.apply(Math,l));const h=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),g=Or(e,r,T=>{if(T.videoRange!==h||T.frameRate!==c||T.codecSet.substring(0,4)!==p)return!1;const R=T.audioGroups,k=t.filter(re=>!R||R.indexOf(re.groupId)!==-1);return Vt(a,k,n)>-1});return g>-1?g:Or(e,r,T=>{const R=T.audioGroups,k=t.filter(re=>!R||R.indexOf(re.groupId)!==-1);return Vt(a,k,n)>-1})}function Or(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 Vr(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class qr extends te{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:l,media:h}=s;if(!n||!h)return;const c=performance.now(),p=i?i.stats:n.stats,g=i?i.duration:n.duration,T=c-p.loading.start,R=s.minAutoLevel,k=n.level,re=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||k<=R){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const ee=re>-1&&re!==k,Ae=!!t||ee;if(!Ae&&(h.paused||!h.playbackRate||!h.readyState))return;const Oe=s.mainForwardBufferInfo;if(!Ae&&Oe===null)return;const Ue=this.bwEstimator.getEstimateTTFB(),rt=Math.abs(h.playbackRate);if(T<=Math.max(Ue,1e3*(g/(rt*2))))return;const ct=Oe?Oe.len/rt:0,Pt=p.loading.first?p.loading.first-p.loading.start:-1,ft=p.loaded&&Pt>-1,It=this.getBwEstimate(),Ct=s.levels,_t=Ct[k],Nt=Math.max(p.loaded,Math.round(g*(n.bitrate||_t.averageBitrate)/8));let rr=ft?T-Pt:T;rr<1&&ft&&(rr=Math.min(T,p.loaded*8/It));const lr=ft?p.loaded*1e3/rr:0,yr=Ue/1e3,ur=lr?(Nt-p.loaded)/lr:Nt*8/It+yr;if(ur<=ct)return;const Xt=lr?lr*8:It,dr=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,sr=this.hls.config.abrBandWidthUpFactor;let mr=Number.POSITIVE_INFINITY,Mr;for(Mr=k-1;Mr>R;Mr--){const bn=Ct[Mr].maxBitrate,rn=!Ct[Mr].details||dr;if(mr=this.getTimeToLoadFrag(yr,Xt,g*bn,rn),mr<Math.min(ct,g+yr))break}if(mr>=ur||mr>g*10)return;ft?this.bwEstimator.sample(T-Math.min(Ue,Pt),p.loaded):this.bwEstimator.sampleTTFB(T);const er=Ct[Mr].maxBitrate;this.getBwEstimate()*sr>er&&this.resetEstimator(er);const tr=this.findBestLevel(er,R,Mr,0,ct,1,1);tr>-1&&(Mr=tr),this.warn(`Fragment ${n.sn}${i?" part "+i.index:""} of level ${k} is loading too slowly;
|
|
Fragment duration: ${n.duration.toFixed(3)}
|
|
Time to underbuffer: ${ct.toFixed(3)} s
|
|
Estimated load time for current fragment: ${ur.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${mr.toFixed(3)} s
|
|
TTFB estimate: ${Pt|0} ms
|
|
Current BW estimate: ${y(It)?It|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${Mr} @ ${er|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Mr,this.clearTimer();const en=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Mr&&Mr>0){const bn=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Mr>0?"and switching down":""}
|
|
Fragment duration: ${n.duration.toFixed(3)} s
|
|
Time to underbuffer: ${bn.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Mr>R){let rn=this.findBestLevel(this.hls.levels[R].bitrate,R,Mr,0,bn,1,1);rn===-1&&(rn=R),this.hls.nextLoadLevel=this.hls.nextAutoLevel=rn,this.resetEstimator(this.hls.levels[rn].bitrate)}}};ee||ur>mr*2?en():this.timer=self.setInterval(en,mr*1e3),s.trigger(m.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 K(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(m.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=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 H.BUFFER_ADD_CODEC_ERROR:case H.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case H.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(),l=i?i.stats:r.stats,h=s-l.loading.start,c=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&c>-1){const g=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(h-Math.min(g,c),l.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;y(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===q.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],l=(s.loaded?s.loaded.bytes:0)+n.loaded,h=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:h},s.realBitrate=Math.round(8*l/h)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(m.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!==q.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,l=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 ${l}`),l}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,l=t?t.duration:e?e.duration:0,h=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(c){const ee=this.findBestLevel(h,s,n,c,0,p,g);if(ee>=0)return this.rebufferNotice=-1,ee}let T=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const ee=this.bitrateTestDelay;ee&&(T=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-ee,this.info(`bitrate test took ${Math.round(1e3*ee)}ms, set first fragment max fetchDuration to ${Math.round(1e3*T)} ms`),p=g=1)}const R=this.findBestLevel(h,s,n,c,T,p,g);if(this.rebufferNotice!==R&&(this.rebufferNotice=R,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${R}`)),R>-1)return R;const k=r.levels[s],re=r.loadLevelObj;return re&&(k==null?void 0:k.bitrate)<re.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,l){var h;const c=n+i,p=this.lastLoadedFragLevel,g=p===-1?this.hls.firstLevel:p,{fragCurrent:T,partCurrent:R}=this,{levels:k,allAudioTracks:re,loadLevel:ee,config:Ae}=this.hls;if(k.length===1)return 0;const Oe=k[g],Ue=!!((h=this.hls.latestLevelDetails)!=null&&h.live),rt=ee===-1||p===-1;let ct,Pt="SDR",ft=(Oe==null?void 0:Oe.frameRate)||0;const{audioPreference:It,videoPreference:Ct}=Ae,_t=this.audioTracksByGroup||(this.audioTracksByGroup=Lt(re));let Nt=-1;if(rt){if(this.firstSelection!==-1)return this.firstSelection;const Xt=this.codecTiers||(this.codecTiers=Mt(k,_t,t,r)),dr=Bt(Xt,Pt,e,It,Ct),{codecSet:sr,videoRanges:mr,minFramerate:Mr,minBitrate:er,minIndex:tr,preferHDR:en}=dr;Nt=tr,ct=sr,Pt=en?mr[mr.length-1]:mr[0],ft=Mr,e=Math.max(e,er),this.log(`picked start tier ${xt(dr)}`)}else ct=Oe==null?void 0:Oe.codecSet,Pt=Oe==null?void 0:Oe.videoRange;const rr=R?R.duration:T?T.duration:0,lr=this.bwEstimator.getEstimateTTFB()/1e3,yr=[];for(let Xt=r;Xt>=t;Xt--){var ur;const dr=k[Xt],sr=Xt>g;if(!dr)continue;if(Ae.useMediaCapabilities&&!dr.supportedResult&&!dr.supportedPromise){const rn=navigator.mediaCapabilities;typeof(rn==null?void 0:rn.decodingInfo)=="function"&&Rt(dr,_t,Pt,ft,e,It)?(dr.supportedPromise=kt(dr,_t,rn,this.supportedCache),dr.supportedPromise.then(dn=>{if(!this.hls)return;dr.supportedResult=dn;const bi=this.hls.levels,_i=bi.indexOf(dr);dn.error?this.warn(`MediaCapabilities decodingInfo error: "${dn.error}" for level ${_i} ${xt(dn)}`):dn.supported?dn.decodingInfoResults.some(Zi=>Zi.smooth===!1||Zi.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${_i} not smooth or powerEfficient: ${xt(dn)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${_i} ${xt(dn)}`),_i>-1&&bi.length>1&&(this.log(`Removing unsupported level ${_i}`),this.hls.removeLevel(_i),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(dn=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${dn}`)})):dr.supportedResult=wr}if((ct&&dr.codecSet!==ct||Pt&&dr.videoRange!==Pt||sr&&ft>dr.frameRate||!sr&&ft>0&&ft<dr.frameRate||(ur=dr.supportedResult)!=null&&(ur=ur.decodingInfoResults)!=null&&ur.some(rn=>rn.smooth===!1))&&(!rt||Xt!==Nt)){yr.push(Xt);continue}const mr=dr.details,Mr=(R?mr==null?void 0:mr.partTarget:mr==null?void 0:mr.averagetargetduration)||rr;let er;sr?er=l*e:er=s*e;const tr=rr&&n>=rr*2&&i===0?dr.averageBitrate:dr.maxBitrate,en=this.getTimeToLoadFrag(lr,er,tr*Mr,mr===void 0);if(er>=tr&&(Xt===p||dr.loadError===0&&dr.fragmentError===0)&&(en<=lr||!y(en)||Ue&&!this.bitrateTestDelay||en<c)){const rn=this.forcedAutoLevel;return Xt!==ee&&(rn===-1||rn!==ee)&&(yr.length&&this.trace(`Skipped level(s) ${yr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${k[yr[0]].codecs}" ${k[yr[0]].videoRange}; not compatible with "${ct}" ${Pt}`),this.info(`switch candidate:${g}->${Xt} adjustedbw(${Math.round(er)})-bitrate=${Math.round(er-tr)} ttfb:${lr.toFixed(1)} avgDuration:${Mr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${en.toFixed(1)} firstSelection:${rt} codecSet:${dr.codecSet} videoRange:${dr.videoRange} hls.loadLevel:${ee}`)),rt&&(this.firstSelection=Xt),Xt}}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 _r={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 Ir(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!y(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(sn(e,t,s))return s}return null}function Zr(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<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)&&Fr(t,r,i)===0||jr(i,a,Math.min(n,r))))return i;const s=_r.search(e,Fr.bind(null,t,r));return s&&(s!==a||!i)?s:i}function jr(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 Fr(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 sn(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function Wr(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 _r.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 Qr(a){switch(a.details){case H.FRAG_LOAD_TIMEOUT:case H.KEY_LOAD_TIMEOUT:case H.LEVEL_LOAD_TIMEOUT:case H.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Rn(a){return a.details.startsWith("key")}function bt(a){return Rn(a)&&!!a.frag&&!a.frag.decryptdata}function pr(a,e){const t=Qr(e);return a.default[`${t?"timeout":"error"}Retry`]}function Kr(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function wn(a){return C(C({},a),{errorRetry:null,timeoutRetry:null})}function Bn(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(kn(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function kn(a){return xn(a)||!!a&&(a<400||a>499)}function xn(a){return a===0&&navigator.onLine===!1}var gr={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ur={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class Tn extends te{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(m.ERROR,this.onError,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.ERROR,this.onError,this),e.off(m.ERROR,this.onErrorOut,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===q.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 l;return(l=s.details)==null?void 0:l.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 H.FRAG_LOAD_ERROR:case H.FRAG_LOAD_TIMEOUT:case H.KEY_LOAD_ERROR:case H.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case H.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=an();return}case H.FRAG_GAP:case H.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=gr.SendAlternateToPenaltyBox;return}case H.LEVEL_EMPTY_ERROR:case H.LEVEL_PARSING_ERROR:{var s;const h=t.parent===q.MAIN?t.level:n.loadLevel;t.details===H.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 H.LEVEL_LOAD_ERROR:case H.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case H.AUDIO_TRACK_LOAD_ERROR:case H.AUDIO_TRACK_LOAD_TIMEOUT:case H.SUBTITLE_LOAD_ERROR:case H.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const h=n.loadLevelObj;if(h&&(i.type===ie.AUDIO_TRACK&&h.hasAudioGroup(i.groupId)||i.type===ie.SUBTITLE_TRACK&&h.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=gr.SendAlternateToPenaltyBox,t.errorAction.flags=Ur.MoveAllAlternatesMatchingHost;return}}return;case H.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:gr.SendAlternateToPenaltyBox,flags:Ur.MoveAllAlternatesMatchingHDCP};return;case H.KEY_SYSTEM_SESSION_UPDATE_FAILED:case H.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case H.KEY_SYSTEM_NO_SESSION:t.errorAction={action:gr.SendAlternateToPenaltyBox,flags:Ur.MoveAllAlternatesMatchingKey};return;case H.BUFFER_ADD_CODEC_ERROR:case H.REMUX_ALLOC_ERROR:case H.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:n.loadLevel)}return;case H.INTERNAL_EXCEPTION:case H.BUFFER_APPENDING_ERROR:case H.BUFFER_FULL_ERROR:case H.LEVEL_SWITCH_ERROR:case H.BUFFER_STALLED_ERROR:case H.BUFFER_SEEK_OVER_HOLE:case H.BUFFER_NUDGE_ON_STALL:t.errorAction=an();return}t.type===pe.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=an())}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,n=pr(r.config.playlistLoadPolicy,e),i=this.playlistError++;if(Bn(n,i,Qr(e),e.response))return{action:gr.RetryRequest,flags:Ur.None,retryConfig:n,retryCount:i};const l=this.getLevelSwitchAction(e,t);return n&&(l.retryConfig=n,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=pr(Rn(e)?s:i,e),h=t.levels.reduce((p,g)=>p+g.fragmentError,0);if(n&&(e.details!==H.FRAG_GAP&&n.fragmentError++,!bt(e)&&Bn(l,h,Qr(e),e.response)))return{action:gr.RetryRequest,flags:Ur.None,retryConfig:l,retryCount:h};const c=this.getLevelSwitchAction(e,r);return l&&(c.retryConfig=l,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===H.BUFFER_APPEND_ERROR&&n.fragmentError++;let p=-1;const{levels:g,loadLevel:T,minAutoLevel:R,maxAutoLevel:k}=r;!r.autoLevelEnabled&&!r.config.preserveManualLevelOnError&&(r.loadLevel=-1);const re=(i=e.frag)==null?void 0:i.type,Ae=(re===q.AUDIO&&c===H.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===H.BUFFER_ADD_CODEC_ERROR||c===H.BUFFER_APPEND_ERROR))&&g.some(({audioCodec:Pt})=>n.audioCodec!==Pt),Ue=e.sourceBufferName==="video"&&(c===H.BUFFER_ADD_CODEC_ERROR||c===H.BUFFER_APPEND_ERROR)&&g.some(({codecSet:Pt,audioCodec:ft})=>n.codecSet!==Pt&&n.audioCodec===ft),{type:rt,groupId:ct}=(s=e.context)!=null?s:{};for(let Pt=g.length;Pt--;){const ft=(Pt+T)%g.length;if(ft!==T&&ft>=R&&ft<=k&&g[ft].loadError===0){var l,h;const It=g[ft];if(c===H.FRAG_GAP&&re===q.MAIN&&e.frag){const Ct=g[ft].details;if(Ct){const _t=Zr(e.frag,Ct.fragments,e.frag.start);if(_t!=null&&_t.gap)continue}}else{if(rt===ie.AUDIO_TRACK&&It.hasAudioGroup(ct)||rt===ie.SUBTITLE_TRACK&&It.hasSubtitleGroup(ct))continue;if(re===q.AUDIO&&(l=n.audioGroups)!=null&&l.some(Ct=>It.hasAudioGroup(Ct))||re===q.SUBTITLE&&(h=n.subtitleGroups)!=null&&h.some(Ct=>It.hasSubtitleGroup(Ct))||Ae&&n.audioCodec===It.audioCodec||Ue&&n.codecSet===It.codecSet||!Ae&&n.codecSet!==It.codecSet)continue}p=ft;break}}if(p>-1&&r.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:gr.SendAlternateToPenaltyBox,flags:Ur.None,nextAutoLevel:p}}return{action:gr.SendAlternateToPenaltyBox,flags:Ur.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case gr.DoNothing:break;case gr.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==H.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 gr.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 Ur.None:this.switchLevel(e,i);break;case Ur.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=Yr[Yr.indexOf(p)-1],r.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Ur.MoveAllAlternatesMatchingKey:{const h=e.decryptdata;if(h){const c=this.hls.levels,p=c.length;for(let T=p;T--;)if(this.variantHasKey(c[T],h)){var s,l;this.log(`Banned key found in level ${T} (${c[T].bitrate}bps) or audio group "${(s=c[T].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${Q(h.keyId||[])}`),c[T].fragmentError++,c[T].loadError++,this.log(`Removing level ${T} with key error (${e.error})`),this.hls.removeLevel(T)}const g=e.frag;if(this.hls.levels.length<p)r.resolved=!0;else if(g&&g.type!==q.MAIN){const T=g.decryptdata;T&&!h.matches(T)&&(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===H.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=Sr(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:gr.DoNothing,flags:Ur.None};return a&&(e.resolved=!0),e}var Jr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class ci{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.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 l=n[i[s]];if((l==null?void 0:l.body.type)===t&&(!r||l.buffered)){const h=l.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(l=>{const h=this.fragments[l];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 g=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return g&&this.removeFragment(h.body),g})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=Ln(r),i=this.fragments[n];if(!i||i.buffered&&r.gap)return;const s=!r.relurl;Object.keys(t).forEach(l=>{const h=r.elementaryStreams[l];if(!h)return;const c=t[l],p=s||h.partial===!0;i.range[l]=this.getBufferedTimes(r,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,r),jn(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]=nr(r,n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=Ln(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,l=e.end,h=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<n.length;p++){const g=n.start(p)-this.bufferPadding,T=n.end(p)+this.bufferPadding;if(c>=g&&h<=T){i.time.push({startPTS:Math.max(s,n.start(p)),endPTS:Math.min(l,n.end(p))});break}else if(s<T&&l>g){const R=Math.max(s,n.start(p)),k=Math.min(l,n.end(p));k>R&&(i.partial=!0,i.time.push({startPTS:R,endPTS:k}))}else if(l<=g)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:l,fragments:h}=this;return Object.keys(h).forEach(c=>{const p=h[c];p&&jn(p)&&(n=p.body.start-l,i=p.body.end+l,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||jn(t))}getState(e){const t=Ln(e),r=this.fragments[t];return r?r.buffered?jn(r)?Jr.PARTIAL:Jr.OK:Jr.APPENDING:Jr.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=Ln(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 l=r.type;if(n){let c=this.activePartLists[l];c||(this.activePartLists[l]=c=[]),c.push(n)}this.timeRanges=i;const h=i[s];this.detectEvictedFragments(s,h,l,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Ln(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 l=this.fragments[s];if(!l)return;const h=l.body;h.type!==r||n&&!h.gap||h.start<t&&h.end>e&&(l.buffered||i)&&this.removeFragment(h)})}removeFragment(e){const t=Ln(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=nr(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 jn(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 Ln(a){return`${a.type}_${a.level}_${a.sn}`}function nr(a,e){return a.filter(t=>{const r=e(t);return r||t.clearElementaryStreamInfo(),r})}var un={cbc:0,ctr:1};class on{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 Kn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class Jn{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],l=r[3],h=this.invSubMix,c=h[0],p=h[1],g=h[2],T=h[3],R=new Uint32Array(256);let k=0,re=0,ee=0;for(ee=0;ee<256;ee++)ee<128?R[ee]=ee<<1:R[ee]=ee<<1^283;for(ee=0;ee<256;ee++){let Ae=re^re<<1^re<<2^re<<3^re<<4;Ae=Ae>>>8^Ae&255^99,e[k]=Ae,t[Ae]=k;const Oe=R[k],Ue=R[Oe],rt=R[Ue];let ct=R[Ae]*257^Ae*16843008;n[k]=ct<<24|ct>>>8,i[k]=ct<<16|ct>>>16,s[k]=ct<<8|ct>>>24,l[k]=ct,ct=rt*16843009^Ue*65537^Oe*257^k*16843008,c[Ae]=ct<<24|ct>>>8,p[Ae]=ct<<16|ct>>>16,g[Ae]=ct<<8|ct>>>24,T[Ae]=ct,k?(k=Oe^R[R[R[rt^Oe]]],re^=R[R[re]]):k=re=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 l,h;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),g=this.sBox,T=this.rcon,R=this.invSubMix,k=R[0],re=R[1],ee=R[2],Ae=R[3];let Oe,Ue;for(l=0;l<s;l++){if(l<i){Oe=c[l]=t[l];continue}Ue=Oe,l%i===0?(Ue=Ue<<8|Ue>>>24,Ue=g[Ue>>>24]<<24|g[Ue>>>16&255]<<16|g[Ue>>>8&255]<<8|g[Ue&255],Ue^=T[l/i|0]<<24):i>6&&l%i===4&&(Ue=g[Ue>>>24]<<24|g[Ue>>>16&255]<<16|g[Ue>>>8&255]<<8|g[Ue&255]),c[l]=Oe=(c[l-i]^Ue)>>>0}for(h=0;h<s;h++)l=s-h,h&3?Ue=c[l]:Ue=c[l-4],h<4||l<=4?p[h]=Ue:p[h]=k[g[Ue>>>24]]^re[g[Ue>>>16&255]]^ee[g[Ue>>>8&255]]^Ae[g[Ue&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,l=this.invSubMix,h=l[0],c=l[1],p=l[2],g=l[3],T=this.uint8ArrayToUint32Array_(r);let R=T[0],k=T[1],re=T[2],ee=T[3];const Ae=new Int32Array(e),Oe=new Int32Array(Ae.length);let Ue,rt,ct,Pt,ft,It,Ct,_t,Nt,rr,lr,yr,ur,Xt;const dr=this.networkToHostOrderSwap;for(;t<Ae.length;){for(Nt=dr(Ae[t]),rr=dr(Ae[t+1]),lr=dr(Ae[t+2]),yr=dr(Ae[t+3]),ft=Nt^i[0],It=yr^i[1],Ct=lr^i[2],_t=rr^i[3],ur=4,Xt=1;Xt<n;Xt++)Ue=h[ft>>>24]^c[It>>16&255]^p[Ct>>8&255]^g[_t&255]^i[ur],rt=h[It>>>24]^c[Ct>>16&255]^p[_t>>8&255]^g[ft&255]^i[ur+1],ct=h[Ct>>>24]^c[_t>>16&255]^p[ft>>8&255]^g[It&255]^i[ur+2],Pt=h[_t>>>24]^c[ft>>16&255]^p[It>>8&255]^g[Ct&255]^i[ur+3],ft=Ue,It=rt,Ct=ct,_t=Pt,ur=ur+4;Ue=s[ft>>>24]<<24^s[It>>16&255]<<16^s[Ct>>8&255]<<8^s[_t&255]^i[ur],rt=s[It>>>24]<<24^s[Ct>>16&255]<<16^s[_t>>8&255]<<8^s[ft&255]^i[ur+1],ct=s[Ct>>>24]<<24^s[_t>>16&255]<<16^s[ft>>8&255]<<8^s[It&255]^i[ur+2],Pt=s[_t>>>24]<<24^s[ft>>16&255]<<16^s[It>>8&255]<<8^s[Ct&255]^i[ur+3],Oe[t]=dr(Ue^R),Oe[t+1]=dr(Pt^k),Oe[t+2]=dr(ct^re),Oe[t+3]=dr(rt^ee),R=Nt,k=rr,re=lr,ee=yr,t=t+4}return Oe.buffer}}class ei{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=Pn(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Pn(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 Hn=16;class cn{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?Kn(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 l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,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:l}=this;if(n!==un.cbc||t.byteLength!==16)return he.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=St(l,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 Jn),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 ei(this.subtle,t,n)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new on(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%Hn;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 hi=Math.pow(2,17);class Un{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 Pr({type:pe.NETWORK_ERROR,details:H.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((l,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(k=>k[0]==="GAP")){h(ti(e));return}else e.gap=!1;const c=this.loader=i?new i(n):new s(n),p=Yn(e);e.loader=c;const g=wn(n.fragLoadPolicy.default),T={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:hi};e.stats=c.stats;const R={onSuccess:(k,re,ee,Ae)=>{this.resetLoader(e,c);let Oe=k.data;ee.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Oe.slice(0,16)),Oe=Oe.slice(16)),l({frag:e,part:null,payload:Oe,networkDetails:Ae})},onError:(k,re,ee,Ae)=>{this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:C({url:r,data:void 0},k),error:new Error(`HTTP Error ${k.code} ${k.text}`),networkDetails:ee,stats:Ae}))},onAbort:(k,re,ee)=>{this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:ee,stats:k}))},onTimeout:(k,re,ee)=>{this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:ee,stats:k}))}};t&&(R.onProgress=(k,re,ee,Ae)=>t({frag:e,part:null,payload:ee,networkDetails:Ae})),c.load(p,T,R)})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((l,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(ti(e,t));return}const c=this.loader=i?new i(n):new s(n),p=Yn(e,t);e.loader=c;const g=wn(n.fragLoadPolicy.default),T={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:hi};t.stats=c.stats,c.load(p,T,{onSuccess:(R,k,re,ee)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Ae={frag:e,part:t,payload:R.data,networkDetails:ee};r(Ae),l(Ae)},onError:(R,k,re,ee)=>{this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:C({url:p.url,data:void 0},R),error:new Error(`HTTP Error ${R.code} ${R.text}`),networkDetails:re,stats:ee}))},onAbort:(R,k,re)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:re,stats:R}))},onTimeout:(R,k,re)=>{this.resetLoader(e,c),h(new Pr({type:pe.NETWORK_ERROR,details:H.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:re,stats:R}))}})})}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),g=(h-c)*Math.round(r.loaded/c);r.total=r.loaded+g}else r.total=Math.max(r.loaded,r.total);const s=r.loading,l=n.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Yn(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(y(n)&&y(i)){var s;let l=n,h=i;if(a.sn==="initSegment"&&ri((s=a.decryptdata)==null?void 0:s.method)){const c=i-n;c%16&&(h=i+(16-c%16)),n!==0&&(r.resetIV=!0,l=n-16)}r.rangeStart=l,r.rangeEnd=h}return r}function ti(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:pe.MEDIA_ERROR,details:H.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new Pr(r)}function ri(a){return a==="AES-128"||a==="AES-256"}class Pr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class di extends te{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 fi{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=ii(),this.buffering={audio:ii(),video:ii(),audiovideo:ii()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function ii(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Nn={length:0,start:()=>0,end:()=>0};class br{static isBuffered(e,t){if(e){const r=br.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=br.getBuffered(e);return br.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=br.bufferedRanges(e);if(n.length)return br.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,g)=>p.start-g.start||g.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 g=i.length;if(g){const T=i[g-1].end;e[p].start-T<r?e[p].end>T&&(i[g-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,h=t,c=t;for(let p=0;p<i.length;p++){const g=i[p].start,T=i[p].end;if(n===-1&&t>=g&&t<=T&&(n=p),t+r>=g&&t<T)h=g,c=T,s=c-t;else if(t+r<g){l=g;break}}return{len:s,start:h||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||Nn}catch(t){return he.log("failed to get media.buffered",t),Nn}}}const Ii=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ht(a){return Ii.test(a)}function $n(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Ii,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 Ei(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 zn=/^(\d+)x(\d+)$/,qn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class xr{constructor(e,t){typeof e=="string"&&(e=xr.parseAttrList(e,t)),b(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=zn.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(qn.lastIndex=0;(r=qn.exec(e))!==null;){const s=r[1].trim();let l=r[2];const h=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(h)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(h||c))l=$n(t,l);else if(!c&&!h)switch(s){case"CLOSED-CAPTIONS":if(l==="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]=l}return n}}const Gn="com.apple.hls.interstitial";function si(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Li(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Fn{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=b(new xr({}),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"]);y(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(y(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===Gn}get isValid(){return!!this.id&&!this._badValueForSameId&&y(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 An=10;class Xn{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?y(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||An}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 Qn(a,e){return a.length===e.length?!a.some((t,r)=>t!==e[r]):!1}function Si(a,e){return!a&&!e?!0:!a||!e?!1:Qn(a,e)}function pi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function ji(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 Xi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Mi(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function mi(a){const e=Mi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function ir(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 Er(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=Xi(s)):t=mi(s)}}return t}const hn=typeof self!="undefined"?self:void 0;var Lr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},zr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function wi(a){switch(a){case zr.FAIRPLAY:return Lr.FAIRPLAY;case zr.PLAYREADY:return Lr.PLAYREADY;case zr.WIDEVINE:return Lr.WIDEVINE;case zr.CLEARKEY:return Lr.CLEARKEY}}function Wn(a){switch(a){case Lr.FAIRPLAY:return zr.FAIRPLAY;case Lr.PLAYREADY:return zr.PLAYREADY;case Lr.WIDEVINE:return zr.WIDEVINE;case Lr.CLEARKEY:return zr.CLEARKEY}}function ki(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[Lr.FAIRPLAY,Lr.WIDEVINE,Lr.PLAYREADY,Lr.CLEARKEY].filter(n=>!!e[n]):[];return!r[Lr.WIDEVINE]&&t&&r.push(Lr.WIDEVINE),r}const Ki=function(a){return hn!=null&&(a=hn.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function ra(a,e,t,r){let n;switch(a){case Lr.FAIRPLAY:n=["cenc","sinf"];break;case Lr.WIDEVINE:case Lr.PLAYREADY:n=["cenc"];break;case Lr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Ea(n,e,t,r)}function Ea(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 na(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Bi(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 l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const h=Xi(l).subarray(0,16);return ir(h),h}}return null}let Ti={};class yi{static clearKeyUriToKeyIdMap(){Ti={}}static setKeyIdForUri(e,t){Ti[e]=t}static addKeyIdForUri(e){const t=Object.keys(Ti).length%Number.MAX_SAFE_INTEGER,r=new Uint8Array(16);return new DataView(r.buffer,12,4).setUint32(0,t),Ti[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&&!pi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(N(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&Qn(e.keyFormatVersions,this.keyFormatVersions)&&Si(e.iv,this.iv)&&Si(e.keyId,this.keyId)}isSupported(){if(this.method){if(pi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case zr.FAIRPLAY:case zr.WIDEVINE:case zr.PLAYREADY:case zr.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(pi(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=Fi(e)),new yi(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Ti[this.uri];if(i&&!Qn(this.keyId,i)&&yi.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const r=Er(this.uri);if(r)switch(this.keyFormat){case zr.WIDEVINE:if(this.pssh=r,!this.keyId){const i=ye(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=is(t));break;case zr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=w(i,null,r),this.keyId=Bi(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=Fs(t),i||(i=is(t),i||(i=Ti[this.uri])),i&&(this.keyId=i,yi.setKeyIdForUri(this.uri,i))}return this}}function Fs(a){const e=a==null?void 0:a[zr.WIDEVINE];return e?e.keyId:null}function is(a){const e=a==null?void 0:a[zr.PLAYREADY];if(e){const t=Er(e.uri);if(t)return Bi(t)}return null}function Fi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Ns=/#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,ys=/#EXT-X-MEDIA:(.*)/g,Sa=/^#EXT(?:INF|-X-TARGETDURATION):/m,ds=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),bs=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 Ai{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 x.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Sa.test(e)}static parseMasterPlaylist(e,t){const r=Ht(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},i=[];if(Ns.lastIndex=0,!e.startsWith("#EXTM3U"))return n.playlistParsingError=new Error("no EXTM3U delimiter"),n;let s;for(;(s=Ns.exec(e))!=null;)if(s[1]){var l;const c=new xr(s[1],n),p=$n(n,s[2]),g={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ai.resolve(p,t)},T=c.decimalResolution("RESOLUTION");T&&(g.width=T.width,g.height=T.height),xs(c.CODECS,g);const R=c["SUPPLEMENTAL-CODECS"];R&&(g.supplemental={},xs(R,g.supplemental)),(l=g.unknownCodecs)!=null&&l.length||i.push(g),n.levels.push(g)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const g=new xr(p,n),T=g["DATA-ID"];T&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[T]=g);break}case"SESSION-KEY":{const g=$s(p,t,n);g.encrypted&&g.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(g)):he.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const g=new xr(p,n);Ri(n,g,t)}break}case"CONTENT-STEERING":{const g=new xr(p,n);n.contentSteering={uri:Ai.resolve(g["SERVER-URI"],t),pathwayId:g["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=sa(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,l={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(ys.lastIndex=0;(n=ys.exec(e))!==null;){const c=new xr(n[1],r),p=c.TYPE;if(p){const g=l[p],T=i[p]||[];i[p]=T;const R=c.LANGUAGE,k=c["ASSOC-LANGUAGE"],re=c.CHANNELS,ee=c.CHARACTERISTICS,Ae=c["INSTREAM-ID"],Oe={attrs:c,bitrate:0,id:h++,groupId:c["GROUP-ID"]||"",name:c.NAME||R||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:R,url:c.URI?Ai.resolve(c.URI,t):""};if(k&&(Oe.assocLang=k),re&&(Oe.channels=re),ee&&(Oe.characteristics=ee),Ae&&(Oe.instreamId=Ae),g!=null&&g.length){const Ue=Ai.findGroup(g,Oe.groupId)||g[0];qi(Oe,Ue,"audioCodec"),qi(Oe,Ue,"textCodec")}T.push(Oe)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){var l;const h={url:t},c=new Xn(t),p=c.fragments,g=[];let T=null,R=0,k=0,re=0,ee=0,Ae=0,Oe=null,Ue=new Xe(n,h),rt,ct,Pt,ft=-1,It=!1,Ct=null,_t;if(ds.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Ht(e),((l=ds.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(rt=ds.exec(e))!==null;){It&&(It=!1,Ue=new Xe(n,h),Ue.playlistOffset=re,Ue.setStart(re),Ue.sn=R,Ue.cc=ee,Ae&&(Ue.bitrate=Ae),Ue.level=r,T&&(Ue.initSegment=T,T.rawProgramDateTime&&(Ue.rawProgramDateTime=T.rawProgramDateTime,T.rawProgramDateTime=null),Ct&&(Ue.setByteRange(Ct),Ct=null)));const yr=rt[1];if(yr){Ue.duration=parseFloat(yr);const ur=(" "+rt[2]).slice(1);Ue.title=ur||null,Ue.tagList.push(ur?["INF",yr,ur]:["INF",yr])}else if(rt[3]){if(y(Ue.duration)){Ue.playlistOffset=re,Ue.setStart(re),Pt&&aa(Ue,Pt,c),Ue.sn=R,Ue.level=r,Ue.cc=ee,p.push(Ue);const ur=(" "+rt[3]).slice(1);Ue.relurl=$n(c,ur),Pi(Ue,Oe,g),Oe=Ue,re+=Ue.duration,R++,k=0,It=!0}}else{if(rt=rt[0].match(bs),!rt){he.warn("No matches on slow regex match for level playlist!");continue}for(ct=1;ct<rt.length&&rt[ct]===void 0;ct++);const ur=(" "+rt[ct]).slice(1),Xt=(" "+rt[ct+1]).slice(1),dr=rt[ct+2]?(" "+rt[ct+2]).slice(1):null;switch(ur){case"BYTERANGE":Oe?Ue.setByteRange(Xt,Oe):Ue.setByteRange(Xt);break;case"PROGRAM-DATE-TIME":Ue.rawProgramDateTime=Xt,Ue.tagList.push(["PROGRAM-DATE-TIME",Xt]),ft===-1&&(ft=p.length);break;case"PLAYLIST-TYPE":c.type&&gi(c,ur,rt),c.type=Xt.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?gi(c,ur,rt):p.length>0&&ss(c,ur,rt),R=c.startSN=parseInt(Xt);break;case"SKIP":{c.skippedSegments&&gi(c,ur,rt);const sr=new xr(Xt,c),mr=sr.decimalInteger("SKIPPED-SEGMENTS");if(y(mr)){c.skippedSegments+=mr;for(let er=mr;er--;)p.push(null);R+=mr}const Mr=sr.enumeratedString("RECENTLY-REMOVED-DATERANGES");Mr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Mr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&gi(c,ur,rt),c.targetduration=Math.max(parseInt(Xt),1);break;case"VERSION":c.version!==null&&gi(c,ur,rt),c.version=parseInt(Xt);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||gi(c,ur,rt),c.live=!1;break;case"#":(Xt||dr)&&Ue.tagList.push(dr?[Xt,dr]:[Xt]);break;case"DISCONTINUITY":ee++,Ue.tagList.push(["DIS"]);break;case"GAP":Ue.gap=!0,Ue.tagList.push([ur]);break;case"BITRATE":Ue.tagList.push([ur,Xt]),Ae=parseInt(Xt)*1e3,y(Ae)?Ue.bitrate=Ae:Ae=0;break;case"DATERANGE":{const sr=new xr(Xt,c),mr=new Fn(sr,c.dateRanges[sr.ID],c.dateRangeTagCount);c.dateRangeTagCount++,mr.isValid||c.skippedSegments?c.dateRanges[mr.id]=mr:he.warn(`Ignoring invalid DATERANGE tag: "${Xt}"`),Ue.tagList.push(["EXT-X-DATERANGE",Xt]);break}case"DEFINE":{{const sr=new xr(Xt,c);"IMPORT"in sr?Ei(c,sr,s):Ri(c,sr,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?gi(c,ur,rt):p.length>0&&ss(c,ur,rt),c.startCC=ee=parseInt(Xt);break;case"KEY":{const sr=$s(Xt,t,c);if(sr.isSupported()){if(sr.method==="NONE"){Pt=void 0;break}Pt||(Pt={});const mr=Pt[sr.keyFormat];mr!=null&&mr.matches(sr)||(mr&&(Pt=b({},Pt)),Pt[sr.keyFormat]=sr)}else he.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${Xt}"`);break}case"START":c.startTimeOffset=sa(Xt);break;case"MAP":{const sr=new xr(Xt,c);if(Ue.duration){const mr=new Xe(n,h);zs(mr,sr,r,Pt),T=mr,Ue.initSegment=T,T.rawProgramDateTime&&!Ue.rawProgramDateTime&&(Ue.rawProgramDateTime=T.rawProgramDateTime)}else{const mr=Ue.byteRangeEndOffset;if(mr){const Mr=Ue.byteRangeStartOffset;Ct=`${mr-Mr}@${Mr}`}else Ct=null;zs(Ue,sr,r,Pt),T=Ue,It=!0}T.cc=ee;break}case"SERVER-CONTROL":{_t&&gi(c,ur,rt),_t=new xr(Xt),c.canBlockReload=_t.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=_t.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&_t.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=_t.optionalFloat("PART-HOLD-BACK",0),c.holdBack=_t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&gi(c,ur,rt);const sr=new xr(Xt);c.partTarget=sr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let sr=c.partList;sr||(sr=c.partList=[]);const mr=k>0?sr[sr.length-1]:void 0,Mr=k++,er=new xr(Xt,c),tr=new Ve(er,Ue,h,Mr,mr);sr.push(tr),Ue.duration+=tr.duration;break}case"PRELOAD-HINT":{const sr=new xr(Xt,c);c.preloadHint=sr;break}case"RENDITION-REPORT":{const sr=new xr(Xt,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(sr);break}default:he.warn(`line parsed but not handled: ${rt}`);break}}}Oe&&!Oe.relurl?(p.pop(),re-=Oe.duration,c.partList&&(c.fragmentHint=Oe)):c.partList&&(Pi(Ue,Oe,g),Ue.cc=ee,c.fragmentHint=Ue,Pt&&aa(Ue,Pt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const Nt=p.length,rr=p[0],lr=p[Nt-1];if(re+=c.skippedSegments*c.targetduration,re>0&&Nt&&lr){c.averagetargetduration=re/Nt;const yr=lr.sn;c.endSN=yr!=="initSegment"?yr:0,c.live||(lr.endList=!0),ft>0&&(Us(p,ft),rr&&g.unshift(rr))}return c.fragmentHint&&(re+=c.fragmentHint.duration),c.totalduration=re,g.length&&c.dateRangeTagCount&&rr&&ia(g,c),c.endCC=ee,c}}function ia(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const l=e.fragments[e.fragments.length-1];a.push(l),t++}else return;const r=a[t-1],n=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let l=i.length;l--;){const h=e.dateRanges[i[l]],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 g=wa(e,c,a,p,n);if(g!==-1){h.tagAnchor=e.fragments[g].ref;break}}}}function wa(a,e,t,r,n){const i=t[r];if(i){const l=i.programDateTime;if(e>=l||r===0){var s;const h=(((s=t[r+1])==null?void 0:s.start)||n)-i.start;if(e<=l+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=(t[r+1]||p[p.length-1]).sn-a.startSN;for(let R=T;R>c;R--){const k=p[R].programDateTime;if(e>=k&&e<k+p[R].duration*1e3)return R}}return c}}}return-1}function $s(a,e,t){var r,n;const i=new xr(a,t),s=(r=i.METHOD)!=null?r:"",l=i.URI,h=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(n=i.KEYFORMAT)!=null?n:"identity";l&&i.IV&&!h&&he.error(`Invalid IV: ${i.IV}`);const g=l?Ai.resolve(l,e):"",T=(c||"1").split("/").map(Number).filter(Number.isFinite);return new yi(s,g,p,T,h,i.KEYID)}function sa(a){const t=new xr(a).decimalFloatingPoint("TIME-OFFSET");return y(t)?t:null}function xs(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Se(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 qi(a,e,t){const r=e[t];r&&(a[t]=r)}function Us(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 Pi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function zs(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 aa(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 gi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function ss(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function fs(a,e){const t=e.startPTS;if(y(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 Es(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,g=e.endPTS;if(y(p)){const Ae=Math.abs(p-t);a&&Ae>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Ae}s for level ${e.level} ${a.url}`):y(e.deltaPTS)?e.deltaPTS=Math.max(Ae,e.deltaPTS):e.deltaPTS=Ae,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,g),r=Math.max(r,g),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const T=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 R=e.sn;if(!a||R<a.startSN||R>a.endSN)return 0;let k;const re=R-a.startSN,ee=a.fragments;for(ee[re]=e,k=re;k>0;k--)fs(ee[k],ee[k-1]);for(k=re;k<ee.length-1;k++)fs(ee[k],ee[k+1]);return a.fragmentHint&&fs(ee[ee.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,T}function oa(a,e,t){if(a===e)return;let r=null;const n=a.fragments;for(let p=n.length-1;p>=0;p--){const g=n[p].initSegment;if(g){r=g;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Qi(a,e,(p,g,T,R)=>{if((!e.startCC||e.skippedSegments)&&g.cc!==p.cc){const k=p.cc-g.cc;for(let re=T;re<R.length;re++)R[re].cc+=k;e.endCC=R[R.length-1].cc}y(p.startPTS)&&y(p.endPTS)&&(g.setStart(g.startPTS=p.startPTS),g.startDTS=p.startDTS,g.maxStartPTS=p.maxStartPTS,g.endPTS=p.endPTS,g.endDTS=p.endDTS,g.minEndPTS=p.minEndPTS,g.setDuration(p.endPTS-p.startPTS),g.duration&&(i=g),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(g.elementaryStreams=p.elementaryStreams),g.loader=p.loader,p.hasStats&&(g.stats=p.stats),p.initSegment&&(g.initSegment=p.initSegment,r=p.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(r&&l.forEach(p=>{var g;p&&(!p.initSegment||p.initSegment.relurl===((g=r)==null?void 0:g.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=Ni(a.dateRanges,e,t));const p=a.fragments.filter(g=>g.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let g=1;g<l.length;g++)l[g].programDateTime===null&&Pi(l[g],l[g-1],p);ia(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var h;const p=gn(a,e.startSN-1);e.startCC=(h=p==null?void 0:p.cc)!=null?h:s[0].cc}la(a.partList,e.partList,(p,g)=>{g.elementaryStreams=p.elementaryStreams,g.stats=p.stats}),i?Es(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):$i(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 Ni(a,e,t){const{dateRanges:r,recentlyRemovedDateranges:n}=e,i=b({},a);n&&n.forEach(h=>{delete i[h]});const l=Object.keys(i).length;return l?(Object.keys(r).forEach(h=>{const c=i[h],p=new Fn(r[h].attr,c);p.isValid?(i[h]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${xt(r[h].attr)}"`)}),i):r}function la(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],l=e[n+r];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):r--}}}function Qi(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,l=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 g=l[c];if(r&&!g&&p&&(g=e.fragments[c]=p),p&&g){t(p,g,c,l);const T=p.relurl,R=g.relurl;if(T&&ps(T,R)){e.playlistParsingError=Ss(`media sequence mismatch ${g.sn}:`,a,e,p,g);return}else if(p.cc!==g.cc){e.playlistParsingError=Ss(`discontinuity sequence mismatch (${p.cc}!=${g.cc})`,a,e,p,g);return}}}}function Ss(a,e,t,r,n){return new Error(`${a} ${n.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function $i(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;Gs(e,s)}function Gs(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 mn(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 gn(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 En(a,e,t){return a?ni(a.partList,e,t):null}function ni(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 ai(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 ps(a,e){return a!==e&&e?ms(a)!==ms(e):!1}function ms(a){return a.replace(/\?[^?]*$/,"")}function Ji(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 js(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function ws(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function es(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)ws(t[r],a);e.fragmentHint&&ws(e.fragmentHint,a),e.alignedSliding=!0}function Ts(a,e){a&&(As(e,a),e.alignedSliding||Cs(e,a),!e.alignedSliding&&!e.skippedSegments&&$i(a,e,!1))}function As(a,e){if(!js(e,a))return;const t=Math.min(e.endCC,a.endCC),r=Ji(e.fragments,t),n=Ji(a.fragments,t);if(!r||!n)return;he.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=r.start-n.start;es(i,a)}function Cs(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=Ji(r,s),i=Ji(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=Ji(t,n.cc)||t[Math.floor(t.length/2)]);const l=n.programDateTime,h=i.programDateTime;if(!l||!h)return;const c=(h-l)/1e3-(i.start-n.start);es(c,a)}function oi(a,e,t){vi(a,e,t),a.addEventListener(e,t)}function vi(a,e,t){a.removeEventListener(e,t)}const ja={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}},Ft={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 Ks 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=Ft.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:l,media:h,mediaBuffer:c,state:p}=this,g=h?h.currentTime:0,T=br.bufferInfo(c||h,g,s.maxBufferHole),R=!T.len;if(this.log(`Media seeking to ${y(g)?g.toFixed(3):g}, state: ${p}, ${R?"out of":"in"} buffer`),this.state===Ft.ENDED)this.resetLoadingState();else if(l){const k=s.maxFragLookUpTolerance,re=l.start-k,ee=l.start+l.duration+k;if(R||ee<T.start||re>T.end){const Ae=g>ee;(g<re||Ae)&&(Ae&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(h){this.fragmentTracker.removeFragmentsInRange(g,1/0,this.playlistType,!0);const k=this.lastCurrentTime;if(g>k&&(this.lastCurrentTime=g),!this.loadingParts){const re=Math.max(T.end,g),ee=this.shouldLoadParts(this.getLevelDetails(),re);ee&&(this.log(`LL-Part loading ON after seeking to ${g.toFixed(2)} with buffer @${re.toFixed(2)}`),this.loadingParts=ee)}}this.hls.hasEnoughToStart||(this.log(`Setting ${R?"startPosition":"nextLoadPosition"} to ${g} for seek without enough to start`),this.nextLoadPosition=g,R&&(this.startPosition=g)),R&&this.state===Ft.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 Un(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new cn(e.config)}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Ft.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=Ft.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=br.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 br.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;oi(r,"seeking",this.onMediaSeeking),oi(r,"ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===Ft.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),vi(n,"seeking",this.onMediaSeeking),vi(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=Ft.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,l=i.frag;if(this.fragContextChanged(l)){(s===Ft.FRAG_LOADING||!this.fragCurrent&&s===Ft.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Ft.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(m.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Ft.STOPPED||this.state===Ft.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)===Jr.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),h=this.backtrackFragment;((h?e.sn-h.sn:0)===1||this.reduceMaxBufferLength(l,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)===Jr.PARTIAL&&r.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(m.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{const n=r==null?void 0:r.frag;if(!n||this.fragContextChanged(n)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{frag:i,payload:s}=r,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&pi(l.method)){const h=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,ji(l.method)).catch(c=>{throw n.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return n.trigger(m.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===Ft.STOPPED||this.state===Ft.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!==Ft.STOPPED&&(this.state=Ft.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,l=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(l.message),!s||s.mediaKeys?!1:(this.hls.trigger(m.ERROR,{type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_NO_KEYS,fatal:!1,error:l,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?ja.toString(br.getBuffered(r)):"(detached)"})`),Be(e)){var n;if(e.type!==q.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Ft.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=Ft.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),l=new fi(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(l)}_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 l=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=Ft.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(T=>{if(!this.fragContextChanged(T.frag))return this.hls.trigger(m.KEY_LOADED,T),this.state===Ft.KEY_LOADING&&(this.state=Ft.IDLE),T}),this.hls.trigger(m.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(l=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),l&&this.log("[eme] blocking frag load until media-keys acquired"));const h=this.fragPrevious;if(Be(e)&&(!h||e.sn!==h.sn)){const T=this.shouldLoadParts(t.details,e.end);T!==this.loadingParts&&(this.log(`LL-Part loading ${T?"ON":"OFF"} loading sn ${h==null?void 0:h.sn}->${e.sn}`),this.loadingParts=T)}if(r=Math.max(e.start,r||0),this.loadingParts&&Be(e)){const T=s.partList;if(T&&n){r>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const R=this.getNextPart(T,e,r);if(R>-1){const k=T[R];e=this.fragCurrent=k.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${k.index} (${R}/${T.length-1}) of ${this.fragInfo(e,!1,k)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=k.start+k.duration,this.state=Ft.FRAG_LOADING;let re;return l?re=l.then(ee=>!ee||this.fragContextChanged(ee.frag)?null:this.doFragPartsLoad(e,k,t,n)).catch(ee=>this.handleFragLoadError(ee)):re=this.doFragPartsLoad(e,k,t,n).catch(ee=>this.handleFragLoadError(ee)),this.hls.trigger(m.FRAG_LOADING,{frag:e,part:k,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):re}else if(!e.url||this.loadedEndOfParts(T,r))return Promise.resolve(null)}}if(Be(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(T=>T.loaded).map(T=>`[${T.start}-${T.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))}`),y(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Ft.FRAG_LOADING;const p=this.config.progressive&&e.type!==q.SUBTITLE;let g;return p&&l?g=l.then(T=>!T||this.fragContextChanged(T.frag)?null:this.fragmentLoader.load(e,n)).catch(T=>this.handleFragLoadError(T)):g=Promise.all([this.fragmentLoader.load(e,p?n:void 0),l]).then(([T])=>(!p&&n&&n(T),T)).catch(T=>this.handleFragLoadError(T)),this.hls.trigger(m.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):g}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var l;const h=[],c=(l=r.details)==null?void 0:l.partList,p=g=>{this.fragmentLoader.loadPart(e,g,n).then(T=>{h[g.index]=T;const R=T.part;this.hls.trigger(m.FRAG_LOADED,T);const k=En(r.details,e.sn,g.index+1)||ni(c,e.sn,g.index+1);if(k)p(k);else return i({frag:e,part:R,partsLoaded:h})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===H.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===pe.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(m.ERROR,t)}else this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:H.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Ft.PARSING){!this.fragCurrent&&this.state!==Ft.STOPPED&&this.state!==Ft.ERROR&&(this.state=Ft.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 l=this.getLevelDetails(),c=l&&r.sn>l.endSN||this.shouldLoadParts(l,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===q.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 l=t[n],h=l.details,c=s>-1?En(h,i,s):null,p=c?c.fragment:gn(h,i,r);return p?(r&&r!==p&&(p.stats=r.stats),{frag:p,part:c,level:l}):null}bufferFragmentData(e,t,r,n,i){if(this.state!==Ft.PARSING)return;const{data1:s,data2:l}=e;let h=s;if(l&&(h=St(s,l)),!h.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,g={type:e.type,frag:t,part:r,chunkMeta:n,offset:p,parent:t.type,data:h};if(this.hls.trigger(m.BUFFER_APPENDING,g),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!br.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=br.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!y(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=br.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 l=Math.max(Math.min(i.nextStart,s.end)-t,n);return br.bufferInfo(e,t,l)}}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=q.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,l=i.lowLatencyMode&&!!t.partList;let h=null;if(t.live){const g=i.initialLiveManifestSize;if(n<g)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${g})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;l&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),h=this.getInitialLiveFragment(t);const T=this.hls.startPosition,R=this.hls.liveSyncPosition,k=h?(T!==-1&&T>=s?T:R)||h.start:e;this.log(`Setting startPosition to ${k} to match start frag at live edge. mainStart: ${T} liveSyncPosition: ${R} frag.start: ${(c=h)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=k}}else e<=s&&(h=r[0]);if(!h){const g=this.loadingParts?t.partEnd:t.fragmentEnd;h=this.getFragmentAtPosition(e,g,t)}let p=this.filterReplacedPrimary(h,t);if(!p&&h){const g=h.sn-t.startSN;p=this.filterReplacedPrimary(r[g+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===Jr.OK||r===Jr.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 l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(l!==null&&r.len+l.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!==q.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 l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.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 l=0,h=e.length;l<h;l++){const c=e[l];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=l),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=Ir(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=Wr(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:l}=r;const{fragmentHint:h}=r,{maxFragLookUpTolerance:c}=n,p=r.partList,g=!!(this.loadingParts&&p!=null&&p.length&&h);g&&!this.bitrateTest&&p[p.length-1].fragment.sn===h.sn&&(s=s.concat(h),l=h.sn);let T;if(e<t){var R;const re=e<this.lastCurrentTime||e>t-c||(R=this.media)!=null&&R.paused||!this.startFragRequested?0:c;T=Zr(i,s,e,re)}else T=s[s.length-1];if(T){const k=T.sn-r.startSN,re=this.fragmentTracker.getState(T);if((re===Jr.OK||re===Jr.PARTIAL&&T.gap)&&(i=T),i&&T.sn===i.sn&&(!g||p[0].fragment.sn>T.sn||!r.live)&&T.level===i.level){const Ae=s[k+1];T.sn<l&&this.fragmentTracker.getState(Ae)!==Jr.OK?T=Ae:T=null}}return T}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,l=e.alignedSliding&&y(i);if(s||!l&&!i){Ts(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&&y(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&&Be(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!==Ft.FRAG_LOADING_WAITING_RETRY)&&(this.state=Ft.IDLE)}onFragmentOrKeyLoadError(e,t){var r;if(t.chunkMeta&&!t.frag){const Ae=this.getCurrentContext(t.chunkMeta);Ae&&(t.frag=Ae.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===H.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const l=t.errorAction;if(!l){this.state=Ft.ERROR;return}const{action:h,flags:c,retryCount:p=0,retryConfig:g}=l,T=!!g,R=T&&h===gr.RetryRequest,k=T&&!l.resolved&&c===Ur.MoveAllAlternatesMatchingHost,re=(r=this.hls.latestLevelDetails)==null?void 0:r.live;if(!R&&k&&Be(n)&&!n.endList&&re&&!bt(t))this.resetFragmentErrors(e),this.treatAsGap(n),l.resolved=!0;else if((R||k)&&p<g.maxNumRetry){var ee;const Ae=xn((ee=t.response)==null?void 0:ee.code),Oe=Kr(g,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Oe,this.state=Ft.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,Ae){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}/${g.maxNumRetry} in ${Oe}ms`)}else if(g)if(this.resetFragmentErrors(e),p<g.maxNumRetry)!s&&h!==gr.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else h===gr.SendAlternateToPenaltyBox?this.state=Ft.WAITING_LEVEL:this.state=Ft.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,r=t===1/0;(!t||e>=t||r&&!xn(0))&&(r&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Ft.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Ft.PARSING||this.state===Ft.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===q.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Ft.STOPPED&&(this.state=Ft.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=br.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===Ft.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Ft.STOPPED&&(this.state=Ft.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 g=p.endPTS-p.startPTS;if(g<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${g})`),h||!1;const T=n?0:Es(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:i,level:r,drift:T,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return h},!1)){var l;const h=((l=this.transmuxer)==null?void 0:l.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(m.ERROR,{type:pe.MEDIA_ERROR,details:H.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=Ft.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(m.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===q.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=Ka(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function Ka(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 as={exports:{}},Ds;function Ao(){return Ds||(Ds=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,g,T){if(typeof p!="function")throw new TypeError("The listener must be a function");var R=new n(p,g||h,T),k=t?t+c:c;return h._events[k]?h._events[k].fn?h._events[k]=[h._events[k],R]:h._events[k].push(R):(h._events[k]=R,h._eventsCount++),h}function s(h,c){--h._eventsCount===0?h._events=new r:delete h._events[c]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],p,g;if(this._eventsCount===0)return c;for(g in p=this._events)e.call(p,g)&&c.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var T=0,R=g.length,k=new Array(R);T<R;T++)k[T]=g[T].fn;return k},l.prototype.listenerCount=function(c){var p=t?t+c:c,g=this._events[p];return g?g.fn?1:g.length:0},l.prototype.emit=function(c,p,g,T,R,k){var re=t?t+c:c;if(!this._events[re])return!1;var ee=this._events[re],Ae=arguments.length,Oe,Ue;if(ee.fn){switch(ee.once&&this.removeListener(c,ee.fn,void 0,!0),Ae){case 1:return ee.fn.call(ee.context),!0;case 2:return ee.fn.call(ee.context,p),!0;case 3:return ee.fn.call(ee.context,p,g),!0;case 4:return ee.fn.call(ee.context,p,g,T),!0;case 5:return ee.fn.call(ee.context,p,g,T,R),!0;case 6:return ee.fn.call(ee.context,p,g,T,R,k),!0}for(Ue=1,Oe=new Array(Ae-1);Ue<Ae;Ue++)Oe[Ue-1]=arguments[Ue];ee.fn.apply(ee.context,Oe)}else{var rt=ee.length,ct;for(Ue=0;Ue<rt;Ue++)switch(ee[Ue].once&&this.removeListener(c,ee[Ue].fn,void 0,!0),Ae){case 1:ee[Ue].fn.call(ee[Ue].context);break;case 2:ee[Ue].fn.call(ee[Ue].context,p);break;case 3:ee[Ue].fn.call(ee[Ue].context,p,g);break;case 4:ee[Ue].fn.call(ee[Ue].context,p,g,T);break;default:if(!Oe)for(ct=1,Oe=new Array(Ae-1);ct<Ae;ct++)Oe[ct-1]=arguments[ct];ee[Ue].fn.apply(ee[Ue].context,Oe)}}return!0},l.prototype.on=function(c,p,g){return i(this,c,p,g,!1)},l.prototype.once=function(c,p,g){return i(this,c,p,g,!0)},l.prototype.removeListener=function(c,p,g,T){var R=t?t+c:c;if(!this._events[R])return this;if(!p)return s(this,R),this;var k=this._events[R];if(k.fn)k.fn===p&&(!T||k.once)&&(!g||k.context===g)&&s(this,R);else{for(var re=0,ee=[],Ae=k.length;re<Ae;re++)(k[re].fn!==p||T&&!k[re].once||g&&k[re].context!==g)&&ee.push(k[re]);ee.length?this._events[R]=ee.length===1?ee[0]:ee:s(this,R)}return this},l.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},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(as)),as.exports}var Co=Ao(),ua=Y(Co);const Hs="1.6.15",gs={};function Ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=gs[Hs];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 gs[Hs]=n,n}function Wa(a){const e=gs[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 gs[a]=n,n}function Io(a){const e=gs[a||Hs];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete gs[a||Hs],n&&self.URL.revokeObjectURL(n),r.terminate()}}function Ca(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 Ws(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 Is(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 Rs(a,e){const t=e;let r=0;for(;Ws(a,e);){r+=10;const n=Is(a,e+6);r+=n,Ca(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 R=new Error(`invalid ADTS sampling index:${s}`);a.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:H.FRAG_PARSING_ERROR,fatal:!0,error:R,reason:R.message});return}const l=(i>>6&3)+1,h=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+l,p=n[s];let g=s;(l===5||l===29)&&(g-=3);const T=[l<<3|(g&14)>>1,(g&1)<<7|h<<3];return he.log(`manifest codec:${r}, parsed codec:${c}, channels:${h}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:T,samplerate:p,channelCount:h,codec:c,parsedCodec:c,manifestCodec:r}}function Da(a,e){return a[e]===255&&(a[e+1]&246)===240}function Za(a,e){return a[e+1]&1?7:9}function ca(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 ha(a,e){return e+1<a.length&&Da(a,e)}function Vs(a,e){return Ya(a,e)&&Da(a,e)&&ca(a,e)<=a.length-e}function Ia(a,e){if(ha(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const r=ca(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||ha(a,n)}return!1}function Ra(a,e,t,r,n){if(!a.samplerate){const i=Va(e,t,r,n);if(!i)return;b(a,i)}}function Xa(a){return 1024*9e4/a}function Ro(a,e){const t=Za(a,e);if(e+t<=a.length){const r=ca(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function qa(a,e,t,r,n){const i=Xa(a.samplerate),s=r+n*i,l=Ro(e,t);let h;if(l){const{frameLength:g,headerLength:T}=l,R=T+g,k=Math.max(0,t+R-e.length);k?(h=new Uint8Array(R-T),h.set(e.subarray(t+T,e.length),0)):h=e.subarray(t+T,t+R);const re={unit:h,pts:s};return k||a.samples.push(re),{sample:re,length:R,missing:k}}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 Ws(a,e)&&Is(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,l=(s+a.byteLength)/i,h=(s+e)/i,c=Math.floor(Math.max(0,Math.min(h,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));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=tt(ka(a.data,1,r)),i=a.data[2+r],s=a.data.subarray(3+r).indexOf(0);if(s===-1)return;const l=tt(ka(a.data,3+r,s));let h;return n==="-->"?h=tt(ka(a.data,4+r+s)):h=Lo(a.data.subarray(4+r+s)),e.mimeType=n,e.pictureType=i,e.description=l,e.data=h,e}function Me(a){if(a.size<2)return;const e=tt(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=tt(a.data.subarray(t),!0);t+=r.length+1;const n=tt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=tt(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=tt(a.data.subarray(t),!0);t+=r.length+1;const n=tt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=tt(a.data);return{key:a.type,info:"",data:e}}function Oa(a){return a.type==="PRIV"?Me(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=Is(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}}const Ls=10,ro=10;function Ma(a){let e=0;const t=[];for(;Ws(a,e);){const r=Is(a,e+6);a[e+5]>>6&1&&(e+=Ls),e+=Ls;const n=e+r;for(;e+ro<n;){const i=to(a.subarray(e)),s=Oa(i);s&&t.push(s),e+=i.size+Ls}Ca(a,e)&&(e+=Ls)}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 da(a){const e=Ma(a);for(let t=0;t<e.length;t++){const r=e[t];if(no(r))return io(r)}}let li=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 Hi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Zs{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=St(this.cachedData,e),this.cachedData=null);let r=Rs(e,0),n=r?r.length:0,i;const s=this._audioTrack,l=this._id3Track,h=r?da(r):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&y(h))&&(this.basePTS=so(h,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:li.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=Rs(e,n),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:li.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=St(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Hi(),id3Track:l,textTrack:Hi()}}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:Hi(),id3Track:this._id3Track,textTrack:Hi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(y(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let fa=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,l=r+n*s,h={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};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,l=a[e+3]>>6,h=t===3?3-r:r===3?3:4,c=Oo[h*14+n-1]*1e3,g=ao[(t===3?0:t===2?1:2)*3+i],T=l===3?1:2,R=Ba[t][r],k=Mo[r],re=R*8*k,ee=Math.floor(R*c/g+s)*k;if(fa===null){const Ue=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fa=Ue?parseInt(Ue[1]):0}return!!fa&&fa<=87&&r===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:g,channelCount:T,frameLength:ee,samplesPerFrame:re}}}function U(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&&U(a,e)}function d(a,e){return U(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&U(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 v extends Zs{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=Rs(e,0);let n=(r==null?void 0:r.length)||0;if(f(e,n))return!1;for(let i=e.length;n<i;n++)if(Ia(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Vs(e,t)}appendFrame(e,t,r){Ra(e,this.observer,t,r,e.manifestCodec);const n=qa(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const I=(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 l=Math.min(r,8),h=8-l;i[0]=4278190080>>>24+h<<h,n[0]=(s[0]&i[0])>>h,t=t?t<<l|n[0]:n[0],e+=1,r-=l}return t};class $ extends Zs{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=fe(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=Rs(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&da(t)!==void 0&&I(e,r)<16}}function fe(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 l=[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 g=e[t+6]>>5;let T=0;g===2?T+=2:(g&1&&g!==1&&(T+=2),g&4&&(T+=2));const R=(e[t+6]<<8|e[t+7])>>12-T&1,re=[2,1,2,3,3,4,4,5][g]+R,ee=e[t+5]>>3,Ae=e[t+5]&7,Oe=new Uint8Array([i<<6|ee<<1|Ae>>2,(Ae&3)<<6|g<<3|R<<2|h>>4,h<<4&224]),Ue=1536/l*9e4,rt=r+n*Ue,ct=e.subarray(t,t+p);return a.config=Oe,a.channelCount=re,a.samplerate=l,a.samples.push({unit:ct,pts:rt}),p}class Te extends Zs{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=Rs(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&da(t)!==void 0&&I(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(f(e,r))return he.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return d(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return oo(e,t,r,this.basePTS,this.frameIndex)}}const Ke=/\/emsg[-/]ID3/i;class ot{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=Hi("video",1),s=this.audioTrack=Hi("audio",1),l=this.txtTrack=Hi("text",1);if(this.id3Track=Hi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=Ie(e);if(h.video){const{id:c,timescale:p,codec:g,supplemental:T}=h.video;i.id=c,i.timescale=l.timescale=p,i.codec=g,i.supplemental=T}if(h.audio){const{id:c,timescale:p,codec:g}=h.audio;s.id=c,s.timescale=p,s.codec=g}l.id=Et.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return we(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=St(this.remainderData,e));const l=mt(r);this.remainderData=l.remainder,n.samples=l.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Tt(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=Tt(e,t),{videoTrack:t,audioTrack:Hi(),id3Track:n,textTrack:Hi()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=ce(e.samples,["emsg"]);n&&n.forEach(i=>{const s=Ge(i);if(Ke.test(s.schemeIdUri)){const l=yt(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:l,pts:l,type:li.emsg,duration:h})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=yt(s,t);r.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:li.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 yt(a,e){return y(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Ot{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new cn(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(l=>{const h=new Uint8Array(l);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=ve(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.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 Ut{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,l=[];let h=0,c,p,g,T=-1,R=0;for(i===-1&&(T=0,R=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,T>=0){const k={data:t.subarray(T,p),type:R};l.push(k)}else{const k=this.getLastNalUnit(e.samples);k&&(s&&h<=4-s&&k.state&&(k.data=k.data.subarray(0,k.data.byteLength-s)),p>0&&(k.data=St(k.data,t.subarray(0,p)),k.state=0))}h<n?(g=this.getNALuType(t,h),T=h,R=g,i=0):i=-1}else i=0}if(T>=0&&i>=0){const k={data:t.subarray(T,n),type:R,state:i};l.push(k)}if(l.length===0){const k=this.getLastNalUnit(e.samples);k&&(k.data=St(k.data,t))}return e.naluState=i,l}}class Wt{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 Jt extends Ut{parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,l,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,g;switch(c.type){case 1:{let re=!1;l=!0;const ee=c.data;if(h&&ee.length>4){const Ae=this.readSliceType(ee);(Ae===2||Ae===4||Ae===7||Ae===9)&&(re=!0)}if(re){var T;(T=s)!=null&&T.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=re;break}case 5:l=!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:{l=!0,dt(c.data,1,r.pts,t.samples);break}case 7:{var R,k;l=!0,h=!0;const re=c.data,ee=this.readSPS(re);if(!e.sps||e.width!==ee.width||e.height!==ee.height||((R=e.pixelRatio)==null?void 0:R[0])!==ee.pixelRatio[0]||((k=e.pixelRatio)==null?void 0:k[1])!==ee.pixelRatio[1]){e.width=ee.width,e.height=ee.height,e.pixelRatio=ee.pixelRatio,e.sps=[re];const Ae=re.subarray(1,4);let Oe="avc1.";for(let Ue=0;Ue<3;Ue++){let rt=Ae[Ue].toString(16);rt.length<2&&(rt="0"+rt),Oe+=rt}e.codec=Oe}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&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 Wt(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 Wt(e);let r=0,n=0,i=0,s=0,l,h,c;const p=t.readUByte.bind(t),g=t.readBits.bind(t),T=t.readUEG.bind(t),R=t.readBoolean.bind(t),k=t.skipBits.bind(t),re=t.skipEG.bind(t),ee=t.skipUEG.bind(t),Ae=this.skipScalingList.bind(this);p();const Oe=p();if(g(5),k(3),p(),ee(),Oe===100||Oe===110||Oe===122||Oe===244||Oe===44||Oe===83||Oe===86||Oe===118||Oe===128){const It=T();if(It===3&&k(1),ee(),ee(),k(1),R())for(h=It!==3?8:12,c=0;c<h;c++)R()&&(c<6?Ae(16,t):Ae(64,t))}ee();const Ue=T();if(Ue===0)T();else if(Ue===1)for(k(1),re(),re(),l=T(),c=0;c<l;c++)re();ee(),k(1);const rt=T(),ct=T(),Pt=g(1);Pt===0&&k(1),k(1),R()&&(r=T(),n=T(),i=T(),s=T());let ft=[1,1];if(R()&&R())switch(p()){case 1:ft=[1,1];break;case 2:ft=[12,11];break;case 3:ft=[10,11];break;case 4:ft=[16,11];break;case 5:ft=[40,33];break;case 6:ft=[24,11];break;case 7:ft=[20,11];break;case 8:ft=[32,11];break;case 9:ft=[80,33];break;case 10:ft=[18,11];break;case 11:ft=[15,11];break;case 12:ft=[64,33];break;case 13:ft=[160,99];break;case 14:ft=[4,3];break;case 15:ft=[3,2];break;case 16:ft=[2,1];break;case 255:{ft=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((rt+1)*16-r*2-n*2),height:(2-Pt)*(ct+1)*16-(Pt?2:4)*(i+s),pixelRatio:ft}}}class hr extends Ut{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,l,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,g;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,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,h){var T;(T=s)!=null&&T.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:l=!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:l=!0,dt(c.data,2,r.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=b(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(l=!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 R=this.readSPS(c.data);e.width=R.width,e.height=R.height,e.pixelRatio=R.pixelRatio,e.codec=R.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const k in R.params)e.params[k]=R.params[k]}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(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const R=this.readPPS(c.data);for(const k in R)e.params[k]=R[k]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:l=!1;break}s&&l&&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 Wt(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 Wt(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),l=t.readUByte(),h=t.readUByte(),c=t.readUByte(),p=t.readUByte(),g=t.readUByte(),T=t.readUByte(),R=t.readUByte(),k=t.readUByte(),re=t.readUByte(),ee=t.readUByte(),Ae=t.readUByte(),Oe=[],Ue=[];for(let _n=0;_n<r;_n++)Oe.push(t.readBoolean()),Ue.push(t.readBoolean());if(r>0)for(let _n=r;_n<8;_n++)t.readBits(2);for(let _n=0;_n<r;_n++)Oe[_n]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ue[_n]&&t.readUByte();t.readUEG();const rt=t.readUEG();rt==3&&t.skipBits(1);const ct=t.readUEG(),Pt=t.readUEG(),ft=t.readBoolean();let It=0,Ct=0,_t=0,Nt=0;ft&&(It+=t.readUEG(),Ct+=t.readUEG(),_t+=t.readUEG(),Nt+=t.readUEG());const rr=t.readUEG(),lr=t.readUEG(),yr=t.readUEG(),ur=t.readBoolean();for(let _n=ur?0:r;_n<=r;_n++)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 xi=0;xi<4;xi++)for(let Yi=0;Yi<(xi===3?2:6);Yi++)if(!t.readBoolean())t.readUEG();else{const ns=Math.min(64,1<<4+(xi<<1));xi>1&&t.readEG();for(let xa=0;xa<ns;xa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const sr=t.readUEG();let mr=0;for(let _n=0;_n<sr;_n++){let xi=!1;if(_n!==0&&(xi=t.readBoolean()),xi){_n===sr&&t.readUEG(),t.readBoolean(),t.readUEG();let Yi=0;for(let ea=0;ea<=mr;ea++){const ns=t.readBoolean();let xa=!1;ns||(xa=t.readBoolean()),(ns||xa)&&Yi++}mr=Yi}else{const Yi=t.readUEG(),ea=t.readUEG();mr=Yi+ea;for(let ns=0;ns<Yi;ns++)t.readUEG(),t.readBoolean();for(let ns=0;ns<ea;ns++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const _n=t.readUEG();for(let xi=0;xi<_n;xi++){for(let Yi=0;Yi<yr+4;Yi++)t.readBits(1);t.readBits(1)}}let er=0,tr=1,en=1,bn=!0,rn=1,dn=0;t.readBoolean(),t.readBoolean();let bi=!1;if(t.readBoolean()){if(t.readBoolean()){const ta=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];ta>0&&ta<16?(tr=mu[ta-1],en=To[ta-1]):ta===255&&(tr=t.readBits(16),en=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()&&(rn=t.readBits(32),dn=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++){bn=t.readBoolean();const Kc=bn||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(),er=t.readUEG())}let Zi=ct,hs=Pt;if(ft){let _n=1,xi=1;rt===1?_n=xi=2:rt==2&&(_n=2),Zi=ct-_n*Ct-_n*It,hs=Pt-xi*Nt-xi*_t}const Js=n?["A","B","C"][n]:"",jc=l<<24|h<<16|c<<8|p;let dl=0;for(let _n=0;_n<32;_n++)dl=(dl|(jc>>_n&1)<<31-_n)>>>0;let fl=dl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${Js}${s}.${fl}.${i?"H":"L"}${Ae}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:n,general_profile_compatibility_flags:[l,h,c,p],general_constraint_indicator_flags:[g,T,R,k,re,ee],general_level_idc:Ae,bit_depth:rr+8,bit_depth_luma_minus8:rr,bit_depth_chroma_minus8:lr,min_spatial_segmentation_idc:er,chroma_format_idc:rt,frame_rate:{fixed:bn,fps:dn/rn}},width:Zi,height:hs,pixelRatio:[tr,en]}}readPPS(e){const t=new Wt(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 fr=188;class kr{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=kr.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(fr*5,t-fr)+1,n=0;for(;n<r;){let i=!1,s=-1,l=0;for(let h=n;h<t;h+=fr)if(e[h]===71&&(t-h===fr||e[h+fr]===71)){if(l++,s===-1&&(s=h,s!==0&&(r=Math.min(s+fr*99,e.length-fr)+1)),i||(i=Hr(e,h)===0),i&&l>1&&(s===0&&l>2||h+fr>r))return s}else{if(l)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Et[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=kr.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=kr.createTrack("audio",n),this._id3Track=kr.createTrack("id3"),this._txtTrack=kr.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,l=this._audioTrack,h=this._id3Track,c=this._txtTrack;let p=s.pid,g=s.pesData,T=l.pid,R=h.pid,k=l.pesData,re=h.pesData,ee=null,Ae=this.pmtParsed,Oe=this._pmtId,Ue=e.length;if(this.remainderData&&(e=St(this.remainderData,e),Ue=e.length,this.remainderData=null),Ue<fr&&!n)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};const rt=Math.max(0,kr.syncOffset(e));Ue-=(Ue-rt)%fr,Ue<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Ue,e.buffer.byteLength-Ue));let ct=0;for(let ft=rt;ft<Ue;ft+=fr)if(e[ft]===71){const It=!!(e[ft+1]&64),Ct=Hr(e,ft),_t=(e[ft+3]&48)>>4;let Nt;if(_t>1){if(Nt=ft+5+e[ft+4],Nt===ft+fr)continue}else Nt=ft+4;switch(Ct){case p:It&&(g&&(i=Sn(g,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),g={data:[],size:0}),g&&(g.data.push(e.subarray(Nt,ft+fr)),g.size+=ft+fr-Nt);break;case T:if(It){if(k&&(i=Sn(k,this.logger)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,i);break;case"mp3":this.parseMPEGPES(l,i);break;case"ac3":this.parseAC3PES(l,i);break}k={data:[],size:0}}k&&(k.data.push(e.subarray(Nt,ft+fr)),k.size+=ft+fr-Nt);break;case R:It&&(re&&(i=Sn(re,this.logger))&&this.parseID3PES(h,i),re={data:[],size:0}),re&&(re.data.push(e.subarray(Nt,ft+fr)),re.size+=ft+fr-Nt);break;case 0:It&&(Nt+=e[Nt]+1),Oe=this._pmtId=Cn(e,Nt);break;case Oe:{It&&(Nt+=e[Nt]+1);const rr=yn(e,Nt,this.typeSupported,r,this.observer,this.logger);p=rr.videoPid,p>0&&(s.pid=p,s.segmentCodec=rr.segmentVideoCodec),T=rr.audioPid,T>0&&(l.pid=T,l.segmentCodec=rr.segmentAudioCodec),R=rr.id3Pid,R>0&&(h.pid=R),ee!==null&&!Ae&&(this.logger.warn(`MPEG-TS PMT found at ${ft} after unknown PID '${ee}'. Backtracking to sync byte @${rt} to parse all TS packets.`),ee=null,ft=rt-188),Ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:ee=Ct;break}}else ct++;ct>0&&Dn(this.observer,new Error(`Found ${ct} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=g,l.pesData=k,h.pesData=re;const Pt={audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};return n&&this.extractRemainingSamples(Pt),Pt}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,l=t.pesData,h=n.pesData;let c;if(s&&(c=Sn(s,this.logger))?(this.readyVideoParser(r.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(r,i,c,!0),r.pesData=null)):r.pesData=s,l&&(c=Sn(l,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 l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;h&&(c=Sn(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 Ot(this.observer,this.config,t);return this.decrypt(n,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Jt:e==="hevc"&&(this.videoParser=new hr))}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 g=n.missing,T=n.sample.unit.byteLength;if(g===-1)i=St(n.sample.unit,i);else{const R=T-g;n.sample.unit.set(i.subarray(0,g),R),e.samples.push(n.sample),r=n.missing}}let s,l;for(s=r,l=i.length;s<l-1&&!ha(i,s);s++);if(s!==r){let g;const T=s<l-1;if(T?g=`AAC PES did not start with ADTS header,offset:${s}`:g="No ADTS header found in AAC PES",Dn(this.observer,new Error(g),T,this.logger),!T)return}Ra(e,this.observer,i,s,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(n){const g=Xa(e.samplerate);h=n.sample.pts+g}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<l;)if(p=qa(e,i,s,h,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!ha(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(u(r,s)){const h=oo(e,r,s,l,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,l=0,h;for(;l<i&&(h=fe(e,r,l,n,s++))>0;)l+=h}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=b({},t,{type:this._videoTrack?li.emsg:li.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function Hr(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Cn(a,e){return(a[e+10]&31)<<8|a[e+11]}function yn(a,e,t,r,n,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],h=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<h;){const p=Hr(a,e),g=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){In("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){In("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){In("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&&g>0){let T=e+5,R=g;for(;R>2;){switch(a[T]){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 re=a[T+1]+2;T+=re,R-=re}}break;case 194:case 135:return Dn(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+=g+5}return s}function Dn(a,e,t,r){r.warn(`parsing error: ${e.message}`),a.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:H.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function In(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Sn(a,e){let t=0,r,n,i,s,l;const h=a.data;if(!a||a.size===0)return null;for(;h[0].length<19&&h.length>1;)h[0]=St(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?(l=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=r[8];let g=i+9;if(a.size<=g)return null;a.size-=g;const T=new Uint8Array(a.size);for(let R=0,k=h.length;R<k;R++){r=h[R];let re=r.byteLength;if(g)if(g>re){g-=re;continue}else r=r.subarray(g),re-=g,g=0;T.set(r,t),t+=re}return n&&(n-=i+3),{data:T,pts:s,dts:l,len:n}}return null}class ui{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 On=Math.pow(2,32)-1;class ut{static init(){ut.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 ut.types)ut.types.hasOwnProperty(e)&&(ut.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]);ut.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]);ut.STTS=ut.STSC=ut.STCO=i,ut.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ut.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ut.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ut.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);ut.FTYP=ut.box(ut.types.ftyp,s,h,s,l),ut.DINF=ut.box(ut.types.dinf,ut.box(ut.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 ut.box(ut.types.hdlr,ut.HDLR_TYPES[e])}static mdat(e){return ut.box(ut.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(On+1)),n=Math.floor(t%(On+1));return ut.box(ut.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 ut.box(ut.types.mdia,ut.mdhd(e.timescale||0,e.duration||0),ut.hdlr(e.type),ut.minf(e))}static mfhd(e){return ut.box(ut.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"?ut.box(ut.types.minf,ut.box(ut.types.smhd,ut.SMHD),ut.DINF,ut.stbl(e)):ut.box(ut.types.minf,ut.box(ut.types.vmhd,ut.VMHD),ut.DINF,ut.stbl(e))}static moof(e,t,r){return ut.box(ut.types.moof,ut.mfhd(e),ut.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=ut.trak(e[t]);return ut.box.apply(null,[ut.types.moov,ut.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(ut.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=ut.trex(e[t]);return ut.box.apply(null,[ut.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(On+1)),n=Math.floor(t%(On+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 ut.box(ut.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 ut.box(ut.types.sdtp,r)}static stbl(e){return ut.box(ut.types.stbl,ut.stsd(e),ut.box(ut.types.stts,ut.STTS),ut.box(ut.types.stsc,ut.STSC),ut.box(ut.types.stsz,ut.STSZ),ut.box(ut.types.stco,ut.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 l=ut.box(ut.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],g=e.pixelRatio[1];return ut.box(ut.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]),l,ut.box(ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ut.box(ut.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,g>>24,g>>16&255,g>>8&255,g&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 ut.box(ut.types.mp4a,ut.audioStsd(e),ut.box(ut.types.esds,ut.esds(e)))}static mp3(e){return ut.box(ut.types[".mp3"],ut.audioStsd(e))}static ac3(e){return ut.box(ut.types["ac-3"],ut.audioStsd(e),ut.box(ut.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return ut.box(ut.types.stsd,ut.STSD,ut.mp4a(e));if(t==="ac3"&&e.config)return ut.box(ut.types.stsd,ut.STSD,ut.ac3(e));if(t==="mp3"&&e.codec==="mp3")return ut.box(ut.types.stsd,ut.STSD,ut.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return ut.box(ut.types.stsd,ut.STSD,ut.avc1(e));if(t==="hevc"&&e.vps)return ut.box(ut.types.stsd,ut.STSD,ut.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/(On+1)),l=Math.floor(r%(On+1));return ut.box(ut.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,l>>24,l>>16&255,l>>8&255,l&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=ut.sdtp(e),n=e.id,i=Math.floor(t/(On+1)),s=Math.floor(t%(On+1));return ut.box(ut.types.traf,ut.box(ut.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),ut.box(ut.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])),ut.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,ut.box(ut.types.trak,ut.tkhd(e),ut.mdia(e))}static trex(e){const t=e.id;return ut.box(ut.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 l,h,c,p,g,T;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),l=0;l<n;l++)h=r[l],c=h.duration,p=h.size,g=h.flags,T=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,g.isLeading<<2|g.dependsOn,g.isDependedOn<<6|g.hasRedundancy<<4|g.paddingValue<<1|g.isNonSync,g.degradPrio&61440,g.degradPrio&15,T>>>24&255,T>>>16&255,T>>>8&255,T&255],12+16*l);return ut.box(ut.types.trun,s)}static initSegment(e){ut.types||ut.init();const t=ut.moov(e);return St(ut.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 k=0;k<r.length;k+=1){s+=3;for(let re=0;re<r[k].length;re+=1)s+=2+r[k][re].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const h=r.length-1;for(let k=0;k<r.length;k+=1){l.set(new Uint8Array([32+k|(k===h?128:0),0,r[k].length]),s),s+=3;for(let re=0;re<r[k].length;re+=1)l.set(new Uint8Array([r[k][re].length>>8,r[k][re].length&255]),s),s+=2,l.set(r[k][re],s),s+=r[k][re].length}const c=ut.box(ut.types.hvcC,l),p=e.width,g=e.height,T=e.pixelRatio[0],R=e.pixelRatio[1];return ut.box(ut.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,g>>8&255,g&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,ut.box(ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ut.box(ut.types.pasp,new Uint8Array([T>>24,T>>16&255,T>>8&255,T&255,R>>24,R>>16&255,R>>8&255,R&255])))}}ut.types=void 0,ut.HDLR_TYPES=void 0,ut.STTS=void 0,ut.STSC=void 0,ut.STCO=void 0,ut.STSZ=void 0,ut.VMHD=void 0,ut.SMHD=void 0,ut.STSD=void 0,ut.FTYP=void 0,ut.DINF=void 0;const Ci=9e4;function Wi(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function Ui(a,e,t=1,r=!1){return Wi(a,e,1/t,r)}function Vn(a,e=!1){return Wi(a,1e3,1/Ci,e)}function os(a,e=1){return Wi(a,Ci,1/e)}function Vi(a){const{baseTime:e,timescale:t,trackId:r}=a;return`${e/t} (${e}/${t}) trackId: ${r}`}const lo=10*1e3,Fo=1024,ks=1152,Ps=1536;let zi=null,Os=null;function Ys(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 pa extends te{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,zi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);zi=s?parseInt(s[1]):0}if(Os===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Os=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&&Vi(t)} > ${e&&Vi(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 l=s.pts,h=l-i;return h<-4294967296&&(t=!0,l=Di(l,r),h=l-i),h>0?i:l},r);return t&&this.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,l,h){let c,p,g,T,R,k,re=i,ee=i;const Ae=e.pid>-1,Oe=t.pid>-1,Ue=t.samples.length,rt=e.samples.length>0,ct=l&&Ue>0||Ue>1;if((!Ae||rt)&&(!Oe||ct)||this.ISGenerated||l){if(this.ISGenerated){var ft,It,Ct,_t;const yr=this.videoTrackConfig;(yr&&(t.width!==yr.width||t.height!==yr.height||((ft=t.pixelRatio)==null?void 0:ft[0])!==((It=yr.pixelRatio)==null?void 0:It[0])||((Ct=t.pixelRatio)==null?void 0:Ct[1])!==((_t=yr.pixelRatio)==null?void 0:_t[1]))||!yr&&ct||this.nextAudioTs===null&&rt)&&this.resetInitSegment()}this.ISGenerated||(g=this.generateIS(e,t,i,s));const Nt=this.isVideoContiguous;let rr=-1,lr;if(ct&&(rr=No(t.samples),!Nt&&this.config.forceKeyFrameOnDiscontinuity))if(k=!0,rr>0){this.warn(`Dropped ${rr} out of ${Ue} video samples due to a missing keyframe`);const yr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(rr),t.dropped+=rr,ee+=(t.samples[0].pts-yr)/t.inputTimeScale,lr=ee}else rr===-1&&(this.warn(`No keyframe found out of ${Ue} video samples`),k=!1);if(this.ISGenerated){if(rt&&ct){const yr=this.getVideoStartPts(t.samples),Xt=(Di(e.samples[0].pts,yr)-yr)/t.inputTimeScale;re+=Math.max(0,Xt),ee+=Math.max(0,-Xt)}if(rt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),g=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,re,this.isAudioContiguous,s,Oe||ct||h===q.AUDIO?ee:void 0),ct){const yr=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),g=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,ee,Nt,yr)}}else ct&&(c=this.remuxVideo(t,ee,Nt,0));c&&(c.firstKeyFrame=rr,c.independent=rr!==-1,c.firstKeyFramePTS=lr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(R=ma(r,i,this._initPTS,this._initDTS)),n.samples.length&&(T=Fa(n,i,this._initPTS))),{audio:p,video:c,initSegment:g,independent:k,text:T,id3:R}}computeInitPts(e,t,r,n){const i=Math.round(r*t);let s=Di(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,l=this.typeSupported,h={},c=this._initPTS;let p=!c||n,g="audio/mp4",T,R,k,re=-1;if(p&&(T=R=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(g="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}h.audio={id:"audio",container:g,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):ut.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(re=e.id,k=e.inputTimeScale,!c||k!==c.timescale?T=R=this.computeInitPts(i[0].pts,k,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:ut.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(re=t.id,k=t.inputTimeScale,!c||k!==c.timescale){const ee=this.getVideoStartPts(s),Ae=Di(s[0].dts,ee),Oe=this.computeInitPts(Ae,k,r,"video"),Ue=this.computeInitPts(ee,k,r,"video");R=Math.min(R,Oe),T=Math.min(T,Ue)}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} ${T/k} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${r} offset: ${T/k} (${T}/${k}) trackId: ${re}`),this._initPTS={baseTime:T,timescale:k,trackId:re},this._initDTS={baseTime:R,timescale:k,trackId:re}):T=k=void 0,{tracks:h,initPTS:T,timescale:k,trackId:re}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,l=[],h=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let g=this.nextVideoTs,T=8,R=this.videoSampleDuration,k,re,ee=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Oe=!1;if(!r||g===null){const er=p+t*i,tr=s[0].pts-Di(s[0].dts,s[0].pts);zi&&g!==null&&Math.abs(er-tr-(g+p))<15e3?r=!0:g=er-tr-p}const Ue=g+p;for(let er=0;er<h;er++){const tr=s[er];tr.pts=Di(tr.pts,Ue),tr.dts=Di(tr.dts,Ue),tr.dts<s[er>0?er-1:er].dts&&(Oe=!0)}Oe&&s.sort(function(er,tr){const en=er.dts-tr.dts,bn=er.pts-tr.pts;return en||bn}),k=s[0].dts,re=s[s.length-1].dts;const rt=re-k,ct=rt?Math.round(rt/(h-1)):R||e.inputTimeScale/30;if(r){const er=k-Ue,tr=er>ct,en=er<-1;if((tr||en)&&(tr?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Vn(er,!0)} ms (${er}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Vn(-er,!0)} ms (${er}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!en||Ue>=s[0].pts||zi)){k=Ue;const bn=s[0].pts-er;if(tr)s[0].dts=k,s[0].pts=bn;else{let rn=!0;for(let dn=0;dn<s.length&&!(s[dn].dts>bn&&rn);dn++){const bi=s[dn].pts;if(s[dn].dts-=er,s[dn].pts-=er,dn<s.length-1){const _i=s[dn+1].pts,Zi=s[dn].pts,hs=_i<=Zi,Js=_i<=bi;rn=hs==Js}}}this.log(`Video: Initial PTS/DTS adjusted: ${Vn(bn,!0)}/${Vn(k,!0)}, delta: ${Vn(er,!0)} ms`)}}k=Math.max(0,k);let Pt=0,ft=0,It=k;for(let er=0;er<h;er++){const tr=s[er],en=tr.units,bn=en.length;let rn=0;for(let dn=0;dn<bn;dn++)rn+=en[dn].data.length;ft+=rn,Pt+=bn,tr.length=rn,tr.dts<It?(tr.dts=It,It+=ct/4|0||1):It=tr.dts,ee=Math.min(tr.pts,ee),Ae=Math.max(tr.pts,Ae)}re=s[h-1].dts;const Ct=ft+4*Pt+8;let _t;try{_t=new Uint8Array(Ct)}catch(er){this.observer.emit(m.ERROR,m.ERROR,{type:pe.MUX_ERROR,details:H.REMUX_ALLOC_ERROR,fatal:!1,error:er,bytes:Ct,reason:`fail allocating video mdat ${Ct}`});return}const Nt=new DataView(_t.buffer);Nt.setUint32(0,Ct),_t.set(ut.types.mdat,4);let rr=!1,lr=Number.POSITIVE_INFINITY,yr=Number.POSITIVE_INFINITY,ur=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY;for(let er=0;er<h;er++){const tr=s[er],en=tr.units;let bn=0;for(let bi=0,_i=en.length;bi<_i;bi++){const Zi=en[bi],hs=Zi.data,Js=Zi.data.byteLength;Nt.setUint32(T,Js),T+=4,_t.set(hs,T),T+=Js,bn+=4+Js}let rn;if(er<h-1)R=s[er+1].dts-tr.dts,rn=s[er+1].pts-tr.pts;else{const bi=this.config,_i=er>0?tr.dts-s[er-1].dts:ct;if(rn=er>0?tr.pts-s[er-1].pts:ct,bi.stretchShortVideoTrack&&this.nextAudioTs!==null){const Zi=Math.floor(bi.maxBufferHole*i),hs=(n?ee+n*i:this.nextAudioTs+p)-tr.pts;hs>Zi?(R=hs-_i,R<0?R=_i:rr=!0,this.log(`It is approximately ${hs/90} ms to the next segment; using duration ${R/90} ms for the last video frame.`)):R=_i}else R=_i}const dn=Math.round(tr.pts-tr.dts);lr=Math.min(lr,R),ur=Math.max(ur,R),yr=Math.min(yr,rn),Xt=Math.max(Xt,rn),l.push(Ys(tr.key,R,bn,dn))}if(l.length){if(zi){if(zi<70){const er=l[0].flags;er.dependsOn=2,er.isNonSync=0}}else if(Os&&Xt-yr<ur-lr&&ct/ur<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let er=k;for(let tr=0,en=l.length;tr<en;tr++){const bn=er+l[tr].duration,rn=er+l[tr].cts;if(tr<en-1){const dn=bn+l[tr+1].cts;l[tr].duration=dn-rn}else l[tr].duration=tr?l[tr-1].duration:ct;l[tr].cts=0,er=bn}}}R=rr||!R?ct:R;const dr=re+R;this.nextVideoTs=g=dr-p,this.videoSampleDuration=R,this.isVideoContiguous=!0;const Mr={data1:ut.moof(e.sequenceNumber++,k,b(e,{samples:l})),data2:_t,startPTS:(ee-p)/i,endPTS:(Ae+R-p)/i,startDTS:(k-p)/i,endDTS:g/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Mr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return ks;case"ac3":return Ps;default:return Fo}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,h=s/l,c=this.getSamplesPerFrame(e),p=c*h,g=this._initPTS,T=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,R=[],k=i!==void 0;let re=e.samples,ee=T?0:8,Ae=this.nextAudioTs||-1;const Oe=g.baseTime*s/g.timescale,Ue=Oe+t*s;if(this.isAudioContiguous=r=r||re.length&&Ae>0&&(n&&Math.abs(Ue-(Ae+Oe))<9e3||Math.abs(Di(re[0].pts,Ue)-(Ae+Oe))<20*p),re.forEach(function(Xt){Xt.pts=Di(Xt.pts,Ue)}),!r||Ae<0){const Xt=re.length;if(re=re.filter(dr=>dr.pts>=0),Xt!==re.length&&this.warn(`Removed ${re.length-Xt} of ${Xt} samples (initPTS ${Oe} / ${s})`),!re.length)return;i===0?Ae=0:n&&!k?Ae=Math.max(0,Ue-Oe):Ae=re[0].pts-Oe}if(e.segmentCodec==="aac"){const Xt=this.config.maxAudioFramesDrift;for(let dr=0,sr=Ae+Oe;dr<re.length;dr++){const mr=re[dr],Mr=mr.pts,er=Mr-sr,tr=Math.abs(1e3*er/s);if(er<=-Xt*p&&k)dr===0&&(this.warn(`Audio frame @ ${(Mr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*er/s)} ms.`),this.nextAudioTs=Ae=Mr-Oe,sr=Mr);else if(er>=Xt*p&&tr<lo&&k){let en=Math.round(er/p);for(sr=Mr-en*p;sr<0&&en&&p;)en--,sr+=p;dr===0&&(this.nextAudioTs=Ae=sr-Oe),this.warn(`Injecting ${en} audio frames @ ${((sr-Oe)/s).toFixed(3)}s due to ${Math.round(1e3*er/s)} ms gap.`);for(let bn=0;bn<en;bn++){let rn=ui.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);rn||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),rn=mr.unit.subarray()),re.splice(dr,0,{unit:rn,pts:sr}),sr+=p,dr++}}mr.pts=sr,sr+=p}}let rt=null,ct=null,Pt,ft=0,It=re.length;for(;It--;)ft+=re[It].unit.byteLength;for(let Xt=0,dr=re.length;Xt<dr;Xt++){const sr=re[Xt],mr=sr.unit;let Mr=sr.pts;if(ct!==null){const tr=R[Xt-1];tr.duration=Math.round((Mr-ct)/h)}else if(r&&e.segmentCodec==="aac"&&(Mr=Ae+Oe),rt=Mr,ft>0){ft+=ee;try{Pt=new Uint8Array(ft)}catch(tr){this.observer.emit(m.ERROR,m.ERROR,{type:pe.MUX_ERROR,details:H.REMUX_ALLOC_ERROR,fatal:!1,error:tr,bytes:ft,reason:`fail allocating audio mdat ${ft}`});return}T||(new DataView(Pt.buffer).setUint32(0,ft),Pt.set(ut.types.mdat,4))}else return;Pt.set(mr,ee);const er=mr.byteLength;ee+=er,R.push(Ys(!0,c,er,0)),ct=Mr}const Ct=R.length;if(!Ct)return;const _t=R[R.length-1];Ae=ct-Oe,this.nextAudioTs=Ae+h*_t.duration;const Nt=T?new Uint8Array(0):ut.moof(e.sequenceNumber++,rt/h,b({},e,{samples:R}));e.samples=[];const rr=(rt-Oe)/s,lr=this.nextAudioTs/s,ur={data1:Nt,data2:Pt,startPTS:rr,endPTS:lr,startDTS:rr,endDTS:lr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Ct};return this.isAudioContiguous=!0,ur}}function Di(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 ma(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let l=0;l<n;l++){const h=a.samples[l];h.pts=Di(h.pts-t.baseTime*i/t.timescale,e*i)/i,h.dts=Di(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 l=a.samples[s];l.pts=Di(l.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends te{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=Ie(e);if(t)Je(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,W.AUDIO,this)),s&&(n=pl(s,W.VIDEO,this));const l={};i&&s?l.audiovideo={container:"video/mp4",codec:r+","+n,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?l.audio={container:"audio/mp4",codec:r,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?l.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=l}remux(e,t,r,n,i,s){var l,h;let{initPTS:c,lastEndTime:p}=this;const g={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};y(p)||(p=this.lastEndTime=i||0);const T=t.samples;if(!T.length)return g;const R={initPTS:void 0,timescale:void 0,trackId:void 0};let k=this.initData;if((l=k)!=null&&l.length||(this.generateInitSegment(T),k=this.initData),!((h=k)!=null&&h.length))return this.warn("Failed to generate initSegment."),g;this.emitInitSegment&&(R.tracks=this.initTracks,this.emitInitSegment=!1);const re=gt(T,k,this),ee=k.audio?re[k.audio.id]:null,Ae=k.video?re[k.video.id]:null,Oe=Xs(Ae,1/0),Ue=Xs(ee,1/0),rt=Xs(Ae,0,!0),ct=Xs(ee,0,!0);let Pt=i,ft=0;const It=ee&&(!Ae||!c&&Ue<Oe||c&&c.trackId===k.audio.id),Ct=It?ee:Ae;if(Ct){const sr=Ct.timescale,mr=Ct.start-i*sr,Mr=It?k.audio.id:k.video.id;Pt=Ct.start/sr,ft=It?ct-Ue:rt-Oe,(s||!c)&&(ga(c,Pt,i,ft)||sr!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${mr/sr} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Pt-i} (${mr}/${sr}) trackId: ${Mr}`),c=null,R.initPTS=mr,R.timescale=sr,R.trackId=Mr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(R.initPTS=c.baseTime,R.timescale=c.timescale,R.trackId=c.trackId):((!R.timescale||R.trackId===void 0||R.initPTS===void 0)&&(this.warn("Could not set initPTS"),R.initPTS=Pt,R.timescale=1,R.trackId=-1),this.initPTS=c={baseTime:R.initPTS,timescale:R.timescale,trackId:R.trackId});const _t=Pt-c.baseTime/c.timescale,Nt=_t+ft;ft>0?this.lastEndTime=Nt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const rr=!!k.audio,lr=!!k.video;let yr="";rr&&(yr+="audio"),lr&&(yr+="video");const ur=(k.audio?k.audio.encrypted:!1)||(k.video?k.video.encrypted:!1),Xt={data1:T,startPTS:_t,startDTS:_t,endPTS:Nt,endDTS:Nt,type:yr,hasAudio:rr,hasVideo:lr,nb:1,dropped:0,encrypted:ur};g.audio=rr&&!lr?Xt:void 0,g.video=lr?Xt:void 0;const dr=Ae==null?void 0:Ae.sampleCount;if(dr){const sr=Ae.keyFrameIndex,mr=sr!==-1;Xt.nb=dr,Xt.dropped=sr===0||this.isVideoContiguous?0:mr?sr:dr,Xt.independent=mr,Xt.firstKeyFrame=sr,mr&&Ae.keyFrameStart&&(Xt.firstKeyFramePTS=(Ae.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(g.independent=mr),this.isVideoContiguous||(this.isVideoContiguous=mr),Xt.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${sr}/${dr} dropped: ${Xt.dropped} start: ${Xt.firstKeyFramePTS||"NA"}`)}return g.initSegment=R,g.id3=ma(r,i,c,c),n.samples.length&&(g.text=Fa(n,i,c)),g}}function Xs(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function ga(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===W.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 vs;try{vs=self.performance.now.bind(self.performance)}catch(a){vs=Date.now}const co=[{demux:ot,remux:uo},{demux:kr,remux:pa},{demux:v,remux:pa},{demux:Te,remux:pa}];co.splice(2,0,{demux:$,remux:pa});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=vs();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:h}=this;n&&(this.currentTransmuxState=n);const{contiguous:c,discontinuity:p,trackSwitch:g,accurateTimeOffset:T,timeOffset:R,initSegmentChange:k}=n||l,{audioCodec:re,videoCodec:ee,defaultInitPts:Ae,duration:Oe,initSegmentData:Ue}=h,rt=Su(s,t);if(rt&&pi(rt.method)){const It=this.getDecrypter(),Ct=ji(rt.method);if(It.isSync()){let _t=It.softwareDecrypt(s,rt.key.buffer,rt.iv.buffer,Ct);if(r.part>-1){const rr=It.flush();_t=rr&&rr.buffer}if(!_t)return i.executeEnd=vs(),$o(r);s=new Uint8Array(_t)}else return this.asyncResult=!0,this.decryptionPromise=It.webCryptoDecrypt(s,rt.key.buffer,rt.iv.buffer,Ct).then(_t=>{const Nt=this.push(_t,null,r);return this.decryptionPromise=null,Nt}),this.decryptionPromise}const ct=this.needsProbing(p,g);if(ct){const It=this.configureTransmuxer(s);if(It)return this.logger.warn(`[transmuxer] ${It.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:H.FRAG_PARSING_ERROR,fatal:!1,error:It,reason:It.message}),i.executeEnd=vs(),$o(r)}(p||g||k||ct)&&this.resetInitSegment(Ue,re,ee,Oe,t),(p||k||ct)&&this.resetInitialTimestamp(Ae),c||this.resetContiguity();const Pt=this.transmux(s,rt,R,T,r);this.asyncResult=Na(Pt);const ft=this.currentTransmuxState;return ft.contiguous=!0,ft.discontinuity=!1,ft.trackSwitch=!1,i.executeEnd=vs(),Pt}flush(e){const t=e.transmuxing;t.executeStart=vs();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=n;if(r){const g=r.flush();g&&s.push(this.push(g.buffer,null,e))}const{demuxer:h,remuxer:c}=this;if(!h||!c){t.executeEnd=vs();const g=[$o(e)];return this.asyncResult?Promise.resolve(g):g}const p=h.flush(l);return Na(p)?(this.asyncResult=!0,p.then(g=>(this.flushRemux(s,g,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:l}=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===q.MAIN?"level":"track"} ${r.level}`);const p=this.remuxer.remux(n,i,s,l,c,h,!0,this.id);e.push({remuxResult:p,chunkMeta:r}),r.transmuxing.executeEnd=vs()}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:l}=this;!s||!l||(s.resetInitSegment(e,t,r,n),l.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:l,textTrack:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,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 g=0,T=co.length;g<T;g++){var s;if((s=co[g].demux)!=null&&s.probe(e,this.logger)){i=co[g];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,h=this.remuxer,c=i.remux,p=i.demux;(!h||!(h instanceof c))&&(this.remuxer=new c(r,t,n,this.logger)),(!l||!(l 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 cn(this.config)),e}}function Su(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 wu{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 Tu{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 g;const T=(g=this.workerContext)==null?void 0:g.objectURL;T&&self.URL.revokeObjectURL(T);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(m.ERROR,{type:pe.OTHER_ERROR,details:H.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===m.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(h,c)};this.observer=new ua,this.observer.on(m.FRAG_DECRYPTED,s),this.observer.on(m.ERROR,s);const l=Zt(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=Wa(i.workerPath)):(h.log(`injecting Web Worker for "${t}"`),this.workerContext=Do());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:xt(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,l,i,"",t,e.logger)}return}}this.transmuxer=new ml(this.observer,l,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=Zt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:xt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Io(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,l,h,c,p){var g,T;c.transmuxing.start=self.performance.now();const{instanceNo:R,transmuxer:k}=this,re=s?s.start:i.start,ee=i.decryptdata,Ae=this.frag,Oe=!(Ae&&i.cc===Ae.cc),Ue=!(Ae&&c.level===Ae.level),rt=Ae?c.sn-Ae.sn:-1,ct=this.part?c.part-this.part.index:-1,Pt=rt===0&&c.id>1&&c.id===(Ae==null?void 0:Ae.stats.chunkCount),ft=!Ue&&(rt===1||rt===0&&(ct===1||Pt&&ct<=0)),It=self.performance.now();(Ue||rt||i.stats.parsing.start===0)&&(i.stats.parsing.start=It),s&&(ct||!ft)&&(s.stats.parsing.start=It);const Ct=!(Ae&&((g=i.initSegment)==null?void 0:g.url)===((T=Ae.initSegment)==null?void 0:T.url)),_t=new Tu(Oe,ft,h,Ue,re,Ct);if(!ft||Oe||Ct){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===q.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${Oe}
|
|
trackSwitch: ${Ue}
|
|
contiguous: ${ft}
|
|
accurateTimeOffset: ${h}
|
|
timeOffset: ${re}
|
|
initSegmentChange: ${Ct}`);const Nt=new wu(r,n,t,l,p);this.configureTransmuxer(Nt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:R,cmd:"demux",data:e,decryptdata:ee,chunkMeta:c,state:_t},e instanceof ArrayBuffer?[e]:[]);else if(k){const Nt=k.push(e,ee,c,_t);Na(Nt)?Nt.then(rr=>{this.handleTransmuxComplete(rr)}).catch(rr=>{this.transmuxerError(rr,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Nt)}}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(m.ERROR,{type:pe.MEDIA_ERROR,details:H.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 Au extends Ks{constructor(e,t,r){super(e,t,r,"audio-stream-controller",q.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){if(r===q.MAIN){const l=t.cc,h=this.fragCurrent;if(this.initPTS[l]={baseTime:n,timescale:i,trackId:s},this.log(`InitPTS for cc: ${l} found from main: ${n/i} (${n}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Ft.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==l)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&h&&h.cc!==l?(h.abortRequests(),this.syncWithAnchor(t,h)):this.state===Ft.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(),l=this.getLoadPosition(),h=Wr(s,i,l);h&&(this.log(`Syncing with main frag at ${h.start} cc ${h.cc}`),this.startFragRequested=!1,this.nextLoadPosition=h.start,this.resetLoadingState(),this.state===Ft.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Ft.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=Ft.IDLE):this.state=Ft.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Ft.IDLE:this.doTickIdle();break;case Ft.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=Ft.WAITING_INIT_PTS}break}case Ft.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Ft.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=Ft.FRAG_LOADING;const l=n.flush().buffer,h={frag:t,part:r,payload:l,networkDetails:null};this._handleFragmentLoadProgress(h),i&&super._handleFragmentLoadComplete(h)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Ft.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 l=r[i],h=l.details;if(!h||this.waitForLive(l)||this.waitForCdnTuneIn(h)){this.state=Ft.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,W.AUDIO,q.AUDIO));const p=this.getFwdBufferInfo(c,q.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,h)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=Ft.ENDED;return}const g=p.len,T=t.maxBufferLength,R=h.fragments,k=R[0].start,re=this.getLoadPosition(),ee=this.flushing?re:p.end;if(this.switchingTrack&&n){const Ue=re;h.PTSKnown&&Ue<k&&(p.end>k||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=k+.05)}if(g>=T&&!this.switchingTrack&&ee<R[R.length-1].start)return;let Ae=this.getNextFragment(ee,h);if(Ae&&this.isLoopLoading(Ae,ee)&&(Ae=this.getNextFragmentLoopLoading(Ae,h,p,q.MAIN,T)),!Ae){this.bufferFlushed=!0;return}let Oe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Oe&&Be(Ae)&&!Ae.endList&&(!h.live||!this.loadingParts&&ee<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Oe)===Jr.OK&&(this.mainFragLoading=Oe=null),Oe&&Be(Oe))){if(Ae.start>Oe.end){const rt=this.fragmentTracker.getFragAtPos(ee,q.MAIN);rt&&rt.end>Oe.end&&(Oe=rt,this.mainFragLoading={frag:rt,targetBufferTime:null})}if(Ae.start>Oe.end)return}this.loadFragment(Ae,l,ee)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new Rr(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!==Ft.STOPPED&&(this.setInterval(_l),this.state=Ft.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(m.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:i,id:s,groupId:l,track:h}=t;if(!n){this.warn(`Audio tracks reset while loading track ${s} "${h.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Ft.STOPPED&&(this.state=Ft.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${h.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=n[s];let g=0;if(i.live||(r=p.details)!=null&&r.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var T;g=this.alignPlaylists(i,p.details,(T=this.levelLastLoaded)==null?void 0:T.details)}i.alignedSliding||(As(i,c),i.alignedSliding||Cs(i,c),g=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,g),this.hls.trigger(m.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Ft.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Ft.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{config:s,trackId:l,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[l];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 g=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let T=this.transmuxer;T||(T=this.transmuxer=new vl(this.hls,q.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const R=this.initPTS[r.cc],k=(t=r.initSegment)==null?void 0:t.data;if(R!==void 0){const ee=n?n.index:-1,Ae=ee!==-1,Oe=new fi(r.level,r.sn,r.stats.chunkCount,i.byteLength,ee,Ae);T.push(i,k,g,"",r,n,p.totalduration,!1,Oe,R)}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 ${l}`);const{cache:re}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Aa,complete:!1};re.push(new Uint8Array(i)),this.state!==Ft.STOPPED&&(this.state=Ft.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===q.MAIN&&Be(t.frag)&&(this.mainFragLoading=t,this.state===Ft.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==q.AUDIO){!this.audioOnly&&r.type===q.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(Be(r)){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,C({},i)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=Ft.ERROR;return}switch(t.details){case H.FRAG_GAP:case H.FRAG_PARSING_ERROR:case H.FRAG_DECRYPT_ERROR:case H.FRAG_LOAD_ERROR:case H.FRAG_LOAD_TIMEOUT:case H.KEY_LOAD_ERROR:case H.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(q.AUDIO,t);break;case H.AUDIO_TRACK_LOAD_ERROR:case H.AUDIO_TRACK_LOAD_TIMEOUT:case H.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Ft.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===ie.AUDIO_TRACK&&(this.state=Ft.IDLE);break;case H.BUFFER_ADD_CODEC_ERROR:case H.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case H.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case H.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==W.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==W.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Ft.ENDED&&(this.state=Ft.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,q.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:h,part:c,level:p}=l,{details:g}=p,{audio:T,text:R,id3:k,initSegment:re}=i;if(this.fragContextChanged(h)||!g){this.fragmentTracker.removeFragment(h);return}if(this.state=Ft.PARSING,this.switchingTrack&&T&&this.completeAudioSwitch(this.switchingTrack),re!=null&&re.tracks){const ee=h.initSegment||h;if(this.unhandledEncryptionError(re,h))return;this._bufferInitSegment(p,re.tracks,ee,s),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:ee,id:r,tracks:re.tracks})}if(T){const{startPTS:ee,endPTS:Ae,startDTS:Oe,endDTS:Ue}=T;c&&(c.elementaryStreams[W.AUDIO]={startPTS:ee,endPTS:Ae,startDTS:Oe,endDTS:Ue}),h.setElementaryStreamInfo(W.AUDIO,ee,Ae,Oe,Ue),this.bufferFragmentData(T,h,c,s)}if(k!=null&&(t=k.samples)!=null&&t.length){const ee=b({id:r,frag:h,details:g},k);n.trigger(m.FRAG_PARSING_METADATA,ee)}if(R){const ee=b({id:r,frag:h,details:g},R);n.trigger(m.FRAG_PARSING_USERDATA,ee)}}_bufferInitSegment(e,t,r,n){if(this.state!==Ft.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=q.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(m.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const h={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:l};this.hls.trigger(m.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===Jr.NOT_LOADED||n===Jr.PARTIAL){var i;if(!Be(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=Ft.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Cs(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:l}=this.bufferedTrack;Ar({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:l},e,vr)||(Vr(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(m.AUDIO_TRACK_SWITCHED,C({},e))}}class Uo extends te{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 l=n[s];let h;try{h=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),h=l.URI||""}if(h===e){i=s;break}else h===e.substring(0,h.length)&&(i=s)}if(i!==-1){const s=n[i],l=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&&Mn(r);return new ln(l,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(),l=i.loading.first?Math.max(0,s-i.loading.first):0;n.advancedDateTime=Date.now()-l;const h=this.hls.config.timelineOffset;if(h!==n.appliedTimelineOffset){const p=Math.max(h||0,0);n.appliedTimelineOffset=p,n.fragments.forEach(g=>{g.setStart(g.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){oa(r,n,this);const Oe=n.playlistParsingError;if(Oe){this.warn(Oe);const Ue=this.hls;if(!Ue.config.ignorePlaylistParsingErrors){var c;const{networkDetails:rt}=t;Ue.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:H.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:Oe,reason:Oe.message,level:t.level||void 0,parent:(c=n.fragments[0])==null?void 0:c.type,networkDetails:rt,stats:i});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=i.loading.start);const g=this.hls.mainForwardBufferInfo,T=g?g.end-g.len:0,R=(n.edge-T)*1e3,k=mn(n,R);if(n.requestScheduled+k<s?n.requestScheduled=s:n.requestScheduled+=k,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let re,ee,Ae;if(n.canBlockReload&&n.endSN&&n.advanced){const Oe=this.hls.config.lowLatencyMode,Ue=n.lastPartSn,rt=n.endSN,ct=n.lastPartIndex,Pt=ct!==-1,ft=Ue===rt;Pt?ft?(ee=rt+1,Ae=Oe?0:ct):(ee=Ue,Ae=Oe?ct+1:n.maxPartIndex):ee=rt+1;const It=n.age,Ct=It+n.ageHeader;let _t=Math.min(Ct-n.partTarget,n.targetduration*1.5);if(_t>0){if(Ct>n.targetduration*3)this.log(`Playlist last advanced ${It.toFixed(2)}s ago. Omitting segment and part directives.`),ee=void 0,Ae=void 0;else if(r!=null&&r.tuneInGoal&&Ct-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${_t} with playlist age: ${n.age}`),_t=0;else{const Nt=Math.floor(_t/n.targetduration);if(ee+=Nt,Ae!==void 0){const rr=Math.round(_t%n.targetduration/n.partTarget);Ae+=rr}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${It.toFixed(2)}s goal: ${_t} skip sn ${Nt} to part ${Ae}`)}n.tuneInGoal=_t}if(re=this.getDeliveryDirectives(n,t.deliveryDirectives,ee,Ae),Oe||!ft){n.requestScheduled=s,this.loadingPlaylist(p,re);return}}else(n.canBlockReload||n.canSkipUntil)&&(re=this.getDeliveryDirectives(n,t.deliveryDirectives,ee,Ae));re&&ee!==void 0&&n.canBlockReload&&(n.requestScheduled=i.loading.first+Math.max(k-l*2,k/2)),this.scheduleLoading(p,re,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 l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,r,n){let i=Mn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=Gr.No),new ln(r,n,i)}checkRetry(e){const t=e.details,r=Qr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=n||{},h=!!n&&!!l&&(i===gr.RetryRequest||!n.resolved&&i===gr.SendAlternateToPenaltyBox);if(h){var c;if(s>=l.maxNumRetry)return!1;if(r&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=Kr(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${l.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 Cu 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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:r,groupId:n,details: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 l=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,l)}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(l=>(n==null?void 0:n.indexOf(l))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(T=>!r||r.indexOf(T.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(T=>T.default)&&(this.selectDefaultTrack=!1),l.forEach((T,R)=>{T.id=R});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const h=this.hls.config.audioPreference;if(!i&&h){const T=Vt(h,l,vr);if(T>-1)i=l[T];else{const R=Vt(h,this.tracks);i=this.tracks[R]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,p);const g=this.trackId;if(c!==-1&&g===-1)this.setAudioTrack(c);else if(l.length&&g===-1){var s;const T=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${l.length}`);this.warn(T.message),this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:T})}}}onError(e,t){t.fatal||!t.context||t.context.type===ie.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&&Ar(e,n,vr))return n;const i=Vt(e,this.tracksInGroup,vr);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 l=cr(e,t.levels,r,s,vr);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Vt(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(m.AUDIO_TRACK_SWITCHING,C({},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||Ar(e,n,vr)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:l,channels:h}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Ar({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:l,channels:h},p,vr))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)&&Vr(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,l=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:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.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)(?:\.[^.,]+)+/,xl="HlsJsTrackRemovedError";class Iu extends Error{constructor(e){super(e),this.name=xl}}class Ru extends te{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(m.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=Pe(Ce(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_APPENDING,this.onBufferAppending,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.BUFFER_EOS,this.onBufferEos,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.FRAG_PARSED,this.onFragParsed,this),e.on(m.FRAG_CHANGED,this.onFragChanged,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_APPENDING,this.onBufferAppending,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_EOS,this.onBufferEos,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.FRAG_PARSED,this.onFragParsed,this),e.off(m.FRAG_CHANGED,this.onFragChanged,this),e.off(m.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const 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?b(r,n.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(r[s]=b({},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=Ce(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 l=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,El(r),Lu(r,l),r.load()}catch(h){r.src=l}else r.src=l}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,l=()=>{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: ${xt(r,(h,c)=>h==="initSegment"?void 0:c)};
|
|
transfer tracks: ${xt(n,(h,c)=>h==="initSegment"?void 0:c)}}`),!_e(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(m.MEDIA_DETACHING,{}),this.onMediaAttaching(m.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(h=>{const c=h,p=n[c];if(p){const g=p.buffer;if(g){const T=this.fragmentTracker,R=p.id;if(T.hasFragments(R)||T.hasParts(R)){const ee=br.getBuffered(g);T.detectEvictedFragments(c,ee,R,null,!0)}const k=Go(c),re=[c,g];this.sourceBuffers[k]=re,g.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),l(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),l()}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(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const h=i.sourceBuffers;for(let c=h.length;c--;)l&&h[c].abort(),i.removeSourceBuffer(h[c]);l&&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&&El(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(m.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const r=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),r)try{var n;(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(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),l=!s&&this.sourceBufferCount&&this.media&&i.some(h=>!n[h]);if(s||l){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${i}" SourceBuffers`);return}i.forEach(h=>{var c,p;const g=t[h],{id:T,codec:R,levelCodec:k,container:re,metadata:ee,supplemental:Ae}=g;let Oe=n[h];const Ue=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[h],rt=Ue!=null&&Ue.buffer?Ue:Oe,ct=(rt==null?void 0:rt.pendingCodec)||(rt==null?void 0:rt.codec),Pt=rt==null?void 0:rt.levelCodec;Oe||(Oe=n[h]={buffer:void 0,listeners:[],codec:R,supplemental:Ae,container:re,levelCodec:k,metadata:ee,id:T});const ft=$t(ct,Pt),It=ft==null?void 0:ft.replace(bl,"$1");let Ct=$t(R,k);const _t=(p=Ct)==null?void 0:p.replace(bl,"$1");Ct&&ft&&It!==_t&&(h.slice(0,5)==="audio"&&(Ct=de(Ct,this.appendSource)),this.log(`switching codec ${ct} to ${Ct}`),Ct!==(Oe.pendingCodec||Oe.codec)&&(Oe.pendingCodec=Ct),Oe.container=re,this.appendChangeType(h,re,Ct))}),(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 l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),l.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,q.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const h=this.tracks.video;(this.lastVideoAppendEnd>n||h!=null&&h.buffer&&br.isBuffered(h.buffer,n)||((l=this.fragmentTracker.getAppendedFrag(n,q.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};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:l,part:h,chunkMeta:c,offset:p}=t,g=c.buffering[i],{sn:T,cc:R}=l,k=self.performance.now();g.start=k;const re=l.stats.buffering,ee=h?h.stats.buffering:null;re.start===0&&(re.start=k),ee&&ee.start===0&&(ee.start=k);const Ae=r.audio;let Oe=!1;i==="audio"&&(Ae==null?void 0:Ae.container)==="audio/mpeg"&&(Oe=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const Ue=r.video,rt=Ue==null?void 0:Ue.buffer;if(rt&&T!=="initSegment"){const ft=h||l,It=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(Ue.ending||Ue.ended)){const _t=ft.start+ft.duration*.05,Nt=rt.buffered,rr=this.currentOp("video");!Nt.length&&!rr?this.blockAudio(ft):!rr&&!br.isBuffered(rt,_t)&&this.lastVideoAppendEnd<_t&&this.blockAudio(ft)}else if(i==="video"){const Ct=ft.end;if(It){const _t=It.frag.start;(Ct>_t||Ct<this.lastVideoAppendEnd||br.isBuffered(rt,_t))&&this.unblockAudio()}this.lastVideoAppendEnd=Ct}}const ct=(h||l).start,Pt={label:`append-${i}`,execute:()=>{var ft;g.executeStart=self.performance.now();const It=(ft=this.tracks[i])==null?void 0:ft.buffer;It&&(Oe?this.updateTimestampOffset(It,ct,.1,i,T,R):p!==void 0&&y(p)&&this.updateTimestampOffset(It,p,1e-6,i,T,R)),this.appendExecutor(n,i)},onStart:()=>{},onComplete:()=>{const ft=self.performance.now();g.executeEnd=g.end=ft,re.first===0&&(re.first=ft),ee&&ee.first===0&&(ee.first=ft);const It={};this.sourceBuffers.forEach(([Ct,_t])=>{Ct&&(It[Ct]=br.getBuffered(_t))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(m.BUFFER_APPENDED,{type:i,frag:l,part:h,chunkMeta:c,parent:l.type,timeRanges:It})},onError:ft=>{var It;const Ct={type:pe.MEDIA_ERROR,parent:l.type,details:H.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:h,chunkMeta:c,error:ft,err:ft,fatal:!1},_t=(It=this.media)==null?void 0:It.error;if(ft.code===DOMException.QUOTA_EXCEEDED_ERR||ft.name=="QuotaExceededError"||"quota"in ft)Ct.details=H.BUFFER_FULL_ERROR;else if(ft.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!_t)Ct.errorAction=an(!0);else if(ft.name===xl&&this.sourceBufferCount===0)Ct.errorAction=an(!0);else{const Nt=++this.appendErrors[i];this.warn(`Failed ${Nt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${_t||"no media error"})`),(Nt>=this.hls.config.appendErrorMaxRetry||_t)&&(Ct.fatal=!0)}this.hls.trigger(m.ERROR,Ct)}};this.log(`queuing "${i}" append sn: ${T}${h?" p: "+h.index:""} of ${l.type===q.MAIN?"level":"track"} ${l.level} cc: ${R}`),this.append(Pt,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(m.BUFFER_FLUSHED,{type:e})},onError:n=>{this.warn(`Failed to remove ${t}-${r} from "${e}" SourceBuffer`,n)}}}onBufferFlushing(e,t){const{type:r,startOffset:n,endOffset: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[W.AUDIOVIDEO]?i.push("audiovideo"):(s[W.AUDIO]&&i.push("audio"),s[W.VIDEO]&&i.push("video"));const l=()=>{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(m.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(l,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 l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.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 l;return s&&!((l=this.tracks[s])!=null&&l.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(m.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(m.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===H.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;y(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,l=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(y(l)&&l>=0){const c=Math.max(l,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const h=n.frontBufferFlushThreshold;if(y(h)&&h>0){const c=Math.max(n.maxBufferLength,h),p=Math.max(c,s),g=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,g)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const l=br.getBuffered(i);if(l.length>0&&r>l.start(0)){var s;this.hls.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:r});const h=this.tracks[n];if((s=this.details)!=null&&s.live)this.hls.trigger(m.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(m.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const s=br.getBuffered(i),l=s.length;if(l<2)return;const h=s.start(l-1),c=s.end(l-1);if(r>h||e>=h&&e<=c)return;this.hls.trigger(m.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 y(i)?{duration:i}:null;const s=this.media.duration,l=y(r.duration)?r.duration:0;return n>l&&n>s||!y(s)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&(y(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}) ${xt(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(m.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.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,l=e[s];if(this.isPending(l)){const h=this.getTrackCodec(l,s),c=`${l.container};codecs=${h}`;l.codec=h,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${xt(l)}`);try{const p=r.addSourceBuffer(c),g=Go(s),T=[s,p];t[g]=T,l.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(m.ERROR,{type:pe.MEDIA_ERROR,details:H.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,parent:l.id});return}this.trackSourceBuffer(s,l)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&Ne(r,"video")&&(n=At(n,r));const i=$t(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 l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(m.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(m.ERROR,{type:pe.MEDIA_ERROR,details:H.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 l=t-e.timestampOffset;Math.abs(l)>=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],l=s==null?void 0:s.buffer;if(!n||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const h=y(n.duration)?n.duration:1/0,c=y(i.duration)?i.duration:1/0,p=Math.max(0,t),g=Math.min(r,h,c);g>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${g}] from the ${e} SourceBuffer`),l.remove(p,g)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Iu(`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 El(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Lu(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 jo{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&y(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,jo.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=(l,h)=>h?l.width!==h.width||l.height!==h.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let l=0;l<e.length;l+=1){const h=e[l];if((h.width>=s||h.height>=s)&&n(h,e[l+1])){i=l;break}}return i}}const Oi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},ku={HLS:"h"};class ls{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof ls?r:new ls(r))),this.value=e,this.params=t}}const Pu="Dict";function Ou(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 Mu(a,e,t,r){return new Error(`failed to ${a} "${Ou(e)}" as ${t}`,{cause:r})}function us(a,e,t){return Mu("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Bu="Boolean";function Fu(a){if(typeof a!="boolean")throw us(a,Bu);return a?"?1":"?0"}function Nu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw us(a,$u);return`:${Nu(a)}:`}const zu="Integer";function Gu(a){return a<-999999999999999||999999999999999<a}function Tl(a){if(Gu(a))throw us(a,zu);return a.toString()}function ju(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 Hu(a){const e=Al(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw us(a,Ku);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Wu="String",Vu=/[\x00-\x1f\x7f]+/;function Zu(a){if(Vu.test(a))throw us(a,Wu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const Xu="Token";function Cl(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw us(e,Xu);return e}function Ko(a){switch(typeof a){case"number":if(!y(a))throw us(a,wl);return Number.isInteger(a)?Tl(a):Hu(a);case"string":return Zu(a);case"symbol":return Cl(a);case"boolean":return Fu(a);case"object":if(a instanceof Date)return ju(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Cl(a);default:throw us(a,wl)}}const qu="Key";function Ho(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw us(a,qu);return a}function Wo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ho(e)}`:`;${Ho(e)}=${Ko(t)}`).join("")}function Dl(a){return a instanceof ls?`${Ko(a.value)}${Wo(a.params)}`:Ko(a)}function Qu(a){return`(${a.value.map(Dl).join(" ")})${Wo(a.params)}`}function Ju(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw us(a,Pu);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof ls||(i=new ls(i));let s=Ho(n);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=Qu(i):s+=Dl(i)),s}).join(`,${r}`)}function Il(a,e){return Ju(a,e)}const cs="CMCD-Object",Zn="CMCD-Request",qs="CMCD-Session",Ms="CMCD-Status",e0={br:cs,ab:cs,d:cs,ot:cs,tb:cs,tpb:cs,lb:cs,tab:cs,lab:cs,url:cs,pb:Zn,bl:Zn,tbl:Zn,dl:Zn,ltc:Zn,mtp:Zn,nor:Zn,nrr:Zn,rc:Zn,sn:Zn,sta:Zn,su:Zn,ttfb:Zn,ttfbb:Zn,ttlb:Zn,cmsdd:Zn,cmsds:Zn,smrt:Zn,df:Zn,cs:Zn,ts:Zn,cid:qs,pr:qs,sf:qs,sid:qs,st:qs,v:qs,msd:qs,bs:Ms,bsd:Ms,cdn:Ms,rtp:Ms,bg:Ms,pt:Ms,ec:Ms,e:Ms},t0={REQUEST:Zn};function r0(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 n0(a,e){const t={};if(!a)return t;const r=Object.keys(a),n=e?r0(e):{};return r.reduce((i,s)=>{var l;const h=e0[s]||n[s]||t0.REQUEST,c=(l=i[h])!==null&&l!==void 0?l:i[h]={};return c[s]=a[s],i},t)}function i0(a){return["ot","sf","st","e","sta"].includes(a)}function s0(a){return typeof a=="number"?y(a):a!=null&&a!==""&&a!==!1}const Rl="event";function a0(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 ls&&typeof a.value=="string"?new ls(Vo(a.value,e),a.params):(e.baseUrl&&(a=a0(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fo=a=>ho(a/100)*100,o0={br:ho,d:ho,bl:fo,dl:fo,mtp:fo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof ls&&typeof a.value=="string"?t=new ls([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"],l0=["e"],u0=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function po(a){return u0.test(a)}function c0(a){return Zo.includes(a)||l0.includes(a)||po(a)}const Pl=["d","dl","nor","ot","rtp","su"];function h0(a){return Zo.includes(a)||Pl.includes(a)||po(a)}const d0=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function f0(a){return Zo.includes(a)||Pl.includes(a)||d0.includes(a)||po(a)}const p0=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function m0(a){return p0.includes(a)||po(a)}const g0={[kl]:f0,[Rl]:c0,[Ll]:h0};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?m0:g0[n];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const h=n===kl||n===Rl;h&&!s.includes("ts")&&s.push("ts"),r>1&&!s.includes("v")&&s.push("v");const c=b({},o0,e.formatters),p={version:r,reportingMode:n,baseUrl:e.baseUrl};return s.sort().forEach(g=>{let T=a[g];const R=c[g];if(typeof R=="function"&&(T=R(T,p)),g==="v"){if(r===1)return;T=r}g=="pr"&&T===1||(h&&g==="ts"&&!y(T)&&(T=Date.now()),s0(T)&&(i0(g)&&typeof T=="string"&&(T=new Sl(T)),t[g]=T))}),t}function v0(a,e={}){const t={};if(!a)return t;const r=Ol(a,e),n=n0(r,e==null?void 0:e.customHeaderMap);return Object.entries(n).reduce((i,[s,l])=>{const h=Il(l,{whitespace:!1});return h&&(i[s]=h),i},t)}function _0(a,e,t){return b(a,v0(e,t))}const y0="CMCD";function b0(a,e={}){return a?Il(Ol(a,e),{whitespace:!1}):""}function x0(a,e={}){if(!a)return"";const t=b0(a,e);return encodeURIComponent(t)}function E0(a,e={}){if(!a)return"";const t=x0(a,e);return`${y0}=${t}`}const Ml=/CMCD=[^&#]+/;function S0(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 w0{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:Oi.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,l=this.hls.levels[i.level],h=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:h};(h===Oi.VIDEO||h===Oi.AUDIO||h==Oi.MUXED)&&(c.br=l.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(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHED,this.onMediaDetached,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHED,this.onMediaDetached,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var r,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf:ku.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){b(t,this.createData());const r=t.ot===Oi.INIT||t.ot===Oi.VIDEO||t.ot===Oi.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,l)=>(n.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),_0(e.headers,t,i)):e.url=S0(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 l=i.length-1;l>=0;l--){const h=i[l];if(h.index===r&&h.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Oi.TIMED_TEXT;if(e.sn==="initSegment")return Oi.INIT;if(t==="audio")return Oi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Oi.VIDEO:Oi.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===Oi.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===Oi.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:br.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,l){t(i),this.loader.load(i,s,l)}}}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,l){t(i),this.loader.load(i,s,l)}}}}const T0=3e5;class A0 extends te{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(r=>r!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===gr.SendAlternateToPenaltyBox&&r.flags===Ur.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:h,type:c}=t.context;l&&n?s=this.getPathwayForGroupId(l,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===H.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: ${xt(i)} penalized: ${xt(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]>T0&&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 l=this.hls.nextLoadLevel,h=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,ai(t),this.hls.trigger(m.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];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=l);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===ie.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===ie.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":l,"URI-REPLACEMENT":h}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const g=new xr(p.attrs);g["PATHWAY-ID"]=s;const T=g.AUDIO&&`${g.AUDIO}_clone_${s}`,R=g.SUBTITLES&&`${g.SUBTITLES}_clone_${s}`;T&&(r[g.AUDIO]=T,g.AUDIO=T),R&&(n[g.SUBTITLES]=R,g.SUBTITLES=R);const k=Fl(p.uri,g["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),re=new Rr({attrs:g,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:k,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let ee=1;ee<p.audioGroups.length;ee++)re.addGroupId("audio",`${p.audioGroups[ee]}_clone_${s}`);if(p.subtitleGroups)for(let ee=1;ee<p.subtitleGroups.length;ee++)re.addGroupId("text",`${p.subtitleGroups[ee]}_clone_${s}`);return re});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,l=s.errorRetry||s.timeoutRetry||{},h={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,g,T,R)=>{this.log(`Loaded steering manifest: "${n}"`);const k=p.data;if((k==null?void 0:k.VERSION)!==1){this.log(`Steering VERSION ${k.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=k.TTL;const{"RELOAD-URI":re,"PATHWAY-CLONES":ee,"PATHWAY-PRIORITY":Ae}=k;if(re)try{this.uri=new self.URL(re,n).href}catch(Ue){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${re}`);return}this.scheduleRefresh(this.uri||T.url),ee&&this.clonePathways(ee);const Oe={steeringManifest:k,url:n.toString()};this.hls.trigger(m.STEERING_MANIFEST_LOADED,Oe),Ae&&this.updatePathwayPriority(Ae)},onError:(p,g,T,R)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${g.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${g.url} no longer available`);return}let k=this.timeToLoad*1e3;if(p.code===429){const re=this.loader;if(typeof(re==null?void 0:re.getResponseHeader)=="function"){const ee=re.getResponseHeader("Retry-After");ee&&(k=parseFloat(ee)*1e3)}this.log(`Steering manifest ${g.url} rate limited`);return}this.scheduleRefresh(this.uri||g.url,k)},onTimeout:(p,g,T)=>{this.log(`Timeout loading steering manifest (${g.url})`),this.scheduleRefresh(this.uri||g.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 l=b({},s);return l.details=void 0,l.attrs=new xr(l.attrs),l.url=l.attrs.URI=Fl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[n],l.attrs["PATHWAY-ID"]=r,l});a.push(...i)})}function Fl(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const h=new self.URL(a);return n&&!l&&(h.host=n),i&&Object.keys(i).sort().forEach(c=>{c&&h.searchParams.set(c,i[c])}),h.href}class va extends te{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=va.CDMCleanupPromise?[va.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=ki(this.config));const l=s.map(Wn).filter(h=>!!h);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=wi(s);if(r!=="sinf"||l!==Lr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${r}" for selected key-system ${l}`);return}let h;try{const R=Qe(new Uint8Array(n)),k=Xi(JSON.parse(R).sinf),re=pt(k);if(!re)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");h=new Uint8Array(re.subarray(8,24))}catch(R){this.warn(`${i} Failed to parse sinf: ${R}`);return}const c=Q(h),{keyIdToKeySessionPromise:p,mediaKeySessions:g}=this;let T=p[c];for(let R=0;R<g.length;R++){const k=g[R],re=k.decryptdata;if(!re.keyId)continue;const ee=Q(re.keyId);if(Qn(h,re.keyId)||re.uri.replace(/-/g,"").indexOf(c)!==-1){if(T=p[ee],!T)continue;if(re.pssh)break;delete p[ee],re.pssh=new Uint8Array(n),re.keyId=h,T=p[c]=T.then(()=>this.generateRequestWithPreferredKeySession(k,r,n,"encrypted-event-key-match")),T.catch(Ae=>this.handleError(Ae));break}}T||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${g.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(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(m.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t==null?void 0:t[e];if(n)return n.licenseUrl;if(e===Lr.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,l,h)=>!!s&&h.indexOf(s)===l,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,l)=>{const h=c=>{const p=c.shift();this.getMediaKeysPromise(p,n,i).then(g=>s({keySystem:p,mediaKeys:g})).catch(g=>{c.length?h(c):g instanceof Gi?l(g):l(new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_NO_ACCESS,error:g,fatal:!0},g.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 Ki===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=ra(e,t,r,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],l=(n=s)==null?void 0:n.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${xt(i)}`),l=this.requestMediaKeySystemAccess(e,i);const h=s=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),l.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const g=h.mediaKeys=c.createMediaKeys().then(T=>(this.log(`Media-keys created for "${e}"`),h.hasMediaKeys=!0,p.then(R=>R?this.setMediaKeysServerCertificate(T,e,R):T)));return g.catch(T=>{this.error(`Failed to create media-keys for "${e}"}: ${T}`)}),g})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${Q(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 ${Q(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})=>Wn(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=Wn(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=ki(this.config),r=e.map(wi).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=C0(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 l=Nl(n||"internal-error",t);return this.handleError(l,e.frag),Promise.reject(l)}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 l=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 l.catch(h=>this.handleError(h,e.frag)),this.keyIdToKeySessionPromise[r]=l,l}return s.catch(l=>{if(l instanceof Gi){const h=C({},l.data);this.getKeyStatus(t)==="internal-error"&&(h.decryptdata=t);const c=new Gi(h,l.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 Gi){t&&(e.data.frag=t);const r=e.data.decryptdata;this.error(`${e.message}${r?` (${Q(r.keyId||[])})`:""}`),this.hls.trigger(m.ERROR,e.data)}else this.error(e.message),this.hls.trigger(m.ERROR,{type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=mo(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=wi(e.keyFormat),i=n?[n]:ki(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=ki(this.config)),e.length===0)throw new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${xt({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 k=s.call(this.hls,t,r,e);if(!k)throw new Error("Invalid response from configured generateRequest filter");t=k.initDataType,r=k.initData?k.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(k){if(this.warn(k.message),this.hls&&this.hls.config.debug)throw k}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const l=mo(e.decryptdata),h=e.decryptdata.uri;this.log(`Generating key-session request for "${n}" keyId: ${l} URI: ${h} (init data type: ${t} length: ${r.byteLength})`);const c=new ua,p=e._onmessage=k=>{const re=e.mediaKeysSession;if(!re){c.emit("error",new Error("invalid state"));return}const{messageType:ee,message:Ae}=k;this.log(`"${ee}" message event for session "${re.sessionId}" message size: ${Ae.byteLength}`),ee==="license-request"||ee==="license-renewal"?this.renewLicense(e,Ae).catch(Oe=>{c.eventNames().length?c.emit("error",Oe):this.handleError(Oe)}):ee==="license-release"?e.keySystem===Lr.FAIRPLAY&&this.updateKeySession(e,Mi("acknowledged")).then(()=>this.removeSession(e)).catch(Oe=>this.handleError(Oe)):this.warn(`unhandled media key message type "${ee}"`)},g=(k,re)=>{re.keyStatus=k;let ee;k.startsWith("usable")?c.emit("resolved"):k==="internal-error"||k==="output-restricted"||k==="output-downscaled"?ee=Nl(k,re.decryptdata):k==="expired"?ee=new Error(`key expired (keyId: ${l})`):k==="released"?ee=new Error("key released"):k==="status-pending"||this.warn(`unhandled key status change "${k}" (keyId: ${l})`),ee&&(c.eventNames().length?c.emit("error",ee):this.handleError(ee))},T=e._onkeystatuseschange=k=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const ee=this.getKeyStatuses(e);if(!Object.keys(ee).some(rt=>ee[rt]!=="status-pending"))return;if(ee[l]==="expired"){this.log(`Expired key ${xt(ee)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let Oe=ee[l];if(Oe)g(Oe,e);else{var Ue;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Ue=e.keyStatusTimeouts)[l]||(Ue[l]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const ct=this.getKeyStatus(e.decryptdata);if(ct&&ct!=="status-pending")return this.log(`No status for keyId ${l} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${ct} from other session.`),g(ct,e);this.log(`key status for ${l} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),Oe="internal-error",g(Oe,e)},1e3)),this.log(`No status for keyId ${l} (${xt(ee)}).`)}};oi(e.mediaKeysSession,"message",p),oi(e.mediaKeysSession,"keystatuseschange",T);const R=new Promise((k,re)=>{c.on("error",re),c.on("resolved",k)});return e.mediaKeysSession.generateRequest(t,r).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l} URI: ${h}`)}).catch(k=>{throw new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_NO_SESSION,error:k,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${k}`)}).then(()=>R).catch(k=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw k}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((r,n)=>{if(typeof n=="string"&&typeof r=="object"){const l=n;n=r,r=l}const i="buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n);if(e.keySystem===Lr.PLAYREADY&&i.length===16){const l=Q(i);t[l]=r,ir(i)}const s=Q(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,l)=>{const h={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(T,R,k,re)=>{s(T.data)},onError:(T,R,k,re)=>{l(new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:k,response:C({url:h.url,data:void 0},T)},`"${e}" certificate request failed (${i}). Status: ${T.code} (${T.text})`))},onTimeout:(T,R,k)=>{l(new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:k,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(T,R,k)=>{l(new Error("aborted"))}};n.load(h,p,g)})):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 Gi({type:pe.KEY_SYSTEM_ERROR,details:H.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 Gi({type:pe.KEY_SYSTEM_ERROR,details:H.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 g=0,T=i.length;g<T;g++){var s,l;p=i[g];const R=(s=p.querySelector("name"))==null?void 0:s.textContent,k=(l=p.querySelector("value"))==null?void 0:l.textContent;R&&k&&e.setRequestHeader(R,k)}}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 l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let h=l.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const c=this.config.licenseResponseCallback;if(c)try{h=c.call(this.hls,l,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||l.status>=400&&l.status<500)i(new Gi({type:pe.KEY_SYSTEM_ERROR,details:H.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.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=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:h,licenseChallenge:c})=>{e.keySystem==Lr.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,oi(r,"encrypted",this.onMediaEncrypted),oi(r,"waitingforkey",this.onWaitingForKey);const n=this.mediaResolved;n?n():this.mediaKeys=r.mediaKeys}onMediaDetached(){const e=this.media;e&&(vi(e,"encrypted",this.onMediaEncrypted),vi(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,yi.clearKeyUriToKeyIdMap();const i=n.length;va.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(m.ERROR,{type:pe.OTHER_ERROR,details:H.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(m.ERROR,{type:pe.OTHER_ERROR,details:H.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: ${Q((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:l}=this.config;return(na(l)?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(m.ERROR,{type:pe.OTHER_ERROR,details:H.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(m.ERROR,{type:pe.OTHER_ERROR,details:H.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}va.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 Q(a.keyId)}function C0(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 Gi 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?H.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:H.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Gi({type:pe.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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const i=n-this.lastTime,s=r-this.lastDroppedFrames,l=t-this.lastDecodedFrames,h=1e3*s/i,c=this.hls;if(c.trigger(m.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:r}),h>0&&s>c.config.fpsDroppedMonitoringThreshold*l){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(m.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 _a(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 I0(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=I0(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)r.push(l);else if(l.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 L0 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(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const r=this.media;if(!r)return;const n=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n)return;go(r.textTracks).forEach(s=>{_a(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 l=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,l)}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,g)=>{p.id=g});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=Vt(l,s);if(p>-1)i=s[p];else{const g=Vt(l,this.tracks);i=this.tracks[g]}}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(m.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||Ar(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===ie.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&&Ar(e,r))return r;const n=Vt(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=Vt(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,l=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:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.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||!y(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:e});return}const 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:l="",name:h,type:c,url:p}=n;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:h,type:c,url:p});const g=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(g)}}function k0(){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 ya=.025;let vo=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function P0(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class O0{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 Xo(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=Xo(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=y(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 Xo(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)<ya))}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 M0(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<ya)?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 qo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function M0(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function ba(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class B0{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(m.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=r,this.assetItem=n;const s=()=>{this.hasDetails=!0};i.once(m.LEVEL_LOADED,s),i.once(m.AUDIO_TRACK_LOADED,s),i.once(m.SUBTITLE_TRACK_LOADED,s),i.on(m.MEDIA_ATTACHING,(l,{media:h})=>{this.removeMediaListeners(),this.mediaAttached=h,this.interstitial.playoutLimit&&(h.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(m.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(m.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=br.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=br.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: ${ba(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Gl=.033;class F0 extends te{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 l=s.timelineStart;if(t===l||t>l&&(t<l+(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),l=Object.keys(n),h=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const g=c.cue.pre,T=c.cue.post,R=p.cue.pre,k=p.cue.post;if(g&&!R)return-1;if(R&&!g||T&&!k)return 1;if(k&&!T)return-1;if(!g&&!R&&!T&&!k){const re=c.startTime,ee=p.startTime;if(re!==ee)return re-ee}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 l=i[s],h=e[l];if(h.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(h):(c=new O0(h,t),this.eventMap[l]=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,g)=>{const T=p.cue.pre,R=p.cue.post,k=e[g-1]||null,re=p.appendInPlace,ee=R?i:p.startOffset,Ae=p.duration,Oe=p.timelineOccupancy===vo.Range?Ae:0,Ue=p.resumptionOffset,rt=(k==null?void 0:k.startTime)===ee,ct=ee+p.cumulativeDuration;let Pt=re?ct+Ae:ee+Ue;if(T||!R&&ee<=0){const It=c;c+=Oe,p.timelineStart=ct;const Ct=s;s+=Ae,r.push({event:p,start:ct,end:Pt,playout:{start:Ct,end:s},integrated:{start:It,end:c}})}else if(ee<=i){if(!rt){const _t=ee-h;if(_t>Gl){const Nt=h,rr=c;c+=_t;const lr=s;s+=_t;const yr={previousEvent:e[g-1]||null,nextEvent:p,start:Nt,end:Nt+_t,playout:{start:lr,end:s},integrated:{start:rr,end:c}};r.push(yr)}else _t>0&&k&&(k.cumulativeDuration+=_t,r[r.length-1].end=ee)}R&&(Pt=ct),p.timelineStart=ct;const It=c;c+=Oe;const Ct=s;s+=Ae,r.push({event:p,start:ct,end:Pt,playout:{start:Ct,end:s},integrated:{start:It,end:c}})}else return;const ft=p.resumeTime;R||ft>i?h=i:h=ft}),h<i){var l;const p=h,g=c,T=i-h;c+=T;const R=s;s+=T,r.push({previousEvent:((l=r[r.length-1])==null?void 0:l.event)||null,nextEvent:null,start:h,end:p+T,playout:{start:R,end:s},integrated:{start:g,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((l,h)=>{const c=l.cue.pre,p=l.cue.post,g=c?0:p?n:l.startTime;this.updateAssetDurations(l),s===g?l.cumulativeDuration=i:(i=0,s=g),!p&&l.snapOptions.in&&(l.resumeAnchor=Zr(null,r.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.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 ${l}`));const R=y(l.resumeOffset)?l.resumeOffset:l.duration;i+=R})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>ya?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,h=l.edge;if(r>=h)return this.log(`"${e.identifier}" resumption ${r} past ${s} playlist end ${h}`),!1;const c=Zr(null,l.fragments,r);if(!c)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${s} playlist (${l.fragStart}-${l.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-r)<ya+p||Math.abs(c.end-r)<ya+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 l=e.assetList[s],h=t+r;l.startOffset=r,l.timelineStart=h,n||(n=l.duration===null),i||(i=!!l.error);const c=l.error?0:l.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 ts(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class N0{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(T){const R=this.assignAssetListError(e,H.ASSET_LIST_LOAD_ERROR,T,r);this.hls.trigger(m.ERROR,R);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=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},g={onSuccess:(T,R,k,re)=>{const ee=T.data,Ae=ee==null?void 0:ee.ASSETS;if(!Array.isArray(Ae)){const Oe=this.assignAssetListError(e,H.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),k.url,R,re);this.hls.trigger(m.ERROR,Oe);return}e.assetListResponse=ee,this.hls.trigger(m.ASSET_LIST_LOADED,{event:e,assetListResponse:ee,networkDetails:re})},onError:(T,R,k,re)=>{const ee=this.assignAssetListError(e,H.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${T.code} ${T.text} (${R.url})`),R.url,re,k);this.hls.trigger(m.ERROR,ee)},onTimeout:(T,R,k)=>{const re=this.assignAssetListError(e,H.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${R.url})`),R.url,T,k);this.hls.trigger(m.ERROR,re)}};return l.load(h,p,g),this.hls.trigger(m.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,r,n,i,s){return e.error=r,{type:pe.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:s,stats:i}}}function jl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function _o(a,e){return`[${a}] Advancing timeline position to ${e}`}class $0 extends te{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 l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(!0),this.checkBuffer(),s&&r<l.start||r>=l.end){var h;const R=this.findItemIndex(l);let k=this.schedule.findItemIndexAtTime(r);if(k===-1&&(k=R+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${r} (resolving from ${R} to ${k})`)),!this.isInterstitial(l)&&(h=this.media)!=null&&h.paused&&(this.shouldPlay=!1),!s&&k>R){const re=this.schedule.findJumpRestrictedIndex(R+1,k);if(re>R){this.setSchedulePosition(re);return}}this.setSchedulePosition(k);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const R=l.event.assetList[0];R&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,R))}return}const p=c.timelineStart,g=c.duration||0;if(s&&r<p||r>=p+g){var T;(T=l.event)!=null&&T.appendInPlace&&(this.clearAssetPlayers(l.event,l),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 l=this.findItemIndex(n);this.setSchedulePosition(l+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,l=i.events||[],h=i.items||[],c=i.durations,p=r.map(re=>re.identifier),g=!!(l.length||p.length);(g||n)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
Schedule: ${h.map(re=>ts(re))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let T=null,R=null;s&&(T=this.updateItem(s,this.timelinePos),this.itemsMatch(s,T)?this.playingItem=T:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const k=this.bufferingItem;if(k&&(R=this.updateItem(k,this.bufferedPos),this.itemsMatch(k,R)?this.bufferingItem=R:k.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(k.event,null))),r.forEach(re=>{re.assetList.forEach(ee=>{this.clearAssetPlayer(ee.identifier,null)})}),this.playerQueue.forEach(re=>{if(re.interstitial.appendInPlace){const ee=re.assetItem.timelineStart,Ae=re.timelineOffset-ee;if(Ae)try{re.timelineOffset=ee}catch(Oe){Math.abs(Ae)>ya&&this.warn(`${Oe} ("${re.assetId}" ${re.timelineOffset}->${ee})`)}}}),g||n){if(this.hls.trigger(m.INTERSTITIALS_UPDATED,{events:l.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(T,s),k&&R!==T&&this.trimInPlace(R,k),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new N0(e),this.schedule=new F0(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(m.MEDIA_ENDED,this.onMediaEnded,this),e.on(m.ERROR,this.onError,this),e.on(m.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(m.MEDIA_ENDED,this.onMediaEnded,this),e.off(m.ERROR,this.onError,this),e.off(m.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.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){vi(e,"play",this.onPlay),vi(e,"pause",this.onPause),vi(e,"seeking",this.onSeeking),vi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const r=this.media=t.media;oi(r,"seeking",this.onSeeking),oi(r,"timeupdate",this.onTimeupdate),oi(r,"play",this.onPlay),oi(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=g=>g&&e.getAssetPlayer(g.identifier),n=(g,T,R,k,re)=>{if(g){let ee=g[T].start;const Ae=g.event;if(Ae){if(T==="playout"||Ae.timelineOccupancy!==vo.Point){const Oe=r(R);(Oe==null?void 0:Oe.interstitial)===Ae&&(ee+=Oe.assetItem.startOffset+Oe[re])}}else{const Oe=k==="bufferedPos"?s():e[k];ee+=Oe-g.start}return ee}return 0},i=(g,T)=>{var R;if(g!==0&&T!=="primary"&&(R=e.schedule)!=null&&R.length){var k;const re=e.schedule.findItemIndexAtTime(g),ee=(k=e.schedule.items)==null?void 0:k[re];if(ee){const Ae=ee[T].start-ee.start;return g+Ae}}return g},s=()=>{const g=e.bufferedPos;return g===Number.MAX_VALUE?l("primary"):Math.max(g,0)},l=g=>{var T,R;return(T=e.primaryDetails)!=null&&T.live?e.primaryDetails.edge:((R=e.schedule)==null?void 0:R.durations[g])||0},h=(g,T)=>{var R,k;const re=e.effectivePlayingItem;if(re!=null&&(R=re.event)!=null&&R.restrictions.skip||!e.schedule)return;e.log(`seek to ${g} "${T}"`);const ee=e.effectivePlayingItem,Ae=e.schedule.findItemIndexAtTime(g,T),Oe=(k=e.schedule.items)==null?void 0:k[Ae],Ue=e.getBufferingPlayer(),rt=Ue==null?void 0:Ue.interstitial,ct=rt==null?void 0:rt.appendInPlace,Pt=ee&&e.itemsMatch(ee,Oe);if(ee&&(ct||Pt)){const ft=r(e.playingAsset),It=(ft==null?void 0:ft.media)||e.primaryMedia;if(It){const Ct=T==="primary"?It.currentTime:n(ee,T,e.playingAsset,"timelinePos","currentTime"),_t=g-Ct,Nt=(ct?Ct:It.currentTime)+_t;if(Nt>=0&&(!ft||ct||Nt<=ft.duration)){It.currentTime=Nt;return}}}if(Oe){let ft=g;if(T!=="primary"){const Ct=Oe[T].start,_t=g-Ct;ft=Oe.start+_t}const It=!e.isInterstitial(Oe);if((!e.isInterstitial(ee)||ee.event.appendInPlace)&&(It||Oe.event.appendInPlace)){const Ct=e.media||(ct?Ue==null?void 0:Ue.media:null);Ct&&(Ct.currentTime=ft)}else if(ee){const Ct=e.findItemIndex(ee);if(Ae>Ct){const Nt=e.schedule.findJumpRestrictedIndex(Ct+1,Ae);if(Nt>Ct){e.setSchedulePosition(Nt);return}}let _t=0;if(It)e.timelinePos=ft,e.checkBuffer();else{const Nt=Oe.event.assetList,rr=g-(Oe[T]||Oe).start;for(let lr=Nt.length;lr--;){const yr=Nt[lr];if(yr.duration&&rr>=yr.startOffset&&rr<yr.startOffset+yr.duration){_t=lr;break}}}e.setSchedulePosition(Ae,_t)}}},c=()=>{const g=e.effectivePlayingItem;if(e.isInterstitial(g))return g;const T=t();return e.isInterstitial(T)?T:null},p={get bufferedEnd(){const g=t(),T=e.bufferingItem;if(T&&T===g){var R;return n(T,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-T.playout.start||((R=e.bufferingAsset)==null?void 0:R.startOffset)||0}return 0},get currentTime(){const g=c(),T=e.effectivePlayingItem;return T&&T===g?n(T,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-T.playout.start:0},set currentTime(g){const T=c(),R=e.effectivePlayingItem;R&&R===T&&h(g+R.playout.start,"playout")},get duration(){const g=c();return g?g.playout.end-g.playout.start:0},get assetPlayers(){var g;const T=(g=c())==null?void 0:g.event.assetList;return T?T.map(R=>e.getAssetPlayer(R.identifier)):[]},get playingIndex(){var g;const T=(g=c())==null?void 0:g.event;return T&&e.effectivePlayingAsset?T.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var g;return((g=e.schedule)==null||(g=g.events)==null?void 0:g.slice(0))||[]},get schedule(){var g;return((g=e.schedule)==null||(g=g.items)==null?void 0:g.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 g=t();return e.findItemIndex(g)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const g=e.effectivePlayingItem;return e.findItemIndex(g)},primary:{get bufferedEnd(){return s()},get currentTime(){const g=e.timelinePos;return g>0?g:0},set currentTime(g){h(g,"primary")},get duration(){return l("primary")},get seekableStart(){var g;return((g=e.primaryDetails)==null?void 0:g.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(g){h(g,"integrated")},get duration(){return l("integrated")},get seekableStart(){var g;return i(((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0,"integrated")}},skip:()=>{const g=e.effectivePlayingItem,T=g==null?void 0:g.event;if(T&&!T.restrictions.skip){const R=e.findItemIndex(g);if(T.appendInPlace){const k=g.playout.start+g.event.duration;h(k+.001,"playout")}else e.advanceAfterAssetEnded(T,R,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||!y(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} ${xt(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,l=e!==s,h=l&&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 k=this.getBufferingPlayer();k?(i=k.transferMedia(),p=`${k}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${xt(i)}`);else if(!this.detachedData||s.media===t){const k=this.playerQueue;k.length>1&&k.forEach(re=>{if(l&&re.interstitial.appendInPlace!==h){const ee=re.interstitial;this.clearInterstitial(re.interstitial,null),ee.appendInPlace=!1,ee.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${ee}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const g=i&&"mediaSource"in i&&((n=i.mediaSource)==null?void 0:n.readyState)!=="closed",T=g&&i?i:t;this.log(`${g?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const R=this.schedule;if(T===i&&R){const k=l&&e.assetId===R.assetIdAtEnd;T.overrides={duration:R.duration,endOfStream:!l||k,cueRemoval:!l}}e.attachMedia(T)}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,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}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=qo(r,n);if(!r.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const l=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];l&&this.bufferedToItem(l)}}advanceAfterAssetEnded(e,t,r){const n=qo(e,r);if(e.isAssetPastPlayoutLimit(n)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){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),l=r.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,l-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&&ts(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,l=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,g=this.playingAsset,T=g==null?void 0:g.identifier,R=T?this.getAssetPlayer(T):null;if(R&&T&&(!this.eventItemsMatch(s,i)||t!==void 0&&T!==p.assetList[t].identifier)){var h;const k=p.findAssetIndex(g);if(this.log(`INTERSTITIAL_ASSET_ENDED ${k+1}/${p.assetList.length} ${ba(g)}`),this.endedAsset=g,this.playingAsset=null,this.hls.trigger(m.INTERSTITIAL_ASSET_ENDED,{asset:g,assetListIndex:k,event:p,schedule:n.slice(0),scheduleIndex:e,player:R}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),k);return}this.retreiveMediaSource(T,i),R.media&&!((h=this.detachedData)!=null&&h.mediaSource)&&R.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${ts(s)}`),p.hasPlayed=!0,this.hls.trigger(m.INTERSTITIAL_ENDED,{event:p,schedule:n.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const k=(c=this.schedule)==null?void 0:c.items;if(i&&k){const re=this.findItemIndex(i);this.advanceSchedule(re,k,t,s,l)}return}}this.advanceSchedule(e,n,t,s,l)}advanceSchedule(e,t,r,n,i){const s=this.schedule;if(!s)return;const l=t[e]||null,h=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const g=p.interstitial,T=s.findEventIndex(g.identifier);(T<e||T>e+1)&&this.clearInterstitial(g,l)}),this.isInterstitial(l)){this.timelinePos=Math.min(Math.max(this.timelinePos,l.start),l.end);const p=l.event;if(r===void 0){r=s.findAssetIndex(p,this.timelinePos);const k=qo(p,r-1);if(p.isAssetPastPlayoutLimit(k)||p.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(p,e,r);return}r=k}const g=this.waitingItem;this.assetsBuffered(l,h)||this.setBufferingItem(l);let T=this.preloadAssets(p,r);if(this.eventItemsMatch(l,g||n)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${ts(l)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(m.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=l;const R=p.assetList[r];if(!R){this.advanceAfterAssetEnded(p,e,r||0);return}if(T||(T=this.getAssetPlayer(R.identifier)),T===null||T.destroyed){const k=p.assetList.length;this.warn(`asset ${r+1}/${k} player destroyed ${p}`),T=this.createAssetPlayer(p,R,r),T.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(R))return;this.startAssetPlayer(T,r,t,e,h),this.shouldPlay&&jl(T.media)}else l?(this.resumePrimary(l,e,n),this.shouldPlay&&jl(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 ${ts(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(_o("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!r)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${ts(e)}`),this.hls.trigger(m.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const r=e.start;if(this.primaryLive){const n=this.primaryDetails;if(t===0)return this.hls.startPosition;if(n&&(r<n.fragmentStart||r>n.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:br.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(m.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(m.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=C(C({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const r=this.hls.audioTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=C(C({},this.altSelection),{},{audio:r});return}const i=C(C({},n),{},{audio:r});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=C(C({},this.altSelection),{},{subtitles:r});return}const i=C(C({},n),{},{subtitles:r});this.mediaSelection=i}onAudioTrackSwitching(e,t){const r=jt(t);this.playerQueue.forEach(({hls:n})=>n&&(n.setAudioOption(t)||n.setAudioOption(r)))}onSubtitleTrackSwitch(e,t){const r=jt(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),l=(r=this.schedule.items)==null?void 0:r[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,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=br.bufferInfo(this.primaryMedia,r,0);(n.end>r||(n.nextStart||0)>r)&&(this.log(`trim buffered interstitial ${ts(e)} (was ${ts(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=br.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,l=this.findItemIndex(s);let h=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),g=Math.min(p+1,t.length-1),T=t[g];if((h===-1&&i&&e>=i.end||(c=T.event)!=null&&c.appendInPlace&&e+.01>=T.start)&&(h=g),this.isInterstitial(i)){const R=i.event;if(g-l>1&&R.appendInPlace===!1||R.assetList.length===0&&R.assetListLoader)return}if(this.bufferedPos=e,h>p&&h>l)this.bufferedToItem(T);else{const R=this.primaryDetails;this.primaryLive&&R&&e>R.edge-R.targetduration&&T.start<R.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(T)&&this.preloadAssets(T.event,0)}}else r&&s&&!this.itemsMatch(s,i)&&(h===l?this.bufferedToItem(s):h===l+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),l=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const h=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${ts(e)}`+(t?` (${h.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=r.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,g)=>{const T=this.getAssetPlayer(p.identifier);T&&(g===c&&T.loadSource(),T.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(m.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 l=this.primaryMedia;l&&this.bufferAssetPlayer(s,l)}}}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 l;const T=this.playingItem;!this.isInterstitial(T)&&(T==null||(l=T.nextEvent)==null?void 0:l.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 T=p-h;T>0&&(c=Math.round(T*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 g=this.assetListLoader.loadAssetList(e,c);g&&(e.assetListLoader=g)}else if(!s&&n){for(let c=t;c<n;c++){const p=e.assetList[c],g=this.getAssetPlayerQueueIndex(p.identifier);(g===-1||this.playerQueue[g].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(m.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let r=0;r<t.length;r++)if(e===t[r].assetId)return r;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let r=0;r<e.length;r++)if(e[r].media===t)return e[r]}return null}createAsset(e,t,r,n,i,s){const l={parentIdentifier:e.identifier,identifier:P0(e,s,t),duration:i,startOffset:r,timelineStart:n,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,r){const n=this.hls,i=n.userConfig;let s=i.videoPreference;const l=n.loadLevelObj||n.levels[n.currentLevel];(s||l)&&(s=b({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const h=n.audioTracks[n.audioTrack],c=n.subtitleTracks[n.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const rt=this.timelinePos-t.timelineStart;if(rt>1){const ct=t.duration;ct&&rt<ct&&(p=rt)}}const g=t.identifier,T=C(C({},i),{},{maxMaxBufferLength:Math.min(180,n.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:g,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&&(T.timelineOffset=t.timelineStart));const R=T.cmcd;R!=null&&R.sessionId&&R.contentId&&(T.cmcd=b({},R,{contentId:Ua(t.uri)})),this.getAssetPlayer(g)&&this.warn(`Duplicate date range identifier ${e} and asset ${g}`);const k=new B0(this.HlsPlayerClass,T,e,t);this.playerQueue.push(k),e.assetList[r]=t;let re=!0;const ee=rt=>{if(rt.live){var ct;const It=new Error(`Interstitials MUST be VOD assets ${e}`),Ct={fatal:!0,type:pe.OTHER_ERROR,details:H.INTERSTITIAL_ASSET_ITEM_ERROR,error:It},_t=((ct=this.schedule)==null?void 0:ct.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Ct,e,_t,r,It.message);return}const Pt=rt.edge-rt.fragmentStart,ft=t.duration;(re||ft===null||Pt>ft)&&(re=!1,this.log(`Interstitial asset "${g}" duration change ${ft} > ${Pt}`),t.duration=Pt,this.updateSchedule())};k.on(m.LEVEL_UPDATED,(rt,{details:ct})=>ee(ct)),k.on(m.LEVEL_PTS_UPDATED,(rt,{details:ct})=>ee(ct)),k.on(m.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Ae=(rt,ct)=>{const Pt=this.getAssetPlayer(g);if(Pt&&ct.tracks){Pt.off(m.BUFFER_CODECS,Ae),Pt.tracks=ct.tracks;const ft=this.primaryMedia;this.bufferingAsset===Pt.assetItem&&ft&&!Pt.media&&this.bufferAssetPlayer(Pt,ft)}};k.on(m.BUFFER_CODECS,Ae);const Oe=()=>{var rt;const ct=this.getAssetPlayer(g);if(this.log(`buffered to end of asset ${ct}`),!ct||!this.schedule)return;const Pt=this.schedule.findEventIndex(e.identifier),ft=(rt=this.schedule.items)==null?void 0:rt[Pt];this.isInterstitial(ft)&&this.advanceAssetBuffering(ft,t)};k.on(m.BUFFERED_TO_END,Oe);const Ue=rt=>()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;this.shouldPlay=!0;const Pt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Pt,rt)};return k.once(m.MEDIA_ENDED,Ue(r)),k.once(m.PLAYOUT_LIMIT_REACHED,Ue(1/0)),k.on(m.ERROR,(rt,ct)=>{if(!this.schedule)return;const Pt=this.getAssetPlayer(g);if(ct.details===H.BUFFER_STALLED_ERROR){if(Pt!=null&&Pt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(ct,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${ct.error} ${e}`)}),k.on(m.DESTROYING,()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;const ct=new Error(`Asset player destroyed unexpectedly ${g}`),Pt={fatal:!0,type:pe.OTHER_ERROR,details:H.INTERSTITIAL_ASSET_ITEM_ERROR,error:ct};this.handleAssetItemError(Pt,e,this.schedule.findEventIndex(e.identifier),r,ct.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${ba(t)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:k}),k}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&&ts(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:l,assetId:h}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==h)&&(p&&(this.clearAssetPlayer(p.identifier,r[n]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${ba(l)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_STARTED,{asset:l,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,l=this.schedule.findEventIndex(i.identifier),h=(r=this.schedule.items)==null?void 0:r[l];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 g=(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(g&&!_e(g,e.tracks)){const T=new Error(`Asset ${ba(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(g)}')`),R={fatal:!0,type:pe.OTHER_ERROR,details:H.INTERSTITIAL_ASSET_ITEM_ERROR,error:T},k=i.findAssetIndex(s);this.handleAssetItemError(R,i,l,k,T.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 l=this.getAssetPlayer(s.identifier);if(l){const h=l.currentTime||n-s.timelineStart,c=l.duration-h;if(this.warn(`Stalled at ${h} of ${h+c} in ${l} ${e} (media.currentTime: ${n})`),h&&(c/r.playbackRate<.5||l.bufferedInPlaceToEnd(r))&&l.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===H.BUFFER_STALLED_ERROR)return;const s=t.assetList[n]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&ba(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",h=this.getAssetPlayerQueueIndex(l),c=this.playerQueue[h]||null,p=this.schedule.items,g=b({},e,{fatal:!1,errorAction:an(!0),asset:s,assetListIndex:n,event:t,schedule:p,scheduleIndex:r,player:c});if(this.hls.trigger(m.INTERSTITIAL_ASSET_ERROR,g),!e.fatal)return;const T=this.playingAsset,R=this.bufferingAsset,k=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=k),!t.assetList.some(re=>!re.error))t.error=k;else for(let re=n;re<t.assetList.length;re++)this.resetAssetPlayer(t.assetList[re].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):T&&T.identifier===l?this.advanceAfterAssetEnded(t,r,n):R&&R.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,R)}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: ${ts(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,l=t.assetListResponse.ASSETS;if(!((r=this.schedule)!=null&&r.hasEvent(s)))return;const h=i.timelineStart,c=i.duration;let p=0;l.forEach((re,ee)=>{const Ae=parseFloat(re.DURATION);this.createAsset(i,ee,p,h+p,Ae,re.URI),p+=Ae}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const g=this.waitingItem,T=(g==null?void 0:g.event.identifier)===s;this.updateSchedule();const R=(n=this.bufferingItem)==null?void 0:n.event;if(T){var k;const re=this.schedule.findEventIndex(s),ee=(k=this.schedule.items)==null?void 0:k[re];if(ee){if(!this.playingItem&&this.timelinePos>ee.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==re){i.error=new Error(`Interstitial ${l.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(ee)}this.setSchedulePosition(re)}else if((R==null?void 0:R.identifier)===s){const re=i.assetList[0];if(re){const ee=this.getAssetPlayer(re.identifier);if(R.appendInPlace){const Ae=this.primaryMedia;ee&&Ae&&this.bufferAssetPlayer(ee,Ae)}else ee&&ee.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case H.ASSET_LIST_PARSING_ERROR:case H.ASSET_LIST_LOAD_ERROR:case H.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&(this.updateSchedule(!0),this.primaryFallback(r));break}case H.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 Kl=500;class U0 extends Ks{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",q.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Ft.IDLE,this.setInterval(Kl),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)||(Be(r)&&(this.fragPrevious=r),this.state=Ft.IDLE),!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=r.start;for(let c=0;c<i.length;c++)if(l>=i[c].start&&l<=i[c].end){s=i[c];break}const h=r.start+r.duration;s?s.end=h:(s={start:l,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 l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(r,i,q.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===q.SUBTITLE&&(t.details===H.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Ft.STOPPED&&(this.state=Ft.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&yl(this.levels,t)){this.levels=t.map(r=>new Rr(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new Rr(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,q.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!==Ft.STOPPED&&this.setInterval(Kl)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const h=i[l];if(l>=i.length||!h)return;this.log(`Subtitle track ${l} 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 g=this.mainDetails;if(!g){this.startFragRequested=!1;return}const T=g.fragments[0];if(!h.details)s.hasProgramDateTime&&g.hasProgramDateTime?(Cs(s,g),c=s.fragmentStart):T&&(c=T.start,Gs(s,c));else{var p;c=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&T&&(c=T.start,Gs(s,c))}g&&!this.startFragRequested&&this.setStartPosition(g,c)}h.details=s,this.levelLastLoaded=h,l===n&&(this.hls.trigger(m.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Ft.IDLE&&(Zr(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&&pi(n.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,ji(n.method)).catch(l=>{throw i.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const h=performance.now();i.trigger(m.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:h}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Ft.IDLE})}}doTick(){if(!this.media){this.state=Ft.IDLE;return}if(this.state===Ft.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=br.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:l,len:h}=s,c=r.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(h>p)return;const g=c.fragments,T=g.length,R=c.edge;let k=null;const re=this.fragPrevious;if(l<R){const Oe=n.maxFragLookUpTolerance,Ue=l>R-Oe?0:Oe;k=Zr(re,g,Math.max(g[0].start,l),Ue),!k&&re&&re.start<g[0].start&&(k=g[0])}else k=g[T-1];if(k=this.filterReplacedPrimary(k,r.details),!k)return;const ee=k.sn-c.startSN,Ae=g[ee-1];if(Ae&&Ae.cc===k.cc&&this.fragmentTracker.getState(Ae)===Jr.NOT_LOADED&&(k=Ae),this.fragmentTracker.getState(k)===Jr.NOT_LOADED){const Oe=this.mapToInitFragWhenRequired(k);Oe&&this.loadFragment(Oe,r,l)}}}loadFragment(e,t,r){Be(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new z0(this.tracksBuffered[this.currentTrackId]||[])}}class z0{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 G0={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(G0[a]||a),rs=15,_s=100,j0={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},H0={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},W0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},V0=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Z0{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 Qs=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Wl{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 Y0{constructor(){this.uchar=" ",this.penState=new Wl}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 X0{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Wl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<_s;t++)this.chars.push(new Y0);this.logger=e}equals(e){for(let t=0;t<_s;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<_s;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<_s;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>_s&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=_s)}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>=_s){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<_s;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<_s;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=rs-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<rs;t++)this.rows.push(new X0(e));this.logger=e}reset(){for(let e=0;e<rs;e++)this.rows[e].clear();this.currRow=rs-1}equals(e){let t=!0;for(let r=0;r<rs;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<rs;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<rs;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 = "+xt(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let l=0;l<rs;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,h=this.logger.time;if(l!==null&&h!==null&&l<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 = "+xt(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<rs;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[rs-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[rs-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: "+xt(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=Q0(),this.logger=void 0;const n=this.logger=new Z0;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,l=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+Qs([t[r],t[r+1]])+"] -> ("+Qs([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 ("+Qs([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&&(l=this.parseChars(n,i),l)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Qs([n,i])+" orig: "+Qs([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 ("+Qs([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?j0[e]:H0[e]:r=s===1?K0[e]:W0[e];const l=this.channels[s];return l?(l.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 = "+Qs(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=V0[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const l=e<=23?1:2;return this.channels[l].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 Q0(){return{a:null,b:null}}var Jo=function(){if(hn!=null&&hn.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,h){if(typeof h!="string"||!Array.isArray(l))return!1;const c=h.toLowerCase();return~l.indexOf(c)?c:!1}function r(l){return t(a,l)}function n(l){return t(e,l)}function i(l,...h){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const g in p)l[g]=p[g]}return l}function s(l,h,c){const p=this,g={enumerable:!0};p.hasBeenReset=!1;let T="",R=!1,k=l,re=h,ee=c,Ae=null,Oe="",Ue=!0,rt="auto",ct="start",Pt=50,ft="middle",It=50,Ct="middle";Object.defineProperty(p,"id",i({},g,{get:function(){return T},set:function(_t){T=""+_t}})),Object.defineProperty(p,"pauseOnExit",i({},g,{get:function(){return R},set:function(_t){R=!!_t}})),Object.defineProperty(p,"startTime",i({},g,{get:function(){return k},set:function(_t){if(typeof _t!="number")throw new TypeError("Start time must be set to a number.");k=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},g,{get:function(){return re},set:function(_t){if(typeof _t!="number")throw new TypeError("End time must be set to a number.");re=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},g,{get:function(){return ee},set:function(_t){ee=""+_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},g,{get:function(){return Ae},set:function(_t){Ae=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},g,{get:function(){return Oe},set:function(_t){const Nt=r(_t);if(Nt===!1)throw new SyntaxError("An invalid or illegal string was specified.");Oe=Nt,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},g,{get:function(){return Ue},set:function(_t){Ue=!!_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},g,{get:function(){return rt},set:function(_t){if(typeof _t!="number"&&_t!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");rt=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},g,{get:function(){return ct},set:function(_t){const Nt=n(_t);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");ct=Nt,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},g,{get:function(){return Pt},set:function(_t){if(_t<0||_t>100)throw new Error("Position must be between 0 and 100.");Pt=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},g,{get:function(){return ft},set:function(_t){const Nt=n(_t);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");ft=Nt,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},g,{get:function(){return It},set:function(_t){if(_t<0||_t>100)throw new Error("Size must be between 0 and 100.");It=_t,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},g,{get:function(){return Ct},set:function(_t){const Nt=n(_t);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");Ct=Nt,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class J0{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 ec{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 Xl(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 l=s[0],h=s[1];e(l,h)}}const el=new Jo(0,0,""),bo=el.align==="middle"?"middle":"center";function tc(a,e,t){const r=a;function n(){const l=Yl(a);if(l===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,h){const c=new ec;Xl(l,function(T,R){let k;switch(T){case"region":for(let re=t.length-1;re>=0;re--)if(t[re].id===R){c.set(T,t[re].region);break}break;case"vertical":c.alt(T,R,["rl","lr"]);break;case"line":k=R.split(","),c.integer(T,k[0]),c.percent(T,k[0])&&c.set("snapToLines",!1),c.alt(T,k[0],["auto"]),k.length===2&&c.alt("lineAlign",k[1],["start",bo,"end"]);break;case"position":k=R.split(","),c.percent(T,k[0]),k.length===2&&c.alt("positionAlign",k[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(T,R);break;case"align":c.alt(T,R,["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 g=c.get("position","auto");g==="auto"&&el.position===50&&(g=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.position=g}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 ql(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class rc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new J0,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=ql(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
`&&++s,t.buffer=i.slice(s),l}function n(i){Xl(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[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{tc(i,t.cue,t.regionList)}catch(l){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const l=i.indexOf("-->")!==-1;if(!i||l&&(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 nc=/\r\n|\n\r|\n|\r/g,tl=function(e,t,r=0){return e.slice(r,r+t.length)===t},ic=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(!y(t)||!y(r)||!y(n)||!y(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 sc=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 ac(a,e,t,r,n,i,s){const l=new rc,h=tt(new Uint8Array(a)).trim().replace(nc,`
|
|
`).split(`
|
|
`),c=[],p=e?os(e.baseTime,e.timescale):0;let g="00:00.000",T=0,R=0,k,re=!0;l.oncue=function(ee){const Ae=t[r];let Oe=t.ccOffset;const Ue=(T-p)/9e4;if(Ae!=null&&Ae.new&&(R!==void 0?Oe=t.ccOffset=Ae.start:sc(t,r,Ue)),Ue){if(!e){k=new Error("Missing initPTS for VTT MPEGTS");return}Oe=Ue-t.presentationOffset}const rt=ee.endTime-ee.startTime,ct=Di((ee.startTime+Oe-R)*9e4,n*9e4)/9e4;ee.startTime=Math.max(ct,0),ee.endTime=Math.max(ct+rt,0);const Pt=ee.text.trim();ee.text=decodeURIComponent(encodeURIComponent(Pt)),ee.id||(ee.id=rl(ee.startTime,ee.endTime,Pt)),ee.endTime>0&&c.push(ee)},l.onparsingerror=function(ee){k=ee},l.onflush=function(){if(k){s(k);return}i(c)},h.forEach(ee=>{if(re)if(tl(ee,"X-TIMESTAMP-MAP=")){re=!1,ee.slice(16).split(",").forEach(Ae=>{tl(Ae,"LOCAL:")?g=Ae.slice(6):tl(Ae,"MPEGTS:")&&(T=parseInt(Ae.slice(7)))});try{R=ic(g)/1e3}catch(Ae){k=Ae}return}else ee===""&&(re=!1);l.parse(ee+`
|
|
`)}),l.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)$/,oc={left:"start",center:"center",right:"end",start:"start",end:"end"};function eu(a,e,t,r){const n=ce(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(l=>tt(l)),s=Ui(e.baseTime,1,e.timescale);try{i.forEach(l=>t(lc(l,s)))}catch(l){r(l)}}function lc(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((g,T)=>(g[T]=n.getAttribute(`ttp:${T}`)||i[T],g),{}),l=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,g=>{const T=ru(g,l);if(!T||!g.hasAttribute("begin"))return null;const R=al(g.getAttribute("begin"),s),k=al(g.getAttribute("dur"),s);let re=al(g.getAttribute("end"),s);if(R===null)throw nu(g);if(re===null){if(k===null)throw nu(g);re=R+k}const ee=new Jo(R-e,re-e,T);ee.id=rl(ee.startTime,ee.endTime,ee.text);const Ae=c[g.getAttribute("region")],Oe=h[g.getAttribute("style")],Ue=uc(Ae,Oe,h),{textAlign:rt}=Ue;if(rt){const ct=oc[rt];ct&&(ee.lineAlign=ct),ee.align=rt}return b(ee,Ue),ee}).filter(g=>g!==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 uc(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((l,h)=>{const c=sl(e,r,h)||sl(a,r,h)||sl(n,r,h);return c&&(l[h]=c),l},{})}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=cc(a,e):Jl.test(a)&&(t=hc(a,e))),t}function cc(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 hc(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 xo{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 dc{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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new xo(this,"textTrack1"),t=new xo(this,"textTrack2"),r=new xo(this,"textTrack3"),n=new xo(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 l=i.length;l--;){const h=i[l],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 l=this.captionsTracks[e];this.Cues.newCue(l,t,r,n)}else{const l=this.Cues.newCue(null,t,r,n);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){const{unparsedVttFrags:l}=this;r===q.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(h=>{this.initPTS[h.frag.cc]?this.onFragLoaded(m.FRAG_LOADED,h):this.hls.trigger(m.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],l=this.getExistingTrack(i,s);if(l)r[e]=l,_a(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(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const r=!!t.transferMedia;if(this.media=null,r)return;const{captionsTracks:n}=this;Object.keys(n).forEach(i=>{_a(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++)_a(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,l=s?go(s.textTracks):null;if(this.tracks.forEach((h,c)=>{let p;if(l){let g=null;for(let T=0;T<l.length;T++)if(l[T]&&su(l[T],h)){g=l[T],l[T]=null;break}g&&(p=g)}if(p)_a(p);else{const g=iu(h);p=this.createTextTrack(g,h.name,h.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const h=l.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(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(m.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===q.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:h,sn:c}=t.frag,p=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(c!==l+1||c===l&&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===q.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=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),l&&l.textCodec===nl?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;eu(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[r.cc]&&l===-1){s.push(e);return}const h=this.hls,c=(t=r.initSegment)!=null&&t.data?St(r.initSegment.data,new Uint8Array(n)).buffer:n;ac(c,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,p=>{this._appendCues(p,r.level),h.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},p=>{const g=p.message==="Missing initPTS for VTT MPEGTS";g?s.push(e):this._fallbackToIMSC1(r,n),h.logger.log(`Failed to parse VTT cue: ${p}`),!(g&&l>r.cc)&&h.trigger(m.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(m.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===q.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:n}=t;if(!(r.type===q.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 l=this.extractCea608Data(s);this.cea608Parser1.addData(n[i].pts,l[0]),this.cea608Parser2.addData(n[i].pts,l[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:l}=this;Object.keys(l).forEach(h=>Yo(l[h],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(h=>Yo(l[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++],l=127&e[n++],h=127&e[n++];if(l===0&&h===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),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 pc=/\s/,mc={newCue(a,e,t,r){const n=[];let i,s,l,h,c;const p=self.VTTCue||self.TextTrackCue;for(let T=0;T<r.rows.length;T++)if(i=r.rows[T],l=!0,h=0,c="",!i.isEmpty()){var g;for(let re=0;re<i.chars.length;re++)pc.test(i.chars[re].uchar)&&l?h++:(c+=i.chars[re].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const R=ql(c.trim()),k=rl(e,t,R);a!=null&&(g=a.cues)!=null&&g.getCueById(k)||(s=new p(e,t,R),s.id=k,s.line=T+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((T,R)=>T.line==="auto"||R.line==="auto"?0:T.line>8&&R.line>8?R.line-T.line:T.line-R.line),n.forEach(T=>Ul(a,T))),n}};function gc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const vc=/(\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||xc,this.controller=new self.AbortController,this.stats=new A}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=_c(e,this.controller.signal),s=e.responseType==="arraybuffer",l=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&&y(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(g=>{var T;this.response=this.loader=g;const R=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-(R-n.loading.start)),!g.ok){const{status:re,statusText:ee}=g;throw new Ec(ee||"fetch, bad network response",re,g)}n.loading.first=R,n.total=bc(g.headers)||n.total;const k=(T=this.callbacks)==null?void 0:T.onProgress;return k&&y(t.highWaterMark)?this.loadProgressively(g,n,e,t.highWaterMark,k):s?g.arrayBuffer():e.responseType==="json"?g.json():g.text()}).then(g=>{var T,R;const k=this.response;if(!k)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const re=g[l];re&&(n.loaded=n.total=re);const ee={url:k.url,data:g,code:k.status},Ae=(T=this.callbacks)==null?void 0:T.onProgress;Ae&&!y(t.highWaterMark)&&Ae(n,e,g,k),(R=this.callbacks)==null||R.onSuccess(ee,n,e,k)}).catch(g=>{var T;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const R=g&&g.code||0,k=g?g.message:null;(T=this.callbacks)==null||T.onError({code:R,text:k},e,g?g.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,l=e.body.getReader(),h=()=>l.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,g=p.length;return t.loaded+=g,g<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 _c(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(b({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function yc(a){const e=vc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function bc(a){const e=a.get("Content-Range");if(e){const r=yc(e);if(y(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function xc(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 Sc=/^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 A,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 l;(l=this.callbacks)==null||l.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 l in n)e.setRequestHeader(l,n[l]);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&&y(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 k=p!=null?p:t.response;if(k!=null){var s,l;r.loading.end=Math.max(self.performance.now(),r.loading.first);const re=t.responseType==="arraybuffer"?k.byteLength:k.length;r.loaded=r.total=re,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const ee=(s=this.callbacks)==null?void 0:s.onProgress;ee&&ee(r,e,k,t);const Ae={url:t.responseURL,data:k,code:c};(l=this.callbacks)==null||l.onSuccess(Ae,r,e,t);return}}const g=i.loadPolicy.errorRetry,T=r.retry,R={url:e.url,data:void 0,code:c};if(Bn(g,T,!1,R))this.retry(g);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(Bn(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=Kr(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&&Sc.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 wc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Tc=C(C({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:lu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:qr,bufferController:Ru,capLevelController:jo,errorController:Tn,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:Ki,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:wc},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},Ac()),{},{subtitleStreamController:U0,subtitleTrackController:L0,timelineController:dc,audioStreamController:Au,audioTrackController:Cu,emeController:va,cmcdController:w0,contentSteeringController:A0,interstitialsController:$0});function Ac(){return{cueHandler:mc,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 Cc(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 l=`${s==="level"?"playlist":s}LoadPolicy`,h=e[l]===void 0,c=[];i.forEach(p=>{const g=`${s}Loading${p}`,T=e[g];if(T!==void 0&&h){c.push(g);const R=r[l].default;switch(e[l]={default:R},p){case"TimeOut":R.maxLoadTimeMs=T,R.maxTimeToFirstByteMs=T;break;case"MaxRetry":R.errorRetry.maxNumRetry=T,R.timeoutRetry.maxNumRetry=T;break;case"RetryDelay":R.errorRetry.retryDelayMs=T,R.timeoutRetry.retryDelayMs=T;break;case"MaxRetryTimeout":R.errorRetry.maxRetryDelayMs=T,R.timeoutRetry.maxRetryDelayMs=T;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${xt(e[l])}`)}),C(C({},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):gc()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const Eo=2,Ic=.1,Rc=.05,Lc=100;class kc 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(m.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(Lc),this.mediaSource=t.mediaSource;const r=this.media=t.media;oi(r,"playing",this.onMediaPlaying),oi(r,"waiting",this.onMediaWaiting),oi(r,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:r}=this;r&&(vi(r,"playing",this.onMediaPlaying),vi(r,"waiting",this.onMediaWaiting),vi(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:l}=s,h=this.seeking&&!l,c=!this.seeking&&l,p=s.paused&&!l||s.ended||s.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(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(m.MEDIA_ENDED,{stalled:!1}));return}if(!br.getBuffered(s).length){this.nudgeRetry=0;return}const g=br.bufferInfo(s,e,0),T=g.nextStart||0,R=this.fragmentTracker;if(l&&R&&this.hls){const Pt=uu(this.hls.inFlightFragments,e),ft=g.len>Eo,It=!T||Pt||T-e>Eo&&!R.getPartialFragment(e);if(ft||It)return;this.moved=!1}const k=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&R){if(!(g.len>0)&&!T)return;const ft=Math.max(T,g.start||0)-e,Ct=!!(k!=null&&k.live)?k.targetduration*2:Eo,_t=So(e,R);if(ft>0&&(ft<=Ct||_t)){s.paused||this._trySkipBufferHole(_t);return}}const re=i.detectStallWithCurrentTimeMs,ee=self.performance.now(),Ae=this.waiting;let Oe=this.stalled;if(Oe===null)if(Ae>0&&ee-Ae<re)Oe=this.stalled=Ae;else{this.stalled=ee;return}const Ue=ee-Oe;if(!l&&(Ue>=re||Ae)&&this.hls){var rt;if(((rt=this.mediaSource)==null?void 0:rt.readyState)==="ended"&&!(k!=null&&k.live)&&Math.abs(e-((k==null?void 0:k.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(g),!this.media||!this.hls)return}const ct=br.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(ct,Ue,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(m.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var r;const n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&n&&n.length>1&&e>n.end(0)){const i=br.bufferedInfo(br.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=br.timeRangesToArray(n),l=br.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const h=br.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((h===-1||h>l)&&p-c<1&&e-c<2){const g=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${h}`);this.warn(g.message),this.media.currentTime+=1e-6;let T=So(e,this.fragmentTracker);T&&"fragment"in T?T=T.fragment:T||(T=void 0);const R=br.bufferInfo(this.media,e,0);this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:g,reason:g.message,frag:T,buffer:R.len,bufferInfo:R})}}}}}_tryFixBufferStall(e,t,r){var n,i;const{fragmentTracker:s,media:l}=this,h=(n=this.hls)==null?void 0:n.config;if(!l||!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 g=e.buffered,T=this.adjacentTraversal(e,r);(g&&g.length>1&&e.len>h.maxBufferHole||e.nextStart&&(e.nextStart-r<h.maxBufferHole||T))&&(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,q.MAIN),s=r.getFragAtPos(n,q.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 (${xt(e)})`);this.warn(s.message),t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.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,l=br.bufferInfo(n,s,0),h=s<l.start?l.start:l.nextStart;if(h&&this.hls){const p=l.len<=i.maxBufferHole,g=l.len>0&&l.len<1&&n.readyState<3,T=h-s;if(T>0&&(p||g)){if(T>i.maxBufferHole){let k=!1;if(s===0){const re=r.getAppendedFrag(0,q.MAIN);re&&h<re.end&&(k=!0)}if(!k&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,h))return 0;let ee=!1,Ae=e.end;for(;Ae<h;){const Oe=So(Ae,r);if(Oe)Ae+=Oe.duration;else{ee=!0;break}}if(ee)return 0}}const R=Math.max(h+Rc,s+Ic);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${R}`),this.moved=!0,n.currentTime=R,!(e!=null&&e.gap)){const k=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${R}`),re={type:pe.MEDIA_ERROR,details:H.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:k,reason:k.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?re.part=e:re.frag=e),this.hls.trigger(m.ERROR,re)}return R}}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 l=s+(n+1)*i.nudgeOffset,h=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(h.message),r.currentTime=l,t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.BUFFER_NUDGE_ON_STALL,error:h,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.BUFFER_STALLED_ERROR,error:l,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 Ft.IDLE:case Ft.STOPPED:case Ft.ENDED:case Ft.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,q.MAIN)||e.getPartialFragment(a)}const Pc=.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,xt(n?C({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 Oc{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(m.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var r;this.media=t.media,((r=t.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){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&&_a(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 l=0;l<i.length;l++){const h=i[l].type;if(h===li.emsg&&!r||!n)continue;const c=Ma(i[l].data),p=i[l].pts;let g=p+i[l].duration;g>wo&&(g=wo),g-p<=0&&(g=p+Pc);for(let R=0;R<c.length;R++){const k=c[R];if(!no(k)){this.updateId3CueEnds(p,h);const re=ul(s,p,g,k,h);re&&this.id3Track.addCue(re)}}}}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:l,enableID3MetadataCues:h}}=s;if(i&&(l||h)){let c;n==="audio"?c=p=>p.type===li.audioId3&&h:n==="video"?c=p=>p.type===li.emsg&&l:c=p=>p.type===li.audioId3&&h||p.type===li.emsg&&l,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 l=ll();if(r&&n&&!s){const{fragmentStart:re,fragmentEnd:ee}=e;let Ae=this.assetCue;Ae?(Ae.startTime=re,Ae.endTime=ee):l&&(Ae=this.assetCue=ul(l,re,ee,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Ae&&(Ae.id=r,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Ae),Ae.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:h}=this,{dateRanges:c}=e,p=Object.keys(c);let g=this.dateRangeCuesAppended;if(h&&t){var T;if((T=h.cues)!=null&&T.length){const re=Object.keys(g).filter(ee=>!p.includes(ee));for(let ee=re.length;ee--;){var R;const Ae=re[ee],Oe=(R=g[Ae])==null?void 0:R.cues;delete g[Ae],Oe&&Object.keys(Oe).forEach(Ue=>{const rt=Oe[Ue];if(rt){rt.removeEventListener("enter",this.onEventCueEnter);try{h.removeCue(rt)}catch(ct){}}})}}else g=this.dateRangeCuesAppended={}}const k=e.fragments[e.fragments.length-1];if(!(p.length===0||!y(k==null?void 0:k.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let re=0;re<p.length;re++){const ee=p[re],Ae=c[ee],Oe=Ae.startTime,Ue=g[ee],rt=(Ue==null?void 0:Ue.cues)||{};let ct=(Ue==null?void 0:Ue.durationKnown)||!1,Pt=wo;const{duration:ft,endDate:It}=Ae;if(It&&ft!==null)Pt=Oe+ft,ct=!0;else if(Ae.endOnNext&&!ct){const _t=p.reduce((Nt,rr)=>{if(rr!==Ae.id){const lr=c[rr];if(lr.class===Ae.class&&lr.startDate>Ae.startDate&&(!Nt||Ae.startDate<Nt.startDate))return lr}return Nt},null);_t&&(Pt=_t.startTime,ct=!0)}const Ct=Object.keys(Ae.attr);for(let _t=0;_t<Ct.length;_t++){const Nt=Ct[_t];if(!si(Nt))continue;const rr=rt[Nt];if(rr)ct&&!(Ue!=null&&Ue.durationKnown)?rr.endTime=Pt:Math.abs(rr.startTime-Oe)>.01&&(rr.startTime=Oe,rr.endTime=Pt);else if(l){let lr=Ae.attr[Nt];Li(Nt)&&(lr=N(lr));const ur=ul(l,Oe,Pt,{key:Nt,data:lr},li.dateRange);ur&&(ur.id=ee,this.id3Track.addCue(ur),rt[Nt]=ur,s&&(Nt==="X-ASSET-LIST"||Nt==="X-ASSET-URL")&&ur.addEventListener("enter",this.onEventCueEnter))}}g[ee]={cues:rt,dateRange:Ae,durationKnown:ct}}}}}class Mc{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 l=this.targetLatency;if(l===null)return;const h=n-l,c=Math.min(this.maxLatency,l+r.targetduration);if(h<c&&h>.05&&this.forwardBufferLength>1){const g=Math.min(2,Math.max(1,s)),T=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20,R=Math.min(g,Math.max(1,T));this.changeMediaPlaybackRate(t,R)}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:l}=this.config,h=this.hls.userConfig;let c=l&&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,l=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var r;t.details===H.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 Bc 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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const r=this.hls.config.preferManagedMediaSource,n=[],i={},s={};let l=!1,h=!1,c=!1;t.levels.forEach(p=>{const g=p.attrs;let{audioCodec:T,videoCodec:R}=p;T&&(p.audioCodec=T=de(T,r)||void 0),R&&(R=p.videoCodec=ar(R));const{width:k,height:re,unknownCodecs:ee}=p,Ae=(ee==null?void 0:ee.length)||0;if(l||(l=!!(k&&re)),h||(h=!!R),c||(c=!!T),Ae||T&&!this.isAudioSupported(T)||R&&!this.isVideoSupported(R)){this.log(`Some or all CODECS not supported "${g.CODECS}"`);return}const{CODECS:Oe,"FRAME-RATE":Ue,"HDCP-LEVEL":rt,"PATHWAY-ID":ct,RESOLUTION:Pt,"VIDEO-RANGE":ft}=g,Ct=`${`${ct||"."}-`}${p.bitrate}-${Pt}-${Ue}-${Oe}-${ft}-${rt}`;if(i[Ct])if(i[Ct].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const _t=s[Ct]+=1;p.attrs["PATHWAY-ID"]=new Array(_t+1).join(".");const Nt=this.createLevel(p);i[Ct]=Nt,n.push(Nt)}else i[Ct].addGroupId("audio",g.AUDIO),i[Ct].addGroupId("text",g.SUBTITLES);else{const _t=this.createLevel(p);i[Ct]=_t,s[Ct]=1,n.push(_t)}}),this.filterAndSortMediaOptions(n,t,l,h,c)}createLevel(e){const t=new Rr(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=zt(n,[])}return t}isAudioSupported(e){return Ne(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ne(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,i){var s;let l=[],h=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((r||n)&&i&&(c=c.filter(({videoCodec:Oe,videoRange:Ue,width:rt,height:ct})=>(!!Oe||!!(rt&&ct))&&vn(Ue))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let Oe="no level with compatible codecs found in manifest",Ue=Oe;t.levels.length&&(Ue=`one or more CODECS in variant not supported: ${xt(t.levels.map(ct=>ct.attrs.CODECS).filter((ct,Pt,ft)=>ft.indexOf(ct)===Pt))}`,this.warn(Ue),Oe+=` (${Ue})`);const rt=new Error(Oe);this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:H.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:rt,reason:Ue})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(Oe=>!Oe.audioCodec||this.isAudioSupported(Oe.audioCodec)),hu(l)),t.subtitles&&(h=t.subtitles,hu(h));const g=c.slice(0);c.sort((Oe,Ue)=>{if(Oe.attrs["HDCP-LEVEL"]!==Ue.attrs["HDCP-LEVEL"])return(Oe.attrs["HDCP-LEVEL"]||"")>(Ue.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&Oe.height!==Ue.height)return Oe.height-Ue.height;if(Oe.frameRate!==Ue.frameRate)return Oe.frameRate-Ue.frameRate;if(Oe.videoRange!==Ue.videoRange)return Tr.indexOf(Oe.videoRange)-Tr.indexOf(Ue.videoRange);if(Oe.videoCodec!==Ue.videoCodec){const rt=Z(Oe.videoCodec),ct=Z(Ue.videoCodec);if(rt!==ct)return ct-rt}if(Oe.uri===Ue.uri&&Oe.codecSet!==Ue.codecSet){const rt=be(Oe.codecSet),ct=be(Ue.codecSet);if(rt!==ct)return ct-rt}return Oe.averageBitrate!==Ue.averageBitrate?Oe.averageBitrate-Ue.averageBitrate:0});let T=g[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==g.length)){for(let Oe=0;Oe<g.length;Oe++)if(g[Oe].pathwayId===c[0].pathwayId){T=g[Oe];break}}this._levels=c;for(let Oe=0;Oe<c.length;Oe++)if(c[Oe]===T){var R;this._firstLevel=Oe;const Ue=T.bitrate,rt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${Ue}`),((R=this.hls.userConfig)==null?void 0:R.abrEwmaDefaultEstimate)===void 0){const ct=Math.min(Ue,this.hls.config.abrEwmaDefaultEstimateMax);ct>rt&&rt===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=ct)}break}const k=i&&!n,re=this.hls.config,ee=!!(re.audioStreamController&&re.audioTrackController),Ae={levels:c,audioTracks:l,subtitleTracks:h,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:ee&&!k&&l.some(Oe=>!!Oe.url)};p.end=performance.now(),this.hls.trigger(m.MANIFEST_PARSED,Ae)}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"),g=e<0;if(this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:H.LEVEL_SWITCH_ERROR,level:e,fatal:g,error:p,reason:p.message}),g)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],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&n&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} 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(m.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===ie.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===q.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 l;this.warn(`Invalid level index ${n}`),(l=t.deliveryDirectives)!=null&&l.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,l=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:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${r}`),this.hls.trigger(m.LEVEL_LOADING,{url:r,level:n,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const r=this._levels.filter((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(l=>l.level=-1)),!1));ai(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const n=r.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(m.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(m.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function hu(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function du(){return self.SourceBuffer||self.WebKitSourceBuffer}function fu(){if(!Ce())return!1;const e=du();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Fc(){if(!fu())return!1;const a=Ce();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(z(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(z(e,"audio"))))}function Nc(){var a;const e=du();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $c=100;class Uc extends Ks{constructor(e,t,r){super(e,t,r,"stream-controller",q.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||!y(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(n,i,q.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(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval($c),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=Ft.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Ft.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Ft.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=Ft.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Ft.IDLE;break}break}case Ft.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Ft.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],l=this.getMainFwdBufferInfo();if(l===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(l,h)){const re={};this.altAudio===2&&(re.type="video"),this.hls.trigger(m.BUFFER_EOS,re),this.state=Ft.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===Ft.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Ft.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,g=this.getMaxBufferLength(s.maxBitrate);if(p>=g)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const T=this.backtrackFragment?this.backtrackFragment.start:l.end;let R=this.getNextFragment(T,c);if(this.couldBacktrack&&!this.fragPrevious&&R&&Be(R)&&this.fragmentTracker.getState(R)!==Jr.OK){var k;const ee=((k=this.backtrackFragment)!=null?k:R).sn-c.startSN,Ae=c.fragments[ee-1];Ae&&R.cc===Ae.cc&&(R=Ae,this.fragmentTracker.removeFragment(Ae))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(R&&this.isLoopLoading(R,T)){if(!R.gap){const ee=this.audioOnly&&!this.altAudio?W.AUDIO:W.VIDEO,Ae=(ee===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ae&&this.afterBufferFlushed(Ae,ee,q.MAIN)}R=this.getNextFragmentLoopLoading(R,c,l,q.MAIN,g)}R&&(R.initSegment&&!R.initSegment.data&&!this.bitrateTest&&(R=R.initSegment),this.loadFragment(R,s,T))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===Jr.NOT_LOADED||n===Jr.PARTIAL?Be(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,q.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 l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,h=e[l],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 l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const h=l.maxStartPTS?l.maxStartPTS:l.start,c=l.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 Ft.KEY_LOADING:case Ft.FRAG_LOADING:case Ft.FRAG_LOADING_WAITING_RETRY:case Ft.PARSING:case Ft.PARSED:this.state=Ft.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;oi(r,"playing",this.onMediaPlaying),oi(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:r}=this;r&&(vi(r,"playing",this.onMediaPlaying),vi(r,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(m.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let r=!1,n=!1;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&&!Nc(),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!==Ft.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=Ft.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:i}=this,s=t.level,l=t.details,h=l.totalduration;if(!n){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${h}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Ft.FRAG_LOADING||this.state===Ft.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let g=0;if(l.live||(r=c.details)!=null&&r.live){var T;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;g=this.alignPlaylists(l,c.details,(T=this.levelLastLoaded)==null?void 0:T.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,g),this.hls.trigger(m.LEVEL_UPDATED,{details:l,level:s}),this.state===Ft.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Ft.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,h=i>=s-t.maxFragLookUpTolerance&&i<=l;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<l-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: ${l}, reset currentTime to : ${n.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const g=br.bufferInfo(r,n,0);if(!((c=g.buffered)!=null&&c.length)){r.currentTime=n;return}if(g.start<=i){r.currentTime=n;return}const{nextStart:R}=br.bufferedInfo(g.buffered,i,0);R&&(r.currentTime=R)}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 l=s[r.level];if(!l){this.warn(`Level ${r.level} not found on progress`);return}const h=l.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=l.videoCodec,p=h.PTSKnown||!h.live,g=(t=r.initSegment)==null?void 0:t.data,T=this._getAudioCodec(l),R=this.transmuxer=this.transmuxer||new vl(this.hls,q.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),k=n?n.index:-1,re=k!==-1,ee=new fi(r.level,r.sn,r.stats.chunkCount,i.byteLength,k,re),Ae=this.initPTS[r.cc];R.push(i,g,T,c,r,n,h.totalduration,p,ee,Ae)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio!==0;if(Vr(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(m.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(m.AUDIO_TRACK_SWITCHED,t)}),r.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(m.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=Vr(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 l in r){const h=r[l];if(h.id==="main"){if(i=l,n=h,l==="video"){const c=r[l];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===q.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===Ft.PARSED&&(this.state=Ft.IDLE);return}const l=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),Be(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const s=this.media;s&&(!this._hasEnoughToStart&&br.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=Ft.ERROR;return}switch(t.details){case H.FRAG_GAP:case H.FRAG_PARSING_ERROR:case H.FRAG_DECRYPT_ERROR:case H.FRAG_LOAD_ERROR:case H.FRAG_LOAD_TIMEOUT:case H.KEY_LOAD_ERROR:case H.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(q.MAIN,t);break;case H.LEVEL_LOAD_ERROR:case H.LEVEL_LOAD_TIMEOUT:case H.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Ft.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===ie.LEVEL&&(this.state=Ft.IDLE);break;case H.BUFFER_ADD_CODEC_ERROR:case H.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case H.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 H.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Ft.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==W.AUDIO||!this.altAudio){const r=(t===W.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,q.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=br.getBuffered(e),l=s.length?s.start(0):0,h=l-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 ${l}`),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=Ft.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(m.FRAG_LOADED,r),i.bitrateTest=!1}).catch(r=>{this.state===Ft.STOPPED||this.state===Ft.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:l,part:h,level:c}=s,{video:p,text:g,id3:T,initSegment:R}=n,{details:k}=c,re=this.altAudio?void 0:n.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=Ft.PARSING,R){const ee=R.tracks;if(ee){const rt=l.initSegment||l;if(this.unhandledEncryptionError(R,l))return;this._bufferInitSegment(c,ee,rt,i),r.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:rt,id:t,tracks:ee})}const Ae=R.initPTS,Oe=R.timescale,Ue=this.initPTS[l.cc];if(y(Ae)&&(!Ue||Ue.baseTime!==Ae||Ue.timescale!==Oe)){const rt=R.trackId;this.initPTS[l.cc]={baseTime:Ae,timescale:Oe,trackId:rt},r.trigger(m.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Ae,timescale:Oe,trackId:rt})}}if(p&&k){re&&p.type==="audiovideo"&&this.logMuxedErr(l);const ee=k.fragments[l.sn-1-k.startSN],Ae=l.sn===k.startSN,Oe=!ee||l.cc>ee.cc;if(n.independent!==!1){const{startPTS:Ue,endPTS:rt,startDTS:ct,endDTS:Pt}=p;if(h)h.elementaryStreams[p.type]={startPTS:Ue,endPTS:rt,startDTS:ct,endDTS:Pt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!Oe&&(this.couldBacktrack=!0),p.dropped&&p.independent){const ft=this.getMainFwdBufferInfo(),It=(ft?ft.end:this.getLoadPosition())+this.config.maxBufferHole,Ct=p.firstKeyFramePTS?p.firstKeyFramePTS:Ue;if(!Ae&&It<Ct-this.config.maxBufferHole&&!Oe){this.backtrack(l);return}else Oe&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,rt,l.start,Pt,!0)}else Ae&&Ue-(k.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,Ue,rt,ct,Pt),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,h,i,Ae||Oe)}else if(Ae||Oe)l.gap=!0;else{this.backtrack(l);return}}if(re){const{startPTS:ee,endPTS:Ae,startDTS:Oe,endDTS:Ue}=re;h&&(h.elementaryStreams[W.AUDIO]={startPTS:ee,endPTS:Ae,startDTS:Oe,endDTS:Ue}),l.setElementaryStreamInfo(W.AUDIO,ee,Ae,Oe,Ue),this.bufferFragmentData(re,l,h,i)}if(k&&T!=null&&T.samples.length){const ee={id:t,frag:l,details:k,samples:T.samples};r.trigger(m.FRAG_PARSING_METADATA,ee)}if(k&&g){const ee={id:t,frag:l,details:k,samples:g.samples};r.trigger(m.FRAG_PARSING_USERDATA,ee)}}logMuxedErr(e){this.warn(`${Be(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,r,n){if(this.state!==Ft.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:l}=t;if(i){const c=e.audioCodec;let p=$t(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const g=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const T=i.metadata;T&&"channelCount"in T&&(T.channelCount||1)!==1&&g.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&g.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=q.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=q.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}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const h=Object.keys(t);if(h.length){if(this.hls.trigger(m.BUFFER_CODECS,t),!this.hls)return;h.forEach(c=>{const g=t[c].initSegment;g!=null&&g.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:c,data:g,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,q.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=Ft.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(br.isBuffered(e,r)?t=this.getAppendedFrag(r):br.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(m.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(m.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 y(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(y(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?Zr(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 zc extends te{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=H.KEY_LOAD_ERROR,r,n,i){return new Pr({type:pe.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&&(!Be(e)||!Be(s)||e.sn<s.sn)||!r&&n==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const h=wi(l);if(h)return this.emeController.getKeySystemAccess([h])})}if(this.config.requireKeySystemAccessOnStart){const n=ki(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,H.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,H.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=cl(i);let h=this.keyIdToKeyInfo[l];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:g}=p;return i.key=g.decryptdata.key,{frag:e,keyInfo:g}})}switch(this.log(`${this.keyIdToKeyInfo[l]?"Rel":"L"}oading${i.keyId?" keyId: "+Q(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),h=this.keyIdToKeyInfo[l]={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,H.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=et(t.initSegment.data);if(s.length){let l=s[0];l.some(h=>h!==0)?(this.log(`Using keyId found in init segment ${Q(l)}`),yi.setKeyIdForUri(e.decryptdata.uri,l)):(l=yi.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${Q(l)}`)),e.decryptdata.keyId=l}}if(!e.decryptdata.keyId&&!Be(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,l)=>{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},g={onSuccess:(T,R,k,re)=>{const{frag:ee,keyInfo:Ae}=k,Oe=cl(Ae.decryptdata);if(!ee.decryptdata||Ae!==this.keyIdToKeyInfo[Oe])return l(this.createKeyLoadError(ee,H.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),re));Ae.decryptdata.key=ee.decryptdata.key=new Uint8Array(T.data),ee.keyLoader=null,Ae.loader=null,s({frag:ee,keyInfo:Ae})},onError:(T,R,k,re)=>{this.resetLoader(R),l(this.createKeyLoadError(t,H.KEY_LOAD_ERROR,new Error(`HTTP Error ${T.code} loading key ${T.text}`),k,C({url:h.url,data:void 0},T)))},onTimeout:(T,R,k)=>{this.resetLoader(R),l(this.createKeyLoadError(t,H.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),k))},onAbort:(T,R,k)=>{this.resetLoader(R),l(this.createKeyLoadError(t,H.INTERNAL_ABORTED,new Error("key loading aborted"),k))}};i.load(h,p,g)})}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!==zr.FAIRPLAY){const e=a.keyId;if(e)return Q(e)}return a.uri}function pu(a){const{type:e}=a;switch(e){case ie.AUDIO_TRACK:return q.AUDIO;case ie.SUBTITLE_TRACK:return q.SUBTITLE;default:return q.MAIN}}function hl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Gc{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,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:ie.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:h}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:ie.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:h})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:l}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ie.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:l}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:ie.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const r=this.loaders[ie.LEVEL];if(r){const n=r.context;n&&!t.levels.some(i=>i===n.levelOrTrack)&&(r.abort(),delete this.loaders[ie.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===ie.MANIFEST?i=r.manifestLoadPolicy.default:i=b({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),y((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ie.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ie.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ie.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,g=c.targetduration;if(p&&g){const T=Math.max(p*3,g*.8)*1e3;i=b({},i,{maxTimeToFirstByteMs:Math.min(T,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(T,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},h={onSuccess:(c,p,g,T)=>{const R=this.getInternalLoader(g);this.resetInternalLoader(g.type);const k=c.data;p.parsing.start=performance.now(),Ai.isMediaPlaylist(k)||g.type!==ie.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,g,T||null,R):this.handleMasterPlaylist(c,p,g,T)},onError:(c,p,g,T)=>{this.handleNetworkError(p,g,!1,c,T)},onTimeout:(c,p,g)=>{this.handleNetworkError(p,g,!0,void 0,c)}};n.load(e,l,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,l=hl(e,r),h=Ai.parseMasterPlaylist(s,l);if(h.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,r,h.playlistParsingError,n,t);return}const{contentSteering:c,levels:p,sessionData:g,sessionKeys:T,startTimeOffset:R,variableList:k}=h;this.variableList=k,p.forEach(Oe=>{const{unknownCodecs:Ue}=Oe;if(Ue){const{preferManagedMediaSource:rt}=this.hls.config;let{audioCodec:ct,videoCodec:Pt}=Oe;for(let ft=Ue.length;ft--;){const It=Ue[ft];Ne(It,"audio",rt)?(Oe.audioCodec=ct=ct?`${ct},${It}`:It,lt.audio[ct.substring(0,4)]=2,Ue.splice(ft,1)):Ne(It,"video",rt)&&(Oe.videoCodec=Pt=Pt?`${Pt},${It}`:It,lt.video[Pt.substring(0,4)]=2,Ue.splice(ft,1))}}});const{AUDIO:re=[],SUBTITLES:ee,"CLOSED-CAPTIONS":Ae}=Ai.parseMasterPlaylistMedia(s,l,h);re.length&&!re.some(Ue=>!Ue.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"),re.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new xr({}),bitrate:0,url:""})),i.trigger(m.MANIFEST_LOADED,{levels:p,audioTracks:re,subtitles:ee,captions:Ae,contentSteering:c,url:l,stats:t,networkDetails:n,sessionData:g,sessionKeys:T,startTimeOffset:R,variableList:k})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:l,level:h,type:c}=r,p=hl(e,r),g=y(h)?h:y(l)?l:0,T=pu(r),R=Ai.parseLevelPlaylist(e.data,p,g,T,0,this.variableList);if(c===ie.MANIFEST){const k={attrs:new xr({}),bitrate:0,details:R,name:"",url:p};R.requestScheduled=t.loading.start+mn(R,0),s.trigger(m.MANIFEST_LOADED,{levels:[k],audioTracks:[],url:p,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=R,this.handlePlaylistLoaded(R,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:H.MANIFEST_PARSING_ERROR,fatal:t.type===ie.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===ie.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ie.AUDIO_TRACK||e.type===ie.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let h=H.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case ie.MANIFEST:h=r?H.MANIFEST_LOAD_TIMEOUT:H.MANIFEST_LOAD_ERROR,c=!0;break;case ie.LEVEL:h=r?H.LEVEL_LOAD_TIMEOUT:H.LEVEL_LOAD_ERROR,c=!1;break;case ie.AUDIO_TRACK:h=r?H.AUDIO_TRACK_LOAD_TIMEOUT:H.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ie.SUBTITLE_TRACK:h=r?H.SUBTITLE_TRACK_LOAD_TIMEOUT:H.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const g={type:pe.NETWORK_ERROR,details:h,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(n){const T=(t==null?void 0:t.url)||e.url;g.response=C({url:T,data:void 0},n)}this.hls.trigger(m.ERROR,g)}handlePlaylistLoaded(e,t,r,n,i,s){const l=this.hls,{type:h,level:c,levelOrTrack:p,id:g,groupId:T,deliveryDirectives:R}=n,k=hl(t,n),re=pu(n);let ee=typeof n.level=="number"&&re===q.MAIN?c:void 0;const Ae=e.playlistParsingError;if(Ae){if(this.hls.logger.warn(`${Ae} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:H.LEVEL_PARSING_ERROR,fatal:!1,url:k,error:Ae,reason:Ae.message,response:t,context:n,level:ee,parent:re,networkDetails:i,stats:r});return}e.playlistParsingError=null}if(!e.fragments.length){const Oe=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:H.LEVEL_EMPTY_ERROR,fatal:!1,url:k,error:Oe,reason:Oe.message,response:t,context:n,level:ee,parent:re,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 ie.MANIFEST:case ie.LEVEL:if(ee){if(!p)ee=0;else if(p!==l.levels[ee]){const Oe=l.levels.indexOf(p);Oe>-1&&(ee=Oe)}}l.trigger(m.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:ee||0,id:g||0,stats:r,networkDetails:i,deliveryDirectives:R,withoutMultiVariant:h===ie.MANIFEST});break;case ie.AUDIO_TRACK:l.trigger(m.AUDIO_TRACK_LOADED,{details:e,track:p,id:g||0,groupId:T||"",stats:r,networkDetails:i,deliveryDirectives:R});break;case ie.SUBTITLE_TRACK:l.trigger(m.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:g||0,groupId:T||"",stats:r,networkDetails:i,deliveryDirectives:R});break}}}class Bs{static get version(){return Hs}static isMSESupported(){return fu()}static isSupported(){return Fc()}static getMediaSource(){return Ce()}static get Events(){return m}static get MetadataSchema(){return li}static get ErrorTypes(){return pe}static get ErrorDetails(){return H}static get DefaultConfig(){return Bs.defaultConfig?Bs.defaultConfig:Tc}static set DefaultConfig(e){Bs.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 ua,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=Ee(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=Cc(Bs.DefaultConfig,e,t);this.userConfig=e,r.progressive&&Dc(r,t);const{abrController:n,bufferController:i,capLevelController:s,errorController:l,fpsController:h}=r,c=new l(this),p=this.abrController=new n(this),g=new ci(this),T=r.interstitialsController,R=T?this.interstitialsController=new T(this,Bs):null,k=this.bufferController=new i(this,g),re=this.capLevelController=new s(this),ee=new h(this),Ae=new Gc(this),Oe=r.contentSteeringController,Ue=Oe?new Oe(this):null,rt=this.levelController=new Bc(this,Ue),ct=new Oc(this),Pt=new zc(this.config,this.logger),ft=this.streamController=new Uc(this,g,Pt),It=this.gapController=new kc(this,g);re.setStreamController(ft),ee.setStreamController(ft);const Ct=[Ae,rt,ft];R&&Ct.splice(1,0,R),Ue&&Ct.splice(1,0,Ue),this.networkControllers=Ct;const _t=[p,k,It,re,ee,ct,g];this.audioTrackController=this.createController(r.audioTrackController,Ct);const Nt=r.audioStreamController;Nt&&Ct.push(this.audioStreamController=new Nt(this,g,Pt)),this.subtitleTrackController=this.createController(r.subtitleTrackController,Ct);const rr=r.subtitleStreamController;rr&&Ct.push(this.subtititleStreamController=new rr(this,g,Pt)),this.createController(r.timelineController,_t),Pt.emeController=this.emeController=this.createController(r.emeController,_t),this.cmcdController=this.createController(r.cmcdController,_t),this.latencyController=this.createController(Mc,_t),this.coreComponents=_t,Ct.push(c);const lr=c.onErrorOut;typeof lr=="function"&&this.on(m.ERROR,lr,c),this.on(m.MANIFEST_LOADED,Ae.onManifestLoaded,Ae)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===m.ERROR;this.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:H.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(m.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:H.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(m.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(m.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=x.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),!(!this.started||!this.networkControllers));r++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[q.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[q.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[q.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=k0()),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){Xr(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=Lt(t);return kt(e,r,navigator.mediaCapabilities)}}Bs.defaultConfig=void 0},16722:function(Gt,it,S){"use strict";S.d(it,{Z:function(){return q}});const y=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ue=(o,K)=>(!K||o!=="hidden")&&o!=="visible"&&o!=="clip",xe=(o,K)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const M=getComputedStyle(o,null);return ue(M.overflowY,K)||ue(M.overflowX,K)||(b=>{const E=(C=>{if(!C.ownerDocument||!C.ownerDocument.defaultView)return null;try{return C.ownerDocument.defaultView.frameElement}catch(P){return null}})(b);return!!E&&(E.clientHeight<b.scrollHeight||E.clientWidth<b.scrollWidth)})(o)}return!1},pe=(o,K,M,b,E,C,P,ne)=>C<o&&P>K||C>o&&P<K?0:C<=o&&ne<=M||P>=K&&ne>=M?C-o-b:P>K&&ne<M||C<o&&ne>M?P-K+E:0,H=o=>{const K=o.parentElement;return K==null?o.getRootNode().host||null:K},m=(o,K)=>{var M,b,E,C;if(typeof document=="undefined")return[];const{scrollMode:P,block:ne,inline:te,boundary:V,skipOverflowHiddenElements:D}=K,j=typeof V=="function"?V:Xe=>Xe!==V;if(!y(o))throw new TypeError("Invalid target");const O=document.scrollingElement||document.documentElement,F=[];let se=o;for(;y(se)&&j(se);){if(se=H(se),se===O){F.push(se);break}se!=null&&se===document.body&&xe(se)&&!xe(document.documentElement)||se!=null&&xe(se,D)&&F.push(se)}const Ee=(b=(M=window.visualViewport)==null?void 0:M.width)!=null?b:innerWidth,he=(C=(E=window.visualViewport)==null?void 0:E.height)!=null?C:innerHeight,{scrollX:Ce,scrollY:Pe}=window,{height:_e,width:tt,top:Q,right:N,bottom:Y,left:oe}=o.getBoundingClientRect(),{top:ae,right:le,bottom:x,left:A}=(Xe=>{const Ve=window.getComputedStyle(Xe);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(o);let W=ne==="start"||ne==="nearest"?Q-ae:ne==="end"?Y+x:Q+_e/2-ae+x,ge=te==="center"?oe+tt/2-A+le:te==="end"?N+le:oe-A;const Be=[];for(let Xe=0;Xe<F.length;Xe++){const Ve=F[Xe],{height:Ze,width:$e,top:qe,right:je,bottom:Et,left:Qe}=Ve.getBoundingClientRect();if(P==="if-needed"&&Q>=0&&oe>=0&&Y<=he&&N<=Ee&&(Ve===O&&!xe(Ve)||Q>=qe&&Y<=Et&&oe>=Qe&&N<=je))return Be;const wt=getComputedStyle(Ve),Fe=parseInt(wt.borderLeftWidth,10),st=parseInt(wt.borderTopWidth,10),Re=parseInt(wt.borderRightWidth,10),we=parseInt(wt.borderBottomWidth,10);let ce=0,He=0;const Ie="offsetWidth"in Ve?Ve.offsetWidth-Ve.clientWidth-Fe-Re:0,De="offsetHeight"in Ve?Ve.offsetHeight-Ve.clientHeight-st-we:0,L="offsetWidth"in Ve?Ve.offsetWidth===0?0:$e/Ve.offsetWidth:0,J="offsetHeight"in Ve?Ve.offsetHeight===0?0:Ze/Ve.offsetHeight:0;if(O===Ve)ce=ne==="start"?W:ne==="end"?W-he:ne==="nearest"?pe(Pe,Pe+he,he,st,we,Pe+W,Pe+W+_e,_e):W-he/2,He=te==="start"?ge:te==="center"?ge-Ee/2:te==="end"?ge-Ee:pe(Ce,Ce+Ee,Ee,Fe,Re,Ce+ge,Ce+ge+tt,tt),ce=Math.max(0,ce+Pe),He=Math.max(0,He+Ce);else{ce=ne==="start"?W-qe-st:ne==="end"?W-Et+we+De:ne==="nearest"?pe(qe,Et,Ze,st,we+De,W,W+_e,_e):W-(qe+Ze/2)+De/2,He=te==="start"?ge-Qe-Fe:te==="center"?ge-(Qe+$e/2)+Ie/2:te==="end"?ge-je+Re+Ie:pe(Qe,je,$e,Fe,Re+Ie,ge,ge+tt,tt);const{scrollLeft:me,scrollTop:Le}=Ve;ce=J===0?0:Math.max(0,Math.min(Le+ce/J,Ve.scrollHeight-Ze/J+De)),He=L===0?0:Math.max(0,Math.min(me+He/L,Ve.scrollWidth-$e/L+Ie)),W+=Le-ce,ge+=me-He}Be.push({el:Ve,top:ce,left:He})}return Be},ie=o=>o===!1?{block:"end",inline:"nearest"}:(K=>K===Object(K)&&Object.keys(K).length!==0)(o)?o:{block:"start",inline:"nearest"};function q(o,K){if(!o.isConnected||!(E=>{let C=E;for(;C&&C.parentNode;){if(C.parentNode===document)return!0;C=C.parentNode instanceof ShadowRoot?C.parentNode.host:C.parentNode}return!1})(o))return;const M=(E=>{const C=window.getComputedStyle(E);return{top:parseFloat(C.scrollMarginTop)||0,right:parseFloat(C.scrollMarginRight)||0,bottom:parseFloat(C.scrollMarginBottom)||0,left:parseFloat(C.scrollMarginLeft)||0}})(o);if((E=>typeof E=="object"&&typeof E.behavior=="function")(K))return K.behavior(m(o,K));const b=typeof K=="boolean"||K==null?void 0:K.behavior;for(const{el:E,top:C,left:P}of m(o,ie(K))){const ne=C-M.top+M.bottom,te=P-M.left+M.right;E.scroll({top:ne,left:te,behavior:b})}}}}]);
|
|
}()); |