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

1342 lines
1.5 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5238],{70557:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},40001:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},26227:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},41464:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},18785:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},73331:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},15277:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},33853:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},61485:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},47472:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});var m=b(54476),de=b(59301),oe={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"},ve=oe,G=b(7657),g=function(H,k){return de.createElement(G.Z,(0,m.Z)({},H,{ref:k,icon:ve}))},fe=de.forwardRef(g),ee=fe},65030:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return Tt}});var m=b(33885),de=b(42978),oe=b(75931),ve=b(43403),G=b(92310),g=b.n(G),fe=b(29301),ee=b(76846),o=b(96452),H=b(6089),k=b(80402),S=b(34280),w=b(49658),C=b(59301),R=b(54476),q=b(77900),Q=b(8654);function K(Re){var Ce=Re.prefixCls,ce=Re.align,Je=Re.arrow,Le=Re.arrowPos,Ie=Je||{},P=Ie.className,pe=Ie.content,xe=Le.x,He=xe===void 0?0:xe,et=Le.y,ut=et===void 0?0:et,xt=C.useRef();if(!ce||!ce.points)return null;var Lt={position:"absolute"};if(ce.autoArrow!==!1){var Et=ce.points[0],Mt=ce.points[1],Yt=Et[0],jt=Et[1],$t=Mt[0],it=Mt[1];Yt===$t||!["t","b"].includes(Yt)?Lt.top=ut:Yt==="t"?Lt.top=0:Lt.bottom=0,jt===it||!["l","r"].includes(jt)?Lt.left=He:jt==="l"?Lt.left=0:Lt.right=0}return C.createElement("div",{ref:xt,className:g()("".concat(Ce,"-arrow"),P),style:Lt},pe)}function D(Re){var Ce=Re.prefixCls,ce=Re.open,Je=Re.zIndex,Le=Re.mask,Ie=Re.motion;return Le?C.createElement(q.default,(0,R.Z)({},Ie,{motionAppear:!0,visible:ce,removeOnLeave:!0}),function(P){var pe=P.className;return C.createElement("div",{style:{zIndex:Je},className:g()("".concat(Ce,"-mask"),pe)})}):null}var $=C.memo(function(Re){var Ce=Re.children;return Ce},function(Re,Ce){return Ce.cache}),M=$,F=C.forwardRef(function(Re,Ce){var ce=Re.popup,Je=Re.className,Le=Re.prefixCls,Ie=Re.style,P=Re.target,pe=Re.onVisibleChanged,xe=Re.open,He=Re.keepDom,et=Re.fresh,ut=Re.onClick,xt=Re.mask,Lt=Re.arrow,Et=Re.arrowPos,Mt=Re.align,Yt=Re.motion,jt=Re.maskMotion,$t=Re.forceRender,it=Re.getPopupContainer,It=Re.autoDestroy,Rt=Re.portal,ye=Re.zIndex,Ve=Re.onMouseEnter,_=Re.onMouseLeave,A=Re.onPointerEnter,Oe=Re.onPointerDownCapture,N=Re.ready,ae=Re.offsetX,St=Re.offsetY,Ee=Re.offsetR,$e=Re.offsetB,Ge=Re.onAlign,Z=Re.onPrepare,J=Re.stretch,be=Re.targetWidth,Pe=Re.targetHeight,j=typeof ce=="function"?ce():ce,Ye=xe||He,X=(it==null?void 0:it.length)>0,tt=C.useState(!it||!X),Ot=(0,de.Z)(tt,2),Xt=Ot[0],pn=Ot[1];if((0,S.Z)(function(){!Xt&&X&&P&&pn(!0)},[Xt,X,P]),!Xt)return null;var qt="auto",nn={left:"-1000vw",top:"-1000vh",right:qt,bottom:qt};if(N||!xe){var xn,Un=Mt.points,un=Mt.dynamicInset||((xn=Mt._experimental)===null||xn===void 0?void 0:xn.dynamicInset),On=un&&Un[0][1]==="r",en=un&&Un[0][0]==="b";On?(nn.right=Ee,nn.left=qt):(nn.left=ae,nn.right=qt),en?(nn.bottom=$e,nn.top=qt):(nn.top=St,nn.bottom=qt)}var Ut={};return J&&(J.includes("height")&&Pe?Ut.height=Pe:J.includes("minHeight")&&Pe&&(Ut.minHeight=Pe),J.includes("width")&&be?Ut.width=be:J.includes("minWidth")&&be&&(Ut.minWidth=be)),xe||(Ut.pointerEvents="none"),C.createElement(Rt,{open:$t||Ye,getContainer:it&&function(){return it(P)},autoDestroy:It},C.createElement(D,{prefixCls:Le,open:xe,zIndex:ye,mask:xt,motion:jt}),C.createElement(fe.Z,{onResize:Ge,disabled:!xe},function(Pt){return C.createElement(q.default,(0,R.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:$t,leavedClassName:"".concat(Le,"-hidden")},Yt,{onAppearPrepare:Z,onEnterPrepare:Z,visible:xe,onVisibleChanged:function(rn){var An;Yt==null||(An=Yt.onVisibleChanged)===null||An===void 0||An.call(Yt,rn),pe(rn)}}),function(an,rn){var An=an.className,ir=an.style,Ne=g()(Le,An,Je);return C.createElement("div",{ref:(0,Q.sQ)(Pt,Ce,rn),className:Ne,style:(0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)({"--arrow-x":"".concat(Et.x||0,"px"),"--arrow-y":"".concat(Et.y||0,"px")},nn),Ut),ir),{},{boxSizing:"border-box",zIndex:ye},Ie),onMouseEnter:Ve,onMouseLeave:_,onPointerEnter:A,onClick:ut,onPointerDownCapture:Oe},Lt&&C.createElement(K,{prefixCls:Le,arrow:Lt,arrowPos:Et,align:Mt}),C.createElement(M,{cache:!xe&&!et},j))})}))}),ue=F,he=C.forwardRef(function(Re,Ce){var ce=Re.children,Je=Re.getTriggerDOMNode,Le=(0,Q.Yr)(ce),Ie=C.useCallback(function(pe){(0,Q.mH)(Ce,Je?Je(pe):pe)},[Je]),P=(0,Q.x1)(Ie,(0,Q.C4)(ce));return Le?C.cloneElement(ce,{ref:P}):ce}),le=he,Se=C.createContext(null),ke=Se;function De(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function Me(Re,Ce,ce,Je){return C.useMemo(function(){var Le=De(ce!=null?ce:Ce),Ie=De(Je!=null?Je:Ce),P=new Set(Le),pe=new Set(Ie);return Re&&(P.has("hover")&&(P.delete("hover"),P.add("click")),pe.has("hover")&&(pe.delete("hover"),pe.add("click"))),[P,pe]},[Re,Ce,ce,Je])}var Y=b(29194);function B(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ce=arguments.length>2?arguments[2]:void 0;return ce?Re[0]===Ce[0]:Re[0]===Ce[0]&&Re[1]===Ce[1]}function W(Re,Ce,ce,Je){for(var Le=ce.points,Ie=Object.keys(Re),P=0;P<Ie.length;P+=1){var pe,xe=Ie[P];if(B((pe=Re[xe])===null||pe===void 0?void 0:pe.points,Le,Je))return"".concat(Ce,"-placement-").concat(xe)}return""}function re(Re,Ce,ce,Je){return Ce||(ce?{motionName:"".concat(Re,"-").concat(ce)}:Je?{motionName:Je}:null)}function ie(Re){return Re.ownerDocument.defaultView}function se(Re){for(var Ce=[],ce=Re==null?void 0:Re.parentElement,Je=["hidden","scroll","clip","auto"];ce;){var Le=ie(ce).getComputedStyle(ce),Ie=Le.overflowX,P=Le.overflowY,pe=Le.overflow;[Ie,P,pe].some(function(xe){return Je.includes(xe)})&&Ce.push(ce),ce=ce.parentElement}return Ce}function x(Re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?Ce:Re}function E(Re){return x(parseFloat(Re),0)}function V(Re,Ce){var ce=(0,m.Z)({},Re);return(Ce||[]).forEach(function(Je){if(!(Je instanceof HTMLBodyElement||Je instanceof HTMLHtmlElement)){var Le=ie(Je).getComputedStyle(Je),Ie=Le.overflow,P=Le.overflowClipMargin,pe=Le.borderTopWidth,xe=Le.borderBottomWidth,He=Le.borderLeftWidth,et=Le.borderRightWidth,ut=Je.getBoundingClientRect(),xt=Je.offsetHeight,Lt=Je.clientHeight,Et=Je.offsetWidth,Mt=Je.clientWidth,Yt=E(pe),jt=E(xe),$t=E(He),it=E(et),It=x(Math.round(ut.width/Et*1e3)/1e3),Rt=x(Math.round(ut.height/xt*1e3)/1e3),ye=(Et-Mt-$t-it)*It,Ve=(xt-Lt-Yt-jt)*Rt,_=Yt*Rt,A=jt*Rt,Oe=$t*It,N=it*It,ae=0,St=0;if(Ie==="clip"){var Ee=E(P);ae=Ee*It,St=Ee*Rt}var $e=ut.x+Oe-ae,Ge=ut.y+_-St,Z=$e+ut.width+2*ae-Oe-N-ye,J=Ge+ut.height+2*St-_-A-Ve;ce.left=Math.max(ce.left,$e),ce.top=Math.max(ce.top,Ge),ce.right=Math.min(ce.right,Z),ce.bottom=Math.min(ce.bottom,J)}}),ce}function me(Re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ce="".concat(Ce),Je=ce.match(/^(.*)\%$/);return Je?Re*(parseFloat(Je[1])/100):parseFloat(ce)}function ze(Re,Ce){var ce=Ce||[],Je=(0,de.Z)(ce,2),Le=Je[0],Ie=Je[1];return[me(Re.width,Le),me(Re.height,Ie)]}function Xe(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function _e(Re,Ce){var ce=Ce[0],Je=Ce[1],Le,Ie;return ce==="t"?Ie=Re.y:ce==="b"?Ie=Re.y+Re.height:Ie=Re.y+Re.height/2,Je==="l"?Le=Re.x:Je==="r"?Le=Re.x+Re.width:Le=Re.x+Re.width/2,{x:Le,y:Ie}}function Ke(Re,Ce){var ce={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(Je,Le){return Le===Ce?ce[Je]||"c":Je}).join("")}function Qe(Re,Ce,ce,Je,Le,Ie,P){var pe=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Le[Je]||{}}),xe=(0,de.Z)(pe,2),He=xe[0],et=xe[1],ut=C.useRef(0),xt=C.useMemo(function(){return Ce?se(Ce):[]},[Ce]),Lt=C.useRef({}),Et=function(){Lt.current={}};Re||Et();var Mt=(0,H.Z)(function(){if(Ce&&ce&&Re){let Xr=function(li,ui){var Ai=arguments.length>2&&arguments[2]!==void 0?arguments[2]:we,vi=Ye.x+li,Hi=Ye.y+ui,Xi=vi+en,ki=Hi+On,yi=Math.max(vi,Ai.left),$n=Math.max(Hi,Ai.top),lr=Math.min(Xi,Ai.right),Ir=Math.min(ki,Ai.bottom);return Math.max(0,(lr-yi)*(Ir-$n))},Kr=function(){br=Ye.y+Pn,Rn=br+On,gn=Ye.x+bn,Mn=gn+en};var $t,it,It,Rt,ye=Ce,Ve=ye.ownerDocument,_=ie(ye),A=_.getComputedStyle(ye),Oe=A.position,N=ye.style.left,ae=ye.style.top,St=ye.style.right,Ee=ye.style.bottom,$e=ye.style.overflow,Ge=(0,m.Z)((0,m.Z)({},Le[Je]),Ie),Z=Ve.createElement("div");($t=ye.parentElement)===null||$t===void 0||$t.appendChild(Z),Z.style.left="".concat(ye.offsetLeft,"px"),Z.style.top="".concat(ye.offsetTop,"px"),Z.style.position=Oe,Z.style.height="".concat(ye.offsetHeight,"px"),Z.style.width="".concat(ye.offsetWidth,"px"),ye.style.left="0",ye.style.top="0",ye.style.right="auto",ye.style.bottom="auto",ye.style.overflow="hidden";var J;if(Array.isArray(ce))J={x:ce[0],y:ce[1],width:0,height:0};else{var be,Pe,j=ce.getBoundingClientRect();j.x=(be=j.x)!==null&&be!==void 0?be:j.left,j.y=(Pe=j.y)!==null&&Pe!==void 0?Pe:j.top,J={x:j.x,y:j.y,width:j.width,height:j.height}}var Ye=ye.getBoundingClientRect(),X=_.getComputedStyle(ye),tt=X.height,Ot=X.width;Ye.x=(it=Ye.x)!==null&&it!==void 0?it:Ye.left,Ye.y=(It=Ye.y)!==null&&It!==void 0?It:Ye.top;var Xt=Ve.documentElement,pn=Xt.clientWidth,qt=Xt.clientHeight,nn=Xt.scrollWidth,xn=Xt.scrollHeight,Un=Xt.scrollTop,un=Xt.scrollLeft,On=Ye.height,en=Ye.width,Ut=J.height,Pt=J.width,an={left:0,top:0,right:pn,bottom:qt},rn={left:-un,top:-Un,right:nn-un,bottom:xn-Un},An=Ge.htmlRegion,ir="visible",Ne="visibleFirst";An!=="scroll"&&An!==Ne&&(An=ir);var mt=An===Ne,wt=V(rn,xt),ht=V(an,xt),we=An===ir?ht:wt,at=mt?ht:we;ye.style.left="auto",ye.style.top="auto",ye.style.right="0",ye.style.bottom="0";var gt=ye.getBoundingClientRect();ye.style.left=N,ye.style.top=ae,ye.style.right=St,ye.style.bottom=Ee,ye.style.overflow=$e,(Rt=ye.parentElement)===null||Rt===void 0||Rt.removeChild(Z);var Dt=x(Math.round(en/parseFloat(Ot)*1e3)/1e3),bt=x(Math.round(On/parseFloat(tt)*1e3)/1e3);if(Dt===0||bt===0||(0,ee.Sh)(ce)&&!(0,Y.Z)(ce))return;var Ft=Ge.offset,zt=Ge.targetOffset,_t=ze(Ye,Ft),We=(0,de.Z)(_t,2),nt=We[0],Ct=We[1],ot=ze(J,zt),dt=(0,de.Z)(ot,2),kt=dt[0],Gt=dt[1];J.x-=kt,J.y-=Gt;var Ht=Ge.points||[],hn=(0,de.Z)(Ht,2),cn=hn[0],En=hn[1],vn=Xe(En),on=Xe(cn),tn=_e(J,vn),Tn=_e(Ye,on),Sn=(0,m.Z)({},Ge),bn=tn.x-Tn.x+nt,Pn=tn.y-Tn.y+Ct,Hn=Xr(bn,Pn),Bn=Xr(bn,Pn,ht),jn=_e(J,["t","l"]),Wn=_e(Ye,["t","l"]),nr=_e(J,["b","r"]),Nn=_e(Ye,["b","r"]),fr=Ge.overflow||{},pt=fr.adjustX,kn=fr.adjustY,sr=fr.shiftX,xr=fr.shiftY,_r=function(ui){return typeof ui=="boolean"?ui:ui>=0},br,Rn,gn,Mn;Kr();var ar=_r(kn),Kn=on[0]===vn[0];if(ar&&on[0]==="t"&&(Rn>at.bottom||Lt.current.bt)){var er=Pn;Kn?er-=On-Ut:er=jn.y-Nn.y-Ct;var Pr=Xr(bn,er),Dr=Xr(bn,er,ht);Pr>Hn||Pr===Hn&&(!mt||Dr>=Bn)?(Lt.current.bt=!0,Pn=er,Ct=-Ct,Sn.points=[Ke(on,0),Ke(vn,0)]):Lt.current.bt=!1}if(ar&&on[0]==="b"&&(br<at.top||Lt.current.tb)){var Er=Pn;Kn?Er+=On-Ut:Er=nr.y-Wn.y-Ct;var _n=Xr(bn,Er),Gn=Xr(bn,Er,ht);_n>Hn||_n===Hn&&(!mt||Gn>=Bn)?(Lt.current.tb=!0,Pn=Er,Ct=-Ct,Sn.points=[Ke(on,0),Ke(vn,0)]):Lt.current.tb=!1}var qn=_r(pt),wr=on[1]===vn[1];if(qn&&on[1]==="l"&&(Mn>at.right||Lt.current.rl)){var qr=bn;wr?qr-=en-Pt:qr=jn.x-Nn.x-nt;var Yr=Xr(qr,Pn),kr=Xr(qr,Pn,ht);Yr>Hn||Yr===Hn&&(!mt||kr>=Bn)?(Lt.current.rl=!0,bn=qr,nt=-nt,Sn.points=[Ke(on,1),Ke(vn,1)]):Lt.current.rl=!1}if(qn&&on[1]==="r"&&(gn<at.left||Lt.current.lr)){var Zr=bn;wr?Zr+=en-Pt:Zr=nr.x-Wn.x-nt;var Sr=Xr(Zr,Pn),ei=Xr(Zr,Pn,ht);Sr>Hn||Sr===Hn&&(!mt||ei>=Bn)?(Lt.current.lr=!0,bn=Zr,nt=-nt,Sn.points=[Ke(on,1),Ke(vn,1)]):Lt.current.lr=!1}Kr();var $r=sr===!0?0:sr;typeof $r=="number"&&(gn<ht.left&&(bn-=gn-ht.left-nt,J.x+Pt<ht.left+$r&&(bn+=J.x-ht.left+Pt-$r)),Mn>ht.right&&(bn-=Mn-ht.right-nt,J.x>ht.right-$r&&(bn+=J.x-ht.right+$r)));var jr=xr===!0?0:xr;typeof jr=="number"&&(br<ht.top&&(Pn-=br-ht.top-Ct,J.y+Ut<ht.top+jr&&(Pn+=J.y-ht.top+Ut-jr)),Rn>ht.bottom&&(Pn-=Rn-ht.bottom-Ct,J.y>ht.bottom-jr&&(Pn+=J.y-ht.bottom+jr)));var ai=Ye.x+bn,oi=ai+en,cr=Ye.y+Pn,ci=cr+On,di=J.x,ti=di+Pt,Hr=J.y,rr=Hr+Ut,Ei=Math.max(ai,di),mn=Math.min(oi,ti),Xn=(Ei+mn)/2,vr=Xn-ai,Cr=Math.max(cr,Hr),ur=Math.min(ci,rr),pr=(Cr+ur)/2,Fn=pr-cr;P==null||P(Ce,Sn);var Fr=gt.right-Ye.x-(bn+Ye.width),Jr=gt.bottom-Ye.y-(Pn+Ye.height);Dt===1&&(bn=Math.round(bn),Fr=Math.round(Fr)),bt===1&&(Pn=Math.round(Pn),Jr=Math.round(Jr));var ni={ready:!0,offsetX:bn/Dt,offsetY:Pn/bt,offsetR:Fr/Dt,offsetB:Jr/bt,arrowX:vr/Dt,arrowY:Fn/bt,scaleX:Dt,scaleY:bt,align:Sn};et(ni)}}),Yt=function(){ut.current+=1;var it=ut.current;Promise.resolve().then(function(){ut.current===it&&Mt()})},jt=function(){et(function(it){return(0,m.Z)((0,m.Z)({},it),{},{ready:!1})})};return(0,S.Z)(jt,[Je]),(0,S.Z)(function(){Re||jt()},[Re]),[He.ready,He.offsetX,He.offsetY,He.offsetR,He.offsetB,He.arrowX,He.arrowY,He.scaleX,He.scaleY,He.align,Yt]}var st=b(94480);function rt(Re,Ce,ce,Je,Le){(0,S.Z)(function(){if(Re&&Ce&&ce){let ut=function(){Je(),Le()};var Ie=Ce,P=ce,pe=se(Ie),xe=se(P),He=ie(P),et=new Set([He].concat((0,st.Z)(pe),(0,st.Z)(xe)));return et.forEach(function(xt){xt.addEventListener("scroll",ut,{passive:!0})}),He.addEventListener("resize",ut,{passive:!0}),Je(),function(){et.forEach(function(xt){xt.removeEventListener("scroll",ut),He.removeEventListener("resize",ut)})}}},[Re,Ce,ce])}var Vt=b(48736);function qe(Re,Ce,ce,Je,Le,Ie,P,pe){var xe=C.useRef(Re);xe.current=Re;var He=C.useRef(!1);C.useEffect(function(){if(Ce&&Je&&(!Le||Ie)){var ut=function(){He.current=!1},xt=function(It){var Rt;xe.current&&!P(((Rt=It.composedPath)===null||Rt===void 0||(Rt=Rt.call(It))===null||Rt===void 0?void 0:Rt[0])||It.target)&&!He.current&&pe(!1)},Lt=ie(Je);Lt.addEventListener("pointerdown",ut,!0),Lt.addEventListener("mousedown",xt,!0),Lt.addEventListener("contextmenu",xt,!0);var Et=(0,o.A)(ce);if(Et&&(Et.addEventListener("mousedown",xt,!0),Et.addEventListener("contextmenu",xt,!0)),0)var Mt,Yt,jt,$t;return function(){Lt.removeEventListener("pointerdown",ut,!0),Lt.removeEventListener("mousedown",xt,!0),Lt.removeEventListener("contextmenu",xt,!0),Et&&(Et.removeEventListener("mousedown",xt,!0),Et.removeEventListener("contextmenu",xt,!0))}}},[Ce,ce,Je,Le,Ie]);function et(){He.current=!0}return et}var Kt=["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 je(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ve.Z,Ce=C.forwardRef(function(ce,Je){var Le=ce.prefixCls,Ie=Le===void 0?"rc-trigger-popup":Le,P=ce.children,pe=ce.action,xe=pe===void 0?"hover":pe,He=ce.showAction,et=ce.hideAction,ut=ce.popupVisible,xt=ce.defaultPopupVisible,Lt=ce.onPopupVisibleChange,Et=ce.afterPopupVisibleChange,Mt=ce.mouseEnterDelay,Yt=ce.mouseLeaveDelay,jt=Yt===void 0?.1:Yt,$t=ce.focusDelay,it=ce.blurDelay,It=ce.mask,Rt=ce.maskClosable,ye=Rt===void 0?!0:Rt,Ve=ce.getPopupContainer,_=ce.forceRender,A=ce.autoDestroy,Oe=ce.destroyPopupOnHide,N=ce.popup,ae=ce.popupClassName,St=ce.popupStyle,Ee=ce.popupPlacement,$e=ce.builtinPlacements,Ge=$e===void 0?{}:$e,Z=ce.popupAlign,J=ce.zIndex,be=ce.stretch,Pe=ce.getPopupClassNameFromAlign,j=ce.fresh,Ye=ce.alignPoint,X=ce.onPopupClick,tt=ce.onPopupAlign,Ot=ce.arrow,Xt=ce.popupMotion,pn=ce.maskMotion,qt=ce.popupTransitionName,nn=ce.popupAnimation,xn=ce.maskTransitionName,Un=ce.maskAnimation,un=ce.className,On=ce.getTriggerDOMNode,en=(0,oe.Z)(ce,Kt),Ut=A||Oe||!1,Pt=C.useState(!1),an=(0,de.Z)(Pt,2),rn=an[0],An=an[1];(0,S.Z)(function(){An((0,w.Z)())},[]);var ir=C.useRef({}),Ne=C.useContext(ke),mt=C.useMemo(function(){return{registerSubPopup:function(lr,Ir){ir.current[lr]=Ir,Ne==null||Ne.registerSubPopup(lr,Ir)}}},[Ne]),wt=(0,k.Z)(),ht=C.useState(null),we=(0,de.Z)(ht,2),at=we[0],gt=we[1],Dt=C.useRef(null),bt=(0,H.Z)(function($n){Dt.current=$n,(0,ee.Sh)($n)&&at!==$n&&gt($n),Ne==null||Ne.registerSubPopup(wt,$n)}),Ft=C.useState(null),zt=(0,de.Z)(Ft,2),_t=zt[0],We=zt[1],nt=C.useRef(null),Ct=(0,H.Z)(function($n){(0,ee.Sh)($n)&&_t!==$n&&(We($n),nt.current=$n)}),ot=C.Children.only(P),dt=(ot==null?void 0:ot.props)||{},kt={},Gt=(0,H.Z)(function($n){var lr,Ir,dr=_t;return(dr==null?void 0:dr.contains($n))||((lr=(0,o.A)(dr))===null||lr===void 0?void 0:lr.host)===$n||$n===dr||(at==null?void 0:at.contains($n))||((Ir=(0,o.A)(at))===null||Ir===void 0?void 0:Ir.host)===$n||$n===at||Object.values(ir.current).some(function(gr){return(gr==null?void 0:gr.contains($n))||$n===gr})}),Ht=re(Ie,Xt,nn,qt),hn=re(Ie,pn,Un,xn),cn=C.useState(xt||!1),En=(0,de.Z)(cn,2),vn=En[0],on=En[1],tn=ut!=null?ut:vn,Tn=(0,H.Z)(function($n){ut===void 0&&on($n)});(0,S.Z)(function(){on(ut||!1)},[ut]);var Sn=C.useRef(tn);Sn.current=tn;var bn=C.useRef([]);bn.current=[];var Pn=(0,H.Z)(function($n){var lr;Tn($n),((lr=bn.current[bn.current.length-1])!==null&&lr!==void 0?lr:tn)!==$n&&(bn.current.push($n),Lt==null||Lt($n))}),Hn=C.useRef(),Bn=function(){clearTimeout(Hn.current)},jn=function(lr){var Ir=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Bn(),Ir===0?Pn(lr):Hn.current=setTimeout(function(){Pn(lr)},Ir*1e3)};C.useEffect(function(){return Bn},[]);var Wn=C.useState(!1),nr=(0,de.Z)(Wn,2),Nn=nr[0],fr=nr[1];(0,S.Z)(function($n){(!$n||tn)&&fr(!0)},[tn]);var pt=C.useState(null),kn=(0,de.Z)(pt,2),sr=kn[0],xr=kn[1],_r=C.useState(null),br=(0,de.Z)(_r,2),Rn=br[0],gn=br[1],Mn=function(lr){gn([lr.clientX,lr.clientY])},ar=Qe(tn,at,Ye&&Rn!==null?Rn:_t,Ee,Ge,Z,tt),Kn=(0,de.Z)(ar,11),er=Kn[0],Pr=Kn[1],Dr=Kn[2],Er=Kn[3],_n=Kn[4],Gn=Kn[5],qn=Kn[6],wr=Kn[7],qr=Kn[8],Yr=Kn[9],kr=Kn[10],Zr=Me(rn,xe,He,et),Sr=(0,de.Z)(Zr,2),ei=Sr[0],$r=Sr[1],jr=ei.has("click"),ai=$r.has("click")||$r.has("contextMenu"),oi=(0,H.Z)(function(){Nn||kr()}),cr=function(){Sn.current&&Ye&&ai&&jn(!1)};rt(tn,_t,at,oi,cr),(0,S.Z)(function(){oi()},[Rn,Ee]),(0,S.Z)(function(){tn&&!(Ge!=null&&Ge[Ee])&&oi()},[JSON.stringify(Z)]);var ci=C.useMemo(function(){var $n=W(Ge,Ie,Yr,Ye);return g()($n,Pe==null?void 0:Pe(Yr))},[Yr,Pe,Ge,Ie,Ye]);C.useImperativeHandle(Je,function(){return{nativeElement:nt.current,popupElement:Dt.current,forceAlign:oi}});var di=C.useState(0),ti=(0,de.Z)(di,2),Hr=ti[0],rr=ti[1],Ei=C.useState(0),mn=(0,de.Z)(Ei,2),Xn=mn[0],vr=mn[1],Cr=function(){if(be&&_t){var lr=_t.getBoundingClientRect();rr(lr.width),vr(lr.height)}},ur=function(){Cr(),oi()},pr=function(lr){fr(!1),kr(),Et==null||Et(lr)},Fn=function(){return new Promise(function(lr){Cr(),xr(function(){return lr})})};(0,S.Z)(function(){sr&&(kr(),sr(),xr(null))},[sr]);function Fr($n,lr,Ir,dr){kt[$n]=function(gr){var Ti;dr==null||dr(gr),jn(lr,Ir);for(var ri=arguments.length,Li=new Array(ri>1?ri-1:0),Ki=1;Ki<ri;Ki++)Li[Ki-1]=arguments[Ki];(Ti=dt[$n])===null||Ti===void 0||Ti.call.apply(Ti,[dt,gr].concat(Li))}}(jr||ai)&&(kt.onClick=function($n){var lr;Sn.current&&ai?jn(!1):!Sn.current&&jr&&(Mn($n),jn(!0));for(var Ir=arguments.length,dr=new Array(Ir>1?Ir-1:0),gr=1;gr<Ir;gr++)dr[gr-1]=arguments[gr];(lr=dt.onClick)===null||lr===void 0||lr.call.apply(lr,[dt,$n].concat(dr))});var Jr=qe(tn,ai,_t,at,It,ye,Gt,jn),ni=ei.has("hover"),Xr=$r.has("hover"),Kr,li;ni&&(Fr("onMouseEnter",!0,Mt,function($n){Mn($n)}),Fr("onPointerEnter",!0,Mt,function($n){Mn($n)}),Kr=function(lr){(tn||Nn)&&at!==null&&at!==void 0&&at.contains(lr.target)&&jn(!0,Mt)},Ye&&(kt.onMouseMove=function($n){var lr;(lr=dt.onMouseMove)===null||lr===void 0||lr.call(dt,$n)})),Xr&&(Fr("onMouseLeave",!1,jt),Fr("onPointerLeave",!1,jt),li=function(){jn(!1,jt)}),ei.has("focus")&&Fr("onFocus",!0,$t),$r.has("focus")&&Fr("onBlur",!1,it),ei.has("contextMenu")&&(kt.onContextMenu=function($n){var lr;Sn.current&&$r.has("contextMenu")?jn(!1):(Mn($n),jn(!0)),$n.preventDefault();for(var Ir=arguments.length,dr=new Array(Ir>1?Ir-1:0),gr=1;gr<Ir;gr++)dr[gr-1]=arguments[gr];(lr=dt.onContextMenu)===null||lr===void 0||lr.call.apply(lr,[dt,$n].concat(dr))}),un&&(kt.className=g()(dt.className,un));var ui=C.useRef(!1);ui.current||(ui.current=_||tn||Nn);var Ai=(0,m.Z)((0,m.Z)({},dt),kt),vi={},Hi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Hi.forEach(function($n){en[$n]&&(vi[$n]=function(){for(var lr,Ir=arguments.length,dr=new Array(Ir),gr=0;gr<Ir;gr++)dr[gr]=arguments[gr];(lr=Ai[$n])===null||lr===void 0||lr.call.apply(lr,[Ai].concat(dr)),en[$n].apply(en,dr)})});var Xi=C.cloneElement(ot,(0,m.Z)((0,m.Z)({},Ai),vi)),ki={x:Gn,y:qn},yi=Ot?(0,m.Z)({},Ot!==!0?Ot:{}):null;return C.createElement(C.Fragment,null,C.createElement(fe.Z,{disabled:!tn,ref:Ct,onResize:ur},C.createElement(le,{getTriggerDOMNode:On},Xi)),ui.current&&C.createElement(ke.Provider,{value:mt},C.createElement(ue,{portal:Re,ref:bt,prefixCls:Ie,popup:N,className:g()(ae,ci),style:St,target:_t,onMouseEnter:Kr,onMouseLeave:li,onPointerEnter:Kr,zIndex:J,open:tn,keepDom:Nn,fresh:j,onClick:X,onPointerDownCapture:Jr,mask:It,motion:Ht,maskMotion:hn,onVisibleChanged:pr,onPrepare:Fn,forceRender:_,autoDestroy:Ut,getPopupContainer:Ve,align:Yr,arrow:yi,arrowPos:ki,ready:er,offsetX:Pr,offsetY:Dr,offsetR:Er,offsetB:_n,onAlign:oi,stretch:be,targetWidth:Hr/wr,targetHeight:Xn/qr})))});return Ce}var Tt=je(ve.Z)},48850:function(){"use strict"},70031:function(ln,ct){"use strict";ct.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},2524:function(ln,ct,b){"use strict";var m=b(59301),de=b(93314),oe=b(7939),ve=Object.defineProperty,G=Object.defineProperties,g=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,H=(C,R,q)=>R in C?ve(C,R,{enumerable:!0,configurable:!0,writable:!0,value:q}):C[R]=q,k=(C,R)=>{for(var q in R||(R={}))ee.call(R,q)&&H(C,q,R[q]);if(fe)for(var q of fe(R))o.call(R,q)&&H(C,q,R[q]);return C},S=(C,R)=>G(C,g(R));const w=({img:C,buttonProps:R={},styles:q={},customText:Q,ButtonText:K,ButtonClick:D,Buttonclass:$,ButtonTwo:M,imgStyles:F,loading:ue=!1,className:he=""})=>m.createElement("section",{className:`tc animated fadeIn ${he}`,style:k({color:"#999",margin:"100px auto",visibility:ue?"hidden":"visible"},q)},m.createElement("img",{src:C||de,style:S(k({},F),{pointerEvents:"none",userSelect:"none"})}),m.createElement("p",{className:"mt20 font14"},Q||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),K&&m.createElement(oe.ZP,k({className:$,onClick:D},R),K),M&&M);ct.Z=w},52918:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return $}});var m=b(59301),de={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=b(7939),ve=b(70557),G=b(50258),g=b(25399),fe=b(65862),ee=b(87513),o=b(2524),H=b(74128),k=b(7310),S=b(59301),w=Object.defineProperty,C=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,Q=(M,F,ue)=>F in M?w(M,F,{enumerable:!0,configurable:!0,writable:!0,value:ue}):M[F]=ue,K=(M,F)=>{for(var ue in F||(F={}))R.call(F,ue)&&Q(M,ue,F[ue]);if(C)for(var ue of C(F))q.call(F,ue)&&Q(M,ue,F[ue]);return M},D=(M,F,ue)=>new Promise((he,le)=>{var Se=Me=>{try{De(ue.next(Me))}catch(Y){le(Y)}},ke=Me=>{try{De(ue.throw(Me))}catch(Y){le(Y)}},De=Me=>Me.done?he(Me.value):Promise.resolve(Me.value).then(Se,ke);De((ue=ue.apply(M,F)).next())}),$=({editOffice:M="view",data:F,issaver:ue,onSaver:he,theme:le,type:Se,filename:ke,monacoEditor:De,className:Me,style:Y,close:B,onClose:W,hasMask:re,disabledDownload:ie,onImgDimensions:se,showNodata:x,recordInfo:E})=>{const[V,me]=(0,m.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ze,Xe]=(0,m.useState)(""),[_e,Ke]=(0,m.useState)(),Qe=window.ENV==="build"?"/react/build":"",st=location.host.startsWith("localhost")?H.Z.PROXY_SERVER:H.Z.API_SERVER,Vt=10*(1024*1024),qe=(0,m.useRef)();F!=null&&F.startsWith("/api")&&Se!=="txt"&&(F=H.Z.API_SERVER+F);const Kt=ce=>ce.substring(ce.lastIndexOf("/")+1).split(".").pop();ke&&De&&(De.filename=ke),(0,m.useEffect)(()=>{var ce,Je;const Le=(Je=(ce=document.cookie)==null?void 0:ce.replace(/\s/g,""))==null?void 0:Je.split(";");Le==null||Le.map(Ie=>{let P=Ie.split("=");P[0]==="_educoder_session"&&Xe(P[1])})},[]),(0,m.useEffect)(()=>{Se==="office"&&(F.indexOf("bigfilescdn.")>-1||F.indexOf("bigfiles1")>-1?Ke({url:F,fileType:Kt(F),model:F.indexOf("model=edit")?"edit":"view"}):Tt())},[Se,F]);function je(ce){return D(this,null,function*(){ce.data.type==="pdfdata"&&(he(ce.data.data),window.removeEventListener("message",je,!1)),console.log("mess---:",ce.data)})}const Tt=()=>D(void 0,null,function*(){console.log("data:",F);let ce=F;F.startsWith("http")||(ce=location.origin+ce);let Je=new URL(ce).pathname.split("/").pop();const Le=yield(0,ee.gJ)({attachment_id:Je});Le.url=st+Le.url,Ke(Le)}),Re=()=>{if(F.startsWith("http")||F.startsWith("blob:")){Ce();return}(0,fe.Sv)(ke||"educoder",F,ke)},Ce=()=>{E&&(0,k.fc)({id:E==null?void 0:E.id,watch_type:1,course_id:E==null?void 0:E.course_id}),(0,fe.Nd)(ke||"educoder",decodeURIComponent(F))};return S.createElement("div",{style:K({},Y||{}),className:`${re&&de.bgBlack} ${Se?de.wrp:"hide"}`},B&&S.createElement("div",{className:de.close,ref:qe},!!se&&S.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>qe.current},S.createElement("span",{onClick:()=>{W(),se()}},S.createElement("i",{className:"icon-yulanpizhu"}))),!ie&&S.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>qe.current},S.createElement("span",{onClick:Ce},S.createElement("i",{className:"icon-quxiaozhiding"}))),ue&&S.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>qe.current},S.createElement("span",{className:"",onClick:()=>{const ce=document.getElementById("pdfiframe");window.addEventListener("message",je,!1),setTimeout(()=>{ce.contentWindow.postMessage("getData","*")},300)}},S.createElement("i",{className:"icon-baocun"}))),S.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>qe.current},S.createElement("span",{className:"",onClick:()=>{W()}},S.createElement("i",{className:"icon-guanbi1"})))),S.createElement("div",{className:`${de[Me]} ${Me} ${de.monaco} ${Se==="txt"?"show":"hide"}`},Se==="txt"&&S.createElement(S.Fragment,null,S.createElement(G.ZP,K({},De)))),Se==="audio"&&S.createElement("audio",{src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${F}`,autoPlay:!0}),Se==="video"&&S.createElement(S.Fragment,null,(F==null?void 0:F.indexOf("http"))>-1?S.createElement("video",{controls:!0,src:`${F}`,autoPlay:!0}):S.createElement("video",{controls:!0,src:`data:video/mp4;base64,${F}`,autoPlay:!0})),Se==="office"&&_e&&S.createElement("iframe",{src:`${Qe}/office.html?key=${_e.key}&url=${btoa(_e.url)}&callbackUrl=${st+(_e.callbackUrl||"")}&fileType=${_e.fileType}&title=${_e.title||""}&model=${M}&officeServer=${H.Z.ONLYOFFICE}&disabledDownload=${!!ie}`}),Se==="html"&&S.createElement("iframe",{src:F+"&disposition=inline"}),Se==="pdf"&&S.createElement("iframe",{id:"pdfiframe",src:`${Qe}/js/pdf/index.html?filename=${ke||"educoder.pdf"}&url=${encodeURIComponent(F)}&disabledDownload=${!!ie}&model=${M}`}),Se==="image"&&S.createElement("img",{src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:image/png;base64,"}${F}`}),(Se==="other"||Se==="download")&&S.createElement(S.Fragment,null,x?S.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:S.createElement(oe.ZP,{icon:S.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Re,disabled:ie},"\u4E0B\u8F7D")}):S.createElement(oe.ZP,{type:"primary",size:"middle",onClick:Re,disabled:ie},S.createElement(ve.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Se==="flowChart"&&S.createElement("div",{className:"embed"},S.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"})))}},95097:function(ln,ct,b){"use strict";b.d(ct,{z:function(){return De},Z:function(){return Me}});var m=b(59301),de=b(48850),oe=b(49142),ve=b(64018),G=b(17030),g=b(74128),fe=b(65862),ee=b(15342),o=b(44104),H=b(7939),k=b(1012),S=b(52918),w=b(59301),R=({html:Y})=>{const B=(0,m.useRef)(null),W=(0,m.useRef)(null),re=`.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,m.useEffect)(()=>{const ie=B.current.attachShadow({mode:"open"});W.current=document.createElement("div"),W.current.className="markdown-body",W.current.innerHTML=Y,ie.appendChild(W.current);const se=document.createElement("style");return se.textContent=re,ie.appendChild(se),()=>{ie.innerHTML=""}},[]),(0,m.useEffect)(()=>{W.current&&(W.current.innerHTML=Y)},[Y]),w.createElement("div",{ref:B})};function q(Y){const B=["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"],W=new RegExp(`\\b(${B.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Y.replace(W,"").trim()}var Q={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},K=Object.defineProperty,D=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,F=(Y,B,W)=>B in Y?K(Y,B,{enumerable:!0,configurable:!0,writable:!0,value:W}):Y[B]=W,ue=(Y,B)=>{for(var W in B||(B={}))$.call(B,W)&&F(Y,W,B[W]);if(D)for(var W of D(B))M.call(B,W)&&F(Y,W,B[W]);return Y};const he="@\u2581\u2581@",le="@\u2581@",Se=/<pre[^>]*>/g;function ke(Y){let B=document.createElement("div");return B.innerHTML=Y,B.childNodes.length===0?"":B.childNodes[0].nodeValue}const De=(Y,B)=>{Y=Y||"";const W=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,re=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ie=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,se=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return B?Y.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(W,(x,E,V,me,ze,Xe,_e)=>{const Ke=E||me||Xe,Qe=V||ze||_e||"?";return g.Z.API_SERVER+"/api/attachments/"+Ke+Qe+"&t="+(0,fe.Jn)(Ke,Date.now())+(x.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Y=Y.replace(se,(x,E,V,me,ze,Xe,_e)=>{const Ke=E||me||Xe,Qe=V||ze||_e||"?";return g.Z.API_SERVER+"/attachments/download/"+Ke+Qe+"&t="+(0,fe.Jn)(Ke,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(W,(x,E,V,me,ze,Xe,_e)=>{const Ke=E||me||Xe,Qe=V||ze||_e||"?";return g.Z.API_SERVER+"/api/attachments/"+Ke+Qe+"&t="+(0,fe.Jn)(Ke,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(re,(x,E,V,me,ze)=>{const Xe=E||me,_e=V||ze||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+Xe+_e+Xe+_e+"&t="+(0,fe.Jn)(Xe,Date.now())}).replace(ie,(x,E,V,me,ze)=>{const Xe=E||me,_e=V||ze||"";return"("+g.Z.API_SERVER+"/files/uploads/"+Xe+_e+Xe+_e+"&t="+(0,fe.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,`
`),Y)};var Me=({value:Y="",edit:B=!1,className:W,showTextOnly:re,showLines:ie,style:se={},stylesPrev:x={},highlightKeywords:E,showProgramFill:V,isProgramFill:me,disabledFill:ze=!1,programFillValue:Xe,openEditor:_e=()=>{},onFillChange:Ke=rt=>{},onFillBlur:Qe=()=>{},onFillFocus:st=()=>{}})=>{let rt=q(String(Y||""));const Vt=(0,m.useRef)(),qe=(0,m.useRef)(),[Kt,je]=(0,m.useState)(""),[Tt,Re]=(0,m.useState)("office"),[Ce,ce]=(0,m.useState)([]),Je=(0,m.useRef)("a"+(0,k.Z)()),Le={},Ie=it=>/<style[\s\S]*?>/i.test(it||""),P=(it,It,Rt)=>{const ye=document.createElement(it===le?"input":"textarea");ye.style.width="100%",ye.style.height=it===le?"40px":"151px",ye.rows=5,ye.spellcheck=!1,ye.name="edu-program-fill",ye.placeholder="\u8BF7\u8F93\u5165",ye.dataset.id=It;const Ve=Object.keys(Le).length;return Le[Ve]=ye,`<span class="edu-program-fill-wrap ${it===le?"":"show"}" style="width:${it===le?"600px":"100%"}" title=${Rt||""}><span>${ye.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function pe(it){return it=it.replace(/!\[.*?\]\(.*?\)/g,""),it=it.replace(/\[.*?\]\(.*?\)/g,""),it=it.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),it=it.replace(/<embed.*?>/g,""),it=it.replace(/<img.*?>/g,""),it=it.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),it=it.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),it=it.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),it=it.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),it}const xe=it=>!re&&Ie(rt)?it:it.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(It,Rt){let ye=Rt.replace(/(\n|\r)/g,"").split("}"),Ve=[];return ye.map(_=>{_!=""&&Ve.push(`.${Je.current} ${_}`)}),`<style>${Ve.join("}")}</style>`}),He=(0,m.useMemo)(()=>{try{const ye=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ve=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,A=/\(\/attachments\/download\//g;rt=rt.replace(A,"("+g.Z.API_SERVER+"/attachments/download/").replace(ye,"("+g.Z.API_SERVER+"/api/attachments/").replace(Ve,'"'+g.Z.API_SERVER+"/api/attachments/").replace(_,'"'+g.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,`
`),Vt.current.style.display="none"}catch(ye){}if(V){let ye=-1;return rt=rt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ve,_,A){var Oe;return++ye,P(Ve,ye,(Oe=Xe==null?void 0:Xe[ye])==null?void 0:Oe.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${xe(rt||"")}</pre>`}let it=xe(rt);it=(0,oe.ZP)(it);const It=(0,oe.ez)();rt.match(/\[TOC\]/)&&(it=it.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),it=it.replace(/(__special_katext_id_\d+__)/g,(ye,Ve)=>{const{type:_,expression:A}=It[Ve];return(0,ee.renderToString)(ke(A)||"",{displayMode:_==="block",throwOnError:!1,output:"html"})}),it=it.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=it,re)return Rt.innerText;if(E){const ye=E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Lt(Rt,ye),Rt.innerHTML}return setTimeout(()=>Yt(),500),Rt.innerHTML},[rt,E]);(0,m.useEffect)(()=>{Et.current&&Et.current.querySelectorAll(["input","textarea"]).forEach(It=>{It.oninput=et,It.onblur=ut,It.onfocus=xt})},[Ce]),(0,m.useEffect)(()=>{var it,It,Rt,ye,Ve;if(Xe!=null&&Xe.length)try{const _=Et.current.querySelectorAll(".edu-program-fill-score"),A=Et.current.querySelectorAll('[name="edu-program-fill"]');for(const[Oe,N]of A.entries())N.value=((it=Xe==null?void 0:Xe[Oe])==null?void 0:it.value)||"",((It=Xe==null?void 0:Xe[Oe])==null?void 0:It.type)==="warning"?N.className="program-fill-warning":((Rt=Xe==null?void 0:Xe[Oe])==null?void 0:Rt.type)==="success"?N.className="program-fill-success":N.className="";for(const[Oe,N]of _.entries())N.innerHTML=(ye=Xe==null?void 0:Xe[Oe])!=null&&ye.score?`${(Ve=Xe==null?void 0:Xe[Oe])==null?void 0:Ve.score}\u5206`:"";ce(Xe)}catch(_){console.log(_,"error")}},[Xe]);const et=it=>{Ce[it.target.dataset.id]=Ce[it.target.dataset.id]||{},Ce[it.target.dataset.id].value=it.target.value,ce([...Ce]),Ke(Ce,it.target.dataset.id)},ut=it=>{Ce[it.target.dataset.id]=Ce[it.target.dataset.id]||{},Ce[it.target.dataset.id].value=it.target.value,ce([...Ce]),Qe(Ce,it.target.dataset.id)},xt=it=>{Ce[it.target.dataset.id]=Ce[it.target.dataset.id]||{},Ce[it.target.dataset.id].value=it.target.value,ce([...Ce]),st(Ce,it.target.dataset.id)};function Lt(it,It){return it.childNodes.forEach(Rt=>{var ye;if(Rt.childNodes.length>0)Lt(Rt,It);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(ye=Rt.innerHTML)==null?void 0:ye.replace(new RegExp(It,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ve=document.createElement("span");Ve.innerHTML=Rt.textContent.replace(new RegExp(It,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(Ve)}})}const Et=(0,m.useRef)();oe.jb.WebkitLineClamp=ie,ie&&(se=ue(ue({},se),oe.jb));function Mt(it){let It=it.target;if(It.tagName.toUpperCase()==="A"){let Rt=It.getAttribute("href");if(Rt.indexOf("office")>-1)it.preventDefault(),je(Rt),Re("office");else if(Rt.indexOf("application/pdf")>-1)it.preventDefault(),je(Rt),Re("pdf");else if(Rt.indexOf("text/html")>-1)it.preventDefault(),je(Rt),Re("html");else if(Rt.startsWith("#")){it.preventDefault();let ye=document.getElementById(Rt.replace("#",""));ye&&ye.scrollIntoView(!0)}}}const Yt=()=>{var it;const It=(it=Et.current)==null?void 0:it.querySelectorAll("video");It==null||It.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(G.ZP.isSupported()){var ye=new G.ZP;ye.loadSource(Rt.src),ye.attachMedia(Rt)}}})};(0,m.useEffect)(()=>{if(Et.current&&He&&He.match(Se)&&window.PR.prettyPrint(),Et.current)return Et.current.addEventListener("click",Mt),()=>{var it;(it=Et.current)==null||it.removeEventListener("click",Mt),(0,oe.AL)(),(0,oe.Iy)()}},[He,Et.current,Mt]);const jt=it=>{it.target.nodeName==="IMG"&&it.target.className.indexOf("draw-flowchart")>-1?(Vt.current.style.zIndex=1,Vt.current.style.display="flex",Vt.current.style.width=it.target.clientWidth+"px",Vt.current.style.height=it.target.clientHeight+"px",Vt.current.style.top=it.target.offsetTop+"px",Vt.current.style.left=it.target.offsetLeft+"px",it.target.id&&(qe.current=it.target.id)):Vt.current.style.display="none"},$t=()=>{Vt.current.style.display="none"};return(0,m.useEffect)(()=>{var it;const It=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(it=Et.current)==null||it.addEventListener("copy",It),()=>{var Rt;(Rt=Et.current)==null||Rt.removeEventListener("copy",It)}},[Et.current]),m.createElement("div",{style:{position:"relative"},onMouseLeave:$t},re&&m.createElement("div",{ref:Et,className:`${Q.mdBody} `},He),!re&&!Ie(He)&&m.createElement("div",{ref:Et,style:ue({},se),onMouseOver:jt,className:`${W||""} ${ze?"disabled-fill":""} markdown-body ${Q.mdBody} ${Je.current}`,dangerouslySetInnerHTML:{__html:He}}),!re&&Ie(He)&&m.createElement(R,{html:He}),m.createElement("div",{ref:Vt,className:`${Q.button} ${B?"":Q.previewFlowChart}`},m.createElement(o.Z,null,m.createElement(H.ZP,{onClick:()=>{B?_e(qe.current):(je(qe.current),Re("flowChart"))}},B?"\u7F16\u8F91":"\u9884\u89C8"))),m.createElement(S.Z,{close:!0,data:Kt,type:Kt!=null&&Kt.length?Tt:"",style:ue({},x),onClose:()=>je("")}))}},50258:function(ln,ct,b){"use strict";b.d(ct,{SV:function(){return Vt},ZP:function(){return rt}});var m=b(59301),de=b(76374);const oe={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"]},ve={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"]},G={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(`
`)}]},g={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(`
`)}]},fe={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 ee=b(53184),o=b.n(ee),H=(qe,Kt,je)=>new Promise((Tt,Re)=>{var Ce=Le=>{try{Je(je.next(Le))}catch(Ie){Re(Ie)}},ce=Le=>{try{Je(je.throw(Le))}catch(Ie){Re(Ie)}},Je=Le=>Le.done?Tt(Le.value):Promise.resolve(Le.value).then(Ce,ce);Je((je=je.apply(qe,Kt)).next())});const k={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"]}},S=(qe,Kt,je,Tt)=>{const Re=Kt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:je.lineNumber,endColumn:je.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:Tt}))},w=(qe,Kt,je,Tt)=>{qe.languages.registerCompletionItemProvider(Kt,{provideCompletionItems(Re,Ce){const ce=Re.getWordUntilPosition(Ce),Je={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},Le=Re.getLineContent(Ce.lineNumber).substring(ce.startColumn-2,ce.endColumn);return{suggestions:[...S(qe,Re,Ce,Je),...je.map(P=>({label:P,kind:qe.languages.CompletionItemKind.Keyword,documentation:P,insertText:P,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je})),...Tt.map(P=>({label:P.label,kind:qe.languages.CompletionItemKind.Snippet,documentation:P.content,insertText:Le.startsWith("#")?P.content.replace(/#/,""):P.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}})};var C=qe=>{k.languages.forEach(Kt=>{qe.languages.registerDocumentFormattingEditProvider(Kt,{provideDocumentFormattingEdits(je){return H(this,null,function*(){const Tt=o()(je.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:je.getFullModelRange(),text:Tt}]})}})}),w(qe,"java",ve.keywords,ve.quickKey),w(qe,"cpp",G.keywords,G.quickKey),w(qe,"c",oe.keywords,[]),w(qe,"python",g.keywords,g.quickKey),w(qe,"scala",fe.keywords,fe.quickKey)};const R="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var q=Object.defineProperty,Q=(qe,Kt,je)=>Kt in qe?q(qe,Kt,{enumerable:!0,configurable:!0,writable:!0,value:je}):qe[Kt]=je,K=(qe,Kt,je)=>Q(qe,typeof Kt!="symbol"?Kt+"":Kt,je);const D=class xu{constructor(Kt,je,Tt){this.placeholder=Kt,this.editor=je,this.monaco=Tt,je.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)}};K(D,"ID","editor.widget.placeholderHint");var M=D,F=b(96236),ue=b(6767),he=b(25399),le=b(89392),Se=b(77254),ke=b(56102),De=Object.defineProperty,Me=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ie=(qe,Kt,je)=>Kt in qe?De(qe,Kt,{enumerable:!0,configurable:!0,writable:!0,value:je}):qe[Kt]=je,se=(qe,Kt)=>{for(var je in Kt||(Kt={}))W.call(Kt,je)&&ie(qe,je,Kt[je]);if(B)for(var je of B(Kt))re.call(Kt,je)&&ie(qe,je,Kt[je]);return qe},x=(qe,Kt)=>Me(qe,Y(Kt)),E=(qe,Kt)=>{var je={};for(var Tt in qe)W.call(qe,Tt)&&Kt.indexOf(Tt)<0&&(je[Tt]=qe[Tt]);if(qe!=null&&B)for(var Tt of B(qe))Kt.indexOf(Tt)<0&&re.call(qe,Tt)&&(je[Tt]=qe[Tt]);return je},V=(qe,Kt,je)=>new Promise((Tt,Re)=>{var Ce=Le=>{try{Je(je.next(Le))}catch(Ie){Re(Ie)}},ce=Le=>{try{Je(je.throw(Le))}catch(Ie){Re(Ie)}},Je=Le=>Le.done?Tt(Le.value):Promise.resolve(Le.value).then(Ce,ce);Je((je=je.apply(qe,Kt)).next())});function me(qe){return/^\d+$/.test(qe)?`${qe}px`:qe}function ze(){}let Xe=!1;const _e={"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 Ke(qe=[]){let Kt=qe;if(Array.isArray(qe)){for(let je=0;je<qe.length;je++){let Tt=_e[qe[je]];if(Tt)return Tt}return Kt[0]}return _e[Kt]||Kt}let Qe=null;const st=()=>V(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 rt=qe=>{var Kt=qe,{width:je="100%",height:Tt="100%",value:Re,language:Ce="javascript",style:ce={},options:Je={},overrideServices:Le={},theme:Ie="vs-dark",onEditBlur:P,isCopy:pe=!1,onSave:xe,autoHeight:He=!1,forbidCopy:et=!1,forbidCopyTips:ut,onChange:xt=ze,editorDidMount:Lt=ze,onFocus:Et=ze,onBreakPoint:Mt=ze,breakPointValue:Yt=[],filename:jt="educoder.txt",errorLine:$t,errorContent:it="",highlightLine:It,openBreakPoint:Rt=!1,placeholder:ye="",showMiniMap:Ve=!0}=Kt,_=E(Kt,["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 A=(0,m.useRef)(),Oe=(0,m.useRef)({}),N=(0,m.useRef)(),ae=(0,m.useRef)(),St=(0,m.useRef)([]),Ee=(0,m.useRef)(!1),$e=(0,m.useRef)(),Ge=(0,m.useRef)(),Z=(0,m.useRef)(!1),[J,be]=(0,m.useState)(!1);function Pe(){let Ut;return A.current&&(Ut=new de.Z(Pt=>{for(let an of Pt)(an.target.offsetHeight>0||an.target.offsetWidth>0)&&Oe.current.instance.layout()}),Ut.observe(A.current)),Ut}function j(){ue.ZP.warning({content:decodeURIComponent(ut||R),key:"monaco-editor-tip"})}const Ye=()=>{let Ut=Oe.current.instance;if(Re!=null&&Ut&&J){const Pt=Ut.getModel();Pt&&Re!==Pt.getValue()&&(Xe=!0,Pt.setValue(Re),Ut.layout(),Xe=!1)}};(0,m.useEffect)(()=>{const Ut=Se.Z.subscribe("formatDocument",Pt=>{var an;let rn=Oe.current.instance;(an=rn==null?void 0:rn.getAction)==null||an.call(rn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Pt=>{xt(Pt)},Ut},[]),(0,m.useEffect)(()=>{var Ut;let Pt=Oe.current.instance;ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{Ye()},500),Re&&(Re!=null&&Re.length)&&((Ut=Pt==null?void 0:Pt.updateOptions)==null||Ut.call(Pt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Re.split(/\r\n|\r|\n/g).length))+3,5)}))},[Re,J,Oe.current]),(0,m.useEffect)(()=>{if($t&&Oe.current&&Oe.current.instance){let Pt=Oe.current.instance;Pt.changeViewZones(function(an){var rn=document.createElement("div");rn.style.padding="10px 20px",rn.style.width="calc(100% - 20px)",rn.className="my-error-line-wrp",rn.innerHTML=it,an.addZone({afterLineNumber:$t||11,heightInLines:3,domNode:rn})});var Ut={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}};Pt.addOverlayWidget(Ut),Pt.revealPositionInCenter({lineNumber:20,column:1})}},[$t,Oe.current,J]);const X=(Ut="",Pt)=>{if(!Ut||Ut.trim()==="")return!0;const rn=Oe.current.instance.getModel().getLineTokens(Pt);let An=!1;for(let ir=0;ir<2;ir++)rn.getStandardTokenType(ir)===1&&(An=!0);return An};(0,m.useEffect)(()=>{var Ut;const Pt=(Ut=Oe.current)==null?void 0:Ut.instance;if(Pt&&J&&et){const an=Pt.onDidBlurEditorWidget(()=>{Z.current=!1}),rn=Pt.onDidFocusEditorText(()=>{Z.current=!0});return()=>{an.dispose(),rn.dispose()}}},[Oe.current,J,et]),(0,m.useEffect)(()=>{var Ut;if((Ut=Oe.current)!=null&&Ut.instance&&J&&Rt){let Pt=Oe.current.instance,an=Pt.getModel();if(!an)return;(()=>{var bt;let Ft=[],zt=[];const _t=an.getAllDecorations();for(let nt of _t)nt.options.className==="highlighted-line"&&(Ft.push((bt=nt==null?void 0:nt.range)==null?void 0:bt.startLineNumber),zt.push(nt==null?void 0:nt.id));if(It===Ft[0])return;an.deltaDecorations(zt,[]);const We=an.getLineCount();It&&It<=We&&(Pt.deltaDecorations([],[{range:new Qe.Range(It,1,It,an.getLineMaxColumn(It)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Pt.revealLineInCenter(It))})();const An=(bt=!1)=>{var Ft;let zt=[],_t=[];const We=an.getAllDecorations();for(let nt of We)nt.options.linesDecorationsClassName==="breakpoints-select"&&(zt.push((Ft=nt==null?void 0:nt.range)==null?void 0:Ft.startLineNumber),_t.push(nt==null?void 0:nt.id));if(bt)return{lines:zt,ids:_t};Mt(zt)},ir=bt=>V(void 0,null,function*(){let Ft={range:new Qe.Range(bt,1,bt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield an.deltaDecorations([],[Ft]),An()}),Ne=bt=>V(void 0,null,function*(){let Ft=[];const zt=Pt.getLineDecorations(bt);for(let _t of zt)_t.options.linesDecorationsClassName==="breakpoints-select"&&Ft.push(_t.id);yield an.deltaDecorations(Ft,[]),An()}),mt=bt=>{let Ft=Pt.getLineDecorations(bt);for(let zt of Ft)if(zt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,le.isEqual)(Yt,An(!0).lines)){an.deltaDecorations(An(!0).ids,[]);const bt=Yt.map(Ft=>({range:new Qe.Range(Ft,1,Ft,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));an.deltaDecorations([],bt)}const wt=Pt.onDidChangeModelContent(bt=>{let Ft=Pt.getPosition();if(Ft){let zt=Ft.lineNumber;clearTimeout(Ge.current),Ge.current=setTimeout(()=>{X(an.getLineContent(zt),zt)?Ne(zt):mt(zt)?(Ne(zt),ir(zt)):An()},100)}}),ht=Pt.onMouseDown(bt=>{var Ft,zt,_t;if(bt.target.detail&&((_t=(zt=(Ft=bt.target)==null?void 0:Ft.element)==null?void 0:zt.className)!=null&&_t.includes("line-numbers"))){let We=bt.target.position.lineNumber;if(X(an.getLineContent(We),We))return;mt(We)?Ne(We):ir(We)}}),we=bt=>{let Ft={range:new Qe.Range(bt,1,bt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};St.current=Pt.deltaDecorations(St.current,[Ft])},at=()=>{St.current=Pt.deltaDecorations(St.current,[])},gt=Pt.onMouseMove(bt=>{var Ft,zt,_t;if(at(),bt.target.detail&&((_t=(zt=(Ft=bt.target)==null?void 0:Ft.element)==null?void 0:zt.className)!=null&&_t.includes("line-numbers"))){let We=bt.target.position.lineNumber;if(X(an.getLineContent(We),We))return;we(We)}}),Dt=Pt.onMouseLeave(()=>{at()});return()=>{wt.dispose(),ht.dispose(),gt.dispose(),Dt.dispose()}}},[Oe.current,J,Yt,It,Rt,Ce]),(0,m.useEffect)(()=>{var Ut;(Ut=Oe.current)!=null&&Ut.instance&&Rt&&Oe.current.instance.setPosition({lineNumber:0,column:0})},[It]);function tt(){let Ut=Oe.current.instance;if(Ut){const Pt=Ut.getSelection(),an=Oe.current.pastePos||{},rn=new Qe.Range(an.startLineNumber||Pt.endLineNumber,an.startColumn||Pt.endColumn,an.endLineNumber||Pt.endLineNumber,an.endColumn||Pt.endColumn);setTimeout(()=>{Ut.executeEdits("",[{range:rn,text:""}])},300)}}function Ot(Ut){(window.navigator.platform.match("Mac")?Ut.metaKey:Ut.ctrlKey)&&Ut.keyCode==83&&(Ut.preventDefault(),xe())}const Xt=()=>{if(He&&Oe.current.instance){const Ut=Oe.current.instance.getContentHeight();On(Ut<Tt?Tt:Ut)}else On(Tt)};function pn(Ut){var Pt=document.createEvent("MouseEvents");Pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ut.dispatchEvent(Pt)}const qt=Ut=>{if(!Z.current)return;const{keyCode:Pt,ctrlKey:an,metaKey:rn,target:An,type:ir}=Ut;return(ir==="paste"||(Pt===67||Pt===86)&&(rn||an))&&An.nodeName==="TEXTAREA"&&(j(),Ut.preventDefault()),!1};function nn(Ut,Pt){var an=window.URL||window.webkitURL||window,rn=new Blob([Pt]),An=document.createElementNS("http://www.w3.org/1999/xhtml","a");An.href=an.createObjectURL(rn),An.download=Ut,pn(An)}(0,m.useEffect)(()=>{Xt()},[Xt]),(0,m.useEffect)(()=>{A.current&&!J&&Promise.all([b.e(8909),b.e(2460)]).then(b.bind(b,71448)).then(Ut=>{try{Qe=Ut,Oe.current.instance=Qe.editor.create(A.current,{value:Re,language:Ke(Ce),theme:Ie,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ve||!1}},Le);const Pt=Oe.current.instance;let An=[...F.BH._menuItems].find(wt=>wt[0]._debugName=="EditorContext")[1],ir=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ne=(wt,ht)=>{var we,at;let gt=wt._first;do ht.includes((at=(we=gt.element)==null?void 0:we.command)==null?void 0:at.id)&&wt._remove(gt);while(gt=gt.next)};if(Lt(Pt,Qe),setTimeout(()=>{Xt(),Oe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{nn(jt||"educoder.txt",Pt.getValue())}})},500),Oe.current.subscription=Pt.onDidChangeModelContent(wt=>{Ee.current?clearTimeout($e.current):(Xt(),xt(Pt.getValue(),wt)),$e.current=setTimeout(()=>{Ee.current=!1},500)}),window.Monaco||C(Qe,Ke(Ce)),et&&(Ne(An,ir),A.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",qt),window.removeEventListener("paste",qt),window.addEventListener("keydown",qt),window.addEventListener("paste",qt)),window.Monaco=Qe,P&&Pt.onDidBlurEditorWidget(()=>{P(Pt.getValue())}),Et&&Pt.onDidFocusEditorText(()=>{et&&st(),Et(Pt.getValue())}),et){st();try{Pt.onDidPaste(wt=>{const ht=Pt.getSelection(),we=Oe.current.pastePos||{},at=new Qe.Range(we.startLineNumber||ht.endLineNumber,we.startColumn||ht.endColumn,we.endLineNumber||ht.endLineNumber,we.endColumn||ht.endColumn);Pt.executeEdits("",[{range:wt.range,text:""}])})}catch(wt){}}let mt=Pe();return ye&&typeof ye=="string"&&new M(ye,Pt,Qe),be(!0),()=>{const wt=Oe.current.instance;wt.dispose();const ht=wt.getModel();ht&&ht.dispose(),Oe.current.subscription&&Oe.current.subscription.dispose(),mt.unobserve(A.current)}}catch(Pt){}})},[]),(0,m.useEffect)(()=>{if(Oe.current.instance&&J)return document.addEventListener("keydown",Ot,!1),()=>{document.removeEventListener("keydown",Ot)}},[xe,J]),(0,m.useEffect)(()=>{let Ut=Oe.current.instance;if(Ut&&J){let Pt=Ke(Ce);Qe.editor.setModelLanguage(Ut.getModel(),Pt)}},[Ce,J]),(0,m.useEffect)(()=>{Oe.current.instance&&J&&Qe.editor.setTheme(Ie)},[Ie,J]),(0,m.useEffect)(()=>{let Ut=Oe.current.instance;N.current=Je,Ut&&J&&(Ut.updateOptions(se({},Je)),setTimeout(()=>{Ut.getModel().updateOptions(se({},Je))},200))},[JSON.stringify(Je),J]),(0,m.useEffect)(()=>{let Ut=Oe.current.instance;Ut&&J&&Ut.layout()},[je,Tt,J]);const[xn,Un]=(0,m.useState)(me(je)),[un,On]=(0,m.useState)(me(Tt)),en=x(se({},ce),{width:xn,height:un,position:"relative"});return m.createElement("div",{className:"my-monaco-editor",ref:A,style:en,onFocus:()=>{et&&st()}},pe&&m.createElement(ke.CopyToClipboard,{text:Re,onCopy:()=>ue.ZP.success("\u590D\u5236\u6210\u529F")},m.createElement(he.Z,{title:"\u590D\u5236\u4EE3\u7801"},m.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},m.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Vt({width:qe="100%",height:Kt="100%",original:je,modified:Tt,language:Re,options:Ce={}}){const ce=(0,m.useRef)(),[Je,Le]=(0,m.useState)(null);function Ie(He){let et;return ce.current&&(et=new de.Z(ut=>{for(let xt of ut)(xt.target.offsetHeight>0||xt.target.offsetWidth>0)&&He.layout()}),et.observe(ce.current)),et}(0,m.useEffect)(()=>(ce.current&&Promise.all([b.e(8909),b.e(9404)]).then(b.bind(b,2550)).then(He=>{Qe=He;const et=Qe.editor.createDiffEditor(ce.current,x(se({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},Ce),{wordWrap:!0}));Le(et);let ut=Ie(et);return()=>{et.dispose();const xt=et.getModel();xt&&xt.dispose(),ut.unobserve(ce.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,m.useEffect)(()=>{Je&&Je.setModel({original:Qe.editor.createModel(je,Re),modified:Qe.editor.createModel(Tt,Re)})},[je,Tt,Re,Je]);const P=me(qe),pe=me(Kt),xe={width:P,height:pe};return m.createElement("div",{className:"my-diff-editor",ref:ce,style:xe})}},61584:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return k}});var m={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT",tagsDom:"tagsDom___COQg7",hiddenbq:"hiddenbq___TqlUF"},de=b(29787),oe=b(25399),ve=b(89787),G=b(92310),g=b.n(G),fe=b(65862),ee=b(2524),o=b(59301),k=({className:S,dataSource:w=[],col:C=4,right:R,bottom:q=23,precision:Q=0,wrapWidth:K=1200,trackEventItems:D,loading:$,onRemove:M=()=>{},isCurrent:F=!0,showProgress:ue=!1,showAlias:he=!1,category:le,hiddenClick:Se})=>{const ke=Math.floor((K-(C-1)*R)/C),De=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return o.createElement(de.Z,{spinning:$},o.createElement("div",{className:g()(m.list,S)},!!(w!=null&&w.length)&&(w==null?void 0:w.map((Me,Y)=>{var B,W,re,ie,se,x,E,V,me,ze,Xe,_e,Ke;const{name:Qe,id:st,identifier:rt,featured:Vt,school_name:qe,image_url:Kt,excellent:je,is_plan:Tt}=Me;return o.createElement("div",{key:st,className:F&&ue?m.wrapisCurrent:m.wrap,style:{width:ke,marginRight:(1+Y)%C===0?0:R+Q,marginBottom:q}},o.createElement("a",{className:m.li,onClick:Re=>{Re.preventDefault(),Re.stopPropagation(),D&&(0,fe.L9)([D]),(0,fe.xg)(`/paths/${rt}`)}},o.createElement("div",{className:m.img},o.createElement("img",{className:m.cover,src:`${Kt}`}),(B=Me==null?void 0:Me.subject_tags)==null?void 0:B.map((Re,Ce)=>{var ce,Je;if(Ce===0){const Ie=(ce=De.find(P=>P.name==Re))==null?void 0:ce.swimg;return o.createElement("img",{className:m.sign,src:Ie,style:{left:"-4px"}})}const Le=(Je=De.find(Ie=>Ie.name==Re))==null?void 0:Je.ptimg;return o.createElement("img",{className:m.sign,src:Le,style:{left:`${48+52*(Ce-1)+2*Ce}px`}})}),o.createElement("div",{className:m.tagsDom},o.createElement("div",{className:"flex flex-wrap gap-10px item-center"},(Me==null?void 0:Me.excellent)&&o.createElement("div",{className:m.bq},"\u5F00\u653E\u8BFE\u7A0B"),((W=Me==null?void 0:Me.custom_tags)==null?void 0:W.length)>0&&o.createElement(oe.Z,{title:(se=(ie=Me==null?void 0:Me.custom_tags)==null?void 0:ie[((re=Me==null?void 0:Me.custom_tags)==null?void 0:re.length)-1])==null?void 0:se.tag_name},o.createElement("div",{className:"px-6px rounded-2px c-white h-16px flex item-center",style:{maxWidth:"62px",background:"#3061D0",border:"0.5px solid #8FAFF8"}},o.createElement("span",{className:"multi-llipsis1e text-10px"},(V=(E=Me==null?void 0:Me.custom_tags)==null?void 0:E[((x=Me==null?void 0:Me.custom_tags)==null?void 0:x.length)-1])==null?void 0:V.tag_name))))),le=="hide"&&(Me==null?void 0:Me.studying)&&F&&o.createElement("div",{className:`${m.movebq} user-path-items`,onClick:Re=>{Re.stopPropagation(),M(Me)}},o.createElement("i",{className:"iconfont icon-yichu1 font12"}),o.createElement("span",null,"\u79FB\u9664")),!["collect","payed"].includes(le)&&F&&o.createElement("div",{className:`${m.hiddenbq} user-path-items`,onClick:Re=>{Re.stopPropagation(),Se(Me)}},o.createElement("i",{className:`iconfont ${le=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),o.createElement("span",null,le=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF"))),o.createElement("div",{className:m.name},o.createElement(oe.Z,{title:he&&(Me!=null&&Me.excellent_alias_name)?o.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Qe}`,o.createElement("br",null),o.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Me==null?void 0:Me.excellent_alias_name}`)):Qe},o.createElement("span",{className:m.e},he&&(Me==null?void 0:Me.excellent_alias_name)||Qe))),F&&ue&&((me=Me==null?void 0:Me.progress)==null?void 0:me.all_score)!=0&&o.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},o.createElement(ve.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((ze=Me==null?void 0:Me.progress)==null?void 0:ze.my_score)/((Xe=Me==null?void 0:Me.progress)==null?void 0:Xe.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(_e=Me==null?void 0:Me.progress)==null?void 0:_e.my_score,"/",(Ke=Me==null?void 0:Me.progress)==null?void 0:Ke.all_score),(!F||!ue)&&o.createElement(oe.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${qe}`},o.createElement("div",{className:m.unit},o.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),qe)),(!F||!ue)&&o.createElement("div",{className:m.tags},o.createElement("div",null,o.createElement(oe.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),o.createElement("span",null,Me.stages_count))),o.createElement(oe.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),o.createElement("span",null,Me.members_count)))))))})),!w.length&&o.createElement(ee.Z,null)))}},82636:function(ln,ct,b){"use strict";b.d(ct,{jL:function(){return G},w9:function(){return me},QD:function(){return jt},cQ:function(){return ie.Z},op:function(){return ut},O5:function(){return j},_b:function(){return Ve},t7:function(){return K},Gi:function(){return st},YG:function(){return Ke},qp:function(){return k},vr:function(){return It},qE:function(){return Et},Je:function(){return M},wb:function(){return re},cq:function(){return Tt},tp:function(){return C}});var m=b(59301),de={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},oe="data:image/png;base64,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",G=({dataSource:Ye=[],img:X,imgWidth:tt=346,title:Ot,sunTitle:Xt,bannerExtraContent:pn})=>m.createElement("div",{className:de.banner},m.createElement("div",{className:de.content},m.createElement("aside",null,m.createElement("p",null,m.createElement("b",null,Ot),m.createElement("span",null,Xt)),Ye.length>0&&m.createElement("div",{className:de.btns},Ye.map((qt,nn)=>m.createElement("div",{key:nn,onClick:qt.click},qt.name,qt.sign?m.createElement("img",{src:oe,width:39}):null))),pn),X&&m.createElement("img",{style:{marginTop:33,marginRight:38},src:X,width:tt}))),g={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},fe=b(92310),ee=b.n(fe),o=b(89392),k=({dataSource:Ye=[],value:X,onChange:tt,onTitleChange:Ot,className:Xt,title:pn,titleWidth:qt=41,style:nn={},fontColor:xn="#6A7283",showCount:Un})=>{const[un,On]=(0,m.useState)(1),[en,Ut]=(0,m.useState)(!1),Pt=(0,m.useRef)(null),an=(0,m.useRef)(null);return(0,m.useEffect)(()=>{var rn;Ye.length!==0&&(((rn=Pt==null?void 0:Pt.current)==null?void 0:rn.clientHeight)>97?On(1):On(0)),Ye.length===0&&On(0),Ut(!1)},[Ye]),m.createElement("div",{className:ee()(g.row,Xt,"fadeIn","animated"),style:nn},m.createElement("div",{onClick:(0,o.throttle)(()=>Ot==null?void 0:Ot(),2e3),style:{width:qt,marginTop:en?12:4},className:`${g.title} ${Ot?"current":""}`},pn),m.createElement("div",{className:en?`${g.tagsWrap} ${g.tagsBorderWrap}`:g.tagsWrap},m.createElement("div",{className:g.bar,ref:an,style:un>0?{height:un===1?97:"auto",overflow:un===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},m.createElement("div",{className:g.tag,ref:Pt},Ye==null?void 0:Ye.map(rn=>m.createElement("span",{onClick:()=>tt(rn.id),key:rn.id,style:{color:xn},className:X===rn.id?g.active:""},m.createElement("span",{title:rn.name,className:g.name},rn.name),!!Un&&m.createElement("span",{className:g.num},rn.count))))),!!un&&m.createElement(m.Fragment,null,un===1?m.createElement("div",{onClick:()=>{var rn;On(2),((rn=Pt==null?void 0:Pt.current)==null?void 0:rn.clientHeight)>245?Ut(!0):Ut(!1)},className:g.action},"\u5C55\u5F00",m.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):m.createElement("div",{onClick:()=>{an.current.scrollTop=0,On(1),Ut(!1)},className:g.action},"\u6536\u8D77",m.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},S={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},C=({dataSource:Ye=[],value:X,onChange:tt,className:Ot,style:Xt={}})=>m.createElement("div",{style:Xt,className:ee()(S.tabs,Ot)},Ye.map(pn=>m.createElement("span",{onClick:()=>tt(pn.id),className:X===pn.id?S.active:"",key:pn.id},pn.name))),R={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},q=b(37568),K=({dataSource:Ye=[],value:X="",onChange:tt,onInputChange:Ot=()=>{},className:Xt,style:pn={},placeholder:qt,allowClear:nn=!1})=>{var xn;const[Un,un]=(0,m.useState)(""),[On,en]=(0,m.useState)("");(0,m.useEffect)(()=>{var an;let rn=X;(an=JSON.stringify(X))!=null&&an.includes("{")&&(un(X.id),rn=X.value||"");try{en(decodeURIComponent(rn||""))}catch(An){en(decodeURIComponent(rn||""))}},[X]);const Ut=()=>{tt(encodeURIComponent(On),Un||null)},Pt=an=>{an!==Un&&(un(an),tt(encodeURIComponent(On),an))};return m.createElement("div",{className:ee()(R.input,Xt),style:pn},!!Ye.length&&m.createElement("div",{className:R.dropdown},m.createElement("div",{className:R.text},(xn=Ye.find(an=>an.id===Un))==null?void 0:xn.name,m.createElement("i",{className:"iconfont icon-zhankai4"}),m.createElement("b",{className:R.b1}),m.createElement("b",{className:R.b2})),m.createElement("div",{className:R.menu},Ye.map((an,rn)=>m.createElement("div",{key:rn,onClick:()=>Pt(an.id)},an.name)))),m.createElement(q.default,{onPressEnter:Ut,value:On,onChange:an=>{en(an.target.value),Ot(encodeURIComponent(an.target.value),Un||null)},placeholder:qt,variant:"borderless",allowClear:nn,onClear:()=>tt("",Un||null)}),m.createElement("i",{onClick:Ut,className:"iconfont icon-sousuo9 font14 current"}))},D={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},M=({value:Ye,onChange:X,className:tt,total:Ot,pageSize:Xt,style:pn={}})=>{const qt=Ye<2,nn=Ye>=Math.ceil(Ot/Xt);return Ot<=Xt?m.createElement(m.Fragment,null):m.createElement("div",{className:ee()(D.quickPager,tt),style:pn},m.createElement("div",{onClick:()=>{qt||X(Ye-1,"prev")},className:qt?D.disabled:""},"\u4E0A\u4E00\u9875"),m.createElement("div",{onClick:()=>{nn||X(Ye+1,"next")},className:nn?D.disabled:""},"\u4E0B\u4E00\u9875"))},F={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},ue=b(29787),he=b(25399),le=b(63139),Se=b(74128),ke=b(65862),De=b(96908),Me=b(57177),Y=b(81378),B=b(2524),re=({className:Ye,dataSource:X=[],col:tt=4,right:Ot,bottom:Xt=23,precision:pn=0,wrapWidth:qt=1200,trackEventItems:nn,loading:xn})=>{const Un=Math.floor((qt-(tt-1)*Ot)/tt);return m.createElement(ue.Z,{spinning:xn},m.createElement("div",{className:ee()(F.list,Ye)},!!X.length&&X.map((un,On)=>{const{name:en,id:Ut,identifier:Pt,power:an,cover_image_id:rn,pic:An}=un;return m.createElement("div",{className:F.wrap,key:Ut,style:{width:Un,marginRight:(1+On)%tt===0?0:Ot+pn,marginBottom:Xt}},m.createElement("a",{target:"_blank",href:`/shixuns/${Pt}/challenges`,className:F.li,onClick:ir=>{ir.preventDefault(),nn&&(0,ke.L9)([nn]),an&&(0,ke.xg)(`/shixuns/${Pt}/challenges`)}},m.createElement("div",{className:F.img},m.createElement("img",{className:F.cover,src:`${An}`}),un.is_jupyter&&m.createElement("img",{className:F.sign,src:De}),un.is_jupyter_lab&&m.createElement("img",{className:F.sign,src:Me}),un.is_unity_3d&&m.createElement("img",{className:F.sign,src:Y})),m.createElement("div",{className:F.name},m.createElement(he.Z,{title:en||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},m.createElement("span",{className:F.e},en||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),m.createElement("div",{className:F.tags},m.createElement(he.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),m.createElement("span",null,un.challenges_count))),!!un.myshixuns_count&&m.createElement(he.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),m.createElement("span",null,un.myshixuns_count))),m.createElement(he.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},m.createElement("span",null,m.createElement("span",null,un.level))),m.createElement("div",{className:F.rate},m.createElement(le.Z,{allowHalf:!0,disabled:!0,defaultValue:un.score_info}),m.createElement("span",null,"\xA0",un.score_info?`${un.score_info}\u5206`:"5\u5206")))),!an&&m.createElement("div",{className:F.lockWrap},m.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),m.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!X.length&&m.createElement(B.Z,null)))},ie=b(61584),se={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",hidden:"hidden___NniIi",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},x="data:image/png;base64,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",E=b(59301),me=({className:Ye,dataSource:X=[],col:tt=4,right:Ot,bottom:Xt=23,precision:pn=0,wrapWidth:qt=1200,trackEventItems:nn,loading:xn,category:Un,hiddenClick:un,handleVery:On=()=>!0,isCurrent:en})=>{const Ut=Math.floor((qt-(tt-1)*Ot)/tt);return E.createElement(ue.Z,{spinning:xn},E.createElement("div",{className:ee()(se.list,Ye)},!!X.length&&X.map((Pt,an)=>{const{subject_identifier:rn,id:An,identifier:ir,power:Ne}=Pt,mt=Pt.is_public!=0&&Pt.is_public;return E.createElement("div",{className:se.wrap,key:An,style:{width:Ut,marginRight:(1+an)%tt===0?0:Ot+pn,marginBottom:Xt}},E.createElement("a",{className:se.li,onClick:wt=>{wt.preventDefault(),On(Pt==null?void 0:Pt.first_category_url)&&(nn&&(0,ke.L9)([nn]),(0,ke.xg)(Pt.first_category_url))}},E.createElement("div",{className:se.top},E.createElement(he.Z,{title:Pt.name},E.createElement("div",{className:se.name},Pt.name)),E.createElement("img",{className:se.img,src:Se.Z.IMG_SERVER+"/images/"+Pt.avatar_url}),E.createElement("div",{className:se.text,title:Pt.creator},Pt.creator),rn&&E.createElement("div",{className:se.btns},E.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),E.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),mt&&E.createElement("div",{className:se.sign},"\u516C\u5F00"),en&&E.createElement("div",{className:se.hidden,onClick:wt=>{wt.stopPropagation(),un(Pt)}},E.createElement("i",{className:`iconfont ${Un=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),Un=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")),E.createElement("div",{className:se.bottom},Pt.visits>0&&E.createElement(he.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},E.createElement("span",null,E.createElement("i",{className:"iconfont icon-liulanyan"}),E.createElement("span",null,Pt.visits))),Pt.course_members_count>0&&E.createElement(he.Z,{title:"\u6210\u5458",placement:"bottom"},E.createElement("span",null,E.createElement("i",{className:"iconfont icon-chengyuan"}),Pt.course_members_count)),Pt.tasks_count>0&&E.createElement(he.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},E.createElement("span",null,E.createElement("i",{className:"iconfont icon-zuoye"}),Pt.tasks_count)),Pt.is_end?E.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):E.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Pt.is_accessible&&E.createElement("div",{className:se.lockWrap},E.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),E.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!X.length&&E.createElement(B.Z,null)))},ze={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Xe=b(65582),Ke=({dataSource:Ye=[],value:X,onChange:tt,className:Ot,style:Xt={},tabBarExtraContent:pn})=>m.createElement("div",{className:ee()(ze.tabs,Ot),style:Xt},m.createElement("div",{className:ze.tabsWrap},Ye.map((qt,nn)=>!(qt!=null&&qt.hide)&&m.createElement("aside",{className:ze.tab,onClick:()=>{tt(qt.id),qt.link&&Xe.history.push(qt.link)},key:nn},m.createElement("div",{className:X===qt.id?ze.active:""},qt.name),(qt==null?void 0:qt.resetCount)==null&&(qt==null?void 0:qt.total)!==void 0&&m.createElement("span",null,"\uFF08",qt==null?void 0:qt.total,"\uFF09"),(qt==null?void 0:qt.resetCount)!==void 0&&(qt==null?void 0:qt.total)!==void 0&&m.createElement(he.Z,{title:(qt==null?void 0:qt.tip)!=null?qt==null?void 0:qt.tip:""},m.createElement("span",{style:{color:"#9096A3"}},"\uFF08",m.createElement("span",{style:{color:"#000"}},qt==null?void 0:qt.resetCount),"/",m.createElement("span",null,qt==null?void 0:qt.total),"\uFF09"))))),m.createElement("div",{className:ze.tabBar},pn)),st=({className:Ye,style:X={},children:tt})=>m.createElement("div",{className:ee()(Ye),style:X},tt),rt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Vt=b(75727),qe=b(93041);const Kt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Tt=({sortValue:Ye,dropValue:X,className:tt,onSort:Ot,onDrop:Xt,dataSource:pn=Kt})=>{var qt;return m.createElement("div",{className:ee()(rt.orderWrap,tt)},m.createElement(Vt.Z,{dropdownRender:()=>m.createElement(qe.default,null,pn.map((nn,xn)=>m.createElement(qe.default.Item,{key:xn,onClick:()=>Xt(nn.id)},nn.name)))},m.createElement("span",{className:rt.orderTextWrap},(qt=pn.find(nn=>X===nn.id))==null?void 0:qt.name)),m.createElement("span",{className:rt.orderIconWrap},m.createElement("span",{className:rt.orderAsc},m.createElement("i",{className:Ye==="asc"?`iconfont icon-sanjiaoxing-up font12 ${rt.cursorPointer} ${rt.active}`:`iconfont icon-sanjiaoxing-up font12 ${rt.cursorPointer}`,onClick:()=>Ot(Ye==="asc"?"desc":"asc")})),m.createElement("span",{className:rt.orderDesc},m.createElement("i",{className:Ye==="desc"?`iconfont icon-sanjiaoxing-down font12 ${rt.cursorPointer} ${rt.active}`:`iconfont icon-sanjiaoxing-down font12 ${rt.cursorPointer}`,onClick:()=>Ot(Ye==="asc"?"desc":"asc")}))))},Re={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Ce=b(7939),ce=Object.defineProperty,Je=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,P=(Ye,X,tt)=>X in Ye?ce(Ye,X,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Ye[X]=tt,pe=(Ye,X)=>{for(var tt in X||(X={}))Le.call(X,tt)&&P(Ye,tt,X[tt]);if(Je)for(var tt of Je(X))Ie.call(X,tt)&&P(Ye,tt,X[tt]);return Ye},xe=(Ye,X)=>{var tt={};for(var Ot in Ye)Le.call(Ye,Ot)&&X.indexOf(Ot)<0&&(tt[Ot]=Ye[Ot]);if(Ye!=null&&Je)for(var Ot of Je(Ye))X.indexOf(Ot)<0&&Ie.call(Ye,Ot)&&(tt[Ot]=Ye[Ot]);return tt},He=(Ye,X,tt)=>new Promise((Ot,Xt)=>{var pn=xn=>{try{nn(tt.next(xn))}catch(Un){Xt(Un)}},qt=xn=>{try{nn(tt.throw(xn))}catch(Un){Xt(Un)}},nn=xn=>xn.done?Ot(xn.value):Promise.resolve(xn.value).then(pn,qt);nn((tt=tt.apply(Ye,X)).next())}),ut=Ye=>{var X=Ye,{className:tt,style:Ot,children:Xt,loading:pn=!1,openLoading:qt,onClick:nn=()=>{},size:xn="middle",shape:Un="round"}=X,un=xe(X,["className","style","children","loading","openLoading","onClick","size","shape"]);const[On,en]=(0,m.useState)(!1);return m.createElement(Ce.ZP,pe({onClick:(0,o.throttle)(Ut=>He(void 0,null,function*(){qt&&en(!0);try{yield nn(Ut)}catch(Pt){console.log("error",Pt)}qt&&en(!1)}),2e3,{leading:!0,trailing:!1}),className:ee()(Re.btn,Re[`${xn}-${Un}`],tt),style:Ot,size:xn,shape:Un,loading:On||pn},un),Xt)},xt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Et=({className:Ye,style:X,children:tt=null,onClick:Ot,title:Xt})=>m.createElement("div",{className:ee()(xt.head,Ye),style:X},m.createElement("span",{className:"primary-hover",onClick:Ot},m.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),m.createElement("b",{title:Xt},Xt),m.createElement("div",{className:xt.node},tt)),Mt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},jt=({confirmShow:Ye=!0,confirmTitle:X,confirmClick:tt,cancelShow:Ot=!0,cancelTitle:Xt,cancelClick:pn,className:qt,style:nn,confirmLoading:xn=!1})=>m.createElement("div",{className:ee()(Mt.btns,qt),style:nn},Ye&&m.createElement(Ce.ZP,{loading:xn,onClick:tt,type:"primary",className:Mt.confirm},X),Ot&&m.createElement(Ce.ZP,{onClick:pn,className:Mt.cancel},Xt)),$t={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},It=({className:Ye,style:X={},LeftContent:tt,children:Ot,RightContent:Xt})=>m.createElement("div",{className:ee()($t.fixedBottom,Ye),style:X},m.createElement("div",{className:$t.wrap},m.createElement("div",{className:$t.left},tt),m.createElement("div",{className:$t.center},Ot),m.createElement("div",{className:$t.right},Xt))),Rt={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Ve=({className:Ye,style:X={},dataSource:tt=[]})=>m.createElement("div",{className:ee()(Rt.crumbs,Ye),style:X},tt.map((Ot,Xt)=>Xt<tt.length-1?m.createElement(m.Fragment,{key:Xt},Ot.path||Ot.onClick?m.createElement("span",{className:Rt.hover,onClick:Ot!=null&&Ot.onClick?Ot.onClick:()=>Xe.history.push(Ot.path)},Ot.name):m.createElement("span",null,Ot.name),m.createElement("span",null,"\xA0",">","\xA0")):m.createElement("span",{key:Xt,style:{color:"#5F6368"}},Ot.name))),_=b(11938),A=Object.defineProperty,Oe=Object.defineProperties,N=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,$e=(Ye,X,tt)=>X in Ye?A(Ye,X,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Ye[X]=tt,Ge=(Ye,X)=>{for(var tt in X||(X={}))St.call(X,tt)&&$e(Ye,tt,X[tt]);if(ae)for(var tt of ae(X))Ee.call(X,tt)&&$e(Ye,tt,X[tt]);return Ye},Z=(Ye,X)=>Oe(Ye,N(X)),J=(Ye,X)=>{var tt={};for(var Ot in Ye)St.call(Ye,Ot)&&X.indexOf(Ot)<0&&(tt[Ot]=Ye[Ot]);if(Ye!=null&&ae)for(var Ot of ae(Ye))X.indexOf(Ot)<0&&Ee.call(Ye,Ot)&&(tt[Ot]=Ye[Ot]);return tt};const{Countdown:be}=_.default;var j=Ye=>{var X=Ye,{onChange:tt}=X,Ot=J(X,["onChange"]);const[Xt,pn]=(0,m.useState)(null);(0,m.useEffect)(()=>{typeof Xt=="number"&&Xt>=0&&tt(Xt)},[Xt]);const qt=nn=>{const xn=Math.floor(nn/1e3);pn(xn)};return m.createElement(be,Z(Ge({},Ot),{onChange:qt}))}},97179:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ue}});var m=b(59301),de=b(28284),oe=b(6767),ve=b(62957),G=b(37568),g=b(94968),fe={flex_box_center:"flex_box_center___eFoM9",flex_space_between:"flex_space_between___Wg6Gr",flex_box_vertical_center:"flex_box_vertical_center___TqrrQ",flex_box_center_end:"flex_box_center_end___L9c4u",flex_box_column:"flex_box_column___SvH8v",form:"form___LQCl5",btn:"btn___l3d4K",img:"img___CeTIL"},ee=b(70031),o=b(74128),H=b(19248),k=b(82636),S=Object.defineProperty,w=Object.defineProperties,C=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,K=(he,le,Se)=>le in he?S(he,le,{enumerable:!0,configurable:!0,writable:!0,value:Se}):he[le]=Se,D=(he,le)=>{for(var Se in le||(le={}))q.call(le,Se)&&K(he,Se,le[Se]);if(R)for(var Se of R(le))Q.call(le,Se)&&K(he,Se,le[Se]);return he},$=(he,le)=>w(he,C(le)),M=(he,le,Se)=>new Promise((ke,De)=>{var Me=W=>{try{B(Se.next(W))}catch(re){De(re)}},Y=W=>{try{B(Se.throw(W))}catch(re){De(re)}},B=W=>W.done?ke(W.value):Promise.resolve(W.value).then(Me,Y);B((Se=Se.apply(he,le)).next())}),ue=({visible:he,onOk:le,onCancel:Se,title:ke=""})=>{var De,Me;const[Y]=de.default.useForm(),[B,W]=(0,m.useState)(!1),[re,ie]=(0,m.useState)([]),[se,x]=(0,m.useState)(!1);console.log(he,22),(0,m.useEffect)(()=>{var Qe,st;if(he!=null&&he.id){Y.setFieldsValue($(D({},he),{attachment_id:(Qe=he==null?void 0:he.attachment)==null?void 0:Qe.id}));const rt=[$(D({},he==null?void 0:he.attachment),{response:{id:(st=he==null?void 0:he.attachment)==null?void 0:st.id}})];ie(rt)}},[he]);const E=()=>{Y.submit()},V=()=>{Se()},me=Qe=>M(void 0,null,function*(){var st,rt;W(!0);const Vt=$(D({},Qe),{attachment_id:((rt=(st=re==null?void 0:re[0])==null?void 0:st.response)==null?void 0:rt.id)||""});le(Vt)}),ze=Qe=>{var st,rt,Vt;Y.setFieldsValue({attachment_id:""}),["uploading","done","removed"].includes(Qe.file.status)&&(Qe.file.status==="uploading"&&x(!0),Qe.file.status==="done"&&x(!1),ie(Qe.fileList),Y.setFieldsValue({attachment_id:(Vt=(rt=(st=Qe.fileList)==null?void 0:st[0])==null?void 0:rt.response)==null?void 0:Vt.id}))},Xe=Qe=>{ie([])},_e=Qe=>Qe.type==="image/jpeg"||Qe.type==="image/png"?Qe.size/1024/1024>2?(oe.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),Promise.reject()):(ie([]),!0):(oe.ZP.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),Promise.reject()),Ke=()=>{var Qe,st;return m.createElement("div",{className:fe.img},m.createElement("img",{src:o.Z.API_SERVER+"/api/attachments/"+((st=(Qe=re==null?void 0:re[0])==null?void 0:Qe.response)==null?void 0:st.id),alt:"avatar",style:{width:"100%"}}),m.createElement("div",null,m.createElement(H.Z,{onClick:()=>{ie([]),Y.setFieldsValue({attachment_id:""})},style:{fontSize:"16px",color:"red"}})))};return m.createElement(ve.default,{title:`${he!=null&&he.id?"\u7F16\u8F91":"\u65B0\u5EFA"}${ke}`,open:he,onOk:E,centered:!0,onCancel:V,confirmLoading:B,okButtonProps:{disabled:se},width:686,afterClose:()=>{W(!1),ie([]),Y.resetFields()},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:ee.Z.CustomCss},m.createElement(de.default,{form:Y,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:me,className:fe.form},m.createElement(de.default.Item,{label:`${ke}\u540D\u79F0`,name:"name",rules:[{required:!0,message:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`},{whitespace:!0,message:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`},{max:100,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},m.createElement(G.default,{maxLength:100,placeholder:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`})),m.createElement(de.default.Item,{label:"\u4F5C\u8005",name:"author",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005"},{max:50,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},m.createElement(G.default,{maxLength:50,placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005"})),m.createElement(de.default.Item,{label:"\u51FA\u7248\u793E",name:"publisher",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"},{whitespace:!0,message:"\u5B9E\u8DF5\u51FA\u7248\u793E"},{max:50,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},m.createElement(G.default,{maxLength:50,placeholder:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"})),m.createElement(de.default.Item,{label:"\u51FA\u7248\u65F6\u95F4",name:"publication_time",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"}]},m.createElement(G.default,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"})),m.createElement(de.default.Item,{label:"ISBN",name:"number",rules:[{required:!0,message:"\u8BF7\u8F93\u5165ISBN"},{whitespace:!0,message:"\u8BF7\u8F93\u5165ISBN"}]},m.createElement(G.default,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165ISBN"})),m.createElement(de.default.Item,{name:"attachment_id",label:"\u5C01\u9762\u56FE\u7247",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE\u7247"}]},m.createElement("div",{className:fe.upload},(Me=(De=re==null?void 0:re[0])==null?void 0:De.response)!=null&&Me.id?Ke():m.createElement(g.default,{fileList:re,action:`${o.Z.API_SERVER}/api/attachments.json`,onChange:Qe=>ze(Qe),onRemove:Qe=>Xe(Qe),beforeUpload:Qe=>_e(Qe),withCredentials:!0,accept:"image/*"},m.createElement(k.op,{style:{borderRadius:"2px",marginLeft:4,marginTop:3}},m.createElement("i",{className:"iconfont icon-shangchuantupian2 mr5"}),"\u4E0A\u4F20\u56FE\u7247")))),m.createElement(de.default.Item,{label:"\u8D2D\u4E66\u94FE\u63A5",name:"buy_url",rules:[{type:"url",message:"\u8D2D\u4E66\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E"}]},m.createElement(G.default,{placeholder:"\u8BF7\u8F93\u5165\u8D2D\u4E66\u94FE\u63A5",maxLength:150})),m.createElement(de.default.Item,{label:"\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5",name:"relevance_url",rules:[{type:"url",message:"\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E"}]},m.createElement(G.default,{placeholder:"\u8BF7\u8F93\u5165\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5",maxLength:150}))))}},32833:function(ln,ct,b){"use strict";b.r(ct),b.d(ct,{default:function(){return Se}});var m=b(59301),de=b(65582),oe=b(77019),ve=b(5269),G=b(458),g=b(25399),fe=b(2524),ee={flex_box_center:"flex_box_center___ib72a",flex_space_between:"flex_space_between___QmDfb",flex_box_vertical_center:"flex_box_vertical_center___XXhZp",flex_box_center_end:"flex_box_center_end___HeMGP",flex_box_column:"flex_box_column___g0Y22",Onerow:"Onerow___vo6jS",MultiLine:"MultiLine___W7Vel",wrap:"wrap___VxAa4",list:"list___BOHb1",left:"left___KgBuF",right:"right___bBZU2",title:"title___uBnVu",des:"des___MgP7x",PieceFenbuList:"PieceFenbuList___gzTyL",PieceFenbuItem:"PieceFenbuItem___Z9J18",MultiLine3:"MultiLine3___KeM07"},o=b(38147),H=b(82636),k="data:image/png;base64,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",S="data:image/png;base64,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",w=b(97179),C=b(95097),R=b(74128),q=b(41867),Q=b(65862),K=Object.defineProperty,D=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,F=(ke,De,Me)=>De in ke?K(ke,De,{enumerable:!0,configurable:!0,writable:!0,value:Me}):ke[De]=Me,ue=(ke,De)=>{for(var Me in De||(De={}))$.call(De,Me)&&F(ke,Me,De[Me]);if(D)for(var Me of D(De))M.call(De,Me)&&F(ke,Me,De[Me]);return ke},he=(ke,De,Me)=>new Promise((Y,B)=>{var W=se=>{try{ie(Me.next(se))}catch(x){B(x)}},re=se=>{try{ie(Me.throw(se))}catch(x){B(x)}},ie=se=>se.done?Y(se.value):Promise.resolve(se.value).then(W,re);ie((Me=Me.apply(ke,De)).next())});const le=({globalSetting:ke,dispatch:De,virtualSpaces:Me})=>{const[Y,B]=(0,m.useState)(!0),[W,re]=(0,m.useState)(!1),[ie,se]=(0,m.useState)(parseInt(localStorage.getItem("isMaterPieceFenbu")||"1")),[x,E]=(0,m.useState)([]),{virtualSpacesDetails:V}=Me,me=(0,de.useParams)(),[ze,Xe]=(0,m.useState)("1"),_e=(V==null?void 0:V.is_member)||(0,q.Ny)();(0,m.useEffect)(()=>{Ke()},[ze,window.localStorage.getItem("vtrsModuleId")]);const Ke=()=>he(void 0,null,function*(){B(!0);const rt=yield(0,o.ZP)(`/api/virtual_classrooms/${me.virtual_spacesId}/subject_materials/list.json`,{method:"get",params:{material_type:ze,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});(rt==null?void 0:rt.status)!==-1&&E((rt==null?void 0:rt.list)||[]),B(!1)}),Qe=[{id:"1",name:"\u4E3B\u6559\u6750"},{id:"2",name:"\u5B9E\u8DF5\u6559\u6750"}],st=rt=>he(void 0,null,function*(){const Vt=yield(0,o.ZP)(`/api/virtual_classrooms/${me.virtual_spacesId}/subject_materials.json`,{method:"post",body:ue({material_type:ze,virtual_module_id:window.localStorage.getItem("vtrsModuleId")},rt)});(Vt==null?void 0:Vt.status)!==-1&&(Ke(),re(!1))});return m.createElement("section",{className:ee.wrap},m.createElement(H.YG,{value:ze,onChange:rt=>{Xe(rt)},tabBarExtraContent:_e&&m.createElement(oe.Z,{align:"middle"},m.createElement(ve.Z,{className:"mr20"},m.createElement("i",{className:`iconfont ${ie!=1?"icon-fenbu-2":"icon-fenbu"}`,onClick:()=>{se(ie!=1?1:2),localStorage.setItem("isMaterPieceFenbu",`${ie!=1?1:2}`)}})),ze==="1"&&m.createElement(H.op,{onClick:()=>re(!0)},m.createElement("img",{className:"mr5",width:20,style:{marginTop:-2},src:k}),"\u65B0\u5EFA\u4E3B\u6559\u6750"),ze==="2"&&m.createElement(H.op,{onClick:()=>re(!0)},m.createElement("img",{className:"mr5",width:20,style:{marginTop:-2},src:S}),"\u65B0\u5EFA\u5B9E\u8DF5\u6559\u6750")),dataSource:Qe}),m.createElement(G.Z,{className:"mt20",loading:Y},!x.length&&m.createElement(fe.Z,null),ie!=1?m.createElement("div",{className:ee.PieceFenbuList},x.map(rt=>{const{name:Vt,id:qe,attachment:Kt,author:je,publisher:Tt,number:Re,publication_time:Ce,description:ce}=rt;return m.createElement(oe.Z,{key:qe,className:ee.PieceFenbuItem,wrap:!1,onClick:()=>de.history.push(`/${Q.AS}/${me.virtual_spacesId}/material/${qe}/detail?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},m.createElement(oe.Z,{style:{flexDirection:"column",width:171}},m.createElement("img",{width:171,height:215,src:R.Z.API_SERVER+(Kt==null?void 0:Kt.url)}),m.createElement(ve.Z,{className:"font12",style:{marginTop:"15px"}},"\u4F5C\u8005\uFF1A",je),m.createElement(ve.Z,{className:"mt10 font12"},"\u51FA\u7248\u793E\uFF1A",Tt),m.createElement(ve.Z,{className:"mt10 font12"},"ISBN\uFF1A",Re),m.createElement(ve.Z,{className:"mt10 font12"},"\u51FA\u7248\u65F6\u95F4\uFF1A",Ce)),m.createElement(oe.Z,{className:"ml20",style:{flexDirection:"column",flex:1,position:"relative"}},m.createElement(g.Z,{placement:"topLeft",title:Vt},m.createElement(ve.Z,{className:`${ee.MultiLine} font16`,style:{marginTop:"13px",fontWeight:500}},Vt)),m.createElement(ve.Z,{className:ee.MultiLine3},m.createElement(C.Z,{showTextOnly:!0,value:"\u7B80\u4ECB\uFF1A"+(ce||"\u6682\u672A\u586B\u5199\u5185\u5BB9\uFF5E")}))))})):m.createElement(m.Fragment,null,x.map(rt=>{const{name:Vt,id:qe,attachment:Kt,author:je,publisher:Tt,number:Re,publication_time:Ce,description:ce}=rt;return m.createElement("div",{key:qe,className:ee.list,onClick:()=>de.history.push(`/${Q.AS}/${me.virtual_spacesId}/material/${qe}/detail?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},m.createElement("div",{className:ee.left},m.createElement("img",{src:R.Z.API_SERVER+(Kt==null?void 0:Kt.url)})),m.createElement("div",{className:ee.right},m.createElement("div",{className:ee.title},Vt),m.createElement("aside",null,m.createElement(g.Z,{title:je},m.createElement("span",null,"\u4F5C\u8005\uFF1A",je)),m.createElement(g.Z,{title:Tt},m.createElement("span",null,"\u51FA\u7248\u793E\uFF1A",Tt))),m.createElement("aside",null,m.createElement(g.Z,{title:Re},m.createElement("span",null,"ISBN\uFF1A",Re)),m.createElement("span",null,"\u51FA\u7248\u65F6\u95F4\uFF1A",Ce)),m.createElement("div",{className:"c-grey-666 font14 mb5"},"\u7B80\u4ECB\uFF1A"),m.createElement("div",{className:ee.des},m.createElement(C.Z,{showTextOnly:!0,showLines:3,value:ce||""}))))}))),m.createElement(w.Z,{visible:W,title:ze==="1"?"\u4E3B\u6559\u6750":"\u5B9E\u8DF5\u6559\u6750",onCancel:()=>re(!1),onOk:st}))};var Se=(0,de.connect)(({virtualSpaces:ke,globalSetting:De})=>({globalSetting:De,virtualSpaces:ke}))(le)},49142:function(ln,ct,b){"use strict";b.d(ct,{AL:function(){return M},Iy:function(){return k},Qv:function(){return C},ez:function(){return $},jb:function(){return S}});var m=b(32834),de=b.n(m),oe=b(11690),ve=b.n(oe);let G=1;function g(Se,ke){const De=Se.match(/^(\s+)(?:```)/);if(De===null)return ke;const Me=De[1];return ke.split(`
`).map(Y=>{const B=Y.match(/^\s+/);if(B===null)return Y;const[W]=B;return W.length>=Me.length?Y.slice(Me.length):Y}).join(`
`)}let fe=[],ee=["<ul>"];const o=new(de()).Renderer,H=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function k(){fe.length=0,ee=["<ul>"]}const S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(Se,ke,De,Me){if(ke>=Se.length||Se[ke].level<=De)return ke;var Y=Se[ke];Me.push("<li><a href='#"+G+Y.anchor+"'>"+Y.text+"</a>"),ke++;var B=[];return ke=w(Se,ke,Y.level,B),B.length>0&&(Me.push("<ul>"),B.forEach(function(W){Me.push(W)}),Me.push("</ul>")),Me.push("</li>"),ke=w(Se,ke,De,Me),ke}function C(){return w(fe,0,0,ee),ee.push("</ul>"),ee.join("")}const R={heading(Se){const ke=H.exec(Se);if(G+=1,ke)return{type:"heading",raw:ke[0],depth:ke[1].length,text:ke[2]}},fences(Se){const ke=this.rules.block.fences.exec(Se);if(ke){const De=ke[0];let Me=g(De,ke[3]||"");const Y=ke[2]?ke[2].trim():ke[2];if(["latex","katex","math"].indexOf(Y)>=0){const B=K(),W=Me;Me=B,D[B]={type:"block",expression:W}}return{type:"code",raw:De,lang:Y,text:Me}}}},q=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Q=0;const K=()=>`__special_katext_id_${Q++}__`;let D={};function $(){return D}function M(){Q=0,D={}}function F(Se){return Se=Se.replace(q,(ke,De)=>{const Me=K();return D[Me]={type:"inline",expression:De},Me}),Se}const ue=o.listitem;o.listitem=function(Se){return ue(F(Se))};const he=o.paragraph;o.paragraph=function(Se){return he(F(Se))};const le=o.tablecell;o.tablecell=function(Se,ke){return le(F(Se),ke)},o.code=function(Se,ke,De){const Me=(ke||"").match(/\S*/)[0];return Me?["latex","katex","math"].indexOf(Me)>=0?`<p class='editormd-tex'>${Se}</p>`:`<pre class="prettyprint linenums"><code class="language-${ke}">${De?Se:(0,oe.escape)(Se,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(De?Se:(0,oe.escape)(Se,!0))+"</code></pre>"},o.heading=function(Se,ke,De){let Me=this.options.headerPrefix+De.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return fe.push({anchor:Me,level:ke,text:Se}),"<h"+ke+' id="'+G+Me+'">'+Se+"</h"+ke+">"},de().setOptions({silent:!0,gfm:!0,pedantic:!1}),de().use({tokenizer:R,renderer:o}),ct.ZP=de()},29509:function(ln,ct,b){"use strict";b.d(ct,{o2:function(){return G},yT:function(){return g}});var m=b(94480),de=b(34998);const oe=de.i.map(fe=>`${fe}-inverse`),ve=["success","processing","error","default","warning"];function G(fe){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,m.Z)(oe),(0,m.Z)(de.i)).includes(fe):de.i.includes(fe)}function g(fe){return ve.includes(fe)}},99402:function(ln,ct,b){"use strict";b.d(ct,{T:function(){return de},n:function(){return m}});function m(oe){return["small","middle","large"].includes(oe)}function de(oe){return oe?typeof oe=="number"&&!Number.isNaN(oe):!1}},86013:function(ln,ct,b){"use strict";var m=b(59301),de=b(19248);const oe=ve=>{let G;return typeof ve=="object"&&(ve!=null&&ve.clearIcon)?G=ve:ve&&(G={clearIcon:m.createElement(de.Z,null)}),G};ct.Z=oe},52838:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return g}});var m=b(37645);function de(fe,ee,o,H){if(H===!1)return{adjustX:!1,adjustY:!1};const k=H&&typeof H=="object"?H:{},S={};switch(fe){case"top":case"bottom":S.shiftX=ee.arrowOffsetHorizontal*2+o,S.shiftY=!0,S.adjustY=!0;break;case"left":case"right":S.shiftY=ee.arrowOffsetVertical*2+o,S.shiftX=!0,S.adjustX=!0;break}const w=Object.assign(Object.assign({},S),k);return w.shiftX||(w.adjustX=!0),w.shiftY||(w.adjustY=!0),w}const oe={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"]}},ve={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"]}},G=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g(fe){const{arrowWidth:ee,autoAdjustOverflow:o,arrowPointAtCenter:H,offset:k,borderRadius:S,visibleFirst:w}=fe,C=ee/2,R={};return Object.keys(oe).forEach(q=>{const Q=H&&ve[q]||oe[q],K=Object.assign(Object.assign({},Q),{offset:[0,0],dynamicInset:!0});switch(R[q]=K,G.has(q)&&(K.autoArrow=!1),q){case"top":case"topLeft":case"topRight":K.offset[1]=-C-k;break;case"bottom":case"bottomLeft":case"bottomRight":K.offset[1]=C+k;break;case"left":case"leftTop":case"leftBottom":K.offset[0]=-C-k;break;case"right":case"rightTop":case"rightBottom":K.offset[0]=C+k;break}const D=(0,m.wZ)({contentRadius:S,limitVerticalRadius:!0});if(H)switch(q){case"topLeft":case"bottomLeft":K.offset[0]=-D.arrowOffsetHorizontal-C;break;case"topRight":case"bottomRight":K.offset[0]=D.arrowOffsetHorizontal+C;break;case"leftTop":case"rightTop":K.offset[1]=-D.arrowOffsetHorizontal*2+C;break;case"leftBottom":case"rightBottom":K.offset[1]=D.arrowOffsetHorizontal*2-C;break}K.overflow=de(q,D,ee,o),w&&(K.htmlRegion="visibleFirst")}),R}},82855:function(ln,ct,b){"use strict";b.d(ct,{F:function(){return G},Z:function(){return ve}});var m=b(92310),de=b.n(m);const oe=null;function ve(g,fe,ee){return de()({[`${g}-status-success`]:fe==="success",[`${g}-status-warning`]:fe==="warning",[`${g}-status-error`]:fe==="error",[`${g}-status-validating`]:fe==="validating",[`${g}-has-feedback`]:ee})}const G=(g,fe)=>fe||g},19563:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return Xe}});var m=b(59301),de=b(33853),oe=b(38819),ve=b(92310),G=b.n(ve),g=b(96478),fe=b(6089),ee=b(18929),o=b(2738),H=b(75030),S=_e=>typeof _e!="object"&&typeof _e!="function"||_e===null,w=b(52838),C=b(45915),R=b(22703),q=b(32383),Q=b(55743),K=b(48755),D=b(83397),$=b(93041),M=b(78857),F=b(57700),ue=b(36237),he=b(63356),le=b(46e3),Se=b(93873),ke=b(34925),De=b(37645),Me=b(36305),Y=b(16931),B=b(51636),re=_e=>{const{componentCls:Ke,menuCls:Qe,colorError:st,colorTextLightSolid:rt}=_e,Vt=`${Qe}-item`;return{[`${Ke}, ${Ke}-menu-submenu`]:{[`${Qe} ${Vt}`]:{[`&${Vt}-danger:not(${Vt}-disabled)`]:{color:st,"&:hover":{color:rt,backgroundColor:st}}}}}};const ie=_e=>{const{componentCls:Ke,menuCls:Qe,zIndexPopup:st,dropdownArrowDistance:rt,sizePopupArrow:Vt,antCls:qe,iconCls:Kt,motionDurationMid:je,paddingBlock:Tt,fontSize:Re,dropdownEdgeChildPadding:Ce,colorTextDisabled:ce,fontSizeIcon:Je,controlPaddingHorizontal:Le,colorBgElevated:Ie}=_e;return[{[Ke]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:st,display:"block","&::before":{position:"absolute",insetBlock:_e.calc(Vt).div(2).sub(rt).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${qe}-btn`]:{[`& > ${Kt}-down, & > ${qe}-btn-icon > ${Kt}-down`]:{fontSize:Je}},[`${Ke}-wrap`]:{position:"relative",[`${qe}-btn > ${Kt}-down`]:{fontSize:Je},[`${Kt}-down::before`]:{transition:`transform ${je}`}},[`${Ke}-wrap-open`]:{[`${Kt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${qe}-slide-down-enter${qe}-slide-down-enter-active${Ke}-placement-bottomLeft,
&${qe}-slide-down-appear${qe}-slide-down-appear-active${Ke}-placement-bottomLeft,
&${qe}-slide-down-enter${qe}-slide-down-enter-active${Ke}-placement-bottom,
&${qe}-slide-down-appear${qe}-slide-down-appear-active${Ke}-placement-bottom,
&${qe}-slide-down-enter${qe}-slide-down-enter-active${Ke}-placement-bottomRight,
&${qe}-slide-down-appear${qe}-slide-down-appear-active${Ke}-placement-bottomRight`]:{animationName:le.fJ},[`&${qe}-slide-up-enter${qe}-slide-up-enter-active${Ke}-placement-topLeft,
&${qe}-slide-up-appear${qe}-slide-up-appear-active${Ke}-placement-topLeft,
&${qe}-slide-up-enter${qe}-slide-up-enter-active${Ke}-placement-top,
&${qe}-slide-up-appear${qe}-slide-up-appear-active${Ke}-placement-top,
&${qe}-slide-up-enter${qe}-slide-up-enter-active${Ke}-placement-topRight,
&${qe}-slide-up-appear${qe}-slide-up-appear-active${Ke}-placement-topRight`]:{animationName:le.Qt},[`&${qe}-slide-down-leave${qe}-slide-down-leave-active${Ke}-placement-bottomLeft,
&${qe}-slide-down-leave${qe}-slide-down-leave-active${Ke}-placement-bottom,
&${qe}-slide-down-leave${qe}-slide-down-leave-active${Ke}-placement-bottomRight`]:{animationName:le.Uw},[`&${qe}-slide-up-leave${qe}-slide-up-leave-active${Ke}-placement-topLeft,
&${qe}-slide-up-leave${qe}-slide-up-leave-active${Ke}-placement-top,
&${qe}-slide-up-leave${qe}-slide-up-leave-active${Ke}-placement-topRight`]:{animationName:le.ly}}},(0,De.ZP)(_e,Ie,{arrowPlacement:{top:!0,bottom:!0}}),{[`${Ke} ${Qe}`]:{position:"relative",margin:0},[`${Qe}-submenu-popup`]:{position:"absolute",zIndex:st,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Ke}, ${Ke}-menu-submenu`]:Object.assign(Object.assign({},(0,he.Wf)(_e)),{[Qe]:Object.assign(Object.assign({padding:Ce,listStyleType:"none",backgroundColor:Ie,backgroundClip:"padding-box",borderRadius:_e.borderRadiusLG,outline:"none",boxShadow:_e.boxShadowSecondary},(0,he.Qy)(_e)),{"&:empty":{padding:0,boxShadow:"none"},[`${Qe}-item-group-title`]:{padding:`${(0,ue.unit)(Tt)} ${(0,ue.unit)(Le)}`,color:_e.colorTextDescription,transition:`all ${je}`},[`${Qe}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Qe}-item-icon`]:{minWidth:Re,marginInlineEnd:_e.marginXS,fontSize:_e.fontSizeSM},[`${Qe}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${je}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${Qe}-item-extra`]:{paddingInlineStart:_e.padding,marginInlineStart:"auto",fontSize:_e.fontSizeSM,color:_e.colorTextDescription}},[`${Qe}-item, ${Qe}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,ue.unit)(Tt)} ${(0,ue.unit)(Le)}`,color:_e.colorText,fontWeight:"normal",fontSize:Re,lineHeight:_e.lineHeight,cursor:"pointer",transition:`all ${je}`,borderRadius:_e.borderRadiusSM,"&:hover, &-active":{backgroundColor:_e.controlItemBgHover}},(0,he.Qy)(_e)),{"&-selected":{color:_e.colorPrimary,backgroundColor:_e.controlItemBgActive,"&:hover, &-active":{backgroundColor:_e.controlItemBgActiveHover}},"&-disabled":{color:ce,cursor:"not-allowed","&:hover":{color:ce,backgroundColor:Ie,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,ue.unit)(_e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:_e.colorSplit},[`${Ke}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:_e.paddingXS,[`${Ke}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:_e.colorTextDescription,fontSize:Je,fontStyle:"normal"}}}),[`${Qe}-item-group-list`]:{margin:`0 ${(0,ue.unit)(_e.marginXS)}`,padding:0,listStyle:"none"},[`${Qe}-submenu-title`]:{paddingInlineEnd:_e.calc(Le).add(_e.fontSizeSM).equal()},[`${Qe}-submenu-vertical`]:{position:"relative"},[`${Qe}-submenu${Qe}-submenu-disabled ${Ke}-menu-submenu-title`]:{[`&, ${Ke}-menu-submenu-arrow-icon`]:{color:ce,backgroundColor:Ie,cursor:"not-allowed"}},[`${Qe}-submenu-selected ${Ke}-menu-submenu-title`]:{color:_e.colorPrimary}})})},[(0,le.oN)(_e,"slide-up"),(0,le.oN)(_e,"slide-down"),(0,Se.Fm)(_e,"move-up"),(0,Se.Fm)(_e,"move-down"),(0,ke._y)(_e,"zoom-big")]]},se=_e=>Object.assign(Object.assign({zIndexPopup:_e.zIndexPopupBase+50,paddingBlock:(_e.controlHeight-_e.fontSize*_e.lineHeight)/2},(0,De.wZ)({contentRadius:_e.borderRadiusLG,limitVerticalRadius:!0})),(0,Me.w)(_e));var x=(0,Y.I$)("Dropdown",_e=>{const{marginXXS:Ke,sizePopupArrow:Qe,paddingXXS:st,componentCls:rt}=_e,Vt=(0,B.mergeToken)(_e,{menuCls:`${rt}-menu`,dropdownArrowDistance:_e.calc(Qe).div(2).add(Ke).equal(),dropdownEdgeChildPadding:st});return[ie(Vt),re(Vt)]},se,{resetStyle:!1});const E=null,V=_e=>{var Ke;const{menu:Qe,arrow:st,prefixCls:rt,children:Vt,trigger:qe,disabled:Kt,dropdownRender:je,getPopupContainer:Tt,overlayClassName:Re,rootClassName:Ce,overlayStyle:ce,open:Je,onOpenChange:Le,visible:Ie,onVisibleChange:P,mouseEnterDelay:pe=.15,mouseLeaveDelay:xe=.1,autoAdjustOverflow:He=!0,placement:et="",overlay:ut,transitionName:xt}=_e,{getPopupContainer:Lt,getPrefixCls:Et,direction:Mt,dropdown:Yt}=m.useContext(K.E_),jt=(0,q.ln)("Dropdown"),$t=m.useMemo(()=>{const tt=Et();return xt!==void 0?xt:et.includes("top")?`${tt}-slide-down`:`${tt}-slide-up`},[Et,et,xt]),it=m.useMemo(()=>et?et.includes("Center")?et.slice(0,et.indexOf("Center")):et:Mt==="rtl"?"bottomRight":"bottomLeft",[et,Mt]),It=Et("dropdown",rt),Rt=(0,D.Z)(It),[ye,Ve,_]=x(It,Rt),[,A]=(0,F.ZP)(),Oe=m.Children.only(S(Vt)?m.createElement("span",null,Vt):Vt),N=(0,R.Tm)(Oe,{className:G()(`${It}-trigger`,{[`${It}-rtl`]:Mt==="rtl"},Oe.props.className),disabled:(Ke=Oe.props.disabled)!==null&&Ke!==void 0?Ke:Kt}),ae=Kt?[]:qe,St=!!(ae!=null&&ae.includes("contextMenu")),[Ee,$e]=(0,ee.Z)(!1,{value:Je!=null?Je:Ie}),Ge=(0,fe.Z)(tt=>{Le==null||Le(tt,{source:"trigger"}),P==null||P(tt),$e(tt)}),Z=G()(Re,Ce,Ve,_,Rt,Yt==null?void 0:Yt.className,{[`${It}-rtl`]:Mt==="rtl"}),J=(0,w.Z)({arrowPointAtCenter:typeof st=="object"&&st.pointAtCenter,autoAdjustOverflow:He,offset:A.marginXXS,arrowWidth:st?A.sizePopupArrow:0,borderRadius:A.borderRadius}),be=m.useCallback(()=>{Qe!=null&&Qe.selectable&&(Qe!=null&&Qe.multiple)||(Le==null||Le(!1,{source:"menu"}),$e(!1))},[Qe==null?void 0:Qe.selectable,Qe==null?void 0:Qe.multiple]),Pe=()=>{let tt;return Qe!=null&&Qe.items?tt=m.createElement($.default,Object.assign({},Qe)):typeof ut=="function"?tt=ut():tt=ut,je&&(tt=je(tt)),tt=m.Children.only(typeof tt=="string"?m.createElement("span",null,tt):tt),m.createElement(M.J,{prefixCls:`${It}-menu`,rootClassName:G()(_,Rt),expandIcon:m.createElement("span",{className:`${It}-menu-submenu-arrow`},Mt==="rtl"?m.createElement(de.Z,{className:`${It}-menu-submenu-arrow-icon`}):m.createElement(oe.Z,{className:`${It}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:be,validator:Ot=>{let{mode:Xt}=Ot}},tt)},[j,Ye]=(0,H.Cn)("Dropdown",ce==null?void 0:ce.zIndex);let X=m.createElement(g.Z,Object.assign({alignPoint:St},(0,o.Z)(_e,["rootClassName"]),{mouseEnterDelay:pe,mouseLeaveDelay:xe,visible:Ee,builtinPlacements:J,arrow:!!st,overlayClassName:Z,prefixCls:It,getPopupContainer:Tt||Lt,transitionName:$t,trigger:ae,overlay:Pe,placement:it,onVisibleChange:Ge,overlayStyle:Object.assign(Object.assign(Object.assign({},Yt==null?void 0:Yt.style),ce),{zIndex:j})}),N);return j&&(X=m.createElement(Q.Z.Provider,{value:Ye},X)),ye(X)},me=(0,C.Z)(V,"align",void 0,"dropdown",_e=>_e),ze=_e=>m.createElement(me,Object.assign({},_e),m.createElement("span",null));V._InternalPanelDoNotUseOrYouWillBeFired=ze;var Xe=V},75727:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return C}});var m=b(19563),de=b(59301),oe=b(18785),ve=b(92310),G=b.n(ve),g=b(7939),fe=b(48755),ee=b(44104),o=b(70045),H=function(R,q){var Q={};for(var K in R)Object.prototype.hasOwnProperty.call(R,K)&&q.indexOf(K)<0&&(Q[K]=R[K]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,K=Object.getOwnPropertySymbols(R);D<K.length;D++)q.indexOf(K[D])<0&&Object.prototype.propertyIsEnumerable.call(R,K[D])&&(Q[K[D]]=R[K[D]]);return Q};const k=R=>{const{getPopupContainer:q,getPrefixCls:Q,direction:K}=de.useContext(fe.E_),{prefixCls:D,type:$="default",danger:M,disabled:F,loading:ue,onClick:he,htmlType:le,children:Se,className:ke,menu:De,arrow:Me,autoFocus:Y,overlay:B,trigger:W,align:re,open:ie,onOpenChange:se,placement:x,getPopupContainer:E,href:V,icon:me=de.createElement(oe.Z,null),title:ze,buttonsRender:Xe=pe=>pe,mouseEnterDelay:_e,mouseLeaveDelay:Ke,overlayClassName:Qe,overlayStyle:st,destroyPopupOnHide:rt,dropdownRender:Vt}=R,qe=H(R,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Kt=Q("dropdown",D),je=`${Kt}-button`,Tt={menu:De,arrow:Me,autoFocus:Y,align:re,disabled:F,trigger:F?[]:W,onOpenChange:se,getPopupContainer:E||q,mouseEnterDelay:_e,mouseLeaveDelay:Ke,overlayClassName:Qe,overlayStyle:st,destroyPopupOnHide:rt,dropdownRender:Vt},{compactSize:Re,compactItemClassnames:Ce}=(0,o.ri)(Kt,K),ce=G()(je,Ce,ke);"overlay"in R&&(Tt.overlay=B),"open"in R&&(Tt.open=ie),"placement"in R?Tt.placement=x:Tt.placement=K==="rtl"?"bottomLeft":"bottomRight";const Je=de.createElement(g.ZP,{type:$,danger:M,disabled:F,loading:ue,onClick:he,htmlType:le,href:V,title:ze},Se),Le=de.createElement(g.ZP,{type:$,danger:M,icon:me}),[Ie,P]=Xe([Je,Le]);return de.createElement(ee.Z.Compact,Object.assign({className:ce,size:Re,block:!0},qe),Ie,de.createElement(m.Z,Object.assign({},Tt),P))};k.__ANT_BUTTON=!0;var S=k;const w=m.Z;w.Button=S;var C=w},24971:function(ln,ct,b){"use strict";var m=b(59301),de=b(56553),oe=b(48755);const ve=function(G,g){let fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var ee,o;const{variant:H,[G]:k}=m.useContext(oe.E_),S=m.useContext(de.pg),w=k==null?void 0:k.variant;let C;typeof g!="undefined"?C=g:fe===!1?C="borderless":C=(o=(ee=S!=null?S:w)!==null&&ee!==void 0?ee:H)!==null&&o!==void 0?o:"outlined";const R=oe.tr.includes(C);return[C,R]};ct.Z=ve},28284:function(ln,ct,b){"use strict";b.d(ct,{default:function(){return ir}});var m=b(56553),de=b(94480),oe=b(59301),ve=b(92310),G=b.n(ve),g=b(77900),fe=b(86641),ee=b(83397);function o(Ne){const[mt,wt]=oe.useState(Ne);return oe.useEffect(()=>{const ht=setTimeout(()=>{wt(Ne)},Ne.length?0:10);return()=>{clearTimeout(ht)}},[Ne]),mt}var H=b(36237),k=b(63356),S=b(34925),w=b(34961),C=b(51636),R=b(16931),Q=Ne=>{const{componentCls:mt}=Ne,wt=`${mt}-show-help`,ht=`${mt}-show-help-item`;return{[wt]:{transition:`opacity ${Ne.motionDurationFast} ${Ne.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ht]:{overflow:"hidden",transition:`height ${Ne.motionDurationFast} ${Ne.motionEaseInOut},
opacity ${Ne.motionDurationFast} ${Ne.motionEaseInOut},
transform ${Ne.motionDurationFast} ${Ne.motionEaseInOut} !important`,[`&${ht}-appear, &${ht}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ht}-leave-active`]:{transform:"translateY(-5px)"}}}}};const K=Ne=>({legend:{display:"block",width:"100%",marginBottom:Ne.marginLG,padding:0,color:Ne.colorTextDescription,fontSize:Ne.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,H.unit)(Ne.lineWidth)} ${Ne.lineType} ${Ne.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,H.unit)(Ne.controlOutlineWidth)} ${Ne.controlOutline}`},output:{display:"block",paddingTop:15,color:Ne.colorText,fontSize:Ne.fontSize,lineHeight:Ne.lineHeight}}),D=(Ne,mt)=>{const{formItemCls:wt}=Ne;return{[wt]:{[`${wt}-label > label`]:{height:mt},[`${wt}-control-input`]:{minHeight:mt}}}},$=Ne=>{const{componentCls:mt}=Ne;return{[Ne.componentCls]:Object.assign(Object.assign(Object.assign({},(0,k.Wf)(Ne)),K(Ne)),{[`${mt}-text`]:{display:"inline-block",paddingInlineEnd:Ne.paddingSM},"&-small":Object.assign({},D(Ne,Ne.controlHeightSM)),"&-large":Object.assign({},D(Ne,Ne.controlHeightLG))})}},M=Ne=>{const{formItemCls:mt,iconCls:wt,rootPrefixCls:ht,antCls:we,labelRequiredMarkColor:at,labelColor:gt,labelFontSize:Dt,labelHeight:bt,labelColonMarginInlineStart:Ft,labelColonMarginInlineEnd:zt,itemMarginBottom:_t}=Ne;return{[mt]:Object.assign(Object.assign({},(0,k.Wf)(Ne)),{marginBottom:_t,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden${we}-row`]:{display:"none"},"&-has-warning":{[`${mt}-split`]:{color:Ne.colorError}},"&-has-error":{[`${mt}-split`]:{color:Ne.colorWarning}},[`${mt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:Ne.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:bt,color:gt,fontSize:Dt,[`> ${wt}`]:{fontSize:Ne.fontSize,verticalAlign:"top"},[`&${mt}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:Ne.marginXXS,color:at,fontSize:Ne.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${mt}-required-mark-hidden, &${mt}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${mt}-optional`]:{display:"inline-block",marginInlineStart:Ne.marginXXS,color:Ne.colorTextDescription,[`&${mt}-required-mark-hidden`]:{display:"none"}},[`${mt}-tooltip`]:{color:Ne.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ne.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ft,marginInlineEnd:zt},[`&${mt}-no-colon::after`]:{content:'"\\a0"'}}},[`${mt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ht}-col-'"]):not([class*="' ${ht}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ne.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[mt]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:Ne.colorTextDescription,fontSize:Ne.fontSize,lineHeight:Ne.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ne.controlHeightSM,transition:`color ${Ne.motionDurationMid} ${Ne.motionEaseOut}`},"&-explain":{"&-error":{color:Ne.colorError},"&-warning":{color:Ne.colorWarning}}},[`&-with-help ${mt}-explain`]:{height:"auto",opacity:1},[`${mt}-feedback-icon`]:{fontSize:Ne.fontSize,textAlign:"center",visibility:"visible",animationName:S.kr,animationDuration:Ne.motionDurationMid,animationTimingFunction:Ne.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ne.colorSuccess},"&-error":{color:Ne.colorError},"&-warning":{color:Ne.colorWarning},"&-validating":{color:Ne.colorPrimary}}})}},F=(Ne,mt)=>{const{formItemCls:wt}=Ne;return{[`${mt}-horizontal`]:{[`${wt}-label`]:{flexGrow:0},[`${wt}-control`]:{flex:"1 1 0",minWidth:0},[`${wt}-label[class$='-24'], ${wt}-label[class*='-24 ']`]:{[`& + ${wt}-control`]:{minWidth:"unset"}}}}},ue=Ne=>{const{componentCls:mt,formItemCls:wt,inlineItemMarginBottom:ht}=Ne;return{[`${mt}-inline`]:{display:"flex",flexWrap:"wrap",[wt]:{flex:"none",marginInlineEnd:Ne.margin,marginBottom:ht,"&-row":{flexWrap:"nowrap"},[`> ${wt}-label,
> ${wt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${wt}-label`]:{flex:"none"},[`${mt}-text`]:{display:"inline-block"},[`${wt}-has-feedback`]:{display:"inline-block"}}}}},he=Ne=>({padding:Ne.verticalLabelPadding,margin:Ne.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),le=Ne=>{const{componentCls:mt,formItemCls:wt,rootPrefixCls:ht}=Ne;return{[`${wt} ${wt}-label`]:he(Ne),[`${mt}:not(${mt}-inline)`]:{[wt]:{flexWrap:"wrap",[`${wt}-label, ${wt}-control`]:{[`&:not([class*=" ${ht}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Se=Ne=>{const{componentCls:mt,formItemCls:wt,antCls:ht}=Ne;return{[`${mt}-vertical`]:{[`${wt}:not(${wt}-horizontal)`]:{[`${wt}-row`]:{flexDirection:"column"},[`${wt}-label > label`]:{height:"auto"},[`${wt}-control`]:{width:"100%"},[`${wt}-label,
${ht}-col-24${wt}-label,
${ht}-col-xl-24${wt}-label`]:he(Ne)}},[`@media (max-width: ${(0,H.unit)(Ne.screenXSMax)})`]:[le(Ne),{[mt]:{[`${wt}:not(${wt}-horizontal)`]:{[`${ht}-col-xs-24${wt}-label`]:he(Ne)}}}],[`@media (max-width: ${(0,H.unit)(Ne.screenSMMax)})`]:{[mt]:{[`${wt}:not(${wt}-horizontal)`]:{[`${ht}-col-sm-24${wt}-label`]:he(Ne)}}},[`@media (max-width: ${(0,H.unit)(Ne.screenMDMax)})`]:{[mt]:{[`${wt}:not(${wt}-horizontal)`]:{[`${ht}-col-md-24${wt}-label`]:he(Ne)}}},[`@media (max-width: ${(0,H.unit)(Ne.screenLGMax)})`]:{[mt]:{[`${wt}:not(${wt}-horizontal)`]:{[`${ht}-col-lg-24${wt}-label`]:he(Ne)}}}}},ke=Ne=>{const{formItemCls:mt,antCls:wt}=Ne;return{[`${mt}-vertical`]:{[`${mt}-row`]:{flexDirection:"column"},[`${mt}-label > label`]:{height:"auto"},[`${mt}-control`]:{width:"100%"}},[`${mt}-vertical ${mt}-label,
${wt}-col-24${mt}-label,
${wt}-col-xl-24${mt}-label`]:he(Ne),[`@media (max-width: ${(0,H.unit)(Ne.screenXSMax)})`]:[le(Ne),{[mt]:{[`${wt}-col-xs-24${mt}-label`]:he(Ne)}}],[`@media (max-width: ${(0,H.unit)(Ne.screenSMMax)})`]:{[mt]:{[`${wt}-col-sm-24${mt}-label`]:he(Ne)}},[`@media (max-width: ${(0,H.unit)(Ne.screenMDMax)})`]:{[mt]:{[`${wt}-col-md-24${mt}-label`]:he(Ne)}},[`@media (max-width: ${(0,H.unit)(Ne.screenLGMax)})`]:{[mt]:{[`${wt}-col-lg-24${mt}-label`]:he(Ne)}}}},De=Ne=>({labelRequiredMarkColor:Ne.colorError,labelColor:Ne.colorTextHeading,labelFontSize:Ne.fontSize,labelHeight:Ne.controlHeight,labelColonMarginInlineStart:Ne.marginXXS/2,labelColonMarginInlineEnd:Ne.marginXS,itemMarginBottom:Ne.marginLG,verticalLabelPadding:`0 0 ${Ne.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Me=(Ne,mt)=>(0,C.mergeToken)(Ne,{formItemCls:`${Ne.componentCls}-item`,rootPrefixCls:mt});var Y=(0,R.I$)("Form",(Ne,mt)=>{let{rootPrefixCls:wt}=mt;const ht=Me(Ne,wt);return[$(ht),M(ht),Q(ht),F(ht,ht.componentCls),F(ht,ht.formItemCls),ue(ht),Se(ht),ke(ht),(0,w.Z)(ht),S.kr]},De,{order:-1e3});const B=[];function W(Ne,mt,wt){let ht=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ne=="string"?Ne:`${mt}-${ht}`,error:Ne,errorStatus:wt}}var ie=Ne=>{let{help:mt,helpStatus:wt,errors:ht=B,warnings:we=B,className:at,fieldId:gt,onVisibleChanged:Dt}=Ne;const{prefixCls:bt}=oe.useContext(m.Rk),Ft=`${bt}-item-explain`,zt=(0,ee.Z)(bt),[_t,We,nt]=Y(bt,zt),Ct=oe.useMemo(()=>(0,fe.Z)(bt),[bt]),ot=o(ht),dt=o(we),kt=oe.useMemo(()=>mt!=null?[W(mt,"help",wt)]:[].concat((0,de.Z)(ot.map((hn,cn)=>W(hn,"error","error",cn))),(0,de.Z)(dt.map((hn,cn)=>W(hn,"warning","warning",cn)))),[mt,wt,ot,dt]),Gt=oe.useMemo(()=>{const hn={};return kt.forEach(cn=>{let{key:En}=cn;hn[En]=(hn[En]||0)+1}),kt.map((cn,En)=>Object.assign(Object.assign({},cn),{key:hn[cn.key]>1?`${cn.key}-fallback-${En}`:cn.key}))},[kt]),Ht={};return gt&&(Ht.id=`${gt}_help`),_t(oe.createElement(g.default,{motionDeadline:Ct.motionDeadline,motionName:`${bt}-show-help`,visible:!!Gt.length,onVisibleChanged:Dt},hn=>{const{className:cn,style:En}=hn;return oe.createElement("div",Object.assign({},Ht,{className:G()(Ft,cn,nt,zt,at,We),style:En}),oe.createElement(g.CSSMotionList,Object.assign({keys:Gt},(0,fe.Z)(bt),{motionName:`${bt}-show-help-item`,component:!1}),vn=>{const{key:on,error:tn,errorStatus:Tn,className:Sn,style:bn}=vn;return oe.createElement("div",{key:on,className:G()(Sn,{[`${Ft}-${Tn}`]:Tn}),style:bn},tn)}))}))},se=b(22001),x=b(48755),E=b(2171),V=b(31756),me=b(23069),ze=b(76846),Xe=b(16722);const _e=["parentNode"],Ke="form_item";function Qe(Ne){return Ne===void 0||Ne===!1?[]:Array.isArray(Ne)?Ne:[Ne]}function st(Ne,mt){if(!Ne.length)return;const wt=Ne.join("_");return mt?`${mt}_${wt}`:_e.includes(wt)?`${Ke}_${wt}`:wt}function rt(Ne,mt,wt,ht,we,at){let gt=ht;return at!==void 0?gt=at:wt.validating?gt="validating":Ne.length?gt="error":mt.length?gt="warning":(wt.touched||we&&wt.validated)&&(gt="success"),gt}var Vt=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt};function qe(Ne){return Qe(Ne).join("_")}function Kt(Ne,mt){const wt=mt.getFieldInstance(Ne),ht=(0,ze.bn)(wt);if(ht)return ht;const we=st(Qe(Ne),mt.__INTERNAL__.name);if(we)return document.getElementById(we)}function je(Ne){const[mt]=(0,se.useForm)(),wt=oe.useRef({}),ht=oe.useMemo(()=>Ne!=null?Ne:Object.assign(Object.assign({},mt),{__INTERNAL__:{itemRef:we=>at=>{const gt=qe(we);at?wt.current[gt]=at:delete wt.current[gt]}},scrollToField:function(we){let at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:gt}=at,Dt=Vt(at,["focus"]),bt=Kt(we,ht);bt&&((0,Xe.Z)(bt,Object.assign({scrollMode:"if-needed",block:"nearest"},Dt)),gt&&ht.focusField(we))},focusField:we=>{var at,gt;const Dt=ht.getFieldInstance(we);typeof(Dt==null?void 0:Dt.focus)=="function"?Dt.focus():(gt=(at=Kt(we,ht))===null||at===void 0?void 0:at.focus)===null||gt===void 0||gt.call(at)},getFieldInstance:we=>{const at=qe(we);return wt.current[at]}}),[Ne,mt]);return[ht]}var Tt=b(98350),Re=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt};const Ce=(Ne,mt)=>{const wt=oe.useContext(E.Z),{getPrefixCls:ht,direction:we,requiredMark:at,colon:gt,scrollToFirstError:Dt,className:bt,style:Ft}=(0,x.dj)("form"),{prefixCls:zt,className:_t,rootClassName:We,size:nt,disabled:Ct=wt,form:ot,colon:dt,labelAlign:kt,labelWrap:Gt,labelCol:Ht,wrapperCol:hn,hideRequiredMark:cn,layout:En="horizontal",scrollToFirstError:vn,requiredMark:on,onFinishFailed:tn,name:Tn,style:Sn,feedbackIcons:bn,variant:Pn}=Ne,Hn=Re(Ne,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Bn=(0,V.Z)(nt),jn=oe.useContext(Tt.Z),Wn=oe.useMemo(()=>on!==void 0?on:cn?!1:at!==void 0?at:!0,[cn,on,at]),nr=dt!=null?dt:gt,Nn=ht("form",zt),fr=(0,ee.Z)(Nn),[pt,kn,sr]=Y(Nn,fr),xr=G()(Nn,`${Nn}-${En}`,{[`${Nn}-hide-required-mark`]:Wn===!1,[`${Nn}-rtl`]:we==="rtl",[`${Nn}-${Bn}`]:Bn},sr,fr,kn,bt,_t,We),[_r]=je(ot),{__INTERNAL__:br}=_r;br.name=Tn;const Rn=oe.useMemo(()=>({name:Tn,labelAlign:kt,labelCol:Ht,labelWrap:Gt,wrapperCol:hn,vertical:En==="vertical",colon:nr,requiredMark:Wn,itemRef:br.itemRef,form:_r,feedbackIcons:bn}),[Tn,kt,Ht,hn,En,nr,Wn,_r,bn]),gn=oe.useRef(null);oe.useImperativeHandle(mt,()=>{var Kn;return Object.assign(Object.assign({},_r),{nativeElement:(Kn=gn.current)===null||Kn===void 0?void 0:Kn.nativeElement})});const Mn=(Kn,er)=>{if(Kn){let Pr={block:"nearest"};typeof Kn=="object"&&(Pr=Object.assign(Object.assign({},Pr),Kn)),_r.scrollToField(er,Pr)}},ar=Kn=>{if(tn==null||tn(Kn),Kn.errorFields.length){const er=Kn.errorFields[0].name;if(vn!==void 0){Mn(vn,er);return}Dt!==void 0&&Mn(Dt,er)}};return pt(oe.createElement(m.pg.Provider,{value:Pn},oe.createElement(E.n,{disabled:Ct},oe.createElement(me.Z.Provider,{value:Bn},oe.createElement(m.RV,{validateMessages:jn},oe.createElement(m.q3.Provider,{value:Rn},oe.createElement(se.default,Object.assign({id:Tn},Hn,{name:Tn,onFinishFailed:ar,form:_r,ref:gn,style:Object.assign(Object.assign({},Ft),Sn),className:xr}))))))))};var Je=oe.forwardRef(Ce),Le=b(41799),Ie=b(8654),P=b(22703),pe=b(32383),xe=b(11592);function He(Ne){if(typeof Ne=="function")return Ne;const mt=(0,xe.Z)(Ne);return mt.length<=1?mt[0]:mt}const et=()=>{const{status:Ne,errors:mt=[],warnings:wt=[]}=oe.useContext(m.aM);return{status:Ne,errors:mt,warnings:wt}};et.Context=m.aM;var ut=et,xt=b(16089);function Lt(Ne){const[mt,wt]=oe.useState(Ne),ht=oe.useRef(null),we=oe.useRef([]),at=oe.useRef(!1);oe.useEffect(()=>(at.current=!1,()=>{at.current=!0,xt.Z.cancel(ht.current),ht.current=null}),[]);function gt(Dt){at.current||(ht.current===null&&(we.current=[],ht.current=(0,xt.Z)(()=>{ht.current=null,wt(bt=>{let Ft=bt;return we.current.forEach(zt=>{Ft=zt(Ft)}),Ft})})),we.current.push(Dt))}return[mt,gt]}function Et(){const{itemRef:Ne}=oe.useContext(m.q3),mt=oe.useRef({});function wt(ht,we){const at=we&&typeof we=="object"&&(0,Ie.C4)(we),gt=ht.join("_");return(mt.current.name!==gt||mt.current.originRef!==at)&&(mt.current.name=gt,mt.current.originRef=at,mt.current.ref=(0,Ie.sQ)(Ne(ht),at)),mt.current.ref}return wt}var Mt=b(29194),Yt=b(34280),jt=b(2738),$t=b(65970),it=b(70425),It=b(5472);const Rt=Ne=>{const{formItemCls:mt}=Ne;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${mt}-control`]:{display:"flex"}}}};var ye=(0,R.bk)(["Form","item-item"],(Ne,mt)=>{let{rootPrefixCls:wt}=mt;const ht=Me(Ne,wt);return[Rt(ht)]}),Ve=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt};const _=24;var Oe=Ne=>{const{prefixCls:mt,status:wt,labelCol:ht,wrapperCol:we,children:at,errors:gt,warnings:Dt,_internalItemRender:bt,extra:Ft,help:zt,fieldId:_t,marginBottom:We,onErrorVisibleChanged:nt,label:Ct}=Ne,ot=`${mt}-item`,dt=oe.useContext(m.q3),kt=oe.useMemo(()=>{let Hn=Object.assign({},we||dt.wrapperCol||{});return Ct===null&&!ht&&!we&&dt.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(jn=>{const Wn=jn?[jn]:[],nr=(0,it.U2)(dt.labelCol,Wn),Nn=typeof nr=="object"?nr:{},fr=(0,it.U2)(Hn,Wn),pt=typeof fr=="object"?fr:{};"span"in Nn&&!("offset"in pt)&&Nn.span<_&&(Hn=(0,it.t8)(Hn,[].concat(Wn,["offset"]),Nn.span))}),Hn},[we,dt]),Gt=G()(`${ot}-control`,kt.className),Ht=oe.useMemo(()=>{const{labelCol:Hn,wrapperCol:Bn}=dt;return Ve(dt,["labelCol","wrapperCol"])},[dt]),hn=oe.useRef(null),[cn,En]=oe.useState(0);(0,Yt.Z)(()=>{Ft&&hn.current?En(hn.current.clientHeight):En(0)},[Ft]);const vn=oe.createElement("div",{className:`${ot}-control-input`},oe.createElement("div",{className:`${ot}-control-input-content`},at)),on=oe.useMemo(()=>({prefixCls:mt,status:wt}),[mt,wt]),tn=We!==null||gt.length||Dt.length?oe.createElement(m.Rk.Provider,{value:on},oe.createElement(ie,{fieldId:_t,errors:gt,warnings:Dt,help:zt,helpStatus:wt,className:`${ot}-explain-connected`,onVisibleChanged:nt})):null,Tn={};_t&&(Tn.id=`${_t}_extra`);const Sn=Ft?oe.createElement("div",Object.assign({},Tn,{className:`${ot}-extra`,ref:hn}),Ft):null,bn=tn||Sn?oe.createElement("div",{className:`${ot}-additional`,style:We?{minHeight:We+cn}:{}},tn,Sn):null,Pn=bt&&bt.mark==="pro_table_render"&&bt.render?bt.render(Ne,{input:vn,errorList:tn,extra:Sn}):oe.createElement(oe.Fragment,null,vn,bn);return oe.createElement(m.q3.Provider,{value:Ht},oe.createElement(It.Z,Object.assign({},kt,{className:Gt}),Pn),oe.createElement(ye,{prefixCls:mt}))},N=b(61485),ae=b(9017),St=b(85981),Ee=b(25399),$e=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt};function Ge(Ne){return Ne?typeof Ne=="object"&&!oe.isValidElement(Ne)?Ne:{title:Ne}:null}var J=Ne=>{let{prefixCls:mt,label:wt,htmlFor:ht,labelCol:we,labelAlign:at,colon:gt,required:Dt,requiredMark:bt,tooltip:Ft,vertical:zt}=Ne;var _t;const[We]=(0,ae.Z)("Form"),{labelAlign:nt,labelCol:Ct,labelWrap:ot,colon:dt}=oe.useContext(m.q3);if(!wt)return null;const kt=we||Ct||{},Gt=at||nt,Ht=`${mt}-item-label`,hn=G()(Ht,Gt==="left"&&`${Ht}-left`,kt.className,{[`${Ht}-wrap`]:!!ot});let cn=wt;const En=gt===!0||dt!==!1&&gt!==!1;En&&!zt&&typeof wt=="string"&&wt.trim()&&(cn=wt.replace(/[:|]\s*$/,""));const on=Ge(Ft);if(on){const{icon:Hn=oe.createElement(N.Z,null)}=on,Bn=$e(on,["icon"]),jn=oe.createElement(Ee.Z,Object.assign({},Bn),oe.cloneElement(Hn,{className:`${mt}-item-tooltip`,title:"",onClick:Wn=>{Wn.preventDefault()},tabIndex:null}));cn=oe.createElement(oe.Fragment,null,cn,jn)}const tn=bt==="optional",Tn=typeof bt=="function",Sn=bt===!1;Tn?cn=bt(cn,{required:!!Dt}):tn&&!Dt&&(cn=oe.createElement(oe.Fragment,null,cn,oe.createElement("span",{className:`${mt}-item-optional`,title:""},(We==null?void 0:We.optional)||((_t=St.Z.Form)===null||_t===void 0?void 0:_t.optional))));let bn;Sn?bn="hidden":(tn||Tn)&&(bn="optional");const Pn=G()({[`${mt}-item-required`]:Dt,[`${mt}-item-required-mark-${bn}`]:bn,[`${mt}-item-no-colon`]:!En});return oe.createElement(It.Z,Object.assign({},kt,{className:hn}),oe.createElement("label",{htmlFor:ht,className:Pn,title:typeof wt=="string"?wt:""},cn))},be=b(29679),Pe=b(19248),j=b(96512),Ye=b(58617);const X={success:be.Z,warning:j.Z,error:Pe.Z,validating:Ye.Z};function tt(Ne){let{children:mt,errors:wt,warnings:ht,hasFeedback:we,validateStatus:at,prefixCls:gt,meta:Dt,noStyle:bt}=Ne;const Ft=`${gt}-item`,{feedbackIcons:zt}=oe.useContext(m.q3),_t=rt(wt,ht,Dt,null,!!we,at),{isFormItemInput:We,status:nt,hasFeedback:Ct,feedbackIcon:ot}=oe.useContext(m.aM),dt=oe.useMemo(()=>{var kt;let Gt;if(we){const hn=we!==!0&&we.icons||zt,cn=_t&&((kt=hn==null?void 0:hn({status:_t,errors:wt,warnings:ht}))===null||kt===void 0?void 0:kt[_t]),En=_t&&X[_t];Gt=cn!==!1&&En?oe.createElement("span",{className:G()(`${Ft}-feedback-icon`,`${Ft}-feedback-icon-${_t}`)},cn||oe.createElement(En,null)):null}const Ht={status:_t||"",errors:wt,warnings:ht,hasFeedback:!!we,feedbackIcon:Gt,isFormItemInput:!0};return bt&&(Ht.status=(_t!=null?_t:nt)||"",Ht.isFormItemInput=We,Ht.hasFeedback=!!(we!=null?we:Ct),Ht.feedbackIcon=we!==void 0?Ht.feedbackIcon:ot),Ht},[_t,we,bt,We,nt]);return oe.createElement(m.aM.Provider,{value:dt},mt)}var Ot=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt};function Xt(Ne){const{prefixCls:mt,className:wt,rootClassName:ht,style:we,help:at,errors:gt,warnings:Dt,validateStatus:bt,meta:Ft,hasFeedback:zt,hidden:_t,children:We,fieldId:nt,required:Ct,isRequired:ot,onSubItemMetaChange:dt,layout:kt}=Ne,Gt=Ot(Ne,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),Ht=`${mt}-item`,{requiredMark:hn,vertical:cn}=oe.useContext(m.q3),En=cn||kt==="vertical",vn=oe.useRef(null),on=o(gt),tn=o(Dt),Tn=at!=null,Sn=!!(Tn||gt.length||Dt.length),bn=!!vn.current&&(0,Mt.Z)(vn.current),[Pn,Hn]=oe.useState(null);(0,Yt.Z)(()=>{if(Sn&&vn.current){const Nn=getComputedStyle(vn.current);Hn(parseInt(Nn.marginBottom,10))}},[Sn,bn]);const Bn=Nn=>{Nn||Hn(null)},Wn=function(){let Nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const fr=Nn?on:Ft.errors,pt=Nn?tn:Ft.warnings;return rt(fr,pt,Ft,"",!!zt,bt)}(),nr=G()(Ht,wt,ht,{[`${Ht}-with-help`]:Tn||on.length||tn.length,[`${Ht}-has-feedback`]:Wn&&zt,[`${Ht}-has-success`]:Wn==="success",[`${Ht}-has-warning`]:Wn==="warning",[`${Ht}-has-error`]:Wn==="error",[`${Ht}-is-validating`]:Wn==="validating",[`${Ht}-hidden`]:_t,[`${Ht}-${kt}`]:kt});return oe.createElement("div",{className:nr,style:we,ref:vn},oe.createElement($t.Z,Object.assign({className:`${Ht}-row`},(0,jt.Z)(Gt,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),oe.createElement(J,Object.assign({htmlFor:nt},Ne,{requiredMark:hn,required:Ct!=null?Ct:ot,prefixCls:mt,vertical:En})),oe.createElement(Oe,Object.assign({},Ne,Ft,{errors:on,warnings:tn,prefixCls:mt,status:Wn,help:at,marginBottom:Pn,onErrorVisibleChanged:Bn}),oe.createElement(m.qI.Provider,{value:dt},oe.createElement(tt,{prefixCls:mt,meta:Ft,errors:Ft.errors,warnings:Ft.warnings,hasFeedback:zt,validateStatus:Wn},We)))),!!Pn&&oe.createElement("div",{className:`${Ht}-margin-offset`,style:{marginBottom:-Pn}}))}const pn="__SPLIT__",qt=null;function nn(Ne,mt){const wt=Object.keys(Ne),ht=Object.keys(mt);return wt.length===ht.length&&wt.every(we=>{const at=Ne[we],gt=mt[we];return at===gt||typeof at=="function"||typeof gt=="function"})}const xn=oe.memo(Ne=>{let{children:mt}=Ne;return mt},(Ne,mt)=>nn(Ne.control,mt.control)&&Ne.update===mt.update&&Ne.childProps.length===mt.childProps.length&&Ne.childProps.every((wt,ht)=>wt===mt.childProps[ht]));function Un(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function un(Ne){const{name:mt,noStyle:wt,className:ht,dependencies:we,prefixCls:at,shouldUpdate:gt,rules:Dt,children:bt,required:Ft,label:zt,messageVariables:_t,trigger:We="onChange",validateTrigger:nt,hidden:Ct,help:ot,layout:dt}=Ne,{getPrefixCls:kt}=oe.useContext(x.E_),{name:Gt}=oe.useContext(m.q3),Ht=He(bt),hn=typeof Ht=="function",cn=oe.useContext(m.qI),{validateTrigger:En}=oe.useContext(se.FieldContext),vn=nt!==void 0?nt:En,on=mt!=null,tn=kt("form",at),Tn=(0,ee.Z)(tn),[Sn,bn,Pn]=Y(tn,Tn),Hn=(0,pe.ln)("Form.Item"),Bn=oe.useContext(se.ListContext),jn=oe.useRef(null),[Wn,nr]=Lt({}),[Nn,fr]=(0,Le.Z)(()=>Un()),pt=gn=>{const Mn=Bn==null?void 0:Bn.getKey(gn.name);if(fr(gn.destroy?Un():gn,!0),wt&&ot!==!1&&cn){let ar=gn.name;if(gn.destroy)ar=jn.current||ar;else if(Mn!==void 0){const[Kn,er]=Mn;ar=[Kn].concat((0,de.Z)(er)),jn.current=ar}cn(gn,ar)}},kn=(gn,Mn)=>{nr(ar=>{const Kn=Object.assign({},ar),Pr=[].concat((0,de.Z)(gn.name.slice(0,-1)),(0,de.Z)(Mn)).join(pn);return gn.destroy?delete Kn[Pr]:Kn[Pr]=gn,Kn})},[sr,xr]=oe.useMemo(()=>{const gn=(0,de.Z)(Nn.errors),Mn=(0,de.Z)(Nn.warnings);return Object.values(Wn).forEach(ar=>{gn.push.apply(gn,(0,de.Z)(ar.errors||[])),Mn.push.apply(Mn,(0,de.Z)(ar.warnings||[]))}),[gn,Mn]},[Wn,Nn.errors,Nn.warnings]),_r=Et();function br(gn,Mn,ar){return wt&&!Ct?oe.createElement(tt,{prefixCls:tn,hasFeedback:Ne.hasFeedback,validateStatus:Ne.validateStatus,meta:Nn,errors:sr,warnings:xr,noStyle:!0},gn):oe.createElement(Xt,Object.assign({key:"row"},Ne,{className:G()(ht,Pn,Tn,bn),prefixCls:tn,fieldId:Mn,isRequired:ar,errors:sr,warnings:xr,meta:Nn,onSubItemMetaChange:kn,layout:dt}),gn)}if(!on&&!hn&&!we)return Sn(br(Ht));let Rn={};return typeof zt=="string"?Rn.label=zt:mt&&(Rn.label=String(mt)),_t&&(Rn=Object.assign(Object.assign({},Rn),_t)),Sn(oe.createElement(se.Field,Object.assign({},Ne,{messageVariables:Rn,trigger:We,validateTrigger:vn,onMetaChange:pt}),(gn,Mn,ar)=>{const Kn=Qe(mt).length&&Mn?Mn.name:[],er=st(Kn,Gt),Pr=Ft!==void 0?Ft:!!(Dt!=null&&Dt.some(_n=>{if(_n&&typeof _n=="object"&&_n.required&&!_n.warningOnly)return!0;if(typeof _n=="function"){const Gn=_n(ar);return(Gn==null?void 0:Gn.required)&&!(Gn!=null&&Gn.warningOnly)}return!1})),Dr=Object.assign({},gn);let Er=null;if(Array.isArray(Ht)&&on)Er=Ht;else if(!(hn&&(!(gt||we)||on))){if(!(we&&!hn&&!on))if(oe.isValidElement(Ht)){const _n=Object.assign(Object.assign({},Ht.props),Dr);if(_n.id||(_n.id=er),ot||sr.length>0||xr.length>0||Ne.extra){const wr=[];(ot||sr.length>0)&&wr.push(`${er}_help`),Ne.extra&&wr.push(`${er}_extra`),_n["aria-describedby"]=wr.join(" ")}sr.length>0&&(_n["aria-invalid"]="true"),Pr&&(_n["aria-required"]="true"),(0,Ie.Yr)(Ht)&&(_n.ref=_r(Kn,Ht)),new Set([].concat((0,de.Z)(Qe(We)),(0,de.Z)(Qe(vn)))).forEach(wr=>{_n[wr]=function(){for(var qr,Yr,kr,Zr,Sr,ei=arguments.length,$r=new Array(ei),jr=0;jr<ei;jr++)$r[jr]=arguments[jr];(kr=Dr[wr])===null||kr===void 0||(qr=kr).call.apply(qr,[Dr].concat($r)),(Sr=(Zr=Ht.props)[wr])===null||Sr===void 0||(Yr=Sr).call.apply(Yr,[Zr].concat($r))}});const qn=[_n["aria-required"],_n["aria-invalid"],_n["aria-describedby"]];Er=oe.createElement(xn,{control:Dr,update:Ht,childProps:qn},(0,P.Tm)(Ht,_n))}else hn&&(gt||we)&&!on?Er=Ht(ar):Er=Ht}return br(Er,er,Pr)}))}const On=un;On.useStatus=ut;var en=On,Ut=function(Ne,mt){var wt={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&mt.indexOf(ht)<0&&(wt[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)mt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(wt[ht[we]]=Ne[ht[we]]);return wt},an=Ne=>{var{prefixCls:mt,children:wt}=Ne,ht=Ut(Ne,["prefixCls","children"]);const{getPrefixCls:we}=oe.useContext(x.E_),at=we("form",mt),gt=oe.useMemo(()=>({prefixCls:at,status:"error"}),[at]);return oe.createElement(se.List,Object.assign({},ht),(Dt,bt,Ft)=>oe.createElement(m.Rk.Provider,{value:gt},wt(Dt.map(zt=>Object.assign(Object.assign({},zt),{fieldKey:zt.key})),bt,{errors:Ft.errors,warnings:Ft.warnings})))};function rn(){const{form:Ne}=oe.useContext(m.q3);return Ne}const An=Je;An.Item=en,An.List=an,An.ErrorList=ie,An.useForm=je,An.useFormInstance=rn,An.useWatch=se.useWatch,An.Provider=m.RV,An.create=()=>{};var ir=An},49397:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return M}});var m=b(59301),de=b(92310),oe=b.n(de),ve=b(36901),G=b(8654),g=b(62487),fe=b(86013),ee=b(82855),o=b(48755),H=b(2171),k=b(83397),S=b(31756),w=b(56553),C=b(24971),R=b(70045),q=b(23826),Q=b(53075);function K(F){return!!(F.prefix||F.suffix||F.allowClear||F.showCount)}var D=function(F,ue){var he={};for(var le in F)Object.prototype.hasOwnProperty.call(F,le)&&ue.indexOf(le)<0&&(he[le]=F[le]);if(F!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,le=Object.getOwnPropertySymbols(F);Se<le.length;Se++)ue.indexOf(le[Se])<0&&Object.prototype.propertyIsEnumerable.call(F,le[Se])&&(he[le[Se]]=F[le[Se]]);return he},M=(0,m.forwardRef)((F,ue)=>{const{prefixCls:he,bordered:le=!0,status:Se,size:ke,disabled:De,onBlur:Me,onFocus:Y,suffix:B,allowClear:W,addonAfter:re,addonBefore:ie,className:se,style:x,styles:E,rootClassName:V,onChange:me,classNames:ze,variant:Xe}=F,_e=D(F,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:Ke,direction:Qe,allowClear:st,autoComplete:rt,className:Vt,style:qe,classNames:Kt,styles:je}=(0,o.dj)("input"),Tt=Ke("input",he),Re=(0,m.useRef)(null),Ce=(0,k.Z)(Tt),[ce,Je,Le]=(0,Q.TI)(Tt,V),[Ie]=(0,Q.ZP)(Tt,Ce),{compactSize:P,compactItemClassnames:pe}=(0,R.ri)(Tt,Qe),xe=(0,S.Z)(A=>{var Oe;return(Oe=ke!=null?ke:P)!==null&&Oe!==void 0?Oe:A}),He=m.useContext(H.Z),et=De!=null?De:He,{status:ut,hasFeedback:xt,feedbackIcon:Lt}=(0,m.useContext)(w.aM),Et=(0,ee.F)(ut,Se),Mt=K(F)||!!xt,Yt=(0,m.useRef)(Mt),jt=(0,q.Z)(Re,!0),$t=A=>{jt(),Me==null||Me(A)},it=A=>{jt(),Y==null||Y(A)},It=A=>{jt(),me==null||me(A)},Rt=(xt||B)&&m.createElement(m.Fragment,null,B,xt&&Lt),ye=(0,fe.Z)(W!=null?W:st),[Ve,_]=(0,C.Z)("input",Xe,le);return ce(Ie(m.createElement(ve.default,Object.assign({ref:(0,G.sQ)(ue,Re),prefixCls:Tt,autoComplete:rt},_e,{disabled:et,onBlur:$t,onFocus:it,style:Object.assign(Object.assign({},qe),x),styles:Object.assign(Object.assign({},je),E),suffix:Rt,allowClear:ye,className:oe()(se,V,Le,Ce,pe,Vt),onChange:It,addonBefore:ie&&m.createElement(g.Z,{form:!0,space:!0},ie),addonAfter:re&&m.createElement(g.Z,{form:!0,space:!0},re),classNames:Object.assign(Object.assign(Object.assign({},ze),Kt),{input:oe()({[`${Tt}-sm`]:xe==="small",[`${Tt}-lg`]:xe==="large",[`${Tt}-rtl`]:Qe==="rtl"},ze==null?void 0:ze.input,Kt.input,Je),variant:oe()({[`${Tt}-${Ve}`]:_},(0,ee.Z)(Tt,Et)),affixWrapper:oe()({[`${Tt}-affix-wrapper-sm`]:xe==="small",[`${Tt}-affix-wrapper-lg`]:xe==="large",[`${Tt}-affix-wrapper-rtl`]:Qe==="rtl"},Je),wrapper:oe()({[`${Tt}-group-rtl`]:Qe==="rtl"},Je),groupWrapper:oe()({[`${Tt}-group-wrapper-sm`]:xe==="small",[`${Tt}-group-wrapper-lg`]:xe==="large",[`${Tt}-group-wrapper-rtl`]:Qe==="rtl",[`${Tt}-group-wrapper-${Ve}`]:_},(0,ee.Z)(`${Tt}-group-wrapper`,Et,xt),Je)})}))))})},79809:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ue}});var m=b(59301),de=b(92310),oe=b.n(de),ve=b(22711),G=b(86013),g=b(82855),fe=b(48755),ee=b(2171),o=b(83397),H=b(31756),k=b(56553),S=b(24971),w=b(70045),C=b(30292),R=b(53075),q=b(16931),Q=b(51636),K=b(64910);const D=he=>{const{componentCls:le,paddingLG:Se}=he,ke=`${le}-textarea`;return{[`textarea${le}`]:{maxWidth:"100%",height:"auto",minHeight:he.controlHeight,lineHeight:he.lineHeight,verticalAlign:"bottom",transition:`all ${he.motionDurationSlow}`,resize:"vertical",[`&${le}-mouse-active`]:{transition:`all ${he.motionDurationSlow}, height 0s, width 0s`}},[`${le}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[ke]:{position:"relative","&-show-count":{[`> ${le}`]:{height:"100%"},[`${le}-data-count`]:{position:"absolute",bottom:he.calc(he.fontSize).mul(he.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:he.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${le},
&-affix-wrapper${ke}-has-feedback ${le}
`]:{paddingInlineEnd:Se},[`&-affix-wrapper${le}-affix-wrapper`]:{padding:0,[`> textarea${le}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:he.calc(he.controlHeight).sub(he.calc(he.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${le}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${le}-clear-icon`]:{position:"absolute",insetInlineEnd:he.paddingInline,insetBlockStart:he.paddingXS},[`${ke}-suffix`]:{position:"absolute",top:0,insetInlineEnd:he.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${le}-affix-wrapper-sm`]:{[`${le}-suffix`]:{[`${le}-clear-icon`]:{insetInlineEnd:he.paddingInlineSM}}}}}};var $=(0,q.I$)(["Input","TextArea"],he=>{const le=(0,Q.mergeToken)(he,(0,K.e)(he));return[D(le)]},K.T,{resetFont:!1}),M=function(he,le){var Se={};for(var ke in he)Object.prototype.hasOwnProperty.call(he,ke)&&le.indexOf(ke)<0&&(Se[ke]=he[ke]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,ke=Object.getOwnPropertySymbols(he);De<ke.length;De++)le.indexOf(ke[De])<0&&Object.prototype.propertyIsEnumerable.call(he,ke[De])&&(Se[ke[De]]=he[ke[De]]);return Se},ue=(0,m.forwardRef)((he,le)=>{var Se;const{prefixCls:ke,bordered:De=!0,size:Me,disabled:Y,status:B,allowClear:W,classNames:re,rootClassName:ie,className:se,style:x,styles:E,variant:V,showCount:me,onMouseDown:ze,onResize:Xe}=he,_e=M(he,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:Ke,direction:Qe,allowClear:st,autoComplete:rt,className:Vt,style:qe,classNames:Kt,styles:je}=(0,fe.dj)("textArea"),Tt=m.useContext(ee.Z),Re=Y!=null?Y:Tt,{status:Ce,hasFeedback:ce,feedbackIcon:Je}=m.useContext(k.aM),Le=(0,g.F)(Ce,B),Ie=m.useRef(null);m.useImperativeHandle(le,()=>{var _;return{resizableTextArea:(_=Ie.current)===null||_===void 0?void 0:_.resizableTextArea,focus:A=>{var Oe,N;(0,C.nH)((N=(Oe=Ie.current)===null||Oe===void 0?void 0:Oe.resizableTextArea)===null||N===void 0?void 0:N.textArea,A)},blur:()=>{var A;return(A=Ie.current)===null||A===void 0?void 0:A.blur()}}});const P=Ke("input",ke),pe=(0,o.Z)(P),[xe,He,et]=(0,R.TI)(P,ie),[ut]=$(P,pe),{compactSize:xt,compactItemClassnames:Lt}=(0,w.ri)(P,Qe),Et=(0,H.Z)(_=>{var A;return(A=Me!=null?Me:xt)!==null&&A!==void 0?A:_}),[Mt,Yt]=(0,S.Z)("textArea",V,De),jt=(0,G.Z)(W!=null?W:st),[$t,it]=m.useState(!1),[It,Rt]=m.useState(!1),ye=_=>{it(!0),ze==null||ze(_);const A=()=>{it(!1),document.removeEventListener("mouseup",A)};document.addEventListener("mouseup",A)},Ve=_=>{var A,Oe;if(Xe==null||Xe(_),$t&&typeof getComputedStyle=="function"){const N=(Oe=(A=Ie.current)===null||A===void 0?void 0:A.nativeElement)===null||Oe===void 0?void 0:Oe.querySelector("textarea");N&&getComputedStyle(N).resize==="both"&&Rt(!0)}};return xe(ut(m.createElement(ve.default,Object.assign({autoComplete:rt},_e,{style:Object.assign(Object.assign({},qe),x),styles:Object.assign(Object.assign({},je),E),disabled:Re,allowClear:jt,className:oe()(et,pe,se,ie,Lt,Vt,It&&`${P}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},re),Kt),{textarea:oe()({[`${P}-sm`]:Et==="small",[`${P}-lg`]:Et==="large"},He,re==null?void 0:re.textarea,Kt.textarea,$t&&`${P}-mouse-active`),variant:oe()({[`${P}-${Mt}`]:Yt},(0,g.Z)(P,Le)),affixWrapper:oe()(`${P}-textarea-affix-wrapper`,{[`${P}-affix-wrapper-rtl`]:Qe==="rtl",[`${P}-affix-wrapper-sm`]:Et==="small",[`${P}-affix-wrapper-lg`]:Et==="large",[`${P}-textarea-show-count`]:me||((Se=he.count)===null||Se===void 0?void 0:Se.show)},He)}),prefixCls:P,suffix:ce&&m.createElement("span",{className:`${P}-textarea-suffix`},Je),showCount:me,ref:Ie,onResize:Ve,onMouseDown:ye}))))})},23826:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return de}});var m=b(59301);function de(oe,ve){const G=(0,m.useRef)([]),g=()=>{G.current.push(setTimeout(()=>{var fe,ee,o,H;!((fe=oe.current)===null||fe===void 0)&&fe.input&&((ee=oe.current)===null||ee===void 0?void 0:ee.input.getAttribute("type"))==="password"&&(!((o=oe.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((H=oe.current)===null||H===void 0||H.input.removeAttribute("value"))}))};return(0,m.useEffect)(()=>(ve&&g(),()=>G.current.forEach(fe=>{fe&&clearTimeout(fe)})),[]),g}},37568:function(ln,ct,b){"use strict";b.d(ct,{default:function(){return Kt}});var m=b(59301),de=b(92310),oe=b.n(de),ve=b(48755),G=b(56553),g=b(53075),ee=je=>{const{getPrefixCls:Tt,direction:Re}=(0,m.useContext)(ve.E_),{prefixCls:Ce,className:ce}=je,Je=Tt("input-group",Ce),Le=Tt("input"),[Ie,P,pe]=(0,g.ZP)(Le),xe=oe()(Je,pe,{[`${Je}-lg`]:je.size==="large",[`${Je}-sm`]:je.size==="small",[`${Je}-compact`]:je.compact,[`${Je}-rtl`]:Re==="rtl"},P,ce),He=(0,m.useContext)(G.aM),et=(0,m.useMemo)(()=>Object.assign(Object.assign({},He),{isFormItemInput:!1}),[He]);return Ie(m.createElement("span",{className:xe,style:je.style,onMouseEnter:je.onMouseEnter,onMouseLeave:je.onMouseLeave,onFocus:je.onFocus,onBlur:je.onBlur},m.createElement(G.aM.Provider,{value:et},je.children)))},o=b(49397),H=b(94480),k=b(6089),S=b(26112),w=b(82855),C=b(31756),R=b(16931),q=b(51636),Q=b(64910);const K=je=>{const{componentCls:Tt,paddingXS:Re}=je;return{[Tt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Re,"&-rtl":{direction:"rtl"},[`${Tt}-input`]:{textAlign:"center",paddingInline:je.paddingXXS},[`&${Tt}-sm ${Tt}-input`]:{paddingInline:je.calc(je.paddingXXS).div(2).equal()},[`&${Tt}-lg ${Tt}-input`]:{paddingInline:je.paddingXS}}}};var D=(0,R.I$)(["Input","OTP"],je=>{const Tt=(0,q.mergeToken)(je,(0,Q.e)(je));return[K(Tt)]},Q.T),$=b(16089),M=function(je,Tt){var Re={};for(var Ce in je)Object.prototype.hasOwnProperty.call(je,Ce)&&Tt.indexOf(Ce)<0&&(Re[Ce]=je[Ce]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,Ce=Object.getOwnPropertySymbols(je);ce<Ce.length;ce++)Tt.indexOf(Ce[ce])<0&&Object.prototype.propertyIsEnumerable.call(je,Ce[ce])&&(Re[Ce[ce]]=je[Ce[ce]]);return Re},ue=m.forwardRef((je,Tt)=>{const{value:Re,onChange:Ce,onActiveChange:ce,index:Je,mask:Le}=je,Ie=M(je,["value","onChange","onActiveChange","index","mask"]),P=Re&&typeof Le=="string"?Le:Re,pe=xt=>{Ce(Je,xt.target.value)},xe=m.useRef(null);m.useImperativeHandle(Tt,()=>xe.current);const He=()=>{(0,$.Z)(()=>{var xt;const Lt=(xt=xe.current)===null||xt===void 0?void 0:xt.input;document.activeElement===Lt&&Lt&&Lt.select()})},et=xt=>{const{key:Lt,ctrlKey:Et,metaKey:Mt}=xt;Lt==="ArrowLeft"?ce(Je-1):Lt==="ArrowRight"?ce(Je+1):Lt==="z"&&(Et||Mt)&&xt.preventDefault(),He()},ut=xt=>{xt.key==="Backspace"&&!Re&&ce(Je-1),He()};return m.createElement(o.Z,Object.assign({type:Le===!0?"password":"text"},Ie,{ref:xe,value:P,onInput:pe,onFocus:He,onKeyDown:et,onKeyUp:ut,onMouseDown:He,onMouseUp:He}))}),he=function(je,Tt){var Re={};for(var Ce in je)Object.prototype.hasOwnProperty.call(je,Ce)&&Tt.indexOf(Ce)<0&&(Re[Ce]=je[Ce]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,Ce=Object.getOwnPropertySymbols(je);ce<Ce.length;ce++)Tt.indexOf(Ce[ce])<0&&Object.prototype.propertyIsEnumerable.call(je,Ce[ce])&&(Re[Ce[ce]]=je[Ce[ce]]);return Re};function le(je){return(je||"").split("")}const Se=je=>{const{index:Tt,prefixCls:Re,separator:Ce}=je,ce=typeof Ce=="function"?Ce(Tt):Ce;return ce?m.createElement("span",{className:`${Re}-separator`},ce):null};var De=m.forwardRef((je,Tt)=>{const{prefixCls:Re,length:Ce=6,size:ce,defaultValue:Je,value:Le,onChange:Ie,formatter:P,separator:pe,variant:xe,disabled:He,status:et,autoFocus:ut,mask:xt,type:Lt,onInput:Et,inputMode:Mt}=je,Yt=he(je,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:jt,direction:$t}=m.useContext(ve.E_),it=jt("otp",Re),It=(0,S.Z)(Yt,{aria:!0,data:!0,attr:!0}),[Rt,ye,Ve]=D(it),_=(0,C.Z)(Ye=>ce!=null?ce:Ye),A=m.useContext(G.aM),Oe=(0,w.F)(A.status,et),N=m.useMemo(()=>Object.assign(Object.assign({},A),{status:Oe,hasFeedback:!1,feedbackIcon:null}),[A,Oe]),ae=m.useRef(null),St=m.useRef({});m.useImperativeHandle(Tt,()=>({focus:()=>{var Ye;(Ye=St.current[0])===null||Ye===void 0||Ye.focus()},blur:()=>{var Ye;for(let X=0;X<Ce;X+=1)(Ye=St.current[X])===null||Ye===void 0||Ye.blur()},nativeElement:ae.current}));const Ee=Ye=>P?P(Ye):Ye,[$e,Ge]=m.useState(()=>le(Ee(Je||"")));m.useEffect(()=>{Le!==void 0&&Ge(le(Le))},[Le]);const Z=(0,k.Z)(Ye=>{Ge(Ye),Et&&Et(Ye),Ie&&Ye.length===Ce&&Ye.every(X=>X)&&Ye.some((X,tt)=>$e[tt]!==X)&&Ie(Ye.join(""))}),J=(0,k.Z)((Ye,X)=>{let tt=(0,H.Z)($e);for(let Xt=0;Xt<Ye;Xt+=1)tt[Xt]||(tt[Xt]="");X.length<=1?tt[Ye]=X:tt=tt.slice(0,Ye).concat(le(X)),tt=tt.slice(0,Ce);for(let Xt=tt.length-1;Xt>=0&&!tt[Xt];Xt-=1)tt.pop();const Ot=Ee(tt.map(Xt=>Xt||" ").join(""));return tt=le(Ot).map((Xt,pn)=>Xt===" "&&!tt[pn]?tt[pn]:Xt),tt}),be=(Ye,X)=>{var tt;const Ot=J(Ye,X),Xt=Math.min(Ye+X.length,Ce-1);Xt!==Ye&&Ot[Ye]!==void 0&&((tt=St.current[Xt])===null||tt===void 0||tt.focus()),Z(Ot)},Pe=Ye=>{var X;(X=St.current[Ye])===null||X===void 0||X.focus()},j={variant:xe,disabled:He,status:Oe,mask:xt,type:Lt,inputMode:Mt};return Rt(m.createElement("div",Object.assign({},It,{ref:ae,className:oe()(it,{[`${it}-sm`]:_==="small",[`${it}-lg`]:_==="large",[`${it}-rtl`]:$t==="rtl"},Ve,ye)}),m.createElement(G.aM.Provider,{value:N},Array.from({length:Ce}).map((Ye,X)=>{const tt=`otp-${X}`,Ot=$e[X]||"";return m.createElement(m.Fragment,{key:tt},m.createElement(ue,Object.assign({ref:Xt=>{St.current[X]=Xt},index:X,size:_,htmlSize:1,className:`${it}-input`,onChange:be,value:Ot,onActiveChange:Pe,autoFocus:X===0&&ut},j)),X<Ce-1&&m.createElement(Se,{separator:pe,index:X,prefixCls:it}))}))))}),Me=b(73331),Y=b(15277),B=b(2738),W=b(8654),re=b(2171),ie=b(23826),se=function(je,Tt){var Re={};for(var Ce in je)Object.prototype.hasOwnProperty.call(je,Ce)&&Tt.indexOf(Ce)<0&&(Re[Ce]=je[Ce]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,Ce=Object.getOwnPropertySymbols(je);ce<Ce.length;ce++)Tt.indexOf(Ce[ce])<0&&Object.prototype.propertyIsEnumerable.call(je,Ce[ce])&&(Re[Ce[ce]]=je[Ce[ce]]);return Re};const x=je=>je?m.createElement(Y.Z,null):m.createElement(Me.Z,null),E={click:"onClick",hover:"onMouseOver"};var me=m.forwardRef((je,Tt)=>{const{disabled:Re,action:Ce="click",visibilityToggle:ce=!0,iconRender:Je=x}=je,Le=m.useContext(re.Z),Ie=Re!=null?Re:Le,P=typeof ce=="object"&&ce.visible!==void 0,[pe,xe]=(0,m.useState)(()=>P?ce.visible:!1),He=(0,m.useRef)(null);m.useEffect(()=>{P&&xe(ce.visible)},[P,ce]);const et=(0,ie.Z)(He),ut=()=>{var _;if(Ie)return;pe&&et();const A=!pe;xe(A),typeof ce=="object"&&((_=ce.onVisibleChange)===null||_===void 0||_.call(ce,A))},xt=_=>{const A=E[Ce]||"",Oe=Je(pe),N={[A]:ut,className:`${_}-icon`,key:"passwordIcon",onMouseDown:ae=>{ae.preventDefault()},onMouseUp:ae=>{ae.preventDefault()}};return m.cloneElement(m.isValidElement(Oe)?Oe:m.createElement("span",null,Oe),N)},{className:Lt,prefixCls:Et,inputPrefixCls:Mt,size:Yt}=je,jt=se(je,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:$t}=m.useContext(ve.E_),it=$t("input",Mt),It=$t("input-password",Et),Rt=ce&&xt(It),ye=oe()(It,Lt,{[`${It}-${Yt}`]:!!Yt}),Ve=Object.assign(Object.assign({},(0,B.Z)(jt,["suffix","iconRender","visibilityToggle"])),{type:pe?"text":"password",className:ye,prefixCls:it,suffix:Rt});return Yt&&(Ve.size=Yt),m.createElement(o.Z,Object.assign({ref:(0,W.sQ)(Tt,He)},Ve))}),ze=b(47472),Xe=b(22703),_e=b(7939),Ke=b(70045),Qe=function(je,Tt){var Re={};for(var Ce in je)Object.prototype.hasOwnProperty.call(je,Ce)&&Tt.indexOf(Ce)<0&&(Re[Ce]=je[Ce]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,Ce=Object.getOwnPropertySymbols(je);ce<Ce.length;ce++)Tt.indexOf(Ce[ce])<0&&Object.prototype.propertyIsEnumerable.call(je,Ce[ce])&&(Re[Ce[ce]]=je[Ce[ce]]);return Re},rt=m.forwardRef((je,Tt)=>{const{prefixCls:Re,inputPrefixCls:Ce,className:ce,size:Je,suffix:Le,enterButton:Ie=!1,addonAfter:P,loading:pe,disabled:xe,onSearch:He,onChange:et,onCompositionStart:ut,onCompositionEnd:xt}=je,Lt=Qe(je,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Et,direction:Mt}=m.useContext(ve.E_),Yt=m.useRef(!1),jt=Et("input-search",Re),$t=Et("input",Ce),{compactSize:it}=(0,Ke.ri)(jt,Mt),It=(0,C.Z)(be=>{var Pe;return(Pe=Je!=null?Je:it)!==null&&Pe!==void 0?Pe:be}),Rt=m.useRef(null),ye=be=>{be!=null&&be.target&&be.type==="click"&&He&&He(be.target.value,be,{source:"clear"}),et==null||et(be)},Ve=be=>{var Pe;document.activeElement===((Pe=Rt.current)===null||Pe===void 0?void 0:Pe.input)&&be.preventDefault()},_=be=>{var Pe,j;He&&He((j=(Pe=Rt.current)===null||Pe===void 0?void 0:Pe.input)===null||j===void 0?void 0:j.value,be,{source:"input"})},A=be=>{Yt.current||pe||_(be)},Oe=typeof Ie=="boolean"?m.createElement(ze.Z,null):null,N=`${jt}-button`;let ae;const St=Ie||{},Ee=St.type&&St.type.__ANT_BUTTON===!0;Ee||St.type==="button"?ae=(0,Xe.Tm)(St,Object.assign({onMouseDown:Ve,onClick:be=>{var Pe,j;(j=(Pe=St==null?void 0:St.props)===null||Pe===void 0?void 0:Pe.onClick)===null||j===void 0||j.call(Pe,be),_(be)},key:"enterButton"},Ee?{className:N,size:It}:{})):ae=m.createElement(_e.ZP,{className:N,type:Ie?"primary":void 0,size:It,disabled:xe,key:"enterButton",onMouseDown:Ve,onClick:_,loading:pe,icon:Oe},Ie),P&&(ae=[ae,(0,Xe.Tm)(P,{key:"addonAfter"})]);const $e=oe()(jt,{[`${jt}-rtl`]:Mt==="rtl",[`${jt}-${It}`]:!!It,[`${jt}-with-button`]:!!Ie},ce),Ge=Object.assign(Object.assign({},Lt),{className:$e,prefixCls:$t,type:"search"}),Z=be=>{Yt.current=!0,ut==null||ut(be)},J=be=>{Yt.current=!1,xt==null||xt(be)};return m.createElement(o.Z,Object.assign({ref:(0,W.sQ)(Rt,Tt),onPressEnter:A},Ge,{size:It,onCompositionStart:Z,onCompositionEnd:J,addonAfter:ae,suffix:Le,onChange:ye,disabled:xe}))}),Vt=b(79809);const qe=o.Z;qe.Group=ee,qe.Search=rt,qe.TextArea=Vt.Z,qe.Password=me,qe.OTP=De;var Kt=qe},53075:function(ln,ct,b){"use strict";b.d(ct,{TI:function(){return $},ik:function(){return S},nz:function(){return ee},s7:function(){return w},x0:function(){return k}});var m=b(36237),de=b(63356),oe=b(56119),ve=b(16931),G=b(51636),g=b(64910),fe=b(39082);const ee=M=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:M,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=M=>({borderColor:M.activeBorderColor,boxShadow:M.activeShadow,outline:0,backgroundColor:M.activeBg}),H=M=>{const{paddingBlockLG:F,lineHeightLG:ue,borderRadiusLG:he,paddingInlineLG:le}=M;return{padding:`${(0,m.unit)(F)} ${(0,m.unit)(le)}`,fontSize:M.inputFontSizeLG,lineHeight:ue,borderRadius:he}},k=M=>({padding:`${(0,m.unit)(M.paddingBlockSM)} ${(0,m.unit)(M.paddingInlineSM)}`,fontSize:M.inputFontSizeSM,borderRadius:M.borderRadiusSM}),S=M=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,m.unit)(M.paddingBlock)} ${(0,m.unit)(M.paddingInline)}`,color:M.colorText,fontSize:M.inputFontSize,lineHeight:M.lineHeight,borderRadius:M.borderRadius,transition:`all ${M.motionDurationMid}`},ee(M.colorTextPlaceholder)),{"&-lg":Object.assign({},H(M)),"&-sm":Object.assign({},k(M)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),w=M=>{const{componentCls:F,antCls:ue}=M;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:M.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${F}, &-lg > ${F}-group-addon`]:Object.assign({},H(M)),[`&-sm ${F}, &-sm > ${F}-group-addon`]:Object.assign({},k(M)),[`&-lg ${ue}-select-single ${ue}-select-selector`]:{height:M.controlHeightLG},[`&-sm ${ue}-select-single ${ue}-select-selector`]:{height:M.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,m.unit)(M.paddingInline)}`,color:M.colorText,fontWeight:"normal",fontSize:M.inputFontSize,textAlign:"center",borderRadius:M.borderRadius,transition:`all ${M.motionDurationSlow}`,lineHeight:1,[`${ue}-select`]:{margin:`${(0,m.unit)(M.calc(M.paddingBlock).add(1).mul(-1).equal())} ${(0,m.unit)(M.calc(M.paddingInline).mul(-1).equal())}`,[`&${ue}-select-single:not(${ue}-select-customize-input):not(${ue}-pagination-size-changer)`]:{[`${ue}-select-selector`]:{backgroundColor:"inherit",border:`${(0,m.unit)(M.lineWidth)} ${M.lineType} transparent`,boxShadow:"none"}}},[`${ue}-cascader-picker`]:{margin:`-9px ${(0,m.unit)(M.calc(M.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${ue}-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,[`${ue}-select ${ue}-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,[`${ue}-select ${ue}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${F}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${F}-search &`]:{borderStartStartRadius:M.borderRadius,borderEndStartRadius:M.borderRadius}},[`&:not(:first-child), ${F}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${F}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,de.dF)()),{[`${F}-group-addon, ${F}-group-wrap, > ${F}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:M.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${F}-affix-wrapper,
& > ${F}-number-affix-wrapper,
& > ${ue}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:M.calc(M.lineWidth).mul(-1).equal(),borderInlineEndWidth:M.lineWidth},[F]:{float:"none"},[`& > ${ue}-select > ${ue}-select-selector,
& > ${ue}-select-auto-complete ${F},
& > ${ue}-cascader-picker ${F},
& > ${F}-group-wrapper ${F}`]:{borderInlineEndWidth:M.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${ue}-select-focused`]:{zIndex:1},[`& > ${ue}-select > ${ue}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${ue}-select:first-child > ${ue}-select-selector,
& > ${ue}-select-auto-complete:first-child ${F},
& > ${ue}-cascader-picker:first-child ${F}`]:{borderStartStartRadius:M.borderRadius,borderEndStartRadius:M.borderRadius},[`& > *:last-child,
& > ${ue}-select:last-child > ${ue}-select-selector,
& > ${ue}-cascader-picker:last-child ${F},
& > ${ue}-cascader-picker-focused:last-child ${F}`]:{borderInlineEndWidth:M.lineWidth,borderStartEndRadius:M.borderRadius,borderEndEndRadius:M.borderRadius},[`& > ${ue}-select-auto-complete ${F}`]:{verticalAlign:"top"},[`${F}-group-wrapper + ${F}-group-wrapper`]:{marginInlineStart:M.calc(M.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:M.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:M.borderRadius}}}})}},C=M=>{const{componentCls:F,controlHeightSM:ue,lineWidth:he,calc:le}=M,ke=le(ue).sub(le(he).mul(2)).sub(16).div(2).equal();return{[F]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(M)),S(M)),(0,fe.qG)(M)),(0,fe.H8)(M)),(0,fe.Mu)(M)),(0,fe.vc)(M)),{'&[type="color"]':{height:M.controlHeight,[`&${F}-lg`]:{height:M.controlHeightLG},[`&${F}-sm`]:{height:ue,paddingTop:ke,paddingBottom:ke}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},R=M=>{const{componentCls:F}=M;return{[`${F}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:M.colorTextQuaternary,fontSize:M.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${M.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:M.colorTextTertiary},"&:active":{color:M.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,m.unit)(M.inputAffixPadding)}`}}}},q=M=>{const{componentCls:F,inputAffixPadding:ue,colorTextDescription:he,motionDurationSlow:le,colorIcon:Se,colorIconHover:ke,iconCls:De}=M,Me=`${F}-affix-wrapper`,Y=`${F}-affix-wrapper-disabled`;return{[Me]:Object.assign(Object.assign(Object.assign(Object.assign({},S(M)),{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:M.paddingXS}},"&-show-count-suffix":{color:he},"&-show-count-has-suffix":{marginInlineEnd:M.paddingXXS},"&-prefix":{marginInlineEnd:ue},"&-suffix":{marginInlineStart:ue}}}),R(M)),{[`${De}${F}-password-icon`]:{color:Se,cursor:"pointer",transition:`all ${le}`,"&:hover":{color:ke}}}),[`${F}-underlined`]:{borderRadius:0},[Y]:{[`${De}${F}-password-icon`]:{color:Se,cursor:"not-allowed","&:hover":{color:Se}}}}},Q=M=>{const{componentCls:F,borderRadiusLG:ue,borderRadiusSM:he}=M;return{[`${F}-group`]:Object.assign(Object.assign(Object.assign({},(0,de.Wf)(M)),w(M)),{"&-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:ue,fontSize:M.inputFontSizeLG}},"&-sm":{[`${F}-group-addon`]:{borderRadius:he}}},(0,fe.ir)(M)),(0,fe.S5)(M)),{[`&: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}}})})}},K=M=>{const{componentCls:F,antCls:ue}=M,he=`${F}-search`;return{[he]:{[F]:{"&:hover, &:focus":{[`+ ${F}-group-addon ${he}-button:not(${ue}-btn-primary)`]:{borderInlineStartColor:M.colorPrimaryHover}}},[`${F}-affix-wrapper`]:{height:M.controlHeight,borderRadius:0},[`${F}-lg`]:{lineHeight:M.calc(M.lineHeightLG).sub(2e-4).equal()},[`> ${F}-group`]:{[`> ${F}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${he}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${he}-button:not(${ue}-btn-primary)`]:{color:M.colorTextDescription,"&:hover":{color:M.colorPrimaryHover},"&:active":{color:M.colorPrimaryActive},[`&${ue}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${he}-button`]:{height:M.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${F}-affix-wrapper, ${he}-button`]:{height:M.controlHeightLG}},"&-small":{[`${F}-affix-wrapper, ${he}-button`]:{height:M.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${F}-compact-item`]:{[`&:not(${F}-compact-last-item)`]:{[`${F}-group-addon`]:{[`${F}-search-button`]:{marginInlineEnd:M.calc(M.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=M=>{const{componentCls:F}=M;return{[`${F}-out-of-range`]:{[`&, & input, & textarea, ${F}-show-count-suffix, ${F}-data-count`]:{color:M.colorError}}}},$=(0,ve.I$)(["Input","Shared"],M=>{const F=(0,G.mergeToken)(M,(0,g.e)(M));return[C(F),q(F)]},g.T,{resetFont:!1});ct.ZP=(0,ve.I$)(["Input","Component"],M=>{const F=(0,G.mergeToken)(M,(0,g.e)(M));return[Q(F),K(F),D(F),(0,oe.c)(F)]},g.T,{resetFont:!1})},64910:function(ln,ct,b){"use strict";b.d(ct,{T:function(){return oe},e:function(){return de}});var m=b(51636);function de(ve){return(0,m.mergeToken)(ve,{inputAffixPadding:ve.paddingXXS})}const oe=ve=>{const{controlHeight:G,fontSize:g,lineHeight:fe,lineWidth:ee,controlHeightSM:o,controlHeightLG:H,fontSizeLG:k,lineHeightLG:S,paddingSM:w,controlPaddingHorizontalSM:C,controlPaddingHorizontal:R,colorFillAlter:q,colorPrimaryHover:Q,colorPrimary:K,controlOutlineWidth:D,controlOutline:$,colorErrorOutline:M,colorWarningOutline:F,colorBgContainer:ue,inputFontSize:he,inputFontSizeLG:le,inputFontSizeSM:Se}=ve,ke=he||g,De=Se||ke,Me=le||k,Y=Math.round((G-ke*fe)/2*10)/10-ee,B=Math.round((o-De*fe)/2*10)/10-ee,W=Math.ceil((H-Me*S)/2*10)/10-ee;return{paddingBlock:Math.max(Y,0),paddingBlockSM:Math.max(B,0),paddingBlockLG:Math.max(W,0),paddingInline:w-ee,paddingInlineSM:C-ee,paddingInlineLG:R-ee,addonBg:q,activeBorderColor:K,hoverBorderColor:Q,activeShadow:`0 0 0 ${D}px ${$}`,errorActiveShadow:`0 0 0 ${D}px ${M}`,warningActiveShadow:`0 0 0 ${D}px ${F}`,hoverBg:ue,activeBg:ue,inputFontSize:ke,inputFontSizeLG:Me,inputFontSizeSM:De}}},39082:function(ln,ct,b){"use strict";b.d(ct,{$U:function(){return G},H8:function(){return w},Mu:function(){return H},S5:function(){return R},Xy:function(){return ve},ir:function(){return o},qG:function(){return fe},vc:function(){return K}});var m=b(36237),de=b(51636);const oe=D=>({borderColor:D.hoverBorderColor,backgroundColor:D.hoverBg}),ve=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({},oe((0,de.mergeToken)(D,{hoverBorderColor:D.colorBorder,hoverBg:D.colorBgContainerDisabled})))}),G=(D,$)=>({background:D.colorBgContainer,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:$.borderColor,"&:hover":{borderColor:$.hoverBorderColor,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:$.activeBorderColor,boxShadow:$.activeShadow,outline:0,backgroundColor:D.activeBg}}),g=(D,$)=>({[`&${D.componentCls}-status-${$.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},G(D,$)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:$.affixColor}}),[`&${D.componentCls}-status-${$.status}${D.componentCls}-disabled`]:{borderColor:$.borderColor}}),fe=(D,$)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},G(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ve(D))}),g(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),g(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),$)}),ee=(D,$)=>({[`&${D.componentCls}-group-wrapper-status-${$.status}`]:{[`${D.componentCls}-group-addon`]:{borderColor:$.addonBorderColor,color:$.addonColor}}}),o=D=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.addonBg,border:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ee(D,{status:"error",addonBorderColor:D.colorError,addonColor:D.colorErrorText})),ee(D,{status:"warning",addonBorderColor:D.colorWarning,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group-addon`]:Object.assign({},ve(D))}})}),H=(D,$)=>{const{componentCls:M}=D;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${M}-disabled, &[disabled]`]:{color:D.colorTextDisabled,cursor:"not-allowed"},[`&${M}-status-error`]:{"&, & input, & textarea":{color:D.colorError}},[`&${M}-status-warning`]:{"&, & input, & textarea":{color:D.colorWarning}}},$)}},k=(D,$)=>{var M;return{background:$.bg,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(M=$==null?void 0:$.inputColor)!==null&&M!==void 0?M:"unset"},"&:hover":{background:$.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:$.activeBorderColor,backgroundColor:D.activeBg}}},S=(D,$)=>({[`&${D.componentCls}-status-${$.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},k(D,$)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:$.affixColor}})}),w=(D,$)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k(D,{bg:D.colorFillTertiary,hoverBg:D.colorFillSecondary,activeBorderColor:D.activeBorderColor})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ve(D))}),S(D,{status:"error",bg:D.colorErrorBg,hoverBg:D.colorErrorBgHover,activeBorderColor:D.colorError,inputColor:D.colorErrorText,affixColor:D.colorError})),S(D,{status:"warning",bg:D.colorWarningBg,hoverBg:D.colorWarningBgHover,activeBorderColor:D.colorWarning,inputColor:D.colorWarningText,affixColor:D.colorWarning})),$)}),C=(D,$)=>({[`&${D.componentCls}-group-wrapper-status-${$.status}`]:{[`${D.componentCls}-group-addon`]:{background:$.addonBg,color:$.addonColor}}}),R=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,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,m.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,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`}}}})}),q=(D,$)=>({background:D.colorBgContainer,borderWidth:`${(0,m.unit)(D.lineWidth)} 0`,borderStyle:`${D.lineType} none`,borderColor:`transparent transparent ${$.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${$.borderColor} transparent`,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${$.borderColor} transparent`,outline:0,backgroundColor:D.activeBg}}),Q=(D,$)=>({[`&${D.componentCls}-status-${$.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},q(D,$)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:$.affixColor}}),[`&${D.componentCls}-status-${$.status}${D.componentCls}-disabled`]:{borderColor:`transparent transparent ${$.borderColor} transparent`}}),K=(D,$)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q(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"}}),Q(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),Q(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),$)})},24303:function(ln,ct,b){"use strict";b.d(ct,{D:function(){return he},Z:function(){return ke}});var m=b(59301),de=b(54476),oe={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"},ve=oe,G=b(7657),g=function(Me,Y){return m.createElement(G.Z,(0,de.Z)({},Me,{ref:Y,icon:ve}))},fe=m.forwardRef(g),ee=fe,o=b(33853),H=b(38819),k=b(92310),S=b.n(k),w=b(2738),C=b(48755),R=b(6989),q=b(36237),Q=b(48923),K=b(16931);const D=De=>{const{componentCls:Me,siderBg:Y,motionDurationMid:B,motionDurationSlow:W,antCls:re,triggerHeight:ie,triggerColor:se,triggerBg:x,headerHeight:E,zeroTriggerWidth:V,zeroTriggerHeight:me,borderRadiusLG:ze,lightSiderBg:Xe,lightTriggerColor:_e,lightTriggerBg:Ke,bodyBg:Qe}=De;return{[Me]:{position:"relative",minWidth:0,background:Y,transition:`all ${B}, background 0s`,"&-has-trigger":{paddingBottom:ie},"&-right":{order:1},[`${Me}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${re}-menu${re}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${Me}-children`]:{overflow:"hidden"},[`${Me}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:ie,color:se,lineHeight:(0,q.unit)(ie),textAlign:"center",background:x,cursor:"pointer",transition:`all ${B}`},[`${Me}-zero-width-trigger`]:{position:"absolute",top:E,insetInlineEnd:De.calc(V).mul(-1).equal(),zIndex:1,width:V,height:me,color:se,fontSize:De.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Y,borderRadius:`0 ${(0,q.unit)(ze)} ${(0,q.unit)(ze)} 0`,cursor:"pointer",transition:`background ${W} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${W}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:De.calc(V).mul(-1).equal(),borderRadius:`${(0,q.unit)(ze)} 0 0 ${(0,q.unit)(ze)}`}},"&-light":{background:Xe,[`${Me}-trigger`]:{color:_e,background:Ke},[`${Me}-zero-width-trigger`]:{color:_e,background:Ke,border:`1px solid ${Qe}`,borderInlineStart:0}}}}};var $=(0,K.I$)(["Layout","Sider"],De=>[D(De)],Q.eh,{deprecatedTokens:Q.jn}),M=function(De,Me){var Y={};for(var B in De)Object.prototype.hasOwnProperty.call(De,B)&&Me.indexOf(B)<0&&(Y[B]=De[B]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,B=Object.getOwnPropertySymbols(De);W<B.length;W++)Me.indexOf(B[W])<0&&Object.prototype.propertyIsEnumerable.call(De,B[W])&&(Y[B[W]]=De[B[W]]);return Y};const F={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=De=>!Number.isNaN(Number.parseFloat(De))&&isFinite(De),he=m.createContext({}),le=(()=>{let De=0;return function(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return De+=1,`${Me}${De}`}})();var ke=m.forwardRef((De,Me)=>{const{prefixCls:Y,className:B,trigger:W,children:re,defaultCollapsed:ie=!1,theme:se="dark",style:x={},collapsible:E=!1,reverseArrow:V=!1,width:me=200,collapsedWidth:ze=80,zeroWidthTriggerStyle:Xe,breakpoint:_e,onCollapse:Ke,onBreakpoint:Qe}=De,st=M(De,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:rt}=(0,m.useContext)(R.V),[Vt,qe]=(0,m.useState)("collapsed"in De?De.collapsed:ie),[Kt,je]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"collapsed"in De&&qe(De.collapsed)},[De.collapsed]);const Tt=(It,Rt)=>{"collapsed"in De||qe(It),Ke==null||Ke(It,Rt)},{getPrefixCls:Re,direction:Ce}=(0,m.useContext)(C.E_),ce=Re("layout-sider",Y),[Je,Le,Ie]=$(ce),P=(0,m.useRef)(null);P.current=It=>{je(It.matches),Qe==null||Qe(It.matches),Vt!==It.matches&&Tt(It.matches,"responsive")},(0,m.useEffect)(()=>{function It(ye){return P.current(ye)}let Rt;if(typeof window!="undefined"){const{matchMedia:ye}=window;if(ye&&_e&&_e in F){Rt=ye(`screen and (max-width: ${F[_e]})`);try{Rt.addEventListener("change",It)}catch(Ve){Rt.addListener(It)}It(Rt)}}return()=>{try{Rt==null||Rt.removeEventListener("change",It)}catch(ye){Rt==null||Rt.removeListener(It)}}},[_e]),(0,m.useEffect)(()=>{const It=le("ant-sider-");return rt.addSider(It),()=>rt.removeSider(It)},[]);const pe=()=>{Tt(!Vt,"clickTrigger")},xe=(0,w.Z)(st,["collapsed"]),He=Vt?ze:me,et=ue(He)?`${He}px`:String(He),ut=parseFloat(String(ze||0))===0?m.createElement("span",{onClick:pe,className:S()(`${ce}-zero-width-trigger`,`${ce}-zero-width-trigger-${V?"right":"left"}`),style:Xe},W||m.createElement(ee,null)):null,xt=Ce==="rtl"==!V,Mt={expanded:xt?m.createElement(H.Z,null):m.createElement(o.Z,null),collapsed:xt?m.createElement(o.Z,null):m.createElement(H.Z,null)}[Vt?"collapsed":"expanded"],Yt=W!==null?ut||m.createElement("div",{className:`${ce}-trigger`,onClick:pe,style:{width:et}},W||Mt):null,jt=Object.assign(Object.assign({},x),{flex:`0 0 ${et}`,maxWidth:et,minWidth:et,width:et}),$t=S()(ce,`${ce}-${se}`,{[`${ce}-collapsed`]:!!Vt,[`${ce}-has-trigger`]:E&&W!==null&&!ut,[`${ce}-below`]:!!Kt,[`${ce}-zero-width`]:parseFloat(et)===0},B,Le,Ie),it=m.useMemo(()=>({siderCollapsed:Vt}),[Vt]);return Je(m.createElement(he.Provider,{value:it},m.createElement("aside",Object.assign({className:$t},xe,{style:jt,ref:Me}),m.createElement("div",{className:`${ce}-children`},re),E||Kt&&ut?Yt:null)))})},6989:function(ln,ct,b){"use strict";b.d(ct,{V:function(){return de}});var m=b(59301);const de=m.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(ln,ct,b){"use strict";b.d(ct,{eh:function(){return ve},jn:function(){return G}});var m=b(36237),de=b(16931);const oe=g=>{const{antCls:fe,componentCls:ee,colorText:o,footerBg:H,headerHeight:k,headerPadding:S,headerColor:w,footerPadding:C,fontSize:R,bodyBg:q,headerBg:Q}=g;return{[ee]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:q,"&, *":{boxSizing:"border-box"},[`&${ee}-has-sider`]:{flexDirection:"row",[`> ${ee}, > ${ee}-content`]:{width:0}},[`${ee}-header, &${ee}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${ee}-header`]:{height:k,padding:S,color:w,lineHeight:(0,m.unit)(k),background:Q,[`${fe}-menu`]:{lineHeight:"inherit"}},[`${ee}-footer`]:{padding:C,color:o,fontSize:R,background:H},[`${ee}-content`]:{flex:"auto",color:o,minHeight:0}}},ve=g=>{const{colorBgLayout:fe,controlHeight:ee,controlHeightLG:o,colorText:H,controlHeightSM:k,marginXXS:S,colorTextLightSolid:w,colorBgContainer:C}=g,R=o*1.25;return{colorBgHeader:"#001529",colorBgBody:fe,colorBgTrigger:"#002140",bodyBg:fe,headerBg:"#001529",headerHeight:ee*2,headerPadding:`0 ${R}px`,headerColor:H,footerPadding:`${k}px ${R}px`,footerBg:fe,siderBg:"#001529",triggerHeight:o+S*2,triggerBg:"#002140",triggerColor:w,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:C,lightTriggerBg:C,lightTriggerColor:H}},G=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];ct.ZP=(0,de.I$)("Layout",g=>[oe(g)],ve,{deprecatedTokens:G})},78857:function(ln,ct,b){"use strict";b.d(ct,{J:function(){return g}});var m=b(59301),de=b(8654),oe=b(62487),ve=function(fe,ee){var o={};for(var H in fe)Object.prototype.hasOwnProperty.call(fe,H)&&ee.indexOf(H)<0&&(o[H]=fe[H]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,H=Object.getOwnPropertySymbols(fe);k<H.length;k++)ee.indexOf(H[k])<0&&Object.prototype.propertyIsEnumerable.call(fe,H[k])&&(o[H[k]]=fe[H[k]]);return o};const G=m.createContext(null),g=m.forwardRef((fe,ee)=>{const{children:o}=fe,H=ve(fe,["children"]),k=m.useContext(G),S=m.useMemo(()=>Object.assign(Object.assign({},k),H),[k,H.prefixCls,H.mode,H.selectable,H.rootClassName]),w=(0,de.t4)(o),C=(0,de.x1)(ee,w?(0,de.C4)(o):null);return m.createElement(G.Provider,{value:S},m.createElement(oe.Z,{space:!0},w?m.cloneElement(o,{ref:C}):o))});ct.Z=G},93041:function(ln,ct,b){"use strict";b.d(ct,{default:function(){return Je}});var m=b(59301),de=b(28321),oe=b(24303),ve=b(18785),G=b(92310),g=b.n(G),fe=b(6089),ee=b(2738),o=b(86641),H=b(22703),k=b(48755),S=b(83397),C=(0,m.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),R=function(Le,Ie){var P={};for(var pe in Le)Object.prototype.hasOwnProperty.call(Le,pe)&&Ie.indexOf(pe)<0&&(P[pe]=Le[pe]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,pe=Object.getOwnPropertySymbols(Le);xe<pe.length;xe++)Ie.indexOf(pe[xe])<0&&Object.prototype.propertyIsEnumerable.call(Le,pe[xe])&&(P[pe[xe]]=Le[pe[xe]]);return P},Q=Le=>{const{prefixCls:Ie,className:P,dashed:pe}=Le,xe=R(Le,["prefixCls","className","dashed"]),{getPrefixCls:He}=m.useContext(k.E_),et=He("menu",Ie),ut=g()({[`${et}-item-divider-dashed`]:!!pe},P);return m.createElement(de.iz,Object.assign({className:ut},xe))},K=b(11592),D=b(25399),M=Le=>{var Ie;const{className:P,children:pe,icon:xe,title:He,danger:et,extra:ut}=Le,{prefixCls:xt,firstLevel:Lt,direction:Et,disableMenuItemTitleTooltip:Mt,inlineCollapsed:Yt}=m.useContext(C),jt=Ve=>{const _=pe==null?void 0:pe[0],A=m.createElement("span",{className:g()(`${xt}-title-content`,{[`${xt}-title-content-with-extra`]:!!ut||ut===0})},pe);return(!xe||m.isValidElement(pe)&&pe.type==="span")&&pe&&Ve&&Lt&&typeof _=="string"?m.createElement("div",{className:`${xt}-inline-collapsed-noicon`},_.charAt(0)):A},{siderCollapsed:$t}=m.useContext(oe.D);let it=He;typeof He=="undefined"?it=Lt?pe:"":He===!1&&(it="");const It={title:it};!$t&&!Yt&&(It.title=null,It.open=!1);const Rt=(0,K.Z)(pe).length;let ye=m.createElement(de.ck,Object.assign({},(0,ee.Z)(Le,["title","icon","danger"]),{className:g()({[`${xt}-item-danger`]:et,[`${xt}-item-only-child`]:(xe?Rt+1:Rt)===1},P),title:typeof He=="string"?He:void 0}),(0,H.Tm)(xe,{className:g()(m.isValidElement(xe)?(Ie=xe.props)===null||Ie===void 0?void 0:Ie.className:"",`${xt}-item-icon`)}),jt(Yt));return Mt||(ye=m.createElement(D.Z,Object.assign({},It,{placement:Et==="rtl"?"left":"right",classNames:{root:`${xt}-inline-collapsed-tooltip`}}),ye)),ye},F=b(78857),ue=b(36237),he=b(17835),le=b(63356),Se=b(34961),ke=b(46e3),De=b(34925),Me=b(16931),Y=b(51636),W=Le=>{const{componentCls:Ie,motionDurationSlow:P,horizontalLineHeight:pe,colorSplit:xe,lineWidth:He,lineType:et,itemPaddingInline:ut}=Le;return{[`${Ie}-horizontal`]:{lineHeight:pe,border:0,borderBottom:`${(0,ue.unit)(He)} ${et} ${xe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ie}-item, ${Ie}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ut},[`> ${Ie}-item:hover,
> ${Ie}-item-active,
> ${Ie}-submenu ${Ie}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ie}-item, ${Ie}-submenu-title`]:{transition:[`border-color ${P}`,`background ${P}`].join(",")},[`${Ie}-submenu-arrow`]:{display:"none"}}}},ie=Le=>{let{componentCls:Ie,menuArrowOffset:P,calc:pe}=Le;return{[`${Ie}-rtl`]:{direction:"rtl"},[`${Ie}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ie}-rtl${Ie}-vertical,
${Ie}-submenu-rtl ${Ie}-vertical`]:{[`${Ie}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,ue.unit)(pe(P).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,ue.unit)(P)})`}}}}};const se=Le=>Object.assign({},(0,le.oN)(Le));var E=(Le,Ie)=>{const{componentCls:P,itemColor:pe,itemSelectedColor:xe,subMenuItemSelectedColor:He,groupTitleColor:et,itemBg:ut,subMenuItemBg:xt,itemSelectedBg:Lt,activeBarHeight:Et,activeBarWidth:Mt,activeBarBorderWidth:Yt,motionDurationSlow:jt,motionEaseInOut:$t,motionEaseOut:it,itemPaddingInline:It,motionDurationMid:Rt,itemHoverColor:ye,lineType:Ve,colorSplit:_,itemDisabledColor:A,dangerItemColor:Oe,dangerItemHoverColor:N,dangerItemSelectedColor:ae,dangerItemActiveBg:St,dangerItemSelectedBg:Ee,popupBg:$e,itemHoverBg:Ge,itemActiveBg:Z,menuSubMenuBg:J,horizontalItemSelectedColor:be,horizontalItemSelectedBg:Pe,horizontalItemBorderRadius:j,horizontalItemHoverBg:Ye}=Le;return{[`${P}-${Ie}, ${P}-${Ie} > ${P}`]:{color:pe,background:ut,[`&${P}-root:focus-visible`]:Object.assign({},se(Le)),[`${P}-item`]:{"&-group-title, &-extra":{color:et}},[`${P}-submenu-selected > ${P}-submenu-title`]:{color:He},[`${P}-item, ${P}-submenu-title`]:{color:pe,[`&:not(${P}-item-disabled):focus-visible`]:Object.assign({},se(Le))},[`${P}-item-disabled, ${P}-submenu-disabled`]:{color:`${A} !important`},[`${P}-item:not(${P}-item-selected):not(${P}-submenu-selected)`]:{[`&:hover, > ${P}-submenu-title:hover`]:{color:ye}},[`&:not(${P}-horizontal)`]:{[`${P}-item:not(${P}-item-selected)`]:{"&:hover":{backgroundColor:Ge},"&:active":{backgroundColor:Z}},[`${P}-submenu-title`]:{"&:hover":{backgroundColor:Ge},"&:active":{backgroundColor:Z}}},[`${P}-item-danger`]:{color:Oe,[`&${P}-item:hover`]:{[`&:not(${P}-item-selected):not(${P}-submenu-selected)`]:{color:N}},[`&${P}-item:active`]:{background:St}},[`${P}-item a`]:{"&, &:hover":{color:"inherit"}},[`${P}-item-selected`]:{color:xe,[`&${P}-item-danger`]:{color:ae},"a, a:hover":{color:"inherit"}},[`& ${P}-item-selected`]:{backgroundColor:Lt,[`&${P}-item-danger`]:{backgroundColor:Ee}},[`&${P}-submenu > ${P}`]:{backgroundColor:J},[`&${P}-popup > ${P}`]:{backgroundColor:$e},[`&${P}-submenu-popup > ${P}`]:{backgroundColor:$e},[`&${P}-horizontal`]:Object.assign(Object.assign({},Ie==="dark"?{borderBottom:0}:{}),{[`> ${P}-item, > ${P}-submenu`]:{top:Yt,marginTop:Le.calc(Yt).mul(-1).equal(),marginBottom:0,borderRadius:j,"&::after":{position:"absolute",insetInline:It,bottom:0,borderBottom:`${(0,ue.unit)(Et)} solid transparent`,transition:`border-color ${jt} ${$t}`,content:'""'},"&:hover, &-active, &-open":{background:Ye,"&::after":{borderBottomWidth:Et,borderBottomColor:be}},"&-selected":{color:be,backgroundColor:Pe,"&:hover":{backgroundColor:Pe},"&::after":{borderBottomWidth:Et,borderBottomColor:be}}}}),[`&${P}-root`]:{[`&${P}-inline, &${P}-vertical`]:{borderInlineEnd:`${(0,ue.unit)(Yt)} ${Ve} ${_}`}},[`&${P}-inline`]:{[`${P}-sub${P}-inline`]:{background:xt},[`${P}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,ue.unit)(Mt)} solid ${xe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Rt} ${it}`,`opacity ${Rt} ${it}`].join(","),content:'""'},[`&${P}-item-danger`]:{"&::after":{borderInlineEndColor:ae}}},[`${P}-selected, ${P}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Rt} ${$t}`,`opacity ${Rt} ${$t}`].join(",")}}}}}};const V=Le=>{const{componentCls:Ie,itemHeight:P,itemMarginInline:pe,padding:xe,menuArrowSize:He,marginXS:et,itemMarginBlock:ut,itemWidth:xt,itemPaddingInline:Lt}=Le,Et=Le.calc(He).add(xe).add(et).equal();return{[`${Ie}-item`]:{position:"relative",overflow:"hidden"},[`${Ie}-item, ${Ie}-submenu-title`]:{height:P,lineHeight:(0,ue.unit)(P),paddingInline:Lt,overflow:"hidden",textOverflow:"ellipsis",marginInline:pe,marginBlock:ut,width:xt},[`> ${Ie}-item,
> ${Ie}-submenu > ${Ie}-submenu-title`]:{height:P,lineHeight:(0,ue.unit)(P)},[`${Ie}-item-group-list ${Ie}-submenu-title,
${Ie}-submenu-title`]:{paddingInlineEnd:Et}}};var ze=Le=>{const{componentCls:Ie,iconCls:P,itemHeight:pe,colorTextLightSolid:xe,dropdownWidth:He,controlHeightLG:et,motionEaseOut:ut,paddingXL:xt,itemMarginInline:Lt,fontSizeLG:Et,motionDurationFast:Mt,motionDurationSlow:Yt,paddingXS:jt,boxShadowSecondary:$t,collapsedWidth:it,collapsedIconSize:It}=Le,Rt={height:pe,lineHeight:(0,ue.unit)(pe),listStylePosition:"inside",listStyleType:"disc"};return[{[Ie]:{"&-inline, &-vertical":Object.assign({[`&${Ie}-root`]:{boxShadow:"none"}},V(Le))},[`${Ie}-submenu-popup`]:{[`${Ie}-vertical`]:Object.assign(Object.assign({},V(Le)),{boxShadow:$t})}},{[`${Ie}-submenu-popup ${Ie}-vertical${Ie}-sub`]:{minWidth:He,maxHeight:`calc(100vh - ${(0,ue.unit)(Le.calc(et).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ie}-inline`]:{width:"100%",[`&${Ie}-root`]:{[`${Ie}-item, ${Ie}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Yt}`,`background ${Yt}`,`padding ${Mt} ${ut}`].join(","),[`> ${Ie}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ie}-sub${Ie}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ie}-submenu > ${Ie}-submenu-title`]:Rt,[`& ${Ie}-item-group-title`]:{paddingInlineStart:xt}},[`${Ie}-item`]:Rt}},{[`${Ie}-inline-collapsed`]:{width:it,[`&${Ie}-root`]:{[`${Ie}-item, ${Ie}-submenu ${Ie}-submenu-title`]:{[`> ${Ie}-inline-collapsed-noicon`]:{fontSize:Et,textAlign:"center"}}},[`> ${Ie}-item,
> ${Ie}-item-group > ${Ie}-item-group-list > ${Ie}-item,
> ${Ie}-item-group > ${Ie}-item-group-list > ${Ie}-submenu > ${Ie}-submenu-title,
> ${Ie}-submenu > ${Ie}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,ue.unit)(Le.calc(It).div(2).equal())} - ${(0,ue.unit)(Lt)})`,textOverflow:"clip",[`
${Ie}-submenu-arrow,
${Ie}-submenu-expand-icon
`]:{opacity:0},[`${Ie}-item-icon, ${P}`]:{margin:0,fontSize:It,lineHeight:(0,ue.unit)(pe),"+ span":{display:"inline-block",opacity:0}}},[`${Ie}-item-icon, ${P}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ie}-item-icon, ${P}`]:{display:"none"},"a, a:hover":{color:xe}},[`${Ie}-item-group-title`]:Object.assign(Object.assign({},le.vS),{paddingInline:jt})}}]};const Xe=Le=>{const{componentCls:Ie,motionDurationSlow:P,motionDurationMid:pe,motionEaseInOut:xe,motionEaseOut:He,iconCls:et,iconSize:ut,iconMarginInlineEnd:xt}=Le;return{[`${Ie}-item, ${Ie}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${P}`,`background ${P}`,`padding calc(${P} + 0.1s) ${xe}`].join(","),[`${Ie}-item-icon, ${et}`]:{minWidth:ut,fontSize:ut,transition:[`font-size ${pe} ${He}`,`margin ${P} ${xe}`,`color ${P}`].join(","),"+ span":{marginInlineStart:xt,opacity:1,transition:[`opacity ${P} ${xe}`,`margin ${P}`,`color ${P}`].join(",")}},[`${Ie}-item-icon`]:Object.assign({},(0,le.Ro)()),[`&${Ie}-item-only-child`]:{[`> ${et}, > ${Ie}-item-icon`]:{marginInlineEnd:0}}},[`${Ie}-item-disabled, ${Ie}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Ie}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},_e=Le=>{const{componentCls:Ie,motionDurationSlow:P,motionEaseInOut:pe,borderRadius:xe,menuArrowSize:He,menuArrowOffset:et}=Le;return{[`${Ie}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Le.margin,width:He,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${P} ${pe}, opacity ${P}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Le.calc(He).mul(.6).equal(),height:Le.calc(He).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:xe,transition:[`background ${P} ${pe}`,`transform ${P} ${pe}`,`top ${P} ${pe}`,`color ${P} ${pe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,ue.unit)(Le.calc(et).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,ue.unit)(et)})`}}}}},Ke=Le=>{const{antCls:Ie,componentCls:P,fontSize:pe,motionDurationSlow:xe,motionDurationMid:He,motionEaseInOut:et,paddingXS:ut,padding:xt,colorSplit:Lt,lineWidth:Et,zIndexPopup:Mt,borderRadiusLG:Yt,subMenuItemBorderRadius:jt,menuArrowSize:$t,menuArrowOffset:it,lineType:It,groupTitleLineHeight:Rt,groupTitleFontSize:ye}=Le;return[{"":{[P]:Object.assign(Object.assign({},(0,le.dF)()),{"&-hidden":{display:"none"}})},[`${P}-submenu-hidden`]:{display:"none"}},{[P]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(Le)),(0,le.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:pe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${xe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${P}-item`]:{flex:"none"}},[`${P}-item, ${P}-submenu, ${P}-submenu-title`]:{borderRadius:Le.itemBorderRadius},[`${P}-item-group-title`]:{padding:`${(0,ue.unit)(ut)} ${(0,ue.unit)(xt)}`,fontSize:ye,lineHeight:Rt,transition:`all ${xe}`},[`&-horizontal ${P}-submenu`]:{transition:[`border-color ${xe} ${et}`,`background ${xe} ${et}`].join(",")},[`${P}-submenu, ${P}-submenu-inline`]:{transition:[`border-color ${xe} ${et}`,`background ${xe} ${et}`,`padding ${He} ${et}`].join(",")},[`${P}-submenu ${P}-sub`]:{cursor:"initial",transition:[`background ${xe} ${et}`,`padding ${xe} ${et}`].join(",")},[`${P}-title-content`]:{transition:`color ${xe}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Ie}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${P}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Le.padding}},[`${P}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${P}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Lt,borderStyle:It,borderWidth:0,borderTopWidth:Et,marginBlock:Et,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Xe(Le)),{[`${P}-item-group`]:{[`${P}-item-group-list`]:{margin:0,padding:0,[`${P}-item, ${P}-submenu-title`]:{paddingInline:`${(0,ue.unit)(Le.calc(pe).mul(2).equal())} ${(0,ue.unit)(xt)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Mt,borderRadius:Yt,boxShadow:"none",transformOrigin:"0 0",[`&${P}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${P}`]:Object.assign(Object.assign(Object.assign({borderRadius:Yt},Xe(Le)),_e(Le)),{[`${P}-item, ${P}-submenu > ${P}-submenu-title`]:{borderRadius:jt},[`${P}-submenu-title::after`]:{transition:`transform ${xe} ${et}`}})},"\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:Le.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Le.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Le.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Le.paddingXS}}}),_e(Le)),{[`&-inline-collapsed ${P}-submenu-arrow,
&-inline ${P}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,ue.unit)(it)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,ue.unit)(Le.calc(it).mul(-1).equal())})`}},[`${P}-submenu-open${P}-submenu-inline > ${P}-submenu-title > ${P}-submenu-arrow`]:{transform:`translateY(${(0,ue.unit)(Le.calc($t).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,ue.unit)(Le.calc(it).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,ue.unit)(it)})`}}})},{[`${Ie}-layout-header`]:{[P]:{lineHeight:"inherit"}}}]},Qe=Le=>{var Ie,P,pe;const{colorPrimary:xe,colorError:He,colorTextDisabled:et,colorErrorBg:ut,colorText:xt,colorTextDescription:Lt,colorBgContainer:Et,colorFillAlter:Mt,colorFillContent:Yt,lineWidth:jt,lineWidthBold:$t,controlItemBgActive:it,colorBgTextHover:It,controlHeightLG:Rt,lineHeight:ye,colorBgElevated:Ve,marginXXS:_,padding:A,fontSize:Oe,controlHeightSM:N,fontSizeLG:ae,colorTextLightSolid:St,colorErrorHover:Ee}=Le,$e=(Ie=Le.activeBarWidth)!==null&&Ie!==void 0?Ie:0,Ge=(P=Le.activeBarBorderWidth)!==null&&P!==void 0?P:jt,Z=(pe=Le.itemMarginInline)!==null&&pe!==void 0?pe:Le.marginXXS,J=new he.FastColor(St).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Le.zIndexPopupBase+50,radiusItem:Le.borderRadiusLG,itemBorderRadius:Le.borderRadiusLG,radiusSubMenuItem:Le.borderRadiusSM,subMenuItemBorderRadius:Le.borderRadiusSM,colorItemText:xt,itemColor:xt,colorItemTextHover:xt,itemHoverColor:xt,colorItemTextHoverHorizontal:xe,horizontalItemHoverColor:xe,colorGroupTitle:Lt,groupTitleColor:Lt,colorItemTextSelected:xe,itemSelectedColor:xe,subMenuItemSelectedColor:xe,colorItemTextSelectedHorizontal:xe,horizontalItemSelectedColor:xe,colorItemBg:Et,itemBg:Et,colorItemBgHover:It,itemHoverBg:It,colorItemBgActive:Yt,itemActiveBg:it,colorSubItemBg:Mt,subMenuItemBg:Mt,colorItemBgSelected:it,itemSelectedBg:it,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:$e,colorActiveBarHeight:$t,activeBarHeight:$t,colorActiveBarBorderSize:jt,activeBarBorderWidth:Ge,colorItemTextDisabled:et,itemDisabledColor:et,colorDangerItemText:He,dangerItemColor:He,colorDangerItemTextHover:He,dangerItemHoverColor:He,colorDangerItemTextSelected:He,dangerItemSelectedColor:He,colorDangerItemBgActive:ut,dangerItemActiveBg:ut,colorDangerItemBgSelected:ut,dangerItemSelectedBg:ut,itemMarginInline:Z,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Rt,groupTitleLineHeight:ye,collapsedWidth:Rt*2,popupBg:Ve,itemMarginBlock:_,itemPaddingInline:A,horizontalLineHeight:`${Rt*1.15}px`,iconSize:Oe,iconMarginInlineEnd:N-Oe,collapsedIconSize:ae,groupTitleFontSize:Oe,darkItemDisabledColor:new he.FastColor(St).setA(.25).toRgbString(),darkItemColor:J,darkDangerItemColor:He,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:St,darkItemSelectedBg:xe,darkDangerItemSelectedBg:He,darkItemHoverBg:"transparent",darkGroupTitleColor:J,darkItemHoverColor:St,darkDangerItemHoverColor:Ee,darkDangerItemSelectedColor:St,darkDangerItemActiveBg:He,itemWidth:$e?`calc(100% + ${Ge}px)`:`calc(100% - ${Z*2}px)`}};var st=function(Le){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Le,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,Me.I$)("Menu",xe=>{const{colorBgElevated:He,controlHeightLG:et,fontSize:ut,darkItemColor:xt,darkDangerItemColor:Lt,darkItemBg:Et,darkSubMenuItemBg:Mt,darkItemSelectedColor:Yt,darkItemSelectedBg:jt,darkDangerItemSelectedBg:$t,darkItemHoverBg:it,darkGroupTitleColor:It,darkItemHoverColor:Rt,darkItemDisabledColor:ye,darkDangerItemHoverColor:Ve,darkDangerItemSelectedColor:_,darkDangerItemActiveBg:A,popupBg:Oe,darkPopupBg:N}=xe,ae=xe.calc(ut).div(7).mul(5).equal(),St=(0,Y.mergeToken)(xe,{menuArrowSize:ae,menuHorizontalHeight:xe.calc(et).mul(1.15).equal(),menuArrowOffset:xe.calc(ae).mul(.25).equal(),menuSubMenuBg:He,calc:xe.calc,popupBg:Oe}),Ee=(0,Y.mergeToken)(St,{itemColor:xt,itemHoverColor:Rt,groupTitleColor:It,itemSelectedColor:Yt,subMenuItemSelectedColor:Yt,itemBg:Et,popupBg:N,subMenuItemBg:Mt,itemActiveBg:"transparent",itemSelectedBg:jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:it,itemDisabledColor:ye,dangerItemColor:Lt,dangerItemHoverColor:Ve,dangerItemSelectedColor:_,dangerItemActiveBg:A,dangerItemSelectedBg:$t,menuSubMenuBg:Mt,horizontalItemSelectedColor:Yt,horizontalItemSelectedBg:jt});return[Ke(St),W(St),ze(St),E(St,"light"),E(Ee,"dark"),ie(St),(0,Se.Z)(St),(0,ke.oN)(St,"slide-up"),(0,ke.oN)(St,"slide-down"),(0,De._y)(St,"zoom-big")]},Qe,{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:P,unitless:{groupTitleLineHeight:!0}})(Le,Ie)},rt=b(75030),qe=Le=>{var Ie;const{popupClassName:P,icon:pe,title:xe,theme:He}=Le,et=m.useContext(C),{prefixCls:ut,inlineCollapsed:xt,theme:Lt}=et,Et=(0,de.Xl)();let Mt;if(!pe)Mt=xt&&!Et.length&&xe&&typeof xe=="string"?m.createElement("div",{className:`${ut}-inline-collapsed-noicon`},xe.charAt(0)):m.createElement("span",{className:`${ut}-title-content`},xe);else{const $t=m.isValidElement(xe)&&xe.type==="span";Mt=m.createElement(m.Fragment,null,(0,H.Tm)(pe,{className:g()(m.isValidElement(pe)?(Ie=pe.props)===null||Ie===void 0?void 0:Ie.className:"",`${ut}-item-icon`)}),$t?xe:m.createElement("span",{className:`${ut}-title-content`},xe))}const Yt=m.useMemo(()=>Object.assign(Object.assign({},et),{firstLevel:!1}),[et]),[jt]=(0,rt.Cn)("Menu");return m.createElement(C.Provider,{value:Yt},m.createElement(de.Wd,Object.assign({},(0,ee.Z)(Le,["icon"]),{title:Mt,popupClassName:g()(ut,P,`${ut}-${He||Lt}`),popupStyle:Object.assign({zIndex:jt},Le.popupStyle)})))},Kt=function(Le,Ie){var P={};for(var pe in Le)Object.prototype.hasOwnProperty.call(Le,pe)&&Ie.indexOf(pe)<0&&(P[pe]=Le[pe]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,pe=Object.getOwnPropertySymbols(Le);xe<pe.length;xe++)Ie.indexOf(pe[xe])<0&&Object.prototype.propertyIsEnumerable.call(Le,pe[xe])&&(P[pe[xe]]=Le[pe[xe]]);return P};function je(Le){return Le===null||Le===!1}const Tt={item:M,submenu:qe,divider:Q};var Ce=(0,m.forwardRef)((Le,Ie)=>{var P;const pe=m.useContext(F.Z),xe=pe||{},{getPrefixCls:He,getPopupContainer:et,direction:ut,menu:xt}=m.useContext(k.E_),Lt=He(),{prefixCls:Et,className:Mt,style:Yt,theme:jt="light",expandIcon:$t,_internalDisableMenuItemTitleTooltip:it,inlineCollapsed:It,siderCollapsed:Rt,rootClassName:ye,mode:Ve,selectable:_,onClick:A,overflowedIndicatorPopupClassName:Oe}=Le,N=Kt(Le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ae=(0,ee.Z)(N,["collapsedWidth"]);(P=xe.validator)===null||P===void 0||P.call(xe,{mode:Ve});const St=(0,fe.Z)(function(){var Xt;A==null||A.apply(void 0,arguments),(Xt=xe.onClick)===null||Xt===void 0||Xt.call(xe)}),Ee=xe.mode||Ve,$e=_!=null?_:xe.selectable,Ge=It!=null?It:Rt,Z={horizontal:{motionName:`${Lt}-slide-up`},inline:(0,o.Z)(Lt),other:{motionName:`${Lt}-zoom-big`}},J=He("menu",Et||xe.prefixCls),be=(0,S.Z)(J),[Pe,j,Ye]=st(J,be,!pe),X=g()(`${J}-${jt}`,xt==null?void 0:xt.className,Mt),tt=m.useMemo(()=>{var Xt,pn;if(typeof $t=="function"||je($t))return $t||null;if(typeof xe.expandIcon=="function"||je(xe.expandIcon))return xe.expandIcon||null;if(typeof(xt==null?void 0:xt.expandIcon)=="function"||je(xt==null?void 0:xt.expandIcon))return(xt==null?void 0:xt.expandIcon)||null;const qt=(Xt=$t!=null?$t:xe==null?void 0:xe.expandIcon)!==null&&Xt!==void 0?Xt:xt==null?void 0:xt.expandIcon;return(0,H.Tm)(qt,{className:g()(`${J}-submenu-expand-icon`,m.isValidElement(qt)?(pn=qt.props)===null||pn===void 0?void 0:pn.className:void 0)})},[$t,xe==null?void 0:xe.expandIcon,xt==null?void 0:xt.expandIcon,J]),Ot=m.useMemo(()=>({prefixCls:J,inlineCollapsed:Ge||!1,direction:ut,firstLevel:!0,theme:jt,mode:Ee,disableMenuItemTitleTooltip:it}),[J,Ge,ut,it,jt]);return Pe(m.createElement(F.Z.Provider,{value:null},m.createElement(C.Provider,{value:Ot},m.createElement(de.ZP,Object.assign({getPopupContainer:et,overflowedIndicator:m.createElement(ve.Z,null),overflowedIndicatorPopupClassName:g()(J,`${J}-${jt}`,Oe),mode:Ee,selectable:$e,onClick:St},ae,{inlineCollapsed:Ge,style:Object.assign(Object.assign({},xt==null?void 0:xt.style),Yt),className:X,prefixCls:J,direction:ut,defaultMotions:Z,expandIcon:tt,ref:Ie,rootClassName:g()(ye,j,xe.rootClassName,Ye,be),_internalComponents:Tt})))))});const ce=(0,m.forwardRef)((Le,Ie)=>{const P=(0,m.useRef)(null),pe=m.useContext(oe.D);return(0,m.useImperativeHandle)(Ie,()=>({menu:P.current,focus:xe=>{var He;(He=P.current)===null||He===void 0||He.focus(xe)}})),m.createElement(Ce,Object.assign({ref:P},Le,pe))});ce.Item=M,ce.SubMenu=qe,ce.Divider=Q,ce.ItemGroup=de.BW;var Je=ce},89787:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return Rt}});var m=b(59301),de=b(17835),oe=b(29679),ve=b(40001),G=b(19248),g=b(99267),fe=b(92310),ee=b.n(fe),o=b(2738),H=b(48755),k=b(54476),S=b(33885),w=b(75931),C={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},R=function(){var Ve=(0,m.useRef)([]),_=(0,m.useRef)(null);return(0,m.useEffect)(function(){var A=Date.now(),Oe=!1;Ve.current.forEach(function(N){if(N){Oe=!0;var ae=N.style;ae.transitionDuration=".3s, .3s, .3s, .06s",_.current&&A-_.current<100&&(ae.transitionDuration="0s, 0s")}}),Oe&&(_.current=Date.now())}),Ve.current},q=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Q=function(Ve){var _=(0,S.Z)((0,S.Z)({},C),Ve),A=_.className,Oe=_.percent,N=_.prefixCls,ae=_.strokeColor,St=_.strokeLinecap,Ee=_.strokeWidth,$e=_.style,Ge=_.trailColor,Z=_.trailWidth,J=_.transition,be=(0,w.Z)(_,q);delete be.gapPosition;var Pe=Array.isArray(Oe)?Oe:[Oe],j=Array.isArray(ae)?ae:[ae],Ye=R(),X=Ee/2,tt=100-Ee/2,Ot="M ".concat(St==="round"?X:0,",").concat(X,`
L `).concat(St==="round"?tt:100,",").concat(X),Xt="0 0 100 ".concat(Ee),pn=0;return m.createElement("svg",(0,k.Z)({className:ee()("".concat(N,"-line"),A),viewBox:Xt,preserveAspectRatio:"none",style:$e},be),m.createElement("path",{className:"".concat(N,"-line-trail"),d:Ot,strokeLinecap:St,stroke:Ge,strokeWidth:Z||Ee,fillOpacity:"0"}),Pe.map(function(qt,nn){var xn=1;switch(St){case"round":xn=1-Ee/100;break;case"square":xn=1-Ee/2/100;break;default:xn=1;break}var Un={strokeDasharray:"".concat(qt*xn,"px, 100px"),strokeDashoffset:"-".concat(pn,"px"),transition:J||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},un=j[nn]||j[j.length-1];return pn+=qt,m.createElement("path",{key:nn,className:"".concat(N,"-line-path"),d:Ot,strokeLinecap:St,stroke:un,strokeWidth:Ee,fillOpacity:"0",ref:function(en){Ye[nn]=en},style:Un})}))},K=Q,D=b(76190),$=b(42978),M=b(47273),F=0,ue=(0,M.Z)();function he(){var ye;return ue?(ye=F,F+=1):ye="TEST_OR_SSR",ye}var le=function(ye){var Ve=m.useState(),_=(0,$.Z)(Ve,2),A=_[0],Oe=_[1];return m.useEffect(function(){Oe("rc_progress_".concat(he()))},[]),ye||A},Se=function(Ve){var _=Ve.bg,A=Ve.children;return m.createElement("div",{style:{width:"100%",height:"100%",background:_}},A)};function ke(ye,Ve){return Object.keys(ye).map(function(_){var A=parseFloat(_),Oe="".concat(Math.floor(A*Ve),"%");return"".concat(ye[_]," ").concat(Oe)})}var De=m.forwardRef(function(ye,Ve){var _=ye.prefixCls,A=ye.color,Oe=ye.gradientId,N=ye.radius,ae=ye.style,St=ye.ptg,Ee=ye.strokeLinecap,$e=ye.strokeWidth,Ge=ye.size,Z=ye.gapDegree,J=A&&(0,D.Z)(A)==="object",be=J?"#FFF":void 0,Pe=Ge/2,j=m.createElement("circle",{className:"".concat(_,"-circle-path"),r:N,cx:Pe,cy:Pe,stroke:be,strokeLinecap:Ee,strokeWidth:$e,opacity:St===0?0:1,style:ae,ref:Ve});if(!J)return j;var Ye="".concat(Oe,"-conic"),X=Z?"".concat(180+Z/2,"deg"):"0deg",tt=ke(A,(360-Z)/360),Ot=ke(A,1),Xt="conic-gradient(from ".concat(X,", ").concat(tt.join(", "),")"),pn="linear-gradient(to ".concat(Z?"bottom":"top",", ").concat(Ot.join(", "),")");return m.createElement(m.Fragment,null,m.createElement("mask",{id:Ye},j),m.createElement("foreignObject",{x:0,y:0,width:Ge,height:Ge,mask:"url(#".concat(Ye,")")},m.createElement(Se,{bg:pn},m.createElement(Se,{bg:Xt}))))}),Me=De,Y=100,B=function(Ve,_,A,Oe,N,ae,St,Ee,$e,Ge){var Z=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,J=A/100*360*((360-ae)/360),be=ae===0?0:{bottom:0,top:180,left:90,right:-90}[St],Pe=(100-Oe)/100*_;$e==="round"&&Oe!==100&&(Pe+=Ge/2,Pe>=_&&(Pe=_-.01));var j=Y/2;return{stroke:typeof Ee=="string"?Ee:void 0,strokeDasharray:"".concat(_,"px ").concat(Ve),strokeDashoffset:Pe+Z,transform:"rotate(".concat(N+J+be,"deg)"),transformOrigin:"".concat(j,"px ").concat(j,"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}},W=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function re(ye){var Ve=ye!=null?ye:[];return Array.isArray(Ve)?Ve:[Ve]}var ie=function(Ve){var _=(0,S.Z)((0,S.Z)({},C),Ve),A=_.id,Oe=_.prefixCls,N=_.steps,ae=_.strokeWidth,St=_.trailWidth,Ee=_.gapDegree,$e=Ee===void 0?0:Ee,Ge=_.gapPosition,Z=_.trailColor,J=_.strokeLinecap,be=_.style,Pe=_.className,j=_.strokeColor,Ye=_.percent,X=(0,w.Z)(_,W),tt=Y/2,Ot=le(A),Xt="".concat(Ot,"-gradient"),pn=tt-ae/2,qt=Math.PI*2*pn,nn=$e>0?90+$e/2:-90,xn=qt*((360-$e)/360),Un=(0,D.Z)(N)==="object"?N:{count:N,gap:2},un=Un.count,On=Un.gap,en=re(Ye),Ut=re(j),Pt=Ut.find(function(wt){return wt&&(0,D.Z)(wt)==="object"}),an=Pt&&(0,D.Z)(Pt)==="object",rn=an?"butt":J,An=B(qt,xn,0,100,nn,$e,Ge,Z,rn,ae),ir=R(),Ne=function(){var ht=0;return en.map(function(we,at){var gt=Ut[at]||Ut[Ut.length-1],Dt=B(qt,xn,ht,we,nn,$e,Ge,gt,rn,ae);return ht+=we,m.createElement(Me,{key:at,color:gt,ptg:we,radius:pn,prefixCls:Oe,gradientId:Xt,style:Dt,strokeLinecap:rn,strokeWidth:ae,gapDegree:$e,ref:function(Ft){ir[at]=Ft},size:Y})}).reverse()},mt=function(){var ht=Math.round(un*(en[0]/100)),we=100/un,at=0;return new Array(un).fill(null).map(function(gt,Dt){var bt=Dt<=ht-1?Ut[0]:Z,Ft=bt&&(0,D.Z)(bt)==="object"?"url(#".concat(Xt,")"):void 0,zt=B(qt,xn,at,we,nn,$e,Ge,bt,"butt",ae,On);return at+=(xn-zt.strokeDashoffset+On)*100/xn,m.createElement("circle",{key:Dt,className:"".concat(Oe,"-circle-path"),r:pn,cx:tt,cy:tt,stroke:Ft,strokeWidth:ae,opacity:1,style:zt,ref:function(We){ir[Dt]=We}})})};return m.createElement("svg",(0,k.Z)({className:ee()("".concat(Oe,"-circle"),Pe),viewBox:"0 0 ".concat(Y," ").concat(Y),style:be,id:A,role:"presentation"},X),!un&&m.createElement("circle",{className:"".concat(Oe,"-circle-trail"),r:pn,cx:tt,cy:tt,stroke:Z,strokeLinecap:rn,strokeWidth:St||ae,style:An}),un?mt():Ne())},se=ie,x={Line:K,Circle:se},E=b(25399),V=b(68361);function me(ye){return!ye||ye<0?0:ye>100?100:ye}function ze(ye){let{success:Ve,successPercent:_}=ye,A=_;return Ve&&"progress"in Ve&&(A=Ve.progress),Ve&&"percent"in Ve&&(A=Ve.percent),A}const Xe=ye=>{let{percent:Ve,success:_,successPercent:A}=ye;const Oe=me(ze({success:_,successPercent:A}));return[Oe,me(me(Ve)-Oe)]},_e=ye=>{let{success:Ve={},strokeColor:_}=ye;const{strokeColor:A}=Ve;return[A||V.presetPrimaryColors.green,_||null]},Ke=(ye,Ve,_)=>{var A,Oe,N,ae;let St=-1,Ee=-1;if(Ve==="step"){const $e=_.steps,Ge=_.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?(St=ye==="small"?2:14,Ee=Ge!=null?Ge:8):typeof ye=="number"?[St,Ee]=[ye,ye]:[St=14,Ee=8]=Array.isArray(ye)?ye:[ye.width,ye.height],St*=$e}else if(Ve==="line"){const $e=_==null?void 0:_.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?Ee=$e||(ye==="small"?6:8):typeof ye=="number"?[St,Ee]=[ye,ye]:[St=-1,Ee=8]=Array.isArray(ye)?ye:[ye.width,ye.height]}else(Ve==="circle"||Ve==="dashboard")&&(typeof ye=="string"||typeof ye=="undefined"?[St,Ee]=ye==="small"?[60,60]:[120,120]:typeof ye=="number"?[St,Ee]=[ye,ye]:Array.isArray(ye)&&(St=(Oe=(A=ye[0])!==null&&A!==void 0?A:ye[1])!==null&&Oe!==void 0?Oe:120,Ee=(ae=(N=ye[0])!==null&&N!==void 0?N:ye[1])!==null&&ae!==void 0?ae:120));return[St,Ee]},Qe=3,st=ye=>Qe/ye*100;var Vt=ye=>{const{prefixCls:Ve,trailColor:_=null,strokeLinecap:A="round",gapPosition:Oe,gapDegree:N,width:ae=120,type:St,children:Ee,success:$e,size:Ge=ae,steps:Z}=ye,[J,be]=Ke(Ge,"circle");let{strokeWidth:Pe}=ye;Pe===void 0&&(Pe=Math.max(st(J),6));const j={width:J,height:be,fontSize:J*.15+6},Ye=m.useMemo(()=>{if(N||N===0)return N;if(St==="dashboard")return 75},[N,St]),X=Xe(ye),tt=Oe||St==="dashboard"&&"bottom"||void 0,Ot=Object.prototype.toString.call(ye.strokeColor)==="[object Object]",Xt=_e({success:$e,strokeColor:ye.strokeColor}),pn=ee()(`${Ve}-inner`,{[`${Ve}-circle-gradient`]:Ot}),qt=m.createElement(se,{steps:Z,percent:Z?X[1]:X,strokeWidth:Pe,trailWidth:Pe,strokeColor:Z?Xt[1]:Xt,strokeLinecap:A,trailColor:_,prefixCls:Ve,gapDegree:Ye,gapPosition:tt}),nn=J<=20,xn=m.createElement("div",{className:pn,style:j},qt,!nn&&Ee);return nn?m.createElement(E.Z,{title:Ee},xn):xn},qe=b(36237),Kt=b(63356),je=b(16931),Tt=b(51636);const Re="--progress-line-stroke-color",Ce="--progress-percent",ce=ye=>{const Ve=ye?"100%":"-100%";return new qe.Keyframes(`antProgress${ye?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Ve}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Ve}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Je=ye=>{const{componentCls:Ve,iconCls:_}=ye;return{[Ve]:Object.assign(Object.assign({},(0,Kt.Wf)(ye)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:ye.fontSize},[`${Ve}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Ve}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:ye.remainingColor,borderRadius:ye.lineBorderRadius},[`${Ve}-inner:not(${Ve}-circle-gradient)`]:{[`${Ve}-circle-path`]:{stroke:ye.defaultColor}},[`${Ve}-success-bg, ${Ve}-bg`]:{position:"relative",background:ye.defaultColor,borderRadius:ye.lineBorderRadius,transition:`all ${ye.motionDurationSlow} ${ye.motionEaseInOutCirc}`},[`${Ve}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Ve}-text`]:{width:"max-content",marginInlineStart:0,marginTop:ye.marginXXS}},[`${Ve}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Re})`]},height:"100%",width:`calc(1 / var(${Ce}) * 100%)`,display:"block"},[`&${Ve}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Ve}-text-inner`]:{color:ye.colorWhite,[`&${Ve}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Ve}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:ye.colorSuccess},[`${Ve}-text`]:{display:"inline-block",marginInlineStart:ye.marginXS,color:ye.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[_]:{fontSize:ye.fontSize},[`&${Ve}-text-outer`]:{width:"max-content"},[`&${Ve}-text-outer${Ve}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:ye.marginXS}},[`${Ve}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,qe.unit)(ye.paddingXXS)}`,[`&${Ve}-text-start`]:{justifyContent:"start"},[`&${Ve}-text-end`]:{justifyContent:"end"}},[`&${Ve}-status-active`]:{[`${Ve}-bg::before`]:{position:"absolute",inset:0,backgroundColor:ye.colorBgContainer,borderRadius:ye.lineBorderRadius,opacity:0,animationName:ce(),animationDuration:ye.progressActiveMotionDuration,animationTimingFunction:ye.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Ve}-rtl${Ve}-status-active`]:{[`${Ve}-bg::before`]:{animationName:ce(!0)}},[`&${Ve}-status-exception`]:{[`${Ve}-bg`]:{backgroundColor:ye.colorError},[`${Ve}-text`]:{color:ye.colorError}},[`&${Ve}-status-exception ${Ve}-inner:not(${Ve}-circle-gradient)`]:{[`${Ve}-circle-path`]:{stroke:ye.colorError}},[`&${Ve}-status-success`]:{[`${Ve}-bg`]:{backgroundColor:ye.colorSuccess},[`${Ve}-text`]:{color:ye.colorSuccess}},[`&${Ve}-status-success ${Ve}-inner:not(${Ve}-circle-gradient)`]:{[`${Ve}-circle-path`]:{stroke:ye.colorSuccess}}})}},Le=ye=>{const{componentCls:Ve,iconCls:_}=ye;return{[Ve]:{[`${Ve}-circle-trail`]:{stroke:ye.remainingColor},[`&${Ve}-circle ${Ve}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Ve}-circle ${Ve}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:ye.circleTextColor,fontSize:ye.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[_]:{fontSize:ye.circleIconFontSize}},[`${Ve}-circle&-status-exception`]:{[`${Ve}-text`]:{color:ye.colorError}},[`${Ve}-circle&-status-success`]:{[`${Ve}-text`]:{color:ye.colorSuccess}}},[`${Ve}-inline-circle`]:{lineHeight:1,[`${Ve}-inner`]:{verticalAlign:"bottom"}}}},Ie=ye=>{const{componentCls:Ve}=ye;return{[Ve]:{[`${Ve}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:ye.progressStepMinWidth,marginInlineEnd:ye.progressStepMarginInlineEnd,backgroundColor:ye.remainingColor,transition:`all ${ye.motionDurationSlow}`,"&-active":{backgroundColor:ye.defaultColor}}}}}},P=ye=>{const{componentCls:Ve,iconCls:_}=ye;return{[Ve]:{[`${Ve}-small&-line, ${Ve}-small&-line ${Ve}-text ${_}`]:{fontSize:ye.fontSizeSM}}}},pe=ye=>({circleTextColor:ye.colorText,defaultColor:ye.colorInfo,remainingColor:ye.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${ye.fontSize/ye.fontSizeSM}em`});var xe=(0,je.I$)("Progress",ye=>{const Ve=ye.calc(ye.marginXXS).div(2).equal(),_=(0,Tt.mergeToken)(ye,{progressStepMarginInlineEnd:Ve,progressStepMinWidth:Ve,progressActiveMotionDuration:"2.4s"});return[Je(_),Le(_),Ie(_),P(_)]},pe),He=function(ye,Ve){var _={};for(var A in ye)Object.prototype.hasOwnProperty.call(ye,A)&&Ve.indexOf(A)<0&&(_[A]=ye[A]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,A=Object.getOwnPropertySymbols(ye);Oe<A.length;Oe++)Ve.indexOf(A[Oe])<0&&Object.prototype.propertyIsEnumerable.call(ye,A[Oe])&&(_[A[Oe]]=ye[A[Oe]]);return _};const et=ye=>{let Ve=[];return Object.keys(ye).forEach(_=>{const A=parseFloat(_.replace(/%/g,""));Number.isNaN(A)||Ve.push({key:A,value:ye[_]})}),Ve=Ve.sort((_,A)=>_.key-A.key),Ve.map(_=>{let{key:A,value:Oe}=_;return`${Oe} ${A}%`}).join(", ")},ut=(ye,Ve)=>{const{from:_=V.presetPrimaryColors.blue,to:A=V.presetPrimaryColors.blue,direction:Oe=Ve==="rtl"?"to left":"to right"}=ye,N=He(ye,["from","to","direction"]);if(Object.keys(N).length!==0){const St=et(N),Ee=`linear-gradient(${Oe}, ${St})`;return{background:Ee,[Re]:Ee}}const ae=`linear-gradient(${Oe}, ${_}, ${A})`;return{background:ae,[Re]:ae}};var Lt=ye=>{const{prefixCls:Ve,direction:_,percent:A,size:Oe,strokeWidth:N,strokeColor:ae,strokeLinecap:St="round",children:Ee,trailColor:$e=null,percentPosition:Ge,success:Z}=ye,{align:J,type:be}=Ge,Pe=ae&&typeof ae!="string"?ut(ae,_):{[Re]:ae,background:ae},j=St==="square"||St==="butt"?0:void 0,Ye=Oe!=null?Oe:[-1,N||(Oe==="small"?6:8)],[X,tt]=Ke(Ye,"line",{strokeWidth:N}),Ot={backgroundColor:$e||void 0,borderRadius:j},Xt=Object.assign(Object.assign({width:`${me(A)}%`,height:tt,borderRadius:j},Pe),{[Ce]:me(A)/100}),pn=ze(ye),qt={width:`${me(pn)}%`,height:tt,borderRadius:j,backgroundColor:Z==null?void 0:Z.strokeColor},nn={width:X<0?"100%":X},xn=m.createElement("div",{className:`${Ve}-inner`,style:Ot},m.createElement("div",{className:ee()(`${Ve}-bg`,`${Ve}-bg-${be}`),style:Xt},be==="inner"&&Ee),pn!==void 0&&m.createElement("div",{className:`${Ve}-success-bg`,style:qt})),Un=be==="outer"&&J==="start",un=be==="outer"&&J==="end";return be==="outer"&&J==="center"?m.createElement("div",{className:`${Ve}-layout-bottom`},xn,Ee):m.createElement("div",{className:`${Ve}-outer`,style:nn},Un&&Ee,xn,un&&Ee)},Mt=ye=>{const{size:Ve,steps:_,rounding:A=Math.round,percent:Oe=0,strokeWidth:N=8,strokeColor:ae,trailColor:St=null,prefixCls:Ee,children:$e}=ye,Ge=A(_*(Oe/100)),Z=Ve==="small"?2:14,J=Ve!=null?Ve:[Z,N],[be,Pe]=Ke(J,"step",{steps:_,strokeWidth:N}),j=be/_,Ye=Array.from({length:_});for(let X=0;X<_;X++){const tt=Array.isArray(ae)?ae[X]:ae;Ye[X]=m.createElement("div",{key:X,className:ee()(`${Ee}-steps-item`,{[`${Ee}-steps-item-active`]:X<=Ge-1}),style:{backgroundColor:X<=Ge-1?tt:St,width:j,height:Pe}})}return m.createElement("div",{className:`${Ee}-steps-outer`},Ye,$e)},Yt=function(ye,Ve){var _={};for(var A in ye)Object.prototype.hasOwnProperty.call(ye,A)&&Ve.indexOf(A)<0&&(_[A]=ye[A]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,A=Object.getOwnPropertySymbols(ye);Oe<A.length;Oe++)Ve.indexOf(A[Oe])<0&&Object.prototype.propertyIsEnumerable.call(ye,A[Oe])&&(_[A[Oe]]=ye[A[Oe]]);return _};const jt=null,$t=["normal","exception","active","success"];var It=m.forwardRef((ye,Ve)=>{const{prefixCls:_,className:A,rootClassName:Oe,steps:N,strokeColor:ae,percent:St=0,size:Ee="default",showInfo:$e=!0,type:Ge="line",status:Z,format:J,style:be,percentPosition:Pe={}}=ye,j=Yt(ye,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:Ye="end",type:X="outer"}=Pe,tt=Array.isArray(ae)?ae[0]:ae,Ot=typeof ae=="string"||Array.isArray(ae)?ae:void 0,Xt=m.useMemo(()=>{if(tt){const Ne=typeof tt=="string"?tt:Object.values(tt)[0];return new de.FastColor(Ne).isLight()}return!1},[ae]),pn=m.useMemo(()=>{var Ne,mt;const wt=ze(ye);return parseInt(wt!==void 0?(Ne=wt!=null?wt:0)===null||Ne===void 0?void 0:Ne.toString():(mt=St!=null?St:0)===null||mt===void 0?void 0:mt.toString(),10)},[St,ye.success,ye.successPercent]),qt=m.useMemo(()=>!$t.includes(Z)&&pn>=100?"success":Z||"normal",[Z,pn]),{getPrefixCls:nn,direction:xn,progress:Un}=m.useContext(H.E_),un=nn("progress",_),[On,en,Ut]=xe(un),Pt=Ge==="line",an=Pt&&!N,rn=m.useMemo(()=>{if(!$e)return null;const Ne=ze(ye);let mt;const wt=J||(we=>`${we}%`),ht=Pt&&Xt&&X==="inner";return X==="inner"||J||qt!=="exception"&&qt!=="success"?mt=wt(me(St),me(Ne)):qt==="exception"?mt=Pt?m.createElement(G.Z,null):m.createElement(g.Z,null):qt==="success"&&(mt=Pt?m.createElement(oe.Z,null):m.createElement(ve.Z,null)),m.createElement("span",{className:ee()(`${un}-text`,{[`${un}-text-bright`]:ht,[`${un}-text-${Ye}`]:an,[`${un}-text-${X}`]:an}),title:typeof mt=="string"?mt:void 0},mt)},[$e,St,pn,qt,Ge,un,J]);let An;Ge==="line"?An=N?m.createElement(Mt,Object.assign({},ye,{strokeColor:Ot,prefixCls:un,steps:typeof N=="object"?N.count:N}),rn):m.createElement(Lt,Object.assign({},ye,{strokeColor:tt,prefixCls:un,direction:xn,percentPosition:{align:Ye,type:X}}),rn):(Ge==="circle"||Ge==="dashboard")&&(An=m.createElement(Vt,Object.assign({},ye,{strokeColor:tt,prefixCls:un,progressStatus:qt}),rn));const ir=ee()(un,`${un}-status-${qt}`,{[`${un}-${Ge==="dashboard"&&"circle"||Ge}`]:Ge!=="line",[`${un}-inline-circle`]:Ge==="circle"&&Ke(Ee,"circle")[0]<=20,[`${un}-line`]:an,[`${un}-line-align-${Ye}`]:an,[`${un}-line-position-${X}`]:an,[`${un}-steps`]:N,[`${un}-show-info`]:$e,[`${un}-${Ee}`]:typeof Ee=="string",[`${un}-rtl`]:xn==="rtl"},Un==null?void 0:Un.className,A,Oe,en,Ut);return On(m.createElement("div",Object.assign({ref:Ve,style:Object.assign(Object.assign({},Un==null?void 0:Un.style),be),className:ir,role:"progressbar","aria-valuenow":pn,"aria-valuemin":0,"aria-valuemax":100},(0,o.Z)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),An))}),Rt=It},63139:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return Xe}});var m=b(59301),de=b(54476),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},ve=oe,G=b(7657),g=function(Ke,Qe){return m.createElement(G.Z,(0,de.Z)({},Ke,{ref:Qe,icon:ve}))},fe=m.forwardRef(g),ee=fe,o=b(92310),H=b.n(o),k=b(20068),S=b(42978),w=b(75931),C=b(18929),R=b(10228),q=b(26112);function Q(_e,Ke){var Qe=_e.disabled,st=_e.prefixCls,rt=_e.character,Vt=_e.characterRender,qe=_e.index,Kt=_e.count,je=_e.value,Tt=_e.allowHalf,Re=_e.focused,Ce=_e.onHover,ce=_e.onClick,Je=function(ut){Ce(ut,qe)},Le=function(ut){ce(ut,qe)},Ie=function(ut){ut.keyCode===R.Z.ENTER&&ce(ut,qe)},P=qe+1,pe=new Set([st]);je===0&&qe===0&&Re?pe.add("".concat(st,"-focused")):Tt&&je+.5>=P&&je<P?(pe.add("".concat(st,"-half")),pe.add("".concat(st,"-active")),Re&&pe.add("".concat(st,"-focused"))):(P<=je?pe.add("".concat(st,"-full")):pe.add("".concat(st,"-zero")),P===je&&Re&&pe.add("".concat(st,"-focused")));var xe=typeof rt=="function"?rt(_e):rt,He=m.createElement("li",{className:H()(Array.from(pe)),ref:Ke},m.createElement("div",{onClick:Qe?null:Le,onKeyDown:Qe?null:Ie,onMouseMove:Qe?null:Je,role:"radio","aria-checked":je>qe?"true":"false","aria-posinset":qe+1,"aria-setsize":Kt,tabIndex:Qe?-1:0},m.createElement("div",{className:"".concat(st,"-first")},xe),m.createElement("div",{className:"".concat(st,"-second")},xe)));return Vt&&(He=Vt(He,_e)),He}var K=m.forwardRef(Q);function D(){var _e=m.useRef({});function Ke(st){return _e.current[st]}function Qe(st){return function(rt){_e.current[st]=rt}}return[Ke,Qe]}function $(_e){var Ke=_e.pageXOffset,Qe="scrollLeft";if(typeof Ke!="number"){var st=_e.document;Ke=st.documentElement[Qe],typeof Ke!="number"&&(Ke=st.body[Qe])}return Ke}function M(_e){var Ke,Qe,st=_e.ownerDocument,rt=st.body,Vt=st&&st.documentElement,qe=_e.getBoundingClientRect();return Ke=qe.left,Qe=qe.top,Ke-=Vt.clientLeft||rt.clientLeft||0,Qe-=Vt.clientTop||rt.clientTop||0,{left:Ke,top:Qe}}function F(_e){var Ke=M(_e),Qe=_e.ownerDocument,st=Qe.defaultView||Qe.parentWindow;return Ke.left+=$(st),Ke.left}var ue=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function he(_e,Ke){var Qe=_e.prefixCls,st=Qe===void 0?"rc-rate":Qe,rt=_e.className,Vt=_e.defaultValue,qe=_e.value,Kt=_e.count,je=Kt===void 0?5:Kt,Tt=_e.allowHalf,Re=Tt===void 0?!1:Tt,Ce=_e.allowClear,ce=Ce===void 0?!0:Ce,Je=_e.keyboard,Le=Je===void 0?!0:Je,Ie=_e.character,P=Ie===void 0?"\u2605":Ie,pe=_e.characterRender,xe=_e.disabled,He=_e.direction,et=He===void 0?"ltr":He,ut=_e.tabIndex,xt=ut===void 0?0:ut,Lt=_e.autoFocus,Et=_e.onHoverChange,Mt=_e.onChange,Yt=_e.onFocus,jt=_e.onBlur,$t=_e.onKeyDown,it=_e.onMouseLeave,It=(0,w.Z)(_e,ue),Rt=D(),ye=(0,S.Z)(Rt,2),Ve=ye[0],_=ye[1],A=m.useRef(null),Oe=function(){if(!xe){var rn;(rn=A.current)===null||rn===void 0||rn.focus()}};m.useImperativeHandle(Ke,function(){return{focus:Oe,blur:function(){if(!xe){var rn;(rn=A.current)===null||rn===void 0||rn.blur()}}}});var N=(0,C.Z)(Vt||0,{value:qe}),ae=(0,S.Z)(N,2),St=ae[0],Ee=ae[1],$e=(0,C.Z)(null),Ge=(0,S.Z)($e,2),Z=Ge[0],J=Ge[1],be=function(rn,An){var ir=et==="rtl",Ne=rn+1;if(Re){var mt=Ve(rn),wt=F(mt),ht=mt.clientWidth;(ir&&An-wt>ht/2||!ir&&An-wt<ht/2)&&(Ne-=.5)}return Ne},Pe=function(rn){Ee(rn),Mt==null||Mt(rn)},j=m.useState(!1),Ye=(0,S.Z)(j,2),X=Ye[0],tt=Ye[1],Ot=function(){tt(!0),Yt==null||Yt()},Xt=function(){tt(!1),jt==null||jt()},pn=m.useState(null),qt=(0,S.Z)(pn,2),nn=qt[0],xn=qt[1],Un=function(rn,An){var ir=be(An,rn.pageX);ir!==Z&&(xn(ir),J(null)),Et==null||Et(ir)},un=function(rn){xe||(xn(null),J(null),Et==null||Et(void 0)),rn&&(it==null||it(rn))},On=function(rn,An){var ir=be(An,rn.pageX),Ne=!1;ce&&(Ne=ir===St),un(),Pe(Ne?0:ir),J(Ne?ir:null)},en=function(rn){var An=rn.keyCode,ir=et==="rtl",Ne=Re?.5:1;Le&&(An===R.Z.RIGHT&&St<je&&!ir?(Pe(St+Ne),rn.preventDefault()):An===R.Z.LEFT&&St>0&&!ir||An===R.Z.RIGHT&&St>0&&ir?(Pe(St-Ne),rn.preventDefault()):An===R.Z.LEFT&&St<je&&ir&&(Pe(St+Ne),rn.preventDefault())),$t==null||$t(rn)};m.useEffect(function(){Lt&&!xe&&Oe()},[]);var Ut=new Array(je).fill(0).map(function(an,rn){return m.createElement(K,{ref:_(rn),index:rn,count:je,disabled:xe,prefixCls:"".concat(st,"-star"),allowHalf:Re,value:nn===null?St:nn,onClick:On,onHover:Un,key:an||rn,character:P,characterRender:pe,focused:X})}),Pt=H()(st,rt,(0,k.Z)((0,k.Z)({},"".concat(st,"-disabled"),xe),"".concat(st,"-rtl"),et==="rtl"));return m.createElement("ul",(0,de.Z)({className:Pt,onMouseLeave:un,tabIndex:xe?-1:xt,onFocus:xe?null:Ot,onBlur:xe?null:Xt,onKeyDown:xe?null:en,ref:A},(0,q.Z)(It,{aria:!0,data:!0,attr:!0})),Ut)}var le=m.forwardRef(he),Se=le,ke=b(48755),De=b(25399),Me=b(36237),Y=b(63356),B=b(16931),W=b(51636);const re=_e=>{const{componentCls:Ke}=_e;return{[`${Ke}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:_e.marginXS},"> div":{transition:`all ${_e.motionDurationMid}, outline 0s`,"&:hover":{transform:_e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${(0,Me.unit)(_e.lineWidth)} dashed ${_e.starColor}`,transform:_e.starHoverScale}},"&-first, &-second":{color:_e.starBg,transition:`all ${_e.motionDurationMid}`,userSelect:"none"},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Ke}-star-first, &-half ${Ke}-star-second`]:{opacity:1},[`&-half ${Ke}-star-first, &-full ${Ke}-star-second`]:{color:"inherit"}}}},ie=_e=>({[`&-rtl${_e.componentCls}`]:{direction:"rtl"}}),se=_e=>{const{componentCls:Ke}=_e;return{[Ke]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Y.Wf)(_e)),{display:"inline-block",margin:0,padding:0,color:_e.starColor,fontSize:_e.starSize,lineHeight:1,listStyle:"none",outline:"none",[`&-disabled${Ke} ${Ke}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),re(_e)),ie(_e))}},x=_e=>({starColor:_e.yellow6,starSize:_e.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:_e.colorFillContent});var E=(0,B.I$)("Rate",_e=>{const Ke=(0,W.mergeToken)(_e,{});return[se(Ke)]},x),V=b(2171),me=function(_e,Ke){var Qe={};for(var st in _e)Object.prototype.hasOwnProperty.call(_e,st)&&Ke.indexOf(st)<0&&(Qe[st]=_e[st]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,st=Object.getOwnPropertySymbols(_e);rt<st.length;rt++)Ke.indexOf(st[rt])<0&&Object.prototype.propertyIsEnumerable.call(_e,st[rt])&&(Qe[st[rt]]=_e[st[rt]]);return Qe},Xe=m.forwardRef((_e,Ke)=>{const{prefixCls:Qe,className:st,rootClassName:rt,style:Vt,tooltips:qe,character:Kt=m.createElement(ee,null),disabled:je}=_e,Tt=me(_e,["prefixCls","className","rootClassName","style","tooltips","character","disabled"]),Re=(ut,xt)=>{let{index:Lt}=xt;return qe?m.createElement(De.Z,{title:qe[Lt]},ut):ut},{getPrefixCls:Ce,direction:ce,rate:Je}=m.useContext(ke.E_),Le=Ce("rate",Qe),[Ie,P,pe]=E(Le),xe=Object.assign(Object.assign({},Je==null?void 0:Je.style),Vt),He=m.useContext(V.Z),et=je!=null?je:He;return Ie(m.createElement(Se,Object.assign({ref:Ke,character:Kt,characterRender:Re,disabled:et},Tt,{className:H()(st,rt,P,pe,Je==null?void 0:Je.className),style:xe,prefixCls:Le,direction:ce})))})},44104:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return q}});var m=b(59301),de=b(92310),oe=b.n(de),ve=b(11592),G=b(99402),g=b(48755),fe=b(70045);const ee=m.createContext({latestIndex:0}),o=ee.Provider;var k=Q=>{let{className:K,index:D,children:$,split:M,style:F}=Q;const{latestIndex:ue}=m.useContext(ee);return $==null?null:m.createElement(m.Fragment,null,m.createElement("div",{className:K,style:F},$),D<ue&&M&&m.createElement("span",{className:`${K}-split`},M))},S=b(31547),w=function(Q,K){var D={};for(var $ in Q)Object.prototype.hasOwnProperty.call(Q,$)&&K.indexOf($)<0&&(D[$]=Q[$]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,$=Object.getOwnPropertySymbols(Q);M<$.length;M++)K.indexOf($[M])<0&&Object.prototype.propertyIsEnumerable.call(Q,$[M])&&(D[$[M]]=Q[$[M]]);return D};const R=m.forwardRef((Q,K)=>{var D;const{getPrefixCls:$,direction:M,size:F,className:ue,style:he,classNames:le,styles:Se}=(0,g.dj)("space"),{size:ke=F!=null?F:"small",align:De,className:Me,rootClassName:Y,children:B,direction:W="horizontal",prefixCls:re,split:ie,style:se,wrap:x=!1,classNames:E,styles:V}=Q,me=w(Q,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[ze,Xe]=Array.isArray(ke)?ke:[ke,ke],_e=(0,G.n)(Xe),Ke=(0,G.n)(ze),Qe=(0,G.T)(Xe),st=(0,G.T)(ze),rt=(0,ve.Z)(B,{keepEmpty:!0}),Vt=De===void 0&&W==="horizontal"?"center":De,qe=$("space",re),[Kt,je,Tt]=(0,S.Z)(qe),Re=oe()(qe,ue,je,`${qe}-${W}`,{[`${qe}-rtl`]:M==="rtl",[`${qe}-align-${Vt}`]:Vt,[`${qe}-gap-row-${Xe}`]:_e,[`${qe}-gap-col-${ze}`]:Ke},Me,Y,Tt),Ce=oe()(`${qe}-item`,(D=E==null?void 0:E.item)!==null&&D!==void 0?D:le.item);let ce=0;const Je=rt.map((P,pe)=>{var xe;P!=null&&(ce=pe);const He=(P==null?void 0:P.key)||`${Ce}-${pe}`;return m.createElement(k,{className:Ce,key:He,index:pe,split:ie,style:(xe=V==null?void 0:V.item)!==null&&xe!==void 0?xe:Se.item},P)}),Le=m.useMemo(()=>({latestIndex:ce}),[ce]);if(rt.length===0)return null;const Ie={};return x&&(Ie.flexWrap="wrap"),!Ke&&st&&(Ie.columnGap=ze),!_e&&Qe&&(Ie.rowGap=Xe),Kt(m.createElement("div",Object.assign({ref:K,className:Re,style:Object.assign(Object.assign(Object.assign({},Ie),he),se)},me),m.createElement(o,{value:Le},Je)))});R.Compact=fe.ZP;var q=R},11938:function(ln,ct,b){"use strict";b.d(ct,{default:function(){return De}});var m=b(59301),de=b(40192),oe=b(22703),ve=b(92310),G=b.n(ve),g=b(26112),fe=b(48755),ee=b(458),H=Me=>{const{value:Y,formatter:B,precision:W,decimalSeparator:re,groupSeparator:ie="",prefixCls:se}=Me;let x;if(typeof B=="function")x=B(Y);else{const E=String(Y),V=E.match(/^(-?)(\d*)(\.(\d+))?$/);if(!V||E==="-")x=E;else{const me=V[1];let ze=V[2]||"0",Xe=V[4]||"";ze=ze.replace(/\B(?=(\d{3})+(?!\d))/g,ie),typeof W=="number"&&(Xe=Xe.padEnd(W,"0").slice(0,W>0?W:0)),Xe&&(Xe=`${re}${Xe}`),x=[m.createElement("span",{key:"int",className:`${se}-content-value-int`},me,ze),Xe&&m.createElement("span",{key:"decimal",className:`${se}-content-value-decimal`},Xe)]}}return m.createElement("span",{className:`${se}-content-value`},x)},k=b(63356),S=b(16931),w=b(51636);const C=Me=>{const{componentCls:Y,marginXXS:B,padding:W,colorTextDescription:re,titleFontSize:ie,colorTextHeading:se,contentFontSize:x,fontFamily:E}=Me;return{[Y]:Object.assign(Object.assign({},(0,k.Wf)(Me)),{[`${Y}-title`]:{marginBottom:B,color:re,fontSize:ie},[`${Y}-skeleton`]:{paddingTop:W},[`${Y}-content`]:{color:se,fontSize:x,fontFamily:E,[`${Y}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Y}-content-prefix, ${Y}-content-suffix`]:{display:"inline-block"},[`${Y}-content-prefix`]:{marginInlineEnd:B},[`${Y}-content-suffix`]:{marginInlineStart:B}}})}},R=Me=>{const{fontSizeHeading3:Y,fontSize:B}=Me;return{titleFontSize:B,contentFontSize:Y}};var q=(0,S.I$)("Statistic",Me=>{const Y=(0,w.mergeToken)(Me,{});return[C(Y)]},R),Q=function(Me,Y){var B={};for(var W in Me)Object.prototype.hasOwnProperty.call(Me,W)&&Y.indexOf(W)<0&&(B[W]=Me[W]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,W=Object.getOwnPropertySymbols(Me);re<W.length;re++)Y.indexOf(W[re])<0&&Object.prototype.propertyIsEnumerable.call(Me,W[re])&&(B[W[re]]=Me[W[re]]);return B},D=Me=>{const{prefixCls:Y,className:B,rootClassName:W,style:re,valueStyle:ie,value:se=0,title:x,valueRender:E,prefix:V,suffix:me,loading:ze=!1,formatter:Xe,precision:_e,decimalSeparator:Ke=".",groupSeparator:Qe=",",onMouseEnter:st,onMouseLeave:rt}=Me,Vt=Q(Me,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:qe,direction:Kt,className:je,style:Tt}=(0,fe.dj)("statistic"),Re=qe("statistic",Y),[Ce,ce,Je]=q(Re),Le=m.createElement(H,{decimalSeparator:Ke,groupSeparator:Qe,prefixCls:Re,formatter:Xe,precision:_e,value:se}),Ie=G()(Re,{[`${Re}-rtl`]:Kt==="rtl"},je,B,W,ce,Je),P=(0,g.Z)(Vt,{aria:!0,data:!0});return Ce(m.createElement("div",Object.assign({},P,{className:Ie,style:Object.assign(Object.assign({},Tt),re),onMouseEnter:st,onMouseLeave:rt}),x&&m.createElement("div",{className:`${Re}-title`},x),m.createElement(ee.Z,{paragraph:!1,loading:ze,className:`${Re}-skeleton`},m.createElement("div",{style:ie,className:`${Re}-content`},V&&m.createElement("span",{className:`${Re}-content-prefix`},V),E?E(Le):Le,me&&m.createElement("span",{className:`${Re}-content-suffix`},me)))))};const $=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function M(Me,Y){let B=Me;const W=/\[[^\]]*]/g,re=(Y.match(W)||[]).map(E=>E.slice(1,-1)),ie=Y.replace(W,"[]"),se=$.reduce((E,V)=>{let[me,ze]=V;if(E.includes(me)){const Xe=Math.floor(B/ze);return B-=Xe*ze,E.replace(new RegExp(`${me}+`,"g"),_e=>{const Ke=_e.length;return Xe.toString().padStart(Ke,"0")})}return E},ie);let x=0;return se.replace(W,()=>{const E=re[x];return x+=1,E})}function F(Me,Y){const{format:B=""}=Y,W=new Date(Me).getTime(),re=Date.now(),ie=Math.max(W-re,0);return M(ie,B)}var ue=function(Me,Y){var B={};for(var W in Me)Object.prototype.hasOwnProperty.call(Me,W)&&Y.indexOf(W)<0&&(B[W]=Me[W]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,W=Object.getOwnPropertySymbols(Me);re<W.length;re++)Y.indexOf(W[re])<0&&Object.prototype.propertyIsEnumerable.call(Me,W[re])&&(B[W[re]]=Me[W[re]]);return B};const he=1e3/30;function le(Me){return new Date(Me).getTime()}const Se=Me=>{const{value:Y,format:B="HH:mm:ss",onChange:W,onFinish:re}=Me,ie=ue(Me,["value","format","onChange","onFinish"]),se=(0,de.Z)(),x=m.useRef(null),E=()=>{re==null||re(),x.current&&(clearInterval(x.current),x.current=null)},V=()=>{const Xe=le(Y);Xe>=Date.now()&&(x.current=setInterval(()=>{se(),W==null||W(Xe-Date.now()),Xe<Date.now()&&E()},he))};m.useEffect(()=>(V(),()=>{x.current&&(clearInterval(x.current),x.current=null)}),[Y]);const me=(Xe,_e)=>F(Xe,Object.assign(Object.assign({},_e),{format:B})),ze=Xe=>(0,oe.Tm)(Xe,{title:void 0});return m.createElement(D,Object.assign({},ie,{value:Y,valueRender:ze,formatter:me}))};var ke=m.memo(Se);D.Countdown=ke;var De=D},93873:function(ln,ct,b){"use strict";b.d(ct,{Fm:function(){return S}});var m=b(36237),de=b(48746);const oe=new m.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ve=new m.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),G=new m.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),g=new m.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fe=new m.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ee=new m.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),o=new m.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),H=new m.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),k={"move-up":{inKeyframes:o,outKeyframes:H},"move-down":{inKeyframes:oe,outKeyframes:ve},"move-left":{inKeyframes:G,outKeyframes:g},"move-right":{inKeyframes:fe,outKeyframes:ee}},S=(w,C)=>{const{antCls:R}=w,q=`${R}-${C}`,{inKeyframes:Q,outKeyframes:K}=k[C];return[(0,de.R)(q,Q,K,w.motionDurationMid),{[`
${q}-enter,
${q}-appear
`]:{opacity:0,animationTimingFunction:w.motionEaseOutCirc},[`${q}-leave`]:{animationTimingFunction:w.motionEaseInOutCirc}}]}},46e3:function(ln,ct,b){"use strict";b.d(ct,{Qt:function(){return G},Uw:function(){return ve},fJ:function(){return oe},ly:function(){return g},oN:function(){return S}});var m=b(36237),de=b(48746);const oe=new m.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ve=new m.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),G=new m.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),g=new m.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fe=new m.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ee=new m.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new m.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),H=new m.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),k={"slide-up":{inKeyframes:oe,outKeyframes:ve},"slide-down":{inKeyframes:G,outKeyframes:g},"slide-left":{inKeyframes:fe,outKeyframes:ee},"slide-right":{inKeyframes:o,outKeyframes:H}},S=(w,C)=>{const{antCls:R}=w,q=`${R}-${C}`,{inKeyframes:Q,outKeyframes:K}=k[C];return[(0,de.R)(q,Q,K,w.motionDurationMid),{[`
${q}-enter,
${q}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:w.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${q}-leave`]:{animationTimingFunction:w.motionEaseInQuint}}]}},37645:function(ln,ct,b){"use strict";b.d(ct,{ZP:function(){return g},qN:function(){return oe},wZ:function(){return ve}});var m=b(36237),de=b(36305);const oe=8;function ve(fe){const{contentRadius:ee,limitVerticalRadius:o}=fe,H=ee>12?ee+2:12;return{arrowOffsetHorizontal:H,arrowOffsetVertical:o?oe:H}}function G(fe,ee){return fe?ee:{}}function g(fe,ee,o){const{componentCls:H,boxShadowPopoverArrow:k,arrowOffsetVertical:S,arrowOffsetHorizontal:w}=fe,{arrowDistance:C=0,arrowPlacement:R={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[H]:Object.assign(Object.assign(Object.assign(Object.assign({[`${H}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,de.W)(fe,ee,k)),{"&:before":{background:ee}})]},G(!!R.top,{[[`&-placement-top > ${H}-arrow`,`&-placement-topLeft > ${H}-arrow`,`&-placement-topRight > ${H}-arrow`].join(",")]:{bottom:C,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${H}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":w,[`> ${H}-arrow`]:{left:{_skip_check_:!0,value:w}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,m.unit)(w)})`,[`> ${H}-arrow`]:{right:{_skip_check_:!0,value:w}}}})),G(!!R.bottom,{[[`&-placement-bottom > ${H}-arrow`,`&-placement-bottomLeft > ${H}-arrow`,`&-placement-bottomRight > ${H}-arrow`].join(",")]:{top:C,transform:"translateY(-100%)"},[`&-placement-bottom > ${H}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":w,[`> ${H}-arrow`]:{left:{_skip_check_:!0,value:w}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,m.unit)(w)})`,[`> ${H}-arrow`]:{right:{_skip_check_:!0,value:w}}}})),G(!!R.left,{[[`&-placement-left > ${H}-arrow`,`&-placement-leftTop > ${H}-arrow`,`&-placement-leftBottom > ${H}-arrow`].join(",")]:{right:{_skip_check_:!0,value:C},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${H}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${H}-arrow`]:{top:S},[`&-placement-leftBottom > ${H}-arrow`]:{bottom:S}})),G(!!R.right,{[[`&-placement-right > ${H}-arrow`,`&-placement-rightTop > ${H}-arrow`,`&-placement-rightBottom > ${H}-arrow`].join(",")]:{left:{_skip_check_:!0,value:C},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${H}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${H}-arrow`]:{top:S},[`&-placement-rightBottom > ${H}-arrow`]:{bottom:S}}))}}},36305:function(ln,ct,b){"use strict";b.d(ct,{W:function(){return oe},w:function(){return de}});var m=b(36237);function de(ve){const{sizePopupArrow:G,borderRadiusXS:g,borderRadiusOuter:fe}=ve,ee=G/2,o=0,H=ee,k=fe*1/Math.sqrt(2),S=ee-fe*(1-1/Math.sqrt(2)),w=ee-g*(1/Math.sqrt(2)),C=fe*(Math.sqrt(2)-1)+g*(1/Math.sqrt(2)),R=2*ee-w,q=C,Q=2*ee-k,K=S,D=2*ee-o,$=H,M=ee*Math.sqrt(2)+fe*(Math.sqrt(2)-2),F=fe*(Math.sqrt(2)-1),ue=`polygon(${F}px 100%, 50% ${F}px, ${2*ee-F}px 100%, ${F}px 100%)`,he=`path('M ${o} ${H} A ${fe} ${fe} 0 0 0 ${k} ${S} L ${w} ${C} A ${g} ${g} 0 0 1 ${R} ${q} L ${Q} ${K} A ${fe} ${fe} 0 0 0 ${D} ${$} Z')`;return{arrowShadowWidth:M,arrowPath:he,arrowPolygon:ue}}const oe=(ve,G,g)=>{const{sizePopupArrow:fe,arrowPolygon:ee,arrowPath:o,arrowShadowWidth:H,borderRadiusXS:k,calc:S}=ve;return{pointerEvents:"none",width:fe,height:fe,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:fe,height:S(fe).div(2).equal(),background:G,clipPath:{_multi_value_:!0,value:[ee,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:H,height:H,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,m.unit)(k)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:g,zIndex:0,background:"transparent"}}}},93427:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return de}});var m=b(34998);function de(oe,ve){return m.i.reduce((G,g)=>{const fe=oe[`${g}1`],ee=oe[`${g}3`],o=oe[`${g}6`],H=oe[`${g}7`];return Object.assign(Object.assign({},G),ve(g,{lightColor:fe,lightBorderColor:ee,darkColor:o,textColor:H}))},{})}},25399:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return re}});var m=b(59301),de=b(92310),oe=b.n(de),ve=b(29125),G=b(18929),g=b(62487),fe=b(75030),ee=b(86641),o=b(52838),H=b(22703),k=b(32383),S=b(55743),w=b(57700),C=b(48755),R=b(36237),q=b(63356),Q=b(34925),K=b(37645),D=b(36305),$=b(93427),M=b(51636),F=b(16931);const ue=ie=>{const{calc:se,componentCls:x,tooltipMaxWidth:E,tooltipColor:V,tooltipBg:me,tooltipBorderRadius:ze,zIndexPopup:Xe,controlHeight:_e,boxShadowSecondary:Ke,paddingSM:Qe,paddingXS:st,arrowOffsetHorizontal:rt,sizePopupArrow:Vt}=ie,qe=se(ze).add(Vt).add(rt).equal(),Kt=se(ze).mul(2).add(Vt).equal();return[{[x]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,q.Wf)(ie)),{position:"absolute",zIndex:Xe,display:"block",width:"max-content",maxWidth:E,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":me,[`${x}-inner`]:{minWidth:Kt,minHeight:_e,padding:`${(0,R.unit)(ie.calc(Qe).div(2).equal())} ${(0,R.unit)(st)}`,color:V,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:me,borderRadius:ze,boxShadow:Ke,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:ie.min(ze,K.qN)}},[`${x}-content`]:{position:"relative"}}),(0,$.Z)(ie,(je,Tt)=>{let{darkColor:Re}=Tt;return{[`&${x}-${je}`]:{[`${x}-inner`]:{backgroundColor:Re},[`${x}-arrow`]:{"--antd-arrow-background-color":Re}}}})),{"&-rtl":{direction:"rtl"}})},(0,K.ZP)(ie,"var(--antd-arrow-background-color)"),{[`${x}-pure`]:{position:"relative",maxWidth:"none",margin:ie.sizePopupArrow}}]},he=ie=>Object.assign(Object.assign({zIndexPopup:ie.zIndexPopupBase+70},(0,K.wZ)({contentRadius:ie.borderRadius,limitVerticalRadius:!0})),(0,D.w)((0,M.mergeToken)(ie,{borderRadiusOuter:Math.min(ie.borderRadiusOuter,4)})));var le=function(ie){let se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,F.I$)("Tooltip",E=>{const{borderRadius:V,colorTextLightSolid:me,colorBgSpotlight:ze}=E,Xe=(0,M.mergeToken)(E,{tooltipMaxWidth:250,tooltipColor:me,tooltipBorderRadius:V,tooltipBg:ze});return[ue(Xe),(0,Q._y)(E,"zoom-big-fast")]},he,{resetStyle:!1,injectStyle:se})(ie)},Se=b(29509);function ke(ie,se){const x=(0,Se.o2)(se),E=oe()({[`${ie}-${se}`]:se&&x}),V={},me={};return se&&!x&&(V.background=se,me["--antd-arrow-background-color"]=se),{className:E,overlayStyle:V,arrowStyle:me}}var Me=ie=>{const{prefixCls:se,className:x,placement:E="top",title:V,color:me,overlayInnerStyle:ze}=ie,{getPrefixCls:Xe}=m.useContext(C.E_),_e=Xe("tooltip",se),[Ke,Qe,st]=le(_e),rt=ke(_e,me),Vt=rt.arrowStyle,qe=Object.assign(Object.assign({},ze),rt.overlayStyle),Kt=oe()(Qe,st,_e,`${_e}-pure`,`${_e}-placement-${E}`,x,rt.className);return Ke(m.createElement("div",{className:Kt,style:Vt},m.createElement("div",{className:`${_e}-arrow`}),m.createElement(ve.G,Object.assign({},ie,{className:Qe,prefixCls:_e,overlayInnerStyle:qe}),V)))},Y=function(ie,se){var x={};for(var E in ie)Object.prototype.hasOwnProperty.call(ie,E)&&se.indexOf(E)<0&&(x[E]=ie[E]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,E=Object.getOwnPropertySymbols(ie);V<E.length;V++)se.indexOf(E[V])<0&&Object.prototype.propertyIsEnumerable.call(ie,E[V])&&(x[E[V]]=ie[E[V]]);return x};const W=m.forwardRef((ie,se)=>{var x,E;const{prefixCls:V,openClassName:me,getTooltipContainer:ze,color:Xe,overlayInnerStyle:_e,children:Ke,afterOpenChange:Qe,afterVisibleChange:st,destroyTooltipOnHide:rt,arrow:Vt=!0,title:qe,overlay:Kt,builtinPlacements:je,arrowPointAtCenter:Tt=!1,autoAdjustOverflow:Re=!0,motion:Ce,getPopupContainer:ce,placement:Je="top",mouseEnterDelay:Le=.1,mouseLeaveDelay:Ie=.1,overlayStyle:P,rootClassName:pe,overlayClassName:xe,styles:He,classNames:et}=ie,ut=Y(ie,["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"]),xt=!!Vt,[,Lt]=(0,w.ZP)(),{getPopupContainer:Et,getPrefixCls:Mt,direction:Yt,className:jt,style:$t,classNames:it,styles:It}=(0,C.dj)("tooltip"),Rt=(0,k.ln)("Tooltip"),ye=m.useRef(null),Ve=()=>{var un;(un=ye.current)===null||un===void 0||un.forceAlign()};m.useImperativeHandle(se,()=>{var un,On;return{forceAlign:Ve,forcePopupAlign:()=>{Rt.deprecated(!1,"forcePopupAlign","forceAlign"),Ve()},nativeElement:(un=ye.current)===null||un===void 0?void 0:un.nativeElement,popupElement:(On=ye.current)===null||On===void 0?void 0:On.popupElement}});const[_,A]=(0,G.Z)(!1,{value:(x=ie.open)!==null&&x!==void 0?x:ie.visible,defaultValue:(E=ie.defaultOpen)!==null&&E!==void 0?E:ie.defaultVisible}),Oe=!qe&&!Kt&&qe!==0,N=un=>{var On,en;A(Oe?!1:un),Oe||((On=ie.onOpenChange)===null||On===void 0||On.call(ie,un),(en=ie.onVisibleChange)===null||en===void 0||en.call(ie,un))},ae=m.useMemo(()=>{var un,On;let en=Tt;return typeof Vt=="object"&&(en=(On=(un=Vt.pointAtCenter)!==null&&un!==void 0?un:Vt.arrowPointAtCenter)!==null&&On!==void 0?On:Tt),je||(0,o.Z)({arrowPointAtCenter:en,autoAdjustOverflow:Re,arrowWidth:xt?Lt.sizePopupArrow:0,borderRadius:Lt.borderRadius,offset:Lt.marginXXS,visibleFirst:!0})},[Tt,Vt,je,Lt]),St=m.useMemo(()=>qe===0?qe:Kt||qe||"",[Kt,qe]),Ee=m.createElement(g.Z,{space:!0},typeof St=="function"?St():St),$e=Mt("tooltip",V),Ge=Mt(),Z=ie["data-popover-inject"];let J=_;!("open"in ie)&&!("visible"in ie)&&Oe&&(J=!1);const be=m.isValidElement(Ke)&&!(0,H.M2)(Ke)?Ke:m.createElement("span",null,Ke),Pe=be.props,j=!Pe.className||typeof Pe.className=="string"?oe()(Pe.className,me||`${$e}-open`):Pe.className,[Ye,X,tt]=le($e,!Z),Ot=ke($e,Xe),Xt=Ot.arrowStyle,pn=oe()(xe,{[`${$e}-rtl`]:Yt==="rtl"},Ot.className,pe,X,tt,jt,it.root,et==null?void 0:et.root),qt=oe()(it.body,et==null?void 0:et.body),[nn,xn]=(0,fe.Cn)("Tooltip",ut.zIndex),Un=m.createElement(ve.Z,Object.assign({},ut,{zIndex:nn,showArrow:xt,placement:Je,mouseEnterDelay:Le,mouseLeaveDelay:Ie,prefixCls:$e,classNames:{root:pn,body:qt},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Xt),It.root),$t),P),He==null?void 0:He.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},It.body),_e),He==null?void 0:He.body),Ot.overlayStyle)},getTooltipContainer:ce||ze||Et,ref:ye,builtinPlacements:ae,overlay:Ee,visible:J,onVisibleChange:N,afterVisibleChange:Qe!=null?Qe:st,arrowContent:m.createElement("span",{className:`${$e}-arrow-content`}),motion:{motionName:(0,ee.m)(Ge,"zoom-big-fast",ie.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!rt}),J?(0,H.Tm)(be,{className:j}):be);return Ye(m.createElement(S.Z.Provider,{value:xn},Un))});W._InternalPanelDoNotUseOrYouWillBeFired=Me;var re=W},94968:function(ln,ct,b){"use strict";b.d(ct,{default:function(){return ht}});var m=b(59301),de=b(94480),oe=b(4676),ve=b(92310),G=b.n(ve),g=b(54476),fe=b(67732),ee=b(83652),o=b(31226),H=b(42403),k=b(158),S=b(20068),w=b(33885),C=b(75931),R=b(76190),q=b(75044),Q=b(3202),K=b(26112),D=b(48736),$=function(we,at){if(we&&at){var gt=Array.isArray(at)?at:at.split(","),Dt=we.name||"",bt=we.type||"",Ft=bt.replace(/\/.*$/,"");return gt.some(function(zt){var _t=zt.trim();if(/^\*(\/\*)?$/.test(zt))return!0;if(_t.charAt(0)==="."){var We=Dt.toLowerCase(),nt=_t.toLowerCase(),Ct=[nt];return(nt===".jpg"||nt===".jpeg")&&(Ct=[".jpg",".jpeg"]),Ct.some(function(ot){return We.endsWith(ot)})}return/\/\*$/.test(_t)?Ft===_t.replace(/\/.*$/,""):bt===_t?!0:/^\w+$/.test(_t)?((0,D.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(_t,"'.Skip for check.")),!0):!1})}return!0};function M(we,at){var gt="cannot ".concat(we.method," ").concat(we.action," ").concat(at.status,"'"),Dt=new Error(gt);return Dt.status=at.status,Dt.method=we.method,Dt.url=we.action,Dt}function F(we){var at=we.responseText||we.response;if(!at)return at;try{return JSON.parse(at)}catch(gt){return at}}function ue(we){var at=new XMLHttpRequest;we.onProgress&&at.upload&&(at.upload.onprogress=function(Ft){Ft.total>0&&(Ft.percent=Ft.loaded/Ft.total*100),we.onProgress(Ft)});var gt=new FormData;we.data&&Object.keys(we.data).forEach(function(bt){var Ft=we.data[bt];if(Array.isArray(Ft)){Ft.forEach(function(zt){gt.append("".concat(bt,"[]"),zt)});return}gt.append(bt,Ft)}),we.file instanceof Blob?gt.append(we.filename,we.file,we.file.name):gt.append(we.filename,we.file),at.onerror=function(Ft){we.onError(Ft)},at.onload=function(){return at.status<200||at.status>=300?we.onError(M(we,at),F(at)):we.onSuccess(F(at),at)},at.open(we.method,we.action,!0),we.withCredentials&&"withCredentials"in at&&(at.withCredentials=!0);var Dt=we.headers||{};return Dt["X-Requested-With"]!==null&&at.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Dt).forEach(function(bt){Dt[bt]!==null&&at.setRequestHeader(bt,Dt[bt])}),at.send(gt),{abort:function(){at.abort()}}}var he=function(){var we=(0,Q.Z)((0,q.Z)().mark(function at(gt,Dt){var bt,Ft,zt,_t,We,nt,Ct,ot;return(0,q.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:nt=function(){return nt=(0,Q.Z)((0,q.Z)().mark(function Ht(hn){return(0,q.Z)().wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.abrupt("return",new Promise(function(vn){hn.file(function(on){Dt(on)?(hn.fullPath&&!on.webkitRelativePath&&(Object.defineProperties(on,{webkitRelativePath:{writable:!0}}),on.webkitRelativePath=hn.fullPath.replace(/^\//,""),Object.defineProperties(on,{webkitRelativePath:{writable:!1}})),vn(on)):vn(null)})}));case 1:case"end":return En.stop()}},Ht)})),nt.apply(this,arguments)},We=function(Ht){return nt.apply(this,arguments)},_t=function(){return _t=(0,Q.Z)((0,q.Z)().mark(function Ht(hn){var cn,En,vn,on,tn;return(0,q.Z)().wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:cn=hn.createReader(),En=[];case 2:return Sn.next=5,new Promise(function(bn){cn.readEntries(bn,function(){return bn([])})});case 5:if(vn=Sn.sent,on=vn.length,on){Sn.next=9;break}return Sn.abrupt("break",12);case 9:for(tn=0;tn<on;tn++)En.push(vn[tn]);Sn.next=2;break;case 12:return Sn.abrupt("return",En);case 13:case"end":return Sn.stop()}},Ht)})),_t.apply(this,arguments)},zt=function(Ht){return _t.apply(this,arguments)},bt=[],Ft=[],gt.forEach(function(Gt){return Ft.push(Gt.webkitGetAsEntry())}),Ct=function(){var Gt=(0,Q.Z)((0,q.Z)().mark(function Ht(hn,cn){var En,vn;return(0,q.Z)().wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:if(hn){tn.next=2;break}return tn.abrupt("return");case 2:if(hn.path=cn||"",!hn.isFile){tn.next=10;break}return tn.next=6,We(hn);case 6:En=tn.sent,En&&bt.push(En),tn.next=15;break;case 10:if(!hn.isDirectory){tn.next=15;break}return tn.next=13,zt(hn);case 13:vn=tn.sent,Ft.push.apply(Ft,(0,de.Z)(vn));case 15:case"end":return tn.stop()}},Ht)}));return function(hn,cn){return Gt.apply(this,arguments)}}(),ot=0;case 9:if(!(ot<Ft.length)){kt.next=15;break}return kt.next=12,Ct(Ft[ot]);case 12:ot++,kt.next=9;break;case 15:return kt.abrupt("return",bt);case 16:case"end":return kt.stop()}},at)}));return function(gt,Dt){return we.apply(this,arguments)}}(),le=he,Se=+new Date,ke=0;function De(){return"rc-upload-".concat(Se,"-").concat(++ke)}var Me=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Y=function(we){(0,H.Z)(gt,we);var at=(0,k.Z)(gt);function gt(){var Dt;(0,fe.Z)(this,gt);for(var bt=arguments.length,Ft=new Array(bt),zt=0;zt<bt;zt++)Ft[zt]=arguments[zt];return Dt=at.call.apply(at,[this].concat(Ft)),(0,S.Z)((0,o.Z)(Dt),"state",{uid:De()}),(0,S.Z)((0,o.Z)(Dt),"reqs",{}),(0,S.Z)((0,o.Z)(Dt),"fileInput",void 0),(0,S.Z)((0,o.Z)(Dt),"_isMounted",void 0),(0,S.Z)((0,o.Z)(Dt),"onChange",function(_t){var We=Dt.props,nt=We.accept,Ct=We.directory,ot=_t.target.files,dt=(0,de.Z)(ot).filter(function(kt){return!Ct||$(kt,nt)});Dt.uploadFiles(dt),Dt.reset()}),(0,S.Z)((0,o.Z)(Dt),"onClick",function(_t){var We=Dt.fileInput;if(We){var nt=_t.target,Ct=Dt.props.onClick;if(nt&&nt.tagName==="BUTTON"){var ot=We.parentNode;ot.focus(),nt.blur()}We.click(),Ct&&Ct(_t)}}),(0,S.Z)((0,o.Z)(Dt),"onKeyDown",function(_t){_t.key==="Enter"&&Dt.onClick(_t)}),(0,S.Z)((0,o.Z)(Dt),"onFileDrop",function(){var _t=(0,Q.Z)((0,q.Z)().mark(function We(nt){var Ct,ot,dt;return(0,q.Z)().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(Ct=Dt.props.multiple,nt.preventDefault(),nt.type!=="dragover"){Gt.next=4;break}return Gt.abrupt("return");case 4:if(!Dt.props.directory){Gt.next=11;break}return Gt.next=7,le(Array.prototype.slice.call(nt.dataTransfer.items),function(Ht){return $(Ht,Dt.props.accept)});case 7:ot=Gt.sent,Dt.uploadFiles(ot),Gt.next=14;break;case 11:dt=(0,de.Z)(nt.dataTransfer.files).filter(function(Ht){return $(Ht,Dt.props.accept)}),Ct===!1&&(dt=dt.slice(0,1)),Dt.uploadFiles(dt);case 14:case"end":return Gt.stop()}},We)}));return function(We){return _t.apply(this,arguments)}}()),(0,S.Z)((0,o.Z)(Dt),"uploadFiles",function(_t){var We=(0,de.Z)(_t),nt=We.map(function(Ct){return Ct.uid=De(),Dt.processFile(Ct,We)});Promise.all(nt).then(function(Ct){var ot=Dt.props.onBatchStart;ot==null||ot(Ct.map(function(dt){var kt=dt.origin,Gt=dt.parsedFile;return{file:kt,parsedFile:Gt}})),Ct.filter(function(dt){return dt.parsedFile!==null}).forEach(function(dt){Dt.post(dt)})})}),(0,S.Z)((0,o.Z)(Dt),"processFile",function(){var _t=(0,Q.Z)((0,q.Z)().mark(function We(nt,Ct){var ot,dt,kt,Gt,Ht,hn,cn,En,vn;return(0,q.Z)().wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:if(ot=Dt.props.beforeUpload,dt=nt,!ot){tn.next=14;break}return tn.prev=3,tn.next=6,ot(nt,Ct);case 6:dt=tn.sent,tn.next=12;break;case 9:tn.prev=9,tn.t0=tn.catch(3),dt=!1;case 12:if(dt!==!1){tn.next=14;break}return tn.abrupt("return",{origin:nt,parsedFile:null,action:null,data:null});case 14:if(kt=Dt.props.action,typeof kt!="function"){tn.next=21;break}return tn.next=18,kt(nt);case 18:Gt=tn.sent,tn.next=22;break;case 21:Gt=kt;case 22:if(Ht=Dt.props.data,typeof Ht!="function"){tn.next=29;break}return tn.next=26,Ht(nt);case 26:hn=tn.sent,tn.next=30;break;case 29:hn=Ht;case 30:return cn=((0,R.Z)(dt)==="object"||typeof dt=="string")&&dt?dt:nt,cn instanceof File?En=cn:En=new File([cn],nt.name,{type:nt.type}),vn=En,vn.uid=nt.uid,tn.abrupt("return",{origin:nt,data:hn,parsedFile:vn,action:Gt});case 35:case"end":return tn.stop()}},We,null,[[3,9]])}));return function(We,nt){return _t.apply(this,arguments)}}()),(0,S.Z)((0,o.Z)(Dt),"saveFileInput",function(_t){Dt.fileInput=_t}),Dt}return(0,ee.Z)(gt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(bt){var Ft=this,zt=bt.data,_t=bt.origin,We=bt.action,nt=bt.parsedFile;if(this._isMounted){var Ct=this.props,ot=Ct.onStart,dt=Ct.customRequest,kt=Ct.name,Gt=Ct.headers,Ht=Ct.withCredentials,hn=Ct.method,cn=_t.uid,En=dt||ue,vn={action:We,filename:kt,data:zt,file:nt,headers:Gt,withCredentials:Ht,method:hn||"post",onProgress:function(tn){var Tn=Ft.props.onProgress;Tn==null||Tn(tn,nt)},onSuccess:function(tn,Tn){var Sn=Ft.props.onSuccess;Sn==null||Sn(tn,nt,Tn),delete Ft.reqs[cn]},onError:function(tn,Tn){var Sn=Ft.props.onError;Sn==null||Sn(tn,Tn,nt),delete Ft.reqs[cn]}};ot(_t),this.reqs[cn]=En(vn)}}},{key:"reset",value:function(){this.setState({uid:De()})}},{key:"abort",value:function(bt){var Ft=this.reqs;if(bt){var zt=bt.uid?bt.uid:bt;Ft[zt]&&Ft[zt].abort&&Ft[zt].abort(),delete Ft[zt]}else Object.keys(Ft).forEach(function(_t){Ft[_t]&&Ft[_t].abort&&Ft[_t].abort(),delete Ft[_t]})}},{key:"render",value:function(){var bt=this.props,Ft=bt.component,zt=bt.prefixCls,_t=bt.className,We=bt.classNames,nt=We===void 0?{}:We,Ct=bt.disabled,ot=bt.id,dt=bt.name,kt=bt.style,Gt=bt.styles,Ht=Gt===void 0?{}:Gt,hn=bt.multiple,cn=bt.accept,En=bt.capture,vn=bt.children,on=bt.directory,tn=bt.openFileDialogOnClick,Tn=bt.onMouseEnter,Sn=bt.onMouseLeave,bn=bt.hasControlInside,Pn=(0,C.Z)(bt,Me),Hn=G()((0,S.Z)((0,S.Z)((0,S.Z)({},zt,!0),"".concat(zt,"-disabled"),Ct),_t,_t)),Bn=on?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},jn=Ct?{}:{onClick:tn?this.onClick:function(){},onKeyDown:tn?this.onKeyDown:function(){},onMouseEnter:Tn,onMouseLeave:Sn,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:bn?void 0:"0"};return m.createElement(Ft,(0,g.Z)({},jn,{className:Hn,role:bn?void 0:"button",style:kt}),m.createElement("input",(0,g.Z)({},(0,K.Z)(Pn,{aria:!0,data:!0}),{id:ot,name:dt,disabled:Ct,type:"file",ref:this.saveFileInput,onClick:function(nr){return nr.stopPropagation()},key:this.state.uid,style:(0,w.Z)({display:"none"},Ht.input),className:nt.input,accept:cn},Bn,{multiple:hn,onChange:this.onChange},En!=null?{capture:En}:{})),vn)}}]),gt}(m.Component),B=Y;function W(){}var re=function(we){(0,H.Z)(gt,we);var at=(0,k.Z)(gt);function gt(){var Dt;(0,fe.Z)(this,gt);for(var bt=arguments.length,Ft=new Array(bt),zt=0;zt<bt;zt++)Ft[zt]=arguments[zt];return Dt=at.call.apply(at,[this].concat(Ft)),(0,S.Z)((0,o.Z)(Dt),"uploader",void 0),(0,S.Z)((0,o.Z)(Dt),"saveUploader",function(_t){Dt.uploader=_t}),Dt}return(0,ee.Z)(gt,[{key:"abort",value:function(bt){this.uploader.abort(bt)}},{key:"render",value:function(){return m.createElement(B,(0,g.Z)({},this.props,{ref:this.saveUploader}))}}]),gt}(m.Component);(0,S.Z)(re,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:W,onError:W,onSuccess:W,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ie=re,se=ie,x=b(18929),E=b(48755),V=b(2171),me=b(9017),ze=b(85981),Xe=b(63356),_e=b(34961),Ke=b(16931),Qe=b(51636),st=b(36237),Vt=we=>{const{componentCls:at,iconCls:gt}=we;return{[`${at}-wrapper`]:{[`${at}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:we.colorFillAlter,border:`${(0,st.unit)(we.lineWidth)} dashed ${we.colorBorder}`,borderRadius:we.borderRadiusLG,cursor:"pointer",transition:`border-color ${we.motionDurationSlow}`,[at]:{padding:we.padding},[`${at}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:we.borderRadiusLG,"&:focus-visible":{outline:`${(0,st.unit)(we.lineWidthFocus)} solid ${we.colorPrimaryBorder}`}},[`${at}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
&:not(${at}-disabled):hover,
&-hover:not(${at}-disabled)
`]:{borderColor:we.colorPrimaryHover},[`p${at}-drag-icon`]:{marginBottom:we.margin,[gt]:{color:we.colorPrimary,fontSize:we.uploadThumbnailSize}},[`p${at}-text`]:{margin:`0 0 ${(0,st.unit)(we.marginXXS)}`,color:we.colorTextHeading,fontSize:we.fontSizeLG},[`p${at}-hint`]:{color:we.colorTextDescription,fontSize:we.fontSize},[`&${at}-disabled`]:{[`p${at}-drag-icon ${gt},
p${at}-text,
p${at}-hint
`]:{color:we.colorTextDisabled}}}}}},Kt=we=>{const{componentCls:at,iconCls:gt,fontSize:Dt,lineHeight:bt,calc:Ft}=we,zt=`${at}-list-item`,_t=`${zt}-actions`,We=`${zt}-action`;return{[`${at}-wrapper`]:{[`${at}-list`]:Object.assign(Object.assign({},(0,Xe.dF)()),{lineHeight:we.lineHeight,[zt]:{position:"relative",height:Ft(we.lineHeight).mul(Dt).equal(),marginTop:we.marginXS,fontSize:Dt,display:"flex",alignItems:"center",transition:`background-color ${we.motionDurationSlow}`,borderRadius:we.borderRadiusSM,"&:hover":{backgroundColor:we.controlItemBgHover},[`${zt}-name`]:Object.assign(Object.assign({},Xe.vS),{padding:`0 ${(0,st.unit)(we.paddingXS)}`,lineHeight:bt,flex:"auto",transition:`all ${we.motionDurationSlow}`}),[_t]:{whiteSpace:"nowrap",[We]:{opacity:0},[gt]:{color:we.actionsColor,transition:`all ${we.motionDurationSlow}`},[`
${We}:focus-visible,
&.picture ${We}
`]:{opacity:1}},[`${at}-icon ${gt}`]:{color:we.colorTextDescription,fontSize:Dt},[`${zt}-progress`]:{position:"absolute",bottom:we.calc(we.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:Ft(Dt).add(we.paddingXS).equal(),fontSize:Dt,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${zt}:hover ${We}`]:{opacity:1},[`${zt}-error`]:{color:we.colorError,[`${zt}-name, ${at}-icon ${gt}`]:{color:we.colorError},[_t]:{[`${gt}, ${gt}:hover`]:{color:we.colorError},[We]:{opacity:1}}},[`${at}-list-item-container`]:{transition:`opacity ${we.motionDurationSlow}, height ${we.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},je=b(99495),Re=we=>{const{componentCls:at}=we,gt=new st.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:we.calc(we.marginXS).div(-2).equal()}}),Dt=new st.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:we.calc(we.marginXS).div(-2).equal()}}),bt=`${at}-animate-inline`;return[{[`${at}-wrapper`]:{[`${bt}-appear, ${bt}-enter, ${bt}-leave`]:{animationDuration:we.motionDurationSlow,animationTimingFunction:we.motionEaseInOutCirc,animationFillMode:"forwards"},[`${bt}-appear, ${bt}-enter`]:{animationName:gt},[`${bt}-leave`]:{animationName:Dt}}},{[`${at}-wrapper`]:(0,je.J$)(we)},gt,Dt]},Ce=b(68361);const ce=we=>{const{componentCls:at,iconCls:gt,uploadThumbnailSize:Dt,uploadProgressOffset:bt,calc:Ft}=we,zt=`${at}-list`,_t=`${zt}-item`;return{[`${at}-wrapper`]:{[`
${zt}${zt}-picture,
${zt}${zt}-picture-card,
${zt}${zt}-picture-circle
`]:{[_t]:{position:"relative",height:Ft(Dt).add(Ft(we.lineWidth).mul(2)).add(Ft(we.paddingXS).mul(2)).equal(),padding:we.paddingXS,border:`${(0,st.unit)(we.lineWidth)} ${we.lineType} ${we.colorBorder}`,borderRadius:we.borderRadiusLG,"&:hover":{background:"transparent"},[`${_t}-thumbnail`]:Object.assign(Object.assign({},Xe.vS),{width:Dt,height:Dt,lineHeight:(0,st.unit)(Ft(Dt).add(we.paddingSM).equal()),textAlign:"center",flex:"none",[gt]:{fontSize:we.fontSizeHeading2,color:we.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${_t}-progress`]:{bottom:bt,width:`calc(100% - ${(0,st.unit)(Ft(we.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:Ft(Dt).add(we.paddingXS).equal()}},[`${_t}-error`]:{borderColor:we.colorError,[`${_t}-thumbnail ${gt}`]:{[`svg path[fill='${Ce.blue[0]}']`]:{fill:we.colorErrorBg},[`svg path[fill='${Ce.blue.primary}']`]:{fill:we.colorError}}},[`${_t}-uploading`]:{borderStyle:"dashed",[`${_t}-name`]:{marginBottom:bt}}},[`${zt}${zt}-picture-circle ${_t}`]:{[`&, &::before, ${_t}-thumbnail`]:{borderRadius:"50%"}}}}},Je=we=>{const{componentCls:at,iconCls:gt,fontSizeLG:Dt,colorTextLightSolid:bt,calc:Ft}=we,zt=`${at}-list`,_t=`${zt}-item`,We=we.uploadPicCardSize;return{[`
${at}-wrapper${at}-picture-card-wrapper,
${at}-wrapper${at}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,Xe.dF)()),{display:"block",[`${at}${at}-select`]:{width:We,height:We,textAlign:"center",verticalAlign:"top",backgroundColor:we.colorFillAlter,border:`${(0,st.unit)(we.lineWidth)} dashed ${we.colorBorder}`,borderRadius:we.borderRadiusLG,cursor:"pointer",transition:`border-color ${we.motionDurationSlow}`,[`> ${at}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${at}-disabled):hover`]:{borderColor:we.colorPrimary}},[`${zt}${zt}-picture-card, ${zt}${zt}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:we.marginXS,marginInlineEnd:we.marginXS}},"@supports (gap: 1px)":{gap:we.marginXS},[`${zt}-item-container`]:{display:"inline-block",width:We,height:We,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[_t]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,st.unit)(Ft(we.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,st.unit)(Ft(we.paddingXS).mul(2).equal())})`,backgroundColor:we.colorBgMask,opacity:0,transition:`all ${we.motionDurationSlow}`,content:'" "'}},[`${_t}:hover`]:{[`&::before, ${_t}-actions`]:{opacity:1}},[`${_t}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${we.motionDurationSlow}`,[`
${gt}-eye,
${gt}-download,
${gt}-delete
`]:{zIndex:10,width:Dt,margin:`0 ${(0,st.unit)(we.marginXXS)}`,fontSize:Dt,cursor:"pointer",transition:`all ${we.motionDurationSlow}`,color:bt,"&:hover":{color:bt},svg:{verticalAlign:"baseline"}}},[`${_t}-thumbnail, ${_t}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${_t}-name`]:{display:"none",textAlign:"center"},[`${_t}-file + ${_t}-name`]:{position:"absolute",bottom:we.margin,display:"block",width:`calc(100% - ${(0,st.unit)(Ft(we.paddingXS).mul(2).equal())})`},[`${_t}-uploading`]:{[`&${_t}`]:{backgroundColor:we.colorFillAlter},[`&::before, ${gt}-eye, ${gt}-download, ${gt}-delete`]:{display:"none"}},[`${_t}-progress`]:{bottom:we.marginXL,width:`calc(100% - ${(0,st.unit)(Ft(we.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${at}-wrapper${at}-picture-circle-wrapper`]:{[`${at}${at}-select`]:{borderRadius:"50%"}}}};var Ie=we=>{const{componentCls:at}=we;return{[`${at}-rtl`]:{direction:"rtl"}}};const P=we=>{const{componentCls:at,colorTextDisabled:gt}=we;return{[`${at}-wrapper`]:Object.assign(Object.assign({},(0,Xe.Wf)(we)),{[at]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${at}-select`]:{display:"inline-block"},[`${at}-hidden`]:{display:"none"},[`${at}-disabled`]:{color:gt,cursor:"not-allowed"}})}},pe=we=>({actionsColor:we.colorTextDescription});var xe=(0,Ke.I$)("Upload",we=>{const{fontSizeHeading3:at,fontHeight:gt,lineWidth:Dt,controlHeightLG:bt,calc:Ft}=we,zt=(0,Qe.mergeToken)(we,{uploadThumbnailSize:Ft(at).mul(2).equal(),uploadProgressOffset:Ft(Ft(gt).div(2)).add(Dt).equal(),uploadPicCardSize:Ft(bt).mul(2.55).equal()});return[P(zt),Vt(zt),ce(zt),Je(zt),Kt(zt),Re(zt),Ie(zt),(0,_e.Z)(zt)]},pe),He={icon:function(at,gt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:gt}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:at}}]}},name:"file",theme:"twotone"},et=He,ut=b(7657),xt=function(at,gt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:gt,icon:et}))},Lt=m.forwardRef(xt),Et=Lt,Mt=b(58617),Yt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},jt=Yt,$t=function(at,gt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:gt,icon:jt}))},it=m.forwardRef($t),It=it,Rt={icon:function(at,gt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:at}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:gt}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:gt}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:gt}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:at}}]}},name:"picture",theme:"twotone"},ye=Rt,Ve=function(at,gt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:gt,icon:ye}))},_=m.forwardRef(Ve),A=_,Oe=b(77900),N=b(2738),ae=b(40192),St=b(86641),Ee=b(22703),$e=b(7939);function Ge(we){return Object.assign(Object.assign({},we),{lastModified:we.lastModified,lastModifiedDate:we.lastModifiedDate,name:we.name,size:we.size,type:we.type,uid:we.uid,percent:0,originFileObj:we})}function Z(we,at){const gt=(0,de.Z)(at),Dt=gt.findIndex(bt=>{let{uid:Ft}=bt;return Ft===we.uid});return Dt===-1?gt.push(we):gt[Dt]=we,gt}function J(we,at){const gt=we.uid!==void 0?"uid":"name";return at.filter(Dt=>Dt[gt]===we[gt])[0]}function be(we,at){const gt=we.uid!==void 0?"uid":"name",Dt=at.filter(bt=>bt[gt]!==we[gt]);return Dt.length===at.length?null:Dt}const Pe=function(){const at=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Dt=at[at.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Dt)||[""])[0]},j=we=>we.indexOf("image/")===0,Ye=we=>{if(we.type&&!we.thumbUrl)return j(we.type);const at=we.thumbUrl||we.url||"",gt=Pe(at);return/^data:image\//.test(at)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(gt)?!0:!(/^data:/.test(at)||gt)},X=200;function tt(we){return new Promise(at=>{if(!we.type||!j(we.type)){at("");return}const gt=document.createElement("canvas");gt.width=X,gt.height=X,gt.style.cssText=`position: fixed; left: 0; top: 0; width: ${X}px; height: ${X}px; z-index: 9999; display: none;`,document.body.appendChild(gt);const Dt=gt.getContext("2d"),bt=new Image;if(bt.onload=()=>{const{width:Ft,height:zt}=bt;let _t=X,We=X,nt=0,Ct=0;Ft>zt?(We=zt*(X/Ft),Ct=-(We-_t)/2):(_t=Ft*(X/zt),nt=-(_t-We)/2),Dt.drawImage(bt,nt,Ct,_t,We);const ot=gt.toDataURL();document.body.removeChild(gt),window.URL.revokeObjectURL(bt.src),at(ot)},bt.crossOrigin="anonymous",we.type.startsWith("image/svg+xml")){const Ft=new FileReader;Ft.onload=()=>{Ft.result&&typeof Ft.result=="string"&&(bt.src=Ft.result)},Ft.readAsDataURL(we)}else if(we.type.startsWith("image/gif")){const Ft=new FileReader;Ft.onload=()=>{Ft.result&&at(Ft.result)},Ft.readAsDataURL(we)}else bt.src=window.URL.createObjectURL(we)})}var Ot=b(26227),Xt=b(41464),pn=b(15277),qt=b(89787),nn=b(25399),Un=m.forwardRef((we,at)=>{let{prefixCls:gt,className:Dt,style:bt,locale:Ft,listType:zt,file:_t,items:We,progress:nt,iconRender:Ct,actionIconRender:ot,itemRender:dt,isImgUrl:kt,showPreviewIcon:Gt,showRemoveIcon:Ht,showDownloadIcon:hn,previewIcon:cn,removeIcon:En,downloadIcon:vn,extra:on,onPreview:tn,onDownload:Tn,onClose:Sn}=we;var bn,Pn;const{status:Hn}=_t,[Bn,jn]=m.useState(Hn);m.useEffect(()=>{Hn!=="removed"&&jn(Hn)},[Hn]);const[Wn,nr]=m.useState(!1);m.useEffect(()=>{const Gn=setTimeout(()=>{nr(!0)},300);return()=>{clearTimeout(Gn)}},[]);const Nn=Ct(_t);let fr=m.createElement("div",{className:`${gt}-icon`},Nn);if(zt==="picture"||zt==="picture-card"||zt==="picture-circle")if(Bn==="uploading"||!_t.thumbUrl&&!_t.url){const Gn=G()(`${gt}-list-item-thumbnail`,{[`${gt}-list-item-file`]:Bn!=="uploading"});fr=m.createElement("div",{className:Gn},Nn)}else{const Gn=kt!=null&&kt(_t)?m.createElement("img",{src:_t.thumbUrl||_t.url,alt:_t.name,className:`${gt}-list-item-image`,crossOrigin:_t.crossOrigin}):Nn,qn=G()(`${gt}-list-item-thumbnail`,{[`${gt}-list-item-file`]:kt&&!kt(_t)});fr=m.createElement("a",{className:qn,onClick:wr=>tn(_t,wr),href:_t.url||_t.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Gn)}const pt=G()(`${gt}-list-item`,`${gt}-list-item-${Bn}`),kn=typeof _t.linkProps=="string"?JSON.parse(_t.linkProps):_t.linkProps,sr=(typeof Ht=="function"?Ht(_t):Ht)?ot((typeof En=="function"?En(_t):En)||m.createElement(Ot.Z,null),()=>Sn(_t),gt,Ft.removeFile,!0):null,xr=(typeof hn=="function"?hn(_t):hn)&&Bn==="done"?ot((typeof vn=="function"?vn(_t):vn)||m.createElement(Xt.Z,null),()=>Tn(_t),gt,Ft.downloadFile):null,_r=zt!=="picture-card"&&zt!=="picture-circle"&&m.createElement("span",{key:"download-delete",className:G()(`${gt}-list-item-actions`,{picture:zt==="picture"})},xr,sr),br=typeof on=="function"?on(_t):on,Rn=br&&m.createElement("span",{className:`${gt}-list-item-extra`},br),gn=G()(`${gt}-list-item-name`),Mn=_t.url?m.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:gn,title:_t.name},kn,{href:_t.url,onClick:Gn=>tn(_t,Gn)}),_t.name,Rn):m.createElement("span",{key:"view",className:gn,onClick:Gn=>tn(_t,Gn),title:_t.name},_t.name,Rn),ar=(typeof Gt=="function"?Gt(_t):Gt)&&(_t.url||_t.thumbUrl)?m.createElement("a",{href:_t.url||_t.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Gn=>tn(_t,Gn),title:Ft.previewFile},typeof cn=="function"?cn(_t):cn||m.createElement(pn.Z,null)):null,Kn=(zt==="picture-card"||zt==="picture-circle")&&Bn!=="uploading"&&m.createElement("span",{className:`${gt}-list-item-actions`},ar,Bn==="done"&&xr,sr),{getPrefixCls:er}=m.useContext(E.E_),Pr=er(),Dr=m.createElement("div",{className:pt},fr,Mn,_r,Kn,Wn&&m.createElement(Oe.default,{motionName:`${Pr}-fade`,visible:Bn==="uploading",motionDeadline:2e3},Gn=>{let{className:qn}=Gn;const wr="percent"in _t?m.createElement(qt.Z,Object.assign({},nt,{type:"line",percent:_t.percent,"aria-label":_t["aria-label"],"aria-labelledby":_t["aria-labelledby"]})):null;return m.createElement("div",{className:G()(`${gt}-list-item-progress`,qn)},wr)})),Er=_t.response&&typeof _t.response=="string"?_t.response:((bn=_t.error)===null||bn===void 0?void 0:bn.statusText)||((Pn=_t.error)===null||Pn===void 0?void 0:Pn.message)||Ft.uploadError,_n=Bn==="error"?m.createElement(nn.Z,{title:Er,getPopupContainer:Gn=>Gn.parentNode},Dr):Dr;return m.createElement("div",{className:G()(`${gt}-list-item-container`,Dt),style:bt,ref:at},dt?dt(_n,_t,We,{download:Tn.bind(null,_t),preview:tn.bind(null,_t),remove:Sn.bind(null,_t)}):_n)});const un=(we,at)=>{const{listType:gt="text",previewFile:Dt=tt,onPreview:bt,onDownload:Ft,onRemove:zt,locale:_t,iconRender:We,isImageUrl:nt=Ye,prefixCls:Ct,items:ot=[],showPreviewIcon:dt=!0,showRemoveIcon:kt=!0,showDownloadIcon:Gt=!1,removeIcon:Ht,previewIcon:hn,downloadIcon:cn,extra:En,progress:vn={size:[-1,2],showInfo:!1},appendAction:on,appendActionVisible:tn=!0,itemRender:Tn,disabled:Sn}=we,bn=(0,ae.Z)(),[Pn,Hn]=m.useState(!1),Bn=["picture-card","picture-circle"].includes(gt);m.useEffect(()=>{gt.startsWith("picture")&&(ot||[]).forEach(Rn=>{!(Rn.originFileObj instanceof File||Rn.originFileObj instanceof Blob)||Rn.thumbUrl!==void 0||(Rn.thumbUrl="",Dt==null||Dt(Rn.originFileObj).then(gn=>{Rn.thumbUrl=gn||"",bn()}))})},[gt,ot,Dt]),m.useEffect(()=>{Hn(!0)},[]);const jn=(Rn,gn)=>{if(bt)return gn==null||gn.preventDefault(),bt(Rn)},Wn=Rn=>{typeof Ft=="function"?Ft(Rn):Rn.url&&window.open(Rn.url)},nr=Rn=>{zt==null||zt(Rn)},Nn=Rn=>{if(We)return We(Rn,gt);const gn=Rn.status==="uploading";if(gt.startsWith("picture")){const Mn=gt==="picture"?m.createElement(Mt.Z,null):_t.uploading,ar=nt!=null&&nt(Rn)?m.createElement(A,null):m.createElement(Et,null);return gn?Mn:ar}return gn?m.createElement(Mt.Z,null):m.createElement(It,null)},fr=(Rn,gn,Mn,ar,Kn)=>{const er={type:"text",size:"small",title:ar,onClick:Pr=>{var Dr,Er;gn(),m.isValidElement(Rn)&&((Er=(Dr=Rn.props).onClick)===null||Er===void 0||Er.call(Dr,Pr))},className:`${Mn}-list-item-action`};return Kn&&(er.disabled=Sn),m.isValidElement(Rn)?m.createElement($e.ZP,Object.assign({},er,{icon:(0,Ee.Tm)(Rn,Object.assign(Object.assign({},Rn.props),{onClick:()=>{}}))})):m.createElement($e.ZP,Object.assign({},er),m.createElement("span",null,Rn))};m.useImperativeHandle(at,()=>({handlePreview:jn,handleDownload:Wn}));const{getPrefixCls:pt}=m.useContext(E.E_),kn=pt("upload",Ct),sr=pt(),xr=G()(`${kn}-list`,`${kn}-list-${gt}`),_r=m.useMemo(()=>(0,N.Z)((0,St.Z)(sr),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[sr]),br=Object.assign(Object.assign({},Bn?{}:_r),{motionDeadline:2e3,motionName:`${kn}-${Bn?"animate-inline":"animate"}`,keys:(0,de.Z)(ot.map(Rn=>({key:Rn.uid,file:Rn}))),motionAppear:Pn});return m.createElement("div",{className:xr},m.createElement(Oe.CSSMotionList,Object.assign({},br,{component:!1}),Rn=>{let{key:gn,file:Mn,className:ar,style:Kn}=Rn;return m.createElement(Un,{key:gn,locale:_t,prefixCls:kn,className:ar,style:Kn,file:Mn,items:ot,progress:vn,listType:gt,isImgUrl:nt,showPreviewIcon:dt,showRemoveIcon:kt,showDownloadIcon:Gt,removeIcon:Ht,previewIcon:hn,downloadIcon:cn,extra:En,iconRender:Nn,actionIconRender:fr,itemRender:Tn,onPreview:jn,onDownload:Wn,onClose:nr})}),on&&m.createElement(Oe.default,Object.assign({},br,{visible:tn,forceRender:!0}),Rn=>{let{className:gn,style:Mn}=Rn;return(0,Ee.Tm)(on,ar=>({className:G()(ar.className,gn),style:Object.assign(Object.assign(Object.assign({},Mn),{pointerEvents:gn?"none":void 0}),ar.style)}))}))};var en=m.forwardRef(un),Ut=function(we,at,gt,Dt){function bt(Ft){return Ft instanceof gt?Ft:new gt(function(zt){zt(Ft)})}return new(gt||(gt=Promise))(function(Ft,zt){function _t(Ct){try{nt(Dt.next(Ct))}catch(ot){zt(ot)}}function We(Ct){try{nt(Dt.throw(Ct))}catch(ot){zt(ot)}}function nt(Ct){Ct.done?Ft(Ct.value):bt(Ct.value).then(_t,We)}nt((Dt=Dt.apply(we,at||[])).next())})};const Pt=`__LIST_IGNORE_${Date.now()}__`,an=(we,at)=>{const{fileList:gt,defaultFileList:Dt,onRemove:bt,showUploadList:Ft=!0,listType:zt="text",onPreview:_t,onDownload:We,onChange:nt,onDrop:Ct,previewFile:ot,disabled:dt,locale:kt,iconRender:Gt,isImageUrl:Ht,progress:hn,prefixCls:cn,className:En,type:vn="select",children:on,style:tn,itemRender:Tn,maxCount:Sn,data:bn={},multiple:Pn=!1,hasControlInside:Hn=!0,action:Bn="",accept:jn="",supportServerRender:Wn=!0,rootClassName:nr}=we,Nn=m.useContext(V.Z),fr=dt!=null?dt:Nn,[pt,kn]=(0,x.Z)(Dt||[],{value:gt,postState:Xn=>Xn!=null?Xn:[]}),[sr,xr]=m.useState("drop"),_r=m.useRef(null),br=m.useRef(null);m.useMemo(()=>{const Xn=Date.now();(gt||[]).forEach((vr,Cr)=>{!vr.uid&&!Object.isFrozen(vr)&&(vr.uid=`__AUTO__${Xn}_${Cr}__`)})},[gt]);const Rn=(Xn,vr,Cr)=>{let ur=(0,de.Z)(vr),pr=!1;Sn===1?ur=ur.slice(-1):Sn&&(pr=ur.length>Sn,ur=ur.slice(0,Sn)),(0,oe.flushSync)(()=>{kn(ur)});const Fn={file:Xn,fileList:ur};Cr&&(Fn.event=Cr),(!pr||Xn.status==="removed"||ur.some(Fr=>Fr.uid===Xn.uid))&&(0,oe.flushSync)(()=>{nt==null||nt(Fn)})},gn=(Xn,vr)=>Ut(void 0,void 0,void 0,function*(){const{beforeUpload:Cr,transformFile:ur}=we;let pr=Xn;if(Cr){const Fn=yield Cr(Xn,vr);if(Fn===!1)return!1;if(delete Xn[Pt],Fn===Pt)return Object.defineProperty(Xn,Pt,{value:!0,configurable:!0}),!1;typeof Fn=="object"&&Fn&&(pr=Fn)}return ur&&(pr=yield ur(pr)),pr}),Mn=Xn=>{const vr=Xn.filter(pr=>!pr.file[Pt]);if(!vr.length)return;const Cr=vr.map(pr=>Ge(pr.file));let ur=(0,de.Z)(pt);Cr.forEach(pr=>{ur=Z(pr,ur)}),Cr.forEach((pr,Fn)=>{let Fr=pr;if(vr[Fn].parsedFile)pr.status="uploading";else{const{originFileObj:Jr}=pr;let ni;try{ni=new File([Jr],Jr.name,{type:Jr.type})}catch(Xr){ni=new Blob([Jr],{type:Jr.type}),ni.name=Jr.name,ni.lastModifiedDate=new Date,ni.lastModified=new Date().getTime()}ni.uid=pr.uid,Fr=ni}Rn(Fr,ur)})},ar=(Xn,vr,Cr)=>{try{typeof Xn=="string"&&(Xn=JSON.parse(Xn))}catch(Fn){}if(!J(vr,pt))return;const ur=Ge(vr);ur.status="done",ur.percent=100,ur.response=Xn,ur.xhr=Cr;const pr=Z(ur,pt);Rn(ur,pr)},Kn=(Xn,vr)=>{if(!J(vr,pt))return;const Cr=Ge(vr);Cr.status="uploading",Cr.percent=Xn.percent;const ur=Z(Cr,pt);Rn(Cr,ur,Xn)},er=(Xn,vr,Cr)=>{if(!J(Cr,pt))return;const ur=Ge(Cr);ur.error=Xn,ur.response=vr,ur.status="error";const pr=Z(ur,pt);Rn(ur,pr)},Pr=Xn=>{let vr;Promise.resolve(typeof bt=="function"?bt(Xn):bt).then(Cr=>{var ur;if(Cr===!1)return;const pr=be(Xn,pt);pr&&(vr=Object.assign(Object.assign({},Xn),{status:"removed"}),pt==null||pt.forEach(Fn=>{const Fr=vr.uid!==void 0?"uid":"name";Fn[Fr]===vr[Fr]&&!Object.isFrozen(Fn)&&(Fn.status="removed")}),(ur=_r.current)===null||ur===void 0||ur.abort(vr),Rn(vr,pr))})},Dr=Xn=>{xr(Xn.type),Xn.type==="drop"&&(Ct==null||Ct(Xn))};m.useImperativeHandle(at,()=>({onBatchStart:Mn,onSuccess:ar,onProgress:Kn,onError:er,fileList:pt,upload:_r.current,nativeElement:br.current}));const{getPrefixCls:Er,direction:_n,upload:Gn}=m.useContext(E.E_),qn=Er("upload",cn),wr=Object.assign(Object.assign({onBatchStart:Mn,onError:er,onProgress:Kn,onSuccess:ar},we),{data:bn,multiple:Pn,action:Bn,accept:jn,supportServerRender:Wn,prefixCls:qn,disabled:fr,beforeUpload:gn,onChange:void 0,hasControlInside:Hn});delete wr.className,delete wr.style,(!on||fr)&&delete wr.id;const qr=`${qn}-wrapper`,[Yr,kr,Zr]=xe(qn,qr),[Sr]=(0,me.Z)("Upload",ze.Z.Upload),{showRemoveIcon:ei,showPreviewIcon:$r,showDownloadIcon:jr,removeIcon:ai,previewIcon:oi,downloadIcon:cr,extra:ci}=typeof Ft=="boolean"?{}:Ft,di=typeof ei=="undefined"?!fr:ei,ti=(Xn,vr)=>Ft?m.createElement(en,{prefixCls:qn,listType:zt,items:pt,previewFile:ot,onPreview:_t,onDownload:We,onRemove:Pr,showRemoveIcon:di,showPreviewIcon:$r,showDownloadIcon:jr,removeIcon:ai,previewIcon:oi,downloadIcon:cr,iconRender:Gt,extra:ci,locale:Object.assign(Object.assign({},Sr),kt),isImageUrl:Ht,progress:hn,appendAction:Xn,appendActionVisible:vr,itemRender:Tn,disabled:fr}):Xn,Hr=G()(qr,En,nr,kr,Zr,Gn==null?void 0:Gn.className,{[`${qn}-rtl`]:_n==="rtl",[`${qn}-picture-card-wrapper`]:zt==="picture-card",[`${qn}-picture-circle-wrapper`]:zt==="picture-circle"}),rr=Object.assign(Object.assign({},Gn==null?void 0:Gn.style),tn);if(vn==="drag"){const Xn=G()(kr,qn,`${qn}-drag`,{[`${qn}-drag-uploading`]:pt.some(vr=>vr.status==="uploading"),[`${qn}-drag-hover`]:sr==="dragover",[`${qn}-disabled`]:fr,[`${qn}-rtl`]:_n==="rtl"});return Yr(m.createElement("span",{className:Hr,ref:br},m.createElement("div",{className:Xn,style:rr,onDrop:Dr,onDragOver:Dr,onDragLeave:Dr},m.createElement(se,Object.assign({},wr,{ref:_r,className:`${qn}-btn`}),m.createElement("div",{className:`${qn}-drag-container`},on))),ti()))}const Ei=G()(qn,`${qn}-select`,{[`${qn}-disabled`]:fr,[`${qn}-hidden`]:!on}),mn=m.createElement("div",{className:Ei},m.createElement(se,Object.assign({},wr,{ref:_r})));return Yr(zt==="picture-card"||zt==="picture-circle"?m.createElement("span",{className:Hr,ref:br},ti(mn,!!on)):m.createElement("span",{className:Hr,ref:br},mn,ti()))};var An=m.forwardRef(an),ir=function(we,at){var gt={};for(var Dt in we)Object.prototype.hasOwnProperty.call(we,Dt)&&at.indexOf(Dt)<0&&(gt[Dt]=we[Dt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Dt=Object.getOwnPropertySymbols(we);bt<Dt.length;bt++)at.indexOf(Dt[bt])<0&&Object.prototype.propertyIsEnumerable.call(we,Dt[bt])&&(gt[Dt[bt]]=we[Dt[bt]]);return gt},mt=m.forwardRef((we,at)=>{var{style:gt,height:Dt,hasControlInside:bt=!1}=we,Ft=ir(we,["style","height","hasControlInside"]);return m.createElement(An,Object.assign({ref:at,hasControlInside:bt},Ft,{type:"drag",style:Object.assign(Object.assign({},gt),{height:Dt})}))});const wt=An;wt.Dragger=mt,wt.LIST_IGNORE=Pt;var ht=wt},64018:function(){var ln,ct,b,m=!1,de,oe;window.PR_SHOULD_USE_CONTINUATION=!0;var ve,G;(function(){var g=window,fe=["break,continue,do,else,for,if,return,while"],ee=[fe,"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=[ee,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[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"],k=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],S=[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"],w="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"],R="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",q=[fe,"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"],Q=[fe,"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"],K=[fe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],D=[H,S,k,C,R,q,Q,K],$=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,M="str",F="kwd",ue="com",he="typ",le="lit",Se="pun",ke="pln",De="tag",Me="dec",Y="src",B="atn",W="atv",re="nocode",ie="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function se(Ce){for(var ce=0,Je=!1,Le=!1,Ie=0,P=Ce.length;Ie<P;++Ie){var pe=Ce[Ie];if(pe.ignoreCase)Le=!0;else if(/[a-z]/i.test(pe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Je=!0,Le=!1;break}}var xe={b:8,t:9,n:10,v:11,f:12,r:13};function He(Et){var Mt=Et.charCodeAt(0);if(Mt!==92)return Mt;var Yt=Et.charAt(1);return Mt=xe[Yt],Mt||("0"<=Yt&&Yt<="7"?parseInt(Et.substring(1),8):Yt==="u"||Yt==="x"?parseInt(Et.substring(2),16):Et.charCodeAt(1))}function et(Et){if(Et<32)return(Et<16?"\\x0":"\\x")+Et.toString(16);var Mt=String.fromCharCode(Et);return Mt==="\\"||Mt==="-"||Mt==="]"||Mt==="^"?"\\"+Mt:Mt}function ut(Et){var Mt=Et.substring(1,Et.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")),Yt=[],jt=Mt[0]==="^",$t=["["];jt&&$t.push("^");for(var it=jt?1:0,It=Mt.length;it<It;++it){var Rt=Mt[it];if(/\\[bdsw]/i.test(Rt))$t.push(Rt);else{var ye=He(Rt),Ve;it+2<It&&Mt[it+1]==="-"?(Ve=He(Mt[it+2]),it+=2):Ve=ye,Yt.push([ye,Ve]),Ve<65||ye>122||(Ve<65||ye>90||Yt.push([Math.max(65,ye)|32,Math.min(Ve,90)|32]),Ve<97||ye>122||Yt.push([Math.max(97,ye)&-33,Math.min(Ve,122)&-33]))}}Yt.sort(function(N,ae){return N[0]-ae[0]||ae[1]-N[1]});for(var _=[],A=[],it=0;it<Yt.length;++it){var Oe=Yt[it];Oe[0]<=A[1]+1?A[1]=Math.max(A[1],Oe[1]):_.push(A=Oe)}for(var it=0;it<_.length;++it){var Oe=_[it];$t.push(et(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&$t.push("-"),$t.push(et(Oe[1])))}return $t.push("]"),$t.join("")}function xt(Et){for(var Mt=Et.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")),Yt=Mt.length,jt=[],$t=0,it=0;$t<Yt;++$t){var It=Mt[$t];if(It==="(")++it;else if(It.charAt(0)==="\\"){var Rt=+It.substring(1);Rt&&(Rt<=it?jt[Rt]=-1:Mt[$t]=et(Rt))}}for(var $t=1;$t<jt.length;++$t)jt[$t]===-1&&(jt[$t]=++ce);for(var $t=0,it=0;$t<Yt;++$t){var It=Mt[$t];if(It==="(")++it,jt[it]||(Mt[$t]="(?:");else if(It.charAt(0)==="\\"){var Rt=+It.substring(1);Rt&&Rt<=it&&(Mt[$t]="\\"+jt[Rt])}}for(var $t=0;$t<Yt;++$t)Mt[$t]==="^"&&Mt[$t+1]!=="^"&&(Mt[$t]="");if(Et.ignoreCase&&Je)for(var $t=0;$t<Yt;++$t){var It=Mt[$t],ye=It.charAt(0);It.length>=2&&ye==="["?Mt[$t]=ut(It):ye!=="\\"&&(Mt[$t]=It.replace(/[a-zA-Z]/g,function(A){var Oe=A.charCodeAt(0);return"["+String.fromCharCode(Oe&-33,Oe|32)+"]"}))}return Mt.join("")}for(var Lt=[],Ie=0,P=Ce.length;Ie<P;++Ie){var pe=Ce[Ie];if(pe.global||pe.multiline)throw new Error(""+pe);Lt.push("(?:"+xt(pe)+")")}return new RegExp(Lt.join("|"),Le?"gi":"g")}function x(Ce,ce){var Je=/(?:^|\s)nocode(?:\s|$)/,Le=[],Ie=0,P=[],pe=0;function xe(He){var et=He.nodeType;if(et==1){if(Je.test(He.className))return;for(var ut=He.firstChild;ut;ut=ut.nextSibling)xe(ut);var xt=He.nodeName.toLowerCase();(xt==="br"||xt==="li")&&(Le[pe]=`
`,P[pe<<1]=Ie++,P[pe++<<1|1]=He)}else if(et==3||et==4){var Lt=He.nodeValue;Lt.length&&(ce?Lt=Lt.replace(/\r\n?/g,`
`):Lt=Lt.replace(/[ \t\r\n]+/g," "),Le[pe]=Lt,P[pe<<1]=Ie,Ie+=Lt.length,P[pe++<<1|1]=He)}}return xe(Ce),{sourceCode:Le.join("").replace(/\n$/,""),spans:P}}function E(Ce,ce,Je,Le,Ie){if(Je){var P={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:Je,spans:null,basePos:ce,decorations:null};Le(P),Ie.push.apply(Ie,P.decorations)}}var V=/\S/;function me(Ce){for(var ce=void 0,Je=Ce.firstChild;Je;Je=Je.nextSibling){var Le=Je.nodeType;ce=Le===1?ce?Ce:Je:Le===3&&V.test(Je.nodeValue)?Ce:ce}return ce===Ce?void 0:ce}function ze(Ce,ce){var Je={},Le;(function(){for(var pe=Ce.concat(ce),xe=[],He={},et=0,ut=pe.length;et<ut;++et){var xt=pe[et],Lt=xt[3];if(Lt)for(var Et=Lt.length;--Et>=0;)Je[Lt.charAt(Et)]=xt;var Mt=xt[1],Yt=""+Mt;He.hasOwnProperty(Yt)||(xe.push(Mt),He[Yt]=null)}xe.push(/[\0-\uffff]/),Le=se(xe)})();var Ie=ce.length,P=function(pe){for(var xe=pe.sourceCode,He=pe.basePos,et=pe.sourceNode,ut=[He,ke],xt=0,Lt=xe.match(Le)||[],Et={},Mt=0,Yt=Lt.length;Mt<Yt;++Mt){var jt=Lt[Mt],$t=Et[jt],it=void 0,It;if(typeof $t=="string")It=!1;else{var Rt=Je[jt.charAt(0)];if(Rt)it=jt.match(Rt[1]),$t=Rt[0];else{for(var ye=0;ye<Ie;++ye)if(Rt=ce[ye],it=jt.match(Rt[1]),it){$t=Rt[0];break}it||($t=ke)}It=$t.length>=5&&$t.substring(0,5)==="lang-",It&&!(it&&typeof it[1]=="string")&&(It=!1,$t=Y),It||(Et[jt]=$t)}var Ve=xt;if(xt+=jt.length,!It)ut.push(He+Ve,$t);else{var _=it[1],A=jt.indexOf(_),Oe=A+_.length;it[2]&&(Oe=jt.length-it[2].length,A=Oe-_.length);var N=$t.substring(5);E(et,He+Ve,jt.substring(0,A),P,ut),E(et,He+Ve+A,_,Vt(N,_),ut),E(et,He+Ve+Oe,jt.substring(Oe),P,ut)}}pe.decorations=ut};return P}function Xe(Ce){var ce=[],Je=[];Ce.tripleQuotedStrings?ce.push([M,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?ce.push([M,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ce.push([M,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Je.push([M,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Le=Ce.hashComments;Le&&(Ce.cStyleComments?(Le>1?ce.push([ue,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ce.push([ue,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Je.push([M,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ce.push([ue,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Je.push([ue,/^\/\/[^\r\n]*/,null]),Je.push([ue,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ie=Ce.regexLiterals;if(Ie){var P=Ie>1?"":`
\r`,pe=P?".":"[\\S\\s]",xe="/(?=[^/*"+P+"])(?:[^/\\x5B\\x5C"+P+"]|\\x5C"+pe+"|\\x5B(?:[^\\x5C\\x5D"+P+"]|\\x5C"+pe+")*(?:\\x5D|$))+/";Je.push(["lang-regex",RegExp("^"+ie+"("+xe+")")])}var He=Ce.types;He&&Je.push([he,He]);var et=(""+Ce.keywords).replace(/^ | $/g,"");et.length&&Je.push([F,new RegExp("^(?:"+et.replace(/[\s,]+/g,"|")+")\\b"),null]),ce.push([ke,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(ut+="(?!s*/)"),Je.push([le,/^@[a-z_$][a-z_$@0-9]*/i,null],[he,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[ke,/^[a-z_$][a-z_$@0-9]*/i,null],[le,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[ke,/^\\[\s\S]?/,null],[Se,new RegExp(ut),null]),ze(ce,Je)}var _e=Xe({keywords:D,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ke(Ce,ce,Je){for(var Le=/(?:^|\s)nocode(?:\s|$)/,Ie=/\r\n?|\n/,P=Ce.ownerDocument,pe=P.createElement("li");Ce.firstChild;)pe.appendChild(Ce.firstChild);var xe=[pe];function He(Mt){var Yt=Mt.nodeType;if(Yt==1&&!Le.test(Mt.className))if(Mt.nodeName==="br")et(Mt),Mt.parentNode&&Mt.parentNode.removeChild(Mt);else for(var jt=Mt.firstChild;jt;jt=jt.nextSibling)He(jt);else if((Yt==3||Yt==4)&&Je){var $t=Mt.nodeValue,it=$t.match(Ie);if(it){var It=$t.substring(0,it.index);Mt.nodeValue=It;var Rt=$t.substring(it.index+it[0].length);if(Rt){var ye=Mt.parentNode;ye.insertBefore(P.createTextNode(Rt),Mt.nextSibling)}et(Mt),It||Mt.parentNode.removeChild(Mt)}}}function et(Mt){for(;!Mt.nextSibling;)if(Mt=Mt.parentNode,!Mt)return;function Yt(it,It){var Rt=It?it.cloneNode(!1):it,ye=it.parentNode;if(ye){var Ve=Yt(ye,1),_=it.nextSibling;Ve.appendChild(Rt);for(var A=_;A;A=_)_=A.nextSibling,Ve.appendChild(A)}return Rt}for(var jt=Yt(Mt.nextSibling,0),$t;($t=jt.parentNode)&&$t.nodeType===1;)jt=$t;xe.push(jt)}for(var ut=0;ut<xe.length;++ut)He(xe[ut]);ce===(ce|0)&&xe[0].setAttribute("value",ce);var xt=P.createElement("ol");xt.className="linenums";for(var Lt=Math.max(0,ce-1|0)||0,ut=0,Et=xe.length;ut<Et;++ut)pe=xe[ut],pe.className="L"+(ut+Lt)%10,pe.firstChild||pe.appendChild(P.createTextNode("\xA0")),xt.appendChild(pe);Ce.appendChild(xt)}function Qe(Ce){var ce=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ce=ce&&+ce[1]<=8;var Je=/\n/g,Le=Ce.sourceCode,Ie=Le.length,P=0,pe=Ce.spans,xe=pe.length,He=0,et=Ce.decorations,ut=et.length,xt=0;et[ut]=Ie;var Lt,Et;for(Et=Lt=0;Et<ut;)et[Et]!==et[Et+2]?(et[Lt++]=et[Et++],et[Lt++]=et[Et++]):Et+=2;for(ut=Lt,Et=Lt=0;Et<ut;){for(var Mt=et[Et],Yt=et[Et+1],jt=Et+2;jt+2<=ut&&et[jt+1]===Yt;)jt+=2;et[Lt++]=Mt,et[Lt++]=Yt,Et=jt}ut=et.length=Lt;var $t=Ce.sourceNode,it="";$t&&(it=$t.style.display,$t.style.display="none");try{for(var It=null;He<xe;){var Rt=pe[He],ye=pe[He+2]||Ie,Ve=et[xt+2]||Ie,jt=Math.min(ye,Ve),_=pe[He+1],A;if(_.nodeType!==1&&(A=Le.substring(P,jt))){ce&&(A=A.replace(Je,"\r")),_.nodeValue=A;var Oe=_.ownerDocument,N=Oe.createElement("span");N.className=et[xt+1];var ae=_.parentNode;ae.replaceChild(N,_),N.appendChild(_),P<ye&&(pe[He+1]=_=Oe.createTextNode(Le.substring(jt,ye)),ae.insertBefore(_,N.nextSibling))}P=jt,P>=ye&&(He+=2),P>=Ve&&(xt+=2)}}finally{$t&&($t.style.display=it)}}var st={};function rt(Ce,ce){for(var Je=ce.length;--Je>=0;){var Le=ce[Je];st.hasOwnProperty(Le)?g.console&&console.warn("cannot override language handler %s",Le):st[Le]=Ce}}function Vt(Ce,ce){return Ce&&st.hasOwnProperty(Ce)||(Ce=/^\s*</.test(ce)?"default-markup":"default-code"),st[Ce]}rt(_e,["default-code"]),rt(ze([],[[ke,/^[^<?]+/],[Me,/^<!\w[^>]*(?:>|$)/],[ue,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Se,/^(?:<[%?]|[%?]>)/],["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"]),rt(ze([[ke,/^[\s]+/,null,` \r
`],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[De,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Se,/^[=<>\/]+/],["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"]),rt(ze([],[[W,/^[\s\S]+/]]),["uq.val"]),rt(Xe({keywords:H,hashComments:!0,cStyleComments:!0,types:$}),["c","cc","cpp","cxx","cyc","m"]),rt(Xe({keywords:"null,true,false"}),["json"]),rt(Xe({keywords:S,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:$}),["cs"]),rt(Xe({keywords:k,cStyleComments:!0}),["java"]),rt(Xe({keywords:K,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),rt(Xe({keywords:q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),rt(Xe({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),rt(Xe({keywords:Q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),rt(Xe({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),rt(Xe({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),rt(ze([],[[M,/^[\s\S]+/]]),["regex"]);function qe(Ce){var ce=Ce.langExtension;try{var Je=x(Ce.sourceNode,Ce.pre),Le=Je.sourceCode;Ce.sourceCode=Le,Ce.spans=Je.spans,Ce.basePos=0,Vt(ce,Le)(Ce),Qe(Ce)}catch(Ie){g.console&&console.log(Ie&&Ie.stack||Ie)}}function Kt(Ce,ce,Je){var Le=Je||!1,Ie=ce||null,P=document.createElement("div");P.innerHTML="<pre>"+Ce+"</pre>",P=P.firstChild,Le&&Ke(P,Le,!0);var pe={langExtension:Ie,numberLines:Le,sourceNode:P,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return qe(pe),P.innerHTML}function je(Ce,ce){var Je=ce||document.body,Le=Je.ownerDocument||document;function Ie(Rt){return Je.getElementsByTagName(Rt)}for(var P=[Ie("pre"),Ie("code"),Ie("xmp")],pe=[],xe=0;xe<P.length;++xe)for(var He=0,et=P[xe].length;He<et;++He)pe.push(P[xe][He]);P=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var xt=0,Lt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Et=/\bprettyprint\b/,Mt=/\bprettyprinted\b/,Yt=/pre|xmp/i,jt=/^code$/i,$t=/^(?:pre|code|xmp)$/i,it={};function It(){for(var Rt=g.PR_SHOULD_USE_CONTINUATION?ut.now()+250:1/0;xt<pe.length&&ut.now()<Rt;xt++){for(var ye=pe[xt],Ve=it,_=ye;_=_.previousSibling;){var A=_.nodeType,Oe=(A===7||A===8)&&_.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):A!==3||/\S/.test(_.nodeValue))break;if(Oe){Ve={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(X,tt,Ot){Ve[tt]=Ot});break}}var N=ye.className;if((Ve!==it||Et.test(N))&&!Mt.test(N)){for(var ae=!1,St=ye.parentNode;St;St=St.parentNode){var Ee=St.tagName;if($t.test(Ee)&&St.className&&Et.test(St.className)){ae=!0;break}}if(!ae){ye.className+=" prettyprinted";var $e=Ve.lang;if(!$e){$e=N.match(Lt);var Ge;!$e&&(Ge=me(ye))&&jt.test(Ge.tagName)&&($e=Ge.className.match(Lt)),$e&&($e=$e[1])}var Z;if(Yt.test(ye.tagName))Z=1;else{var J=ye.currentStyle,be=Le.defaultView,Pe=J?J.whiteSpace:be&&be.getComputedStyle?be.getComputedStyle(ye,null).getPropertyValue("white-space"):0;Z=Pe&&Pe.substring(0,3)==="pre"}var j=Ve.linenums;(j=j==="true"||+j)||(j=N.match(/\blinenums\b(?::(\d+))?/),j=j?j[1]&&j[1].length?+j[1]:!0:!1),j&&Ke(ye,j,Z);var Ye={langExtension:$e,sourceNode:ye,numberLines:j,pre:Z,sourceCode:null,basePos:null,spans:null,decorations:null};qe(Ye)}}}xt<pe.length?g.setTimeout(It,250):typeof Ce=="function"&&Ce()}It()}var Tt=g.PR={createSimpleLexer:ze,registerLangHandler:rt,sourceDecorator:Xe,PR_ATTRIB_NAME:B,PR_ATTRIB_VALUE:W,PR_COMMENT:ue,PR_DECLARATION:Me,PR_KEYWORD:F,PR_LITERAL:le,PR_NOCODE:re,PR_PLAIN:ke,PR_PUNCTUATION:Se,PR_SOURCE:Y,PR_STRING:M,PR_TAG:De,PR_TYPE:he,prettyPrintOne:m?g.prettyPrintOne=Kt:ve=Kt,prettyPrint:G=m?g.prettyPrint=je:G=je},Re=g.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return Tt})})()},25769:function(ln,ct,b){"use strict";var m=b(98040),de={"text/plain":"Text","text/html":"Url",default:"Text"},oe="Copy to clipboard: #{key}, Enter";function ve(g){var fe=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,fe)}function G(g,fe){var ee,o,H,k,S,w,C=!1;fe||(fe={}),ee=fe.debug||!1;try{H=m(),k=document.createRange(),S=document.getSelection(),w=document.createElement("span"),w.textContent=g,w.ariaHidden="true",w.style.all="unset",w.style.position="fixed",w.style.top=0,w.style.clip="rect(0, 0, 0, 0)",w.style.whiteSpace="pre",w.style.webkitUserSelect="text",w.style.MozUserSelect="text",w.style.msUserSelect="text",w.style.userSelect="text",w.addEventListener("copy",function(q){if(q.stopPropagation(),fe.format)if(q.preventDefault(),typeof q.clipboardData=="undefined"){ee&&console.warn("unable to use e.clipboardData"),ee&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Q=de[fe.format]||de.default;window.clipboardData.setData(Q,g)}else q.clipboardData.clearData(),q.clipboardData.setData(fe.format,g);fe.onCopy&&(q.preventDefault(),fe.onCopy(q.clipboardData))}),document.body.appendChild(w),k.selectNodeContents(w),S.addRange(k);var R=document.execCommand("copy");if(!R)throw new Error("copy command was unsuccessful");C=!0}catch(q){ee&&console.error("unable to copy using execCommand: ",q),ee&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(fe.format||"text",g),fe.onCopy&&fe.onCopy(window.clipboardData),C=!0}catch(Q){ee&&console.error("unable to copy using clipboardData: ",Q),ee&&console.error("falling back to prompt"),o=ve("message"in fe?fe.message:oe),window.prompt(o,g)}}finally{S&&(typeof S.removeRange=="function"?S.removeRange(k):S.removeAllRanges()),w&&document.body.removeChild(w),H()}return C}ln.exports=G},53184:function(ln,ct,b){"use strict";var m,de;function oe(ve,G,g){var fe=function(ee,o){return ve.js_beautify(ee,o)};return fe.js=ve.js_beautify,fe.css=G.css_beautify,fe.html=g.html_beautify,fe.js_beautify=ve.js_beautify,fe.css_beautify=G.css_beautify,fe.html_beautify=g.html_beautify,fe}m=[b(58553),b(87804),b(40998)],de=function(ve,G,g){return oe(ve,G,g)}.apply(ct,m),de!==void 0&&(ln.exports=de)},87804:function(ln,ct){var b,m;(function(){var de;(function(){"use strict";var ve=[,,function(ee){function o(S){this.__parent=S,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 S=new o(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},o.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},o.prototype.has_match=function(S){for(var w=this.__items.length-1;w>=0;w--)if(this.__items[w].match(S))return!0;return!1},o.prototype.set_indent=function(S,w){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=w||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 S=this.__parent.current_line;return S.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),S.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),S.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,S.__items[0]===" "&&(S.__items.splice(0,1),S.__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(S){this.__items.push(S);var w=S.lastIndexOf(`
`);w!==-1?this.__character_count=S.length-w:this.__character_count+=S.length},o.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},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 S="";return this.is_empty()?this.__parent.indent_empty_lines&&(S=this.__parent.get_indent_string(this.__indent_count)):(S=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),S+=this.__items.join("")),S};function H(S,w){this.__cache=[""],this.__indent_size=S.indent_size,this.__indent_string=S.indent_char,S.indent_with_tabs||(this.__indent_string=new Array(S.indent_size+1).join(S.indent_char)),w=w||"",S.indent_level>0&&(w=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=w,this.__base_string_length=w.length}H.prototype.get_indent_size=function(S,w){var C=this.__base_string_length;return w=w||0,S<0&&(C=0),C+=S*this.__indent_size,C+=w,C},H.prototype.get_indent_string=function(S,w){var C=this.__base_string;return w=w||0,S<0&&(S=0,C=""),w+=S*this.__indent_size,this.__ensure_cache(w),C+=this.__cache[w],C},H.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var S=this.__cache.length,w=0,C="";this.__indent_size&&S>=this.__indent_size&&(w=Math.floor(S/this.__indent_size),S-=w*this.__indent_size,C=new Array(w+1).join(this.__indent_string)),S&&(C+=new Array(S+1).join(" ")),this.__cache.push(C)};function k(S,w){this.__indent_cache=new H(S,w),this.raw=!1,this._end_with_newline=S.end_with_newline,this.indent_size=S.indent_size,this.wrap_line_length=S.wrap_line_length,this.indent_empty_lines=S.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()}k.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},k.prototype.get_line_number=function(){return this.__lines.length},k.prototype.get_indent_string=function(S,w){return this.__indent_cache.get_indent_string(S,w)},k.prototype.get_indent_size=function(S,w){return this.__indent_cache.get_indent_size(S,w)},k.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},k.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},k.prototype.get_code=function(S){this.trim(!0);var w=this.current_line.pop();w&&(w[w.length-1]===`
`&&(w=w.replace(/\n+$/g,"")),this.current_line.push(w)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return S!==`
`&&(C=C.replace(/[\n]/g,S)),C},k.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},k.prototype.set_indent=function(S,w){return S=S||0,w=w||0,this.next_line.set_indent(S,w),this.__lines.length>1?(this.current_line.set_indent(S,w),!0):(this.current_line.set_indent(),!1)},k.prototype.add_raw_token=function(S){for(var w=0;w<S.newlines;w++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(S.whitespace_before),this.current_line.push(S.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},k.prototype.add_token=function(S){this.__add_space_before_token(),this.current_line.push(S),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},k.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(" "))},k.prototype.remove_indent=function(S){for(var w=this.__lines.length;S<w;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},k.prototype.trim=function(S){for(S=S===void 0?!1:S,this.current_line.trim();S&&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},k.prototype.just_added_newline=function(){return this.current_line.is_empty()},k.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},k.prototype.ensure_empty_line_above=function(S,w){for(var C=this.__lines.length-2;C>=0;){var R=this.__lines[C];if(R.is_empty())break;if(R.item(0).indexOf(S)!==0&&R.item(-1)!==w){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ee.exports.Output=k},,,,function(ee){function o(S,w){this.raw_options=H(S,w),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(S,w){var C=this.raw_options[S],R=w||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(R=C.concat()):typeof C=="string"&&(R=C.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(S,w){var C=this.raw_options[S],R=C===void 0?!!w:!!C;return R},o.prototype._get_characters=function(S,w){var C=this.raw_options[S],R=w||"";return typeof C=="string"&&(R=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),R},o.prototype._get_number=function(S,w){var C=this.raw_options[S];w=parseInt(w,10),isNaN(w)&&(w=0);var R=parseInt(C,10);return isNaN(R)&&(R=w),R},o.prototype._get_selection=function(S,w,C){var R=this._get_selection_list(S,w,C);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
`+w+`
You passed in: '`+this.raw_options[S]+"'");return R[0]},o.prototype._get_selection_list=function(S,w,C){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[w[0]],!this._is_valid_selection(C,w))throw new Error("Invalid Default Value!");var R=this._get_array(S,C);if(!this._is_valid_selection(R,w))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
`+w+`
You passed in: '`+this.raw_options[S]+"'");return R},o.prototype._is_valid_selection=function(S,w){return S.length&&w.length&&!S.some(function(C){return w.indexOf(C)===-1})};function H(S,w){var C={};S=k(S);var R;for(R in S)R!==w&&(C[R]=S[R]);if(w&&S[w])for(R in S[w])C[R]=S[w][R];return C}function k(S){var w={},C;for(C in S){var R=C.replace(/-/g,"_");w[R]=S[C]}return w}ee.exports.Options=o,ee.exports.normalizeOpts=k,ee.exports.mergeOpts=H},,function(ee){var o=RegExp.prototype.hasOwnProperty("sticky");function H(k){this.__input=k||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var k=null;return this.hasNext()&&(k=this.__input.charAt(this.__position),this.__position+=1),k},H.prototype.peek=function(k){var S=null;return k=k||0,k+=this.__position,k>=0&&k<this.__input_length&&(S=this.__input.charAt(k)),S},H.prototype.__match=function(k,S){k.lastIndex=S;var w=k.exec(this.__input);return w&&!(o&&k.sticky)&&w.index!==S&&(w=null),w},H.prototype.test=function(k,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(k,S):!1},H.prototype.testChar=function(k,S){var w=this.peek(S);return k.lastIndex=0,w!==null&&k.test(w)},H.prototype.match=function(k){var S=this.__match(k,this.__position);return S?this.__position+=S[0].length:S=null,S},H.prototype.read=function(k,S,w){var C="",R;return k&&(R=this.match(k),R&&(C+=R[0])),S&&(R||!k)&&(C+=this.readUntil(S,w)),C},H.prototype.readUntil=function(k,S){var w="",C=this.__position;k.lastIndex=this.__position;var R=k.exec(this.__input);return R?(C=R.index,S&&(C+=R[0].length)):C=this.__input_length,w=this.__input.substring(this.__position,C),this.__position=C,w},H.prototype.readUntilAfter=function(k){return this.readUntil(k,!0)},H.prototype.get_regexp=function(k,S){var w=null,C="g";return S&&o&&(C="y"),typeof k=="string"&&k!==""?w=new RegExp(k,C):k&&(w=new RegExp(k.source,C)),w},H.prototype.get_literal_regexp=function(k){return RegExp(k.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(k){var S=this.__position,w=this.readUntilAfter(k);return this.__position=S,w},H.prototype.lookBack=function(k){var S=this.__position-1;return S>=k.length&&this.__input.substring(S-k.length,S).toLowerCase()===k},ee.exports.InputScanner=H},,,,,function(ee){function o(H,k){H=typeof H=="string"?H:H.source,k=typeof k=="string"?k:k.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+k,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+k,"g")}o.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var k={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(H);S;)k[S[1]]=S[2],S=this.__directive_pattern.exec(H);return k},o.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},ee.exports.Directives=o},,function(ee,o,H){var k=H(16).Beautifier,S=H(17).Options;function w(C,R){var q=new k(C,R);return q.beautify()}ee.exports=w,ee.exports.defaultOptions=function(){return new S}},function(ee,o,H){var k=H(17).Options,S=H(2).Output,w=H(8).InputScanner,C=H(13).Directives,R=new C(/\/\*/,/\*\//),q=/\r\n|[\r\n]/,Q=/\r\n|[\r\n]/g,K=/\s/,D=/(?:\s|\n)+/g,$=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,M=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function F(ue,he){this._source_text=ue||"",this._options=new k(he),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(ue){var he="";for(this._ch=this._input.next();this._ch;){if(he+=this._ch,this._ch==="\\")he+=this._input.next();else if(ue.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return he},F.prototype.eatWhitespace=function(ue){for(var he=K.test(this._input.peek()),le=0;K.test(this._input.peek());)this._ch=this._input.next(),ue&&this._ch===`
`&&(le===0||le<this._options.max_preserve_newlines)&&(le++,this._output.add_new_line(!0));return he},F.prototype.foundNestedPseudoClass=function(){for(var ue=0,he=1,le=this._input.peek(he);le;){if(le==="{")return!0;if(le==="(")ue+=1;else if(le===")"){if(ue===0)return!1;ue-=1}else if(le===";"||le==="}")return!1;he++,le=this._input.peek(he)}return!1},F.prototype.print_string=function(ue){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(ue)},F.prototype.preserveSingleSpace=function(ue){ue&&(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 ue=this._source_text,he=this._options.eol;he==="auto"&&(he=`
`,ue&&q.test(ue||"")&&(he=ue.match(q)[0])),ue=ue.replace(Q,`
`);var le=ue.match(/^[\t ]*/)[0];this._output=new S(this._options,le),this._input=new w(ue),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Se=0,ke=!1,De=!1,Me=!1,Y=!1,B=!1,W=this._ch,re=!1,ie,se,x;ie=this._input.read(D),se=ie!=="",x=W,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),W=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var E=this._input.read($),V=R.get_directives(E);V&&V.ignore==="start"&&(E+=R.readIgnored(this._input)),this.print_string(E),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(M)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(se),this.print_string(this._ch);var me=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);me.match(/[ :]$/)&&(me=this.eatString(": ").replace(/\s+$/,""),this.print_string(me),this._output.space_before_token=!0),Se===0&&me.indexOf(":")!==-1&&(De=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(se),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ze=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ze.match(/[ :]$/)&&(ze=this.eatString(": ").replace(/\s+$/,""),this.print_string(ze),this._output.space_before_token=!0),Se===0&&ze.indexOf(":")!==-1?(De=!0,this.indent()):ze in this.NESTED_AT_RULE?(this._nestedLevel+=1,ze in this.CONDITIONAL_GROUP_RULE&&(Me=!0)):Se===0&&!De&&(Y=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(se),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")De&&(De=!1,this.outdent()),Y=!1,Me?(Me=!1,ke=this._indentLevel>=this._nestedLevel):ke=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ke&&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),De&&(this.outdent(),De=!1),this.print_string(this._ch),ke=!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])){re=!0;break}(ke||Me)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Y&&Se===0?(this.print_string(":"),De||(De=!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 _e=x==='"'||x==="'";this.preserveSingleSpace(_e||se),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")re=!1,Se===0?(De&&(this.outdent(),De=!1),Y=!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(),Se++,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(")")),Se&&(Se--,this.outdent()));else{var Ke=!1;this._input.lookBack("with")&&(Ke=!0),this.preserveSingleSpace(se||Ke),this.print_string(this._ch),De&&x==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),B=!0):(this.eatWhitespace(),Se++,this.indent())}else if(this._ch===")")Se&&(Se--,this.outdent()),B&&this._input.peek()===";"&&this._options.selector_separator_newline&&(B=!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&&(!De||B)&&Se===0&&!Y?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!De&&Se===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&&K.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(se),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),K.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 Qe=x==='"'||x==="'";this.preserveSingleSpace(Qe||se),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&re&&this._output.add_new_line()}var st=this._output.get_code(he);return st},ee.exports.Beautifier=F},function(ee,o,H){var k=H(6).Options;function S(w){k.call(this,w,"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 R=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var q=0;q<R.length;q++)R[q]!=="expand"?this.brace_style="collapse":this.brace_style=R[q]}S.prototype=new k,ee.exports.Options=S}],G={};function g(ee){var o=G[ee];if(o!==void 0)return o.exports;var H=G[ee]={exports:{}};return ve[ee](H,H.exports,g),H.exports}var fe=g(15);de=fe})();var oe=de;b=[],m=function(){return{css_beautify:oe}}.apply(ct,b),m!==void 0&&(ln.exports=m)})()},40998:function(ln,ct,b){var m,de;(function(){var oe;(function(){"use strict";var fe=[,,function(k){function S(R){this.__parent=R,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=[]}S.prototype.clone_empty=function(){var R=new S(this.__parent);return R.set_indent(this.__indent_count,this.__alignment_count),R},S.prototype.item=function(R){return R<0?this.__items[this.__items.length+R]:this.__items[R]},S.prototype.has_match=function(R){for(var q=this.__items.length-1;q>=0;q--)if(this.__items[q].match(R))return!0;return!1},S.prototype.set_indent=function(R,q){this.is_empty()&&(this.__indent_count=R||0,this.__alignment_count=q||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.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)},S.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},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var R=this.__parent.current_line;return R.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),R.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),R.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,R.__items[0]===" "&&(R.__items.splice(0,1),R.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(R){this.__items.push(R);var q=R.lastIndexOf(`
`);q!==-1?this.__character_count=R.length-q:this.__character_count+=R.length},S.prototype.pop=function(){var R=null;return this.is_empty()||(R=this.__items.pop(),this.__character_count-=R.length),R},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var R="";return this.is_empty()?this.__parent.indent_empty_lines&&(R=this.__parent.get_indent_string(this.__indent_count)):(R=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),R+=this.__items.join("")),R};function w(R,q){this.__cache=[""],this.__indent_size=R.indent_size,this.__indent_string=R.indent_char,R.indent_with_tabs||(this.__indent_string=new Array(R.indent_size+1).join(R.indent_char)),q=q||"",R.indent_level>0&&(q=new Array(R.indent_level+1).join(this.__indent_string)),this.__base_string=q,this.__base_string_length=q.length}w.prototype.get_indent_size=function(R,q){var Q=this.__base_string_length;return q=q||0,R<0&&(Q=0),Q+=R*this.__indent_size,Q+=q,Q},w.prototype.get_indent_string=function(R,q){var Q=this.__base_string;return q=q||0,R<0&&(R=0,Q=""),q+=R*this.__indent_size,this.__ensure_cache(q),Q+=this.__cache[q],Q},w.prototype.__ensure_cache=function(R){for(;R>=this.__cache.length;)this.__add_column()},w.prototype.__add_column=function(){var R=this.__cache.length,q=0,Q="";this.__indent_size&&R>=this.__indent_size&&(q=Math.floor(R/this.__indent_size),R-=q*this.__indent_size,Q=new Array(q+1).join(this.__indent_string)),R&&(Q+=new Array(R+1).join(" ")),this.__cache.push(Q)};function C(R,q){this.__indent_cache=new w(R,q),this.raw=!1,this._end_with_newline=R.end_with_newline,this.indent_size=R.indent_size,this.wrap_line_length=R.wrap_line_length,this.indent_empty_lines=R.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(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(R,q){return this.__indent_cache.get_indent_string(R,q)},C.prototype.get_indent_size=function(R,q){return this.__indent_cache.get_indent_size(R,q)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(R){return this.is_empty()||!R&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(R){this.trim(!0);var q=this.current_line.pop();q&&(q[q.length-1]===`
`&&(q=q.replace(/\n+$/g,"")),this.current_line.push(q)),this._end_with_newline&&this.__add_outputline();var Q=this.__lines.join(`
`);return R!==`
`&&(Q=Q.replace(/[\n]/g,R)),Q},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(R,q){return R=R||0,q=q||0,this.next_line.set_indent(R,q),this.__lines.length>1?(this.current_line.set_indent(R,q),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(R){for(var q=0;q<R.newlines;q++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(R.whitespace_before),this.current_line.push(R.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(R){this.__add_space_before_token(),this.current_line.push(R),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(R){for(var q=this.__lines.length;R<q;)this.__lines[R]._remove_indent(),R++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(R){for(R=R===void 0?!1:R,this.current_line.trim();R&&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(R,q){for(var Q=this.__lines.length-2;Q>=0;){var K=this.__lines[Q];if(K.is_empty())break;if(K.item(0).indexOf(R)!==0&&K.item(-1)!==q){this.__lines.splice(Q+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}Q--}},k.exports.Output=C},function(k){function S(w,C,R,q){this.type=w,this.text=C,this.comments_before=null,this.newlines=R||0,this.whitespace_before=q||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}k.exports.Token=S},,,function(k){function S(R,q){this.raw_options=w(R,q),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}S.prototype._get_array=function(R,q){var Q=this.raw_options[R],K=q||[];return typeof Q=="object"?Q!==null&&typeof Q.concat=="function"&&(K=Q.concat()):typeof Q=="string"&&(K=Q.split(/[^a-zA-Z0-9_\/\-]+/)),K},S.prototype._get_boolean=function(R,q){var Q=this.raw_options[R],K=Q===void 0?!!q:!!Q;return K},S.prototype._get_characters=function(R,q){var Q=this.raw_options[R],K=q||"";return typeof Q=="string"&&(K=Q.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),K},S.prototype._get_number=function(R,q){var Q=this.raw_options[R];q=parseInt(q,10),isNaN(q)&&(q=0);var K=parseInt(Q,10);return isNaN(K)&&(K=q),K},S.prototype._get_selection=function(R,q,Q){var K=this._get_selection_list(R,q,Q);if(K.length!==1)throw new Error("Invalid Option Value: The option '"+R+`' can only be one of the following values:
`+q+`
You passed in: '`+this.raw_options[R]+"'");return K[0]},S.prototype._get_selection_list=function(R,q,Q){if(!q||q.length===0)throw new Error("Selection list cannot be empty.");if(Q=Q||[q[0]],!this._is_valid_selection(Q,q))throw new Error("Invalid Default Value!");var K=this._get_array(R,Q);if(!this._is_valid_selection(K,q))throw new Error("Invalid Option Value: The option '"+R+`' can contain only the following values:
`+q+`
You passed in: '`+this.raw_options[R]+"'");return K},S.prototype._is_valid_selection=function(R,q){return R.length&&q.length&&!R.some(function(Q){return q.indexOf(Q)===-1})};function w(R,q){var Q={};R=C(R);var K;for(K in R)K!==q&&(Q[K]=R[K]);if(q&&R[q])for(K in R[q])Q[K]=R[q][K];return Q}function C(R){var q={},Q;for(Q in R){var K=Q.replace(/-/g,"_");q[K]=R[Q]}return q}k.exports.Options=S,k.exports.normalizeOpts=C,k.exports.mergeOpts=w},,function(k){var S=RegExp.prototype.hasOwnProperty("sticky");function w(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}w.prototype.restart=function(){this.__position=0},w.prototype.back=function(){this.__position>0&&(this.__position-=1)},w.prototype.hasNext=function(){return this.__position<this.__input_length},w.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},w.prototype.peek=function(C){var R=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(R=this.__input.charAt(C)),R},w.prototype.__match=function(C,R){C.lastIndex=R;var q=C.exec(this.__input);return q&&!(S&&C.sticky)&&q.index!==R&&(q=null),q},w.prototype.test=function(C,R){return R=R||0,R+=this.__position,R>=0&&R<this.__input_length?!!this.__match(C,R):!1},w.prototype.testChar=function(C,R){var q=this.peek(R);return C.lastIndex=0,q!==null&&C.test(q)},w.prototype.match=function(C){var R=this.__match(C,this.__position);return R?this.__position+=R[0].length:R=null,R},w.prototype.read=function(C,R,q){var Q="",K;return C&&(K=this.match(C),K&&(Q+=K[0])),R&&(K||!C)&&(Q+=this.readUntil(R,q)),Q},w.prototype.readUntil=function(C,R){var q="",Q=this.__position;C.lastIndex=this.__position;var K=C.exec(this.__input);return K?(Q=K.index,R&&(Q+=K[0].length)):Q=this.__input_length,q=this.__input.substring(this.__position,Q),this.__position=Q,q},w.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},w.prototype.get_regexp=function(C,R){var q=null,Q="g";return R&&S&&(Q="y"),typeof C=="string"&&C!==""?q=new RegExp(C,Q):C&&(q=new RegExp(C.source,Q)),q},w.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},w.prototype.peekUntilAfter=function(C){var R=this.__position,q=this.readUntilAfter(C);return this.__position=R,q},w.prototype.lookBack=function(C){var R=this.__position-1;return R>=C.length&&this.__input.substring(R-C.length,R).toLowerCase()===C},k.exports.InputScanner=w},function(k,S,w){var C=w(8).InputScanner,R=w(3).Token,q=w(10).TokenStream,Q=w(11).WhitespacePattern,K={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},D=function($,M){this._input=new C($),this._options=M||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Q(this._input)};D.prototype.tokenize=function(){this._input.restart(),this.__tokens=new q,this._reset();for(var $,M=new R(K.START,""),F=null,ue=[],he=new q;M.type!==K.EOF;){for($=this._get_next_token(M,F);this._is_comment($);)he.add($),$=this._get_next_token(M,F);he.isEmpty()||($.comments_before=he,he=new q),$.parent=F,this._is_opening($)?(ue.push(F),F=$):F&&this._is_closing($,F)&&($.opened=F,F.closed=$,F=ue.pop(),$.parent=F),$.previous=M,M.next=$,this.__tokens.add($),M=$}return this.__tokens},D.prototype._is_first_token=function(){return this.__tokens.isEmpty()},D.prototype._reset=function(){},D.prototype._get_next_token=function($,M){this._readWhitespace();var F=this._input.read(/.+/g);return F?this._create_token(K.RAW,F):this._create_token(K.EOF,"")},D.prototype._is_comment=function($){return!1},D.prototype._is_opening=function($){return!1},D.prototype._is_closing=function($,M){return!1},D.prototype._create_token=function($,M){var F=new R($,M,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return F},D.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},k.exports.Tokenizer=D,k.exports.TOKEN=K},function(k){function S(w){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=w}S.prototype.restart=function(){this.__position=0},S.prototype.isEmpty=function(){return this.__tokens_length===0},S.prototype.hasNext=function(){return this.__position<this.__tokens_length},S.prototype.next=function(){var w=null;return this.hasNext()&&(w=this.__tokens[this.__position],this.__position+=1),w},S.prototype.peek=function(w){var C=null;return w=w||0,w+=this.__position,w>=0&&w<this.__tokens_length&&(C=this.__tokens[w]),C},S.prototype.add=function(w){this.__parent_token&&(w.parent=this.__parent_token),this.__tokens.push(w),this.__tokens_length+=1},k.exports.TokenStream=S},function(k,S,w){var C=w(12).Pattern;function R(q,Q){C.call(this,q,Q),Q?this._line_regexp=this._input.get_regexp(Q._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}R.prototype=new C,R.prototype.__set_whitespace_patterns=function(q,Q){q+="\\t ",Q+="\\n\\r",this._match_pattern=this._input.get_regexp("["+q+Q+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+Q+"]")},R.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var q=this._input.read(this._match_pattern);if(q===" ")this.whitespace_before_token=" ";else if(q){var Q=this.__split(this._newline_regexp,q);this.newline_count=Q.length-1,this.whitespace_before_token=Q[this.newline_count]}return q},R.prototype.matching=function(q,Q){var K=this._create();return K.__set_whitespace_patterns(q,Q),K._update(),K},R.prototype._create=function(){return new R(this._input,this)},R.prototype.__split=function(q,Q){q.lastIndex=0;for(var K=0,D=[],$=q.exec(Q);$;)D.push(Q.substring(K,$.index)),K=$.index+$[0].length,$=q.exec(Q);return K<Q.length?D.push(Q.substring(K,Q.length)):D.push(""),D},k.exports.WhitespacePattern=R},function(k){function S(w,C){this._input=w,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)}S.prototype.read=function(){var w=this._input.read(this._starting_pattern);return(!this._starting_pattern||w)&&(w+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),w},S.prototype.read_match=function(){return this._input.match(this._match_pattern)},S.prototype.until_after=function(w){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(w),C._update(),C},S.prototype.until=function(w){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(w),C._update(),C},S.prototype.starting_with=function(w){var C=this._create();return C._starting_pattern=this._input.get_regexp(w,!0),C._update(),C},S.prototype.matching=function(w){var C=this._create();return C._match_pattern=this._input.get_regexp(w,!0),C._update(),C},S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){},k.exports.Pattern=S},function(k){function S(w,C){w=typeof w=="string"?w:w.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(w+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(w+/\sbeautify\signore:end\s/.source+C,"g")}S.prototype.get_directives=function(w){if(!w.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var R=this.__directive_pattern.exec(w);R;)C[R[1]]=R[2],R=this.__directive_pattern.exec(w);return C},S.prototype.readIgnored=function(w){return w.readUntilAfter(this.__directives_end_ignore_pattern)},k.exports.Directives=S},function(k,S,w){var C=w(12).Pattern,R={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function q(Q,K){C.call(this,Q,K),this.__template_pattern=null,this._disabled=Object.assign({},R),this._excluded=Object.assign({},R),K&&(this.__template_pattern=this._input.get_regexp(K.__template_pattern),this._excluded=Object.assign(this._excluded,K._excluded),this._disabled=Object.assign(this._disabled,K._disabled));var D=new C(Q);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}/)}}q.prototype=new C,q.prototype._create=function(){return new q(this._input,this)},q.prototype._update=function(){this.__set_templated_pattern()},q.prototype.disable=function(Q){var K=this._create();return K._disabled[Q]=!0,K._update(),K},q.prototype.read_options=function(Q){var K=this._create();for(var D in R)K._disabled[D]=Q.templating.indexOf(D)===-1;return K._update(),K},q.prototype.exclude=function(Q){var K=this._create();return K._excluded[Q]=!0,K._update(),K},q.prototype.read=function(){var Q="";this._match_pattern?Q=this._input.read(this._starting_pattern):Q=this._input.read(this._starting_pattern,this.__template_pattern);for(var K=this._read_template();K;)this._match_pattern?K+=this._input.read(this._match_pattern):K+=this._input.readUntil(this.__template_pattern),Q+=K,K=this._read_template();return this._until_after&&(Q+=this._input.readUntilAfter(this._until_pattern)),Q},q.prototype.__set_templated_pattern=function(){var Q=[];this._disabled.php||Q.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||Q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||Q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||Q.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(Q.push(this.__patterns.django._starting_pattern.source),Q.push(this.__patterns.django_value._starting_pattern.source),Q.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||Q.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&Q.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+Q.join("|")+")")},q.prototype._read_template=function(){var Q="",K=this._input.peek();if(K==="<"){var D=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&D==="?"&&(Q=Q||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&D==="%"&&(Q=Q||this.__patterns.erb.read())}else K==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(Q=Q||this.__patterns.handlebars_comment.read(),Q=Q||this.__patterns.handlebars_unescaped.read(),Q=Q||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(Q=Q||this.__patterns.django_value.read()),this._excluded.django||(Q=Q||this.__patterns.django_comment.read(),Q=Q||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(Q=Q||this.__patterns.smarty_comment.read(),Q=Q||this.__patterns.smarty_literal.read(),Q=Q||this.__patterns.smarty.read()));return Q},k.exports.TemplatablePattern=q},,,,function(k,S,w){var C=w(19).Beautifier,R=w(20).Options;function q(Q,K,D,$){var M=new C(Q,K,D,$);return M.beautify()}k.exports=q,k.exports.defaultOptions=function(){return new R}},function(k,S,w){var C=w(20).Options,R=w(2).Output,q=w(21).Tokenizer,Q=w(21).TOKEN,K=/\r\n|[\r\n]/,D=/\r\n|[\r\n]/g,$=function(Y,B){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Y.max_preserve_newlines,this.preserve_newlines=Y.preserve_newlines,this._output=new R(Y,B)};$.prototype.current_line_has_match=function(Y){return this._output.current_line.has_match(Y)},$.prototype.set_space_before_token=function(Y,B){this._output.space_before_token=Y,this._output.non_breaking_space=B},$.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},$.prototype.add_raw_token=function(Y){this._output.add_raw_token(Y)},$.prototype.print_preserved_newlines=function(Y){var B=0;Y.type!==Q.TEXT&&Y.previous.type!==Q.TEXT&&(B=Y.newlines?1:0),this.preserve_newlines&&(B=Y.newlines<this.max_preserve_newlines+1?Y.newlines:this.max_preserve_newlines+1);for(var W=0;W<B;W++)this.print_newline(W>0);return B!==0},$.prototype.traverse_whitespace=function(Y){return Y.whitespace_before||Y.newlines?(this.print_preserved_newlines(Y)||(this._output.space_before_token=!0),!0):!1},$.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},$.prototype.print_newline=function(Y){this._output.add_new_line(Y)},$.prototype.print_token=function(Y){Y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Y.text))},$.prototype.indent=function(){this.indent_level++},$.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},$.prototype.get_full_indent=function(Y){return Y=this.indent_level+(Y||0),Y<1?"":this._output.get_indent_string(Y)};var M=function(Y){for(var B=null,W=Y.next;W.type!==Q.EOF&&Y.closed!==W;){if(W.type===Q.ATTRIBUTE&&W.text==="type"){W.next&&W.next.type===Q.EQUALS&&W.next.next&&W.next.next.type===Q.VALUE&&(B=W.next.next.text);break}W=W.next}return B},F=function(Y,B){var W=null,re=null;return B.closed?(Y==="script"?W="text/javascript":Y==="style"&&(W="text/css"),W=M(B)||W,W.search("text/css")>-1?re="css":W.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?re="javascript":W.search(/(text|application|dojo)\/(x-)?(html)/)>-1?re="html":W.search(/test\/null/)>-1&&(re="null"),re):null};function ue(Y,B){return B.indexOf(Y)!==-1}function he(Y,B,W){this.parent=Y||null,this.tag=B?B.tag_name:"",this.indent_level=W||0,this.parser_token=B||null}function le(Y){this._printer=Y,this._current_frame=null}le.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},le.prototype.record_tag=function(Y){var B=new he(this._current_frame,Y,this._printer.indent_level);this._current_frame=B},le.prototype._try_pop_frame=function(Y){var B=null;return Y&&(B=Y.parser_token,this._printer.indent_level=Y.indent_level,this._current_frame=Y.parent),B},le.prototype._get_frame=function(Y,B){for(var W=this._current_frame;W&&Y.indexOf(W.tag)===-1;){if(B&&B.indexOf(W.tag)!==-1){W=null;break}W=W.parent}return W},le.prototype.try_pop=function(Y,B){var W=this._get_frame([Y],B);return this._try_pop_frame(W)},le.prototype.indent_to_tag=function(Y){var B=this._get_frame(Y);B&&(this._printer.indent_level=B.indent_level)};function Se(Y,B,W,re){this._source_text=Y||"",B=B||{},this._js_beautify=W,this._css_beautify=re,this._tag_stack=null;var ie=new C(B,"html");this._options=ie,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"}Se.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Y=this._source_text,B=this._options.eol;this._options.eol==="auto"&&(B=`
`,Y&&K.test(Y)&&(B=Y.match(K)[0])),Y=Y.replace(D,`
`);var W=Y.match(/^[\t ]*/)[0],re={text:"",type:""},ie=new ke(this._options),se=new $(this._options,W),x=new q(Y,this._options).tokenize();this._tag_stack=new le(se);for(var E=null,V=x.next();V.type!==Q.EOF;)V.type===Q.TAG_OPEN||V.type===Q.COMMENT?(E=this._handle_tag_open(se,V,ie,re,x),ie=E):V.type===Q.ATTRIBUTE||V.type===Q.EQUALS||V.type===Q.VALUE||V.type===Q.TEXT&&!ie.tag_complete?E=this._handle_inside_tag(se,V,ie,re):V.type===Q.TAG_CLOSE?E=this._handle_tag_close(se,V,ie):V.type===Q.TEXT?E=this._handle_text(se,V,ie):V.type===Q.CONTROL_FLOW_OPEN?E=this._handle_control_flow_open(se,V):V.type===Q.CONTROL_FLOW_CLOSE?E=this._handle_control_flow_close(se,V):se.add_raw_token(V),re=E,V=x.next();var me=se._output.get_code(B);return me},Se.prototype._handle_control_flow_open=function(Y,B){var W={text:B.text,type:B.type};return Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),B.newlines?Y.print_preserved_newlines(B):Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Y.print_token(B),Y.indent(),W},Se.prototype._handle_control_flow_close=function(Y,B){var W={text:B.text,type:B.type};return Y.deindent(),B.newlines?Y.print_preserved_newlines(B):Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Y.print_token(B),W},Se.prototype._handle_tag_close=function(Y,B,W){var re={text:B.text,type:B.type};return Y.alignment_size=0,W.tag_complete=!0,Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),W.is_unformatted?Y.add_raw_token(B):(W.tag_start_char==="<"&&(Y.set_space_before_token(B.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&W.has_wrapped_attrs&&Y.print_newline(!1)),Y.print_token(B)),W.indent_content&&!(W.is_unformatted||W.is_content_unformatted)&&(Y.indent(),W.indent_content=!1),!W.is_inline_element&&!(W.is_unformatted||W.is_content_unformatted)&&Y.set_wrap_point(),re},Se.prototype._handle_inside_tag=function(Y,B,W,re){var ie=W.has_wrapped_attrs,se={text:B.text,type:B.type};return Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),W.is_unformatted?Y.add_raw_token(B):W.tag_start_char==="{"&&B.type===Q.TEXT?Y.print_preserved_newlines(B)?(B.newlines=0,Y.add_raw_token(B)):Y.print_token(B):(B.type===Q.ATTRIBUTE?Y.set_space_before_token(!0):(B.type===Q.EQUALS||B.type===Q.VALUE&&B.previous.type===Q.EQUALS)&&Y.set_space_before_token(!1),B.type===Q.ATTRIBUTE&&W.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Y.traverse_whitespace(B),ie=ie||B.newlines!==0),this._is_wrap_attributes_force&&W.attr_count>=this._options.wrap_attributes_min_attrs&&(re.type!==Q.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Y.print_newline(!1),ie=!0)),Y.print_token(B),ie=ie||Y.previous_token_wrapped(),W.has_wrapped_attrs=ie),se},Se.prototype._handle_text=function(Y,B,W){var re={text:B.text,type:"TK_CONTENT"};return W.custom_beautifier_name?this._print_custom_beatifier_text(Y,B,W):W.is_unformatted||W.is_content_unformatted?Y.add_raw_token(B):(Y.traverse_whitespace(B),Y.print_token(B)),re},Se.prototype._print_custom_beatifier_text=function(Y,B,W){var re=this;if(B.text!==""){var ie=B.text,se,x=1,E="",V="";W.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?se=this._js_beautify:W.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?se=this._css_beautify:W.custom_beautifier_name==="html"&&(se=function(Qe,st){var rt=new Se(Qe,st,re._js_beautify,re._css_beautify);return rt.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-Y.indent_level);var me=Y.get_full_indent(x);if(ie=ie.replace(/\n[ \t]*$/,""),W.custom_beautifier_name!=="html"&&ie[0]==="<"&&ie.match(/^(<!--|<!\[CDATA\[)/)){var ze=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ie);if(!ze){Y.add_raw_token(B);return}E=me+ze[1]+`
`,ie=ze[4],ze[5]&&(V=me+ze[5]),ie=ie.replace(/\n[ \t]*$/,""),(ze[2]||ze[3].indexOf(`
`)!==-1)&&(ze=ze[3].match(/[ \t]+$/),ze&&(B.whitespace_before=ze[0]))}if(ie)if(se){var Xe=function(){this.eol=`
`};Xe.prototype=this._options.raw_options;var _e=new Xe;ie=se(me+ie,_e)}else{var Ke=B.whitespace_before;Ke&&(ie=ie.replace(new RegExp(`
(`+Ke+")?","g"),`
`)),ie=me+ie.replace(/\n/g,`
`+me)}E&&(ie?ie=E+ie+`
`+V:ie=E+V),Y.print_newline(!1),ie&&(B.text=ie,B.whitespace_before="",B.newlines=0,Y.add_raw_token(B),Y.print_newline(!0))}},Se.prototype._handle_tag_open=function(Y,B,W,re,ie){var se=this._get_tag_open_token(B);if((W.is_unformatted||W.is_content_unformatted)&&!W.is_empty_element&&B.type===Q.TAG_OPEN&&!se.is_start_tag?(Y.add_raw_token(B),se.start_tag_token=this._tag_stack.try_pop(se.tag_name)):(Y.traverse_whitespace(B),this._set_tag_position(Y,B,se,W,re),se.is_inline_element||Y.set_wrap_point(),Y.print_token(B)),se.is_start_tag&&this._is_wrap_attributes_force){var x=0,E;do E=ie.peek(x),E.type===Q.ATTRIBUTE&&(se.attr_count+=1),x+=1;while(E.type!==Q.EOF&&E.type!==Q.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(se.alignment_size=B.text.length+1),!se.tag_complete&&!se.is_unformatted&&(Y.alignment_size=se.alignment_size),se};var ke=function(Y,B,W){if(this.parent=B||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="",!W)this.tag_complete=!0;else{var re;this.tag_start_char=W.text[0],this.text=W.text,this.tag_start_char==="<"?(re=W.text.match(/^<([^\s>]*)/),this.tag_check=re?re[1]:""):(re=W.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=re?re[1]:"",(W.text.startsWith("{{#>")||W.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&W.next!==null?this.tag_check=W.next.text.split(" ")[0]:this.tag_check=W.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),W.type===Q.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||W.closed&&W.closed.text==="/>";var ie=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ie=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Y.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ie)))}};Se.prototype._get_tag_open_token=function(Y){var B=new ke(this._options,this._tag_stack.get_parser_token(),Y);return B.alignment_size=this._options.wrap_attributes_indent_size,B.is_end_tag=B.is_end_tag||ue(B.tag_check,this._options.void_elements),B.is_empty_element=B.tag_complete||B.is_start_tag&&B.is_end_tag,B.is_unformatted=!B.tag_complete&&ue(B.tag_check,this._options.unformatted),B.is_content_unformatted=!B.is_empty_element&&ue(B.tag_check,this._options.content_unformatted),B.is_inline_element=ue(B.tag_name,this._options.inline)||this._options.inline_custom_elements&&B.tag_name.includes("-")||B.tag_start_char==="{",B},Se.prototype._set_tag_position=function(Y,B,W,re,ie){if(W.is_empty_element||(W.is_end_tag?W.start_tag_token=this._tag_stack.try_pop(W.tag_name):(this._do_optional_end_element(W)&&(W.is_inline_element||Y.print_newline(!1)),this._tag_stack.record_tag(W),(W.tag_name==="script"||W.tag_name==="style")&&!(W.is_unformatted||W.is_content_unformatted)&&(W.custom_beautifier_name=F(W.tag_check,B)))),ue(W.tag_check,this._options.extra_liners)&&(Y.print_newline(!1),Y._output.just_added_blankline()||Y.print_newline(!0)),W.is_empty_element){if(W.tag_start_char==="{"&&W.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),W.indent_content=!0;var se=Y.current_line_has_match(/{{#if/);se||Y.print_newline(!1)}W.tag_name==="!--"&&ie.type===Q.TAG_CLOSE&&re.is_end_tag&&W.text.indexOf(`
`)===-1||(W.is_inline_element||W.is_unformatted||Y.print_newline(!1),this._calcluate_parent_multiline(Y,W))}else if(W.is_end_tag){var x=!1;x=W.start_tag_token&&W.start_tag_token.multiline_content,x=x||!W.is_inline_element&&!(re.is_inline_element||re.is_unformatted)&&!(ie.type===Q.TAG_CLOSE&&W.start_tag_token===re)&&ie.type!=="TK_CONTENT",(W.is_content_unformatted||W.is_unformatted)&&(x=!1),x&&Y.print_newline(!1)}else W.indent_content=!W.custom_beautifier_name,W.tag_start_char==="<"&&(W.tag_name==="html"?W.indent_content=this._options.indent_inner_html:W.tag_name==="head"?W.indent_content=this._options.indent_head_inner_html:W.tag_name==="body"&&(W.indent_content=this._options.indent_body_inner_html)),!(W.is_inline_element||W.is_unformatted)&&(ie.type!=="TK_CONTENT"||W.is_content_unformatted)&&Y.print_newline(!1),this._calcluate_parent_multiline(Y,W)},Se.prototype._calcluate_parent_multiline=function(Y,B){B.parent&&Y._output.just_added_newline()&&!((B.is_inline_element||B.is_unformatted)&&B.parent.is_inline_element)&&(B.parent.multiline_content=!0)};var De=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Me=["a","audio","del","ins","map","noscript","video"];Se.prototype._do_optional_end_element=function(Y){var B=null;if(!(Y.is_empty_element||!Y.is_start_tag||!Y.parent)){if(Y.tag_name==="body")B=B||this._tag_stack.try_pop("head");else if(Y.tag_name==="li")B=B||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Y.tag_name==="dd"||Y.tag_name==="dt")B=B||this._tag_stack.try_pop("dt",["dl"]),B=B||this._tag_stack.try_pop("dd",["dl"]);else if(Y.parent.tag_name==="p"&&De.indexOf(Y.tag_name)!==-1){var W=Y.parent.parent;(!W||Me.indexOf(W.tag_name)===-1)&&(B=B||this._tag_stack.try_pop("p"))}else Y.tag_name==="rp"||Y.tag_name==="rt"?(B=B||this._tag_stack.try_pop("rt",["ruby","rtc"]),B=B||this._tag_stack.try_pop("rp",["ruby","rtc"])):Y.tag_name==="optgroup"?B=B||this._tag_stack.try_pop("optgroup",["select"]):Y.tag_name==="option"?B=B||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Y.tag_name==="colgroup"?B=B||this._tag_stack.try_pop("caption",["table"]):Y.tag_name==="thead"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"])):Y.tag_name==="tbody"||Y.tag_name==="tfoot"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"]),B=B||this._tag_stack.try_pop("thead",["table"]),B=B||this._tag_stack.try_pop("tbody",["table"])):Y.tag_name==="tr"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"]),B=B||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Y.tag_name==="th"||Y.tag_name==="td")&&(B=B||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),B=B||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Y.parent=this._tag_stack.get_parser_token(),B}},k.exports.Beautifier=Se},function(k,S,w){var C=w(6).Options;function R(q){C.call(this,q,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}R.prototype=new C,k.exports.Options=R},function(k,S,w){var C=w(9).Tokenizer,R=w(9).TOKEN,q=w(13).Directives,Q=w(14).TemplatablePattern,K=w(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:R.START,RAW:R.RAW,EOF:R.EOF},$=new q(/<\!--/,/-->/),M=function(F,ue){C.call(this,F,ue),this._current_tag_name="";var he=new Q(this._input).read_options(this._options),le=new K(this._input);if(this.__patterns={word:he.until(/[\n\r\t <]/),word_control_flow_close_excluded:he.until(/[\n\r\t <}]/),single_quote:he.until_after(/'/),double_quote:he.until_after(/"/),attribute:he.until(/[\n\r\t =>]|\/>/),element_name:he.until(/[\n\r\t >\/]/),angular_control_flow_start:le.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:le.starting_with(/{{!--/).until_after(/--}}/),handlebars:le.starting_with(/{{/).until_after(/}}/),handlebars_open:le.until(/[\n\r\t }]/),handlebars_raw_close:le.until(/}}/),comment:le.starting_with(/<!--/).until_after(/-->/),cdata:le.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:le.starting_with(/<!\[/).until_after(/]>/),processing:le.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 Se=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=le.matching(Se).until_after(Se)}};M.prototype=new C,M.prototype._is_comment=function(F){return!1},M.prototype._is_opening=function(F){return F.type===D.TAG_OPEN||F.type===D.CONTROL_FLOW_OPEN},M.prototype._is_closing=function(F,ue){return F.type===D.TAG_CLOSE&&ue&&((F.text===">"||F.text==="/>")&&ue.text[0]==="<"||F.text==="}}"&&ue.text[0]==="{"&&ue.text[1]==="{")||F.type===D.CONTROL_FLOW_CLOSE&&F.text==="}"&&ue.text.endsWith("{")},M.prototype._reset=function(){this._current_tag_name=""},M.prototype._get_next_token=function(F,ue){var he=null;this._readWhitespace();var le=this._input.peek();return le===null?this._create_token(D.EOF,""):(he=he||this._read_open_handlebars(le,ue),he=he||this._read_attribute(le,F,ue),he=he||this._read_close(le,ue),he=he||this._read_script_and_style(le,F),he=he||this._read_control_flows(le,ue),he=he||this._read_raw_content(le,F,ue),he=he||this._read_content_word(le,ue),he=he||this._read_comment_or_cdata(le),he=he||this._read_processing(le),he=he||this._read_open(le,ue),he=he||this._create_token(D.UNKNOWN,this._input.next()),he)},M.prototype._read_comment_or_cdata=function(F){var ue=null,he=null,le=null;if(F==="<"){var Se=this._input.peek(1);Se==="!"&&(he=this.__patterns.comment.read(),he?(le=$.get_directives(he),le&&le.ignore==="start"&&(he+=$.readIgnored(this._input))):he=this.__patterns.cdata.read()),he&&(ue=this._create_token(D.COMMENT,he),ue.directives=le)}return ue},M.prototype._read_processing=function(F){var ue=null,he=null,le=null;if(F==="<"){var Se=this._input.peek(1);(Se==="!"||Se==="?")&&(he=this.__patterns.conditional_comment.read(),he=he||this.__patterns.processing.read()),he&&(ue=this._create_token(D.COMMENT,he),ue.directives=le)}return ue},M.prototype._read_open=function(F,ue){var he=null,le=null;return(!ue||ue.type===D.CONTROL_FLOW_OPEN)&&F==="<"&&(he=this._input.next(),this._input.peek()==="/"&&(he+=this._input.next()),he+=this.__patterns.element_name.read(),le=this._create_token(D.TAG_OPEN,he)),le},M.prototype._read_open_handlebars=function(F,ue){var he=null,le=null;return(!ue||ue.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)==="!"?(he=this.__patterns.handlebars_comment.read(),he=he||this.__patterns.handlebars.read(),le=this._create_token(D.COMMENT,he)):(he=this.__patterns.handlebars_open.read(),le=this._create_token(D.TAG_OPEN,he))),le},M.prototype._read_control_flows=function(F,ue){var he="",le=null;if(!this._options.templating.includes("angular"))return le;if(F==="@"){if(he=this.__patterns.angular_control_flow_start.read(),he==="")return le;for(var Se=he.endsWith("(")?1:0,ke=0;!(he.endsWith("{")&&Se===ke);){var De=this._input.next();if(De===null)break;De==="("?Se++:De===")"&&ke++,he+=De}le=this._create_token(D.CONTROL_FLOW_OPEN,he)}else F==="}"&&ue&&ue.type===D.CONTROL_FLOW_OPEN&&(he=this._input.next(),le=this._create_token(D.CONTROL_FLOW_CLOSE,he));return le},M.prototype._read_close=function(F,ue){var he=null,le=null;return ue&&ue.type===D.TAG_OPEN&&(ue.text[0]==="<"&&(F===">"||F==="/"&&this._input.peek(1)===">")?(he=this._input.next(),F==="/"&&(he+=this._input.next()),le=this._create_token(D.TAG_CLOSE,he)):ue.text[0]==="{"&&F==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),le=this._create_token(D.TAG_CLOSE,"}}"))),le},M.prototype._read_attribute=function(F,ue,he){var le=null,Se="";if(he&&he.text[0]==="<")if(F==="=")le=this._create_token(D.EQUALS,this._input.next());else if(F==='"'||F==="'"){var ke=this._input.next();F==='"'?ke+=this.__patterns.double_quote.read():ke+=this.__patterns.single_quote.read(),le=this._create_token(D.VALUE,ke)}else Se=this.__patterns.attribute.read(),Se&&(ue.type===D.EQUALS?le=this._create_token(D.VALUE,Se):le=this._create_token(D.ATTRIBUTE,Se));return le},M.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)},M.prototype._read_raw_content=function(F,ue,he){var le="";if(he&&he.text[0]==="{")le=this.__patterns.handlebars_raw_close.read();else if(ue.type===D.TAG_CLOSE&&ue.opened.text[0]==="<"&&ue.text[0]!=="/"){var Se=ue.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Se)&&(le=this._input.readUntil(new RegExp("</"+Se+"[\\n\\r\\t ]*?>","ig")))}return le?this._create_token(D.TEXT,le):null},M.prototype._read_script_and_style=function(F,ue){if(ue.type===D.TAG_CLOSE&&ue.opened.text[0]==="<"&&ue.text[0]!=="/"){var he=ue.opened.text.substr(1).toLowerCase();if(he==="script"||he==="style"){var le=this._read_comment_or_cdata(F);if(le)return le.type=D.TEXT,le;var Se=this._input.readUntil(new RegExp("</"+he+"[\\n\\r\\t ]*?>","ig"));if(Se)return this._create_token(D.TEXT,Se)}}return null},M.prototype._read_content_word=function(F,ue){var he="";return this._options.unformatted_content_delimiter&&F===this._options.unformatted_content_delimiter[0]&&(he=this.__patterns.unformatted_content_delimiter.read()),he||(he=ue&&ue.type===D.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),he?this._create_token(D.TEXT,he):null},k.exports.Tokenizer=M,k.exports.TOKEN=D}],ee={};function o(k){var S=ee[k];if(S!==void 0)return S.exports;var w=ee[k]={exports:{}};return fe[k](w,w.exports,o),w.exports}var H=o(18);oe=H})();var ve=oe;if(1)m=[b,b(58553),b(87804)],de=function(fe){var ee=b(58553),o=b(87804);return{html_beautify:function(H,k){return ve(H,k,ee.js_beautify,o.css_beautify)}}}.apply(ct,m),de!==void 0&&(ln.exports=de);else var G,g})()},58553:function(ln,ct){var b,m;(function(){var de;(function(){"use strict";var ve=[function(ee,o,H){var k=H(1).Beautifier,S=H(5).Options;function w(C,R){var q=new k(C,R);return q.beautify()}ee.exports=w,ee.exports.defaultOptions=function(){return new S}},function(ee,o,H){var k=H(2).Output,S=H(3).Token,w=H(4),C=H(5).Options,R=H(7).Tokenizer,q=H(7).line_starters,Q=H(7).positionable_operators,K=H(7).TOKEN;function D(E,V){return V.indexOf(E)!==-1}function $(E){return E.replace(/^\s+/g,"")}function M(E){for(var V={},me=0;me<E.length;me++)V[E[me].replace(/-/g,"_")]=E[me];return V}function F(E,V){return E&&E.type===K.RESERVED&&E.text===V}function ue(E,V){return E&&E.type===K.RESERVED&&D(E.text,V)}var he=["case","return","do","if","throw","else","await","break","continue","async"],le=["before-newline","after-newline","preserve-newline"],Se=M(le),ke=[Se.before_newline,Se.preserve_newline],De={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Me(E,V){V.multiline_frame||V.mode===De.ForInitializer||V.mode===De.Conditional||E.remove_indent(V.start_line_index)}function Y(E){E=E.replace(w.allLineBreaks,`
`);for(var V=[],me=E.indexOf(`
`);me!==-1;)V.push(E.substring(0,me)),E=E.substring(me+1),me=E.indexOf(`
`);return E.length&&V.push(E),V}function B(E){return E===De.ArrayLiteral}function W(E){return D(E,[De.Expression,De.ForInitializer,De.Conditional])}function re(E,V){for(var me=0;me<E.length;me++){var ze=E[me].trim();if(ze.charAt(0)!==V)return!1}return!0}function ie(E,V){for(var me=0,ze=E.length,Xe;me<ze;me++)if(Xe=E[me],Xe&&Xe.indexOf(V)!==0)return!1;return!0}function se(E,V){V=V||{},this._source_text=E||"",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(V)}se.prototype.create_flags=function(E,V){var me=0;E&&(me=E.indentation_level,!this._output.just_added_newline()&&E.line_indent_level>me&&(me=E.line_indent_level));var ze={mode:V,parent:E,last_token:E?E.last_token:new S(K.START_BLOCK,""),last_word:E?E.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:me,alignment:0,line_indent_level:E?E.line_indent_level:me,start_line_index:this._output.get_line_number(),ternary_depth:0};return ze},se.prototype._reset=function(E){var V=E.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new k(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(De.BlockStatement);var me=new R(E,this._options);return this._tokens=me.tokenize(),E},se.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E,V=this._reset(this._source_text),me=this._options.eol;this._options.eol==="auto"&&(me=`
`,V&&w.lineBreak.test(V||"")&&(me=V.match(w.lineBreak)[0]));for(var ze=this._tokens.next();ze;)this.handle_token(ze),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ze,ze=this._tokens.next();return E=this._output.get_code(me),E},se.prototype.handle_token=function(E,V){E.type===K.START_EXPR?this.handle_start_expr(E):E.type===K.END_EXPR?this.handle_end_expr(E):E.type===K.START_BLOCK?this.handle_start_block(E):E.type===K.END_BLOCK?this.handle_end_block(E):E.type===K.WORD?this.handle_word(E):E.type===K.RESERVED?this.handle_word(E):E.type===K.SEMICOLON?this.handle_semicolon(E):E.type===K.STRING?this.handle_string(E):E.type===K.EQUALS?this.handle_equals(E):E.type===K.OPERATOR?this.handle_operator(E):E.type===K.COMMA?this.handle_comma(E):E.type===K.BLOCK_COMMENT?this.handle_block_comment(E,V):E.type===K.COMMENT?this.handle_comment(E,V):E.type===K.DOT?this.handle_dot(E):E.type===K.EOF?this.handle_eof(E):E.type===K.UNKNOWN?this.handle_unknown(E,V):this.handle_unknown(E,V)},se.prototype.handle_whitespace_and_comments=function(E,V){var me=E.newlines,ze=this._options.keep_array_indentation&&B(this._flags.mode);if(E.comments_before)for(var Xe=E.comments_before.next();Xe;)this.handle_whitespace_and_comments(Xe,V),this.handle_token(Xe,V),Xe=E.comments_before.next();if(ze)for(var _e=0;_e<me;_e+=1)this.print_newline(_e>0,V);else if(this._options.max_preserve_newlines&&me>this._options.max_preserve_newlines&&(me=this._options.max_preserve_newlines),this._options.preserve_newlines&&me>1){this.print_newline(!1,V);for(var Ke=1;Ke<me;Ke+=1)this.print_newline(!0,V)}};var x=["async","break","continue","return","throw","yield"];se.prototype.allow_wrap_or_preserved_newline=function(E,V){if(V=V===void 0?!1:V,!this._output.just_added_newline()){var me=this._options.preserve_newlines&&E.newlines||V,ze=D(this._flags.last_token.text,Q)||D(E.text,Q);if(ze){var Xe=D(this._flags.last_token.text,Q)&&D(this._options.operator_position,ke)||D(E.text,Q);me=me&&Xe}if(me)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ue(this._flags.last_token,x))return;this._output.set_wrap_point()}}},se.prototype.print_newline=function(E,V){if(!V&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==K.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var me=this._tokens.peek();this._flags.mode===De.Statement&&!(this._flags.if_block&&F(me,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(E)&&(this._flags.multiline_frame=!0)},se.prototype.print_token_line_indentation=function(E){this._output.just_added_newline()&&(this._options.keep_array_indentation&&E.newlines&&(E.text==="["||B(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(E.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))},se.prototype.print_token=function(E){if(this._output.raw){this._output.add_raw_token(E);return}if(this._options.comma_first&&E.previous&&E.previous.type===K.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var V=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(V),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(E),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(E),this._output.non_breaking_space=!0,this._output.add_token(E.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},se.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},se.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))},se.prototype.set_mode=function(E){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,E),this._flags=this.create_flags(this._previous_flags,E),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},se.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===De.Statement&&Me(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},se.prototype.start_of_object_property=function(){return this._flags.parent.mode===De.ObjectLiteral&&this._flags.mode===De.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ue(this._flags.last_token,["get","set"]))},se.prototype.start_of_statement=function(E){var V=!1;return V=V||ue(this._flags.last_token,["var","let","const"])&&E.type===K.WORD,V=V||F(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===De.ObjectLiteral&&this._flags.mode===De.Statement)&&ue(this._flags.last_token,x)&&!E.newlines,V=V||F(this._flags.last_token,"else")&&!(F(E,"if")&&!E.comments_before),V=V||this._flags.last_token.type===K.END_EXPR&&(this._previous_flags.mode===De.ForInitializer||this._previous_flags.mode===De.Conditional),V=V||this._flags.last_token.type===K.WORD&&this._flags.mode===De.BlockStatement&&!this._flags.in_case&&!(E.text==="--"||E.text==="++")&&this._last_last_text!=="function"&&E.type!==K.WORD&&E.type!==K.RESERVED,V=V||this._flags.mode===De.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ue(this._flags.last_token,["get","set"])),V?(this.set_mode(De.Statement),this.indent(),this.handle_whitespace_and_comments(E,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E,ue(E,["do","for","if","while"])),!0):!1},se.prototype.handle_start_expr=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E);var V=De.Expression;if(E.text==="["){if(this._flags.last_token.type===K.WORD||this._flags.last_token.text===")"){ue(this._flags.last_token,q)&&(this._output.space_before_token=!0),this.print_token(E),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=De.ArrayLiteral,B(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,[K.START_EXPR,K.END_EXPR,K.WORD,K.OPERATOR,K.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===K.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=De.ForInitializer):D(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=De.Conditional):D(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&E.whitespace_before===""?this._output.space_before_token=!1:(D(this._flags.last_token.text,q)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E);else if(this._flags.last_token.type===K.WORD){this._output.space_before_token=!1;var me=this._tokens.peek(-3);if(this._options.space_after_named_function&&me){var ze=this._tokens.peek(-4);ue(me,["async","function"])||me.text==="*"&&ue(ze,["async","function"])?this._output.space_before_token=!0:this._flags.mode===De.ObjectLiteral?(me.text==="{"||me.text===","||me.text==="*"&&(ze.text==="{"||ze.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(E);(this._flags.last_token.type===K.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===De.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===K.START_BLOCK?this.print_newline():(this._flags.last_token.type===K.END_EXPR||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===K.COMMA)&&this.allow_wrap_or_preserved_newline(E,E.newlines),this.print_token(E),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},se.prototype.handle_end_expr=function(E){for(;this._flags.mode===De.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(E,E.text==="]"&&B(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===K.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(E),this.restore_mode(),Me(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===De.Conditional&&(this._previous_flags.mode=De.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},se.prototype.handle_start_block=function(E){this.handle_whitespace_and_comments(E);var V=this._tokens.peek(),me=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===K.END_EXPR?(this.set_mode(De.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(De.BlockStatement):me&&(D(me.text,[":",","])&&D(V.type,[K.STRING,K.WORD,K.RESERVED])||D(V.text,["get","set","..."])&&D(me.type,[K.WORD,K.RESERVED]))?D(this._last_last_text,["class","interface"])&&!D(me.text,[":",","])?this.set_mode(De.BlockStatement):this.set_mode(De.ObjectLiteral):this._flags.last_token.type===K.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(De.BlockStatement):D(this._flags.last_token.type,[K.EQUALS,K.START_EXPR,K.COMMA,K.OPERATOR])||ue(this._flags.last_token,["return","throw","import","default"])?this.set_mode(De.ObjectLiteral):this.set_mode(De.BlockStatement),this._flags.last_token&&ue(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var ze=!V.comments_before&&V.text==="}",Xe=ze&&this._flags.last_word==="function"&&this._flags.last_token.type===K.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,Ke=null;this._flags.inline_frame=!0;do if(_e+=1,Ke=this._tokens.peek(_e-1),Ke.newlines){this._flags.inline_frame=!1;break}while(Ke.type!==K.EOF&&!(Ke.type===K.END_BLOCK&&Ke.opened===E))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==K.OPERATOR&&(Xe||this._flags.last_token.type===K.EQUALS||ue(this._flags.last_token,he)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(B(this._previous_flags.mode)&&(this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.COMMA)&&((this._flags.last_token.type===K.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(E),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==K.OPERATOR&&this._flags.last_token.type!==K.START_EXPR&&(D(this._flags.last_token.type,[K.START_BLOCK,K.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(E),this.indent(),!ze&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},se.prototype.handle_end_block=function(E){for(this.handle_whitespace_and_comments(E);this._flags.mode===De.Statement;)this.restore_mode();var V=this._flags.last_token.type===K.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(B(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(E)},se.prototype.handle_word=function(E){if(E.type===K.RESERVED){if(D(E.text,["set","get"])&&this._flags.mode!==De.ObjectLiteral)E.type=K.WORD;else if(E.text==="import"&&D(this._tokens.peek().text,["(","."]))E.type=K.WORD;else if(D(E.text,["as","from"])&&!this._flags.import_block)E.type=K.WORD;else if(this._flags.mode===De.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(E.type=K.WORD)}}if(this.start_of_statement(E)?ue(this._flags.last_token,["var","let","const"])&&E.type===K.WORD&&(this._flags.declaration_statement=!0):E.newlines&&!W(this._flags.mode)&&(this._flags.last_token.type!==K.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==K.EQUALS&&(this._options.preserve_newlines||!ue(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(E),this.print_newline()):this.handle_whitespace_and_comments(E),this._flags.do_block&&!this._flags.do_while)if(F(E,"while")){this._output.space_before_token=!0,this.print_token(E),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(E,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===De.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ue(E,["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(E),this._flags.in_case=!0;return}if((this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR)&&!this.start_of_object_property()&&!(D(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===De.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(E),F(E,"function")){(D(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(D(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===K.OPERATOR))&&!this._output.just_added_blankline()&&!E.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD?ue(this._flags.last_token,["get","set","new","export"])||ue(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===K.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(W(this._flags.mode)||B(this._flags.mode))||this.print_newline(),this.print_token(E),this._flags.last_word=E.text;return}var me="NONE";if(this._flags.last_token.type===K.END_BLOCK?this._previous_flags.inline_frame?me="SPACE":ue(E,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines?me="NEWLINE":(me="SPACE",this._output.space_before_token=!0):me="NEWLINE":this._flags.last_token.type===K.SEMICOLON&&this._flags.mode===De.BlockStatement?me="NEWLINE":this._flags.last_token.type===K.SEMICOLON&&W(this._flags.mode)?me="SPACE":this._flags.last_token.type===K.STRING?me="NEWLINE":this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===De.ObjectLiteral&&D(this._last_last_text,["{",","]))?me="SPACE":this._flags.last_token.type===K.START_BLOCK?this._flags.inline_frame?me="SPACE":me="NEWLINE":this._flags.last_token.type===K.END_EXPR&&(this._output.space_before_token=!0,me="NEWLINE"),ue(E,q)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?me="SPACE":me="NEWLINE"),ue(E,["else","catch","finally"]))if((!(this._flags.last_token.type===K.END_BLOCK&&this._previous_flags.mode===De.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ze=this._output.current_line;ze.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else me==="NEWLINE"?ue(this._flags.last_token,he)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ue(E,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==K.END_EXPR?(this._flags.last_token.type!==K.START_EXPR||!ue(E,["var","let","const"]))&&this._flags.last_token.text!==":"&&(F(E,"if")&&F(E.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ue(E,q)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&B(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():me==="SPACE"&&(this._output.space_before_token=!0);E.previous&&(E.previous.type===K.WORD||E.previous.type===K.RESERVED)&&(this._output.space_before_token=!0),this.print_token(E),this._flags.last_word=E.text,E.type===K.RESERVED&&(E.text==="do"?this._flags.do_block=!0:E.text==="if"?this._flags.if_block=!0:E.text==="import"?this._flags.import_block=!0:this._flags.import_block&&F(E,"from")&&(this._flags.import_block=!1))},se.prototype.handle_semicolon=function(E){this.start_of_statement(E)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(E);for(var V=this._tokens.peek();this._flags.mode===De.Statement&&!(this._flags.if_block&&F(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(E)},se.prototype.handle_string=function(E){E.text.startsWith("`")&&E.newlines===0&&E.whitespace_before===""&&(E.previous.text===")"||this._flags.last_token.type===K.WORD)||(this.start_of_statement(E)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(E),this._flags.last_token.type===K.RESERVED||this._flags.last_token.type===K.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR||this._flags.last_token.type===K.EQUALS||this._flags.last_token.type===K.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E):E.text.startsWith("`")&&this._flags.last_token.type===K.END_EXPR&&(E.previous.text==="]"||E.previous.text===")")&&E.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(E)},se.prototype.handle_equals=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0},se.prototype.handle_comma=function(E){this.handle_whitespace_and_comments(E,!0),this.print_token(E),this._output.space_before_token=!0,this._flags.declaration_statement?(W(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(E)):this._flags.mode===De.ObjectLiteral||this._flags.mode===De.Statement&&this._flags.parent.mode===De.ObjectLiteral?(this._flags.mode===De.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)},se.prototype.handle_operator=function(E){var V=E.text==="*"&&(ue(this._flags.last_token,["function","yield"])||D(this._flags.last_token.type,[K.START_BLOCK,K.COMMA,K.END_BLOCK,K.SEMICOLON])),me=D(E.text,["-","+"])&&(D(this._flags.last_token.type,[K.START_BLOCK,K.START_EXPR,K.EQUALS,K.OPERATOR])||D(this._flags.last_token.text,q)||this._flags.last_token.text===",");if(!this.start_of_statement(E)){var ze=!V;this.handle_whitespace_and_comments(E,ze)}if(E.text==="*"&&this._flags.last_token.type===K.DOT){this.print_token(E);return}if(E.text==="::"){this.print_token(E);return}if(D(E.text,["-","+"])&&this.start_of_object_property()){this.print_token(E);return}if(this._flags.last_token.type===K.OPERATOR&&D(this._options.operator_position,ke)&&this.allow_wrap_or_preserved_newline(E),E.text===":"&&this._flags.in_case){this.print_token(E),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==K.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,_e=!0,Ke=!1;if(E.text===":"?this._flags.ternary_depth===0?Xe=!1:(this._flags.ternary_depth-=1,Ke=!0):E.text==="?"&&(this._flags.ternary_depth+=1),!me&&!V&&this._options.preserve_newlines&&D(E.text,Q)){var Qe=E.text===":",st=Qe&&Ke,rt=Qe&&!Ke;switch(this._options.operator_position){case Se.before_newline:this._output.space_before_token=!rt,this.print_token(E),(!Qe||st)&&this.allow_wrap_or_preserved_newline(E),this._output.space_before_token=!0;return;case Se.after_newline:this._output.space_before_token=!0,!Qe||st?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(E):this._output.space_before_token=!1,this.print_token(E),this._output.space_before_token=!0;return;case Se.preserve_newline:rt||this.allow_wrap_or_preserved_newline(E),Xe=!(this._output.just_added_newline()||rt),this._output.space_before_token=Xe,this.print_token(E),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(E),Xe=!1;var Vt=this._tokens.peek();_e=Vt&&D(Vt.type,[K.WORD,K.RESERVED])}else if(E.text==="...")this.allow_wrap_or_preserved_newline(E),Xe=this._flags.last_token.type===K.START_BLOCK,_e=!1;else if(D(E.text,["--","++","!","~"])||me){if((this._flags.last_token.type===K.COMMA||this._flags.last_token.type===K.START_EXPR)&&this.allow_wrap_or_preserved_newline(E),Xe=!1,_e=!1,E.newlines&&(E.text==="--"||E.text==="++"||E.text==="~")){var qe=ue(this._flags.last_token,he)&&E.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===";"&&W(this._flags.mode)&&(Xe=!0),this._flags.last_token.type===K.RESERVED?Xe=!0:this._flags.last_token.type===K.END_EXPR?Xe=!(this._flags.last_token.text==="]"&&(E.text==="--"||E.text==="++")):this._flags.last_token.type===K.OPERATOR&&(Xe=D(E.text,["--","-","++","+"])&&D(this._flags.last_token.text,["--","-","++","+"]),D(E.text,["+","-"])&&D(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===De.BlockStatement&&!this._flags.inline_frame||this._flags.mode===De.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(E),this._output.space_before_token=_e},se.prototype.handle_block_comment=function(E,V){if(this._output.raw){this._output.add_raw_token(E),E.directives&&E.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(E.directives){this.print_newline(!1,V),this.print_token(E),E.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!w.newline.test(E.text)&&!E.newlines){this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0;return}else this.print_block_commment(E,V)},se.prototype.print_block_commment=function(E,V){var me=Y(E.text),ze,Xe=!1,_e=!1,Ke=E.whitespace_before,Qe=Ke.length;if(this.print_newline(!1,V),this.print_token_line_indentation(E),this._output.add_token(me[0]),this.print_newline(!1,V),me.length>1){for(me=me.slice(1),Xe=re(me,"*"),_e=ie(me,Ke),Xe&&(this._flags.alignment=1),ze=0;ze<me.length;ze++)Xe?(this.print_token_line_indentation(E),this._output.add_token($(me[ze]))):_e&&me[ze]?(this.print_token_line_indentation(E),this._output.add_token(me[ze].substring(Qe))):(this._output.current_line.set_indent(-1),this._output.add_token(me[ze])),this.print_newline(!1,V);this._flags.alignment=0}},se.prototype.handle_comment=function(E,V){E.newlines?this.print_newline(!1,V):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(E),this.print_newline(!1,V)},se.prototype.handle_dot=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ue(this._flags.last_token,he)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(E,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(E)},se.prototype.handle_unknown=function(E,V){this.print_token(E),E.text[E.text.length-1]===`
`&&this.print_newline(!1,V)},se.prototype.handle_eof=function(E){for(;this._flags.mode===De.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E)},ee.exports.Beautifier=se},function(ee){function o(S){this.__parent=S,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 S=new o(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},o.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},o.prototype.has_match=function(S){for(var w=this.__items.length-1;w>=0;w--)if(this.__items[w].match(S))return!0;return!1},o.prototype.set_indent=function(S,w){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=w||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 S=this.__parent.current_line;return S.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),S.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),S.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,S.__items[0]===" "&&(S.__items.splice(0,1),S.__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(S){this.__items.push(S);var w=S.lastIndexOf(`
`);w!==-1?this.__character_count=S.length-w:this.__character_count+=S.length},o.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},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 S="";return this.is_empty()?this.__parent.indent_empty_lines&&(S=this.__parent.get_indent_string(this.__indent_count)):(S=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),S+=this.__items.join("")),S};function H(S,w){this.__cache=[""],this.__indent_size=S.indent_size,this.__indent_string=S.indent_char,S.indent_with_tabs||(this.__indent_string=new Array(S.indent_size+1).join(S.indent_char)),w=w||"",S.indent_level>0&&(w=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=w,this.__base_string_length=w.length}H.prototype.get_indent_size=function(S,w){var C=this.__base_string_length;return w=w||0,S<0&&(C=0),C+=S*this.__indent_size,C+=w,C},H.prototype.get_indent_string=function(S,w){var C=this.__base_string;return w=w||0,S<0&&(S=0,C=""),w+=S*this.__indent_size,this.__ensure_cache(w),C+=this.__cache[w],C},H.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var S=this.__cache.length,w=0,C="";this.__indent_size&&S>=this.__indent_size&&(w=Math.floor(S/this.__indent_size),S-=w*this.__indent_size,C=new Array(w+1).join(this.__indent_string)),S&&(C+=new Array(S+1).join(" ")),this.__cache.push(C)};function k(S,w){this.__indent_cache=new H(S,w),this.raw=!1,this._end_with_newline=S.end_with_newline,this.indent_size=S.indent_size,this.wrap_line_length=S.wrap_line_length,this.indent_empty_lines=S.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()}k.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},k.prototype.get_line_number=function(){return this.__lines.length},k.prototype.get_indent_string=function(S,w){return this.__indent_cache.get_indent_string(S,w)},k.prototype.get_indent_size=function(S,w){return this.__indent_cache.get_indent_size(S,w)},k.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},k.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},k.prototype.get_code=function(S){this.trim(!0);var w=this.current_line.pop();w&&(w[w.length-1]===`
`&&(w=w.replace(/\n+$/g,"")),this.current_line.push(w)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return S!==`
`&&(C=C.replace(/[\n]/g,S)),C},k.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},k.prototype.set_indent=function(S,w){return S=S||0,w=w||0,this.next_line.set_indent(S,w),this.__lines.length>1?(this.current_line.set_indent(S,w),!0):(this.current_line.set_indent(),!1)},k.prototype.add_raw_token=function(S){for(var w=0;w<S.newlines;w++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(S.whitespace_before),this.current_line.push(S.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},k.prototype.add_token=function(S){this.__add_space_before_token(),this.current_line.push(S),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},k.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(" "))},k.prototype.remove_indent=function(S){for(var w=this.__lines.length;S<w;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},k.prototype.trim=function(S){for(S=S===void 0?!1:S,this.current_line.trim();S&&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},k.prototype.just_added_newline=function(){return this.current_line.is_empty()},k.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},k.prototype.ensure_empty_line_above=function(S,w){for(var C=this.__lines.length-2;C>=0;){var R=this.__lines[C];if(R.is_empty())break;if(R.item(0).indexOf(S)!==0&&R.item(-1)!==w){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ee.exports.Output=k},function(ee){function o(H,k,S,w){this.type=H,this.text=k,this.comments_before=null,this.newlines=S||0,this.whitespace_before=w||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ee.exports.Token=o},function(ee,o){var H="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",k="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",S="\\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",w="\\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]+\\}",R="(?:"+C+"|["+H+S+"])",q="(?:"+C+"|["+k+S+w+"])*";o.identifier=new RegExp(R+q,"g"),o.identifierStart=new RegExp(R),o.identifierMatch=new RegExp("(?:"+C+"|["+k+S+w+"])+");var Q=/[\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(ee,o,H){var k=H(6).Options,S=["before-newline","after-newline","preserve-newline"];function w(C){k.call(this,C,"js");var R=this.raw_options.brace_style||null;R==="expand-strict"?this.raw_options.brace_style="expand":R==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var q=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var Q=0;Q<q.length;Q++)q[Q]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=q[Q];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",S),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}w.prototype=new k,ee.exports.Options=w},function(ee){function o(S,w){this.raw_options=H(S,w),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(S,w){var C=this.raw_options[S],R=w||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(R=C.concat()):typeof C=="string"&&(R=C.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(S,w){var C=this.raw_options[S],R=C===void 0?!!w:!!C;return R},o.prototype._get_characters=function(S,w){var C=this.raw_options[S],R=w||"";return typeof C=="string"&&(R=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),R},o.prototype._get_number=function(S,w){var C=this.raw_options[S];w=parseInt(w,10),isNaN(w)&&(w=0);var R=parseInt(C,10);return isNaN(R)&&(R=w),R},o.prototype._get_selection=function(S,w,C){var R=this._get_selection_list(S,w,C);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
`+w+`
You passed in: '`+this.raw_options[S]+"'");return R[0]},o.prototype._get_selection_list=function(S,w,C){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[w[0]],!this._is_valid_selection(C,w))throw new Error("Invalid Default Value!");var R=this._get_array(S,C);if(!this._is_valid_selection(R,w))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
`+w+`
You passed in: '`+this.raw_options[S]+"'");return R},o.prototype._is_valid_selection=function(S,w){return S.length&&w.length&&!S.some(function(C){return w.indexOf(C)===-1})};function H(S,w){var C={};S=k(S);var R;for(R in S)R!==w&&(C[R]=S[R]);if(w&&S[w])for(R in S[w])C[R]=S[w][R];return C}function k(S){var w={},C;for(C in S){var R=C.replace(/-/g,"_");w[R]=S[C]}return w}ee.exports.Options=o,ee.exports.normalizeOpts=k,ee.exports.mergeOpts=H},function(ee,o,H){var k=H(8).InputScanner,S=H(9).Tokenizer,w=H(9).TOKEN,C=H(13).Directives,R=H(4),q=H(12).Pattern,Q=H(14).TemplatablePattern;function K(re,ie){return ie.indexOf(re)!==-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:w.START,RAW:w.RAW,EOF:w.EOF},$=new C(/\/\*/,/\*\//),M=/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]/,ue=/[^\d\.]/,he=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),le=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";le=le.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),le="\\?\\.(?!\\d) "+le,le=le.replace(/ /g,"|");var Se=new RegExp(le),ke="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),De=ke.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Me=new RegExp("^(?:"+De.join("|")+")$"),Y,B=function(re,ie){S.call(this,re,ie),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var se=new q(this._input),x=new Q(this._input).read_options(this._options);this.__patterns={template:x,identifier:x.starting_with(R.identifier).matching(R.identifierMatch),number:se.matching(M),punct:se.matching(Se),comment:se.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:se.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:se.matching(/<!--/),html_comment_end:se.matching(/-->/),include:se.starting_with(/#include/).until_after(R.lineBreak),shebang:se.starting_with(/#!/).until_after(R.lineBreak),xml:se.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(/[`}\\]/)}};B.prototype=new S,B.prototype._is_comment=function(re){return re.type===D.COMMENT||re.type===D.BLOCK_COMMENT||re.type===D.UNKNOWN},B.prototype._is_opening=function(re){return re.type===D.START_BLOCK||re.type===D.START_EXPR},B.prototype._is_closing=function(re,ie){return(re.type===D.END_BLOCK||re.type===D.END_EXPR)&&ie&&(re.text==="]"&&ie.text==="["||re.text===")"&&ie.text==="("||re.text==="}"&&ie.text==="{")},B.prototype._reset=function(){Y=!1},B.prototype._get_next_token=function(re,ie){var se=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(D.EOF,""):(se=se||this._read_non_javascript(x),se=se||this._read_string(x),se=se||this._read_pair(x,this._input.peek(1)),se=se||this._read_word(re),se=se||this._read_singles(x),se=se||this._read_comment(x),se=se||this._read_regexp(x,re),se=se||this._read_xml(x,re),se=se||this._read_punctuation(),se=se||this._create_token(D.UNKNOWN,this._input.next()),se)},B.prototype._read_word=function(re){var ie;if(ie=this.__patterns.identifier.read(),ie!=="")return ie=ie.replace(R.allLineBreaks,`
`),!(re.type===D.DOT||re.type===D.RESERVED&&(re.text==="set"||re.text==="get"))&&Me.test(ie)?(ie==="in"||ie==="of")&&(re.type===D.WORD||re.type===D.STRING)?this._create_token(D.OPERATOR,ie):this._create_token(D.RESERVED,ie):this._create_token(D.WORD,ie);if(ie=this.__patterns.number.read(),ie!=="")return this._create_token(D.WORD,ie)},B.prototype._read_singles=function(re){var ie=null;return re==="("||re==="["?ie=this._create_token(D.START_EXPR,re):re===")"||re==="]"?ie=this._create_token(D.END_EXPR,re):re==="{"?ie=this._create_token(D.START_BLOCK,re):re==="}"?ie=this._create_token(D.END_BLOCK,re):re===";"?ie=this._create_token(D.SEMICOLON,re):re==="."&&ue.test(this._input.peek(1))?ie=this._create_token(D.DOT,re):re===","&&(ie=this._create_token(D.COMMA,re)),ie&&this._input.next(),ie},B.prototype._read_pair=function(re,ie){var se=null;return re==="#"&&ie==="{"&&(se=this._create_token(D.START_BLOCK,re+ie)),se&&(this._input.next(),this._input.next()),se},B.prototype._read_punctuation=function(){var re=this.__patterns.punct.read();if(re!=="")return re==="="?this._create_token(D.EQUALS,re):re==="?."?this._create_token(D.DOT,re):this._create_token(D.OPERATOR,re)},B.prototype._read_non_javascript=function(re){var ie="";if(re==="#"){if(this._is_first_token()&&(ie=this.__patterns.shebang.read(),ie))return this._create_token(D.UNKNOWN,ie.trim()+`
`);if(ie=this.__patterns.include.read(),ie)return this._create_token(D.UNKNOWN,ie.trim()+`
`);re=this._input.next();var se="#";if(this._input.hasNext()&&this._input.testChar(F)){do re=this._input.next(),se+=re;while(this._input.hasNext()&&re!=="#"&&re!=="=");return re==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(se+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(se+="{}",this._input.next(),this._input.next())),this._create_token(D.WORD,se)}this._input.back()}else if(re==="<"&&this._is_first_token()){if(ie=this.__patterns.html_comment_start.read(),ie){for(;this._input.hasNext()&&!this._input.testChar(R.newline);)ie+=this._input.next();return Y=!0,this._create_token(D.COMMENT,ie)}}else if(Y&&re==="-"&&(ie=this.__patterns.html_comment_end.read(),ie))return Y=!1,this._create_token(D.COMMENT,ie);return null},B.prototype._read_comment=function(re){var ie=null;if(re==="/"){var se="";if(this._input.peek(1)==="*"){se=this.__patterns.block_comment.read();var x=$.get_directives(se);x&&x.ignore==="start"&&(se+=$.readIgnored(this._input)),se=se.replace(R.allLineBreaks,`
`),ie=this._create_token(D.BLOCK_COMMENT,se),ie.directives=x}else this._input.peek(1)==="/"&&(se=this.__patterns.comment.read(),ie=this._create_token(D.COMMENT,se))}return ie},B.prototype._read_string=function(re){if(re==="`"||re==="'"||re==='"'){var ie=this._input.next();return this.has_char_escapes=!1,re==="`"?ie+=this._read_string_recursive("`",!0,"${"):ie+=this._read_string_recursive(re),this.has_char_escapes&&this._options.unescape_strings&&(ie=W(ie)),this._input.peek()===re&&(ie+=this._input.next()),ie=ie.replace(R.allLineBreaks,`
`),this._create_token(D.STRING,ie)}return null},B.prototype._allow_regexp_or_xml=function(re){return re.type===D.RESERVED&&K(re.text,["return","case","throw","else","do","typeof","yield"])||re.type===D.END_EXPR&&re.text===")"&&re.opened.previous.type===D.RESERVED&&K(re.opened.previous.text,["if","while","for"])||K(re.type,[D.COMMENT,D.START_EXPR,D.START_BLOCK,D.START,D.END_BLOCK,D.OPERATOR,D.EQUALS,D.EOF,D.SEMICOLON,D.COMMA])},B.prototype._read_regexp=function(re,ie){if(re==="/"&&this._allow_regexp_or_xml(ie)){for(var se=this._input.next(),x=!1,E=!1;this._input.hasNext()&&(x||E||this._input.peek()!==re)&&!this._input.testChar(R.newline);)se+=this._input.peek(),x?x=!1:(x=this._input.peek()==="\\",this._input.peek()==="["?E=!0:this._input.peek()==="]"&&(E=!1)),this._input.next();return this._input.peek()===re&&(se+=this._input.next(),se+=this._input.read(R.identifier)),this._create_token(D.STRING,se)}return null},B.prototype._read_xml=function(re,ie){if(this._options.e4x&&re==="<"&&this._allow_regexp_or_xml(ie)){var se="",x=this.__patterns.xml.read_match();if(x){for(var E=x[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=E.indexOf("{")===0,me=0;x;){var ze=!!x[1],Xe=x[2],_e=!!x[x.length-1]||Xe.slice(0,8)==="![CDATA[";if(!_e&&(Xe===E||V&&Xe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ze?--me:++me),se+=x[0],me<=0)break;x=this.__patterns.xml.read_match()}return x||(se+=this._input.match(/[\s\S]*/g)[0]),se=se.replace(R.allLineBreaks,`
`),this._create_token(D.STRING,se)}}return null};function W(re){for(var ie="",se=0,x=new k(re),E=null;x.hasNext();)if(E=x.match(/([\s]|[^\\]|\\\\)+/g),E&&(ie+=E[0]),x.peek()==="\\"){if(x.next(),x.peek()==="x")E=x.match(/x([0-9A-Fa-f]{2})/g);else if(x.peek()==="u")E=x.match(/u([0-9A-Fa-f]{4})/g),E||(E=x.match(/u\{([0-9A-Fa-f]+)\}/g));else{ie+="\\",x.hasNext()&&(ie+=x.next());continue}if(!E||(se=parseInt(E[1],16),se>126&&se<=255&&E[0].indexOf("x")===0))return re;se>=0&&se<32||se>1114111?ie+="\\"+E[0]:se===34||se===39||se===92?ie+="\\"+String.fromCharCode(se):ie+=String.fromCharCode(se)}return ie}B.prototype._read_string_recursive=function(re,ie,se){var x,E;re==="'"?E=this.__patterns.single_quote:re==='"'?E=this.__patterns.double_quote:re==="`"?E=this.__patterns.template_text:re==="}"&&(E=this.__patterns.template_expression);for(var V=E.read(),me="";this._input.hasNext();){if(me=this._input.next(),me===re||!ie&&R.newline.test(me)){this._input.back();break}else me==="\\"&&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(),me+=this._input.next()):se&&(se==="${"&&me==="$"&&this._input.peek()==="{"&&(me+=this._input.next()),se===me&&(re==="`"?me+=this._read_string_recursive("}",ie,"`"):me+=this._read_string_recursive("`",ie,"${"),this._input.hasNext()&&(me+=this._input.next())));me+=E.read(),V+=me}return V},ee.exports.Tokenizer=B,ee.exports.TOKEN=D,ee.exports.positionable_operators=he.slice(),ee.exports.line_starters=ke.slice()},function(ee){var o=RegExp.prototype.hasOwnProperty("sticky");function H(k){this.__input=k||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var k=null;return this.hasNext()&&(k=this.__input.charAt(this.__position),this.__position+=1),k},H.prototype.peek=function(k){var S=null;return k=k||0,k+=this.__position,k>=0&&k<this.__input_length&&(S=this.__input.charAt(k)),S},H.prototype.__match=function(k,S){k.lastIndex=S;var w=k.exec(this.__input);return w&&!(o&&k.sticky)&&w.index!==S&&(w=null),w},H.prototype.test=function(k,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(k,S):!1},H.prototype.testChar=function(k,S){var w=this.peek(S);return k.lastIndex=0,w!==null&&k.test(w)},H.prototype.match=function(k){var S=this.__match(k,this.__position);return S?this.__position+=S[0].length:S=null,S},H.prototype.read=function(k,S,w){var C="",R;return k&&(R=this.match(k),R&&(C+=R[0])),S&&(R||!k)&&(C+=this.readUntil(S,w)),C},H.prototype.readUntil=function(k,S){var w="",C=this.__position;k.lastIndex=this.__position;var R=k.exec(this.__input);return R?(C=R.index,S&&(C+=R[0].length)):C=this.__input_length,w=this.__input.substring(this.__position,C),this.__position=C,w},H.prototype.readUntilAfter=function(k){return this.readUntil(k,!0)},H.prototype.get_regexp=function(k,S){var w=null,C="g";return S&&o&&(C="y"),typeof k=="string"&&k!==""?w=new RegExp(k,C):k&&(w=new RegExp(k.source,C)),w},H.prototype.get_literal_regexp=function(k){return RegExp(k.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(k){var S=this.__position,w=this.readUntilAfter(k);return this.__position=S,w},H.prototype.lookBack=function(k){var S=this.__position-1;return S>=k.length&&this.__input.substring(S-k.length,S).toLowerCase()===k},ee.exports.InputScanner=H},function(ee,o,H){var k=H(8).InputScanner,S=H(3).Token,w=H(10).TokenStream,C=H(11).WhitespacePattern,R={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},q=function(Q,K){this._input=new k(Q),this._options=K||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new C(this._input)};q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new w,this._reset();for(var Q,K=new S(R.START,""),D=null,$=[],M=new w;K.type!==R.EOF;){for(Q=this._get_next_token(K,D);this._is_comment(Q);)M.add(Q),Q=this._get_next_token(K,D);M.isEmpty()||(Q.comments_before=M,M=new w),Q.parent=D,this._is_opening(Q)?($.push(D),D=Q):D&&this._is_closing(Q,D)&&(Q.opened=D,D.closed=Q,D=$.pop(),Q.parent=D),Q.previous=K,K.next=Q,this.__tokens.add(Q),K=Q}return this.__tokens},q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},q.prototype._reset=function(){},q.prototype._get_next_token=function(Q,K){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(R.RAW,D):this._create_token(R.EOF,"")},q.prototype._is_comment=function(Q){return!1},q.prototype._is_opening=function(Q){return!1},q.prototype._is_closing=function(Q,K){return!1},q.prototype._create_token=function(Q,K){var D=new S(Q,K,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ee.exports.Tokenizer=q,ee.exports.TOKEN=R},function(ee){function o(H){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=H}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 H=null;return this.hasNext()&&(H=this.__tokens[this.__position],this.__position+=1),H},o.prototype.peek=function(H){var k=null;return H=H||0,H+=this.__position,H>=0&&H<this.__tokens_length&&(k=this.__tokens[H]),k},o.prototype.add=function(H){this.__parent_token&&(H.parent=this.__parent_token),this.__tokens.push(H),this.__tokens_length+=1},ee.exports.TokenStream=o},function(ee,o,H){var k=H(12).Pattern;function S(w,C){k.call(this,w,C),C?this._line_regexp=this._input.get_regexp(C._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new k,S.prototype.__set_whitespace_patterns=function(w,C){w+="\\t ",C+="\\n\\r",this._match_pattern=this._input.get_regexp("["+w+C+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+C+"]")},S.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var w=this._input.read(this._match_pattern);if(w===" ")this.whitespace_before_token=" ";else if(w){var C=this.__split(this._newline_regexp,w);this.newline_count=C.length-1,this.whitespace_before_token=C[this.newline_count]}return w},S.prototype.matching=function(w,C){var R=this._create();return R.__set_whitespace_patterns(w,C),R._update(),R},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(w,C){w.lastIndex=0;for(var R=0,q=[],Q=w.exec(C);Q;)q.push(C.substring(R,Q.index)),R=Q.index+Q[0].length,Q=w.exec(C);return R<C.length?q.push(C.substring(R,C.length)):q.push(""),q},ee.exports.WhitespacePattern=S},function(ee){function o(H,k){this._input=H,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,k&&(this._starting_pattern=this._input.get_regexp(k._starting_pattern,!0),this._match_pattern=this._input.get_regexp(k._match_pattern,!0),this._until_pattern=this._input.get_regexp(k._until_pattern),this._until_after=k._until_after)}o.prototype.read=function(){var H=this._input.read(this._starting_pattern);return(!this._starting_pattern||H)&&(H+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),H},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(H){var k=this._create();return k._until_after=!0,k._until_pattern=this._input.get_regexp(H),k._update(),k},o.prototype.until=function(H){var k=this._create();return k._until_after=!1,k._until_pattern=this._input.get_regexp(H),k._update(),k},o.prototype.starting_with=function(H){var k=this._create();return k._starting_pattern=this._input.get_regexp(H,!0),k._update(),k},o.prototype.matching=function(H){var k=this._create();return k._match_pattern=this._input.get_regexp(H,!0),k._update(),k},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},ee.exports.Pattern=o},function(ee){function o(H,k){H=typeof H=="string"?H:H.source,k=typeof k=="string"?k:k.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+k,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+k,"g")}o.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var k={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(H);S;)k[S[1]]=S[2],S=this.__directive_pattern.exec(H);return k},o.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},ee.exports.Directives=o},function(ee,o,H){var k=H(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function w(C,R){k.call(this,C,R),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),R&&(this.__template_pattern=this._input.get_regexp(R.__template_pattern),this._excluded=Object.assign(this._excluded,R._excluded),this._disabled=Object.assign(this._disabled,R._disabled));var q=new k(C);this.__patterns={handlebars_comment:q.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:q.starting_with(/{{{/).until_after(/}}}/),handlebars:q.starting_with(/{{/).until_after(/}}/),php:q.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:q.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:q.starting_with(/{%/).until_after(/%}/),django_value:q.starting_with(/{{/).until_after(/}}/),django_comment:q.starting_with(/{#/).until_after(/#}/),smarty:q.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:q.starting_with(/{\*/).until_after(/\*}/),smarty_literal:q.starting_with(/{literal}/).until_after(/{\/literal}/)}}w.prototype=new k,w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){this.__set_templated_pattern()},w.prototype.disable=function(C){var R=this._create();return R._disabled[C]=!0,R._update(),R},w.prototype.read_options=function(C){var R=this._create();for(var q in S)R._disabled[q]=C.templating.indexOf(q)===-1;return R._update(),R},w.prototype.exclude=function(C){var R=this._create();return R._excluded[C]=!0,R._update(),R},w.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 R=this._read_template();R;)this._match_pattern?R+=this._input.read(this._match_pattern):R+=this._input.readUntil(this.__template_pattern),C+=R,R=this._read_template();return this._until_after&&(C+=this._input.readUntilAfter(this._until_pattern)),C},w.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("|")+")")},w.prototype._read_template=function(){var C="",R=this._input.peek();if(R==="<"){var q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&q==="?"&&(C=C||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&q==="%"&&(C=C||this.__patterns.erb.read())}else R==="{"&&(!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},ee.exports.TemplatablePattern=w}],G={};function g(ee){var o=G[ee];if(o!==void 0)return o.exports;var H=G[ee]={exports:{}};return ve[ee](H,H.exports,g),H.exports}var fe=g(0);de=fe})();var oe=de;b=[],m=function(){return{js_beautify:oe}}.apply(ct,b),m!==void 0&&(ln.exports=m)})()},15342:function(ln){(function(b,m){ln.exports=m()})(typeof self!="undefined"?self:this,function(){return function(ct){var b={};function m(de){if(b[de])return b[de].exports;var oe=b[de]={i:de,l:!1,exports:{}};return ct[de].call(oe.exports,oe,oe.exports,m),oe.l=!0,oe.exports}return m.m=ct,m.c=b,m.d=function(de,oe,ve){m.o(de,oe)||Object.defineProperty(de,oe,{enumerable:!0,get:ve})},m.r=function(de){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(de,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(de,"__esModule",{value:!0})},m.t=function(de,oe){if(oe&1&&(de=m(de)),oe&8||oe&4&&typeof de=="object"&&de&&de.__esModule)return de;var ve=Object.create(null);if(m.r(ve),Object.defineProperty(ve,"default",{enumerable:!0,value:de}),oe&2&&typeof de!="string")for(var G in de)m.d(ve,G,function(g){return de[g]}.bind(null,G));return ve},m.n=function(de){var oe=de&&de.__esModule?function(){return de.default}:function(){return de};return m.d(oe,"a",oe),oe},m.o=function(de,oe){return Object.prototype.hasOwnProperty.call(de,oe)},m.p="",m(m.s=1)}([function(ct,b,m){},function(ct,b,m){"use strict";m.r(b);var de=m(0),oe=function(){function z(u,h,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=h,this.end=f}return z.range=function(h,f){return f?!h||!h.loc||!f.loc||h.loc.lexer!==f.loc.lexer?null:new z(h.loc.lexer,h.loc.start,f.loc.end):h&&h.loc},z}(),ve=function(){function z(h,f){this.text=void 0,this.loc=void 0,this.text=h,this.loc=f}var u=z.prototype;return u.range=function(f,y){return new z(y,oe.range(this,f))},z}(),G=function z(u,h){this.position=void 0;var f="KaTeX parse error: "+u,y,I=h&&h.loc;if(I&&I.start<=I.end){var U=I.lexer.input;y=I.start;var ge=I.end;y===U.length?f+=" at end of input: ":f+=" at position "+(y+1)+": ";var Te=U.slice(y,ge).replace(/[^]/g,"$&\u0332"),Ze;y>15?Ze="\u2026"+U.slice(y-15,y):Ze=U.slice(0,y);var ft;ge+15<U.length?ft=U.slice(ge,ge+15)+"\u2026":ft=U.slice(ge),f+=Ze+Te+ft}var Nt=new Error(f);return Nt.name="ParseError",Nt.__proto__=z.prototype,Nt.position=y,Nt};G.prototype.__proto__=Error.prototype;var g=G,fe=function(u,h){return u.indexOf(h)!==-1},ee=function(u,h){return u===void 0?h:u},o=/([A-Z])/g,H=function(u){return u.replace(o,"-$1").toLowerCase()},k={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},S=/[&><"']/g;function w(z){return String(z).replace(S,function(u){return k[u]})}var C=function z(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?z(u.body[0]):u:u.type==="font"?z(u.body):u},R=function(u){var h=C(u);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},q=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},Q=function(u){var h=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(u);return h!=null?h[1]:"_relative"},K={contains:fe,deflt:ee,escape:w,hyphenate:H,getBaseElem:C,isCharacterBox:R,protocolFromUrl:Q},D=function(){function z(h){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,h=h||{},this.displayMode=K.deflt(h.displayMode,!1),this.output=K.deflt(h.output,"htmlAndMathml"),this.leqno=K.deflt(h.leqno,!1),this.fleqn=K.deflt(h.fleqn,!1),this.throwOnError=K.deflt(h.throwOnError,!0),this.errorColor=K.deflt(h.errorColor,"#cc0000"),this.macros=h.macros||{},this.minRuleThickness=Math.max(0,K.deflt(h.minRuleThickness,0)),this.colorIsTextColor=K.deflt(h.colorIsTextColor,!1),this.strict=K.deflt(h.strict,"warn"),this.trust=K.deflt(h.trust,!1),this.maxSize=Math.max(0,K.deflt(h.maxSize,1/0)),this.maxExpand=Math.max(0,K.deflt(h.maxExpand,1e3))}var u=z.prototype;return u.reportNonstrict=function(f,y,I){var U=this.strict;if(typeof U=="function"&&(U=U(f,y,I)),!(!U||U==="ignore")){if(U===!0||U==="error")throw new g("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+f+"]"),I);U==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+U+"': "+y+" ["+f+"]"))}},u.useStrictBehavior=function(f,y,I){var U=this.strict;if(typeof U=="function")try{U=U(f,y,I)}catch(ge){U="error"}return!U||U==="ignore"?!1:U===!0||U==="error"?!0:U==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+U+"': "+y+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=K.protocolFromUrl(f.url));var y=typeof this.trust=="function"?this.trust(f):this.trust;return!!y},z}(),$=function(){function z(h,f,y){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=f,this.cramped=y}var u=z.prototype;return u.sup=function(){return Me[Y[this.id]]},u.sub=function(){return Me[B[this.id]]},u.fracNum=function(){return Me[W[this.id]]},u.fracDen=function(){return Me[re[this.id]]},u.cramp=function(){return Me[ie[this.id]]},u.text=function(){return Me[se[this.id]]},u.isTight=function(){return this.size>=2},z}(),M=0,F=1,ue=2,he=3,le=4,Se=5,ke=6,De=7,Me=[new $(M,0,!1),new $(F,0,!0),new $(ue,1,!1),new $(he,1,!0),new $(le,2,!1),new $(Se,2,!0),new $(ke,3,!1),new $(De,3,!0)],Y=[le,Se,le,Se,ke,De,ke,De],B=[Se,Se,Se,Se,De,De,De,De],W=[ue,he,le,Se,ke,De,ke,De],re=[he,he,Se,Se,De,De,De,De],ie=[F,F,he,he,Se,Se,De,De],se=[M,F,ue,he,ue,he,ue,he],x={DISPLAY:Me[M],TEXT:Me[ue],SCRIPT:Me[le],SCRIPTSCRIPT:Me[ke]},E=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V(z){for(var u=0;u<E.length;u++)for(var h=E[u],f=0;f<h.blocks.length;f++){var y=h.blocks[f];if(z>=y[0]&&z<=y[1])return h.name}return null}var me=[];E.forEach(function(z){return z.blocks.forEach(function(u){return me.push.apply(me,u)})});function ze(z){for(var u=0;u<me.length;u+=2)if(z>=me[u]&&z<=me[u+1])return!0;return!1}var Xe=80,_e=function(u,h){return"M95,"+(622+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"h-400000z"},Ke=function(u,h){return"M263,"+(601+u+h)+`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)+" "+h+"h400000v"+(40+u)+"h-400000z"},Qe=function(u,h){return"M983 "+(10+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"h-400000z"},st=function(u,h){return"M424,"+(2398+u+h)+`
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)+" "+h+`
h400000v`+(40+u)+"h-400000z"},rt=function(u,h){return"M473,"+(2713+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"H1017.7z"},Vt=function(u,h,f){var y=f-54-h-u;return"M702 "+(u+h)+"H400000"+(40+u)+`
H742v`+y+`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 `+h+"H400000v"+(40+u)+"H742z"},qe=function(u,h,f){h=1e3*h;var y="";switch(u){case"sqrtMain":y=_e(h,Xe);break;case"sqrtSize1":y=Ke(h,Xe);break;case"sqrtSize2":y=Qe(h,Xe);break;case"sqrtSize3":y=st(h,Xe);break;case"sqrtSize4":y=rt(h,Xe);break;case"sqrtTall":y=Vt(h,Xe,f)}return y},Kt={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`},je=function(){function z(h){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=h,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=z.prototype;return u.hasClass=function(f){return K.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),y=0;y<this.children.length;y++)f.appendChild(this.children[y].toNode());return f},u.toMarkup=function(){for(var f="",y=0;y<this.children.length;y++)f+=this.children[y].toMarkup();return f},u.toText=function(){var f=function(I){return I.toText()};return this.children.map(f).join("")},z}(),Tt=function(u){return u.filter(function(h){return h}).join(" ")},Re=function(u,h,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},h){h.style.isTight()&&this.classes.push("mtight");var y=h.getColor();y&&(this.style.color=y)}},Ce=function(u){var h=document.createElement(u);h.className=Tt(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(h.style[f]=this.style[f]);for(var y in this.attributes)this.attributes.hasOwnProperty(y)&&h.setAttribute(y,this.attributes[y]);for(var I=0;I<this.children.length;I++)h.appendChild(this.children[I].toNode());return h},ce=function(u){var h="<"+u;this.classes.length&&(h+=' class="'+K.escape(Tt(this.classes))+'"');var f="";for(var y in this.style)this.style.hasOwnProperty(y)&&(f+=K.hyphenate(y)+":"+this.style[y]+";");f&&(h+=' style="'+K.escape(f)+'"');for(var I in this.attributes)this.attributes.hasOwnProperty(I)&&(h+=" "+I+'="'+K.escape(this.attributes[I])+'"');h+=">";for(var U=0;U<this.children.length;U++)h+=this.children[U].toMarkup();return h+="</"+u+">",h},Je=function(){function z(h,f,y,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,h,y,I),this.children=f||[]}var u=z.prototype;return u.setAttribute=function(f,y){this.attributes[f]=y},u.hasClass=function(f){return K.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"span")},u.toMarkup=function(){return ce.call(this,"span")},z}(),Le=function(){function z(h,f,y,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=y||[],this.setAttribute("href",h)}var u=z.prototype;return u.setAttribute=function(f,y){this.attributes[f]=y},u.hasClass=function(f){return K.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"a")},u.toMarkup=function(){return ce.call(this,"a")},z}(),Ie=function(){function z(h,f,y){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=h,this.classes=["mord"],this.style=y}var u=z.prototype;return u.hasClass=function(f){return K.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 y in this.style)this.style.hasOwnProperty(y)&&(f.style[y]=this.style[y]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",y="";for(var I in this.style)this.style.hasOwnProperty(I)&&(y+=K.hyphenate(I)+":"+this.style[I]+";");return y&&(f+=' style="'+K.escape(y)+'"'),f+="'/>",f},z}(),P={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},pe=function(){function z(h,f,y,I,U,ge,Te,Ze){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=h,this.height=f||0,this.depth=y||0,this.italic=I||0,this.skew=U||0,this.width=ge||0,this.classes=Te||[],this.style=Ze||{},this.maxFontSize=0;var ft=V(this.text.charCodeAt(0));ft&&this.classes.push(ft+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=P[this.text])}var u=z.prototype;return u.hasClass=function(f){return K.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),y=null;this.italic>0&&(y=document.createElement("span"),y.style.marginRight=this.italic+"em"),this.classes.length>0&&(y=y||document.createElement("span"),y.className=Tt(this.classes));for(var I in this.style)this.style.hasOwnProperty(I)&&(y=y||document.createElement("span"),y.style[I]=this.style[I]);return y?(y.appendChild(f),y):f},u.toMarkup=function(){var f=!1,y="<span";this.classes.length&&(f=!0,y+=' class="',y+=K.escape(Tt(this.classes)),y+='"');var I="";this.italic>0&&(I+="margin-right:"+this.italic+"em;");for(var U in this.style)this.style.hasOwnProperty(U)&&(I+=K.hyphenate(U)+":"+this.style[U]+";");I&&(f=!0,y+=' style="'+K.escape(I)+'"');var ge=K.escape(this.text);return f?(y+=">",y+=ge,y+="</span>",y):ge},z}(),xe=function(){function z(h,f){this.children=void 0,this.attributes=void 0,this.children=h||[],this.attributes=f||{}}var u=z.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"svg");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&y.setAttribute(I,this.attributes[I]);for(var U=0;U<this.children.length;U++)y.appendChild(this.children[U].toNode());return y},u.toMarkup=function(){var f="<svg";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");f+=">";for(var I=0;I<this.children.length;I++)f+=this.children[I].toMarkup();return f+="</svg>",f},z}(),He=function(){function z(h,f){this.pathName=void 0,this.alternate=void 0,this.pathName=h,this.alternate=f}var u=z.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"path");return this.alternate?y.setAttribute("d",this.alternate):y.setAttribute("d",Kt[this.pathName]),y},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Kt[this.pathName]+"'/>"},z}(),et=function(){function z(h){this.attributes=void 0,this.attributes=h||{}}var u=z.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"line");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&y.setAttribute(I,this.attributes[I]);return y},u.toMarkup=function(){var f="<line";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");return f+="/>",f},z}();function ut(z){if(z instanceof pe)return z;throw new Error("Expected symbolNode but got "+String(z)+".")}function xt(z){if(z instanceof Je)return z;throw new Error("Expected span<HtmlDomNode> but got "+String(z)+".")}var Lt={"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]}},Et={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]},Mt={\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 Yt(z,u){Lt[z]=u}function jt(z,u,h){if(!Lt[u])throw new Error("Font metrics not found for font: "+u+".");var f=z.charCodeAt(0),y=Lt[u][f];if(!y&&z[0]in Mt&&(f=Mt[z[0]].charCodeAt(0),y=Lt[u][f]),!y&&h==="text"&&ze(f)&&(y=Lt[u][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}var $t={};function it(z){var u;if(z>=5?u=0:z>=3?u=1:u=2,!$t[u]){var h=$t[u]={cssEmPerMu:Et.quad[u]/18};for(var f in Et)Et.hasOwnProperty(f)&&(h[f]=Et[f][u])}return $t[u]}var It={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Rt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ye={math:{},text:{}},Ve=ye;function _(z,u,h,f,y,I){ye[z][y]={font:u,group:h,replace:f},I&&f&&(ye[z][f]=ye[z][y])}var A="math",Oe="text",N="main",ae="ams",St="accent-token",Ee="bin",$e="close",Ge="inner",Z="mathord",J="op-token",be="open",Pe="punct",j="rel",Ye="spacing",X="textord";_(A,N,j,"\u2261","\\equiv",!0),_(A,N,j,"\u227A","\\prec",!0),_(A,N,j,"\u227B","\\succ",!0),_(A,N,j,"\u223C","\\sim",!0),_(A,N,j,"\u22A5","\\perp"),_(A,N,j,"\u2AAF","\\preceq",!0),_(A,N,j,"\u2AB0","\\succeq",!0),_(A,N,j,"\u2243","\\simeq",!0),_(A,N,j,"\u2223","\\mid",!0),_(A,N,j,"\u226A","\\ll",!0),_(A,N,j,"\u226B","\\gg",!0),_(A,N,j,"\u224D","\\asymp",!0),_(A,N,j,"\u2225","\\parallel"),_(A,N,j,"\u22C8","\\bowtie",!0),_(A,N,j,"\u2323","\\smile",!0),_(A,N,j,"\u2291","\\sqsubseteq",!0),_(A,N,j,"\u2292","\\sqsupseteq",!0),_(A,N,j,"\u2250","\\doteq",!0),_(A,N,j,"\u2322","\\frown",!0),_(A,N,j,"\u220B","\\ni",!0),_(A,N,j,"\u221D","\\propto",!0),_(A,N,j,"\u22A2","\\vdash",!0),_(A,N,j,"\u22A3","\\dashv",!0),_(A,N,j,"\u220B","\\owns"),_(A,N,Pe,".","\\ldotp"),_(A,N,Pe,"\u22C5","\\cdotp"),_(A,N,X,"#","\\#"),_(Oe,N,X,"#","\\#"),_(A,N,X,"&","\\&"),_(Oe,N,X,"&","\\&"),_(A,N,X,"\u2135","\\aleph",!0),_(A,N,X,"\u2200","\\forall",!0),_(A,N,X,"\u210F","\\hbar",!0),_(A,N,X,"\u2203","\\exists",!0),_(A,N,X,"\u2207","\\nabla",!0),_(A,N,X,"\u266D","\\flat",!0),_(A,N,X,"\u2113","\\ell",!0),_(A,N,X,"\u266E","\\natural",!0),_(A,N,X,"\u2663","\\clubsuit",!0),_(A,N,X,"\u2118","\\wp",!0),_(A,N,X,"\u266F","\\sharp",!0),_(A,N,X,"\u2662","\\diamondsuit",!0),_(A,N,X,"\u211C","\\Re",!0),_(A,N,X,"\u2661","\\heartsuit",!0),_(A,N,X,"\u2111","\\Im",!0),_(A,N,X,"\u2660","\\spadesuit",!0),_(Oe,N,X,"\xA7","\\S",!0),_(Oe,N,X,"\xB6","\\P",!0),_(A,N,X,"\u2020","\\dag"),_(Oe,N,X,"\u2020","\\dag"),_(Oe,N,X,"\u2020","\\textdagger"),_(A,N,X,"\u2021","\\ddag"),_(Oe,N,X,"\u2021","\\ddag"),_(Oe,N,X,"\u2021","\\textdaggerdbl"),_(A,N,$e,"\u23B1","\\rmoustache",!0),_(A,N,be,"\u23B0","\\lmoustache",!0),_(A,N,$e,"\u27EF","\\rgroup",!0),_(A,N,be,"\u27EE","\\lgroup",!0),_(A,N,Ee,"\u2213","\\mp",!0),_(A,N,Ee,"\u2296","\\ominus",!0),_(A,N,Ee,"\u228E","\\uplus",!0),_(A,N,Ee,"\u2293","\\sqcap",!0),_(A,N,Ee,"\u2217","\\ast"),_(A,N,Ee,"\u2294","\\sqcup",!0),_(A,N,Ee,"\u25EF","\\bigcirc"),_(A,N,Ee,"\u2219","\\bullet"),_(A,N,Ee,"\u2021","\\ddagger"),_(A,N,Ee,"\u2240","\\wr",!0),_(A,N,Ee,"\u2A3F","\\amalg"),_(A,N,Ee,"&","\\And"),_(A,N,j,"\u27F5","\\longleftarrow",!0),_(A,N,j,"\u21D0","\\Leftarrow",!0),_(A,N,j,"\u27F8","\\Longleftarrow",!0),_(A,N,j,"\u27F6","\\longrightarrow",!0),_(A,N,j,"\u21D2","\\Rightarrow",!0),_(A,N,j,"\u27F9","\\Longrightarrow",!0),_(A,N,j,"\u2194","\\leftrightarrow",!0),_(A,N,j,"\u27F7","\\longleftrightarrow",!0),_(A,N,j,"\u21D4","\\Leftrightarrow",!0),_(A,N,j,"\u27FA","\\Longleftrightarrow",!0),_(A,N,j,"\u21A6","\\mapsto",!0),_(A,N,j,"\u27FC","\\longmapsto",!0),_(A,N,j,"\u2197","\\nearrow",!0),_(A,N,j,"\u21A9","\\hookleftarrow",!0),_(A,N,j,"\u21AA","\\hookrightarrow",!0),_(A,N,j,"\u2198","\\searrow",!0),_(A,N,j,"\u21BC","\\leftharpoonup",!0),_(A,N,j,"\u21C0","\\rightharpoonup",!0),_(A,N,j,"\u2199","\\swarrow",!0),_(A,N,j,"\u21BD","\\leftharpoondown",!0),_(A,N,j,"\u21C1","\\rightharpoondown",!0),_(A,N,j,"\u2196","\\nwarrow",!0),_(A,N,j,"\u21CC","\\rightleftharpoons",!0),_(A,ae,j,"\u226E","\\nless",!0),_(A,ae,j,"\uE010","\\@nleqslant"),_(A,ae,j,"\uE011","\\@nleqq"),_(A,ae,j,"\u2A87","\\lneq",!0),_(A,ae,j,"\u2268","\\lneqq",!0),_(A,ae,j,"\uE00C","\\@lvertneqq"),_(A,ae,j,"\u22E6","\\lnsim",!0),_(A,ae,j,"\u2A89","\\lnapprox",!0),_(A,ae,j,"\u2280","\\nprec",!0),_(A,ae,j,"\u22E0","\\npreceq",!0),_(A,ae,j,"\u22E8","\\precnsim",!0),_(A,ae,j,"\u2AB9","\\precnapprox",!0),_(A,ae,j,"\u2241","\\nsim",!0),_(A,ae,j,"\uE006","\\@nshortmid"),_(A,ae,j,"\u2224","\\nmid",!0),_(A,ae,j,"\u22AC","\\nvdash",!0),_(A,ae,j,"\u22AD","\\nvDash",!0),_(A,ae,j,"\u22EA","\\ntriangleleft"),_(A,ae,j,"\u22EC","\\ntrianglelefteq",!0),_(A,ae,j,"\u228A","\\subsetneq",!0),_(A,ae,j,"\uE01A","\\@varsubsetneq"),_(A,ae,j,"\u2ACB","\\subsetneqq",!0),_(A,ae,j,"\uE017","\\@varsubsetneqq"),_(A,ae,j,"\u226F","\\ngtr",!0),_(A,ae,j,"\uE00F","\\@ngeqslant"),_(A,ae,j,"\uE00E","\\@ngeqq"),_(A,ae,j,"\u2A88","\\gneq",!0),_(A,ae,j,"\u2269","\\gneqq",!0),_(A,ae,j,"\uE00D","\\@gvertneqq"),_(A,ae,j,"\u22E7","\\gnsim",!0),_(A,ae,j,"\u2A8A","\\gnapprox",!0),_(A,ae,j,"\u2281","\\nsucc",!0),_(A,ae,j,"\u22E1","\\nsucceq",!0),_(A,ae,j,"\u22E9","\\succnsim",!0),_(A,ae,j,"\u2ABA","\\succnapprox",!0),_(A,ae,j,"\u2246","\\ncong",!0),_(A,ae,j,"\uE007","\\@nshortparallel"),_(A,ae,j,"\u2226","\\nparallel",!0),_(A,ae,j,"\u22AF","\\nVDash",!0),_(A,ae,j,"\u22EB","\\ntriangleright"),_(A,ae,j,"\u22ED","\\ntrianglerighteq",!0),_(A,ae,j,"\uE018","\\@nsupseteqq"),_(A,ae,j,"\u228B","\\supsetneq",!0),_(A,ae,j,"\uE01B","\\@varsupsetneq"),_(A,ae,j,"\u2ACC","\\supsetneqq",!0),_(A,ae,j,"\uE019","\\@varsupsetneqq"),_(A,ae,j,"\u22AE","\\nVdash",!0),_(A,ae,j,"\u2AB5","\\precneqq",!0),_(A,ae,j,"\u2AB6","\\succneqq",!0),_(A,ae,j,"\uE016","\\@nsubseteqq"),_(A,ae,Ee,"\u22B4","\\unlhd"),_(A,ae,Ee,"\u22B5","\\unrhd"),_(A,ae,j,"\u219A","\\nleftarrow",!0),_(A,ae,j,"\u219B","\\nrightarrow",!0),_(A,ae,j,"\u21CD","\\nLeftarrow",!0),_(A,ae,j,"\u21CF","\\nRightarrow",!0),_(A,ae,j,"\u21AE","\\nleftrightarrow",!0),_(A,ae,j,"\u21CE","\\nLeftrightarrow",!0),_(A,ae,j,"\u25B3","\\vartriangle"),_(A,ae,X,"\u210F","\\hslash"),_(A,ae,X,"\u25BD","\\triangledown"),_(A,ae,X,"\u25CA","\\lozenge"),_(A,ae,X,"\u24C8","\\circledS"),_(A,ae,X,"\xAE","\\circledR"),_(Oe,ae,X,"\xAE","\\circledR"),_(A,ae,X,"\u2221","\\measuredangle",!0),_(A,ae,X,"\u2204","\\nexists"),_(A,ae,X,"\u2127","\\mho"),_(A,ae,X,"\u2132","\\Finv",!0),_(A,ae,X,"\u2141","\\Game",!0),_(A,ae,X,"\u2035","\\backprime"),_(A,ae,X,"\u25B2","\\blacktriangle"),_(A,ae,X,"\u25BC","\\blacktriangledown"),_(A,ae,X,"\u25A0","\\blacksquare"),_(A,ae,X,"\u29EB","\\blacklozenge"),_(A,ae,X,"\u2605","\\bigstar"),_(A,ae,X,"\u2222","\\sphericalangle",!0),_(A,ae,X,"\u2201","\\complement",!0),_(A,ae,X,"\xF0","\\eth",!0),_(A,ae,X,"\u2571","\\diagup"),_(A,ae,X,"\u2572","\\diagdown"),_(A,ae,X,"\u25A1","\\square"),_(A,ae,X,"\u25A1","\\Box"),_(A,ae,X,"\u25CA","\\Diamond"),_(A,ae,X,"\xA5","\\yen",!0),_(Oe,ae,X,"\xA5","\\yen",!0),_(A,ae,X,"\u2713","\\checkmark",!0),_(Oe,ae,X,"\u2713","\\checkmark"),_(A,ae,X,"\u2136","\\beth",!0),_(A,ae,X,"\u2138","\\daleth",!0),_(A,ae,X,"\u2137","\\gimel",!0),_(A,ae,X,"\u03DD","\\digamma",!0),_(A,ae,X,"\u03F0","\\varkappa"),_(A,ae,be,"\u250C","\\ulcorner",!0),_(A,ae,$e,"\u2510","\\urcorner",!0),_(A,ae,be,"\u2514","\\llcorner",!0),_(A,ae,$e,"\u2518","\\lrcorner",!0),_(A,ae,j,"\u2266","\\leqq",!0),_(A,ae,j,"\u2A7D","\\leqslant",!0),_(A,ae,j,"\u2A95","\\eqslantless",!0),_(A,ae,j,"\u2272","\\lesssim",!0),_(A,ae,j,"\u2A85","\\lessapprox",!0),_(A,ae,j,"\u224A","\\approxeq",!0),_(A,ae,Ee,"\u22D6","\\lessdot"),_(A,ae,j,"\u22D8","\\lll",!0),_(A,ae,j,"\u2276","\\lessgtr",!0),_(A,ae,j,"\u22DA","\\lesseqgtr",!0),_(A,ae,j,"\u2A8B","\\lesseqqgtr",!0),_(A,ae,j,"\u2251","\\doteqdot"),_(A,ae,j,"\u2253","\\risingdotseq",!0),_(A,ae,j,"\u2252","\\fallingdotseq",!0),_(A,ae,j,"\u223D","\\backsim",!0),_(A,ae,j,"\u22CD","\\backsimeq",!0),_(A,ae,j,"\u2AC5","\\subseteqq",!0),_(A,ae,j,"\u22D0","\\Subset",!0),_(A,ae,j,"\u228F","\\sqsubset",!0),_(A,ae,j,"\u227C","\\preccurlyeq",!0),_(A,ae,j,"\u22DE","\\curlyeqprec",!0),_(A,ae,j,"\u227E","\\precsim",!0),_(A,ae,j,"\u2AB7","\\precapprox",!0),_(A,ae,j,"\u22B2","\\vartriangleleft"),_(A,ae,j,"\u22B4","\\trianglelefteq"),_(A,ae,j,"\u22A8","\\vDash",!0),_(A,ae,j,"\u22AA","\\Vvdash",!0),_(A,ae,j,"\u2323","\\smallsmile"),_(A,ae,j,"\u2322","\\smallfrown"),_(A,ae,j,"\u224F","\\bumpeq",!0),_(A,ae,j,"\u224E","\\Bumpeq",!0),_(A,ae,j,"\u2267","\\geqq",!0),_(A,ae,j,"\u2A7E","\\geqslant",!0),_(A,ae,j,"\u2A96","\\eqslantgtr",!0),_(A,ae,j,"\u2273","\\gtrsim",!0),_(A,ae,j,"\u2A86","\\gtrapprox",!0),_(A,ae,Ee,"\u22D7","\\gtrdot"),_(A,ae,j,"\u22D9","\\ggg",!0),_(A,ae,j,"\u2277","\\gtrless",!0),_(A,ae,j,"\u22DB","\\gtreqless",!0),_(A,ae,j,"\u2A8C","\\gtreqqless",!0),_(A,ae,j,"\u2256","\\eqcirc",!0),_(A,ae,j,"\u2257","\\circeq",!0),_(A,ae,j,"\u225C","\\triangleq",!0),_(A,ae,j,"\u223C","\\thicksim"),_(A,ae,j,"\u2248","\\thickapprox"),_(A,ae,j,"\u2AC6","\\supseteqq",!0),_(A,ae,j,"\u22D1","\\Supset",!0),_(A,ae,j,"\u2290","\\sqsupset",!0),_(A,ae,j,"\u227D","\\succcurlyeq",!0),_(A,ae,j,"\u22DF","\\curlyeqsucc",!0),_(A,ae,j,"\u227F","\\succsim",!0),_(A,ae,j,"\u2AB8","\\succapprox",!0),_(A,ae,j,"\u22B3","\\vartriangleright"),_(A,ae,j,"\u22B5","\\trianglerighteq"),_(A,ae,j,"\u22A9","\\Vdash",!0),_(A,ae,j,"\u2223","\\shortmid"),_(A,ae,j,"\u2225","\\shortparallel"),_(A,ae,j,"\u226C","\\between",!0),_(A,ae,j,"\u22D4","\\pitchfork",!0),_(A,ae,j,"\u221D","\\varpropto"),_(A,ae,j,"\u25C0","\\blacktriangleleft"),_(A,ae,j,"\u2234","\\therefore",!0),_(A,ae,j,"\u220D","\\backepsilon"),_(A,ae,j,"\u25B6","\\blacktriangleright"),_(A,ae,j,"\u2235","\\because",!0),_(A,ae,j,"\u22D8","\\llless"),_(A,ae,j,"\u22D9","\\gggtr"),_(A,ae,Ee,"\u22B2","\\lhd"),_(A,ae,Ee,"\u22B3","\\rhd"),_(A,ae,j,"\u2242","\\eqsim",!0),_(A,N,j,"\u22C8","\\Join"),_(A,ae,j,"\u2251","\\Doteq",!0),_(A,ae,Ee,"\u2214","\\dotplus",!0),_(A,ae,Ee,"\u2216","\\smallsetminus"),_(A,ae,Ee,"\u22D2","\\Cap",!0),_(A,ae,Ee,"\u22D3","\\Cup",!0),_(A,ae,Ee,"\u2A5E","\\doublebarwedge",!0),_(A,ae,Ee,"\u229F","\\boxminus",!0),_(A,ae,Ee,"\u229E","\\boxplus",!0),_(A,ae,Ee,"\u22C7","\\divideontimes",!0),_(A,ae,Ee,"\u22C9","\\ltimes",!0),_(A,ae,Ee,"\u22CA","\\rtimes",!0),_(A,ae,Ee,"\u22CB","\\leftthreetimes",!0),_(A,ae,Ee,"\u22CC","\\rightthreetimes",!0),_(A,ae,Ee,"\u22CF","\\curlywedge",!0),_(A,ae,Ee,"\u22CE","\\curlyvee",!0),_(A,ae,Ee,"\u229D","\\circleddash",!0),_(A,ae,Ee,"\u229B","\\circledast",!0),_(A,ae,Ee,"\u22C5","\\centerdot"),_(A,ae,Ee,"\u22BA","\\intercal",!0),_(A,ae,Ee,"\u22D2","\\doublecap"),_(A,ae,Ee,"\u22D3","\\doublecup"),_(A,ae,Ee,"\u22A0","\\boxtimes",!0),_(A,ae,j,"\u21E2","\\dashrightarrow",!0),_(A,ae,j,"\u21E0","\\dashleftarrow",!0),_(A,ae,j,"\u21C7","\\leftleftarrows",!0),_(A,ae,j,"\u21C6","\\leftrightarrows",!0),_(A,ae,j,"\u21DA","\\Lleftarrow",!0),_(A,ae,j,"\u219E","\\twoheadleftarrow",!0),_(A,ae,j,"\u21A2","\\leftarrowtail",!0),_(A,ae,j,"\u21AB","\\looparrowleft",!0),_(A,ae,j,"\u21CB","\\leftrightharpoons",!0),_(A,ae,j,"\u21B6","\\curvearrowleft",!0),_(A,ae,j,"\u21BA","\\circlearrowleft",!0),_(A,ae,j,"\u21B0","\\Lsh",!0),_(A,ae,j,"\u21C8","\\upuparrows",!0),_(A,ae,j,"\u21BF","\\upharpoonleft",!0),_(A,ae,j,"\u21C3","\\downharpoonleft",!0),_(A,ae,j,"\u22B8","\\multimap",!0),_(A,ae,j,"\u21AD","\\leftrightsquigarrow",!0),_(A,ae,j,"\u21C9","\\rightrightarrows",!0),_(A,ae,j,"\u21C4","\\rightleftarrows",!0),_(A,ae,j,"\u21A0","\\twoheadrightarrow",!0),_(A,ae,j,"\u21A3","\\rightarrowtail",!0),_(A,ae,j,"\u21AC","\\looparrowright",!0),_(A,ae,j,"\u21B7","\\curvearrowright",!0),_(A,ae,j,"\u21BB","\\circlearrowright",!0),_(A,ae,j,"\u21B1","\\Rsh",!0),_(A,ae,j,"\u21CA","\\downdownarrows",!0),_(A,ae,j,"\u21BE","\\upharpoonright",!0),_(A,ae,j,"\u21C2","\\downharpoonright",!0),_(A,ae,j,"\u21DD","\\rightsquigarrow",!0),_(A,ae,j,"\u21DD","\\leadsto"),_(A,ae,j,"\u21DB","\\Rrightarrow",!0),_(A,ae,j,"\u21BE","\\restriction"),_(A,N,X,"\u2018","`"),_(A,N,X,"$","\\$"),_(Oe,N,X,"$","\\$"),_(Oe,N,X,"$","\\textdollar"),_(A,N,X,"%","\\%"),_(Oe,N,X,"%","\\%"),_(A,N,X,"_","\\_"),_(Oe,N,X,"_","\\_"),_(Oe,N,X,"_","\\textunderscore"),_(A,N,X,"\u2220","\\angle",!0),_(A,N,X,"\u221E","\\infty",!0),_(A,N,X,"\u2032","\\prime"),_(A,N,X,"\u25B3","\\triangle"),_(A,N,X,"\u0393","\\Gamma",!0),_(A,N,X,"\u0394","\\Delta",!0),_(A,N,X,"\u0398","\\Theta",!0),_(A,N,X,"\u039B","\\Lambda",!0),_(A,N,X,"\u039E","\\Xi",!0),_(A,N,X,"\u03A0","\\Pi",!0),_(A,N,X,"\u03A3","\\Sigma",!0),_(A,N,X,"\u03A5","\\Upsilon",!0),_(A,N,X,"\u03A6","\\Phi",!0),_(A,N,X,"\u03A8","\\Psi",!0),_(A,N,X,"\u03A9","\\Omega",!0),_(A,N,X,"A","\u0391"),_(A,N,X,"B","\u0392"),_(A,N,X,"E","\u0395"),_(A,N,X,"Z","\u0396"),_(A,N,X,"H","\u0397"),_(A,N,X,"I","\u0399"),_(A,N,X,"K","\u039A"),_(A,N,X,"M","\u039C"),_(A,N,X,"N","\u039D"),_(A,N,X,"O","\u039F"),_(A,N,X,"P","\u03A1"),_(A,N,X,"T","\u03A4"),_(A,N,X,"X","\u03A7"),_(A,N,X,"\xAC","\\neg",!0),_(A,N,X,"\xAC","\\lnot"),_(A,N,X,"\u22A4","\\top"),_(A,N,X,"\u22A5","\\bot"),_(A,N,X,"\u2205","\\emptyset"),_(A,ae,X,"\u2205","\\varnothing"),_(A,N,Z,"\u03B1","\\alpha",!0),_(A,N,Z,"\u03B2","\\beta",!0),_(A,N,Z,"\u03B3","\\gamma",!0),_(A,N,Z,"\u03B4","\\delta",!0),_(A,N,Z,"\u03F5","\\epsilon",!0),_(A,N,Z,"\u03B6","\\zeta",!0),_(A,N,Z,"\u03B7","\\eta",!0),_(A,N,Z,"\u03B8","\\theta",!0),_(A,N,Z,"\u03B9","\\iota",!0),_(A,N,Z,"\u03BA","\\kappa",!0),_(A,N,Z,"\u03BB","\\lambda",!0),_(A,N,Z,"\u03BC","\\mu",!0),_(A,N,Z,"\u03BD","\\nu",!0),_(A,N,Z,"\u03BE","\\xi",!0),_(A,N,Z,"\u03BF","\\omicron",!0),_(A,N,Z,"\u03C0","\\pi",!0),_(A,N,Z,"\u03C1","\\rho",!0),_(A,N,Z,"\u03C3","\\sigma",!0),_(A,N,Z,"\u03C4","\\tau",!0),_(A,N,Z,"\u03C5","\\upsilon",!0),_(A,N,Z,"\u03D5","\\phi",!0),_(A,N,Z,"\u03C7","\\chi",!0),_(A,N,Z,"\u03C8","\\psi",!0),_(A,N,Z,"\u03C9","\\omega",!0),_(A,N,Z,"\u03B5","\\varepsilon",!0),_(A,N,Z,"\u03D1","\\vartheta",!0),_(A,N,Z,"\u03D6","\\varpi",!0),_(A,N,Z,"\u03F1","\\varrho",!0),_(A,N,Z,"\u03C2","\\varsigma",!0),_(A,N,Z,"\u03C6","\\varphi",!0),_(A,N,Ee,"\u2217","*"),_(A,N,Ee,"+","+"),_(A,N,Ee,"\u2212","-"),_(A,N,Ee,"\u22C5","\\cdot",!0),_(A,N,Ee,"\u2218","\\circ"),_(A,N,Ee,"\xF7","\\div",!0),_(A,N,Ee,"\xB1","\\pm",!0),_(A,N,Ee,"\xD7","\\times",!0),_(A,N,Ee,"\u2229","\\cap",!0),_(A,N,Ee,"\u222A","\\cup",!0),_(A,N,Ee,"\u2216","\\setminus"),_(A,N,Ee,"\u2227","\\land"),_(A,N,Ee,"\u2228","\\lor"),_(A,N,Ee,"\u2227","\\wedge",!0),_(A,N,Ee,"\u2228","\\vee",!0),_(A,N,X,"\u221A","\\surd"),_(A,N,be,"(","("),_(A,N,be,"[","["),_(A,N,be,"\u27E8","\\langle",!0),_(A,N,be,"\u2223","\\lvert"),_(A,N,be,"\u2225","\\lVert"),_(A,N,$e,")",")"),_(A,N,$e,"]","]"),_(A,N,$e,"?","?"),_(A,N,$e,"!","!"),_(A,N,$e,"\u27E9","\\rangle",!0),_(A,N,$e,"\u2223","\\rvert"),_(A,N,$e,"\u2225","\\rVert"),_(A,N,j,"=","="),_(A,N,j,"<","<"),_(A,N,j,">",">"),_(A,N,j,":",":"),_(A,N,j,"\u2248","\\approx",!0),_(A,N,j,"\u2245","\\cong",!0),_(A,N,j,"\u2265","\\ge"),_(A,N,j,"\u2265","\\geq",!0),_(A,N,j,"\u2190","\\gets"),_(A,N,j,">","\\gt"),_(A,N,j,"\u2208","\\in",!0),_(A,N,j,"\uE020","\\@not"),_(A,N,j,"\u2282","\\subset",!0),_(A,N,j,"\u2283","\\supset",!0),_(A,N,j,"\u2286","\\subseteq",!0),_(A,N,j,"\u2287","\\supseteq",!0),_(A,ae,j,"\u2288","\\nsubseteq",!0),_(A,ae,j,"\u2289","\\nsupseteq",!0),_(A,N,j,"\u22A8","\\models"),_(A,N,j,"\u2190","\\leftarrow",!0),_(A,N,j,"\u2264","\\le"),_(A,N,j,"\u2264","\\leq",!0),_(A,N,j,"<","\\lt"),_(A,N,j,"\u2192","\\rightarrow",!0),_(A,N,j,"\u2192","\\to"),_(A,ae,j,"\u2271","\\ngeq",!0),_(A,ae,j,"\u2270","\\nleq",!0),_(A,N,Ye,"\xA0","\\ "),_(A,N,Ye,"\xA0","~"),_(A,N,Ye,"\xA0","\\space"),_(A,N,Ye,"\xA0","\\nobreakspace"),_(Oe,N,Ye,"\xA0","\\ "),_(Oe,N,Ye,"\xA0","~"),_(Oe,N,Ye,"\xA0","\\space"),_(Oe,N,Ye,"\xA0","\\nobreakspace"),_(A,N,Ye,null,"\\nobreak"),_(A,N,Ye,null,"\\allowbreak"),_(A,N,Pe,",",","),_(A,N,Pe,";",";"),_(A,ae,Ee,"\u22BC","\\barwedge",!0),_(A,ae,Ee,"\u22BB","\\veebar",!0),_(A,N,Ee,"\u2299","\\odot",!0),_(A,N,Ee,"\u2295","\\oplus",!0),_(A,N,Ee,"\u2297","\\otimes",!0),_(A,N,X,"\u2202","\\partial",!0),_(A,N,Ee,"\u2298","\\oslash",!0),_(A,ae,Ee,"\u229A","\\circledcirc",!0),_(A,ae,Ee,"\u22A1","\\boxdot",!0),_(A,N,Ee,"\u25B3","\\bigtriangleup"),_(A,N,Ee,"\u25BD","\\bigtriangledown"),_(A,N,Ee,"\u2020","\\dagger"),_(A,N,Ee,"\u22C4","\\diamond"),_(A,N,Ee,"\u22C6","\\star"),_(A,N,Ee,"\u25C3","\\triangleleft"),_(A,N,Ee,"\u25B9","\\triangleright"),_(A,N,be,"{","\\{"),_(Oe,N,X,"{","\\{"),_(Oe,N,X,"{","\\textbraceleft"),_(A,N,$e,"}","\\}"),_(Oe,N,X,"}","\\}"),_(Oe,N,X,"}","\\textbraceright"),_(A,N,be,"{","\\lbrace"),_(A,N,$e,"}","\\rbrace"),_(A,N,be,"[","\\lbrack"),_(Oe,N,X,"[","\\lbrack"),_(A,N,$e,"]","\\rbrack"),_(Oe,N,X,"]","\\rbrack"),_(A,N,be,"(","\\lparen"),_(A,N,$e,")","\\rparen"),_(Oe,N,X,"<","\\textless"),_(Oe,N,X,">","\\textgreater"),_(A,N,be,"\u230A","\\lfloor",!0),_(A,N,$e,"\u230B","\\rfloor",!0),_(A,N,be,"\u2308","\\lceil",!0),_(A,N,$e,"\u2309","\\rceil",!0),_(A,N,X,"\\","\\backslash"),_(A,N,X,"\u2223","|"),_(A,N,X,"\u2223","\\vert"),_(Oe,N,X,"|","\\textbar"),_(A,N,X,"\u2225","\\|"),_(A,N,X,"\u2225","\\Vert"),_(Oe,N,X,"\u2225","\\textbardbl"),_(Oe,N,X,"~","\\textasciitilde"),_(Oe,N,X,"\\","\\textbackslash"),_(Oe,N,X,"^","\\textasciicircum"),_(A,N,j,"\u2191","\\uparrow",!0),_(A,N,j,"\u21D1","\\Uparrow",!0),_(A,N,j,"\u2193","\\downarrow",!0),_(A,N,j,"\u21D3","\\Downarrow",!0),_(A,N,j,"\u2195","\\updownarrow",!0),_(A,N,j,"\u21D5","\\Updownarrow",!0),_(A,N,J,"\u2210","\\coprod"),_(A,N,J,"\u22C1","\\bigvee"),_(A,N,J,"\u22C0","\\bigwedge"),_(A,N,J,"\u2A04","\\biguplus"),_(A,N,J,"\u22C2","\\bigcap"),_(A,N,J,"\u22C3","\\bigcup"),_(A,N,J,"\u222B","\\int"),_(A,N,J,"\u222B","\\intop"),_(A,N,J,"\u222C","\\iint"),_(A,N,J,"\u222D","\\iiint"),_(A,N,J,"\u220F","\\prod"),_(A,N,J,"\u2211","\\sum"),_(A,N,J,"\u2A02","\\bigotimes"),_(A,N,J,"\u2A01","\\bigoplus"),_(A,N,J,"\u2A00","\\bigodot"),_(A,N,J,"\u222E","\\oint"),_(A,N,J,"\u222F","\\oiint"),_(A,N,J,"\u2230","\\oiiint"),_(A,N,J,"\u2A06","\\bigsqcup"),_(A,N,J,"\u222B","\\smallint"),_(Oe,N,Ge,"\u2026","\\textellipsis"),_(A,N,Ge,"\u2026","\\mathellipsis"),_(Oe,N,Ge,"\u2026","\\ldots",!0),_(A,N,Ge,"\u2026","\\ldots",!0),_(A,N,Ge,"\u22EF","\\@cdots",!0),_(A,N,Ge,"\u22F1","\\ddots",!0),_(A,N,X,"\u22EE","\\varvdots"),_(A,N,St,"\u02CA","\\acute"),_(A,N,St,"\u02CB","\\grave"),_(A,N,St,"\xA8","\\ddot"),_(A,N,St,"~","\\tilde"),_(A,N,St,"\u02C9","\\bar"),_(A,N,St,"\u02D8","\\breve"),_(A,N,St,"\u02C7","\\check"),_(A,N,St,"^","\\hat"),_(A,N,St,"\u20D7","\\vec"),_(A,N,St,"\u02D9","\\dot"),_(A,N,St,"\u02DA","\\mathring"),_(A,N,Z,"\u0131","\\imath",!0),_(A,N,Z,"\u0237","\\jmath",!0),_(Oe,N,X,"\u0131","\\i",!0),_(Oe,N,X,"\u0237","\\j",!0),_(Oe,N,X,"\xDF","\\ss",!0),_(Oe,N,X,"\xE6","\\ae",!0),_(Oe,N,X,"\xE6","\\ae",!0),_(Oe,N,X,"\u0153","\\oe",!0),_(Oe,N,X,"\xF8","\\o",!0),_(Oe,N,X,"\xC6","\\AE",!0),_(Oe,N,X,"\u0152","\\OE",!0),_(Oe,N,X,"\xD8","\\O",!0),_(Oe,N,St,"\u02CA","\\'"),_(Oe,N,St,"\u02CB","\\`"),_(Oe,N,St,"\u02C6","\\^"),_(Oe,N,St,"\u02DC","\\~"),_(Oe,N,St,"\u02C9","\\="),_(Oe,N,St,"\u02D8","\\u"),_(Oe,N,St,"\u02D9","\\."),_(Oe,N,St,"\u02DA","\\r"),_(Oe,N,St,"\u02C7","\\v"),_(Oe,N,St,"\xA8",'\\"'),_(Oe,N,St,"\u02DD","\\H"),_(Oe,N,St,"\u25EF","\\textcircled");var tt={"--":!0,"---":!0,"``":!0,"''":!0};_(Oe,N,X,"\u2013","--"),_(Oe,N,X,"\u2013","\\textendash"),_(Oe,N,X,"\u2014","---"),_(Oe,N,X,"\u2014","\\textemdash"),_(Oe,N,X,"\u2018","`"),_(Oe,N,X,"\u2018","\\textquoteleft"),_(Oe,N,X,"\u2019","'"),_(Oe,N,X,"\u2019","\\textquoteright"),_(Oe,N,X,"\u201C","``"),_(Oe,N,X,"\u201C","\\textquotedblleft"),_(Oe,N,X,"\u201D","''"),_(Oe,N,X,"\u201D","\\textquotedblright"),_(A,N,X,"\xB0","\\degree",!0),_(Oe,N,X,"\xB0","\\degree"),_(Oe,N,X,"\xB0","\\textdegree",!0),_(A,N,Z,"\xA3","\\pounds"),_(A,N,Z,"\xA3","\\mathsterling",!0),_(Oe,N,Z,"\xA3","\\pounds"),_(Oe,N,Z,"\xA3","\\textsterling",!0),_(A,ae,X,"\u2720","\\maltese"),_(Oe,ae,X,"\u2720","\\maltese"),_(Oe,N,Ye,"\xA0","\\ "),_(Oe,N,Ye,"\xA0"," "),_(Oe,N,Ye,"\xA0","~");for(var Ot='0123456789/@."',Xt=0;Xt<Ot.length;Xt++){var pn=Ot.charAt(Xt);_(A,N,X,pn,pn)}for(var qt='0123456789!@*()-=+[]<>|";:?/.,',nn=0;nn<qt.length;nn++){var xn=qt.charAt(nn);_(Oe,N,X,xn,xn)}for(var Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",un=0;un<Un.length;un++){var On=Un.charAt(un);_(A,N,Z,On,On),_(Oe,N,X,On,On)}_(A,ae,X,"C","\u2102"),_(Oe,ae,X,"C","\u2102"),_(A,ae,X,"H","\u210D"),_(Oe,ae,X,"H","\u210D"),_(A,ae,X,"N","\u2115"),_(Oe,ae,X,"N","\u2115"),_(A,ae,X,"P","\u2119"),_(Oe,ae,X,"P","\u2119"),_(A,ae,X,"Q","\u211A"),_(Oe,ae,X,"Q","\u211A"),_(A,ae,X,"R","\u211D"),_(Oe,ae,X,"R","\u211D"),_(A,ae,X,"Z","\u2124"),_(Oe,ae,X,"Z","\u2124"),_(A,N,Z,"h","\u210E"),_(Oe,N,Z,"h","\u210E");for(var en="",Ut=0;Ut<Un.length;Ut++){var Pt=Un.charAt(Ut);en=String.fromCharCode(55349,56320+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56372+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56424+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56580+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56736+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56788+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56840+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56944+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),Ut<26&&(en=String.fromCharCode(55349,56632+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en),en=String.fromCharCode(55349,56476+Ut),_(A,N,Z,Pt,en),_(Oe,N,X,Pt,en))}en="\u{1D55C}",_(A,N,Z,"k",en),_(Oe,N,X,"k",en);for(var an=0;an<10;an++){var rn=an.toString();en=String.fromCharCode(55349,57294+an),_(A,N,Z,rn,en),_(Oe,N,X,rn,en),en=String.fromCharCode(55349,57314+an),_(A,N,Z,rn,en),_(Oe,N,X,rn,en),en=String.fromCharCode(55349,57324+an),_(A,N,Z,rn,en),_(Oe,N,X,rn,en),en=String.fromCharCode(55349,57334+an),_(A,N,Z,rn,en),_(Oe,N,X,rn,en)}for(var An="\xC7\xD0\xDE\xE7\xFE",ir=0;ir<An.length;ir++){var Ne=An.charAt(ir);_(A,N,Z,Ne,Ne),_(Oe,N,X,Ne,Ne)}_(Oe,N,X,"\xF0","\xF0"),_(Oe,N,X,"\u2013","\u2013"),_(Oe,N,X,"\u2014","\u2014"),_(Oe,N,X,"\u2018","\u2018"),_(Oe,N,X,"\u2019","\u2019"),_(Oe,N,X,"\u201C","\u201C"),_(Oe,N,X,"\u201D","\u201D");var mt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],wt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ht=function(u,h){var f=u.charCodeAt(0),y=u.charCodeAt(1),I=(f-55296)*1024+(y-56320)+65536,U=h==="math"?0:1;if(119808<=I&&I<120484){var ge=Math.floor((I-119808)/26);return[mt[ge][2],mt[ge][U]]}else if(120782<=I&&I<=120831){var Te=Math.floor((I-120782)/10);return[wt[Te][2],wt[Te][U]]}else{if(I===120485||I===120486)return[mt[0][2],mt[0][U]];if(120486<I&&I<120782)return["",""];throw new g("Unsupported character: "+u)}},we=[[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]],at=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],gt=function(u,h){return h.size<2?u:we[u-1][h.size-1]},Dt=function(){function z(h){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=h.style,this.color=h.color,this.size=h.size||z.BASESIZE,this.textSize=h.textSize||this.size,this.phantom=!!h.phantom,this.font=h.font||"",this.fontFamily=h.fontFamily||"",this.fontWeight=h.fontWeight||"",this.fontShape=h.fontShape||"",this.sizeMultiplier=at[this.size-1],this.maxSize=h.maxSize,this.minRuleThickness=h.minRuleThickness,this._fontMetrics=void 0}var u=z.prototype;return u.extend=function(f){var y={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)&&(y[I]=f[I]);return new z(y)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:gt(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:at[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var y=gt(z.BASESIZE,f);return this.size===y&&this.textSize===z.BASESIZE&&this.style===f?this:this.extend({style:f,size:y})},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!==z.BASESIZE?["sizing","reset-size"+this.size,"size"+z.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=it(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},z}();Dt.BASESIZE=6;var bt=Dt,Ft={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},zt={ex:!0,em:!0,mu:!0},_t=function(u){return typeof u!="string"&&(u=u.unit),u in Ft||u in zt||u==="ex"},We=function(u,h){var f;if(u.unit in Ft)f=Ft[u.unit]/h.fontMetrics().ptPerEm/h.sizeMultiplier;else if(u.unit==="mu")f=h.fontMetrics().cssEmPerMu;else{var y;if(h.style.isTight()?y=h.havingStyle(h.style.text()):y=h,u.unit==="ex")f=y.fontMetrics().xHeight;else if(u.unit==="em")f=y.fontMetrics().quad;else throw new g("Invalid unit: '"+u.unit+"'");y!==h&&(f*=y.sizeMultiplier/h.sizeMultiplier)}return Math.min(u.number*f,h.maxSize)},nt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Ct=function(u,h,f){return Ve[f][u]&&Ve[f][u].replace&&(u=Ve[f][u].replace),{value:u,metrics:jt(u,h,f)}},ot=function(u,h,f,y,I){var U=Ct(u,h,f),ge=U.metrics;u=U.value;var Te;if(ge){var Ze=ge.italic;(f==="text"||y&&y.font==="mathit")&&(Ze=0),Te=new pe(u,ge.height,ge.depth,Ze,ge.skew,ge.width,I)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+h+"' and mode '"+f+"'")),Te=new pe(u,0,0,0,0,0,I);if(y){Te.maxFontSize=y.sizeMultiplier,y.style.isTight()&&Te.classes.push("mtight");var ft=y.getColor();ft&&(Te.style.color=ft)}return Te},dt=function(u,h,f,y){return y===void 0&&(y=[]),f.font==="boldsymbol"&&Ct(u,"Main-Bold",h).metrics?ot(u,"Main-Bold",h,f,y.concat(["mathbf"])):u==="\\"||Ve[h][u].font==="main"?ot(u,"Main-Regular",h,f,y):ot(u,"AMS-Regular",h,f,y.concat(["amsrm"]))},kt=function(u,h,f,y){return/[0-9]/.test(u.charAt(0))||K.contains(nt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Gt=function(u,h,f,y){return K.contains(nt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Ht=function(u,h,f,y){return Ct(u,"Math-BoldItalic",h).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},hn=function(u,h,f){var y=u.mode,I=u.text,U=["mord"],ge=y==="math"||y==="text"&&h.font,Te=ge?h.font:h.fontFamily;if(I.charCodeAt(0)===55349){var Ze=ht(I,y),ft=Ze[0],Nt=Ze[1];return ot(I,ft,y,h,U.concat(Nt))}else if(Te){var Jt,fn;if(Te==="boldsymbol"||Te==="mathnormal"){var yn=Te==="boldsymbol"?Ht(I,y,h,U):Gt(I,y,h,U);Jt=yn.fontName,fn=[yn.fontClass]}else K.contains(nt,I)?(Jt="Main-Italic",fn=["mathit"]):ge?(Jt=nr[Te].fontName,fn=[Te]):(Jt=Wn(Te,h.fontWeight,h.fontShape),fn=[Te,h.fontWeight,h.fontShape]);if(Ct(I,Jt,y).metrics)return ot(I,Jt,y,h,U.concat(fn));if(tt.hasOwnProperty(I)&&Jt.substr(0,10)==="Typewriter"){for(var Cn=[],Yn=0;Yn<I.length;Yn++)Cn.push(ot(I[Yn],Jt,y,h,U.concat(fn)));return bn(Cn)}}if(f==="mathord"){var Jn=kt(I,y,h,U);return ot(I,Jn.fontName,y,h,U.concat([Jn.fontClass]))}else if(f==="textord"){var hr=Ve[y][I]&&Ve[y][I].font;if(hr==="ams"){var yr=Wn("amsrm",h.fontWeight,h.fontShape);return ot(I,yr,y,h,U.concat("amsrm",h.fontWeight,h.fontShape))}else if(hr==="main"||!hr){var Gr=Wn("textrm",h.fontWeight,h.fontShape);return ot(I,Gr,y,h,U.concat(h.fontWeight,h.fontShape))}else{var Br=Wn(hr,h.fontWeight,h.fontShape);return ot(I,Br,y,h,U.concat(Br,h.fontWeight,h.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},cn=function(u,h){if(Tt(u.classes)!==Tt(h.classes)||u.skew!==h.skew||u.maxFontSize!==h.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==h.style[f])return!1;for(var y in h.style)if(h.style.hasOwnProperty(y)&&u.style[y]!==h.style[y])return!1;return!0},En=function(u){for(var h=0;h<u.length-1;h++){var f=u[h],y=u[h+1];f instanceof pe&&y instanceof pe&&cn(f,y)&&(f.text+=y.text,f.height=Math.max(f.height,y.height),f.depth=Math.max(f.depth,y.depth),f.italic=y.italic,u.splice(h+1,1),h--)}return u},vn=function(u){for(var h=0,f=0,y=0,I=0;I<u.children.length;I++){var U=u.children[I];U.height>h&&(h=U.height),U.depth>f&&(f=U.depth),U.maxFontSize>y&&(y=U.maxFontSize)}u.height=h,u.depth=f,u.maxFontSize=y},on=function(u,h,f,y){var I=new Je(u,h,f,y);return vn(I),I},tn=function(u,h,f,y){return new Je(u,h,f,y)},Tn=function(u,h,f){var y=on([u],[],h);return y.height=Math.max(f||h.fontMetrics().defaultRuleThickness,h.minRuleThickness),y.style.borderBottomWidth=y.height+"em",y.maxFontSize=1,y},Sn=function(u,h,f,y){var I=new Le(u,h,f,y);return vn(I),I},bn=function(u){var h=new je(u);return vn(h),h},Pn=function(u,h){return u instanceof je?on([],[u],h):u},Hn=function(u){if(u.positionType==="individualShift"){for(var h=u.children,f=[h[0]],y=-h[0].shift-h[0].elem.depth,I=y,U=1;U<h.length;U++){var ge=-h[U].shift-I-h[U].elem.depth,Te=ge-(h[U-1].elem.height+h[U-1].elem.depth);I=I+ge,f.push({type:"kern",size:Te}),f.push(h[U])}return{children:f,depth:y}}var Ze;if(u.positionType==="top"){for(var ft=u.positionData,Nt=0;Nt<u.children.length;Nt++){var Jt=u.children[Nt];ft-=Jt.type==="kern"?Jt.size:Jt.elem.height+Jt.elem.depth}Ze=ft}else if(u.positionType==="bottom")Ze=-u.positionData;else{var fn=u.children[0];if(fn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Ze=-fn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Ze=-fn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Ze}},Bn=function(u,h){for(var f=Hn(u),y=f.children,I=f.depth,U=0,ge=0;ge<y.length;ge++){var Te=y[ge];if(Te.type==="elem"){var Ze=Te.elem;U=Math.max(U,Ze.maxFontSize,Ze.height)}}U+=2;var ft=on(["pstrut"],[]);ft.style.height=U+"em";for(var Nt=[],Jt=I,fn=I,yn=I,Cn=0;Cn<y.length;Cn++){var Yn=y[Cn];if(Yn.type==="kern")yn+=Yn.size;else{var Jn=Yn.elem,hr=Yn.wrapperClasses||[],yr=Yn.wrapperStyle||{},Gr=on(hr,[ft,Jn],void 0,yr);Gr.style.top=-U-yn-Jn.depth+"em",Yn.marginLeft&&(Gr.style.marginLeft=Yn.marginLeft),Yn.marginRight&&(Gr.style.marginRight=Yn.marginRight),Nt.push(Gr),yn+=Jn.height+Jn.depth}Jt=Math.min(Jt,yn),fn=Math.max(fn,yn)}var Br=on(["vlist"],Nt);Br.style.height=fn+"em";var Wr;if(Jt<0){var Vr=on([],[]),zr=on(["vlist"],[Vr]);zr.style.height=-Jt+"em";var gi=on(["vlist-s"],[new pe("\u200B")]);Wr=[on(["vlist-r"],[Br,gi]),on(["vlist-r"],[zr])]}else Wr=[on(["vlist-r"],[Br])];var Qr=on(["vlist-t"],Wr);return Wr.length===2&&Qr.classes.push("vlist-t2"),Qr.height=fn,Qr.depth=-Jt,Qr},jn=function(u,h){var f=on(["mspace"],[],h),y=We(u,h);return f.style.marginRight=y+"em",f},Wn=function(u,h,f){var y="";switch(u){case"amsrm":y="AMS";break;case"textrm":y="Main";break;case"textsf":y="SansSerif";break;case"texttt":y="Typewriter";break;default:y=u}var I;return h==="textbf"&&f==="textit"?I="BoldItalic":h==="textbf"?I="Bold":h==="textit"?I="Italic":I="Regular",y+"-"+I},nr={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"}},Nn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},fr=function(u,h){var f=Nn[u],y=f[0],I=f[1],U=f[2],ge=new He(y),Te=new xe([ge],{width:I+"em",height:U+"em",style:"width:"+I+"em",viewBox:"0 0 "+1e3*I+" "+1e3*U,preserveAspectRatio:"xMinYMin"}),Ze=tn(["overlay"],[Te],h);return Ze.height=U,Ze.style.height=U+"em",Ze.style.width=I+"em",Ze},pt={fontMap:nr,makeSymbol:ot,mathsym:dt,makeSpan:on,makeSvgSpan:tn,makeLineSpan:Tn,makeAnchor:Sn,makeFragment:bn,wrapFragment:Pn,makeVList:Bn,makeOrd:hn,makeGlue:jn,staticSvg:fr,svgData:Nn,tryCombineChars:En};function kn(z,u){var h=sr(z,u);if(!h)throw new Error("Expected node of type "+u+", but got "+(z?"node of type "+z.type:String(z)));return h}function sr(z,u){return z&&z.type===u?z:null}function xr(z,u){var h=_r(z,u);if(!h)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(z?z.type==="atom"?"atom of family "+z.family:"node of type "+z.type:String(z)));return h}function _r(z,u){return z&&z.type==="atom"&&z.family===u?z:null}function br(z){var u=Rn(z);if(!u)throw new Error("Expected node of symbol group type, but got "+(z?"node of type "+z.type:String(z)));return u}function Rn(z){return z&&(z.type==="atom"||Rt.hasOwnProperty(z.type))?z:null}var gn={number:3,unit:"mu"},Mn={number:4,unit:"mu"},ar={number:5,unit:"mu"},Kn={mord:{mop:gn,mbin:Mn,mrel:ar,minner:gn},mop:{mord:gn,mop:gn,mrel:ar,minner:gn},mbin:{mord:Mn,mop:Mn,mopen:Mn,minner:Mn},mrel:{mord:ar,mop:ar,mopen:ar,minner:ar},mopen:{},mclose:{mop:gn,mbin:Mn,mrel:ar,minner:gn},mpunct:{mord:gn,mop:gn,mrel:ar,mopen:gn,mclose:gn,mpunct:gn,minner:gn},minner:{mord:gn,mop:gn,mbin:Mn,mrel:ar,mopen:gn,mpunct:gn,minner:gn}},er={mord:{mop:gn},mop:{mord:gn,mop:gn},mbin:{},mrel:{},mopen:{},mclose:{mop:gn},mpunct:{},minner:{mop:gn}},Pr={},Dr={},Er={};function _n(z){for(var u=z.type,h=z.names,f=z.props,y=z.handler,I=z.htmlBuilder,U=z.mathmlBuilder,ge={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:y},Te=0;Te<h.length;++Te)Pr[h[Te]]=ge;u&&(I&&(Dr[u]=I),U&&(Er[u]=U))}function Gn(z){var u=z.type,h=z.htmlBuilder,f=z.mathmlBuilder;_n({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:h,mathmlBuilder:f})}var qn=function(u){var h=sr(u,"ordgroup");return h?h.body:[u]},wr=pt.makeSpan,qr=["leftmost","mbin","mopen","mrel","mop","mpunct"],Yr=["rightmost","mrel","mclose","mpunct"],kr={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},Zr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Sr=function(u,h,f,y){y===void 0&&(y=[null,null]);for(var I=[],U=0;U<u.length;U++){var ge=cr(u[U],h);if(ge instanceof je){var Te=ge.children;I.push.apply(I,Te)}else I.push(ge)}if(!f)return I;var Ze=h;if(u.length===1){var ft=sr(u[0],"sizing")||sr(u[0],"styling");ft&&(ft.type==="sizing"?Ze=h.havingSize(ft.size):ft.type==="styling"&&(Ze=h.havingStyle(kr[ft.style])))}var Nt=wr([y[0]||"leftmost"],[],h),Jt=wr([y[1]||"rightmost"],[],h);return ei(I,function(fn,yn){var Cn=yn.classes[0],Yn=fn.classes[0];Cn==="mbin"&&K.contains(Yr,Yn)?yn.classes[0]="mord":Yn==="mbin"&&K.contains(qr,Cn)&&(fn.classes[0]="mord")},{node:Nt},Jt),ei(I,function(fn,yn){var Cn=ai(yn),Yn=ai(fn),Jn=Cn&&Yn?fn.hasClass("mtight")?er[Cn][Yn]:Kn[Cn][Yn]:null;if(Jn)return pt.makeGlue(Jn,Ze)},{node:Nt},Jt),I},ei=function z(u,h,f,y){y&&u.push(y);for(var I=0;I<u.length;I++){var U=u[I],ge=$r(U);if(ge){z(ge.children,h,f);continue}if(U.classes[0]!=="mspace"){var Te=h(U,f.node);Te&&(f.insertAfter?f.insertAfter(Te):(u.unshift(Te),I++)),f.node=U,f.insertAfter=function(Ze){return function(ft){u.splice(Ze+1,0,ft),I++}}(I)}}y&&u.pop()},$r=function(u){return u instanceof je||u instanceof Le?u:null},jr=function z(u,h){var f=$r(u);if(f){var y=f.children;if(y.length){if(h==="right")return z(y[y.length-1],"right");if(h==="left")return z(y[0],"left")}}return u},ai=function(u,h){return u?(h&&(u=jr(u,h)),Zr[u.classes[0]]||null):null},oi=function(u,h){var f=["nulldelimiter"].concat(u.baseSizingClasses());return wr(h.concat(f))},cr=function(u,h,f){if(!u)return wr();if(Dr[u.type]){var y=Dr[u.type](u,h);if(f&&h.size!==f.size){y=wr(h.sizingClasses(f),[y],h);var I=h.sizeMultiplier/f.sizeMultiplier;y.height*=I,y.depth*=I}return y}else throw new g("Got group of unknown type: '"+u.type+"'")};function ci(z,u){var h=wr(["base"],z,u),f=wr(["strut"]);return f.style.height=h.height+h.depth+"em",f.style.verticalAlign=-h.depth+"em",h.children.unshift(f),h}function di(z,u){var h=null;z.length===1&&z[0].type==="tag"&&(h=z[0].tag,z=z[0].body);for(var f=Sr(z,u,!0),y=[],I=[],U=0;U<f.length;U++)if(I.push(f[U]),f[U].hasClass("mbin")||f[U].hasClass("mrel")||f[U].hasClass("allowbreak")){for(var ge=!1;U<f.length-1&&f[U+1].hasClass("mspace")&&!f[U+1].hasClass("newline");)U++,I.push(f[U]),f[U].hasClass("nobreak")&&(ge=!0);ge||(y.push(ci(I,u)),I=[])}else f[U].hasClass("newline")&&(I.pop(),I.length>0&&(y.push(ci(I,u)),I=[]),y.push(f[U]));I.length>0&&y.push(ci(I,u));var Te;h&&(Te=ci(Sr(h,u,!0)),Te.classes=["tag"],y.push(Te));var Ze=wr(["katex-html"],y);if(Ze.setAttribute("aria-hidden","true"),Te){var ft=Te.children[0];ft.style.height=Ze.height+Ze.depth+"em",ft.style.verticalAlign=-Ze.depth+"em"}return Ze}function ti(z){return new je(z)}var Hr=function(){function z(h,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=h,this.attributes={},this.children=f||[]}var u=z.prototype;return u.setAttribute=function(f,y){this.attributes[f]=y},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 y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&f.setAttribute(y,this.attributes[y]);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 y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+'="',f+=K.escape(this.attributes[y]),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("")},z}(),rr=function(){function z(h){this.text=void 0,this.text=h}var u=z.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return K.escape(this.toText())},u.toText=function(){return this.text},z}(),Ei=function(){function z(h){this.width=void 0,this.character=void 0,this.width=h,h>=.05555&&h<=.05556?this.character="\u200A":h>=.1666&&h<=.1667?this.character="\u2009":h>=.2222&&h<=.2223?this.character="\u2005":h>=.2777&&h<=.2778?this.character="\u2005\u200A":h>=-.05556&&h<=-.05555?this.character="\u200A\u2063":h>=-.1667&&h<=-.1666?this.character="\u2009\u2063":h>=-.2223&&h<=-.2222?this.character="\u205F\u2063":h>=-.2778&&h<=-.2777?this.character="\u2005\u2063":this.character=null}var u=z.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:" "},z}(),mn={MathNode:Hr,TextNode:rr,SpaceNode:Ei,newDocumentFragment:ti},Xn=function(u,h,f){return Ve[h][u]&&Ve[h][u].replace&&u.charCodeAt(0)!==55349&&!(tt.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Ve[h][u].replace),new mn.TextNode(u)},vr=function(u){return u.length===1?u[0]:new mn.MathNode("mrow",u)},Cr=function(u,h){if(h.fontFamily==="texttt")return"monospace";if(h.fontFamily==="textsf")return h.fontShape==="textit"&&h.fontWeight==="textbf"?"sans-serif-bold-italic":h.fontShape==="textit"?"sans-serif-italic":h.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(h.fontShape==="textit"&&h.fontWeight==="textbf")return"bold-italic";if(h.fontShape==="textit")return"italic";if(h.fontWeight==="textbf")return"bold";var f=h.font;if(!f||f==="mathnormal")return null;var y=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(K.contains(["\\imath","\\jmath"],I))return null;Ve[y][I]&&Ve[y][I].replace&&(I=Ve[y][I].replace);var U=pt.fontMap[f].fontName;return jt(I,U,y)?pt.fontMap[f].variant:null},ur=function(u,h,f){if(u.length===1){var y=Fn(u[0],h);return f&&y instanceof Hr&&y.type==="mo"&&(y.setAttribute("lspace","0em"),y.setAttribute("rspace","0em")),[y]}for(var I=[],U,ge=0;ge<u.length;ge++){var Te=Fn(u[ge],h);if(Te instanceof Hr&&U instanceof Hr){if(Te.type==="mtext"&&U.type==="mtext"&&Te.getAttribute("mathvariant")===U.getAttribute("mathvariant")){var Ze;(Ze=U.children).push.apply(Ze,Te.children);continue}else if(Te.type==="mn"&&U.type==="mn"){var ft;(ft=U.children).push.apply(ft,Te.children);continue}else if(Te.type==="mi"&&Te.children.length===1&&U.type==="mn"){var Nt=Te.children[0];if(Nt instanceof rr&&Nt.text==="."){var Jt;(Jt=U.children).push.apply(Jt,Te.children);continue}}else if(U.type==="mi"&&U.children.length===1){var fn=U.children[0];if(fn instanceof rr&&fn.text==="\u0338"&&(Te.type==="mo"||Te.type==="mi"||Te.type==="mn")){var yn=Te.children[0];yn instanceof rr&&yn.text.length>0&&(yn.text=yn.text.slice(0,1)+"\u0338"+yn.text.slice(1),I.pop())}}}I.push(Te),U=Te}return I},pr=function(u,h,f){return vr(ur(u,h,f))},Fn=function(u,h){if(!u)return new mn.MathNode("mrow");if(Er[u.type]){var f=Er[u.type](u,h);return f}else throw new g("Got group of unknown type: '"+u.type+"'")};function Fr(z,u,h,f){var y=ur(z,h),I;y.length===1&&y[0]instanceof Hr&&K.contains(["mrow","mtable"],y[0].type)?I=y[0]:I=new mn.MathNode("mrow",y);var U=new mn.MathNode("annotation",[new mn.TextNode(u)]);U.setAttribute("encoding","application/x-tex");var ge=new mn.MathNode("semantics",[I,U]),Te=new mn.MathNode("math",[ge]);Te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ze=f?"katex":"katex-mathml";return pt.makeSpan([Ze],[Te])}var Jr=function(u){return new bt({style:u.displayMode?x.DISPLAY:x.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},ni=function(u,h){if(h.displayMode){var f=["katex-display"];h.leqno&&f.push("leqno"),h.fleqn&&f.push("fleqn"),u=pt.makeSpan(f,[u])}return u},Xr=function(u,h,f){var y=Jr(f),I;if(f.output==="mathml")return Fr(u,h,y,!0);if(f.output==="html"){var U=di(u,y);I=pt.makeSpan(["katex"],[U])}else{var ge=Fr(u,h,y,!1),Te=di(u,y);I=pt.makeSpan(["katex"],[ge,Te])}return ni(I,f)},Kr=function(u,h,f){var y=Jr(f),I=di(u,y),U=pt.makeSpan(["katex"],[I]);return ni(U,f)},li=Xr,ui={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"},Ai=function(u){var h=new mn.MathNode("mo",[new mn.TextNode(ui[u.substr(1)])]);return h.setAttribute("stretchy","true"),h},vi={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]},Hi=function(u){return u.type==="ordgroup"?u.body.length:1},Xi=function(u,h){function f(){var Te=4e5,Ze=u.label.substr(1);if(K.contains(["widehat","widecheck","widetilde","utilde"],Ze)){var ft=u,Nt=Hi(ft.base),Jt,fn,yn;if(Nt>5)Ze==="widehat"||Ze==="widecheck"?(Jt=420,Te=2364,yn=.42,fn=Ze+"4"):(Jt=312,Te=2340,yn=.34,fn="tilde4");else{var Cn=[1,1,2,2,3,3][Nt];Ze==="widehat"||Ze==="widecheck"?(Te=[0,1062,2364,2364,2364][Cn],Jt=[0,239,300,360,420][Cn],yn=[0,.24,.3,.3,.36,.42][Cn],fn=Ze+Cn):(Te=[0,600,1033,2339,2340][Cn],Jt=[0,260,286,306,312][Cn],yn=[0,.26,.286,.3,.306,.34][Cn],fn="tilde"+Cn)}var Yn=new He(fn),Jn=new xe([Yn],{width:"100%",height:yn+"em",viewBox:"0 0 "+Te+" "+Jt,preserveAspectRatio:"none"});return{span:pt.makeSvgSpan([],[Jn],h),minWidth:0,height:yn}}else{var hr=[],yr=vi[Ze],Gr=yr[0],Br=yr[1],Wr=yr[2],Vr=Wr/1e3,zr=Gr.length,gi,Qr;if(zr===1){var vt=yr[3];gi=["hide-tail"],Qr=[vt]}else if(zr===2)gi=["halfarrow-left","halfarrow-right"],Qr=["xMinYMin","xMaxYMin"];else if(zr===3)gi=["brace-left","brace-center","brace-right"],Qr=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+zr+" children.");for(var Ii=0;Ii<zr;Ii++){var Wi=new He(Gr[Ii]),Ui=new xe([Wi],{width:"400em",height:Vr+"em",viewBox:"0 0 "+Te+" "+Wr,preserveAspectRatio:Qr[Ii]+" slice"}),ii=pt.makeSvgSpan([gi[Ii]],[Ui],h);if(zr===1)return{span:ii,minWidth:Br,height:Vr};ii.style.height=Vr+"em",hr.push(ii)}return{span:pt.makeSpan(["stretchy"],hr,h),minWidth:Br,height:Vr}}}var y=f(),I=y.span,U=y.minWidth,ge=y.height;return I.height=ge,I.style.height=ge+"em",U>0&&(I.style.minWidth=U+"em"),I},ki=function(u,h,f,y){var I,U=u.height+u.depth+2*f;if(/fbox|color/.test(h)){if(I=pt.makeSpan(["stretchy",h],[],y),h==="fbox"){var ge=y.color&&y.getColor();ge&&(I.style.borderColor=ge)}}else{var Te=[];/^[bx]cancel$/.test(h)&&Te.push(new et({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(h)&&Te.push(new et({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ze=new xe(Te,{width:"100%",height:U+"em"});I=pt.makeSvgSpan([],[Ze],y)}return I.height=U,I.style.height=U+"em",I},yi={encloseSpan:ki,mathMLnode:Ai,svgSpan:Xi},$n=function(u,h){var f,y,I=sr(u,"supsub"),U;I?(y=kn(I.base,"accent"),f=y.base,I.base=f,U=xt(cr(I,h)),I.base=y):(y=kn(u,"accent"),f=y.base);var ge=cr(f,h.havingCrampedStyle()),Te=y.isShifty&&K.isCharacterBox(f),Ze=0;if(Te){var ft=K.getBaseElem(f),Nt=cr(ft,h.havingCrampedStyle());Ze=ut(Nt).skew}var Jt=Math.min(ge.height,h.fontMetrics().xHeight),fn;if(y.isStretchy)fn=yi.svgSpan(y,h),fn=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"elem",elem:fn,wrapperClasses:["svg-align"],wrapperStyle:Ze>0?{width:"calc(100% - "+2*Ze+"em)",marginLeft:2*Ze+"em"}:void 0}]},h);else{var yn,Cn;y.label==="\\vec"?(yn=pt.staticSvg("vec",h),Cn=pt.svgData.vec[1]):(yn=pt.makeOrd({mode:y.mode,text:y.label},h,"textord"),yn=ut(yn),yn.italic=0,Cn=yn.width),fn=pt.makeSpan(["accent-body"],[yn]);var Yn=y.label==="\\textcircled";Yn&&(fn.classes.push("accent-full"),Jt=ge.height);var Jn=Ze;Yn||(Jn-=Cn/2),fn.style.left=Jn+"em",y.label==="\\textcircled"&&(fn.style.top=".2em"),fn=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:-Jt},{type:"elem",elem:fn}]},h)}var hr=pt.makeSpan(["mord","accent"],[fn],h);return U?(U.children[0]=hr,U.height=Math.max(hr.height,U.height),U.classes[0]="mord",U):hr},lr=function(u,h){var f=u.isStretchy?yi.mathMLnode(u.label):new mn.MathNode("mo",[Xn(u.label,u.mode)]),y=new mn.MathNode("mover",[Fn(u.base,h),f]);return y.setAttribute("accent","true"),y},Ir=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(z){return"\\"+z}).join("|"));_n({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,h){var f=h[0],y=!Ir.test(u.funcName),I=!y||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:y,isShifty:I,base:f}},htmlBuilder:$n,mathmlBuilder:lr}),_n({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=h[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:$n,mathmlBuilder:lr}),_n({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"accentUnder",mode:f.mode,label:y,base:I}},htmlBuilder:function(u,h){var f=cr(u.base,h),y=yi.svgSpan(u,h),I=u.label==="\\utilde"?.12:0,U=pt.makeVList({positionType:"bottom",positionData:y.height+I,children:[{type:"elem",elem:y,wrapperClasses:["svg-align"]},{type:"kern",size:I},{type:"elem",elem:f}]},h);return pt.makeSpan(["mord","accentunder"],[U],h)},mathmlBuilder:function(u,h){var f=yi.mathMLnode(u.label),y=new mn.MathNode("munder",[Fn(u.base,h),f]);return y.setAttribute("accentunder","true"),y}});var dr=function(u){var h=new mn.MathNode("mpadded",u?[u]:[]);return h.setAttribute("width","+0.6em"),h.setAttribute("lspace","0.3em"),h};_n({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,h,f){var y=u.parser,I=u.funcName;return{type:"xArrow",mode:y.mode,label:I,body:h[0],below:f[0]}},htmlBuilder:function(u,h){var f=h.style,y=h.havingStyle(f.sup()),I=pt.wrapFragment(cr(u.body,y,h),h);I.classes.push("x-arrow-pad");var U;u.below&&(y=h.havingStyle(f.sub()),U=pt.wrapFragment(cr(u.below,y,h),h),U.classes.push("x-arrow-pad"));var ge=yi.svgSpan(u,h),Te=-h.fontMetrics().axisHeight+.5*ge.height,Ze=-h.fontMetrics().axisHeight-.5*ge.height-.111;(I.depth>.25||u.label==="\\xleftequilibrium")&&(Ze-=I.depth);var ft;if(U){var Nt=-h.fontMetrics().axisHeight+U.height+.5*ge.height+.111;ft=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Ze},{type:"elem",elem:ge,shift:Te},{type:"elem",elem:U,shift:Nt}]},h)}else ft=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Ze},{type:"elem",elem:ge,shift:Te}]},h);return ft.children[0].children[0].children[1].classes.push("svg-align"),pt.makeSpan(["mrel","x-arrow"],[ft],h)},mathmlBuilder:function(u,h){var f=yi.mathMLnode(u.label),y;if(u.body){var I=dr(Fn(u.body,h));if(u.below){var U=dr(Fn(u.below,h));y=new mn.MathNode("munderover",[f,U,I])}else y=new mn.MathNode("mover",[f,I])}else if(u.below){var ge=dr(Fn(u.below,h));y=new mn.MathNode("munder",[f,ge])}else y=dr(),y=new mn.MathNode("mover",[f,y]);return y}}),_n({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){for(var f=u.parser,y=kn(h[0],"ordgroup"),I=y.body,U="",ge=0;ge<I.length;ge++){var Te=kn(I[ge],"textord");U+=Te.text}var Ze=parseInt(U);if(isNaN(Ze))throw new g("\\@char has non-numeric argument "+U);return{type:"textord",mode:f.mode,text:String.fromCharCode(Ze)}}});var gr=function(u,h){var f=Sr(u.body,h.withColor(u.color),!1);return pt.makeFragment(f)},Ti=function(u,h){var f=ur(u.body,h.withColor(u.color)),y=new mn.MathNode("mstyle",f);return y.setAttribute("mathcolor",u.color),y};_n({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,h){var f=u.parser,y=kn(h[0],"color-token").color,I=h[1];return{type:"color",mode:f.mode,color:y,body:qn(I)}},htmlBuilder:gr,mathmlBuilder:Ti}),_n({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,h){var f=u.parser,y=u.breakOnTokenText,I=kn(h[0],"color-token").color;f.gullet.macros.set("\\current@color",I);var U=f.parseExpression(!0,y);return{type:"color",mode:f.mode,color:I,body:U}},htmlBuilder:gr,mathmlBuilder:Ti}),_n({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h,f){var y=u.parser,I=u.funcName,U=f[0],ge=I==="\\cr",Te=!1;return ge||(y.settings.displayMode&&y.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Te=!1:Te=!0),{type:"cr",mode:y.mode,newLine:Te,newRow:ge,size:U&&kn(U,"size").value}},htmlBuilder:function(u,h){if(u.newRow)throw new g("\\cr valid only within a tabular/array environment");var f=pt.makeSpan(["mspace"],[],h);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=We(u.size,h)+"em")),f},mathmlBuilder:function(u,h){var f=new mn.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",We(u.size,h)+"em")),f}});var ri=function(u,h,f){var y=Ve.math[u]&&Ve.math[u].replace,I=jt(y||u,h,f);if(!I)throw new Error("Unsupported symbol "+u+" and font size "+h+".");return I},Li=function(u,h,f,y){var I=f.havingBaseStyle(h),U=pt.makeSpan(y.concat(I.sizingClasses(f)),[u],f),ge=I.sizeMultiplier/f.sizeMultiplier;return U.height*=ge,U.depth*=ge,U.maxFontSize=I.sizeMultiplier,U},Ki=function(u,h,f){var y=h.havingBaseStyle(f),I=(1-h.sizeMultiplier/y.sizeMultiplier)*h.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=I+"em",u.height-=I,u.depth+=I},na=function(u,h,f,y,I,U){var ge=pt.makeSymbol(u,"Main-Regular",I,y),Te=Li(ge,h,y,U);return f&&Ki(Te,y,h),Te},Ea=function(u,h,f,y){return pt.makeSymbol(u,"Size"+h+"-Regular",f,y)},ra=function(u,h,f,y,I,U){var ge=Ea(u,h,I,y),Te=Li(pt.makeSpan(["delimsizing","size"+h],[ge],y),x.TEXT,y,U);return f&&Ki(Te,y,x.TEXT),Te},Mi=function(u,h,f){var y;h==="Size1-Regular"?y="delim-size1":y="delim-size4";var I=pt.makeSpan(["delimsizinginner",y],[pt.makeSpan([],[pt.makeSymbol(u,h,f)])]);return{type:"elem",elem:I}},Fi={type:"kern",size:-.005},Ci=function(u,h,f,y,I,U){var ge,Te,Ze,ft;ge=Ze=ft=u,Te=null;var Nt="Size1-Regular";u==="\\uparrow"?Ze=ft="\u23D0":u==="\\Uparrow"?Ze=ft="\u2016":u==="\\downarrow"?ge=Ze="\u23D0":u==="\\Downarrow"?ge=Ze="\u2016":u==="\\updownarrow"?(ge="\\uparrow",Ze="\u23D0",ft="\\downarrow"):u==="\\Updownarrow"?(ge="\\Uparrow",Ze="\u2016",ft="\\Downarrow"):u==="["||u==="\\lbrack"?(ge="\u23A1",Ze="\u23A2",ft="\u23A3",Nt="Size4-Regular"):u==="]"||u==="\\rbrack"?(ge="\u23A4",Ze="\u23A5",ft="\u23A6",Nt="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Ze=ge="\u23A2",ft="\u23A3",Nt="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(ge="\u23A1",Ze=ft="\u23A2",Nt="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Ze=ge="\u23A5",ft="\u23A6",Nt="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(ge="\u23A4",Ze=ft="\u23A5",Nt="Size4-Regular"):u==="("||u==="\\lparen"?(ge="\u239B",Ze="\u239C",ft="\u239D",Nt="Size4-Regular"):u===")"||u==="\\rparen"?(ge="\u239E",Ze="\u239F",ft="\u23A0",Nt="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(ge="\u23A7",Te="\u23A8",ft="\u23A9",Ze="\u23AA",Nt="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(ge="\u23AB",Te="\u23AC",ft="\u23AD",Ze="\u23AA",Nt="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(ge="\u23A7",ft="\u23A9",Ze="\u23AA",Nt="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(ge="\u23AB",ft="\u23AD",Ze="\u23AA",Nt="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(ge="\u23A7",ft="\u23AD",Ze="\u23AA",Nt="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(ge="\u23AB",ft="\u23A9",Ze="\u23AA",Nt="Size4-Regular");var Jt=ri(ge,Nt,I),fn=Jt.height+Jt.depth,yn=ri(Ze,Nt,I),Cn=yn.height+yn.depth,Yn=ri(ft,Nt,I),Jn=Yn.height+Yn.depth,hr=0,yr=1;if(Te!==null){var Gr=ri(Te,Nt,I);hr=Gr.height+Gr.depth,yr=2}var Br=fn+Jn+hr,Wr=Math.max(0,Math.ceil((h-Br)/(yr*Cn))),Vr=Br+Wr*yr*Cn,zr=y.fontMetrics().axisHeight;f&&(zr*=y.sizeMultiplier);var gi=Vr/2-zr,Qr=(Wr+1)*.005-Cn,vt=[];if(vt.push(Mi(ft,Nt,I)),Te===null)for(var Ii=0;Ii<Wr;Ii++)vt.push(Fi),vt.push(Mi(Ze,Nt,I));else{for(var Wi=0;Wi<Wr;Wi++)vt.push(Fi),vt.push(Mi(Ze,Nt,I));vt.push({type:"kern",size:Qr}),vt.push(Mi(Ze,Nt,I)),vt.push(Fi),vt.push(Mi(Te,Nt,I));for(var Ui=0;Ui<Wr;Ui++)vt.push(Fi),vt.push(Mi(Ze,Nt,I))}vt.push({type:"kern",size:Qr}),vt.push(Mi(Ze,Nt,I)),vt.push(Fi),vt.push(Mi(ge,Nt,I));var ii=y.havingBaseStyle(x.TEXT),os=pt.makeVList({positionType:"bottom",positionData:gi,children:vt},ii);return Li(pt.makeSpan(["delimsizing","mult"],[os],ii),x.TEXT,y,U)},Bs=80,is=.08,Bi=function(u,h,f,y,I){var U=qe(u,y,f),ge=new He(u,U),Te=new xe([ge],{width:"400em",height:h+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return pt.makeSvgSpan(["hide-tail"],[Te],I)},Ns=function(u,h){var f=h.havingBaseSizing(),y=xs("\\surd",u*f.sizeMultiplier,$s,f),I=f.sizeMultiplier,U=Math.max(0,h.minRuleThickness-h.fontMetrics().sqrtRuleThickness),ge,Te=0,Ze=0,ft=0,Nt;return y.type==="small"?(ft=1e3+1e3*U+Bs,u<1?I=1:u<1.4&&(I=.7),Te=(1+U+is)/I,Ze=(1+U)/I,ge=Bi("sqrtMain",Te,ft,U,h),ge.style.minWidth="0.853em",Nt=.833/I):y.type==="large"?(ft=(1e3+Bs)*bs[y.size],Ze=(bs[y.size]+U)/I,Te=(bs[y.size]+U+is)/I,ge=Bi("sqrtSize"+y.size,Te,ft,U,h),ge.style.minWidth="1.02em",Nt=1/I):(Te=u+U+is,Ze=u+U,ft=Math.floor(1e3*u+U)+Bs,ge=Bi("sqrtTall",Te,ft,U,h),ge.style.minWidth="0.742em",Nt=1.056),ge.height=Ze,ge.style.height=Te+"em",{span:ge,advanceWidth:Nt,ruleWidth:(h.fontMetrics().sqrtRuleThickness+U)*I}},_s=["(","\\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"],hs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bs=[0,1.2,1.8,2.4,3],Di=function(u,h,f,y,I){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),K.contains(_s,u)||K.contains(hs,u))return ra(u,h,!1,f,y,I);if(K.contains(Sa,u))return Ci(u,bs[h],!1,f,y,I);throw new g("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,h,f,y){for(var I=Math.min(2,3-y.style.size),U=I;U<f.length&&f[U].type!=="stack";U++){var ge=ri(u,sa(f[U]),"math"),Te=ge.height+ge.depth;if(f[U].type==="small"){var Ze=y.havingBaseStyle(f[U].style);Te*=Ze.sizeMultiplier}if(Te>h)return f[U]}return f[f.length-1]},Qi=function(u,h,f,y,I,U){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var ge;K.contains(hs,u)?ge=ia:K.contains(_s,u)?ge=$s:ge=wa;var Te=xs(u,h,ge,y);return Te.type==="small"?na(u,Te.style,f,y,I,U):Te.type==="large"?ra(u,Te.size,f,y,I,U):Ci(u,h,f,y,I,U)},Us=function(u,h,f,y,I,U){var ge=y.fontMetrics().axisHeight*y.sizeMultiplier,Te=901,Ze=5/y.fontMetrics().ptPerEm,ft=Math.max(h-ge,f+ge),Nt=Math.max(ft/500*Te,2*ft-Ze);return Qi(u,Nt,!0,y,I,U)},Oi={sqrtImage:Ns,sizedDelim:Di,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 _i(z,u){var h=Rn(z);if(h&&K.contains(aa,h.text))return h;throw new g("Invalid delimiter: '"+(h?h.text:JSON.stringify(z))+"' after '"+u.funcName+"'",z)}_n({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,h){var f=_i(h[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,h){return u.delim==="."?pt.makeSpan([u.mclass]):Oi.sizedDelim(u.delim,u.size,h,u.mode,[u.mclass])},mathmlBuilder:function(u){var h=[];u.delim!=="."&&h.push(Xn(u.delim,u.mode));var f=new mn.MathNode("mo",h);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function ss(z){if(!z.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}_n({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,h){var f=u.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new g("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:_i(h[0],u).text,color:f}}}),_n({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,h){var f=_i(h[0],u),y=u.parser;++y.leftrightDepth;var I=y.parseExpression(!1);--y.leftrightDepth,y.expect("\\right",!1);var U=kn(y.parseFunction(),"leftright-right");return{type:"leftright",mode:y.mode,body:I,left:f.text,right:U.delim,rightColor:U.color}},htmlBuilder:function(u,h){ss(u);for(var f=Sr(u.body,h,!0,["mopen","mclose"]),y=0,I=0,U=!1,ge=0;ge<f.length;ge++)f[ge].isMiddle?U=!0:(y=Math.max(f[ge].height,y),I=Math.max(f[ge].depth,I));y*=h.sizeMultiplier,I*=h.sizeMultiplier;var Te;if(u.left==="."?Te=oi(h,["mopen"]):Te=Oi.leftRightDelim(u.left,y,I,h,u.mode,["mopen"]),f.unshift(Te),U)for(var Ze=1;Ze<f.length;Ze++){var ft=f[Ze],Nt=ft.isMiddle;Nt&&(f[Ze]=Oi.leftRightDelim(Nt.delim,y,I,Nt.options,u.mode,[]))}var Jt;if(u.right===".")Jt=oi(h,["mclose"]);else{var fn=u.rightColor?h.withColor(u.rightColor):h;Jt=Oi.leftRightDelim(u.right,y,I,fn,u.mode,["mclose"])}return f.push(Jt),pt.makeSpan(["minner"],f,h)},mathmlBuilder:function(u,h){ss(u);var f=ur(u.body,h);if(u.left!=="."){var y=new mn.MathNode("mo",[Xn(u.left,u.mode)]);y.setAttribute("fence","true"),f.unshift(y)}if(u.right!=="."){var I=new mn.MathNode("mo",[Xn(u.right,u.mode)]);I.setAttribute("fence","true"),u.rightColor&&I.setAttribute("mathcolor",u.rightColor),f.push(I)}return vr(f)}}),_n({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,h){var f=_i(h[0],u);if(!u.parser.leftrightDepth)throw new g("\\middle without preceding \\left",f);return{type:"middle",mode:u.parser.mode,delim:f.text}},htmlBuilder:function(u,h){var f;if(u.delim===".")f=oi(h,[]);else{f=Oi.sizedDelim(u.delim,1,h,u.mode,[]);var y={delim:u.delim,options:h};f.isMiddle=y}return f},mathmlBuilder:function(u,h){var f=u.delim==="\\vert"||u.delim==="|"?Xn("|","text"):Xn(u.delim,u.mode),y=new mn.MathNode("mo",[f]);return y.setAttribute("fence","true"),y.setAttribute("lspace","0.05em"),y.setAttribute("rspace","0.05em"),y}});var fs=function(u,h){var f=pt.wrapFragment(cr(u.body,h),h),y=u.label.substr(1),I=h.sizeMultiplier,U,ge=0,Te=K.isCharacterBox(u.body);if(y==="sout")U=pt.makeSpan(["stretchy","sout"]),U.height=h.fontMetrics().defaultRuleThickness/I,ge=-.5*h.fontMetrics().xHeight;else{/cancel/.test(y)?Te||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Ze=0,ft=0;/box/.test(y)?(ft=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness),Ze=h.fontMetrics().fboxsep+(y==="colorbox"?0:ft)):Ze=Te?.2:0,U=yi.encloseSpan(f,y,Ze,h),/fbox|boxed|fcolorbox/.test(y)&&(U.style.borderStyle="solid",U.style.borderWidth=ft+"em"),ge=f.depth+Ze,u.backgroundColor&&(U.style.backgroundColor=u.backgroundColor,u.borderColor&&(U.style.borderColor=u.borderColor))}var Nt;return u.backgroundColor?Nt=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:U,shift:ge},{type:"elem",elem:f,shift:0}]},h):Nt=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:U,shift:ge,wrapperClasses:/cancel/.test(y)?["svg-align"]:[]}]},h),/cancel/.test(y)&&(Nt.height=f.height,Nt.depth=f.depth),/cancel/.test(y)&&!Te?pt.makeSpan(["mord","cancel-lap"],[Nt],h):pt.makeSpan(["mord"],[Nt],h)},Es=function(u,h){var f=0,y=new mn.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Fn(u.body,h)]);switch(u.label){case"\\cancel":y.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":y.setAttribute("notation","downdiagonalstrike");break;case"\\sout":y.setAttribute("notation","horizontalstrike");break;case"\\fbox":y.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=h.fontMetrics().fboxsep*h.fontMetrics().ptPerEm,y.setAttribute("width","+"+2*f+"pt"),y.setAttribute("height","+"+2*f+"pt"),y.setAttribute("lspace",f+"pt"),y.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var I=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness);y.setAttribute("style","border: "+I+"em solid "+String(u.borderColor))}break;case"\\xcancel":y.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&y.setAttribute("mathbackground",u.backgroundColor),y};_n({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,h,f){var y=u.parser,I=u.funcName,U=kn(h[0],"color-token").color,ge=h[1];return{type:"enclose",mode:y.mode,label:I,backgroundColor:U,body:ge}},htmlBuilder:fs,mathmlBuilder:Es}),_n({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,h,f){var y=u.parser,I=u.funcName,U=kn(h[0],"color-token").color,ge=kn(h[1],"color-token").color,Te=h[2];return{type:"enclose",mode:y.mode,label:I,backgroundColor:ge,borderColor:U,body:Te}},htmlBuilder:fs,mathmlBuilder:Es}),_n({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:h[0]}}}),_n({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,h,f){var y=u.parser,I=u.funcName,U=h[0];return{type:"enclose",mode:y.mode,label:I,body:U}},htmlBuilder:fs,mathmlBuilder:Es});var oa={};function Ni(z){for(var u=z.type,h=z.names,f=z.props,y=z.handler,I=z.htmlBuilder,U=z.mathmlBuilder,ge={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:y},Te=0;Te<h.length;++Te)oa[h[Te]]=ge;I&&(Dr[u]=I),U&&(Er[u]=U)}function la(z){var u=[];z.consumeSpaces();for(var h=z.fetch().text;h==="\\hline"||h==="\\hdashline";)z.consume(),u.push(h==="\\hdashline"),z.consumeSpaces(),h=z.fetch().text;return u}function qi(z,u,h){var f=u.hskipBeforeAndAfter,y=u.addJot,I=u.cols,U=u.arraystretch,ge=u.colSeparationType;if(z.gullet.beginGroup(),z.gullet.macros.set("\\\\","\\cr"),!U){var Te=z.gullet.expandMacroAsText("\\arraystretch");if(Te==null)U=1;else if(U=parseFloat(Te),!U||U<0)throw new g("Invalid \\arraystretch: "+Te)}z.gullet.beginGroup();var Ze=[],ft=[Ze],Nt=[],Jt=[];for(Jt.push(la(z));;){var fn=z.parseExpression(!1,"\\cr");z.gullet.endGroup(),z.gullet.beginGroup(),fn={type:"ordgroup",mode:z.mode,body:fn},h&&(fn={type:"styling",mode:z.mode,style:h,body:[fn]}),Ze.push(fn);var yn=z.fetch().text;if(yn==="&")z.consume();else if(yn==="\\end"){Ze.length===1&&fn.type==="styling"&&fn.body[0].body.length===0&&ft.pop(),Jt.length<ft.length+1&&Jt.push([]);break}else if(yn==="\\cr"){var Cn=kn(z.parseFunction(),"cr");Nt.push(Cn.size),Jt.push(la(z)),Ze=[],ft.push(Ze)}else throw new g("Expected & or \\\\ or \\cr or \\end",z.nextToken)}return z.gullet.endGroup(),z.gullet.endGroup(),{type:"array",mode:z.mode,addJot:y,arraystretch:U,body:ft,cols:I,rowGaps:Nt,hskipBeforeAndAfter:f,hLinesBeforeRow:Jt,colSeparationType:ge}}function Ss(z){return z.substr(0,1)==="d"?"display":"text"}var $i=function(u,h){var f,y,I=u.body.length,U=u.hLinesBeforeRow,ge=0,Te=new Array(I),Ze=[],ft=Math.max(h.fontMetrics().arrayRuleWidth,h.minRuleThickness),Nt=1/h.fontMetrics().ptPerEm,Jt=5*Nt;if(u.colSeparationType&&u.colSeparationType==="small"){var fn=h.havingStyle(x.SCRIPT).sizeMultiplier;Jt=.2778*(fn/h.sizeMultiplier)}var yn=12*Nt,Cn=3*Nt,Yn=u.arraystretch*yn,Jn=.7*Yn,hr=.3*Yn,yr=0;function Gr(Xs){for(var ga=0;ga<Xs.length;++ga)ga>0&&(yr+=.25),Ze.push({pos:yr,isDashed:Xs[ga]})}for(Gr(U[0]),f=0;f<u.body.length;++f){var Br=u.body[f],Wr=Jn,Vr=hr;ge<Br.length&&(ge=Br.length);var zr=new Array(Br.length);for(y=0;y<Br.length;++y){var gi=cr(Br[y],h);Vr<gi.depth&&(Vr=gi.depth),Wr<gi.height&&(Wr=gi.height),zr[y]=gi}var Qr=u.rowGaps[f],vt=0;Qr&&(vt=We(Qr,h),vt>0&&(vt+=hr,Vr<vt&&(Vr=vt),vt=0)),u.addJot&&(Vr+=Cn),zr.height=Wr,zr.depth=Vr,yr+=Wr,zr.pos=yr,yr+=Vr+vt,Te[f]=zr,Gr(U[f+1])}var Ii=yr/2+h.fontMetrics().axisHeight,Wi=u.cols||[],Ui=[],ii,os;for(y=0,os=0;y<ge||os<Wi.length;++y,++os){for(var Vi=Wi[os]||{},lo=!0;Vi.type==="separator";){if(lo||(ii=pt.makeSpan(["arraycolsep"],[]),ii.style.width=h.fontMetrics().doubleRuleSep+"em",Ui.push(ii)),Vi.separator==="|"||Vi.separator===":"){var Bo=Vi.separator==="|"?"solid":"dashed",Os=pt.makeSpan(["vertical-separator"],[],h);Os.style.height=yr+"em",Os.style.borderRightWidth=ft+"em",Os.style.borderRightStyle=Bo,Os.style.margin="0 -"+ft/2+"em",Os.style.verticalAlign=-(yr-Ii)+"em",Ui.push(Os)}else throw new g("Invalid separator type: "+Vi.separator);os++,Vi=Wi[os]||{},lo=!1}if(!(y>=ge)){var Ps=void 0;(y>0||u.hskipBeforeAndAfter)&&(Ps=K.deflt(Vi.pregap,Jt),Ps!==0&&(ii=pt.makeSpan(["arraycolsep"],[]),ii.style.width=Ps+"em",Ui.push(ii)));var zi=[];for(f=0;f<I;++f){var ks=Te[f],Ys=ks[y];if(Ys){var ma=ks.pos-Ii;Ys.depth=ks.depth,Ys.height=ks.height,zi.push({type:"elem",elem:Ys,shift:ma})}}zi=pt.makeVList({positionType:"individualShift",children:zi},h),zi=pt.makeSpan(["col-align-"+(Vi.align||"c")],[zi]),Ui.push(zi),(y<ge-1||u.hskipBeforeAndAfter)&&(Ps=K.deflt(Vi.postgap,Jt),Ps!==0&&(ii=pt.makeSpan(["arraycolsep"],[]),ii.style.width=Ps+"em",Ui.push(ii)))}}if(Te=pt.makeSpan(["mtable"],Ui),Ze.length>0){for(var Ri=pt.makeLineSpan("hline",h,ft),No=pt.makeLineSpan("hdashline",h,ft),pa=[{type:"elem",elem:Te,shift:0}];Ze.length>0;){var Ba=Ze.pop(),uo=Ba.pos-Ii;Ba.isDashed?pa.push({type:"elem",elem:No,shift:uo}):pa.push({type:"elem",elem:Ri,shift:uo})}Te=pt.makeVList({positionType:"individualShift",children:pa},h)}return pt.makeSpan(["mord"],[Te],h)},js={c:"center ",l:"left ",r:"right "},Lr=function(u,h){var f=new mn.MathNode("mtable",u.body.map(function(yr){return new mn.MathNode("mtr",yr.map(function(Gr){return new mn.MathNode("mtd",[Fn(Gr,h)])}))})),y=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",y+"em");var I="",U="";if(u.cols){var ge=u.cols,Te="",Ze=!1,ft=0,Nt=ge.length;ge[0].type==="separator"&&(I+="top ",ft=1),ge[ge.length-1].type==="separator"&&(I+="bottom ",Nt-=1);for(var Jt=ft;Jt<Nt;Jt++)ge[Jt].type==="align"?(U+=js[ge[Jt].align],Ze&&(Te+="none "),Ze=!0):ge[Jt].type==="separator"&&Ze&&(Te+=ge[Jt].separator==="|"?"solid ":"dashed ",Ze=!1);f.setAttribute("columnalign",U.trim()),/[sd]/.test(Te)&&f.setAttribute("columnlines",Te.trim())}if(u.colSeparationType==="align"){for(var fn=u.cols||[],yn="",Cn=1;Cn<fn.length;Cn++)yn+=Cn%2?"0em ":"1em ";f.setAttribute("columnspacing",yn.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var Yn="",Jn=u.hLinesBeforeRow;I+=Jn[0].length>0?"left ":"",I+=Jn[Jn.length-1].length>0?"right ":"";for(var hr=1;hr<Jn.length-1;hr++)Yn+=Jn[hr].length===0?"none ":Jn[hr][0]?"dashed ":"solid ";return/[sd]/.test(Yn)&&f.setAttribute("rowlines",Yn.trim()),I!==""&&(f=new mn.MathNode("menclose",[f]),f.setAttribute("notation",I.trim())),u.arraystretch&&u.arraystretch<1&&(f=new mn.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},Or=function(u,h){var f=[],y=qi(u.parser,{cols:f,addJot:!0},"display"),I,U=0,ge={type:"ordgroup",mode:u.mode,body:[]},Te=sr(h[0],"ordgroup");if(Te){for(var Ze="",ft=0;ft<Te.body.length;ft++){var Nt=kn(Te.body[ft],"textord");Ze+=Nt.text}I=Number(Ze),U=I*2}var Jt=!U;y.body.forEach(function(Yn){for(var Jn=1;Jn<Yn.length;Jn+=2){var hr=kn(Yn[Jn],"styling"),yr=kn(hr.body[0],"ordgroup");yr.body.unshift(ge)}if(Jt)U<Yn.length&&(U=Yn.length);else{var Gr=Yn.length/2;if(I<Gr)throw new g("Too many math in a row: "+("expected "+I+", but got "+Gr),Yn[0])}});for(var fn=0;fn<U;++fn){var yn="r",Cn=0;fn%2===1?yn="l":fn>0&&Jt&&(Cn=1),f[fn]={type:"align",align:yn,pregap:Cn,postgap:0}}return y.colSeparationType=Jt?"align":"alignat",y};Ni({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,h){var f=Rn(h[0]),y=f?[h[0]]:kn(h[0],"ordgroup").body,I=y.map(function(ge){var Te=br(ge),Ze=Te.text;if("lcr".indexOf(Ze)!==-1)return{type:"align",align:Ze};if(Ze==="|")return{type:"separator",separator:"|"};if(Ze===":")return{type:"separator",separator:":"};throw new g("Unknown column alignment: "+Ze,ge)}),U={cols:I,hskipBeforeAndAfter:!0};return qi(u.parser,U,Ss(u.envName))},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var h={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},y=qi(u.parser,f,Ss(u.envName));return h?{type:"leftright",mode:u.mode,body:[y],left:h[0],right:h[1],rightColor:void 0}:y},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var h={arraystretch:.5},f=qi(u.parser,h,"script");return f.colSeparationType="small",f},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,h){var f=Rn(h[0]),y=f?[h[0]]:kn(h[0],"ordgroup").body,I=y.map(function(ge){var Te=br(ge),Ze=Te.text;if("lc".indexOf(Ze)!==-1)return{type:"align",align:Ze};throw new g("Unknown column alignment: "+Ze,ge)});if(I.length>1)throw new g("{subarray} can contain only one column");var U={cols:I,hskipBeforeAndAfter:!1,arraystretch:.5};if(U=qi(u.parser,U,"script"),U.body[0].length>1)throw new g("{subarray} can contain only one column");return U},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var h={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=qi(u.parser,h,Ss(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["aligned"],props:{numArgs:0},handler:Or,htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var h={cols:[{type:"align",align:"c"}],addJot:!0};return qi(u.parser,h,"display")},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({type:"array",names:["alignedat"],props:{numArgs:1},handler:Or,htmlBuilder:$i,mathmlBuilder:Lr}),_n({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,h){throw new g(u.funcName+" valid only within array environment")}});var Ur=oa,hi=Ur;_n({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];if(I.type!=="ordgroup")throw new g("Invalid environment name",I);for(var U="",ge=0;ge<I.body.length;++ge)U+=kn(I.body[ge],"textord").text;if(y==="\\begin"){if(!hi.hasOwnProperty(U))throw new g("No such environment: "+U,I);var Te=hi[U],Ze=f.parseArguments("\\begin{"+U+"}",Te),ft=Ze.args,Nt=Ze.optArgs,Jt={mode:f.mode,envName:U,parser:f},fn=Te.handler(Jt,ft,Nt);f.expect("\\end",!1);var yn=f.nextToken,Cn=kn(f.parseFunction(),"environment");if(Cn.name!==U)throw new g("Mismatch: \\begin{"+U+"} matched by \\end{"+Cn.name+"}",yn);return fn}return{type:"environment",mode:f.mode,name:U,nameGroup:I}}});var fi=pt.makeSpan;function ms(z,u){var h=Sr(z.body,u,!0);return fi([z.mclass],h,u)}function ps(z,u){var h,f=ur(z.body,u);return z.mclass==="minner"?mn.newDocumentFragment(f):(z.mclass==="mord"?z.isCharacterBox?(h=f[0],h.type="mi"):h=new mn.MathNode("mi",f):(z.isCharacterBox?(h=f[0],h.type="mo"):h=new mn.MathNode("mo",f),z.mclass==="mbin"?(h.attributes.lspace="0.22em",h.attributes.rspace="0.22em"):z.mclass==="mpunct"?(h.attributes.lspace="0em",h.attributes.rspace="0.17em"):(z.mclass==="mopen"||z.mclass==="mclose")&&(h.attributes.lspace="0em",h.attributes.rspace="0em")),h)}_n({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"mclass",mode:f.mode,mclass:"m"+y.substr(5),body:qn(I),isCharacterBox:K.isCharacterBox(I)}},htmlBuilder:ms,mathmlBuilder:ps});var Ji=function(u){var h=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return h.type==="atom"&&(h.family==="bin"||h.family==="rel")?"m"+h.family:"mord"};_n({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,h){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:Ji(h[0]),body:[h[1]],isCharacterBox:K.isCharacterBox(h[1])}}}),_n({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[1],U=h[0],ge;y!=="\\stackrel"?ge=Ji(I):ge="mrel";var Te={type:"op",mode:I.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:y!=="\\stackrel",body:qn(I)},Ze={type:"supsub",mode:U.mode,base:Te,sup:y==="\\underset"?null:U,sub:y==="\\underset"?U:null};return{type:"mclass",mode:f.mode,mclass:ge,body:[Ze],isCharacterBox:K.isCharacterBox(Ze)}},htmlBuilder:ms,mathmlBuilder:ps});var Hs=function(u,h){var f=u.font,y=h.withFont(f);return cr(u.body,y)},ws=function(u,h){var f=u.font,y=h.withFont(f);return Fn(u.body,y)},es={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};_n({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0],U=y;return U in es&&(U=es[U]),{type:"font",mode:f.mode,font:U.slice(1),body:I}},htmlBuilder:Hs,mathmlBuilder:ws}),_n({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,y=h[0],I=K.isCharacterBox(y);return{type:"mclass",mode:f.mode,mclass:Ji(y),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:y}],isCharacterBox:I}}}),_n({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=u.breakOnTokenText,U=f.mode,ge=f.parseExpression(!0,I),Te="math"+y.slice(1);return{type:"font",mode:U,font:Te,body:{type:"ordgroup",mode:f.mode,body:ge}}},htmlBuilder:Hs,mathmlBuilder:ws});var As=function(u,h){var f=h;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},Ts=function(u,h){var f=As(u.size,h.style),y=f.fracNum(),I=f.fracDen(),U;U=h.havingStyle(y);var ge=cr(u.numer,U,h);if(u.continued){var Te=8.5/h.fontMetrics().ptPerEm,Ze=3.5/h.fontMetrics().ptPerEm;ge.height=ge.height<Te?Te:ge.height,ge.depth=ge.depth<Ze?Ze:ge.depth}U=h.havingStyle(I);var ft=cr(u.denom,U,h),Nt,Jt,fn;u.hasBarLine?(u.barSize?(Jt=We(u.barSize,h),Nt=pt.makeLineSpan("frac-line",h,Jt)):Nt=pt.makeLineSpan("frac-line",h),Jt=Nt.height,fn=Nt.height):(Nt=null,Jt=0,fn=h.fontMetrics().defaultRuleThickness);var yn,Cn,Yn;f.size===x.DISPLAY.size||u.size==="display"?(yn=h.fontMetrics().num1,Jt>0?Cn=3*fn:Cn=7*fn,Yn=h.fontMetrics().denom1):(Jt>0?(yn=h.fontMetrics().num2,Cn=fn):(yn=h.fontMetrics().num3,Cn=3*fn),Yn=h.fontMetrics().denom2);var Jn;if(Nt){var yr=h.fontMetrics().axisHeight;yn-ge.depth-(yr+.5*Jt)<Cn&&(yn+=Cn-(yn-ge.depth-(yr+.5*Jt))),yr-.5*Jt-(ft.height-Yn)<Cn&&(Yn+=Cn-(yr-.5*Jt-(ft.height-Yn)));var Gr=-(yr-.5*Jt);Jn=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:Yn},{type:"elem",elem:Nt,shift:Gr},{type:"elem",elem:ge,shift:-yn}]},h)}else{var hr=yn-ge.depth-(ft.height-Yn);hr<Cn&&(yn+=.5*(Cn-hr),Yn+=.5*(Cn-hr)),Jn=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:Yn},{type:"elem",elem:ge,shift:-yn}]},h)}U=h.havingStyle(f),Jn.height*=U.sizeMultiplier/h.sizeMultiplier,Jn.depth*=U.sizeMultiplier/h.sizeMultiplier;var Br;f.size===x.DISPLAY.size?Br=h.fontMetrics().delim1:Br=h.fontMetrics().delim2;var Wr,Vr;return u.leftDelim==null?Wr=oi(h,["mopen"]):Wr=Oi.customSizedDelim(u.leftDelim,Br,!0,h.havingStyle(f),u.mode,["mopen"]),u.continued?Vr=pt.makeSpan([]):u.rightDelim==null?Vr=oi(h,["mclose"]):Vr=Oi.customSizedDelim(u.rightDelim,Br,!0,h.havingStyle(f),u.mode,["mclose"]),pt.makeSpan(["mord"].concat(U.sizingClasses(h)),[Wr,pt.makeSpan(["mfrac"],[Jn]),Vr],h)},Cs=function(u,h){var f=new mn.MathNode("mfrac",[Fn(u.numer,h),Fn(u.denom,h)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var y=We(u.barSize,h);f.setAttribute("linethickness",y+"em")}var I=As(u.size,h.style);if(I.size!==h.style.size){f=new mn.MathNode("mstyle",[f]);var U=I.size===x.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",U),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var ge=[];if(u.leftDelim!=null){var Te=new mn.MathNode("mo",[new mn.TextNode(u.leftDelim.replace("\\",""))]);Te.setAttribute("fence","true"),ge.push(Te)}if(ge.push(f),u.rightDelim!=null){var Ze=new mn.MathNode("mo",[new mn.TextNode(u.rightDelim.replace("\\",""))]);Ze.setAttribute("fence","true"),ge.push(Ze)}return vr(ge)}return f};_n({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0],U=h[1],ge,Te=null,Ze=null,ft="auto";switch(y){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ge=!0;break;case"\\\\atopfrac":ge=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ge=!1,Te="(",Ze=")";break;case"\\\\bracefrac":ge=!1,Te="\\{",Ze="\\}";break;case"\\\\brackfrac":ge=!1,Te="[",Ze="]";break;default:throw new Error("Unrecognized genfrac command")}switch(y){case"\\cfrac":case"\\dfrac":case"\\dbinom":ft="display";break;case"\\tfrac":case"\\tbinom":ft="text";break}return{type:"genfrac",mode:f.mode,continued:y==="\\cfrac",numer:I,denom:U,hasBarLine:ge,leftDelim:Te,rightDelim:Ze,size:ft,barSize:null}},htmlBuilder:Ts,mathmlBuilder:Cs}),_n({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var h=u.parser,f=u.funcName,y=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:h.mode,replaceWith:I,token:y}}});var mi=["display","text","script","scriptscript"],bi=function(u){var h=null;return u.length>0&&(h=u,h=h==="."?null:h),h};_n({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,h){var f=u.parser,y=h[4],I=h[5],U=sr(h[0],"atom");U&&(U=xr(h[0],"open"));var ge=U?bi(U.text):null,Te=sr(h[1],"atom");Te&&(Te=xr(h[1],"close"));var Ze=Te?bi(Te.text):null,ft=kn(h[2],"size"),Nt,Jt=null;ft.isBlank?Nt=!0:(Jt=ft.value,Nt=Jt.number>0);var fn="auto",yn=sr(h[3],"ordgroup");if(yn){if(yn.body.length>0){var Cn=kn(yn.body[0],"textord");fn=mi[Number(Cn.text)]}}else yn=kn(h[3],"textord"),fn=mi[Number(yn.text)];return{type:"genfrac",mode:f.mode,numer:y,denom:I,continued:!1,hasBarLine:Nt,barSize:Jt,leftDelim:ge,rightDelim:Ze,size:fn}},htmlBuilder:Ts,mathmlBuilder:Cs}),_n({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:kn(h[0],"size").value,token:I}}}),_n({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0],U=q(kn(h[1],"infix").size),ge=h[2],Te=U.number>0;return{type:"genfrac",mode:f.mode,numer:I,denom:ge,continued:!1,hasBarLine:Te,barSize:U,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Ts,mathmlBuilder:Cs});var Ha=function(u,h){var f=h.style,y,I,U=sr(u,"supsub");U?(y=U.sup?cr(U.sup,h.havingStyle(f.sup()),h):cr(U.sub,h.havingStyle(f.sub()),h),I=kn(U.base,"horizBrace")):I=kn(u,"horizBrace");var ge=cr(I.base,h.havingBaseStyle(x.DISPLAY)),Te=yi.svgSpan(I,h),Ze;if(I.isOver?(Ze=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:.1},{type:"elem",elem:Te}]},h),Ze.children[0].children[0].children[1].classes.push("svg-align")):(Ze=pt.makeVList({positionType:"bottom",positionData:ge.depth+.1+Te.height,children:[{type:"elem",elem:Te},{type:"kern",size:.1},{type:"elem",elem:ge}]},h),Ze.children[0].children[0].children[0].classes.push("svg-align")),y){var ft=pt.makeSpan(["mord",I.isOver?"mover":"munder"],[Ze],h);I.isOver?Ze=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ft},{type:"kern",size:.2},{type:"elem",elem:y}]},h):Ze=pt.makeVList({positionType:"bottom",positionData:ft.depth+.2+y.height+y.depth,children:[{type:"elem",elem:y},{type:"kern",size:.2},{type:"elem",elem:ft}]},h)}return pt.makeSpan(["mord",I.isOver?"mover":"munder"],[Ze],h)},sn=function(u,h){var f=yi.mathMLnode(u.label);return new mn.MathNode(u.isOver?"mover":"munder",[Fn(u.base,h),f])};_n({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName;return{type:"horizBrace",mode:f.mode,label:y,isOver:/^\\over/.test(y),base:h[0]}},htmlBuilder:Ha,mathmlBuilder:sn}),_n({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[1],I=kn(h[0],"url").url;return f.settings.isTrusted({command:"\\href",url:I})?{type:"href",mode:f.mode,href:I,body:qn(y)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,h){var f=Sr(u.body,h,!1);return pt.makeAnchor(u.href,[],f,h)},mathmlBuilder:function(u,h){var f=pr(u.body,h);return f instanceof Hr||(f=new Hr("mrow",[f])),f.setAttribute("href",u.href),f}}),_n({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=kn(h[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:y}))return f.formatUnsupportedCmd("\\url");for(var I=[],U=0;U<y.length;U++){var ge=y[U];ge==="~"&&(ge="\\textasciitilde"),I.push({type:"textord",mode:"text",text:ge})}var Te={type:"text",mode:f.mode,font:"\\texttt",body:I};return{type:"href",mode:f.mode,href:y,body:qn(Te)}}}),_n({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"htmlmathml",mode:f.mode,html:qn(h[0]),mathml:qn(h[1])}},htmlBuilder:function(u,h){var f=Sr(u.html,h,!1);return pt.makeFragment(f)},mathmlBuilder:function(u,h){return pr(u.mathml,h)}});var Ks=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var h=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!h)throw new g("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(h[1]+h[2]),unit:h[3]};if(!_t(f))throw new g("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};_n({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,h,f){var y=u.parser,I={number:0,unit:"em"},U={number:.9,unit:"em"},ge={number:0,unit:"em"},Te="";if(f[0])for(var Ze=kn(f[0],"raw").string,ft=Ze.split(","),Nt=0;Nt<ft.length;Nt++){var Jt=ft[Nt].split("=");if(Jt.length===2){var fn=Jt[1].trim();switch(Jt[0].trim()){case"alt":Te=fn;break;case"width":I=Ks(fn);break;case"height":U=Ks(fn);break;case"totalheight":ge=Ks(fn);break;default:throw new g("Invalid key: '"+Jt[0]+"' in \\includegraphics.")}}}var yn=kn(h[0],"url").url;return Te===""&&(Te=yn,Te=Te.replace(/^.*[\\/]/,""),Te=Te.substring(0,Te.lastIndexOf("."))),y.settings.isTrusted({command:"\\includegraphics",url:yn})?{type:"includegraphics",mode:y.mode,alt:Te,width:I,height:U,totalheight:ge,src:yn}:y.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,h){var f=We(u.height,h),y=0;u.totalheight.number>0&&(y=We(u.totalheight,h)-f,y=Number(y.toFixed(2)));var I=0;u.width.number>0&&(I=We(u.width,h));var U={height:f+y+"em"};I>0&&(U.width=I+"em"),y>0&&(U.verticalAlign=-y+"em");var ge=new Ie(u.src,u.alt,U);return ge.height=f,ge.depth=y,ge},mathmlBuilder:function(u,h){var f=new mn.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var y=We(u.height,h),I=0;if(u.totalheight.number>0&&(I=We(u.totalheight,h)-y,I=I.toFixed(2),f.setAttribute("valign","-"+I+"em")),f.setAttribute("height",y+I+"em"),u.width.number>0){var U=We(u.width,h);f.setAttribute("width",U+"em")}return f.setAttribute("src",u.src),f}}),_n({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=kn(h[0],"size");if(f.settings.strict){var U=y[1]==="m",ge=I.value.unit==="mu";U?(ge||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" supports only mu units, "+("not "+I.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" works only in math mode")):ge&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:I.value}},htmlBuilder:function(u,h){return pt.makeGlue(u.dimension,h)},mathmlBuilder:function(u,h){var f=We(u.dimension,h);return new mn.SpaceNode(f)}}),_n({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"lap",mode:f.mode,alignment:y.slice(5),body:I}},htmlBuilder:function(u,h){var f;u.alignment==="clap"?(f=pt.makeSpan([],[cr(u.body,h)]),f=pt.makeSpan(["inner"],[f],h)):f=pt.makeSpan(["inner"],[cr(u.body,h)]);var y=pt.makeSpan(["fix"],[]),I=pt.makeSpan([u.alignment],[f,y],h),U=pt.makeSpan(["strut"]);return U.style.height=I.height+I.depth+"em",U.style.verticalAlign=-I.depth+"em",I.children.unshift(U),I=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:I}]},h),pt.makeSpan(["mord"],[I],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Fn(u.body,h)]);if(u.alignment!=="rlap"){var y=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",y+"width")}return f.setAttribute("width","0px"),f}}),_n({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=u.funcName,y=u.parser,I=y.mode;y.switchMode("math");var U=f==="\\("?"\\)":"$",ge=y.parseExpression(!1,U);return y.expect(U),y.switchMode(I),{type:"styling",mode:y.mode,style:"text",body:ge}}}),_n({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){throw new g("Mismatched "+u.funcName)}});var Aa=function(u,h){switch(h.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}};_n({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,h){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:qn(h[0]),text:qn(h[1]),script:qn(h[2]),scriptscript:qn(h[3])}},htmlBuilder:function(u,h){var f=Aa(u,h),y=Sr(f,h,!1);return pt.makeFragment(y)},mathmlBuilder:function(u,h){var f=Aa(u,h);return pr(f,h)}});var Ta=function(u,h,f,y,I,U,ge){u=pt.makeSpan([],[u]);var Te,Ze;if(h){var ft=cr(h,y.havingStyle(I.sup()),y);Ze={elem:ft,kern:Math.max(y.fontMetrics().bigOpSpacing1,y.fontMetrics().bigOpSpacing3-ft.depth)}}if(f){var Nt=cr(f,y.havingStyle(I.sub()),y);Te={elem:Nt,kern:Math.max(y.fontMetrics().bigOpSpacing2,y.fontMetrics().bigOpSpacing4-Nt.height)}}var Jt;if(Ze&&Te){var fn=y.fontMetrics().bigOpSpacing5+Te.elem.height+Te.elem.depth+Te.kern+u.depth+ge;Jt=pt.makeVList({positionType:"bottom",positionData:fn,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-U+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u},{type:"kern",size:Ze.kern},{type:"elem",elem:Ze.elem,marginLeft:U+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else if(Te){var yn=u.height-ge;Jt=pt.makeVList({positionType:"top",positionData:yn,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-U+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u}]},y)}else if(Ze){var Cn=u.depth+ge;Jt=pt.makeVList({positionType:"bottom",positionData:Cn,children:[{type:"elem",elem:u},{type:"kern",size:Ze.kern},{type:"elem",elem:Ze.elem,marginLeft:U+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else return u;return pt.makeSpan(["mop","op-limits"],[Jt],y)},Ka=["\\smallint"],as=function(u,h){var f,y,I=!1,U,ge=sr(u,"supsub");ge?(f=ge.sup,y=ge.sub,U=kn(ge.base,"op"),I=!0):U=kn(u,"op");var Te=h.style,Ze=!1;Te.size===x.DISPLAY.size&&U.symbol&&!K.contains(Ka,U.name)&&(Ze=!0);var ft;if(U.symbol){var Nt=Ze?"Size2-Regular":"Size1-Regular",Jt="";if((U.name==="\\oiint"||U.name==="\\oiiint")&&(Jt=U.name.substr(1),U.name=Jt==="oiint"?"\\iint":"\\iiint"),ft=pt.makeSymbol(U.name,Nt,"math",h,["mop","op-symbol",Ze?"large-op":"small-op"]),Jt.length>0){var fn=ft.italic,yn=pt.staticSvg(Jt+"Size"+(Ze?"2":"1"),h);ft=pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:0},{type:"elem",elem:yn,shift:Ze?.08:0}]},h),U.name="\\"+Jt,ft.classes.unshift("mop"),ft.italic=fn}}else if(U.body){var Cn=Sr(U.body,h,!0);Cn.length===1&&Cn[0]instanceof pe?(ft=Cn[0],ft.classes[0]="mop"):ft=pt.makeSpan(["mop"],pt.tryCombineChars(Cn),h)}else{for(var Yn=[],Jn=1;Jn<U.name.length;Jn++)Yn.push(pt.mathsym(U.name[Jn],U.mode,h));ft=pt.makeSpan(["mop"],Yn,h)}var hr=0,yr=0;return(ft instanceof pe||U.name==="\\oiint"||U.name==="\\oiiint")&&!U.suppressBaseShift&&(hr=(ft.height-ft.depth)/2-h.fontMetrics().axisHeight,yr=ft.italic),I?Ta(ft,f,y,h,Te,yr,hr):(hr&&(ft.style.position="relative",ft.style.top=hr+"em"),ft)},Ds=function(u,h){var f;if(u.symbol)f=new Hr("mo",[Xn(u.name,u.mode)]),K.contains(Ka,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Hr("mo",ur(u.body,h));else{f=new Hr("mi",[new rr(u.name.slice(1))]);var y=new Hr("mo",[Xn("\u2061","text")]);u.parentIsSupSub?f=new Hr("mo",[f,y]):f=ti([f,y])}return f},To={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};_n({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,h){var f=u.parser,y=u.funcName,I=y;return I.length===1&&(I=To[I]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:I}},htmlBuilder:as,mathmlBuilder:Ds}),_n({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=h[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:qn(y)}},htmlBuilder:as,mathmlBuilder:Ds});var Co={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};_n({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 h=u.parser,f=u.funcName;return{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),_n({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var h=u.parser,f=u.funcName;return{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),_n({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var h=u.parser,f=u.funcName,y=f;return y.length===1&&(y=Co[y]),{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:y}},htmlBuilder:as,mathmlBuilder:Ds});var ua=function(u,h){var f,y,I=!1,U,ge=sr(u,"supsub");ge?(f=ge.sup,y=ge.sub,U=kn(ge.base,"operatorname"),I=!0):U=kn(u,"operatorname");var Te;if(U.body.length>0){for(var Ze=U.body.map(function(fn){var yn=fn.text;return typeof yn=="string"?{type:"textord",mode:fn.mode,text:yn}:fn}),ft=Sr(Ze,h.withFont("mathrm"),!0),Nt=0;Nt<ft.length;Nt++){var Jt=ft[Nt];Jt instanceof pe&&(Jt.text=Jt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Te=pt.makeSpan(["mop"],ft,h)}else Te=pt.makeSpan(["mop"],[],h);return I?Ta(Te,f,y,h,h.style,0,0):Te},Gs=function(u,h){for(var f=ur(u.body,h.withFont("mathrm")),y=!0,I=0;I<f.length;I++){var U=f[I];if(!(U instanceof mn.SpaceNode))if(U instanceof mn.MathNode)switch(U.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var ge=U.children[0];U.children.length===1&&ge instanceof mn.TextNode?ge.text=ge.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):y=!1;break}default:y=!1}else y=!1}if(y){var Te=f.map(function(Nt){return Nt.toText()}).join("");f=[new mn.TextNode(Te)]}var Ze=new mn.MathNode("mi",f);Ze.setAttribute("mathvariant","normal");var ft=new mn.MathNode("mo",[Xn("\u2061","text")]);return u.parentIsSupSub?new mn.MathNode("mo",[Ze,ft]):mn.newDocumentFragment([Ze,ft])};_n({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"operatorname",mode:f.mode,body:qn(I),alwaysHandleSupSub:y==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ua,mathmlBuilder:Gs}),Gn({type:"ordgroup",htmlBuilder:function(u,h){return u.semisimple?pt.makeFragment(Sr(u.body,h,!1)):pt.makeSpan(["mord"],Sr(u.body,h,!0),h)},mathmlBuilder:function(u,h){return pr(u.body,h,!0)}}),_n({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=h[0];return{type:"overline",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=cr(u.body,h.havingCrampedStyle()),y=pt.makeLineSpan("overline-line",h),I=h.fontMetrics().defaultRuleThickness,U=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*I},{type:"elem",elem:y},{type:"kern",size:I}]},h);return pt.makeSpan(["mord","overline"],[U],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[new mn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new mn.MathNode("mover",[Fn(u.body,h),f]);return y.setAttribute("accent","true"),y}}),_n({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"phantom",mode:f.mode,body:qn(y)}},htmlBuilder:function(u,h){var f=Sr(u.body,h.withPhantom(),!1);return pt.makeFragment(f)},mathmlBuilder:function(u,h){var f=ur(u.body,h);return new mn.MathNode("mphantom",f)}}),_n({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"hphantom",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=pt.makeSpan([],[cr(u.body,h.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var y=0;y<f.children.length;y++)f.children[y].height=0,f.children[y].depth=0;return f=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h),pt.makeSpan(["mord"],[f],h)},mathmlBuilder:function(u,h){var f=ur(qn(u.body),h),y=new mn.MathNode("mphantom",f),I=new mn.MathNode("mpadded",[y]);return I.setAttribute("height","0px"),I.setAttribute("depth","0px"),I}}),_n({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"vphantom",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=pt.makeSpan(["inner"],[cr(u.body,h.withPhantom())]),y=pt.makeSpan(["fix"],[]);return pt.makeSpan(["mord","rlap"],[f,y],h)},mathmlBuilder:function(u,h){var f=ur(qn(u.body),h),y=new mn.MathNode("mphantom",f),I=new mn.MathNode("mpadded",[y]);return I.setAttribute("width","0px"),I}}),_n({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=kn(h[0],"size").value,I=h[1];return{type:"raisebox",mode:f.mode,dy:y,body:I}},htmlBuilder:function(u,h){var f=cr(u.body,h),y=We(u.dy,h);return pt.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:f}]},h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Fn(u.body,h)]),y=u.dy.number+u.dy.unit;return f.setAttribute("voffset",y),f}}),_n({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,h,f){var y=u.parser,I=f[0],U=kn(h[0],"size"),ge=kn(h[1],"size");return{type:"rule",mode:y.mode,shift:I&&kn(I,"size").value,width:U.value,height:ge.value}},htmlBuilder:function(u,h){var f=pt.makeSpan(["mord","rule"],[],h),y=We(u.width,h),I=We(u.height,h),U=u.shift?We(u.shift,h):0;return f.style.borderRightWidth=y+"em",f.style.borderTopWidth=I+"em",f.style.bottom=U+"em",f.width=y,f.height=I+U,f.depth=-U,f.maxFontSize=I*1.125*h.sizeMultiplier,f},mathmlBuilder:function(u,h){var f=We(u.width,h),y=We(u.height,h),I=u.shift?We(u.shift,h):0,U=h.color&&h.getColor()||"black",ge=new mn.MathNode("mspace");ge.setAttribute("mathbackground",U),ge.setAttribute("width",f+"em"),ge.setAttribute("height",y+"em");var Te=new mn.MathNode("mpadded",[ge]);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(z,u,h){for(var f=Sr(z,u,!1),y=u.sizeMultiplier/h.sizeMultiplier,I=0;I<f.length;I++){var U=f[I].classes.indexOf("sizing");U<0?Array.prototype.push.apply(f[I].classes,u.sizingClasses(h)):f[I].classes[U+1]==="reset-size"+u.size&&(f[I].classes[U+1]="reset-size"+h.size),f[I].height*=y,f[I].depth*=y}return pt.makeFragment(f)}var Ga=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Do=function(u,h){var f=h.havingSize(u.size);return gs(u.body,f,h)};_n({type:"sizing",names:Ga,props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,y=u.funcName,I=u.parser,U=I.parseExpression(!1,f);return{type:"sizing",mode:I.mode,size:Ga.indexOf(y)+1,body:U}},htmlBuilder:Do,mathmlBuilder:function(u,h){var f=h.havingSize(u.size),y=ur(u.body,f),I=new mn.MathNode("mstyle",y);return I.setAttribute("mathsize",f.sizeMultiplier+"em"),I}}),_n({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,h,f){var y=u.parser,I=!1,U=!1,ge=f[0]&&kn(f[0],"ordgroup");if(ge)for(var Te="",Ze=0;Ze<ge.body.length;++Ze){var ft=ge.body[Ze];if(Te=ft.text,Te==="t")I=!0;else if(Te==="b")U=!0;else{I=!1,U=!1;break}}else I=!0,U=!0;var Nt=h[0];return{type:"smash",mode:y.mode,body:Nt,smashHeight:I,smashDepth:U}},htmlBuilder:function(u,h){var f=pt.makeSpan([],[cr(u.body,h)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var y=0;y<f.children.length;y++)f.children[y].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 U=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h);return pt.makeSpan(["mord"],[U],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Fn(u.body,h)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),_n({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,h,f){var y=u.parser,I=f[0],U=h[0];return{type:"sqrt",mode:y.mode,body:U,index:I}},htmlBuilder:function(u,h){var f=cr(u.body,h.havingCrampedStyle());f.height===0&&(f.height=h.fontMetrics().xHeight),f=pt.wrapFragment(f,h);var y=h.fontMetrics(),I=y.defaultRuleThickness,U=I;h.style.id<x.TEXT.id&&(U=h.fontMetrics().xHeight);var ge=I+U/4,Te=f.height+f.depth+ge+I,Ze=Oi.sqrtImage(Te,h),ft=Ze.span,Nt=Ze.ruleWidth,Jt=Ze.advanceWidth,fn=ft.height-Nt;fn>f.height+f.depth+ge&&(ge=(ge+fn-f.height-f.depth)/2);var yn=ft.height-f.height-ge-Nt;f.style.paddingLeft=Jt+"em";var Cn=pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+yn)},{type:"elem",elem:ft},{type:"kern",size:Nt}]},h);if(u.index){var Yn=h.havingStyle(x.SCRIPTSCRIPT),Jn=cr(u.index,Yn,h),hr=.6*(Cn.height-Cn.depth),yr=pt.makeVList({positionType:"shift",positionData:-hr,children:[{type:"elem",elem:Jn}]},h),Gr=pt.makeSpan(["root"],[yr]);return pt.makeSpan(["mord","sqrt"],[Gr,Cn],h)}else return pt.makeSpan(["mord","sqrt"],[Cn],h)},mathmlBuilder:function(u,h){var f=u.body,y=u.index;return y?new mn.MathNode("mroot",[Fn(f,h),Fn(y,h)]):new mn.MathNode("msqrt",[Fn(f,h)])}});var Wa={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};_n({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,y=u.funcName,I=u.parser,U=I.parseExpression(!0,f),ge=y.slice(1,y.length-5);return{type:"styling",mode:I.mode,style:ge,body:U}},htmlBuilder:function(u,h){var f=Wa[u.style],y=h.havingStyle(f).withFont("");return gs(u.body,y,h)},mathmlBuilder:function(u,h){var f=Wa[u.style],y=h.havingStyle(f),I=ur(u.body,y),U=new mn.MathNode("mstyle",I),ge={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Te=ge[u.style];return U.setAttribute("scriptlevel",Te[0]),U.setAttribute("displaystyle",Te[1]),U}});var Io=function(u,h){var f=u.base;if(f)if(f.type==="op"){var y=f.limits&&(h.style.size===x.DISPLAY.size||f.alwaysHandleSupSub);return y?as:null}else if(f.type==="operatorname"){var I=f.alwaysHandleSupSub&&(h.style.size===x.DISPLAY.size||f.limits);return I?ua:null}else{if(f.type==="accent")return K.isCharacterBox(f.base)?$n:null;if(f.type==="horizBrace"){var U=!u.sub;return U===f.isOver?Ha:null}else return null}else return null};Gn({type:"supsub",htmlBuilder:function(u,h){var f=Io(u,h);if(f)return f(u,h);var y=u.base,I=u.sup,U=u.sub,ge=cr(y,h),Te,Ze,ft=h.fontMetrics(),Nt=0,Jt=0,fn=y&&K.isCharacterBox(y);if(I){var yn=h.havingStyle(h.style.sup());Te=cr(I,yn,h),fn||(Nt=ge.height-yn.fontMetrics().supDrop*yn.sizeMultiplier/h.sizeMultiplier)}if(U){var Cn=h.havingStyle(h.style.sub());Ze=cr(U,Cn,h),fn||(Jt=ge.depth+Cn.fontMetrics().subDrop*Cn.sizeMultiplier/h.sizeMultiplier)}var Yn;h.style===x.DISPLAY?Yn=ft.sup1:h.style.cramped?Yn=ft.sup3:Yn=ft.sup2;var Jn=h.sizeMultiplier,hr=.5/ft.ptPerEm/Jn+"em",yr=null;if(Ze){var Gr=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(ge instanceof pe||Gr)&&(yr=-ge.italic+"em")}var Br;if(Te&&Ze){Nt=Math.max(Nt,Yn,Te.depth+.25*ft.xHeight),Jt=Math.max(Jt,ft.sub2);var Wr=ft.defaultRuleThickness,Vr=4*Wr;if(Nt-Te.depth-(Ze.height-Jt)<Vr){Jt=Vr-(Nt-Te.depth)+Ze.height;var zr=.8*ft.xHeight-(Nt-Te.depth);zr>0&&(Nt+=zr,Jt-=zr)}var gi=[{type:"elem",elem:Ze,shift:Jt,marginRight:hr,marginLeft:yr},{type:"elem",elem:Te,shift:-Nt,marginRight:hr}];Br=pt.makeVList({positionType:"individualShift",children:gi},h)}else if(Ze){Jt=Math.max(Jt,ft.sub1,Ze.height-.8*ft.xHeight);var Qr=[{type:"elem",elem:Ze,marginLeft:yr,marginRight:hr}];Br=pt.makeVList({positionType:"shift",positionData:Jt,children:Qr},h)}else if(Te)Nt=Math.max(Nt,Yn,Te.depth+.25*ft.xHeight),Br=pt.makeVList({positionType:"shift",positionData:-Nt,children:[{type:"elem",elem:Te,marginRight:hr}]},h);else throw new Error("supsub must have either sup or sub.");var vt=ai(ge,"right")||"mord";return pt.makeSpan([vt],[ge,pt.makeSpan(["msupsub"],[Br])],h)},mathmlBuilder:function(u,h){var f=!1,y,I,U=sr(u.base,"horizBrace");U&&(I=!!u.sup,I===U.isOver&&(f=!0,y=U.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var ge=[Fn(u.base,h)];u.sub&&ge.push(Fn(u.sub,h)),u.sup&&ge.push(Fn(u.sup,h));var Te;if(f)Te=y?"mover":"munder";else if(u.sub)if(u.sup){var Nt=u.base;Nt&&Nt.type==="op"&&Nt.limits&&h.style===x.DISPLAY||Nt&&Nt.type==="operatorname"&&Nt.alwaysHandleSupSub&&(h.style===x.DISPLAY||Nt.limits)?Te="munderover":Te="msubsup"}else{var ft=u.base;ft&&ft.type==="op"&&ft.limits&&(h.style===x.DISPLAY||ft.alwaysHandleSupSub)||ft&&ft.type==="operatorname"&&ft.alwaysHandleSupSub&&(ft.limits||h.style===x.DISPLAY)?Te="munder":Te="msub"}else{var Ze=u.base;Ze&&Ze.type==="op"&&Ze.limits&&(h.style===x.DISPLAY||Ze.alwaysHandleSupSub)||Ze&&Ze.type==="operatorname"&&Ze.alwaysHandleSupSub&&(Ze.limits||h.style===x.DISPLAY)?Te="mover":Te="msup"}var Jt=new mn.MathNode(Te,ge);return Jt}}),Gn({type:"atom",htmlBuilder:function(u,h){return pt.mathsym(u.text,u.mode,h,["m"+u.family])},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[Xn(u.text,u.mode)]);if(u.family==="bin"){var y=Cr(u,h);y==="bold-italic"&&f.setAttribute("mathvariant",y)}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"};Gn({type:"mathord",htmlBuilder:function(u,h){return pt.makeOrd(u,h,"mathord")},mathmlBuilder:function(u,h){var f=new mn.MathNode("mi",[Xn(u.text,u.mode,h)]),y=Cr(u,h)||"italic";return y!==Ca[f.type]&&f.setAttribute("mathvariant",y),f}}),Gn({type:"textord",htmlBuilder:function(u,h){return pt.makeOrd(u,h,"textord")},mathmlBuilder:function(u,h){var f=Xn(u.text,u.mode,h),y=Cr(u,h)||"normal",I;return u.mode==="text"?I=new mn.MathNode("mtext",[f]):/[0-9]/.test(u.text)?I=new mn.MathNode("mn",[f]):u.text==="\\prime"?I=new mn.MathNode("mo",[f]):I=new mn.MathNode("mi",[f]),y!==Ca[I.type]&&I.setAttribute("mathvariant",y),I}});var Ws={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Is={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Gn({type:"spacing",htmlBuilder:function(u,h){if(Is.hasOwnProperty(u.text)){var f=Is[u.text].className||"";if(u.mode==="text"){var y=pt.makeOrd(u,h,"textord");return y.classes.push(f),y}else return pt.makeSpan(["mspace",f],[pt.mathsym(u.text,u.mode,h)],h)}else{if(Ws.hasOwnProperty(u.text))return pt.makeSpan(["mspace",Ws[u.text]],[],h);throw new g('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,h){var f;if(Is.hasOwnProperty(u.text))f=new mn.MathNode("mtext",[new mn.TextNode("\xA0")]);else{if(Ws.hasOwnProperty(u.text))return new mn.MathNode("mspace");throw new g('Unknown type of space "'+u.text+'"')}return f}});var Rs=function(){var u=new mn.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Gn({type:"tag",mathmlBuilder:function(u,h){var f=new mn.MathNode("mtable",[new mn.MathNode("mtr",[Rs(),new mn.MathNode("mtd",[pr(u.body,h)]),Rs(),new mn.MathNode("mtd",[pr(u.tag,h)])])]);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,h){var f=u.font;return f?Va[f]?h.withTextFontFamily(Va[f]):Da[f]?h.withTextFontWeight(Da[f]):h.withTextFontShape(Za[f]):h};_n({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"text",mode:f.mode,body:qn(I),font:y}},htmlBuilder:function(u,h){var f=ca(u,h),y=Sr(u.body,f,!0);return pt.makeSpan(["mord","text"],pt.tryCombineChars(y),f)},mathmlBuilder:function(u,h){var f=ca(u,h);return pr(u.body,f)}}),_n({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"underline",mode:f.mode,body:h[0]}},htmlBuilder:function(u,h){var f=cr(u.body,h),y=pt.makeLineSpan("underline-line",h),I=h.fontMetrics().defaultRuleThickness,U=pt.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:I},{type:"elem",elem:y},{type:"kern",size:3*I},{type:"elem",elem:f}]},h);return pt.makeSpan(["mord","underline"],[U],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[new mn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new mn.MathNode("munder",[Fn(u.body,h),f]);return y.setAttribute("accentunder","true"),y}}),_n({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,h,f){throw new g("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,h){for(var f=Ya(u),y=[],I=h.havingStyle(h.style.text()),U=0;U<f.length;U++){var ge=f[U];ge==="~"&&(ge="\\textasciitilde"),y.push(pt.makeSymbol(ge,"Typewriter-Regular",u.mode,I,["mord","texttt"]))}return pt.makeSpan(["mord","text"].concat(I.sizingClasses(h)),pt.tryCombineChars(y),I)},mathmlBuilder:function(u,h){var f=new mn.TextNode(Ya(u)),y=new mn.MathNode("mtext",[f]);return y.setAttribute("mathvariant","monospace"),y}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},da=Pr,Vs=da,Ia=`[ \r
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Ia+"*",Qa=new RegExp("^("+Ra+")"+Ia+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),Oa="("+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 z(h,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=h,this.settings=f,this.tokenRegex=new RegExp(Oa,"g"),this.catcodes={"%":14}}var u=z.prototype;return u.setCatcode=function(f,y){this.catcodes[f]=y},u.lex=function(){var f=this.input,y=this.tokenRegex.lastIndex;if(y===f.length)return new ve("EOF",new oe(this,y,y));var I=this.tokenRegex.exec(f);if(I===null||I.index!==y)throw new g("Unexpected character: '"+f[y]+"'",new ve(f[y],new oe(this,y,y+1)));var U=I[2]||" ";if(this.catcodes[U]===14){var ge=f.indexOf(`
`,this.tokenRegex.lastIndex);return ge===-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=ge+1,this.lex()}var Te=U.match(Qa);return Te&&(U=Te[1]),new ve(U,new oe(this,y,this.tokenRegex.lastIndex))},z}(),Oo=function(){function z(h,f){h===void 0&&(h={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=h,this.undefStack=[]}var u=z.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new g("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var y in f)f.hasOwnProperty(y)&&(f[y]===void 0?delete this.current[y]:this.current[y]=f[y])},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,y,I){if(I===void 0&&(I=!1),I){for(var U=0;U<this.undefStack.length;U++)delete this.undefStack[U][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=y)}else{var ge=this.undefStack[this.undefStack.length-1];ge&&!ge.hasOwnProperty(f)&&(ge[f]=this.current[f])}this.current[f]=y},z}(),Ja={},Po=Ja;function Be(z,u){Ja[z]=u}Be("\\@firstoftwo",function(z){var u=z.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Be("\\@secondoftwo",function(z){var u=z.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Be("\\@ifnextchar",function(z){var u=z.consumeArgs(3),h=z.future();return u[0].length===1&&u[0][0].text===h.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),Be("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Be("\\TextOrMath",function(z){var u=z.consumeArgs(2);return z.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};Be("\\char",function(z){var u=z.popToken(),h,f="";if(u.text==="'")h=8,u=z.popToken();else if(u.text==='"')h=16,u=z.popToken();else if(u.text==="`")if(u=z.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new g("\\char` missing argument");f=u.text.charCodeAt(0)}else h=10;if(h){if(f=eo[u.text],f==null||f>=h)throw new g("Invalid base-"+h+" digit "+u.text);for(var y;(y=eo[z.future().text])!=null&&y<h;)f*=h,f+=y,z.popToken()}return"\\@char{"+f+"}"});var Pa=function(u,h){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new g("\\gdef's first argument must be a macro name");var y=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 g('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new g('Invalid argument number "'+f[0].text+'"');if(I++,parseInt(f[0].text)!==I)throw new g('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(y,{tokens:f,numArgs:I},h),""};Be("\\gdef",function(z){return Pa(z,!0)}),Be("\\def",function(z){return Pa(z,!1)}),Be("\\global",function(z){var u=z.consumeArgs(1)[0];if(u.length!==1)throw new g("Invalid command after \\global");var h=u[0].text;if(h==="\\def")return Pa(z,!0);throw new g("Invalid command '"+h+"' after \\global")});var ka=function(u,h,f){var y=u.consumeArgs(1)[0];if(y.length!==1)throw new g("\\newcommand's first argument must be a macro name");var I=y[0].text,U=u.isDefined(I);if(U&&!h)throw new g("\\newcommand{"+I+"} attempting to redefine "+(I+"; use \\renewcommand"));if(!U&&!f)throw new g("\\renewcommand{"+I+"} when command "+I+" does not yet exist; use \\newcommand");var ge=0;if(y=u.consumeArgs(1)[0],y.length===1&&y[0].text==="["){for(var Te="",Ze=u.expandNextToken();Ze.text!=="]"&&Ze.text!=="EOF";)Te+=Ze.text,Ze=u.expandNextToken();if(!Te.match(/^\s*[0-9]+\s*$/))throw new g("Invalid number of arguments: "+Te);ge=parseInt(Te),y=u.consumeArgs(1)[0]}return u.macros.set(I,{tokens:y,numArgs:ge}),""};Be("\\newcommand",function(z){return ka(z,!1,!0)}),Be("\\renewcommand",function(z){return ka(z,!0,!1)}),Be("\\providecommand",function(z){return ka(z,!0,!0)}),Be("\\bgroup","{"),Be("\\egroup","}"),Be("\\lq","`"),Be("\\rq","'"),Be("\\aa","\\r a"),Be("\\AA","\\r A"),Be("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Be("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Be("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Be("\u212C","\\mathscr{B}"),Be("\u2130","\\mathscr{E}"),Be("\u2131","\\mathscr{F}"),Be("\u210B","\\mathscr{H}"),Be("\u2110","\\mathscr{I}"),Be("\u2112","\\mathscr{L}"),Be("\u2133","\\mathscr{M}"),Be("\u211B","\\mathscr{R}"),Be("\u212D","\\mathfrak{C}"),Be("\u210C","\\mathfrak{H}"),Be("\u2128","\\mathfrak{Z}"),Be("\\Bbbk","\\Bbb{k}"),Be("\xB7","\\cdotp"),Be("\\llap","\\mathllap{\\textrm{#1}}"),Be("\\rlap","\\mathrlap{\\textrm{#1}}"),Be("\\clap","\\mathclap{\\textrm{#1}}"),Be("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Be("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Be("\\ne","\\neq"),Be("\u2260","\\neq"),Be("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Be("\u2209","\\notin"),Be("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Be("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Be("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Be("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Be("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Be("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Be("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Be("\u27C2","\\perp"),Be("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Be("\u220C","\\notni"),Be("\u231C","\\ulcorner"),Be("\u231D","\\urcorner"),Be("\u231E","\\llcorner"),Be("\u231F","\\lrcorner"),Be("\xA9","\\copyright"),Be("\xAE","\\textregistered"),Be("\uFE0F","\\textregistered"),Be("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Be("\u22EE","\\vdots"),Be("\\varGamma","\\mathit{\\Gamma}"),Be("\\varDelta","\\mathit{\\Delta}"),Be("\\varTheta","\\mathit{\\Theta}"),Be("\\varLambda","\\mathit{\\Lambda}"),Be("\\varXi","\\mathit{\\Xi}"),Be("\\varPi","\\mathit{\\Pi}"),Be("\\varSigma","\\mathit{\\Sigma}"),Be("\\varUpsilon","\\mathit{\\Upsilon}"),Be("\\varPhi","\\mathit{\\Phi}"),Be("\\varPsi","\\mathit{\\Psi}"),Be("\\varOmega","\\mathit{\\Omega}"),Be("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Be("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Be("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Be("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Be("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Be("\\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"};Be("\\dots",function(z){var u="\\dotso",h=z.expandAfterFuture().text;return h in to?u=to[h]:(h.substr(0,4)==="\\not"||h in Ve.math&&K.contains(["bin","rel"],Ve.math[h].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};Be("\\dotso",function(z){var u=z.future().text;return u in Ls?"\\ldots\\,":"\\ldots"}),Be("\\dotsc",function(z){var u=z.future().text;return u in Ls&&u!==","?"\\ldots\\,":"\\ldots"}),Be("\\cdots",function(z){var u=z.future().text;return u in Ls?"\\@cdots\\,":"\\@cdots"}),Be("\\dotsb","\\cdots"),Be("\\dotsm","\\cdots"),Be("\\dotsi","\\!\\cdots"),Be("\\dotsx","\\ldots\\,"),Be("\\DOTSI","\\relax"),Be("\\DOTSB","\\relax"),Be("\\DOTSX","\\relax"),Be("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Be("\\,","\\tmspace+{3mu}{.1667em}"),Be("\\thinspace","\\,"),Be("\\>","\\mskip{4mu}"),Be("\\:","\\tmspace+{4mu}{.2222em}"),Be("\\medspace","\\:"),Be("\\;","\\tmspace+{5mu}{.2777em}"),Be("\\thickspace","\\;"),Be("\\!","\\tmspace-{3mu}{.1667em}"),Be("\\negthinspace","\\!"),Be("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Be("\\negthickspace","\\tmspace-{5mu}{.277em}"),Be("\\enspace","\\kern.5em "),Be("\\enskip","\\hskip.5em\\relax"),Be("\\quad","\\hskip1em\\relax"),Be("\\qquad","\\hskip2em\\relax"),Be("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Be("\\tag@paren","\\tag@literal{({#1})}"),Be("\\tag@literal",function(z){if(z.macros.get("\\df@tag"))throw new g("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Be("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Be("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Be("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Be("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Be("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Be("\\\\","\\newline"),Be("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=Lt["Main-Regular"][84][1]-.7*Lt["Main-Regular"][65][1]+"em";Be("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Be("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Be("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Be("\\@hspace","\\hskip #1\\relax"),Be("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Be("\\ordinarycolon",":"),Be("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Be("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Be("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Be("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Be("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Be("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Be("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Be("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Be("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Be("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Be("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Be("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Be("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Be("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Be("\u2237","\\dblcolon"),Be("\u2239","\\eqcolon"),Be("\u2254","\\coloneqq"),Be("\u2255","\\eqqcolon"),Be("\u2A74","\\Coloneqq"),Be("\\ratio","\\vcentcolon"),Be("\\coloncolon","\\dblcolon"),Be("\\colonequals","\\coloneqq"),Be("\\coloncolonequals","\\Coloneqq"),Be("\\equalscolon","\\eqqcolon"),Be("\\equalscoloncolon","\\Eqqcolon"),Be("\\colonminus","\\coloneq"),Be("\\coloncolonminus","\\Coloneq"),Be("\\minuscolon","\\eqcolon"),Be("\\minuscoloncolon","\\Eqcolon"),Be("\\coloncolonapprox","\\Colonapprox"),Be("\\coloncolonsim","\\Colonsim"),Be("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Be("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Be("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Be("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Be("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Be("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Be("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Be("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Be("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Be("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Be("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Be("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Be("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Be("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Be("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Be("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Be("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Be("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Be("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Be("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Be("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Be("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Be("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Be("\u27E6","\\llbracket"),Be("\u27E7","\\rrbracket"),Be("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Be("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Be("\u2983","\\lBrace"),Be("\u2984","\\rBrace"),Be("\\darr","\\downarrow"),Be("\\dArr","\\Downarrow"),Be("\\Darr","\\Downarrow"),Be("\\lang","\\langle"),Be("\\rang","\\rangle"),Be("\\uarr","\\uparrow"),Be("\\uArr","\\Uparrow"),Be("\\Uarr","\\Uparrow"),Be("\\N","\\mathbb{N}"),Be("\\R","\\mathbb{R}"),Be("\\Z","\\mathbb{Z}"),Be("\\alef","\\aleph"),Be("\\alefsym","\\aleph"),Be("\\Alpha","\\mathrm{A}"),Be("\\Beta","\\mathrm{B}"),Be("\\bull","\\bullet"),Be("\\Chi","\\mathrm{X}"),Be("\\clubs","\\clubsuit"),Be("\\cnums","\\mathbb{C}"),Be("\\Complex","\\mathbb{C}"),Be("\\Dagger","\\ddagger"),Be("\\diamonds","\\diamondsuit"),Be("\\empty","\\emptyset"),Be("\\Epsilon","\\mathrm{E}"),Be("\\Eta","\\mathrm{H}"),Be("\\exist","\\exists"),Be("\\harr","\\leftrightarrow"),Be("\\hArr","\\Leftrightarrow"),Be("\\Harr","\\Leftrightarrow"),Be("\\hearts","\\heartsuit"),Be("\\image","\\Im"),Be("\\infin","\\infty"),Be("\\Iota","\\mathrm{I}"),Be("\\isin","\\in"),Be("\\Kappa","\\mathrm{K}"),Be("\\larr","\\leftarrow"),Be("\\lArr","\\Leftarrow"),Be("\\Larr","\\Leftarrow"),Be("\\lrarr","\\leftrightarrow"),Be("\\lrArr","\\Leftrightarrow"),Be("\\Lrarr","\\Leftrightarrow"),Be("\\Mu","\\mathrm{M}"),Be("\\natnums","\\mathbb{N}"),Be("\\Nu","\\mathrm{N}"),Be("\\Omicron","\\mathrm{O}"),Be("\\plusmn","\\pm"),Be("\\rarr","\\rightarrow"),Be("\\rArr","\\Rightarrow"),Be("\\Rarr","\\Rightarrow"),Be("\\real","\\Re"),Be("\\reals","\\mathbb{R}"),Be("\\Reals","\\mathbb{R}"),Be("\\Rho","\\mathrm{P}"),Be("\\sdot","\\cdot"),Be("\\sect","\\S"),Be("\\spades","\\spadesuit"),Be("\\sub","\\subset"),Be("\\sube","\\subseteq"),Be("\\supe","\\supseteq"),Be("\\Tau","\\mathrm{T}"),Be("\\thetasym","\\vartheta"),Be("\\weierp","\\wp"),Be("\\Zeta","\\mathrm{Z}"),Be("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Be("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Be("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Be("\\blue","\\textcolor{##6495ed}{#1}"),Be("\\orange","\\textcolor{##ffa500}{#1}"),Be("\\pink","\\textcolor{##ff00af}{#1}"),Be("\\red","\\textcolor{##df0030}{#1}"),Be("\\green","\\textcolor{##28ae7b}{#1}"),Be("\\gray","\\textcolor{gray}{#1}"),Be("\\purple","\\textcolor{##9d38bd}{#1}"),Be("\\blueA","\\textcolor{##ccfaff}{#1}"),Be("\\blueB","\\textcolor{##80f6ff}{#1}"),Be("\\blueC","\\textcolor{##63d9ea}{#1}"),Be("\\blueD","\\textcolor{##11accd}{#1}"),Be("\\blueE","\\textcolor{##0c7f99}{#1}"),Be("\\tealA","\\textcolor{##94fff5}{#1}"),Be("\\tealB","\\textcolor{##26edd5}{#1}"),Be("\\tealC","\\textcolor{##01d1c1}{#1}"),Be("\\tealD","\\textcolor{##01a995}{#1}"),Be("\\tealE","\\textcolor{##208170}{#1}"),Be("\\greenA","\\textcolor{##b6ffb0}{#1}"),Be("\\greenB","\\textcolor{##8af281}{#1}"),Be("\\greenC","\\textcolor{##74cf70}{#1}"),Be("\\greenD","\\textcolor{##1fab54}{#1}"),Be("\\greenE","\\textcolor{##0d923f}{#1}"),Be("\\goldA","\\textcolor{##ffd0a9}{#1}"),Be("\\goldB","\\textcolor{##ffbb71}{#1}"),Be("\\goldC","\\textcolor{##ff9c39}{#1}"),Be("\\goldD","\\textcolor{##e07d10}{#1}"),Be("\\goldE","\\textcolor{##a75a05}{#1}"),Be("\\redA","\\textcolor{##fca9a9}{#1}"),Be("\\redB","\\textcolor{##ff8482}{#1}"),Be("\\redC","\\textcolor{##f9685d}{#1}"),Be("\\redD","\\textcolor{##e84d39}{#1}"),Be("\\redE","\\textcolor{##bc2612}{#1}"),Be("\\maroonA","\\textcolor{##ffbde0}{#1}"),Be("\\maroonB","\\textcolor{##ff92c6}{#1}"),Be("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Be("\\maroonD","\\textcolor{##ca337c}{#1}"),Be("\\maroonE","\\textcolor{##9e034e}{#1}"),Be("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Be("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Be("\\purpleC","\\textcolor{##aa87ff}{#1}"),Be("\\purpleD","\\textcolor{##7854ab}{#1}"),Be("\\purpleE","\\textcolor{##543b78}{#1}"),Be("\\mintA","\\textcolor{##f5f9e8}{#1}"),Be("\\mintB","\\textcolor{##edf2df}{#1}"),Be("\\mintC","\\textcolor{##e0e5cc}{#1}"),Be("\\grayA","\\textcolor{##f6f7f7}{#1}"),Be("\\grayB","\\textcolor{##f0f1f2}{#1}"),Be("\\grayC","\\textcolor{##e3e5e6}{#1}"),Be("\\grayD","\\textcolor{##d6d8da}{#1}"),Be("\\grayE","\\textcolor{##babec2}{#1}"),Be("\\grayF","\\textcolor{##888d93}{#1}"),Be("\\grayG","\\textcolor{##626569}{#1}"),Be("\\grayH","\\textcolor{##3b3e40}{#1}"),Be("\\grayI","\\textcolor{##21242c}{#1}"),Be("\\kaBlue","\\textcolor{##314453}{#1}"),Be("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function z(h,f,y){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(h),this.macros=new Oo(Po,f.macros),this.mode=y,this.stack=[]}var u=z.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 y;(y=this.stack).push.apply(y,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var y=[],I=0;I<f;++I){this.consumeSpaces();var U=this.popToken();if(U.text==="{"){for(var ge=[],Te=1;Te!==0;){var Ze=this.popToken();if(ge.push(Ze),Ze.text==="{")++Te;else if(Ze.text==="}")--Te;else if(Ze.text==="EOF")throw new g("End of input in macro argument",U)}ge.pop(),ge.reverse(),y[I]=ge}else{if(U.text==="EOF")throw new g("End of input expecting macro argument");y[I]=[U]}}return y},u.expandOnce=function(){var f=this.popToken(),y=f.text,I=this._getExpansion(y);if(I==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new g("Too many expansions: infinite loop or need to increase maxExpand setting");var U=I.tokens;if(I.numArgs){var ge=this.consumeArgs(I.numArgs);U=U.slice();for(var Te=U.length-1;Te>=0;--Te){var Ze=U[Te];if(Ze.text==="#"){if(Te===0)throw new g("Incomplete placeholder at end of macro body",Ze);if(Ze=U[--Te],Ze.text==="#")U.splice(Te+1,1);else if(/^[1-9]$/.test(Ze.text)){var ft;(ft=U).splice.apply(ft,[Te,2].concat(ge[+Ze.text-1]))}else throw new g("Not a valid argument number",Ze)}}}return this.pushTokens(U),U},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof ve)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 y=[],I=this.stack.length;for(this.pushToken(new ve(f));this.stack.length>I;){var U=this.expandOnce();U instanceof ve&&y.push(this.stack.pop())}return y}},u.expandMacroAsText=function(f){var y=this.expandMacro(f);return y&&y.map(function(I){return I.text}).join("")},u._getExpansion=function(f){var y=this.macros.get(f);if(y==null)return y;var I=typeof y=="function"?y(this):y;if(typeof I=="string"){var U=0;if(I.indexOf("#")!==-1)for(var ge=I.replace(/##/g,"");ge.indexOf("#"+(U+1))!==-1;)++U;for(var Te=new qa(I,this.settings),Ze=[],ft=Te.lex();ft.text!=="EOF";)Ze.push(ft),ft=Te.lex();Ze.reverse();var Nt={tokens:Ze,numArgs:U};return Nt}return I},u.isDefined=function(f){return this.macros.has(f)||Vs.hasOwnProperty(f)||Ve.math.hasOwnProperty(f)||Ve.text.hasOwnProperty(f)||Ma.hasOwnProperty(f)},z}(),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"}},ha={\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"},pi=function(){function z(h,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 ro(h,f,this.mode),this.settings=f,this.leftrightDepth=0}var u=z.prototype;return u.expect=function(f,y){if(y===void 0&&(y=!0),this.fetch().text!==f)throw new g("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());y&&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,y){for(var I=[];;){this.mode==="math"&&this.consumeSpaces();var U=this.fetch();if(z.endOfExpression.indexOf(U.text)!==-1||y&&U.text===y||f&&Vs[U.text]&&Vs[U.text].infix)break;var ge=this.parseAtom(y);if(!ge)break;I.push(ge)}return this.mode==="text"&&this.formLigatures(I),this.handleInfixNodes(I)},u.handleInfixNodes=function(f){for(var y=-1,I,U=0;U<f.length;U++){var ge=sr(f[U],"infix");if(ge){if(y!==-1)throw new g("only one infix operator per group",ge.token);y=U,I=ge.replaceWith}}if(y!==-1&&I){var Te,Ze,ft=f.slice(0,y),Nt=f.slice(y+1);ft.length===1&&ft[0].type==="ordgroup"?Te=ft[0]:Te={type:"ordgroup",mode:this.mode,body:ft},Nt.length===1&&Nt[0].type==="ordgroup"?Ze=Nt[0]:Ze={type:"ordgroup",mode:this.mode,body:Nt};var Jt;return I==="\\\\abovefrac"?Jt=this.callFunction(I,[Te,f[y],Ze],[]):Jt=this.callFunction(I,[Te,Ze],[]),[Jt]}else return f},u.handleSupSubscript=function(f){var y=this.fetch(),I=y.text;this.consume();var U=this.parseGroup(f,!1,z.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!U)throw new g("Expected group after '"+I+"'",y);return U},u.formatUnsupportedCmd=function(f){for(var y=[],I=0;I<f.length;I++)y.push({type:"textord",mode:"text",text:f[I]});var U={type:"text",mode:this.mode,body:y},ge={type:"color",mode:this.mode,color:this.settings.errorColor,body:[U]};return ge},u.parseAtom=function(f){var y=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return y;for(var I,U;;){this.consumeSpaces();var ge=this.fetch();if(ge.text==="\\limits"||ge.text==="\\nolimits"){var Te=sr(y,"op");if(Te){var Ze=ge.text==="\\limits";Te.limits=Ze,Te.alwaysHandleSupSub=!0}else if(Te=sr(y,"operatorname"),Te&&Te.alwaysHandleSupSub){var ft=ge.text==="\\limits";Te.limits=ft}else throw new g("Limit controls must follow a math operator",ge);this.consume()}else if(ge.text==="^"){if(I)throw new g("Double superscript",ge);I=this.handleSupSubscript("superscript")}else if(ge.text==="_"){if(U)throw new g("Double subscript",ge);U=this.handleSupSubscript("subscript")}else if(ge.text==="'"){if(I)throw new g("Double superscript",ge);var Nt={type:"textord",mode:this.mode,text:"\\prime"},Jt=[Nt];for(this.consume();this.fetch().text==="'";)Jt.push(Nt),this.consume();this.fetch().text==="^"&&Jt.push(this.handleSupSubscript("superscript")),I={type:"ordgroup",mode:this.mode,body:Jt}}else break}return I||U?{type:"supsub",mode:this.mode,base:y,sup:I,sub:U}:y},u.parseFunction=function(f,y,I){var U=this.fetch(),ge=U.text,Te=Vs[ge];if(!Te)return null;if(this.consume(),I!=null&&Te.greediness<=I)throw new g("Got function '"+ge+"' with no arguments"+(y?" as "+y:""),U);if(this.mode==="text"&&!Te.allowedInText)throw new g("Can't use function '"+ge+"' in text mode",U);if(this.mode==="math"&&Te.allowedInMath===!1)throw new g("Can't use function '"+ge+"' in math mode",U);var Ze=this.parseArguments(ge,Te),ft=Ze.args,Nt=Ze.optArgs;return this.callFunction(ge,ft,Nt,U,f)},u.callFunction=function(f,y,I,U,ge){var Te={funcName:f,parser:this,token:U,breakOnTokenText:ge},Ze=Vs[f];if(Ze&&Ze.handler)return Ze.handler(Te,y,I);throw new g("No function handler for "+f)},u.parseArguments=function(f,y){var I=y.numArgs+y.numOptionalArgs;if(I===0)return{args:[],optArgs:[]};for(var U=y.greediness,ge=[],Te=[],Ze=0;Ze<I;Ze++){var ft=y.argTypes&&y.argTypes[Ze],Nt=Ze<y.numOptionalArgs,Jt=Ze>0&&!Nt||Ze===0&&!Nt&&this.mode==="math",fn=this.parseGroupOfType("argument to '"+f+"'",ft,Nt,U,Jt);if(!fn){if(Nt){Te.push(null);continue}throw new g("Expected group after '"+f+"'",this.fetch())}(Nt?Te:ge).push(fn)}return{args:ge,optArgs:Te}},u.parseGroupOfType=function(f,y,I,U,ge){switch(y){case"color":return ge&&this.consumeSpaces(),this.parseColorGroup(I);case"size":return ge&&this.consumeSpaces(),this.parseSizeGroup(I);case"url":return this.parseUrlGroup(I,ge);case"math":case"text":return this.parseGroup(f,I,U,void 0,y,ge);case"hbox":{var Te=this.parseGroup(f,I,U,void 0,"text",ge);if(!Te)return Te;var Ze={type:"styling",mode:Te.mode,body:[Te],style:"text"};return Ze}case"raw":{if(ge&&this.consumeSpaces(),I&&this.fetch().text==="{")return null;var ft=this.parseStringGroup("raw",I,!0);if(ft)return{type:"raw",mode:"text",string:ft.text};throw new g("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,I,U,void 0,void 0,ge);default:throw new g("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,y,I){var U=y?"[":"{",ge=y?"]":"}",Te=this.fetch();if(Te.text!==U){if(y)return null;if(I&&Te.text!=="EOF"&&/[^{}[\]]/.test(Te.text))return this.consume(),Te}var Ze=this.mode;this.mode="text",this.expect(U);for(var ft="",Nt=this.fetch(),Jt=0,fn=Nt,yn;(yn=this.fetch()).text!==ge||I&&Jt>0;){switch(yn.text){case"EOF":throw new g("Unexpected end of input in "+f,Nt.range(fn,ft));case U:Jt++;break;case ge:Jt--;break}fn=yn,ft+=fn.text,this.consume()}return this.expect(ge),this.mode=Ze,Nt.range(fn,ft)},u.parseRegexGroup=function(f,y){var I=this.mode;this.mode="text";for(var U=this.fetch(),ge=U,Te="",Ze;(Ze=this.fetch()).text!=="EOF"&&f.test(Te+Ze.text);)ge=Ze,Te+=ge.text,this.consume();if(Te==="")throw new g("Invalid "+y+": '"+U.text+"'",U);return this.mode=I,U.range(ge,Te)},u.parseColorGroup=function(f){var y=this.parseStringGroup("color",f);if(!y)return null;var I=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(y.text);if(!I)throw new g("Invalid color: '"+y.text+"'",y);var U=I[0];return/^[0-9a-f]{6}$/i.test(U)&&(U="#"+U),{type:"color-token",mode:this.mode,color:U}},u.parseSizeGroup=function(f){var y,I=!1;if(!f&&this.fetch().text!=="{"?y=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):y=this.parseStringGroup("size",f),!y)return null;!f&&y.text.length===0&&(y.text="0pt",I=!0);var U=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(y.text);if(!U)throw new g("Invalid size: '"+y.text+"'",y);var ge={number:+(U[1]+U[2]),unit:U[3]};if(!_t(ge))throw new g("Invalid unit: '"+ge.unit+"'",y);return{type:"size",mode:this.mode,value:ge,isBlank:I}},u.parseUrlGroup=function(f,y){this.gullet.lexer.setCatcode("%",13);var I=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!I)return null;var U=I.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:U}},u.parseGroup=function(f,y,I,U,ge,Te){var Ze=this.mode;ge&&this.switchMode(ge),Te&&this.consumeSpaces();var ft=this.fetch(),Nt=ft.text,Jt;if(y?Nt==="[":Nt==="{"||Nt==="\\begingroup"){this.consume();var fn=z.endOfGroup[Nt];this.gullet.beginGroup();var yn=this.parseExpression(!1,fn),Cn=this.fetch();this.expect(fn),this.gullet.endGroup(),Jt={type:"ordgroup",mode:this.mode,loc:oe.range(ft,Cn),body:yn,semisimple:Nt==="\\begingroup"||void 0}}else if(y)Jt=null;else if(Jt=this.parseFunction(U,f,I)||this.parseSymbol(),Jt==null&&Nt[0]==="\\"&&!Ma.hasOwnProperty(Nt)){if(this.settings.throwOnError)throw new g("Undefined control sequence: "+Nt,ft);Jt=this.formatUnsupportedCmd(Nt),this.consume()}return ge&&this.switchMode(Ze),Jt},u.formLigatures=function(f){for(var y=f.length-1,I=0;I<y;++I){var U=f[I],ge=U.text;ge==="-"&&f[I+1].text==="-"&&(I+1<y&&f[I+2].text==="-"?(f.splice(I,3,{type:"textord",mode:"text",loc:oe.range(U,f[I+2]),text:"---"}),y-=2):(f.splice(I,2,{type:"textord",mode:"text",loc:oe.range(U,f[I+1]),text:"--"}),y-=1)),(ge==="'"||ge==="`")&&f[I+1].text===ge&&(f.splice(I,2,{type:"textord",mode:"text",loc:oe.range(U,f[I+1]),text:ge+ge}),y-=1)}},u.parseSymbol=function(){var f=this.fetch(),y=f.text;if(/^\\verb[^a-zA-Z]/.test(y)){this.consume();var I=y.slice(5),U=I.charAt(0)==="*";if(U&&(I=I.slice(1)),I.length<2||I.charAt(0)!==I.slice(-1))throw new g(`\\verb assertion failed --
please report what input caused this bug`);return I=I.slice(1,-1),{type:"verb",mode:"text",body:I,star:U}}ha.hasOwnProperty(y[0])&&!Ve[this.mode][y[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+y[0]+'" used in math mode',f),y=ha[y[0]]+y.substr(1));var ge=Lo.exec(y);ge&&(y=y.substring(0,ge.index),y==="i"?y="\u0131":y==="j"&&(y="\u0237"));var Te;if(Ve[this.mode][y]){this.settings.strict&&this.mode==="math"&&An.indexOf(y)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+y[0]+'" used in math mode',f);var Ze=Ve[this.mode][y].group,ft=oe.range(f),Nt;if(It.hasOwnProperty(Ze)){var Jt=Ze;Nt={type:"atom",mode:this.mode,family:Jt,loc:ft,text:y}}else Nt={type:Ze,mode:this.mode,loc:ft,text:y};Te=Nt}else if(y.charCodeAt(0)>=128)this.settings.strict&&(ze(y.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+y[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+y[0]+'"'+(" ("+y.charCodeAt(0)+")"),f)),Te={type:"textord",mode:"text",loc:oe.range(f),text:y};else return null;if(this.consume(),ge)for(var fn=0;fn<ge[0].length;fn++){var yn=ge[0][fn];if(!io[yn])throw new g("Unknown accent ' "+yn+"'",f);var Cn=io[yn][this.mode];if(!Cn)throw new g("Accent "+yn+" unsupported in "+this.mode+" mode",f);Te={type:"accent",mode:this.mode,loc:oe.range(f),label:Cn,isStretchy:!1,isShifty:!0,base:Te}}return Te},z}();pi.endOfExpression=["}","\\endgroup","\\end","\\right","&"],pi.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},pi.SUPSUB_GREEDINESS=1;var Gi=function(u,h){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new pi(u,h);delete f.gullet.macros.current["\\df@tag"];var y=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!h.displayMode)throw new g("\\tag works only in display equations");f.gullet.feed("\\df@tag"),y=[{type:"tag",mode:"text",body:y,tag:f.parse()}]}return y},Zs=Gi,so=function(u,h,f){h.textContent="";var y=Fa(u,f).toNode();h.appendChild(y)};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 g("KaTeX doesn't work in quirks mode.")});var fa=function(u,h){var f=Fa(u,h).toMarkup();return f},ko=function(u,h){var f=new D(h);return Zs(u,f)},ao=function(u,h,f){if(f.throwOnError||!(u instanceof g))throw u;var y=pt.makeSpan(["katex-error"],[new pe(h)]);return y.setAttribute("title",u.toString()),y.setAttribute("style","color:"+f.errorColor),y},Fa=function(u,h){var f=new D(h);try{var y=Zs(u,f);return Xr(y,u,f)}catch(I){return ao(I,u,f)}},Mo=function(u,h){var f=new D(h);try{var y=Zs(u,f);return Kr(y,u,f)}catch(I){return ao(I,u,f)}},oo={version:"0.11.1",render:so,renderToString:fa,ParseError:g,__parse:ko,__renderToDomTree:Fa,__renderToHTMLTree:Mo,__setFontMetrics:Yt,__defineSymbol:_,__defineMacro:Be,__domTree:{Span:Je,Anchor:Le,SymbolNode:pe,SvgNode:xe,PathNode:He,LineNode:et}},Fo=b.default=oo}]).default})},32834:function(ln){(function(ct,b){ln.exports=b()})(this,function(){"use strict";function ct(Ee,$e){for(var Ge=0;Ge<$e.length;Ge++){var Z=$e[Ge];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(Ee,Z.key,Z)}}function b(Ee,$e,Ge){return $e&&ct(Ee.prototype,$e),Ge&&ct(Ee,Ge),Ee}function m(Ee,$e){if(Ee){if(typeof Ee=="string")return de(Ee,$e);var Ge=Object.prototype.toString.call(Ee).slice(8,-1);if(Ge==="Object"&&Ee.constructor&&(Ge=Ee.constructor.name),Ge==="Map"||Ge==="Set")return Array.from(Ee);if(Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge))return de(Ee,$e)}}function de(Ee,$e){($e==null||$e>Ee.length)&&($e=Ee.length);for(var Ge=0,Z=new Array($e);Ge<$e;Ge++)Z[Ge]=Ee[Ge];return Z}function oe(Ee,$e){var Ge=typeof Symbol!="undefined"&&Ee[Symbol.iterator]||Ee["@@iterator"];if(Ge)return(Ge=Ge.call(Ee)).next.bind(Ge);if(Array.isArray(Ee)||(Ge=m(Ee))||$e&&Ee&&typeof Ee.length=="number"){Ge&&(Ee=Ge);var Z=0;return function(){return Z>=Ee.length?{done:!0}:{done:!1,value:Ee[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 ve={exports:{}};function G(){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 g(Ee){ve.exports.defaults=Ee}ve.exports={defaults:G(),getDefaults:G,changeDefaults:g};var fe=/[&<>"']/,ee=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,H=/[<>"']|&(?!#?\w+;)/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},S=function($e){return k[$e]};function w(Ee,$e){if($e){if(fe.test(Ee))return Ee.replace(ee,S)}else if(o.test(Ee))return Ee.replace(H,S);return Ee}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function R(Ee){return Ee.replace(C,function($e,Ge){return Ge=Ge.toLowerCase(),Ge==="colon"?":":Ge.charAt(0)==="#"?Ge.charAt(1)==="x"?String.fromCharCode(parseInt(Ge.substring(2),16)):String.fromCharCode(+Ge.substring(1)):""})}var q=/(^|[^\[])\^/g;function Q(Ee,$e){Ee=Ee.source||Ee,$e=$e||"";var Ge={replace:function(J,be){return be=be.source||be,be=be.replace(q,"$1"),Ee=Ee.replace(J,be),Ge},getRegex:function(){return new RegExp(Ee,$e)}};return Ge}var K=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function $(Ee,$e,Ge){if(Ee){var Z;try{Z=decodeURIComponent(R(Ge)).replace(K,"").toLowerCase()}catch(J){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}$e&&!D.test(Ge)&&(Ge=le($e,Ge));try{Ge=encodeURI(Ge).replace(/%25/g,"%")}catch(J){return null}return Ge}var M={},F=/^[^:]+:\/*[^/]*$/,ue=/^([^:]+:)[\s\S]*$/,he=/^([^:]+:\/*[^/]*)[\s\S]*$/;function le(Ee,$e){M[" "+Ee]||(F.test(Ee)?M[" "+Ee]=Ee+"/":M[" "+Ee]=Me(Ee,"/",!0)),Ee=M[" "+Ee];var Ge=Ee.indexOf(":")===-1;return $e.substring(0,2)==="//"?Ge?$e:Ee.replace(ue,"$1")+$e:$e.charAt(0)==="/"?Ge?$e:Ee.replace(he,"$1")+$e:Ee+$e}var Se={exec:function(){}};function ke(Ee){for(var $e=1,Ge,Z;$e<arguments.length;$e++){Ge=arguments[$e];for(Z in Ge)Object.prototype.hasOwnProperty.call(Ge,Z)&&(Ee[Z]=Ge[Z])}return Ee}function De(Ee,$e){var Ge=Ee.replace(/\|/g,function(be,Pe,j){for(var Ye=!1,X=Pe;--X>=0&&j[X]==="\\";)Ye=!Ye;return Ye?"|":" |"}),Z=Ge.split(/ \|/),J=0;if(Z.length>$e)Z.splice($e);else for(;Z.length<$e;)Z.push("");for(;J<Z.length;J++)Z[J]=Z[J].trim().replace(/\\\|/g,"|");return Z}function Me(Ee,$e,Ge){var Z=Ee.length;if(Z===0)return"";for(var J=0;J<Z;){var be=Ee.charAt(Z-J-1);if(be===$e&&!Ge)J++;else if(be!==$e&&Ge)J++;else break}return Ee.substr(0,Z-J)}function Y(Ee,$e){if(Ee.indexOf($e[1])===-1)return-1;for(var Ge=Ee.length,Z=0,J=0;J<Ge;J++)if(Ee[J]==="\\")J++;else if(Ee[J]===$e[0])Z++;else if(Ee[J]===$e[1]&&(Z--,Z<0))return J;return-1}function B(Ee){Ee&&Ee.sanitize&&!Ee.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 W(Ee,$e){if($e<1)return"";for(var Ge="";$e>1;)$e&1&&(Ge+=Ee),$e>>=1,Ee+=Ee;return Ge+Ee}var re={escape:w,unescape:R,edit:Q,cleanUrl:$,resolveUrl:le,noopTest:Se,merge:ke,splitCells:De,rtrim:Me,findClosingBracket:Y,checkSanitizeDeprecation:B,repeatString:W},ie=ve.exports.defaults,se=re.rtrim,x=re.splitCells,E=re.escape,V=re.findClosingBracket;function me(Ee,$e,Ge){var Z=$e.href,J=$e.title?E($e.title):null,be=Ee[1].replace(/\\([\[\]])/g,"$1");return Ee[0].charAt(0)!=="!"?{type:"link",raw:Ge,href:Z,title:J,text:be}:{type:"image",raw:Ge,href:Z,title:J,text:E(be)}}function ze(Ee,$e){var Ge=Ee.match(/^(\s+)(?:```)/);if(Ge===null)return $e;var Z=Ge[1];return $e.split(`
`).map(function(J){var be=J.match(/^\s+/);if(be===null)return J;var Pe=be[0];return Pe.length>=Z.length?J.slice(Z.length):J}).join(`
`)}var Xe=function(){function Ee(Ge){this.options=Ge||ie}var $e=Ee.prototype;return $e.space=function(Z){var J=this.rules.block.newline.exec(Z);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
`}},$e.code=function(Z){var J=this.rules.block.code.exec(Z);if(J){var be=J[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?be:se(be,`
`)}}},$e.fences=function(Z){var J=this.rules.block.fences.exec(Z);if(J){var be=J[0],Pe=ze(be,J[3]||"");return{type:"code",raw:be,lang:J[2]?J[2].trim():J[2],text:Pe}}},$e.heading=function(Z){var J=this.rules.block.heading.exec(Z);if(J){var be=J[2].trim();if(/#$/.test(be)){var Pe=se(be,"#");(this.options.pedantic||!Pe||/ $/.test(Pe))&&(be=Pe.trim())}return{type:"heading",raw:J[0],depth:J[1].length,text:be}}},$e.nptable=function(Z){var J=this.rules.block.nptable.exec(Z);if(J){var be={type:"table",header:x(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
`):[],raw:J[0]};if(be.header.length===be.align.length){var Pe=be.align.length,j;for(j=0;j<Pe;j++)/^ *-+: *$/.test(be.align[j])?be.align[j]="right":/^ *:-+: *$/.test(be.align[j])?be.align[j]="center":/^ *:-+ *$/.test(be.align[j])?be.align[j]="left":be.align[j]=null;for(Pe=be.cells.length,j=0;j<Pe;j++)be.cells[j]=x(be.cells[j],be.header.length);return be}}},$e.hr=function(Z){var J=this.rules.block.hr.exec(Z);if(J)return{type:"hr",raw:J[0]}},$e.blockquote=function(Z){var J=this.rules.block.blockquote.exec(Z);if(J){var be=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:be}}},$e.list=function(Z){var J=this.rules.block.list.exec(Z);if(J){var be=J[0],Pe=J[2],j=Pe.length>1,Ye={type:"list",raw:be,ordered:j,start:j?+Pe.slice(0,-1):"",loose:!1,items:[]},X=J[0].match(this.rules.block.item),tt=!1,Ot,Xt,pn,qt,nn,xn,Un,un,On,en=X.length;pn=this.rules.block.listItemStart.exec(X[0]);for(var Ut=0;Ut<en;Ut++){if(Ot=X[Ut],be=Ot,this.options.pedantic||(On=Ot.match(new RegExp("\\n\\s*\\n {0,"+(pn[0].length-1)+"}\\S")),On&&(nn=Ot.length-On.index+X.slice(Ut+1).join(`
`).length,Ye.raw=Ye.raw.substring(0,Ye.raw.length-nn),Ot=Ot.substring(0,On.index),be=Ot,en=Ut+1)),Ut!==en-1){if(qt=this.rules.block.listItemStart.exec(X[Ut+1]),this.options.pedantic?qt[1].length>pn[1].length:qt[1].length>=pn[0].length||qt[1].length>3){X.splice(Ut,2,X[Ut]+(!this.options.pedantic&&qt[1].length<pn[0].length&&!X[Ut].match(/\n$/)?"":`
`)+X[Ut+1]),Ut--,en--;continue}else(!this.options.pedantic||this.options.smartLists?qt[2][qt[2].length-1]!==Pe[Pe.length-1]:j===(qt[2].length===1))&&(nn=X.slice(Ut+1).join(`
`).length,Ye.raw=Ye.raw.substring(0,Ye.raw.length-nn),Ut=en-1);pn=qt}Xt=Ot.length,Ot=Ot.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ot.indexOf(`
`)&&(Xt-=Ot.length,Ot=this.options.pedantic?Ot.replace(/^ {1,4}/gm,""):Ot.replace(new RegExp("^ {1,"+Xt+"}","gm"),"")),Ot=se(Ot,`
`),Ut!==en-1&&(be=be+`
`),xn=tt||/\n\n(?!\s*$)/.test(be),Ut!==en-1&&(tt=be.slice(-2)===`
`,xn||(xn=tt)),xn&&(Ye.loose=!0),this.options.gfm&&(Un=/^\[[ xX]\] /.test(Ot),un=void 0,Un&&(un=Ot[1]!==" ",Ot=Ot.replace(/^\[[ xX]\] +/,""))),Ye.items.push({type:"list_item",raw:be,task:Un,checked:un,loose:xn,text:Ot})}return Ye}},$e.html=function(Z){var J=this.rules.block.html.exec(Z);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):E(J[0]):J[0]}},$e.def=function(Z){var J=this.rules.block.def.exec(Z);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var be=J[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:be,raw:J[0],href:J[2],title:J[3]}}},$e.table=function(Z){var J=this.rules.block.table.exec(Z);if(J){var be={type:"table",header:x(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
`):[]};if(be.header.length===be.align.length){be.raw=J[0];var Pe=be.align.length,j;for(j=0;j<Pe;j++)/^ *-+: *$/.test(be.align[j])?be.align[j]="right":/^ *:-+: *$/.test(be.align[j])?be.align[j]="center":/^ *:-+ *$/.test(be.align[j])?be.align[j]="left":be.align[j]=null;for(Pe=be.cells.length,j=0;j<Pe;j++)be.cells[j]=x(be.cells[j].replace(/^ *\| *| *\| *$/g,""),be.header.length);return be}}},$e.lheading=function(Z){var J=this.rules.block.lheading.exec(Z);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},$e.paragraph=function(Z){var J=this.rules.block.paragraph.exec(Z);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
`?J[1].slice(0,-1):J[1]}},$e.text=function(Z){var J=this.rules.block.text.exec(Z);if(J)return{type:"text",raw:J[0],text:J[0]}},$e.escape=function(Z){var J=this.rules.inline.escape.exec(Z);if(J)return{type:"escape",raw:J[0],text:E(J[1])}},$e.tag=function(Z,J,be){var Pe=this.rules.inline.tag.exec(Z);if(Pe)return!J&&/^<a /i.test(Pe[0])?J=!0:J&&/^<\/a>/i.test(Pe[0])&&(J=!1),!be&&/^<(pre|code|kbd|script)(\s|>)/i.test(Pe[0])?be=!0:be&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Pe[0])&&(be=!1),{type:this.options.sanitize?"text":"html",raw:Pe[0],inLink:J,inRawBlock:be,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):E(Pe[0]):Pe[0]}},$e.link=function(Z){var J=this.rules.inline.link.exec(Z);if(J){var be=J[2].trim();if(!this.options.pedantic&&/^</.test(be)){if(!/>$/.test(be))return;var Pe=se(be.slice(0,-1),"\\");if((be.length-Pe.length)%2===0)return}else{var j=V(J[2],"()");if(j>-1){var Ye=J[0].indexOf("!")===0?5:4,X=Ye+J[1].length+j;J[2]=J[2].substring(0,j),J[0]=J[0].substring(0,X).trim(),J[3]=""}}var tt=J[2],Ot="";if(this.options.pedantic){var Xt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(tt);Xt&&(tt=Xt[1],Ot=Xt[3])}else Ot=J[3]?J[3].slice(1,-1):"";return tt=tt.trim(),/^</.test(tt)&&(this.options.pedantic&&!/>$/.test(be)?tt=tt.slice(1):tt=tt.slice(1,-1)),me(J,{href:tt&&tt.replace(this.rules.inline._escapes,"$1"),title:Ot&&Ot.replace(this.rules.inline._escapes,"$1")},J[0])}},$e.reflink=function(Z,J){var be;if((be=this.rules.inline.reflink.exec(Z))||(be=this.rules.inline.nolink.exec(Z))){var Pe=(be[2]||be[1]).replace(/\s+/g," ");if(Pe=J[Pe.toLowerCase()],!Pe||!Pe.href){var j=be[0].charAt(0);return{type:"text",raw:j,text:j}}return me(be,Pe,be[0])}},$e.emStrong=function(Z,J,be){be===void 0&&(be="");var Pe=this.rules.inline.emStrong.lDelim.exec(Z);if(Pe&&!(Pe[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 j=Pe[1]||Pe[2]||"";if(!j||j&&(be===""||this.rules.inline.punctuation.exec(be))){var Ye=Pe[0].length-1,X,tt,Ot=Ye,Xt=0,pn=Pe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(pn.lastIndex=0,J=J.slice(-1*Z.length+Ye);(Pe=pn.exec(J))!=null;)if(X=Pe[1]||Pe[2]||Pe[3]||Pe[4]||Pe[5]||Pe[6],!!X){if(tt=X.length,Pe[3]||Pe[4]){Ot+=tt;continue}else if((Pe[5]||Pe[6])&&Ye%3&&!((Ye+tt)%3)){Xt+=tt;continue}if(Ot-=tt,!(Ot>0))return tt=Math.min(tt,tt+Ot+Xt),Math.min(Ye,tt)%2?{type:"em",raw:Z.slice(0,Ye+Pe.index+tt+1),text:Z.slice(1,Ye+Pe.index+tt)}:{type:"strong",raw:Z.slice(0,Ye+Pe.index+tt+1),text:Z.slice(2,Ye+Pe.index+tt-1)}}}}},$e.codespan=function(Z){var J=this.rules.inline.code.exec(Z);if(J){var be=J[2].replace(/\n/g," "),Pe=/[^ ]/.test(be),j=/^ /.test(be)&&/ $/.test(be);return Pe&&j&&(be=be.substring(1,be.length-1)),be=E(be,!0),{type:"codespan",raw:J[0],text:be}}},$e.br=function(Z){var J=this.rules.inline.br.exec(Z);if(J)return{type:"br",raw:J[0]}},$e.del=function(Z){var J=this.rules.inline.del.exec(Z);if(J)return{type:"del",raw:J[0],text:J[2]}},$e.autolink=function(Z,J){var be=this.rules.inline.autolink.exec(Z);if(be){var Pe,j;return be[2]==="@"?(Pe=E(this.options.mangle?J(be[1]):be[1]),j="mailto:"+Pe):(Pe=E(be[1]),j=Pe),{type:"link",raw:be[0],text:Pe,href:j,tokens:[{type:"text",raw:Pe,text:Pe}]}}},$e.url=function(Z,J){var be;if(be=this.rules.inline.url.exec(Z)){var Pe,j;if(be[2]==="@")Pe=E(this.options.mangle?J(be[0]):be[0]),j="mailto:"+Pe;else{var Ye;do Ye=be[0],be[0]=this.rules.inline._backpedal.exec(be[0])[0];while(Ye!==be[0]);Pe=E(be[0]),be[1]==="www."?j="http://"+Pe:j=Pe}return{type:"link",raw:be[0],text:Pe,href:j,tokens:[{type:"text",raw:Pe,text:Pe}]}}},$e.inlineText=function(Z,J,be){var Pe=this.rules.inline.text.exec(Z);if(Pe){var j;return J?j=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):E(Pe[0]):Pe[0]:j=E(this.options.smartypants?be(Pe[0]):Pe[0]),{type:"text",raw:Pe[0],text:j}}},Ee}(),_e=re.noopTest,Ke=re.edit,Qe=re.merge,st={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:_e,table:_e,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};st._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,st._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,st.def=Ke(st.def).replace("label",st._label).replace("title",st._title).getRegex(),st.bullet=/(?:[*+-]|\d{1,9}[.)])/,st.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,st.item=Ke(st.item,"gm").replace(/bull/g,st.bullet).getRegex(),st.listItemStart=Ke(/^( *)(bull) */).replace("bull",st.bullet).getRegex(),st.list=Ke(st.list).replace(/bull/g,st.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+st.def.source+")").getRegex(),st._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",st._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,st.html=Ke(st.html,"i").replace("comment",st._comment).replace("tag",st._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),st.paragraph=Ke(st._paragraph).replace("hr",st.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",st._tag).getRegex(),st.blockquote=Ke(st.blockquote).replace("paragraph",st.paragraph).getRegex(),st.normal=Qe({},st),st.gfm=Qe({},st.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*|$)"}),st.gfm.nptable=Ke(st.gfm.nptable).replace("hr",st.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",st._tag).getRegex(),st.gfm.table=Ke(st.gfm.table).replace("hr",st.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",st._tag).getRegex(),st.pedantic=Qe({},st.normal,{html:Ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",st._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:_e,paragraph:Ke(st.normal._paragraph).replace("hr",st.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",st.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var rt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_e,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:_e,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};rt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",rt.punctuation=Ke(rt.punctuation).replace(/punctuation/g,rt._punctuation).getRegex(),rt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,rt.escapedEmSt=/\\\*|\\_/g,rt._comment=Ke(st._comment).replace("(?:-->|$)","-->").getRegex(),rt.emStrong.lDelim=Ke(rt.emStrong.lDelim).replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimAst=Ke(rt.emStrong.rDelimAst,"g").replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimUnd=Ke(rt.emStrong.rDelimUnd,"g").replace(/punct/g,rt._punctuation).getRegex(),rt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,rt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,rt._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])?)+(?![-_])/,rt.autolink=Ke(rt.autolink).replace("scheme",rt._scheme).replace("email",rt._email).getRegex(),rt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,rt.tag=Ke(rt.tag).replace("comment",rt._comment).replace("attribute",rt._attribute).getRegex(),rt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,rt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,rt.link=Ke(rt.link).replace("label",rt._label).replace("href",rt._href).replace("title",rt._title).getRegex(),rt.reflink=Ke(rt.reflink).replace("label",rt._label).getRegex(),rt.reflinkSearch=Ke(rt.reflinkSearch,"g").replace("reflink",rt.reflink).replace("nolink",rt.nolink).getRegex(),rt.normal=Qe({},rt),rt.pedantic=Qe({},rt.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:Ke(/^!?\[(label)\]\((.*?)\)/).replace("label",rt._label).getRegex(),reflink:Ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rt._label).getRegex()}),rt.gfm=Qe({},rt.normal,{escape:Ke(rt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),rt.gfm.url=Ke(rt.gfm.url,"i").replace("email",rt.gfm._extended_email).getRegex(),rt.breaks=Qe({},rt.gfm,{br:Ke(rt.br).replace("{2,}","*").getRegex(),text:Ke(rt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Vt={block:st,inline:rt},qe=Xe,Kt=ve.exports.defaults,je=Vt.block,Tt=Vt.inline,Re=re.repeatString;function Ce(Ee){return Ee.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(Ee){var $e="",Ge,Z,J=Ee.length;for(Ge=0;Ge<J;Ge++)Z=Ee.charCodeAt(Ge),Math.random()>.5&&(Z="x"+Z.toString(16)),$e+="&#"+Z+";";return $e}var Je=function(){function Ee(Ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ge||Kt,this.options.tokenizer=this.options.tokenizer||new qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Z={block:je.normal,inline:Tt.normal};this.options.pedantic?(Z.block=je.pedantic,Z.inline=Tt.pedantic):this.options.gfm&&(Z.block=je.gfm,this.options.breaks?Z.inline=Tt.breaks:Z.inline=Tt.gfm),this.tokenizer.rules=Z}Ee.lex=function(Z,J){var be=new Ee(J);return be.lex(Z)},Ee.lexInline=function(Z,J){var be=new Ee(J);return be.inlineTokens(Z)};var $e=Ee.prototype;return $e.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},$e.blockTokens=function(Z,J,be){J===void 0&&(J=[]),be===void 0&&(be=!0),this.options.pedantic&&(Z=Z.replace(/^ +$/gm,""));for(var Pe,j,Ye,X;Z;){if(Pe=this.tokenizer.space(Z)){Z=Z.substring(Pe.raw.length),Pe.type&&J.push(Pe);continue}if(Pe=this.tokenizer.code(Z)){Z=Z.substring(Pe.raw.length),X=J[J.length-1],X&&X.type==="paragraph"?(X.raw+=`
`+Pe.raw,X.text+=`
`+Pe.text):J.push(Pe);continue}if(Pe=this.tokenizer.fences(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.heading(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.nptable(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.hr(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.blockquote(Z)){Z=Z.substring(Pe.raw.length),Pe.tokens=this.blockTokens(Pe.text,[],be),J.push(Pe);continue}if(Pe=this.tokenizer.list(Z)){for(Z=Z.substring(Pe.raw.length),Ye=Pe.items.length,j=0;j<Ye;j++)Pe.items[j].tokens=this.blockTokens(Pe.items[j].text,[],!1);J.push(Pe);continue}if(Pe=this.tokenizer.html(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(be&&(Pe=this.tokenizer.def(Z))){Z=Z.substring(Pe.raw.length),this.tokens.links[Pe.tag]||(this.tokens.links[Pe.tag]={href:Pe.href,title:Pe.title});continue}if(Pe=this.tokenizer.table(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.lheading(Z)){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(be&&(Pe=this.tokenizer.paragraph(Z))){Z=Z.substring(Pe.raw.length),J.push(Pe);continue}if(Pe=this.tokenizer.text(Z)){Z=Z.substring(Pe.raw.length),X=J[J.length-1],X&&X.type==="text"?(X.raw+=`
`+Pe.raw,X.text+=`
`+Pe.text):J.push(Pe);continue}if(Z){var tt="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return J},$e.inline=function(Z){var J,be,Pe,j,Ye,X,tt=Z.length;for(J=0;J<tt;J++)switch(X=Z[J],X.type){case"paragraph":case"text":case"heading":{X.tokens=[],this.inlineTokens(X.text,X.tokens);break}case"table":{for(X.tokens={header:[],cells:[]},j=X.header.length,be=0;be<j;be++)X.tokens.header[be]=[],this.inlineTokens(X.header[be],X.tokens.header[be]);for(j=X.cells.length,be=0;be<j;be++)for(Ye=X.cells[be],X.tokens.cells[be]=[],Pe=0;Pe<Ye.length;Pe++)X.tokens.cells[be][Pe]=[],this.inlineTokens(Ye[Pe],X.tokens.cells[be][Pe]);break}case"blockquote":{this.inline(X.tokens);break}case"list":{for(j=X.items.length,be=0;be<j;be++)this.inline(X.items[be].tokens);break}}return Z},$e.inlineTokens=function(Z,J,be,Pe){J===void 0&&(J=[]),be===void 0&&(be=!1),Pe===void 0&&(Pe=!1);var j,Ye,X=Z,tt,Ot,Xt;if(this.tokens.links){var pn=Object.keys(this.tokens.links);if(pn.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(X))!=null;)pn.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(X=X.slice(0,tt.index)+"["+Re("a",tt[0].length-2)+"]"+X.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(X))!=null;)X=X.slice(0,tt.index)+"["+Re("a",tt[0].length-2)+"]"+X.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(tt=this.tokenizer.rules.inline.escapedEmSt.exec(X))!=null;)X=X.slice(0,tt.index)+"++"+X.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Z;){if(Ot||(Xt=""),Ot=!1,j=this.tokenizer.escape(Z)){Z=Z.substring(j.raw.length),J.push(j);continue}if(j=this.tokenizer.tag(Z,be,Pe)){Z=Z.substring(j.raw.length),be=j.inLink,Pe=j.inRawBlock;var qt=J[J.length-1];qt&&j.type==="text"&&qt.type==="text"?(qt.raw+=j.raw,qt.text+=j.text):J.push(j);continue}if(j=this.tokenizer.link(Z)){Z=Z.substring(j.raw.length),j.type==="link"&&(j.tokens=this.inlineTokens(j.text,[],!0,Pe)),J.push(j);continue}if(j=this.tokenizer.reflink(Z,this.tokens.links)){Z=Z.substring(j.raw.length);var nn=J[J.length-1];j.type==="link"?(j.tokens=this.inlineTokens(j.text,[],!0,Pe),J.push(j)):nn&&j.type==="text"&&nn.type==="text"?(nn.raw+=j.raw,nn.text+=j.text):J.push(j);continue}if(j=this.tokenizer.emStrong(Z,X,Xt)){Z=Z.substring(j.raw.length),j.tokens=this.inlineTokens(j.text,[],be,Pe),J.push(j);continue}if(j=this.tokenizer.codespan(Z)){Z=Z.substring(j.raw.length),J.push(j);continue}if(j=this.tokenizer.br(Z)){Z=Z.substring(j.raw.length),J.push(j);continue}if(j=this.tokenizer.del(Z)){Z=Z.substring(j.raw.length),j.tokens=this.inlineTokens(j.text,[],be,Pe),J.push(j);continue}if(j=this.tokenizer.autolink(Z,ce)){Z=Z.substring(j.raw.length),J.push(j);continue}if(!be&&(j=this.tokenizer.url(Z,ce))){Z=Z.substring(j.raw.length),J.push(j);continue}if(j=this.tokenizer.inlineText(Z,Pe,Ce)){Z=Z.substring(j.raw.length),j.raw.slice(-1)!=="_"&&(Xt=j.raw.slice(-1)),Ot=!0,Ye=J[J.length-1],Ye&&Ye.type==="text"?(Ye.raw+=j.raw,Ye.text+=j.text):J.push(j);continue}if(Z){var xn="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(xn);break}else throw new Error(xn)}}return J},b(Ee,null,[{key:"rules",get:function(){return{block:je,inline:Tt}}}]),Ee}(),Le=ve.exports.defaults,Ie=re.cleanUrl,P=re.escape,pe=function(){function Ee(Ge){this.options=Ge||Le}var $e=Ee.prototype;return $e.code=function(Z,J,be){var Pe=(J||"").match(/\S*/)[0];if(this.options.highlight){var j=this.options.highlight(Z,Pe);j!=null&&j!==Z&&(be=!0,Z=j)}return Z=Z.replace(/\n$/,"")+`
`,Pe?'<pre><code class="'+this.options.langPrefix+P(Pe,!0)+'">'+(be?Z:P(Z,!0))+`</code></pre>
`:"<pre><code>"+(be?Z:P(Z,!0))+`</code></pre>
`},$e.blockquote=function(Z){return`<blockquote>
`+Z+`</blockquote>
`},$e.html=function(Z){return Z},$e.heading=function(Z,J,be,Pe){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+Pe.slug(be)+'">'+Z+"</h"+J+`>
`:"<h"+J+">"+Z+"</h"+J+`>
`},$e.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},$e.list=function(Z,J,be){var Pe=J?"ol":"ul",j=J&&be!==1?' start="'+be+'"':"";return"<"+Pe+j+`>
`+Z+"</"+Pe+`>
`},$e.listitem=function(Z){return"<li>"+Z+`</li>
`},$e.checkbox=function(Z){return"<input "+(Z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},$e.paragraph=function(Z){return"<p>"+Z+`</p>
`},$e.table=function(Z,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
<thead>
`+Z+`</thead>
`+J+`</table>
`},$e.tablerow=function(Z){return`<tr>
`+Z+`</tr>
`},$e.tablecell=function(Z,J){var be=J.header?"th":"td",Pe=J.align?"<"+be+' align="'+J.align+'">':"<"+be+">";return Pe+Z+"</"+be+`>
`},$e.strong=function(Z){return"<strong>"+Z+"</strong>"},$e.em=function(Z){return"<em>"+Z+"</em>"},$e.codespan=function(Z){return"<code>"+Z+"</code>"},$e.br=function(){return this.options.xhtml?"<br/>":"<br>"},$e.del=function(Z){return"<del>"+Z+"</del>"},$e.link=function(Z,J,be){if(Z=Ie(this.options.sanitize,this.options.baseUrl,Z),Z===null)return be;var Pe='<a href="'+P(Z)+'"';return J&&(Pe+=' title="'+J+'"'),Pe+=">"+be+"</a>",Pe},$e.image=function(Z,J,be){if(Z=Ie(this.options.sanitize,this.options.baseUrl,Z),Z===null)return be;var Pe='<img src="'+Z+'" alt="'+be+'"';return J&&(Pe+=' title="'+J+'"'),Pe+=this.options.xhtml?"/>":">",Pe},$e.text=function(Z){return Z},Ee}(),xe=function(){function Ee(){}var $e=Ee.prototype;return $e.strong=function(Z){return Z},$e.em=function(Z){return Z},$e.codespan=function(Z){return Z},$e.del=function(Z){return Z},$e.html=function(Z){return Z},$e.text=function(Z){return Z},$e.link=function(Z,J,be){return""+be},$e.image=function(Z,J,be){return""+be},$e.br=function(){return""},Ee}(),He=function(){function Ee(){this.seen={}}var $e=Ee.prototype;return $e.serialize=function(Z){return Z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},$e.getNextSafeSlug=function(Z,J){var be=Z,Pe=0;if(this.seen.hasOwnProperty(be)){Pe=this.seen[Z];do Pe++,be=Z+"-"+Pe;while(this.seen.hasOwnProperty(be))}return J||(this.seen[Z]=Pe,this.seen[be]=0),be},$e.slug=function(Z,J){J===void 0&&(J={});var be=this.serialize(Z);return this.getNextSafeSlug(be,J.dryrun)},Ee}(),et=pe,ut=xe,xt=He,Lt=ve.exports.defaults,Et=re.unescape,Mt=function(){function Ee(Ge){this.options=Ge||Lt,this.options.renderer=this.options.renderer||new et,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ut,this.slugger=new xt}Ee.parse=function(Z,J){var be=new Ee(J);return be.parse(Z)},Ee.parseInline=function(Z,J){var be=new Ee(J);return be.parseInline(Z)};var $e=Ee.prototype;return $e.parse=function(Z,J){J===void 0&&(J=!0);var be="",Pe,j,Ye,X,tt,Ot,Xt,pn,qt,nn,xn,Un,un,On,en,Ut,Pt,an,rn=Z.length;for(Pe=0;Pe<rn;Pe++)switch(nn=Z[Pe],nn.type){case"space":continue;case"hr":{be+=this.renderer.hr();continue}case"heading":{be+=this.renderer.heading(this.parseInline(nn.tokens),nn.depth,Et(this.parseInline(nn.tokens,this.textRenderer)),this.slugger);continue}case"code":{be+=this.renderer.code(nn.text,nn.lang,nn.escaped);continue}case"table":{for(pn="",Xt="",X=nn.header.length,j=0;j<X;j++)Xt+=this.renderer.tablecell(this.parseInline(nn.tokens.header[j]),{header:!0,align:nn.align[j]});for(pn+=this.renderer.tablerow(Xt),qt="",X=nn.cells.length,j=0;j<X;j++){for(Ot=nn.tokens.cells[j],Xt="",tt=Ot.length,Ye=0;Ye<tt;Ye++)Xt+=this.renderer.tablecell(this.parseInline(Ot[Ye]),{header:!1,align:nn.align[Ye]});qt+=this.renderer.tablerow(Xt)}be+=this.renderer.table(pn,qt);continue}case"blockquote":{qt=this.parse(nn.tokens),be+=this.renderer.blockquote(qt);continue}case"list":{for(xn=nn.ordered,Un=nn.start,un=nn.loose,X=nn.items.length,qt="",j=0;j<X;j++)en=nn.items[j],Ut=en.checked,Pt=en.task,On="",en.task&&(an=this.renderer.checkbox(Ut),un?en.tokens.length>0&&en.tokens[0].type==="text"?(en.tokens[0].text=an+" "+en.tokens[0].text,en.tokens[0].tokens&&en.tokens[0].tokens.length>0&&en.tokens[0].tokens[0].type==="text"&&(en.tokens[0].tokens[0].text=an+" "+en.tokens[0].tokens[0].text)):en.tokens.unshift({type:"text",text:an}):On+=an),On+=this.parse(en.tokens,un),qt+=this.renderer.listitem(On,Pt,Ut);be+=this.renderer.list(qt,xn,Un);continue}case"html":{be+=this.renderer.html(nn.text);continue}case"paragraph":{be+=this.renderer.paragraph(this.parseInline(nn.tokens));continue}case"text":{for(qt=nn.tokens?this.parseInline(nn.tokens):nn.text;Pe+1<rn&&Z[Pe+1].type==="text";)nn=Z[++Pe],qt+=`
`+(nn.tokens?this.parseInline(nn.tokens):nn.text);be+=J?this.renderer.paragraph(qt):qt;continue}default:{var An='Token with "'+nn.type+'" type was not found.';if(this.options.silent){console.error(An);return}else throw new Error(An)}}return be},$e.parseInline=function(Z,J){J=J||this.renderer;var be="",Pe,j,Ye=Z.length;for(Pe=0;Pe<Ye;Pe++)switch(j=Z[Pe],j.type){case"escape":{be+=J.text(j.text);break}case"html":{be+=J.html(j.text);break}case"link":{be+=J.link(j.href,j.title,this.parseInline(j.tokens,J));break}case"image":{be+=J.image(j.href,j.title,j.text);break}case"strong":{be+=J.strong(this.parseInline(j.tokens,J));break}case"em":{be+=J.em(this.parseInline(j.tokens,J));break}case"codespan":{be+=J.codespan(j.text);break}case"br":{be+=J.br();break}case"del":{be+=J.del(this.parseInline(j.tokens,J));break}case"text":{be+=J.text(j.text);break}default:{var X='Token with "'+j.type+'" type was not found.';if(this.options.silent){console.error(X);return}else throw new Error(X)}}return be},Ee}(),Yt=Je,jt=Mt,$t=Xe,it=pe,It=xe,Rt=He,ye=re.merge,Ve=re.checkSanitizeDeprecation,_=re.escape,A=ve.exports.getDefaults,Oe=ve.exports.changeDefaults,N=ve.exports.defaults;function ae(Ee,$e,Ge){if(typeof Ee=="undefined"||Ee===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ee!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ee)+", string expected");if(typeof $e=="function"&&(Ge=$e,$e=null),$e=ye({},ae.defaults,$e||{}),Ve($e),Ge){var Z=$e.highlight,J;try{J=Yt.lex(Ee,$e)}catch(Ye){return Ge(Ye)}var be=function(X){var tt;if(!X)try{$e.walkTokens&&ae.walkTokens(J,$e.walkTokens),tt=jt.parse(J,$e)}catch(Ot){X=Ot}return $e.highlight=Z,X?Ge(X):Ge(null,tt)};if(!Z||Z.length<3||(delete $e.highlight,!J.length))return be();var Pe=0;ae.walkTokens(J,function(Ye){Ye.type==="code"&&(Pe++,setTimeout(function(){Z(Ye.text,Ye.lang,function(X,tt){if(X)return be(X);tt!=null&&tt!==Ye.text&&(Ye.text=tt,Ye.escaped=!0),Pe--,Pe===0&&be()})},0))}),Pe===0&&be();return}try{var j=Yt.lex(Ee,$e);return $e.walkTokens&&ae.walkTokens(j,$e.walkTokens),jt.parse(j,$e)}catch(Ye){if(Ye.message+=`
Please report this to https://github.com/markedjs/marked.`,$e.silent)return"<p>An error occurred:</p><pre>"+_(Ye.message+"",!0)+"</pre>";throw Ye}}ae.options=ae.setOptions=function(Ee){return ye(ae.defaults,Ee),Oe(ae.defaults),ae},ae.getDefaults=A,ae.defaults=N,ae.use=function(Ee){var $e=ye({},Ee);if(Ee.renderer&&function(){var Z=ae.defaults.renderer||new it,J=function(j){var Ye=Z[j];Z[j]=function(){for(var X=arguments.length,tt=new Array(X),Ot=0;Ot<X;Ot++)tt[Ot]=arguments[Ot];var Xt=Ee.renderer[j].apply(Z,tt);return Xt===!1&&(Xt=Ye.apply(Z,tt)),Xt}};for(var be in Ee.renderer)J(be);$e.renderer=Z}(),Ee.tokenizer&&function(){var Z=ae.defaults.tokenizer||new $t,J=function(j){var Ye=Z[j];Z[j]=function(){for(var X=arguments.length,tt=new Array(X),Ot=0;Ot<X;Ot++)tt[Ot]=arguments[Ot];var Xt=Ee.tokenizer[j].apply(Z,tt);return Xt===!1&&(Xt=Ye.apply(Z,tt)),Xt}};for(var be in Ee.tokenizer)J(be);$e.tokenizer=Z}(),Ee.walkTokens){var Ge=ae.defaults.walkTokens;$e.walkTokens=function(Z){Ee.walkTokens(Z),Ge&&Ge(Z)}}ae.setOptions($e)},ae.walkTokens=function(Ee,$e){for(var Ge=oe(Ee),Z;!(Z=Ge()).done;){var J=Z.value;switch($e(J),J.type){case"table":{for(var be=oe(J.tokens.header),Pe;!(Pe=be()).done;){var j=Pe.value;ae.walkTokens(j,$e)}for(var Ye=oe(J.tokens.cells),X;!(X=Ye()).done;)for(var tt=X.value,Ot=oe(tt),Xt;!(Xt=Ot()).done;){var pn=Xt.value;ae.walkTokens(pn,$e)}break}case"list":{ae.walkTokens(J.items,$e);break}default:J.tokens&&ae.walkTokens(J.tokens,$e)}}},ae.parseInline=function(Ee,$e){if(typeof Ee=="undefined"||Ee===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ee!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ee)+", string expected");$e=ye({},ae.defaults,$e||{}),Ve($e);try{var Ge=Yt.lexInline(Ee,$e);return $e.walkTokens&&ae.walkTokens(Ge,$e.walkTokens),jt.parseInline(Ge,$e)}catch(Z){if(Z.message+=`
Please report this to https://github.com/markedjs/marked.`,$e.silent)return"<p>An error occurred:</p><pre>"+_(Z.message+"",!0)+"</pre>";throw Z}},ae.Parser=jt,ae.parser=jt.parse,ae.Renderer=it,ae.TextRenderer=It,ae.Lexer=Yt,ae.lexer=Yt.lex,ae.Tokenizer=$t,ae.Slugger=Rt,ae.parse=ae;var St=ae;return St})},11690:function(ln){const ct=/[&<>"']/,b=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,de=/[<>"']|&(?!#?\w+;)/g,oe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ve=le=>oe[le];function G(le,Se){if(Se){if(ct.test(le))return le.replace(b,ve)}else if(m.test(le))return le.replace(de,ve);return le}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function fe(le){return le.replace(g,(Se,ke)=>(ke=ke.toLowerCase(),ke==="colon"?":":ke.charAt(0)==="#"?ke.charAt(1)==="x"?String.fromCharCode(parseInt(ke.substring(2),16)):String.fromCharCode(+ke.substring(1)):""))}const ee=/(^|[^\[])\^/g;function o(le,Se){le=le.source||le,Se=Se||"";const ke={replace:(De,Me)=>(Me=Me.source||Me,Me=Me.replace(ee,"$1"),le=le.replace(De,Me),ke),getRegex:()=>new RegExp(le,Se)};return ke}const H=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(le,Se,ke){if(le){let De;try{De=decodeURIComponent(fe(ke)).replace(H,"").toLowerCase()}catch(Me){return null}if(De.indexOf("javascript:")===0||De.indexOf("vbscript:")===0||De.indexOf("data:")===0)return null}Se&&!k.test(ke)&&(ke=Q(Se,ke));try{ke=encodeURI(ke).replace(/%25/g,"%")}catch(De){return null}return ke}const w={},C=/^[^:]+:\/*[^/]*$/,R=/^([^:]+:)[\s\S]*$/,q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Q(le,Se){w[" "+le]||(C.test(le)?w[" "+le]=le+"/":w[" "+le]=M(le,"/",!0)),le=w[" "+le];const ke=le.indexOf(":")===-1;return Se.substring(0,2)==="//"?ke?Se:le.replace(R,"$1")+Se:Se.charAt(0)==="/"?ke?Se:le.replace(q,"$1")+Se:le+Se}const K={exec:function(){}};function D(le){let Se=1,ke,De;for(;Se<arguments.length;Se++){ke=arguments[Se];for(De in ke)Object.prototype.hasOwnProperty.call(ke,De)&&(le[De]=ke[De])}return le}function $(le,Se){const ke=le.replace(/\|/g,(Y,B,W)=>{let re=!1,ie=B;for(;--ie>=0&&W[ie]==="\\";)re=!re;return re?"|":" |"}),De=ke.split(/ \|/);let Me=0;if(De.length>Se)De.splice(Se);else for(;De.length<Se;)De.push("");for(;Me<De.length;Me++)De[Me]=De[Me].trim().replace(/\\\|/g,"|");return De}function M(le,Se,ke){const De=le.length;if(De===0)return"";let Me=0;for(;Me<De;){const Y=le.charAt(De-Me-1);if(Y===Se&&!ke)Me++;else if(Y!==Se&&ke)Me++;else break}return le.substr(0,De-Me)}function F(le,Se){if(le.indexOf(Se[1])===-1)return-1;const ke=le.length;let De=0,Me=0;for(;Me<ke;Me++)if(le[Me]==="\\")Me++;else if(le[Me]===Se[0])De++;else if(le[Me]===Se[1]&&(De--,De<0))return Me;return-1}function ue(le){le&&le.sanitize&&!le.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 he(le,Se){if(Se<1)return"";let ke="";for(;Se>1;)Se&1&&(ke+=le),Se>>=1,le+=le;return ke+le}ln.exports={escape:G,unescape:fe,edit:o,cleanUrl:S,resolveUrl:Q,noopTest:K,merge:D,splitCells:$,rtrim:M,findClosingBracket:F,checkSanitizeDeprecation:ue,repeatString:he}},75918:function(ln,ct,b){"use strict";b.d(ct,{Wi:function(){return g},Z0:function(){return fe},aU:function(){return G},eZ:function(){return o},wY:function(){return ee}});var m=b(4348),de=b(69323),oe=b(13268),ve=function(H,k,S,w){function C(R){return R instanceof S?R:new S(function(q){q(R)})}return new(S||(S=Promise))(function(R,q){function Q($){try{D(w.next($))}catch(M){q(M)}}function K($){try{D(w.throw($))}catch(M){q(M)}}function D($){$.done?R($.value):C($.value).then(Q,K)}D((w=w.apply(H,k||[])).next())})};class G extends de.JT{constructor(k,S="",w="",C=!0,R){super(),this._onDidChange=this._register(new m.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=k,this._label=S,this._cssClass=w,this._enabled=C,this._actionCallback=R}get id(){return this._id}get label(){return this._label}set label(k){this._setLabel(k)}_setLabel(k){this._label!==k&&(this._label=k,this._onDidChange.fire({label:k}))}get tooltip(){return this._tooltip||""}set tooltip(k){this._setTooltip(k)}_setTooltip(k){this._tooltip!==k&&(this._tooltip=k,this._onDidChange.fire({tooltip:k}))}get class(){return this._cssClass}set class(k){this._setClass(k)}_setClass(k){this._cssClass!==k&&(this._cssClass=k,this._onDidChange.fire({class:k}))}get enabled(){return this._enabled}set enabled(k){this._setEnabled(k)}_setEnabled(k){this._enabled!==k&&(this._enabled=k,this._onDidChange.fire({enabled:k}))}get checked(){return this._checked}set checked(k){this._setChecked(k)}_setChecked(k){this._checked!==k&&(this._checked=k,this._onDidChange.fire({checked:k}))}run(k,S){return ve(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(k))})}}class g extends de.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new m.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new m.Q5),this.onDidRun=this._onDidRun.event}run(k,S){return ve(this,void 0,void 0,function*(){if(!k.enabled)return;this._onBeforeRun.fire({action:k});let w;try{yield this.runAction(k,S)}catch(C){w=C}this._onDidRun.fire({action:k,error:w})})}runAction(k,S){return ve(this,void 0,void 0,function*(){yield k.run(S)})}}class fe extends G{constructor(k){super(fe.ID,k,k?"separator text":"separator"),this.checked=!1,this.enabled=!1}}fe.ID="vs.actions.separator";class ee{constructor(k,S,w,C){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=k,this.label=S,this.class=C,this._actions=w}get actions(){return this._actions}dispose(){}run(){return ve(this,void 0,void 0,function*(){})}}class o extends G{constructor(){super(o.ID,oe.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(ln,ct,b){"use strict";b.d(ct,{ok:function(){return m}});function m(de,oe){if(!de)throw new Error(oe?`Assertion failed (${oe})`:"Assertion Failed")}},52615:function(ln,ct,b){"use strict";b.d(ct,{CM:function(){return G},JL:function(){return g},dT:function(){return ee},fK:function(){return ve},lA:function(){return fe}});var m=b(4348);class de{constructor(){this._icons=new Map,this._onDidRegister=new m.Q5}add(H){const k=this._icons.get(H.id);k?H.description?k.description=H.description:console.error(`Duplicate registration of codicon ${H.id}`):(this._icons.set(H.id,H),this._onDidRegister.fire(H))}get(H){return this._icons.get(H)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const oe=new de,ve=oe;function G(o,H){return new fe(o,H)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(H,k)=>` ${k} `).trim():""}class fe{constructor(H,k,S){this.id=H,this.definition=k,this.description=S,oe.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ee;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const H=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function k(C){if(C instanceof fe)return["codicon","codicon-"+C.id];const R=H.exec(C.id);if(!R)return k(fe.error);let[,q,Q]=R;const K=["codicon","codicon-"+q];return Q&&K.push("codicon-modifier-"+Q.substr(1)),K}o.asClassNameArray=k;function S(C){return k(C).join(" ")}o.asClassName=S;function w(C){return"."+k(C).join(".")}o.asCSSSelector=w})(ee||(ee={})),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"})}(fe||(fe={}))},79881:function(ln,ct,b){"use strict";b.d(ct,{B8:function(){return k},Cp:function(){return ve},F0:function(){return ee},L6:function(){return H},VV:function(){return fe},b1:function(){return o},dL:function(){return oe},ri:function(){return G}});class m{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(w){setTimeout(()=>{throw w.stack?new Error(w.message+`
`+w.stack):w},0)}}emit(w){this.listeners.forEach(C=>{C(w)})}onUnexpectedError(w){this.unexpectedErrorHandler(w),this.emit(w)}onUnexpectedExternalError(w){this.unexpectedErrorHandler(w)}}const de=new m;function oe(S){fe(S)||de.onUnexpectedError(S)}function ve(S){fe(S)||de.onUnexpectedExternalError(S)}function G(S){if(S instanceof Error){let{name:w,message:C}=S;const R=S.stacktrace||S.stack;return{$isError:!0,name:w,message:C,stack:R}}return S}const g="Canceled";function fe(S){return S instanceof Error&&S.name===g&&S.message===g}function ee(){const S=new Error(g);return S.name=S.message,S}function o(S){return S?new Error(`Illegal argument: ${S}`):new Error("Illegal argument")}function H(S){return S?new Error(`Illegal state: ${S}`):new Error("Illegal state")}class k extends Error{constructor(w){super("NotSupported"),w&&(this.message=w)}}},4348:function(ln,ct,b){"use strict";b.d(ct,{D0:function(){return k},E7:function(){return S},K3:function(){return H},Q5:function(){return o},ZD:function(){return w},ju:function(){return G}});var m=b(79881),de=b(69323),oe=b(34502),ve=b(95830),G;(function(C){C.None=()=>de.JT.None;function R(W){return(re,ie=null,se)=>{let x=!1,E;return E=W(V=>{if(!x)return E?E.dispose():x=!0,re.call(ie,V)},null,se),x&&E.dispose(),E}}C.once=R;function q(W,re){return F((ie,se=null,x)=>W(E=>ie.call(se,re(E)),null,x))}C.map=q;function Q(W,re){return F((ie,se=null,x)=>W(E=>{re(E),ie.call(se,E)},null,x))}C.forEach=Q;function K(W,re){return F((ie,se=null,x)=>W(E=>re(E)&&ie.call(se,E),null,x))}C.filter=K;function D(W){return W}C.signal=D;function $(...W){return(re,ie=null,se)=>(0,de.F8)(...W.map(x=>x(E=>re.call(ie,E),null,se)))}C.any=$;function M(W,re,ie){let se=ie;return q(W,x=>(se=re(se,x),se))}C.reduce=M;function F(W){let re;const ie=new o({onFirstListenerAdd(){re=W(ie.fire,ie)},onLastListenerRemove(){re.dispose()}});return ie.event}function ue(W,re,ie=100,se=!1,x){let E,V,me,ze=0;const Xe=new o({leakWarningThreshold:x,onFirstListenerAdd(){E=W(_e=>{ze++,V=re(V,_e),se&&!me&&(Xe.fire(V),V=void 0),clearTimeout(me),me=setTimeout(()=>{const Ke=V;V=void 0,me=void 0,(!se||ze>1)&&Xe.fire(Ke),ze=0},ie)})},onLastListenerRemove(){E.dispose()}});return Xe.event}C.debounce=ue;function he(W,re=(ie,se)=>ie===se){let ie=!0,se;return K(W,x=>{const E=ie||!re(x,se);return ie=!1,se=x,E})}C.latch=he;function le(W,re){return[C.filter(W,re),C.filter(W,ie=>!re(ie))]}C.split=le;function Se(W,re=!1,ie=[]){let se=ie.slice(),x=W(me=>{se?se.push(me):V.fire(me)});const E=()=>{se&&se.forEach(me=>V.fire(me)),se=null},V=new o({onFirstListenerAdd(){x||(x=W(me=>V.fire(me)))},onFirstListenerDidAdd(){se&&(re?setTimeout(E):E())},onLastListenerRemove(){x&&x.dispose(),x=null}});return V.event}C.buffer=Se;class ke{constructor(re){this.event=re}map(re){return new ke(q(this.event,re))}forEach(re){return new ke(Q(this.event,re))}filter(re){return new ke(K(this.event,re))}reduce(re,ie){return new ke(M(this.event,re,ie))}latch(){return new ke(he(this.event))}debounce(re,ie=100,se=!1,x){return new ke(ue(this.event,re,ie,se,x))}on(re,ie,se){return this.event(re,ie,se)}once(re,ie,se){return R(this.event)(re,ie,se)}}function De(W){return new ke(W)}C.chain=De;function Me(W,re,ie=se=>se){const se=(...me)=>V.fire(ie(...me)),x=()=>W.on(re,se),E=()=>W.removeListener(re,se),V=new o({onFirstListenerAdd:x,onLastListenerRemove:E});return V.event}C.fromNodeEventEmitter=Me;function Y(W,re,ie=se=>se){const se=(...me)=>V.fire(ie(...me)),x=()=>W.addEventListener(re,se),E=()=>W.removeEventListener(re,se),V=new o({onFirstListenerAdd:x,onLastListenerRemove:E});return V.event}C.fromDOMEventEmitter=Y;function B(W){return new Promise(re=>R(W)(re))}C.toPromise=B})(G||(G={}));class g{constructor(R){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${R}_${g._idPool++}`}start(R){this._stopWatch=new ve.G(!0),this._listenerCount=R}stop(){if(this._stopWatch){const R=this._stopWatch.elapsed();this._elapsedOverall+=R,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${R.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let fe=-1;class ee{constructor(R,q=Math.random().toString(18).slice(2,5)){this.customThreshold=R,this.name=q,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(R){let q=fe;if(typeof this.customThreshold=="number"&&(q=this.customThreshold),q<=0||R<q)return;this._stacks||(this._stacks=new Map);const Q=new Error().stack.split(`
`).slice(3).join(`
`),K=this._stacks.get(Q)||0;if(this._stacks.set(Q,K+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=q*.5;let D,$=0;for(const[M,F]of this._stacks)(!D||$<F)&&(D=M,$=F);console.warn(`[${this.name}] potential listener LEAK detected, having ${R} listeners already. MOST frequent listener (${$}):`),console.warn(D)}return()=>{const D=this._stacks.get(Q)||0;this._stacks.set(Q,D-1)}}}class o{constructor(R){var q;this._disposed=!1,this._options=R,this._leakageMon=fe>0?new ee(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((q=this._options)===null||q===void 0)&&q._profName?new g(this._options._profName):void 0}get event(){return this._event||(this._event=(R,q,Q)=>{var K;this._listeners||(this._listeners=new oe.S);const D=this._listeners.isEmpty();D&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const $=this._listeners.push(q?[R,q]:R);D&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,R,q);const M=(K=this._leakageMon)===null||K===void 0?void 0:K.check(this._listeners.size),F=(0,de.OF)(()=>{M&&M(),this._disposed||($(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Q instanceof de.SL?Q.add(F):Array.isArray(Q)&&Q.push(F),F}),this._event}fire(R){var q,Q;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new oe.S);for(let K of this._listeners)this._deliveryQueue.push([K,R]);for((q=this._perfMon)===null||q===void 0||q.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[K,D]=this._deliveryQueue.shift();try{typeof K=="function"?K.call(void 0,D):K[0].call(K[1],D)}catch($){(0,m.dL)($)}}(Q=this._perfMon)===null||Q===void 0||Q.stop()}}dispose(){var R,q,Q,K,D;this._disposed||(this._disposed=!0,(R=this._listeners)===null||R===void 0||R.clear(),(q=this._deliveryQueue)===null||q===void 0||q.clear(),(K=(Q=this._options)===null||Q===void 0?void 0:Q.onLastListenerRemove)===null||K===void 0||K.call(Q),(D=this._leakageMon)===null||D===void 0||D.dispose())}}class H extends o{constructor(R){super(R),this._isPaused=0,this._eventQueue=new oe.S,this._mergeFn=R==null?void 0:R.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const R=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(R))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(R){this._listeners&&(this._isPaused!==0?this._eventQueue.push(R):super.fire(R))}}class k extends H{constructor(R){var q;super(R),this._delay=(q=R.delay)!==null&&q!==void 0?q:100}fire(R){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(R)}}class S{constructor(){this.buffers=[]}wrapEvent(R){return(q,Q,K)=>R(D=>{const $=this.buffers[this.buffers.length-1];$?$.push(()=>q.call(Q,D)):q.call(Q,D)},void 0,K)}bufferEvents(R){const q=[];this.buffers.push(q);const Q=R();return this.buffers.pop(),q.forEach(K=>K()),Q}}class w{constructor(){this.listening=!1,this.inputEvent=G.None,this.inputEventListener=de.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(R){this.inputEvent=R,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=R(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(ln,ct,b){"use strict";b.d(ct,{I:function(){return m}});function m(de){const oe=this;let ve=!1,G;return function(){return ve||(ve=!0,G=de.apply(oe,arguments)),G}}},88226:function(ln,ct,b){"use strict";b.d(ct,{$:function(){return m}});var m;(function(de){function oe($){return $&&typeof $=="object"&&typeof $[Symbol.iterator]=="function"}de.is=oe;const ve=Object.freeze([]);function G(){return ve}de.empty=G;function*g($){yield $}de.single=g;function fe($){return $||ve}de.from=fe;function ee($){return!$||$[Symbol.iterator]().next().done===!0}de.isEmpty=ee;function o($){return $[Symbol.iterator]().next().value}de.first=o;function H($,M){for(const F of $)if(M(F))return!0;return!1}de.some=H;function k($,M){for(const F of $)if(M(F))return F}de.find=k;function*S($,M){for(const F of $)M(F)&&(yield F)}de.filter=S;function*w($,M){let F=0;for(const ue of $)yield M(ue,F++)}de.map=w;function*C(...$){for(const M of $)for(const F of M)yield F}de.concat=C;function*R($){for(const M of $)for(const F of M)yield F}de.concatNested=R;function q($,M,F){let ue=F;for(const he of $)ue=M(ue,he);return ue}de.reduce=q;function*Q($,M,F=$.length){for(M<0&&(M+=$.length),F<0?F+=$.length:F>$.length&&(F=$.length);M<F;M++)yield $[M]}de.slice=Q;function K($,M=Number.POSITIVE_INFINITY){const F=[];if(M===0)return[F,$];const ue=$[Symbol.iterator]();for(let he=0;he<M;he++){const le=ue.next();if(le.done)return[F,de.empty()];F.push(le.value)}return[F,{[Symbol.iterator](){return ue}}]}de.consume=K;function D($,M,F=(ue,he)=>ue===he){const ue=$[Symbol.iterator](),he=M[Symbol.iterator]();for(;;){const le=ue.next(),Se=he.next();if(le.done!==Se.done)return!1;if(le.done)return!0;if(!F(le.value,Se.value))return!1}}de.equals=D})(m||(m={}))},69323:function(ln,ct,b){"use strict";b.d(ct,{B9:function(){return w},F8:function(){return C},JT:function(){return Q},Jz:function(){return D},OF:function(){return R},SL:function(){return q},Wf:function(){return S},XK:function(){return K},dk:function(){return H}});var m=b(17845),de=b(88226);const oe=!1;let ve=null;function G($){ve=$}if(oe){const $="__is_disposable_tracked__";G(new class{trackDisposable(M){const F=new Error("Potentially leaked disposable").stack;setTimeout(()=>{M[$]||console.log(F)},3e3)}setParent(M,F){if(M&&M!==Q.None)try{M[$]=!0}catch(ue){}}markAsDisposed(M){if(M&&M!==Q.None)try{M[$]=!0}catch(F){}}markAsSingleton(M){}})}function g($){return ve==null||ve.trackDisposable($),$}function fe($){ve==null||ve.markAsDisposed($)}function ee($,M){ve==null||ve.setParent($,M)}function o($,M){if(ve)for(const F of $)ve.setParent(F,M)}function H($){return ve==null||ve.markAsSingleton($),$}class k extends Error{constructor(M){super(`Encountered errors while disposing of store. Errors: [${M.join(", ")}]`),this.errors=M}}function S($){return typeof $.dispose=="function"&&$.dispose.length===0}function w($){if(de.$.is($)){let M=[];for(const F of $)if(F)try{F.dispose()}catch(ue){M.push(ue)}if(M.length===1)throw M[0];if(M.length>1)throw new k(M);return Array.isArray($)?[]:$}else if($)return $.dispose(),$}function C(...$){const M=R(()=>w($));return o($,M),M}function R($){const M=g({dispose:(0,m.I)(()=>{fe(M),$()})});return M}class q{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(fe(this),this._isDisposed=!0,this.clear())}clear(){try{w(this._toDispose.values())}finally{this._toDispose.clear()}}add(M){if(!M)return M;if(M===this)throw new Error("Cannot register a disposable on itself!");return ee(M,this),this._isDisposed?q.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(M),M}}q.DISABLE_DISPOSED_WARNING=!1;class Q{constructor(){this._store=new q,g(this),ee(this._store,this)}dispose(){fe(this),this._store.dispose()}_register(M){if(M===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(M)}}Q.None=Object.freeze({dispose(){}});class K{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value(M){var F;this._isDisposed||M===this._value||((F=this._value)===null||F===void 0||F.dispose(),M&&ee(M,this),this._value=M)}clear(){this.value=void 0}dispose(){var M;this._isDisposed=!0,fe(this),(M=this._value)===null||M===void 0||M.dispose(),this._value=void 0}clearAndLeak(){const M=this._value;return this._value=void 0,M&&ee(M,null),M}}class D{constructor(M){this.object=M}dispose(){}}},34502:function(ln,ct,b){"use strict";b.d(ct,{S:function(){return de}});class m{constructor(ve){this.element=ve,this.next=m.Undefined,this.prev=m.Undefined}}m.Undefined=new m(void 0);class de{constructor(){this._first=m.Undefined,this._last=m.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===m.Undefined}clear(){let ve=this._first;for(;ve!==m.Undefined;){const G=ve.next;ve.prev=m.Undefined,ve.next=m.Undefined,ve=G}this._first=m.Undefined,this._last=m.Undefined,this._size=0}unshift(ve){return this._insert(ve,!1)}push(ve){return this._insert(ve,!0)}_insert(ve,G){const g=new m(ve);if(this._first===m.Undefined)this._first=g,this._last=g;else if(G){const ee=this._last;this._last=g,g.prev=ee,ee.next=g}else{const ee=this._first;this._first=g,g.next=ee,ee.prev=g}this._size+=1;let fe=!1;return()=>{fe||(fe=!0,this._remove(g))}}shift(){if(this._first!==m.Undefined){const ve=this._first.element;return this._remove(this._first),ve}}pop(){if(this._last!==m.Undefined){const ve=this._last.element;return this._remove(this._last),ve}}_remove(ve){if(ve.prev!==m.Undefined&&ve.next!==m.Undefined){const G=ve.prev;G.next=ve.next,ve.next.prev=G}else ve.prev===m.Undefined&&ve.next===m.Undefined?(this._first=m.Undefined,this._last=m.Undefined):ve.next===m.Undefined?(this._last=this._last.prev,this._last.next=m.Undefined):ve.prev===m.Undefined&&(this._first=this._first.next,this._first.prev=m.Undefined);this._size-=1}*[Symbol.iterator](){let ve=this._first;for(;ve!==m.Undefined;)yield ve.element,ve=ve.next}}},23345:function(ln,ct,b){"use strict";b.d(ct,{$L:function(){return ue},ED:function(){return D},IJ:function(){return M},OS:function(){return ke},WE:function(){return le},dz:function(){return $},gn:function(){return he},li:function(){return R},r:function(){return Y},tY:function(){return F},xS:function(){return Se}});var m=b(97671),de;const oe="en";let ve=!1,G=!1,g=!1,fe=!1,ee=!1,o=!1,H=!1,k,S=null,w=null,C;const R=typeof self=="object"?self:typeof b.g=="object"?b.g:{};let q;typeof R.vscode!="undefined"&&typeof R.vscode.process!="undefined"?q=R.vscode.process:typeof m!="undefined"&&(q=m);const Q=typeof((de=q==null?void 0:q.versions)===null||de===void 0?void 0:de.electron)=="string"&&q.type==="renderer";if(typeof navigator=="object"&&!Q)C=navigator.userAgent,ve=C.indexOf("Windows")>=0,G=C.indexOf("Macintosh")>=0,H=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=C.indexOf("Linux")>=0,o=!0,k=navigator.language,S=k;else if(typeof q=="object"){ve=q.platform==="win32",G=q.platform==="darwin",g=q.platform==="linux",fe=g&&!!q.env.SNAP&&!!q.env.SNAP_REVISION,k=oe,S=oe;const B=q.env.VSCODE_NLS_CONFIG;if(B)try{const W=JSON.parse(B),re=W.availableLanguages["*"];k=W.locale,S=re||oe,w=W._translationsConfigFile}catch(W){}ee=!0}else console.error("Unable to resolve platform.");let K=0;G?K=1:ve?K=3:g&&(K=2);const D=ve,$=G,M=g,F=ee,ue=o,he=H,le=C,Se=function(){if(R.setImmediate)return R.setImmediate.bind(R);if(typeof R.postMessage=="function"&&!R.importScripts){let re=[];R.addEventListener("message",se=>{if(se.data&&se.data.vscodeSetImmediateId)for(let x=0,E=re.length;x<E;x++){const V=re[x];if(V.id===se.data.vscodeSetImmediateId){re.splice(x,1),V.callback();return}}});let ie=0;return se=>{const x=++ie;re.push({id:x,callback:se}),R.postMessage({vscodeSetImmediateId:x},"*")}}if(typeof(q==null?void 0:q.nextTick)=="function")return q.nextTick.bind(q);const W=Promise.resolve();return re=>W.then(re)}(),ke=G||H?2:ve?1:3;let De=!0,Me=!1;function Y(){if(!Me){Me=!0;const B=new Uint8Array(2);B[0]=1,B[1]=2,De=new Uint16Array(B.buffer)[0]===513}return De}},95830:function(ln,ct,b){"use strict";b.d(ct,{G:function(){return oe}});var m=b(23345);const de=m.li.performance&&typeof m.li.performance.now=="function";class oe{constructor(G){this._highResolution=de&&G,this._startTime=this._now(),this._stopTime=-1}static create(G=!0){return new oe(G)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?m.li.performance.now():Date.now()}}},82983:function(ln,ct,b){"use strict";b.d(ct,{$i:function(){return ze},C8:function(){return st},GF:function(){return k},HO:function(){return ie},IO:function(){return S},K7:function(){return Qe},Kw:function(){return qe},LC:function(){return R},Mh:function(){return Se},P1:function(){return ke},PJ:function(){return Kt},Qe:function(){return Xe},R1:function(){return H},RP:function(){return V},S6:function(){return je},TT:function(){return D},Ut:function(){return x},V8:function(){return q},WU:function(){return oe},YK:function(){return Me},YU:function(){return ve},ZG:function(){return De},ZH:function(){return B},ab:function(){return _e},c1:function(){return rt},df:function(){return ue},ec:function(){return G},fi:function(){return Tt},fy:function(){return g},j3:function(){return fe},j_:function(){return M},m5:function(){return m},mK:function(){return F},mr:function(){return w},oH:function(){return ce},oL:function(){return ee},ok:function(){return le},ow:function(){return Q},qq:function(){return he},qu:function(){return K},rL:function(){return Y},uS:function(){return Vt},un:function(){return o},uq:function(){return C},vH:function(){return re},xe:function(){return Ke},zY:function(){return $}});function m(P){return!P||typeof P!="string"?!0:P.trim().length===0}const de=/{(\d+)}/g;function oe(P,...pe){return pe.length===0?P:P.replace(de,function(xe,He){const et=parseInt(He,10);return isNaN(et)||et<0||et>=pe.length?xe:pe[et]})}function ve(P){return P.replace(/[<>&]/g,function(pe){switch(pe){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return pe}})}function G(P){return P.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(P,pe=" "){const xe=fe(P,pe);return ee(xe,pe)}function fe(P,pe){if(!P||!pe)return P;const xe=pe.length;if(xe===0||P.length===0)return P;let He=0;for(;P.indexOf(pe,He)===He;)He=He+xe;return P.substring(He)}function ee(P,pe){if(!P||!pe)return P;const xe=pe.length,He=P.length;if(xe===0||He===0)return P;let et=He,ut=-1;for(;ut=P.lastIndexOf(pe,et-1),!(ut===-1||ut+xe!==et);){if(ut===0)return"";et=ut}return P.substring(0,et)}function o(P){return P.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function H(P){return P.replace(/\*/g,"")}function k(P,pe,xe={}){if(!P)throw new Error("Cannot create regex from empty string");pe||(P=G(P)),xe.wholeWord&&(/\B/.test(P.charAt(0))||(P="\\b"+P),/\B/.test(P.charAt(P.length-1))||(P=P+"\\b"));let He="";return xe.global&&(He+="g"),xe.matchCase||(He+="i"),xe.multiline&&(He+="m"),xe.unicode&&(He+="u"),new RegExp(P,He)}function S(P){return P.source==="^"||P.source==="^$"||P.source==="$"||P.source==="^\\s*$"?!1:!!(P.exec("")&&P.lastIndex===0)}function w(P){return(P.global?"g":"")+(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")}function C(P){return P.split(/\r\n|\r|\n/)}function R(P){for(let pe=0,xe=P.length;pe<xe;pe++){const He=P.charCodeAt(pe);if(He!==32&&He!==9)return pe}return-1}function q(P,pe=0,xe=P.length){for(let He=pe;He<xe;He++){const et=P.charCodeAt(He);if(et!==32&&et!==9)return P.substring(pe,He)}return P.substring(pe,xe)}function Q(P,pe=P.length-1){for(let xe=pe;xe>=0;xe--){const He=P.charCodeAt(xe);if(He!==32&&He!==9)return xe}return-1}function K(P,pe){return P<pe?-1:P>pe?1:0}function D(P,pe,xe=0,He=P.length,et=0,ut=pe.length){for(;xe<He&&et<ut;xe++,et++){let Et=P.charCodeAt(xe),Mt=pe.charCodeAt(et);if(Et<Mt)return-1;if(Et>Mt)return 1}const xt=He-xe,Lt=ut-et;return xt<Lt?-1:xt>Lt?1:0}function $(P,pe){return M(P,pe,0,P.length,0,pe.length)}function M(P,pe,xe=0,He=P.length,et=0,ut=pe.length){for(;xe<He&&et<ut;xe++,et++){let Et=P.charCodeAt(xe),Mt=pe.charCodeAt(et);if(Et===Mt)continue;if(Et>=128||Mt>=128)return D(P.toLowerCase(),pe.toLowerCase(),xe,He,et,ut);F(Et)&&(Et-=32),F(Mt)&&(Mt-=32);const Yt=Et-Mt;if(Yt!==0)return Yt}const xt=He-xe,Lt=ut-et;return xt<Lt?-1:xt>Lt?1:0}function F(P){return P>=97&&P<=122}function ue(P){return P>=65&&P<=90}function he(P,pe){return P.length===pe.length&&M(P,pe)===0}function le(P,pe){const xe=pe.length;return pe.length>P.length?!1:M(P,pe,0,xe)===0}function Se(P,pe){let xe,He=Math.min(P.length,pe.length);for(xe=0;xe<He;xe++)if(P.charCodeAt(xe)!==pe.charCodeAt(xe))return xe;return He}function ke(P,pe){let xe,He=Math.min(P.length,pe.length);const et=P.length-1,ut=pe.length-1;for(xe=0;xe<He;xe++)if(P.charCodeAt(et-xe)!==pe.charCodeAt(ut-xe))return xe;return He}function De(P){return 55296<=P&&P<=56319}function Me(P){return 56320<=P&&P<=57343}function Y(P,pe){return(P-55296<<10)+(pe-56320)+65536}function B(P,pe,xe){const He=P.charCodeAt(xe);if(De(He)&&xe+1<pe){const et=P.charCodeAt(xe+1);if(Me(et))return Y(He,et)}return He}function W(P,pe){const xe=P.charCodeAt(pe-1);if(Me(xe)&&pe>1){const He=P.charCodeAt(pe-2);if(De(He))return Y(He,xe)}return xe}function re(P,pe){const xe=Re.getInstance(),He=pe,et=P.length,ut=B(P,et,pe);pe+=ut>=65536?2:1;let xt=xe.getGraphemeBreakType(ut);for(;pe<et;){const Lt=B(P,et,pe),Et=xe.getGraphemeBreakType(Lt);if(Tt(xt,Et))break;pe+=Lt>=65536?2:1,xt=Et}return pe-He}function ie(P,pe){const xe=Re.getInstance(),He=pe,et=W(P,pe);pe-=et>=65536?2:1;let ut=xe.getGraphemeBreakType(et);for(;pe>0;){const xt=W(P,pe),Lt=xe.getGraphemeBreakType(xt);if(Tt(Lt,ut))break;pe-=xt>=65536?2:1,ut=Lt}return He-pe}const se=/(?:[\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(P){return se.test(P)}const E=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function V(P){return E.test(P)}const me=/^[\t\n\r\x20-\x7E]*$/;function ze(P){return me.test(P)}const Xe=/[\u2028\u2029]/;function _e(P){return Xe.test(P)}function Ke(P){for(let pe=0,xe=P.length;pe<xe;pe++)if(Qe(P.charCodeAt(pe)))return!0;return!1}function Qe(P){return P=+P,P>=11904&&P<=55215||P>=63744&&P<=64255||P>=65281&&P<=65374}function st(P){return P>=127462&&P<=127487||P===8986||P===8987||P===9200||P===9203||P>=9728&&P<=10175||P===11088||P===11093||P>=127744&&P<=128591||P>=128640&&P<=128764||P>=128992&&P<=129003||P>=129280&&P<=129535||P>=129648&&P<=129750}const rt="\uFEFF";function Vt(P){return!!(P&&P.length>0&&P.charCodeAt(0)===65279)}function qe(P,pe=!1){return P?(pe&&(P=P.replace(/\\./g,"")),P.toLowerCase()!==P):!1}function Kt(P){return P=P%(2*26),P<26?String.fromCharCode(97+P):String.fromCharCode(65+P-26)}function je(P){return Re.getInstance().getGraphemeBreakType(P)}function Tt(P,pe){return P===0?pe!==5&&pe!==7:P===2&&pe===3?!1:P===4||P===2||P===3||pe===4||pe===2||pe===3?!0:!(P===8&&(pe===8||pe===9||pe===11||pe===12)||(P===11||P===9)&&(pe===9||pe===10)||(P===12||P===10)&&pe===10||pe===5||pe===13||pe===7||P===1||P===13&&pe===14||P===6&&pe===6)}class Re{constructor(){this._data=Ce()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(pe){if(pe<32)return pe===10?3:pe===13?2:4;if(pe<127)return 0;const xe=this._data,He=xe.length/3;let et=1;for(;et<=He;)if(pe<xe[3*et])et=2*et;else if(pe>xe[3*et+1])et=2*et+1;else return xe[3*et+2];return 0}}Re._INSTANCE=null;function Ce(){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(P,pe){if(P===0)return 0;const xe=Je(P,pe);if(xe!==void 0)return xe;const He=W(pe,P);return P-=Le(He),P}function Je(P,pe){let xe=W(pe,P);for(P-=Le(xe);Ie(xe)||xe===65039||xe===8419;){if(P===0)return;xe=W(pe,P),P-=Le(xe)}if(st(xe)){if(P>=0){const He=W(pe,P);He===8205&&(P-=Le(He))}return P}}function Le(P){return P>=65536?2:1}function Ie(P){return 127995<=P&&P<=127999}},72999:function(ln,ct,b){"use strict";b.d(ct,{$E:function(){return R},$K:function(){return fe},D8:function(){return S},HD:function(){return de},IU:function(){return q},Jp:function(){return ee},Kn:function(){return oe},cW:function(){return H},f6:function(){return Q},hj:function(){return ve},jn:function(){return G},kJ:function(){return m},mf:function(){return k},o8:function(){return g},p_:function(){return o},vE:function(){return K}});function m(D){return Array.isArray(D)}function de(D){return typeof D=="string"}function oe(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&!(D instanceof RegExp)&&!(D instanceof Date)}function ve(D){return typeof D=="number"&&!isNaN(D)}function G(D){return D===!0||D===!1}function g(D){return typeof D=="undefined"}function fe(D){return!ee(D)}function ee(D){return g(D)||D===null}function o(D,$){if(!D)throw new Error($?`Unexpected type, expected '${$}'`:"Unexpected type")}function H(D){if(ee(D))throw new Error("Assertion Failed: argument is undefined or null");return D}function k(D){return typeof D=="function"}function S(D,$){const M=Math.min(D.length,$.length);for(let F=0;F<M;F++)w(D[F],$[F])}function w(D,$){if(de($)){if(typeof D!==$)throw new Error(`argument does not match constraint: typeof ${$}`)}else if(k($)){try{if(D instanceof $)return}catch(M){}if(!ee(D)&&D.constructor===$||$.length===1&&$.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 $=[],M=Object.getPrototypeOf(D);for(;Object.prototype!==M;)$=$.concat(Object.getOwnPropertyNames(M)),M=Object.getPrototypeOf(M);return $}function R(D){const $=[];for(const M of C(D))typeof D[M]=="function"&&$.push(M);return $}function q(D,$){const M=ue=>function(){const he=Array.prototype.slice.call(arguments,0);return $(ue,he)};let F={};for(const ue of D)F[ue]=M(ue);return F}function Q(D){return D===null?void 0:D}function K(D,$="Unreachable"){throw new Error($)}},13268:function(ln,ct,b){"use strict";b.d(ct,{N:function(){return de}});function m(oe,ve){let G;return ve.length===0?G=oe:G=oe.replace(/\{(\d+)\}/g,function(g,fe){const ee=fe[0];return typeof ve[ee]!="undefined"?ve[ee]:g}),G}function de(oe,ve,...G){return m(ve,G)}},96236:function(ln,ct,b){"use strict";b.d(ct,{BH:function(){return q},NZ:function(){return Q},U8:function(){return K},co:function(){return R},eH:function(){return C},vr:function(){return w}});var m=b(75918),de=b(52615),oe=b(4348),ve=b(88226),G=b(69323),g=b(34502),fe=b(35884),ee=b(90689),o=b(16925),H=b(49055),k=function(D,$,M,F){var ue=arguments.length,he=ue<3?$:F===null?F=Object.getOwnPropertyDescriptor($,M):F,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(D,$,M,F);else for(var Se=D.length-1;Se>=0;Se--)(le=D[Se])&&(he=(ue<3?le(he):ue>3?le($,M,he):le($,M))||he);return ue>3&&he&&Object.defineProperty($,M,he),he},S=function(D,$){return function(M,F){$(M,F,D)}};function w(D){return D.command!==void 0}class C{constructor($){this.id=C._idPool++,this._debugName=$}}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 R=(0,o.yh)("menuService"),q=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new oe.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:D=>D===C.CommandPalette}}addCommand(D){return this.addCommands(ve.$.single(D))}addCommands(D){for(const $ of D)this._commands.set($.id,$);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,G.OF)(()=>{let $=!1;for(const M of D)$=this._commands.delete(M.id)||$;$&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(D){return this._commands.get(D)}getCommands(){const D=new Map;return this._commands.forEach(($,M)=>D.set(M,$)),D}appendMenuItem(D,$){return this.appendMenuItems(ve.$.single({id:D,item:$}))}appendMenuItems(D){const $=new Set,M=new g.S;for(const{id:F,item:ue}of D){let he=this._menuItems.get(F);he||(he=new g.S,this._menuItems.set(F,he)),M.push(he.push(ue)),$.add(F)}return this._onDidChangeMenu.fire($),(0,G.OF)(()=>{if(M.size>0){for(let F of M)F();this._onDidChangeMenu.fire($),M.clear()}})}getMenuItems(D){let $;return this._menuItems.has(D)?$=[...this._menuItems.get(D)]:$=[],D===C.CommandPalette&&this._appendImplicitItems($),$}_appendImplicitItems(D){const $=new Set;for(const M of D)w(M)&&($.add(M.command.id),M.alt&&$.add(M.alt.id));this._commands.forEach((M,F)=>{$.has(F)||D.push({command:M})})}};class Q extends m.wY{constructor($,M,F,ue){super(`submenuitem.${$.submenu.id}`,typeof $.title=="string"?$.title:$.title.value,[],"submenu"),this.item=$,this._menuService=M,this._contextKeyService=F,this._options=ue}get actions(){const $=[],M=this._menuService.createMenu(this.item.submenu,this._contextKeyService),F=M.getActions(this._options);M.dispose();for(const[,ue]of F)ue.length>0&&($.push(...ue),$.push(new m.Z0));return $.length&&$.pop(),$}}let K=class Eu{constructor($,M,F,ue,he){var le,Se;if(this._commandService=he,this.id=$.id,this.label=F!=null&&F.renderShortTitle&&$.shortTitle?typeof $.shortTitle=="string"?$.shortTitle:$.shortTitle.value:typeof $.title=="string"?$.title:$.title.value,this.tooltip=(Se=typeof $.tooltip=="string"?$.tooltip:(le=$.tooltip)===null||le===void 0?void 0:le.value)!==null&&Se!==void 0?Se:"",this.enabled=!$.precondition||ue.contextMatchesRules($.precondition),this.checked=void 0,$.toggled){const ke=$.toggled.condition?$.toggled:{condition:$.toggled};this.checked=ue.contextMatchesRules(ke.condition),this.checked&&ke.tooltip&&(this.tooltip=typeof ke.tooltip=="string"?ke.tooltip:ke.tooltip.value),ke.title&&(this.label=typeof ke.title=="string"?ke.title:ke.title.value)}this.item=$,this.alt=M?new Eu(M,void 0,F,ue,he):void 0,this._options=F,H.kS.isThemeIcon($.icon)&&(this.class=de.dT.asClassName($.icon))}dispose(){}run(...$){var M,F;let ue=[];return!((M=this._options)===null||M===void 0)&&M.arg&&(ue=[...ue,this._options.arg]),!((F=this._options)===null||F===void 0)&&F.shouldForwardArgs&&(ue=[...ue,...$]),this._commandService.executeCommand(this.id,...ue)}};K=k([S(3,ee.i6),S(4,fe.H)],K)},35884:function(ln,ct,b){"use strict";b.d(ct,{H:function(){return fe},P:function(){return ee}});var m=b(4348),de=b(88226),oe=b(69323),ve=b(34502),G=b(72999),g=b(16925);const fe=(0,g.yh)("commandService"),ee=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new m.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,H){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!H)throw new Error("invalid command");return this.registerCommand({id:o,handler:H})}if(o.description){const R=[];for(let Q of o.description.args)R.push(Q.constraint);const q=o.handler;o.handler=function(Q,...K){return(0,G.D8)(K,R),q(Q,...K)}}const{id:k}=o;let S=this._commands.get(k);S||(S=new ve.S,this._commands.set(k,S));let w=S.unshift(o),C=(0,oe.OF)(()=>{w();const R=this._commands.get(k);R!=null&&R.isEmpty()&&this._commands.delete(k)});return this._onDidRegisterCommand.fire(k),C}registerCommandAlias(o,H){return ee.registerCommand(o,(k,...S)=>k.get(fe).executeCommand(H,...S))}getCommand(o){const H=this._commands.get(o);if(!(!H||H.isEmpty()))return de.$.first(H)}getCommands(){const o=new Map;for(const H of this._commands.keys()){const k=this.getCommand(H);k&&o.set(H,k)}return o}};ee.registerCommand("noop",()=>{})},90689:function(ln,ct,b){"use strict";b.d(ct,{Ao:function(){return fe},Eq:function(){return Y},Fb:function(){return ee},K8:function(){return re},i6:function(){return Me},uy:function(){return De}});var m=b(23345),de=b(82983),oe=b(16925);let ve=m.WE||"";const G=new Map;G.set("false",!1),G.set("true",!0),G.set("isMac",m.dz),G.set("isLinux",m.IJ),G.set("isWindows",m.ED),G.set("isWeb",m.$L),G.set("isMacNative",m.dz&&!m.$L),G.set("isEdge",ve.indexOf("Edg/")>=0),G.set("isFirefox",ve.indexOf("Firefox")>=0),G.set("isChrome",ve.indexOf("Chrome")>=0),G.set("isSafari",ve.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class fe{static has(x){return S.create(x)}static equals(x,E){return w.create(x,E)}static regex(x,E){return ue.create(x,E)}static not(x){return Q.create(x)}static and(...x){return Se.create(x,null)}static or(...x){return ke.create(x,null,!0)}static deserialize(x,E=!1){if(x)return this._deserializeOrExpression(x,E)}static _deserializeOrExpression(x,E){let V=x.split("||");return ke.create(V.map(me=>this._deserializeAndExpression(me,E)),null,!0)}static _deserializeAndExpression(x,E){let V=x.split("&&");return Se.create(V.map(me=>this._deserializeOne(me,E)),null)}static _deserializeOne(x,E){if(x=x.trim(),x.indexOf("!=")>=0){let V=x.split("!=");return q.create(V[0].trim(),this._deserializeValue(V[1],E))}if(x.indexOf("==")>=0){let V=x.split("==");return w.create(V[0].trim(),this._deserializeValue(V[1],E))}if(x.indexOf("=~")>=0){let V=x.split("=~");return ue.create(V[0].trim(),this._deserializeRegexValue(V[1],E))}if(x.indexOf(" in ")>=0){let V=x.split(" in ");return C.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(x)){const V=x.split(">=");return $.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(x)){const V=x.split(">");return D.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(x)){const V=x.split("<=");return F.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(x)){const V=x.split("<");return M.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(x)?Q.create(x.substr(1).trim()):S.create(x)}static _deserializeValue(x,E){if(x=x.trim(),x==="true")return!0;if(x==="false")return!1;let V=/^'([^']*)'$/.exec(x);return V?V[1].trim():x}static _deserializeRegexValue(x,E){if((0,de.m5)(x)){if(E)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let V=x.indexOf("/"),me=x.lastIndexOf("/");if(V===me||V<0){if(E)throw new Error(`bad regexp-value '${x}', missing /-enclosure`);return console.warn(`bad regexp-value '${x}', missing /-enclosure`),null}let ze=x.slice(V+1,me),Xe=x[me+1]==="i"?"i":"";try{return new RegExp(ze,Xe)}catch(_e){if(E)throw new Error(`bad regexp-value '${x}', parse error: ${_e}`);return console.warn(`bad regexp-value '${x}', parse error: ${_e}`),null}}}function ee(se,x){const E=se?se.substituteConstants():void 0,V=x?x.substituteConstants():void 0;return!E&&!V?!0:!E||!V?!1:E.equals(V)}function o(se,x){return se.cmp(x)}class H{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 k.INSTANCE}}H.INSTANCE=new H;class k{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 H.INSTANCE}}k.INSTANCE=new k;class S{constructor(x,E){this.key=x,this.negated=E,this.type=2}static create(x,E=null){const V=G.get(x);return typeof V=="boolean"?V?k.INSTANCE:H.INSTANCE:new S(x,E)}cmp(x){return x.type!==this.type?this.type-x.type:B(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=G.get(this.key);return typeof x=="boolean"?x?k.INSTANCE:H.INSTANCE:this}evaluate(x){return!!x.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Q.create(this.key,this)),this.negated}}class w{constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=4}static create(x,E,V=null){if(typeof E=="boolean")return E?S.create(x,V):Q.create(x,V);const me=G.get(x);return typeof me=="boolean"?E===(me?"true":"false")?k.INSTANCE:H.INSTANCE:new w(x,E,V)}cmp(x){return x.type!==this.type?this.type-x.type:W(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=G.get(this.key);if(typeof x=="boolean"){const E=x?"true":"false";return this.value===E?k.INSTANCE:H.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=q.create(this.key,this.value,this)),this.negated}}class C{constructor(x,E){this.key=x,this.valueKey=E,this.type=10,this.negated=null}static create(x,E){return new C(x,E)}cmp(x){return x.type!==this.type?this.type-x.type:W(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 E=x.getValue(this.valueKey),V=x.getValue(this.key);return Array.isArray(E)?E.indexOf(V)>=0:typeof V=="string"&&typeof E=="object"&&E!==null?g.call(E,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(x){this._actual=x,this.type=11}static create(x){return new R(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 q{constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=5}static create(x,E,V=null){if(typeof E=="boolean")return E?Q.create(x,V):S.create(x,V);const me=G.get(x);return typeof me=="boolean"?E===(me?"true":"false")?H.INSTANCE:k.INSTANCE:new q(x,E,V)}cmp(x){return x.type!==this.type?this.type-x.type:W(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=G.get(this.key);if(typeof x=="boolean"){const E=x?"true":"false";return this.value===E?H.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=w.create(this.key,this.value,this)),this.negated}}class Q{constructor(x,E){this.key=x,this.negated=E,this.type=3}static create(x,E=null){const V=G.get(x);return typeof V=="boolean"?V?H.INSTANCE:k.INSTANCE:new Q(x,E)}cmp(x){return x.type!==this.type?this.type-x.type:B(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=G.get(this.key);return typeof x=="boolean"?x?H.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=S.create(this.key,this)),this.negated}}function K(se,x){if(typeof se=="string"){const E=parseFloat(se);isNaN(E)||(se=E)}return typeof se=="string"||typeof se=="number"?x(se):H.INSTANCE}class D{constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=12}static create(x,E,V=null){return K(E,me=>new D(x,me,V))}cmp(x){return x.type!==this.type?this.type-x.type:W(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 ${constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=13}static create(x,E,V=null){return K(E,me=>new $(x,me,V))}cmp(x){return x.type!==this.type?this.type-x.type:W(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=M.create(this.key,this.value,this)),this.negated}}class M{constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=14}static create(x,E,V=null){return K(E,me=>new M(x,me,V))}cmp(x){return x.type!==this.type?this.type-x.type:W(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=$.create(this.key,this.value,this)),this.negated}}class F{constructor(x,E,V){this.key=x,this.value=E,this.negated=V,this.type=15}static create(x,E,V=null){return K(E,me=>new F(x,me,V))}cmp(x){return x.type!==this.type?this.type-x.type:W(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 ue{constructor(x,E){this.key=x,this.regexp=E,this.type=7,this.negated=null}static create(x,E){return new ue(x,E)}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 E=this.regexp?this.regexp.source:"",V=x.regexp?x.regexp.source:"";return E<V?-1:E>V?1:0}equals(x){if(x.type===this.type){const E=this.regexp?this.regexp.source:"",V=x.regexp?x.regexp.source:"";return this.key===x.key&&E===V}return!1}substituteConstants(){return this}evaluate(x){let E=x.getValue(this.key);return this.regexp?this.regexp.test(E):!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=he.create(this)),this.negated}}class he{constructor(x){this._actual=x,this.type=8}static create(x){return new he(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 le(se){let x=null;for(let E=0,V=se.length;E<V;E++){const me=se[E].substituteConstants();if(se[E]!==me&&x===null){x=[];for(let ze=0;ze<E;ze++)x[ze]=se[ze]}x!==null&&(x[E]=me)}return x===null?se:x}class Se{constructor(x,E){this.expr=x,this.negated=E,this.type=6}static create(x,E){return Se._normalizeArr(x,E)}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 E=0,V=this.expr.length;E<V;E++){const me=o(this.expr[E],x.expr[E]);if(me!==0)return me}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let E=0,V=this.expr.length;E<V;E++)if(!this.expr[E].equals(x.expr[E]))return!1;return!0}return!1}substituteConstants(){const x=le(this.expr);return x===this.expr?this:Se.create(x,this.negated)}evaluate(x){for(let E=0,V=this.expr.length;E<V;E++)if(!this.expr[E].evaluate(x))return!1;return!0}static _normalizeArr(x,E){const V=[];let me=!1;for(const ze of x)if(ze){if(ze.type===1){me=!0;continue}if(ze.type===0)return H.INSTANCE;if(ze.type===6){V.push(...ze.expr);continue}V.push(ze)}if(V.length===0&&me)return k.INSTANCE;if(V.length!==0){if(V.length===1)return V[0];V.sort(o);for(let ze=1;ze<V.length;ze++)V[ze-1].equals(V[ze])&&(V.splice(ze,1),ze--);if(V.length===1)return V[0];for(;V.length>1;){const ze=V[V.length-1];if(ze.type!==9)break;V.pop();const Xe=V.pop(),_e=V.length===0,Ke=ke.create(ze.expr.map(Qe=>Se.create([Qe,Xe],null)),null,_e);Ke&&(V.push(Ke),V.sort(o))}return V.length===1?V[0]:new Se(V,E)}}serialize(){return this.expr.map(x=>x.serialize()).join(" && ")}keys(){const x=[];for(let E of this.expr)x.push(...E.keys());return x}negate(){if(!this.negated){const x=[];for(let E of this.expr)x.push(E.negate());this.negated=ke.create(x,this,!0)}return this.negated}}class ke{constructor(x,E){this.expr=x,this.negated=E,this.type=9}static create(x,E,V){return ke._normalizeArr(x,E,V)}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 E=0,V=this.expr.length;E<V;E++){const me=o(this.expr[E],x.expr[E]);if(me!==0)return me}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let E=0,V=this.expr.length;E<V;E++)if(!this.expr[E].equals(x.expr[E]))return!1;return!0}return!1}substituteConstants(){const x=le(this.expr);return x===this.expr?this:ke.create(x,this.negated,!1)}evaluate(x){for(let E=0,V=this.expr.length;E<V;E++)if(this.expr[E].evaluate(x))return!0;return!1}static _normalizeArr(x,E,V){let me=[],ze=!1;if(x){for(let Xe=0,_e=x.length;Xe<_e;Xe++){const Ke=x[Xe];if(Ke){if(Ke.type===0){ze=!0;continue}if(Ke.type===1)return k.INSTANCE;if(Ke.type===9){me=me.concat(Ke.expr);continue}me.push(Ke)}}if(me.length===0&&ze)return H.INSTANCE;me.sort(o)}if(me.length!==0){if(me.length===1)return me[0];for(let Xe=1;Xe<me.length;Xe++)me[Xe-1].equals(me[Xe])&&(me.splice(Xe,1),Xe--);if(me.length===1)return me[0];if(V){for(let Xe=0;Xe<me.length;Xe++)for(let _e=Xe+1;_e<me.length;_e++)re(me[Xe],me[_e])&&(me.splice(_e,1),_e--);if(me.length===1)return me[0]}return new ke(me,E)}}serialize(){return this.expr.map(x=>x.serialize()).join(" || ")}keys(){const x=[];for(let E of this.expr)x.push(...E.keys());return x}negate(){if(!this.negated){let x=[];for(let E of this.expr)x.push(E.negate());for(;x.length>1;){const E=x.shift(),V=x.shift(),me=[];for(const Xe of ie(E))for(const _e of ie(V))me.push(Se.create([Xe,_e],null));const ze=x.length===0;x.unshift(ke.create(me,null,ze))}this.negated=x[0]}return this.negated}}class De extends S{constructor(x,E,V){super(x,null),this._defaultValue=E,typeof V=="object"?De._info.push(Object.assign(Object.assign({},V),{key:x})):V!==!0&&De._info.push({key:x,description:V,type:E!=null?typeof E:void 0})}static all(){return De._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 w.create(this.key,x)}}De._info=[];const Me=(0,oe.yh)("contextKeyService"),Y="setContext";function B(se,x){return se<x?-1:se>x?1:0}function W(se,x,E,V){return se<E?-1:se>E?1:x<V?-1:x>V?1:0}function re(se,x){if(x.type===6&&se.type!==9&&se.type!==6){for(const me of x.expr)if(se.equals(me))return!0}const E=se.negate(),V=ie(E).concat(ie(x));V.sort(o);for(let me=0;me<V.length;me++){const Xe=V[me].negate();for(let _e=me+1;_e<V.length;_e++){const Ke=V[_e];if(Xe.equals(Ke))return!0}}return!1}function ie(se){return se.type===9?se.expr:[se]}},16925:function(ln,ct,b){"use strict";b.d(ct,{I8:function(){return m},TG:function(){return de},jt:function(){return G},yh:function(){return ve}});var m;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function fe(ee){return ee[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=fe})(m||(m={}));const de=ve("instantiationService");function oe(g,fe,ee,o){fe[m.DI_TARGET]===fe?fe[m.DI_DEPENDENCIES].push({id:g,index:ee,optional:o}):(fe[m.DI_DEPENDENCIES]=[{id:g,index:ee,optional:o}],fe[m.DI_TARGET]=fe)}function ve(g){if(m.serviceIds.has(g))return m.serviceIds.get(g);const fe=function(ee,o,H){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");oe(fe,ee,H,!1)};return fe.toString=()=>g,m.serviceIds.set(g,fe),fe}function G(g){return function(fe,ee,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");oe(g,fe,o,!0)}}},44650:function(ln,ct,b){"use strict";b.d(ct,{B:function(){return ve}});var m=b(76068),de=b(72999);class oe{constructor(){this.data=new Map}add(g,fe){m.ok(de.HD(g)),m.ok(de.Kn(fe)),m.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,fe)}as(g){return this.data.get(g)||null}}const ve=new oe},66213:function(ln,ct,b){"use strict";b.d(ct,{e:function(){return m}});var m;(function(de){de.DARK="dark",de.LIGHT="light",de.HIGH_CONTRAST="hc"})(m||(m={}))},49055:function(ln,ct,b){"use strict";b.d(ct,{EN:function(){return o},IP:function(){return S},Ic:function(){return R},XE:function(){return fe},bB:function(){return q},kS:function(){return H},m6:function(){return k}});var m=b(52615),de=b(4348),oe=b(69323),ve=b(16925),G=b(44650),g=b(66213);const fe=(0,ve.yh)("themeService");var ee;(function(Q){function K(D){return D&&typeof D=="object"&&typeof D.id=="string"}Q.isThemeColor=K})(ee||(ee={}));function o(Q){return{id:Q}}var H;(function(Q){function K(he){return he&&typeof he=="object"&&typeof he.id=="string"&&(typeof he.color=="undefined"||ee.isThemeColor(he.color))}Q.isThemeIcon=K;const D=new RegExp(`^\\$\\((${m.dT.iconNameExpression}(?:${m.dT.iconModifierExpression})?)\\)$`);function $(he){const le=D.exec(he);if(!le)return;let[,Se]=le;return{id:Se}}Q.fromString=$;function M(he,le){let Se=he.id;const ke=Se.lastIndexOf("~");return ke!==-1&&(Se=Se.substring(0,ke)),le&&(Se=`${Se}~${le}`),{id:Se}}Q.modify=M;function F(he,le){var Se,ke;return he.id===le.id&&((Se=he.color)===null||Se===void 0?void 0:Se.id)===((ke=le.color)===null||ke===void 0?void 0:ke.id)}Q.isEqual=F;function ue(he,le){return{id:he.id,color:le?o(le):void 0}}Q.asThemeIcon=ue,Q.asClassNameArray=m.dT.asClassNameArray,Q.asClassName=m.dT.asClassName,Q.asCSSSelector=m.dT.asCSSSelector})(H||(H={}));function k(Q){switch(Q){case g.e.DARK:return"vs-dark";case g.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const S={ThemingContribution:"base.contributions.theming"};class w{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new de.Q5}onColorThemeChange(K){return this.themingParticipants.push(K),this.onThemingParticipantAddedEmitter.fire(K),(0,oe.OF)(()=>{const D=this.themingParticipants.indexOf(K);this.themingParticipants.splice(D,1)})}getThemingParticipants(){return this.themingParticipants}}let C=new w;G.B.add(S.ThemingContribution,C);function R(Q){return C.onColorThemeChange(Q)}class q extends oe.JT{constructor(K){super(),this.themeService=K,this.theme=K.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(D=>this.onThemeChange(D)))}onThemeChange(K){this.theme=K,this.updateStyles()}updateStyles(){}}},96478:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return he}});var m=b(54476),de=b(20068),oe=b(42978),ve=b(75931),G=b(65030),g=b(92310),fe=b.n(g),ee=b(8654),o=b(59301),H=b(10228),k=b(16089),S=H.Z.ESC,w=H.Z.TAB;function C(le){var Se=le.visible,ke=le.triggerRef,De=le.onVisibleChange,Me=le.autoFocus,Y=le.overlayRef,B=o.useRef(!1),W=function(){if(Se){var x,E;(x=ke.current)===null||x===void 0||(E=x.focus)===null||E===void 0||E.call(x),De==null||De(!1)}},re=function(){var x;return(x=Y.current)!==null&&x!==void 0&&x.focus?(Y.current.focus(),B.current=!0,!0):!1},ie=function(x){switch(x.keyCode){case S:W();break;case w:{var E=!1;B.current||(E=re()),E?x.preventDefault():W();break}}};o.useEffect(function(){return Se?(window.addEventListener("keydown",ie),Me&&(0,k.Z)(re,3),function(){window.removeEventListener("keydown",ie),B.current=!1}):function(){B.current=!1}},[Se])}var R=(0,o.forwardRef)(function(le,Se){var ke=le.overlay,De=le.arrow,Me=le.prefixCls,Y=(0,o.useMemo)(function(){var W;return typeof ke=="function"?W=ke():W=ke,W},[ke]),B=(0,ee.sQ)(Se,(0,ee.C4)(Y));return o.createElement(o.Fragment,null,De&&o.createElement("div",{className:"".concat(Me,"-arrow")}),o.cloneElement(Y,{ref:(0,ee.Yr)(Y)?B:void 0}))}),q=R,Q={adjustX:1,adjustY:1},K=[0,0],D={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-4],targetOffset:K},top:{points:["bc","tc"],overflow:Q,offset:[0,-4],targetOffset:K},topRight:{points:["br","tr"],overflow:Q,offset:[0,-4],targetOffset:K},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,4],targetOffset:K},bottom:{points:["tc","bc"],overflow:Q,offset:[0,4],targetOffset:K},bottomRight:{points:["tr","br"],overflow:Q,offset:[0,4],targetOffset:K}},$=D,M=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function F(le,Se){var ke,De=le.arrow,Me=De===void 0?!1:De,Y=le.prefixCls,B=Y===void 0?"rc-dropdown":Y,W=le.transitionName,re=le.animation,ie=le.align,se=le.placement,x=se===void 0?"bottomLeft":se,E=le.placements,V=E===void 0?$:E,me=le.getPopupContainer,ze=le.showAction,Xe=le.hideAction,_e=le.overlayClassName,Ke=le.overlayStyle,Qe=le.visible,st=le.trigger,rt=st===void 0?["hover"]:st,Vt=le.autoFocus,qe=le.overlay,Kt=le.children,je=le.onVisibleChange,Tt=(0,ve.Z)(le,M),Re=o.useState(),Ce=(0,oe.Z)(Re,2),ce=Ce[0],Je=Ce[1],Le="visible"in le?Qe:ce,Ie=o.useRef(null),P=o.useRef(null),pe=o.useRef(null);o.useImperativeHandle(Se,function(){return Ie.current});var xe=function(jt){Je(jt),je==null||je(jt)};C({visible:Le,triggerRef:pe,onVisibleChange:xe,autoFocus:Vt,overlayRef:P});var He=function(jt){var $t=le.onOverlayClick;Je(!1),$t&&$t(jt)},et=function(){return o.createElement(q,{ref:P,overlay:qe,prefixCls:B,arrow:Me})},ut=function(){return typeof qe=="function"?et:et()},xt=function(){var jt=le.minOverlayWidthMatchTrigger,$t=le.alignPoint;return"minOverlayWidthMatchTrigger"in le?jt:!$t},Lt=function(){var jt=le.openClassName;return jt!==void 0?jt:"".concat(B,"-open")},Et=o.cloneElement(Kt,{className:fe()((ke=Kt.props)===null||ke===void 0?void 0:ke.className,Le&&Lt()),ref:(0,ee.Yr)(Kt)?(0,ee.sQ)(pe,(0,ee.C4)(Kt)):void 0}),Mt=Xe;return!Mt&&rt.indexOf("contextMenu")!==-1&&(Mt=["click"]),o.createElement(G.Z,(0,m.Z)({builtinPlacements:V},Tt,{prefixCls:B,ref:Ie,popupClassName:fe()(_e,(0,de.Z)({},"".concat(B,"-show-arrow"),Me)),popupStyle:Ke,action:rt,showAction:ze,hideAction:Mt,popupPlacement:x,popupAlign:ie,popupTransitionName:W,popupAnimation:re,popupVisible:Le,stretch:xt()?"minWidth":"",popup:ut(),onPopupVisibleChange:xe,onPopupClick:He,getPopupContainer:me}),Et)}var ue=o.forwardRef(F),he=ue},66003:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return fe}});var m=b(75931),de=b(33885),oe=b(76190),ve=b(59301),G=["show"];function g(ee,o){if(!o.max)return!0;var H=o.strategy(ee);return H<=o.max}function fe(ee,o){return ve.useMemo(function(){var H={};o&&(H.show=(0,oe.Z)(o)==="object"&&o.formatter?o.formatter:!!o),H=(0,de.Z)((0,de.Z)({},H),ee);var k=H,S=k.show,w=(0,m.Z)(k,G);return(0,de.Z)((0,de.Z)({},w),{},{show:!!S,showFormatter:typeof S=="function"?S:void 0,strategy:w.strategy||function(C){return C.length}})},[ee,o])}},36901:function(ln,ct,b){"use strict";b.r(ct),b.d(ct,{BaseInput:function(){return H},default:function(){return $}});var m=b(33885),de=b(54476),oe=b(20068),ve=b(76190),G=b(92310),g=b.n(G),fe=b(59301),ee=b(30292),o=fe.forwardRef(function(M,F){var ue,he,le,Se=M.inputElement,ke=M.children,De=M.prefixCls,Me=M.prefix,Y=M.suffix,B=M.addonBefore,W=M.addonAfter,re=M.className,ie=M.style,se=M.disabled,x=M.readOnly,E=M.focused,V=M.triggerFocus,me=M.allowClear,ze=M.value,Xe=M.handleReset,_e=M.hidden,Ke=M.classes,Qe=M.classNames,st=M.dataAttrs,rt=M.styles,Vt=M.components,qe=M.onClear,Kt=ke!=null?ke:Se,je=(Vt==null?void 0:Vt.affixWrapper)||"span",Tt=(Vt==null?void 0:Vt.groupWrapper)||"span",Re=(Vt==null?void 0:Vt.wrapper)||"span",Ce=(Vt==null?void 0:Vt.groupAddon)||"span",ce=(0,fe.useRef)(null),Je=function(It){var Rt;(Rt=ce.current)!==null&&Rt!==void 0&&Rt.contains(It.target)&&(V==null||V())},Le=(0,ee.X3)(M),Ie=(0,fe.cloneElement)(Kt,{value:ze,className:g()((ue=Kt.props)===null||ue===void 0?void 0:ue.className,!Le&&(Qe==null?void 0:Qe.variant))||null}),P=(0,fe.useRef)(null);if(fe.useImperativeHandle(F,function(){return{nativeElement:P.current||ce.current}}),Le){var pe=null;if(me){var xe=!se&&!x&&ze,He="".concat(De,"-clear-icon"),et=(0,ve.Z)(me)==="object"&&me!==null&&me!==void 0&&me.clearIcon?me.clearIcon:"\u2716";pe=fe.createElement("button",{type:"button",tabIndex:-1,onClick:function(It){Xe==null||Xe(It),qe==null||qe()},onMouseDown:function(It){return It.preventDefault()},className:g()(He,(0,oe.Z)((0,oe.Z)({},"".concat(He,"-hidden"),!xe),"".concat(He,"-has-suffix"),!!Y))},et)}var ut="".concat(De,"-affix-wrapper"),xt=g()(ut,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(De,"-disabled"),se),"".concat(ut,"-disabled"),se),"".concat(ut,"-focused"),E),"".concat(ut,"-readonly"),x),"".concat(ut,"-input-with-clear-btn"),Y&&me&&ze),Ke==null?void 0:Ke.affixWrapper,Qe==null?void 0:Qe.affixWrapper,Qe==null?void 0:Qe.variant),Lt=(Y||me)&&fe.createElement("span",{className:g()("".concat(De,"-suffix"),Qe==null?void 0:Qe.suffix),style:rt==null?void 0:rt.suffix},pe,Y);Ie=fe.createElement(je,(0,de.Z)({className:xt,style:rt==null?void 0:rt.affixWrapper,onClick:Je},st==null?void 0:st.affixWrapper,{ref:ce}),Me&&fe.createElement("span",{className:g()("".concat(De,"-prefix"),Qe==null?void 0:Qe.prefix),style:rt==null?void 0:rt.prefix},Me),Ie,Lt)}if((0,ee.He)(M)){var Et="".concat(De,"-group"),Mt="".concat(Et,"-addon"),Yt="".concat(Et,"-wrapper"),jt=g()("".concat(De,"-wrapper"),Et,Ke==null?void 0:Ke.wrapper,Qe==null?void 0:Qe.wrapper),$t=g()(Yt,(0,oe.Z)({},"".concat(Yt,"-disabled"),se),Ke==null?void 0:Ke.group,Qe==null?void 0:Qe.groupWrapper);Ie=fe.createElement(Tt,{className:$t,ref:P},fe.createElement(Re,{className:jt},B&&fe.createElement(Ce,{className:Mt},B),Ie,W&&fe.createElement(Ce,{className:Mt},W)))}return fe.cloneElement(Ie,{className:g()((he=Ie.props)===null||he===void 0?void 0:he.className,re)||null,style:(0,m.Z)((0,m.Z)({},(le=Ie.props)===null||le===void 0?void 0:le.style),ie),hidden:_e})}),H=o,k=b(94480),S=b(42978),w=b(75931),C=b(18929),R=b(2738),q=b(66003),Q=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],K=(0,fe.forwardRef)(function(M,F){var ue=M.autoComplete,he=M.onChange,le=M.onFocus,Se=M.onBlur,ke=M.onPressEnter,De=M.onKeyDown,Me=M.onKeyUp,Y=M.prefixCls,B=Y===void 0?"rc-input":Y,W=M.disabled,re=M.htmlSize,ie=M.className,se=M.maxLength,x=M.suffix,E=M.showCount,V=M.count,me=M.type,ze=me===void 0?"text":me,Xe=M.classes,_e=M.classNames,Ke=M.styles,Qe=M.onCompositionStart,st=M.onCompositionEnd,rt=(0,w.Z)(M,Q),Vt=(0,fe.useState)(!1),qe=(0,S.Z)(Vt,2),Kt=qe[0],je=qe[1],Tt=(0,fe.useRef)(!1),Re=(0,fe.useRef)(!1),Ce=(0,fe.useRef)(null),ce=(0,fe.useRef)(null),Je=function(St){Ce.current&&(0,ee.nH)(Ce.current,St)},Le=(0,C.Z)(M.defaultValue,{value:M.value}),Ie=(0,S.Z)(Le,2),P=Ie[0],pe=Ie[1],xe=P==null?"":String(P),He=(0,fe.useState)(null),et=(0,S.Z)(He,2),ut=et[0],xt=et[1],Lt=(0,q.Z)(V,E),Et=Lt.max||se,Mt=Lt.strategy(xe),Yt=!!Et&&Mt>Et;(0,fe.useImperativeHandle)(F,function(){var ae;return{focus:Je,blur:function(){var Ee;(Ee=Ce.current)===null||Ee===void 0||Ee.blur()},setSelectionRange:function(Ee,$e,Ge){var Z;(Z=Ce.current)===null||Z===void 0||Z.setSelectionRange(Ee,$e,Ge)},select:function(){var Ee;(Ee=Ce.current)===null||Ee===void 0||Ee.select()},input:Ce.current,nativeElement:((ae=ce.current)===null||ae===void 0?void 0:ae.nativeElement)||Ce.current}}),(0,fe.useEffect)(function(){Re.current&&(Re.current=!1),je(function(ae){return ae&&W?!1:ae})},[W]);var jt=function(St,Ee,$e){var Ge=Ee;if(!Tt.current&&Lt.exceedFormatter&&Lt.max&&Lt.strategy(Ee)>Lt.max){if(Ge=Lt.exceedFormatter(Ee,{max:Lt.max}),Ee!==Ge){var Z,J;xt([((Z=Ce.current)===null||Z===void 0?void 0:Z.selectionStart)||0,((J=Ce.current)===null||J===void 0?void 0:J.selectionEnd)||0])}}else if($e.source==="compositionEnd")return;pe(Ge),Ce.current&&(0,ee.rJ)(Ce.current,St,he,Ge)};(0,fe.useEffect)(function(){if(ut){var ae;(ae=Ce.current)===null||ae===void 0||ae.setSelectionRange.apply(ae,(0,k.Z)(ut))}},[ut]);var $t=function(St){jt(St,St.target.value,{source:"change"})},it=function(St){Tt.current=!1,jt(St,St.currentTarget.value,{source:"compositionEnd"}),st==null||st(St)},It=function(St){ke&&St.key==="Enter"&&!Re.current&&(Re.current=!0,ke(St)),De==null||De(St)},Rt=function(St){St.key==="Enter"&&(Re.current=!1),Me==null||Me(St)},ye=function(St){je(!0),le==null||le(St)},Ve=function(St){Re.current&&(Re.current=!1),je(!1),Se==null||Se(St)},_=function(St){pe(""),Je(),Ce.current&&(0,ee.rJ)(Ce.current,St,he)},A=Yt&&"".concat(B,"-out-of-range"),Oe=function(){var St=(0,R.Z)(M,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return fe.createElement("input",(0,de.Z)({autoComplete:ue},St,{onChange:$t,onFocus:ye,onBlur:Ve,onKeyDown:It,onKeyUp:Rt,className:g()(B,(0,oe.Z)({},"".concat(B,"-disabled"),W),_e==null?void 0:_e.input),style:Ke==null?void 0:Ke.input,ref:Ce,size:re,type:ze,onCompositionStart:function($e){Tt.current=!0,Qe==null||Qe($e)},onCompositionEnd:it}))},N=function(){var St=Number(Et)>0;if(x||Lt.show){var Ee=Lt.showFormatter?Lt.showFormatter({value:xe,count:Mt,maxLength:Et}):"".concat(Mt).concat(St?" / ".concat(Et):"");return fe.createElement(fe.Fragment,null,Lt.show&&fe.createElement("span",{className:g()("".concat(B,"-show-count-suffix"),(0,oe.Z)({},"".concat(B,"-show-count-has-suffix"),!!x),_e==null?void 0:_e.count),style:(0,m.Z)({},Ke==null?void 0:Ke.count)},Ee),x)}return null};return fe.createElement(H,(0,de.Z)({},rt,{prefixCls:B,className:g()(ie,A),handleReset:_,value:xe,focused:Kt,triggerFocus:Je,suffix:N(),disabled:W,classes:Xe,classNames:_e,styles:Ke}),Oe())}),D=K,$=D},30292:function(ln,ct,b){"use strict";b.d(ct,{He:function(){return m},X3:function(){return de},nH:function(){return G},rJ:function(){return ve}});function m(g){return!!(g.addonBefore||g.addonAfter)}function de(g){return!!(g.prefix||g.suffix||g.allowClear)}function oe(g,fe,ee){var o=fe.cloneNode(!0),H=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=ee,typeof fe.selectionStart=="number"&&typeof fe.selectionEnd=="number"&&(o.selectionStart=fe.selectionStart,o.selectionEnd=fe.selectionEnd),o.setSelectionRange=function(){fe.setSelectionRange.apply(fe,arguments)},H}function ve(g,fe,ee,o){if(ee){var H=fe;if(fe.type==="click"){H=oe(fe,g,""),ee(H);return}if(g.type!=="file"&&o!==void 0){H=oe(fe,g,o),ee(H);return}ee(H)}}function G(g,fe){if(g){g.focus(fe);var ee=fe||{},o=ee.cursor;if(o){var H=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(H,H);break;default:g.setSelectionRange(0,H)}}}}},28321:function(ln,ct,b){"use strict";b.d(ct,{iz:function(){return An},ck:function(){return Ge},BW:function(){return wt},sN:function(){return Ge},Wd:function(){return an},ZP:function(){return _t},Xl:function(){return ke}});var m=b(54476),de=b(20068),oe=b(33885),ve=b(94480),G=b(42978),g=b(75931),fe=b(92310),ee=b.n(fe),o=b(83836),H=b(18929),k=b(13697),S=b(48736),w=b(59301),C=b(4676),R=w.createContext(null);function q(We,nt){return We===void 0?null:"".concat(We,"-").concat(nt)}function Q(We){var nt=w.useContext(R);return q(nt,We)}var K=b(80547),D=["children","locked"],$=w.createContext(null);function M(We,nt){var Ct=(0,oe.Z)({},We);return Object.keys(nt).forEach(function(ot){var dt=nt[ot];dt!==void 0&&(Ct[ot]=dt)}),Ct}function F(We){var nt=We.children,Ct=We.locked,ot=(0,g.Z)(We,D),dt=w.useContext($),kt=(0,K.Z)(function(){return M(dt,ot)},[dt,ot],function(Gt,Ht){return!Ct&&(Gt[0]!==Ht[0]||!(0,k.Z)(Gt[1],Ht[1],!0))});return w.createElement($.Provider,{value:kt},nt)}var ue=[],he=w.createContext(null);function le(){return w.useContext(he)}var Se=w.createContext(ue);function ke(We){var nt=w.useContext(Se);return w.useMemo(function(){return We!==void 0?[].concat((0,ve.Z)(nt),[We]):nt},[nt,We])}var De=w.createContext(null),Me=w.createContext({}),Y=Me,B=b(29194);function W(We){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,B.Z)(We)){var Ct=We.nodeName.toLowerCase(),ot=["input","select","textarea","button"].includes(Ct)||We.isContentEditable||Ct==="a"&&!!We.getAttribute("href"),dt=We.getAttribute("tabindex"),kt=Number(dt),Gt=null;return dt&&!Number.isNaN(kt)?Gt=kt:ot&&Gt===null&&(Gt=0),ot&&We.disabled&&(Gt=null),Gt!==null&&(Gt>=0||nt&&Gt<0)}return!1}function re(We){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=(0,ve.Z)(We.querySelectorAll("*")).filter(function(ot){return W(ot,nt)});return W(We,nt)&&Ct.unshift(We),Ct}var ie=null;function se(){ie=document.activeElement}function x(){ie=null}function E(){if(ie)try{ie.focus()}catch(We){}}function V(We,nt){if(nt.keyCode===9){var Ct=re(We),ot=Ct[nt.shiftKey?0:Ct.length-1],dt=ot===document.activeElement||We===document.activeElement;if(dt){var kt=Ct[nt.shiftKey?Ct.length-1:0];kt.focus(),nt.preventDefault()}}}var me=b(10228),ze=b(16089),Xe=me.Z.LEFT,_e=me.Z.RIGHT,Ke=me.Z.UP,Qe=me.Z.DOWN,st=me.Z.ENTER,rt=me.Z.ESC,Vt=me.Z.HOME,qe=me.Z.END,Kt=[Ke,Qe,Xe,_e];function je(We,nt,Ct,ot){var dt,kt="prev",Gt="next",Ht="children",hn="parent";if(We==="inline"&&ot===st)return{inlineTrigger:!0};var cn=(0,de.Z)((0,de.Z)({},Ke,kt),Qe,Gt),En=(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},Xe,Ct?Gt:kt),_e,Ct?kt:Gt),Qe,Ht),st,Ht),vn=(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},Ke,kt),Qe,Gt),st,Ht),rt,hn),Xe,Ct?Ht:hn),_e,Ct?hn:Ht),on={inline:cn,horizontal:En,vertical:vn,inlineSub:cn,horizontalSub:vn,verticalSub:vn},tn=(dt=on["".concat(We).concat(nt?"":"Sub")])===null||dt===void 0?void 0:dt[ot];switch(tn){case kt:return{offset:-1,sibling:!0};case Gt:return{offset:1,sibling:!0};case hn:return{offset:-1,sibling:!1};case Ht:return{offset:1,sibling:!1};default:return null}}function Tt(We){for(var nt=We;nt;){if(nt.getAttribute("data-menu-list"))return nt;nt=nt.parentElement}return null}function Re(We,nt){for(var Ct=We||document.activeElement;Ct;){if(nt.has(Ct))return Ct;Ct=Ct.parentElement}return null}function Ce(We,nt){var Ct=re(We,!0);return Ct.filter(function(ot){return nt.has(ot)})}function ce(We,nt,Ct){var ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!We)return null;var dt=Ce(We,nt),kt=dt.length,Gt=dt.findIndex(function(Ht){return Ct===Ht});return ot<0?Gt===-1?Gt=kt-1:Gt-=1:ot>0&&(Gt+=1),Gt=(Gt+kt)%kt,dt[Gt]}var Je=function(nt,Ct){var ot=new Set,dt=new Map,kt=new Map;return nt.forEach(function(Gt){var Ht=document.querySelector("[data-menu-id='".concat(q(Ct,Gt),"']"));Ht&&(ot.add(Ht),kt.set(Ht,Gt),dt.set(Gt,Ht))}),{elements:ot,key2element:dt,element2key:kt}};function Le(We,nt,Ct,ot,dt,kt,Gt,Ht,hn,cn){var En=w.useRef(),vn=w.useRef();vn.current=nt;var on=function(){ze.Z.cancel(En.current)};return w.useEffect(function(){return function(){on()}},[]),function(tn){var Tn=tn.which;if([].concat(Kt,[st,rt,Vt,qe]).includes(Tn)){var Sn=kt(),bn=Je(Sn,ot),Pn=bn,Hn=Pn.elements,Bn=Pn.key2element,jn=Pn.element2key,Wn=Bn.get(nt),nr=Re(Wn,Hn),Nn=jn.get(nr),fr=je(We,Gt(Nn,!0).length===1,Ct,Tn);if(!fr&&Tn!==Vt&&Tn!==qe)return;(Kt.includes(Tn)||[Vt,qe].includes(Tn))&&tn.preventDefault();var pt=function(Mn){if(Mn){var ar=Mn,Kn=Mn.querySelector("a");Kn!=null&&Kn.getAttribute("href")&&(ar=Kn);var er=jn.get(Mn);Ht(er),on(),En.current=(0,ze.Z)(function(){vn.current===er&&ar.focus()})}};if([Vt,qe].includes(Tn)||fr.sibling||!nr){var kn;!nr||We==="inline"?kn=dt.current:kn=Tt(nr);var sr,xr=Ce(kn,Hn);Tn===Vt?sr=xr[0]:Tn===qe?sr=xr[xr.length-1]:sr=ce(kn,Hn,nr,fr.offset),pt(sr)}else if(fr.inlineTrigger)hn(Nn);else if(fr.offset>0)hn(Nn,!0),on(),En.current=(0,ze.Z)(function(){bn=Je(Sn,ot);var gn=nr.getAttribute("aria-controls"),Mn=document.getElementById(gn),ar=ce(Mn,bn.elements);pt(ar)},5);else if(fr.offset<0){var _r=Gt(Nn,!0),br=_r[_r.length-2],Rn=Bn.get(br);hn(br,!1),pt(Rn)}}cn==null||cn(tn)}}function Ie(We){Promise.resolve().then(We)}var P="__RC_UTIL_PATH_SPLIT__",pe=function(nt){return nt.join(P)},xe=function(nt){return nt.split(P)},He="rc-menu-more";function et(){var We=w.useState({}),nt=(0,G.Z)(We,2),Ct=nt[1],ot=(0,w.useRef)(new Map),dt=(0,w.useRef)(new Map),kt=w.useState([]),Gt=(0,G.Z)(kt,2),Ht=Gt[0],hn=Gt[1],cn=(0,w.useRef)(0),En=(0,w.useRef)(!1),vn=function(){En.current||Ct({})},on=(0,w.useCallback)(function(Bn,jn){var Wn=pe(jn);dt.current.set(Wn,Bn),ot.current.set(Bn,Wn),cn.current+=1;var nr=cn.current;Ie(function(){nr===cn.current&&vn()})},[]),tn=(0,w.useCallback)(function(Bn,jn){var Wn=pe(jn);dt.current.delete(Wn),ot.current.delete(Bn)},[]),Tn=(0,w.useCallback)(function(Bn){hn(Bn)},[]),Sn=(0,w.useCallback)(function(Bn,jn){var Wn=ot.current.get(Bn)||"",nr=xe(Wn);return jn&&Ht.includes(nr[0])&&nr.unshift(He),nr},[Ht]),bn=(0,w.useCallback)(function(Bn,jn){return Bn.filter(function(Wn){return Wn!==void 0}).some(function(Wn){var nr=Sn(Wn,!0);return nr.includes(jn)})},[Sn]),Pn=function(){var jn=(0,ve.Z)(ot.current.keys());return Ht.length&&jn.push(He),jn},Hn=(0,w.useCallback)(function(Bn){var jn="".concat(ot.current.get(Bn)).concat(P),Wn=new Set;return(0,ve.Z)(dt.current.keys()).forEach(function(nr){nr.startsWith(jn)&&Wn.add(dt.current.get(nr))}),Wn},[]);return w.useEffect(function(){return function(){En.current=!0}},[]),{registerPath:on,unregisterPath:tn,refreshOverflowKeys:Tn,isSubPathKey:bn,getKeyPath:Sn,getKeys:Pn,getSubPathKeys:Hn}}function ut(We){var nt=w.useRef(We);nt.current=We;var Ct=w.useCallback(function(){for(var ot,dt=arguments.length,kt=new Array(dt),Gt=0;Gt<dt;Gt++)kt[Gt]=arguments[Gt];return(ot=nt.current)===null||ot===void 0?void 0:ot.call.apply(ot,[nt].concat(kt))},[]);return We?Ct:void 0}var xt=Math.random().toFixed(5).toString().slice(2),Lt=0;function Et(We){var nt=(0,H.Z)(We,{value:We}),Ct=(0,G.Z)(nt,2),ot=Ct[0],dt=Ct[1];return w.useEffect(function(){Lt+=1;var kt="".concat(xt,"-").concat(Lt);dt("rc-menu-uuid-".concat(kt))},[]),ot}var Mt=b(67732),Yt=b(83652),jt=b(42403),$t=b(158),it=b(2738),It=b(8654);function Rt(We,nt,Ct,ot){var dt=w.useContext($),kt=dt.activeKey,Gt=dt.onActive,Ht=dt.onInactive,hn={active:kt===We};return nt||(hn.onMouseEnter=function(cn){Ct==null||Ct({key:We,domEvent:cn}),Gt(We)},hn.onMouseLeave=function(cn){ot==null||ot({key:We,domEvent:cn}),Ht(We)}),hn}function ye(We){var nt=w.useContext($),Ct=nt.mode,ot=nt.rtl,dt=nt.inlineIndent;if(Ct!=="inline")return null;var kt=We;return ot?{paddingRight:kt*dt}:{paddingLeft:kt*dt}}function Ve(We){var nt=We.icon,Ct=We.props,ot=We.children,dt;return nt===null||nt===!1?null:(typeof nt=="function"?dt=w.createElement(nt,(0,oe.Z)({},Ct)):typeof nt!="boolean"&&(dt=nt),dt||ot||null)}var _=["item"];function A(We){var nt=We.item,Ct=(0,g.Z)(We,_);return Object.defineProperty(Ct,"item",{get:function(){return(0,S.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),nt}}),Ct}var Oe=["title","attribute","elementRef"],N=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ae=["active"],St=function(We){(0,jt.Z)(Ct,We);var nt=(0,$t.Z)(Ct);function Ct(){return(0,Mt.Z)(this,Ct),nt.apply(this,arguments)}return(0,Yt.Z)(Ct,[{key:"render",value:function(){var dt=this.props,kt=dt.title,Gt=dt.attribute,Ht=dt.elementRef,hn=(0,g.Z)(dt,Oe),cn=(0,it.Z)(hn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,S.ZP)(!Gt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),w.createElement(o.Z.Item,(0,m.Z)({},Gt,{title:typeof kt=="string"?kt:void 0},cn,{ref:Ht}))}}]),Ct}(w.Component),Ee=w.forwardRef(function(We,nt){var Ct=We.style,ot=We.className,dt=We.eventKey,kt=We.warnKey,Gt=We.disabled,Ht=We.itemIcon,hn=We.children,cn=We.role,En=We.onMouseEnter,vn=We.onMouseLeave,on=We.onClick,tn=We.onKeyDown,Tn=We.onFocus,Sn=(0,g.Z)(We,N),bn=Q(dt),Pn=w.useContext($),Hn=Pn.prefixCls,Bn=Pn.onItemClick,jn=Pn.disabled,Wn=Pn.overflowDisabled,nr=Pn.itemIcon,Nn=Pn.selectedKeys,fr=Pn.onActive,pt=w.useContext(Y),kn=pt._internalRenderMenuItem,sr="".concat(Hn,"-item"),xr=w.useRef(),_r=w.useRef(),br=jn||Gt,Rn=(0,It.x1)(nt,_r),gn=ke(dt),Mn=function(kr){return{key:dt,keyPath:(0,ve.Z)(gn).reverse(),item:xr.current,domEvent:kr}},ar=Ht||nr,Kn=Rt(dt,br,En,vn),er=Kn.active,Pr=(0,g.Z)(Kn,ae),Dr=Nn.includes(dt),Er=ye(gn.length),_n=function(kr){if(!br){var Zr=Mn(kr);on==null||on(A(Zr)),Bn(Zr)}},Gn=function(kr){if(tn==null||tn(kr),kr.which===me.Z.ENTER){var Zr=Mn(kr);on==null||on(A(Zr)),Bn(Zr)}},qn=function(kr){fr(dt),Tn==null||Tn(kr)},wr={};We.role==="option"&&(wr["aria-selected"]=Dr);var qr=w.createElement(St,(0,m.Z)({ref:xr,elementRef:Rn,role:cn===null?"none":cn||"menuitem",tabIndex:Gt?null:-1,"data-menu-id":Wn&&bn?null:bn},(0,it.Z)(Sn,["extra"]),Pr,wr,{component:"li","aria-disabled":Gt,style:(0,oe.Z)((0,oe.Z)({},Er),Ct),className:ee()(sr,(0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(sr,"-active"),er),"".concat(sr,"-selected"),Dr),"".concat(sr,"-disabled"),br),ot),onClick:_n,onKeyDown:Gn,onFocus:qn}),hn,w.createElement(Ve,{props:(0,oe.Z)((0,oe.Z)({},We),{},{isSelected:Dr}),icon:ar}));return kn&&(qr=kn(qr,We,{selected:Dr})),qr});function $e(We,nt){var Ct=We.eventKey,ot=le(),dt=ke(Ct);return w.useEffect(function(){if(ot)return ot.registerPath(Ct,dt),function(){ot.unregisterPath(Ct,dt)}},[dt]),ot?null:w.createElement(Ee,(0,m.Z)({},We,{ref:nt}))}var Ge=w.forwardRef($e),Z=["className","children"],J=function(nt,Ct){var ot=nt.className,dt=nt.children,kt=(0,g.Z)(nt,Z),Gt=w.useContext($),Ht=Gt.prefixCls,hn=Gt.mode,cn=Gt.rtl;return w.createElement("ul",(0,m.Z)({className:ee()(Ht,cn&&"".concat(Ht,"-rtl"),"".concat(Ht,"-sub"),"".concat(Ht,"-").concat(hn==="inline"?"inline":"vertical"),ot),role:"menu"},kt,{"data-menu-list":!0,ref:Ct}),dt)},be=w.forwardRef(J);be.displayName="SubMenuList";var Pe=be,j=b(11592);function Ye(We,nt){return(0,j.Z)(We).map(function(Ct,ot){if(w.isValidElement(Ct)){var dt,kt,Gt=Ct.key,Ht=(dt=(kt=Ct.props)===null||kt===void 0?void 0:kt.eventKey)!==null&&dt!==void 0?dt:Gt,hn=Ht==null;hn&&(Ht="tmp_key-".concat([].concat((0,ve.Z)(nt),[ot]).join("-")));var cn={key:Ht,eventKey:Ht};return w.cloneElement(Ct,cn)}return Ct})}var X=b(65030),tt={adjustX:1,adjustY:1},Ot={topLeft:{points:["bl","tl"],overflow:tt},topRight:{points:["br","tr"],overflow:tt},bottomLeft:{points:["tl","bl"],overflow:tt},bottomRight:{points:["tr","br"],overflow:tt},leftTop:{points:["tr","tl"],overflow:tt},leftBottom:{points:["br","bl"],overflow:tt},rightTop:{points:["tl","tr"],overflow:tt},rightBottom:{points:["bl","br"],overflow:tt}},Xt={topLeft:{points:["bl","tl"],overflow:tt},topRight:{points:["br","tr"],overflow:tt},bottomLeft:{points:["tl","bl"],overflow:tt},bottomRight:{points:["tr","br"],overflow:tt},rightTop:{points:["tr","tl"],overflow:tt},rightBottom:{points:["br","bl"],overflow:tt},leftTop:{points:["tl","tr"],overflow:tt},leftBottom:{points:["bl","br"],overflow:tt}},pn=null;function qt(We,nt,Ct){if(nt)return nt;if(Ct)return Ct[We]||Ct.other}var nn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function xn(We){var nt=We.prefixCls,Ct=We.visible,ot=We.children,dt=We.popup,kt=We.popupStyle,Gt=We.popupClassName,Ht=We.popupOffset,hn=We.disabled,cn=We.mode,En=We.onVisibleChange,vn=w.useContext($),on=vn.getPopupContainer,tn=vn.rtl,Tn=vn.subMenuOpenDelay,Sn=vn.subMenuCloseDelay,bn=vn.builtinPlacements,Pn=vn.triggerSubMenuAction,Hn=vn.forceSubMenuRender,Bn=vn.rootClassName,jn=vn.motion,Wn=vn.defaultMotions,nr=w.useState(!1),Nn=(0,G.Z)(nr,2),fr=Nn[0],pt=Nn[1],kn=tn?(0,oe.Z)((0,oe.Z)({},Xt),bn):(0,oe.Z)((0,oe.Z)({},Ot),bn),sr=nn[cn],xr=qt(cn,jn,Wn),_r=w.useRef(xr);cn!=="inline"&&(_r.current=xr);var br=(0,oe.Z)((0,oe.Z)({},_r.current),{},{leavedClassName:"".concat(nt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Rn=w.useRef();return w.useEffect(function(){return Rn.current=(0,ze.Z)(function(){pt(Ct)}),function(){ze.Z.cancel(Rn.current)}},[Ct]),w.createElement(X.Z,{prefixCls:nt,popupClassName:ee()("".concat(nt,"-popup"),(0,de.Z)({},"".concat(nt,"-rtl"),tn),Gt,Bn),stretch:cn==="horizontal"?"minWidth":null,getPopupContainer:on,builtinPlacements:kn,popupPlacement:sr,popupVisible:fr,popup:dt,popupStyle:kt,popupAlign:Ht&&{offset:Ht},action:hn?[]:[Pn],mouseEnterDelay:Tn,mouseLeaveDelay:Sn,onPopupVisibleChange:En,forceRender:Hn,popupMotion:br,fresh:!0},ot)}var Un=b(77900);function un(We){var nt=We.id,Ct=We.open,ot=We.keyPath,dt=We.children,kt="inline",Gt=w.useContext($),Ht=Gt.prefixCls,hn=Gt.forceSubMenuRender,cn=Gt.motion,En=Gt.defaultMotions,vn=Gt.mode,on=w.useRef(!1);on.current=vn===kt;var tn=w.useState(!on.current),Tn=(0,G.Z)(tn,2),Sn=Tn[0],bn=Tn[1],Pn=on.current?Ct:!1;w.useEffect(function(){on.current&&bn(!1)},[vn]);var Hn=(0,oe.Z)({},qt(kt,cn,En));ot.length>1&&(Hn.motionAppear=!1);var Bn=Hn.onVisibleChanged;return Hn.onVisibleChanged=function(jn){return!on.current&&!jn&&bn(!0),Bn==null?void 0:Bn(jn)},Sn?null:w.createElement(F,{mode:kt,locked:!on.current},w.createElement(Un.default,(0,m.Z)({visible:Pn},Hn,{forceRender:hn,removeOnLeave:!1,leavedClassName:"".concat(Ht,"-hidden")}),function(jn){var Wn=jn.className,nr=jn.style;return w.createElement(Pe,{id:nt,className:Wn,style:nr},dt)}))}var On=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],en=["active"],Ut=w.forwardRef(function(We,nt){var Ct=We.style,ot=We.className,dt=We.title,kt=We.eventKey,Gt=We.warnKey,Ht=We.disabled,hn=We.internalPopupClose,cn=We.children,En=We.itemIcon,vn=We.expandIcon,on=We.popupClassName,tn=We.popupOffset,Tn=We.popupStyle,Sn=We.onClick,bn=We.onMouseEnter,Pn=We.onMouseLeave,Hn=We.onTitleClick,Bn=We.onTitleMouseEnter,jn=We.onTitleMouseLeave,Wn=(0,g.Z)(We,On),nr=Q(kt),Nn=w.useContext($),fr=Nn.prefixCls,pt=Nn.mode,kn=Nn.openKeys,sr=Nn.disabled,xr=Nn.overflowDisabled,_r=Nn.activeKey,br=Nn.selectedKeys,Rn=Nn.itemIcon,gn=Nn.expandIcon,Mn=Nn.onItemClick,ar=Nn.onOpenChange,Kn=Nn.onActive,er=w.useContext(Y),Pr=er._internalRenderSubMenuItem,Dr=w.useContext(De),Er=Dr.isSubPathKey,_n=ke(),Gn="".concat(fr,"-submenu"),qn=sr||Ht,wr=w.useRef(),qr=w.useRef(),Yr=En!=null?En:Rn,kr=vn!=null?vn:gn,Zr=kn.includes(kt),Sr=!xr&&Zr,ei=Er(br,kt),$r=Rt(kt,qn,Bn,jn),jr=$r.active,ai=(0,g.Z)($r,en),oi=w.useState(!1),cr=(0,G.Z)(oi,2),ci=cr[0],di=cr[1],ti=function(li){qn||di(li)},Hr=function(li){ti(!0),bn==null||bn({key:kt,domEvent:li})},rr=function(li){ti(!1),Pn==null||Pn({key:kt,domEvent:li})},Ei=w.useMemo(function(){return jr||(pt!=="inline"?ci||Er([_r],kt):!1)},[pt,jr,_r,ci,kt,Er]),mn=ye(_n.length),Xn=function(li){qn||(Hn==null||Hn({key:kt,domEvent:li}),pt==="inline"&&ar(kt,!Zr))},vr=ut(function(Kr){Sn==null||Sn(A(Kr)),Mn(Kr)}),Cr=function(li){pt!=="inline"&&ar(kt,li)},ur=function(){Kn(kt)},pr=nr&&"".concat(nr,"-popup"),Fn=w.useMemo(function(){return w.createElement(Ve,{icon:pt!=="horizontal"?kr:void 0,props:(0,oe.Z)((0,oe.Z)({},We),{},{isOpen:Sr,isSubMenu:!0})},w.createElement("i",{className:"".concat(Gn,"-arrow")}))},[pt,kr,We,Sr,Gn]),Fr=w.createElement("div",(0,m.Z)({role:"menuitem",style:mn,className:"".concat(Gn,"-title"),tabIndex:qn?null:-1,ref:wr,title:typeof dt=="string"?dt:null,"data-menu-id":xr&&nr?null:nr,"aria-expanded":Sr,"aria-haspopup":!0,"aria-controls":pr,"aria-disabled":qn,onClick:Xn,onFocus:ur},ai),dt,Fn),Jr=w.useRef(pt);if(pt!=="inline"&&_n.length>1?Jr.current="vertical":Jr.current=pt,!xr){var ni=Jr.current;Fr=w.createElement(xn,{mode:ni,prefixCls:Gn,visible:!hn&&Sr&&pt!=="inline",popupClassName:on,popupOffset:tn,popupStyle:Tn,popup:w.createElement(F,{mode:ni==="horizontal"?"vertical":ni},w.createElement(Pe,{id:pr,ref:qr},cn)),disabled:qn,onVisibleChange:Cr},Fr)}var Xr=w.createElement(o.Z.Item,(0,m.Z)({ref:nt,role:"none"},Wn,{component:"li",style:Ct,className:ee()(Gn,"".concat(Gn,"-").concat(pt),ot,(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(Gn,"-open"),Sr),"".concat(Gn,"-active"),Ei),"".concat(Gn,"-selected"),ei),"".concat(Gn,"-disabled"),qn)),onMouseEnter:Hr,onMouseLeave:rr}),Fr,!xr&&w.createElement(un,{id:pr,open:Sr,keyPath:_n},cn));return Pr&&(Xr=Pr(Xr,We,{selected:ei,active:Ei,open:Sr,disabled:qn})),w.createElement(F,{onItemClick:vr,mode:pt==="horizontal"?"vertical":pt,itemIcon:Yr,expandIcon:kr},Xr)}),Pt=w.forwardRef(function(We,nt){var Ct=We.eventKey,ot=We.children,dt=ke(Ct),kt=Ye(ot,dt),Gt=le();w.useEffect(function(){if(Gt)return Gt.registerPath(Ct,dt),function(){Gt.unregisterPath(Ct,dt)}},[dt]);var Ht;return Gt?Ht=kt:Ht=w.createElement(Ut,(0,m.Z)({ref:nt},We),kt),w.createElement(Se.Provider,{value:dt},Ht)}),an=Pt,rn=b(76190);function An(We){var nt=We.className,Ct=We.style,ot=w.useContext($),dt=ot.prefixCls,kt=le();return kt?null:w.createElement("li",{role:"separator",className:ee()("".concat(dt,"-item-divider"),nt),style:Ct})}var ir=["className","title","eventKey","children"],Ne=w.forwardRef(function(We,nt){var Ct=We.className,ot=We.title,dt=We.eventKey,kt=We.children,Gt=(0,g.Z)(We,ir),Ht=w.useContext($),hn=Ht.prefixCls,cn="".concat(hn,"-item-group");return w.createElement("li",(0,m.Z)({ref:nt,role:"presentation"},Gt,{onClick:function(vn){return vn.stopPropagation()},className:ee()(cn,Ct)}),w.createElement("div",{role:"presentation",className:"".concat(cn,"-title"),title:typeof ot=="string"?ot:void 0},ot),w.createElement("ul",{role:"group",className:"".concat(cn,"-list")},kt))}),mt=w.forwardRef(function(We,nt){var Ct=We.eventKey,ot=We.children,dt=ke(Ct),kt=Ye(ot,dt),Gt=le();return Gt?kt:w.createElement(Ne,(0,m.Z)({ref:nt},(0,it.Z)(We,["warnKey"])),kt)}),wt=mt,ht=["label","children","key","type","extra"];function we(We,nt,Ct){var ot=nt.item,dt=nt.group,kt=nt.submenu,Gt=nt.divider;return(We||[]).map(function(Ht,hn){if(Ht&&(0,rn.Z)(Ht)==="object"){var cn=Ht,En=cn.label,vn=cn.children,on=cn.key,tn=cn.type,Tn=cn.extra,Sn=(0,g.Z)(cn,ht),bn=on!=null?on:"tmp-".concat(hn);return vn||tn==="group"?tn==="group"?w.createElement(dt,(0,m.Z)({key:bn},Sn,{title:En}),we(vn,nt,Ct)):w.createElement(kt,(0,m.Z)({key:bn},Sn,{title:En}),we(vn,nt,Ct)):tn==="divider"?w.createElement(Gt,(0,m.Z)({key:bn},Sn)):w.createElement(ot,(0,m.Z)({key:bn},Sn,{extra:Tn}),En,(!!Tn||Tn===0)&&w.createElement("span",{className:"".concat(Ct,"-item-extra")},Tn))}return null}).filter(function(Ht){return Ht})}function at(We,nt,Ct,ot,dt){var kt=We,Gt=(0,oe.Z)({divider:An,item:Ge,group:wt,submenu:an},ot);return nt&&(kt=we(nt,Gt,dt)),Ye(kt,Ct)}var gt=["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"],Dt=[],bt=w.forwardRef(function(We,nt){var Ct,ot=We,dt=ot.prefixCls,kt=dt===void 0?"rc-menu":dt,Gt=ot.rootClassName,Ht=ot.style,hn=ot.className,cn=ot.tabIndex,En=cn===void 0?0:cn,vn=ot.items,on=ot.children,tn=ot.direction,Tn=ot.id,Sn=ot.mode,bn=Sn===void 0?"vertical":Sn,Pn=ot.inlineCollapsed,Hn=ot.disabled,Bn=ot.disabledOverflow,jn=ot.subMenuOpenDelay,Wn=jn===void 0?.1:jn,nr=ot.subMenuCloseDelay,Nn=nr===void 0?.1:nr,fr=ot.forceSubMenuRender,pt=ot.defaultOpenKeys,kn=ot.openKeys,sr=ot.activeKey,xr=ot.defaultActiveFirst,_r=ot.selectable,br=_r===void 0?!0:_r,Rn=ot.multiple,gn=Rn===void 0?!1:Rn,Mn=ot.defaultSelectedKeys,ar=ot.selectedKeys,Kn=ot.onSelect,er=ot.onDeselect,Pr=ot.inlineIndent,Dr=Pr===void 0?24:Pr,Er=ot.motion,_n=ot.defaultMotions,Gn=ot.triggerSubMenuAction,qn=Gn===void 0?"hover":Gn,wr=ot.builtinPlacements,qr=ot.itemIcon,Yr=ot.expandIcon,kr=ot.overflowedIndicator,Zr=kr===void 0?"...":kr,Sr=ot.overflowedIndicatorPopupClassName,ei=ot.getPopupContainer,$r=ot.onClick,jr=ot.onOpenChange,ai=ot.onKeyDown,oi=ot.openAnimation,cr=ot.openTransitionName,ci=ot._internalRenderMenuItem,di=ot._internalRenderSubMenuItem,ti=ot._internalComponents,Hr=(0,g.Z)(ot,gt),rr=w.useMemo(function(){return[at(on,vn,Dt,ti,kt),at(on,vn,Dt,{},kt)]},[on,vn,ti]),Ei=(0,G.Z)(rr,2),mn=Ei[0],Xn=Ei[1],vr=w.useState(!1),Cr=(0,G.Z)(vr,2),ur=Cr[0],pr=Cr[1],Fn=w.useRef(),Fr=Et(Tn),Jr=tn==="rtl",ni=(0,H.Z)(pt,{value:kn,postState:function(Or){return Or||Dt}}),Xr=(0,G.Z)(ni,2),Kr=Xr[0],li=Xr[1],ui=function(Or){var Ur=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function hi(){li(Or),jr==null||jr(Or)}Ur?(0,C.flushSync)(hi):hi()},Ai=w.useState(Kr),vi=(0,G.Z)(Ai,2),Hi=vi[0],Xi=vi[1],ki=w.useRef(!1),yi=w.useMemo(function(){return(bn==="inline"||bn==="vertical")&&Pn?["vertical",Pn]:[bn,!1]},[bn,Pn]),$n=(0,G.Z)(yi,2),lr=$n[0],Ir=$n[1],dr=lr==="inline",gr=w.useState(lr),Ti=(0,G.Z)(gr,2),ri=Ti[0],Li=Ti[1],Ki=w.useState(Ir),na=(0,G.Z)(Ki,2),Ea=na[0],ra=na[1];w.useEffect(function(){Li(lr),ra(Ir),ki.current&&(dr?li(Hi):ui(Dt))},[lr,Ir]);var Mi=w.useState(0),Fi=(0,G.Z)(Mi,2),Ci=Fi[0],Bs=Fi[1],is=Ci>=mn.length-1||ri!=="horizontal"||Bn;w.useEffect(function(){dr&&Xi(Kr)},[Kr]),w.useEffect(function(){return ki.current=!0,function(){ki.current=!1}},[]);var Bi=et(),Ns=Bi.registerPath,_s=Bi.unregisterPath,Sa=Bi.refreshOverflowKeys,hs=Bi.isSubPathKey,bs=Bi.getKeyPath,Di=Bi.getKeys,ia=Bi.getSubPathKeys,wa=w.useMemo(function(){return{registerPath:Ns,unregisterPath:_s}},[Ns,_s]),$s=w.useMemo(function(){return{isSubPathKey:hs}},[hs]);w.useEffect(function(){Sa(is?Dt:mn.slice(Ci+1).map(function(Lr){return Lr.key}))},[Ci,is]);var sa=(0,H.Z)(sr||xr&&((Ct=mn[0])===null||Ct===void 0?void 0:Ct.key),{value:sr}),xs=(0,G.Z)(sa,2),Qi=xs[0],Us=xs[1],Oi=ut(function(Lr){Us(Lr)}),zs=ut(function(){Us(void 0)});(0,w.useImperativeHandle)(nt,function(){return{list:Fn.current,focus:function(Or){var Ur,hi=Di(),fi=Je(hi,Fr),ms=fi.elements,ps=fi.key2element,Ji=fi.element2key,Hs=Ce(Fn.current,ms),ws=Qi!=null?Qi:Hs[0]?Ji.get(Hs[0]):(Ur=mn.find(function(Ts){return!Ts.props.disabled}))===null||Ur===void 0?void 0:Ur.key,es=ps.get(ws);if(ws&&es){var As;es==null||(As=es.focus)===null||As===void 0||As.call(es,Or)}}}});var aa=(0,H.Z)(Mn||[],{value:ar,postState:function(Or){return Array.isArray(Or)?Or:Or==null?Dt:[Or]}}),_i=(0,G.Z)(aa,2),ss=_i[0],fs=_i[1],Es=function(Or){if(br){var Ur=Or.key,hi=ss.includes(Ur),fi;gn?hi?fi=ss.filter(function(ps){return ps!==Ur}):fi=[].concat((0,ve.Z)(ss),[Ur]):fi=[Ur],fs(fi);var ms=(0,oe.Z)((0,oe.Z)({},Or),{},{selectedKeys:fi});hi?er==null||er(ms):Kn==null||Kn(ms)}!gn&&Kr.length&&ri!=="inline"&&ui(Dt)},oa=ut(function(Lr){$r==null||$r(A(Lr)),Es(Lr)}),Ni=ut(function(Lr,Or){var Ur=Kr.filter(function(fi){return fi!==Lr});if(Or)Ur.push(Lr);else if(ri!=="inline"){var hi=ia(Lr);Ur=Ur.filter(function(fi){return!hi.has(fi)})}(0,k.Z)(Kr,Ur,!0)||ui(Ur,!0)}),la=function(Or,Ur){var hi=Ur!=null?Ur:!Kr.includes(Or);Ni(Or,hi)},qi=Le(ri,Qi,Jr,Fr,Fn,Di,bs,Us,la,ai);w.useEffect(function(){pr(!0)},[]);var Ss=w.useMemo(function(){return{_internalRenderMenuItem:ci,_internalRenderSubMenuItem:di}},[ci,di]),$i=ri!=="horizontal"||Bn?mn:mn.map(function(Lr,Or){return w.createElement(F,{key:Lr.key,overflowDisabled:Or>Ci},Lr)}),js=w.createElement(o.Z,(0,m.Z)({id:Tn,ref:Fn,prefixCls:"".concat(kt,"-overflow"),component:"ul",itemComponent:Ge,className:ee()(kt,"".concat(kt,"-root"),"".concat(kt,"-").concat(ri),hn,(0,de.Z)((0,de.Z)({},"".concat(kt,"-inline-collapsed"),Ea),"".concat(kt,"-rtl"),Jr),Gt),dir:tn,style:Ht,role:"menu",tabIndex:En,data:$i,renderRawItem:function(Or){return Or},renderRawRest:function(Or){var Ur=Or.length,hi=Ur?mn.slice(-Ur):null;return w.createElement(an,{eventKey:He,title:Zr,disabled:is,internalPopupClose:Ur===0,popupClassName:Sr},hi)},maxCount:ri!=="horizontal"||Bn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Or){Bs(Or)},onKeyDown:qi},Hr));return w.createElement(Y.Provider,{value:Ss},w.createElement(R.Provider,{value:Fr},w.createElement(F,{prefixCls:kt,rootClassName:Gt,mode:ri,openKeys:Kr,rtl:Jr,disabled:Hn,motion:ur?Er:null,defaultMotions:ur?_n:null,activeKey:Qi,onActive:Oi,onInactive:zs,selectedKeys:ss,inlineIndent:Dr,subMenuOpenDelay:Wn,subMenuCloseDelay:Nn,forceSubMenuRender:fr,builtinPlacements:wr,triggerSubMenuAction:qn,getPopupContainer:ei,itemIcon:qr,expandIcon:Yr,onItemClick:oa,onOpenChange:Ni},w.createElement(De.Provider,{value:$s},js),w.createElement("div",{style:{display:"none"},"aria-hidden":!0},w.createElement(he.Provider,{value:wa},Xn)))))}),Ft=bt,zt=Ft;zt.Item=Ge,zt.SubMenu=an,zt.ItemGroup=wt,zt.Divider=An;var _t=zt},83836:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return se}});var m=b(54476),de=b(33885),oe=b(42978),ve=b(75931),G=b(59301),g=b(92310),fe=b.n(g),ee=b(29301),o=b(34280),H=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],k=void 0;function S(x,E){var V=x.prefixCls,me=x.invalidate,ze=x.item,Xe=x.renderItem,_e=x.responsive,Ke=x.responsiveDisabled,Qe=x.registerSize,st=x.itemKey,rt=x.className,Vt=x.style,qe=x.children,Kt=x.display,je=x.order,Tt=x.component,Re=Tt===void 0?"div":Tt,Ce=(0,ve.Z)(x,H),ce=_e&&!Kt;function Je(xe){Qe(st,xe)}G.useEffect(function(){return function(){Je(null)}},[]);var Le=Xe&&ze!==k?Xe(ze,{index:je}):qe,Ie;me||(Ie={opacity:ce?0:1,height:ce?0:k,overflowY:ce?"hidden":k,order:_e?je:k,pointerEvents:ce?"none":k,position:ce?"absolute":k});var P={};ce&&(P["aria-hidden"]=!0);var pe=G.createElement(Re,(0,m.Z)({className:fe()(!me&&V,rt),style:(0,de.Z)((0,de.Z)({},Ie),Vt)},P,Ce,{ref:E}),Le);return _e&&(pe=G.createElement(ee.Z,{onResize:function(He){var et=He.offsetWidth;Je(et)},disabled:Ke},pe)),pe}var w=G.forwardRef(S);w.displayName="Item";var C=w,R=b(6089),q=b(4676),Q=b(16089);function K(x){if(typeof MessageChannel=="undefined")(0,Q.Z)(x);else{var E=new MessageChannel;E.port1.onmessage=function(){return x()},E.port2.postMessage(void 0)}}function D(){var x=G.useRef(null),E=function(me){x.current||(x.current=[],K(function(){(0,q.unstable_batchedUpdates)(function(){x.current.forEach(function(ze){ze()}),x.current=null})})),x.current.push(me)};return E}function $(x,E){var V=G.useState(E),me=(0,oe.Z)(V,2),ze=me[0],Xe=me[1],_e=(0,R.Z)(function(Ke){x(function(){Xe(Ke)})});return[ze,_e]}var M=G.createContext(null),F=["component"],ue=["className"],he=["className"],le=function(E,V){var me=G.useContext(M);if(!me){var ze=E.component,Xe=ze===void 0?"div":ze,_e=(0,ve.Z)(E,F);return G.createElement(Xe,(0,m.Z)({},_e,{ref:V}))}var Ke=me.className,Qe=(0,ve.Z)(me,ue),st=E.className,rt=(0,ve.Z)(E,he);return G.createElement(M.Provider,{value:null},G.createElement(C,(0,m.Z)({ref:V,className:fe()(Ke,st)},Qe,rt)))},Se=G.forwardRef(le);Se.displayName="RawItem";var ke=Se,De=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Me="responsive",Y="invalidate";function B(x){return"+ ".concat(x.length," ...")}function W(x,E){var V=x.prefixCls,me=V===void 0?"rc-overflow":V,ze=x.data,Xe=ze===void 0?[]:ze,_e=x.renderItem,Ke=x.renderRawItem,Qe=x.itemKey,st=x.itemWidth,rt=st===void 0?10:st,Vt=x.ssr,qe=x.style,Kt=x.className,je=x.maxCount,Tt=x.renderRest,Re=x.renderRawRest,Ce=x.prefix,ce=x.suffix,Je=x.component,Le=Je===void 0?"div":Je,Ie=x.itemComponent,P=x.onVisibleChange,pe=(0,ve.Z)(x,De),xe=Vt==="full",He=D(),et=$(He,null),ut=(0,oe.Z)(et,2),xt=ut[0],Lt=ut[1],Et=xt||0,Mt=$(He,new Map),Yt=(0,oe.Z)(Mt,2),jt=Yt[0],$t=Yt[1],it=$(He,0),It=(0,oe.Z)(it,2),Rt=It[0],ye=It[1],Ve=$(He,0),_=(0,oe.Z)(Ve,2),A=_[0],Oe=_[1],N=$(He,0),ae=(0,oe.Z)(N,2),St=ae[0],Ee=ae[1],$e=$(He,0),Ge=(0,oe.Z)($e,2),Z=Ge[0],J=Ge[1],be=(0,G.useState)(null),Pe=(0,oe.Z)(be,2),j=Pe[0],Ye=Pe[1],X=(0,G.useState)(null),tt=(0,oe.Z)(X,2),Ot=tt[0],Xt=tt[1],pn=G.useMemo(function(){return Ot===null&&xe?Number.MAX_SAFE_INTEGER:Ot||0},[Ot,xt]),qt=(0,G.useState)(!1),nn=(0,oe.Z)(qt,2),xn=nn[0],Un=nn[1],un="".concat(me,"-item"),On=Math.max(Rt,A),en=je===Me,Ut=Xe.length&&en,Pt=je===Y,an=Ut||typeof je=="number"&&Xe.length>je,rn=(0,G.useMemo)(function(){var dt=Xe;return Ut?xt===null&&xe?dt=Xe:dt=Xe.slice(0,Math.min(Xe.length,Et/rt)):typeof je=="number"&&(dt=Xe.slice(0,je)),dt},[Xe,rt,xt,je,Ut]),An=(0,G.useMemo)(function(){return Ut?Xe.slice(pn+1):Xe.slice(rn.length)},[Xe,rn,Ut,pn]),ir=(0,G.useCallback)(function(dt,kt){var Gt;return typeof Qe=="function"?Qe(dt):(Gt=Qe&&(dt==null?void 0:dt[Qe]))!==null&&Gt!==void 0?Gt:kt},[Qe]),Ne=(0,G.useCallback)(_e||function(dt){return dt},[_e]);function mt(dt,kt,Gt){Ot===dt&&(kt===void 0||kt===j)||(Xt(dt),Gt||(Un(dt<Xe.length-1),P==null||P(dt)),kt!==void 0&&Ye(kt))}function wt(dt,kt){Lt(kt.clientWidth)}function ht(dt,kt){$t(function(Gt){var Ht=new Map(Gt);return kt===null?Ht.delete(dt):Ht.set(dt,kt),Ht})}function we(dt,kt){Oe(kt),ye(A)}function at(dt,kt){Ee(kt)}function gt(dt,kt){J(kt)}function Dt(dt){return jt.get(ir(rn[dt],dt))}(0,o.Z)(function(){if(Et&&typeof On=="number"&&rn){var dt=St+Z,kt=rn.length,Gt=kt-1;if(!kt){mt(0,null);return}for(var Ht=0;Ht<kt;Ht+=1){var hn=Dt(Ht);if(xe&&(hn=hn||0),hn===void 0){mt(Ht-1,void 0,!0);break}if(dt+=hn,Gt===0&&dt<=Et||Ht===Gt-1&&dt+Dt(Gt)<=Et){mt(Gt,null);break}else if(dt+On>Et){mt(Ht-1,dt-hn-Z+A);break}}ce&&Dt(0)+Z>Et&&Ye(null)}},[Et,jt,A,St,Z,ir,rn]);var bt=xn&&!!An.length,Ft={};j!==null&&Ut&&(Ft={position:"absolute",left:j,top:0});var zt={prefixCls:un,responsive:Ut,component:Ie,invalidate:Pt},_t=Ke?function(dt,kt){var Gt=ir(dt,kt);return G.createElement(M.Provider,{key:Gt,value:(0,de.Z)((0,de.Z)({},zt),{},{order:kt,item:dt,itemKey:Gt,registerSize:ht,display:kt<=pn})},Ke(dt,kt))}:function(dt,kt){var Gt=ir(dt,kt);return G.createElement(C,(0,m.Z)({},zt,{order:kt,key:Gt,item:dt,renderItem:Ne,itemKey:Gt,registerSize:ht,display:kt<=pn}))},We={order:bt?pn:Number.MAX_SAFE_INTEGER,className:"".concat(un,"-rest"),registerSize:we,display:bt},nt=Tt||B,Ct=Re?G.createElement(M.Provider,{value:(0,de.Z)((0,de.Z)({},zt),We)},Re(An)):G.createElement(C,(0,m.Z)({},zt,We),typeof nt=="function"?nt(An):nt),ot=G.createElement(Le,(0,m.Z)({className:fe()(!Pt&&me,Kt),style:qe,ref:E},pe),Ce&&G.createElement(C,(0,m.Z)({},zt,{responsive:en,responsiveDisabled:!Ut,order:-1,className:"".concat(un,"-prefix"),registerSize:at,display:!0}),Ce),rn.map(_t),an?Ct:null,ce&&G.createElement(C,(0,m.Z)({},zt,{responsive:en,responsiveDisabled:!Ut,order:pn,className:"".concat(un,"-suffix"),registerSize:gt,display:!0,style:Ft}),ce));return en?G.createElement(ee.Z,{onResize:wt,disabled:!Ut},ot):ot}var re=G.forwardRef(W);re.displayName="Overflow",re.Item=ke,re.RESPONSIVE=Me,re.INVALIDATE=Y;var ie=re,se=ie},29301:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return Y}});var m=b(54476),de=b(59301),oe=b(11592),ve=b(48736),G=b(33885),g=b(76190),fe=b(76846),ee=b(8654),o=de.createContext(null);function H(B){var W=B.children,re=B.onBatchResize,ie=de.useRef(0),se=de.useRef([]),x=de.useContext(o),E=de.useCallback(function(V,me,ze){ie.current+=1;var Xe=ie.current;se.current.push({size:V,element:me,data:ze}),Promise.resolve().then(function(){Xe===ie.current&&(re==null||re(se.current),se.current=[])}),x==null||x(V,me,ze)},[re,x]);return de.createElement(o.Provider,{value:E},W)}var k=b(76374),S=new Map;function w(B){B.forEach(function(W){var re,ie=W.target;(re=S.get(ie))===null||re===void 0||re.forEach(function(se){return se(ie)})})}var C=new k.Z(w),R=null,q=null;function Q(B,W){S.has(B)||(S.set(B,new Set),C.observe(B)),S.get(B).add(W)}function K(B,W){S.has(B)&&(S.get(B).delete(W),S.get(B).size||(C.unobserve(B),S.delete(B)))}var D=b(67732),$=b(83652),M=b(42403),F=b(158),ue=function(B){(0,M.Z)(re,B);var W=(0,F.Z)(re);function re(){return(0,D.Z)(this,re),W.apply(this,arguments)}return(0,$.Z)(re,[{key:"render",value:function(){return this.props.children}}]),re}(de.Component);function he(B,W){var re=B.children,ie=B.disabled,se=de.useRef(null),x=de.useRef(null),E=de.useContext(o),V=typeof re=="function",me=V?re(se):re,ze=de.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Xe=!V&&de.isValidElement(me)&&(0,ee.Yr)(me),_e=Xe?(0,ee.C4)(me):null,Ke=(0,ee.x1)(_e,se),Qe=function(){var qe;return(0,fe.ZP)(se.current)||(se.current&&(0,g.Z)(se.current)==="object"?(0,fe.ZP)((qe=se.current)===null||qe===void 0?void 0:qe.nativeElement):null)||(0,fe.ZP)(x.current)};de.useImperativeHandle(W,function(){return Qe()});var st=de.useRef(B);st.current=B;var rt=de.useCallback(function(Vt){var qe=st.current,Kt=qe.onResize,je=qe.data,Tt=Vt.getBoundingClientRect(),Re=Tt.width,Ce=Tt.height,ce=Vt.offsetWidth,Je=Vt.offsetHeight,Le=Math.floor(Re),Ie=Math.floor(Ce);if(ze.current.width!==Le||ze.current.height!==Ie||ze.current.offsetWidth!==ce||ze.current.offsetHeight!==Je){var P={width:Le,height:Ie,offsetWidth:ce,offsetHeight:Je};ze.current=P;var pe=ce===Math.round(Re)?Re:ce,xe=Je===Math.round(Ce)?Ce:Je,He=(0,G.Z)((0,G.Z)({},P),{},{offsetWidth:pe,offsetHeight:xe});E==null||E(He,Vt,je),Kt&&Promise.resolve().then(function(){Kt(He,Vt)})}},[]);return de.useEffect(function(){var Vt=Qe();return Vt&&!ie&&Q(Vt,rt),function(){return K(Vt,rt)}},[se.current,ie]),de.createElement(ue,{ref:x},Xe?de.cloneElement(me,{ref:Ke}):me)}var le=de.forwardRef(he),Se=le,ke="rc-observer-key";function De(B,W){var re=B.children,ie=typeof re=="function"?[re]:(0,oe.Z)(re);return ie.map(function(se,x){var E=(se==null?void 0:se.key)||"".concat(ke,"-").concat(x);return de.createElement(Se,(0,m.Z)({},B,{key:E,ref:x===0?W:void 0}),se)})}var Me=de.forwardRef(De);Me.Collection=H;var Y=Me},22711:function(ln,ct,b){"use strict";b.r(ct),b.d(ct,{ResizableTextArea:function(){return Me},default:function(){return re}});var m=b(54476),de=b(20068),oe=b(33885),ve=b(94480),G=b(42978),g=b(75931),fe=b(92310),ee=b.n(fe),o=b(36901),H=b(66003),k=b(30292),S=b(18929),w=b(59301),C=b(76190),R=b(29301),q=b(34280),Q=b(16089),K=`
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"],$={},M;function F(ie){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=ie.getAttribute("id")||ie.getAttribute("data-reactid")||ie.getAttribute("name");if(se&&$[x])return $[x];var E=window.getComputedStyle(ie),V=E.getPropertyValue("box-sizing")||E.getPropertyValue("-moz-box-sizing")||E.getPropertyValue("-webkit-box-sizing"),me=parseFloat(E.getPropertyValue("padding-bottom"))+parseFloat(E.getPropertyValue("padding-top")),ze=parseFloat(E.getPropertyValue("border-bottom-width"))+parseFloat(E.getPropertyValue("border-top-width")),Xe=D.map(function(Ke){return"".concat(Ke,":").concat(E.getPropertyValue(Ke))}).join(";"),_e={sizingStyle:Xe,paddingSize:me,borderSize:ze,boxSizing:V};return se&&x&&($[x]=_e),_e}function ue(ie){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;M||(M=document.createElement("textarea"),M.setAttribute("tab-index","-1"),M.setAttribute("aria-hidden","true"),M.setAttribute("name","hiddenTextarea"),document.body.appendChild(M)),ie.getAttribute("wrap")?M.setAttribute("wrap",ie.getAttribute("wrap")):M.removeAttribute("wrap");var V=F(ie,se),me=V.paddingSize,ze=V.borderSize,Xe=V.boxSizing,_e=V.sizingStyle;M.setAttribute("style","".concat(_e,";").concat(K)),M.value=ie.value||ie.placeholder||"";var Ke=void 0,Qe=void 0,st,rt=M.scrollHeight;if(Xe==="border-box"?rt+=ze:Xe==="content-box"&&(rt-=me),x!==null||E!==null){M.value=" ";var Vt=M.scrollHeight-me;x!==null&&(Ke=Vt*x,Xe==="border-box"&&(Ke=Ke+me+ze),rt=Math.max(Ke,rt)),E!==null&&(Qe=Vt*E,Xe==="border-box"&&(Qe=Qe+me+ze),st=rt>Qe?"":"hidden",rt=Math.min(Qe,rt))}var qe={height:rt,overflowY:st,resize:"none"};return Ke&&(qe.minHeight=Ke),Qe&&(qe.maxHeight=Qe),qe}var he=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],le=0,Se=1,ke=2,De=w.forwardRef(function(ie,se){var x=ie,E=x.prefixCls,V=x.defaultValue,me=x.value,ze=x.autoSize,Xe=x.onResize,_e=x.className,Ke=x.style,Qe=x.disabled,st=x.onChange,rt=x.onInternalAutoSize,Vt=(0,g.Z)(x,he),qe=(0,S.Z)(V,{value:me,postState:function(Ve){return Ve!=null?Ve:""}}),Kt=(0,G.Z)(qe,2),je=Kt[0],Tt=Kt[1],Re=function(Ve){Tt(Ve.target.value),st==null||st(Ve)},Ce=w.useRef();w.useImperativeHandle(se,function(){return{textArea:Ce.current}});var ce=w.useMemo(function(){return ze&&(0,C.Z)(ze)==="object"?[ze.minRows,ze.maxRows]:[]},[ze]),Je=(0,G.Z)(ce,2),Le=Je[0],Ie=Je[1],P=!!ze,pe=function(){try{if(document.activeElement===Ce.current){var Ve=Ce.current,_=Ve.selectionStart,A=Ve.selectionEnd,Oe=Ve.scrollTop;Ce.current.setSelectionRange(_,A),Ce.current.scrollTop=Oe}}catch(N){}},xe=w.useState(ke),He=(0,G.Z)(xe,2),et=He[0],ut=He[1],xt=w.useState(),Lt=(0,G.Z)(xt,2),Et=Lt[0],Mt=Lt[1],Yt=function(){ut(le)};(0,q.Z)(function(){P&&Yt()},[me,Le,Ie,P]),(0,q.Z)(function(){if(et===le)ut(Se);else if(et===Se){var ye=ue(Ce.current,!1,Le,Ie);ut(ke),Mt(ye)}else pe()},[et]);var jt=w.useRef(),$t=function(){Q.Z.cancel(jt.current)},it=function(Ve){et===ke&&(Xe==null||Xe(Ve),ze&&($t(),jt.current=(0,Q.Z)(function(){Yt()})))};w.useEffect(function(){return $t},[]);var It=P?Et:null,Rt=(0,oe.Z)((0,oe.Z)({},Ke),It);return(et===le||et===Se)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),w.createElement(R.Z,{onResize:it,disabled:!(ze||Xe)},w.createElement("textarea",(0,m.Z)({},Vt,{ref:Ce,style:Rt,className:ee()(E,_e,(0,de.Z)({},"".concat(E,"-disabled"),Qe)),disabled:Qe,value:je,onChange:Re})))}),Me=De,Y=["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"],B=w.forwardRef(function(ie,se){var x,E=ie.defaultValue,V=ie.value,me=ie.onFocus,ze=ie.onBlur,Xe=ie.onChange,_e=ie.allowClear,Ke=ie.maxLength,Qe=ie.onCompositionStart,st=ie.onCompositionEnd,rt=ie.suffix,Vt=ie.prefixCls,qe=Vt===void 0?"rc-textarea":Vt,Kt=ie.showCount,je=ie.count,Tt=ie.className,Re=ie.style,Ce=ie.disabled,ce=ie.hidden,Je=ie.classNames,Le=ie.styles,Ie=ie.onResize,P=ie.onClear,pe=ie.onPressEnter,xe=ie.readOnly,He=ie.autoSize,et=ie.onKeyDown,ut=(0,g.Z)(ie,Y),xt=(0,S.Z)(E,{value:V,defaultValue:E}),Lt=(0,G.Z)(xt,2),Et=Lt[0],Mt=Lt[1],Yt=Et==null?"":String(Et),jt=w.useState(!1),$t=(0,G.Z)(jt,2),it=$t[0],It=$t[1],Rt=w.useRef(!1),ye=w.useState(null),Ve=(0,G.Z)(ye,2),_=Ve[0],A=Ve[1],Oe=(0,w.useRef)(null),N=(0,w.useRef)(null),ae=function(){var Pt;return(Pt=N.current)===null||Pt===void 0?void 0:Pt.textArea},St=function(){ae().focus()};(0,w.useImperativeHandle)(se,function(){var Ut;return{resizableTextArea:N.current,focus:St,blur:function(){ae().blur()},nativeElement:((Ut=Oe.current)===null||Ut===void 0?void 0:Ut.nativeElement)||ae()}}),(0,w.useEffect)(function(){It(function(Ut){return!Ce&&Ut})},[Ce]);var Ee=w.useState(null),$e=(0,G.Z)(Ee,2),Ge=$e[0],Z=$e[1];w.useEffect(function(){if(Ge){var Ut;(Ut=ae()).setSelectionRange.apply(Ut,(0,ve.Z)(Ge))}},[Ge]);var J=(0,H.Z)(je,Kt),be=(x=J.max)!==null&&x!==void 0?x:Ke,Pe=Number(be)>0,j=J.strategy(Yt),Ye=!!be&&j>be,X=function(Pt,an){var rn=an;!Rt.current&&J.exceedFormatter&&J.max&&J.strategy(an)>J.max&&(rn=J.exceedFormatter(an,{max:J.max}),an!==rn&&Z([ae().selectionStart||0,ae().selectionEnd||0])),Mt(rn),(0,k.rJ)(Pt.currentTarget,Pt,Xe,rn)},tt=function(Pt){Rt.current=!0,Qe==null||Qe(Pt)},Ot=function(Pt){Rt.current=!1,X(Pt,Pt.currentTarget.value),st==null||st(Pt)},Xt=function(Pt){X(Pt,Pt.target.value)},pn=function(Pt){Pt.key==="Enter"&&pe&&pe(Pt),et==null||et(Pt)},qt=function(Pt){It(!0),me==null||me(Pt)},nn=function(Pt){It(!1),ze==null||ze(Pt)},xn=function(Pt){Mt(""),St(),(0,k.rJ)(ae(),Pt,Xe)},Un=rt,un;J.show&&(J.showFormatter?un=J.showFormatter({value:Yt,count:j,maxLength:be}):un="".concat(j).concat(Pe?" / ".concat(be):""),Un=w.createElement(w.Fragment,null,Un,w.createElement("span",{className:ee()("".concat(qe,"-data-count"),Je==null?void 0:Je.count),style:Le==null?void 0:Le.count},un)));var On=function(Pt){var an;Ie==null||Ie(Pt),(an=ae())!==null&&an!==void 0&&an.style.height&&A(!0)},en=!He&&!Kt&&!_e;return w.createElement(o.BaseInput,{ref:Oe,value:Yt,allowClear:_e,handleReset:xn,suffix:Un,prefixCls:qe,classNames:(0,oe.Z)((0,oe.Z)({},Je),{},{affixWrapper:ee()(Je==null?void 0:Je.affixWrapper,(0,de.Z)((0,de.Z)({},"".concat(qe,"-show-count"),Kt),"".concat(qe,"-textarea-allow-clear"),_e))}),disabled:Ce,focused:it,className:ee()(Tt,Ye&&"".concat(qe,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},Re),_&&!en?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof un=="string"?un:void 0}},hidden:ce,readOnly:xe,onClear:P},w.createElement(Me,(0,m.Z)({},ut,{autoSize:He,maxLength:Ke,onKeyDown:pn,onChange:Xt,onFocus:qt,onBlur:nn,onCompositionStart:tt,onCompositionEnd:Ot,className:ee()(Je==null?void 0:Je.textarea),style:(0,oe.Z)((0,oe.Z)({},Le==null?void 0:Le.textarea),{},{resize:Re==null?void 0:Re.resize}),disabled:Ce,prefixCls:qe,onResize:On,ref:N,readOnly:xe})))}),W=B,re=W},29125:function(ln,ct,b){"use strict";b.d(ct,{G:function(){return ve},Z:function(){return K}});var m=b(92310),de=b.n(m),oe=b(59301);function ve(D){var $=D.children,M=D.prefixCls,F=D.id,ue=D.overlayInnerStyle,he=D.bodyClassName,le=D.className,Se=D.style;return oe.createElement("div",{className:de()("".concat(M,"-content"),le),style:Se},oe.createElement("div",{className:de()("".concat(M,"-inner"),he),id:F,role:"tooltip",style:ue},typeof $=="function"?$():$))}var G=b(54476),g=b(33885),fe=b(75931),ee=b(65030),o={shiftX:64,adjustY:1},H={adjustX:1,shiftY:!0},k=[0,0],S={left:{points:["cr","cl"],overflow:H,offset:[-4,0],targetOffset:k},right:{points:["cl","cr"],overflow:H,offset:[4,0],targetOffset:k},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:k},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:k},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:k},leftTop:{points:["tr","tl"],overflow:H,offset:[-4,0],targetOffset:k},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:k},rightTop:{points:["tl","tr"],overflow:H,offset:[4,0],targetOffset:k},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:k},rightBottom:{points:["bl","br"],overflow:H,offset:[4,0],targetOffset:k},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:k},leftBottom:{points:["br","bl"],overflow:H,offset:[-4,0],targetOffset:k}},w=null,C=b(80402),R=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],q=function($,M){var F=$.overlayClassName,ue=$.trigger,he=ue===void 0?["hover"]:ue,le=$.mouseEnterDelay,Se=le===void 0?0:le,ke=$.mouseLeaveDelay,De=ke===void 0?.1:ke,Me=$.overlayStyle,Y=$.prefixCls,B=Y===void 0?"rc-tooltip":Y,W=$.children,re=$.onVisibleChange,ie=$.afterVisibleChange,se=$.transitionName,x=$.animation,E=$.motion,V=$.placement,me=V===void 0?"right":V,ze=$.align,Xe=ze===void 0?{}:ze,_e=$.destroyTooltipOnHide,Ke=_e===void 0?!1:_e,Qe=$.defaultVisible,st=$.getTooltipContainer,rt=$.overlayInnerStyle,Vt=$.arrowContent,qe=$.overlay,Kt=$.id,je=$.showArrow,Tt=je===void 0?!0:je,Re=$.classNames,Ce=$.styles,ce=(0,fe.Z)($,R),Je=(0,C.Z)(Kt),Le=(0,oe.useRef)(null);(0,oe.useImperativeHandle)(M,function(){return Le.current});var Ie=(0,g.Z)({},ce);"visible"in $&&(Ie.popupVisible=$.visible);var P=function(){return oe.createElement(ve,{key:"content",prefixCls:B,id:Je,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},rt),Ce==null?void 0:Ce.body)},qe)},pe=function(){var He=oe.Children.only(W),et=(He==null?void 0:He.props)||{},ut=(0,g.Z)((0,g.Z)({},et),{},{"aria-describedby":qe?Je:null});return oe.cloneElement(W,ut)};return oe.createElement(ee.Z,(0,G.Z)({popupClassName:de()(F,Re==null?void 0:Re.root),prefixCls:B,popup:P,action:he,builtinPlacements:S,popupPlacement:me,ref:Le,popupAlign:Xe,getPopupContainer:st,onPopupVisibleChange:re,afterPopupVisibleChange:ie,popupTransitionName:se,popupAnimation:x,popupMotion:E,defaultPopupVisible:Qe,autoDestroy:Ke,mouseLeaveDelay:De,popupStyle:(0,g.Z)((0,g.Z)({},Me),Ce==null?void 0:Ce.root),mouseEnterDelay:Se,arrow:Tt},Ie),pe())},Q=(0,oe.forwardRef)(q),K=Q},49658:function(ln,ct){"use strict";ct.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var b=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(b)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(b==null?void 0:b.substr(0,4))}},83145:function(ln,ct,b){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.CopyToClipboard=void 0;var m=oe(b(59301)),de=oe(b(25769));function oe(D){return D&&D.__esModule?D:{default:D}}function ve(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ve=function(M){return typeof M}:ve=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},ve(D)}function G(D,$){var M=Object.keys(D);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(D);$&&(F=F.filter(function(ue){return Object.getOwnPropertyDescriptor(D,ue).enumerable})),M.push.apply(M,F)}return M}function g(D){for(var $=1;$<arguments.length;$++){var M=arguments[$]!=null?arguments[$]:{};$%2?G(M,!0).forEach(function(F){Q(D,F,M[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(M)):G(M).forEach(function(F){Object.defineProperty(D,F,Object.getOwnPropertyDescriptor(M,F))})}return D}function fe(D,$){if(D==null)return{};var M=ee(D,$),F,ue;if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(D);for(ue=0;ue<he.length;ue++)F=he[ue],!($.indexOf(F)>=0)&&Object.prototype.propertyIsEnumerable.call(D,F)&&(M[F]=D[F])}return M}function ee(D,$){if(D==null)return{};var M={},F=Object.keys(D),ue,he;for(he=0;he<F.length;he++)ue=F[he],!($.indexOf(ue)>=0)&&(M[ue]=D[ue]);return M}function o(D,$){if(!(D instanceof $))throw new TypeError("Cannot call a class as a function")}function H(D,$){for(var M=0;M<$.length;M++){var F=$[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(D,F.key,F)}}function k(D,$,M){return $&&H(D.prototype,$),M&&H(D,M),D}function S(D,$){return $&&(ve($)==="object"||typeof $=="function")?$:C(D)}function w(D){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)},w(D)}function C(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function R(D,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),$&&q(D,$)}function q(D,$){return q=Object.setPrototypeOf||function(F,ue){return F.__proto__=ue,F},q(D,$)}function Q(D,$,M){return $ in D?Object.defineProperty(D,$,{value:M,enumerable:!0,configurable:!0,writable:!0}):D[$]=M,D}var K=function(D){R($,D);function $(){var M,F;o(this,$);for(var ue=arguments.length,he=new Array(ue),le=0;le<ue;le++)he[le]=arguments[le];return F=S(this,(M=w($)).call.apply(M,[this].concat(he))),Q(C(F),"onClick",function(Se){var ke=F.props,De=ke.text,Me=ke.onCopy,Y=ke.children,B=ke.options,W=m.default.Children.only(Y),re=(0,de.default)(De,B);Me&&Me(De,re),W&&W.props&&typeof W.props.onClick=="function"&&W.props.onClick(Se)}),F}return k($,[{key:"render",value:function(){var F=this.props,ue=F.text,he=F.onCopy,le=F.options,Se=F.children,ke=fe(F,["text","onCopy","options","children"]),De=m.default.Children.only(Se);return m.default.cloneElement(De,g({},ke,{onClick:this.onClick}))}}]),$}(m.default.PureComponent);ct.CopyToClipboard=K,Q(K,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(ln,ct,b){"use strict";var m=b(83145),de=m.CopyToClipboard;de.CopyToClipboard=de,ln.exports=de},76374:function(ln,ct,b){"use strict";var m=function(){if(typeof Map!="undefined")return Map;function Y(B,W){var re=-1;return B.some(function(ie,se){return ie[0]===W?(re=se,!0):!1}),re}return function(){function B(){this.__entries__=[]}return Object.defineProperty(B.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),B.prototype.get=function(W){var re=Y(this.__entries__,W),ie=this.__entries__[re];return ie&&ie[1]},B.prototype.set=function(W,re){var ie=Y(this.__entries__,W);~ie?this.__entries__[ie][1]=re:this.__entries__.push([W,re])},B.prototype.delete=function(W){var re=this.__entries__,ie=Y(re,W);~ie&&re.splice(ie,1)},B.prototype.has=function(W){return!!~Y(this.__entries__,W)},B.prototype.clear=function(){this.__entries__.splice(0)},B.prototype.forEach=function(W,re){re===void 0&&(re=null);for(var ie=0,se=this.__entries__;ie<se.length;ie++){var x=se[ie];W.call(re,x[1],x[0])}},B}()}(),de=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,oe=function(){return typeof b.g!="undefined"&&b.g.Math===Math?b.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ve=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(oe):function(Y){return setTimeout(function(){return Y(Date.now())},1e3/60)}}(),G=2;function g(Y,B){var W=!1,re=!1,ie=0;function se(){W&&(W=!1,Y()),re&&E()}function x(){ve(se)}function E(){var V=Date.now();if(W){if(V-ie<G)return;re=!0}else W=!0,re=!1,setTimeout(x,B);ie=V}return E}var fe=20,ee=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",H=function(){function Y(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),fe)}return Y.prototype.addObserver=function(B){~this.observers_.indexOf(B)||this.observers_.push(B),this.connected_||this.connect_()},Y.prototype.removeObserver=function(B){var W=this.observers_,re=W.indexOf(B);~re&&W.splice(re,1),!W.length&&this.connected_&&this.disconnect_()},Y.prototype.refresh=function(){var B=this.updateObservers_();B&&this.refresh()},Y.prototype.updateObservers_=function(){var B=this.observers_.filter(function(W){return W.gatherActive(),W.hasActive()});return B.forEach(function(W){return W.broadcastActive()}),B.length>0},Y.prototype.connect_=function(){!de||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)},Y.prototype.disconnect_=function(){!de||!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)},Y.prototype.onTransitionEnd_=function(B){var W=B.propertyName,re=W===void 0?"":W,ie=ee.some(function(se){return!!~re.indexOf(se)});ie&&this.refresh()},Y.getInstance=function(){return this.instance_||(this.instance_=new Y),this.instance_},Y.instance_=null,Y}(),k=function(Y,B){for(var W=0,re=Object.keys(B);W<re.length;W++){var ie=re[W];Object.defineProperty(Y,ie,{value:B[ie],enumerable:!1,writable:!1,configurable:!0})}return Y},S=function(Y){var B=Y&&Y.ownerDocument&&Y.ownerDocument.defaultView;return B||oe},w=ue(0,0,0,0);function C(Y){return parseFloat(Y)||0}function R(Y){for(var B=[],W=1;W<arguments.length;W++)B[W-1]=arguments[W];return B.reduce(function(re,ie){var se=Y["border-"+ie+"-width"];return re+C(se)},0)}function q(Y){for(var B=["top","right","bottom","left"],W={},re=0,ie=B;re<ie.length;re++){var se=ie[re],x=Y["padding-"+se];W[se]=C(x)}return W}function Q(Y){var B=Y.getBBox();return ue(0,0,B.width,B.height)}function K(Y){var B=Y.clientWidth,W=Y.clientHeight;if(!B&&!W)return w;var re=S(Y).getComputedStyle(Y),ie=q(re),se=ie.left+ie.right,x=ie.top+ie.bottom,E=C(re.width),V=C(re.height);if(re.boxSizing==="border-box"&&(Math.round(E+se)!==B&&(E-=R(re,"left","right")+se),Math.round(V+x)!==W&&(V-=R(re,"top","bottom")+x)),!$(Y)){var me=Math.round(E+se)-B,ze=Math.round(V+x)-W;Math.abs(me)!==1&&(E-=me),Math.abs(ze)!==1&&(V-=ze)}return ue(ie.left,ie.top,E,V)}var D=function(){return typeof SVGGraphicsElement!="undefined"?function(Y){return Y instanceof S(Y).SVGGraphicsElement}:function(Y){return Y instanceof S(Y).SVGElement&&typeof Y.getBBox=="function"}}();function $(Y){return Y===S(Y).document.documentElement}function M(Y){return de?D(Y)?Q(Y):K(Y):w}function F(Y){var B=Y.x,W=Y.y,re=Y.width,ie=Y.height,se=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,x=Object.create(se.prototype);return k(x,{x:B,y:W,width:re,height:ie,top:W,right:B+re,bottom:ie+W,left:B}),x}function ue(Y,B,W,re){return{x:Y,y:B,width:W,height:re}}var he=function(){function Y(B){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ue(0,0,0,0),this.target=B}return Y.prototype.isActive=function(){var B=M(this.target);return this.contentRect_=B,B.width!==this.broadcastWidth||B.height!==this.broadcastHeight},Y.prototype.broadcastRect=function(){var B=this.contentRect_;return this.broadcastWidth=B.width,this.broadcastHeight=B.height,B},Y}(),le=function(){function Y(B,W){var re=F(W);k(this,{target:B,contentRect:re})}return Y}(),Se=function(){function Y(B,W,re){if(this.activeObservations_=[],this.observations_=new m,typeof B!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=B,this.controller_=W,this.callbackCtx_=re}return Y.prototype.observe=function(B){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(B instanceof S(B).Element))throw new TypeError('parameter 1 is not of type "Element".');var W=this.observations_;W.has(B)||(W.set(B,new he(B)),this.controller_.addObserver(this),this.controller_.refresh())}},Y.prototype.unobserve=function(B){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(B instanceof S(B).Element))throw new TypeError('parameter 1 is not of type "Element".');var W=this.observations_;W.has(B)&&(W.delete(B),W.size||this.controller_.removeObserver(this))}},Y.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Y.prototype.gatherActive=function(){var B=this;this.clearActive(),this.observations_.forEach(function(W){W.isActive()&&B.activeObservations_.push(W)})},Y.prototype.broadcastActive=function(){if(this.hasActive()){var B=this.callbackCtx_,W=this.activeObservations_.map(function(re){return new le(re.target,re.broadcastRect())});this.callback_.call(B,W,B),this.clearActive()}},Y.prototype.clearActive=function(){this.activeObservations_.splice(0)},Y.prototype.hasActive=function(){return this.activeObservations_.length>0},Y}(),ke=typeof WeakMap!="undefined"?new WeakMap:new m,De=function(){function Y(B){if(!(this instanceof Y))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var W=H.getInstance(),re=new Se(B,W,this);ke.set(this,re)}return Y}();["observe","unobserve","disconnect"].forEach(function(Y){De.prototype[Y]=function(){var B;return(B=ke.get(this))[Y].apply(B,arguments)}});var Me=function(){return typeof oe.ResizeObserver!="undefined"?oe.ResizeObserver:De}();ct.Z=Me},98040:function(ln){ln.exports=function(){var ct=document.getSelection();if(!ct.rangeCount)return function(){};for(var b=document.activeElement,m=[],de=0;de<ct.rangeCount;de++)m.push(ct.getRangeAt(de));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null;break}return ct.removeAllRanges(),function(){ct.type==="Caret"&&ct.removeAllRanges(),ct.rangeCount||m.forEach(function(oe){ct.addRange(oe)}),b&&b.focus()}}},93314:function(ln){"use strict";ln.exports="data:image/png;base64,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"},96908:function(ln){"use strict";ln.exports="data:image/png;base64,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"},57177:function(ln){"use strict";ln.exports="data:image/png;base64,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"},81378:function(ln){"use strict";ln.exports="data:image/png;base64,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"},17030:function(ln,ct,b){"use strict";b.d(ct,{ZP:function(){return Fs}});const m=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},de=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=oe},oe=Number.MAX_SAFE_INTEGER||9007199254740991;let ve=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}({}),G=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}({}),g=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 fe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ee={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=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_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class H{constructor(e,t,n,r=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_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,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 k(a,e,t){return(e=q(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function S(){return S=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},S.apply(null,arguments)}function w(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function C(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?w(Object(t),!0).forEach(function(n){k(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function R(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function q(a){var e=R(a,"string");return typeof e=="symbol"?e:e+""}class Q{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 n=`[${e}]:`;this.trace=K,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const K=function(){},D={trace:K,debug:K,log:K,warn:K,info:K,error:K};function $(){return S({},D)}function M(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):K}function F(a,e,t){return e[a]?e[a].bind(e):M(a,t)}const ue=$();function he(a,e,t){const n=$();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=F(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.14`)}catch(i){return $()}r.forEach(i=>{ue[i]=F(i,a)})}else S(ue,n);return n}const le=ue;function Se(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function ke(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function De(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function Me(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 n,r,i,s="",l=0;for(;l<t;){if(n=a[l++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[l++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[l++],i=a[l++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function Y(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function B(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function W(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var re={exports:{}},ie;function se(){return ie||(ie=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(d,c,p){if(p=p||{},d=d.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return d;var v=l.parseURL(d);if(!v)throw new Error("Error trying to parse base URL.");return v.path=l.normalizePath(v.path),l.buildURLFromParts(v)}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 L=l.parseURL(d);if(!L)throw new Error("Error trying to parse base URL.");if(!L.netLoc&&L.path&&L.path[0]!=="/"){var O=r.exec(L.path);L.netLoc=O[1],L.path=O[2]}L.netLoc&&!L.path&&(L.path="/");var ne={scheme:L.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(ne.netLoc=L.netLoc,T.path[0]!=="/"))if(!T.path)ne.path=L.path,T.params||(ne.params=L.params,T.query||(ne.query=L.query));else{var te=L.path,Ae=te.substring(0,te.lastIndexOf("/")+1)+T.path;ne.path=l.normalizePath(Ae)}return ne.path===null&&(ne.path=p.alwaysNormalize?l.normalizePath(T.path):T.path),l.buildURLFromParts(ne)},parseURL:function(d){var c=n.exec(d);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(i,"");d.length!==(d=d.replace(s,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};a.exports=l})()}(re)),re.exports}var x=se();class E{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var V={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class me{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,Qe(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[V.AUDIO]:null,[V.VIDEO]:null,[V.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new E),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[V.AUDIO]=null,e[V.VIDEO]=null,e[V.AUDIOVIDEO]=null}}function ze(a){return a.sn!=="initSegment"}class Xe extends me{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(m(e)&&m(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 n=Object.keys(t);if(n.length===1){const r=this._decryptdata=t[n[0]]||null;r&&(this._decryptdata=r.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=m(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 n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[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(!m(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return ze(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 n;const r=t[e];r&&!((n=this._decryptdata)!=null&&n.keyId)&&(this._decryptdata=r.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:l}=this,d=l[e];if(!d){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,n),d.startDTS=Math.min(d.startDTS,r),d.endDTS=Math.max(d.endDTS,i)}}class _e extends me{constructor(e,t,n,r,i){super(n),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=r;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 Ke(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Ke(t,e)}}function Qe(a,e){const t=Ke(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const st=Math.pow(2,32)-1,rt=[].push,Vt={video:1,audio:2,id3:3,text:4};function qe(a){return String.fromCharCode.apply(null,a)}function Kt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function je(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function Tt(a,e){let t=je(a,e);return t*=Math.pow(2,32),t+=je(a,e+4),t}function Re(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Ce(a){const e=a.byteLength;for(let t=0;t<e;){const n=je(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function ce(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=je(a,r),s=qe(a.subarray(r+4,r+8)),l=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,l));else{const d=ce(a.subarray(r+8,l),e.slice(1));d.length&&rt.apply(t,d)}r=l}return t}function Je(a){const e=[],t=a[0];let n=8;const r=je(a,n);n+=4;let i=0,s=0;t===0?(i=je(a,n),s=je(a,n+4),n+=8):(i=Tt(a,n),s=Tt(a,n+8),n+=16),n+=2;let l=a.length+s;const d=Kt(a,n);n+=2;for(let c=0;c<d;c++){let p=n;const v=je(a,p);p+=4;const T=v&2147483647;if((v&2147483648)>>>31===1)return le.warn("SIDX has hierarchical references (not supported)"),null;const O=je(a,p);p+=4,e.push({referenceSize:T,subsegmentDuration:O,info:{duration:O/r,start:l,end:l+T-1}}),l+=T,p+=4,n=p}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function Le(a){const e=[],t=ce(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=ce(i,["tkhd"])[0];if(s){let l=s[0];const d=je(s,l===0?12:20),c=ce(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=je(c,l===0?12:20),v=ce(i,["mdia","hdlr"])[0];if(v){const T=qe(v.subarray(8,12)),L={soun:V.AUDIO,vide:V.VIDEO}[T],O=ce(i,["mdia","minf","stbl","stsd"])[0],ne=Ie(O);L?(e[d]={timescale:p,type:L,stsd:ne},e[L]=C({timescale:p,id:d},ne)):e[d]={timescale:p,type:T,stsd:ne}}}}}return ce(a,["moov","mvex","trex"]).forEach(r=>{const i=je(r,4),s=e[i];s&&(s.default={duration:je(r,12),flags:je(r,20)})}),e}function Ie(a){const e=a.subarray(8),t=e.subarray(86),n=qe(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=ce(e,[n])[0].subarray(n==="enca"?28:78);ce(c,["sinf"]).forEach(v=>{const T=ce(v,["schm"])[0];if(T){const L=qe(T.subarray(4,8));if(L==="cbcs"||L==="cenc"){const O=ce(v,["frma"])[0];O&&(r=qe(O))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const d=ce(t,["avcC"])[0];d&&d.length>3&&(r+="."+He(d[1])+He(d[2])+He(d[3]),i=P(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const d=ce(e,[n])[0],c=ce(d.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=xe(c,p),p+=2;const v=c[p++];if(v&128&&(p+=2),v&64&&(p+=c[p++]),c[p++]!==4)break;p=xe(c,p);const T=c[p++];if(T===64)r+="."+He(T);else break;if(p+=12,c[p++]!==5)break;p=xe(c,p);const L=c[p++];let O=(L&248)>>3;O===31&&(O+=1+((L&7)<<3)+((c[p]&224)>>5)),r+="."+O}break}case"hvc1":case"hev1":{const d=ce(t,["hvcC"])[0];if(d&&d.length>12){const c=d[1],p=["","A","B","C"][c>>6],v=c&31,T=je(d,2),L=(c&32)>>5?"H":"L",O=d[12],ne=d.subarray(6,12);r+="."+p+v,r+="."+pe(T).toString(16).toUpperCase(),r+="."+L+O;let te="";for(let Ae=ne.length;Ae--;){const Fe=ne[Ae];(Fe||te)&&(te="."+Fe.toString(16).toUpperCase()+te)}r+=te}i=P(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=P(r,t)||r;break}case"vp09":{const d=ce(t,["vpcC"])[0];if(d&&d.length>6){const c=d[4],p=d[5],v=d[6]>>4&15;r+="."+et(c)+"."+et(p)+"."+et(v)}break}case"av01":{const d=ce(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,p=d[1]&31,v=d[2]>>>7?"H":"M",T=(d[2]&64)>>6,L=(d[2]&32)>>5,O=c===2&&T?L?12:10:T?10:8,ne=(d[2]&16)>>4,te=(d[2]&8)>>3,Ae=(d[2]&4)>>2,Fe=d[2]&3;r+="."+c+"."+et(p)+v+"."+et(O)+"."+ne+"."+te+Ae+Fe+"."+et(1)+"."+et(1)+"."+et(1)+"."+0,i=P("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function P(a,e){const t=ce(e,["dvvC"]),n=t.length?t[0]:ce(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+et(r)+"."+et(i)}}function pe(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function xe(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function He(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function et(a){return(a<10?"0":"")+a}function ut(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&Lt(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(le.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${Y(i)} -> ${Y(t)}`),n.set(t,8))})}function xt(a){const e=[];return Lt(a,t=>e.push(t.subarray(8,24))),e}function Lt(a,e){ce(a,["moov","trak"]).forEach(n=>{const r=ce(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=ce(i,["enca"]);const l=s.length>0;l||(s=ce(i,["encv"])),s.forEach(d=>{const c=l?d.subarray(28):d.subarray(78);ce(c,["sinf"]).forEach(v=>{const T=Et(v);T&&e(T,l)})})})}function Et(a){const e=ce(a,["schm"])[0];if(e){const t=qe(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=ce(a,["schi","tenc"])[0];if(n)return n}}}function Mt(a,e,t){const n={},r=ce(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],l=ce(s,["tfhd"])[0],d=je(l,4),c=e[d];if(!c)continue;n[d]||(n[d]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=n[d],v=ce(s,["tfdt"])[0];if(v){const Ue=v[0];let lt=je(v,4);Ue===1&&(lt===st?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(lt*=st+1,lt+=je(v,8))),m(lt)&&(!m(p.start)||lt<p.start)&&(p.start=lt)}const T=c.default,L=je(l,0)|(T==null?void 0:T.flags);let O=(T==null?void 0:T.duration)||0;L&8&&(L&2?O=je(l,12):O=je(l,8));const ne=ce(s,["trun"]);let te=p.start||0,Ae=0,Fe=O;for(let Ue=0;Ue<ne.length;Ue++){const lt=ne[Ue],yt=je(lt,4),Qt=p.sampleCount;p.sampleCount+=yt;const At=lt[3]&1,Zt=lt[3]&4,Wt=lt[2]&1,Bt=lt[2]&2,dn=lt[2]&4,Ln=lt[2]&8;let Vn=8,or=yt;for(At&&(Vn+=4),Zt&&yt&&(!(lt[Vn+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=Qt),Vn+=4,Wt?(Fe=je(lt,Vn),Vn+=4):Fe=O,Bt&&(Vn+=4),Ln&&(Vn+=4),te+=Fe,Ae+=Fe,or--);or--;)Wt?(Fe=je(lt,Vn),Vn+=4):Fe=O,Bt&&(Vn+=4),dn&&(lt[Vn+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(or+1),p.keyFrameStart=te),Vn+=4),Ln&&(Vn+=4),te+=Fe,Ae+=Fe;!Ae&&O&&(Ae+=O*yt)}p.duration+=Ae}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const l=ce(a,["sidx"]);for(let d=0;d<l.length;d++){const c=Je(l[d]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((v,T)=>v+T.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&m(s)&&Object.keys(n).forEach(d=>{n[d].duration||(n[d].duration=s*n[d].timescale-n[d].start)})}return n}function Yt(a){const e={valid:null,remainder:null},t=ce(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function jt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function $t(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return ce(n,["moof"]).map(d=>{const c=d.byteOffset-8;ce(d,["traf"]).map(v=>{const T=ce(v,["tfdt"]).map(L=>{const O=L[0];let ne=je(L,4);return O===1&&(ne*=Math.pow(2,32),ne+=je(L,8)),ne/r})[0];return T!==void 0&&(a=T),ce(v,["tfhd"]).map(L=>{const O=je(L,4),ne=je(L,0)&16777215,te=(ne&1)!==0,Ae=(ne&2)!==0,Fe=(ne&8)!==0;let Ue=0;const lt=(ne&16)!==0;let yt=0;const Qt=(ne&32)!==0;let At=8;O===i&&(te&&(At+=8),Ae&&(At+=4),Fe&&(Ue=je(L,At),At+=4),lt&&(yt=je(L,At),At+=4),Qt&&(At+=4),e.type==="video"&&(s=it(e.codec)),ce(v,["trun"]).map(Zt=>{const Wt=Zt[0],Bt=je(Zt,0)&16777215,dn=(Bt&1)!==0;let Ln=0;const Vn=(Bt&4)!==0,or=(Bt&256)!==0;let Zn=0;const wn=(Bt&512)!==0;let Qn=0;const zn=(Bt&1024)!==0,tr=(Bt&2048)!==0;let mr=0;const Dn=je(Zt,4);let In=8;dn&&(Ln=je(Zt,In),In+=4),Vn&&(In+=4);let Ar=Ln+c;for(let Nr=0;Nr<Dn;Nr++){if(or?(Zn=je(Zt,In),In+=4):Zn=Ue,wn?(Qn=je(Zt,In),In+=4):Qn=yt,zn&&(In+=4),tr&&(Wt===0?mr=je(Zt,In):mr=Re(Zt,In),In+=4),e.type===V.VIDEO){let Tr=0;for(;Tr<Qn;){const Rr=je(n,Ar);if(Ar+=4,It(s,n[Ar])){const Si=n.subarray(Ar,Ar+Rr);Rt(Si,s?2:1,a+mr/r,t)}Ar+=Rr,Tr+=Rr+4}}a+=Zn/r}}))})})}),t}function it(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function It(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Rt(a,e,t,n){const r=ye(a);let i=0;i+=e;let s=0,l=0,d=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;d=r[i++],s+=d}while(d===255);l=0;do{if(i>=r.length)break;d=r[i++],l+=d}while(d===255);const c=r.length-i;let p=i;if(l<c)i+=l;else if(l>c){le.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const T=Kt(r,p);if(p+=2,T===49){const L=je(r,p);if(p+=4,L===1195456820){const O=r[p++];if(O===3){const ne=r[p++],te=31&ne,Ae=64&ne,Fe=Ae?2+te*3:0,Ue=new Uint8Array(Fe);if(Ae){Ue[0]=ne;for(let lt=1;lt<Fe;lt++)Ue[lt]=r[p++]}n.push({type:O,payloadType:s,pts:t,bytes:Ue})}}}}}else if(s===5&&l>16){const v=[];for(let O=0;O<16;O++){const ne=r[p++].toString(16);v.push(ne.length==1?"0"+ne:ne),(O===3||O===5||O===7||O===9)&&v.push("-")}const T=l-16,L=new Uint8Array(T);for(let O=0;O<T;O++)L[O]=r[p++];n.push({payloadType:s,pts:t,uuid:v.join(""),userData:Me(L),userDataBytes:L})}}}function ye(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function Ve(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,d=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";)n+=qe(a.subarray(c,c+1)),c+=1;n+=qe(a.subarray(c,c+1)),c+=1,r=je(a,12),i=je(a,16),l=je(a,20),d=je(a,24),c=28}else if(e===1){c+=4,r=je(a,c),c+=4;const v=je(a,c);c+=4;const T=je(a,c);for(c+=4,s=bu(2,32)*v+T,de(s)||(s=Number.MAX_SAFE_INTEGER,le.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=je(a,c),c+=4,d=je(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";)n+=qe(a.subarray(c,c+1)),c+=1;n+=qe(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:d,payload:p}}function _(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function A(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>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([n,0,0,0]),a,i,r,s,t)}function Oe(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=N(r);e.push(i),n+=i.size}}return e}function N(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};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=Y(new Uint8Array(s,t+12,16));let d=null,c=null,p=0;if(i===0)p=28;else{const T=a.getUint32(28);if(!T||n<32+T*16)return{offset:t,size:e};d=[];for(let L=0;L<T;L++)d.push(new Uint8Array(s,t+32+L*16,16));p=32+T*16}if(!p)return{offset:t,size:e};const v=a.getUint32(p);return e-32<v?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,v),{version:i,systemId:l,kids:d,data:c,offset:t,size:e})}const ae=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),St={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Ee(a,e){const t=St[e];return!!t&&!!t[a.slice(0,4)]}function $e(a,e,t=!0){return!a.split(",").some(n=>!Ge(n,e,t))}function Ge(a,e,t=!0){var n;const r=Se(t);return(n=r==null?void 0:r.isTypeSupported(Z(a,e)))!=null?n:!1}function Z(a,e){return`${e}/mp4;codecs=${a}`}function J(a){if(a){const e=a.substring(0,4);return St.video[e]}return 2}function be(a){const e=ae();return a.split(",").reduce((t,n)=>{const i=e&&it(n)?9:St.video[n];return i?(i*2+t)/(t?3:2):(St.audio[n]+t)/(t?2:1)},0)}const Pe={};function j(a,e=!0){if(Pe[a])return Pe[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(Ge(t[r],"audio",e))return Pe[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Se(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const Ye=/flac|opus|mp4a\.40\.34/i;function X(a,e=!0){return a.replace(Ye,t=>j(t.toLowerCase(),e))}function tt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Ee(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Ot(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Xt(a,"audio")||Xt(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function Xt(a,e){return Ee(a,e)&&Ge(a,e)}function pn(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[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 n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function nn(a){const e=Se(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function xn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Un={supported:!0,powerEfficient:!0,smooth:!0},un={supported:!1,smooth:!1,powerEfficient:!1},On={supported:!0,configurations:[],decodingInfoResults:[Un]};function en(a,e){return{supported:!1,configurations:e,decodingInfoResults:[un],error:a}}function Ut(a,e,t,n,r,i){const s=a.videoCodec,l=a.audioCodec?a.audioGroups:null,d=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):d?1/0:2;let v=null;if(l!=null&&l.length)try{l.length===1&&l[0]?v=e.groups[l[0]].channels:v=l.reduce((T,L)=>{if(L){const O=e.groups[L];if(!O)throw new Error(`Audio track group ${L} not found`);Object.keys(O.channels).forEach(ne=>{T[ne]=(T[ne]||0)+O.channels[ne]})}return T},{2:0})}catch(T){return!0}return s!==void 0&&(s.split(",").some(T=>it(T))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!v&&m(p)&&Object.keys(v).some(T=>parseInt(T)>p)}function Pt(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(On);const i=[],s=an(a),l=s.length,d=rn(a,e,l>0),c=d.length;for(let p=l||1*c||1;p--;){const v={type:"media-source"};if(l&&(v.video=s[p%l]),c){v.audio=d[p%c];const T=v.audio.bitrate;v.video&&T&&(v.video.bitrate-=T)}i.push(v)}if(r){const p=navigator.userAgent;if(r.split(",").some(v=>it(v))&&ae())return Promise.resolve(en(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const v=Ne(p);return n[v]||(n[v]=t.decodingInfo(p))})).then(p=>({supported:!p.some(v=>!v.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function an(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=ir(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(d=>{const c={contentType:Z(qt(d),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function rn(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=ir(a);return r&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var d;const c=l?(d=e.groups[l])==null?void 0:d.tracks:null;return c?c.reduce((p,v)=>{if(v.groupId===l){const T=parseFloat(v.channels||"");r.forEach(L=>{const O={contentType:Z(L,"audio"),bitrate:t?An(L,i):i};T&&(O.channels=""+T),p.push(O)})}return p},s):s},[]):[]}function An(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 ir(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Ne(a){let e="";const{audio:t,video:n}=a;if(n){const r=xn(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=xn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const mt=["NONE","TYPE-0","TYPE-1",null];function wt(a){return mt.indexOf(a)>-1}const ht=["SDR","PQ","HLG"];function we(a){return!!a&&ht.indexOf(a)>-1}var at={No:"",Yes:"YES",v2:"v2"};function gt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?at.v2:at.Yes:at.No}class Dt{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}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 bt{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(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.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 Ft(this._audioGroups,e)}hasSubtitleGroup(e){return Ft(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.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 Ft(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function zt(){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 _t(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||ht.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&zt(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const We=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},nt=(a,e)=>JSON.stringify(a,We(e));function Ct(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,d=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let p=!1,v=!1,T=1/0,L=1/0,O=1/0,ne=1/0,te=0,Ae=[];const{preferHDR:Fe,allowedVideoRanges:Ue}=_t(e,r);for(let Zt=i.length;Zt--;){const Wt=a[i[Zt]];p||(p=Wt.channels[2]>0),T=Math.min(T,Wt.minHeight),L=Math.min(L,Wt.minFramerate),O=Math.min(O,Wt.minBitrate),Ue.filter(dn=>Wt.videoRanges[dn]>0).length>0&&(v=!0)}T=m(T)?T:0,L=m(L)?L:0;const lt=Math.max(1080,T),yt=Math.max(30,L);O=m(O)?O:t,t=Math.max(O,t),v||(e=void 0);const Qt=i.length>1;return{codecSet:i.reduce((Zt,Wt)=>{const Bt=a[Wt];if(Wt===Zt)return Zt;if(Ae=v?Ue.filter(dn=>Bt.videoRanges[dn]>0):[],Qt){if(Bt.minBitrate>t)return ot(Wt,`min bitrate of ${Bt.minBitrate} > current estimate of ${t}`),Zt;if(!Bt.hasDefaultAudio)return ot(Wt,"no renditions with default or auto-select sound found"),Zt;if(l&&Wt.indexOf(l.substring(0,4))%5!==0)return ot(Wt,`audio codec preference "${l}" not found`),Zt;if(s&&!c){if(!Bt.channels[s])return ot(Wt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Bt.channels)})`),Zt}else if((!l||c)&&p&&Bt.channels[2]===0)return ot(Wt,"no renditions with stereo sound found"),Zt;if(Bt.minHeight>lt)return ot(Wt,`min resolution of ${Bt.minHeight} > maximum of ${lt}`),Zt;if(Bt.minFramerate>yt)return ot(Wt,`min framerate of ${Bt.minFramerate} > maximum of ${yt}`),Zt;if(!Ae.some(dn=>Bt.videoRanges[dn]>0))return ot(Wt,`no variants with VIDEO-RANGE of ${nt(Ae)} found`),Zt;if(d&&Wt.indexOf(d.substring(0,4))%5!==0)return ot(Wt,`video codec preference "${d}" not found`),Zt;if(Bt.maxScore<te)return ot(Wt,`max score of ${Bt.maxScore} < selected max of ${te}`),Zt}return Zt&&(be(Wt)>=be(Zt)||Bt.fragmentError>a[Zt].fragmentError)?Zt:(ne=Bt.minIndex,te=Bt.maxScore,Wt)},void 0),videoRanges:Ae,preferHDR:Fe,minFramerate:L,minBitrate:O,minIndex:ne}}function ot(a,e){le.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function dt(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function kt(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let d=r[i.codecSet];d||(r[i.codecSet]=d={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),d.minBitrate=Math.min(d.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return d.minHeight=Math.min(d.minHeight,c),d.minFramerate=Math.min(d.minFramerate,i.frameRate),d.minIndex=Math.min(d.minIndex,s),d.maxScore=Math.max(d.maxScore,i.score),d.fragmentError+=i.fragmentError,d.videoRanges[i.videoRange]=(d.videoRanges[i.videoRange]||0)+1,l&&l.forEach(p=>{if(!p)return;const v=e.groups[p];v&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?v.hasDefault:v.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(v.channels).forEach(T=>{d.channels[T]=(d.channels[T]||0)+v.channels[T]}))}),r},{})}function Gt(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function Ht(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(hn(a,r,t))return n}return-1}function hn(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,d=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||cn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||En(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function cn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function En(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function vn(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function on(a,e,t,n,r){const i=e[n],l=e.reduce((T,L,O)=>{const ne=L.uri;return(T[ne]||(T[ne]=[])).push(O),T},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const d=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),v=tn(e,n,T=>{if(T.videoRange!==d||T.frameRate!==c||T.codecSet.substring(0,4)!==p)return!1;const L=T.audioGroups,O=t.filter(ne=>!L||L.indexOf(ne.groupId)!==-1);return Ht(a,O,r)>-1});return v>-1?v:tn(e,n,T=>{const L=T.audioGroups,O=t.filter(ne=>!L||L.indexOf(ne.groupId)!==-1);return Ht(a,O,r)>-1})}function tn(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function Tn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Sn extends Q{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 n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:d}=s;if(!r||!d)return;const c=performance.now(),p=i?i.stats:r.stats,v=i?i.duration:r.duration,T=c-p.loading.start,L=s.minAutoLevel,O=r.level,ne=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||O<=L){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const te=ne>-1&&ne!==O,Ae=!!t||te;if(!Ae&&(d.paused||!d.playbackRate||!d.readyState))return;const Fe=s.mainForwardBufferInfo;if(!Ae&&Fe===null)return;const Ue=this.bwEstimator.getEstimateTTFB(),lt=Math.abs(d.playbackRate);if(T<=Math.max(Ue,1e3*(v/(lt*2))))return;const yt=Fe?Fe.len/lt:0,Qt=p.loading.first?p.loading.first-p.loading.start:-1,At=p.loaded&&Qt>-1,Zt=this.getBwEstimate(),Wt=s.levels,Bt=Wt[O],dn=Math.max(p.loaded,Math.round(v*(r.bitrate||Bt.averageBitrate)/8));let Ln=At?T-Qt:T;Ln<1&&At&&(Ln=Math.min(T,p.loaded*8/Zt));const Vn=At?p.loaded*1e3/Ln:0,or=Ue/1e3,Zn=Vn?(dn-p.loaded)/Vn:dn*8/Zt+or;if(Zn<=yt)return;const wn=Vn?Vn*8:Zt,Qn=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,zn=this.hls.config.abrBandWidthUpFactor;let tr=Number.POSITIVE_INFINITY,mr;for(mr=O-1;mr>L;mr--){const Nr=Wt[mr].maxBitrate,Tr=!Wt[mr].details||Qn;if(tr=this.getTimeToLoadFrag(or,wn,v*Nr,Tr),tr<Math.min(yt,v+or))break}if(tr>=Zn||tr>v*10)return;At?this.bwEstimator.sample(T-Math.min(Ue,Qt),p.loaded):this.bwEstimator.sampleTTFB(T);const Dn=Wt[mr].maxBitrate;this.getBwEstimate()*zn>Dn&&this.resetEstimator(Dn);const In=this.findBestLevel(Dn,L,mr,0,yt,1,1);In>-1&&(mr=In),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${O} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${yt.toFixed(3)} s
Estimated load time for current fragment: ${Zn.toFixed(3)} s
Estimated load time for down switch fragment: ${tr.toFixed(3)} s
TTFB estimate: ${Qt|0} ms
Current BW estimate: ${m(Zt)?Zt|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${mr} @ ${Dn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=mr,this.clearTimer();const Ar=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===mr&&mr>0){const Nr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${mr>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${Nr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,mr>L){let Tr=this.findBestLevel(this.hls.levels[L].bitrate,L,mr,0,Nr,1,1);Tr===-1&&(Tr=L),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Tr,this.resetEstimator(this.hls.levels[Tr].bitrate)}}};te||Zn>tr*2?Ar():this.timer=self.setInterval(Ar,tr*1e3),s.trigger(g.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:p})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new H(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.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 n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r: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 G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case G.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),l=i?i.stats:n.stats,d=s-l.loading.start,c=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&c>-1){const v=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(v,c),l.loaded)}else this.bwEstimator.sampleTTFB(d)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;m(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===ee.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],l=(s.loaded?s.loaded.bytes:0)+r.loaded,d=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:d},s.realBitrate=Math.round(8*l/d)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(g.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))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(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ee.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,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,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?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:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,l=t?t.duration:e?e.duration:0,d=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(c){const te=this.findBestLevel(d,s,r,c,0,p,v);if(te>=0)return this.rebufferNotice=-1,te}let T=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const te=this.bitrateTestDelay;te&&(T=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-te,this.info(`bitrate test took ${Math.round(1e3*te)}ms, set first fragment max fetchDuration to ${Math.round(1e3*T)} ms`),p=v=1)}const L=this.findBestLevel(d,s,r,c,T,p,v);if(this.rebufferNotice!==L&&(this.rebufferNotice=L,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${L}`)),L>-1)return L;const O=n.levels[s],ne=n.loadLevelObj;return ne&&(O==null?void 0:O.bitrate)<ne.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,l){var d;const c=r+i,p=this.lastLoadedFragLevel,v=p===-1?this.hls.firstLevel:p,{fragCurrent:T,partCurrent:L}=this,{levels:O,allAudioTracks:ne,loadLevel:te,config:Ae}=this.hls;if(O.length===1)return 0;const Fe=O[v],Ue=!!((d=this.hls.latestLevelDetails)!=null&&d.live),lt=te===-1||p===-1;let yt,Qt="SDR",At=(Fe==null?void 0:Fe.frameRate)||0;const{audioPreference:Zt,videoPreference:Wt}=Ae,Bt=this.audioTracksByGroup||(this.audioTracksByGroup=dt(ne));let dn=-1;if(lt){if(this.firstSelection!==-1)return this.firstSelection;const wn=this.codecTiers||(this.codecTiers=kt(O,Bt,t,n)),Qn=Ct(wn,Qt,e,Zt,Wt),{codecSet:zn,videoRanges:tr,minFramerate:mr,minBitrate:Dn,minIndex:In,preferHDR:Ar}=Qn;dn=In,yt=zn,Qt=Ar?tr[tr.length-1]:tr[0],At=mr,e=Math.max(e,Dn),this.log(`picked start tier ${nt(Qn)}`)}else yt=Fe==null?void 0:Fe.codecSet,Qt=Fe==null?void 0:Fe.videoRange;const Ln=L?L.duration:T?T.duration:0,Vn=this.bwEstimator.getEstimateTTFB()/1e3,or=[];for(let wn=n;wn>=t;wn--){var Zn;const Qn=O[wn],zn=wn>v;if(!Qn)continue;if(Ae.useMediaCapabilities&&!Qn.supportedResult&&!Qn.supportedPromise){const Tr=navigator.mediaCapabilities;typeof(Tr==null?void 0:Tr.decodingInfo)=="function"&&Ut(Qn,Bt,Qt,At,e,Zt)?(Qn.supportedPromise=Pt(Qn,Bt,Tr,this.supportedCache),Qn.supportedPromise.then(Rr=>{if(!this.hls)return;Qn.supportedResult=Rr;const Si=this.hls.levels,xi=Si.indexOf(Qn);Rr.error?this.warn(`MediaCapabilities decodingInfo error: "${Rr.error}" for level ${xi} ${nt(Rr)}`):Rr.supported?Rr.decodingInfoResults.some(Zi=>Zi.smooth===!1||Zi.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${xi} not smooth or powerEfficient: ${nt(Rr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${xi} ${nt(Rr)}`),xi>-1&&Si.length>1&&(this.log(`Removing unsupported level ${xi}`),this.hls.removeLevel(xi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Rr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Rr}`)})):Qn.supportedResult=On}if((yt&&Qn.codecSet!==yt||Qt&&Qn.videoRange!==Qt||zn&&At>Qn.frameRate||!zn&&At>0&&At<Qn.frameRate||(Zn=Qn.supportedResult)!=null&&(Zn=Zn.decodingInfoResults)!=null&&Zn.some(Tr=>Tr.smooth===!1))&&(!lt||wn!==dn)){or.push(wn);continue}const tr=Qn.details,mr=(L?tr==null?void 0:tr.partTarget:tr==null?void 0:tr.averagetargetduration)||Ln;let Dn;zn?Dn=l*e:Dn=s*e;const In=Ln&&r>=Ln*2&&i===0?Qn.averageBitrate:Qn.maxBitrate,Ar=this.getTimeToLoadFrag(Vn,Dn,In*mr,tr===void 0);if(Dn>=In&&(wn===p||Qn.loadError===0&&Qn.fragmentError===0)&&(Ar<=Vn||!m(Ar)||Ue&&!this.bitrateTestDelay||Ar<c)){const Tr=this.forcedAutoLevel;return wn!==te&&(Tr===-1||Tr!==te)&&(or.length&&this.trace(`Skipped level(s) ${or.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${O[or[0]].codecs}" ${O[or[0]].videoRange}; not compatible with "${yt}" ${Qt}`),this.info(`switch candidate:${v}->${wn} adjustedbw(${Math.round(Dn)})-bitrate=${Math.round(Dn-In)} ttfb:${Vn.toFixed(1)} avgDuration:${mr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${Ar.toFixed(1)} firstSelection:${lt} codecSet:${Qn.codecSet} videoRange:${Qn.videoRange} hls.loadLevel:${te}`)),lt&&(this.firstSelection=wn),wn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const bn={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function Pn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!m(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(Wn(e,t,s))return s}return null}function Hn(a,e,t=0,n=0,r=.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)&&jn(t,n,i)===0||Bn(i,a,Math.min(r,n))))return i;const s=bn.search(e,jn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Bn(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function jn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function Wn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function nr(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return bn.search(n,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 Nn(a){switch(a.details){case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_TIMEOUT:case G.LEVEL_LOAD_TIMEOUT:case G.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function fr(a){return a.details.startsWith("key")}function pt(a){return fr(a)&&!!a.frag&&!a.frag.decryptdata}function kn(a,e){const t=Nn(e);return a.default[`${t?"timeout":"error"}Retry`]}function sr(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function xr(a){return C(C({},a),{errorRetry:null,timeoutRetry:null})}function _r(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(br(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function br(a){return Rn(a)||!!a&&(a<400||a>499)}function Rn(a){return a===0&&navigator.onLine===!1}var gn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Mn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class ar extends Q{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(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.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)===ee.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.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 n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case G.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Kn();return}case G.FRAG_GAP:case G.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=gn.SendAlternateToPenaltyBox;return}case G.LEVEL_EMPTY_ERROR:case G.LEVEL_PARSING_ERROR:{var s;const d=t.parent===ee.MAIN?t.level:r.loadLevel;t.details===G.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,d):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,d))}return;case G.LEVEL_LOAD_ERROR:case G.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case G.AUDIO_TRACK_LOAD_ERROR:case G.AUDIO_TRACK_LOAD_TIMEOUT:case G.SUBTITLE_LOAD_ERROR:case G.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const d=r.loadLevelObj;if(d&&(i.type===fe.AUDIO_TRACK&&d.hasAudioGroup(i.groupId)||i.type===fe.SUBTITLE_TRACK&&d.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=gn.SendAlternateToPenaltyBox,t.errorAction.flags=Mn.MoveAllAlternatesMatchingHost;return}}return;case G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:gn.SendAlternateToPenaltyBox,flags:Mn.MoveAllAlternatesMatchingHDCP};return;case G.KEY_SYSTEM_SESSION_UPDATE_FAILED:case G.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case G.KEY_SYSTEM_NO_SESSION:t.errorAction={action:gn.SendAlternateToPenaltyBox,flags:Mn.MoveAllAlternatesMatchingKey};return;case G.BUFFER_ADD_CODEC_ERROR:case G.REMUX_ALLOC_ERROR:case G.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case G.INTERNAL_EXCEPTION:case G.BUFFER_APPENDING_ERROR:case G.BUFFER_FULL_ERROR:case G.LEVEL_SWITCH_ERROR:case G.BUFFER_STALLED_ERROR:case G.BUFFER_SEEK_OVER_HOLE:case G.BUFFER_NUDGE_ON_STALL:t.errorAction=Kn();return}t.type===ve.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=Kn())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=kn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(_r(r,i,Nn(e),e.response))return{action:gn.RetryRequest,flags:Mn.None,retryConfig:r,retryCount:i};const l=this.getLevelSwitchAction(e,t);return r&&(l.retryConfig=r,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=kn(fr(e)?s:i,e),d=t.levels.reduce((p,v)=>p+v.fragmentError,0);if(r&&(e.details!==G.FRAG_GAP&&r.fragmentError++,!pt(e)&&_r(l,d,Nn(e),e.response)))return{action:gn.RetryRequest,flags:Mn.None,retryConfig:l,retryCount:d};const c=this.getLevelSwitchAction(e,n);return l&&(c.retryConfig=l,c.retryCount=d),c}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const c=e.details;r.loadError++,c===G.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-1;const{levels:v,loadLevel:T,minAutoLevel:L,maxAutoLevel:O}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const ne=(i=e.frag)==null?void 0:i.type,Ae=(ne===ee.AUDIO&&c===G.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===G.BUFFER_ADD_CODEC_ERROR||c===G.BUFFER_APPEND_ERROR))&&v.some(({audioCodec:Qt})=>r.audioCodec!==Qt),Ue=e.sourceBufferName==="video"&&(c===G.BUFFER_ADD_CODEC_ERROR||c===G.BUFFER_APPEND_ERROR)&&v.some(({codecSet:Qt,audioCodec:At})=>r.codecSet!==Qt&&r.audioCodec===At),{type:lt,groupId:yt}=(s=e.context)!=null?s:{};for(let Qt=v.length;Qt--;){const At=(Qt+T)%v.length;if(At!==T&&At>=L&&At<=O&&v[At].loadError===0){var l,d;const Zt=v[At];if(c===G.FRAG_GAP&&ne===ee.MAIN&&e.frag){const Wt=v[At].details;if(Wt){const Bt=Hn(e.frag,Wt.fragments,e.frag.start);if(Bt!=null&&Bt.gap)continue}}else{if(lt===fe.AUDIO_TRACK&&Zt.hasAudioGroup(yt)||lt===fe.SUBTITLE_TRACK&&Zt.hasSubtitleGroup(yt))continue;if(ne===ee.AUDIO&&(l=r.audioGroups)!=null&&l.some(Wt=>Zt.hasAudioGroup(Wt))||ne===ee.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(Wt=>Zt.hasSubtitleGroup(Wt))||Ae&&r.audioCodec===Zt.audioCodec||Ue&&r.codecSet===Zt.codecSet||!Ae&&r.codecSet!==Zt.codecSet)continue}p=At;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:gn.SendAlternateToPenaltyBox,flags:Mn.None,nextAutoLevel:p}}return{action:gn.SendAlternateToPenaltyBox,flags:Mn.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case gn.DoNothing:break;case gn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==G.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 gn.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case Mn.None:this.switchLevel(e,i);break;case Mn.MoveAllAlternatesMatchingHDCP:{const d=this.getVariantLevelIndex(e.frag),c=t.levels[d],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=p,p==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(p){t.maxHdcpLevel=mt[mt.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Mn.MoveAllAlternatesMatchingKey:{const d=e.decryptdata;if(d){const c=this.hls.levels,p=c.length;for(let T=p;T--;)if(this.variantHasKey(c[T],d)){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) ${Y(d.keyId||[])}`),c[T].fragmentError++,c[T].loadError++,this.log(`Removing level ${T} with key error (${e.error})`),this.hls.removeLevel(T)}const v=e.frag;if(this.hls.levels.length<p)n.resolved=!0;else if(v&&v.type!==ee.MAIN){const T=v.decryptdata;T&&!d.matches(T)&&(n.resolved=!0)}}break}}n.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===G.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=xn(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function Kn(a){const e={action:gn.DoNothing,flags:Mn.None};return a&&(e.resolved=!0),e}var er={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Pr{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];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,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const l=r[i[s]];if((l==null?void 0:l.body.type)===t&&(!n||l.buffered)){const d=l.body;if(d.start<=e&&e<=d.end)return d}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const d=this.fragments[l];if(!d||s>=d.body.sn)return;if(!d.buffered&&(!d.loaded||i)){d.body.type===n&&this.removeFragment(d.body);return}const c=d.range[e];if(c){if(c.time.length===0){this.removeFragment(d.body);return}c.time.some(p=>{const v=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return v&&this.removeFragment(d.body),v})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Er(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const d=n.elementaryStreams[l];if(!d)return;const c=t[l],p=s||d.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),Dr(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=_n(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Er(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,d=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<r.length;p++){const v=r.start(p)-this.bufferPadding,T=r.end(p)+this.bufferPadding;if(c>=v&&d<=T){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(l,r.end(p))});break}else if(s<T&&l>v){const L=Math.max(s,r.start(p)),O=Math.min(l,r.end(p));O>L&&(i.partial=!0,i.time.push({startPTS:L,endPTS:O}))}else if(l<=v)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:d}=this;return Object.keys(d).forEach(c=>{const p=d[c];p&&Dr(p)&&(r=p.body.start-l,i=p.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=p.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Dr(t))}getState(e){const t=Er(e),n=this.fragments[t];return n?n.buffered?Dr(n)?er.PARTIAL:er.OK:er.APPENDING:er.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=Er(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const l=n.type;if(r){let c=this.activePartLists[l];c||(this.activePartLists[l]=c=[]),c.push(r)}this.timeRanges=i;const d=i[s];this.detectEvictedFragments(s,d,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Er(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];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,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const d=l.body;d.type!==n||r&&!d.gap||d.start<t&&d.end>e&&(l.buffered||i)&&this.removeFragment(d)})}removeFragment(e){const t=Er(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=_n(n,i=>i.fragment.sn!==r)}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(n=>n.clearElementaryStreamInfo())}}function Dr(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function Er(a){return`${a.type}_${a.level}_${a.sn}`}function _n(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var Gn={cbc:0,ctr:1};class qn{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case Gn.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Gn.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 wr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class qr{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),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],l=n[3],d=this.invSubMix,c=d[0],p=d[1],v=d[2],T=d[3],L=new Uint32Array(256);let O=0,ne=0,te=0;for(te=0;te<256;te++)te<128?L[te]=te<<1:L[te]=te<<1^283;for(te=0;te<256;te++){let Ae=ne^ne<<1^ne<<2^ne<<3^ne<<4;Ae=Ae>>>8^Ae&255^99,e[O]=Ae,t[Ae]=O;const Fe=L[O],Ue=L[Fe],lt=L[Ue];let yt=L[Ae]*257^Ae*16843008;r[O]=yt<<24|yt>>>8,i[O]=yt<<16|yt>>>16,s[O]=yt<<8|yt>>>24,l[O]=yt,yt=lt*16843009^Ue*65537^Fe*257^O*16843008,c[Ae]=yt<<24|yt>>>8,p[Ae]=yt<<16|yt>>>16,v[Ae]=yt<<8|yt>>>24,T[Ae]=yt,O?(O=Fe^L[L[L[lt^Fe]]],ne^=L[L[ne]]):O=ne=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)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,d;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),v=this.sBox,T=this.rcon,L=this.invSubMix,O=L[0],ne=L[1],te=L[2],Ae=L[3];let Fe,Ue;for(l=0;l<s;l++){if(l<i){Fe=c[l]=t[l];continue}Ue=Fe,l%i===0?(Ue=Ue<<8|Ue>>>24,Ue=v[Ue>>>24]<<24|v[Ue>>>16&255]<<16|v[Ue>>>8&255]<<8|v[Ue&255],Ue^=T[l/i|0]<<24):i>6&&l%i===4&&(Ue=v[Ue>>>24]<<24|v[Ue>>>16&255]<<16|v[Ue>>>8&255]<<8|v[Ue&255]),c[l]=Fe=(c[l-i]^Ue)>>>0}for(d=0;d<s;d++)l=s-d,d&3?Ue=c[l]:Ue=c[l-4],d<4||l<=4?p[d]=Ue:p[d]=O[v[Ue>>>24]]^ne[v[Ue>>>16&255]]^te[v[Ue>>>8&255]]^Ae[v[Ue&255]],p[d]=p[d]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,d=l[0],c=l[1],p=l[2],v=l[3],T=this.uint8ArrayToUint32Array_(n);let L=T[0],O=T[1],ne=T[2],te=T[3];const Ae=new Int32Array(e),Fe=new Int32Array(Ae.length);let Ue,lt,yt,Qt,At,Zt,Wt,Bt,dn,Ln,Vn,or,Zn,wn;const Qn=this.networkToHostOrderSwap;for(;t<Ae.length;){for(dn=Qn(Ae[t]),Ln=Qn(Ae[t+1]),Vn=Qn(Ae[t+2]),or=Qn(Ae[t+3]),At=dn^i[0],Zt=or^i[1],Wt=Vn^i[2],Bt=Ln^i[3],Zn=4,wn=1;wn<r;wn++)Ue=d[At>>>24]^c[Zt>>16&255]^p[Wt>>8&255]^v[Bt&255]^i[Zn],lt=d[Zt>>>24]^c[Wt>>16&255]^p[Bt>>8&255]^v[At&255]^i[Zn+1],yt=d[Wt>>>24]^c[Bt>>16&255]^p[At>>8&255]^v[Zt&255]^i[Zn+2],Qt=d[Bt>>>24]^c[At>>16&255]^p[Zt>>8&255]^v[Wt&255]^i[Zn+3],At=Ue,Zt=lt,Wt=yt,Bt=Qt,Zn=Zn+4;Ue=s[At>>>24]<<24^s[Zt>>16&255]<<16^s[Wt>>8&255]<<8^s[Bt&255]^i[Zn],lt=s[Zt>>>24]<<24^s[Wt>>16&255]<<16^s[Bt>>8&255]<<8^s[At&255]^i[Zn+1],yt=s[Wt>>>24]<<24^s[Bt>>16&255]<<16^s[At>>8&255]<<8^s[Zt&255]^i[Zn+2],Qt=s[Bt>>>24]<<24^s[At>>16&255]<<16^s[Zt>>8&255]<<8^s[Wt&255]^i[Zn+3],Fe[t]=Qn(Ue^L),Fe[t+1]=Qn(Qt^O),Fe[t+2]=Qn(yt^ne),Fe[t+3]=Qn(lt^te),L=dn,O=Ln,ne=Vn,te=or,t=t+4}return Fe.buffer}}class Yr{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=kr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function kr(a){switch(a){case Gn.cbc:return"AES-CBC";case Gn.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Zr=16;class Sr{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 n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}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 n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?wr(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,n,r);const d=this.flush();d?i(d.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:l}=this;if(r!==Gn.cbc||t.byteLength!==16)return le.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=jt(l,e),this.remainderData=null);const d=this.getValidChunk(e);if(!d.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new qr),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(d.buffer,0,n),this.currentIV=d.slice(-16).buffer,p||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new Yr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new qn(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(le.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);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 n=e.length-e.length%Zr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(le.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const ei=Math.pow(2,17);class $r{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 n=e.url;if(!n)return Promise.reject(new cr({type:ve.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(O=>O[0]==="GAP")){d(ai(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=jr(e);e.loader=c;const v=xr(r.fragLoadPolicy.default),T={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:ei};e.stats=c.stats;const L={onSuccess:(O,ne,te,Ae)=>{this.resetLoader(e,c);let Fe=O.data;te.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Fe.slice(0,16)),Fe=Fe.slice(16)),l({frag:e,part:null,payload:Fe,networkDetails:Ae})},onError:(O,ne,te,Ae)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:C({url:n,data:void 0},O),error:new Error(`HTTP Error ${O.code} ${O.text}`),networkDetails:te,stats:Ae}))},onAbort:(O,ne,te)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:te,stats:O}))},onTimeout:(O,ne,te)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:te,stats:O}))}};t&&(L.onProgress=(O,ne,te,Ae)=>t({frag:e,part:null,payload:te,networkDetails:Ae})),c.load(p,T,L)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){d(ai(e,t));return}const c=this.loader=i?new i(r):new s(r),p=jr(e,t);e.loader=c;const v=xr(r.fragLoadPolicy.default),T={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:ei};t.stats=c.stats,c.load(p,T,{onSuccess:(L,O,ne,te)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Ae={frag:e,part:t,payload:L.data,networkDetails:te};n(Ae),l(Ae)},onError:(L,O,ne,te)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:C({url:p.url,data:void 0},L),error:new Error(`HTTP Error ${L.code} ${L.text}`),networkDetails:ne,stats:te}))},onAbort:(L,O,ne)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:ne,stats:L}))},onTimeout:(L,O,ne)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:G.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:ne,stats:L}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const d=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),d),v=(d-c)*Math.round(n.loaded/c);n.total=n.loaded+v}else n.total=Math.max(n.loaded,n.total);const s=n.loading,l=r.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 jr(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(m(r)&&m(i)){var s;let l=r,d=i;if(a.sn==="initSegment"&&oi((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(d=i+(16-c%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=d}return n}function ai(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:ve.MEDIA_ERROR,details:G.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new cr(n)}function oi(a){return a==="AES-128"||a==="AES-256"}class cr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class ci extends Q{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 di{constructor(e,t,n,r=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=ti(),this.buffering={audio:ti(),video:ti(),audiovideo:ti()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function ti(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Hr={length:0,start:()=>0,end:()=>0};class rr{static isBuffered(e,t){if(e){const n=rr.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=rr.getBuffered(e);return rr.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=rr.bufferedRanges(e);if(r.length)return rr.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((p,v)=>p.start-v.start||v.end-p.end);let r=-1,i=[];if(n)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(r=p);const v=i.length;if(v){const T=i[v-1].end;e[p].start-T<n?e[p].end>T&&(i[v-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,d=t,c=t;for(let p=0;p<i.length;p++){const v=i[p].start,T=i[p].end;if(r===-1&&t>=v&&t<=T&&(r=p),t+n>=v&&t<T)d=v,c=T,s=c-t;else if(t+n<v){l=v;break}}return{len:s,start:d||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Hr}catch(t){return le.log("failed to get media.buffered",t),Hr}}}const Ei=/\{\$([a-zA-Z0-9-_]+)\}/g;function mn(a){return Ei.test(a)}function Xn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Ei,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function vr(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function Cr(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const ur=/^(\d+)x(\d+)$/,pr=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Fn{constructor(e,t){typeof e=="string"&&(e=Fn.parseAttrList(e,t)),S(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 n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}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 n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=ur.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(pr.lastIndex=0;(n=pr.exec(e))!==null;){const s=n[1].trim();let l=n[2];const d=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(d)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(d||c))l=Xn(t,l);else if(!c&&!d)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":le.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Fr="com.apple.hls.interstitial";function Jr(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function ni(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Xr{constructor(e,t,n=0){var r;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=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){le.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=S(new Fn({}),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"]);m(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?(le.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(m(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===Fr}get isValid(){return!!this.id&&!this._badValueForSameId&&m(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 Kr=10;class li{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>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 n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?m(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Kr}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 n=e.length;n--;)if(e[n].index>t)return e[n].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 ui(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Ai(a,e){return!a&&!e?!0:!a||!e?!1:ui(a,e)}function vi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Hi(a){switch(a){case"AES-128":case"AES-256":return Gn.cbc;case"AES-256-CTR":return Gn.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function Xi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function ki(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function yi(a){const e=ki(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function $n(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function lr(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=Xi(s)):t=yi(s)}}return t}const Ir=typeof self!="undefined"?self:void 0;var dr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},gr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ti(a){switch(a){case gr.FAIRPLAY:return dr.FAIRPLAY;case gr.PLAYREADY:return dr.PLAYREADY;case gr.WIDEVINE:return dr.WIDEVINE;case gr.CLEARKEY:return dr.CLEARKEY}}function ri(a){switch(a){case dr.FAIRPLAY:return gr.FAIRPLAY;case dr.PLAYREADY:return gr.PLAYREADY;case dr.WIDEVINE:return gr.WIDEVINE;case dr.CLEARKEY:return gr.CLEARKEY}}function Li(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[dr.FAIRPLAY,dr.WIDEVINE,dr.PLAYREADY,dr.CLEARKEY].filter(r=>!!e[r]):[];return!n[dr.WIDEVINE]&&t&&n.push(dr.WIDEVINE),n}const Ki=function(a){return Ir!=null&&(a=Ir.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function na(a,e,t,n){let r;switch(a){case dr.FAIRPLAY:r=["cenc","sinf"];break;case dr.WIDEVINE:case dr.PLAYREADY:r=["cenc"];break;case dr.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Ea(r,e,t,n)}function Ea(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function ra(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Mi(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const d=Xi(l).subarray(0,16);return $n(d),d}}return null}let Fi={};class Ci{static clearKeyUriToKeyIdMap(){Fi={}}static setKeyIdForUri(e,t){Fi[e]=t}constructor(e,t,n,r=[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=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!vi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(B(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ui(e.keyFormatVersions,this.keyFormatVersions)&&Ai(e.iv,this.iv)&&Ai(e.keyId,this.keyId)}isSupported(){if(this.method){if(vi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case gr.FAIRPLAY:case gr.WIDEVINE:case gr.PLAYREADY:case gr.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(vi(this.method)){let i=this.iv;return i||(typeof e!="number"&&(le.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Bi(e)),new Ci(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Fi[this.uri];if(i&&!ui(this.keyId,i)&&Ci.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=lr(this.uri);if(n)switch(this.keyFormat){case gr.WIDEVINE:if(this.pssh=n,!this.keyId){const i=Oe(n.buffer);if(i.length){var r;const s=i[0];this.keyId=(r=s.kids)!=null&&r.length?s.kids[0]:null}}this.keyId||(this.keyId=is(t));break;case gr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=A(i,null,n),this.keyId=Mi(n);break}default:{let i=n.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=Bs(t),i||(i=is(t),i||(i=Fi[this.uri])),i&&(this.keyId=i,Ci.setKeyIdForUri(this.uri,i))}return this}}function Bs(a){const e=a==null?void 0:a[gr.WIDEVINE];return e?e.keyId:null}function is(a){const e=a==null?void 0:a[gr.PLAYREADY];if(e){const t=lr(e.uri);if(t)return Mi(t)}return null}function Bi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const 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,_s=/#EXT-X-MEDIA:(.*)/g,Sa=/^#EXT(?:INF|-X-TARGETDURATION):/m,hs=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 Di{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return x.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Sa.test(e)}static parseMasterPlaylist(e,t){const n=mn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(Ns.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=Ns.exec(e))!=null;)if(s[1]){var l;const c=new Fn(s[1],r),p=Xn(r,s[2]),v={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Di.resolve(p,t)},T=c.decimalResolution("RESOLUTION");T&&(v.width=T.width,v.height=T.height),xs(c.CODECS,v);const L=c["SUPPLEMENTAL-CODECS"];L&&(v.supplemental={},xs(L,v.supplemental)),(l=v.unknownCodecs)!=null&&l.length||i.push(v),r.levels.push(v)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const v=new Fn(p,r),T=v["DATA-ID"];T&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[T]=v);break}case"SESSION-KEY":{const v=$s(p,t,r);v.encrypted&&v.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(v)):le.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const v=new Fn(p,r);vr(r,v,t)}break}case"CONTENT-STEERING":{const v=new Fn(p,r);r.contentSteering={uri:Di.resolve(v["SERVER-URI"],t),pathwayId:v["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=sa(p);break}}}const d=i.length>0&&i.length<r.levels.length;return r.levels=d?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.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 d=0;for(_s.lastIndex=0;(r=_s.exec(e))!==null;){const c=new Fn(r[1],n),p=c.TYPE;if(p){const v=l[p],T=i[p]||[];i[p]=T;const L=c.LANGUAGE,O=c["ASSOC-LANGUAGE"],ne=c.CHANNELS,te=c.CHARACTERISTICS,Ae=c["INSTREAM-ID"],Fe={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||L||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:L,url:c.URI?Di.resolve(c.URI,t):""};if(O&&(Fe.assocLang=O),ne&&(Fe.channels=ne),te&&(Fe.characteristics=te),Ae&&(Fe.instreamId=Ae),v!=null&&v.length){const Ue=Di.findGroup(v,Fe.groupId)||v[0];Qi(Fe,Ue,"audioCodec"),Qi(Fe,Ue,"textCodec")}T.push(Fe)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const d={url:t},c=new li(t),p=c.fragments,v=[];let T=null,L=0,O=0,ne=0,te=0,Ae=0,Fe=null,Ue=new Xe(r,d),lt,yt,Qt,At=-1,Zt=!1,Wt=null,Bt;if(hs.lastIndex=0,c.m3u8=e,c.hasVariableRefs=mn(e),((l=hs.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(lt=hs.exec(e))!==null;){Zt&&(Zt=!1,Ue=new Xe(r,d),Ue.playlistOffset=ne,Ue.setStart(ne),Ue.sn=L,Ue.cc=te,Ae&&(Ue.bitrate=Ae),Ue.level=n,T&&(Ue.initSegment=T,T.rawProgramDateTime&&(Ue.rawProgramDateTime=T.rawProgramDateTime,T.rawProgramDateTime=null),Wt&&(Ue.setByteRange(Wt),Wt=null)));const or=lt[1];if(or){Ue.duration=parseFloat(or);const Zn=(" "+lt[2]).slice(1);Ue.title=Zn||null,Ue.tagList.push(Zn?["INF",or,Zn]:["INF",or])}else if(lt[3]){if(m(Ue.duration)){Ue.playlistOffset=ne,Ue.setStart(ne),Qt&&aa(Ue,Qt,c),Ue.sn=L,Ue.level=n,Ue.cc=te,p.push(Ue);const Zn=(" "+lt[3]).slice(1);Ue.relurl=Xn(c,Zn),Oi(Ue,Fe,v),Fe=Ue,ne+=Ue.duration,L++,O=0,Zt=!0}}else{if(lt=lt[0].match(bs),!lt){le.warn("No matches on slow regex match for level playlist!");continue}for(yt=1;yt<lt.length&&lt[yt]===void 0;yt++);const Zn=(" "+lt[yt]).slice(1),wn=(" "+lt[yt+1]).slice(1),Qn=lt[yt+2]?(" "+lt[yt+2]).slice(1):null;switch(Zn){case"BYTERANGE":Fe?Ue.setByteRange(wn,Fe):Ue.setByteRange(wn);break;case"PROGRAM-DATE-TIME":Ue.rawProgramDateTime=wn,Ue.tagList.push(["PROGRAM-DATE-TIME",wn]),At===-1&&(At=p.length);break;case"PLAYLIST-TYPE":c.type&&_i(c,Zn,lt),c.type=wn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?_i(c,Zn,lt):p.length>0&&ss(c,Zn,lt),L=c.startSN=parseInt(wn);break;case"SKIP":{c.skippedSegments&&_i(c,Zn,lt);const zn=new Fn(wn,c),tr=zn.decimalInteger("SKIPPED-SEGMENTS");if(m(tr)){c.skippedSegments+=tr;for(let Dn=tr;Dn--;)p.push(null);L+=tr}const mr=zn.enumeratedString("RECENTLY-REMOVED-DATERANGES");mr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(mr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&_i(c,Zn,lt),c.targetduration=Math.max(parseInt(wn),1);break;case"VERSION":c.version!==null&&_i(c,Zn,lt),c.version=parseInt(wn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||_i(c,Zn,lt),c.live=!1;break;case"#":(wn||Qn)&&Ue.tagList.push(Qn?[wn,Qn]:[wn]);break;case"DISCONTINUITY":te++,Ue.tagList.push(["DIS"]);break;case"GAP":Ue.gap=!0,Ue.tagList.push([Zn]);break;case"BITRATE":Ue.tagList.push([Zn,wn]),Ae=parseInt(wn)*1e3,m(Ae)?Ue.bitrate=Ae:Ae=0;break;case"DATERANGE":{const zn=new Fn(wn,c),tr=new Xr(zn,c.dateRanges[zn.ID],c.dateRangeTagCount);c.dateRangeTagCount++,tr.isValid||c.skippedSegments?c.dateRanges[tr.id]=tr:le.warn(`Ignoring invalid DATERANGE tag: "${wn}"`),Ue.tagList.push(["EXT-X-DATERANGE",wn]);break}case"DEFINE":{{const zn=new Fn(wn,c);"IMPORT"in zn?Cr(c,zn,s):vr(c,zn,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?_i(c,Zn,lt):p.length>0&&ss(c,Zn,lt),c.startCC=te=parseInt(wn);break;case"KEY":{const zn=$s(wn,t,c);if(zn.isSupported()){if(zn.method==="NONE"){Qt=void 0;break}Qt||(Qt={});const tr=Qt[zn.keyFormat];tr!=null&&tr.matches(zn)||(tr&&(Qt=S({},Qt)),Qt[zn.keyFormat]=zn)}else le.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${wn}"`);break}case"START":c.startTimeOffset=sa(wn);break;case"MAP":{const zn=new Fn(wn,c);if(Ue.duration){const tr=new Xe(r,d);zs(tr,zn,n,Qt),T=tr,Ue.initSegment=T,T.rawProgramDateTime&&!Ue.rawProgramDateTime&&(Ue.rawProgramDateTime=T.rawProgramDateTime)}else{const tr=Ue.byteRangeEndOffset;if(tr){const mr=Ue.byteRangeStartOffset;Wt=`${tr-mr}@${mr}`}else Wt=null;zs(Ue,zn,n,Qt),T=Ue,Zt=!0}T.cc=te;break}case"SERVER-CONTROL":{Bt&&_i(c,Zn,lt),Bt=new Fn(wn),c.canBlockReload=Bt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Bt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Bt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Bt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Bt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&_i(c,Zn,lt);const zn=new Fn(wn);c.partTarget=zn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let zn=c.partList;zn||(zn=c.partList=[]);const tr=O>0?zn[zn.length-1]:void 0,mr=O++,Dn=new Fn(wn,c),In=new _e(Dn,Ue,d,mr,tr);zn.push(In),Ue.duration+=In.duration;break}case"PRELOAD-HINT":{const zn=new Fn(wn,c);c.preloadHint=zn;break}case"RENDITION-REPORT":{const zn=new Fn(wn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(zn);break}default:le.warn(`line parsed but not handled: ${lt}`);break}}}Fe&&!Fe.relurl?(p.pop(),ne-=Fe.duration,c.partList&&(c.fragmentHint=Fe)):c.partList&&(Oi(Ue,Fe,v),Ue.cc=te,c.fragmentHint=Ue,Qt&&aa(Ue,Qt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const dn=p.length,Ln=p[0],Vn=p[dn-1];if(ne+=c.skippedSegments*c.targetduration,ne>0&&dn&&Vn){c.averagetargetduration=ne/dn;const or=Vn.sn;c.endSN=or!=="initSegment"?or:0,c.live||(Vn.endList=!0),At>0&&(Us(p,At),Ln&&v.unshift(Ln))}return c.fragmentHint&&(ne+=c.fragmentHint.duration),c.totalduration=ne,v.length&&c.dateRangeTagCount&&Ln&&ia(v,c),c.endCC=te,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 n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let l=i.length;l--;){const d=e.dateRanges[i[l]],c=d.startDate.getTime();d.tagAnchor=n.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const v=wa(e,c,a,p,r);if(v!==-1){d.tagAnchor=e.fragments[v].ref;break}}}}function wa(a,e,t,n,r){const i=t[n];if(i){const l=i.programDateTime;if(e>=l||n===0){var s;const d=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+d*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const T=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let L=T;L>c;L--){const O=p[L].programDateTime;if(e>=O&&e<O+p[L].duration*1e3)return L}}return c}}}return-1}function $s(a,e,t){var n,r;const i=new Fn(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,d=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!d&&le.error(`Invalid IV: ${i.IV}`);const v=l?Di.resolve(l,e):"",T=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ci(s,v,p,T,d,i.KEYID)}function sa(a){const t=new Fn(a).decimalFloatingPoint("TIME-OFFSET");return m(t)?t:null}function xs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Ee(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function Qi(a,e,t){const n=e[t];n&&(a[t]=n)}function Us(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Oi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function zs(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function aa(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function _i(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(m(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}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,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let d=t,c=n;const p=e.startPTS,v=e.endPTS;if(m(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}`):m(e.deltaPTS)?e.deltaPTS=Math.max(Ae,e.deltaPTS):e.deltaPTS=Ae,d=Math.max(t,p),t=Math.min(t,p),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=Math.min(n,v),n=Math.max(n,v),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const T=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=d,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const L=e.sn;if(!a||L<a.startSN||L>a.endSN)return 0;let O;const ne=L-a.startSN,te=a.fragments;for(te[ne]=e,O=ne;O>0;O--)fs(te[O],te[O-1]);for(O=ne;O<te.length-1;O++)fs(te[O],te[O+1]);return a.fragmentHint&&fs(te[te.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,T}function oa(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let p=r.length-1;p>=0;p--){const v=r[p].initSegment;if(v){n=v;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;qi(a,e,(p,v,T,L)=>{if((!e.startCC||e.skippedSegments)&&v.cc!==p.cc){const O=p.cc-v.cc;for(let ne=T;ne<L.length;ne++)L[ne].cc+=O;e.endCC=L[L.length-1].cc}m(p.startPTS)&&m(p.endPTS)&&(v.setStart(v.startPTS=p.startPTS),v.startDTS=p.startDTS,v.maxStartPTS=p.maxStartPTS,v.endPTS=p.endPTS,v.endDTS=p.endDTS,v.minEndPTS=p.minEndPTS,v.setDuration(p.endPTS-p.startPTS),v.duration&&(i=v),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(v.elementaryStreams=p.elementaryStreams),v.loader=p.loader,p.hasStats&&(v.stats=p.stats),p.initSegment&&(v.initSegment=p.initSegment,n=p.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&l.forEach(p=>{var v;p&&(!p.initSegment||p.initSegment.relurl===((v=n)==null?void 0:v.relurl))&&(p.initSegment=n)}),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(v=>v.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let v=1;v<l.length;v++)l[v].programDateTime===null&&Oi(l[v],l[v-1],p);ia(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var d;const p=Or(a,e.startSN-1);e.startCC=(d=p==null?void 0:p.cc)!=null?d:s[0].cc}la(a.partList,e.partList,(p,v)=>{v.elementaryStreams=p.elementaryStreams,v.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:n,recentlyRemovedDateranges:r}=e,i=S({},a);r&&r.forEach(d=>{delete i[d]});const l=Object.keys(i).length;return l?(Object.keys(n).forEach(d=>{const c=i[d],p=new Xr(n[d].attr,c);p.isValid?(i[d]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${nt(n[d].attr)}"`)}),i):n}function la(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],l=e[r+n];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):n--}}}function qi(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?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,d=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=r;c<=i;c++){const p=d[s+c];let v=l[c];if(n&&!v&&p&&(v=e.fragments[c]=p),p&&v){t(p,v,c,l);const T=p.relurl,L=v.relurl;if(T&&ms(T,L)){e.playlistParsingError=Ss(`media sequence mismatch ${v.sn}:`,a,e,p,v);return}else if(p.cc!==v.cc){e.playlistParsingError=Ss(`discontinuity sequence mismatch (${p.cc}!=${v.cc})`,a,e,p,v);return}}}}function Ss(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function $i(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;js(e,s)}function js(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Lr(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function Or(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function Ur(a,e,t){return a?hi(a.partList,e,t):null}function hi(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function fi(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function ms(a,e){return a!==e&&e?ps(a)!==ps(e):!1}function ps(a){return a.replace(/\?[^?]*$/,"")}function Ji(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function Hs(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 n=0,r=t.length;n<r;n++)ws(t[n],a);e.fragmentHint&&ws(e.fragmentHint,a),e.alignedSliding=!0}function As(a,e){a&&(Ts(e,a),e.alignedSliding||Cs(e,a),!e.alignedSliding&&!e.skippedSegments&&$i(a,e,!1))}function Ts(a,e){if(!Hs(e,a))return;const t=Math.min(e.endCC,a.endCC),n=Ji(e.fragments,t),r=Ji(a.fragments,t);if(!n||!r)return;le.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;es(i,a)}function Cs(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=Ji(n,s),i=Ji(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=Ji(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,d=i.programDateTime;if(!l||!d)return;const c=(d-l)/1e3-(i.start-r.start);es(c,a)}function mi(a,e,t){bi(a,e,t),a.addEventListener(e,t)}function bi(a,e,t){a.removeEventListener(e,t)}const Ha={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},sn={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 ci{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=sn.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:d,mediaBuffer:c,state:p}=this,v=d?d.currentTime:0,T=rr.bufferInfo(c||d,v,s.maxBufferHole),L=!T.len;if(this.log(`Media seeking to ${m(v)?v.toFixed(3):v}, state: ${p}, ${L?"out of":"in"} buffer`),this.state===sn.ENDED)this.resetLoadingState();else if(l){const O=s.maxFragLookUpTolerance,ne=l.start-O,te=l.start+l.duration+O;if(L||te<T.start||ne>T.end){const Ae=v>te;(v<ne||Ae)&&(Ae&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(v,1/0,this.playlistType,!0);const O=this.lastCurrentTime;if(v>O&&(this.lastCurrentTime=v),!this.loadingParts){const ne=Math.max(T.end,v),te=this.shouldLoadParts(this.getLevelDetails(),ne);te&&(this.log(`LL-Part loading ON after seeking to ${v.toFixed(2)} with buffer @${ne.toFixed(2)}`),this.loadingParts=te)}}this.hls.hasEnoughToStart||(this.log(`Setting ${L?"startPosition":"nextLoadPosition"} to ${v} for seek without enough to start`),this.nextLoadPosition=v,L&&(this.startPosition=v)),L&&this.state===sn.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 $r(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Sr(e.config)}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===sn.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=sn.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 n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=rr.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const d=t.partList;if(d!=null&&d.length){const p=d[d.length-1];return rr.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 n=this.media=this.mediaBuffer=t.media;mi(n,"seeking",this.onMediaSeeking),mi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===sn.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),bi(r,"seeking",this.onMediaSeeking),bi(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){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=sn.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,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=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,n,r).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===sn.FRAG_LOADING||!this.fragCurrent&&s===sn.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=sn.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===sn.STOPPED||this.state===sn.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===er.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),d=this.backtrackFragment;((d?e.sn-d.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===er.PARTIAL&&n.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,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(g.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&vi(l.method)){const d=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,Hi(l.method)).catch(c=>{throw r.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return r.trigger(g.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:d,tdecrypt:p}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===sn.STOPPED||this.state===sn.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==sn.STOPPED&&(this.state=sn.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.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(g.ERROR,{type:ve.KEY_SYSTEM_ERROR,details:G.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 n=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:${n?Ha.toString(rr.getBuffered(n)):"(detached)"})`),ze(e)){var r;if(e.type!==ee.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=sn.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=sn.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(d=>!d),l=new di(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){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=sn.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(T=>{if(!this.fragContextChanged(T.frag))return this.hls.trigger(g.KEY_LOADED,T),this.state===sn.KEY_LOADING&&(this.state=sn.IDLE),T}),this.hls.trigger(g.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 d=this.fragPrevious;if(ze(e)&&(!d||e.sn!==d.sn)){const T=this.shouldLoadParts(t.details,e.end);T!==this.loadingParts&&(this.log(`LL-Part loading ${T?"ON":"OFF"} loading sn ${d==null?void 0:d.sn}->${e.sn}`),this.loadingParts=T)}if(n=Math.max(e.start,n||0),this.loadingParts&&ze(e)){const T=s.partList;if(T&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const L=this.getNextPart(T,e,n);if(L>-1){const O=T[L];e=this.fragCurrent=O.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${O.index} (${L}/${T.length-1}) of ${this.fragInfo(e,!1,O)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=O.start+O.duration,this.state=sn.FRAG_LOADING;let ne;return l?ne=l.then(te=>!te||this.fragContextChanged(te.frag)?null:this.doFragPartsLoad(e,O,t,r)).catch(te=>this.handleFragLoadError(te)):ne=this.doFragPartsLoad(e,O,t,r).catch(te=>this.handleFragLoadError(te)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:O,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):ne}else if(!e.url||this.loadedEndOfParts(T,n))return Promise.resolve(null)}}if(ze(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${n.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(n.toFixed(3))}`),m(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=sn.FRAG_LOADING;const p=this.config.progressive;let v;return p&&l?v=l.then(T=>!T||this.fragContextChanged(T.frag)?null:this.fragmentLoader.load(e,r)).catch(T=>this.handleFragLoadError(T)):v=Promise.all([this.fragmentLoader.load(e,p?r:void 0),l]).then(([T])=>(!p&&r&&r(T),T)).catch(T=>this.handleFragLoadError(T)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):v}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const d=[],c=(l=n.details)==null?void 0:l.partList,p=v=>{this.fragmentLoader.loadPart(e,v,r).then(T=>{d[v.index]=T;const L=T.part;this.hls.trigger(g.FRAG_LOADED,T);const O=Ur(n.details,e.sn,v.index+1)||hi(c,e.sn,v.index+1);if(O)p(O);else return i({frag:e,part:L,partsLoaded:d})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===G.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ve.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==sn.PARSING){!this.fragCurrent&&this.state!==sn.STOPPED&&this.state!==sn.ERROR&&(this.state=sn.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const l=this.getLevelDetails(),c=l&&n.sn>l.endSN||this.shouldLoadParts(l,n.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===ee.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const l=t[r],d=l.details,c=s>-1?Ur(d,i,s):null,p=c?c.fragment:Or(d,i,n);return p?(n&&n!==p&&(p.stats=n.stats),{frag:p,part:c,level:l}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==sn.PARSING)return;const{data1:s,data2:l}=e;let d=s;if(l&&(d=jt(s,l)),!d.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,v={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,parent:t.type,data:d};if(this.hls.trigger(g.BUFFER_APPENDING,v),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!rr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=rr.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!m(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=rr.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,r);return rr.bufferInfo(e,t,l)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=ee.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,l=i.lowLatencyMode&&!!t.partList;let d=null;if(t.live){const v=i.initialLiveManifestSize;if(r<v)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${v})`),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),d=this.getInitialLiveFragment(t);const T=this.hls.startPosition,L=this.hls.liveSyncPosition,O=d?(T!==-1&&T>=s?T:L)||d.start:e;this.log(`Setting startPosition to ${O} to match start frag at live edge. mainStart: ${T} liveSyncPosition: ${L} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=O}}else e<=s&&(d=n[0]);if(!d){const v=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,v,t)}let p=this.filterReplacedPrimary(d,t);if(!p&&d){const v=d.sn-t.startSN;p=this.filterReplacedPrimary(n[v+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===er.OK||n===er.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(l!==null&&n.len+l.len>=i){const d=s.sn;return this.loopSn!==d&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${d}`),this.loopSn=d),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Aa(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(Aa(this.config)&&e.type!==ee.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.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,n){let r=-1,i=!1,s=!0;for(let l=0,d=e.length;l<d;l++){const c=e[l];if(s=s&&!c.independent,r>-1&&n<c.start)break;const p=c.loaded;p?r=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${c.start}`),r=l),i=p}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=Pn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=nr(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:l}=n;const{fragmentHint:d}=n,{maxFragLookUpTolerance:c}=r,p=n.partList,v=!!(this.loadingParts&&p!=null&&p.length&&d);v&&!this.bitrateTest&&p[p.length-1].fragment.sn===d.sn&&(s=s.concat(d),l=d.sn);let T;if(e<t){var L;const ne=e<this.lastCurrentTime||e>t-c||(L=this.media)!=null&&L.paused||!this.startFragRequested?0:c;T=Hn(i,s,e,ne)}else T=s[s.length-1];if(T){const O=T.sn-n.startSN,ne=this.fragmentTracker.getState(T);if((ne===er.OK||ne===er.PARTIAL&&T.gap)&&(i=T),i&&T.sn===i.sn&&(!v||p[0].fragment.sn>T.sn||!n.live)&&T.level===i.level){const Ae=s[O+1];T.sn<l&&this.fragmentTracker.getState(Ae)!==er.OK?T=Ae:T=null}}return T}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&m(i);if(s||!l&&!i){As(n,e);const d=e.fragmentStart;return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),d}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&m(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&ze(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!==sn.FRAG_LOADING_WAITING_RETRY)&&(this.state=sn.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Ae=this.getCurrentContext(t.chunkMeta);Ae&&(t.frag=Ae.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===G.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=sn.ERROR;return}const{action:d,flags:c,retryCount:p=0,retryConfig:v}=l,T=!!v,L=T&&d===gn.RetryRequest,O=T&&!l.resolved&&c===Mn.MoveAllAlternatesMatchingHost,ne=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!L&&O&&ze(r)&&!r.endList&&ne&&!pt(t))this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((L||O)&&p<v.maxNumRetry){var te;const Ae=Rn((te=t.response)==null?void 0:te.code),Fe=sr(v,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Fe,this.state=sn.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 ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${p+1}/${v.maxNumRetry} in ${Fe}ms`)}else if(v)if(this.resetFragmentErrors(e),p<v.maxNumRetry)!s&&d!==gn.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else d===gn.SendAlternateToPenaltyBox?this.state=sn.WAITING_LEVEL:this.state=sn.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Rn(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=sn.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===sn.PARSING||this.state===sn.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.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 ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===ee.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==sn.STOPPED&&(this.state=sn.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=rr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===sn.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==sn.STOPPED&&(this.state=sn.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,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((d,c)=>{const p=e.elementaryStreams[c];if(p){const v=p.endPTS-p.startPTS;if(v<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${v})`),d||!1;const T=r?0:Es(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:T,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return d},!1)){var l;if(n.fragmentError===0&&this.treatAsGap(e,n),((l=this.transmuxer)==null?void 0:l.error)===null){const d=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(d.message),this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,error:d,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=sn.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ee.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.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 Aa(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ta{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=Ka(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Ka(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var as={exports:{}},Ds;function To(){return Ds||(Ds=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(d,c,p){this.fn=d,this.context=c,this.once=p||!1}function i(d,c,p,v,T){if(typeof p!="function")throw new TypeError("The listener must be a function");var L=new r(p,v||d,T),O=t?t+c:c;return d._events[O]?d._events[O].fn?d._events[O]=[d._events[O],L]:d._events[O].push(L):(d._events[O]=L,d._eventsCount++),d}function s(d,c){--d._eventsCount===0?d._events=new n:delete d._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],p,v;if(this._eventsCount===0)return c;for(v in p=this._events)e.call(p,v)&&c.push(t?v.slice(1):v);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,v=this._events[p];if(!v)return[];if(v.fn)return[v.fn];for(var T=0,L=v.length,O=new Array(L);T<L;T++)O[T]=v[T].fn;return O},l.prototype.listenerCount=function(c){var p=t?t+c:c,v=this._events[p];return v?v.fn?1:v.length:0},l.prototype.emit=function(c,p,v,T,L,O){var ne=t?t+c:c;if(!this._events[ne])return!1;var te=this._events[ne],Ae=arguments.length,Fe,Ue;if(te.fn){switch(te.once&&this.removeListener(c,te.fn,void 0,!0),Ae){case 1:return te.fn.call(te.context),!0;case 2:return te.fn.call(te.context,p),!0;case 3:return te.fn.call(te.context,p,v),!0;case 4:return te.fn.call(te.context,p,v,T),!0;case 5:return te.fn.call(te.context,p,v,T,L),!0;case 6:return te.fn.call(te.context,p,v,T,L,O),!0}for(Ue=1,Fe=new Array(Ae-1);Ue<Ae;Ue++)Fe[Ue-1]=arguments[Ue];te.fn.apply(te.context,Fe)}else{var lt=te.length,yt;for(Ue=0;Ue<lt;Ue++)switch(te[Ue].once&&this.removeListener(c,te[Ue].fn,void 0,!0),Ae){case 1:te[Ue].fn.call(te[Ue].context);break;case 2:te[Ue].fn.call(te[Ue].context,p);break;case 3:te[Ue].fn.call(te[Ue].context,p,v);break;case 4:te[Ue].fn.call(te[Ue].context,p,v,T);break;default:if(!Fe)for(yt=1,Fe=new Array(Ae-1);yt<Ae;yt++)Fe[yt-1]=arguments[yt];te[Ue].fn.apply(te[Ue].context,Fe)}}return!0},l.prototype.on=function(c,p,v){return i(this,c,p,v,!1)},l.prototype.once=function(c,p,v){return i(this,c,p,v,!0)},l.prototype.removeListener=function(c,p,v,T){var L=t?t+c:c;if(!this._events[L])return this;if(!p)return s(this,L),this;var O=this._events[L];if(O.fn)O.fn===p&&(!T||O.once)&&(!v||O.context===v)&&s(this,L);else{for(var ne=0,te=[],Ae=O.length;ne<Ae;ne++)(O[ne].fn!==p||T&&!O[ne].once||v&&O[ne].context!==v)&&te.push(O[ne]);te.length?this._events[L]=te.length===1?te[0]:te:s(this,L)}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 n,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=To(),ua=W(Co);const Gs="1.6.14",gs={};function Ga(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=gs[Gs];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),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return gs[Gs]=r,r}function Wa(a){const e=gs[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return gs[a]=r,r}function Io(a){const e=gs[a||Gs];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete gs[a||Gs],r&&self.URL.revokeObjectURL(r),n.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 n=0;for(;Ws(a,e);){n+=10;const r=Is(a,e+6);n+=r,Ca(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Va(a,e,t,n){const r=[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 L=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!0,error:L,reason:L.message});return}const l=(i>>6&3)+1,d=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+l,p=r[s];let v=s;(l===5||l===29)&&(v-=3);const T=[l<<3|(v&14)>>1,(v&1)<<7|d<<3];return le.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:T,samplerate:p,channelCount:d,codec:c,parsedCodec:c,manifestCodec:n}}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 da(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(da(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const n=ca(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||da(a,r)}return!1}function Ra(a,e,t,n,r){if(!a.samplerate){const i=Va(e,t,n,r);if(!i)return;S(a,i)}}function Xa(a){return 1024*9e4/a}function Ro(a,e){const t=Za(a,e);if(e+t<=a.length){const n=ca(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Qa(a,e,t,n,r){const i=Xa(a.samplerate),s=n+r*i,l=Ro(e,t);let d;if(l){const{frameLength:v,headerLength:T}=l,L=T+v,O=Math.max(0,t+L-e.length);O?(d=new Uint8Array(L-T),d.set(e.subarray(t+T,e.length),0)):d=e.subarray(t+T,t+L);const ne={unit:d,pts:s};return O||a.samples.push(ne),{sample:ne,length:L,missing:O}}const c=e.length-t;return d=new Uint8Array(c),d.set(e.subarray(t,e.length),0),{sample:{unit:d,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 Oa(a,e=0,t=1/0){return qa(a,e,t,Uint8Array)}function qa(a,e,t,n){const r=Oo(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=Ja(a)?a.byteOffset:0,l=(s+a.byteLength)/i,d=(s+e)/i,c=Math.floor(Math.max(0,Math.min(d,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));return new n(r,c,p-c)}function Oo(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 n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=Me(Oa(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=Me(Oa(a.data,3+n,s));let d;return r==="-->"?d=Me(Oa(a.data,4+n+s)):d=Lo(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=d,e}function Be(a){if(a.size<2)return;const e=Me(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 n=Me(a.data.subarray(t),!0);t+=n.length+1;const r=Me(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Me(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 n=Me(a.data.subarray(t),!0);t+=n.length+1;const r=Me(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Me(a.data);return{key:a.type,info:"",data:e}}function ka(a){return a.type==="PRIV"?Be(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),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Ls=10,no=10;function Ma(a){let e=0;const t=[];for(;Ws(a,e);){const n=Is(a,e+6);a[e+5]>>6&1&&(e+=Ls),e+=Ls;const r=e+n;for(;e+no<r;){const i=to(a.subarray(e)),s=ka(i);s&&t.push(s),e+=i.size+Ls}Ca(a,e)&&(e+=Ls)}return t}function ro(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 n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ha(a){const e=Ma(a);for(let t=0;t<e.length;t++){const n=e[t];if(ro(n))return io(n)}}let pi=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 Gi(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,n,r){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,n){}demux(e,t){this.cachedData&&(e=jt(this.cachedData,e),this.cachedData=null);let n=Rs(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,d=n?ha(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&m(d))&&(this.basePTS=so(d,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:pi.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const p=this.appendFrame(s,e,r);p?(this.frameIndex++,this.lastPTS=p.sample.pts,r+=p.length,i=r):r=c}else La(e,r)?(n=Rs(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:pi.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=jt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Gi(),id3Track:l,textTrack:Gi()}}demuxSampleAes(e,t,n){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:Gi(),id3Track:this._id3Track,textTrack:Gi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(m(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let fa=null;const ko=[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],Fa=[[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,n,r){if(t+24>e.length)return;const i=Fo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,d={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(d),{sample:d,length:i.frameLength,missing:0}}}function Fo(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,l=a[e+3]>>6,d=t===3?3-n:n===3?3:4,c=ko[d*14+r-1]*1e3,v=ao[(t===3?0:t===2?1:2)*3+i],T=l===3?1:2,L=Fa[t][n],O=Mo[n],ne=L*8*O,te=Math.floor(L*c/v+s)*O;if(fa===null){const Ue=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fa=Ue?parseInt(Ue[1]):0}return!!fa&&fa<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:v,channelCount:T,frameLength:te,samplesPerFrame:ne}}}function z(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&&z(a,e)}function h(a,e){return z(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&z(a,e)){const n=Fo(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||u(a,i)}return!1}class y extends Zs{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=Rs(e,0);let r=(n==null?void 0:n.length)||0;if(f(e,r))return!1;for(let i=e.length;r<i;r++)if(Ia(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Vs(e,t)}appendFrame(e,t,n){Ra(e,this.observer,t,n,e.manifestCodec);const r=Qa(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const I=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const l=Math.min(n,8),d=8-l;i[0]=4278190080>>>24+d<<d,r[0]=(s[0]&i[0])>>d,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class U extends Zs{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=ge(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=Rs(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ha(t)!==void 0&&I(e,n)<16}}function ge(a,e,t,n,r){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],d=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][d*3+i]*2;if(t+p>e.length)return-1;const v=e[t+6]>>5;let T=0;v===2?T+=2:(v&1&&v!==1&&(T+=2),v&4&&(T+=2));const L=(e[t+6]<<8|e[t+7])>>12-T&1,ne=[2,1,2,3,3,4,4,5][v]+L,te=e[t+5]>>3,Ae=e[t+5]&7,Fe=new Uint8Array([i<<6|te<<1|Ae>>2,(Ae&3)<<6|v<<3|L<<2|d>>4,d<<4&224]),Ue=1536/l*9e4,lt=n+r*Ue,yt=e.subarray(t,t+p);return a.config=Fe,a.channelCount=ne,a.samplerate=l,a.samples.push({unit:yt,pts:lt}),p}class Te extends Zs{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Rs(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ha(t)!==void 0&&I(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(f(e,n))return le.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return h(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return oo(e,t,n,this.basePTS,this.frameIndex)}}const Ze=/\/emsg[-/]ID3/i;class ft{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,n,r){const i=this.videoTrack=Gi("video",1),s=this.audioTrack=Gi("audio",1),l=this.txtTrack=Gi("text",1);if(this.id3Track=Gi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Le(e);if(d.video){const{id:c,timescale:p,codec:v,supplemental:T}=d.video;i.id=c,i.timescale=l.timescale=p,i.codec=v,i.supplemental=T}if(d.audio){const{id:c,timescale:p,codec:v}=d.audio;s.id=c,s.timescale=p,s.codec=v}l.id=Vt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Ce(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=jt(this.remainderData,e));const l=Yt(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=$t(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=$t(e,t),{videoTrack:t,audioTrack:Gi(),id3Track:r,textTrack:Gi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=ce(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Ve(i);if(Ze.test(s.schemeIdUri)){const l=Nt(s,t);let d=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;d<=.001&&(d=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:pi.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=Nt(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:pi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){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 Nt(a,e){return m(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Jt{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Sr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Gn.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(l=>{const d=new Uint8Array(l);r.set(d,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=ye(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(d=>{i.data=this.getAvcDecryptedUnit(s,d),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class fn{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,l=[];let d=0,c,p,v,T=-1,L=0;for(i===-1&&(T=0,L=this.getNALuType(t,0),i=0,d=1);d<r;){if(c=t[d++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=d-i-1,T>=0){const O={data:t.subarray(T,p),type:L};l.push(O)}else{const O=this.getLastNalUnit(e.samples);O&&(s&&d<=4-s&&O.state&&(O.data=O.data.subarray(0,O.data.byteLength-s)),p>0&&(O.data=jt(O.data,t.subarray(0,p)),O.state=0))}d<r?(v=this.getNALuType(t,d),T=d,L=v,i=0):i=-1}else i=0}if(T>=0&&i>=0){const O={data:t.subarray(T,r),type:L,state:i};l.push(O)}if(l.length===0){const O=this.getLastNalUnit(e.samples);O&&(O.data=jt(O.data,t))}return e.naluState=i,l}}class yn{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,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.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 n=this.word>>>32-t;if(e>32&&le.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?n<<t|this.readBits(t):n}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 Cn extends fn{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,v;switch(c.type){case 1:{let ne=!1;l=!0;const te=c.data;if(d&&te.length>4){const Ae=this.readSliceType(te);(Ae===2||Ae===4||Ae===7||Ae===9)&&(ne=!0)}if(ne){var T;(T=s)!=null&&T.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=ne;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,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,Rt(c.data,1,n.pts,t.samples);break}case 7:{var L,O;l=!0,d=!0;const ne=c.data,te=this.readSPS(ne);if(!e.sps||e.width!==te.width||e.height!==te.height||((L=e.pixelRatio)==null?void 0:L[0])!==te.pixelRatio[0]||((O=e.pixelRatio)==null?void 0:O[1])!==te.pixelRatio[1]){e.width=te.width,e.height=te.height,e.pixelRatio=te.pixelRatio,e.sps=[ne];const Ae=ne.subarray(1,4);let Fe="avc1.";for(let Ue=0;Ue<3;Ue++){let lt=Ae[Ue].toString(16);lt.length<2&&(lt="0"+lt),Fe+=lt}e.codec=Fe}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(v=s)!=null&&v.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new yn(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new yn(e);let n=0,r=0,i=0,s=0,l,d,c;const p=t.readUByte.bind(t),v=t.readBits.bind(t),T=t.readUEG.bind(t),L=t.readBoolean.bind(t),O=t.skipBits.bind(t),ne=t.skipEG.bind(t),te=t.skipUEG.bind(t),Ae=this.skipScalingList.bind(this);p();const Fe=p();if(v(5),O(3),p(),te(),Fe===100||Fe===110||Fe===122||Fe===244||Fe===44||Fe===83||Fe===86||Fe===118||Fe===128){const Zt=T();if(Zt===3&&O(1),te(),te(),O(1),L())for(d=Zt!==3?8:12,c=0;c<d;c++)L()&&(c<6?Ae(16,t):Ae(64,t))}te();const Ue=T();if(Ue===0)T();else if(Ue===1)for(O(1),ne(),ne(),l=T(),c=0;c<l;c++)ne();te(),O(1);const lt=T(),yt=T(),Qt=v(1);Qt===0&&O(1),O(1),L()&&(n=T(),r=T(),i=T(),s=T());let At=[1,1];if(L()&&L())switch(p()){case 1:At=[1,1];break;case 2:At=[12,11];break;case 3:At=[10,11];break;case 4:At=[16,11];break;case 5:At=[40,33];break;case 6:At=[24,11];break;case 7:At=[20,11];break;case 8:At=[32,11];break;case 9:At=[80,33];break;case 10:At=[18,11];break;case 11:At=[15,11];break;case 12:At=[64,33];break;case 13:At=[160,99];break;case 14:At=[4,3];break;case 15:At=[3,2];break;case 16:At=[2,1];break;case 255:{At=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((lt+1)*16-n*2-r*2),height:(2-Qt)*(yt+1)*16-(Qt?2:4)*(i+s),pixelRatio:At}}}class Yn extends fn{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,v;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,n.pts,n.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,d){var T;(T=s)!=null&&T.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.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,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,Rt(c.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=S(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(l=!0,d=!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 L=this.readSPS(c.data);e.width=L.width,e.height=L.height,e.pixelRatio=L.pixelRatio,e.codec=L.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const O in L.params)e.params[O]=L.params[O]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const L=this.readPPS(c.data);for(const O in L)e.params[O]=L[O]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(v=s)!=null&&v.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new yn(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new yn(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),d=t.readUByte(),c=t.readUByte(),p=t.readUByte(),v=t.readUByte(),T=t.readUByte(),L=t.readUByte(),O=t.readUByte(),ne=t.readUByte(),te=t.readUByte(),Ae=t.readUByte(),Fe=[],Ue=[];for(let Mr=0;Mr<n;Mr++)Fe.push(t.readBoolean()),Ue.push(t.readBoolean());if(n>0)for(let Mr=n;Mr<8;Mr++)t.readBits(2);for(let Mr=0;Mr<n;Mr++)Fe[Mr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ue[Mr]&&t.readUByte();t.readUEG();const lt=t.readUEG();lt==3&&t.skipBits(1);const yt=t.readUEG(),Qt=t.readUEG(),At=t.readBoolean();let Zt=0,Wt=0,Bt=0,dn=0;At&&(Zt+=t.readUEG(),Wt+=t.readUEG(),Bt+=t.readUEG(),dn+=t.readUEG());const Ln=t.readUEG(),Vn=t.readUEG(),or=t.readUEG(),Zn=t.readBoolean();for(let Mr=Zn?0:n;Mr<=n;Mr++)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 wi=0;wi<4;wi++)for(let Yi=0;Yi<(wi===3?2:6);Yi++)if(!t.readBoolean())t.readUEG();else{const rs=Math.min(64,1<<4+(wi<<1));wi>1&&t.readEG();for(let xa=0;xa<rs;xa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const zn=t.readUEG();let tr=0;for(let Mr=0;Mr<zn;Mr++){let wi=!1;if(Mr!==0&&(wi=t.readBoolean()),wi){Mr===zn&&t.readUEG(),t.readBoolean(),t.readUEG();let Yi=0;for(let ea=0;ea<=tr;ea++){const rs=t.readBoolean();let xa=!1;rs||(xa=t.readBoolean()),(rs||xa)&&Yi++}tr=Yi}else{const Yi=t.readUEG(),ea=t.readUEG();tr=Yi+ea;for(let rs=0;rs<Yi;rs++)t.readUEG(),t.readBoolean();for(let rs=0;rs<ea;rs++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Mr=t.readUEG();for(let wi=0;wi<Mr;wi++){for(let Yi=0;Yi<or+4;Yi++)t.readBits(1);t.readBits(1)}}let Dn=0,In=1,Ar=1,Nr=!0,Tr=1,Rr=0;t.readBoolean(),t.readBoolean();let Si=!1;if(t.readBoolean()){if(t.readBoolean()){const ta=t.readUByte(),pu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Ao=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ta>0&&ta<16?(In=pu[ta-1],Ar=Ao[ta-1]):ta===255&&(In=t.readBits(16),Ar=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(),Si=t.readBoolean(),Si&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Tr=t.readBits(32),Rr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Ao=t.readBoolean(),gu=t.readBoolean();let za=!1;(Ao||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<=n;vu++){Nr=t.readBoolean();const K0=Nr||t.readBoolean();let yu=!1;K0?t.readEG():yu=t.readBoolean();const _u=yu?1:t.readUEG()+1;if(Ao)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Dn=t.readUEG())}let Zi=yt,ds=Qt;if(At){let Mr=1,wi=1;lt===1?Mr=wi=2:lt==2&&(Mr=2),Zi=yt-Mr*Wt-Mr*Zt,ds=Qt-wi*dn-wi*Bt}const Js=r?["A","B","C"][r]:"",H0=l<<24|d<<16|c<<8|p;let hl=0;for(let Mr=0;Mr<32;Mr++)hl=(hl|(H0>>Mr&1)<<31-Mr)>>>0;let fl=hl.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:r,general_profile_compatibility_flags:[l,d,c,p],general_constraint_indicator_flags:[v,T,L,O,ne,te],general_level_idc:Ae,bit_depth:Ln+8,bit_depth_luma_minus8:Ln,bit_depth_chroma_minus8:Vn,min_spatial_segmentation_idc:Dn,chroma_format_idc:lt,frame_rate:{fixed:Nr,fps:Rr/Tr}},width:Zi,height:ds,pixelRatio:[In,Ar]}}readPPS(e){const t=new yn(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 r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Jn=188;class hr{constructor(e,t,n,r){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=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=hr.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(Jn*5,t-Jn)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let d=r;d<t;d+=Jn)if(e[d]===71&&(t-d===Jn||e[d+Jn]===71)){if(l++,s===-1&&(s=d,s!==0&&(n=Math.min(s+Jn*99,e.length-Jn)+1)),i||(i=yr(e,d)===0),i&&l>1&&(s===0&&l>2||d+Jn>n))return s}else{if(l)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Vt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=hr.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=hr.createTrack("audio",r),this._id3Track=hr.createTrack("id3"),this._txtTrack=hr.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,l=this._audioTrack,d=this._id3Track,c=this._txtTrack;let p=s.pid,v=s.pesData,T=l.pid,L=d.pid,O=l.pesData,ne=d.pesData,te=null,Ae=this.pmtParsed,Fe=this._pmtId,Ue=e.length;if(this.remainderData&&(e=jt(this.remainderData,e),Ue=e.length,this.remainderData=null),Ue<Jn&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};const lt=Math.max(0,hr.syncOffset(e));Ue-=(Ue-lt)%Jn,Ue<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,Ue,e.buffer.byteLength-Ue));let yt=0;for(let At=lt;At<Ue;At+=Jn)if(e[At]===71){const Zt=!!(e[At+1]&64),Wt=yr(e,At),Bt=(e[At+3]&48)>>4;let dn;if(Bt>1){if(dn=At+5+e[At+4],dn===At+Jn)continue}else dn=At+4;switch(Wt){case p:Zt&&(v&&(i=zr(v,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),v={data:[],size:0}),v&&(v.data.push(e.subarray(dn,At+Jn)),v.size+=At+Jn-dn);break;case T:if(Zt){if(O&&(i=zr(O,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}O={data:[],size:0}}O&&(O.data.push(e.subarray(dn,At+Jn)),O.size+=At+Jn-dn);break;case L:Zt&&(ne&&(i=zr(ne,this.logger))&&this.parseID3PES(d,i),ne={data:[],size:0}),ne&&(ne.data.push(e.subarray(dn,At+Jn)),ne.size+=At+Jn-dn);break;case 0:Zt&&(dn+=e[dn]+1),Fe=this._pmtId=Gr(e,dn);break;case Fe:{Zt&&(dn+=e[dn]+1);const Ln=Br(e,dn,this.typeSupported,n,this.observer,this.logger);p=Ln.videoPid,p>0&&(s.pid=p,s.segmentCodec=Ln.segmentVideoCodec),T=Ln.audioPid,T>0&&(l.pid=T,l.segmentCodec=Ln.segmentAudioCodec),L=Ln.id3Pid,L>0&&(d.pid=L),te!==null&&!Ae&&(this.logger.warn(`MPEG-TS PMT found at ${At} after unknown PID '${te}'. Backtracking to sync byte @${lt} to parse all TS packets.`),te=null,At=lt-188),Ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:te=Wt;break}}else yt++;yt>0&&Wr(this.observer,new Error(`Found ${yt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=v,l.pesData=O,d.pesData=ne;const Qt={audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(Qt),Qt}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:n,id3Track:r,textTrack:i}=e,s=n.pesData,l=t.pesData,d=r.pesData;let c;if(s&&(c=zr(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,l&&(c=zr(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;d&&(c=zr(d,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=d}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Jt(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Cn:e==="hevc"&&(this.videoParser=new Yn))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(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 n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const v=r.missing,T=r.sample.unit.byteLength;if(v===-1)i=jt(r.sample.unit,i);else{const L=T-v;r.sample.unit.set(i.subarray(0,v),L),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!da(i,s);s++);if(s!==n){let v;const T=s<l-1;if(T?v=`AAC PES did not start with ADTS header,offset:${s}`:v="No ADTS header found in AAC PES",Wr(this.observer,new Error(v),T,this.logger),!T)return}Ra(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(r){const v=Xa(e.samplerate);d=r.sample.pts+v}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<l;)if(p=Qa(e,i,s,d,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!da(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.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<r;)if(u(n,s)){const d=oo(e,n,s,l,i);if(d)s+=d.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,l=0,d;for(;l<i&&(d=ge(e,n,l,r,s++))>0;)l+=d}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=S({},t,{type:this._videoTrack?pi.emsg:pi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function yr(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Gr(a,e){return(a[e+10]&31)<<8|a[e+11]}function Br(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],d=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<d;){const p=yr(a,e),v=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Vr("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(!n){Vr("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(!n){Vr("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&&v>0){let T=e+5,L=v;for(;L>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 ne=a[T+1]+2;T+=ne,L-=ne}}break;case 194:case 135:return Wr(r,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+=v+5}return s}function Wr(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Vr(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function zr(a,e){let t=0,n,r,i,s,l;const d=a.data;if(!a||a.size===0)return null;for(;d[0].length<19&&d.length>1;)d[0]=jt(d[0],d[1]),d.splice(1,1);if(n=d[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const p=n[7];p&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,p&64?(l=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[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=n[8];let v=i+9;if(a.size<=v)return null;a.size-=v;const T=new Uint8Array(a.size);for(let L=0,O=d.length;L<O;L++){n=d[L];let ne=n.byteLength;if(v)if(v>ne){v-=ne;continue}else n=n.subarray(v),ne-=v,v=0;T.set(n,t),t+=ne}return r&&(r-=i+3),{data:T,pts:s,dts:l,len:r}}return null}class gi{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 Qr=Math.pow(2,32)-1;class vt{static init(){vt.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 vt.types)vt.types.hasOwnProperty(e)&&(vt.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]),n=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]);vt.HDLR_TYPES={video:t,audio:n};const r=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]);vt.STTS=vt.STSC=vt.STCO=i,vt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),vt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),vt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),vt.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]),d=new Uint8Array([0,0,0,1]);vt.FTYP=vt.box(vt.types.ftyp,s,d,s,l),vt.DINF=vt.box(vt.types.dinf,vt.box(vt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return vt.box(vt.types.hdlr,vt.HDLR_TYPES[e])}static mdat(e){return vt.box(vt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Qr+1)),r=Math.floor(t%(Qr+1));return vt.box(vt.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,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return vt.box(vt.types.mdia,vt.mdhd(e.timescale||0,e.duration||0),vt.hdlr(e.type),vt.minf(e))}static mfhd(e){return vt.box(vt.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"?vt.box(vt.types.minf,vt.box(vt.types.smhd,vt.SMHD),vt.DINF,vt.stbl(e)):vt.box(vt.types.minf,vt.box(vt.types.vmhd,vt.VMHD),vt.DINF,vt.stbl(e))}static moof(e,t,n){return vt.box(vt.types.moof,vt.mfhd(e),vt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=vt.trak(e[t]);return vt.box.apply(null,[vt.types.moov,vt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(vt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=vt.trex(e[t]);return vt.box.apply(null,[vt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Qr+1)),r=Math.floor(t%(Qr+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,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&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 vt.box(vt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return vt.box(vt.types.sdtp,n)}static stbl(e){return vt.box(vt.types.stbl,vt.stsd(e),vt.box(vt.types.stts,vt.STTS),vt.box(vt.types.stsc,vt.STSC),vt.box(vt.types.stsz,vt.STSZ),vt.box(vt.types.stco,vt.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const l=vt.box(vt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),d=e.width,c=e.height,p=e.pixelRatio[0],v=e.pixelRatio[1];return vt.box(vt.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,d>>8&255,d&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,vt.box(vt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),vt.box(vt.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,v>>24,v>>16&255,v>>8&255,v&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 vt.box(vt.types.mp4a,vt.audioStsd(e),vt.box(vt.types.esds,vt.esds(e)))}static mp3(e){return vt.box(vt.types[".mp3"],vt.audioStsd(e))}static ac3(e){return vt.box(vt.types["ac-3"],vt.audioStsd(e),vt.box(vt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return vt.box(vt.types.stsd,vt.STSD,vt.mp4a(e));if(t==="ac3"&&e.config)return vt.box(vt.types.stsd,vt.STSD,vt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return vt.box(vt.types.stsd,vt.STSD,vt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return vt.box(vt.types.stsd,vt.STSD,vt.avc1(e));if(t==="hevc"&&e.vps)return vt.box(vt.types.stsd,vt.STSD,vt.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,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(Qr+1)),l=Math.floor(n%(Qr+1));return vt.box(vt.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,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=vt.sdtp(e),r=e.id,i=Math.floor(t/(Qr+1)),s=Math.floor(t%(Qr+1));return vt.box(vt.types.traf,vt.box(vt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),vt.box(vt.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])),vt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,vt.box(vt.types.trak,vt.tkhd(e),vt.mdia(e))}static trex(e){const t=e.id;return vt.box(vt.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 n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let l,d,c,p,v,T;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),l=0;l<r;l++)d=n[l],c=d.duration,p=d.size,v=d.flags,T=d.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,v.isLeading<<2|v.dependsOn,v.isDependedOn<<6|v.hasRedundancy<<4|v.paddingValue<<1|v.isNonSync,v.degradPrio&61440,v.degradPrio&15,T>>>24&255,T>>>16&255,T>>>8&255,T&255],12+16*l);return vt.box(vt.types.trun,s)}static initSegment(e){vt.types||vt.init();const t=vt.moov(e);return jt(vt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=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),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let O=0;O<n.length;O+=1){s+=3;for(let ne=0;ne<n[O].length;ne+=1)s+=2+n[O][ne].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const d=n.length-1;for(let O=0;O<n.length;O+=1){l.set(new Uint8Array([32+O|(O===d?128:0),0,n[O].length]),s),s+=3;for(let ne=0;ne<n[O].length;ne+=1)l.set(new Uint8Array([n[O][ne].length>>8,n[O][ne].length&255]),s),s+=2,l.set(n[O][ne],s),s+=n[O][ne].length}const c=vt.box(vt.types.hvcC,l),p=e.width,v=e.height,T=e.pixelRatio[0],L=e.pixelRatio[1];return vt.box(vt.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,v>>8&255,v&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,vt.box(vt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),vt.box(vt.types.pasp,new Uint8Array([T>>24,T>>16&255,T>>8&255,T&255,L>>24,L>>16&255,L>>8&255,L&255])))}}vt.types=void 0,vt.HDLR_TYPES=void 0,vt.STTS=void 0,vt.STSC=void 0,vt.STCO=void 0,vt.STSZ=void 0,vt.VMHD=void 0,vt.SMHD=void 0,vt.STSD=void 0,vt.FTYP=void 0,vt.DINF=void 0;const Ii=9e4;function Wi(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Ui(a,e,t=1,n=!1){return Wi(a,e,1/t,n)}function ii(a,e=!1){return Wi(a,1e3,1/Ii,e)}function os(a,e=1){return Wi(a,Ii,1/e)}function Vi(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,Bo=1024,Os=1152,Ps=1536;let zi=null,ks=null;function Ys(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class ma extends Q{constructor(e,t,n,r){if(super("mp4-remuxer",r),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=n,this.ISGenerated=!1,zi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);zi=s?parseInt(s[1]):0}if(ks===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);ks=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 n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,d=l-i;return d<-4294967296&&(t=!0,l=Ri(l,n),d=l-i),d>0?i:l},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,d){let c,p,v,T,L,O,ne=i,te=i;const Ae=e.pid>-1,Fe=t.pid>-1,Ue=t.samples.length,lt=e.samples.length>0,yt=l&&Ue>0||Ue>1;if((!Ae||lt)&&(!Fe||yt)||this.ISGenerated||l){if(this.ISGenerated){var At,Zt,Wt,Bt;const or=this.videoTrackConfig;(or&&(t.width!==or.width||t.height!==or.height||((At=t.pixelRatio)==null?void 0:At[0])!==((Zt=or.pixelRatio)==null?void 0:Zt[0])||((Wt=t.pixelRatio)==null?void 0:Wt[1])!==((Bt=or.pixelRatio)==null?void 0:Bt[1]))||!or&&yt||this.nextAudioTs===null&&lt)&&this.resetInitSegment()}this.ISGenerated||(v=this.generateIS(e,t,i,s));const dn=this.isVideoContiguous;let Ln=-1,Vn;if(yt&&(Ln=No(t.samples),!dn&&this.config.forceKeyFrameOnDiscontinuity))if(O=!0,Ln>0){this.warn(`Dropped ${Ln} out of ${Ue} video samples due to a missing keyframe`);const or=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Ln),t.dropped+=Ln,te+=(t.samples[0].pts-or)/t.inputTimeScale,Vn=te}else Ln===-1&&(this.warn(`No keyframe found out of ${Ue} video samples`),O=!1);if(this.ISGenerated){if(lt&&yt){const or=this.getVideoStartPts(t.samples),wn=(Ri(e.samples[0].pts,or)-or)/t.inputTimeScale;ne+=Math.max(0,wn),te+=Math.max(0,-wn)}if(lt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),v=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,ne,this.isAudioContiguous,s,Fe||yt||d===ee.AUDIO?te:void 0),yt){const or=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),v=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,te,dn,or)}}else yt&&(c=this.remuxVideo(t,te,dn,0));c&&(c.firstKeyFrame=Ln,c.independent=Ln!==-1,c.firstKeyFramePTS=Vn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(L=pa(n,i,this._initPTS,this._initDTS)),r.samples.length&&(T=Ba(r,i,this._initPTS))),{audio:p,video:c,initSegment:v,independent:O,text:T,id3:L}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Ri(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${r}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,d={},c=this._initPTS;let p=!c||r,v="audio/mp4",T,L,O,ne=-1;if(p&&(T=L=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(v="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:v,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):vt.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(ne=e.id,O=e.inputTimeScale,!c||O!==c.timescale?T=L=this.computeInitPts(i[0].pts,O,n,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:vt.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(ne=t.id,O=t.inputTimeScale,!c||O!==c.timescale){const te=this.getVideoStartPts(s),Ae=Ri(s[0].dts,te),Fe=this.computeInitPts(Ae,O,n,"video"),Ue=this.computeInitPts(te,O,n,"video");L=Math.min(L,Fe),T=Math.min(T,Ue)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${T/O} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${T/O} (${T}/${O}) trackId: ${ne}`),this._initPTS={baseTime:T,timescale:O,trackId:ne},this._initDTS={baseTime:L,timescale:O,trackId:ne}):T=O=void 0,{tracks:d,initPTS:T,timescale:O,trackId:ne}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],d=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let v=this.nextVideoTs,T=8,L=this.videoSampleDuration,O,ne,te=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Fe=!1;if(!n||v===null){const Dn=p+t*i,In=s[0].pts-Ri(s[0].dts,s[0].pts);zi&&v!==null&&Math.abs(Dn-In-(v+p))<15e3?n=!0:v=Dn-In-p}const Ue=v+p;for(let Dn=0;Dn<d;Dn++){const In=s[Dn];In.pts=Ri(In.pts,Ue),In.dts=Ri(In.dts,Ue),In.dts<s[Dn>0?Dn-1:Dn].dts&&(Fe=!0)}Fe&&s.sort(function(Dn,In){const Ar=Dn.dts-In.dts,Nr=Dn.pts-In.pts;return Ar||Nr}),O=s[0].dts,ne=s[s.length-1].dts;const lt=ne-O,yt=lt?Math.round(lt/(d-1)):L||e.inputTimeScale/30;if(n){const Dn=O-Ue,In=Dn>yt,Ar=Dn<-1;if((In||Ar)&&(In?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ii(Dn,!0)} ms (${Dn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ii(-Dn,!0)} ms (${Dn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Ar||Ue>=s[0].pts||zi)){O=Ue;const Nr=s[0].pts-Dn;if(In)s[0].dts=O,s[0].pts=Nr;else{let Tr=!0;for(let Rr=0;Rr<s.length&&!(s[Rr].dts>Nr&&Tr);Rr++){const Si=s[Rr].pts;if(s[Rr].dts-=Dn,s[Rr].pts-=Dn,Rr<s.length-1){const xi=s[Rr+1].pts,Zi=s[Rr].pts,ds=xi<=Zi,Js=xi<=Si;Tr=ds==Js}}}this.log(`Video: Initial PTS/DTS adjusted: ${ii(Nr,!0)}/${ii(O,!0)}, delta: ${ii(Dn,!0)} ms`)}}O=Math.max(0,O);let Qt=0,At=0,Zt=O;for(let Dn=0;Dn<d;Dn++){const In=s[Dn],Ar=In.units,Nr=Ar.length;let Tr=0;for(let Rr=0;Rr<Nr;Rr++)Tr+=Ar[Rr].data.length;At+=Tr,Qt+=Nr,In.length=Tr,In.dts<Zt?(In.dts=Zt,Zt+=yt/4|0||1):Zt=In.dts,te=Math.min(In.pts,te),Ae=Math.max(In.pts,Ae)}ne=s[d-1].dts;const Wt=At+4*Qt+8;let Bt;try{Bt=new Uint8Array(Wt)}catch(Dn){this.observer.emit(g.ERROR,g.ERROR,{type:ve.MUX_ERROR,details:G.REMUX_ALLOC_ERROR,fatal:!1,error:Dn,bytes:Wt,reason:`fail allocating video mdat ${Wt}`});return}const dn=new DataView(Bt.buffer);dn.setUint32(0,Wt),Bt.set(vt.types.mdat,4);let Ln=!1,Vn=Number.POSITIVE_INFINITY,or=Number.POSITIVE_INFINITY,Zn=Number.NEGATIVE_INFINITY,wn=Number.NEGATIVE_INFINITY;for(let Dn=0;Dn<d;Dn++){const In=s[Dn],Ar=In.units;let Nr=0;for(let Si=0,xi=Ar.length;Si<xi;Si++){const Zi=Ar[Si],ds=Zi.data,Js=Zi.data.byteLength;dn.setUint32(T,Js),T+=4,Bt.set(ds,T),T+=Js,Nr+=4+Js}let Tr;if(Dn<d-1)L=s[Dn+1].dts-In.dts,Tr=s[Dn+1].pts-In.pts;else{const Si=this.config,xi=Dn>0?In.dts-s[Dn-1].dts:yt;if(Tr=Dn>0?In.pts-s[Dn-1].pts:yt,Si.stretchShortVideoTrack&&this.nextAudioTs!==null){const Zi=Math.floor(Si.maxBufferHole*i),ds=(r?te+r*i:this.nextAudioTs+p)-In.pts;ds>Zi?(L=ds-xi,L<0?L=xi:Ln=!0,this.log(`It is approximately ${ds/90} ms to the next segment; using duration ${L/90} ms for the last video frame.`)):L=xi}else L=xi}const Rr=Math.round(In.pts-In.dts);Vn=Math.min(Vn,L),Zn=Math.max(Zn,L),or=Math.min(or,Tr),wn=Math.max(wn,Tr),l.push(Ys(In.key,L,Nr,Rr))}if(l.length){if(zi){if(zi<70){const Dn=l[0].flags;Dn.dependsOn=2,Dn.isNonSync=0}}else if(ks&&wn-or<Zn-Vn&&yt/Zn<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Dn=O;for(let In=0,Ar=l.length;In<Ar;In++){const Nr=Dn+l[In].duration,Tr=Dn+l[In].cts;if(In<Ar-1){const Rr=Nr+l[In+1].cts;l[In].duration=Rr-Tr}else l[In].duration=In?l[In-1].duration:yt;l[In].cts=0,Dn=Nr}}}L=Ln||!L?yt:L;const Qn=ne+L;this.nextVideoTs=v=Qn-p,this.videoSampleDuration=L,this.isVideoContiguous=!0;const mr={data1:vt.moof(e.sequenceNumber++,O,S(e,{samples:l})),data2:Bt,startPTS:(te-p)/i,endPTS:(Ae+L-p)/i,startDTS:(O-p)/i,endDTS:v/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 Os;case"ac3":return Ps;default:return Bo}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,d=s/l,c=this.getSamplesPerFrame(e),p=c*d,v=this._initPTS,T=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,L=[],O=i!==void 0;let ne=e.samples,te=T?0:8,Ae=this.nextAudioTs||-1;const Fe=v.baseTime*s/v.timescale,Ue=Fe+t*s;if(this.isAudioContiguous=n=n||ne.length&&Ae>0&&(r&&Math.abs(Ue-(Ae+Fe))<9e3||Math.abs(Ri(ne[0].pts,Ue)-(Ae+Fe))<20*p),ne.forEach(function(wn){wn.pts=Ri(wn.pts,Ue)}),!n||Ae<0){const wn=ne.length;if(ne=ne.filter(Qn=>Qn.pts>=0),wn!==ne.length&&this.warn(`Removed ${ne.length-wn} of ${wn} samples (initPTS ${Fe} / ${s})`),!ne.length)return;i===0?Ae=0:r&&!O?Ae=Math.max(0,Ue-Fe):Ae=ne[0].pts-Fe}if(e.segmentCodec==="aac"){const wn=this.config.maxAudioFramesDrift;for(let Qn=0,zn=Ae+Fe;Qn<ne.length;Qn++){const tr=ne[Qn],mr=tr.pts,Dn=mr-zn,In=Math.abs(1e3*Dn/s);if(Dn<=-wn*p&&O)Qn===0&&(this.warn(`Audio frame @ ${(mr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Dn/s)} ms.`),this.nextAudioTs=Ae=mr-Fe,zn=mr);else if(Dn>=wn*p&&In<lo&&O){let Ar=Math.round(Dn/p);for(zn=mr-Ar*p;zn<0&&Ar&&p;)Ar--,zn+=p;Qn===0&&(this.nextAudioTs=Ae=zn-Fe),this.warn(`Injecting ${Ar} audio frames @ ${((zn-Fe)/s).toFixed(3)}s due to ${Math.round(1e3*Dn/s)} ms gap.`);for(let Nr=0;Nr<Ar;Nr++){let Tr=gi.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Tr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Tr=tr.unit.subarray()),ne.splice(Qn,0,{unit:Tr,pts:zn}),zn+=p,Qn++}}tr.pts=zn,zn+=p}}let lt=null,yt=null,Qt,At=0,Zt=ne.length;for(;Zt--;)At+=ne[Zt].unit.byteLength;for(let wn=0,Qn=ne.length;wn<Qn;wn++){const zn=ne[wn],tr=zn.unit;let mr=zn.pts;if(yt!==null){const In=L[wn-1];In.duration=Math.round((mr-yt)/d)}else if(n&&e.segmentCodec==="aac"&&(mr=Ae+Fe),lt=mr,At>0){At+=te;try{Qt=new Uint8Array(At)}catch(In){this.observer.emit(g.ERROR,g.ERROR,{type:ve.MUX_ERROR,details:G.REMUX_ALLOC_ERROR,fatal:!1,error:In,bytes:At,reason:`fail allocating audio mdat ${At}`});return}T||(new DataView(Qt.buffer).setUint32(0,At),Qt.set(vt.types.mdat,4))}else return;Qt.set(tr,te);const Dn=tr.byteLength;te+=Dn,L.push(Ys(!0,c,Dn,0)),yt=mr}const Wt=L.length;if(!Wt)return;const Bt=L[L.length-1];Ae=yt-Fe,this.nextAudioTs=Ae+d*Bt.duration;const dn=T?new Uint8Array(0):vt.moof(e.sequenceNumber++,lt/d,S({},e,{samples:L}));e.samples=[];const Ln=(lt-Fe)/s,Vn=Ae/s,Zn={data1:dn,data2:Qt,startPTS:Ln,endPTS:Vn,startDTS:Ln,endDTS:Vn,type:"audio",hasAudio:!0,hasVideo:!1,nb:Wt};return this.isAudioContiguous=!0,Zn}}function Ri(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 pa(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const d=a.samples[l];d.pts=Ri(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=Ri(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Ba(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const l=a.samples[s];l.pts=Ri(l.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends Q{constructor(e,t,n,r){super("passthrough-remuxer",r),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,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Le(e);if(t)ut(e,t);else{const d=i||s;d!=null&&d.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${d.codec}")!`)}i&&(n=ml(i,V.AUDIO,this)),s&&(r=ml(s,V.VIDEO,this));const l={};i&&s?l.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?l.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?l.video={container:"video/mp4",codec:r,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,n,r,i,s){var l,d;let{initPTS:c,lastEndTime:p}=this;const v={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};m(p)||(p=this.lastEndTime=i||0);const T=t.samples;if(!T.length)return v;const L={initPTS:void 0,timescale:void 0,trackId:void 0};let O=this.initData;if((l=O)!=null&&l.length||(this.generateInitSegment(T),O=this.initData),!((d=O)!=null&&d.length))return this.warn("Failed to generate initSegment."),v;this.emitInitSegment&&(L.tracks=this.initTracks,this.emitInitSegment=!1);const ne=Mt(T,O,this),te=O.audio?ne[O.audio.id]:null,Ae=O.video?ne[O.video.id]:null,Fe=Xs(Ae,1/0),Ue=Xs(te,1/0),lt=Xs(Ae,0,!0),yt=Xs(te,0,!0);let Qt=i,At=0;const Zt=te&&(!Ae||!c&&Ue<Fe||c&&c.trackId===O.audio.id),Wt=Zt?te:Ae;if(Wt){const zn=Wt.timescale,tr=Wt.start-i*zn,mr=Zt?O.audio.id:O.video.id;Qt=Wt.start/zn,At=Zt?yt-Ue:lt-Fe,(s||!c)&&(ga(c,Qt,i,At)||zn!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${tr/zn} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Qt-i} (${tr}/${zn}) trackId: ${mr}`),c=null,L.initPTS=tr,L.timescale=zn,L.trackId=mr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(L.initPTS=c.baseTime,L.timescale=c.timescale,L.trackId=c.trackId):((!L.timescale||L.trackId===void 0||L.initPTS===void 0)&&(this.warn("Could not set initPTS"),L.initPTS=Qt,L.timescale=1,L.trackId=-1),this.initPTS=c={baseTime:L.initPTS,timescale:L.timescale,trackId:L.trackId});const Bt=Qt-c.baseTime/c.timescale,dn=Bt+At;At>0?this.lastEndTime=dn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Ln=!!O.audio,Vn=!!O.video;let or="";Ln&&(or+="audio"),Vn&&(or+="video");const Zn=(O.audio?O.audio.encrypted:!1)||(O.video?O.video.encrypted:!1),wn={data1:T,startPTS:Bt,startDTS:Bt,endPTS:dn,endDTS:dn,type:or,hasAudio:Ln,hasVideo:Vn,nb:1,dropped:0,encrypted:Zn};v.audio=Ln&&!Vn?wn:void 0,v.video=Vn?wn:void 0;const Qn=Ae==null?void 0:Ae.sampleCount;if(Qn){const zn=Ae.keyFrameIndex,tr=zn!==-1;wn.nb=Qn,wn.dropped=zn===0||this.isVideoContiguous?0:tr?zn:Qn,wn.independent=tr,wn.firstKeyFrame=zn,tr&&Ae.keyFrameStart&&(wn.firstKeyFramePTS=(Ae.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(v.independent=tr),this.isVideoContiguous||(this.isVideoContiguous=tr),wn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${zn}/${Qn} dropped: ${wn.dropped} start: ${wn.firstKeyFramePTS||"NA"}`)}return v.initSegment=L,v.id3=pa(n,i,c,c),r.samples.length&&(v.text=Ba(r,i,c)),v}}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,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function ml(a,e,t){const n=a.codec;return n&&n.length>4?n:e===V.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?X(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let vs;try{vs=self.performance.now.bind(self.performance)}catch(a){vs=Date.now}const co=[{demux:ft,remux:uo},{demux:hr,remux:ma},{demux:y,remux:ma},{demux:Te,remux:ma}];co.splice(2,0,{demux:U,remux:ma});class pl{constructor(e,t,n,r,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=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=vs();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:d}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:p,trackSwitch:v,accurateTimeOffset:T,timeOffset:L,initSegmentChange:O}=r||l,{audioCodec:ne,videoCodec:te,defaultInitPts:Ae,duration:Fe,initSegmentData:Ue}=d,lt=Su(s,t);if(lt&&vi(lt.method)){const Zt=this.getDecrypter(),Wt=Hi(lt.method);if(Zt.isSync()){let Bt=Zt.softwareDecrypt(s,lt.key.buffer,lt.iv.buffer,Wt);if(n.part>-1){const Ln=Zt.flush();Bt=Ln&&Ln.buffer}if(!Bt)return i.executeEnd=vs(),$o(n);s=new Uint8Array(Bt)}else return this.asyncResult=!0,this.decryptionPromise=Zt.webCryptoDecrypt(s,lt.key.buffer,lt.iv.buffer,Wt).then(Bt=>{const dn=this.push(Bt,null,n);return this.decryptionPromise=null,dn}),this.decryptionPromise}const yt=this.needsProbing(p,v);if(yt){const Zt=this.configureTransmuxer(s);if(Zt)return this.logger.warn(`[transmuxer] ${Zt.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,fatal:!1,error:Zt,reason:Zt.message}),i.executeEnd=vs(),$o(n)}(p||v||O||yt)&&this.resetInitSegment(Ue,ne,te,Fe,t),(p||O||yt)&&this.resetInitialTimestamp(Ae),c||this.resetContiguity();const Qt=this.transmux(s,lt,L,T,n);this.asyncResult=Na(Qt);const At=this.currentTransmuxState;return At.contiguous=!0,At.discontinuity=!1,At.trackSwitch=!1,i.executeEnd=vs(),Qt}flush(e){const t=e.transmuxing;t.executeStart=vs();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=r;if(n){const v=n.flush();v&&s.push(this.push(v.buffer,null,e))}const{demuxer:d,remuxer:c}=this;if(!d||!c){t.executeEnd=vs();const v=[$o(e)];return this.asyncResult?Promise.resolve(v):v}const p=d.flush(l);return Na(p)?(this.asyncResult=!0,p.then(v=>(this.flushRemux(s,v,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:d,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===ee.MAIN?"level":"track"} ${n.level}`);const p=this.remuxer.remux(r,i,s,l,c,d,!0,this.id);e.push({remuxResult:p,chunkMeta:n}),n.transmuxing.executeEnd=vs()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:l}=this;!s||!l||(s.resetInitSegment(e,t,n,r),l.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:l,textTrack:d}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,d,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let v=0,T=co.length;v<T;v++){var s;if((s=co[v].demux)!=null&&s.probe(e,this.logger)){i=co[v];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,d=this.remuxer,c=i.remux,p=i.demux;(!d||!(d instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!l||!(l instanceof p))&&(this.demuxer=new p(n,t,r,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 Sr(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,n,r,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=n,this.duration=r,this.defaultInitPts=i||null}}class Au{constructor(e,t,n,r,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=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,n,r){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=d=>{const c=d.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var v;const T=(v=this.workerContext)==null?void 0:v.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=d=>{if(!this.hls)return;const c=new Error(`${d.message} (${d.filename}:${d.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(d,c)=>{c=c||{},c.frag=this.frag||void 0,d===g.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(d,c)};this.observer=new ua,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const l=nn(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const d=this.hls.logger;if(i.workerPath||Ga()){try{i.workerPath?(d.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Wa(i.workerPath)):(d.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:nt(i)})}catch(p){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new pl(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new pl(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,n=nn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:nt(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,n,r,i,s,l,d,c,p){var v,T;c.transmuxing.start=self.performance.now();const{instanceNo:L,transmuxer:O}=this,ne=s?s.start:i.start,te=i.decryptdata,Ae=this.frag,Fe=!(Ae&&i.cc===Ae.cc),Ue=!(Ae&&c.level===Ae.level),lt=Ae?c.sn-Ae.sn:-1,yt=this.part?c.part-this.part.index:-1,Qt=lt===0&&c.id>1&&c.id===(Ae==null?void 0:Ae.stats.chunkCount),At=!Ue&&(lt===1||lt===0&&(yt===1||Qt&&yt<=0)),Zt=self.performance.now();(Ue||lt||i.stats.parsing.start===0)&&(i.stats.parsing.start=Zt),s&&(yt||!At)&&(s.stats.parsing.start=Zt);const Wt=!(Ae&&((v=i.initSegment)==null?void 0:v.url)===((T=Ae.initSegment)==null?void 0:T.url)),Bt=new Au(Fe,At,d,Ue,ne,Wt);if(!At||Fe||Wt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===ee.MAIN?"level":"track"}: ${c.level} id: ${c.id}
discontinuity: ${Fe}
trackSwitch: ${Ue}
contiguous: ${At}
accurateTimeOffset: ${d}
timeOffset: ${ne}
initSegmentChange: ${Wt}`);const dn=new wu(n,r,t,l,p);this.configureTransmuxer(dn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:L,cmd:"demux",data:e,decryptdata:te,chunkMeta:c,state:Bt},e instanceof ArrayBuffer?[e]:[]);else if(O){const dn=O.push(e,te,c,Bt);Na(dn)?dn.then(Ln=>{this.handleTransmuxComplete(Ln)}).catch(Ln=>{this.transmuxerError(Ln,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(dn)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);Na(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const yl=100;class Tu extends Ks{constructor(e,t,n){super(e,t,n,"audio-stream-controller",ee.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(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===ee.MAIN){const l=t.cc,d=this.fragCurrent;if(this.initPTS[l]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${l} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===sn.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&&d&&d.cc!==l?(d.abortRequests(),this.syncWithAnchor(t,d)):this.state===sn.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),l=this.getLoadPosition(),d=nr(s,i,l);d&&(this.log(`Syncing with main frag at ${d.start} cc ${d.cc}`),this.startFragRequested=!1,this.nextLoadPosition=d.start,this.resetLoadingState(),this.state===sn.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=sn.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(yl),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=sn.IDLE):this.state=sn.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case sn.IDLE:this.doTickIdle();break;case sn.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=sn.WAITING_INIT_PTS}break}case sn.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case sn.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=sn.FRAG_LOADING;const l=r.flush().buffer,d={frag:t,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(d),i&&super._handleFragmentLoadComplete(d)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=sn.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:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const l=n[i],d=l.details;if(!d||this.waitForLive(l)||this.waitForCdnTuneIn(d)){this.state=sn.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,V.AUDIO,ee.AUDIO));const p=this.getFwdBufferInfo(c,ee.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,d)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=sn.ENDED;return}const v=p.len,T=t.maxBufferLength,L=d.fragments,O=L[0].start,ne=this.getLoadPosition(),te=this.flushing?ne:p.end;if(this.switchingTrack&&r){const Ue=ne;d.PTSKnown&&Ue<O&&(p.end>O||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=O+.05)}if(v>=T&&!this.switchingTrack&&te<L[L.length-1].start)return;let Ae=this.getNextFragment(te,d);if(Ae&&this.isLoopLoading(Ae,te)&&(Ae=this.getNextFragmentLoopLoading(Ae,d,p,ee.MAIN,T)),!Ae){this.bufferFlushed=!0;return}let Fe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Fe&&ze(Ae)&&!Ae.endList&&(!d.live||!this.loadingParts&&te<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Fe)===er.OK&&(this.mainFragLoading=Fe=null),Fe&&ze(Fe))){if(Ae.start>Fe.end){const lt=this.fragmentTracker.getFragAtPos(te,ee.MAIN);lt&&lt.end>Fe.end&&(Fe=lt,this.mainFragLoading={frag:lt,targetBufferTime:null})}if(Ae.start>Fe.end)return}this.loadFragment(Ae,l,te)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new bt(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==sn.STOPPED&&(this.setInterval(yl),this.state=sn.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 n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(g.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:l,track:d}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${d.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==sn.STOPPED&&(this.state=sn.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${d.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=r[s];let v=0;if(i.live||(n=p.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var T;v=this.alignPlaylists(i,p.details,(T=this.levelLastLoaded)==null?void 0:T.details)}i.alignedSliding||(Ts(i,c),i.alignedSliding||Cs(i,c),v=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,v),this.hls.trigger(g.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===sn.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=sn.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:d}=this;if(!d){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=d[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(n.start);return}const v=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let T=this.transmuxer;T||(T=this.transmuxer=new vl(this.hls,ee.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const L=this.initPTS[n.cc],O=(t=n.initSegment)==null?void 0:t.data;if(L!==void 0){const te=r?r.index:-1,Ae=te!==-1,Fe=new di(n.level,n.sn,n.stats.chunkCount,i.byteLength,te,Ae);T.push(i,O,v,"",n,r,p.totalduration,!1,Fe,L)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${p.startSN} ,${p.endSN}],track ${l}`);const{cache:ne}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ta,complete:!1};ne.push(new Uint8Array(i)),this.state!==sn.STOPPED&&(this.state=sn.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 n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ee.MAIN&&ze(t.frag)&&(this.mainFragLoading=t,this.state===sn.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==ee.AUDIO){!this.audioOnly&&n.type===ee.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(ze(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,C({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=sn.ERROR;return}switch(t.details){case G.FRAG_GAP:case G.FRAG_PARSING_ERROR:case G.FRAG_DECRYPT_ERROR:case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ee.AUDIO,t);break;case G.AUDIO_TRACK_LOAD_ERROR:case G.AUDIO_TRACK_LOAD_TIMEOUT:case G.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===sn.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===fe.AUDIO_TRACK&&(this.state=sn.IDLE);break;case G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case G.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case G.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==V.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==V.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===sn.ENDED&&(this.state=sn.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,ee.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:d,part:c,level:p}=l,{details:v}=p,{audio:T,text:L,id3:O,initSegment:ne}=i;if(this.fragContextChanged(d)||!v){this.fragmentTracker.removeFragment(d);return}if(this.state=sn.PARSING,this.switchingTrack&&T&&this.completeAudioSwitch(this.switchingTrack),ne!=null&&ne.tracks){const te=d.initSegment||d;if(this.unhandledEncryptionError(ne,d))return;this._bufferInitSegment(p,ne.tracks,te,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:te,id:n,tracks:ne.tracks})}if(T){const{startPTS:te,endPTS:Ae,startDTS:Fe,endDTS:Ue}=T;c&&(c.elementaryStreams[V.AUDIO]={startPTS:te,endPTS:Ae,startDTS:Fe,endDTS:Ue}),d.setElementaryStreamInfo(V.AUDIO,te,Ae,Fe,Ue),this.bufferFragmentData(T,d,c,s)}if(O!=null&&(t=O.samples)!=null&&t.length){const te=S({id:n,frag:d,details:v},O);r.trigger(g.FRAG_PARSING_METADATA,te)}if(L){const te=S({id:n,frag:d,details:v},L);r.trigger(g.FRAG_PARSING_USERDATA,te)}}_bufferInitSegment(e,t,n,r){if(this.state!==sn.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ee.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(g.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const d={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(g.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===er.NOT_LOADED||r===er.PARTIAL){var i;if(!ze(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=sn.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Cs(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l}=this.bufferedTrack;hn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,vn)||(Tn(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(g.AUDIO_TRACK_SWITCHED,C({},e))}}class Uo extends Q{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,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const l=r[s];let d;try{d=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),d=l.URI||""}if(d===e){i=s;break}else d===e.substring(0,d.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||t.lastPartSn;let d=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&p>t.partTarget&&(d+=1)}const c=n&&gt(n);return new Dt(l,d>=0?d: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(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-l;const d=this.hls.config.timelineOffset;if(d!==r.appliedTimelineOffset){const p=Math.max(d||0,0);r.appliedTimelineOffset=p,r.fragments.forEach(v=>{v.setStart(v.playlistOffset+p)})}if(r.live||n!=null&&n.live){const p="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){oa(n,r,this);const Fe=r.playlistParsingError;if(Fe){this.warn(Fe);const Ue=this.hls;if(!Ue.config.ignorePlaylistParsingErrors){var c;const{networkDetails:lt}=t;Ue.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:G.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Fe,reason:Fe.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:lt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const v=this.hls.mainForwardBufferInfo,T=v?v.end-v.len:0,L=(r.edge-T)*1e3,O=Lr(r,L);if(r.requestScheduled+O<s?r.requestScheduled=s:r.requestScheduled+=O,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let ne,te,Ae;if(r.canBlockReload&&r.endSN&&r.advanced){const Fe=this.hls.config.lowLatencyMode,Ue=r.lastPartSn,lt=r.endSN,yt=r.lastPartIndex,Qt=yt!==-1,At=Ue===lt;Qt?At?(te=lt+1,Ae=Fe?0:yt):(te=Ue,Ae=Fe?yt+1:r.maxPartIndex):te=lt+1;const Zt=r.age,Wt=Zt+r.ageHeader;let Bt=Math.min(Wt-r.partTarget,r.targetduration*1.5);if(Bt>0){if(Wt>r.targetduration*3)this.log(`Playlist last advanced ${Zt.toFixed(2)}s ago. Omitting segment and part directives.`),te=void 0,Ae=void 0;else if(n!=null&&n.tuneInGoal&&Wt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Bt} with playlist age: ${r.age}`),Bt=0;else{const dn=Math.floor(Bt/r.targetduration);if(te+=dn,Ae!==void 0){const Ln=Math.round(Bt%r.targetduration/r.partTarget);Ae+=Ln}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Zt.toFixed(2)}s goal: ${Bt} skip sn ${dn} to part ${Ae}`)}r.tuneInGoal=Bt}if(ne=this.getDeliveryDirectives(r,t.deliveryDirectives,te,Ae),Fe||!At){r.requestScheduled=s,this.loadingPlaylist(p,ne);return}}else(r.canBlockReload||r.canSkipUntil)&&(ne=this.getDeliveryDirectives(r,t.deliveryDirectives,te,Ae));ne&&te!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(O-l*2,O/2)),this.scheduleLoading(p,ne,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.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,n,r){let i=gt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=at.No),new Dt(n,r,i)}checkRetry(e){const t=e.details,n=Nn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},d=!!r&&!!l&&(i===gn.RetryRequest||!r.resolved&&i===gn.SendAlternateToPenaltyBox);if(d){var c;if(s>=l.maxNumRetry)return!1;if(n&&(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=sr(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,r.resolved=!0}return d}}function _l(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 n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.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:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,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 n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(l=>(r==null?void 0:r.indexOf(l))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(T=>!n||n.indexOf(T.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(T=>T.default)&&(this.selectDefaultTrack=!1),l.forEach((T,L)=>{T.id=L});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const d=this.hls.config.audioPreference;if(!i&&d){const T=Ht(d,l,vn);if(T>-1)i=l[T];else{const L=Ht(d,this.tracks);i=this.tracks[L]}}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): ${n==null?void 0:n.join(",")}`),this.hls.trigger(g.AUDIO_TRACKS_UPDATED,p);const v=this.trackId;if(c!==-1&&v===-1)this.setAudioTrack(c);else if(l.length&&v===-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(g.ERROR,{type:ve.MEDIA_ERROR,details:G.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:T})}}}onError(e,t){t.fatal||!t.context||t.context.type===fe.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 n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&hn(e,r,vn))return r;const i=Ht(e,this.tracksInGroup,vn);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const l=on(e,t.levels,n,s,vn);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Ht(e,n);if(s>-1)return n[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 n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(g.AUDIO_TRACK_SWITCHING,C({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||hn(e,r,vn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d}=e;for(let c=0;c<t.length;c++){const p=t[c];if(hn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d},p,vn))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)&&Tn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(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(g.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,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,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="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 r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.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,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.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 Q{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=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(g.MEDIA_ATTACHED,{media:r,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:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=ke(Se(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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this),e.off(g.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};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 r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?S(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=S({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}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 n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=Se(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const d=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||d&&s instanceof d,El(n),Lu(n,l),n.load()}catch(d){n.src=l}else n.src=l}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.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 n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,l=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&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: ${nt(n,(d,c)=>d==="initSegment"?void 0:c)};
transfer tracks: ${nt(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!De(r,n)){t.mediaSource=null,t.tracks=void 0;const d=e.currentTime,c=this.details,p=Math.max(d,(c==null?void 0:c.fragments[0].start)||0);if(p-d>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${d} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${p} currentTime: ${d}`),this.onMediaDetaching(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(d=>{const c=d,p=r[c];if(p){const v=p.buffer;if(v){const T=this.fragmentTracker,L=p.id;if(T.hasFragments(L)||T.hasParts(L)){const te=rr.getBuffered(v);T.detectEvictedFragments(c,te,L,null,!0)}const O=jo(c),ne=[c,v];this.sourceBuffers[O]=ne,v.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 n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const d=i.sourceBuffers;for(let c=d.length;c--;)l&&d[c].abort(),i.removeSourceBuffer(d[c]);l&&i.endOfStream()}catch(d){this.warn(`onMediaDetaching: ${d.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}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&El(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(g.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[jo(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 n;const r=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),l=!s&&this.sourceBufferCount&&this.media&&i.some(d=>!r[d]);if(s||l){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(d=>{var c,p;const v=t[d],{id:T,codec:L,levelCodec:O,container:ne,metadata:te,supplemental:Ae}=v;let Fe=r[d];const Ue=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[d],lt=Ue!=null&&Ue.buffer?Ue:Fe,yt=(lt==null?void 0:lt.pendingCodec)||(lt==null?void 0:lt.codec),Qt=lt==null?void 0:lt.levelCodec;Fe||(Fe=r[d]={buffer:void 0,listeners:[],codec:L,supplemental:Ae,container:ne,levelCodec:O,metadata:te,id:T});const At=Ot(yt,Qt),Zt=At==null?void 0:At.replace(bl,"$1");let Wt=Ot(L,O);const Bt=(p=Wt)==null?void 0:p.replace(bl,"$1");Wt&&At&&Zt!==Bt&&(d.slice(0,5)==="audio"&&(Wt=X(Wt,this.appendSource)),this.log(`switching codec ${yt} to ${Wt}`),Wt!==(Fe.pendingCodec||Fe.codec)&&(Fe.pendingCodec=Wt),Fe.container=ne,this.appendChangeType(d,ne,Wt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((n=t.audio)==null?void 0:n.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 n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),l.changeType(r),s.codec=n,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 n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,ee.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const d=this.tracks.video;(this.lastVideoAppendEnd>r||d!=null&&d.buffer&&rr.isBuffered(d.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,ee.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:n}=this,{data:r,type:i,parent:s,frag:l,part:d,chunkMeta:c,offset:p}=t,v=c.buffering[i],{sn:T,cc:L}=l,O=self.performance.now();v.start=O;const ne=l.stats.buffering,te=d?d.stats.buffering:null;ne.start===0&&(ne.start=O),te&&te.start===0&&(te.start=O);const Ae=n.audio;let Fe=!1;i==="audio"&&(Ae==null?void 0:Ae.container)==="audio/mpeg"&&(Fe=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const Ue=n.video,lt=Ue==null?void 0:Ue.buffer;if(lt&&T!=="initSegment"){const At=d||l,Zt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(Ue.ending||Ue.ended)){const Bt=At.start+At.duration*.05,dn=lt.buffered,Ln=this.currentOp("video");!dn.length&&!Ln?this.blockAudio(At):!Ln&&!rr.isBuffered(lt,Bt)&&this.lastVideoAppendEnd<Bt&&this.blockAudio(At)}else if(i==="video"){const Wt=At.end;if(Zt){const Bt=Zt.frag.start;(Wt>Bt||Wt<this.lastVideoAppendEnd||rr.isBuffered(lt,Bt))&&this.unblockAudio()}this.lastVideoAppendEnd=Wt}}const yt=(d||l).start,Qt={label:`append-${i}`,execute:()=>{var At;v.executeStart=self.performance.now();const Zt=(At=this.tracks[i])==null?void 0:At.buffer;Zt&&(Fe?this.updateTimestampOffset(Zt,yt,.1,i,T,L):p!==void 0&&m(p)&&this.updateTimestampOffset(Zt,p,1e-6,i,T,L)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const At=self.performance.now();v.executeEnd=v.end=At,ne.first===0&&(ne.first=At),te&&te.first===0&&(te.first=At);const Zt={};this.sourceBuffers.forEach(([Wt,Bt])=>{Wt&&(Zt[Wt]=rr.getBuffered(Bt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:i,frag:l,part:d,chunkMeta:c,parent:l.type,timeRanges:Zt})},onError:At=>{var Zt;const Wt={type:ve.MEDIA_ERROR,parent:l.type,details:G.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:d,chunkMeta:c,error:At,err:At,fatal:!1},Bt=(Zt=this.media)==null?void 0:Zt.error;if(At.code===DOMException.QUOTA_EXCEEDED_ERR||At.name=="QuotaExceededError"||"quota"in At)Wt.details=G.BUFFER_FULL_ERROR;else if(At.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Bt)Wt.errorAction=Kn(!0);else if(At.name===xl&&this.sourceBufferCount===0)Wt.errorAction=Kn(!0);else{const dn=++this.appendErrors[i];this.warn(`Failed ${dn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Bt||"no media error"})`),(dn>=this.hls.config.appendErrorMaxRetry||Bt)&&(Wt.fatal=!0)}this.hls.trigger(g.ERROR,Wt)}};this.log(`queuing "${i}" append sn: ${T}${d?" p: "+d.index:""} of ${l.type===ee.MAIN?"level":"track"} ${l.level} cc: ${L}`),this.append(Qt,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(g.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[V.AUDIOVIDEO]?i.push("audiovideo"):(s[V.AUDIO]&&i.push("audio"),s[V.VIDEO]&&i.push("video"));const l=()=>{const d=self.performance.now();n.stats.buffering.end=d,r&&(r.stats.buffering.end=d);const c=r?r.stats:n.stats;this.hls.trigger(g.FRAG_BUFFERED,{frag:n,part:r,stats:c,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,i).catch(d=>{this.warn(`Fragment buffered callback ${d}`),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 n;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 r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})?r?(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(g.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(g.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===G.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;m(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,l=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(m(l)&&l>=0){const c=Math.max(l,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const d=r.frontBufferFlushThreshold;if(m(d)&&d>0){const c=Math.max(r.maxBufferLength,d),p=Math.max(c,s),v=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,v)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=rr.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(d!=null&&d.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=rr.getBuffered(i),l=s.length;if(l<2)return;const d=s.start(l-1),c=s.end(l-1);if(n>d||e>=d&&e<=c)return;this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:d,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,r);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 m(i)?{duration:i}:null;const s=this.media.duration,l=m(n.duration)?n.duration:0;return r>l&&r>s||!m(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(m(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${nt(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(g.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(g.ERROR,{type:ve.MEDIA_ERROR,details:G.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)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 d=this.getTrackCodec(l,s),c=`${l.container};codecs=${d}`;l.codec=d,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${nt(l)}`);try{const p=n.addSourceBuffer(c),v=jo(s),T=[s,p];t[v]=T,l.buffer=p}catch(p){var r;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.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 n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&$e(n,"video")&&(r=tt(r,n));const i=Ot(r,e.levelCodec);return i?t.slice(0,5)==="audio"?X(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,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(g.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.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 n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const l=t-e.timestampOffset;Math.abs(l)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!r||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const d=m(r.duration)?r.duration:1/0,c=m(i.duration)?i.duration:1/0,p=Math.max(0,t),v=Math.min(n,d,c);v>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${v}] from the ${e} SourceBuffer`),l.remove(p,v)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Iu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.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:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}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,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.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 jo(a){return a==="audio"?1:0}class Ho{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(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.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 n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&m(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,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,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 n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Ho.getMaxLevelByMediaSize(n,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 n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.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(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(l,d)=>d?l.width!==d.width||l.height!==d.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const d=e[l];if((d.width>=s||d.height>=s)&&r(d,e[l+1])){i=l;break}}return i}}const Pi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ou={HLS:"h"};class ls{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof ls?n:new ls(n))),this.value=e,this.params=t}}const Pu="Dict";function ku(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,n){return new Error(`failed to ${a} "${ku(e)}" as ${t}`,{cause:n})}function us(a,e,t){return Mu("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Fu="Boolean";function Bu(a){if(typeof a!="boolean")throw us(a,Fu);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 ju(a){return a<-999999999999999||999999999999999<a}function Al(a){if(ju(a))throw us(a,zu);return a.toString()}function Hu(a){return`@${Al(a.getTime()/1e3)}`}function Tl(a,e){if(a<0)return-Tl(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const Ku="Decimal";function Gu(a){const e=Tl(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(!m(a))throw us(a,wl);return Number.isInteger(a)?Al(a):Gu(a);case"string":return Zu(a);case"symbol":return Cl(a);case"boolean":return Bu(a);case"object":if(a instanceof Date)return Hu(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Cl(a);default:throw us(a,wl)}}const Qu="Key";function Go(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?`;${Go(e)}`:`;${Go(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),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof ls||(i=new ls(i));let s=Go(r);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=qu(i):s+=Dl(i)),s}).join(`,${n}`)}function Il(a,e){return Ju(a,e)}const cs="CMCD-Object",si="CMCD-Request",Qs="CMCD-Session",Ms="CMCD-Status",ec={br:cs,ab:cs,d:cs,ot:cs,tb:cs,tpb:cs,lb:cs,tab:cs,lab:cs,url:cs,pb:si,bl:si,tbl:si,dl:si,ltc:si,mtp:si,nor:si,nrr:si,rc:si,sn:si,sta:si,su:si,ttfb:si,ttfbb:si,ttlb:si,cmsdd:si,cmsds:si,smrt:si,df:si,cs:si,ts:si,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},tc={REQUEST:si};function nc(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function rc(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?nc(e):{};return n.reduce((i,s)=>{var l;const d=ec[s]||r[s]||tc.REQUEST,c=(l=i[d])!==null&&l!==void 0?l:i[d]={};return c[s]=a[s],i},t)}function ic(a){return["ot","sf","st","e","sta"].includes(a)}function sc(a){return typeof a=="number"?m(a):a!=null&&a!==""&&a!==!1}const Rl="event";function ac(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.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=ac(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fo=a=>ho(a/100)*100,oc={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",Ol="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"],lc=["e"],uc=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function mo(a){return uc.test(a)}function cc(a){return Zo.includes(a)||lc.includes(a)||mo(a)}const Pl=["d","dl","nor","ot","rtp","su"];function dc(a){return Zo.includes(a)||Pl.includes(a)||mo(a)}const hc=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function fc(a){return Zo.includes(a)||Pl.includes(a)||hc.includes(a)||mo(a)}const mc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function pc(a){return mc.includes(a)||mo(a)}const gc={[Ol]:fc,[Rl]:cc,[Ll]:dc};function kl(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||Ll,i=n===1?pc:gc[r];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const d=r===Ol||r===Rl;d&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=S({},oc,e.formatters),p={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(v=>{let T=a[v];const L=c[v];if(typeof L=="function"&&(T=L(T,p)),v==="v"){if(n===1)return;T=n}v=="pr"&&T===1||(d&&v==="ts"&&!m(T)&&(T=Date.now()),sc(T)&&(ic(v)&&typeof T=="string"&&(T=new Sl(T)),t[v]=T))}),t}function vc(a,e={}){const t={};if(!a)return t;const n=kl(a,e),r=rc(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,l])=>{const d=Il(l,{whitespace:!1});return d&&(i[s]=d),i},t)}function yc(a,e,t){return S(a,vc(e,t))}const _c="CMCD";function bc(a,e={}){return a?Il(kl(a,e),{whitespace:!1}):""}function xc(a,e={}){if(!a)return"";const t=bc(a,e);return encodeURIComponent(t)}function Ec(a,e={}){if(!a)return"";const t=xc(a,e);return`${_c}=${t}`}const Ml=/CMCD=[^&#]+/;function Sc(a,e,t){const n=Ec(e,t);if(!n)return a;if(Ml.test(a))return a.replace(Ml,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class wc{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=r=>{try{this.apply(r,{ot:Pi.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,l=this.hls.levels[i.level],d=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:d};(d===Pi.VIDEO||d===Pi.AUDIO||d==Pi.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(d)/1e3,c.bl=this.getBufferLength(d));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(r,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.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 n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:Ou.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){S(t,this.createData());const n=t.ot===Pi.INIT||t.ot===Pi.VIDEO||t.ot===Pi.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,l)=>(r.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),yc(e.headers,t,i)):e.url=Sc(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let l=i.length-1;l>=0;l--){const d=i[l];if(d.index===n&&d.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Pi.TIMED_TEXT;if(e.sn==="initSegment")return Pi.INIT;if(t==="audio")return Pi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Pi.VIDEO:Pi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Pi.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Pi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:rr.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(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,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(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 Ac=3e5;class Tc extends Q{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.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(n=>n!==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:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===gn.SendAlternateToPenaltyBox&&n.flags===Mn.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&r?s=this.getPathwayForGroupId(l,c,s):d&&(s=d)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===G.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${nt(i)} penalized: ${nt(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}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 n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>Ac&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,fi(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===fe.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===fe.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":l,"URI-REPLACEMENT":d}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const v=new Fn(p.attrs);v["PATHWAY-ID"]=s;const T=v.AUDIO&&`${v.AUDIO}_clone_${s}`,L=v.SUBTITLES&&`${v.SUBTITLES}_clone_${s}`;T&&(n[v.AUDIO]=T,v.AUDIO=T),L&&(r[v.SUBTITLES]=L,v.SUBTITLES=L);const O=Bl(p.uri,v["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),ne=new bt({attrs:v,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:O,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let te=1;te<p.audioGroups.length;te++)ne.addGroupId("audio",`${p.audioGroups[te]}_clone_${s}`);if(p.subtitleGroups)for(let te=1;te<p.subtitleGroups.length;te++)ne.addGroupId("text",`${p.subtitleGroups[te]}_clone_${s}`);return ne});t.push(...c),Fl(this.audioTracks,n,d,s),Fl(this.subtitleTracks,r,d,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,v,T,L)=>{this.log(`Loaded steering manifest: "${r}"`);const O=p.data;if((O==null?void 0:O.VERSION)!==1){this.log(`Steering VERSION ${O.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=O.TTL;const{"RELOAD-URI":ne,"PATHWAY-CLONES":te,"PATHWAY-PRIORITY":Ae}=O;if(ne)try{this.uri=new self.URL(ne,r).href}catch(Ue){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${ne}`);return}this.scheduleRefresh(this.uri||T.url),te&&this.clonePathways(te);const Fe={steeringManifest:O,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,Fe),Ae&&this.updatePathwayPriority(Ae)},onError:(p,v,T,L)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${v.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${v.url} no longer available`);return}let O=this.timeToLoad*1e3;if(p.code===429){const ne=this.loader;if(typeof(ne==null?void 0:ne.getResponseHeader)=="function"){const te=ne.getResponseHeader("Retry-After");te&&(O=parseFloat(te)*1e3)}this.log(`Steering manifest ${v.url} rate limited`);return}this.scheduleRefresh(this.uri||v.url,O)},onTimeout:(p,v,T)=>{this.log(`Timeout loading steering manifest (${v.url})`),this.scheduleRefresh(this.uri||v.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Fl(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=S({},s);return l.details=void 0,l.attrs=new Fn(l.attrs),l.url=l.attrs.URI=Bl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[r],l.attrs["PATHWAY-ID"]=n,l});a.push(...i)})}function Bl(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const d=new self.URL(a);return r&&!l&&(d.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&d.searchParams.set(c,i[c])}),d.href}class va extends Q{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:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=Li(this.config));const l=s.map(ri).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Ti(s);if(n!=="sinf"||l!==dr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let d;try{const L=qe(new Uint8Array(r)),O=Xi(JSON.parse(L).sinf),ne=Et(O);if(!ne)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(ne.subarray(8,24))}catch(L){this.warn(`${i} Failed to parse sinf: ${L}`);return}const c=Y(d),{keyIdToKeySessionPromise:p,mediaKeySessions:v}=this;let T=p[c];for(let L=0;L<v.length;L++){const O=v[L],ne=O.decryptdata;if(!ne.keyId)continue;const te=Y(ne.keyId);if(ui(d,ne.keyId)||ne.uri.replace(/-/g,"").indexOf(c)!==-1){if(T=p[te],!T)continue;if(ne.pssh)break;delete p[te],ne.pssh=new Uint8Array(r),ne.keyId=d,T=p[c]=T.then(()=>this.generateRequestWithPreferredKeySession(O,n,r,"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 ${v.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(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(g.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(g.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===dr.WIDEVINE&&n)return n}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,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,l,d)=>!!s&&d.indexOf(s)===l,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,l)=>{const d=c=>{const p=c.shift();this.getMediaKeysPromise(p,r,i).then(v=>s({keySystem:p,mediaKeys:v})).catch(v=>{c.length?d(c):v instanceof ji?l(v):l(new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_ACCESS,error:v,fatal:!0},v.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Ki===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=na(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],l=(r=s)==null?void 0:r.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${nt(i)}`),l=this.requestMediaKeySystemAccess(e,i);const d=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 v=d.mediaKeys=c.createMediaKeys().then(T=>(this.log(`Media-keys created for "${e}"`),d.hasMediaKeys=!0,p.then(L=>L?this.setMediaKeysServerCertificate(T,e,L):T)));return v.catch(T=>{this.error(`Failed to create media-keys for "${e}"}: ${T}`)}),v})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${Y(e.keyId||[])} keyUri: ${e.uri}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=po(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${Y(e.decryptdata.keyId||[])}
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>ri(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=ri(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}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=Li(this.config),n=e.map(Ti).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let n=0;n<t.length;n++){const r=Cc(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=po(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const l=Nl(r||"internal-error",t);return this.handleError(l,e.frag),Promise.reject(l)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const l=this.getKeySystemForKeyPromise(t).then(({keySystem:d,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(d,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:d,mediaKeys:c,decryptdata:t}))))).then(d=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(d,c,p,"playlist-key")});return l.catch(d=>this.handleError(d,e.frag)),this.keyIdToKeySessionPromise[n]=l,l}return s.catch(l=>{if(l instanceof ji){const d=C({},l.data);this.getKeyStatus(t)==="internal-error"&&(d.decryptdata=t);const c=new ji(d,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 ji){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${Y(n.keyId||[])})`:""}`),this.hls.trigger(g.ERROR,e.data)}else this.error(e.message),this.hls.trigger(g.ERROR,{type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=po(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Ti(e.keyFormat),i=r?[r]:Li(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Li(this.config)),e.length===0)throw new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${nt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).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(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const O=s.call(this.hls,t,n,e);if(!O)throw new Error("Invalid response from configured generateRequest filter");t=O.initDataType,n=O.initData?O.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(O){if(this.warn(O.message),this.hls&&this.hls.config.debug)throw O}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=po(e.decryptdata),d=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${l} URI: ${d} (init data type: ${t} length: ${n.byteLength})`);const c=new ua,p=e._onmessage=O=>{const ne=e.mediaKeysSession;if(!ne){c.emit("error",new Error("invalid state"));return}const{messageType:te,message:Ae}=O;this.log(`"${te}" message event for session "${ne.sessionId}" message size: ${Ae.byteLength}`),te==="license-request"||te==="license-renewal"?this.renewLicense(e,Ae).catch(Fe=>{c.eventNames().length?c.emit("error",Fe):this.handleError(Fe)}):te==="license-release"?e.keySystem===dr.FAIRPLAY&&this.updateKeySession(e,ki("acknowledged")).then(()=>this.removeSession(e)).catch(Fe=>this.handleError(Fe)):this.warn(`unhandled media key message type "${te}"`)},v=(O,ne)=>{ne.keyStatus=O;let te;O.startsWith("usable")?c.emit("resolved"):O==="internal-error"||O==="output-restricted"||O==="output-downscaled"?te=Nl(O,ne.decryptdata):O==="expired"?te=new Error(`key expired (keyId: ${l})`):O==="released"?te=new Error("key released"):O==="status-pending"||this.warn(`unhandled key status change "${O}" (keyId: ${l})`),te&&(c.eventNames().length?c.emit("error",te):this.handleError(te))},T=e._onkeystatuseschange=O=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const te=this.getKeyStatuses(e);if(!Object.keys(te).some(lt=>te[lt]!=="status-pending"))return;if(te[l]==="expired"){this.log(`Expired key ${nt(te)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let Fe=te[l];if(Fe)v(Fe,e);else{var Ue;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Ue=e.keyStatusTimeouts)[l]||(Ue[l]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const yt=this.getKeyStatus(e.decryptdata);if(yt&&yt!=="status-pending")return this.log(`No status for keyId ${l} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${yt} from other session.`),v(yt,e);this.log(`key status for ${l} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),Fe="internal-error",v(Fe,e)},1e3)),this.log(`No status for keyId ${l} (${nt(te)}).`)}};mi(e.mediaKeysSession,"message",p),mi(e.mediaKeysSession,"keystatuseschange",T);const L=new Promise((O,ne)=>{c.on("error",ne),c.on("resolved",O)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l} URI: ${d}`)}).catch(O=>{throw new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_NO_SESSION,error:O,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${O}`)}).then(()=>L).catch(O=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw O}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const l=r;r=n,n=l}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);e.keySystem===dr.PLAYREADY&&i.length===16&&$n(i);const s=Y(i);n==="internal-error"&&(this.bannedKeyIds[s]=n),this.log(`key status change "${n}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=n}),t}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,l)=>{const d={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(T,L,O,ne)=>{s(T.data)},onError:(T,L,O,ne)=>{l(new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:C({url:d.url,data:void 0},T)},`"${e}" certificate request failed (${i}). Status: ${T.code} (${T.text})`))},onTimeout:(T,L,O)=>{l(new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(T,L,O)=>{l(new Error("aborted"))}};r.load(d,p,v)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new ji({type:ve.KEY_SYSTEM_ERROR,details:G.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let p;for(let v=0,T=i.length;v<T;v++){var s,l;p=i[v];const L=(s=p.querySelector("name"))==null?void 0:s.textContent,O=(l=p.querySelector("value"))==null?void 0:l.textContent;L&&O&&e.setRequestHeader(L,O)}}const d=r.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return ki(atob(c))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,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 d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,s,e)}catch(p){this.error(p)}r(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new ji({type:ve.KEY_SYSTEM_ERROR,details:G.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(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==dr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,mi(n,"encrypted",this.onMediaEncrypted),mi(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(bi(e,"encrypted",this.onMediaEncrypted),bi(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 n=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Ci.clearKeyUriToKeyIdMap();const i=r.length;va.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat((n==null||(e=n.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:G.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(g.ERROR,{type:ve.OTHER_ERROR,details:G.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 n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${Y((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.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(ra(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(g.ERROR,{type:ve.OTHER_ERROR,details:G.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(g.ERROR,{type:ve.OTHER_ERROR,details:G.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}va.CDMCleanupPromise=void 0;function po(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return Y(a.keyId)}function Cc(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 ji 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",n=t?G.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:G.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new ji({type:ve.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Dc{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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,d=1e3*s/i,c=this.hls;if(c.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),d>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(g.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,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(n){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(n){le.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){le.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function ya(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function Yo(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Rc(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function Ic(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function Rc(a,e,t){const n=[],r=Ic(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)n.push(l);else if(l.startTime>t)return n}return n}function go(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class Lc 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 n=go(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},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(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.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 n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;go(n.textTracks).forEach(s=>{ya(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:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,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 n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(p=>!n||n.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,v)=>{p.id=v});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=Ht(l,s);if(p>-1)i=s[p];else{const v=Ht(l,this.tracks);i=this.tracks[v]}}let d=this.findTrackId(i);d===-1&&i&&(d=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,c),d!==-1&&this.trackId===-1&&this.setSubtitleTrack(d)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||hn(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(zo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===fe.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 n=this.currentTrack;if(n&&hn(e,n))return n;const r=Ht(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Ht(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 n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(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(g.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=go(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>zo(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!m(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:l="",name:d,type:c,url:p}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:d,type:c,url:p});const v=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(v)}}function Oc(){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,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="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 _a=.025;let vo=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Pc(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class kc{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 n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}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,n=Xo(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=m(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)<_a))}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 Mc(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<_a)?e.start:e.start+e.duration}function zl(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function Qo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function Mc(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 Fc{constructor(e,t,n,r){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(g.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(g.LEVEL_LOADED,s),i.once(g.AUDIO_TRACK_LOADED,s),i.once(g.SUBTITLE_TRACK_LOADED,s),i.on(g.MEDIA_ATTACHING,(l,{media:d})=>{this.removeMediaListeners(),this.mediaAttached=d,this.interstitial.playoutLimit&&(d.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(g.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(g.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(n){}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 n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=rr.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}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=rr.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 n=t-this.startOffset;if(n>0&&n<e)return n}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 n=e-t;if(Math.abs(n)>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,n=this.duration;return Math.min(Math.max(0,e-t),n)}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=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.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 jl=.033;class Bc extends Q{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((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,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 n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&(t<l+(s.duration||0)||i===r-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 n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),l=Object.keys(r),d=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const v=c.cue.pre,T=c.cue.post,L=p.cue.pre,O=p.cue.post;if(v&&!L)return-1;if(L&&!v||T&&!O)return 1;if(O&&!T)return-1;if(!v&&!L&&!T&&!O){const ne=c.startTime,te=p.startTime;if(ne!==te)return ne-te}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,d.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,d)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((d,c)=>Math.abs(d.playout.start-i[c].playout.start)>.005||Math.abs(d.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],d=e[l];if(d.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(d):(c=new kc(d,t),this.eventMap[l]=c,n===!1&&(c.appendInPlace=n)),r.push(c)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(d=>!d.error&&!(d.cue.once&&d.hasPlayed)),e.length){this.resolveOffsets(e,t);let d=0,c=0;if(e.forEach((p,v)=>{const T=p.cue.pre,L=p.cue.post,O=e[v-1]||null,ne=p.appendInPlace,te=L?i:p.startOffset,Ae=p.duration,Fe=p.timelineOccupancy===vo.Range?Ae:0,Ue=p.resumptionOffset,lt=(O==null?void 0:O.startTime)===te,yt=te+p.cumulativeDuration;let Qt=ne?yt+Ae:te+Ue;if(T||!L&&te<=0){const Zt=c;c+=Fe,p.timelineStart=yt;const Wt=s;s+=Ae,n.push({event:p,start:yt,end:Qt,playout:{start:Wt,end:s},integrated:{start:Zt,end:c}})}else if(te<=i){if(!lt){const Bt=te-d;if(Bt>jl){const dn=d,Ln=c;c+=Bt;const Vn=s;s+=Bt;const or={previousEvent:e[v-1]||null,nextEvent:p,start:dn,end:dn+Bt,playout:{start:Vn,end:s},integrated:{start:Ln,end:c}};n.push(or)}else Bt>0&&O&&(O.cumulativeDuration+=Bt,n[n.length-1].end=te)}L&&(Qt=yt),p.timelineStart=yt;const Zt=c;c+=Fe;const Wt=s;s+=Ae,n.push({event:p,start:yt,end:Qt,playout:{start:Wt,end:s},integrated:{start:Zt,end:c}})}else return;const At=p.resumeTime;L||At>i?d=i:d=At}),d<i){var l;const p=d,v=c,T=i-d;c+=T;const L=s;s+=T,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:d,end:p+T,playout:{start:L,end:s},integrated:{start:v,end:c}})}this.setDurations(i,s,c)}else n.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 n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((l,d)=>{const c=l.cue.pre,p=l.cue.post,v=c?0:p?r:l.startTime;this.updateAssetDurations(l),s===v?l.cumulativeDuration=i:(i=0,s=v),!p&&l.snapOptions.in&&(l.resumeAnchor=Hn(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&d+1<e.length&&e[d+1].startTime-e[d].resumeTime<jl&&(e[d+1].appendInPlace=!1,e[d+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const L=m(l.resumeOffset)?l.resumeOffset:l.duration;i+=L})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>_a?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,d=l.edge;if(n>=d)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${d}`),!1;const c=Hn(null,l.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} 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-n)<_a+p||Math.abs(c.end-n)<_a+p?!1:(this.log(`"${e.identifier}" resumption ${n} 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 n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const l=e.assetList[s],d=t+n;l.startOffset=n,l.timelineStart=d,r||(r=l.duration===null),i||(i=!!l.error);const c=l.error?0:l.duration||0;n+=c}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}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 Nc{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=zl(n,this.hls.sessionId,e.baseUrl)}catch(T){const L=this.assignAssetListError(e,G.ASSET_LIST_LOAD_ERROR,T,n);this.hls.trigger(g.ERROR,L);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),d={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(T,L,O,ne)=>{const te=T.data,Ae=te==null?void 0:te.ASSETS;if(!Array.isArray(Ae)){const Fe=this.assignAssetListError(e,G.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),O.url,L,ne);this.hls.trigger(g.ERROR,Fe);return}e.assetListResponse=te,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:te,networkDetails:ne})},onError:(T,L,O,ne)=>{const te=this.assignAssetListError(e,G.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${T.code} ${T.text} (${L.url})`),L.url,ne,O);this.hls.trigger(g.ERROR,te)},onTimeout:(T,L,O)=>{const ne=this.assignAssetListError(e,G.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${L.url})`),L.url,T,O);this.hls.trigger(g.ERROR,ne)}};return l.load(d,p,v),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:ve.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Hl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function yo(a,e){return`[${a}] Advancing timeline position to ${e}`}class $c extends Q{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 n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<l.start||n>=l.end){var d;const L=this.findItemIndex(l);let O=this.schedule.findItemIndexAtTime(n);if(O===-1&&(O=L+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${L} to ${O})`)),!this.isInterstitial(l)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s&&O>L){const ne=this.schedule.findJumpRestrictedIndex(L+1,O);if(ne>L){this.setSchedulePosition(ne);return}}this.setSchedulePosition(O);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const L=l.event.assetList[0];L&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,L))}return}const p=c.timelineStart,v=c.duration||0;if(s&&n<p||n>=p+v){var T;(T=l.event)!=null&&T.appendInPlace&&(this.clearInterstitial(l.event,l),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,c)}},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const l=this.findItemIndex(r);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,l=i.events||[],d=i.items||[],c=i.durations,p=n.map(ne=>ne.identifier),v=!!(l.length||p.length);(v||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
Schedule: ${d.map(ne=>ts(ne))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let T=null,L=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 O=this.bufferingItem;if(O&&(L=this.updateItem(O,this.bufferedPos),this.itemsMatch(O,L)?this.bufferingItem=L:O.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(O.event,null))),n.forEach(ne=>{ne.assetList.forEach(te=>{this.clearAssetPlayer(te.identifier,null)})}),this.playerQueue.forEach(ne=>{if(ne.interstitial.appendInPlace){const te=ne.assetItem.timelineStart,Ae=ne.timelineOffset-te;if(Ae)try{ne.timelineOffset=te}catch(Fe){Math.abs(Ae)>_a&&this.warn(`${Fe} ("${ne.assetId}" ${ne.timelineOffset}->${te})`)}}}),v||r){if(this.hls.trigger(g.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:d.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),O&&L!==T&&this.trimInPlace(L,O),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Nc(e),this.schedule=new Bc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(g.MEDIA_ENDED,this.onMediaEnded,this),e.on(g.ERROR,this.onError,this),e.on(g.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(g.MEDIA_ENDED,this.onMediaEnded,this),e.off(g.ERROR,this.onError,this),e.off(g.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){bi(e,"play",this.onPlay),bi(e,"pause",this.onPause),bi(e,"seeking",this.onSeeking),bi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;mi(n,"seeking",this.onSeeking),mi(n,"timeupdate",this.onTimeupdate),mi(n,"play",this.onPlay),mi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);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 n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),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,n=v=>v&&e.getAssetPlayer(v.identifier),r=(v,T,L,O,ne)=>{if(v){let te=v[T].start;const Ae=v.event;if(Ae){if(T==="playout"||Ae.timelineOccupancy!==vo.Point){const Fe=n(L);(Fe==null?void 0:Fe.interstitial)===Ae&&(te+=Fe.assetItem.startOffset+Fe[ne])}}else{const Fe=O==="bufferedPos"?s():e[O];te+=Fe-v.start}return te}return 0},i=(v,T)=>{var L;if(v!==0&&T!=="primary"&&(L=e.schedule)!=null&&L.length){var O;const ne=e.schedule.findItemIndexAtTime(v),te=(O=e.schedule.items)==null?void 0:O[ne];if(te){const Ae=te[T].start-te.start;return v+Ae}}return v},s=()=>{const v=e.bufferedPos;return v===Number.MAX_VALUE?l("primary"):Math.max(v,0)},l=v=>{var T,L;return(T=e.primaryDetails)!=null&&T.live?e.primaryDetails.edge:((L=e.schedule)==null?void 0:L.durations[v])||0},d=(v,T)=>{var L,O;const ne=e.effectivePlayingItem;if(ne!=null&&(L=ne.event)!=null&&L.restrictions.skip||!e.schedule)return;e.log(`seek to ${v} "${T}"`);const te=e.effectivePlayingItem,Ae=e.schedule.findItemIndexAtTime(v,T),Fe=(O=e.schedule.items)==null?void 0:O[Ae],Ue=e.getBufferingPlayer(),lt=Ue==null?void 0:Ue.interstitial,yt=lt==null?void 0:lt.appendInPlace,Qt=te&&e.itemsMatch(te,Fe);if(te&&(yt||Qt)){const At=n(e.playingAsset),Zt=(At==null?void 0:At.media)||e.primaryMedia;if(Zt){const Wt=T==="primary"?Zt.currentTime:r(te,T,e.playingAsset,"timelinePos","currentTime"),Bt=v-Wt,dn=(yt?Wt:Zt.currentTime)+Bt;if(dn>=0&&(!At||yt||dn<=At.duration)){Zt.currentTime=dn;return}}}if(Fe){let At=v;if(T!=="primary"){const Wt=Fe[T].start,Bt=v-Wt;At=Fe.start+Bt}const Zt=!e.isInterstitial(Fe);if((!e.isInterstitial(te)||te.event.appendInPlace)&&(Zt||Fe.event.appendInPlace)){const Wt=e.media||(yt?Ue==null?void 0:Ue.media:null);Wt&&(Wt.currentTime=At)}else if(te){const Wt=e.findItemIndex(te);if(Ae>Wt){const dn=e.schedule.findJumpRestrictedIndex(Wt+1,Ae);if(dn>Wt){e.setSchedulePosition(dn);return}}let Bt=0;if(Zt)e.timelinePos=At,e.checkBuffer();else{const dn=Fe.event.assetList,Ln=v-(Fe[T]||Fe).start;for(let Vn=dn.length;Vn--;){const or=dn[Vn];if(or.duration&&Ln>=or.startOffset&&Ln<or.startOffset+or.duration){Bt=Vn;break}}}e.setSchedulePosition(Ae,Bt)}}},c=()=>{const v=e.effectivePlayingItem;if(e.isInterstitial(v))return v;const T=t();return e.isInterstitial(T)?T:null},p={get bufferedEnd(){const v=t(),T=e.bufferingItem;if(T&&T===v){var L;return r(T,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-T.playout.start||((L=e.bufferingAsset)==null?void 0:L.startOffset)||0}return 0},get currentTime(){const v=c(),T=e.effectivePlayingItem;return T&&T===v?r(T,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-T.playout.start:0},set currentTime(v){const T=c(),L=e.effectivePlayingItem;L&&L===T&&d(v+L.playout.start,"playout")},get duration(){const v=c();return v?v.playout.end-v.playout.start:0},get assetPlayers(){var v;const T=(v=c())==null?void 0:v.event.assetList;return T?T.map(L=>e.getAssetPlayer(L.identifier)):[]},get playingIndex(){var v;const T=(v=c())==null?void 0:v.event;return T&&e.effectivePlayingAsset?T.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var v;return((v=e.schedule)==null||(v=v.events)==null?void 0:v.slice(0))||[]},get schedule(){var v;return((v=e.schedule)==null||(v=v.items)==null?void 0:v.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 v=t();return e.findItemIndex(v)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const v=e.effectivePlayingItem;return e.findItemIndex(v)},primary:{get bufferedEnd(){return s()},get currentTime(){const v=e.timelinePos;return v>0?v:0},set currentTime(v){d(v,"primary")},get duration(){return l("primary")},get seekableStart(){var v;return((v=e.primaryDetails)==null?void 0:v.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(v){d(v,"integrated")},get duration(){return l("integrated")},get seekableStart(){var v;return i(((v=e.primaryDetails)==null?void 0:v.fragmentStart)||0,"integrated")}},skip:()=>{const v=e.effectivePlayingItem,T=v==null?void 0:v.event;if(T&&!T.restrictions.skip){const L=e.findItemIndex(v);if(T.appendInPlace){const O=v.playout.start+v.event.duration;d(O+.001,"playout")}else e.advanceAfterAssetEnded(T,L,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,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!m(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 n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${nt(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,d=l&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let p;if(s.media)d&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const O=this.getBufferingPlayer();O?(i=O.transferMedia(),p=`${O}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${nt(i)}`);else if(!this.detachedData||s.media===t){const O=this.playerQueue;O.length>1&&O.forEach(ne=>{if(l&&ne.interstitial.appendInPlace!==d){const te=ne.interstitial;this.clearInterstitial(ne.interstitial,null),te.appendInPlace=!1,te.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${te}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const v=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",T=v&&i?i:t;this.log(`${v?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const L=this.schedule;if(T===i&&L){const O=l&&e.assetId===L.assetIdAtEnd;T.overrides={duration:L.duration,endOfStream:!l||O,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 n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(yo("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(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=Qo(n,r);if(!n.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,n){const r=Qo(e,n);if(e.isAssetPastPlayoutLimit(r)){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 d=e.resumeTime;this.timelinePos<d&&(this.log(yo("advanceAfterAssetEnded",d)),this.timelinePos=d,e.appendInPlace&&this.advanceInPlace(d),this.checkBuffer(this.bufferedPos<d)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,l-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[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,v=this.playingAsset,T=v==null?void 0:v.identifier,L=T?this.getAssetPlayer(T):null;if(L&&T&&(!this.eventItemsMatch(s,i)||t!==void 0&&T!==p.assetList[t].identifier)){var d;const O=p.findAssetIndex(v);if(this.log(`INTERSTITIAL_ASSET_ENDED ${O+1}/${p.assetList.length} ${ba(v)}`),this.endedAsset=v,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:v,assetListIndex:O,event:p,schedule:r.slice(0),scheduleIndex:e,player:L}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),O);return}this.retreiveMediaSource(T,i),L.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&L.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(g.INTERSTITIAL_ENDED,{event:p,schedule:r.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const O=(c=this.schedule)==null?void 0:c.items;if(i&&O){const ne=this.findItemIndex(i);this.advanceSchedule(ne,O,t,s,l)}return}}this.advanceSchedule(e,r,t,s,l)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const l=t[e]||null,d=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const v=p.interstitial,T=s.findEventIndex(v.identifier);(T<e||T>e+1)&&this.clearInterstitial(v,l)}),this.isInterstitial(l)){this.timelinePos=Math.min(Math.max(this.timelinePos,l.start),l.end);const p=l.event;if(n===void 0){n=s.findAssetIndex(p,this.timelinePos);const O=Qo(p,n-1);if(p.isAssetPastPlayoutLimit(O)||p.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(p,e,n);return}n=O}const v=this.waitingItem;this.assetsBuffered(l,d)||this.setBufferingItem(l);let T=this.preloadAssets(p,n);if(this.eventItemsMatch(l,v||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${ts(l)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(g.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),!d){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=l;const L=p.assetList[n];if(!L){this.advanceAfterAssetEnded(p,e,n||0);return}if(T||(T=this.getAssetPlayer(L.identifier)),T===null||T.destroyed){const O=p.assetList.length;this.warn(`asset ${n+1}/${O} player destroyed ${p}`),T=this.createAssetPlayer(p,L,n),T.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(L))return;this.startAssetPlayer(T,n,t,e,d),this.shouldPlay&&Hl(T.media)}else l?(this.resumePrimary(l,e,r),this.shouldPlay&&Hl(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.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,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${ts(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(yo("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${ts(e)}`),this.hls.trigger(g.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:rr.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(yo("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.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(g.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(g.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level];if(!n.details)return;const r=C(C({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=C(C({},this.altSelection),{},{audio:n});return}const i=C(C({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=C(C({},this.altSelection),{},{subtitles:n});return}const i=C(C({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Gt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Gt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),l=(n=this.schedule.items)==null?void 0:n[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 n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[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 n=e.end+.25,r=rr.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${ts(e)} (was ${ts(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}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 n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=rr.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let d=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),v=Math.min(p+1,t.length-1),T=t[v];if((d===-1&&i&&e>=i.end||(c=T.event)!=null&&c.appendInPlace&&e+.01>=T.start)&&(d=v),this.isInterstitial(i)){const L=i.event;if(v-l>1&&L.appendInPlace===!1||L.assetList.length===0&&L.assetListLoader)return}if(this.bufferedPos=e,d>p&&d>l)this.bufferedToItem(T);else{const L=this.primaryDetails;this.primaryLive&&L&&e>L.edge-L.targetduration&&T.start<L.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(T)&&this.preloadAssets(T.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(d===l?this.bufferedToItem(s):d===l+1&&this.bufferedToItem(t[d]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!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 d=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${ts(e)}`+(t?` (${d.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,v)=>{const T=this.getAssetPlayer(p.identifier);T&&(v===c&&T.loadSource(),T.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(g.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.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 n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const l=this.primaryMedia;l&&this.bufferAssetPlayer(s,l)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const d=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(d+.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-d;T>0&&(c=Math.round(T*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,d,e.duration,n);const v=this.assetListLoader.loadAssetList(e,c);v&&(e.assetListLoader=v)}else if(!s&&r){for(let c=t;c<r;c++){const p=e.assetList[c],v=this.getAssetPlayerQueueIndex(p.identifier);(v===-1||this.playerQueue[v].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const d=e.assetList[t];if(d){const c=this.getAssetPlayer(d.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(r=>{this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;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 n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const l={parentIdentifier:e.identifier,identifier:Pc(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=S({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const d=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const lt=this.timelinePos-t.timelineStart;if(lt>1){const yt=t.duration;yt&&lt<yt&&(p=lt)}}const v=t.identifier,T=C(C({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:v,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:d||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(T.timelineOffset=t.timelineStart));const L=T.cmcd;L!=null&&L.sessionId&&L.contentId&&(T.cmcd=S({},L,{contentId:Ua(t.uri)})),this.getAssetPlayer(v)&&this.warn(`Duplicate date range identifier ${e} and asset ${v}`);const O=new Fc(this.HlsPlayerClass,T,e,t);this.playerQueue.push(O),e.assetList[n]=t;let ne=!0;const te=lt=>{if(lt.live){var yt;const Zt=new Error(`Interstitials MUST be VOD assets ${e}`),Wt={fatal:!0,type:ve.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:Zt},Bt=((yt=this.schedule)==null?void 0:yt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Wt,e,Bt,n,Zt.message);return}const Qt=lt.edge-lt.fragmentStart,At=t.duration;(ne||At===null||Qt>At)&&(ne=!1,this.log(`Interstitial asset "${v}" duration change ${At} > ${Qt}`),t.duration=Qt,this.updateSchedule())};O.on(g.LEVEL_UPDATED,(lt,{details:yt})=>te(yt)),O.on(g.LEVEL_PTS_UPDATED,(lt,{details:yt})=>te(yt)),O.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Ae=(lt,yt)=>{const Qt=this.getAssetPlayer(v);if(Qt&&yt.tracks){Qt.off(g.BUFFER_CODECS,Ae),Qt.tracks=yt.tracks;const At=this.primaryMedia;this.bufferingAsset===Qt.assetItem&&At&&!Qt.media&&this.bufferAssetPlayer(Qt,At)}};O.on(g.BUFFER_CODECS,Ae);const Fe=()=>{var lt;const yt=this.getAssetPlayer(v);if(this.log(`buffered to end of asset ${yt}`),!yt||!this.schedule)return;const Qt=this.schedule.findEventIndex(e.identifier),At=(lt=this.schedule.items)==null?void 0:lt[Qt];this.isInterstitial(At)&&this.advanceAssetBuffering(At,t)};O.on(g.BUFFERED_TO_END,Fe);const Ue=lt=>()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;this.shouldPlay=!0;const Qt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Qt,lt)};return O.once(g.MEDIA_ENDED,Ue(n)),O.once(g.PLAYOUT_LIMIT_REACHED,Ue(1/0)),O.on(g.ERROR,(lt,yt)=>{if(!this.schedule)return;const Qt=this.getAssetPlayer(v);if(yt.details===G.BUFFER_STALLED_ERROR){if(Qt!=null&&Qt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(yt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${yt.error} ${e}`)}),O.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;const yt=new Error(`Asset player destroyed unexpectedly ${v}`),Qt={fatal:!0,type:ve.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:yt};this.handleAssetItemError(Qt,e,this.schedule.findEventIndex(e.identifier),n,yt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${ba(t)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:O}),O}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&ts(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:l,assetId:d}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==d)&&(p&&(this.clearAssetPlayer(p.identifier,n[r]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${ba(l)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,l=this.schedule.findEventIndex(i.identifier),d=(n=this.schedule.items)==null?void 0:n[l];if(!d)return;e.loadSource(),this.setBufferingItem(d),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 v=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(v&&!De(v,e.tracks)){const T=new Error(`Asset ${ba(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(v)}')`),L={fatal:!0,type:ve.OTHER_ERROR,details:G.INTERSTITIAL_ASSET_ITEM_ERROR,error:T},O=i.findAssetIndex(s);this.handleAssetItemError(L,i,l,O,T.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const l=this.getAssetPlayer(s.identifier);if(l){const d=l.currentTime||r-s.timelineStart,c=l.duration-d;if(this.warn(`Stalled at ${d} of ${d+c} in ${l} ${e} (media.currentTime: ${r})`),d&&(c/n.playbackRate<.5||l.bufferedInPlaceToEnd(n))&&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,n,r,i){if(e.details===G.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&ba(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",d=this.getAssetPlayerQueueIndex(l),c=this.playerQueue[d]||null,p=this.schedule.items,v=S({},e,{fatal:!1,errorAction:Kn(!0),asset:s,assetListIndex:r,event:t,schedule:p,scheduleIndex:n,player:c});if(this.hls.trigger(g.INTERSTITIAL_ASSET_ERROR,v),!e.fatal)return;const T=this.playingAsset,L=this.bufferingAsset,O=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=O),!t.assetList.some(ne=>!ne.error))t.error=O;else for(let ne=r;ne<t.assetList.length;ne++)this.resetAssetPlayer(t.assetList[ne].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):T&&T.identifier===l?this.advanceAfterAssetEnded(t,n,r):L&&L.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,L)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${ts(n)} error: ${e.error}`);let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const i=this.updateItem(n,r);if(this.itemsMatch(n,i)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t)),!this.schedule)return;const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}else this.checkStart()}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,l=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const d=i.timelineStart,c=i.duration;let p=0;l.forEach((ne,te)=>{const Ae=parseFloat(ne.DURATION);this.createAsset(i,te,p,d+p,Ae,ne.URI),p+=Ae}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const v=this.waitingItem,T=(v==null?void 0:v.event.identifier)===s;this.updateSchedule();const L=(r=this.bufferingItem)==null?void 0:r.event;if(T){var O;const ne=this.schedule.findEventIndex(s),te=(O=this.schedule.items)==null?void 0:O[ne];if(te){if(!this.playingItem&&this.timelinePos>te.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==ne){i.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${i}`),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(te)}this.setSchedulePosition(ne)}else if((L==null?void 0:L.identifier)===s){const ne=i.assetList[0];if(ne){const te=this.getAssetPlayer(ne.identifier);if(L.appendInPlace){const Ae=this.primaryMedia;te&&Ae&&this.bufferAssetPlayer(te,Ae)}else te&&te.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case G.ASSET_LIST_PARSING_ERROR:case G.ASSET_LIST_LOAD_ERROR:case G.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case G.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Kl=500;class Uc extends Ks{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",ee.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(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=sn.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:n,success:r}=t;if(this.fragContextChanged(n)||(ze(n)&&(this.fragPrevious=n),this.state=sn.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=n.start;for(let c=0;c<i.length;c++)if(l>=i[c].start&&l<=i[c].end){s=i[c];break}const d=n.start+n.duration;s?s.end=d:(s={start:l,end:d},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-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(n,i,ee.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ee.SUBTITLE&&(t.details===G.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==sn.STOPPED&&(this.state=sn.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&_l(this.levels,t)){this.levels=t.map(n=>new bt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new bt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ee.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==sn.STOPPED&&this.setInterval(Kl)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const d=i[l];if(l>=i.length||!d)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||(n=d.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const v=this.mainDetails;if(!v){this.startFragRequested=!1;return}const T=v.fragments[0];if(!d.details)s.hasProgramDateTime&&v.hasProgramDateTime?(Cs(s,v),c=s.fragmentStart):T&&(c=T.start,js(s,c));else{var p;c=this.alignPlaylists(s,d.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&T&&(c=T.start,js(s,c))}v&&!this.startFragRequested&&this.setStartPosition(v,c)}d.details=s,this.levelLastLoaded=d,l===r&&(this.hls.trigger(g.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===sn.IDLE&&(Hn(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&vi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Hi(r.method)).catch(l=>{throw i.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const d=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:d}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=sn.IDLE})}}doTick(){if(!this.media){this.state=sn.IDLE;return}if(this.state===sn.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=rr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:d}=s,c=n.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(d>p)return;const v=c.fragments,T=v.length,L=c.edge;let O=null;const ne=this.fragPrevious;if(l<L){const Fe=r.maxFragLookUpTolerance,Ue=l>L-Fe?0:Fe;O=Hn(ne,v,Math.max(v[0].start,l),Ue),!O&&ne&&ne.start<v[0].start&&(O=v[0])}else O=v[T-1];if(O=this.filterReplacedPrimary(O,n.details),!O)return;const te=O.sn-c.startSN,Ae=v[te-1];if(Ae&&Ae.cc===O.cc&&this.fragmentTracker.getState(Ae)===er.NOT_LOADED&&(O=Ae),this.fragmentTracker.getState(O)===er.NOT_LOADED){const Fe=this.mapToInitFragWhenRequired(O);Fe&&this.loadFragment(Fe,n,l)}}}loadFragment(e,t,n){ze(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new zc(this.tracksBuffered[this.currentTrackId]||[])}}class zc{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const jc={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},Gl=a=>String.fromCharCode(jc[a]||a),ns=15,ys=100,Hc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Kc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Gc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Wc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Vc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Zc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;le.log(`${this.time} [${e}] ${n}`)}}}const qs=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].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 n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}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 Yc{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 Xc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Wl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ys;t++)this.chars.push(new Yc);this.logger=e}equals(e){for(let t=0;t<ys;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ys;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ys;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>ys&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ys)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].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=Gl(e);if(this.pos>=ys){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<ys;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 n=0;n<ys;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}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=ns-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ns;t++)this.rows.push(new Xc(e));this.logger=e}reset(){for(let e=0;e<ns;e++)this.rows[e].clear();this.currRow=ns-1}equals(e){let t=!0;for(let n=0;n<ns;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ns;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ns;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 = "+nt(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<ns;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,d=this.logger.time;if(l!==null&&d!==null&&l<d)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+nt(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 n="",r=-1;for(let i=0;i<ns;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class Vl{constructor(e,t,n){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(n),this.nonDisplayedMemory=new qo(n),this.lastOutputScreen=new qo(n),this.currRollUpRow=this.displayedMemory.rows[ns-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[ns-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 n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);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 n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+nt(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,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=qc(),this.logger=void 0;const r=this.logger=new Zc;this.channels=[null,new Vl(e,t,r),new Vl(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,l=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+qs([t[n],t[n+1]])+"] -> ("+qs([r,i])+")");const d=this.cmdHistory;if(r>=16&&r<=31){if(Qc(r,i,d)){_o(null,null,d),this.logger.log(3,()=>"Repeated command ("+qs([r,i])+") is dropped");continue}_o(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else _o(null,null,d);if(!s&&(l=this.parseChars(r,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([r,i])+" orig: "+qs([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))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 n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+qs([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?Hc[e]:Gc[e]:n=s===1?Kc[e]:Wc[e];const l=this.channels[s];return l?(l.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=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 '"+Gl(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+qs(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Vc[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()}_o(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function _o(a,e,t){t.a=a,t.b=e}function Qc(a,e,t){return t.a===a&&t.b===e}function qc(){return{a:null,b:null}}var Jo=function(){if(Ir!=null&&Ir.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,d){if(typeof d!="string"||!Array.isArray(l))return!1;const c=d.toLowerCase();return~l.indexOf(c)?c:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...d){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const v in p)l[v]=p[v]}return l}function s(l,d,c){const p=this,v={enumerable:!0};p.hasBeenReset=!1;let T="",L=!1,O=l,ne=d,te=c,Ae=null,Fe="",Ue=!0,lt="auto",yt="start",Qt=50,At="middle",Zt=50,Wt="middle";Object.defineProperty(p,"id",i({},v,{get:function(){return T},set:function(Bt){T=""+Bt}})),Object.defineProperty(p,"pauseOnExit",i({},v,{get:function(){return L},set:function(Bt){L=!!Bt}})),Object.defineProperty(p,"startTime",i({},v,{get:function(){return O},set:function(Bt){if(typeof Bt!="number")throw new TypeError("Start time must be set to a number.");O=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},v,{get:function(){return ne},set:function(Bt){if(typeof Bt!="number")throw new TypeError("End time must be set to a number.");ne=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},v,{get:function(){return te},set:function(Bt){te=""+Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},v,{get:function(){return Ae},set:function(Bt){Ae=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},v,{get:function(){return Fe},set:function(Bt){const dn=n(Bt);if(dn===!1)throw new SyntaxError("An invalid or illegal string was specified.");Fe=dn,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},v,{get:function(){return Ue},set:function(Bt){Ue=!!Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},v,{get:function(){return lt},set:function(Bt){if(typeof Bt!="number"&&Bt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");lt=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},v,{get:function(){return yt},set:function(Bt){const dn=r(Bt);if(!dn)throw new SyntaxError("An invalid or illegal string was specified.");yt=dn,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},v,{get:function(){return Qt},set:function(Bt){if(Bt<0||Bt>100)throw new Error("Position must be between 0 and 100.");Qt=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},v,{get:function(){return At},set:function(Bt){const dn=r(Bt);if(!dn)throw new SyntaxError("An invalid or illegal string was specified.");At=dn,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},v,{get:function(){return Zt},set:function(Bt){if(Bt<0||Bt>100)throw new Error("Size must be between 0 and 100.");Zt=Bt,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},v,{get:function(){return Wt},set:function(Bt){const dn=r(Bt);if(!dn)throw new SyntaxError("An invalid or illegal string was specified.");Wt=dn,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class Jc{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(n,r,i,s){return(n|0)*3600+(r|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 e0{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){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 n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function Xl(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const l=s[0],d=s[1];e(l,d)}}const el=new Jo(0,0,""),bo=el.align==="middle"?"middle":"center";function t0(a,e,t){const n=a;function r(){const l=Yl(a);if(l===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,d){const c=new e0;Xl(l,function(T,L){let O;switch(T){case"region":for(let ne=t.length-1;ne>=0;ne--)if(t[ne].id===L){c.set(T,t[ne].region);break}break;case"vertical":c.alt(T,L,["rl","lr"]);break;case"line":O=L.split(","),c.integer(T,O[0]),c.percent(T,O[0])&&c.set("snapToLines",!1),c.alt(T,O[0],["auto"]),O.length===2&&c.alt("lineAlign",O[1],["start",bo,"end"]);break;case"position":O=L.split(","),c.percent(T,O[0]),O.length===2&&c.alt("positionAlign",O[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(T,L);break;case"align":c.alt(T,L,["start",bo,"end","left","right"]);break}},/:/,/\s/),d.region=c.get("region",null),d.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),d.line=p,d.lineAlign=c.get("lineAlign","start"),d.snapToLines=c.get("snapToLines",!0),d.size=c.get("size",100),d.align=c.get("align",bo);let v=c.get("position","auto");v==="auto"&&el.position===50&&(v=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=v}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function Ql(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class n0{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Jc,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 n(){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 r(i){Xl(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();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=n(),t.state){case"HEADER":/:/.test(i)?r(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{t0(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 r0=/\r\n|\n\r|\n|\r/g,tl=function(e,t,n=0){return e.slice(n,n+t.length)===t},i0=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!m(t)||!m(n)||!m(r)||!m(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function nl(a,e,t){return Ua(a.toString())+Ua(e.toString())+Ua(t)}const s0=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function a0(a,e,t,n,r,i,s){const l=new n0,d=Me(new Uint8Array(a)).trim().replace(r0,`
`).split(`
`),c=[],p=e?os(e.baseTime,e.timescale):0;let v="00:00.000",T=0,L=0,O,ne=!0;l.oncue=function(te){const Ae=t[n];let Fe=t.ccOffset;const Ue=(T-p)/9e4;if(Ae!=null&&Ae.new&&(L!==void 0?Fe=t.ccOffset=Ae.start:s0(t,n,Ue)),Ue){if(!e){O=new Error("Missing initPTS for VTT MPEGTS");return}Fe=Ue-t.presentationOffset}const lt=te.endTime-te.startTime,yt=Ri((te.startTime+Fe-L)*9e4,r*9e4)/9e4;te.startTime=Math.max(yt,0),te.endTime=Math.max(yt+lt,0);const Qt=te.text.trim();te.text=decodeURIComponent(encodeURIComponent(Qt)),te.id||(te.id=nl(te.startTime,te.endTime,Qt)),te.endTime>0&&c.push(te)},l.onparsingerror=function(te){O=te},l.onflush=function(){if(O){s(O);return}i(c)},d.forEach(te=>{if(ne)if(tl(te,"X-TIMESTAMP-MAP=")){ne=!1,te.slice(16).split(",").forEach(Ae=>{tl(Ae,"LOCAL:")?v=Ae.slice(6):tl(Ae,"MPEGTS:")&&(T=parseInt(Ae.slice(7)))});try{L=i0(v)/1e3}catch(Ae){O=Ae}return}else te===""&&(ne=!1);l.parse(te+`
`)}),l.flush()}const rl="stpp.ttml.im1t",ql=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Jl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o0={left:"start",center:"center",right:"end",start:"start",end:"end"};function eu(a,e,t,n){const r=ce(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>Me(l)),s=Ui(e.baseTime,1,e.timescale);try{i.forEach(l=>t(l0(l,s)))}catch(l){n(l)}}function l0(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((v,T)=>(v[T]=r.getAttribute(`ttp:${T}`)||i[T],v),{}),l=r.getAttribute("xml:space")!=="preserve",d=tu(il(r,"styling","style")),c=tu(il(r,"layout","region")),p=il(r,"body","[begin]");return[].map.call(p,v=>{const T=nu(v,l);if(!T||!v.hasAttribute("begin"))return null;const L=al(v.getAttribute("begin"),s),O=al(v.getAttribute("dur"),s);let ne=al(v.getAttribute("end"),s);if(L===null)throw ru(v);if(ne===null){if(O===null)throw ru(v);ne=L+O}const te=new Jo(L-e,ne-e,T);te.id=nl(te.startTime,te.endTime,te.text);const Ae=c[v.getAttribute("region")],Fe=d[v.getAttribute("style")],Ue=u0(Ae,Fe,d),{textAlign:lt}=Ue;if(lt){const yt=o0[lt];yt&&(te.lineAlign=yt),te.align=lt}return S(te,Ue),te}).filter(v=>v!==null)}function il(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function nu(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
`:(i=n.childNodes)!=null&&i.length?nu(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function u0(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((l,d)=>{const c=sl(e,n,d)||sl(a,n,d)||sl(r,n,d);return c&&(l[d]=c),l},{})}function sl(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function ru(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=c0(a,e):Jl.test(a)&&(t=d0(a,e))),t}function c0(a,e){const t=ql.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function d0(a,e){const t=Jl.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}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,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class h0{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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.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"),n=new xo(this,"textTrack3"),r=new xo(this,"textTrack4");this.cea608Parser1=new Zl(1,e,t),this.cea608Parser2=new Zl(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const d=i[l],c=f0(d[0],d[1],t,n);if(c>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),s=!0,c/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,r)}else{const l=this.Cues.newCue(null,t,n,r);this.hls.trigger(g.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:l}=this;n===ee.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(d=>{this.initPTS[d.frag.cc]?this.onFragLoaded(g.FRAG_LOADED,d):this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];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:n,media:r}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)n[e]=l,ya(n[e]),$l(n[e],r);else{const d=this.createTextTrack("captions",i,s);d&&(d[e]=!0,n[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{ya(r[i]),delete r[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 n=0;n<t.length;n++)ya(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===rl);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(_l(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?go(s.textTracks):null;if(this.tracks.forEach((d,c)=>{let p;if(l){let v=null;for(let T=0;T<l.length;T++)if(l[T]&&su(l[T],d)){v=l[T],l[T]=null;break}v&&(p=v)}if(p)ya(p);else{const v=iu(d);p=this.createTextTrack(v,d.name,d.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const d=l.filter(c=>c!==null).map(c=>c.label);d.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${d.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(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}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===ee.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:d,sn:c}=t.frag,p=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==l+1||c===l&&p!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===ee.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===rl?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;eu(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[n.cc]&&l===-1){s.push(e);return}const d=this.hls,c=(t=n.initSegment)!=null&&t.data?jt(n.initSegment.data,new Uint8Array(r)).buffer:r;a0(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,p=>{this._appendCues(p,n.level),d.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},p=>{const v=p.message==="Missing initPTS for VTT MPEGTS";v?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${p}`),!(v&&l>n.cc)&&d.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:p})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||eu(t,this.initPTS[e.cc],()=>{n.textCodec=rl,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>Ul(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ee.SUBTITLE&&this.onFragLoaded(g.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===ee.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,l[0]),this.cea608Parser2.addData(r[i].pts,l[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],l=127&e[r++],d=127&e[r++];if(l===0&&d===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),t[p].push(d))}}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 f0(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function au(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const m0=/\s/,p0={newCue(a,e,t,n){const r=[];let i,s,l,d,c;const p=self.VTTCue||self.TextTrackCue;for(let T=0;T<n.rows.length;T++)if(i=n.rows[T],l=!0,d=0,c="",!i.isEmpty()){var v;for(let ne=0;ne<i.chars.length;ne++)m0.test(i.chars[ne].uchar)&&l?d++:(c+=i.chars[ne].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const L=Ql(c.trim()),O=nl(e,t,L);a!=null&&(v=a.cues)!=null&&v.getCueById(O)||(s=new p(e,t,L),s.id=O,s.line=T+1,s.align="left",s.position=10+Math.min(80,Math.floor(d*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((T,L)=>T.line==="auto"||L.line==="auto"?0:T.line>8&&L.line>8?L.line-T.line:T.line-L.line),r.forEach(T=>Ul(a,T))),r}};function g0(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const v0=/(\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||x0,this.controller=new self.AbortController,this.stats=new E}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,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=y0(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:d,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=d&&m(d)?d:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Na(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(v=>{var T;this.response=this.loader=v;const L=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(L-r.loading.start)),!v.ok){const{status:ne,statusText:te}=v;throw new E0(te||"fetch, bad network response",ne,v)}r.loading.first=L,r.total=b0(v.headers)||r.total;const O=(T=this.callbacks)==null?void 0:T.onProgress;return O&&m(t.highWaterMark)?this.loadProgressively(v,r,e,t.highWaterMark,O):s?v.arrayBuffer():e.responseType==="json"?v.json():v.text()}).then(v=>{var T,L;const O=this.response;if(!O)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const ne=v[l];ne&&(r.loaded=r.total=ne);const te={url:O.url,data:v,code:O.status},Ae=(T=this.callbacks)==null?void 0:T.onProgress;Ae&&!m(t.highWaterMark)&&Ae(r,e,v,O),(L=this.callbacks)==null||L.onSuccess(te,r,e,O)}).catch(v=>{var T;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const L=v&&v.code||0,O=v?v.message:null;(T=this.callbacks)==null||T.onError({code:L,text:O},e,v?v.details:null,r)})}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,n,r=0,i){const s=new Ta,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,v=p.length;return t.loaded+=v,v<r||s.dataLength?(s.push(p),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,p.buffer,e),d()}).catch(()=>Promise.reject());return d()}}function y0(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(S({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function _0(a){const e=v0.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function b0(a){const e=a.get("Content-Range");if(e){const n=_0(e);if(m(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function x0(a,e){return new self.Request(a.url,e)}class E0 extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const S0=/^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 E,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,n){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=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var l;(l=this.callbacks)==null||l.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const l in r)e.setRequestHeader(l,r[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),n.timeout=i&&m(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.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-(n.loading.first-n.loading.start)))),r===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 O=p!=null?p:t.response;if(O!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const ne=t.responseType==="arraybuffer"?O.byteLength:O.length;n.loaded=n.total=ne,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const te=(s=this.callbacks)==null?void 0:s.onProgress;te&&te(n,e,O,t);const Ae={url:t.responseURL,data:O,code:c};(l=this.callbacks)==null||l.onSuccess(Ae,n,e,t);return}}const v=i.loadPolicy.errorRetry,T=n.retry,L={url:e.url,data:void 0,code:c};if(_r(v,T,!1,L))this.retry(v);else{var d;le.error(`${c} while loading ${e.url}`),(d=this.callbacks)==null||d.onError({code:c,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(_r(e,t,!0))this.retry(e);else{var n;le.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=sr(e,n.retry),n.retry++,le.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.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&&S0.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 w0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},A0=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:Sn,bufferController:Ru,capLevelController:Ho,errorController:ar,fpsController:Dc,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:w0},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},T0()),{},{subtitleStreamController:Uc,subtitleTrackController:Lc,timelineController:h0,audioStreamController:Tu,audioTrackController:Cu,emeController:va,cmcdController:wc,contentSteeringController:Tc,interstitialsController:$c});function T0(){return{cueHandler:p0,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 C0(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 n=ol(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,d=e[l]===void 0,c=[];i.forEach(p=>{const v=`${s}Loading${p}`,T=e[v];if(T!==void 0&&d){c.push(v);const L=n[l].default;switch(e[l]={default:L},p){case"TimeOut":L.maxLoadTimeMs=T,L.maxTimeToFirstByteMs=T;break;case"MaxRetry":L.errorRetry.maxNumRetry=T,L.timeoutRetry.maxNumRetry=T;break;case"RetryDelay":L.errorRetry.retryDelayMs=T,L.timeoutRetry.retryDelayMs=T;break;case"MaxRetryTimeout":L.errorRetry.maxRetryDelayMs=T,L.timeoutRetry.maxRetryDelayMs=T;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${nt(e[l])}`)}),C(C({},n),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 D0(a,e){const t=a.loader;t!==ou&&t!==lu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):g0()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const Eo=2,I0=.1,R0=.05,L0=100;class O0 extends ci{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 n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.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(L0),this.mediaSource=t.mediaSource;const n=this.media=t.media;mi(n,"playing",this.onMediaPlaying),mi(n,"waiting",this.onMediaWaiting),mi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(bi(n,"playing",this.onMediaPlaying),bi(n,"waiting",this.onMediaWaiting),bi(n,"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 n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:l}=s,d=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||d){d&&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(g.MEDIA_ENDED,{stalled:!1}));return}if(!rr.getBuffered(s).length){this.nudgeRetry=0;return}const v=rr.bufferInfo(s,e,0),T=v.nextStart||0,L=this.fragmentTracker;if(l&&L&&this.hls){const Qt=uu(this.hls.inFlightFragments,e),At=v.len>Eo,Zt=!T||Qt||T-e>Eo&&!L.getPartialFragment(e);if(At||Zt)return;this.moved=!1}const O=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&L){if(!(v.len>0)&&!T)return;const At=Math.max(T,v.start||0)-e,Wt=!!(O!=null&&O.live)?O.targetduration*2:Eo,Bt=So(e,L);if(At>0&&(At<=Wt||Bt)){s.paused||this._trySkipBufferHole(Bt);return}}const ne=i.detectStallWithCurrentTimeMs,te=self.performance.now(),Ae=this.waiting;let Fe=this.stalled;if(Fe===null)if(Ae>0&&te-Ae<ne)Fe=this.stalled=Ae;else{this.stalled=te;return}const Ue=te-Fe;if(!l&&(Ue>=ne||Ae)&&this.hls){var lt;if(((lt=this.mediaSource)==null?void 0:lt.readyState)==="ended"&&!(O!=null&&O.live)&&Math.abs(e-((O==null?void 0:O.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(v),!this.media||!this.hls)return}const yt=rr.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(yt,Ue,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(g.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=rr.bufferedInfo(rr.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=rr.timeRangesToArray(r),l=rr.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const d=rr.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((d===-1||d>l)&&p-c<1&&e-c<2){const v=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${d}`);this.warn(v.message),this.media.currentTime+=1e-6;let T=So(e,this.fragmentTracker);T&&"fragment"in T?T=T.fragment:T||(T=void 0);const L=rr.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:v,reason:v.message,frag:T,buffer:L.len,bufferInfo:L})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:l}=this,d=(r=this.hls)==null?void 0:r.config;if(!l||!s||!d)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=So(n,s);if((p||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const v=e.buffered,T=this.adjacentTraversal(e,n);(v&&v.length>1&&e.len>d.maxBufferHole||e.nextStart&&(e.nextStart-n<d.maxBufferHole||T))&&(t>d.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,ee.MAIN),s=n.getFragAtPos(r,ee.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${nt(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=rr.bufferInfo(r,s,0),d=s<l.start?l.start:l.nextStart;if(d&&this.hls){const p=l.len<=i.maxBufferHole,v=l.len>0&&l.len<1&&r.readyState<3,T=d-s;if(T>0&&(p||v)){if(T>i.maxBufferHole){let O=!1;if(s===0){const ne=n.getAppendedFrag(0,ee.MAIN);ne&&d<ne.end&&(O=!0)}if(!O&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,d))return 0;let te=!1,Ae=e.end;for(;Ae<d;){const Fe=So(Ae,n);if(Fe)Ae+=Fe.duration;else{te=!0;break}}if(te)return 0}}const L=Math.max(d+R0,s+I0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${L}`),this.moved=!0,r.currentTime=L,!(e!=null&&e.gap)){const O=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${L}`),ne={type:ve.MEDIA_ERROR,details:G.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:O,reason:O.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?ne.part=e:ne.frag=e),this.hls.trigger(g.ERROR,ne)}return L}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const l=s+(r+1)*i.nudgeOffset,d=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(d.message),n.currentTime=l,t.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.BUFFER_NUDGE_ON_STALL,error:d,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(g.ERROR,{type:ve.MEDIA_ERROR,details:G.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 n=cu(a.audio);return n&&n.start<=e?n:null}function cu(a){if(!a)return null;switch(a.state){case sn.IDLE:case sn.STOPPED:case sn.ENDED:case sn.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,ee.MAIN)||e.getPartialFragment(a)}const P0=.25;function ll(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ul(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,nt(r?C({type:r},n):n))}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 k0{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(g.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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.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&&ya(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 n=e[t];if(n.kind==="metadata"&&n.label==="id3")return $l(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)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 d=i[l].type;if(d===pi.emsg&&!n||!r)continue;const c=Ma(i[l].data),p=i[l].pts;let v=p+i[l].duration;v>wo&&(v=wo),v-p<=0&&(v=p+P0);for(let L=0;L<c.length;L++){const O=c[L];if(!ro(O)){this.updateId3CueEnds(p,d);const ne=ul(s,p,v,O,d);ne&&this.id3Track.addCue(ne)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===wo&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:d}}=s;if(i&&(l||d)){let c;r==="audio"?c=p=>p.type===pi.audioId3&&d:r==="video"?c=p=>p.type===pi.emsg&&l:c=p=>p.type===pi.audioId3&&d||p.type===pi.emsg&&l,Yo(i,t,n,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:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const l=ll();if(n&&r&&!s){const{fragmentStart:ne,fragmentEnd:te}=e;let Ae=this.assetCue;Ae?(Ae.startTime=ne,Ae.endTime=te):l&&(Ae=this.assetCue=ul(l,ne,te,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Ae&&(Ae.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Ae),Ae.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:d}=this,{dateRanges:c}=e,p=Object.keys(c);let v=this.dateRangeCuesAppended;if(d&&t){var T;if((T=d.cues)!=null&&T.length){const ne=Object.keys(v).filter(te=>!p.includes(te));for(let te=ne.length;te--;){var L;const Ae=ne[te],Fe=(L=v[Ae])==null?void 0:L.cues;delete v[Ae],Fe&&Object.keys(Fe).forEach(Ue=>{const lt=Fe[Ue];if(lt){lt.removeEventListener("enter",this.onEventCueEnter);try{d.removeCue(lt)}catch(yt){}}})}}else v=this.dateRangeCuesAppended={}}const O=e.fragments[e.fragments.length-1];if(!(p.length===0||!m(O==null?void 0:O.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let ne=0;ne<p.length;ne++){const te=p[ne],Ae=c[te],Fe=Ae.startTime,Ue=v[te],lt=(Ue==null?void 0:Ue.cues)||{};let yt=(Ue==null?void 0:Ue.durationKnown)||!1,Qt=wo;const{duration:At,endDate:Zt}=Ae;if(Zt&&At!==null)Qt=Fe+At,yt=!0;else if(Ae.endOnNext&&!yt){const Bt=p.reduce((dn,Ln)=>{if(Ln!==Ae.id){const Vn=c[Ln];if(Vn.class===Ae.class&&Vn.startDate>Ae.startDate&&(!dn||Ae.startDate<dn.startDate))return Vn}return dn},null);Bt&&(Qt=Bt.startTime,yt=!0)}const Wt=Object.keys(Ae.attr);for(let Bt=0;Bt<Wt.length;Bt++){const dn=Wt[Bt];if(!Jr(dn))continue;const Ln=lt[dn];if(Ln)yt&&!(Ue!=null&&Ue.durationKnown)?Ln.endTime=Qt:Math.abs(Ln.startTime-Fe)>.01&&(Ln.startTime=Fe,Ln.endTime=Qt);else if(l){let Vn=Ae.attr[dn];ni(dn)&&(Vn=B(Vn));const Zn=ul(l,Fe,Qt,{key:dn,data:Vn},pi.dateRange);Zn&&(Zn.id=te,this.id3Track.addCue(Zn),lt[dn]=Zn,s&&(dn==="X-ASSET-LIST"||dn==="X-ASSET-URL")&&Zn.addEventListener("enter",this.onEventCueEnter))}}v[te]={cues:lt,dateRange:Ae,durationKnown:yt}}}}}class M0{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,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const l=this.targetLatency;if(l===null)return;const d=r-l,c=Math.min(this.maxLatency,l+n.targetduration);if(d<c&&d>.05&&this.forwardBufferLength>1){const v=Math.min(2,Math.max(1,s)),T=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,L=Math.min(v,Math.max(1,T));this.changeMediaPlaybackRate(t,L)}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:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,d=this.hls.userConfig;let c=l&&n||t;(this._targetLatencyUpdated||d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const p=r;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 n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,l=r-(this.config.lowLatencyMode&&n.partTarget||n.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 n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.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 n;t.details===G.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.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 F0 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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.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 n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let l=!1,d=!1,c=!1;t.levels.forEach(p=>{const v=p.attrs;let{audioCodec:T,videoCodec:L}=p;T&&(p.audioCodec=T=X(T,n)||void 0),L&&(L=p.videoCodec=pn(L));const{width:O,height:ne,unknownCodecs:te}=p,Ae=(te==null?void 0:te.length)||0;if(l||(l=!!(O&&ne)),d||(d=!!L),c||(c=!!T),Ae||T&&!this.isAudioSupported(T)||L&&!this.isVideoSupported(L)){this.log(`Some or all CODECS not supported "${v.CODECS}"`);return}const{CODECS:Fe,"FRAME-RATE":Ue,"HDCP-LEVEL":lt,"PATHWAY-ID":yt,RESOLUTION:Qt,"VIDEO-RANGE":At}=v,Wt=`${`${yt||"."}-`}${p.bitrate}-${Qt}-${Ue}-${Fe}-${At}-${lt}`;if(i[Wt])if(i[Wt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Bt=s[Wt]+=1;p.attrs["PATHWAY-ID"]=new Array(Bt+1).join(".");const dn=this.createLevel(p);i[Wt]=dn,r.push(dn)}else i[Wt].addGroupId("audio",v.AUDIO),i[Wt].addGroupId("text",v.SUBTITLES);else{const Bt=this.createLevel(p);i[Wt]=Bt,s[Wt]=1,r.push(Bt)}}),this.filterAndSortMediaOptions(r,t,l,d,c)}createLevel(e){const t=new bt(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=en(r,[])}return t}isAudioSupported(e){return $e(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return $e(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let l=[],d=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(c=c.filter(({videoCodec:Fe,videoRange:Ue,width:lt,height:yt})=>(!!Fe||!!(lt&&yt))&&we(Ue))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let Fe="no level with compatible codecs found in manifest",Ue=Fe;t.levels.length&&(Ue=`one or more CODECS in variant not supported: ${nt(t.levels.map(yt=>yt.attrs.CODECS).filter((yt,Qt,At)=>At.indexOf(yt)===Qt))}`,this.warn(Ue),Fe+=` (${Ue})`);const lt=new Error(Fe);this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:G.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:lt,reason:Ue})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(Fe=>!Fe.audioCodec||this.isAudioSupported(Fe.audioCodec)),du(l)),t.subtitles&&(d=t.subtitles,du(d));const v=c.slice(0);c.sort((Fe,Ue)=>{if(Fe.attrs["HDCP-LEVEL"]!==Ue.attrs["HDCP-LEVEL"])return(Fe.attrs["HDCP-LEVEL"]||"")>(Ue.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&Fe.height!==Ue.height)return Fe.height-Ue.height;if(Fe.frameRate!==Ue.frameRate)return Fe.frameRate-Ue.frameRate;if(Fe.videoRange!==Ue.videoRange)return ht.indexOf(Fe.videoRange)-ht.indexOf(Ue.videoRange);if(Fe.videoCodec!==Ue.videoCodec){const lt=J(Fe.videoCodec),yt=J(Ue.videoCodec);if(lt!==yt)return yt-lt}if(Fe.uri===Ue.uri&&Fe.codecSet!==Ue.codecSet){const lt=be(Fe.codecSet),yt=be(Ue.codecSet);if(lt!==yt)return yt-lt}return Fe.averageBitrate!==Ue.averageBitrate?Fe.averageBitrate-Ue.averageBitrate:0});let T=v[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==v.length)){for(let Fe=0;Fe<v.length;Fe++)if(v[Fe].pathwayId===c[0].pathwayId){T=v[Fe];break}}this._levels=c;for(let Fe=0;Fe<c.length;Fe++)if(c[Fe]===T){var L;this._firstLevel=Fe;const Ue=T.bitrate,lt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${Ue}`),((L=this.hls.userConfig)==null?void 0:L.abrEwmaDefaultEstimate)===void 0){const yt=Math.min(Ue,this.hls.config.abrEwmaDefaultEstimateMax);yt>lt&&lt===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=yt)}break}const O=i&&!r,ne=this.hls.config,te=!!(ne.audioStreamController&&ne.audioTrackController),Ae={levels:c,audioTracks:l,subtitleTracks:d,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:te&&!O&&l.some(Fe=>!!Fe.url)};p.end=performance.now(),this.hls.trigger(g.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"),v=e<0;if(this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:G.LEVEL_SWITCH_ERROR,level:e,fatal:v,error:p,reason:p.message}),v)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&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 ${n}${i?" with Pathway "+i:""}`);const d={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(g.LEVEL_SWITCHING,d);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,r==null?void 0:r.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(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===fe.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ee.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${r}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let d=s.details;d===t.details&&d.advanced&&(d=void 0),this.playlistLoaded(r,t,d)}else(n=t.deliveryDirectives)!=null&&n.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 n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${r}${(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:""):""} ${n}`),this.hls.trigger(g.LEVEL_LOADING,{url:n,level:r,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 n=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));fi(n),this._levels=n,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 r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(g.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(g.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function du(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function hu(){return self.SourceBuffer||self.WebKitSourceBuffer}function fu(){if(!Se())return!1;const e=hu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function B0(){if(!fu())return!1;const a=Se();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 N0(){var a;const e=hu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $0=100;class U0 extends Ks{constructor(e,t,n){super(e,t,n,"stream-controller",ee.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 r=this.media,i=r?r.currentTime:null;if(i===null||!m(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,ee.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(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval($0),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=sn.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=sn.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case sn.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=sn.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=sn.IDLE;break}break}case sn.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===sn.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:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const ne={};this.altAudio===2&&(ne.type="video"),this.hls.trigger(g.BUFFER_EOS,ne),this.state=sn.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===sn.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=sn.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,v=this.getMaxBufferLength(s.maxBitrate);if(p>=v)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const T=this.backtrackFragment?this.backtrackFragment.start:l.end;let L=this.getNextFragment(T,c);if(this.couldBacktrack&&!this.fragPrevious&&L&&ze(L)&&this.fragmentTracker.getState(L)!==er.OK){var O;const te=((O=this.backtrackFragment)!=null?O:L).sn-c.startSN,Ae=c.fragments[te-1];Ae&&L.cc===Ae.cc&&(L=Ae,this.fragmentTracker.removeFragment(Ae))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(L&&this.isLoopLoading(L,T)){if(!L.gap){const te=this.audioOnly&&!this.altAudio?V.AUDIO:V.VIDEO,Ae=(te===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ae&&this.afterBufferFlushed(Ae,te,ee.MAIN)}L=this.getNextFragmentLoopLoading(L,c,l,ee.MAIN,v)}L&&(L.initSegment&&!L.initSegment.data&&!this.bitrateTest&&(L=L.initSegment),this.loadFragment(L,s,T))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===er.NOT_LOADED||r===er.PARTIAL?ze(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,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ee.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 n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.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,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,p=Math.max(s.end,d+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 sn.KEY_LOADING:case sn.FRAG_LOADING:case sn.FRAG_LOADING_WAITING_RETRY:case sn.PARSING:case sn.PARSED:this.state=sn.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 n=t.media;mi(n,"playing",this.onMediaPlaying),mi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(bi(n,"playing",this.onMediaPlaying),bi(n,"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(g.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 n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!N0(),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:n}=this;if(!n||this.state!==sn.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=sn.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,d=l.totalduration;if(!r){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:${d}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===sn.FRAG_LOADING||this.state===sn.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let v=0;if(l.live||(n=c.details)!=null&&n.live){var T;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;v=this.alignPlaylists(l,c.details,(T=this.levelLastLoaded)==null?void 0:T.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,v),this.hls.trigger(g.LEVEL_UPDATED,{details:l,level:s}),this.state===sn.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=sn.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,d=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!d)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!d&&n.readyState<4||i<l-p)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const v=rr.bufferInfo(n,r,0);if(!((c=v.buffered)!=null&&c.length)){n.currentTime=r;return}if(v.start<=i){n.currentTime=r;return}const{nextStart:L}=rr.bufferedInfo(v.buffered,i,0);L&&(n.currentTime=L)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=s[n.level];if(!l){this.warn(`Level ${n.level} not found on progress`);return}const d=l.details;if(!d){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,p=d.PTSKnown||!d.live,v=(t=n.initSegment)==null?void 0:t.data,T=this._getAudioCodec(l),L=this.transmuxer=this.transmuxer||new vl(this.hls,ee.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),O=r?r.index:-1,ne=O!==-1,te=new di(n.level,n.sn,n.stats.chunkCount,i.byteLength,O,ne),Ae=this.initPTS[n.cc];L.push(i,v,T,c,n,r,d.totalduration,p,te,Ae)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(Tn(t.url,n))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(r){this.fragmentTracker.removeAllFragments(),n.once(g.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(g.AUDIO_TRACK_SWITCHED,t)}),n.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Tn(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const l in n){const d=n[l];if(d.id==="main"){if(i=l,r=d,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===ee.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===sn.PARSED&&(this.state=sn.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),ze(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&rr.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=sn.ERROR;return}switch(t.details){case G.FRAG_GAP:case G.FRAG_PARSING_ERROR:case G.FRAG_DECRYPT_ERROR:case G.FRAG_LOAD_ERROR:case G.FRAG_LOAD_TIMEOUT:case G.KEY_LOAD_ERROR:case G.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ee.MAIN,t);break;case G.LEVEL_LOAD_ERROR:case G.LEVEL_LOAD_TIMEOUT:case G.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===sn.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===fe.LEVEL&&(this.state=sn.IDLE);break;case G.BUFFER_ADD_CODEC_ERROR:case G.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case G.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 G.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=sn.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==V.AUDIO||!this.altAudio){const n=(t===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,ee.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 n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=rr.getBuffered(e),l=s.length?s.start(0):0,d=l-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||d>0&&(d<c||this.loadingParts&&d<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${d} to match buffer start`),n+=d,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${l}`),e.currentTime=n)}}_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(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=sn.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(),r.trigger(g.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===sn.STOPPED||this.state===sn.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:l,part:d,level:c}=s,{video:p,text:v,id3:T,initSegment:L}=r,{details:O}=c,ne=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=sn.PARSING,L){const te=L.tracks;if(te){const lt=l.initSegment||l;if(this.unhandledEncryptionError(L,l))return;this._bufferInitSegment(c,te,lt,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:lt,id:t,tracks:te})}const Ae=L.initPTS,Fe=L.timescale,Ue=this.initPTS[l.cc];if(m(Ae)&&(!Ue||Ue.baseTime!==Ae||Ue.timescale!==Fe)){const lt=L.trackId;this.initPTS[l.cc]={baseTime:Ae,timescale:Fe,trackId:lt},n.trigger(g.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Ae,timescale:Fe,trackId:lt})}}if(p&&O){ne&&p.type==="audiovideo"&&this.logMuxedErr(l);const te=O.fragments[l.sn-1-O.startSN],Ae=l.sn===O.startSN,Fe=!te||l.cc>te.cc;if(r.independent!==!1){const{startPTS:Ue,endPTS:lt,startDTS:yt,endDTS:Qt}=p;if(d)d.elementaryStreams[p.type]={startPTS:Ue,endPTS:lt,startDTS:yt,endDTS:Qt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!Fe&&(this.couldBacktrack=!0),p.dropped&&p.independent){const At=this.getMainFwdBufferInfo(),Zt=(At?At.end:this.getLoadPosition())+this.config.maxBufferHole,Wt=p.firstKeyFramePTS?p.firstKeyFramePTS:Ue;if(!Ae&&Zt<Wt-this.config.maxBufferHole&&!Fe){this.backtrack(l);return}else Fe&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,lt,l.start,Qt,!0)}else Ae&&Ue-(O.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,Ue,lt,yt,Qt),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,d,i,Ae||Fe)}else if(Ae||Fe)l.gap=!0;else{this.backtrack(l);return}}if(ne){const{startPTS:te,endPTS:Ae,startDTS:Fe,endDTS:Ue}=ne;d&&(d.elementaryStreams[V.AUDIO]={startPTS:te,endPTS:Ae,startDTS:Fe,endDTS:Ue}),l.setElementaryStreamInfo(V.AUDIO,te,Ae,Fe,Ue),this.bufferFragmentData(ne,l,d,i)}if(O&&T!=null&&T.samples.length){const te={id:t,frag:l,details:O,samples:T.samples};n.trigger(g.FRAG_PARSING_METADATA,te)}if(O&&v){const te={id:t,frag:l,details:O,samples:v.samples};n.trigger(g.FRAG_PARSING_USERDATA,te)}}logMuxedErr(e){this.warn(`${ze(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==sn.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:l}=t;if(i){const c=e.audioCodec;let p=Ot(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const v=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&&v.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&v.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=ee.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=ee.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 d=Object.keys(t);if(d.length){if(this.hls.trigger(g.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const v=t[c].initSegment;v!=null&&v.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:c,data:v,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ee.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.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=sn.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(rr.isBuffered(e,n)?t=this.getAppendedFrag(n):rr.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.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 m(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(m(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?Hn(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.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 z0 extends Q{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.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=G.KEY_LOAD_ERROR,n,r,i){return new cr({type:ve.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!ze(e)||!ze(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const d=Ti(l);if(d)return this.emeController.getKeySystemAccess([d])})}if(this.config.requireKeySystemAccessOnStart){const r=Li(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;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,G.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,G.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=cl(i);let d=this.keyIdToKeyInfo[l];if((n=d)!=null&&n.decryptdata.key)return i.key=d.decryptdata.key,Promise.resolve({frag:e,keyInfo:d});if(this.emeController&&(r=d)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(d.decryptdata)){case"usable":case"usable-in-future":return d.keyLoadPromise.then(p=>{const{keyInfo:v}=p;return i.key=v.decryptdata.key,{frag:e,keyInfo:v}})}switch(this.log(`${this.keyIdToKeyInfo[l]?"Rel":"L"}oading${i.keyId?" keyId: "+Y(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),d=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(d,e):this.loadKeyEME(d,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(d,e);default:return Promise.reject(this.createKeyLoadError(e,G.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r;if(!e.decryptdata.keyId&&(r=t.initSegment)!=null&&r.data){const s=xt(t.initSegment.data);if(s.length){const l=s[0];l.some(d=>d!==0)&&(this.log(`Using keyId found in init segment ${Y(l)}`),e.decryptdata.keyId=l,Ci.setKeyIdForUri(e.decryptdata.uri,l))}}const i=this.emeController.loadKey(n);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(T,L,O,ne)=>{const{frag:te,keyInfo:Ae}=O,Fe=cl(Ae.decryptdata);if(!te.decryptdata||Ae!==this.keyIdToKeyInfo[Fe])return l(this.createKeyLoadError(te,G.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),ne));Ae.decryptdata.key=te.decryptdata.key=new Uint8Array(T.data),te.keyLoader=null,Ae.loader=null,s({frag:te,keyInfo:Ae})},onError:(T,L,O,ne)=>{this.resetLoader(L),l(this.createKeyLoadError(t,G.KEY_LOAD_ERROR,new Error(`HTTP Error ${T.code} loading key ${T.text}`),O,C({url:d.url,data:void 0},T)))},onTimeout:(T,L,O)=>{this.resetLoader(L),l(this.createKeyLoadError(t,G.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),O))},onAbort:(T,L,O)=>{this.resetLoader(L),l(this.createKeyLoadError(t,G.INTERNAL_ABORTED,new Error("key loading aborted"),O))}};i.load(d,p,v)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=cl(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==gr.FAIRPLAY){const e=a.keyId;if(e)return Y(e)}return a.uri}function mu(a){const{type:e}=a;switch(e){case fe.AUDIO_TRACK:return ee.AUDIO;case fe.SUBTITLE_TRACK:return ee.SUBTITLE;default:return ee.MAIN}}function dl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class j0{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,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:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:fe.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:d}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:fe.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:d})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:fe.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:fe.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[fe.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[fe.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,p=r.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}`),r.abort()}let i;if(e.type===fe.MANIFEST?i=n.manifestLoadPolicy.default:i=S({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),m((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===fe.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===fe.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===fe.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,v=c.targetduration;if(p&&v){const T=Math.max(p*3,v*.8)*1e3;i=S({},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},d={onSuccess:(c,p,v,T)=>{const L=this.getInternalLoader(v);this.resetInternalLoader(v.type);const O=c.data;p.parsing.start=performance.now(),Di.isMediaPlaylist(O)||v.type!==fe.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,v,T||null,L):this.handleMasterPlaylist(c,p,v,T)},onError:(c,p,v,T)=>{this.handleNetworkError(p,v,!1,c,T)},onTimeout:(c,p,v)=>{this.handleNetworkError(p,v,!0,void 0,c)}};r.load(e,l,d)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,l=dl(e,n),d=Di.parseMasterPlaylist(s,l);if(d.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,d.playlistParsingError,r,t);return}const{contentSteering:c,levels:p,sessionData:v,sessionKeys:T,startTimeOffset:L,variableList:O}=d;this.variableList=O,p.forEach(Fe=>{const{unknownCodecs:Ue}=Fe;if(Ue){const{preferManagedMediaSource:lt}=this.hls.config;let{audioCodec:yt,videoCodec:Qt}=Fe;for(let At=Ue.length;At--;){const Zt=Ue[At];$e(Zt,"audio",lt)?(Fe.audioCodec=yt=yt?`${yt},${Zt}`:Zt,St.audio[yt.substring(0,4)]=2,Ue.splice(At,1)):$e(Zt,"video",lt)&&(Fe.videoCodec=Qt=Qt?`${Qt},${Zt}`:Zt,St.video[Qt.substring(0,4)]=2,Ue.splice(At,1))}}});const{AUDIO:ne=[],SUBTITLES:te,"CLOSED-CAPTIONS":Ae}=Di.parseMasterPlaylistMedia(s,l,d);ne.length&&!ne.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"),ne.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Fn({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:p,audioTracks:ne,subtitles:te,captions:Ae,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:v,sessionKeys:T,startTimeOffset:L,variableList:O})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:d,type:c}=n,p=dl(e,n),v=m(d)?d:m(l)?l:0,T=mu(n),L=Di.parseLevelPlaylist(e.data,p,v,T,0,this.variableList);if(c===fe.MANIFEST){const O={attrs:new Fn({}),bitrate:0,details:L,name:"",url:p};L.requestScheduled=t.loading.start+Lr(L,0),s.trigger(g.MANIFEST_LOADED,{levels:[O],audioTracks:[],url:p,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=L,this.handlePlaylistLoaded(L,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:G.MANIFEST_PARSING_ERROR,fatal:t.type===fe.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===fe.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===fe.AUDIO_TRACK||e.type===fe.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=G.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case fe.MANIFEST:d=n?G.MANIFEST_LOAD_TIMEOUT:G.MANIFEST_LOAD_ERROR,c=!0;break;case fe.LEVEL:d=n?G.LEVEL_LOAD_TIMEOUT:G.LEVEL_LOAD_ERROR,c=!1;break;case fe.AUDIO_TRACK:d=n?G.AUDIO_TRACK_LOAD_TIMEOUT:G.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case fe.SUBTITLE_TRACK:d=n?G.SUBTITLE_TRACK_LOAD_TIMEOUT:G.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const v={type:ve.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(r){const T=(t==null?void 0:t.url)||e.url;v.response=C({url:T,data:void 0},r)}this.hls.trigger(g.ERROR,v)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:d,level:c,levelOrTrack:p,id:v,groupId:T,deliveryDirectives:L}=r,O=dl(t,r),ne=mu(r);let te=typeof r.level=="number"&&ne===ee.MAIN?c:void 0;const Ae=e.playlistParsingError;if(Ae){if(this.hls.logger.warn(`${Ae} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:G.LEVEL_PARSING_ERROR,fatal:!1,url:O,error:Ae,reason:Ae.message,response:t,context:r,level:te,parent:ne,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const Fe=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:G.LEVEL_EMPTY_ERROR,fatal:!1,url:O,error:Fe,reason:Fe.message,response:t,context:r,level:te,parent:ne,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case fe.MANIFEST:case fe.LEVEL:if(te){if(!p)te=0;else if(p!==l.levels[te]){const Fe=l.levels.indexOf(p);Fe>-1&&(te=Fe)}}l.trigger(g.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:te||0,id:v||0,stats:n,networkDetails:i,deliveryDirectives:L,withoutMultiVariant:d===fe.MANIFEST});break;case fe.AUDIO_TRACK:l.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:L});break;case fe.SUBTITLE_TRACK:l.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:L});break}}}class Fs{static get version(){return Gs}static isMSESupported(){return fu()}static isSupported(){return B0()}static getMediaSource(){return Se()}static get Events(){return g}static get MetadataSchema(){return pi}static get ErrorTypes(){return ve}static get ErrorDetails(){return G}static get DefaultConfig(){return Fs.defaultConfig?Fs.defaultConfig:A0}static set DefaultConfig(e){Fs.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=he(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=C0(Fs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&D0(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:d}=n,c=new l(this),p=this.abrController=new r(this),v=new Pr(this),T=n.interstitialsController,L=T?this.interstitialsController=new T(this,Fs):null,O=this.bufferController=new i(this,v),ne=this.capLevelController=new s(this),te=new d(this),Ae=new j0(this),Fe=n.contentSteeringController,Ue=Fe?new Fe(this):null,lt=this.levelController=new F0(this,Ue),yt=new k0(this),Qt=new z0(this.config,this.logger),At=this.streamController=new U0(this,v,Qt),Zt=this.gapController=new O0(this,v);ne.setStreamController(At),te.setStreamController(At);const Wt=[Ae,lt,At];L&&Wt.splice(1,0,L),Ue&&Wt.splice(1,0,Ue),this.networkControllers=Wt;const Bt=[p,O,Zt,ne,te,yt,v];this.audioTrackController=this.createController(n.audioTrackController,Wt);const dn=n.audioStreamController;dn&&Wt.push(this.audioStreamController=new dn(this,v,Qt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Wt);const Ln=n.subtitleStreamController;Ln&&Wt.push(this.subtititleStreamController=new Ln(this,v,Qt)),this.createController(n.timelineController,Bt),Qt.emeController=this.emeController=this.createController(n.emeController,Bt),this.cmcdController=this.createController(n.cmcdController,Bt),this.latencyController=this.createController(M0,Bt),this.coreComponents=Bt,Wt.push(c);const Vn=c.onErrorOut;typeof Vn=="function"&&this.on(g.ERROR,Vn,c),this.on(g.MANIFEST_LOADED,Ae.onManifestLoaded,Ae)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===g.ERROR;this.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:G.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(g.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(g.ERROR,{type:ve.OTHER_ERROR,details:G.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,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(g.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(g.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=x.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(g.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 n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}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={[ee.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ee.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ee.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=Oc()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){wt(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}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 n=dt(t);return Pt(e,n,navigator.mediaCapabilities)}}Fs.defaultConfig=void 0},16722:function(ln,ct,b){"use strict";b.d(ct,{Z:function(){return ee}});const m=o=>typeof o=="object"&&o!=null&&o.nodeType===1,de=(o,H)=>(!H||o!=="hidden")&&o!=="visible"&&o!=="clip",oe=(o,H)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const k=getComputedStyle(o,null);return de(k.overflowY,H)||de(k.overflowX,H)||(S=>{const w=(C=>{if(!C.ownerDocument||!C.ownerDocument.defaultView)return null;try{return C.ownerDocument.defaultView.frameElement}catch(R){return null}})(S);return!!w&&(w.clientHeight<S.scrollHeight||w.clientWidth<S.scrollWidth)})(o)}return!1},ve=(o,H,k,S,w,C,R,q)=>C<o&&R>H||C>o&&R<H?0:C<=o&&q<=k||R>=H&&q>=k?C-o-S:R>H&&q<k||C<o&&q>k?R-H+w:0,G=o=>{const H=o.parentElement;return H==null?o.getRootNode().host||null:H},g=(o,H)=>{var k,S,w,C;if(typeof document=="undefined")return[];const{scrollMode:R,block:q,inline:Q,boundary:K,skipOverflowHiddenElements:D}=H,$=typeof K=="function"?K:Xe=>Xe!==K;if(!m(o))throw new TypeError("Invalid target");const M=document.scrollingElement||document.documentElement,F=[];let ue=o;for(;m(ue)&&$(ue);){if(ue=G(ue),ue===M){F.push(ue);break}ue!=null&&ue===document.body&&oe(ue)&&!oe(document.documentElement)||ue!=null&&oe(ue,D)&&F.push(ue)}const he=(S=(k=window.visualViewport)==null?void 0:k.width)!=null?S:innerWidth,le=(C=(w=window.visualViewport)==null?void 0:w.height)!=null?C:innerHeight,{scrollX:Se,scrollY:ke}=window,{height:De,width:Me,top:Y,right:B,bottom:W,left:re}=o.getBoundingClientRect(),{top:ie,right:se,bottom:x,left:E}=(Xe=>{const _e=window.getComputedStyle(Xe);return{top:parseFloat(_e.scrollMarginTop)||0,right:parseFloat(_e.scrollMarginRight)||0,bottom:parseFloat(_e.scrollMarginBottom)||0,left:parseFloat(_e.scrollMarginLeft)||0}})(o);let V=q==="start"||q==="nearest"?Y-ie:q==="end"?W+x:Y+De/2-ie+x,me=Q==="center"?re+Me/2-E+se:Q==="end"?B+se:re-E;const ze=[];for(let Xe=0;Xe<F.length;Xe++){const _e=F[Xe],{height:Ke,width:Qe,top:st,right:rt,bottom:Vt,left:qe}=_e.getBoundingClientRect();if(R==="if-needed"&&Y>=0&&re>=0&&W<=le&&B<=he&&(_e===M&&!oe(_e)||Y>=st&&W<=Vt&&re>=qe&&B<=rt))return ze;const Kt=getComputedStyle(_e),je=parseInt(Kt.borderLeftWidth,10),Tt=parseInt(Kt.borderTopWidth,10),Re=parseInt(Kt.borderRightWidth,10),Ce=parseInt(Kt.borderBottomWidth,10);let ce=0,Je=0;const Le="offsetWidth"in _e?_e.offsetWidth-_e.clientWidth-je-Re:0,Ie="offsetHeight"in _e?_e.offsetHeight-_e.clientHeight-Tt-Ce:0,P="offsetWidth"in _e?_e.offsetWidth===0?0:Qe/_e.offsetWidth:0,pe="offsetHeight"in _e?_e.offsetHeight===0?0:Ke/_e.offsetHeight:0;if(M===_e)ce=q==="start"?V:q==="end"?V-le:q==="nearest"?ve(ke,ke+le,le,Tt,Ce,ke+V,ke+V+De,De):V-le/2,Je=Q==="start"?me:Q==="center"?me-he/2:Q==="end"?me-he:ve(Se,Se+he,he,je,Re,Se+me,Se+me+Me,Me),ce=Math.max(0,ce+ke),Je=Math.max(0,Je+Se);else{ce=q==="start"?V-st-Tt:q==="end"?V-Vt+Ce+Ie:q==="nearest"?ve(st,Vt,Ke,Tt,Ce+Ie,V,V+De,De):V-(st+Ke/2)+Ie/2,Je=Q==="start"?me-qe-je:Q==="center"?me-(qe+Qe/2)+Le/2:Q==="end"?me-rt+Re+Le:ve(qe,rt,Qe,je,Re+Le,me,me+Me,Me);const{scrollLeft:xe,scrollTop:He}=_e;ce=pe===0?0:Math.max(0,Math.min(He+ce/pe,_e.scrollHeight-Ke/pe+Ie)),Je=P===0?0:Math.max(0,Math.min(xe+Je/P,_e.scrollWidth-Qe/P+Le)),V+=He-ce,me+=xe-Je}ze.push({el:_e,top:ce,left:Je})}return ze},fe=o=>o===!1?{block:"end",inline:"nearest"}:(H=>H===Object(H)&&Object.keys(H).length!==0)(o)?o:{block:"start",inline:"nearest"};function ee(o,H){if(!o.isConnected||!(w=>{let C=w;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 k=(w=>{const C=window.getComputedStyle(w);return{top:parseFloat(C.scrollMarginTop)||0,right:parseFloat(C.scrollMarginRight)||0,bottom:parseFloat(C.scrollMarginBottom)||0,left:parseFloat(C.scrollMarginLeft)||0}})(o);if((w=>typeof w=="object"&&typeof w.behavior=="function")(H))return H.behavior(g(o,H));const S=typeof H=="boolean"||H==null?void 0:H.behavior;for(const{el:w,top:C,left:R}of g(o,fe(H))){const q=C-k.top+k.bottom,Q=R-k.left+k.right;w.scroll({top:q,left:Q,behavior:S})}}}}]);
}());